codecharta-visualization 1.143.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/conf/jestUnit.config.json +7 -1
- package/conf/setupJestUnit.ts +31 -2
- package/dist/bundler/browser/chunk-EPUAHMGD.js +17 -0
- package/dist/bundler/browser/chunk-MWZH4CY2.js +4207 -0
- package/dist/bundler/browser/codeCharta/assets/sample1.cc.json +167 -95
- package/dist/bundler/browser/codeCharta/assets/sample2.cc.json +80 -44
- package/dist/bundler/browser/codeCharta/assets/sample3.cc.json +69 -38
- package/dist/bundler/browser/codeCharta/assets/sample4.cc.json +74 -38
- package/dist/bundler/browser/index.html +2 -2
- package/dist/bundler/browser/main-MZ6ES7FX.js +3484 -0
- package/dist/bundler/browser/package.json +14 -15
- package/dist/bundler/browser/styles-WSHUKF7I.css +1 -0
- package/package.json +14 -15
- package/tsconfig.json +1 -0
- package/dist/bundler/browser/main-ZVHZ5VBI.js +0 -7640
- package/dist/bundler/browser/polyfills-DOYHMSTV.js +0 -2
- package/dist/bundler/browser/styles-C2TMEKNK.css +0 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import{$ as gt,$a as bv,$e as Ev,$f as al,$h as Em,Aa as Sv,Ag as Zv,Ah as cm,B,Ba as ie,Be as rl,Bg as Kv,Bh as ca,C as dt,Ca as Tt,Ch as ll,D as vt,Da as Zr,Db as lc,Dg as $v,Dh as hm,Ea as wv,Eg as Qv,Eh as ul,Fh as fl,Gg as Jv,Gh as pm,Ha as Cv,I as er,Ia as Qs,Ih as dm,J as $i,Jh as cl,Ka as sc,Ke as il,Ld as tl,M as yv,Mh as vm,Nh as mm,Oh as gm,Pa as Tv,Pf as Ov,Ph as ym,R as z,Ra as le,Rf as ao,Rh as _m,Sa as yt,Sf as uc,Sh as xm,T as _e,Ta as ge,Tf as Iv,Th as Sm,U as _v,Ua as Js,Ud as Mv,Uf as Av,Uh as wm,Vf as Pv,Vh as Cm,W as qs,Wf as Nr,Wg as em,Wh as Tm,X as Xs,Xf as Ji,Xg as tm,Xh as bm,Yf as nl,Yg as rm,Yh as Dm,Z as oo,Zf as en,Zh as Mm,_ as mt,_f as ol,a as Hs,aa as js,ag as sl,ai as Rm,b as Vs,ba as Pr,bg as Lv,bh as so,bi as Om,ca as Lr,cg as Nv,ch as lo,d as no,da as $,dg as kv,di as Im,ea as Y,eg as zv,ei as Am,f as Gs,fa as q,fg as Fv,fi as cc,ga as Le,gf as Rv,gg as Bv,gh as yi,gi as Pm,h as ua,ha as Xe,hg as Wv,hi as Lm,ia as He,ig as Uv,ii as Nm,ja as fa,jg as Hv,ka as oc,kg as Vv,la as Wt,lg as Gv,ma as vi,mb as el,mg as Yv,na as be,nb as st,ng as qv,nh as im,oa as mi,ob as lt,og as Xv,oh as nm,pa as xe,pb as gi,pg as jv,qa as xv,qh as fc,ra as ac,rh as om,th as am,u as Ys,uh as sm,va as Zs,vh as lm,wa as Ks,wh as um,xa as Qi,xh as fm,ya as jr,yb as Dv,z as We,za as $s,zh as uo}from"./chunk-MWZH4CY2.js";var rt=(()=>{class r{constructor(){this.domainStateReadWindow=B(Pv),this.store=B(lt),this.settings=st(this.domainStateReadWindow.wordCloudSettings$,{initialValue:ol}),this.hasTfidfData=st(this.store.select(sm),{initialValue:!1})}static{this.\u0275fac=function(i){return new(i||r)}}static{this.\u0275prov=We({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var SC=[[["","body",""]],"*"],wC=["[body]","*"],km=(()=>{class r{constructor(){this.label=ge.required(),this.value=ge.required(),this.idPrefix=ge.required(),this.minWidthClass=ge("min-w-[120px]"),this.popoverId=le(()=>`${this.idPrefix()}-popover`),this.anchorName=le(()=>`${this.idPrefix()}-cog`),this.segmentTestId=le(()=>`${this.idPrefix()}-segment`),this.cogTestId=le(()=>`${this.idPrefix()}-cog`)}static{this.\u0275fac=function(i){return new(i||r)}}static{this.\u0275cmp=_e({type:r,selectors:[["cc-domain-segment"]],hostAttrs:[1,"contents"],inputs:{label:[1,"label"],value:[1,"value"],idPrefix:[1,"idPrefix"],minWidthClass:[1,"minWidthClass"]},ngContentSelectors:wC,decls:3,vars:8,consts:[[3,"label","metricName","hasCog","cogPopoverId","cogAnchorName","testId","cogTestId","minWidthClass"]],template:function(i,n){i&1&&(xv(SC),Y(0,"cc-axis-card",0),ac(1,0,["ngProjectAs","[body]",5,["","body",""]]),q(),ac(2,1)),i&2&&$("label",n.label())("metricName",n.value())("hasCog",!0)("cogPopoverId",n.popoverId())("cogAnchorName",n.anchorName())("testId",n.segmentTestId())("cogTestId",n.cogTestId())("minWidthClass",n.minWidthClass())},dependencies:[Zv],encapsulation:2,changeDetection:0})}}return r})();var ur=(()=>{class r{constructor(){this.store=B(lt)}setShape(t){this.store.dispatch(Hv({value:t}))}setSizeRange(t){this.store.dispatch(Gv({value:t}))}setRotationRange(t){this.store.dispatch(Bv({value:t}))}setRotationStep(t){this.store.dispatch(Wv({value:t}))}setGridSize(t){this.store.dispatch(Nv({value:t}))}setSizingMode(t){this.store.dispatch(Yv({value:t}))}setTopN(t){this.store.dispatch(jv({value:t}))}setShrinkToFit(t){this.store.dispatch(Vv({value:t}))}setDrawOutOfBound(t){this.store.dispatch(Lv({value:t}))}static{this.\u0275fac=function(i){return new(i||r)}}static{this.\u0275prov=We({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var zm=(()=>{class r{constructor(){this.readStore=B(rt),this.writeStore=B(ur),this.popoverId=ge.required(),this.anchorName=ge.required(),this.settings=this.readStore.settings,this.minRotationBounds={min:-90,max:0},this.maxRotationBounds={min:0,max:90},this.rotationStepBounds={min:15,max:90,step:15},this.resetKeys=["domainState.rotationRange","domainState.rotationStep"]}onRotationStepChange(t){this.writeStore.setRotationStep(t)}onRotationRangeMinChange(t){this.writeStore.setRotationRange(al(this.settings().rotationRange,t))}onRotationRangeMaxChange(t){this.writeStore.setRotationRange(sl(this.settings().rotationRange,t))}static{this.\u0275fac=function(i){return new(i||r)}}static{this.\u0275cmp=_e({type:r,selectors:[["cc-rotation-settings-popover"]],hostAttrs:[1,"contents"],inputs:{popoverId:[1,"popoverId"],anchorName:[1,"anchorName"]},decls:15,vars:14,consts:[["ariaLabel","Rotation Settings","widthClass","w-80","contentClass","gap-3 py-3 px-4",3,"popoverId","anchorName"],[1,"flex","flex-col","gap-2","rounded-lg","bg-base-200","p-3"],["data-testid","domain-bar-rotation-min"],[1,"text-sm"],["ariaLabel","Min Rotation in degrees",3,"valueChange","min","max","value"],["data-testid","domain-bar-rotation-max"],["ariaLabel","Max Rotation in degrees",3,"valueChange","min","max","value"],["data-testid","domain-bar-rotation-step","title","Words are rotated in multiples of this angle"],["ariaLabel","Rotation Step in degrees",3,"valueChange","min","max","step","value"],["tooltip","Reset the rotation settings to their defaults","label","Reset rotation",3,"settingsKeys","small"]],template:function(i,n){i&1&&(Y(0,"cc-settings-popover-shell",0)(1,"div",1)(2,"div",2)(3,"span",3),ie(4,"Min Rotation"),q(),Y(5,"cc-slider-number-input",4),be("valueChange",function(a){return n.onRotationRangeMinChange(a)}),q()(),Y(6,"div",5)(7,"span",3),ie(8,"Max Rotation"),q(),Y(9,"cc-slider-number-input",6),be("valueChange",function(a){return n.onRotationRangeMaxChange(a)}),q()(),Y(10,"div",7)(11,"span",3),ie(12,"Rotation Step"),q(),Y(13,"cc-slider-number-input",8),be("valueChange",function(a){return n.onRotationStepChange(a)}),q()()(),Le(14,"cc-reset-settings-button",9),q()),i&2&&($("popoverId",n.popoverId())("anchorName",n.anchorName()),z(5),$("min",n.minRotationBounds.min)("max",n.minRotationBounds.max)("value",n.settings().rotationRange[0]),z(4),$("min",n.maxRotationBounds.min)("max",n.maxRotationBounds.max)("value",n.settings().rotationRange[1]),z(4),$("min",n.rotationStepBounds.min)("max",n.rotationStepBounds.max)("step",n.rotationStepBounds.step)("value",n.settings().rotationStep),z(),$("settingsKeys",n.resetKeys)("small",!0))},dependencies:[so,lo,yi],encapsulation:2,changeDetection:0})}}return r})();function CC(r,e){if(r&1&&(Y(0,"option",4),ie(1),q()),r&2){let t=e.$implicit,i=xe();$("value",t)("selected",t===i.settings().shape),z(),Tt(i.shapeLabels[t])}}var Fm=(()=>{class r{constructor(){this.readStore=B(rt),this.writeStore=B(ur),this.popoverId=ge.required(),this.anchorName=ge.required(),this.settings=this.readStore.settings,this.shapes=Object.values(Ji),this.shapeLabels=nl,this.resetKeys=["domainState.shape"]}onShapeChange(t){this.writeStore.setShape(t)}static{this.\u0275fac=function(i){return new(i||r)}}static{this.\u0275cmp=_e({type:r,selectors:[["cc-shape-settings-popover"]],hostAttrs:[1,"contents"],inputs:{popoverId:[1,"popoverId"],anchorName:[1,"anchorName"]},decls:8,vars:4,consts:[["ariaLabel","Shape Settings",3,"popoverId","anchorName"],["title","The outline the words are laid out in",1,"form-control","w-full","gap-1"],[1,"text-sm"],["data-testid","domain-bar-shape",1,"select","select-bordered","select-sm","w-full",3,"change"],[3,"value","selected"],["tooltip","Reset the shape to its default","label","Reset shape",3,"settingsKeys","small"]],template:function(i,n){i&1&&(Y(0,"cc-settings-popover-shell",0)(1,"label",1)(2,"span",2),ie(3,"Shape"),q(),Y(4,"select",3),be("change",function(a){return n.onShapeChange(a.target.value)}),Pr(5,CC,2,3,"option",4,js),q()(),Le(7,"cc-reset-settings-button",5),q()),i&2&&($("popoverId",n.popoverId())("anchorName",n.anchorName()),z(5),Lr(n.shapes),z(2),$("settingsKeys",n.resetKeys)("small",!0))},dependencies:[so,lo],encapsulation:2,changeDetection:0})}}return r})();var Bm=(()=>{class r{constructor(){this.readStore=B(rt),this.writeStore=B(ur),this.settings=this.readStore.settings,this.wordCountBounds={min:10,max:1e3,step:10}}onTopNChange(t){this.writeStore.setTopN(t)}static{this.\u0275fac=function(i){return new(i||r)}}static{this.\u0275cmp=_e({type:r,selectors:[["cc-word-count-control"]],hostAttrs:[1,"contents"],decls:4,vars:4,consts:[["data-testid","domain-bar-top-n","title","How many of the most important words are drawn",1,"rounded-lg","bg-base-200","p-3"],[1,"text-sm"],["ariaLabel","Words",3,"valueChange","min","max","step","value"]],template:function(i,n){i&1&&(Y(0,"div",0)(1,"span",1),ie(2,"Words"),q(),Y(3,"cc-slider-number-input",2),be("valueChange",function(a){return n.onTopNChange(a)}),q()()),i&2&&(z(3),$("min",n.wordCountBounds.min)("max",n.wordCountBounds.max)("step",n.wordCountBounds.step)("value",n.settings().topN))},dependencies:[yi],encapsulation:2,changeDetection:0})}}return r})();var Wm=(()=>{class r{constructor(){this.readStore=B(rt),this.writeStore=B(ur),this.settings=this.readStore.settings,this.smallestWordBounds={min:10,max:40},this.largestWordBounds={min:40,max:120},this.shrinkToFitTitle=le(()=>this.settings().shrinkToFit?"On \u2014 words that do not fit are shrunk until they do, so the full word count is drawn. Tail words can render below Smallest Word.":"Off \u2014 words that do not fit are left out, so Smallest Word is exact but fewer words than requested appear."),this.drawOutOfBoundTitle=le(()=>this.settings().drawOutOfBound?"On \u2014 words may render partially outside the layout area instead of being dropped or shrunk, so more words fit at their true size.":"Off \u2014 every word is kept fully inside the layout area; words that only fit overlapping the edge are shrunk or left out.")}onSizeRangeMinChange(t){this.writeStore.setSizeRange(al(this.settings().sizeRange,t))}onSizeRangeMaxChange(t){this.writeStore.setSizeRange(sl(this.settings().sizeRange,t))}onShrinkToFitChange(t){this.writeStore.setShrinkToFit(t)}onDrawOutOfBoundChange(t){this.writeStore.setDrawOutOfBound(t)}static{this.\u0275fac=function(i){return new(i||r)}}static{this.\u0275cmp=_e({type:r,selectors:[["cc-word-size-range-control"]],hostAttrs:[1,"contents"],decls:17,vars:10,consts:[[1,"flex","flex-col","gap-2","rounded-lg","bg-base-200","p-3"],["data-testid","domain-bar-size-min","title","The least important word in the cloud renders at this size"],[1,"text-sm"],["ariaLabel","Smallest Word in pixels",3,"valueChange","min","max","value"],["data-testid","domain-bar-size-max","title","The most important word in the cloud renders at this size"],["ariaLabel","Largest Word in pixels",3,"valueChange","min","max","value"],["data-testid","domain-bar-shrink-to-fit",1,"flex","cursor-pointer","items-center","gap-2",3,"title"],["type","checkbox",1,"checkbox","checkbox-sm",3,"change","checked"],["data-testid","domain-bar-draw-out-of-bound",1,"flex","cursor-pointer","items-center","gap-2",3,"title"]],template:function(i,n){i&1&&(Y(0,"div",0)(1,"div",1)(2,"span",2),ie(3,"Smallest Word"),q(),Y(4,"cc-slider-number-input",3),be("valueChange",function(a){return n.onSizeRangeMinChange(a)}),q()(),Y(5,"div",4)(6,"span",2),ie(7,"Largest Word"),q(),Y(8,"cc-slider-number-input",5),be("valueChange",function(a){return n.onSizeRangeMaxChange(a)}),q()(),Y(9,"label",6)(10,"input",7),be("change",function(a){return n.onShrinkToFitChange(a.target.checked)}),q(),Y(11,"span",2),ie(12,"Fit All Words"),q()(),Y(13,"label",8)(14,"input",7),be("change",function(a){return n.onDrawOutOfBoundChange(a.target.checked)}),q(),Y(15,"span",2),ie(16,"Draw Outside Bounds"),q()()()),i&2&&(z(4),$("min",n.smallestWordBounds.min)("max",n.smallestWordBounds.max)("value",n.settings().sizeRange[0]),z(4),$("min",n.largestWordBounds.min)("max",n.largestWordBounds.max)("value",n.settings().sizeRange[1]),z(),$("title",n.shrinkToFitTitle()),z(),$("checked",n.settings().shrinkToFit),z(3),$("title",n.drawOutOfBoundTitle()),z(),$("checked",n.settings().drawOutOfBound))},dependencies:[yi],encapsulation:2,changeDetection:0})}}return r})();function TC(r,e){r&1&&(Xe(0,"span",5),ie(1,"TF-IDF is unavailable: the loaded file has no TF-IDF scores."),He())}var Um=(()=>{class r{constructor(){this.readStore=B(rt),this.writeStore=B(ur),this.settings=this.readStore.settings,this.hasTfidfData=this.readStore.hasTfidfData,this.WordCloudSizingMode=en,this.tfidfOptionTitle=le(()=>this.hasTfidfData()?"TF-IDF (relative importance) \u2014 sizes words by how distinctive they are, not by raw count":"TF-IDF (relative importance) \u2014 not available: the loaded file has no TF-IDF scores")}onSizingModeChange(t){this.writeStore.setSizingMode(t)}static{this.\u0275fac=function(i){return new(i||r)}}static{this.\u0275cmp=_e({type:r,selectors:[["cc-word-sizing-mode-control"]],hostAttrs:[1,"contents"],decls:9,vars:7,consts:[["title","Which word metric drives a word's rendered size",1,"form-control","w-full","gap-1"],[1,"text-sm"],["data-testid","domain-bar-sizing-mode",1,"select","select-bordered","select-sm","w-full",3,"change"],["title","Frequency \u2014 sizes words by how often they occur",3,"value","selected"],[3,"value","selected","disabled","title"],[1,"text-xs","opacity-70"]],template:function(i,n){i&1&&(Xe(0,"label",0)(1,"span",1),ie(2,"Word Sizing"),He(),Xe(3,"select",2),mi("change",function(a){return n.onSizingModeChange(a.target.value)}),Xe(4,"option",3),ie(5," Frequency "),He(),Xe(6,"option",4),ie(7," TF-IDF "),He()(),mt(8,TC,2,0,"span",5),He()),i&2&&(z(4),vi("value",n.WordCloudSizingMode.frequency)("selected",n.settings().sizingMode===n.WordCloudSizingMode.frequency),z(2),vi("value",n.WordCloudSizingMode.tfidf)("selected",n.settings().sizingMode===n.WordCloudSizingMode.tfidf)("disabled",!n.hasTfidfData())("title",n.tfidfOptionTitle()),z(2),gt(n.hasTfidfData()?-1:8))},encapsulation:2,changeDetection:0})}}return r})();var Hm=(()=>{class r{constructor(){this.readStore=B(rt),this.writeStore=B(ur),this.settings=this.readStore.settings,this.wordSpacingBounds={min:4,max:16,step:4}}onGridSizeChange(t){this.writeStore.setGridSize(t)}static{this.\u0275fac=function(i){return new(i||r)}}static{this.\u0275cmp=_e({type:r,selectors:[["cc-word-spacing-control"]],hostAttrs:[1,"contents"],decls:4,vars:4,consts:[["data-testid","domain-bar-grid-size","title","Spacing between words in pixels \u2014 larger means fewer, more spread-out words",1,"rounded-lg","bg-base-200","p-3"],[1,"text-sm"],["ariaLabel","Word Spacing in pixels",3,"valueChange","min","max","step","value"]],template:function(i,n){i&1&&(Y(0,"div",0)(1,"span",1),ie(2,"Word Spacing"),q(),Y(3,"cc-slider-number-input",2),be("valueChange",function(a){return n.onGridSizeChange(a)}),q()()),i&2&&(z(3),$("min",n.wordSpacingBounds.min)("max",n.wordSpacingBounds.max)("step",n.wordSpacingBounds.step)("value",n.settings().gridSize))},dependencies:[yi],encapsulation:2,changeDetection:0})}}return r})();var Vm=(()=>{class r{constructor(){this.popoverId=ge.required(),this.anchorName=ge.required(),this.resetKeys=["domainState.sizingMode","domainState.topN","domainState.sizeRange","domainState.gridSize","domainState.shrinkToFit","domainState.drawOutOfBound"]}static{this.\u0275fac=function(i){return new(i||r)}}static{this.\u0275cmp=_e({type:r,selectors:[["cc-word-sizing-settings-popover"]],hostAttrs:[1,"contents"],inputs:{popoverId:[1,"popoverId"],anchorName:[1,"anchorName"]},decls:6,vars:4,consts:[["ariaLabel","Word Sizing Settings","widthClass","w-80","contentClass","gap-3 py-3 px-4",3,"popoverId","anchorName"],["tooltip","Reset the word sizing settings to their defaults","label","Reset word sizing",3,"settingsKeys","small"]],template:function(i,n){i&1&&(Y(0,"cc-settings-popover-shell",0),Le(1,"cc-word-sizing-mode-control")(2,"cc-word-count-control")(3,"cc-word-size-range-control")(4,"cc-word-spacing-control")(5,"cc-reset-settings-button",1),q()),i&2&&($("popoverId",n.popoverId())("anchorName",n.anchorName()),z(5),$("settingsKeys",n.resetKeys)("small",!0))},dependencies:[so,lo,Um,Bm,Wm,Hm],encapsulation:2,changeDetection:0})}}return r})();var hc=(()=>{class r{constructor(){this.barBottom=Kv,this.readStore=B(rt),this.settings=this.readStore.settings,this.shapeLabel=le(()=>nl[this.settings().shape]),this.sizingModeLabel=le(()=>this.settings().sizingMode===en.tfidf?"TF-IDF":"Frequency"),this.rotationRangeLabel=le(()=>{let[t,i]=this.settings().rotationRange;return`${t}\xB0 \u2013 ${i}\xB0`})}static{this.\u0275fac=function(i){return new(i||r)}}static{this.\u0275cmp=_e({type:r,selectors:[["cc-domain-bar"]],hostVars:2,hostBindings:function(i,n){i&2&&jr("bottom",n.barBottom)},features:[qs([$v])],decls:11,vars:10,consts:[["shape",""],["wordSizing",""],["rotation",""],["label","Shape","idPrefix","domain-bar-shape","minWidthClass","min-w-[100px]",3,"value"],[3,"popoverId","anchorName"],["label","Word Sizing","idPrefix","domain-bar-word-sizing",3,"value"],["body","","data-testid","domain-bar-top-n-value",1,"text-xs","opacity-70","text-center"],["label","Rotation","idPrefix","domain-bar-rotation","minWidthClass","min-w-[110px]",3,"value"]],template:function(i,n){if(i&1&&(Y(0,"cc-domain-segment",3,0),Le(2,"cc-shape-settings-popover",4),q(),Y(3,"cc-domain-segment",5,1)(5,"div",6),ie(6),q(),Le(7,"cc-word-sizing-settings-popover",4),q(),Y(8,"cc-domain-segment",7,2),Le(10,"cc-rotation-settings-popover",4),q()),i&2){let o=Qi(1),a=Qi(4),s=Qi(9);$("value",n.shapeLabel()),z(2),$("popoverId",o.popoverId())("anchorName",o.anchorName()),z(),$("value",n.sizingModeLabel()),z(3),Zr("",n.settings().topN," words"),z(),$("popoverId",a.popoverId())("anchorName",a.anchorName()),z(),$("value",n.rotationRangeLabel()),z(2),$("popoverId",s.popoverId())("anchorName",s.anchorName())}},dependencies:[km,Fm,Vm,zm],encapsulation:2,changeDetection:0})}}return r})();var pc=(()=>{class r{static{this.\u0275fac=function(i){return new(i||r)}}static{this.\u0275cmp=_e({type:r,selectors:[["cc-domain-toolbox"]],features:[Qs([{provide:im,useExisting:om}])],decls:2,vars:0,consts:[[1,"join","shadow-md","bg-base-100","rounded"],["view","domain"]],template:function(i,n){i&1&&(Y(0,"div",0),Le(1,"cc-toolbox-screenshot-button",1),q())},dependencies:[nm],encapsulation:2,changeDetection:0})}}return r})();function bC(r,e){if(r&1){let t=Wt();Y(0,"cc-floating-menu",1),be("dismissed",function(){dt(t);let n=xe();return vt(n.close())}),Y(1,"button",2),be("click",function(){dt(t);let n=xe();return vt(n.copyWord())}),Le(2,"i"),Y(3,"span",3),ie(4),q()(),Le(5,"div",4),Y(6,"cc-context-menu-item",5),be("itemClick",function(){dt(t);let n=xe();return vt(n.inspectWord())}),ie(7," Show occurrences "),q(),Y(8,"cc-context-menu-item",6),be("itemClick",function(){dt(t);let n=xe();return vt(n.hideThisWord())}),ie(9," Hide word "),q()()}if(r&2){let t,i=xe();$("anchor",e),z(2),Sv(Cv("w-4 text-center ",i.wasWordCopied()?"fa-solid fa-check text-success":"fa-regular fa-copy")),z(2),Tt((t=i.rightClickedWord())==null?null:t.word)}}var dc=(()=>{class r{constructor(){this.clipboard=B(ca),this.rightClickedWord=ge(null),this.showOccurrences=yt(),this.hideWord=yt(),this.closed=yt(),this.anchor=le(()=>{let t=this.rightClickedWord();return t?{x:t.clientX,y:t.clientY}:null}),this.wasWordCopied=this.clipboard.copied}inspectWord(){let t=this.rightClickedWord();t&&this.showOccurrences.emit(t.word),this.close()}hideThisWord(){let t=this.rightClickedWord();t&&this.hideWord.emit(t.word),this.close()}async copyWord(){let t=this.rightClickedWord();t&&await this.clipboard.copy(t.word)}close(){this.closed.emit()}static{this.\u0275fac=function(i){return new(i||r)}}static{this.\u0275cmp=_e({type:r,selectors:[["cc-domain-word-menu"]],inputs:{rightClickedWord:[1,"rightClickedWord"]},outputs:{showOccurrences:"showOccurrences",hideWord:"hideWord",closed:"closed"},decls:1,vars:1,consts:[["data-testid","domain-word-menu",1,"w-56",3,"anchor"],["data-testid","domain-word-menu",1,"w-56",3,"dismissed","anchor"],["type","button","title","Copy word to clipboard","data-testid","domain-word-menu-copy",1,"flex","w-full","items-center","gap-3","px-4","py-2.5","text-left","hover:bg-base-200",3,"click"],[1,"truncate","text-sm","font-semibold","tracking-wide"],[1,"my-1","border-t","border-base-300"],["icon","fa-solid fa-magnifying-glass-chart","hoverHint","List the folders and files this word occurs in",3,"itemClick"],["icon","fa-solid fa-eye-slash","hoverHint","Drop this word from the cloud and the word list",3,"itemClick"]],template:function(i,n){if(i&1&&mt(0,bC,10,5,"cc-floating-menu",0),i&2){let o;gt((o=n.anchor())?0:-1,o)}},dependencies:[Qv,Jv],encapsulation:2,changeDetection:0})}}return r})();function hl(r,e){if(e.length===0)return r;let t=new Set(e);return r.filter(i=>!t.has(i.text))}var DC=gi(lm,ao,hl),pl=(()=>{class r{constructor(){this.store=B(lt),this.projectWords$=this.store.select(DC)}occurrencesOf(t,i){return this.store.select(fm(i,t))}static{this.\u0275fac=function(i){return new(i||r)}}static{this.\u0275prov=We({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();function Gm(r,e){let t=e.trim().toLowerCase();return r.filter(({text:i})=>i.toLowerCase().includes(t))}var Ut=(function(r){return r.OCCURRENCES="Occurrences",r.NAME="Name",r.RELEVANCE="Relevance",r})(Ut||{}),MC={[Ut.OCCURRENCES]:(r,e)=>r.frequency-e.frequency,[Ut.NAME]:(r,e)=>r.text.localeCompare(e.text),[Ut.RELEVANCE]:(r,e)=>Nr(r,en.tfidf)-Nr(e,en.tfidf)};function Ym(r,{option:e,ascending:t}){let i=MC[e],n=t?1:-1;return[...r].sort((o,a)=>n*i(o,a)||o.text.localeCompare(a.text))}function jm(r){let{rowCount:e,rowHeight:t,scrolledPast:i,viewportHeight:n}=r;if(e===0||t<=0||n<=0)return EC(r);let o=Xm(qm(i,r)-6,0,e-1),a=Xm(qm(i+n,r)+6,o,e-1);return{firstIndex:o,lastIndex:a,topSpacerHeight:ha(o,r),bottomSpacerHeight:ha(e,r)-ha(a+1,r)}}function Zm(r,e){let t=ha(r,e);return t>=e.scrolledPast&&t+e.rowHeight<=e.scrolledPast+e.viewportHeight}function Km(r,e){return ha(r,e)-(e.viewportHeight-e.rowHeight)/2}function EC({rowCount:r}){return{firstIndex:0,lastIndex:r-1,topSpacerHeight:0,bottomSpacerHeight:0}}function ha(r,{rowHeight:e,expandedIndex:t,expandedHeight:i}){let n=t>=0&&r>t;return r*e+(n?i:0)}function qm(r,e){let{rowHeight:t,expandedIndex:i,expandedHeight:n}=e,o=(i+1)*t;return i<0||r<o?Math.floor(r/t):r<o+n?i:Math.floor((r-n)/t)}function Xm(r,e,t){return Math.min(Math.max(r,e),t)}function dl(r){let e=r*100;return e>0&&e<1?"<1%":`${Math.round(e)}%`}var $m=(()=>{class r{constructor(){this.contextMenu=B(bm),this.node=ge.required(),this.isExpanded=ge(!1),this.isSelected=ge(!1),this.clicked=yt(),this.isExpandable=le(()=>this.node().children.length>0),this.isMarked=le(()=>this.contextMenu.isMarked(this.node().path)),this.decoration=le(()=>`${dl(this.node().share)} / ${ll(this.node().count)}`)}openContextMenu(t){this.contextMenu.openFor(this.node().path,t)}static{this.\u0275fac=function(i){return new(i||r)}}static{this.\u0275cmp=_e({type:r,selectors:[["cc-domain-word-occurrence-row"]],hostAttrs:[1,"block"],hostVars:1,hostBindings:function(i,n){i&1&&be("click",function(){return n.clicked.emit()})("contextmenu",function(a){return n.openContextMenu(a)}),i&2&&oo("aria-expanded",n.isExpandable()?n.isExpanded():null)},inputs:{node:[1,"node"],isExpanded:[1,"isExpanded"],isSelected:[1,"isSelected"]},outputs:{clicked:"clicked"},decls:4,vars:7,consts:[[3,"isSelected","isMarked","barShare","decoration"],[3,"isFolder","isOpen"],[1,"node-name","ml-1","flex-1","truncate"]],template:function(i,n){i&1&&(Y(0,"cc-explorer-row",0),Le(1,"cc-explorer-tree-item-icon",1),Y(2,"span",2),ie(3),q()()),i&2&&($("isSelected",n.isSelected())("isMarked",n.isMarked())("barShare",n.node().share)("decoration",n.decoration()),z(),$("isFolder",n.node().isFolder)("isOpen",n.isExpanded()),z(2),Tt(n.node().name))},dependencies:[ul,vm],encapsulation:2,changeDetection:0})}}return r})();var Qm=r=>({$implicit:r}),RC=(r,e)=>e.path;function OC(r,e){if(r&1&&(Y(0,"p",1),ie(1),q()),r&2){let t=xe();z(),Zr("",t.word()," does not occur in any file.")}}function IC(r,e){r&1&&oc(0)}function AC(r,e){if(r&1&&(Y(0,"div",2),Xs(1,IC,1,0,"ng-container",3),q()),r&2){let t=xe(),i=Qi(3);z(),$("ngTemplateOutlet",i)("ngTemplateOutletContext",sc(2,Qm,t.topLevelOccurrences()))}}function PC(r,e){r&1&&oc(0)}function LC(r,e){if(r&1&&Xs(0,PC,1,0,"ng-container",3),r&2){let t=xe().$implicit;xe(2);let i=Qi(3);$("ngTemplateOutlet",i)("ngTemplateOutletContext",sc(2,Qm,t.children))}}function NC(r,e){if(r&1){let t=Wt();Y(0,"cc-domain-word-occurrence-row",4),be("clicked",function(){let n=dt(t).$implicit,o=xe(2);return vt(o.clickRow(n))}),q(),Y(1,"div",5),mt(2,LC,1,4,"ng-container"),q()}if(r&2){let t=e.$implicit,i=xe(2);$("node",t)("isExpanded",i.isExpanded(t.path))("isSelected",t.path===i.selectedNodePath()),z(2),gt(i.isExpanded(t.path)?2:-1)}}function kC(r,e){if(r&1&&Pr(0,NC,3,4,null,null,RC),r&2){let t=e.$implicit;Lr(t)}}var zC=null,Jm=(()=>{class r{constructor(){this.readStore=B(pl),this.word=ge.required(),this.selectedNodePath=ge(null),this.nodeClicked=yt(),this.occurrences=st(el(this.word).pipe(Ys(t=>this.readStore.occurrencesOf(t,zC))),{initialValue:null}),this.topLevelOccurrences=le(()=>this.occurrences()?.children??[]),this.expandedPaths=er(new Set)}isExpanded(t){return this.expandedPaths().has(t)}clickRow(t){t.children.length>0&&this.toggle(t.path),this.nodeClicked.emit(t.path)}toggle(t){let i=new Set(this.expandedPaths());i.delete(t)||i.add(t),this.expandedPaths.set(i)}static{this.\u0275fac=function(i){return new(i||r)}}static{this.\u0275cmp=_e({type:r,selectors:[["cc-domain-word-occurrence-tree"]],hostAttrs:[1,"block"],inputs:{word:[1,"word"],selectedNodePath:[1,"selectedNodePath"]},outputs:{nodeClicked:"nodeClicked"},decls:4,vars:1,consts:[["subtree",""],["data-testid","domain-word-occurrences-empty",1,"px-3","py-2","text-sm","opacity-60"],["data-testid","domain-word-occurrences-tree"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"clicked","node","isExpanded","isSelected"],[1,"pl-3"]],template:function(i,n){i&1&&(mt(0,OC,2,1,"p",1)(1,AC,2,4,"div",2),Xs(2,kC,2,0,"ng-template",null,0,Tv)),i&2&>(n.topLevelOccurrences().length===0?0:1)},dependencies:[bv,$m],encapsulation:2,changeDetection:0})}}return r})();var FC=r=>`domain-word-row-${r}`,eg=(()=>{class r{constructor(){this.word=ge.required(),this.share=ge(0),this.isExpanded=ge(!1),this.toggled=yt(),this.rowId=le(()=>FC(this.word().text)),this.decoration=le(()=>`${dl(this.share())} / ${ll(this.word().frequency)}`)}static{this.\u0275fac=function(i){return new(i||r)}}static{this.\u0275cmp=_e({type:r,selectors:[["cc-domain-word-row"]],hostAttrs:[1,"block"],hostVars:3,hostBindings:function(i,n){i&1&&be("click",function(){return n.toggled.emit()}),i&2&&(vi("id",n.rowId()),oo("data-testid",n.rowId())("aria-expanded",n.isExpanded()))},inputs:{word:[1,"word"],share:[1,"share"],isExpanded:[1,"isExpanded"]},outputs:{toggled:"toggled"},decls:4,vars:5,consts:[[1,"hover:bg-base-200",3,"barShare","decoration"],["aria-hidden","true",1,"fa","fa-font","text-xs","opacity-70"],[1,"node-name","ml-1","flex-1","truncate"]],template:function(i,n){i&1&&(Y(0,"cc-explorer-row",0),Le(1,"span",1),Y(2,"span",2),ie(3),q()()),i&2&&($("barShare",n.share())("decoration",n.decoration()),z(2),$s("font-semibold",n.isExpanded()),z(),Tt(n.word().text))},dependencies:[ul],encapsulation:2,changeDetection:0})}}return r})();var tg=28,BC="cc-domain-word-row",WC="[data-word-breakdown]",vc={scrolledPast:0,viewportHeight:0,rowHeight:tg,expandedHeight:0},vl=class{constructor(){this.scrollHost=null,this.openBreakdownWord=null,this.openBreakdownHeight=0,this.measured=er(vc,{equal:(e,t)=>e.scrolledPast===t.scrolledPast&&e.viewportHeight===t.viewportHeight&&e.rowHeight===t.rowHeight&&e.expandedHeight===t.expandedHeight}),this.geometry=this.measured.asReadonly(),this.remeasure=()=>this.measure()}attachTo(e,t){if(!(this.host===e&&this.scrollHost===t)){if(this.stopObserving(),this.host=e,this.scrollHost=t,!t){this.measured.set(vc);return}t.addEventListener("scroll",this.remeasure,{passive:!0}),typeof ResizeObserver<"u"&&(this.resizeObserver=new ResizeObserver(this.remeasure),this.resizeObserver.observe(e),this.resizeObserver.observe(t)),this.measure()}}trackOpenBreakdown(e){this.openBreakdownWord!==e&&(this.openBreakdownWord=e,this.openBreakdownHeight=0,this.measure())}measure(){let{host:e,scrollHost:t}=this;if(!e||!t)return;if(!t.contains(e)){this.measured.set(vc);return}let i=e.querySelector(WC)?.offsetHeight;i!==void 0&&(this.openBreakdownHeight=i),this.measured.set({scrolledPast:Math.max(0,t.getBoundingClientRect().top-e.getBoundingClientRect().top),viewportHeight:t.clientHeight,rowHeight:e.querySelector(BC)?.offsetHeight||tg,expandedHeight:this.openBreakdownWord===null?0:this.openBreakdownHeight})}scrollTo(e){let{host:t,scrollHost:i}=this;if(!t||!i||!i.contains(t))return;let n=t.getBoundingClientRect().top-i.getBoundingClientRect().top+i.scrollTop;i.scrollTop=Math.max(0,n+e),this.measure()}dispose(){this.stopObserving(),this.host=void 0,this.scrollHost=null}stopObserving(){this.scrollHost?.removeEventListener("scroll",this.remeasure),this.resizeObserver?.disconnect(),this.resizeObserver=void 0}};var UC=(r,e)=>e.text;function HC(r,e){if(r&1&&(Y(0,"p",0),ie(1),q()),r&2){let t=xe();z(),Tt(t.emptyHint())}}function VC(r,e){if(r&1){let t=Wt();Y(0,"div",2)(1,"cc-domain-word-occurrence-tree",3),be("nodeClicked",function(n){dt(t);let o=xe(3);return vt(o.nodeClicked.emit(n))}),q()()}if(r&2){let t=xe().$implicit,i=xe(2);z(),$("word",t.text)("selectedNodePath",i.selectedNodePath())}}function GC(r,e){if(r&1){let t=Wt();Y(0,"cc-domain-word-row",1),be("toggled",function(){let n=dt(t).$implicit,o=xe(2);return vt(o.wordToggled.emit(n.text))}),q(),mt(1,VC,2,2,"div",2)}if(r&2){let t=e.$implicit,i=xe(2);$("word",t)("share",i.shareOf(t))("isExpanded",i.isExpanded(t)),z(),gt(i.isExpanded(t)?1:-1)}}function YC(r,e){if(r&1&&(Le(0,"div"),Pr(1,GC,2,4,null,null,UC),Le(3,"div")),r&2){let t=xe();jr("height",t.window().topSpacerHeight,"px"),z(),Lr(t.renderedWords()),z(2),jr("height",t.window().bottomSpacerHeight,"px")}}var mc=(()=>{class r{constructor(){this.readStore=B(pl),this.hostElement=B(yv),this.scrollHostService=B(gm),this.viewport=new vl,this.query=ge(""),this.sorting=ge({option:Ut.OCCURRENCES,ascending:!1}),this.expandedWord=ge(null),this.selectedNodePath=ge(null),this.wordToggled=yt(),this.nodeClicked=yt(),this.projectWords=st(this.readStore.projectWords$,{requireSync:!0}),this.visibleWords=le(()=>Ym(Gm(this.projectWords(),this.query()),this.sorting())),this.emptyHint=le(()=>this.projectWords().length===0?"This project carries no words.":`No word contains "${this.query().trim()}".`),this.expandedIndex=le(()=>this.visibleWords().findIndex(t=>t.text===this.expandedWord())),this.geometry=le(()=>Vs(Hs({},this.viewport.geometry()),{rowCount:this.visibleWords().length,expandedIndex:this.expandedIndex()})),this.window=le(()=>jm(this.geometry())),this.renderedWords=le(()=>{let{firstIndex:t,lastIndex:i}=this.window();return this.visibleWords().slice(t,i+1)}),this.lastWordScrolledTo=null,this.totalOccurrences=le(()=>this.projectWords().reduce((t,i)=>t+i.frequency,0)),$i(()=>this.viewport.attachTo(this.hostElement.nativeElement,this.scrollHostService.element())),$i(()=>this.viewport.trackOpenBreakdown(this.expandedWord())),$i(()=>this.scrollTheExpandedWordIntoView())}ngOnDestroy(){this.viewport.dispose()}isExpanded(t){return t.text===this.expandedWord()}shareOf(t){let i=this.totalOccurrences();return i>0?t.frequency/i:0}scrollTheExpandedWordIntoView(){let t=this.expandedWord(),i=this.geometry();if(t===null){this.lastWordScrolledTo=null;return}if(t===this.lastWordScrolledTo||i.viewportHeight===0)return;let n=this.expandedIndex();n<0||(this.lastWordScrolledTo=t,Zm(n,i)||this.viewport.scrollTo(Km(n,i)))}static{this.\u0275fac=function(i){return new(i||r)}}static{this.\u0275cmp=_e({type:r,selectors:[["cc-domain-word-list"]],hostAttrs:[1,"block"],inputs:{query:[1,"query"],sorting:[1,"sorting"],expandedWord:[1,"expandedWord"],selectedNodePath:[1,"selectedNodePath"]},outputs:{wordToggled:"wordToggled",nodeClicked:"nodeClicked"},decls:2,vars:1,consts:[["data-testid","domain-word-list-empty",1,"px-3","py-4","text-sm","opacity-60"],[3,"toggled","word","share","isExpanded"],["data-word-breakdown","",1,"pl-3"],[3,"nodeClicked","word","selectedNodePath"]],template:function(i,n){i&1&&mt(0,HC,2,1,"p",0)(1,YC,4,4),i&2&>(n.visibleWords().length===0?0:1)},dependencies:[eg,Jm],encapsulation:2,changeDetection:0})}}return r})();var pa=(()=>{class r{constructor(){this.store=B(lt),this.hiddenWords=st(this.store.select(ao),{initialValue:[]})}static{this.\u0275fac=function(i){return new(i||r)}}static{this.\u0275prov=We({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var da=(()=>{class r{constructor(){this.store=B(lt)}hide(t){this.store.dispatch(kv({word:t}))}restore(t){this.store.dispatch(zv({word:t}))}restoreAll(){this.store.dispatch(Fv())}static{this.\u0275fac=function(i){return new(i||r)}}static{this.\u0275prov=We({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var qC=["popover"];function XC(r,e){r&1&&(Xe(0,"div",6),ie(1," Right-click a word in the cloud to drop it from the cloud and the word list. "),He())}function jC(r,e){if(r&1){let t=Wt();Xe(0,"li",8)(1,"span",10),ie(2),He(),Xe(3,"button",11),mi("click",function(){let n=dt(t).$implicit,o=xe(2);return vt(o.restore(n))}),fa(4,"i",12),He()()}if(r&2){let t=e.$implicit;z(2),Tt(t),z(),vi("title","Show "+t+" again"),oo("aria-label","Show "+t+" again")("data-testid","domain-restore-"+t)}}function ZC(r,e){if(r&1){let t=Wt();Xe(0,"ul",7),Pr(1,jC,5,4,"li",8,js),He(),Xe(3,"button",9),mi("click",function(){dt(t);let n=xe();return vt(n.restoreAll())}),ie(4," Show all words again "),He()}if(r&2){let t=xe();z(),Lr(t.hiddenWords())}}var gc=(()=>{class r{constructor(){this.readStore=B(pa),this.writeStore=B(da),this.popoverId=ge.required(),this.anchorName=ge.required(),this.hiddenWords=le(()=>[...this.readStore.hiddenWords()].sort((t,i)=>t.localeCompare(i))),this.popover=Js.required("popover")}closePopover(){this.popover().nativeElement.hidePopover()}restore(t){this.writeStore.restore(t)}restoreAll(){this.writeStore.restoreAll()}static{this.\u0275fac=function(i){return new(i||r)}}static{this.\u0275cmp=_e({type:r,selectors:[["cc-hidden-words-popover"]],viewQuery:function(i,n){i&1&&Zs(n.popover,qC,5),i&2&&Ks()},hostAttrs:[1,"contents"],inputs:{popoverId:[1,"popoverId"],anchorName:[1,"anchorName"]},decls:9,vars:4,consts:[["popover",""],["popover","",1,"dropdown","p-2","rounded-box","bg-base-100","shadow-lg","w-72",3,"id"],[1,"flex","items-center","justify-between","border-b","border-base-300","pb-1","mb-1"],[1,"text-sm","font-semibold","uppercase","tracking-wide"],["type","button","title","Close","data-testid","domain-hidden-words-close-button",1,"btn","btn-ghost","btn-xs","btn-square",3,"click"],[1,"fa","fa-times"],["data-testid","domain-hidden-words-empty",1,"px-2","py-3","text-xs","opacity-60"],["data-testid","domain-hidden-words-list",1,"m-0","flex","max-h-[60vh]","list-none","flex-col","overflow-y-auto","p-0"],[1,"flex","items-center","gap-2","rounded","py-1","pl-2","pr-1","hover:bg-base-200"],["type","button","data-testid","domain-restore-all-words",1,"btn","btn-sm","btn-block","mt-1",3,"click"],[1,"min-w-0","flex-1","truncate","text-sm"],["type","button",1,"btn","btn-ghost","btn-xs","btn-square",3,"click","title"],[1,"fa","fa-eye"]],template:function(i,n){i&1&&(Xe(0,"div",1,0)(2,"div",2)(3,"span",3),ie(4,"Hidden Words"),He(),Xe(5,"button",4),mi("click",function(){return n.closePopover()}),fa(6,"i",5),He()(),mt(7,XC,2,0,"div",6)(8,ZC,5,0),He()),i&2&&(jr("position-anchor","--"+n.anchorName()),vi("id",n.popoverId()),z(7),gt(n.hiddenWords().length===0?7:8))},encapsulation:2,changeDetection:0})}}return r})();var rg=(()=>{class r{constructor(){this.store=B(lt)}wordsForSelectedNode(t){return this.store.select(gi(um(t),ao,hl))}selectedNodeName(t){return tl(t,Dv.rootName)}static{this.\u0275fac=function(i){return new(i||r)}}static{this.\u0275prov=We({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();function tn(r,e,t){return[...r].sort((i,n)=>Nr(n,e)-Nr(i,e)).slice(0,t)}var KC='<svg xmlns="http://www.w3.org/2000/svg" width="640" height="563" viewBox="58.7 0 64 56.3"><path fill="#000" d="M81.9,20.3h0c0-6.9,3.5-13,8.8-16.7C87.4,1.3,83.4,0,79.1,0,67.9,0,58.8,9.1,58.7,20.3h0v36h17.6V20.4h0c0-1.5,1.2-2.8,2.8-2.8s2.8,1.2,2.8,2.8h0Z"/><path fill="#000" d="M122.7,20.3c0-11.2-9.2-20.3-20.4-20.3s-20.3,9.1-20.4,20.3h0v36h17.6V20.4h0c0-1.1.6-2.1,1.6-2.5,2-.9,4,.6,4,2.5h0v35.9h17.6V20.3h0Z"/></svg>',$C=`data:image/svg+xml,${encodeURIComponent(KC)}`;function ig(){return new Promise((r,e)=>{if(typeof Image>"u"){e(new Error("Image is not available in this environment"));return}let t=new Image;t.onload=()=>r(t),t.onerror=()=>e(new Error("Failed to load the word-cloud mask image")),t.src=$C})}var yc="#e6007e",_c="#0030ff",QC="--wordCloudColorStart",JC="--wordCloudColorEnd",eT=/^#[0-9A-Fa-f]{6}$/;function og(){if(typeof document>"u"||typeof getComputedStyle>"u")return[yc,_c];let r=getComputedStyle(document.documentElement);return[ng(r,QC,yc),ng(r,JC,_c)]}function ng(r,e,t){let i=r.getPropertyValue(e).trim();return xc(i,t)}function xc(r,e){return eT.test(r)?r:e}function ag(r,e,t){let i=Math.min(1,Math.max(0,t)),n=rl.convertHexToColorObject(xc(r,yc)),o=rl.convertHexToColorObject(xc(e,_c));return rl.convertColorToHex(new Mv().lerpColors(n,o,i))}function sg(r,e,t,i){let[n,o]=r;if(t||!i||e.length===0)return r;let a=Math.max(...e.map(u=>u.text.length)),s=i*.9/(a*.62),l=Math.max(Math.min(o,Math.floor(s)),1);return[Math.min(n,l),l]}function lg(){return({name:r,data:e})=>{let t=[`<b>${r}</b>`,`Frequency: ${e.frequency}`];return e.tfidf!==void 0&&t.push(`TF-IDF: ${e.tfidf.toFixed(3)}`),t.join("<br/>")}}var tT=31,ug=1e3;function fg(r,e,t){return ag(e,t,rT(r))}function rT(r){let e=0;for(let t of r)e=(e*tT+(t.codePointAt(0)??0))%ug;return e/ug}var iT=10,nT="#333",oT='Roboto, "Helvetica Neue", sans-serif',aT=.55;function hg(r,e,t={}){let i=tn(r,e.sizingMode,e.topN),n=sg(e.sizeRange,i,e.drawOutOfBound,t.containerWidth),{shape:o,maskImage:a,keepAspect:s}=lT(e.shape,t.maskImage);return{aria:{enabled:!0},tooltip:{show:!0,formatter:lg()},series:[{type:"wordCloud",shape:o,maskImage:a,keepAspect:s,left:"center",top:"center",width:`${.9*100}%`,height:`${.9*100}%`,sizeRange:n,rotationRange:e.rotationRange,rotationStep:e.rotationStep,gridSize:e.gridSize,drawOutOfBound:e.drawOutOfBound,shrinkToFit:e.shrinkToFit,layoutAnimation:t.layoutAnimation??!0,textStyle:{fontFamily:oT,fontWeight:"bold"},emphasis:{textStyle:{textShadowBlur:iT,textShadowColor:nT}},blur:{textStyle:{opacity:aT}},data:sT(i,e)}]}}function sT(r,e){let[t,i]=og();return r.map(n=>({name:n.text,value:Nr(n,e.sizingMode),frequency:n.frequency,tfidf:n.tfidf,textStyle:{color:fg(n.text,t,i)}}))}function lT(r,e){return r===Ji.logoM?{shape:Ji.circle,maskImage:e,keepAspect:!0}:{shape:r,maskImage:void 0,keepAspect:!1}}var Sc=function(r,e){return Sc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},Sc(r,e)};function we(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Sc(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var wc=function(r,e){return wc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},wc(r,e)};function J(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");wc(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var ml=12,uT="sans-serif",Tr=ml+"px "+uT,fT=20,cT=100,hT="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function pT(r){var e={};if(typeof JSON>"u")return e;for(var t=0;t<r.length;t++){var i=String.fromCharCode(t+32),n=(r.charCodeAt(t)-fT)/cT;e[i]=n}return e}var dT=pT(hT),tr={createCanvas:function(){return typeof document<"u"&&document.createElement("canvas")},measureText:(function(){var r,e;return function(t,i){if(!r){var n=tr.createCanvas();r=n&&n.getContext("2d")}if(r)return e!==i&&(e=r.font=i||Tr),r.measureText(t);t=t||"",i=i||Tr;var o=/((?:\d+)?\.?\d*)px/.exec(i),a=o&&+o[1]||ml,s=0;if(i.indexOf("mono")>=0)s=a*t.length;else for(var l=0;l<t.length;l++){var u=dT[t[l]];s+=u==null?a:u*a}return{width:s}}})(),loadImage:function(r,e,t){var i=new Image;return i.onload=e,i.onerror=t,i.src=r,i}};var vg=Nt(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(r,e){return r["[object "+e+"]"]=!0,r},{}),mg=Nt(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(r,e){return r["[object "+e+"Array]"]=!0,r},{}),ma=Object.prototype.toString,yl=Array.prototype,vT=yl.forEach,mT=yl.filter,Cc=yl.slice,gT=yl.map,pg=function(){}.constructor,gl=pg?pg.prototype:null,Tc="__proto__",yT=2311;function _l(){return yT++}function co(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];typeof console<"u"&&console.error.apply(console,r)}function re(r){if(r==null||typeof r!="object")return r;var e=r,t=ma.call(r);if(t==="[object Array]"){if(!va(r)){e=[];for(var i=0,n=r.length;i<n;i++)e[i]=re(r[i])}}else if(mg[t]){if(!va(r)){var o=r.constructor;if(o.from)e=o.from(r);else{e=new o(r.length);for(var i=0,n=r.length;i<n;i++)e[i]=r[i]}}}else if(!vg[t]&&!va(r)&&!fo(r)){e={};for(var a in r)r.hasOwnProperty(a)&&a!==Tc&&(e[a]=re(r[a]))}return e}function Ee(r,e,t){if(!F(e)||!F(r))return t?re(e):r;for(var i in e)if(e.hasOwnProperty(i)&&i!==Tc){var n=r[i],o=e[i];F(o)&&F(n)&&!L(o)&&!L(n)&&!fo(o)&&!fo(n)&&!dg(o)&&!dg(n)&&!va(o)&&!va(n)?Ee(n,o,t):(t||!(i in r))&&(r[i]=re(e[i]))}return r}function P(r,e){if(Object.assign)Object.assign(r,e);else for(var t in e)e.hasOwnProperty(t)&&t!==Tc&&(r[t]=e[t]);return r}function ce(r,e,t){for(var i=me(e),n=0,o=i.length;n<o;n++){var a=i[n];(t?e[a]!=null:r[a]==null)&&(r[a]=e[a])}return r}var wN=tr.createCanvas;function he(r,e){if(r){if(r.indexOf)return r.indexOf(e);for(var t=0,i=r.length;t<i;t++)if(r[t]===e)return t}return-1}function xl(r,e){var t=r.prototype;function i(){}i.prototype=e.prototype,r.prototype=new i;for(var n in t)t.hasOwnProperty(n)&&(r.prototype[n]=t[n]);r.prototype.constructor=r,r.superClass=e}function Lt(r,e,t){if(r="prototype"in r?r.prototype:r,e="prototype"in e?e.prototype:e,Object.getOwnPropertyNames)for(var i=Object.getOwnPropertyNames(e),n=0;n<i.length;n++){var o=i[n];o!=="constructor"&&(t?e[o]!=null:r[o]==null)&&(r[o]=e[o])}else ce(r,e,t)}function et(r){return!r||typeof r=="string"?!1:typeof r.length=="number"}function S(r,e,t){if(r&&e)if(r.forEach&&r.forEach===vT)r.forEach(e,t);else if(r.length===+r.length)for(var i=0,n=r.length;i<n;i++)e.call(t,r[i],i,r);else for(var o in r)r.hasOwnProperty(o)&&e.call(t,r[o],o,r)}function X(r,e,t){if(!r)return[];if(!e)return Sl(r);if(r.map&&r.map===gT)return r.map(e,t);for(var i=[],n=0,o=r.length;n<o;n++)i.push(e.call(t,r[n],n,r));return i}function Nt(r,e,t,i){if(r&&e){for(var n=0,o=r.length;n<o;n++)t=e.call(i,t,r[n],n,r);return t}}function Ue(r,e,t){if(!r)return[];if(!e)return Sl(r);if(r.filter&&r.filter===mT)return r.filter(e,t);for(var i=[],n=0,o=r.length;n<o;n++)e.call(t,r[n],n,r)&&i.push(r[n]);return i}function me(r){if(!r)return[];if(Object.keys)return Object.keys(r);var e=[];for(var t in r)r.hasOwnProperty(t)&&e.push(t);return e}function _T(r,e){for(var t=[],i=2;i<arguments.length;i++)t[i-2]=arguments[i];return function(){return r.apply(e,t.concat(Cc.call(arguments)))}}var De=gl&&j(gl.bind)?gl.call.bind(gl.bind):_T;function je(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return function(){return r.apply(this,e.concat(Cc.call(arguments)))}}function L(r){return Array.isArray?Array.isArray(r):ma.call(r)==="[object Array]"}function j(r){return typeof r=="function"}function N(r){return typeof r=="string"}function ga(r){return ma.call(r)==="[object String]"}function Ce(r){return typeof r=="number"}function F(r){var e=typeof r;return e==="function"||!!r&&e==="object"}function dg(r){return!!vg[ma.call(r)]}function Ye(r){return!!mg[ma.call(r)]}function fo(r){return typeof r=="object"&&typeof r.nodeType=="number"&&typeof r.ownerDocument=="object"}function _i(r){return r.colorStops!=null}function gg(r){return r.image!=null}function ho(r){return r!==r}function rn(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];for(var t=0,i=r.length;t<i;t++)if(r[t]!=null)return r[t]}function te(r,e){return r??e}function nn(r,e,t){return r??e??t}function Sl(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return Cc.apply(r,e)}function wl(r){if(typeof r=="number")return[r,r,r,r];var e=r.length;return e===2?[r[0],r[1],r[0],r[1]]:e===3?[r[0],r[1],r[2],r[1]]:r}function _t(r,e){if(!r)throw new Error(e)}function xt(r){return r==null?null:typeof r.trim=="function"?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var yg="__ec_primitive__";function on(r){r[yg]=!0}function va(r){return r[yg]}var xT=(function(){function r(){this.data={}}return r.prototype.delete=function(e){var t=this.has(e);return t&&delete this.data[e],t},r.prototype.has=function(e){return this.data.hasOwnProperty(e)},r.prototype.get=function(e){return this.data[e]},r.prototype.set=function(e,t){return this.data[e]=t,this},r.prototype.keys=function(){return me(this.data)},r.prototype.forEach=function(e){var t=this.data;for(var i in t)t.hasOwnProperty(i)&&e(t[i],i)},r})(),_g=typeof Map=="function";function ST(){return _g?new Map:new xT}var wT=(function(){function r(e){var t=L(e);this.data=ST();var i=this;e instanceof r?e.each(n):e&&S(e,n);function n(o,a){t?i.set(o,a):i.set(a,o)}}return r.prototype.hasKey=function(e){return this.data.has(e)},r.prototype.get=function(e){return this.data.get(e)},r.prototype.set=function(e,t){return this.data.set(e,t),t},r.prototype.each=function(e,t){this.data.forEach(function(i,n){e.call(t,i,n)})},r.prototype.keys=function(){var e=this.data.keys();return _g?Array.from(e):e},r.prototype.removeKey=function(e){this.data.delete(e)},r})();function Z(r){return new wT(r)}function xg(r,e){for(var t=new r.constructor(r.length+e.length),i=0;i<r.length;i++)t[i]=r[i];for(var n=r.length,i=0;i<e.length;i++)t[i+n]=e[i];return t}function xi(r,e){var t;if(Object.create)t=Object.create(r);else{var i=function(){};i.prototype=r,t=new i}return e&&P(t,e),t}function Cl(r){var e=r.style;e.webkitUserSelect="none",e.userSelect="none",e.webkitTapHighlightColor="rgba(0,0,0,0)",e["-webkit-touch-callout"]="none"}function br(r,e){return r.hasOwnProperty(e)}function it(){}var bc=180/Math.PI;function Kr(){return[1,0,0,1,0,0]}function po(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r}function Sg(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4],r[5]=e[5],r}function $r(r,e,t){var i=e[0]*t[0]+e[2]*t[1],n=e[1]*t[0]+e[3]*t[1],o=e[0]*t[2]+e[2]*t[3],a=e[1]*t[2]+e[3]*t[3],s=e[0]*t[4]+e[2]*t[5]+e[4],l=e[1]*t[4]+e[3]*t[5]+e[5];return r[0]=i,r[1]=n,r[2]=o,r[3]=a,r[4]=s,r[5]=l,r}function ya(r,e,t){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4]+t[0],r[5]=e[5]+t[1],r}function vo(r,e,t,i){i===void 0&&(i=[0,0]);var n=e[0],o=e[2],a=e[4],s=e[1],l=e[3],u=e[5],f=Math.sin(t),c=Math.cos(t);return r[0]=n*c+s*f,r[1]=-n*f+s*c,r[2]=o*c+l*f,r[3]=-o*f+c*l,r[4]=c*(a-i[0])+f*(u-i[1])+i[0],r[5]=c*(u-i[1])-f*(a-i[0])+i[1],r}function wg(r,e,t){var i=t[0],n=t[1];return r[0]=e[0]*i,r[1]=e[1]*n,r[2]=e[2]*i,r[3]=e[3]*n,r[4]=e[4]*i,r[5]=e[5]*n,r}function mo(r,e){var t=e[0],i=e[2],n=e[4],o=e[1],a=e[3],s=e[5],l=t*a-o*i;return l?(l=1/l,r[0]=a*l,r[1]=-o*l,r[2]=-i*l,r[3]=t*l,r[4]=(i*s-a*n)*l,r[5]=(o*n-t*s)*l,r):null}function Si(r,e){return r==null&&(r=0),e==null&&(e=0),[r,e]}function Cg(r){return[r[0],r[1]]}function Dc(r,e,t){return r[0]=e[0]+t[0],r[1]=e[1]+t[1],r}function Tg(r,e,t){return r[0]=e[0]-t[0],r[1]=e[1]-t[1],r}function CT(r){return Math.sqrt(TT(r))}function TT(r){return r[0]*r[0]+r[1]*r[1]}function Tl(r,e,t){return r[0]=e[0]*t,r[1]=e[1]*t,r}function bg(r,e){var t=CT(e);return t===0?(r[0]=0,r[1]=0):(r[0]=e[0]/t,r[1]=e[1]/t),r}function bl(r,e){return Math.sqrt((r[0]-e[0])*(r[0]-e[0])+(r[1]-e[1])*(r[1]-e[1]))}var xa=bl;function bT(r,e){return(r[0]-e[0])*(r[0]-e[0])+(r[1]-e[1])*(r[1]-e[1])}var an=bT;function Dl(r,e,t,i){return r[0]=e[0]+i*(t[0]-e[0]),r[1]=e[1]+i*(t[1]-e[1]),r}function Ht(r,e,t){var i=e[0],n=e[1];return r[0]=t[0]*i+t[2]*n+t[4],r[1]=t[1]*i+t[3]*n+t[5],r}function Qr(r,e,t){return r[0]=Math.min(e[0],t[0]),r[1]=Math.min(e[1],t[1]),r}function Jr(r,e,t){return r[0]=Math.max(e[0],t[0]),r[1]=Math.max(e[1],t[1]),r}var Dg=po,Mg=5e-5;function ln(r){return r>Mg||r<-Mg}var un=[],go=[],Mc=Kr(),Ec=Math.abs,DT=(function(){function r(){}return r.prototype.getLocalTransform=function(e){return r.getLocalTransform(this,e)},r.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},r.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},r.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},r.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},r.prototype.needLocalTransform=function(){return ln(this.rotation)||ln(this.x)||ln(this.y)||ln(this.scaleX-1)||ln(this.scaleY-1)||ln(this.skewX)||ln(this.skewY)},r.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),i=this.transform;if(!(t||e)){i&&(Dg(i),this.invTransform=null);return}i=i||Kr(),t?this.getLocalTransform(i):Dg(i),e&&(t?$r(i,e,i):Sg(i,e)),this.transform=i,this._resolveGlobalScaleRatio(i)},r.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(un);var i=un[0]<0?-1:1,n=un[1]<0?-1:1,o=((un[0]-i)*t+i)/un[0]||0,a=((un[1]-n)*t+n)/un[1]||0;e[0]*=o,e[1]*=o,e[2]*=a,e[3]*=a}this.invTransform=this.invTransform||Kr(),mo(this.invTransform,e)},r.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},r.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],i=e[2]*e[2]+e[3]*e[3],n=Math.atan2(e[1],e[0]),o=Math.PI/2+n-Math.atan2(e[3],e[2]);i=Math.sqrt(i)*Math.cos(o),t=Math.sqrt(t),this.skewX=o,this.skewY=0,this.rotation=-n,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=i,this.originX=0,this.originY=0}},r.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||Kr(),$r(go,e.invTransform,t),t=go);var i=this.originX,n=this.originY;(i||n)&&(Mc[4]=i,Mc[5]=n,$r(go,t,Mc),go[4]-=i,go[5]-=n,t=go),this.setLocalTransform(t)}},r.prototype.getGlobalScale=function(e){var t=this.transform;return e=e||[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},r.prototype.transformCoordToLocal=function(e,t){var i=[e,t],n=this.invTransform;return n&&Ht(i,i,n),i},r.prototype.transformCoordToGlobal=function(e,t){var i=[e,t],n=this.transform;return n&&Ht(i,i,n),i},r.prototype.getLineScale=function(){var e=this.transform;return e&&Ec(e[0]-1)>1e-10&&Ec(e[3]-1)>1e-10?Math.sqrt(Ec(e[0]*e[3]-e[2]*e[1])):1},r.prototype.copyTransform=function(e){MT(this,e)},r.getLocalTransform=function(e,t){t=t||[];var i=e.originX||0,n=e.originY||0,o=e.scaleX,a=e.scaleY,s=e.anchorX,l=e.anchorY,u=e.rotation||0,f=e.x,c=e.y,p=e.skewX?Math.tan(e.skewX):0,h=e.skewY?Math.tan(-e.skewY):0;if(i||n||s||l){var d=i+s,g=n+l;t[4]=-d*o-p*g*a,t[5]=-g*a-h*d*o}else t[4]=t[5]=0;return t[0]=o,t[3]=a,t[1]=h*o,t[2]=p*a,u&&vo(t,t,u),t[4]+=i+f,t[5]+=n+c,t},r.initDefaultProps=(function(){var e=r.prototype;e.scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0})(),r})(),fn=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function MT(r,e){for(var t=0;t<fn.length;t++){var i=fn[t];r[i]=e[i]}}var cn=DT;var Ml={linear:function(r){return r},quadraticIn:function(r){return r*r},quadraticOut:function(r){return r*(2-r)},quadraticInOut:function(r){return(r*=2)<1?.5*r*r:-.5*(--r*(r-2)-1)},cubicIn:function(r){return r*r*r},cubicOut:function(r){return--r*r*r+1},cubicInOut:function(r){return(r*=2)<1?.5*r*r*r:.5*((r-=2)*r*r+2)},quarticIn:function(r){return r*r*r*r},quarticOut:function(r){return 1- --r*r*r*r},quarticInOut:function(r){return(r*=2)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2)},quinticIn:function(r){return r*r*r*r*r},quinticOut:function(r){return--r*r*r*r*r+1},quinticInOut:function(r){return(r*=2)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2)},sinusoidalIn:function(r){return 1-Math.cos(r*Math.PI/2)},sinusoidalOut:function(r){return Math.sin(r*Math.PI/2)},sinusoidalInOut:function(r){return .5*(1-Math.cos(Math.PI*r))},exponentialIn:function(r){return r===0?0:Math.pow(1024,r-1)},exponentialOut:function(r){return r===1?1:1-Math.pow(2,-10*r)},exponentialInOut:function(r){return r===0?0:r===1?1:(r*=2)<1?.5*Math.pow(1024,r-1):.5*(-Math.pow(2,-10*(r-1))+2)},circularIn:function(r){return 1-Math.sqrt(1-r*r)},circularOut:function(r){return Math.sqrt(1- --r*r)},circularInOut:function(r){return(r*=2)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1)},elasticIn:function(r){var e,t=.1,i=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=i/4):e=i*Math.asin(1/t)/(2*Math.PI),-(t*Math.pow(2,10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/i)))},elasticOut:function(r){var e,t=.1,i=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=i/4):e=i*Math.asin(1/t)/(2*Math.PI),t*Math.pow(2,-10*r)*Math.sin((r-e)*(2*Math.PI)/i)+1)},elasticInOut:function(r){var e,t=.1,i=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=i/4):e=i*Math.asin(1/t)/(2*Math.PI),(r*=2)<1?-.5*(t*Math.pow(2,10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/i)):t*Math.pow(2,-10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/i)*.5+1)},backIn:function(r){var e=1.70158;return r*r*((e+1)*r-e)},backOut:function(r){var e=1.70158;return--r*r*((e+1)*r+e)+1},backInOut:function(r){var e=2.5949095;return(r*=2)<1?.5*(r*r*((e+1)*r-e)):.5*((r-=2)*r*((e+1)*r+e)+2)},bounceIn:function(r){return 1-Ml.bounceOut(1-r)},bounceOut:function(r){return r<.36363636363636365?7.5625*r*r:r<.7272727272727273?7.5625*(r-=.5454545454545454)*r+.75:r<.9090909090909091?7.5625*(r-=.8181818181818182)*r+.9375:7.5625*(r-=.9545454545454546)*r+.984375},bounceInOut:function(r){return r<.5?Ml.bounceIn(r*2)*.5:Ml.bounceOut(r*2-1)*.5+.5}},El=Ml;var Rl=Math.pow,Ci=Math.sqrt,Il=1e-8,Rg=1e-4,Eg=Ci(3),Ol=1/3,kr=Si(),fr=Si(),yo=Si();function wi(r){return r>-Il&&r<Il}function Og(r){return r>Il||r<-Il}function Ze(r,e,t,i,n){var o=1-n;return o*o*(o*r+3*n*e)+n*n*(n*i+3*o*t)}function Rc(r,e,t,i,n){var o=1-n;return 3*(((e-r)*o+2*(t-e)*n)*o+(i-t)*n*n)}function Al(r,e,t,i,n,o){var a=i+3*(e-t)-r,s=3*(t-e*2+r),l=3*(e-r),u=r-n,f=s*s-3*a*l,c=s*l-9*a*u,p=l*l-3*s*u,h=0;if(wi(f)&&wi(c))if(wi(s))o[0]=0;else{var d=-l/s;d>=0&&d<=1&&(o[h++]=d)}else{var g=c*c-4*f*p;if(wi(g)){var v=c/f,d=-s/a+v,m=-v/2;d>=0&&d<=1&&(o[h++]=d),m>=0&&m<=1&&(o[h++]=m)}else if(g>0){var y=Ci(g),_=f*s+1.5*a*(-c+y),x=f*s+1.5*a*(-c-y);_<0?_=-Rl(-_,Ol):_=Rl(_,Ol),x<0?x=-Rl(-x,Ol):x=Rl(x,Ol);var d=(-s-(_+x))/(3*a);d>=0&&d<=1&&(o[h++]=d)}else{var C=(2*f*s-3*a*c)/(2*Ci(f*f*f)),w=Math.acos(C)/3,T=Ci(f),D=Math.cos(w),d=(-s-2*T*D)/(3*a),m=(-s+T*(D+Eg*Math.sin(w)))/(3*a),b=(-s+T*(D-Eg*Math.sin(w)))/(3*a);d>=0&&d<=1&&(o[h++]=d),m>=0&&m<=1&&(o[h++]=m),b>=0&&b<=1&&(o[h++]=b)}}return h}function Pl(r,e,t,i,n){var o=6*t-12*e+6*r,a=9*e+3*i-3*r-9*t,s=3*e-3*r,l=0;if(wi(a)){if(Og(o)){var u=-s/o;u>=0&&u<=1&&(n[l++]=u)}}else{var f=o*o-4*a*s;if(wi(f))n[0]=-o/(2*a);else if(f>0){var c=Ci(f),u=(-o+c)/(2*a),p=(-o-c)/(2*a);u>=0&&u<=1&&(n[l++]=u),p>=0&&p<=1&&(n[l++]=p)}}return l}function _o(r,e,t,i,n,o){var a=(e-r)*n+r,s=(t-e)*n+e,l=(i-t)*n+t,u=(s-a)*n+a,f=(l-s)*n+s,c=(f-u)*n+u;o[0]=r,o[1]=a,o[2]=u,o[3]=c,o[4]=c,o[5]=f,o[6]=l,o[7]=i}function Ll(r,e,t,i,n,o,a,s,l,u,f){var c,p=.005,h=1/0,d,g,v,m;kr[0]=l,kr[1]=u;for(var y=0;y<1;y+=.05)fr[0]=Ze(r,t,n,a,y),fr[1]=Ze(e,i,o,s,y),v=an(kr,fr),v<h&&(c=y,h=v);h=1/0;for(var _=0;_<32&&!(p<Rg);_++)d=c-p,g=c+p,fr[0]=Ze(r,t,n,a,d),fr[1]=Ze(e,i,o,s,d),v=an(fr,kr),d>=0&&v<h?(c=d,h=v):(yo[0]=Ze(r,t,n,a,g),yo[1]=Ze(e,i,o,s,g),m=an(yo,kr),g<=1&&m<h?(c=g,h=m):p*=.5);return f&&(f[0]=Ze(r,t,n,a,c),f[1]=Ze(e,i,o,s,c)),Ci(h)}function Ig(r,e,t,i,n,o,a,s,l){for(var u=r,f=e,c=0,p=1/l,h=1;h<=l;h++){var d=h*p,g=Ze(r,t,n,a,d),v=Ze(e,i,o,s,d),m=g-u,y=v-f;c+=Math.sqrt(m*m+y*y),u=g,f=v}return c}function nt(r,e,t,i){var n=1-i;return n*(n*r+2*i*e)+i*i*t}function Oc(r,e,t,i){return 2*((1-i)*(e-r)+i*(t-e))}function Ag(r,e,t,i,n){var o=r-2*e+t,a=2*(e-r),s=r-i,l=0;if(wi(o)){if(Og(a)){var u=-s/a;u>=0&&u<=1&&(n[l++]=u)}}else{var f=a*a-4*o*s;if(wi(f)){var u=-a/(2*o);u>=0&&u<=1&&(n[l++]=u)}else if(f>0){var c=Ci(f),u=(-a+c)/(2*o),p=(-a-c)/(2*o);u>=0&&u<=1&&(n[l++]=u),p>=0&&p<=1&&(n[l++]=p)}}return l}function Nl(r,e,t){var i=r+t-2*e;return i===0?.5:(r-e)/i}function xo(r,e,t,i,n){var o=(e-r)*i+r,a=(t-e)*i+e,s=(a-o)*i+o;n[0]=r,n[1]=o,n[2]=s,n[3]=s,n[4]=a,n[5]=t}function kl(r,e,t,i,n,o,a,s,l){var u,f=.005,c=1/0;kr[0]=a,kr[1]=s;for(var p=0;p<1;p+=.05){fr[0]=nt(r,t,n,p),fr[1]=nt(e,i,o,p);var h=an(kr,fr);h<c&&(u=p,c=h)}c=1/0;for(var d=0;d<32&&!(f<Rg);d++){var g=u-f,v=u+f;fr[0]=nt(r,t,n,g),fr[1]=nt(e,i,o,g);var h=an(fr,kr);if(g>=0&&h<c)u=g,c=h;else{yo[0]=nt(r,t,n,v),yo[1]=nt(e,i,o,v);var m=an(yo,kr);v<=1&&m<c?(u=v,c=m):f*=.5}}return l&&(l[0]=nt(r,t,n,u),l[1]=nt(e,i,o,u)),Ci(c)}function Pg(r,e,t,i,n,o,a){for(var s=r,l=e,u=0,f=1/a,c=1;c<=a;c++){var p=c*f,h=nt(r,t,n,p),d=nt(e,i,o,p),g=h-s,v=d-l;u+=Math.sqrt(g*g+v*v),s=h,l=d}return u}var ET=/cubic-bezier\(([0-9,\.e ]+)\)/;function zl(r){var e=r&&ET.exec(r);if(e){var t=e[1].split(","),i=+xt(t[0]),n=+xt(t[1]),o=+xt(t[2]),a=+xt(t[3]);if(isNaN(i+n+o+a))return;var s=[];return function(l){return l<=0?0:l>=1?1:Al(0,i,o,1,l,s)&&Ze(0,n,a,1,s[0])}}}var RT=(function(){function r(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||it,this.ondestroy=e.ondestroy||it,this.onrestart=e.onrestart||it,e.easing&&this.setEasing(e.easing)}return r.prototype.step=function(e,t){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),this._paused){this._pausedTime+=t;return}var i=this._life,n=e-this._startTime-this._pausedTime,o=n/i;o<0&&(o=0),o=Math.min(o,1);var a=this.easingFunc,s=a?a(o):o;if(this.onframe(s),o===1)if(this.loop){var l=n%i;this._startTime=e-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},r.prototype.pause=function(){this._paused=!0},r.prototype.resume=function(){this._paused=!1},r.prototype.setEasing=function(e){this.easing=e,this.easingFunc=j(e)?e:El[e]||zl(e)},r})(),Lg=RT;var Ng=(function(){function r(e){this.value=e}return r})();var OT=(function(){function r(){this._len=0}return r.prototype.insert=function(e){var t=new Ng(e);return this.insertEntry(t),t},r.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},r.prototype.remove=function(e){var t=e.prev,i=e.next;t?t.next=i:this.head=i,i?i.prev=t:this.tail=t,e.next=e.prev=null,this._len--},r.prototype.len=function(){return this._len},r.prototype.clear=function(){this.head=this.tail=null,this._len=0},r})();var IT=(function(){function r(e){this._list=new OT,this._maxSize=10,this._map={},this._maxSize=e}return r.prototype.put=function(e,t){var i=this._list,n=this._map,o=null;if(n[e]==null){var a=i.len(),s=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var l=i.head;i.remove(l),delete n[l.key],o=l.value,this._lastRemovedEntry=l}s?s.value=t:s=new Ng(t),s.key=e,i.insertEntry(s),n[e]=s}return o},r.prototype.get=function(e){var t=this._map[e],i=this._list;if(t!=null)return t!==i.tail&&(i.remove(t),i.insertEntry(t)),t.value},r.prototype.clear=function(){this._list.clear(),this._map={}},r.prototype.len=function(){return this._list.len()},r})(),ei=IT;var kg={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Sa(r){return r=Math.round(r),r<0?0:r>255?255:r}function zg(r){return r<0?0:r>1?1:r}function Ac(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?Sa(parseFloat(e)/100*255):Sa(parseInt(e,10))}function wa(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?zg(parseFloat(e)/100):zg(parseFloat(e))}function Pc(r,e,t){return t<0?t+=1:t>1&&(t-=1),t*6<1?r+(e-r)*t*6:t*2<1?e:t*3<2?r+(e-r)*(2/3-t)*6:r}function cr(r,e,t,i,n){return r[0]=e,r[1]=t,r[2]=i,r[3]=n,r}function Lc(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r}var Ug=new ei(20),Fl=null;function So(r,e){Fl&&Lc(Fl,e),Fl=Ug.put(r,Fl||e.slice())}function Ti(r,e){if(r){e=e||[];var t=Ug.get(r);if(t)return Lc(e,t);r=r+"";var i=r.replace(/ /g,"").toLowerCase();if(i in kg)return Lc(e,kg[i]),So(r,e),e;var n=i.length;if(i.charAt(0)==="#"){if(n===4||n===5){var o=parseInt(i.slice(1,4),16);if(!(o>=0&&o<=4095)){cr(e,0,0,0,1);return}return cr(e,(o&3840)>>4|(o&3840)>>8,o&240|(o&240)>>4,o&15|(o&15)<<4,n===5?parseInt(i.slice(4),16)/15:1),So(r,e),e}else if(n===7||n===9){var o=parseInt(i.slice(1,7),16);if(!(o>=0&&o<=16777215)){cr(e,0,0,0,1);return}return cr(e,(o&16711680)>>16,(o&65280)>>8,o&255,n===9?parseInt(i.slice(7),16)/255:1),So(r,e),e}return}var a=i.indexOf("("),s=i.indexOf(")");if(a!==-1&&s+1===n){var l=i.substr(0,a),u=i.substr(a+1,s-(a+1)).split(","),f=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?cr(e,+u[0],+u[1],+u[2],1):cr(e,0,0,0,1);f=wa(u.pop());case"rgb":if(u.length>=3)return cr(e,Ac(u[0]),Ac(u[1]),Ac(u[2]),u.length===3?f:wa(u[3])),So(r,e),e;cr(e,0,0,0,1);return;case"hsla":if(u.length!==4){cr(e,0,0,0,1);return}return u[3]=wa(u[3]),Fg(u,e),So(r,e),e;case"hsl":if(u.length!==3){cr(e,0,0,0,1);return}return Fg(u,e),So(r,e),e;default:return}}cr(e,0,0,0,1)}}function Fg(r,e){var t=(parseFloat(r[0])%360+360)%360/360,i=wa(r[1]),n=wa(r[2]),o=n<=.5?n*(i+1):n+i-n*i,a=n*2-o;return e=e||[],cr(e,Sa(Pc(a,o,t+1/3)*255),Sa(Pc(a,o,t)*255),Sa(Pc(a,o,t-1/3)*255),1),r.length===4&&(e[3]=r[3]),e}function Bg(r,e){var t=Ti(r);if(t){for(var i=0;i<3;i++)e<0?t[i]=t[i]*(1-e)|0:t[i]=(255-t[i])*e+t[i]|0,t[i]>255?t[i]=255:t[i]<0&&(t[i]=0);return Nc(t,t.length===4?"rgba":"rgb")}}function Nc(r,e){if(!(!r||!r.length)){var t=r[0]+","+r[1]+","+r[2];return(e==="rgba"||e==="hsva"||e==="hsla")&&(t+=","+r[3]),e+"("+t+")"}}function wo(r,e){var t=Ti(r);return t?(.299*t[0]+.587*t[1]+.114*t[2])*t[3]/255+(1-t[3])*e:0}var Wg=new ei(100);function kc(r){if(N(r)){var e=Wg.get(r);return e||(e=Bg(r,-.1),Wg.put(r,e)),e}else if(_i(r)){var t=P({},r);return t.colorStops=X(r.colorStops,function(i){return{offset:i.offset,color:Bg(i.color,-.1)}}),t}return r}var PT=(function(){function r(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return r})(),LT=(function(){function r(){this.browser=new PT,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<"u"}return r})(),bi=new LT;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(bi.wxa=!0,bi.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?bi.worker=!0:!bi.hasGlobalWindow||"Deno"in window?(bi.node=!0,bi.svgSupported=!0):NT(navigator.userAgent,bi);function NT(r,e){var t=e.browser,i=r.match(/Firefox\/([\d.]+)/),n=r.match(/MSIE\s([\d.]+)/)||r.match(/Trident\/.+?rv:(([\d.]+))/),o=r.match(/Edge?\/([\d.]+)/),a=/micromessenger/i.test(r);i&&(t.firefox=!0,t.version=i[1]),n&&(t.ie=!0,t.version=n[1]),o&&(t.edge=!0,t.version=o[1],t.newEdge=+o[1].split(".")[0]>18),a&&(t.weChat=!0),e.svgSupported=typeof SVGRect<"u",e.touchEventsSupported="ontouchstart"in window&&!t.ie&&!t.edge,e.pointerEventsSupported="onpointerdown"in window&&(t.edge||t.ie&&+t.version>=11),e.domSupported=typeof document<"u";var s=document.documentElement.style;e.transform3dSupported=(t.ie&&"transition"in s||t.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),e.transformSupported=e.transform3dSupported||t.ie&&+t.version>=9}var Q=bi;function Hg(r){return r.type==="linear"}function Vg(r){return r.type==="radial"}var WN=(function(){return Q.hasGlobalWindow&&j(window.btoa)?function(r){return window.btoa(unescape(encodeURIComponent(r)))}:typeof Buffer<"u"?function(r){return Buffer.from(r).toString("base64")}:function(r){return null}})();var Fc=Array.prototype.slice;function ti(r,e,t){return(e-r)*t+r}function zc(r,e,t,i){for(var n=e.length,o=0;o<n;o++)r[o]=ti(e[o],t[o],i);return r}function kT(r,e,t,i){for(var n=e.length,o=n&&e[0].length,a=0;a<n;a++){r[a]||(r[a]=[]);for(var s=0;s<o;s++)r[a][s]=ti(e[a][s],t[a][s],i)}return r}function Bl(r,e,t,i){for(var n=e.length,o=0;o<n;o++)r[o]=e[o]+t[o]*i;return r}function Gg(r,e,t,i){for(var n=e.length,o=n&&e[0].length,a=0;a<n;a++){r[a]||(r[a]=[]);for(var s=0;s<o;s++)r[a][s]=e[a][s]+t[a][s]*i}return r}function zT(r,e){for(var t=r.length,i=e.length,n=t>i?e:r,o=Math.min(t,i),a=n[o-1]||{color:[0,0,0,0],offset:0},s=o;s<Math.max(t,i);s++)n.push({offset:a.offset,color:a.color.slice()})}function FT(r,e,t){var i=r,n=e;if(!(!i.push||!n.push)){var o=i.length,a=n.length;if(o!==a){var s=o>a;if(s)i.length=a;else for(var l=o;l<a;l++)i.push(t===1?n[l]:Fc.call(n[l]))}for(var u=i[0]&&i[0].length,l=0;l<i.length;l++)if(t===1)isNaN(i[l])&&(i[l]=n[l]);else for(var f=0;f<u;f++)isNaN(i[l][f])&&(i[l][f]=n[l][f])}}function ba(r){if(et(r)){var e=r.length;if(et(r[0])){for(var t=[],i=0;i<e;i++)t.push(Fc.call(r[i]));return t}return Fc.call(r)}return r}function Hl(r){return r[0]=Math.floor(r[0])||0,r[1]=Math.floor(r[1])||0,r[2]=Math.floor(r[2])||0,r[3]=r[3]==null?1:r[3],"rgba("+r.join(",")+")"}function BT(r){return et(r&&r[0])?2:1}var Wl=0,Vl=1,Xg=2,Ta=3,Bc=4,Wc=5,Yg=6;function qg(r){return r===Bc||r===Wc}function Ul(r){return r===Vl||r===Xg}var Ca=[0,0,0,0],WT=(function(){function r(e){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=e}return r.prototype.isFinished=function(){return this._finished},r.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},r.prototype.needsAnimate=function(){return this.keyframes.length>=1},r.prototype.getAdditiveTrack=function(){return this._additiveTrack},r.prototype.addKeyframe=function(e,t,i){this._needsSort=!0;var n=this.keyframes,o=n.length,a=!1,s=Yg,l=t;if(et(t)){var u=BT(t);s=u,(u===1&&!Ce(t[0])||u===2&&!Ce(t[0][0]))&&(a=!0)}else if(Ce(t)&&!ho(t))s=Wl;else if(N(t))if(!isNaN(+t))s=Wl;else{var f=Ti(t);f&&(l=f,s=Ta)}else if(_i(t)){var c=P({},l);c.colorStops=X(t.colorStops,function(h){return{offset:h.offset,color:Ti(h.color)}}),Hg(t)?s=Bc:Vg(t)&&(s=Wc),l=c}o===0?this.valType=s:(s!==this.valType||s===Yg)&&(a=!0),this.discrete=this.discrete||a;var p={time:e,value:l,rawValue:t,percent:0};return i&&(p.easing=i,p.easingFunc=j(i)?i:El[i]||zl(i)),n.push(p),p},r.prototype.prepare=function(e,t){var i=this.keyframes;this._needsSort&&i.sort(function(g,v){return g.time-v.time});for(var n=this.valType,o=i.length,a=i[o-1],s=this.discrete,l=Ul(n),u=qg(n),f=0;f<o;f++){var c=i[f],p=c.value,h=a.value;c.percent=c.time/e,s||(l&&f!==o-1?FT(p,h,n):u&&zT(p.colorStops,h.colorStops))}if(!s&&n!==Wc&&t&&this.needsAnimate()&&t.needsAnimate()&&n===t.valType&&!t._finished){this._additiveTrack=t;for(var d=i[0].value,f=0;f<o;f++)n===Wl?i[f].additiveValue=i[f].value-d:n===Ta?i[f].additiveValue=Bl([],i[f].value,d,-1):Ul(n)&&(i[f].additiveValue=n===Vl?Bl([],i[f].value,d,-1):Gg([],i[f].value,d,-1))}},r.prototype.step=function(e,t){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var i=this._additiveTrack!=null,n=i?"additiveValue":"value",o=this.valType,a=this.keyframes,s=a.length,l=this.propName,u=o===Ta,f,c=this._lastFr,p=Math.min,h,d;if(s===1)h=d=a[0];else{if(t<0)f=0;else if(t<this._lastFrP){var g=p(c+1,s-1);for(f=g;f>=0&&!(a[f].percent<=t);f--);f=p(f,s-2)}else{for(f=c;f<s&&!(a[f].percent>t);f++);f=p(f-1,s-2)}d=a[f+1],h=a[f]}if(h&&d){this._lastFr=f,this._lastFrP=t;var v=d.percent-h.percent,m=v===0?1:p((t-h.percent)/v,1);d.easingFunc&&(m=d.easingFunc(m));var y=i?this._additiveValue:u?Ca:e[l];if((Ul(o)||u)&&!y&&(y=this._additiveValue=[]),this.discrete)e[l]=m<1?h.rawValue:d.rawValue;else if(Ul(o))o===Vl?zc(y,h[n],d[n],m):kT(y,h[n],d[n],m);else if(qg(o)){var _=h[n],x=d[n],C=o===Bc;e[l]={type:C?"linear":"radial",x:ti(_.x,x.x,m),y:ti(_.y,x.y,m),colorStops:X(_.colorStops,function(T,D){var b=x.colorStops[D];return{offset:ti(T.offset,b.offset,m),color:Hl(zc([],T.color,b.color,m))}}),global:x.global},C?(e[l].x2=ti(_.x2,x.x2,m),e[l].y2=ti(_.y2,x.y2,m)):e[l].r=ti(_.r,x.r,m)}else if(u)zc(y,h[n],d[n],m),i||(e[l]=Hl(y));else{var w=ti(h[n],d[n],m);i?this._additiveValue=w:e[l]=w}i&&this._addToTarget(e)}}},r.prototype._addToTarget=function(e){var t=this.valType,i=this.propName,n=this._additiveValue;t===Wl?e[i]=e[i]+n:t===Ta?(Ti(e[i],Ca),Bl(Ca,Ca,n,1),e[i]=Hl(Ca)):t===Vl?Bl(e[i],e[i],n,1):t===Xg&&Gg(e[i],e[i],n,1)},r})(),UT=(function(){function r(e,t,i,n){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&n){co("Can' use additive animation on looped animation.");return}this._additiveAnimators=n,this._allowDiscrete=i}return r.prototype.getMaxTime=function(){return this._maxTime},r.prototype.getDelay=function(){return this._delay},r.prototype.getLoop=function(){return this._loop},r.prototype.getTarget=function(){return this._target},r.prototype.changeTarget=function(e){this._target=e},r.prototype.when=function(e,t,i){return this.whenWithKeys(e,t,me(t),i)},r.prototype.whenWithKeys=function(e,t,i,n){for(var o=this._tracks,a=0;a<i.length;a++){var s=i[a],l=o[s];if(!l){l=o[s]=new WT(s);var u=void 0,f=this._getAdditiveTrack(s);if(f){var c=f.keyframes,p=c[c.length-1];u=p&&p.value,f.valType===Ta&&u&&(u=Hl(u))}else u=this._target[s];if(u==null)continue;e>0&&l.addKeyframe(0,ba(u),n),this._trackKeys.push(s)}l.addKeyframe(e,ba(t[s]),n)}return this._maxTime=Math.max(this._maxTime,e),this},r.prototype.pause=function(){this._clip.pause(),this._paused=!0},r.prototype.resume=function(){this._clip.resume(),this._paused=!1},r.prototype.isPaused=function(){return!!this._paused},r.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},r.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,i=0;i<t;i++)e[i].call(this)},r.prototype._abortedCallback=function(){this._setTracksFinished();var e=this.animation,t=this._abortedCbs;if(e&&e.removeClip(this._clip),this._clip=null,t)for(var i=0;i<t.length;i++)t[i].call(this)},r.prototype._setTracksFinished=function(){for(var e=this._tracks,t=this._trackKeys,i=0;i<t.length;i++)e[t[i]].setFinished()},r.prototype._getAdditiveTrack=function(e){var t,i=this._additiveAnimators;if(i)for(var n=0;n<i.length;n++){var o=i[n].getTrack(e);o&&(t=o)}return t},r.prototype.start=function(e){if(!(this._started>0)){this._started=1;for(var t=this,i=[],n=this._maxTime||0,o=0;o<this._trackKeys.length;o++){var a=this._trackKeys[o],s=this._tracks[a],l=this._getAdditiveTrack(a),u=s.keyframes,f=u.length;if(s.prepare(n,l),s.needsAnimate())if(!this._allowDiscrete&&s.discrete){var c=u[f-1];c&&(t._target[s.propName]=c.rawValue),s.setFinished()}else i.push(s)}if(i.length||this._force){var p=new Lg({life:n,loop:this._loop,delay:this._delay||0,onframe:function(h){t._started=2;var d=t._additiveAnimators;if(d){for(var g=!1,v=0;v<d.length;v++)if(d[v]._clip){g=!0;break}g||(t._additiveAnimators=null)}for(var v=0;v<i.length;v++)i[v].step(t._target,h);var m=t._onframeCbs;if(m)for(var v=0;v<m.length;v++)m[v](t._target,h)},ondestroy:function(){t._doneCallback()}});this._clip=p,this.animation&&this.animation.addClip(p),e&&p.setEasing(e)}else this._doneCallback();return this}},r.prototype.stop=function(e){if(this._clip){var t=this._clip;e&&t.onframe(1),this._abortedCallback()}},r.prototype.delay=function(e){return this._delay=e,this},r.prototype.during=function(e){return e&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(e)),this},r.prototype.done=function(e){return e&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(e)),this},r.prototype.aborted=function(e){return e&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(e)),this},r.prototype.getClip=function(){return this._clip},r.prototype.getTrack=function(e){return this._tracks[e]},r.prototype.getTracks=function(){var e=this;return X(this._trackKeys,function(t){return e._tracks[t]})},r.prototype.stopTracks=function(e,t){if(!e.length||!this._clip)return!0;for(var i=this._tracks,n=this._trackKeys,o=0;o<e.length;o++){var a=i[e[o]];a&&!a.isFinished()&&(t?a.step(this._target,1):this._started===1&&a.step(this._target,0),a.setFinished())}for(var s=!0,o=0;o<n.length;o++)if(!i[n[o]].isFinished()){s=!1;break}return s&&this._abortedCallback(),s},r.prototype.saveTo=function(e,t,i){if(e){t=t||this._trackKeys;for(var n=0;n<t.length;n++){var o=t[n],a=this._tracks[o];if(!(!a||a.isFinished())){var s=a.keyframes,l=s[i?0:s.length-1];l&&(e[o]=ba(l.rawValue))}}}},r.prototype.__changeFinalValue=function(e,t){t=t||me(e);for(var i=0;i<t.length;i++){var n=t[i],o=this._tracks[n];if(o){var a=o.keyframes;if(a.length>1){var s=a.pop();o.addKeyframe(s.time,e[n]),o.prepare(this._maxTime,o.getAdditiveTrack())}}}},r})(),Da=UT;var HT=(function(){function r(e,t){this.x=e||0,this.y=t||0}return r.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},r.prototype.clone=function(){return new r(this.x,this.y)},r.prototype.set=function(e,t){return this.x=e,this.y=t,this},r.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},r.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},r.prototype.scale=function(e){this.x*=e,this.y*=e},r.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},r.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},r.prototype.dot=function(e){return this.x*e.x+this.y*e.y},r.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},r.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},r.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},r.prototype.distance=function(e){var t=this.x-e.x,i=this.y-e.y;return Math.sqrt(t*t+i*i)},r.prototype.distanceSquare=function(e){var t=this.x-e.x,i=this.y-e.y;return t*t+i*i},r.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},r.prototype.transform=function(e){if(e){var t=this.x,i=this.y;return this.x=e[0]*t+e[2]*i+e[4],this.y=e[1]*t+e[3]*i+e[5],this}},r.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},r.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},r.set=function(e,t,i){e.x=t,e.y=i},r.copy=function(e,t){e.x=t.x,e.y=t.y},r.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},r.lenSquare=function(e){return e.x*e.x+e.y*e.y},r.dot=function(e,t){return e.x*t.x+e.y*t.y},r.add=function(e,t,i){e.x=t.x+i.x,e.y=t.y+i.y},r.sub=function(e,t,i){e.x=t.x-i.x,e.y=t.y-i.y},r.scale=function(e,t,i){e.x=t.x*i,e.y=t.y*i},r.scaleAndAdd=function(e,t,i,n){e.x=t.x+i.x*n,e.y=t.y+i.y*n},r.lerp=function(e,t,i,n){var o=1-n;e.x=o*t.x+n*i.x,e.y=o*t.y+n*i.y},r})(),ve=HT;var Gl=Math.min,Yl=Math.max,hn=new ve,pn=new ve,dn=new ve,vn=new ve,Ma=new ve,Ea=new ve,VT=(function(){function r(e,t,i,n){i<0&&(e=e+i,i=-i),n<0&&(t=t+n,n=-n),this.x=e,this.y=t,this.width=i,this.height=n}return r.prototype.union=function(e){var t=Gl(e.x,this.x),i=Gl(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Yl(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=Yl(e.y+e.height,this.y+this.height)-i:this.height=e.height,this.x=t,this.y=i},r.prototype.applyTransform=function(e){r.applyTransform(this,this,e)},r.prototype.calculateTransform=function(e){var t=this,i=e.width/t.width,n=e.height/t.height,o=Kr();return ya(o,o,[-t.x,-t.y]),wg(o,o,[i,n]),ya(o,o,[e.x,e.y]),o},r.prototype.intersect=function(e,t){if(!e)return!1;e instanceof r||(e=r.create(e));var i=this,n=i.x,o=i.x+i.width,a=i.y,s=i.y+i.height,l=e.x,u=e.x+e.width,f=e.y,c=e.y+e.height,p=!(o<l||u<n||s<f||c<a);if(t){var h=1/0,d=0,g=Math.abs(o-l),v=Math.abs(u-n),m=Math.abs(s-f),y=Math.abs(c-a),_=Math.min(g,v),x=Math.min(m,y);o<l||u<n?_>d&&(d=_,g<v?ve.set(Ea,-g,0):ve.set(Ea,v,0)):_<h&&(h=_,g<v?ve.set(Ma,g,0):ve.set(Ma,-v,0)),s<f||c<a?x>d&&(d=x,m<y?ve.set(Ea,0,-m):ve.set(Ea,0,y)):_<h&&(h=_,m<y?ve.set(Ma,0,m):ve.set(Ma,0,-y))}return t&&ve.copy(t,p?Ma:Ea),p},r.prototype.contain=function(e,t){var i=this;return e>=i.x&&e<=i.x+i.width&&t>=i.y&&t<=i.y+i.height},r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.copy=function(e){r.copy(this,e)},r.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},r.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},r.prototype.isZero=function(){return this.width===0||this.height===0},r.create=function(e){return new r(e.x,e.y,e.width,e.height)},r.copy=function(e,t){e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height},r.applyTransform=function(e,t,i){if(!i){e!==t&&r.copy(e,t);return}if(i[1]<1e-5&&i[1]>-1e-5&&i[2]<1e-5&&i[2]>-1e-5){var n=i[0],o=i[3],a=i[4],s=i[5];e.x=t.x*n+a,e.y=t.y*o+s,e.width=t.width*n,e.height=t.height*o,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}hn.x=dn.x=t.x,hn.y=vn.y=t.y,pn.x=vn.x=t.x+t.width,pn.y=dn.y=t.y+t.height,hn.transform(i),vn.transform(i),pn.transform(i),dn.transform(i),e.x=Gl(hn.x,pn.x,dn.x,vn.x),e.y=Gl(hn.y,pn.y,dn.y,vn.y);var l=Yl(hn.x,pn.x,dn.x,vn.x),u=Yl(hn.y,pn.y,dn.y,vn.y);e.width=l-e.x,e.height=u-e.y},r})(),ue=VT;var GT=(function(){function r(e){e&&(this._$eventProcessor=e)}return r.prototype.on=function(e,t,i,n){this._$handlers||(this._$handlers={});var o=this._$handlers;if(typeof t=="function"&&(n=i,i=t,t=null),!i||!e)return this;var a=this._$eventProcessor;t!=null&&a&&a.normalizeQuery&&(t=a.normalizeQuery(t)),o[e]||(o[e]=[]);for(var s=0;s<o[e].length;s++)if(o[e][s].h===i)return this;var l={h:i,query:t,ctx:n||this,callAtLast:i.zrEventfulCallAtLast},u=o[e].length-1,f=o[e][u];return f&&f.callAtLast?o[e].splice(u,0,l):o[e].push(l),this},r.prototype.isSilent=function(e){var t=this._$handlers;return!t||!t[e]||!t[e].length},r.prototype.off=function(e,t){var i=this._$handlers;if(!i)return this;if(!e)return this._$handlers={},this;if(t){if(i[e]){for(var n=[],o=0,a=i[e].length;o<a;o++)i[e][o].h!==t&&n.push(i[e][o]);i[e]=n}i[e]&&i[e].length===0&&delete i[e]}else delete i[e];return this},r.prototype.trigger=function(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];if(!this._$handlers)return this;var n=this._$handlers[e],o=this._$eventProcessor;if(n)for(var a=t.length,s=n.length,l=0;l<s;l++){var u=n[l];if(!(o&&o.filter&&u.query!=null&&!o.filter(e,u.query)))switch(a){case 0:u.h.call(u.ctx);break;case 1:u.h.call(u.ctx,t[0]);break;case 2:u.h.call(u.ctx,t[0],t[1]);break;default:u.h.apply(u.ctx,t);break}}return o&&o.afterTrigger&&o.afterTrigger(e),this},r.prototype.triggerWithContext=function(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];if(!this._$handlers)return this;var n=this._$handlers[e],o=this._$eventProcessor;if(n)for(var a=t.length,s=t[a-1],l=n.length,u=0;u<l;u++){var f=n[u];if(!(o&&o.filter&&f.query!=null&&!o.filter(e,f.query)))switch(a){case 0:f.h.call(s);break;case 1:f.h.call(s,t[0]);break;case 2:f.h.call(s,t[0],t[1]);break;default:f.h.apply(s,t.slice(1,a-1));break}}return o&&o.afterTrigger&&o.afterTrigger(e),this},r})(),St=GT;var jg={};function Vt(r,e){e=e||Tr;var t=jg[e];t||(t=jg[e]=new ei(500));var i=t.get(r);return i==null&&(i=tr.measureText(r,e).width,t.put(r,i)),i}function Zg(r,e,t,i){var n=Vt(r,e),o=Xl(e),a=Co(0,n,t),s=mn(0,o,i),l=new ue(a,s,n,o);return l}function ql(r,e,t,i){var n=((r||"")+"").split(`
|
|
2
|
+
`),o=n.length;if(o===1)return Zg(n[0],e,t,i);for(var a=new ue(0,0,0,0),s=0;s<n.length;s++){var l=Zg(n[s],e,t,i);s===0?a.copy(l):a.union(l)}return a}function Co(r,e,t){return t==="right"?r-=e:t==="center"&&(r-=e/2),r}function mn(r,e,t){return t==="middle"?r-=e/2:t==="bottom"&&(r-=e),r}function Xl(r){return Vt("\u56FD",r)}function zr(r,e){return typeof r=="string"?r.lastIndexOf("%")>=0?parseFloat(r)/100*e:parseFloat(r):r}function jl(r,e,t){var i=e.position||"inside",n=e.distance!=null?e.distance:5,o=t.height,a=t.width,s=o/2,l=t.x,u=t.y,f="left",c="top";if(i instanceof Array)l+=zr(i[0],t.width),u+=zr(i[1],t.height),f=null,c=null;else switch(i){case"left":l-=n,u+=s,f="right",c="middle";break;case"right":l+=n+a,u+=s,c="middle";break;case"top":l+=a/2,u-=n,f="center",c="bottom";break;case"bottom":l+=a/2,u+=o+n,f="center";break;case"inside":l+=a/2,u+=s,f="center",c="middle";break;case"insideLeft":l+=n,u+=s,c="middle";break;case"insideRight":l+=a-n,u+=s,f="right",c="middle";break;case"insideTop":l+=a/2,u+=n,f="center";break;case"insideBottom":l+=a/2,u+=o-n,f="center",c="bottom";break;case"insideTopLeft":l+=n,u+=n;break;case"insideTopRight":l+=a-n,u+=n,f="right";break;case"insideBottomLeft":l+=n,u+=o-n,c="bottom";break;case"insideBottomRight":l+=a-n,u+=o-n,f="right",c="bottom";break}return r=r||{},r.x=l,r.y=u,r.align=f,r.verticalAlign=c,r}var Kg=1;Q.hasGlobalWindow&&(Kg=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var gn=Kg,Ra=.4,Oa="#333",Ia="#ccc",$g="#eee";var tt=1,yn=2,Di=4;var Uc="__zr_normal__",Hc=fn.concat(["ignore"]),qT=Nt(fn,function(r,e){return r[e]=!0,r},{ignore:!1}),To={},XT=new ue(0,0,0,0),Yc=(function(){function r(e){this.id=_l(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return r.prototype._init=function(e){this.attr(e)},r.prototype.drift=function(e,t,i){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0;break}var n=this.transform;n||(n=this.transform=[1,0,0,1,0,0]),n[4]+=e,n[5]+=t,this.decomposeTransform(),this.markRedraw()},r.prototype.beforeUpdate=function(){},r.prototype.afterUpdate=function(){},r.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},r.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||(this.textConfig={});var i=this.textConfig,n=i.local,o=t.innerTransformable,a=void 0,s=void 0,l=!1;o.parent=n?this:null;var u=!1;if(o.copyTransform(t),i.position!=null){var f=XT;i.layoutRect?f.copy(i.layoutRect):f.copy(this.getBoundingRect()),n||f.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(To,i,f):jl(To,i,f),o.x=To.x,o.y=To.y,a=To.align,s=To.verticalAlign;var c=i.origin;if(c&&i.rotation!=null){var p=void 0,h=void 0;c==="center"?(p=f.width*.5,h=f.height*.5):(p=zr(c[0],f.width),h=zr(c[1],f.height)),u=!0,o.originX=-o.x+p+(n?0:f.x),o.originY=-o.y+h+(n?0:f.y)}}i.rotation!=null&&(o.rotation=i.rotation);var d=i.offset;d&&(o.x+=d[0],o.y+=d[1],u||(o.originX=-d[0],o.originY=-d[1]));var g=i.inside==null?typeof i.position=="string"&&i.position.indexOf("inside")>=0:i.inside,v=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),m=void 0,y=void 0,_=void 0;g&&this.canBeInsideText()?(m=i.insideFill,y=i.insideStroke,(m==null||m==="auto")&&(m=this.getInsideTextFill()),(y==null||y==="auto")&&(y=this.getInsideTextStroke(m),_=!0)):(m=i.outsideFill,y=i.outsideStroke,(m==null||m==="auto")&&(m=this.getOutsideFill()),(y==null||y==="auto")&&(y=this.getOutsideStroke(m),_=!0)),m=m||"#000",(m!==v.fill||y!==v.stroke||_!==v.autoStroke||a!==v.align||s!==v.verticalAlign)&&(l=!0,v.fill=m,v.stroke=y,v.autoStroke=_,v.align=a,v.verticalAlign=s,t.setDefaultTextStyle(v)),t.__dirty|=tt,l&&t.dirtyStyle(!0)}},r.prototype.canBeInsideText=function(){return!0},r.prototype.getInsideTextFill=function(){return"#fff"},r.prototype.getInsideTextStroke=function(e){return"#000"},r.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Ia:Oa},r.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),i=typeof t=="string"&&Ti(t);i||(i=[255,255,255,1]);for(var n=i[3],o=this.__zr.isDarkMode(),a=0;a<3;a++)i[a]=i[a]*n+(o?0:255)*(1-n);return i[3]=1,Nc(i,"rgba")},r.prototype.traverse=function(e,t){},r.prototype.attrKV=function(e,t){e==="textConfig"?this.setTextConfig(t):e==="textContent"?this.setTextContent(t):e==="clipPath"?this.setClipPath(t):e==="extra"?(this.extra=this.extra||{},P(this.extra,t)):this[e]=t},r.prototype.hide=function(){this.ignore=!0,this.markRedraw()},r.prototype.show=function(){this.ignore=!1,this.markRedraw()},r.prototype.attr=function(e,t){if(typeof e=="string")this.attrKV(e,t);else if(F(e))for(var i=e,n=me(i),o=0;o<n.length;o++){var a=n[o];this.attrKV(a,e[a])}return this.markRedraw(),this},r.prototype.saveCurrentToNormalState=function(e){this._innerSaveToNormal(e);for(var t=this._normalState,i=0;i<this.animators.length;i++){var n=this.animators[i],o=n.__fromStateTransition;if(!(n.getLoop()||o&&o!==Uc)){var a=n.targetName,s=a?t[a]:t;n.saveTo(s)}}},r.prototype._innerSaveToNormal=function(e){var t=this._normalState;t||(t=this._normalState={}),e.textConfig&&!t.textConfig&&(t.textConfig=this.textConfig),this._savePrimaryToNormal(e,t,Hc)},r.prototype._savePrimaryToNormal=function(e,t,i){for(var n=0;n<i.length;n++){var o=i[n];e[o]!=null&&!(o in t)&&(t[o]=this[o])}},r.prototype.hasState=function(){return this.currentStates.length>0},r.prototype.getState=function(e){return this.states[e]},r.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},r.prototype.clearStates=function(e){this.useState(Uc,!1,e)},r.prototype.useState=function(e,t,i,n){var o=e===Uc,a=this.hasState();if(!(!a&&o)){var s=this.currentStates,l=this.stateTransition;if(!(he(s,e)>=0&&(t||s.length===1))){var u;if(this.stateProxy&&!o&&(u=this.stateProxy(e)),u||(u=this.states&&this.states[e]),!u&&!o){co("State "+e+" not exists.");return}o||this.saveCurrentToNormalState(u);var f=!!(u&&u.hoverLayer||n);f&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,u,this._normalState,t,!i&&!this.__inHover&&l&&l.duration>0,l);var c=this._textContent,p=this._textGuide;return c&&c.useState(e,t,i,f),p&&p.useState(e,t,i,f),o?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!f&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~tt),u}}},r.prototype.useStates=function(e,t,i){if(!e.length)this.clearStates();else{var n=[],o=this.currentStates,a=e.length,s=a===o.length;if(s){for(var l=0;l<a;l++)if(e[l]!==o[l]){s=!1;break}}if(s)return;for(var l=0;l<a;l++){var u=e[l],f=void 0;this.stateProxy&&(f=this.stateProxy(u,e)),f||(f=this.states[u]),f&&n.push(f)}var c=n[a-1],p=!!(c&&c.hoverLayer||i);p&&this._toggleHoverLayerFlag(!0);var h=this._mergeStates(n),d=this.stateTransition;this.saveCurrentToNormalState(h),this._applyStateObj(e.join(","),h,this._normalState,!1,!t&&!this.__inHover&&d&&d.duration>0,d);var g=this._textContent,v=this._textGuide;g&&g.useStates(e,t,p),v&&v.useStates(e,t,p),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!p&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~tt)}},r.prototype.isSilent=function(){for(var e=this.silent,t=this.parent;!e&&t;){if(t.silent){e=!0;break}t=t.parent}return e},r.prototype._updateAnimationTargets=function(){for(var e=0;e<this.animators.length;e++){var t=this.animators[e];t.targetName&&t.changeTarget(this[t.targetName])}},r.prototype.removeState=function(e){var t=he(this.currentStates,e);if(t>=0){var i=this.currentStates.slice();i.splice(t,1),this.useStates(i)}},r.prototype.replaceState=function(e,t,i){var n=this.currentStates.slice(),o=he(n,e),a=he(n,t)>=0;o>=0?a?n.splice(o,1):n[o]=t:i&&!a&&n.push(t),this.useStates(n)},r.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},r.prototype._mergeStates=function(e){for(var t={},i,n=0;n<e.length;n++){var o=e[n];P(t,o),o.textConfig&&(i=i||{},P(i,o.textConfig))}return i&&(t.textConfig=i),t},r.prototype._applyStateObj=function(e,t,i,n,o,a){var s=!(t&&n);t&&t.textConfig?(this.textConfig=P({},n?this.textConfig:i.textConfig),P(this.textConfig,t.textConfig)):s&&i.textConfig&&(this.textConfig=i.textConfig);for(var l={},u=!1,f=0;f<Hc.length;f++){var c=Hc[f],p=o&&qT[c];t&&t[c]!=null?p?(u=!0,l[c]=t[c]):this[c]=t[c]:s&&i[c]!=null&&(p?(u=!0,l[c]=i[c]):this[c]=i[c])}if(!o)for(var f=0;f<this.animators.length;f++){var h=this.animators[f],d=h.targetName;h.getLoop()||h.__changeFinalValue(d?(t||i)[d]:t||i)}u&&this._transitionState(e,l,a)},r.prototype._attachComponent=function(e){if(!(e.__zr&&!e.__hostTarget)&&e!==this){var t=this.__zr;t&&e.addSelfToZr(t),e.__zr=t,e.__hostTarget=this}},r.prototype._detachComponent=function(e){e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__hostTarget=null},r.prototype.getClipPath=function(){return this._clipPath},r.prototype.setClipPath=function(e){this._clipPath&&this._clipPath!==e&&this.removeClipPath(),this._attachComponent(e),this._clipPath=e,this.markRedraw()},r.prototype.removeClipPath=function(){var e=this._clipPath;e&&(this._detachComponent(e),this._clipPath=null,this.markRedraw())},r.prototype.getTextContent=function(){return this._textContent},r.prototype.setTextContent=function(e){var t=this._textContent;t!==e&&(t&&t!==e&&this.removeTextContent(),e.innerTransformable=new cn,this._attachComponent(e),this._textContent=e,this.markRedraw())},r.prototype.setTextConfig=function(e){this.textConfig||(this.textConfig={}),P(this.textConfig,e),this.markRedraw()},r.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},r.prototype.removeTextContent=function(){var e=this._textContent;e&&(e.innerTransformable=null,this._detachComponent(e),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},r.prototype.getTextGuideLine=function(){return this._textGuide},r.prototype.setTextGuideLine=function(e){this._textGuide&&this._textGuide!==e&&this.removeTextGuideLine(),this._attachComponent(e),this._textGuide=e,this.markRedraw()},r.prototype.removeTextGuideLine=function(){var e=this._textGuide;e&&(this._detachComponent(e),this._textGuide=null,this.markRedraw())},r.prototype.markRedraw=function(){this.__dirty|=tt;var e=this.__zr;e&&(this.__inHover?e.refreshHover():e.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},r.prototype.dirty=function(){this.markRedraw()},r.prototype._toggleHoverLayerFlag=function(e){this.__inHover=e;var t=this._textContent,i=this._textGuide;t&&(t.__inHover=e),i&&(i.__inHover=e)},r.prototype.addSelfToZr=function(e){if(this.__zr!==e){this.__zr=e;var t=this.animators;if(t)for(var i=0;i<t.length;i++)e.animation.addAnimator(t[i]);this._clipPath&&this._clipPath.addSelfToZr(e),this._textContent&&this._textContent.addSelfToZr(e),this._textGuide&&this._textGuide.addSelfToZr(e)}},r.prototype.removeSelfFromZr=function(e){if(this.__zr){this.__zr=null;var t=this.animators;if(t)for(var i=0;i<t.length;i++)e.animation.removeAnimator(t[i]);this._clipPath&&this._clipPath.removeSelfFromZr(e),this._textContent&&this._textContent.removeSelfFromZr(e),this._textGuide&&this._textGuide.removeSelfFromZr(e)}},r.prototype.animate=function(e,t,i){var n=e?this[e]:this,o=new Da(n,t,i);return e&&(o.targetName=e),this.addAnimator(o,e),o},r.prototype.addAnimator=function(e,t){var i=this.__zr,n=this;e.during(function(){n.updateDuringAnimation(t)}).done(function(){var o=n.animators,a=he(o,e);a>=0&&o.splice(a,1)}),this.animators.push(e),i&&i.animation.addAnimator(e),i&&i.wakeUp()},r.prototype.updateDuringAnimation=function(e){this.markRedraw()},r.prototype.stopAnimation=function(e,t){for(var i=this.animators,n=i.length,o=[],a=0;a<n;a++){var s=i[a];!e||e===s.scope?s.stop(t):o.push(s)}return this.animators=o,this},r.prototype.animateTo=function(e,t,i){Vc(this,e,t,i)},r.prototype.animateFrom=function(e,t,i){Vc(this,e,t,i,!0)},r.prototype._transitionState=function(e,t,i,n){for(var o=Vc(this,t,i,n),a=0;a<o.length;a++)o[a].__fromStateTransition=e},r.prototype.getBoundingRect=function(){return null},r.prototype.getPaintRect=function(){return null},r.initDefaultProps=(function(){var e=r.prototype;e.type="element",e.name="",e.ignore=e.silent=e.isGroup=e.draggable=e.dragging=e.ignoreClip=e.__inHover=!1,e.__dirty=tt;var t={};function i(o,a,s){t[o+a+s]||(console.warn("DEPRECATED: '"+o+"' has been deprecated. use '"+a+"', '"+s+"' instead"),t[o+a+s]=!0)}function n(o,a,s,l){Object.defineProperty(e,o,{get:function(){if(!this[a]){var f=this[a]=[];u(this,f)}return this[a]},set:function(f){this[s]=f[0],this[l]=f[1],this[a]=f,u(this,f)}});function u(f,c){Object.defineProperty(c,0,{get:function(){return f[s]},set:function(p){f[s]=p}}),Object.defineProperty(c,1,{get:function(){return f[l]},set:function(p){f[l]=p}})}}Object.defineProperty&&(n("position","_legacyPos","x","y"),n("scale","_legacyScale","scaleX","scaleY"),n("origin","_legacyOrigin","originX","originY"))})(),r})();Lt(Yc,St);Lt(Yc,cn);function Vc(r,e,t,i,n){t=t||{};var o=[];Qg(r,"",r,e,t,i,o,n);var a=o.length,s=!1,l=t.done,u=t.aborted,f=function(){s=!0,a--,a<=0&&(s?l&&l():u&&u())},c=function(){a--,a<=0&&(s?l&&l():u&&u())};a||l&&l(),o.length>0&&t.during&&o[0].during(function(d,g){t.during(g)});for(var p=0;p<o.length;p++){var h=o[p];f&&h.done(f),c&&h.aborted(c),t.force&&h.duration(t.duration),h.start(t.easing)}return o}function Gc(r,e,t){for(var i=0;i<t;i++)r[i]=e[i]}function jT(r){return et(r[0])}function ZT(r,e,t){if(et(e[t]))if(et(r[t])||(r[t]=[]),Ye(e[t])){var i=e[t].length;r[t].length!==i&&(r[t]=new e[t].constructor(i),Gc(r[t],e[t],i))}else{var n=e[t],o=r[t],a=n.length;if(jT(n))for(var s=n[0].length,l=0;l<a;l++)o[l]?Gc(o[l],n[l],s):o[l]=Array.prototype.slice.call(n[l]);else Gc(o,n,a);o.length=n.length}else r[t]=e[t]}function KT(r,e){return r===e||et(r)&&et(e)&&$T(r,e)}function $T(r,e){var t=r.length;if(t!==e.length)return!1;for(var i=0;i<t;i++)if(r[i]!==e[i])return!1;return!0}function Qg(r,e,t,i,n,o,a,s){for(var l=me(i),u=n.duration,f=n.delay,c=n.additive,p=n.setToFinal,h=!F(o),d=r.animators,g=[],v=0;v<l.length;v++){var m=l[v],y=i[m];if(y!=null&&t[m]!=null&&(h||o[m]))if(F(y)&&!et(y)&&!_i(y)){if(e){s||(t[m]=y,r.updateDuringAnimation(e));continue}Qg(r,m,t[m],y,n,o&&o[m],a,s)}else g.push(m);else s||(t[m]=y,r.updateDuringAnimation(e),g.push(m))}var _=g.length;if(!c&&_)for(var x=0;x<d.length;x++){var C=d[x];if(C.targetName===e){var w=C.stopTracks(g);if(w){var T=he(d,C);d.splice(T,1)}}}if(n.force||(g=Ue(g,function(M){return!KT(i[M],t[M])}),_=g.length),_>0||n.force&&!a.length){var D=void 0,b=void 0,E=void 0;if(s){b={},p&&(D={});for(var x=0;x<_;x++){var m=g[x];b[m]=t[m],p?D[m]=i[m]:t[m]=i[m]}}else if(p){E={};for(var x=0;x<_;x++){var m=g[x];E[m]=ba(t[m]),ZT(t,i,m)}}var C=new Da(t,!1,!1,c?Ue(d,function(R){return R.targetName===e}):null);C.targetName=e,n.scope&&(C.scope=n.scope),p&&D&&C.whenWithKeys(0,D,g),E&&C.whenWithKeys(0,E,g),C.whenWithKeys(u??500,s?b:i,g).delay(f||0),r.addAnimator(C,e),a.push(C)}}var Zl=Yc;var Jg=(function(r){J(e,r);function e(t){var i=r.call(this)||this;return i.isGroup=!0,i._children=[],i.attr(t),i}return e.prototype.childrenRef=function(){return this._children},e.prototype.children=function(){return this._children.slice()},e.prototype.childAt=function(t){return this._children[t]},e.prototype.childOfName=function(t){for(var i=this._children,n=0;n<i.length;n++)if(i[n].name===t)return i[n]},e.prototype.childCount=function(){return this._children.length},e.prototype.add=function(t){return t&&t!==this&&t.parent!==this&&(this._children.push(t),this._doAdd(t)),this},e.prototype.addBefore=function(t,i){if(t&&t!==this&&t.parent!==this&&i&&i.parent===this){var n=this._children,o=n.indexOf(i);o>=0&&(n.splice(o,0,t),this._doAdd(t))}return this},e.prototype.replace=function(t,i){var n=he(this._children,t);return n>=0&&this.replaceAt(i,n),this},e.prototype.replaceAt=function(t,i){var n=this._children,o=n[i];if(t&&t!==this&&t.parent!==this&&t!==o){n[i]=t,o.parent=null;var a=this.__zr;a&&o.removeSelfFromZr(a),this._doAdd(t)}return this},e.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var i=this.__zr;i&&i!==t.__zr&&t.addSelfToZr(i),i&&i.refresh()},e.prototype.remove=function(t){var i=this.__zr,n=this._children,o=he(n,t);return o<0?this:(n.splice(o,1),t.parent=null,i&&t.removeSelfFromZr(i),i&&i.refresh(),this)},e.prototype.removeAll=function(){for(var t=this._children,i=this.__zr,n=0;n<t.length;n++){var o=t[n];i&&o.removeSelfFromZr(i),o.parent=null}return t.length=0,this},e.prototype.eachChild=function(t,i){for(var n=this._children,o=0;o<n.length;o++){var a=n[o];t.call(i,a,o)}return this},e.prototype.traverse=function(t,i){for(var n=0;n<this._children.length;n++){var o=this._children[n],a=t.call(i,o);o.isGroup&&!a&&o.traverse(t,i)}return this},e.prototype.addSelfToZr=function(t){r.prototype.addSelfToZr.call(this,t);for(var i=0;i<this._children.length;i++){var n=this._children[i];n.addSelfToZr(t)}},e.prototype.removeSelfFromZr=function(t){r.prototype.removeSelfFromZr.call(this,t);for(var i=0;i<this._children.length;i++){var n=this._children[i];n.removeSelfFromZr(t)}},e.prototype.getBoundingRect=function(t){for(var i=new ue(0,0,0,0),n=t||this._children,o=[],a=null,s=0;s<n.length;s++){var l=n[s];if(!(l.ignore||l.invisible)){var u=l.getBoundingRect(),f=l.getLocalTransform(o);f?(ue.applyTransform(i,u,f),a=a||i.clone(),a.union(i)):(a=a||u.clone(),a.union(u))}}return a||i},e})(Zl);Jg.prototype.type="group";var wt=Jg;var QT=".",_n="___EC__COMPONENT__CONTAINER___",ey="___EC__EXTENDED_CLASS___";function Gt(r){var e={main:"",sub:""};if(r){var t=r.split(QT);e.main=t[0]||"",e.sub=t[1]||""}return e}function JT(r){_t(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(r),'componentType "'+r+'" illegal')}function ty(r){return!!(r&&r[ey])}function bo(r,e){r.$constructor=r,r.extend=function(t){var i=this,n;return eb(i)?n=(function(o){we(a,o);function a(){return o.apply(this,arguments)||this}return a})(i):(n=function(){(t.$constructor||i).apply(this,arguments)},xl(n,this)),P(n.prototype,t),n[ey]=!0,n.extend=this.extend,n.superCall=rb,n.superApply=ib,n.superClass=i,n}}function eb(r){return j(r)&&/^class\s/.test(Function.prototype.toString.call(r))}function Kl(r,e){r.extend=e.extend}var tb=Math.round(Math.random()*10);function ry(r){var e=["__\0is_clz",tb++].join("_");r.prototype[e]=!0,r.isInstance=function(t){return!!(t&&t[e])}}function rb(r,e){for(var t=[],i=2;i<arguments.length;i++)t[i-2]=arguments[i];return this.superClass.prototype[e].apply(r,t)}function ib(r,e,t){return this.superClass.prototype[e].apply(r,t)}function Mi(r){var e={};r.registerClass=function(i){var n=i.type||i.prototype.type;if(n){JT(n),i.prototype.type=n;var o=Gt(n);if(!o.sub)e[o.main]=i;else if(o.sub!==_n){var a=t(o);a[o.sub]=i}}return i},r.getClass=function(i,n,o){var a=e[i];if(a&&a[_n]&&(a=n?a[n]:null),o&&!a)throw new Error(n?"Component "+i+"."+(n||"")+" is used but not imported.":i+".type should be specified.");return a},r.getClassesByMainType=function(i){var n=Gt(i),o=[],a=e[n.main];return a&&a[_n]?S(a,function(s,l){l!==_n&&o.push(s)}):o.push(a),o},r.hasClass=function(i){var n=Gt(i);return!!e[n.main]},r.getAllClassMainTypes=function(){var i=[];return S(e,function(n,o){i.push(o)}),i},r.hasSubTypes=function(i){var n=Gt(i),o=e[n.main];return o&&o[_n]};function t(i){var n=e[i.main];return(!n||!n[_n])&&(n=e[i.main]={},n[_n]=!0),n}}function ut(r){throw new Error(r)}var nb=Math.round(Math.random()*10);function Ei(r){return[r||"",nb++].join("_")}function iy(r){var e={};r.registerSubTypeDefaulter=function(t,i){var n=Gt(t);e[n.main]=i},r.determineSubType=function(t,i){var n=i.type;if(!n){var o=Gt(t).main;r.hasSubTypes(t)&&e[o]&&(n=e[o](i))}return n}}function ny(r,e){r.topologicalTravel=function(o,a,s,l){if(!o.length)return;var u=t(a),f=u.graph,c=u.noEntryList,p={};for(S(o,function(y){p[y]=!0});c.length;){var h=c.pop(),d=f[h],g=!!p[h];g&&(s.call(l,h,d.originalDeps.slice()),delete p[h]),S(d.successor,g?m:v)}S(p,function(){var y="";throw new Error(y)});function v(y){f[y].entryCount--,f[y].entryCount===0&&c.push(y)}function m(y){p[y]=!0,v(y)}};function t(o){var a={},s=[];return S(o,function(l){var u=i(a,l),f=u.originalDeps=e(l),c=n(f,o);u.entryCount=c.length,u.entryCount===0&&s.push(l),S(c,function(p){he(u.predecessor,p)<0&&u.predecessor.push(p);var h=i(a,p);he(h.successor,p)<0&&h.successor.push(l)})}),{graph:a,noEntryList:s}}function i(o,a){return o[a]||(o[a]={predecessor:[],successor:[]}),o[a]}function n(o,a){var s=[];return S(o,function(l){he(a,l)>=0&&s.push(l)}),s}}var jc=(function(){function r(){this.group=new wt,this.uid=Ei("viewComponent")}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,i,n){},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,i,n){},r.prototype.updateLayout=function(e,t,i,n){},r.prototype.updateVisual=function(e,t,i,n){},r.prototype.toggleBlurSeries=function(e,t,i){},r.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},r})();bo(jc);Mi(jc);var rr=jc;function Fr(r,e){for(var t=0;t<r.length;t++)r[t][1]||(r[t][1]=r[t][0]);return e=e||!1,function(i,n,o){for(var a={},s=0;s<r.length;s++){var l=r[s][1];if(!(n&&he(n,l)>=0||o&&he(o,l)<0)){var u=i.getShallow(l,e);u!=null&&(a[r[s][0]]=u)}}return a}}var ob=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],ab=Fr(ob),oy=(function(){function r(){}return r.prototype.getAreaStyle=function(e,t){return ab(this,e,t)},r})();var Zc=new ei(50);function sy(r){if(typeof r=="string"){var e=Zc.get(r);return e&&e.image}else return r}function Kc(r,e,t,i,n){if(r)if(typeof r=="string"){if(e&&e.__zrImageSrc===r||!t)return e;var o=Zc.get(r),a={hostEl:t,cb:i,cbPayload:n};return o?(e=o.image,!Do(e)&&o.pending.push(a)):(e=tr.loadImage(r,ay,ay),e.__zrImageSrc=r,Zc.put(r,e.__cachedImgObj={image:e,pending:[a]})),e}else return r;else return e}function ay(){var r=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e<r.pending.length;e++){var t=r.pending[e],i=t.cb;i&&i(this,t.cbPayload),t.hostEl.dirty()}r.pending.length=0}function Do(r){return r&&r.width&&r.height}var $c=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function Jc(r,e,t,i,n){var o={};return uy(o,r,e,t,i,n),o.text}function uy(r,e,t,i,n,o){if(!t){r.text="",r.isTruncated=!1;return}var a=(e+"").split(`
|
|
3
|
+
`);o=fy(t,i,n,o);for(var s=!1,l={},u=0,f=a.length;u<f;u++)cy(l,a[u],o),a[u]=l.textLine,s=s||l.isTruncated;r.text=a.join(`
|
|
4
|
+
`),r.isTruncated=s}function fy(r,e,t,i){i=i||{};var n=P({},i);n.font=e,t=te(t,"..."),n.maxIterations=te(i.maxIterations,2);var o=n.minChar=te(i.minChar,0);n.cnCharWidth=Vt("\u56FD",e);var a=n.ascCharWidth=Vt("a",e);n.placeholder=te(i.placeholder,"");for(var s=r=Math.max(0,r-1),l=0;l<o&&s>=a;l++)s-=a;var u=Vt(t,e);return u>s&&(t="",u=0),s=r-u,n.ellipsis=t,n.ellipsisWidth=u,n.contentWidth=s,n.containerWidth=r,n}function cy(r,e,t){var i=t.containerWidth,n=t.font,o=t.contentWidth;if(!i){r.textLine="",r.isTruncated=!1;return}var a=Vt(e,n);if(a<=i){r.textLine=e,r.isTruncated=!1;return}for(var s=0;;s++){if(a<=o||s>=t.maxIterations){e+=t.ellipsis;break}var l=s===0?lb(e,o,t.ascCharWidth,t.cnCharWidth):a>0?Math.floor(e.length*o/a):0;e=e.substr(0,l),a=Vt(e,n)}e===""&&(e=t.placeholder),r.textLine=e,r.isTruncated=!0}function lb(r,e,t,i){for(var n=0,o=0,a=r.length;o<a&&n<e;o++){var s=r.charCodeAt(o);n+=0<=s&&s<=127?t:i}return o}function hy(r,e){r!=null&&(r+="");var t=e.overflow,i=e.padding,n=e.font,o=t==="truncate",a=Xl(n),s=te(e.lineHeight,a),l=!!e.backgroundColor,u=e.lineOverflow==="truncate",f=!1,c=e.width,p;c!=null&&(t==="break"||t==="breakAll")?p=r?dy(r,e.font,c,t==="breakAll",0).lines:[]:p=r?r.split(`
|
|
5
|
+
`):[];var h=p.length*s,d=te(e.height,h);if(h>d&&u){var g=Math.floor(d/s);f=f||p.length>g,p=p.slice(0,g)}if(r&&o&&c!=null)for(var v=fy(c,n,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),m={},y=0;y<p.length;y++)cy(m,p[y],v),p[y]=m.textLine,f=f||m.isTruncated;for(var _=d,x=0,y=0;y<p.length;y++)x=Math.max(Vt(p[y],n),x);c==null&&(c=x);var C=x;return i&&(_+=i[0]+i[2],C+=i[1]+i[3],c+=i[1]+i[3]),l&&(C=c),{lines:p,height:d,outerWidth:C,outerHeight:_,lineHeight:s,calculatedLineHeight:a,contentWidth:x,contentHeight:h,width:c,isTruncated:f}}var ub=(function(){function r(){}return r})(),ly=(function(){function r(e){this.tokens=[],e&&(this.tokens=e)}return r})(),fb=(function(){function r(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1}return r})();function py(r,e){var t=new fb;if(r!=null&&(r+=""),!r)return t;for(var i=e.width,n=e.height,o=e.overflow,a=(o==="break"||o==="breakAll")&&i!=null?{width:i,accumWidth:0,breakAll:o==="breakAll"}:null,s=$c.lastIndex=0,l;(l=$c.exec(r))!=null;){var u=l.index;u>s&&Qc(t,r.substring(s,u),e,a),Qc(t,l[2],e,a,l[1]),s=$c.lastIndex}s<r.length&&Qc(t,r.substring(s,r.length),e,a);var f=[],c=0,p=0,h=e.padding,d=o==="truncate",g=e.lineOverflow==="truncate",v={};function m(Me,Ve,Ae){Me.width=Ve,Me.lineHeight=Ae,c+=Ae,p=Math.max(p,Ve)}e:for(var y=0;y<t.lines.length;y++){for(var _=t.lines[y],x=0,C=0,w=0;w<_.tokens.length;w++){var T=_.tokens[w],D=T.styleName&&e.rich[T.styleName]||{},b=T.textPadding=D.padding,E=b?b[1]+b[3]:0,M=T.font=D.font||e.font;T.contentHeight=Xl(M);var R=te(D.height,T.contentHeight);if(T.innerHeight=R,b&&(R+=b[0]+b[2]),T.height=R,T.lineHeight=nn(D.lineHeight,e.lineHeight,R),T.align=D&&D.align||e.align,T.verticalAlign=D&&D.verticalAlign||"middle",g&&n!=null&&c+T.lineHeight>n){var O=t.lines.length;w>0?(_.tokens=_.tokens.slice(0,w),m(_,C,x),t.lines=t.lines.slice(0,y+1)):t.lines=t.lines.slice(0,y),t.isTruncated=t.isTruncated||t.lines.length<O;break e}var I=D.width,W=I==null||I==="auto";if(typeof I=="string"&&I.charAt(I.length-1)==="%")T.percentWidth=I,f.push(T),T.contentWidth=Vt(T.text,M);else{if(W){var U=D.backgroundColor,de=U&&U.image;de&&(de=sy(de),Do(de)&&(T.width=Math.max(T.width,de.width*R/de.height)))}var fe=d&&i!=null?i-C:null;fe!=null&&fe<T.width?!W||fe<E?(T.text="",T.width=T.contentWidth=0):(uy(v,T.text,fe-E,M,e.ellipsis,{minChar:e.truncateMinChar}),T.text=v.text,t.isTruncated=t.isTruncated||v.isTruncated,T.width=T.contentWidth=Vt(T.text,M)):T.contentWidth=Vt(T.text,M)}T.width+=E,C+=T.width,D&&(x=Math.max(x,T.lineHeight))}m(_,C,x)}t.outerWidth=t.width=te(i,p),t.outerHeight=t.height=te(n,c),t.contentHeight=c,t.contentWidth=p,h&&(t.outerWidth+=h[1]+h[3],t.outerHeight+=h[0]+h[2]);for(var y=0;y<f.length;y++){var T=f[y],ae=T.percentWidth;T.width=parseInt(ae,10)/100*t.width}return t}function Qc(r,e,t,i,n){var o=e==="",a=n&&t.rich[n]||{},s=r.lines,l=a.font||t.font,u=!1,f,c;if(i){var p=a.padding,h=p?p[1]+p[3]:0;if(a.width!=null&&a.width!=="auto"){var d=zr(a.width,i.width)+h;s.length>0&&d+i.accumWidth>i.width&&(f=e.split(`
|
|
6
|
+
`),u=!0),i.accumWidth=d}else{var g=dy(e,l,i.width,i.breakAll,i.accumWidth);i.accumWidth=g.accumWidth+h,c=g.linesWidths,f=g.lines}}else f=e.split(`
|
|
7
|
+
`);for(var v=0;v<f.length;v++){var m=f[v],y=new ub;if(y.styleName=n,y.text=m,y.isLineHolder=!m&&!o,typeof a.width=="number"?y.width=a.width:y.width=c?c[v]:Vt(m,l),!v&&!u){var _=(s[s.length-1]||(s[0]=new ly)).tokens,x=_.length;x===1&&_[0].isLineHolder?_[0]=y:(m||!x||o)&&_.push(y)}else s.push(new ly([y]))}}function cb(r){var e=r.charCodeAt(0);return e>=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}var hb=Nt(",&?/;] ".split(""),function(r,e){return r[e]=!0,r},{});function pb(r){return cb(r)?!!hb[r]:!0}function dy(r,e,t,i,n){for(var o=[],a=[],s="",l="",u=0,f=0,c=0;c<r.length;c++){var p=r.charAt(c);if(p===`
|
|
8
|
+
`){l&&(s+=l,f+=u),o.push(s),a.push(f),s="",l="",u=0,f=0;continue}var h=Vt(p,e),d=i?!1:!pb(p);if(o.length?f+h>t:n+f+h>t){f?(s||l)&&(d?(s||(s=l,l="",u=0,f=u),o.push(s),a.push(f-u),l+=p,u+=h,s="",f=u):(l&&(s+=l,l="",u=0),o.push(s),a.push(f),s=p,f=h)):d?(o.push(l),a.push(u),l=p,u=h):(o.push(p),a.push(h));continue}f+=h,d?(l+=p,u+=h):(l&&(s+=l,l="",u=0),s+=p)}return!o.length&&!s&&(s=r,l="",u=0),l&&(s+=l),s&&(o.push(s),a.push(f)),o.length===1&&(f+=n),{accumWidth:f,lines:o,linesWidths:a}}var rh="__zr_style_"+Math.round(Math.random()*10),Br={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},xn={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Br[rh]=!0;var vy=["z","z2","invisible"],db=["invisible"],vb=(function(r){J(e,r);function e(t){return r.call(this,t)||this}return e.prototype._init=function(t){for(var i=me(t),n=0;n<i.length;n++){var o=i[n];o==="style"?this.useStyle(t[o]):r.prototype.attrKV.call(this,o,t[o])}this.style||this.useStyle({})},e.prototype.beforeBrush=function(){},e.prototype.afterBrush=function(){},e.prototype.innerBeforeBrush=function(){},e.prototype.innerAfterBrush=function(){},e.prototype.shouldBePainted=function(t,i,n,o){var a=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&mb(this,t,i)||a&&!a[0]&&!a[3])return!1;if(n&&this.__clipPaths){for(var s=0;s<this.__clipPaths.length;++s)if(this.__clipPaths[s].isZeroArea())return!1}if(o&&this.parent)for(var l=this.parent;l;){if(l.ignore)return!1;l=l.parent}return!0},e.prototype.contain=function(t,i){return this.rectContain(t,i)},e.prototype.traverse=function(t,i){t.call(i,this)},e.prototype.rectContain=function(t,i){var n=this.transformCoordToLocal(t,i),o=this.getBoundingRect();return o.contain(n[0],n[1])},e.prototype.getPaintRect=function(){var t=this._paintRect;if(!this._paintRect||this.__dirty){var i=this.transform,n=this.getBoundingRect(),o=this.style,a=o.shadowBlur||0,s=o.shadowOffsetX||0,l=o.shadowOffsetY||0;t=this._paintRect||(this._paintRect=new ue(0,0,0,0)),i?ue.applyTransform(t,n,i):t.copy(n),(a||s||l)&&(t.width+=a*2+Math.abs(s),t.height+=a*2+Math.abs(l),t.x=Math.min(t.x,t.x+s-a),t.y=Math.min(t.y,t.y+l-a));var u=this.dirtyRectTolerance;t.isZero()||(t.x=Math.floor(t.x-u),t.y=Math.floor(t.y-u),t.width=Math.ceil(t.width+1+u*2),t.height=Math.ceil(t.height+1+u*2))}return t},e.prototype.setPrevPaintRect=function(t){t?(this._prevPaintRect=this._prevPaintRect||new ue(0,0,0,0),this._prevPaintRect.copy(t)):this._prevPaintRect=null},e.prototype.getPrevPaintRect=function(){return this._prevPaintRect},e.prototype.animateStyle=function(t){return this.animate("style",t)},e.prototype.updateDuringAnimation=function(t){t==="style"?this.dirtyStyle():this.markRedraw()},e.prototype.attrKV=function(t,i){t!=="style"?r.prototype.attrKV.call(this,t,i):this.style?this.setStyle(i):this.useStyle(i)},e.prototype.setStyle=function(t,i){return typeof t=="string"?this.style[t]=i:P(this.style,t),this.dirtyStyle(),this},e.prototype.dirtyStyle=function(t){t||this.markRedraw(),this.__dirty|=yn,this._rect&&(this._rect=null)},e.prototype.dirty=function(){this.dirtyStyle()},e.prototype.styleChanged=function(){return!!(this.__dirty&yn)},e.prototype.styleUpdated=function(){this.__dirty&=~yn},e.prototype.createStyle=function(t){return xi(Br,t)},e.prototype.useStyle=function(t){t[rh]||(t=this.createStyle(t)),this.__inHover?this.__hoverStyle=t:this.style=t,this.dirtyStyle()},e.prototype.isStyleObject=function(t){return t[rh]},e.prototype._innerSaveToNormal=function(t){r.prototype._innerSaveToNormal.call(this,t);var i=this._normalState;t.style&&!i.style&&(i.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(t,i,vy)},e.prototype._applyStateObj=function(t,i,n,o,a,s){r.prototype._applyStateObj.call(this,t,i,n,o,a,s);var l=!(i&&o),u;if(i&&i.style?a?o?u=i.style:(u=this._mergeStyle(this.createStyle(),n.style),this._mergeStyle(u,i.style)):(u=this._mergeStyle(this.createStyle(),o?this.style:n.style),this._mergeStyle(u,i.style)):l&&(u=n.style),u)if(a){var f=this.style;if(this.style=this.createStyle(l?{}:f),l)for(var c=me(f),p=0;p<c.length;p++){var h=c[p];h in u&&(u[h]=u[h],this.style[h]=f[h])}for(var d=me(u),p=0;p<d.length;p++){var h=d[p];this.style[h]=this.style[h]}this._transitionState(t,{style:u},s,this.getAnimationStyleProps())}else this.useStyle(u);for(var g=this.__inHover?db:vy,p=0;p<g.length;p++){var h=g[p];i&&i[h]!=null?this[h]=i[h]:l&&n[h]!=null&&(this[h]=n[h])}},e.prototype._mergeStates=function(t){for(var i=r.prototype._mergeStates.call(this,t),n,o=0;o<t.length;o++){var a=t[o];a.style&&(n=n||{},this._mergeStyle(n,a.style))}return n&&(i.style=n),i},e.prototype._mergeStyle=function(t,i){return P(t,i),t},e.prototype.getAnimationStyleProps=function(){return xn},e.initDefaultProps=(function(){var t=e.prototype;t.type="displayable",t.invisible=!1,t.z=0,t.z2=0,t.zlevel=0,t.culling=!1,t.cursor="pointer",t.rectHover=!1,t.incremental=!1,t._rect=null,t.dirtyRectTolerance=0,t.__dirty=tt|yn})(),e})(Zl),eh=new ue(0,0,0,0),th=new ue(0,0,0,0);function mb(r,e,t){return eh.copy(r.getBoundingRect()),r.transform&&eh.applyTransform(r.transform),th.width=e,th.height=t,!eh.intersect(th)}var Wr=vb;var hr=Math.min,pr=Math.max,ih=Math.sin,nh=Math.cos,Sn=Math.PI*2,$l=Si(),Ql=Si(),Jl=Si();function oh(r,e,t,i,n,o){n[0]=hr(r,t),n[1]=hr(e,i),o[0]=pr(r,t),o[1]=pr(e,i)}var my=[],gy=[];function yy(r,e,t,i,n,o,a,s,l,u){var f=Pl,c=Ze,p=f(r,t,n,a,my);l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0;for(var h=0;h<p;h++){var d=c(r,t,n,a,my[h]);l[0]=hr(d,l[0]),u[0]=pr(d,u[0])}p=f(e,i,o,s,gy);for(var h=0;h<p;h++){var g=c(e,i,o,s,gy[h]);l[1]=hr(g,l[1]),u[1]=pr(g,u[1])}l[0]=hr(r,l[0]),u[0]=pr(r,u[0]),l[0]=hr(a,l[0]),u[0]=pr(a,u[0]),l[1]=hr(e,l[1]),u[1]=pr(e,u[1]),l[1]=hr(s,l[1]),u[1]=pr(s,u[1])}function _y(r,e,t,i,n,o,a,s){var l=Nl,u=nt,f=pr(hr(l(r,t,n),1),0),c=pr(hr(l(e,i,o),1),0),p=u(r,t,n,f),h=u(e,i,o,c);a[0]=hr(r,n,p),a[1]=hr(e,o,h),s[0]=pr(r,n,p),s[1]=pr(e,o,h)}function xy(r,e,t,i,n,o,a,s,l){var u=Qr,f=Jr,c=Math.abs(n-o);if(c%Sn<1e-4&&c>1e-4){s[0]=r-t,s[1]=e-i,l[0]=r+t,l[1]=e+i;return}if($l[0]=nh(n)*t+r,$l[1]=ih(n)*i+e,Ql[0]=nh(o)*t+r,Ql[1]=ih(o)*i+e,u(s,$l,Ql),f(l,$l,Ql),n=n%Sn,n<0&&(n=n+Sn),o=o%Sn,o<0&&(o=o+Sn),n>o&&!a?o+=Sn:n<o&&a&&(n+=Sn),a){var p=o;o=n,n=p}for(var h=0;h<o;h+=Math.PI/2)h>n&&(Jl[0]=nh(h)*t+r,Jl[1]=ih(h)*i+e,u(s,Jl,s),f(l,Jl,l))}var ke={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},wn=[],Cn=[],Ur=[],Ri=[],Hr=[],Vr=[],ah=Math.min,sh=Math.max,Tn=Math.cos,bn=Math.sin,ri=Math.abs,fh=Math.PI,Oi=fh*2,lh=typeof Float32Array<"u",Aa=[];function uh(r){var e=Math.round(r/fh*1e8)/1e8;return e%2*fh}function gb(r,e){var t=uh(r[0]);t<0&&(t+=Oi);var i=t-r[0],n=r[1];n+=i,!e&&n-t>=Oi?n=t+Oi:e&&t-n>=Oi?n=t-Oi:!e&&t>n?n=t+(Oi-uh(t-n)):e&&t<n&&(n=t-(Oi-uh(n-t))),r[0]=t,r[1]=n}var yb=(function(){function r(e){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,e&&(this._saveData=!1),this._saveData&&(this.data=[])}return r.prototype.increaseVersion=function(){this._version++},r.prototype.getVersion=function(){return this._version},r.prototype.setScale=function(e,t,i){i=i||0,i>0&&(this._ux=ri(i/gn/e)||0,this._uy=ri(i/gn/t)||0)},r.prototype.setDPR=function(e){this.dpr=e},r.prototype.setContext=function(e){this._ctx=e},r.prototype.getContext=function(){return this._ctx},r.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},r.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},r.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(ke.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},r.prototype.lineTo=function(e,t){var i=ri(e-this._xi),n=ri(t-this._yi),o=i>this._ux||n>this._uy;if(this.addData(ke.L,e,t),this._ctx&&o&&this._ctx.lineTo(e,t),o)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var a=i*i+n*n;a>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=a)}return this},r.prototype.bezierCurveTo=function(e,t,i,n,o,a){return this._drawPendingPt(),this.addData(ke.C,e,t,i,n,o,a),this._ctx&&this._ctx.bezierCurveTo(e,t,i,n,o,a),this._xi=o,this._yi=a,this},r.prototype.quadraticCurveTo=function(e,t,i,n){return this._drawPendingPt(),this.addData(ke.Q,e,t,i,n),this._ctx&&this._ctx.quadraticCurveTo(e,t,i,n),this._xi=i,this._yi=n,this},r.prototype.arc=function(e,t,i,n,o,a){this._drawPendingPt(),Aa[0]=n,Aa[1]=o,gb(Aa,a),n=Aa[0],o=Aa[1];var s=o-n;return this.addData(ke.A,e,t,i,i,n,s,0,a?0:1),this._ctx&&this._ctx.arc(e,t,i,n,o,a),this._xi=Tn(o)*i+e,this._yi=bn(o)*i+t,this},r.prototype.arcTo=function(e,t,i,n,o){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,i,n,o),this},r.prototype.rect=function(e,t,i,n){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,i,n),this.addData(ke.R,e,t,i,n),this},r.prototype.closePath=function(){this._drawPendingPt(),this.addData(ke.Z);var e=this._ctx,t=this._x0,i=this._y0;return e&&e.closePath(),this._xi=t,this._yi=i,this},r.prototype.fill=function(e){e&&e.fill(),this.toStatic()},r.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},r.prototype.len=function(){return this._len},r.prototype.setData=function(e){var t=e.length;!(this.data&&this.data.length===t)&&lh&&(this.data=new Float32Array(t));for(var i=0;i<t;i++)this.data[i]=e[i];this._len=t},r.prototype.appendPath=function(e){e instanceof Array||(e=[e]);for(var t=e.length,i=0,n=this._len,o=0;o<t;o++)i+=e[o].len();lh&&this.data instanceof Float32Array&&(this.data=new Float32Array(n+i));for(var o=0;o<t;o++)for(var a=e[o].data,s=0;s<a.length;s++)this.data[n++]=a[s];this._len=n},r.prototype.addData=function(e,t,i,n,o,a,s,l,u){if(this._saveData){var f=this.data;this._len+arguments.length>f.length&&(this._expandData(),f=this.data);for(var c=0;c<arguments.length;c++)f[this._len++]=arguments[c]}},r.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},r.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t<this._len;t++)e[t]=this.data[t];this.data=e}},r.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var e=this.data;e instanceof Array&&(e.length=this._len,lh&&this._len>11&&(this.data=new Float32Array(e)))}},r.prototype.getBoundingRect=function(){Ur[0]=Ur[1]=Hr[0]=Hr[1]=Number.MAX_VALUE,Ri[0]=Ri[1]=Vr[0]=Vr[1]=-Number.MAX_VALUE;var e=this.data,t=0,i=0,n=0,o=0,a;for(a=0;a<this._len;){var s=e[a++],l=a===1;switch(l&&(t=e[a],i=e[a+1],n=t,o=i),s){case ke.M:t=n=e[a++],i=o=e[a++],Hr[0]=n,Hr[1]=o,Vr[0]=n,Vr[1]=o;break;case ke.L:oh(t,i,e[a],e[a+1],Hr,Vr),t=e[a++],i=e[a++];break;case ke.C:yy(t,i,e[a++],e[a++],e[a++],e[a++],e[a],e[a+1],Hr,Vr),t=e[a++],i=e[a++];break;case ke.Q:_y(t,i,e[a++],e[a++],e[a],e[a+1],Hr,Vr),t=e[a++],i=e[a++];break;case ke.A:var u=e[a++],f=e[a++],c=e[a++],p=e[a++],h=e[a++],d=e[a++]+h;a+=1;var g=!e[a++];l&&(n=Tn(h)*c+u,o=bn(h)*p+f),xy(u,f,c,p,h,d,g,Hr,Vr),t=Tn(d)*c+u,i=bn(d)*p+f;break;case ke.R:n=t=e[a++],o=i=e[a++];var v=e[a++],m=e[a++];oh(n,o,n+v,o+m,Hr,Vr);break;case ke.Z:t=n,i=o;break}Qr(Ur,Ur,Hr),Jr(Ri,Ri,Vr)}return a===0&&(Ur[0]=Ur[1]=Ri[0]=Ri[1]=0),new ue(Ur[0],Ur[1],Ri[0]-Ur[0],Ri[1]-Ur[1])},r.prototype._calculateLength=function(){var e=this.data,t=this._len,i=this._ux,n=this._uy,o=0,a=0,s=0,l=0;this._pathSegLen||(this._pathSegLen=[]);for(var u=this._pathSegLen,f=0,c=0,p=0;p<t;){var h=e[p++],d=p===1;d&&(o=e[p],a=e[p+1],s=o,l=a);var g=-1;switch(h){case ke.M:o=s=e[p++],a=l=e[p++];break;case ke.L:{var v=e[p++],m=e[p++],y=v-o,_=m-a;(ri(y)>i||ri(_)>n||p===t-1)&&(g=Math.sqrt(y*y+_*_),o=v,a=m);break}case ke.C:{var x=e[p++],C=e[p++],v=e[p++],m=e[p++],w=e[p++],T=e[p++];g=Ig(o,a,x,C,v,m,w,T,10),o=w,a=T;break}case ke.Q:{var x=e[p++],C=e[p++],v=e[p++],m=e[p++];g=Pg(o,a,x,C,v,m,10),o=v,a=m;break}case ke.A:var D=e[p++],b=e[p++],E=e[p++],M=e[p++],R=e[p++],O=e[p++],I=O+R;p+=1,d&&(s=Tn(R)*E+D,l=bn(R)*M+b),g=sh(E,M)*ah(Oi,Math.abs(O)),o=Tn(I)*E+D,a=bn(I)*M+b;break;case ke.R:{s=o=e[p++],l=a=e[p++];var W=e[p++],U=e[p++];g=W*2+U*2;break}case ke.Z:{var y=s-o,_=l-a;g=Math.sqrt(y*y+_*_),o=s,a=l;break}}g>=0&&(u[c++]=g,f+=g)}return this._pathLen=f,f},r.prototype.rebuildPath=function(e,t){var i=this.data,n=this._ux,o=this._uy,a=this._len,s,l,u,f,c,p,h=t<1,d,g,v=0,m=0,y,_=0,x,C;if(!(h&&(this._pathSegLen||this._calculateLength(),d=this._pathSegLen,g=this._pathLen,y=t*g,!y)))e:for(var w=0;w<a;){var T=i[w++],D=w===1;switch(D&&(u=i[w],f=i[w+1],s=u,l=f),T!==ke.L&&_>0&&(e.lineTo(x,C),_=0),T){case ke.M:s=u=i[w++],l=f=i[w++],e.moveTo(u,f);break;case ke.L:{c=i[w++],p=i[w++];var b=ri(c-u),E=ri(p-f);if(b>n||E>o){if(h){var M=d[m++];if(v+M>y){var R=(y-v)/M;e.lineTo(u*(1-R)+c*R,f*(1-R)+p*R);break e}v+=M}e.lineTo(c,p),u=c,f=p,_=0}else{var O=b*b+E*E;O>_&&(x=c,C=p,_=O)}break}case ke.C:{var I=i[w++],W=i[w++],U=i[w++],de=i[w++],fe=i[w++],ae=i[w++];if(h){var M=d[m++];if(v+M>y){var R=(y-v)/M;_o(u,I,U,fe,R,wn),_o(f,W,de,ae,R,Cn),e.bezierCurveTo(wn[1],Cn[1],wn[2],Cn[2],wn[3],Cn[3]);break e}v+=M}e.bezierCurveTo(I,W,U,de,fe,ae),u=fe,f=ae;break}case ke.Q:{var I=i[w++],W=i[w++],U=i[w++],de=i[w++];if(h){var M=d[m++];if(v+M>y){var R=(y-v)/M;xo(u,I,U,R,wn),xo(f,W,de,R,Cn),e.quadraticCurveTo(wn[1],Cn[1],wn[2],Cn[2]);break e}v+=M}e.quadraticCurveTo(I,W,U,de),u=U,f=de;break}case ke.A:var Me=i[w++],Ve=i[w++],Ae=i[w++],At=i[w++],ne=i[w++],A=i[w++],H=i[w++],V=!i[w++],se=Ae>At?Ae:At,K=ri(Ae-At)>.001,oe=ne+A,k=!1;if(h){var M=d[m++];v+M>y&&(oe=ne+A*(y-v)/M,k=!0),v+=M}if(K&&e.ellipse?e.ellipse(Me,Ve,Ae,At,H,ne,oe,V):e.arc(Me,Ve,se,ne,oe,V),k)break e;D&&(s=Tn(ne)*Ae+Me,l=bn(ne)*At+Ve),u=Tn(oe)*Ae+Me,f=bn(oe)*At+Ve;break;case ke.R:s=u=i[w],l=f=i[w+1],c=i[w++],p=i[w++];var G=i[w++],Oe=i[w++];if(h){var M=d[m++];if(v+M>y){var ee=y-v;e.moveTo(c,p),e.lineTo(c+ah(ee,G),p),ee-=G,ee>0&&e.lineTo(c+G,p+ah(ee,Oe)),ee-=Oe,ee>0&&e.lineTo(c+sh(G-ee,0),p+Oe),ee-=G,ee>0&&e.lineTo(c,p+sh(Oe-ee,0));break e}v+=M}e.rect(c,p,G,Oe);break;case ke.Z:if(h){var M=d[m++];if(v+M>y){var R=(y-v)/M;e.lineTo(u*(1-R)+s*R,f*(1-R)+l*R);break e}v+=M}e.closePath(),u=s,f=l}}},r.prototype.clone=function(){var e=new r,t=this.data;return e.data=t.slice?t.slice():Array.prototype.slice.call(t),e._len=this._len,e},r.CMD=ke,r.initDefaultProps=(function(){var e=r.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0})(),r})(),ir=yb;function Dn(r,e,t,i,n,o,a){if(n===0)return!1;var s=n,l=0,u=r;if(a>e+s&&a>i+s||a<e-s&&a<i-s||o>r+s&&o>t+s||o<r-s&&o<t-s)return!1;if(r!==t)l=(e-i)/(r-t),u=(r*i-t*e)/(r-t);else return Math.abs(o-r)<=s/2;var f=l*o-a+u,c=f*f/(l*l+1);return c<=s/2*s/2}function Sy(r,e,t,i,n,o,a,s,l,u,f){if(l===0)return!1;var c=l;if(f>e+c&&f>i+c&&f>o+c&&f>s+c||f<e-c&&f<i-c&&f<o-c&&f<s-c||u>r+c&&u>t+c&&u>n+c&&u>a+c||u<r-c&&u<t-c&&u<n-c&&u<a-c)return!1;var p=Ll(r,e,t,i,n,o,a,s,u,f,null);return p<=c/2}function wy(r,e,t,i,n,o,a,s,l){if(a===0)return!1;var u=a;if(l>e+u&&l>i+u&&l>o+u||l<e-u&&l<i-u&&l<o-u||s>r+u&&s>t+u&&s>n+u||s<r-u&&s<t-u&&s<n-u)return!1;var f=kl(r,e,t,i,n,o,s,l,null);return f<=u/2}var Cy=Math.PI*2;function dr(r){return r%=Cy,r<0&&(r+=Cy),r}var Pa=Math.PI*2;function Ty(r,e,t,i,n,o,a,s,l){if(a===0)return!1;var u=a;s-=r,l-=e;var f=Math.sqrt(s*s+l*l);if(f-u>t||f+u<t)return!1;if(Math.abs(i-n)%Pa<1e-4)return!0;if(o){var c=i;i=dr(n),n=dr(c)}else i=dr(i),n=dr(n);i>n&&(n+=Pa);var p=Math.atan2(l,s);return p<0&&(p+=Pa),p>=i&&p<=n||p+Pa>=i&&p+Pa<=n}function ii(r,e,t,i,n,o){if(o>e&&o>i||o<e&&o<i||i===e)return 0;var a=(o-e)/(i-e),s=i<e?1:-1;(a===1||a===0)&&(s=i<e?.5:-.5);var l=a*(t-r)+r;return l===n?1/0:l>n?s:0}var Ii=ir.CMD,Mn=Math.PI*2,Cb=1e-4;function Tb(r,e){return Math.abs(r-e)<Cb}var kt=[-1,-1,-1],vr=[-1,-1];function bb(){var r=vr[0];vr[0]=vr[1],vr[1]=r}function Db(r,e,t,i,n,o,a,s,l,u){if(u>e&&u>i&&u>o&&u>s||u<e&&u<i&&u<o&&u<s)return 0;var f=Al(e,i,o,s,u,kt);if(f===0)return 0;for(var c=0,p=-1,h=void 0,d=void 0,g=0;g<f;g++){var v=kt[g],m=v===0||v===1?.5:1,y=Ze(r,t,n,a,v);y<l||(p<0&&(p=Pl(e,i,o,s,vr),vr[1]<vr[0]&&p>1&&bb(),h=Ze(e,i,o,s,vr[0]),p>1&&(d=Ze(e,i,o,s,vr[1]))),p===2?v<vr[0]?c+=h<e?m:-m:v<vr[1]?c+=d<h?m:-m:c+=s<d?m:-m:v<vr[0]?c+=h<e?m:-m:c+=s<h?m:-m)}return c}function Mb(r,e,t,i,n,o,a,s){if(s>e&&s>i&&s>o||s<e&&s<i&&s<o)return 0;var l=Ag(e,i,o,s,kt);if(l===0)return 0;var u=Nl(e,i,o);if(u>=0&&u<=1){for(var f=0,c=nt(e,i,o,u),p=0;p<l;p++){var h=kt[p]===0||kt[p]===1?.5:1,d=nt(r,t,n,kt[p]);d<a||(kt[p]<u?f+=c<e?h:-h:f+=o<c?h:-h)}return f}else{var h=kt[0]===0||kt[0]===1?.5:1,d=nt(r,t,n,kt[0]);return d<a?0:o<e?h:-h}}function Eb(r,e,t,i,n,o,a,s){if(s-=e,s>t||s<-t)return 0;var l=Math.sqrt(t*t-s*s);kt[0]=-l,kt[1]=l;var u=Math.abs(i-n);if(u<1e-4)return 0;if(u>=Mn-1e-4){i=0,n=Mn;var f=o?1:-1;return a>=kt[0]+r&&a<=kt[1]+r?f:0}if(i>n){var c=i;i=n,n=c}i<0&&(i+=Mn,n+=Mn);for(var p=0,h=0;h<2;h++){var d=kt[h];if(d+r>a){var g=Math.atan2(s,d),f=o?1:-1;g<0&&(g=Mn+g),(g>=i&&g<=n||g+Mn>=i&&g+Mn<=n)&&(g>Math.PI/2&&g<Math.PI*1.5&&(f=-f),p+=f)}}return p}function by(r,e,t,i,n){for(var o=r.data,a=r.len(),s=0,l=0,u=0,f=0,c=0,p,h,d=0;d<a;){var g=o[d++],v=d===1;switch(g===Ii.M&&d>1&&(t||(s+=ii(l,u,f,c,i,n))),v&&(l=o[d],u=o[d+1],f=l,c=u),g){case Ii.M:f=o[d++],c=o[d++],l=f,u=c;break;case Ii.L:if(t){if(Dn(l,u,o[d],o[d+1],e,i,n))return!0}else s+=ii(l,u,o[d],o[d+1],i,n)||0;l=o[d++],u=o[d++];break;case Ii.C:if(t){if(Sy(l,u,o[d++],o[d++],o[d++],o[d++],o[d],o[d+1],e,i,n))return!0}else s+=Db(l,u,o[d++],o[d++],o[d++],o[d++],o[d],o[d+1],i,n)||0;l=o[d++],u=o[d++];break;case Ii.Q:if(t){if(wy(l,u,o[d++],o[d++],o[d],o[d+1],e,i,n))return!0}else s+=Mb(l,u,o[d++],o[d++],o[d],o[d+1],i,n)||0;l=o[d++],u=o[d++];break;case Ii.A:var m=o[d++],y=o[d++],_=o[d++],x=o[d++],C=o[d++],w=o[d++];d+=1;var T=!!(1-o[d++]);p=Math.cos(C)*_+m,h=Math.sin(C)*x+y,v?(f=p,c=h):s+=ii(l,u,p,h,i,n);var D=(i-m)*x/_+m;if(t){if(Ty(m,y,x,C,C+w,T,e,D,n))return!0}else s+=Eb(m,y,x,C,C+w,T,D,n);l=Math.cos(C+w)*_+m,u=Math.sin(C+w)*x+y;break;case Ii.R:f=l=o[d++],c=u=o[d++];var b=o[d++],E=o[d++];if(p=f+b,h=c+E,t){if(Dn(f,c,p,c,e,i,n)||Dn(p,c,p,h,e,i,n)||Dn(p,h,f,h,e,i,n)||Dn(f,h,f,c,e,i,n))return!0}else s+=ii(p,c,p,h,i,n),s+=ii(f,h,f,c,i,n);break;case Ii.Z:if(t){if(Dn(l,u,f,c,e,i,n))return!0}else s+=ii(l,u,f,c,i,n);l=f,u=c;break}}return!t&&!Tb(u,c)&&(s+=ii(l,u,f,c,i,n)||0),s!==0}function Dy(r,e,t){return by(r,0,!1,e,t)}function My(r,e,t,i){return by(r,e,!0,t,i)}var hh=ce({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Br),Ob={style:ce({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},xn.style)},ch=fn.concat(["invisible","culling","z","z2","zlevel","parent"]),Ib=(function(r){J(e,r);function e(t){return r.call(this,t)||this}return e.prototype.update=function(){var t=this;r.prototype.update.call(this);var i=this.style;if(i.decal){var n=this._decalEl=this._decalEl||new e;n.buildPath===e.prototype.buildPath&&(n.buildPath=function(l){t.buildPath(l,t.shape)}),n.silent=!0;var o=n.style;for(var a in i)o[a]!==i[a]&&(o[a]=i[a]);o.fill=i.fill?i.decal:null,o.decal=null,o.shadowColor=null,i.strokeFirst&&(o.stroke=null);for(var s=0;s<ch.length;++s)n[ch[s]]=this[ch[s]];n.__dirty|=tt}else this._decalEl&&(this._decalEl=null)},e.prototype.getDecalElement=function(){return this._decalEl},e.prototype._init=function(t){var i=me(t);this.shape=this.getDefaultShape();var n=this.getDefaultStyle();n&&this.useStyle(n);for(var o=0;o<i.length;o++){var a=i[o],s=t[a];a==="style"?this.style?P(this.style,s):this.useStyle(s):a==="shape"?P(this.shape,s):r.prototype.attrKV.call(this,a,s)}this.style||this.useStyle({})},e.prototype.getDefaultStyle=function(){return null},e.prototype.getDefaultShape=function(){return{}},e.prototype.canBeInsideText=function(){return this.hasFill()},e.prototype.getInsideTextFill=function(){var t=this.style.fill;if(t!=="none"){if(N(t)){var i=wo(t,0);return i>.5?Oa:i>.2?$g:Ia}else if(t)return Ia}return Oa},e.prototype.getInsideTextStroke=function(t){var i=this.style.fill;if(N(i)){var n=this.__zr,o=!!(n&&n.isDarkMode()),a=wo(t,0)<Ra;if(o===a)return i}},e.prototype.buildPath=function(t,i,n){},e.prototype.pathUpdated=function(){this.__dirty&=~Di},e.prototype.getUpdatedPathProxy=function(t){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,t),this.path},e.prototype.createPathProxy=function(){this.path=new ir(!1)},e.prototype.hasStroke=function(){var t=this.style,i=t.stroke;return!(i==null||i==="none"||!(t.lineWidth>0))},e.prototype.hasFill=function(){var t=this.style,i=t.fill;return i!=null&&i!=="none"},e.prototype.getBoundingRect=function(){var t=this._rect,i=this.style,n=!t;if(n){var o=!1;this.path||(o=!0,this.createPathProxy());var a=this.path;(o||this.__dirty&Di)&&(a.beginPath(),this.buildPath(a,this.shape,!1),this.pathUpdated()),t=a.getBoundingRect()}if(this._rect=t,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=t.clone());if(this.__dirty||n){s.copy(t);var l=i.strokeNoScale?this.getLineScale():1,u=i.lineWidth;if(!this.hasFill()){var f=this.strokeContainThreshold;u=Math.max(u,f??4)}l>1e-10&&(s.width+=u/l,s.height+=u/l,s.x-=u/l/2,s.y-=u/l/2)}return s}return t},e.prototype.contain=function(t,i){var n=this.transformCoordToLocal(t,i),o=this.getBoundingRect(),a=this.style;if(t=n[0],i=n[1],o.contain(t,i)){var s=this.path;if(this.hasStroke()){var l=a.lineWidth,u=a.strokeNoScale?this.getLineScale():1;if(u>1e-10&&(this.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),My(s,l/u,t,i)))return!0}if(this.hasFill())return Dy(s,t,i)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=Di,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(t){return this.animate("shape",t)},e.prototype.updateDuringAnimation=function(t){t==="style"?this.dirtyStyle():t==="shape"?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(t,i){t==="shape"?this.setShape(i):r.prototype.attrKV.call(this,t,i)},e.prototype.setShape=function(t,i){var n=this.shape;return n||(n=this.shape={}),typeof t=="string"?n[t]=i:P(n,t),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&Di)},e.prototype.createStyle=function(t){return xi(hh,t)},e.prototype._innerSaveToNormal=function(t){r.prototype._innerSaveToNormal.call(this,t);var i=this._normalState;t.shape&&!i.shape&&(i.shape=P({},this.shape))},e.prototype._applyStateObj=function(t,i,n,o,a,s){r.prototype._applyStateObj.call(this,t,i,n,o,a,s);var l=!(i&&o),u;if(i&&i.shape?a?o?u=i.shape:(u=P({},n.shape),P(u,i.shape)):(u=P({},o?this.shape:n.shape),P(u,i.shape)):l&&(u=n.shape),u)if(a){this.shape=P({},this.shape);for(var f={},c=me(u),p=0;p<c.length;p++){var h=c[p];typeof u[h]=="object"?this.shape[h]=u[h]:f[h]=u[h]}this._transitionState(t,{shape:f},s)}else this.shape=u,this.dirtyShape()},e.prototype._mergeStates=function(t){for(var i=r.prototype._mergeStates.call(this,t),n,o=0;o<t.length;o++){var a=t[o];a.shape&&(n=n||{},this._mergeStyle(n,a.shape))}return n&&(i.shape=n),i},e.prototype.getAnimationStyleProps=function(){return Ob},e.prototype.isZeroArea=function(){return!1},e.extend=function(t){var i=(function(o){J(a,o);function a(s){var l=o.call(this,s)||this;return t.init&&t.init.call(l,s),l}return a.prototype.getDefaultStyle=function(){return re(t.style)},a.prototype.getDefaultShape=function(){return re(t.shape)},a})(e);for(var n in t)typeof t[n]=="function"&&(i.prototype[n]=t[n]);return i},e.initDefaultProps=(function(){var t=e.prototype;t.type="path",t.strokeContainThreshold=5,t.segmentIgnoreThreshold=0,t.subPixelOptimize=!1,t.autoBatch=!1,t.__dirty=tt|yn|Di})(),e})(Wr),pe=Ib;var Ab=ce({strokeFirst:!0,font:Tr,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},hh),Ey=(function(r){J(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.hasStroke=function(){var t=this.style,i=t.stroke;return i!=null&&i!=="none"&&t.lineWidth>0},e.prototype.hasFill=function(){var t=this.style,i=t.fill;return i!=null&&i!=="none"},e.prototype.createStyle=function(t){return xi(Ab,t)},e.prototype.setBoundingRect=function(t){this._rect=t},e.prototype.getBoundingRect=function(){var t=this.style;if(!this._rect){var i=t.text;i!=null?i+="":i="";var n=ql(i,t.font,t.textAlign,t.textBaseline);if(n.x+=t.x||0,n.y+=t.y||0,this.hasStroke()){var o=t.lineWidth;n.x-=o/2,n.y-=o/2,n.width+=o,n.height+=o}this._rect=n}return this._rect},e.initDefaultProps=(function(){var t=e.prototype;t.dirtyRectTolerance=10})(),e})(Wr);Ey.prototype.type="tspan";var La=Ey;var Pb=ce({x:0,y:0},Br),Lb={style:ce({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},xn.style)};function Nb(r){return!!(r&&typeof r!="string"&&r.width&&r.height)}var Ry=(function(r){J(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.createStyle=function(t){return xi(Pb,t)},e.prototype._getSize=function(t){var i=this.style,n=i[t];if(n!=null)return n;var o=Nb(i.image)?i.image:this.__image;if(!o)return 0;var a=t==="width"?"height":"width",s=i[a];return s==null?o[t]:o[t]/o[a]*s},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return Lb},e.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new ue(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},e})(Wr);Ry.prototype.type="image";var mr=Ry;function Oy(r,e){var t=e.x,i=e.y,n=e.width,o=e.height,a=e.r,s,l,u,f;n<0&&(t=t+n,n=-n),o<0&&(i=i+o,o=-o),typeof a=="number"?s=l=u=f=a:a instanceof Array?a.length===1?s=l=u=f=a[0]:a.length===2?(s=u=a[0],l=f=a[1]):a.length===3?(s=a[0],l=f=a[1],u=a[2]):(s=a[0],l=a[1],u=a[2],f=a[3]):s=l=u=f=0;var c;s+l>n&&(c=s+l,s*=n/c,l*=n/c),u+f>n&&(c=u+f,u*=n/c,f*=n/c),l+u>o&&(c=l+u,l*=o/c,u*=o/c),s+f>o&&(c=s+f,s*=o/c,f*=o/c),r.moveTo(t+s,i),r.lineTo(t+n-l,i),l!==0&&r.arc(t+n-l,i+l,l,-Math.PI/2,0),r.lineTo(t+n,i+o-u),u!==0&&r.arc(t+n-u,i+o-u,u,0,Math.PI/2),r.lineTo(t+f,i+o),f!==0&&r.arc(t+f,i+o-f,f,Math.PI/2,Math.PI),r.lineTo(t,i+s),s!==0&&r.arc(t+s,i+s,s,Math.PI,Math.PI*1.5)}var Mo=Math.round;function eu(r,e,t){if(e){var i=e.x1,n=e.x2,o=e.y1,a=e.y2;r.x1=i,r.x2=n,r.y1=o,r.y2=a;var s=t&&t.lineWidth;return s&&(Mo(i*2)===Mo(n*2)&&(r.x1=r.x2=Ai(i,s,!0)),Mo(o*2)===Mo(a*2)&&(r.y1=r.y2=Ai(o,s,!0))),r}}function tu(r,e,t){if(e){var i=e.x,n=e.y,o=e.width,a=e.height;r.x=i,r.y=n,r.width=o,r.height=a;var s=t&&t.lineWidth;return s&&(r.x=Ai(i,s,!0),r.y=Ai(n,s,!0),r.width=Math.max(Ai(i+o,s,!1)-r.x,o===0?0:1),r.height=Math.max(Ai(n+a,s,!1)-r.y,a===0?0:1)),r}}function Ai(r,e,t){if(!e)return r;var i=Mo(r*2);return(i+Mo(e))%2===0?i/2:(i+(t?1:-1))/2}var Fb=(function(){function r(){this.x=0,this.y=0,this.width=0,this.height=0}return r})();var Bb={},Iy=(function(r){J(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new Fb},e.prototype.buildPath=function(t,i){var n,o,a,s;if(this.subPixelOptimize){var l=tu(Bb,i,this.style);n=l.x,o=l.y,a=l.width,s=l.height,l.r=i.r,i=l}else n=i.x,o=i.y,a=i.width,s=i.height;i.r?Oy(t,i):t.rect(n,o,a,s)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e})(pe);Iy.prototype.type="rect";var ft=Iy;var Ay={fill:"#000"},Py=2,Wb={style:ce({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},xn.style)},Uy=(function(r){J(e,r);function e(t){var i=r.call(this)||this;return i.type="text",i._children=[],i._defaultStyle=Ay,i.attr(t),i}return e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){r.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t<this._children.length;t++){var i=this._children[t];i.zlevel=this.zlevel,i.z=this.z,i.z2=this.z2,i.culling=this.culling,i.cursor=this.cursor,i.invisible=this.invisible}},e.prototype.updateTransform=function(){var t=this.innerTransformable;t?(t.updateTransform(),t.transform&&(this.transform=t.transform)):r.prototype.updateTransform.call(this)},e.prototype.getLocalTransform=function(t){var i=this.innerTransformable;return i?i.getLocalTransform(t):r.prototype.getLocalTransform.call(this,t)},e.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),r.prototype.getComputedTransform.call(this)},e.prototype._updateSubTexts=function(){this._childCursor=0,Yb(this.style),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},e.prototype.addSelfToZr=function(t){r.prototype.addSelfToZr.call(this,t);for(var i=0;i<this._children.length;i++)this._children[i].__zr=t},e.prototype.removeSelfFromZr=function(t){r.prototype.removeSelfFromZr.call(this,t);for(var i=0;i<this._children.length;i++)this._children[i].__zr=null},e.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var t=new ue(0,0,0,0),i=this._children,n=[],o=null,a=0;a<i.length;a++){var s=i[a],l=s.getBoundingRect(),u=s.getLocalTransform(n);u?(t.copy(l),t.applyTransform(u),o=o||t.clone(),o.union(t)):(o=o||l.clone(),o.union(l))}this._rect=o||t}return this._rect},e.prototype.setDefaultTextStyle=function(t){this._defaultStyle=t||Ay},e.prototype.setTextContent=function(t){},e.prototype._mergeStyle=function(t,i){if(!i)return t;var n=i.rich,o=t.rich||n&&{};return P(t,i),n&&o?(this._mergeRich(o,n),t.rich=o):o&&(t.rich=o),t},e.prototype._mergeRich=function(t,i){for(var n=me(i),o=0;o<n.length;o++){var a=n[o];t[a]=t[a]||{},P(t[a],i[a])}},e.prototype.getAnimationStyleProps=function(){return Wb},e.prototype._getOrCreateChild=function(t){var i=this._children[this._childCursor];return(!i||!(i instanceof t))&&(i=new t),this._children[this._childCursor++]=i,i.__zr=this.__zr,i.parent=this,i},e.prototype._updatePlainTexts=function(){var t=this.style,i=t.font||Tr,n=t.padding,o=Wy(t),a=hy(o,t),s=ph(t),l=!!t.backgroundColor,u=a.outerHeight,f=a.outerWidth,c=a.contentWidth,p=a.lines,h=a.lineHeight,d=this._defaultStyle;this.isTruncated=!!a.isTruncated;var g=t.x||0,v=t.y||0,m=t.align||d.align||"left",y=t.verticalAlign||d.verticalAlign||"top",_=g,x=mn(v,a.contentHeight,y);if(s||n){var C=Co(g,f,m),w=mn(v,u,y);s&&this._renderBackground(t,t,C,w,f,u)}x+=h/2,n&&(_=By(g,m,n),y==="top"?x+=n[0]:y==="bottom"&&(x-=n[2]));for(var T=0,D=!1,b=Fy("fill"in t?t.fill:(D=!0,d.fill)),E=zy("stroke"in t?t.stroke:!l&&(!d.autoStroke||D)?(T=Py,d.stroke):null),M=t.textShadowBlur>0,R=t.width!=null&&(t.overflow==="truncate"||t.overflow==="break"||t.overflow==="breakAll"),O=a.calculatedLineHeight,I=0;I<p.length;I++){var W=this._getOrCreateChild(La),U=W.createStyle();W.useStyle(U),U.text=p[I],U.x=_,U.y=x,m&&(U.textAlign=m),U.textBaseline="middle",U.opacity=t.opacity,U.strokeFirst=!0,M&&(U.shadowBlur=t.textShadowBlur||0,U.shadowColor=t.textShadowColor||"transparent",U.shadowOffsetX=t.textShadowOffsetX||0,U.shadowOffsetY=t.textShadowOffsetY||0),U.stroke=E,U.fill=b,E&&(U.lineWidth=t.lineWidth||T,U.lineDash=t.lineDash,U.lineDashOffset=t.lineDashOffset||0),U.font=i,Ny(U,t),x+=h,R&&W.setBoundingRect(new ue(Co(U.x,c,U.textAlign),mn(U.y,O,U.textBaseline),c,O))}},e.prototype._updateRichTexts=function(){var t=this.style,i=Wy(t),n=py(i,t),o=n.width,a=n.outerWidth,s=n.outerHeight,l=t.padding,u=t.x||0,f=t.y||0,c=this._defaultStyle,p=t.align||c.align,h=t.verticalAlign||c.verticalAlign;this.isTruncated=!!n.isTruncated;var d=Co(u,a,p),g=mn(f,s,h),v=d,m=g;l&&(v+=l[3],m+=l[0]);var y=v+o;ph(t)&&this._renderBackground(t,t,d,g,a,s);for(var _=!!t.backgroundColor,x=0;x<n.lines.length;x++){for(var C=n.lines[x],w=C.tokens,T=w.length,D=C.lineHeight,b=C.width,E=0,M=v,R=y,O=T-1,I=void 0;E<T&&(I=w[E],!I.align||I.align==="left");)this._placeToken(I,t,D,m,M,"left",_),b-=I.width,M+=I.width,E++;for(;O>=0&&(I=w[O],I.align==="right");)this._placeToken(I,t,D,m,R,"right",_),b-=I.width,R-=I.width,O--;for(M+=(o-(M-v)-(y-R)-b)/2;E<=O;)I=w[E],this._placeToken(I,t,D,m,M+I.width/2,"center",_),M+=I.width,E++;m+=D}},e.prototype._placeToken=function(t,i,n,o,a,s,l){var u=i.rich[t.styleName]||{};u.text=t.text;var f=t.verticalAlign,c=o+n/2;f==="top"?c=o+t.height/2:f==="bottom"&&(c=o+n-t.height/2);var p=!t.isLineHolder&&ph(u);p&&this._renderBackground(u,i,s==="right"?a-t.width:s==="center"?a-t.width/2:a,c-t.height/2,t.width,t.height);var h=!!u.backgroundColor,d=t.textPadding;d&&(a=By(a,s,d),c-=t.height/2-d[0]-t.innerHeight/2);var g=this._getOrCreateChild(La),v=g.createStyle();g.useStyle(v);var m=this._defaultStyle,y=!1,_=0,x=Fy("fill"in u?u.fill:"fill"in i?i.fill:(y=!0,m.fill)),C=zy("stroke"in u?u.stroke:"stroke"in i?i.stroke:!h&&!l&&(!m.autoStroke||y)?(_=Py,m.stroke):null),w=u.textShadowBlur>0||i.textShadowBlur>0;v.text=t.text,v.x=a,v.y=c,w&&(v.shadowBlur=u.textShadowBlur||i.textShadowBlur||0,v.shadowColor=u.textShadowColor||i.textShadowColor||"transparent",v.shadowOffsetX=u.textShadowOffsetX||i.textShadowOffsetX||0,v.shadowOffsetY=u.textShadowOffsetY||i.textShadowOffsetY||0),v.textAlign=s,v.textBaseline="middle",v.font=t.font||Tr,v.opacity=nn(u.opacity,i.opacity,1),Ny(v,u),C&&(v.lineWidth=nn(u.lineWidth,i.lineWidth,_),v.lineDash=te(u.lineDash,i.lineDash),v.lineDashOffset=i.lineDashOffset||0,v.stroke=C),x&&(v.fill=x);var T=t.contentWidth,D=t.contentHeight;g.setBoundingRect(new ue(Co(v.x,T,v.textAlign),mn(v.y,D,v.textBaseline),T,D))},e.prototype._renderBackground=function(t,i,n,o,a,s){var l=t.backgroundColor,u=t.borderWidth,f=t.borderColor,c=l&&l.image,p=l&&!c,h=t.borderRadius,d=this,g,v;if(p||t.lineHeight||u&&f){g=this._getOrCreateChild(ft),g.useStyle(g.createStyle()),g.style.fill=null;var m=g.shape;m.x=n,m.y=o,m.width=a,m.height=s,m.r=h,g.dirtyShape()}if(p){var y=g.style;y.fill=l||null,y.fillOpacity=te(t.fillOpacity,1)}else if(c){v=this._getOrCreateChild(mr),v.onload=function(){d.dirtyStyle()};var _=v.style;_.image=l.image,_.x=n,_.y=o,_.width=a,_.height=s}if(u&&f){var y=g.style;y.lineWidth=u,y.stroke=f,y.strokeOpacity=te(t.strokeOpacity,1),y.lineDash=t.borderDash,y.lineDashOffset=t.borderDashOffset||0,g.strokeContainThreshold=0,g.hasFill()&&g.hasStroke()&&(y.strokeFirst=!0,y.lineWidth*=2)}var x=(g||v).style;x.shadowBlur=t.shadowBlur||0,x.shadowColor=t.shadowColor||"transparent",x.shadowOffsetX=t.shadowOffsetX||0,x.shadowOffsetY=t.shadowOffsetY||0,x.opacity=nn(t.opacity,i.opacity,1)},e.makeFont=function(t){var i="";return Gb(t)&&(i=[t.fontStyle,t.fontWeight,Vb(t.fontSize),t.fontFamily||"sans-serif"].join(" ")),i&&xt(i)||t.textFont||t.font},e})(Wr),Ub={left:!0,right:1,center:1},Hb={top:1,bottom:1,middle:1},Ly=["fontStyle","fontWeight","fontSize","fontFamily"];function Vb(r){return typeof r=="string"&&(r.indexOf("px")!==-1||r.indexOf("rem")!==-1||r.indexOf("em")!==-1)?r:isNaN(+r)?ml+"px":r+"px"}function Ny(r,e){for(var t=0;t<Ly.length;t++){var i=Ly[t],n=e[i];n!=null&&(r[i]=n)}}function Gb(r){return r.fontSize!=null||r.fontFamily||r.fontWeight}function Yb(r){return ky(r),S(r.rich,ky),r}function ky(r){if(r){r.font=Uy.makeFont(r);var e=r.align;e==="middle"&&(e="center"),r.align=e==null||Ub[e]?e:"left";var t=r.verticalAlign;t==="center"&&(t="middle"),r.verticalAlign=t==null||Hb[t]?t:"top";var i=r.padding;i&&(r.padding=wl(r.padding))}}function zy(r,e){return r==null||e<=0||r==="transparent"||r==="none"?null:r.image||r.colorStops?"#000":r}function Fy(r){return r==null||r==="none"?null:r.image||r.colorStops?"#000":r}function By(r,e,t){return e==="right"?r-t[1]:e==="center"?r+t[3]/2-t[1]/2:r+t[3]}function Wy(r){var e=r.text;return e!=null&&(e+=""),e}function ph(r){return!!(r.backgroundColor||r.lineHeight||r.borderWidth&&r.borderColor)}var Ct=Uy;var Hy=1e-4,Vy=20;function qb(r){return r.replace(/^\s+|\s+$/g,"")}function Gy(r,e,t,i){var n=e[0],o=e[1],a=t[0],s=t[1],l=o-n,u=s-a;if(l===0)return u===0?a:(a+s)/2;if(i)if(l>0){if(r<=n)return a;if(r>=o)return s}else{if(r>=n)return a;if(r<=o)return s}else{if(r===n)return a;if(r===o)return s}return(r-n)/l*u+a}function qe(r,e){switch(r){case"center":case"middle":r="50%";break;case"left":case"top":r="0%";break;case"right":case"bottom":r="100%";break}return N(r)?qb(r).match(/%$/)?parseFloat(r)/100*e:parseFloat(r):r==null?NaN:+r}function bt(r,e,t){return e==null&&(e=10),e=Math.min(Math.max(0,e),Vy),r=(+r).toFixed(e),t?r:+r}function Yy(r){return r.sort(function(e,t){return e-t}),r}function zt(r){if(r=+r,isNaN(r))return 0;if(r>1e-14){for(var e=1,t=0;t<15;t++,e*=10)if(Math.round(r*e)/e===r)return t}return dh(r)}function dh(r){var e=r.toString().toLowerCase(),t=e.indexOf("e"),i=t>0?+e.slice(t+1):0,n=t>0?t:e.length,o=e.indexOf("."),a=o<0?0:n-1-o;return Math.max(0,a-i)}function qy(r,e){var t=Math.log,i=Math.LN10,n=Math.floor(t(r[1]-r[0])/i),o=Math.round(t(Math.abs(e[1]-e[0]))/i),a=Math.min(Math.max(-n+o,0),20);return isFinite(a)?a:20}function Xy(r,e,t){if(!r[e])return 0;var i=Xb(r,t);return i[e]||0}function Xb(r,e){var t=Nt(r,function(h,d){return h+(isNaN(d)?0:d)},0);if(t===0)return[];for(var i=Math.pow(10,e),n=X(r,function(h){return(isNaN(h)?0:h)/t*i*100}),o=i*100,a=X(n,function(h){return Math.floor(h)}),s=Nt(a,function(h,d){return h+d},0),l=X(n,function(h,d){return h-a[d]});s<o;){for(var u=Number.NEGATIVE_INFINITY,f=null,c=0,p=l.length;c<p;++c)l[c]>u&&(u=l[c],f=c);++a[f],l[f]=0,++s}return X(a,function(h){return h/i})}function jy(r,e){var t=Math.max(zt(r),zt(e)),i=r+e;return t>Vy?i:bt(i,t)}var Zy=9007199254740991;function Na(r){var e=Math.PI*2;return(r%e+e)%e}function En(r){return r>-Hy&&r<Hy}var jb=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function Dt(r){if(r instanceof Date)return r;if(N(r)){var e=jb.exec(r);if(!e)return new Date(NaN);if(e[8]){var t=+e[4]||0;return e[8].toUpperCase()!=="Z"&&(t-=+e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,t,+(e[5]||0),+e[6]||0,e[7]?+e[7].substring(0,3):0))}else return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,e[7]?+e[7].substring(0,3):0)}else if(r==null)return new Date(NaN);return new Date(Math.round(r))}function ru(r){return Math.pow(10,ka(r))}function ka(r){if(r===0)return 0;var e=Math.floor(Math.log(r)/Math.LN10);return r/Math.pow(10,e)>=10&&e++,e}function Eo(r,e){var t=ka(r),i=Math.pow(10,t),n=r/i,o;return e?n<1.5?o=1:n<2.5?o=2:n<4?o=3:n<7?o=5:o=10:n<1?o=1:n<2?o=2:n<3?o=3:n<5?o=5:o=10,r=o*i,t>=-20?+r.toFixed(t<0?-t:0):r}function Ky(r,e){var t=(r.length-1)*e+1,i=Math.floor(t),n=+r[i-1],o=t-i;return o?n+o*(r[i]-n):n}function $y(r){r.sort(function(l,u){return s(l,u,0)?-1:1});for(var e=-1/0,t=1,i=0;i<r.length;){for(var n=r[i].interval,o=r[i].close,a=0;a<2;a++)n[a]<=e&&(n[a]=e,o[a]=a?1:1-t),e=n[a],t=o[a];n[0]===n[1]&&o[0]*o[1]!==1?r.splice(i,1):i++}return r;function s(l,u,f){return l.interval[f]<u.interval[f]||l.interval[f]===u.interval[f]&&(l.close[f]-u.close[f]===(f?-1:1)||!f&&s(l,u,1))}}function gr(r){var e=parseFloat(r);return e==r&&(e!==0||!N(r)||r.indexOf("x")<=0)?e:NaN}function za(r){return!isNaN(gr(r))}function iu(){return Math.round(Math.random()*9)}function Qy(r,e){return e===0?r:Qy(e,r%e)}function vh(r,e){return r==null?e:e==null?r:r*e/Qy(r,e)}function Jy(r,e,t){return(e-r)*t+r}var e0="series\0",Zb="\0_ec_\0";function Be(r){return r instanceof Array?r:r==null?[]:[r]}function mh(r,e,t){if(r){r[e]=r[e]||{},r.emphasis=r.emphasis||{},r.emphasis[e]=r.emphasis[e]||{};for(var i=0,n=t.length;i<n;i++){var o=t[i];!r.emphasis[e].hasOwnProperty(o)&&r[e].hasOwnProperty(o)&&(r.emphasis[e][o]=r[e][o])}}}var gh=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"];function ni(r){return F(r)&&!L(r)&&!(r instanceof Date)?r.value:r}function t0(r){return F(r)&&!(r instanceof Array)}function r0(r,e,t){var i=t==="normalMerge",n=t==="replaceMerge",o=t==="replaceAll";r=r||[],e=(e||[]).slice();var a=Z();S(e,function(l,u){if(!F(l)){e[u]=null;return}});var s=Kb(r,a,t);return(i||n)&&$b(s,r,a,e),i&&Qb(s,e),i||n?Jb(s,e,n):o&&eD(s,e),tD(s),s}function Kb(r,e,t){var i=[];if(t==="replaceAll")return i;for(var n=0;n<r.length;n++){var o=r[n];o&&o.id!=null&&e.set(o.id,n),i.push({existing:t==="replaceMerge"||Ro(o)?null:o,newOption:null,keyInfo:null,brandNew:null})}return i}function $b(r,e,t,i){S(i,function(n,o){if(!(!n||n.id==null)){var a=Fa(n.id),s=t.get(a);if(s!=null){var l=r[s];_t(!l.newOption,'Duplicated option on id "'+a+'".'),l.newOption=n,l.existing=e[s],i[o]=null}}})}function Qb(r,e){S(e,function(t,i){if(!(!t||t.name==null))for(var n=0;n<r.length;n++){var o=r[n].existing;if(!r[n].newOption&&o&&(o.id==null||t.id==null)&&!Ro(t)&&!Ro(o)&&i0("name",o,t)){r[n].newOption=t,e[i]=null;return}}})}function Jb(r,e,t){S(e,function(i){if(i){for(var n,o=0;(n=r[o])&&(n.newOption||Ro(n.existing)||n.existing&&i.id!=null&&!i0("id",i,n.existing));)o++;n?(n.newOption=i,n.brandNew=t):r.push({newOption:i,brandNew:t,existing:null,keyInfo:null}),o++}})}function eD(r,e){S(e,function(t){r.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})})}function tD(r){var e=Z();S(r,function(t){var i=t.existing;i&&e.set(i.id,t)}),S(r,function(t){var i=t.newOption;_t(!i||i.id==null||!e.get(i.id)||e.get(i.id)===t,"id duplicates: "+(i&&i.id)),i&&i.id!=null&&e.set(i.id,t),!t.keyInfo&&(t.keyInfo={})}),S(r,function(t,i){var n=t.existing,o=t.newOption,a=t.keyInfo;if(F(o)){if(a.name=o.name!=null?Fa(o.name):n?n.name:e0+i,n)a.id=Fa(n.id);else if(o.id!=null)a.id=Fa(o.id);else{var s=0;do a.id="\0"+a.name+"\0"+s++;while(e.get(a.id))}e.set(a.id,t)}})}function i0(r,e,t){var i=nr(e[r],null),n=nr(t[r],null);return i!=null&&n!=null&&i===n}function Fa(r){return nr(r,"")}function nr(r,e){return r==null?e:N(r)?r:Ce(r)||ga(r)?r+"":e}function ou(r){var e=r.name;return!!(e&&e.indexOf(e0))}function Ro(r){return r&&r.id!=null&&Fa(r.id).indexOf(Zb)===0}function n0(r,e,t){S(r,function(i){var n=i.newOption;F(n)&&(i.keyInfo.mainType=e,i.keyInfo.subType=rD(e,n,i.existing,t))})}function rD(r,e,t,i){var n=e.type?e.type:t?t.subType:i.determineSubType(r,e);return n}function oi(r,e){if(e.dataIndexInside!=null)return e.dataIndexInside;if(e.dataIndex!=null)return L(e.dataIndex)?X(e.dataIndex,function(t){return r.indexOfRawIndex(t)}):r.indexOfRawIndex(e.dataIndex);if(e.name!=null)return L(e.name)?X(e.name,function(t){return r.indexOfName(t)}):r.indexOfName(e.name)}function ye(){var r="__ec_inner_"+iD++;return function(e){return e[r]||(e[r]={})}}var iD=iu();function au(r,e,t){var i=Ba(e,t),n=i.mainTypeSpecified,o=i.queryOptionMap,a=i.others,s=a,l=t?t.defaultMainType:null;return!n&&l&&o.set(l,{}),o.each(function(u,f){var c=Pi(r,f,u,{useDefault:l===f,enableAll:t&&t.enableAll!=null?t.enableAll:!0,enableNone:t&&t.enableNone!=null?t.enableNone:!0});s[f+"Models"]=c.models,s[f+"Model"]=c.models[0]}),s}function Ba(r,e){var t;if(N(r)){var i={};i[r+"Index"]=0,t=i}else t=r;var n=Z(),o={},a=!1;return S(t,function(s,l){if(l==="dataIndex"||l==="dataIndexInside"){o[l]=s;return}var u=l.match(/^(\w+)(Index|Id|Name)$/)||[],f=u[1],c=(u[2]||"").toLowerCase();if(!(!f||!c||e&&e.includeMainTypes&&he(e.includeMainTypes,f)<0)){a=a||!!f;var p=n.get(f)||n.set(f,{});p[c]=s}}),{mainTypeSpecified:a,queryOptionMap:n,others:o}}var ai={useDefault:!0,enableAll:!1,enableNone:!1};function Pi(r,e,t,i){i=i||ai;var n=t.index,o=t.id,a=t.name,s={models:null,specified:n!=null||o!=null||a!=null};if(!s.specified){var l=void 0;return s.models=i.useDefault&&(l=r.getComponent(e))?[l]:[],s}return n==="none"||n===!1?(_t(i.enableNone,'`"none"` or `false` is not a valid value on index option.'),s.models=[],s):(n==="all"&&(_t(i.enableAll,'`"all"` is not a valid value on index option.'),n=o=a=null),s.models=r.queryComponents({mainType:e,index:n,id:o,name:a}),s)}function yh(r,e,t){r.setAttribute?r.setAttribute(e,t):r[e]=t}function o0(r,e){return r.getAttribute?r.getAttribute(e):r[e]}function a0(r){return r==="auto"?Q.domSupported?"html":"richText":r||"html"}function s0(r,e,t,i,n){var o=e==null||e==="auto";if(i==null)return i;if(Ce(i)){var a=Jy(t||0,i,n);return bt(a,o?Math.max(zt(t||0),zt(i)):e)}else{if(N(i))return n<1?t:i;for(var s=[],l=t,u=i,f=Math.max(l?l.length:0,u.length),c=0;c<f;++c){var p=r.getDimensionInfo(c);if(p&&p.type==="ordinal")s[c]=(n<1&&l?l:u)[c];else{var h=l&&l[c]?l[c]:0,d=u[c],a=Jy(h,d,n);s[c]=bt(a,o?Math.max(zt(h),zt(d)):e)}}return s}}var Re=ye(),l0=function(r,e,t,i){if(i){var n=Re(i);n.dataIndex=t,n.dataType=e,n.seriesIndex=r,n.ssrType="chart",i.type==="group"&&i.traverse(function(o){var a=Re(o);a.seriesIndex=r,a.dataIndex=t,a.dataType=e,a.ssrType="chart"})}};var u0=1,f0={},d0=ye(),Sh=ye(),v0=0,lu=1,uu=2,Li=["emphasis","blur","select"],fu=["normal","emphasis","blur","select"],nD=10,oD=9,Ni="highlight",Wa="downplay",Ao="select",Ua="unselect",Po="toggleSelect";function Io(r){return r!=null&&r!=="none"}function cu(r,e,t){r.onHoverStateChange&&(r.hoverState||0)!==t&&r.onHoverStateChange(e),r.hoverState=t}function m0(r){cu(r,"emphasis",uu)}function g0(r){r.hoverState===uu&&cu(r,"normal",v0)}function wh(r){cu(r,"blur",lu)}function y0(r){r.hoverState===lu&&cu(r,"normal",v0)}function aD(r){r.selected=!0}function sD(r){r.selected=!1}function c0(r,e,t){e(r,t)}function si(r,e,t){c0(r,e,t),r.isGroup&&r.traverse(function(i){c0(i,e,t)})}function lD(r,e,t,i){for(var n=r.style,o={},a=0;a<e.length;a++){var s=e[a],l=n[s];o[s]=l??(i&&i[s])}for(var a=0;a<r.animators.length;a++){var u=r.animators[a];u.__fromStateTransition&&u.__fromStateTransition.indexOf(t)<0&&u.targetName==="style"&&u.saveTo(o,e)}return o}function uD(r,e,t,i){var n=t&&he(t,"select")>=0,o=!1;if(r instanceof pe){var a=d0(r),s=n&&a.selectFill||a.normalFill,l=n&&a.selectStroke||a.normalStroke;if(Io(s)||Io(l)){i=i||{};var u=i.style||{};u.fill==="inherit"?(o=!0,i=P({},i),u=P({},u),u.fill=s):!Io(u.fill)&&Io(s)?(o=!0,i=P({},i),u=P({},u),u.fill=kc(s)):!Io(u.stroke)&&Io(l)&&(o||(i=P({},i),u=P({},u)),u.stroke=kc(l)),i.style=u}}if(i&&i.z2==null){o||(i=P({},i));var f=r.z2EmphasisLift;i.z2=r.z2+(f??nD)}return i}function fD(r,e,t){if(t&&t.z2==null){t=P({},t);var i=r.z2SelectLift;t.z2=r.z2+(i??oD)}return t}function cD(r,e,t){var i=he(r.currentStates,e)>=0,n=r.style.opacity,o=i?null:lD(r,["opacity"],e,{opacity:1});t=t||{};var a=t.style||{};return a.opacity==null&&(t=P({},t),a=P({opacity:i?n:o.opacity*.1},a),t.style=a),t}function _h(r,e){var t=this.states[r];if(this.style){if(r==="emphasis")return uD(this,r,e,t);if(r==="blur")return cD(this,r,t);if(r==="select")return fD(this,r,t)}return t}function hD(r){r.stateProxy=_h;var e=r.getTextContent(),t=r.getTextGuideLine();e&&(e.stateProxy=_h),t&&(t.stateProxy=_h)}function h0(r,e){!x0(r,e)&&!r.__highByOuter&&si(r,m0)}function p0(r,e){!x0(r,e)&&!r.__highByOuter&&si(r,g0)}function Ha(r,e){r.__highByOuter|=1<<(e||0),si(r,m0)}function Va(r,e){!(r.__highByOuter&=~(1<<(e||0)))&&si(r,g0)}function _0(r){si(r,wh)}function Ch(r){si(r,y0)}function Th(r){si(r,aD)}function bh(r){si(r,sD)}function x0(r,e){return r.__highDownSilentOnTouch&&e.zrByTouch}function Dh(r){var e=r.getModel(),t=[],i=[];e.eachComponent(function(n,o){var a=Sh(o),s=n==="series",l=s?r.getViewOfSeriesModel(o):r.getViewOfComponentModel(o);!s&&i.push(l),a.isBlured&&(l.group.traverse(function(u){y0(u)}),s&&t.push(o)),a.isBlured=!1}),S(i,function(n){n&&n.toggleBlurSeries&&n.toggleBlurSeries(t,!1,e)})}function xh(r,e,t,i){var n=i.getModel();t=t||"coordinateSystem";function o(u,f){for(var c=0;c<f.length;c++){var p=u.getItemGraphicEl(f[c]);p&&Ch(p)}}if(r!=null&&!(!e||e==="none")){var a=n.getSeriesByIndex(r),s=a.coordinateSystem;s&&s.master&&(s=s.master);var l=[];n.eachSeries(function(u){var f=a===u,c=u.coordinateSystem;c&&c.master&&(c=c.master);var p=c&&s?c===s:f;if(!(t==="series"&&!f||t==="coordinateSystem"&&!p||e==="series"&&f)){var h=i.getViewOfSeriesModel(u);if(h.group.traverse(function(v){v.__highByOuter&&f&&e==="self"||wh(v)}),et(e))o(u.getData(),e);else if(F(e))for(var d=me(e),g=0;g<d.length;g++)o(u.getData(d[g]),e[d[g]]);l.push(u),Sh(u).isBlured=!0}}),n.eachComponent(function(u,f){if(u!=="series"){var c=i.getViewOfComponentModel(f);c&&c.toggleBlurSeries&&c.toggleBlurSeries(l,!0,n)}})}}function su(r,e,t){if(!(r==null||e==null)){var i=t.getModel().getComponent(r,e);if(i){Sh(i).isBlured=!0;var n=t.getViewOfComponentModel(i);!n||!n.focusBlurEnabled||n.group.traverse(function(o){wh(o)})}}}function S0(r,e,t){var i=r.seriesIndex,n=r.getData(e.dataType);if(n){var o=oi(n,e);o=(L(o)?o[0]:o)||0;var a=n.getItemGraphicEl(o);if(!a)for(var s=n.count(),l=0;!a&&l<s;)a=n.getItemGraphicEl(l++);if(a){var u=Re(a);xh(i,u.focus,u.blurScope,t)}else{var f=r.get(["emphasis","focus"]),c=r.get(["emphasis","blurScope"]);f!=null&&xh(i,f,c,t)}}}function hu(r,e,t,i){var n={focusSelf:!1,dispatchers:null};if(r==null||r==="series"||e==null||t==null)return n;var o=i.getModel().getComponent(r,e);if(!o)return n;var a=i.getViewOfComponentModel(o);if(!a||!a.findHighDownDispatchers)return n;for(var s=a.findHighDownDispatchers(t),l,u=0;u<s.length;u++)if(Re(s[u]).focus==="self"){l=!0;break}return{focusSelf:l,dispatchers:s}}function w0(r,e,t){var i=Re(r),n=hu(i.componentMainType,i.componentIndex,i.componentHighDownName,t),o=n.dispatchers,a=n.focusSelf;o?(a&&su(i.componentMainType,i.componentIndex,t),S(o,function(s){return h0(s,e)})):(xh(i.seriesIndex,i.focus,i.blurScope,t),i.focus==="self"&&su(i.componentMainType,i.componentIndex,t),h0(r,e))}function C0(r,e,t){Dh(t);var i=Re(r),n=hu(i.componentMainType,i.componentIndex,i.componentHighDownName,t).dispatchers;n?S(n,function(o){return p0(o,e)}):p0(r,e)}function T0(r,e,t){if(pu(e)){var i=e.dataType,n=r.getData(i),o=oi(n,e);L(o)||(o=[o]),r[e.type===Po?"toggleSelect":e.type===Ao?"select":"unselect"](o,i)}}function Mh(r){var e=r.getAllData();S(e,function(t){var i=t.data,n=t.type;i.eachItemGraphicEl(function(o,a){r.isSelected(a,n)?Th(o):bh(o)})})}function b0(r){var e=[];return r.eachSeries(function(t){var i=t.getAllData();S(i,function(n){var o=n.data,a=n.type,s=t.getSelectedDataIndices();if(s.length>0){var l={dataIndex:s,seriesIndex:t.seriesIndex};a!=null&&(l.dataType=a),e.push(l)}})}),e}function D0(r,e,t){dD(r,!0),si(r,hD),pD(r,e,t)}function pD(r,e,t){var i=Re(r);e!=null?(i.focus=e,i.blurScope=t):i.focus&&(i.focus=null)}function dD(r,e){var t=e===!1,i=r;r.highDownSilentOnTouch&&(i.__highDownSilentOnTouch=r.highDownSilentOnTouch),(!t||i.__highDownDispatcher)&&(i.__highByOuter=i.__highByOuter||0,i.__highDownDispatcher=!t)}function Ga(r){return!!(r&&r.__highDownDispatcher)}function M0(r){var e=f0[r];return e==null&&u0<=32&&(e=f0[r]=u0++),e}function pu(r){var e=r.type;return e===Ao||e===Ua||e===Po}function Eh(r){var e=r.type;return e===Ni||e===Wa}function E0(r){var e=d0(r);e.normalFill=r.style.fill,e.normalStroke=r.style.stroke;var t=r.states.select||{};e.selectFill=t.style&&t.style.fill||null,e.selectStroke=t.style&&t.style.stroke||null}var ki={};no(ki,{Arc:()=>An,BezierCurve:()=>Qa,BoundingRect:()=>ue,Circle:()=>Rn,CompoundPath:()=>yu,Ellipse:()=>qa,Group:()=>wt,Image:()=>mr,IncrementalDisplayable:()=>Tu,Line:()=>Yr,LinearGradient:()=>xu,OrientedBoundingRect:()=>ko,Path:()=>pe,Point:()=>ve,Polygon:()=>$a,Polyline:()=>In,RadialGradient:()=>Su,Rect:()=>ft,Ring:()=>Ka,Sector:()=>Za,Text:()=>Ct,applyTransform:()=>Ru,clipPointsByRect:()=>Vh,clipRectByRect:()=>Gh,createIcon:()=>es,extendPath:()=>Bh,extendShape:()=>Fh,getShapeClass:()=>Wh,getTransform:()=>Hh,groupTransition:()=>jD,initProps:()=>li,isElementRemoved:()=>ui,lineLineIntersect:()=>n_,linePolygonIntersect:()=>ZD,makeImage:()=>Ja,makePath:()=>zo,mergePath:()=>Uh,registerShape:()=>or,removeElement:()=>Nh,removeElementWithFadeOut:()=>e_,resizePath:()=>Mu,setTooltipConfig:()=>Ou,subPixelOptimize:()=>YD,subPixelOptimizeLine:()=>Eu,subPixelOptimizeRect:()=>GD,transformDirection:()=>qD,traverseElements:()=>Yh,updateProps:()=>yr});var Lo=ir.CMD,vD=[[],[],[]],R0=Math.sqrt,mD=Math.atan2;function Rh(r,e){if(e){var t=r.data,i=r.len(),n,o,a,s,l,u,f=Lo.M,c=Lo.C,p=Lo.L,h=Lo.R,d=Lo.A,g=Lo.Q;for(a=0,s=0;a<i;){switch(n=t[a++],s=a,o=0,n){case f:o=1;break;case p:o=1;break;case c:o=3;break;case g:o=2;break;case d:var v=e[4],m=e[5],y=R0(e[0]*e[0]+e[1]*e[1]),_=R0(e[2]*e[2]+e[3]*e[3]),x=mD(-e[1]/_,e[0]/y);t[a]*=y,t[a++]+=v,t[a]*=_,t[a++]+=m,t[a++]*=y,t[a++]*=_,t[a++]+=x,t[a++]+=x,a+=2,s=a;break;case h:u[0]=t[a++],u[1]=t[a++],Ht(u,u,e),t[s++]=u[0],t[s++]=u[1],u[0]+=t[a++],u[1]+=t[a++],Ht(u,u,e),t[s++]=u[0],t[s++]=u[1]}for(l=0;l<o;l++){var C=vD[l];C[0]=t[a++],C[1]=t[a++],Ht(C,C,e),t[s++]=C[0],t[s++]=C[1]}}r.increaseVersion()}}var Oh=Math.sqrt,du=Math.sin,vu=Math.cos,Ya=Math.PI;function O0(r){return Math.sqrt(r[0]*r[0]+r[1]*r[1])}function Ih(r,e){return(r[0]*e[0]+r[1]*e[1])/(O0(r)*O0(e))}function I0(r,e){return(r[0]*e[1]<r[1]*e[0]?-1:1)*Math.acos(Ih(r,e))}function A0(r,e,t,i,n,o,a,s,l,u,f){var c=l*(Ya/180),p=vu(c)*(r-t)/2+du(c)*(e-i)/2,h=-1*du(c)*(r-t)/2+vu(c)*(e-i)/2,d=p*p/(a*a)+h*h/(s*s);d>1&&(a*=Oh(d),s*=Oh(d));var g=(n===o?-1:1)*Oh((a*a*(s*s)-a*a*(h*h)-s*s*(p*p))/(a*a*(h*h)+s*s*(p*p)))||0,v=g*a*h/s,m=g*-s*p/a,y=(r+t)/2+vu(c)*v-du(c)*m,_=(e+i)/2+du(c)*v+vu(c)*m,x=I0([1,0],[(p-v)/a,(h-m)/s]),C=[(p-v)/a,(h-m)/s],w=[(-1*p-v)/a,(-1*h-m)/s],T=I0(C,w);if(Ih(C,w)<=-1&&(T=Ya),Ih(C,w)>=1&&(T=0),T<0){var D=Math.round(T/Ya*1e6)/1e6;T=Ya*2+D%2*Ya}f.addData(u,y,_,a,s,x,T,c,o)}var gD=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,yD=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function _D(r){var e=new ir;if(!r)return e;var t=0,i=0,n=t,o=i,a,s=ir.CMD,l=r.match(gD);if(!l)return e;for(var u=0;u<l.length;u++){for(var f=l[u],c=f.charAt(0),p=void 0,h=f.match(yD)||[],d=h.length,g=0;g<d;g++)h[g]=parseFloat(h[g]);for(var v=0;v<d;){var m=void 0,y=void 0,_=void 0,x=void 0,C=void 0,w=void 0,T=void 0,D=t,b=i,E=void 0,M=void 0;switch(c){case"l":t+=h[v++],i+=h[v++],p=s.L,e.addData(p,t,i);break;case"L":t=h[v++],i=h[v++],p=s.L,e.addData(p,t,i);break;case"m":t+=h[v++],i+=h[v++],p=s.M,e.addData(p,t,i),n=t,o=i,c="l";break;case"M":t=h[v++],i=h[v++],p=s.M,e.addData(p,t,i),n=t,o=i,c="L";break;case"h":t+=h[v++],p=s.L,e.addData(p,t,i);break;case"H":t=h[v++],p=s.L,e.addData(p,t,i);break;case"v":i+=h[v++],p=s.L,e.addData(p,t,i);break;case"V":i=h[v++],p=s.L,e.addData(p,t,i);break;case"C":p=s.C,e.addData(p,h[v++],h[v++],h[v++],h[v++],h[v++],h[v++]),t=h[v-2],i=h[v-1];break;case"c":p=s.C,e.addData(p,h[v++]+t,h[v++]+i,h[v++]+t,h[v++]+i,h[v++]+t,h[v++]+i),t+=h[v-2],i+=h[v-1];break;case"S":m=t,y=i,E=e.len(),M=e.data,a===s.C&&(m+=t-M[E-4],y+=i-M[E-3]),p=s.C,D=h[v++],b=h[v++],t=h[v++],i=h[v++],e.addData(p,m,y,D,b,t,i);break;case"s":m=t,y=i,E=e.len(),M=e.data,a===s.C&&(m+=t-M[E-4],y+=i-M[E-3]),p=s.C,D=t+h[v++],b=i+h[v++],t+=h[v++],i+=h[v++],e.addData(p,m,y,D,b,t,i);break;case"Q":D=h[v++],b=h[v++],t=h[v++],i=h[v++],p=s.Q,e.addData(p,D,b,t,i);break;case"q":D=h[v++]+t,b=h[v++]+i,t+=h[v++],i+=h[v++],p=s.Q,e.addData(p,D,b,t,i);break;case"T":m=t,y=i,E=e.len(),M=e.data,a===s.Q&&(m+=t-M[E-4],y+=i-M[E-3]),t=h[v++],i=h[v++],p=s.Q,e.addData(p,m,y,t,i);break;case"t":m=t,y=i,E=e.len(),M=e.data,a===s.Q&&(m+=t-M[E-4],y+=i-M[E-3]),t+=h[v++],i+=h[v++],p=s.Q,e.addData(p,m,y,t,i);break;case"A":_=h[v++],x=h[v++],C=h[v++],w=h[v++],T=h[v++],D=t,b=i,t=h[v++],i=h[v++],p=s.A,A0(D,b,t,i,w,T,_,x,C,p,e);break;case"a":_=h[v++],x=h[v++],C=h[v++],w=h[v++],T=h[v++],D=t,b=i,t+=h[v++],i+=h[v++],p=s.A,A0(D,b,t,i,w,T,_,x,C,p,e);break}}(c==="z"||c==="Z")&&(p=s.Z,e.addData(p),t=n,i=o),a=p}return e.toStatic(),e}var P0=(function(r){J(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.applyTransform=function(t){},e})(pe);function L0(r){return r.setData!=null}function N0(r,e){var t=_D(r),i=P({},e);return i.buildPath=function(n){if(L0(n)){n.setData(t.data);var o=n.getContext();o&&n.rebuildPath(o,1)}else{var o=n;t.rebuildPath(o,1)}},i.applyTransform=function(n){Rh(t,n),this.dirtyShape()},i}function k0(r,e){return new P0(N0(r,e))}function z0(r,e){var t=N0(r,e),i=(function(n){J(o,n);function o(a){var s=n.call(this,a)||this;return s.applyTransform=t.applyTransform,s.buildPath=t.buildPath,s}return o})(P0);return i}function F0(r,e){for(var t=[],i=r.length,n=0;n<i;n++){var o=r[n];t.push(o.getUpdatedPathProxy(!0))}var a=new pe(e);return a.createPathProxy(),a.buildPath=function(s){if(L0(s)){s.appendPath(t);var l=s.getContext();l&&s.rebuildPath(l,1)}},a}var SD=(function(){function r(){this.cx=0,this.cy=0,this.r=0}return r})();var B0=(function(r){J(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new SD},e.prototype.buildPath=function(t,i){t.moveTo(i.cx+i.r,i.cy),t.arc(i.cx,i.cy,i.r,0,Math.PI*2)},e})(pe);B0.prototype.type="circle";var Rn=B0;var wD=(function(){function r(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return r})();var W0=(function(r){J(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new wD},e.prototype.buildPath=function(t,i){var n=.5522848,o=i.cx,a=i.cy,s=i.rx,l=i.ry,u=s*n,f=l*n;t.moveTo(o-s,a),t.bezierCurveTo(o-s,a-f,o-u,a-l,o,a-l),t.bezierCurveTo(o+u,a-l,o+s,a-f,o+s,a),t.bezierCurveTo(o+s,a+f,o+u,a+l,o,a+l),t.bezierCurveTo(o-u,a+l,o-s,a+f,o-s,a),t.closePath()},e})(pe);W0.prototype.type="ellipse";var qa=W0;var H0=Math.PI,Ah=H0*2,On=Math.sin,No=Math.cos,CD=Math.acos,Mt=Math.atan2,U0=Math.abs,ja=Math.sqrt,Xa=Math.max,Gr=Math.min,Dr=1e-4;function TD(r,e,t,i,n,o,a,s){var l=t-r,u=i-e,f=a-n,c=s-o,p=c*l-f*u;if(!(p*p<Dr))return p=(f*(e-o)-c*(r-n))/p,[r+p*l,e+p*u]}function mu(r,e,t,i,n,o,a){var s=r-t,l=e-i,u=(a?o:-o)/ja(s*s+l*l),f=u*l,c=-u*s,p=r+f,h=e+c,d=t+f,g=i+c,v=(p+d)/2,m=(h+g)/2,y=d-p,_=g-h,x=y*y+_*_,C=n-o,w=p*g-d*h,T=(_<0?-1:1)*ja(Xa(0,C*C*x-w*w)),D=(w*_-y*T)/x,b=(-w*y-_*T)/x,E=(w*_+y*T)/x,M=(-w*y+_*T)/x,R=D-v,O=b-m,I=E-v,W=M-m;return R*R+O*O>I*I+W*W&&(D=E,b=M),{cx:D,cy:b,x0:-f,y0:-c,x1:D*(n/C-1),y1:b*(n/C-1)}}function bD(r){var e;if(L(r)){var t=r.length;if(!t)return r;t===1?e=[r[0],r[0],0,0]:t===2?e=[r[0],r[0],r[1],r[1]]:t===3?e=r.concat(r[2]):e=r}else e=[r,r,r,r];return e}function V0(r,e){var t,i=Xa(e.r,0),n=Xa(e.r0||0,0),o=i>0,a=n>0;if(!(!o&&!a)){if(o||(i=n,n=0),n>i){var s=i;i=n,n=s}var l=e.startAngle,u=e.endAngle;if(!(isNaN(l)||isNaN(u))){var f=e.cx,c=e.cy,p=!!e.clockwise,h=U0(u-l),d=h>Ah&&h%Ah;if(d>Dr&&(h=d),!(i>Dr))r.moveTo(f,c);else if(h>Ah-Dr)r.moveTo(f+i*No(l),c+i*On(l)),r.arc(f,c,i,l,u,!p),n>Dr&&(r.moveTo(f+n*No(u),c+n*On(u)),r.arc(f,c,n,u,l,p));else{var g=void 0,v=void 0,m=void 0,y=void 0,_=void 0,x=void 0,C=void 0,w=void 0,T=void 0,D=void 0,b=void 0,E=void 0,M=void 0,R=void 0,O=void 0,I=void 0,W=i*No(l),U=i*On(l),de=n*No(u),fe=n*On(u),ae=h>Dr;if(ae){var Me=e.cornerRadius;Me&&(t=bD(Me),g=t[0],v=t[1],m=t[2],y=t[3]);var Ve=U0(i-n)/2;if(_=Gr(Ve,m),x=Gr(Ve,y),C=Gr(Ve,g),w=Gr(Ve,v),b=T=Xa(_,x),E=D=Xa(C,w),(T>Dr||D>Dr)&&(M=i*No(u),R=i*On(u),O=n*No(l),I=n*On(l),h<H0)){var Ae=TD(W,U,O,I,M,R,de,fe);if(Ae){var At=W-Ae[0],ne=U-Ae[1],A=M-Ae[0],H=R-Ae[1],V=1/On(CD((At*A+ne*H)/(ja(At*At+ne*ne)*ja(A*A+H*H)))/2),se=ja(Ae[0]*Ae[0]+Ae[1]*Ae[1]);b=Gr(T,(i-se)/(V+1)),E=Gr(D,(n-se)/(V-1))}}}if(!ae)r.moveTo(f+W,c+U);else if(b>Dr){var K=Gr(m,b),oe=Gr(y,b),k=mu(O,I,W,U,i,K,p),G=mu(M,R,de,fe,i,oe,p);r.moveTo(f+k.cx+k.x0,c+k.cy+k.y0),b<T&&K===oe?r.arc(f+k.cx,c+k.cy,b,Mt(k.y0,k.x0),Mt(G.y0,G.x0),!p):(K>0&&r.arc(f+k.cx,c+k.cy,K,Mt(k.y0,k.x0),Mt(k.y1,k.x1),!p),r.arc(f,c,i,Mt(k.cy+k.y1,k.cx+k.x1),Mt(G.cy+G.y1,G.cx+G.x1),!p),oe>0&&r.arc(f+G.cx,c+G.cy,oe,Mt(G.y1,G.x1),Mt(G.y0,G.x0),!p))}else r.moveTo(f+W,c+U),r.arc(f,c,i,l,u,!p);if(!(n>Dr)||!ae)r.lineTo(f+de,c+fe);else if(E>Dr){var K=Gr(g,E),oe=Gr(v,E),k=mu(de,fe,M,R,n,-oe,p),G=mu(W,U,O,I,n,-K,p);r.lineTo(f+k.cx+k.x0,c+k.cy+k.y0),E<D&&K===oe?r.arc(f+k.cx,c+k.cy,E,Mt(k.y0,k.x0),Mt(G.y0,G.x0),!p):(oe>0&&r.arc(f+k.cx,c+k.cy,oe,Mt(k.y0,k.x0),Mt(k.y1,k.x1),!p),r.arc(f,c,n,Mt(k.cy+k.y1,k.cx+k.x1),Mt(G.cy+G.y1,G.cx+G.x1),p),K>0&&r.arc(f+G.cx,c+G.cy,K,Mt(G.y1,G.x1),Mt(G.y0,G.x0),!p))}else r.lineTo(f+de,c+fe),r.arc(f,c,n,u,l,p)}r.closePath()}}}var MD=(function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return r})();var G0=(function(r){J(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new MD},e.prototype.buildPath=function(t,i){V0(t,i)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e})(pe);G0.prototype.type="sector";var Za=G0;var ED=(function(){function r(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return r})();var Y0=(function(r){J(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new ED},e.prototype.buildPath=function(t,i){var n=i.cx,o=i.cy,a=Math.PI*2;t.moveTo(n+i.r,o),t.arc(n,o,i.r,0,a,!1),t.moveTo(n+i.r0,o),t.arc(n,o,i.r0,0,a,!0)},e})(pe);Y0.prototype.type="ring";var Ka=Y0;function Ph(r,e,t,i){var n=[],o=[],a=[],s=[],l,u,f,c;if(i){f=[1/0,1/0],c=[-1/0,-1/0];for(var p=0,h=r.length;p<h;p++)Qr(f,f,r[p]),Jr(c,c,r[p]);Qr(f,f,i[0]),Jr(c,c,i[1])}for(var p=0,h=r.length;p<h;p++){var d=r[p];if(t)l=r[p?p-1:h-1],u=r[(p+1)%h];else if(p===0||p===h-1){n.push(Cg(r[p]));continue}else l=r[p-1],u=r[p+1];Tg(o,u,l),Tl(o,o,e);var g=bl(d,l),v=bl(d,u),m=g+v;m!==0&&(g/=m,v/=m),Tl(a,o,-g),Tl(s,o,v);var y=Dc([],d,a),_=Dc([],d,s);i&&(Jr(y,y,f),Qr(y,y,c),Jr(_,_,f),Qr(_,_,c)),n.push(y),n.push(_)}return t&&n.push(n.shift()),n}function gu(r,e,t){var i=e.smooth,n=e.points;if(n&&n.length>=2){if(i){var o=Ph(n,i,t,e.smoothConstraint);r.moveTo(n[0][0],n[0][1]);for(var a=n.length,s=0;s<(t?a:a-1);s++){var l=o[s*2],u=o[s*2+1],f=n[(s+1)%a];r.bezierCurveTo(l[0],l[1],u[0],u[1],f[0],f[1])}}else{r.moveTo(n[0][0],n[0][1]);for(var s=1,c=n.length;s<c;s++)r.lineTo(n[s][0],n[s][1])}t&&r.closePath()}}var RD=(function(){function r(){this.points=null,this.smooth=0,this.smoothConstraint=null}return r})();var X0=(function(r){J(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new RD},e.prototype.buildPath=function(t,i){gu(t,i,!0)},e})(pe);X0.prototype.type="polygon";var $a=X0;var OD=(function(){function r(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return r})();var j0=(function(r){J(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new OD},e.prototype.buildPath=function(t,i){gu(t,i,!1)},e})(pe);j0.prototype.type="polyline";var In=j0;var ID={},AD=(function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return r})();var Z0=(function(r){J(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new AD},e.prototype.buildPath=function(t,i){var n,o,a,s;if(this.subPixelOptimize){var l=eu(ID,i,this.style);n=l.x1,o=l.y1,a=l.x2,s=l.y2}else n=i.x1,o=i.y1,a=i.x2,s=i.y2;var u=i.percent;u!==0&&(t.moveTo(n,o),u<1&&(a=n*(1-u)+a*u,s=o*(1-u)+s*u),t.lineTo(a,s))},e.prototype.pointAt=function(t){var i=this.shape;return[i.x1*(1-t)+i.x2*t,i.y1*(1-t)+i.y2*t]},e})(pe);Z0.prototype.type="line";var Yr=Z0;var Yt=[],PD=(function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1}return r})();function K0(r,e,t){var i=r.cpx2,n=r.cpy2;return i!=null||n!=null?[(t?Rc:Ze)(r.x1,r.cpx1,r.cpx2,r.x2,e),(t?Rc:Ze)(r.y1,r.cpy1,r.cpy2,r.y2,e)]:[(t?Oc:nt)(r.x1,r.cpx1,r.x2,e),(t?Oc:nt)(r.y1,r.cpy1,r.y2,e)]}var $0=(function(r){J(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new PD},e.prototype.buildPath=function(t,i){var n=i.x1,o=i.y1,a=i.x2,s=i.y2,l=i.cpx1,u=i.cpy1,f=i.cpx2,c=i.cpy2,p=i.percent;p!==0&&(t.moveTo(n,o),f==null||c==null?(p<1&&(xo(n,l,a,p,Yt),l=Yt[1],a=Yt[2],xo(o,u,s,p,Yt),u=Yt[1],s=Yt[2]),t.quadraticCurveTo(l,u,a,s)):(p<1&&(_o(n,l,f,a,p,Yt),l=Yt[1],f=Yt[2],a=Yt[3],_o(o,u,c,s,p,Yt),u=Yt[1],c=Yt[2],s=Yt[3]),t.bezierCurveTo(l,u,f,c,a,s)))},e.prototype.pointAt=function(t){return K0(this.shape,t,!1)},e.prototype.tangentAt=function(t){var i=K0(this.shape,t,!0);return bg(i,i)},e})(pe);$0.prototype.type="bezier-curve";var Qa=$0;var LD=(function(){function r(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return r})();var Q0=(function(r){J(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new LD},e.prototype.buildPath=function(t,i){var n=i.cx,o=i.cy,a=Math.max(i.r,0),s=i.startAngle,l=i.endAngle,u=i.clockwise,f=Math.cos(s),c=Math.sin(s);t.moveTo(f*a+n,c*a+o),t.arc(n,o,a,s,l,!u)},e})(pe);Q0.prototype.type="arc";var An=Q0;var ND=(function(r){J(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="compound",t}return e.prototype._updatePathDirty=function(){for(var t=this.shape.paths,i=this.shapeChanged(),n=0;n<t.length;n++)i=i||t[n].shapeChanged();i&&this.dirtyShape()},e.prototype.beforeBrush=function(){this._updatePathDirty();for(var t=this.shape.paths||[],i=this.getGlobalScale(),n=0;n<t.length;n++)t[n].path||t[n].createPathProxy(),t[n].path.setScale(i[0],i[1],t[n].segmentIgnoreThreshold)},e.prototype.buildPath=function(t,i){for(var n=i.paths||[],o=0;o<n.length;o++)n[o].buildPath(t,n[o].shape,!0)},e.prototype.afterBrush=function(){for(var t=this.shape.paths||[],i=0;i<t.length;i++)t[i].pathUpdated()},e.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),pe.prototype.getBoundingRect.call(this)},e})(pe),yu=ND;var kD=(function(){function r(e){this.colorStops=e||[]}return r.prototype.addColorStop=function(e,t){this.colorStops.push({offset:e,color:t})},r})(),_u=kD;var zD=(function(r){J(e,r);function e(t,i,n,o,a,s){var l=r.call(this,a)||this;return l.x=t??0,l.y=i??0,l.x2=n??1,l.y2=o??0,l.type="linear",l.global=s||!1,l}return e})(_u),xu=zD;var FD=(function(r){J(e,r);function e(t,i,n,o,a){var s=r.call(this,o)||this;return s.x=t??.5,s.y=i??.5,s.r=n??.5,s.type="radial",s.global=a||!1,s}return e})(_u),Su=FD;var Pn=[0,0],Ln=[0,0],wu=new ve,Cu=new ve,BD=(function(){function r(e,t){this._corners=[],this._axes=[],this._origin=[0,0];for(var i=0;i<4;i++)this._corners[i]=new ve;for(var i=0;i<2;i++)this._axes[i]=new ve;e&&this.fromBoundingRect(e,t)}return r.prototype.fromBoundingRect=function(e,t){var i=this._corners,n=this._axes,o=e.x,a=e.y,s=o+e.width,l=a+e.height;if(i[0].set(o,a),i[1].set(s,a),i[2].set(s,l),i[3].set(o,l),t)for(var u=0;u<4;u++)i[u].transform(t);ve.sub(n[0],i[1],i[0]),ve.sub(n[1],i[3],i[0]),n[0].normalize(),n[1].normalize();for(var u=0;u<2;u++)this._origin[u]=n[u].dot(i[0])},r.prototype.intersect=function(e,t){var i=!0,n=!t;return wu.set(1/0,1/0),Cu.set(0,0),!this._intersectCheckOneSide(this,e,wu,Cu,n,1)&&(i=!1,n)||!this._intersectCheckOneSide(e,this,wu,Cu,n,-1)&&(i=!1,n)||n||ve.copy(t,i?wu:Cu),i},r.prototype._intersectCheckOneSide=function(e,t,i,n,o,a){for(var s=!0,l=0;l<2;l++){var u=this._axes[l];if(this._getProjMinMaxOnAxis(l,e._corners,Pn),this._getProjMinMaxOnAxis(l,t._corners,Ln),Pn[1]<Ln[0]||Pn[0]>Ln[1]){if(s=!1,o)return s;var f=Math.abs(Ln[0]-Pn[1]),c=Math.abs(Pn[0]-Ln[1]);Math.min(f,c)>n.len()&&(f<c?ve.scale(n,u,-f*a):ve.scale(n,u,c*a))}else if(i){var f=Math.abs(Ln[0]-Pn[1]),c=Math.abs(Pn[0]-Ln[1]);Math.min(f,c)<i.len()&&(f<c?ve.scale(i,u,f*a):ve.scale(i,u,-c*a))}}return s},r.prototype._getProjMinMaxOnAxis=function(e,t,i){for(var n=this._axes[e],o=this._origin,a=t[0].dot(n)+o[e],s=a,l=a,u=1;u<t.length;u++){var f=t[u].dot(n)+o[e];s=Math.min(f,s),l=Math.max(f,l)}i[0]=s,i[1]=l},r})(),ko=BD;var WD=[],UD=(function(r){J(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.notClear=!0,t.incremental=!0,t._displayables=[],t._temporaryDisplayables=[],t._cursor=0,t}return e.prototype.traverse=function(t,i){t.call(i,this)},e.prototype.useStyle=function(){this.style={}},e.prototype.getCursor=function(){return this._cursor},e.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},e.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},e.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},e.prototype.addDisplayable=function(t,i){i?this._temporaryDisplayables.push(t):this._displayables.push(t),this.markRedraw()},e.prototype.addDisplayables=function(t,i){i=i||!1;for(var n=0;n<t.length;n++)this.addDisplayable(t[n],i)},e.prototype.getDisplayables=function(){return this._displayables},e.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},e.prototype.eachPendingDisplayable=function(t){for(var i=this._cursor;i<this._displayables.length;i++)t&&t(this._displayables[i]);for(var i=0;i<this._temporaryDisplayables.length;i++)t&&t(this._temporaryDisplayables[i])},e.prototype.update=function(){this.updateTransform();for(var t=this._cursor;t<this._displayables.length;t++){var i=this._displayables[t];i.parent=this,i.update(),i.parent=null}for(var t=0;t<this._temporaryDisplayables.length;t++){var i=this._temporaryDisplayables[t];i.parent=this,i.update(),i.parent=null}},e.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new ue(1/0,1/0,-1/0,-1/0),i=0;i<this._displayables.length;i++){var n=this._displayables[i],o=n.getBoundingRect().clone();n.needLocalTransform()&&o.applyTransform(n.getLocalTransform(WD)),t.union(o)}this._rect=t}return this._rect},e.prototype.contain=function(t,i){var n=this.transformCoordToLocal(t,i),o=this.getBoundingRect();if(o.contain(n[0],n[1]))for(var a=0;a<this._displayables.length;a++){var s=this._displayables[a];if(s.contain(t,i))return!0}return!1},e})(Wr),Tu=UD;var XF=ye();function HD(r,e,t,i,n){var o;if(e&&e.ecModel){var a=e.ecModel.getUpdatePayload();o=a&&a.animation}var s=e&&e.isAnimationEnabled(),l=r==="update";if(s){var u=void 0,f=void 0,c=void 0;i?(u=te(i.duration,200),f=te(i.easing,"cubicOut"),c=0):(u=e.getShallow(l?"animationDurationUpdate":"animationDuration"),f=e.getShallow(l?"animationEasingUpdate":"animationEasing"),c=e.getShallow(l?"animationDelayUpdate":"animationDelay")),o&&(o.duration!=null&&(u=o.duration),o.easing!=null&&(f=o.easing),o.delay!=null&&(c=o.delay)),j(c)&&(c=c(t,n)),j(u)&&(u=u(t));var p={duration:u||0,delay:c,easing:f};return p}else return null}function Lh(r,e,t,i,n,o,a){var s=!1,l;j(n)?(a=o,o=n,n=null):F(n)&&(o=n.cb,a=n.during,s=n.isFrom,l=n.removeOpt,n=n.dataIndex);var u=r==="leave";u||e.stopAnimation("leave");var f=HD(r,i,n,u?l||{}:null,i&&i.getAnimationDelayParams?i.getAnimationDelayParams(e,n):null);if(f&&f.duration>0){var c=f.duration,p=f.delay,h=f.easing,d={duration:c,delay:p||0,easing:h,done:o,force:!!o||!!a,setToFinal:!u,scope:r,during:a};s?e.animateFrom(t,d):e.animateTo(t,d)}else e.stopAnimation(),!s&&e.attr(t),a&&a(1),o&&o()}function yr(r,e,t,i,n,o){Lh("update",r,e,t,i,n,o)}function li(r,e,t,i,n,o){Lh("enter",r,e,t,i,n,o)}function ui(r){if(!r.__zr)return!0;for(var e=0;e<r.animators.length;e++){var t=r.animators[e];if(t.scope==="leave")return!0}return!1}function Nh(r,e,t,i,n,o){ui(r)||Lh("leave",r,e,t,i,n,o)}function J0(r,e,t,i){r.removeTextContent(),r.removeTextGuideLine(),Nh(r,{style:{opacity:0}},e,t,i)}function e_(r,e,t){function i(){r.parent&&r.parent.remove(r)}r.isGroup?r.traverse(function(n){n.isGroup||J0(n,e,t,i)}):J0(r,e,t,i)}var bu=Math.max,Du=Math.min,zh={};function Fh(r){return pe.extend(r)}var VD=z0;function Bh(r,e){return VD(r,e)}function or(r,e){zh[r]=e}function Wh(r){if(zh.hasOwnProperty(r))return zh[r]}function zo(r,e,t,i){var n=k0(r,e);return t&&(i==="center"&&(t=i_(t,n.getBoundingRect())),Mu(n,t)),n}function Ja(r,e,t){var i=new mr({style:{image:r,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(n){if(t==="center"){var o={width:n.width,height:n.height};i.setStyle(i_(e,o))}}});return i}function i_(r,e){var t=e.width/e.height,i=r.height*t,n;i<=r.width?n=r.height:(i=r.width,n=i/t);var o=r.x+r.width/2,a=r.y+r.height/2;return{x:o-i/2,y:a-n/2,width:i,height:n}}var Uh=F0;function Mu(r,e){if(r.applyTransform){var t=r.getBoundingRect(),i=t.calculateTransform(e);r.applyTransform(i)}}function Eu(r,e){return eu(r,r,{lineWidth:e}),r}function GD(r){return tu(r.shape,r.shape,r.style),r}var YD=Ai;function Hh(r,e){for(var t=po([]);r&&r!==e;)$r(t,r.getLocalTransform(),t),r=r.parent;return t}function Ru(r,e,t){return e&&!et(e)&&(e=cn.getLocalTransform(e)),t&&(e=mo([],e)),Ht([],r,e)}function qD(r,e,t){var i=e[4]===0||e[5]===0||e[0]===0?1:Math.abs(2*e[4]/e[0]),n=e[4]===0||e[5]===0||e[2]===0?1:Math.abs(2*e[4]/e[2]),o=[r==="left"?-i:r==="right"?i:0,r==="top"?-n:r==="bottom"?n:0];return o=Ru(o,e,t),Math.abs(o[0])>Math.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function t_(r){return!r.isGroup}function XD(r){return r.shape!=null}function jD(r,e,t){if(!r||!e)return;function i(a){var s={};return a.traverse(function(l){t_(l)&&l.anid&&(s[l.anid]=l)}),s}function n(a){var s={x:a.x,y:a.y,rotation:a.rotation};return XD(a)&&(s.shape=P({},a.shape)),s}var o=i(r);e.traverse(function(a){if(t_(a)&&a.anid){var s=o[a.anid];if(s){var l=n(a);a.attr(n(s)),yr(a,l,t,Re(a).dataIndex)}}})}function Vh(r,e){return X(r,function(t){var i=t[0];i=bu(i,e.x),i=Du(i,e.x+e.width);var n=t[1];return n=bu(n,e.y),n=Du(n,e.y+e.height),[i,n]})}function Gh(r,e){var t=bu(r.x,e.x),i=Du(r.x+r.width,e.x+e.width),n=bu(r.y,e.y),o=Du(r.y+r.height,e.y+e.height);if(i>=t&&o>=n)return{x:t,y:n,width:i-t,height:o-n}}function es(r,e,t){var i=P({rectHover:!0},e),n=i.style={strokeNoScale:!0};if(t=t||{x:-1,y:-1,width:2,height:2},r)return r.indexOf("image://")===0?(n.image=r.slice(8),ce(n,t),new mr(i)):zo(r.replace("path://",""),i,t,"center")}function ZD(r,e,t,i,n){for(var o=0,a=n[n.length-1];o<n.length;o++){var s=n[o];if(n_(r,e,t,i,s[0],s[1],a[0],a[1]))return!0;a=s}}function n_(r,e,t,i,n,o,a,s){var l=t-r,u=i-e,f=a-n,c=s-o,p=kh(f,c,l,u);if(KD(p))return!1;var h=r-n,d=e-o,g=kh(h,d,l,u)/p;if(g<0||g>1)return!1;var v=kh(h,d,f,c)/p;return!(v<0||v>1)}function kh(r,e,t,i){return r*i-t*e}function KD(r){return r<=1e-6&&r>=-1e-6}function Ou(r){var e=r.itemTooltipOption,t=r.componentModel,i=r.itemName,n=N(e)?{formatter:e}:e,o=t.mainType,a=t.componentIndex,s={componentType:o,name:i,$vars:["name"]};s[o+"Index"]=a;var l=r.formatterParamsExtra;l&&S(me(l),function(f){br(s,f)||(s[f]=l[f],s.$vars.push(f))});var u=Re(r.el);u.componentMainType=o,u.componentIndex=a,u.tooltipConfig={name:i,option:ce({content:i,encodeHTMLContent:!0,formatterParams:s},n)}}function r_(r,e){var t;r.isGroup&&(t=e(r)),t||r.traverse(e)}function Yh(r,e){if(r)if(L(r))for(var t=0;t<r.length;t++)r_(r[t],e);else r_(r,e)}or("circle",Rn);or("ellipse",qa);or("sector",Za);or("ring",Ka);or("polygon",$a);or("polyline",In);or("rect",ft);or("line",Yr);or("bezierCurve",Qa);or("arc",An);var qh={};function $D(r,e){for(var t=0;t<Li.length;t++){var i=Li[t],n=e[i],o=r.ensureState(i);o.style=o.style||{},o.style.text=n}var a=r.currentStates.slice();r.clearStates(!0),r.setStyle({text:e.normal}),r.useStates(a,!0)}function QD(r,e,t){var i=r.labelFetcher,n=r.labelDataIndex,o=r.labelDimIndex,a=e.normal,s;i&&(s=i.getFormattedLabel(n,"normal",null,o,a&&a.get("formatter"),t!=null?{interpolatedValue:t}:null)),s==null&&(s=j(r.defaultText)?r.defaultText(n,r,t):r.defaultText);for(var l={normal:s},u=0;u<Li.length;u++){var f=Li[u],c=e[f];l[f]=te(i?i.getFormattedLabel(n,f,null,o,c&&c.get("formatter")):null,s)}return l}function Nn(r,e,t,i,n){var o={};return JD(o,r,t,i,n),e&&P(o,e),o}function JD(r,e,t,i,n){t=t||qh;var o=e.ecModel,a=o&&o.option.textStyle,s=eM(e),l;if(s){l={};for(var u in s)if(s.hasOwnProperty(u)){var f=e.getModel(["rich",u]);l_(l[u]={},f,a,t,i,n,!1,!0)}}l&&(r.rich=l);var c=e.get("overflow");c&&(r.overflow=c);var p=e.get("minMargin");p!=null&&(r.margin=p),l_(r,e,a,t,i,n,!0,!1)}function eM(r){for(var e;r&&r!==r.ecModel;){var t=(r.option||qh).rich;if(t){e=e||{};for(var i=me(t),n=0;n<i.length;n++){var o=i[n];e[o]=1}}r=r.parentModel}return e}var o_=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],a_=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],s_=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function l_(r,e,t,i,n,o,a,s){t=!n&&t||qh;var l=i&&i.inheritColor,u=e.getShallow("color"),f=e.getShallow("textBorderColor"),c=te(e.getShallow("opacity"),t.opacity);(u==="inherit"||u==="auto")&&(l?u=l:u=null),(f==="inherit"||f==="auto")&&(l?f=l:f=null),o||(u=u||t.color,f=f||t.textBorderColor),u!=null&&(r.fill=u),f!=null&&(r.stroke=f);var p=te(e.getShallow("textBorderWidth"),t.textBorderWidth);p!=null&&(r.lineWidth=p);var h=te(e.getShallow("textBorderType"),t.textBorderType);h!=null&&(r.lineDash=h);var d=te(e.getShallow("textBorderDashOffset"),t.textBorderDashOffset);d!=null&&(r.lineDashOffset=d),!n&&c==null&&!s&&(c=i&&i.defaultOpacity),c!=null&&(r.opacity=c),!n&&!o&&r.fill==null&&i.inheritColor&&(r.fill=i.inheritColor);for(var g=0;g<o_.length;g++){var v=o_[g],m=te(e.getShallow(v),t[v]);m!=null&&(r[v]=m)}for(var g=0;g<a_.length;g++){var v=a_[g],m=e.getShallow(v);m!=null&&(r[v]=m)}if(r.verticalAlign==null){var y=e.getShallow("baseline");y!=null&&(r.verticalAlign=y)}if(!a||!i.disableBox){for(var g=0;g<s_.length;g++){var v=s_[g],m=e.getShallow(v);m!=null&&(r[v]=m)}var _=e.getShallow("borderType");_!=null&&(r.borderDash=_),(r.backgroundColor==="auto"||r.backgroundColor==="inherit")&&l&&(r.backgroundColor=l),(r.borderColor==="auto"||r.borderColor==="inherit")&&l&&(r.borderColor=l)}}function u_(r,e){var t=e&&e.getModel("textStyle");return xt([r.fontStyle||t&&t.getShallow("fontStyle")||"",r.fontWeight||t&&t.getShallow("fontWeight")||"",(r.fontSize||t&&t.getShallow("fontSize")||12)+"px",r.fontFamily||t&&t.getShallow("fontFamily")||"sans-serif"].join(" "))}var Xh=ye();function f_(r,e,t,i,n){var o=Xh(r);if(!o.valueAnimation||o.prevValue===o.value)return;var a=o.defaultInterpolatedText,s=te(o.interpolatedValue,o.prevValue),l=o.value;function u(f){var c=s0(t,o.precision,s,l,f);o.interpolatedValue=f===1?null:c;var p=QD({labelDataIndex:e,labelFetcher:n,defaultText:a?a(c):c+""},o.statesModels,c);$D(r,p)}r.percent=0,(o.prevValue==null?li:yr)(r,{percent:1},i,e,null,u)}var tM=["textStyle","color"],jh=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],Zh=new Ct,rM=(function(){function r(){}return r.prototype.getTextColor=function(e){var t=this.ecModel;return this.getShallow("color")||(!e&&t?t.get(tM):null)},r.prototype.getFont=function(){return u_({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},r.prototype.getTextRect=function(e){for(var t={text:e,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},i=0;i<jh.length;i++)t[jh[i]]=this.getShallow(jh[i]);return Zh.useStyle(t),Zh.update(),Zh.getBoundingRect()},r})(),c_=rM;var Kh=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],iM=Fr(Kh),h_=(function(){function r(){}return r.prototype.getLineStyle=function(e){return iM(this,e)},r})();var $h=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],nM=Fr($h),p_=(function(){function r(){}return r.prototype.getItemStyle=function(e,t){return nM(this,e,t)},r})();var kn=(function(){function r(e,t,i){this.parentModel=t,this.ecModel=i,this.option=e}return r.prototype.init=function(e,t,i){for(var n=[],o=3;o<arguments.length;o++)n[o-3]=arguments[o]},r.prototype.mergeOption=function(e,t){Ee(this.option,e,!0)},r.prototype.get=function(e,t){return e==null?this.option:this._doGet(this.parsePath(e),!t&&this.parentModel)},r.prototype.getShallow=function(e,t){var i=this.option,n=i==null?i:i[e];if(n==null&&!t){var o=this.parentModel;o&&(n=o.getShallow(e))}return n},r.prototype.getModel=function(e,t){var i=e!=null,n=i?this.parsePath(e):null,o=i?this._doGet(n):this.option;return t=t||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(n)),new r(o,t,this.ecModel)},r.prototype.isEmpty=function(){return this.option==null},r.prototype.restoreData=function(){},r.prototype.clone=function(){var e=this.constructor;return new e(re(this.option))},r.prototype.parsePath=function(e){return typeof e=="string"?e.split("."):e},r.prototype.resolveParentPath=function(e){return e},r.prototype.isAnimationEnabled=function(){if(!Q.node&&this.option){if(this.option.animation!=null)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},r.prototype._doGet=function(e,t){var i=this.option;if(!e)return i;for(var n=0;n<e.length&&!(e[n]&&(i=i&&typeof i=="object"?i[e[n]]:null,i==null));n++);return i==null&&t&&(i=t._doGet(this.resolveParentPath(e),t.parentModel)),i},r})();bo(kn);ry(kn);Lt(kn,h_);Lt(kn,p_);Lt(kn,oy);Lt(kn,c_);var ze=kn;var oM=Math.log(2);function Qh(r,e,t,i,n,o){var a=i+"-"+n,s=r.length;if(o.hasOwnProperty(a))return o[a];if(e===1){var l=Math.round(Math.log((1<<s)-1&~n)/oM);return r[t][l]}for(var u=i|1<<t,f=t+1;i&1<<f;)f++;for(var c=0,p=0,h=0;p<s;p++){var d=1<<p;d&n||(c+=(h%2?-1:1)*r[t][p]*Qh(r,e-1,f,u,n|d,o),h++)}return o[a]=c,c}function Jh(r,e){var t=[[r[0],r[1],1,0,0,0,-e[0]*r[0],-e[0]*r[1]],[0,0,0,r[0],r[1],1,-e[1]*r[0],-e[1]*r[1]],[r[2],r[3],1,0,0,0,-e[2]*r[2],-e[2]*r[3]],[0,0,0,r[2],r[3],1,-e[3]*r[2],-e[3]*r[3]],[r[4],r[5],1,0,0,0,-e[4]*r[4],-e[4]*r[5]],[0,0,0,r[4],r[5],1,-e[5]*r[4],-e[5]*r[5]],[r[6],r[7],1,0,0,0,-e[6]*r[6],-e[6]*r[7]],[0,0,0,r[6],r[7],1,-e[7]*r[6],-e[7]*r[7]]],i={},n=Qh(t,8,0,0,0,i);if(n!==0){for(var o=[],a=0;a<8;a++)for(var s=0;s<8;s++)o[s]==null&&(o[s]=0),o[s]+=((a+s)%2?-1:1)*Qh(t,7,a===0?1:0,1<<a,1<<s,i)/n*e[a];return function(l,u,f){var c=u*o[6]+f*o[7]+1;l[0]=(u*o[0]+f*o[1]+o[2])/c,l[1]=(u*o[3]+f*o[4]+o[5])/c}}}var d_="___zrEVENTSAVED",ep=[];function v_(r,e,t,i,n){return Iu(ep,e,i,n,!0)&&Iu(r,t,ep[0],ep[1])}function Iu(r,e,t,i,n){if(e.getBoundingClientRect&&Q.domSupported&&!tp(e)){var o=e[d_]||(e[d_]={}),a=aM(e,o),s=sM(a,o,n);if(s)return s(r,t,i),!0}return!1}function aM(r,e){var t=e.markers;if(t)return t;t=e.markers=[];for(var i=["left","right"],n=["top","bottom"],o=0;o<4;o++){var a=document.createElement("div"),s=a.style,l=o%2,u=(o>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[l]+":0",n[u]+":0",i[1-l]+":auto",n[1-u]+":auto",""].join("!important;"),r.appendChild(a),t.push(a)}return t}function sM(r,e,t){for(var i=t?"invTrans":"trans",n=e[i],o=e.srcCoords,a=[],s=[],l=!0,u=0;u<4;u++){var f=r[u].getBoundingClientRect(),c=2*u,p=f.left,h=f.top;a.push(p,h),l=l&&o&&p===o[c]&&h===o[c+1],s.push(r[u].offsetLeft,r[u].offsetTop)}return l&&n?n:(e.srcCoords=a,e[i]=t?Jh(s,a):Jh(a,s))}function tp(r){return r.nodeName.toUpperCase()==="CANVAS"}var lM=/([&<>"'])/g,uM={"&":"&","<":"<",">":">",'"':""","'":"'"};function ot(r){return r==null?"":(r+"").replace(lM,function(e,t){return uM[t]})}var m_={time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}};var g_={time:{month:["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"],monthAbbr:["1\u6708","2\u6708","3\u6708","4\u6708","5\u6708","6\u6708","7\u6708","8\u6708","9\u6708","10\u6708","11\u6708","12\u6708"],dayOfWeek:["\u661F\u671F\u65E5","\u661F\u671F\u4E00","\u661F\u671F\u4E8C","\u661F\u671F\u4E09","\u661F\u671F\u56DB","\u661F\u671F\u4E94","\u661F\u671F\u516D"],dayOfWeekAbbr:["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"]},legend:{selector:{all:"\u5168\u9009",inverse:"\u53CD\u9009"}},toolbox:{brush:{title:{rect:"\u77E9\u5F62\u9009\u62E9",polygon:"\u5708\u9009",lineX:"\u6A2A\u5411\u9009\u62E9",lineY:"\u7EB5\u5411\u9009\u62E9",keep:"\u4FDD\u6301\u9009\u62E9",clear:"\u6E05\u9664\u9009\u62E9"}},dataView:{title:"\u6570\u636E\u89C6\u56FE",lang:["\u6570\u636E\u89C6\u56FE","\u5173\u95ED","\u5237\u65B0"]},dataZoom:{title:{zoom:"\u533A\u57DF\u7F29\u653E",back:"\u533A\u57DF\u7F29\u653E\u8FD8\u539F"}},magicType:{title:{line:"\u5207\u6362\u4E3A\u6298\u7EBF\u56FE",bar:"\u5207\u6362\u4E3A\u67F1\u72B6\u56FE",stack:"\u5207\u6362\u4E3A\u5806\u53E0",tiled:"\u5207\u6362\u4E3A\u5E73\u94FA"}},restore:{title:"\u8FD8\u539F"},saveAsImage:{title:"\u4FDD\u5B58\u4E3A\u56FE\u7247",lang:["\u53F3\u952E\u53E6\u5B58\u4E3A\u56FE\u7247"]}},series:{typeNames:{pie:"\u997C\u56FE",bar:"\u67F1\u72B6\u56FE",line:"\u6298\u7EBF\u56FE",scatter:"\u6563\u70B9\u56FE",effectScatter:"\u6D9F\u6F2A\u6563\u70B9\u56FE",radar:"\u96F7\u8FBE\u56FE",tree:"\u6811\u56FE",treemap:"\u77E9\u5F62\u6811\u56FE",boxplot:"\u7BB1\u578B\u56FE",candlestick:"K\u7EBF\u56FE",k:"K\u7EBF\u56FE",heatmap:"\u70ED\u529B\u56FE",map:"\u5730\u56FE",parallel:"\u5E73\u884C\u5750\u6807\u56FE",lines:"\u7EBF\u56FE",graph:"\u5173\u7CFB\u56FE",sankey:"\u6851\u57FA\u56FE",funnel:"\u6F0F\u6597\u56FE",gauge:"\u4EEA\u8868\u76D8\u56FE",pictorialBar:"\u8C61\u5F62\u67F1\u56FE",themeRiver:"\u4E3B\u9898\u6CB3\u6D41\u56FE",sunburst:"\u65ED\u65E5\u56FE",custom:"\u81EA\u5B9A\u4E49\u56FE\u8868",chart:"\u56FE\u8868"}},aria:{general:{withTitle:"\u8FD9\u662F\u4E00\u4E2A\u5173\u4E8E\u201C{title}\u201D\u7684\u56FE\u8868\u3002",withoutTitle:"\u8FD9\u662F\u4E00\u4E2A\u56FE\u8868\uFF0C"},series:{single:{prefix:"",withName:"\u56FE\u8868\u7C7B\u578B\u662F{seriesType}\uFF0C\u8868\u793A{seriesName}\u3002",withoutName:"\u56FE\u8868\u7C7B\u578B\u662F{seriesType}\u3002"},multiple:{prefix:"\u5B83\u7531{seriesCount}\u4E2A\u56FE\u8868\u7CFB\u5217\u7EC4\u6210\u3002",withName:"\u7B2C{seriesId}\u4E2A\u7CFB\u5217\u662F\u4E00\u4E2A\u8868\u793A{seriesName}\u7684{seriesType}\uFF0C",withoutName:"\u7B2C{seriesId}\u4E2A\u7CFB\u5217\u662F\u4E00\u4E2A{seriesType}\uFF0C",separator:{middle:"\uFF1B",end:"\u3002"}}},data:{allData:"\u5176\u6570\u636E\u662F\u2014\u2014",partialData:"\u5176\u4E2D\uFF0C\u524D{displayCnt}\u9879\u662F\u2014\u2014",withName:"{name}\u7684\u6570\u636E\u662F{value}",withoutName:"{value}",separator:{middle:"\uFF0C",end:""}}}};var Pu="ZH",rp="EN",Fo=rp,Au={},ip={},Lu=Q.domSupported?(function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage||Fo).toUpperCase();return r.indexOf(Pu)>-1?Pu:Fo})():Fo;function y_(r,e){r=r.toUpperCase(),ip[r]=new ze(e),Au[r]=e}function __(r){if(N(r)){var e=Au[r.toUpperCase()]||{};return r===Pu||r===rp?re(e):Ee(re(e),re(Au[Fo]),!1)}else return Ee(re(r),re(Au[Fo]),!1)}function x_(r){return ip[r]}function S_(){return ip[Fo]}y_(rp,m_);y_(Pu,g_);var ku=1e3,zu=ku*60,Wo=zu*60,ar=Wo*24,op=ar*365,ts={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},Nu="{yyyy}-{MM}-{dd}",ap={year:"{yyyy}",month:"{yyyy}-{MM}",day:Nu,hour:Nu+" "+ts.hour,minute:Nu+" "+ts.minute,second:Nu+" "+ts.second,millisecond:ts.none},np=["year","month","day","hour","minute","second","millisecond"],sp=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function Et(r,e){return r+="","0000".substr(0,e-r.length)+r}function Fn(r){switch(r){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return r}}function w_(r){return r===Fn(r)}function C_(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function Bn(r,e,t,i){var n=Dt(r),o=n[Fu(t)](),a=n[zn(t)]()+1,s=Math.floor((a-1)/3)+1,l=n[rs(t)](),u=n["get"+(t?"UTC":"")+"Day"](),f=n[Bo(t)](),c=(f-1)%12+1,p=n[is(t)](),h=n[ns(t)](),d=n[os(t)](),g=f>=12?"pm":"am",v=g.toUpperCase(),m=i instanceof ze?i:x_(i||Lu)||S_(),y=m.getModel("time"),_=y.get("month"),x=y.get("monthAbbr"),C=y.get("dayOfWeek"),w=y.get("dayOfWeekAbbr");return(e||"").replace(/{a}/g,g+"").replace(/{A}/g,v+"").replace(/{yyyy}/g,o+"").replace(/{yy}/g,Et(o%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,_[a-1]).replace(/{MMM}/g,x[a-1]).replace(/{MM}/g,Et(a,2)).replace(/{M}/g,a+"").replace(/{dd}/g,Et(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,C[u]).replace(/{ee}/g,w[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Et(f,2)).replace(/{H}/g,f+"").replace(/{hh}/g,Et(c+"",2)).replace(/{h}/g,c+"").replace(/{mm}/g,Et(p,2)).replace(/{m}/g,p+"").replace(/{ss}/g,Et(h,2)).replace(/{s}/g,h+"").replace(/{SSS}/g,Et(d,3)).replace(/{S}/g,d+"")}function T_(r,e,t,i,n){var o=null;if(N(t))o=t;else if(j(t))o=t(r.value,e,{level:r.level});else{var a=P({},ts);if(r.level>0)for(var s=0;s<np.length;++s)a[np[s]]="{primary|"+a[np[s]]+"}";var l=t?t.inherit===!1?t:ce(t,a):a,u=b_(r.value,n);if(l[u])o=l[u];else if(l.inherit){for(var f=sp.indexOf(u),s=f-1;s>=0;--s)if(l[u]){o=l[u];break}o=o||a.none}if(L(o)){var c=r.level==null?0:r.level>=0?r.level:o.length+r.level;c=Math.min(c,o.length-1),o=o[c]}}return Bn(new Date(r.value),o,n,i)}function b_(r,e){var t=Dt(r),i=t[zn(e)]()+1,n=t[rs(e)](),o=t[Bo(e)](),a=t[is(e)](),s=t[ns(e)](),l=t[os(e)](),u=l===0,f=u&&s===0,c=f&&a===0,p=c&&o===0,h=p&&n===1,d=h&&i===1;return d?"year":h?"month":p?"day":c?"hour":f?"minute":u?"second":"millisecond"}function lp(r,e,t){var i=Ce(r)?Dt(r):r;switch(e=e||b_(r,t),e){case"year":return i[Fu(t)]();case"half-year":return i[zn(t)]()>=6?1:0;case"quarter":return Math.floor((i[zn(t)]()+1)/4);case"month":return i[zn(t)]();case"day":return i[rs(t)]();case"half-day":return i[Bo(t)]()/24;case"hour":return i[Bo(t)]();case"minute":return i[is(t)]();case"second":return i[ns(t)]();case"millisecond":return i[os(t)]()}}function Fu(r){return r?"getUTCFullYear":"getFullYear"}function zn(r){return r?"getUTCMonth":"getMonth"}function rs(r){return r?"getUTCDate":"getDate"}function Bo(r){return r?"getUTCHours":"getHours"}function is(r){return r?"getUTCMinutes":"getMinutes"}function ns(r){return r?"getUTCSeconds":"getSeconds"}function os(r){return r?"getUTCMilliseconds":"getMilliseconds"}function D_(r){return r?"setUTCFullYear":"setFullYear"}function up(r){return r?"setUTCMonth":"setMonth"}function fp(r){return r?"setUTCDate":"setDate"}function cp(r){return r?"setUTCHours":"setHours"}function hp(r){return r?"setUTCMinutes":"setMinutes"}function pp(r){return r?"setUTCSeconds":"setSeconds"}function dp(r){return r?"setUTCMilliseconds":"setMilliseconds"}function vp(r,e,t,i,n,o,a,s){var l=new Ct({style:{text:r,font:e,align:t,verticalAlign:i,padding:n,rich:o,overflow:a?"truncate":null,lineHeight:s}});return l.getBoundingRect()}function as(r){if(!za(r))return N(r)?r:"-";var e=(r+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function Uo(r,e){return r=(r||"").toLowerCase().replace(/-(.)/g,function(t,i){return i.toUpperCase()}),e&&r&&(r=r.charAt(0).toUpperCase()+r.slice(1)),r}var zi=wl;function Bu(r,e,t){var i="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function n(f){return f&&xt(f)?f:"-"}function o(f){return!!(f!=null&&!isNaN(f)&&isFinite(f))}var a=e==="time",s=r instanceof Date;if(a||s){var l=a?Dt(r):r;if(isNaN(+l)){if(s)return"-"}else return Bn(l,i,t)}if(e==="ordinal")return ga(r)?n(r):Ce(r)&&o(r)?r+"":"-";var u=gr(r);return o(u)?as(u):ga(r)?n(r):typeof r=="boolean"?r+"":"-"}var M_=["a","b","c","d","e","f","g"],mp=function(r,e){return"{"+r+(e??"")+"}"};function Ho(r,e,t){L(e)||(e=[e]);var i=e.length;if(!i)return"";for(var n=e[0].$vars||[],o=0;o<n.length;o++){var a=M_[o];r=r.replace(mp(a),mp(a,0))}for(var s=0;s<i;s++)for(var l=0;l<n.length;l++){var u=e[s][n[l]];r=r.replace(mp(M_[l],s),t?ot(u):u)}return r}function Wu(r,e){var t=N(r)?{color:r,extraCssText:e}:r||{},i=t.color,n=t.type;e=t.extraCssText;var o=t.renderMode||"html";if(!i)return"";if(o==="html")return n==="subItem"?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+ot(i)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+ot(i)+";"+(e||"")+'"></span>';var a=t.markerId||"markerX";return{renderMode:o,content:"{"+a+"|} ",style:n==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:i}:{width:10,height:10,borderRadius:5,backgroundColor:i}}}function E_(r,e,t){(r==="week"||r==="month"||r==="quarter"||r==="half-year"||r==="year")&&(r=`MM-dd
|
|
9
|
+
yyyy`);var i=Dt(e),n=t?"getUTC":"get",o=i[n+"FullYear"](),a=i[n+"Month"]()+1,s=i[n+"Date"](),l=i[n+"Hours"](),u=i[n+"Minutes"](),f=i[n+"Seconds"](),c=i[n+"Milliseconds"]();return r=r.replace("MM",Et(a,2)).replace("M",a).replace("yyyy",o).replace("yy",Et(o%100+"",2)).replace("dd",Et(s,2)).replace("d",s).replace("hh",Et(l,2)).replace("h",l).replace("mm",Et(u,2)).replace("m",u).replace("ss",Et(f,2)).replace("s",f).replace("SSS",Et(c,3)),r}function R_(r){return r&&r.charAt(0).toUpperCase()+r.substr(1)}function Fi(r,e){return e=e||"transparent",N(r)?r:F(r)&&r.colorStops&&(r.colorStops[0]||{}).color||e}var Hu=S,fM=["left","right","top","bottom","width","height"],Uu=[["width","left","right"],["height","top","bottom"]];function O_(r,e,t,i,n){var o=0,a=0;i==null&&(i=1/0),n==null&&(n=1/0);var s=0;e.eachChild(function(l,u){var f=l.getBoundingRect(),c=e.childAt(u+1),p=c&&c.getBoundingRect(),h,d;if(r==="horizontal"){var g=f.width+(p?-p.x+f.x:0);h=o+g,h>i||l.newline?(o=0,h=g,a+=s+t,s=f.height):s=Math.max(s,f.height)}else{var v=f.height+(p?-p.y+f.y:0);d=a+v,d>n||l.newline?(o+=s+t,a=0,d=v,s=f.width):s=Math.max(s,f.width)}l.newline||(l.x=o,l.y=a,l.markRedraw(),r==="horizontal"?o=h+t:a=d+t)})}var fW=je(O_,"vertical"),cW=je(O_,"horizontal");function Vu(r,e,t){t=zi(t||0);var i=e.width,n=e.height,o=qe(r.left,i),a=qe(r.top,n),s=qe(r.right,i),l=qe(r.bottom,n),u=qe(r.width,i),f=qe(r.height,n),c=t[2]+t[0],p=t[1]+t[3],h=r.aspect;switch(isNaN(u)&&(u=i-s-p-o),isNaN(f)&&(f=n-l-c-a),h!=null&&(isNaN(u)&&isNaN(f)&&(h>i/n?u=i*.8:f=n*.8),isNaN(u)&&(u=h*f),isNaN(f)&&(f=u/h)),isNaN(o)&&(o=i-s-u-p),isNaN(a)&&(a=n-l-f-c),r.left||r.right){case"center":o=i/2-u/2-t[3];break;case"right":o=i-u-p;break}switch(r.top||r.bottom){case"middle":case"center":a=n/2-f/2-t[0];break;case"bottom":a=n-f-c;break}o=o||0,a=a||0,isNaN(u)&&(u=i-p-o-(s||0)),isNaN(f)&&(f=n-c-a-(l||0));var d=new ue(o+t[3],a+t[0],u,f);return d.margin=t,d}function Vo(r){var e=r.layoutMode||r.constructor.layoutMode;return F(e)?e:e?{type:e}:null}function Go(r,e,t){var i=t&&t.ignoreSize;!L(i)&&(i=[i,i]);var n=a(Uu[0],0),o=a(Uu[1],1);u(Uu[0],r,n),u(Uu[1],r,o);function a(f,c){var p={},h=0,d={},g=0,v=2;if(Hu(f,function(_){d[_]=r[_]}),Hu(f,function(_){s(e,_)&&(p[_]=d[_]=e[_]),l(p,_)&&h++,l(d,_)&&g++}),i[c])return l(e,f[1])?d[f[2]]=null:l(e,f[2])&&(d[f[1]]=null),d;if(g===v||!h)return d;if(h>=v)return p;for(var m=0;m<f.length;m++){var y=f[m];if(!s(p,y)&&s(r,y)){p[y]=r[y];break}}return p}function s(f,c){return f.hasOwnProperty(c)}function l(f,c){return f[c]!=null&&f[c]!=="auto"}function u(f,c,p){Hu(f,function(h){c[h]=p[h]})}}function Gu(r){return cM({},r)}function cM(r,e){return e&&r&&Hu(fM,function(t){e.hasOwnProperty(t)&&(r[t]=e[t])}),r}var pM=ye(),Yo=(function(r){we(e,r);function e(t,i,n){var o=r.call(this,t,i,n)||this;return o.uid=Ei("ec_cpt_model"),o}return e.prototype.init=function(t,i,n){this.mergeDefaultAndTheme(t,n)},e.prototype.mergeDefaultAndTheme=function(t,i){var n=Vo(this),o=n?Gu(t):{},a=i.getTheme();Ee(t,a.get(this.mainType)),Ee(t,this.getDefaultOption()),n&&Go(t,o,n)},e.prototype.mergeOption=function(t,i){Ee(this.option,t,!0);var n=Vo(this);n&&Go(this.option,t,n)},e.prototype.optionUpdated=function(t,i){},e.prototype.getDefaultOption=function(){var t=this.constructor;if(!ty(t))return t.defaultOption;var i=pM(this);if(!i.defaultOption){for(var n=[],o=t;o;){var a=o.prototype.defaultOption;a&&n.push(a),o=o.superClass}for(var s={},l=n.length-1;l>=0;l--)s=Ee(s,n[l],!0);i.defaultOption=s}return i.defaultOption},e.prototype.getReferringComponents=function(t,i){var n=t+"Index",o=t+"Id";return Pi(this.ecModel,t,{index:this.get(n,!0),id:this.get(o,!0)},i)},e.prototype.getBoxLayoutParams=function(){var t=this;return{left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")}},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(t){this.option.zlevel=t},e.protoInitialize=(function(){var t=e.prototype;t.type="component",t.id="",t.name="",t.mainType="",t.subType="",t.componentIndex=0})(),e})(ze);Kl(Yo,ze);Mi(Yo);iy(Yo);ny(Yo,dM);function dM(r){var e=[];return S(Yo.getClassesByMainType(r),function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])}),e=X(e,function(t){return Gt(t).main}),r!=="dataset"&&he(e,"dataset")<=0&&e.unshift("dataset"),e}var Fe=Yo;var I_=(function(){function r(){}return r.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},r.prototype.getCoordSysModel=function(){},r})();var vM=0,mM=(function(){function r(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++vM}return r.createByAxisModel=function(e){var t=e.option,i=t.data,n=i&&X(i,gM);return new r({categories:n,needCollect:!n,deduplication:t.dedplication!==!1})},r.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},r.prototype.parseAndCollect=function(e){var t,i=this._needCollect;if(!N(e)&&!i)return e;if(i&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,t;var n=this._getOrCreateMap();return t=n.get(e),t==null&&(i?(t=this.categories.length,this.categories[t]=e,n.set(e,t)):t=NaN),t},r.prototype._getOrCreateMap=function(){return this._map||(this._map=Z(this.categories))},r})();function gM(r){return F(r)&&r.value!=null?r.value:r+""}var yp=mM;var A_=(function(){function r(e){this._setting=e||{},this._extent=[1/0,-1/0]}return r.prototype.getSetting=function(e){return this._setting[e]},r.prototype.unionExtent=function(e){var t=this._extent;e[0]<t[0]&&(t[0]=e[0]),e[1]>t[1]&&(t[1]=e[1])},r.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(e,t){var i=this._extent;isNaN(e)||(i[0]=e),isNaN(t)||(i[1]=t)},r.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},r.prototype.isBlank=function(){return this._isBlank},r.prototype.setBlank=function(e){this._isBlank=e},r})();Mi(A_);var qt=A_;function L_(r,e,t,i){var n={},o=r[1]-r[0],a=n.interval=Eo(o/e,!0);t!=null&&a<t&&(a=n.interval=t),i!=null&&a>i&&(a=n.interval=i);var s=n.intervalPrecision=_p(a),l=n.niceTickExtent=[bt(Math.ceil(r[0]/a)*a,s),bt(Math.floor(r[1]/a)*a,s)];return yM(l,r),n}function _p(r){return zt(r)+2}function P_(r,e,t){r[e]=Math.max(Math.min(r[e],t[1]),t[0])}function yM(r,e){!isFinite(r[0])&&(r[0]=e[0]),!isFinite(r[1])&&(r[1]=e[1]),P_(r,0,e),P_(r,1,e),r[0]>r[1]&&(r[0]=r[1])}function Bi(r,e){return r>=e[0]&&r<=e[1]}function Wi(r,e){return e[1]===e[0]?.5:(r-e[0])/(e[1]-e[0])}function Ui(r,e){return r*(e[1]-e[0])+e[0]}var N_=(function(r){we(e,r);function e(t){var i=r.call(this,t)||this;i.type="ordinal";var n=i.getSetting("ordinalMeta");return n||(n=new yp({})),L(n)&&(n=new yp({categories:X(n,function(o){return F(o)?o.value:o})})),i._ordinalMeta=n,i._extent=i.getSetting("extent")||[0,n.categories.length-1],i}return e.prototype.parse=function(t){return t==null?NaN:N(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return t=this.parse(t),Bi(t,this._extent)&&this._ordinalMeta.categories[t]!=null},e.prototype.normalize=function(t){return t=this._getTickNumber(this.parse(t)),Wi(t,this._extent)},e.prototype.scale=function(t){return t=Math.round(Ui(t,this._extent)),this.getRawOrdinalNumber(t)},e.prototype.getTicks=function(){for(var t=[],i=this._extent,n=i[0];n<=i[1];)t.push({value:n}),n++;return t},e.prototype.getMinorTicks=function(t){},e.prototype.setSortInfo=function(t){if(t==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var i=t.ordinalNumbers,n=this._ordinalNumbersByTick=[],o=this._ticksByOrdinalNumber=[],a=0,s=this._ordinalMeta.categories.length,l=Math.min(s,i.length);a<l;++a){var u=i[a];n[a]=u,o[u]=a}for(var f=0;a<s;++a){for(;o[f]!=null;)f++;n.push(f),o[f]=a}},e.prototype._getTickNumber=function(t){var i=this._ticksByOrdinalNumber;return i&&t>=0&&t<i.length?i[t]:t},e.prototype.getRawOrdinalNumber=function(t){var i=this._ordinalNumbersByTick;return i&&t>=0&&t<i.length?i[t]:t},e.prototype.getLabel=function(t){if(!this.isBlank()){var i=this.getRawOrdinalNumber(t.value),n=this._ordinalMeta.categories[i];return n==null?"":n+""}},e.prototype.count=function(){return this._extent[1]-this._extent[0]+1},e.prototype.unionExtentFromData=function(t,i){this.unionExtent(t.getApproximateExtent(i))},e.prototype.isInExtentRange=function(t){return t=this._getTickNumber(t),this._extent[0]<=t&&this._extent[1]>=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e})(qt);qt.registerClass(N_);var k_=N_;var Wn=bt,z_=(function(r){we(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="interval",t._interval=0,t._intervalPrecision=2,t}return e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return Bi(t,this._extent)},e.prototype.normalize=function(t){return Wi(t,this._extent)},e.prototype.scale=function(t){return Ui(t,this._extent)},e.prototype.setExtent=function(t,i){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(i)||(n[1]=parseFloat(i))},e.prototype.unionExtent=function(t){var i=this._extent;t[0]<i[0]&&(i[0]=t[0]),t[1]>i[1]&&(i[1]=t[1]),this.setExtent(i[0],i[1])},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=_p(t)},e.prototype.getTicks=function(t){var i=this._interval,n=this._extent,o=this._niceExtent,a=this._intervalPrecision,s=[];if(!i)return s;var l=1e4;n[0]<o[0]&&(t?s.push({value:Wn(o[0]-i,a)}):s.push({value:n[0]}));for(var u=o[0];u<=o[1]&&(s.push({value:u}),u=Wn(u+i,a),u!==s[s.length-1].value);)if(s.length>l)return[];var f=s.length?s[s.length-1].value:o[1];return n[1]>f&&(t?s.push({value:Wn(f+i,a)}):s.push({value:n[1]})),s},e.prototype.getMinorTicks=function(t){for(var i=this.getTicks(!0),n=[],o=this.getExtent(),a=1;a<i.length;a++){for(var s=i[a],l=i[a-1],u=0,f=[],c=s.value-l.value,p=c/t;u<t-1;){var h=Wn(l.value+(u+1)*p);h>o[0]&&h<o[1]&&f.push(h),u++}n.push(f)}return n},e.prototype.getLabel=function(t,i){if(t==null)return"";var n=i&&i.precision;n==null?n=zt(t.value)||0:n==="auto"&&(n=this._intervalPrecision);var o=Wn(t.value,n,!0);return as(o)},e.prototype.calcNiceTicks=function(t,i,n){t=t||5;var o=this._extent,a=o[1]-o[0];if(isFinite(a)){a<0&&(a=-a,o.reverse());var s=L_(o,t,i,n);this._intervalPrecision=s.intervalPrecision,this._interval=s.interval,this._niceExtent=s.niceTickExtent}},e.prototype.calcNiceExtent=function(t){var i=this._extent;if(i[0]===i[1])if(i[0]!==0){var n=Math.abs(i[0]);t.fixMax||(i[1]+=n/2),i[0]-=n/2}else i[1]=1;var o=i[1]-i[0];isFinite(o)||(i[0]=0,i[1]=1),this.calcNiceTicks(t.splitNumber,t.minInterval,t.maxInterval);var a=this._interval;t.fixMin||(i[0]=Wn(Math.floor(i[0]/a)*a)),t.fixMax||(i[1]=Wn(Math.ceil(i[1]/a)*a))},e.prototype.setNiceExtent=function(t,i){this._niceExtent=[t,i]},e.type="interval",e})(qt);qt.registerClass(z_);var Un=z_;var qu=Z(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),ct="original",ht="arrayRows",Xt="objectRows",_r="keyedColumns",sr="typedArray",xp="unknown",jt="column",fi="row";var Ft={Must:1,Might:2,Not:3},F_=ye();function B_(r){F_(r).datasetMap=Z()}function W_(r,e,t){var i={},n=Sp(e);if(!n||!r)return i;var o=[],a=[],s=e.ecModel,l=F_(s).datasetMap,u=n.uid+"_"+t.seriesLayoutBy,f,c;r=r.slice(),S(r,function(g,v){var m=F(g)?g:r[v]={name:g};m.type==="ordinal"&&f==null&&(f=v,c=d(m)),i[m.name]=[]});var p=l.get(u)||l.set(u,{categoryWayDim:c,valueWayDim:0});S(r,function(g,v){var m=g.name,y=d(g);if(f==null){var _=p.valueWayDim;h(i[m],_,y),h(a,_,y),p.valueWayDim+=y}else if(f===v)h(i[m],0,y),h(o,0,y);else{var _=p.categoryWayDim;h(i[m],_,y),h(a,_,y),p.categoryWayDim+=y}});function h(g,v,m){for(var y=0;y<m;y++)g.push(v+y)}function d(g){var v=g.dimsDef;return v?v.length:1}return o.length&&(i.itemName=o),a.length&&(i.seriesName=a),i}function Sp(r){var e=r.get("data",!0);if(!e)return Pi(r.ecModel,"dataset",{index:r.get("datasetIndex",!0),id:r.get("datasetId",!0)},ai).models[0]}function U_(r){return!r.get("transform",!0)&&!r.get("fromTransformResult",!0)?[]:Pi(r.ecModel,"dataset",{index:r.get("fromDatasetIndex",!0),id:r.get("fromDatasetId",!0)},ai).models}function Xu(r,e){return _M(r.data,r.sourceFormat,r.seriesLayoutBy,r.dimensionsDefine,r.startIndex,e)}function _M(r,e,t,i,n,o){var a,s=5;if(Ye(r))return Ft.Not;var l,u;if(i){var f=i[o];F(f)?(l=f.name,u=f.type):N(f)&&(l=f)}if(u!=null)return u==="ordinal"?Ft.Must:Ft.Not;if(e===ht){var c=r;if(t===fi){for(var p=c[o],h=0;h<(p||[]).length&&h<s;h++)if((a=x(p[n+h]))!=null)return a}else for(var h=0;h<c.length&&h<s;h++){var d=c[n+h];if(d&&(a=x(d[o]))!=null)return a}}else if(e===Xt){var g=r;if(!l)return Ft.Not;for(var h=0;h<g.length&&h<s;h++){var v=g[h];if(v&&(a=x(v[l]))!=null)return a}}else if(e===_r){var m=r;if(!l)return Ft.Not;var p=m[l];if(!p||Ye(p))return Ft.Not;for(var h=0;h<p.length&&h<s;h++)if((a=x(p[h]))!=null)return a}else if(e===ct)for(var y=r,h=0;h<y.length&&h<s;h++){var v=y[h],_=ni(v);if(!L(_))return Ft.Not;if((a=x(_[o]))!=null)return a}function x(C){var w=N(C);if(C!=null&&Number.isFinite(Number(C))&&C!=="")return w?Ft.Might:Ft.Not;if(w&&C!=="-")return Ft.Must}return Ft.Not}var ju=(function(){function r(e){this.data=e.data||(e.sourceFormat===_r?{}:[]),this.sourceFormat=e.sourceFormat||xp,this.seriesLayoutBy=e.seriesLayoutBy||jt,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var i=0;i<t.length;i++){var n=t[i];n.type==null&&Xu(this,i)===Ft.Must&&(n.type="ordinal")}}return r})();function qo(r){return r instanceof ju}function ss(r,e,t){t=t||wp(r);var i=e.seriesLayoutBy,n=xM(r,t,i,e.sourceHeader,e.dimensions),o=new ju({data:r,sourceFormat:t,seriesLayoutBy:i,dimensionsDefine:n.dimensionsDefine,startIndex:n.startIndex,dimensionsDetectedCount:n.dimensionsDetectedCount,metaRawOption:re(e)});return o}function Xo(r){return new ju({data:r,sourceFormat:Ye(r)?sr:ct})}function G_(r){return new ju({data:r.data,sourceFormat:r.sourceFormat,seriesLayoutBy:r.seriesLayoutBy,dimensionsDefine:re(r.dimensionsDefine),startIndex:r.startIndex,dimensionsDetectedCount:r.dimensionsDetectedCount})}function wp(r){var e=xp;if(Ye(r))e=sr;else if(L(r)){r.length===0&&(e=ht);for(var t=0,i=r.length;t<i;t++){var n=r[t];if(n!=null){if(L(n)||Ye(n)){e=ht;break}else if(F(n)){e=Xt;break}}}}else if(F(r)){for(var o in r)if(br(r,o)&&et(r[o])){e=_r;break}}return e}function xM(r,e,t,i,n){var o,a;if(!r)return{dimensionsDefine:H_(n),startIndex:a,dimensionsDetectedCount:o};if(e===ht){var s=r;i==="auto"||i==null?V_(function(u){u!=null&&u!=="-"&&(N(u)?a==null&&(a=1):a=0)},t,s,10):a=Ce(i)?i:i?1:0,!n&&a===1&&(n=[],V_(function(u,f){n[f]=u!=null?u+"":""},t,s,1/0)),o=n?n.length:t===fi?s.length:s[0]?s[0].length:null}else if(e===Xt)n||(n=SM(r));else if(e===_r)n||(n=[],S(r,function(u,f){n.push(f)}));else if(e===ct){var l=ni(r[0]);o=L(l)&&l.length||1}return{startIndex:a,dimensionsDefine:H_(n),dimensionsDetectedCount:o}}function SM(r){for(var e=0,t;e<r.length&&!(t=r[e++]););if(t)return me(t)}function H_(r){if(r){var e=Z();return X(r,function(t,i){t=F(t)?t:{name:t};var n={name:t.name,displayName:t.displayName,type:t.type};if(n.name==null)return n;n.name+="",n.displayName==null&&(n.displayName=n.name);var o=e.get(n.name);return o?n.name+="-"+o.count++:e.set(n.name,{count:1}),n})}}function V_(r,e,t,i){if(e===fi)for(var n=0;n<t.length&&n<i;n++)r(t[n]?t[n][0]:null,n);else for(var o=t[0]||[],n=0;n<o.length&&n<i;n++)r(o[n],n)}function Zu(r){var e=r.sourceFormat;return e===Xt||e===_r}var wM=ye(),CM={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},Cp=(function(){function r(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return r.prototype.isDimensionOmitted=function(){return this._dimOmitted},r.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||(this._dimNameMap=bp(this.source)))},r.prototype.getSourceDimensionIndex=function(e){return te(this._dimNameMap.get(e),-1)},r.prototype.getSourceDimension=function(e){var t=this.source.dimensionsDefine;if(t)return t[e]},r.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,t=Zu(this.source),i=!Dp(e),n="",o=[],a=0,s=0;a<e;a++){var l=void 0,u=void 0,f=void 0,c=this.dimensions[s];if(c&&c.storeDimIndex===a)l=t?c.name:null,u=c.type,f=c.ordinalMeta,s++;else{var p=this.getSourceDimension(a);p&&(l=t?p.name:null,u=p.type)}o.push({property:l,type:u,ordinalMeta:f}),t&&l!=null&&(!c||!c.isCalculationCoord)&&(n+=i?l.replace(/\`/g,"`1").replace(/\$/g,"`2"):l),n+="$",n+=CM[u]||"f",f&&(n+=f.uid),n+="$"}var h=this.source,d=[h.seriesLayoutBy,h.startIndex,n].join("$$");return{dimensions:o,hash:d}},r.prototype.makeOutputDimensionNames=function(){for(var e=[],t=0,i=0;t<this._fullDimCount;t++){var n=void 0,o=this.dimensions[i];if(o&&o.storeDimIndex===t)o.isCalculationCoord||(n=o.name),i++;else{var a=this.getSourceDimension(t);a&&(n=a.name)}e.push(n)}return e},r.prototype.appendCalculationDimension=function(e){this.dimensions.push(e),e.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},r})();function Ku(r){return r instanceof Cp}function Tp(r){for(var e=Z(),t=0;t<(r||[]).length;t++){var i=r[t],n=F(i)?i.name:i;n!=null&&e.get(n)==null&&e.set(n,t)}return e}function bp(r){var e=wM(r);return e.dimNameMap||(e.dimNameMap=Tp(r.dimensionsDefine))}function Dp(r){return r>30}function $u(r,e,t){t=t||{};var i=t.byIndex,n=t.stackedCoordDimension,o,a,s;TM(e)?o=e:(a=e.schema,o=a.dimensions,s=e.store);var l=!!(r&&r.get("stack")),u,f,c,p;if(S(o,function(y,_){N(y)&&(o[_]=y={name:y}),l&&!y.isExtraCoord&&(!i&&!u&&y.ordinalMeta&&(u=y),!f&&y.type!=="ordinal"&&y.type!=="time"&&(!n||n===y.coordDim)&&(f=y))}),f&&!i&&!u&&(i=!0),f){c="__\0ecstackresult_"+r.id,p="__\0ecstackedover_"+r.id,u&&(u.createInvertedIndices=!0);var h=f.coordDim,d=f.type,g=0;S(o,function(y){y.coordDim===h&&g++});var v={name:c,coordDim:h,coordDimIndex:g,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:o.length},m={name:p,coordDim:p,coordDimIndex:g+1,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:o.length+1};a?(s&&(v.storeDimIndex=s.ensureCalculationDimension(p,d),m.storeDimIndex=s.ensureCalculationDimension(c,d)),a.appendCalculationDimension(v),a.appendCalculationDimension(m)):(o.push(v),o.push(m))}return{stackedDimension:f&&f.name,stackedByDimension:u&&u.name,isStackedByIndex:i,stackedOverDimension:p,stackResultDimension:c}}function TM(r){return!Ku(r.schema)}function Mp(r,e){return!!e&&e===r.getCalculationInfo("stackedDimension")}function Y_(r,e){return Mp(r,e)?r.getCalculationInfo("stackResultDimension"):e}function Ep(){var r=ye();return function(e){var t=r(e),i=e.pipelineContext,n=!!t.large,o=!!t.progressiveRender,a=t.large=!!(i&&i.large),s=t.progressiveRender=!!(i&&i.progressiveRender);return(n!==a||o!==s)&&"reset"}}var bM="__ec_stack_";function q_(r){return r.get("stack")||bM+r.seriesIndex}function X_(r){return r.dim+r.index}function j_(r,e){var t=[];return e.eachSeriesByType(r,function(i){EM(i)&&t.push(i)}),t}function DM(r){var e={};S(r,function(l){var u=l.coordinateSystem,f=u.getBaseAxis();if(!(f.type!=="time"&&f.type!=="value"))for(var c=l.getData(),p=f.dim+"_"+f.index,h=c.getDimensionIndex(c.mapDimension(f.dim)),d=c.getStore(),g=0,v=d.count();g<v;++g){var m=d.get(h,g);e[p]?e[p].push(m):e[p]=[m]}});var t={};for(var i in e)if(e.hasOwnProperty(i)){var n=e[i];if(n){n.sort(function(l,u){return l-u});for(var o=null,a=1;a<n.length;++a){var s=n[a]-n[a-1];s>0&&(o=o===null?s:Math.min(o,s))}t[i]=o}}return t}function Z_(r){var e=DM(r),t=[];return S(r,function(i){var n=i.coordinateSystem,o=n.getBaseAxis(),a=o.getExtent(),s;if(o.type==="category")s=o.getBandWidth();else if(o.type==="value"||o.type==="time"){var l=o.dim+"_"+o.index,u=e[l],f=Math.abs(a[1]-a[0]),c=o.scale.getExtent(),p=Math.abs(c[1]-c[0]);s=u?f/p*u:f}else{var h=i.getData();s=Math.abs(a[1]-a[0])/h.count()}var d=qe(i.get("barWidth"),s),g=qe(i.get("barMaxWidth"),s),v=qe(i.get("barMinWidth")||(RM(i)?.5:1),s),m=i.get("barGap"),y=i.get("barCategoryGap");t.push({bandWidth:s,barWidth:d,barMaxWidth:g,barMinWidth:v,barGap:m,barCategoryGap:y,axisKey:X_(o),stackId:q_(i)})}),MM(t)}function MM(r){var e={};S(r,function(i,n){var o=i.axisKey,a=i.bandWidth,s=e[o]||{bandWidth:a,remainedWidth:a,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},l=s.stacks;e[o]=s;var u=i.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var f=i.barWidth;f&&!l[u].width&&(l[u].width=f,f=Math.min(s.remainedWidth,f),s.remainedWidth-=f);var c=i.barMaxWidth;c&&(l[u].maxWidth=c);var p=i.barMinWidth;p&&(l[u].minWidth=p);var h=i.barGap;h!=null&&(s.gap=h);var d=i.barCategoryGap;d!=null&&(s.categoryGap=d)});var t={};return S(e,function(i,n){t[n]={};var o=i.stacks,a=i.bandWidth,s=i.categoryGap;if(s==null){var l=me(o).length;s=Math.max(35-l*4,15)+"%"}var u=qe(s,a),f=qe(i.gap,1),c=i.remainedWidth,p=i.autoWidthCount,h=(c-u)/(p+(p-1)*f);h=Math.max(h,0),S(o,function(m){var y=m.maxWidth,_=m.minWidth;if(m.width){var x=m.width;y&&(x=Math.min(x,y)),_&&(x=Math.max(x,_)),m.width=x,c-=x+f*x,p--}else{var x=h;y&&y<x&&(x=Math.min(y,c)),_&&_>x&&(x=_),x!==h&&(m.width=x,c-=x+f*x,p--)}}),h=(c-u)/(p+(p-1)*f),h=Math.max(h,0);var d=0,g;S(o,function(m,y){m.width||(m.width=h),g=m,d+=m.width*(1+f)}),g&&(d-=g.width*f);var v=-d/2;S(o,function(m,y){t[n][y]=t[n][y]||{bandWidth:a,offset:v,width:m.width},v+=m.width*(1+f)})}),t}function K_(r,e,t){if(r&&e){var i=r[X_(e)];return i!=null&&t!=null?i[q_(t)]:i}}function EM(r){return r.coordinateSystem&&r.coordinateSystem.type==="cartesian2d"}function RM(r){return r.pipelineContext&&r.pipelineContext.large}var OM=function(r,e,t,i){for(;t<i;){var n=t+i>>>1;r[n][1]<e?t=n+1:i=n}return t},Q_=(function(r){we(e,r);function e(t){var i=r.call(this,t)||this;return i.type="time",i}return e.prototype.getLabel=function(t){var i=this.getSetting("useUTC");return Bn(t.value,ap[C_(Fn(this._minLevelUnit))]||ap.second,i,this.getSetting("locale"))},e.prototype.getFormattedLabel=function(t,i,n){var o=this.getSetting("useUTC"),a=this.getSetting("locale");return T_(t,i,n,a,o)},e.prototype.getTicks=function(){var t=this._interval,i=this._extent,n=[];if(!t)return n;n.push({value:i[0],level:0});var o=this.getSetting("useUTC"),a=zM(this._minLevelUnit,this._approxInterval,o,i);return n=n.concat(a),n.push({value:i[1],level:0}),n},e.prototype.calcNiceExtent=function(t){var i=this._extent;if(i[0]===i[1]&&(i[0]-=ar,i[1]+=ar),i[1]===-1/0&&i[0]===1/0){var n=new Date;i[1]=+new Date(n.getFullYear(),n.getMonth(),n.getDate()),i[0]=i[1]-ar}this.calcNiceTicks(t.splitNumber,t.minInterval,t.maxInterval)},e.prototype.calcNiceTicks=function(t,i,n){t=t||10;var o=this._extent,a=o[1]-o[0];this._approxInterval=a/t,i!=null&&this._approxInterval<i&&(this._approxInterval=i),n!=null&&this._approxInterval>n&&(this._approxInterval=n);var s=Qu.length,l=Math.min(OM(Qu,this._approxInterval,0,s),s-1);this._interval=Qu[l][1],this._minLevelUnit=Qu[Math.max(l-1,0)][0]},e.prototype.parse=function(t){return Ce(t)?t:+Dt(t)},e.prototype.contain=function(t){return Bi(this.parse(t),this._extent)},e.prototype.normalize=function(t){return Wi(this.parse(t),this._extent)},e.prototype.scale=function(t){return Ui(t,this._extent)},e.type="time",e})(Un),Qu=[["second",ku],["minute",zu],["hour",Wo],["quarter-day",Wo*6],["half-day",Wo*12],["day",ar*1.2],["half-week",ar*3.5],["week",ar*7],["month",ar*31],["quarter",ar*95],["half-year",op/2],["year",op]];function IM(r,e,t,i){var n=Dt(e),o=Dt(t),a=function(d){return lp(n,d,i)===lp(o,d,i)},s=function(){return a("year")},l=function(){return s()&&a("month")},u=function(){return l()&&a("day")},f=function(){return u()&&a("hour")},c=function(){return f()&&a("minute")},p=function(){return c()&&a("second")},h=function(){return p()&&a("millisecond")};switch(r){case"year":return s();case"month":return l();case"day":return u();case"hour":return f();case"minute":return c();case"second":return p();case"millisecond":return h()}}function AM(r,e){return r/=ar,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function PM(r){var e=30*ar;return r/=e,r>6?6:r>3?3:r>2?2:1}function LM(r){return r/=Wo,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function $_(r,e){return r/=e?zu:ku,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function NM(r){return Eo(r,!0)}function kM(r,e,t){var i=new Date(r);switch(Fn(e)){case"year":case"month":i[up(t)](0);case"day":i[fp(t)](1);case"hour":i[cp(t)](0);case"minute":i[hp(t)](0);case"second":i[pp(t)](0),i[dp(t)](0)}return i.getTime()}function zM(r,e,t,i){var n=1e4,o=sp,a=0;function s(E,M,R,O,I,W,U){for(var de=new Date(M),fe=M,ae=de[O]();fe<R&&fe<=i[1];)U.push({value:fe}),ae+=E,de[I](ae),fe=de.getTime();U.push({value:fe,notAdd:!0})}function l(E,M,R){var O=[],I=!M.length;if(!IM(Fn(E),i[0],i[1],t)){I&&(M=[{value:kM(new Date(i[0]),E,t)},{value:i[1]}]);for(var W=0;W<M.length-1;W++){var U=M[W].value,de=M[W+1].value;if(U!==de){var fe=void 0,ae=void 0,Me=void 0,Ve=!1;switch(E){case"year":fe=Math.max(1,Math.round(e/ar/365)),ae=Fu(t),Me=D_(t);break;case"half-year":case"quarter":case"month":fe=PM(e),ae=zn(t),Me=up(t);break;case"week":case"half-week":case"day":fe=AM(e,31),ae=rs(t),Me=fp(t),Ve=!0;break;case"half-day":case"quarter-day":case"hour":fe=LM(e),ae=Bo(t),Me=cp(t);break;case"minute":fe=$_(e,!0),ae=is(t),Me=hp(t);break;case"second":fe=$_(e,!1),ae=ns(t),Me=pp(t);break;case"millisecond":fe=NM(e),ae=os(t),Me=dp(t);break}s(fe,U,de,ae,Me,Ve,O),E==="year"&&R.length>1&&W===0&&R.unshift({value:R[0].value-fe})}}for(var W=0;W<O.length;W++)R.push(O[W]);return O}}for(var u=[],f=[],c=0,p=0,h=0;h<o.length&&a++<n;++h){var d=Fn(o[h]);if(w_(o[h])){l(o[h],u[u.length-1]||[],f);var g=o[h+1]?Fn(o[h+1]):null;if(d!==g){if(f.length){p=c,f.sort(function(E,M){return E.value-M.value});for(var v=[],m=0;m<f.length;++m){var y=f[m].value;(m===0||f[m-1].value!==y)&&(v.push(f[m]),y>=i[0]&&y<=i[1]&&c++)}var _=(i[1]-i[0])/e;if(c>_*1.5&&p>_/1.5||(u.push(v),c>_||r===o[h]))break}f=[]}}}for(var x=Ue(X(u,function(E){return Ue(E,function(M){return M.value>=i[0]&&M.value<=i[1]&&!M.notAdd})}),function(E){return E.length>0}),C=[],w=x.length-1,h=0;h<x.length;++h)for(var T=x[h],D=0;D<T.length;++D)C.push({value:T[D].value,level:w-h});C.sort(function(E,M){return E.value-M.value});for(var b=[],h=0;h<C.length;++h)(h===0||C[h].value!==C[h-1].value)&&b.push(C[h]);return b}qt.registerClass(Q_);var J_=Q_;var ex=qt.prototype,ls=Un.prototype,FM=bt,BM=Math.floor,WM=Math.ceil,Ju=Math.pow,Mr=Math.log,Rp=(function(r){we(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="log",t.base=10,t._originalScale=new Un,t._interval=0,t}return e.prototype.getTicks=function(t){var i=this._originalScale,n=this._extent,o=i.getExtent(),a=ls.getTicks.call(this,t);return X(a,function(s){var l=s.value,u=bt(Ju(this.base,l));return u=l===n[0]&&this._fixMin?ef(u,o[0]):u,u=l===n[1]&&this._fixMax?ef(u,o[1]):u,{value:u}},this)},e.prototype.setExtent=function(t,i){var n=Mr(this.base);t=Mr(Math.max(0,t))/n,i=Mr(Math.max(0,i))/n,ls.setExtent.call(this,t,i)},e.prototype.getExtent=function(){var t=this.base,i=ex.getExtent.call(this);i[0]=Ju(t,i[0]),i[1]=Ju(t,i[1]);var n=this._originalScale,o=n.getExtent();return this._fixMin&&(i[0]=ef(i[0],o[0])),this._fixMax&&(i[1]=ef(i[1],o[1])),i},e.prototype.unionExtent=function(t){this._originalScale.unionExtent(t);var i=this.base;t[0]=Mr(t[0])/Mr(i),t[1]=Mr(t[1])/Mr(i),ex.unionExtent.call(this,t)},e.prototype.unionExtentFromData=function(t,i){this.unionExtent(t.getApproximateExtent(i))},e.prototype.calcNiceTicks=function(t){t=t||10;var i=this._extent,n=i[1]-i[0];if(!(n===1/0||n<=0)){var o=ru(n),a=t/n*o;for(a<=.5&&(o*=10);!isNaN(o)&&Math.abs(o)<1&&Math.abs(o)>0;)o*=10;var s=[bt(WM(i[0]/o)*o),bt(BM(i[1]/o)*o)];this._interval=o,this._niceExtent=s}},e.prototype.calcNiceExtent=function(t){ls.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return t=Mr(t)/Mr(this.base),Bi(t,this._extent)},e.prototype.normalize=function(t){return t=Mr(t)/Mr(this.base),Wi(t,this._extent)},e.prototype.scale=function(t){return t=Ui(t,this._extent),Ju(this.base,t)},e.type="log",e})(qt),tx=Rp.prototype;tx.getMinorTicks=ls.getMinorTicks;tx.getLabel=ls.getLabel;function ef(r,e){return FM(r,zt(e))}qt.registerClass(Rp);var rx=Rp;var UM=(function(){function r(e,t,i){this._prepareParams(e,t,i)}return r.prototype._prepareParams=function(e,t,i){i[1]<i[0]&&(i=[NaN,NaN]),this._dataMin=i[0],this._dataMax=i[1];var n=this._isOrdinal=e.type==="ordinal";this._needCrossZero=e.type==="interval"&&t.getNeedCrossZero&&t.getNeedCrossZero();var o=t.get("min",!0);o==null&&(o=t.get("startValue",!0));var a=this._modelMinRaw=o;j(a)?this._modelMinNum=tf(e,a({min:i[0],max:i[1]})):a!=="dataMin"&&(this._modelMinNum=tf(e,a));var s=this._modelMaxRaw=t.get("max",!0);if(j(s)?this._modelMaxNum=tf(e,s({min:i[0],max:i[1]})):s!=="dataMax"&&(this._modelMaxNum=tf(e,s)),n)this._axisDataLen=t.getCategories().length;else{var l=t.get("boundaryGap"),u=L(l)?l:[l||0,l||0];typeof u[0]=="boolean"||typeof u[1]=="boolean"?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[zr(u[0],1),zr(u[1],1)]}},r.prototype.calculate=function(){var e=this._isOrdinal,t=this._dataMin,i=this._dataMax,n=this._axisDataLen,o=this._boundaryGapInner,a=e?null:i-t||Math.abs(t),s=this._modelMinRaw==="dataMin"?t:this._modelMinNum,l=this._modelMaxRaw==="dataMax"?i:this._modelMaxNum,u=s!=null,f=l!=null;s==null&&(s=e?n?0:NaN:t-o[0]*a),l==null&&(l=e?n?n-1:NaN:i+o[1]*a),(s==null||!isFinite(s))&&(s=NaN),(l==null||!isFinite(l))&&(l=NaN);var c=ho(s)||ho(l)||e&&!n;this._needCrossZero&&(s>0&&l>0&&!u&&(s=0),s<0&&l<0&&!f&&(l=0));var p=this._determinedMin,h=this._determinedMax;return p!=null&&(s=p,u=!0),h!=null&&(l=h,f=!0),{min:s,max:l,minFixed:u,maxFixed:f,isBlank:c}},r.prototype.modifyDataMinMax=function(e,t){this[VM[e]]=t},r.prototype.setDeterminedMinMax=function(e,t){var i=HM[e];this[i]=t},r.prototype.freeze=function(){this.frozen=!0},r})();var HM={min:"_determinedMin",max:"_determinedMax"},VM={min:"_dataMin",max:"_dataMax"};function ix(r,e,t){var i=r.rawExtentInfo;return i||(i=new UM(r,e,t),r.rawExtentInfo=i,i)}function tf(r,e){return e==null?null:ho(e)?NaN:r.parse(e)}function GM(r,e){var t=r.type,i=ix(r,e,r.getExtent()).calculate();r.setBlank(i.isBlank);var n=i.min,o=i.max,a=e.ecModel;if(a&&t==="time"){var s=j_("bar",a),l=!1;if(S(s,function(c){l=l||c.getBaseAxis()===e.axis}),l){var u=Z_(s),f=YM(n,o,e,u);n=f.min,o=f.max}}return{extent:[n,o],fixMin:i.minFixed,fixMax:i.maxFixed}}function YM(r,e,t,i){var n=t.axis.getExtent(),o=Math.abs(n[1]-n[0]),a=K_(i,t.axis);if(a===void 0)return{min:r,max:e};var s=1/0;S(a,function(h){s=Math.min(h.offset,s)});var l=-1/0;S(a,function(h){l=Math.max(h.offset+h.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,f=e-r,c=1-(s+l)/o,p=f/c-f;return e+=p*(l/u),r-=p*(s/u),{min:r,max:e}}function nx(r,e){var t=e,i=GM(r,t),n=i.extent,o=t.get("splitNumber");r instanceof rx&&(r.base=t.get("logBase"));var a=r.type,s=t.get("interval"),l=a==="interval"||a==="time";r.setExtent(n[0],n[1]),r.calcNiceExtent({splitNumber:o,fixMin:i.fixMin,fixMax:i.fixMax,minInterval:l?t.get("minInterval"):null,maxInterval:l?t.get("maxInterval"):null}),s!=null&&r.setInterval&&r.setInterval(s)}function ox(r,e){if(e=e||r.get("type"),e)switch(e){case"category":return new k_({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:[1/0,-1/0]});case"time":return new J_({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new(qt.getClass(e)||Un)}}function rf(r,e){return r.type==="category"?r.scale.getLabel(e):e.value}function qM(r){var e=r.get("interval");return e??"auto"}function ax(r){return r.type==="category"&&qM(r.getLabelModel())===0}function Ip(r,e,t){t=t||{};var i=r.coordinateSystem,n=e.axis,o={},a=n.getAxesOnZeroOf()[0],s=n.position,l=a?"onZero":s,u=n.dim,f=i.getRect(),c=[f.x,f.x+f.width,f.y,f.y+f.height],p={left:0,right:1,top:0,bottom:1,onZero:2},h=e.get("offset")||0,d=u==="x"?[c[2]-h,c[3]+h]:[c[0]-h,c[1]+h];if(a){var g=a.toGlobalCoord(a.dataToCoord(0));d[p.onZero]=Math.max(Math.min(g,d[1]),d[0])}o.position=[u==="y"?d[p[l]]:c[0],u==="x"?d[p[l]]:c[3]],o.rotation=Math.PI/2*(u==="x"?0:1);var v={top:-1,bottom:1,left:-1,right:1};o.labelDirection=o.tickDirection=o.nameDirection=v[s],o.labelOffset=a?d[p[s]]-d[p.onZero]:0,e.get(["axisTick","inside"])&&(o.tickDirection=-o.tickDirection),rn(t.labelInside,e.get(["axisLabel","inside"]))&&(o.labelDirection=-o.labelDirection);var m=e.get(["axisLabel","rotate"]);return o.labelRotate=l==="top"?-m:m,o.z2=1,o}var jM=pe.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(r,e){var t=e.cx,i=e.cy,n=e.width/2,o=e.height/2;r.moveTo(t,i-o),r.lineTo(t+n,i+o),r.lineTo(t-n,i+o),r.closePath()}}),ZM=pe.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(r,e){var t=e.cx,i=e.cy,n=e.width/2,o=e.height/2;r.moveTo(t,i-o),r.lineTo(t+n,i),r.lineTo(t,i+o),r.lineTo(t-n,i),r.closePath()}}),KM=pe.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(r,e){var t=e.x,i=e.y,n=e.width/5*3,o=Math.max(n,e.height),a=n/2,s=a*a/(o-a),l=i-o+a+s,u=Math.asin(s/a),f=Math.cos(u)*a,c=Math.sin(u),p=Math.cos(u),h=a*.6,d=a*.7;r.moveTo(t-f,l+s),r.arc(t,l,a,Math.PI-u,Math.PI*2+u),r.bezierCurveTo(t+f-c*h,l+s+p*h,t,i-d,t,i),r.bezierCurveTo(t,i-d,t-f+c*h,l+s+p*h,t-f,l+s),r.closePath()}}),$M=pe.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(r,e){var t=e.height,i=e.width,n=e.x,o=e.y,a=i/3*2;r.moveTo(n,o),r.lineTo(n+a,o+t),r.lineTo(n,o+t/4*3),r.lineTo(n-a,o+t),r.lineTo(n,o),r.closePath()}}),QM={line:Yr,rect:ft,roundRect:ft,square:ft,circle:Rn,diamond:ZM,pin:KM,arrow:$M,triangle:jM},JM={line:function(r,e,t,i,n){n.x1=r,n.y1=e+i/2,n.x2=r+t,n.y2=e+i/2},rect:function(r,e,t,i,n){n.x=r,n.y=e,n.width=t,n.height=i},roundRect:function(r,e,t,i,n){n.x=r,n.y=e,n.width=t,n.height=i,n.r=Math.min(t,i)/4},square:function(r,e,t,i,n){var o=Math.min(t,i);n.x=r,n.y=e,n.width=o,n.height=o},circle:function(r,e,t,i,n){n.cx=r+t/2,n.cy=e+i/2,n.r=Math.min(t,i)/2},diamond:function(r,e,t,i,n){n.cx=r+t/2,n.cy=e+i/2,n.width=t,n.height=i},pin:function(r,e,t,i,n){n.x=r+t/2,n.y=e+i/2,n.width=t,n.height=i},arrow:function(r,e,t,i,n){n.x=r+t/2,n.y=e+i/2,n.width=t,n.height=i},triangle:function(r,e,t,i,n){n.cx=r+t/2,n.cy=e+i/2,n.width=t,n.height=i}},Ap={};S(QM,function(r,e){Ap[e]=new r});var eE=pe.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(r,e,t){var i=jl(r,e,t),n=this.shape;return n&&n.symbolType==="pin"&&e.position==="inside"&&(i.y=t.y+t.height*.4),i},buildPath:function(r,e,t){var i=e.symbolType;if(i!=="none"){var n=Ap[i];n||(i="rect",n=Ap[i]),JM[i](e.x,e.y,e.width,e.height,n.shape),n.buildPath(r,n.shape,t)}}});function tE(r,e){if(this.type!=="image"){var t=this.style;this.__isEmptyBrush?(t.stroke=r,t.fill=e||"#fff",t.lineWidth=2):this.shape.symbolType==="line"?t.stroke=r:t.fill=r,this.markRedraw()}}function jo(r,e,t,i,n,o,a){var s=r.indexOf("empty")===0;s&&(r=r.substr(5,1).toLowerCase()+r.substr(6));var l;return r.indexOf("image://")===0?l=Ja(r.slice(8),new ue(e,t,i,n),a?"center":"cover"):r.indexOf("path://")===0?l=zo(r.slice(7),{},new ue(e,t,i,n),a?"center":"cover"):l=new eE({shape:{symbolType:r,x:e,y:t,width:i,height:n}}),l.__isEmptyBrush=s,l.setColor=tE,o&&l.setColor(o),l}function sx(r,e){if(r!=null)return L(r)||(r=[r,r]),[qe(r[0],e[0])||0,qe(te(r[1],r[0]),e[1])||0]}function nf(r){for(var e=[],t=0;t<r.length;t++){var i=r[t];if(!i.defaultAttr.ignore){var n=i.label,o=n.getComputedTransform(),a=n.getBoundingRect(),s=!o||o[1]<1e-5&&o[2]<1e-5,l=n.style.margin||0,u=a.clone();u.applyTransform(o),u.x-=l/2,u.y-=l/2,u.width+=l,u.height+=l;var f=s?new ko(a,o):null;e.push({label:n,labelLine:i.labelLine,rect:u,localRect:a,obb:f,priority:i.priority,defaultAttr:i.defaultAttr,layoutOption:i.computedLayoutOption,axisAligned:s,transform:o})}}return e}function lx(r,e,t,i,n,o){var a=r.length;if(a<2)return;r.sort(function(b,E){return b.rect[e]-E.rect[e]});for(var s=0,l,u=!1,f=[],c=0,p=0;p<a;p++){var h=r[p],d=h.rect;l=d[e]-s,l<0&&(d[e]-=l,h.label[e]-=l,u=!0);var g=Math.max(-l,0);f.push(g),c+=g,s=d[e]+d[t]}c>0&&o&&w(-c/a,0,a);var v=r[0],m=r[a-1],y,_;x(),y<0&&T(-y,.8),_<0&&T(_,.8),x(),C(y,_,1),C(_,y,-1),x(),y<0&&D(-y),_<0&&D(_);function x(){y=v.rect[e]-i,_=n-m.rect[e]-m.rect[t]}function C(b,E,M){if(b<0){var R=Math.min(E,-b);if(R>0){w(R*M,0,a);var O=R+b;O<0&&T(-O*M,1)}else T(-b*M,1)}}function w(b,E,M){b!==0&&(u=!0);for(var R=E;R<M;R++){var O=r[R],I=O.rect;I[e]+=b,O.label[e]+=b}}function T(b,E){for(var M=[],R=0,O=1;O<a;O++){var I=r[O-1].rect,W=Math.max(r[O].rect[e]-I[e]-I[t],0);M.push(W),R+=W}if(R){var U=Math.min(Math.abs(b)/R,E);if(b>0)for(var O=0;O<a-1;O++){var de=M[O]*U;w(de,0,O+1)}else for(var O=a-1;O>0;O--){var de=M[O-1]*U;w(-de,O,a)}}}function D(b){var E=b<0?-1:1;b=Math.abs(b);for(var M=Math.ceil(b/(a-1)),R=0;R<a-1;R++)if(E>0?w(M,0,R+1):w(-M,a-R-1,a),b-=M,b<=0)return}return u}function ux(r,e,t,i){return lx(r,"x","width",e,t,i)}function fx(r,e,t,i){return lx(r,"y","height",e,t,i)}function of(r){var e=[];r.sort(function(g,v){return v.priority-g.priority});var t=new ue(0,0,0,0);function i(g){if(!g.ignore){var v=g.ensureState("emphasis");v.ignore==null&&(v.ignore=!1)}g.ignore=!0}for(var n=0;n<r.length;n++){var o=r[n],a=o.axisAligned,s=o.localRect,l=o.transform,u=o.label,f=o.labelLine;t.copy(o.rect),t.width-=.1,t.height-=.1,t.x+=.05,t.y+=.05;for(var c=o.obb,p=!1,h=0;h<e.length;h++){var d=e[h];if(t.intersect(d.rect)){if(a&&d.axisAligned){p=!0;break}if(d.obb||(d.obb=new ko(d.localRect,d.transform)),c||(c=new ko(s,l)),c.intersect(d.obb)){p=!0;break}}}p?(i(u),f&&i(f)):(u.attr("ignore",o.defaultAttr.ignore),f&&f.attr("ignore",o.defaultAttr.labelGuideIgnore),e.push(o))}}var Hi=Math.PI,Hn=(function(){function r(e,t){this.group=new wt,this.opt=t,this.axisModel=e,ce(t,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var i=new wt({x:t.position[0],y:t.position[1],rotation:t.rotation});i.updateTransform(),this._transformGroup=i}return r.prototype.hasBuilder=function(e){return!!cx[e]},r.prototype.add=function(e){cx[e](this.opt,this.axisModel,this.group,this._transformGroup)},r.prototype.getGroup=function(){return this.group},r.innerTextLayout=function(e,t,i){var n=Na(t-e),o,a;return En(n)?(a=i>0?"top":"bottom",o="center"):En(n-Hi)?(a=i>0?"bottom":"top",o="center"):(a="middle",n>0&&n<Hi?o=i>0?"right":"left":o=i>0?"left":"right"),{rotation:n,textAlign:o,textVerticalAlign:a}},r.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},r.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)},r})(),cx={axisLine:function(r,e,t,i){var n=e.get(["axisLine","show"]);if(n==="auto"&&r.handleAutoShown&&(n=r.handleAutoShown("axisLine")),!!n){var o=e.axis.getExtent(),a=i.transform,s=[o[0],0],l=[o[1],0],u=s[0]>l[0];a&&(Ht(s,s,a),Ht(l,l,a));var f=P({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),c=new Yr({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:f,strokeContainThreshold:r.strokeContainThreshold||5,silent:!0,z2:1});Eu(c.shape,c.style.lineWidth),c.anid="line",t.add(c);var p=e.get(["axisLine","symbol"]);if(p!=null){var h=e.get(["axisLine","symbolSize"]);N(p)&&(p=[p,p]),(N(h)||Ce(h))&&(h=[h,h]);var d=sx(e.get(["axisLine","symbolOffset"])||0,h),g=h[0],v=h[1];S([{rotate:r.rotation+Math.PI/2,offset:d[0],r:0},{rotate:r.rotation-Math.PI/2,offset:d[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],function(m,y){if(p[y]!=="none"&&p[y]!=null){var _=jo(p[y],-g/2,-v/2,g,v,f.stroke,!0),x=m.r+m.offset,C=u?l:s;_.attr({rotation:m.rotate,x:C[0]+x*Math.cos(r.rotation),y:C[1]-x*Math.sin(r.rotation),silent:!0,z2:11}),t.add(_)}})}}},axisTickLabel:function(r,e,t,i){var n=nE(t,i,e,r),o=aE(t,i,e,r);if(iE(e,o,n),oE(t,i,e,r.tickDirection),e.get(["axisLabel","hideOverlap"])){var a=nf(X(o,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));of(a)}},axisName:function(r,e,t,i){var n=rn(r.axisName,e.get("name"));if(n){var o=e.get("nameLocation"),a=r.nameDirection,s=e.getModel("nameTextStyle"),l=e.get("nameGap")||0,u=e.axis.getExtent(),f=u[0]>u[1]?-1:1,c=[o==="start"?u[0]-f*l:o==="end"?u[1]+f*l:(u[0]+u[1])/2,px(o)?r.labelOffset+a*l:0],p,h=e.get("nameRotate");h!=null&&(h=h*Hi/180);var d;px(o)?p=Hn.innerTextLayout(r.rotation,h??r.rotation,a):(p=rE(r.rotation,o,h||0,u),d=r.axisNameAvailableWidth,d!=null&&(d=Math.abs(d/Math.sin(p.rotation)),!isFinite(d)&&(d=null)));var g=s.getFont(),v=e.get("nameTruncate",!0)||{},m=v.ellipsis,y=rn(r.nameTruncateMaxWidth,v.maxWidth,d),_=new Ct({x:c[0],y:c[1],rotation:p.rotation,silent:Hn.isLabelSilent(e),style:Nn(s,{text:n,font:g,overflow:"truncate",width:y,ellipsis:m,fill:s.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:s.get("align")||p.textAlign,verticalAlign:s.get("verticalAlign")||p.textVerticalAlign}),z2:1});if(Ou({el:_,componentModel:e,itemName:n}),_.__fullText=n,_.anid="name",e.get("triggerEvent")){var x=Hn.makeAxisEventDataBase(e);x.targetType="axisName",x.name=n,Re(_).eventData=x}i.add(_),_.updateTransform(),t.add(_),_.decomposeTransform()}}};function rE(r,e,t,i){var n=Na(t-r),o,a,s=i[0]>i[1],l=e==="start"&&!s||e!=="start"&&s;return En(n-Hi/2)?(a=l?"bottom":"top",o="center"):En(n-Hi*1.5)?(a=l?"top":"bottom",o="center"):(a="middle",n<Hi*1.5&&n>Hi/2?o=l?"left":"right":o=l?"right":"left"),{rotation:n,textAlign:o,textVerticalAlign:a}}function iE(r,e,t){if(!ax(r.axis)){var i=r.get(["axisLabel","showMinLabel"]),n=r.get(["axisLabel","showMaxLabel"]);e=e||[],t=t||[];var o=e[0],a=e[1],s=e[e.length-1],l=e[e.length-2],u=t[0],f=t[1],c=t[t.length-1],p=t[t.length-2];i===!1?(xr(o),xr(u)):hx(o,a)&&(i?(xr(a),xr(f)):(xr(o),xr(u))),n===!1?(xr(s),xr(c)):hx(l,s)&&(n?(xr(l),xr(p)):(xr(s),xr(c)))}}function xr(r){r&&(r.ignore=!0)}function hx(r,e){var t=r&&r.getBoundingRect().clone(),i=e&&e.getBoundingRect().clone();if(!(!t||!i)){var n=po([]);return vo(n,n,-r.rotation),t.applyTransform($r([],n,r.getLocalTransform())),i.applyTransform($r([],n,e.getLocalTransform())),t.intersect(i)}}function px(r){return r==="middle"||r==="center"}function dx(r,e,t,i,n){for(var o=[],a=[],s=[],l=0;l<r.length;l++){var u=r[l].coord;a[0]=u,a[1]=0,s[0]=u,s[1]=t,e&&(Ht(a,a,e),Ht(s,s,e));var f=new Yr({shape:{x1:a[0],y1:a[1],x2:s[0],y2:s[1]},style:i,z2:2,autoBatch:!0,silent:!0});Eu(f.shape,f.style.lineWidth),f.anid=n+"_"+r[l].tickValue,o.push(f)}return o}function nE(r,e,t,i){var n=t.axis,o=t.getModel("axisTick"),a=o.get("show");if(a==="auto"&&i.handleAutoShown&&(a=i.handleAutoShown("axisTick")),!(!a||n.scale.isBlank())){for(var s=o.getModel("lineStyle"),l=i.tickDirection*o.get("length"),u=n.getTicksCoords(),f=dx(u,e.transform,l,ce(s.getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])}),"ticks"),c=0;c<f.length;c++)r.add(f[c]);return f}}function oE(r,e,t,i){var n=t.axis,o=t.getModel("minorTick");if(!(!o.get("show")||n.scale.isBlank())){var a=n.getMinorTicksCoords();if(a.length)for(var s=o.getModel("lineStyle"),l=i*o.get("length"),u=ce(s.getLineStyle(),ce(t.getModel("axisTick").getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])})),f=0;f<a.length;f++)for(var c=dx(a[f],e.transform,l,u,"minorticks_"+f),p=0;p<c.length;p++)r.add(c[p])}}function aE(r,e,t,i){var n=t.axis,o=rn(i.axisLabelShow,t.get(["axisLabel","show"]));if(!(!o||n.scale.isBlank())){var a=t.getModel("axisLabel"),s=a.get("margin"),l=n.getViewLabels(),u=(rn(i.labelRotate,a.get("rotate"))||0)*Hi/180,f=Hn.innerTextLayout(i.rotation,u,i.labelDirection),c=t.getCategories&&t.getCategories(!0),p=[],h=Hn.isLabelSilent(t),d=t.get("triggerEvent");return S(l,function(g,v){var m=n.scale.type==="ordinal"?n.scale.getRawOrdinalNumber(g.tickValue):g.tickValue,y=g.formattedLabel,_=g.rawLabel,x=a;if(c&&c[m]){var C=c[m];F(C)&&C.textStyle&&(x=new ze(C.textStyle,a,t.ecModel))}var w=x.getTextColor()||t.get(["axisLine","lineStyle","color"]),T=n.dataToCoord(m),D=x.getShallow("align",!0)||f.textAlign,b=te(x.getShallow("alignMinLabel",!0),D),E=te(x.getShallow("alignMaxLabel",!0),D),M=x.getShallow("verticalAlign",!0)||x.getShallow("baseline",!0)||f.textVerticalAlign,R=te(x.getShallow("verticalAlignMinLabel",!0),M),O=te(x.getShallow("verticalAlignMaxLabel",!0),M),I=new Ct({x:T,y:i.labelOffset+i.labelDirection*s,rotation:f.rotation,silent:h,z2:10+(g.level||0),style:Nn(x,{text:y,align:v===0?b:v===l.length-1?E:D,verticalAlign:v===0?R:v===l.length-1?O:M,fill:j(w)?w(n.type==="category"?_:n.type==="value"?m+"":m,v):w})});if(I.anid="label_"+m,Ou({el:I,componentModel:t,itemName:y,formatterParamsExtra:{isTruncated:function(){return I.isTruncated},value:_,tickIndex:v}}),d){var W=Hn.makeAxisEventDataBase(t);W.targetType="axisLabel",W.value=_,W.tickIndex=v,n.type==="category"&&(W.dataIndex=m),Re(I).eventData=W}e.add(I),I.updateTransform(),p.push(I),r.add(I),I.decomposeTransform()}),p}}var vx=Hn;function mx(r,e){var t={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return sE(t,r,e),t.seriesInvolved&&uE(t,r),t}function sE(r,e,t){var i=e.getComponent("tooltip"),n=e.getComponent("axisPointer"),o=n.get("link",!0)||[],a=[];S(t.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var l=Zo(s.model),u=r.coordSysAxesInfo[l]={};r.coordSysMap[l]=s;var f=s.model,c=f.getModel("tooltip",i);if(S(s.getAxes(),je(g,!1,null)),s.getTooltipAxes&&i&&c.get("show")){var p=c.get("trigger")==="axis",h=c.get(["axisPointer","type"])==="cross",d=s.getTooltipAxes(c.get(["axisPointer","axis"]));(p||h)&&S(d.baseAxes,je(g,h?"cross":!0,p)),h&&S(d.otherAxes,je(g,"cross",!1))}function g(v,m,y){var _=y.model.getModel("axisPointer",n),x=_.get("show");if(!(!x||x==="auto"&&!v&&!Lp(_))){m==null&&(m=_.get("triggerTooltip")),_=v?lE(y,c,n,e,v,m):_;var C=_.get("snap"),w=_.get("triggerEmphasis"),T=Zo(y.model),D=m||C||y.type==="category",b=r.axesInfo[T]={key:T,axis:y,coordSys:s,axisPointerModel:_,triggerTooltip:m,triggerEmphasis:w,involveSeries:D,snap:C,useHandle:Lp(_),seriesModels:[],linkGroup:null};u[T]=b,r.seriesInvolved=r.seriesInvolved||D;var E=fE(o,y);if(E!=null){var M=a[E]||(a[E]={axesInfo:{}});M.axesInfo[T]=b,M.mapper=o[E].mapper,b.linkGroup=M}}}})}function lE(r,e,t,i,n,o){var a=e.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],l={};S(s,function(p){l[p]=re(a.get(p))}),l.snap=r.type!=="category"&&!!o,a.get("type")==="cross"&&(l.type="line");var u=l.label||(l.label={});if(u.show==null&&(u.show=!1),n==="cross"){var f=a.get(["label","show"]);if(u.show=f??!0,!o){var c=l.lineStyle=a.get("crossStyle");c&&ce(u,c.textStyle)}}return r.model.getModel("axisPointer",new ze(l,t,i))}function uE(r,e){e.eachSeries(function(t){var i=t.coordinateSystem,n=t.get(["tooltip","trigger"],!0),o=t.get(["tooltip","show"],!0);!i||n==="none"||n===!1||n==="item"||o===!1||t.get(["axisPointer","show"],!0)===!1||S(r.coordSysAxesInfo[Zo(i.model)],function(a){var s=a.axis;i.getAxis(s.dim)===s&&(a.seriesModels.push(t),a.seriesDataCount==null&&(a.seriesDataCount=0),a.seriesDataCount+=t.getData().count())})})}function fE(r,e){for(var t=e.model,i=e.dim,n=0;n<r.length;n++){var o=r[n]||{};if(Pp(o[i+"AxisId"],t.id)||Pp(o[i+"AxisIndex"],t.componentIndex)||Pp(o[i+"AxisName"],t.name))return n}}function Pp(r,e){return r==="all"||L(r)&&he(r,e)>=0||r===e}function gx(r){var e=af(r);if(e){var t=e.axisPointerModel,i=e.axis.scale,n=t.option,o=t.get("status"),a=t.get("value");a!=null&&(a=i.parse(a));var s=Lp(t);o==null&&(n.status=s?"show":"hide");var l=i.getExtent().slice();l[0]>l[1]&&l.reverse(),(a==null||a>l[1])&&(a=l[1]),a<l[0]&&(a=l[0]),n.value=a,s&&(n.status=e.axis.scale.isBlank()?"hide":"show")}}function af(r){var e=(r.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[Zo(r)]}function yx(r){var e=af(r);return e&&e.axisPointerModel}function Lp(r){return!!r.get(["handle","show"])}function Zo(r){return r.type+"||"+r.id}var _x={},cE=(function(r){we(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,n,o){this.axisPointerClass&&gx(t),r.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(t,n,!0)},e.prototype.updateAxisPointer=function(t,i,n,o){this._doUpdateAxisPointerClass(t,n,!1)},e.prototype.remove=function(t,i){var n=this._axisPointer;n&&n.remove(i)},e.prototype.dispose=function(t,i){this._disposeAxisPointer(i),r.prototype.dispose.apply(this,arguments)},e.prototype._doUpdateAxisPointerClass=function(t,i,n){var o=e.getAxisPointerClass(this.axisPointerClass);if(o){var a=yx(t);a?(this._axisPointer||(this._axisPointer=new o)).render(t,a,i,n):this._disposeAxisPointer(i)}},e.prototype._disposeAxisPointer=function(t){this._axisPointer&&this._axisPointer.dispose(t),this._axisPointer=null},e.registerAxisPointerClass=function(t,i){_x[t]=i},e.getAxisPointerClass=function(t){return t&&_x[t]},e.type="axis",e})(rr),xx=cE;var hE=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,kp=[],pE=Q.browser.firefox&&+Q.browser.version.split(".")[0]<39;function sf(r,e,t,i){return t=t||{},i?Sx(r,e,t):pE&&e.layerX!=null&&e.layerX!==e.offsetX?(t.zrX=e.layerX,t.zrY=e.layerY):e.offsetX!=null?(t.zrX=e.offsetX,t.zrY=e.offsetY):Sx(r,e,t),t}function Sx(r,e,t){if(Q.domSupported&&r.getBoundingClientRect){var i=e.clientX,n=e.clientY;if(tp(r)){var o=r.getBoundingClientRect();t.zrX=i-o.left,t.zrY=n-o.top;return}else if(Iu(kp,r,i,n)){t.zrX=kp[0],t.zrY=kp[1];return}}t.zrX=t.zrY=0}function lf(r){return r||window.event}function Zt(r,e,t){if(e=lf(e),e.zrX!=null)return e;var i=e.type,n=i&&i.indexOf("touch")>=0;if(n){var a=i!=="touchend"?e.targetTouches[0]:e.changedTouches[0];a&&sf(r,a,e,t)}else{sf(r,e,e,t);var o=dE(e);e.zrDelta=o?o/120:-(e.detail||0)/3}var s=e.button;return e.which==null&&s!==void 0&&hE.test(e.type)&&(e.which=s&1?1:s&2?3:s&4?2:0),e}function dE(r){var e=r.wheelDelta;if(e)return e;var t=r.deltaX,i=r.deltaY;if(t==null||i==null)return e;var n=Math.abs(i!==0?i:t),o=i>0?-1:i<0?1:t>0?-1:1;return 3*n*o}function Cx(r,e,t,i){r.addEventListener(e,t,i)}function Tx(r,e,t,i){r.removeEventListener(e,t,i)}var uf=function(r){r.preventDefault(),r.stopPropagation(),r.cancelBubble=!0};var ff="\0__throttleOriginMethod",bx="\0__throttleRate",Dx="\0__throttleType";function Fp(r,e,t){var i,n=0,o=0,a=null,s,l,u,f;e=e||0;function c(){o=new Date().getTime(),a=null,r.apply(l,u||[])}var p=function(){for(var h=[],d=0;d<arguments.length;d++)h[d]=arguments[d];i=new Date().getTime(),l=this,u=h;var g=f||e,v=f||t;f=null,s=i-(v?n:o)-g,clearTimeout(a),v?a=setTimeout(c,g):s>=0?c():a=setTimeout(c,-s),n=i};return p.clear=function(){a&&(clearTimeout(a),a=null)},p.debounceNextCall=function(h){f=h},p}function cf(r,e,t,i){var n=r[e];if(n){var o=n[ff]||n,a=n[Dx],s=n[bx];if(s!==t||a!==i){if(t==null||!i)return r[e]=o;n=r[e]=Fp(o,t,i==="debounce"),n[ff]=o,n[Dx]=i,n[bx]=t}return n}}function us(r,e){var t=r[e];t&&t[ff]&&(t.clear&&t.clear(),r[e]=t[ff])}var Vn=ye(),Mx=re,Bp=De,mE=(function(){function r(){this._dragging=!1,this.animationThreshold=15}return r.prototype.render=function(e,t,i,n){var o=t.get("value"),a=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=i,!(!n&&this._lastValue===o&&this._lastStatus===a)){this._lastValue=o,this._lastStatus=a;var s=this._group,l=this._handle;if(!a||a==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,o,e,t,i);var f=u.graphicKey;f!==this._lastGraphicKey&&this.clear(i),this._lastGraphicKey=f;var c=this._moveAnimation=this.determineAnimation(e,t);if(!s)s=this._group=new wt,this.createPointerEl(s,u,e,t),this.createLabelEl(s,u,e,t),i.getZr().add(s);else{var p=je(Ex,t,c);this.updatePointerEl(s,u,p),this.updateLabelEl(s,u,p,t)}Ox(s,t,!0),this._renderHandle(o)}},r.prototype.remove=function(e){this.clear(e)},r.prototype.dispose=function(e){this.clear(e)},r.prototype.determineAnimation=function(e,t){var i=t.get("animation"),n=e.axis,o=n.type==="category",a=t.get("snap");if(!a&&!o)return!1;if(i==="auto"||i==null){var s=this.animationThreshold;if(o&&n.getBandWidth()>s)return!0;if(a){var l=af(e).seriesDataCount,u=n.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return i===!0},r.prototype.makeElOption=function(e,t,i,n,o){},r.prototype.createPointerEl=function(e,t,i,n){var o=t.pointer;if(o){var a=Vn(e).pointerEl=new ki[o.type](Mx(t.pointer));e.add(a)}},r.prototype.createLabelEl=function(e,t,i,n){if(t.label){var o=Vn(e).labelEl=new Ct(Mx(t.label));e.add(o),Rx(o,n)}},r.prototype.updatePointerEl=function(e,t,i){var n=Vn(e).pointerEl;n&&t.pointer&&(n.setStyle(t.pointer.style),i(n,{shape:t.pointer.shape}))},r.prototype.updateLabelEl=function(e,t,i,n){var o=Vn(e).labelEl;o&&(o.setStyle(t.label.style),i(o,{x:t.label.x,y:t.label.y}),Rx(o,n))},r.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var t=this._axisPointerModel,i=this._api.getZr(),n=this._handle,o=t.getModel("handle"),a=t.get("status");if(!o.get("show")||!a||a==="hide"){n&&i.remove(n),this._handle=null;return}var s;this._handle||(s=!0,n=this._handle=es(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){uf(u.event)},onmousedown:Bp(this._onHandleDragMove,this,0,0),drift:Bp(this._onHandleDragMove,this),ondragend:Bp(this._onHandleDragEnd,this)}),i.add(n)),Ox(n,t,!1),n.setStyle(o.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=o.get("size");L(l)||(l=[l,l]),n.scaleX=l[0]/2,n.scaleY=l[1]/2,cf(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,s)}},r.prototype._moveHandleToValue=function(e,t){Ex(this._axisPointerModel,!t&&this._moveAnimation,this._handle,Wp(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},r.prototype._onHandleDragMove=function(e,t){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform(Wp(i),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr(Wp(n)),Vn(i).lastProp=null,this._doDispatchAxisPointer()}},r.prototype._doDispatchAxisPointer=function(){var e=this._handle;if(e){var t=this._payloadInfo,i=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:i.axis.dim,axisIndex:i.componentIndex}]})}},r.prototype._onHandleDragEnd=function(){this._dragging=!1;var e=this._handle;if(e){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},r.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),i=this._group,n=this._handle;t&&i&&(this._lastGraphicKey=null,i&&t.remove(i),n&&t.remove(n),this._group=null,this._handle=null,this._payloadInfo=null),us(this,"_doDispatchAxisPointer")},r.prototype.doClear=function(){},r.prototype.buildLabel=function(e,t,i){return i=i||0,{x:e[i],y:e[1-i],width:t[i],height:t[1-i]}},r})();function Ex(r,e,t,i){Ix(Vn(t).lastProp,i)||(Vn(t).lastProp=i,e?yr(t,i,r):(t.stopAnimation(),t.attr(i)))}function Ix(r,e){if(F(r)&&F(e)){var t=!0;return S(e,function(i,n){t=t&&Ix(r[n],i)}),!!t}else return r===e}function Rx(r,e){r[e.get(["label","show"])?"show":"hide"]()}function Wp(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function Ox(r,e,t){var i=e.get("z"),n=e.get("zlevel");r&&r.traverse(function(o){o.type!=="group"&&(i!=null&&(o.z=i),n!=null&&(o.zlevel=n),o.silent=t)})}var Ax=mE;function Px(r){var e=r.get("type"),t=r.getModel(e+"Style"),i;return e==="line"?(i=t.getLineStyle(),i.fill=null):e==="shadow"&&(i=t.getAreaStyle(),i.stroke=null),i}function gE(r,e,t,i,n){var o=t.get("value"),a=Up(o,e.axis,e.ecModel,t.get("seriesDataIndices"),{precision:t.get(["label","precision"]),formatter:t.get(["label","formatter"])}),s=t.getModel("label"),l=zi(s.get("padding")||0),u=s.getFont(),f=ql(a,u),c=n.position,p=f.width+l[1]+l[3],h=f.height+l[0]+l[2],d=n.align;d==="right"&&(c[0]-=p),d==="center"&&(c[0]-=p/2);var g=n.verticalAlign;g==="bottom"&&(c[1]-=h),g==="middle"&&(c[1]-=h/2),yE(c,p,h,i);var v=s.get("backgroundColor");(!v||v==="auto")&&(v=e.get(["axisLine","lineStyle","color"])),r.label={x:c[0],y:c[1],style:Nn(s,{text:a,font:u,fill:s.getTextColor(),padding:l,backgroundColor:v}),z2:10}}function yE(r,e,t,i){var n=i.getWidth(),o=i.getHeight();r[0]=Math.min(r[0]+e,n)-e,r[1]=Math.min(r[1]+t,o)-t,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0)}function Up(r,e,t,i,n){r=e.scale.parse(r);var o=e.scale.getLabel({value:r},{precision:n.precision}),a=n.formatter;if(a){var s={value:rf(e,{value:r}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};S(i,function(l){var u=t.getSeriesByIndex(l.seriesIndex),f=l.dataIndexInside,c=u&&u.getDataParams(f);c&&s.seriesData.push(c)}),N(a)?o=a.replace("{value}",o):j(a)&&(o=a(s))}return o}function Hp(r,e,t){var i=Kr();return vo(i,i,t.rotation),ya(i,i,t.position),Ru([r.dataToCoord(e),(t.labelOffset||0)+(t.labelDirection||1)*(t.labelMargin||0)],i)}function Lx(r,e,t,i,n,o){var a=vx.innerTextLayout(t.rotation,0,t.labelDirection);t.labelMargin=n.get(["label","margin"]),gE(e,i,n,o,{position:Hp(i.axis,r,t),align:a.textAlign,verticalAlign:a.textVerticalAlign})}function Nx(r,e,t){return t=t||0,{x1:r[t],y1:r[1-t],x2:e[t],y2:e[1-t]}}function kx(r,e,t){return t=t||0,{x:r[t],y:r[1-t],width:e[t],height:e[1-t]}}var _E=(function(r){we(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,i,n,o,a){var s=n.axis,l=s.grid,u=o.get("type"),f=Fx(l,s).getOtherAxis(s).getGlobalExtent(),c=s.toGlobalCoord(s.dataToCoord(i,!0));if(u&&u!=="none"){var p=Px(o),h=xE[u](s,c,f);h.style=p,t.graphicKey=h.type,t.pointer=h}var d=Ip(l.model,n);Lx(i,t,d,n,o,a)},e.prototype.getHandleTransform=function(t,i,n){var o=Ip(i.axis.grid.model,i,{labelInside:!1});o.labelMargin=n.get(["handle","margin"]);var a=Hp(i.axis,t,o);return{x:a[0],y:a[1],rotation:o.rotation+(o.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,i,n,o){var a=n.axis,s=a.grid,l=a.getGlobalExtent(!0),u=Fx(s,a).getOtherAxis(a).getGlobalExtent(),f=a.dim==="x"?0:1,c=[t.x,t.y];c[f]+=i[f],c[f]=Math.min(l[1],c[f]),c[f]=Math.max(l[0],c[f]);var p=(u[1]+u[0])/2,h=[p,p];h[f]=c[f];var d=[{verticalAlign:"middle"},{align:"center"}];return{x:c[0],y:c[1],rotation:t.rotation,cursorPoint:h,tooltipOption:d[f]}},e})(Ax);function Fx(r,e){var t={};return t[e.dim+"AxisIndex"]=e.index,r.getCartesian(t)}var xE={line:function(r,e,t){var i=Nx([e,t[0]],[e,t[1]],Bx(r));return{type:"Line",subPixelOptimize:!0,shape:i}},shadow:function(r,e,t){var i=Math.max(1,r.getBandWidth()),n=t[1]-t[0];return{type:"Rect",shape:kx([e-i/2,t[0]],[i,n],Bx(r))}}};function Bx(r){return r.dim==="x"?0:1}var Wx=_E;var SE=(function(r){we(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},e})(Fe),Ux=SE;var ci=ye(),wE=S;function hf(r,e,t){if(!Q.node){var i=e.getZr();ci(i).records||(ci(i).records={}),CE(i,e);var n=ci(i).records[r]||(ci(i).records[r]={});n.handler=t}}function CE(r,e){if(ci(r).initialized)return;ci(r).initialized=!0,t("click",je(Hx,"click")),t("mousemove",je(Hx,"mousemove")),t("globalout",bE);function t(i,n){r.on(i,function(o){var a=DE(e);wE(ci(r).records,function(s){s&&n(s,o,a.dispatchAction)}),TE(a.pendings,e)})}}function TE(r,e){var t=r.showTip.length,i=r.hideTip.length,n;t?n=r.showTip[t-1]:i&&(n=r.hideTip[i-1]),n&&(n.dispatchAction=null,e.dispatchAction(n))}function bE(r,e,t){r.handler("leave",null,t)}function Hx(r,e,t,i){e.handler(r,t,i)}function DE(r){var e={showTip:[],hideTip:[]},t=function(i){var n=e[i.type];n?n.push(i):(i.dispatchAction=t,r.dispatchAction(i))};return{dispatchAction:t,pendings:e}}function fs(r,e){if(!Q.node){var t=e.getZr(),i=(ci(t).records||{})[r];i&&(ci(t).records[r]=null)}}var ME=(function(r){we(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,n){var o=i.getComponent("tooltip"),a=t.get("triggerOn")||o&&o.get("triggerOn")||"mousemove|click";hf("axisPointer",n,function(s,l,u){a!=="none"&&(s==="leave"||a.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},e.prototype.remove=function(t,i){fs("axisPointer",i)},e.prototype.dispose=function(t,i){fs("axisPointer",i)},e.type="axisPointer",e})(rr),Gx=ME;function cs(r,e){var t=[],i=r.seriesIndex,n;if(i==null||!(n=e.getSeriesByIndex(i)))return{point:[]};var o=n.getData(),a=oi(o,r);if(a==null||a<0||L(a))return{point:[]};var s=o.getItemGraphicEl(a),l=n.coordinateSystem;if(n.getTooltipPosition)t=n.getTooltipPosition(a)||[];else if(l&&l.dataToPoint)if(r.isStacked){var u=l.getBaseAxis(),f=l.getOtherAxis(u),c=f.dim,p=u.dim,h=c==="x"||c==="radius"?1:0,d=o.mapDimension(p),g=[];g[h]=o.get(d,a),g[1-h]=o.get(o.getCalculationInfo("stackResultDimension"),a),t=l.dataToPoint(g)||[]}else t=l.dataToPoint(o.getValues(X(l.dimensions,function(m){return o.mapDimension(m)}),a))||[];else if(s){var v=s.getBoundingRect().clone();v.applyTransform(s.transform),t=[v.x+v.width/2,v.y+v.height/2]}return{point:t,el:s}}var Yx=ye();function Vp(r,e,t){var i=r.currTrigger,n=[r.x,r.y],o=r,a=r.dispatchAction||De(t.dispatchAction,t),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){pf(n)&&(n=cs({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},e).point);var l=pf(n),u=o.axesInfo,f=s.axesInfo,c=i==="leave"||pf(n),p={},h={},d={list:[],map:{}},g={showPointer:je(RE,h),showTooltip:je(OE,d)};S(s.coordSysMap,function(m,y){var _=l||m.containPoint(n);S(s.coordSysAxesInfo[y],function(x,C){var w=x.axis,T=LE(u,x);if(!c&&_&&(!u||T)){var D=T&&T.value;D==null&&!l&&(D=w.pointToData(n)),D!=null&&qx(x,D,g,!1,p)}})});var v={};return S(f,function(m,y){var _=m.linkGroup;_&&!h[y]&&S(_.axesInfo,function(x,C){var w=h[C];if(x!==m&&w){var T=w.value;_.mapper&&(T=m.axis.scale.parse(_.mapper(T,Xx(x),Xx(m)))),v[m.key]=T}})}),S(v,function(m,y){qx(f[y],m,g,!0,p)}),IE(h,f,p),AE(d,n,r,a),PE(f,a,t),p}}function qx(r,e,t,i,n){var o=r.axis;if(!(o.scale.isBlank()||!o.containData(e))){if(!r.involveSeries){t.showPointer(r,e);return}var a=EE(e,r),s=a.payloadBatch,l=a.snapToValue;s[0]&&n.seriesIndex==null&&P(n,s[0]),!i&&r.snap&&o.containData(l)&&l!=null&&(e=l),t.showPointer(r,e,s),t.showTooltip(r,a,l)}}function EE(r,e){var t=e.axis,i=t.dim,n=r,o=[],a=Number.MAX_VALUE,s=-1;return S(e.seriesModels,function(l,u){var f=l.getData().mapDimensionsAll(i),c,p;if(l.getAxisTooltipData){var h=l.getAxisTooltipData(f,r,t);p=h.dataIndices,c=h.nestestValue}else{if(p=l.getData().indicesOfNearest(f[0],r,t.type==="category"?.5:null),!p.length)return;c=l.getData().get(f[0],p[0])}if(!(c==null||!isFinite(c))){var d=r-c,g=Math.abs(d);g<=a&&((g<a||d>=0&&s<0)&&(a=g,s=d,n=c,o.length=0),S(p,function(v){o.push({seriesIndex:l.seriesIndex,dataIndexInside:v,dataIndex:l.getData().getRawIndex(v)})}))}}),{payloadBatch:o,snapToValue:n}}function RE(r,e,t,i){r[e.key]={value:t,payloadBatch:i}}function OE(r,e,t,i){var n=t.payloadBatch,o=e.axis,a=o.model,s=e.axisPointerModel;if(!(!e.triggerTooltip||!n.length)){var l=e.coordSys.model,u=Zo(l),f=r.map[u];f||(f=r.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},r.list.push(f)),f.dataByAxis.push({axisDim:o.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:i,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:n.slice()})}}function IE(r,e,t){var i=t.axesInfo=[];S(e,function(n,o){var a=n.axisPointerModel.option,s=r[o];s?(!n.useHandle&&(a.status="show"),a.value=s.value,a.seriesDataIndices=(s.payloadBatch||[]).slice()):!n.useHandle&&(a.status="hide"),a.status==="show"&&i.push({axisDim:n.axis.dim,axisIndex:n.axis.model.componentIndex,value:a.value})})}function AE(r,e,t,i){if(pf(e)||!r.list.length){i({type:"hideTip"});return}var n=((r.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:t.tooltipOption,position:t.position,dataIndexInside:n.dataIndexInside,dataIndex:n.dataIndex,seriesIndex:n.seriesIndex,dataByCoordSys:r.list})}function PE(r,e,t){var i=t.getZr(),n="axisPointerLastHighlights",o=Yx(i)[n]||{},a=Yx(i)[n]={};S(r,function(u,f){var c=u.axisPointerModel.option;c.status==="show"&&u.triggerEmphasis&&S(c.seriesDataIndices,function(p){var h=p.seriesIndex+" | "+p.dataIndex;a[h]=p})});var s=[],l=[];S(o,function(u,f){!a[f]&&l.push(u)}),S(a,function(u,f){!o[f]&&s.push(u)}),l.length&&t.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&t.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function LE(r,e){for(var t=0;t<(r||[]).length;t++){var i=r[t];if(e.axis.dim===i.axisDim&&e.axis.model.componentIndex===i.axisIndex)return i}}function Xx(r){var e=r.axis.model,t={},i=t.axisDim=r.axis.dim;return t.axisIndex=t[i+"AxisIndex"]=e.componentIndex,t.axisName=t[i+"AxisName"]=e.name,t.axisId=t[i+"AxisId"]=e.id,t}function pf(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function jx(r){xx.registerAxisPointerClass("CartesianAxisPointer",Wx),r.registerComponentModel(Ux),r.registerComponentView(Gx),r.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!L(t)&&(e.axisPointer.link=[t])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=mx(e,t)}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},Vp)}var Ko=(function(){function r(e,t){this.target=e,this.topTarget=t&&t.topTarget}return r})(),NE=(function(){function r(e){this.handler=e,e.on("mousedown",this._dragStart,this),e.on("mousemove",this._drag,this),e.on("mouseup",this._dragEnd,this)}return r.prototype._dragStart=function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent||t.__hostTarget;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new Ko(t,e),"dragstart",e.event))},r.prototype._drag=function(e){var t=this._draggingTarget;if(t){var i=e.offsetX,n=e.offsetY,o=i-this._x,a=n-this._y;this._x=i,this._y=n,t.drift(o,a,e),this.handler.dispatchToElement(new Ko(t,e),"drag",e.event);var s=this.handler.findHover(i,n,t).target,l=this._dropTarget;this._dropTarget=s,t!==s&&(l&&s!==l&&this.handler.dispatchToElement(new Ko(l,e),"dragleave",e.event),s&&s!==l&&this.handler.dispatchToElement(new Ko(s,e),"dragenter",e.event))}},r.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new Ko(t,e),"dragend",e.event),this._dropTarget&&this.handler.dispatchToElement(new Ko(this._dropTarget,e),"drop",e.event),this._draggingTarget=null,this._dropTarget=null},r})(),Zx=NE;var $x=(function(){function r(){this._track=[]}return r.prototype.recognize=function(e,t,i){return this._doTrack(e,t,i),this._recognize(e)},r.prototype.clear=function(){return this._track.length=0,this},r.prototype._doTrack=function(e,t,i){var n=e.touches;if(n){for(var o={points:[],touches:[],target:t,event:e},a=0,s=n.length;a<s;a++){var l=n[a],u=sf(i,l,{});o.points.push([u.zrX,u.zrY]),o.touches.push(l)}this._track.push(o)}},r.prototype._recognize=function(e){for(var t in Gp)if(Gp.hasOwnProperty(t)){var i=Gp[t](this._track,e);if(i)return i}},r})();function Kx(r){var e=r[1][0]-r[0][0],t=r[1][1]-r[0][1];return Math.sqrt(e*e+t*t)}function kE(r){return[(r[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2]}var Gp={pinch:function(r,e){var t=r.length;if(t){var i=(r[t-1]||{}).points,n=(r[t-2]||{}).points||i;if(n&&n.length>1&&i&&i.length>1){var o=Kx(i)/Kx(n);!isFinite(o)&&(o=1),e.pinchScale=o;var a=kE(i);return e.pinchX=a[0],e.pinchY=a[1],{type:"pinch",target:r[0].target,event:e}}}}};var Jx="silent";function zE(r,e,t){return{type:r,event:t,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:t.zrX,offsetY:t.zrY,gestureEvent:t.gestureEvent,pinchX:t.pinchX,pinchY:t.pinchY,pinchScale:t.pinchScale,wheelDelta:t.zrDelta,zrByTouch:t.zrByTouch,which:t.which,stop:FE}}function FE(){uf(this.event)}var BE=(function(r){J(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.handler=null,t}return e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e})(St),hs=(function(){function r(e,t){this.x=e,this.y=t}return r})(),WE=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Yp=new ue(0,0,0,0),eS=(function(r){J(e,r);function e(t,i,n,o,a){var s=r.call(this)||this;return s._hovered=new hs(0,0),s.storage=t,s.painter=i,s.painterRoot=o,s._pointerSize=a,n=n||new BE,s.proxy=null,s.setHandlerProxy(n),s._draggingMgr=new Zx(s),s}return e.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(S(WE,function(i){t.on&&t.on(i,this[i],this)},this),t.handler=this),this.proxy=t},e.prototype.mousemove=function(t){var i=t.zrX,n=t.zrY,o=tS(this,i,n),a=this._hovered,s=a.target;s&&!s.__zr&&(a=this.findHover(a.x,a.y),s=a.target);var l=this._hovered=o?new hs(i,n):this.findHover(i,n),u=l.target,f=this.proxy;f.setCursor&&f.setCursor(u?u.cursor:"default"),s&&u!==s&&this.dispatchToElement(a,"mouseout",t),this.dispatchToElement(l,"mousemove",t),u&&u!==s&&this.dispatchToElement(l,"mouseover",t)},e.prototype.mouseout=function(t){var i=t.zrEventControl;i!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",t),i!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:t})},e.prototype.resize=function(){this._hovered=new hs(0,0)},e.prototype.dispatch=function(t,i){var n=this[t];n&&n.call(this,i)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(t){var i=this.proxy;i.setCursor&&i.setCursor(t)},e.prototype.dispatchToElement=function(t,i,n){t=t||{};var o=t.target;if(!(o&&o.silent)){for(var a="on"+i,s=zE(i,t,n);o&&(o[a]&&(s.cancelBubble=!!o[a].call(o,s)),o.trigger(i,s),o=o.__hostTarget?o.__hostTarget:o.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(i,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(l){typeof l[a]=="function"&&l[a].call(l,s),l.trigger&&l.trigger(i,s)}))}},e.prototype.findHover=function(t,i,n){var o=this.storage.getDisplayList(),a=new hs(t,i);if(Qx(o,a,t,i,n),this._pointerSize&&!a.target){for(var s=[],l=this._pointerSize,u=l/2,f=new ue(t-u,i-u,l,l),c=o.length-1;c>=0;c--){var p=o[c];p!==n&&!p.ignore&&!p.ignoreCoarsePointer&&(!p.parent||!p.parent.ignoreCoarsePointer)&&(Yp.copy(p.getBoundingRect()),p.transform&&Yp.applyTransform(p.transform),Yp.intersect(f)&&s.push(p))}if(s.length)for(var h=4,d=Math.PI/12,g=Math.PI*2,v=0;v<u;v+=h)for(var m=0;m<g;m+=d){var y=t+v*Math.cos(m),_=i+v*Math.sin(m);if(Qx(s,a,y,_,n),a.target)return a}}return a},e.prototype.processGesture=function(t,i){this._gestureMgr||(this._gestureMgr=new $x);var n=this._gestureMgr;i==="start"&&n.clear();var o=n.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if(i==="end"&&n.clear(),o){var a=o.type;t.gestureEvent=a;var s=new hs;s.target=o.target,this.dispatchToElement(s,a,o.event)}},e})(St);S(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(r){eS.prototype[r]=function(e){var t=e.zrX,i=e.zrY,n=tS(this,t,i),o,a;if((r!=="mouseup"||!n)&&(o=this.findHover(t,i),a=o.target),r==="mousedown")this._downEl=a,this._downPoint=[e.zrX,e.zrY],this._upEl=a;else if(r==="mouseup")this._upEl=a;else if(r==="click"){if(this._downEl!==this._upEl||!this._downPoint||xa(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(o,r,e)}});function UE(r,e,t){if(r[r.rectHover?"rectContain":"contain"](e,t)){for(var i=r,n=void 0,o=!1;i;){if(i.ignoreClip&&(o=!0),!o){var a=i.getClipPath();if(a&&!a.contain(e,t))return!1}i.silent&&(n=!0);var s=i.__hostTarget;i=s||i.parent}return n?Jx:!0}return!1}function Qx(r,e,t,i,n){for(var o=r.length-1;o>=0;o--){var a=r[o],s=void 0;if(a!==n&&!a.ignore&&(s=UE(a,t,i))&&(!e.topTarget&&(e.topTarget=a),s!==Jx)){e.target=a;break}}}function tS(r,e,t){var i=r.painter;return e<0||e>i.getWidth()||t<0||t>i.getHeight()}var rS=eS;var oS=32,ps=7;function HE(r){for(var e=0;r>=oS;)e|=r&1,r>>=1;return r+e}function iS(r,e,t,i){var n=e+1;if(n===t)return 1;if(i(r[n++],r[e])<0){for(;n<t&&i(r[n],r[n-1])<0;)n++;VE(r,e,n)}else for(;n<t&&i(r[n],r[n-1])>=0;)n++;return n-e}function VE(r,e,t){for(t--;e<t;){var i=r[e];r[e++]=r[t],r[t--]=i}}function nS(r,e,t,i,n){for(i===e&&i++;i<t;i++){for(var o=r[i],a=e,s=i,l;a<s;)l=a+s>>>1,n(o,r[l])<0?s=l:a=l+1;var u=i-a;switch(u){case 3:r[a+3]=r[a+2];case 2:r[a+2]=r[a+1];case 1:r[a+1]=r[a];break;default:for(;u>0;)r[a+u]=r[a+u-1],u--}r[a]=o}}function qp(r,e,t,i,n,o){var a=0,s=0,l=1;if(o(r,e[t+n])>0){for(s=i-n;l<s&&o(r,e[t+n+l])>0;)a=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),a+=n,l+=n}else{for(s=n+1;l<s&&o(r,e[t+n-l])<=0;)a=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=a;a=n-l,l=n-u}for(a++;a<l;){var f=a+(l-a>>>1);o(r,e[t+f])>0?a=f+1:l=f}return l}function Xp(r,e,t,i,n,o){var a=0,s=0,l=1;if(o(r,e[t+n])<0){for(s=n+1;l<s&&o(r,e[t+n-l])<0;)a=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=a;a=n-l,l=n-u}else{for(s=i-n;l<s&&o(r,e[t+n+l])>=0;)a=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),a+=n,l+=n}for(a++;a<l;){var f=a+(l-a>>>1);o(r,e[t+f])<0?l=f:a=f+1}return l}function GE(r,e){var t=ps,i,n,o=0,a=[];i=[],n=[];function s(h,d){i[o]=h,n[o]=d,o+=1}function l(){for(;o>1;){var h=o-2;if(h>=1&&n[h-1]<=n[h]+n[h+1]||h>=2&&n[h-2]<=n[h]+n[h-1])n[h-1]<n[h+1]&&h--;else if(n[h]>n[h+1])break;f(h)}}function u(){for(;o>1;){var h=o-2;h>0&&n[h-1]<n[h+1]&&h--,f(h)}}function f(h){var d=i[h],g=n[h],v=i[h+1],m=n[h+1];n[h]=g+m,h===o-3&&(i[h+1]=i[h+2],n[h+1]=n[h+2]),o--;var y=Xp(r[v],r,d,g,0,e);d+=y,g-=y,g!==0&&(m=qp(r[d+g-1],r,v,m,m-1,e),m!==0&&(g<=m?c(d,g,v,m):p(d,g,v,m)))}function c(h,d,g,v){var m=0;for(m=0;m<d;m++)a[m]=r[h+m];var y=0,_=g,x=h;if(r[x++]=r[_++],--v===0){for(m=0;m<d;m++)r[x+m]=a[y+m];return}if(d===1){for(m=0;m<v;m++)r[x+m]=r[_+m];r[x+v]=a[y];return}for(var C=t,w,T,D;;){w=0,T=0,D=!1;do if(e(r[_],a[y])<0){if(r[x++]=r[_++],T++,w=0,--v===0){D=!0;break}}else if(r[x++]=a[y++],w++,T=0,--d===1){D=!0;break}while((w|T)<C);if(D)break;do{if(w=Xp(r[_],a,y,d,0,e),w!==0){for(m=0;m<w;m++)r[x+m]=a[y+m];if(x+=w,y+=w,d-=w,d<=1){D=!0;break}}if(r[x++]=r[_++],--v===0){D=!0;break}if(T=qp(a[y],r,_,v,0,e),T!==0){for(m=0;m<T;m++)r[x+m]=r[_+m];if(x+=T,_+=T,v-=T,v===0){D=!0;break}}if(r[x++]=a[y++],--d===1){D=!0;break}C--}while(w>=ps||T>=ps);if(D)break;C<0&&(C=0),C+=2}if(t=C,t<1&&(t=1),d===1){for(m=0;m<v;m++)r[x+m]=r[_+m];r[x+v]=a[y]}else{if(d===0)throw new Error;for(m=0;m<d;m++)r[x+m]=a[y+m]}}function p(h,d,g,v){var m=0;for(m=0;m<v;m++)a[m]=r[g+m];var y=h+d-1,_=v-1,x=g+v-1,C=0,w=0;if(r[x--]=r[y--],--d===0){for(C=x-(v-1),m=0;m<v;m++)r[C+m]=a[m];return}if(v===1){for(x-=d,y-=d,w=x+1,C=y+1,m=d-1;m>=0;m--)r[w+m]=r[C+m];r[x]=a[_];return}for(var T=t;;){var D=0,b=0,E=!1;do if(e(a[_],r[y])<0){if(r[x--]=r[y--],D++,b=0,--d===0){E=!0;break}}else if(r[x--]=a[_--],b++,D=0,--v===1){E=!0;break}while((D|b)<T);if(E)break;do{if(D=d-Xp(a[_],r,h,d,d-1,e),D!==0){for(x-=D,y-=D,d-=D,w=x+1,C=y+1,m=D-1;m>=0;m--)r[w+m]=r[C+m];if(d===0){E=!0;break}}if(r[x--]=a[_--],--v===1){E=!0;break}if(b=v-qp(r[y],a,0,v,v-1,e),b!==0){for(x-=b,_-=b,v-=b,w=x+1,C=_+1,m=0;m<b;m++)r[w+m]=a[C+m];if(v<=1){E=!0;break}}if(r[x--]=r[y--],--d===0){E=!0;break}T--}while(D>=ps||b>=ps);if(E)break;T<0&&(T=0),T+=2}if(t=T,t<1&&(t=1),v===1){for(x-=d,y-=d,w=x+1,C=y+1,m=d-1;m>=0;m--)r[w+m]=r[C+m];r[x]=a[_]}else{if(v===0)throw new Error;for(C=x-(v-1),m=0;m<v;m++)r[C+m]=a[m]}}return{mergeRuns:l,forceMergeRuns:u,pushRun:s}}function Gn(r,e,t,i){t||(t=0),i||(i=r.length);var n=i-t;if(!(n<2)){var o=0;if(n<oS){o=iS(r,t,i,e),nS(r,t,i,t+o,e);return}var a=GE(r,e),s=HE(n);do{if(o=iS(r,t,i,e),o<s){var l=n;l>s&&(l=s),nS(r,t,t+l,t+o,e),o=l}a.pushRun(t,o),a.mergeRuns(),n-=o,t+=o}while(n!==0);a.forceMergeRuns()}}var aS=!1;function jp(){aS||(aS=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function sS(r,e){return r.zlevel===e.zlevel?r.z===e.z?r.z2-e.z2:r.z-e.z:r.zlevel-e.zlevel}var YE=(function(){function r(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=sS}return r.prototype.traverse=function(e,t){for(var i=0;i<this._roots.length;i++)this._roots[i].traverse(e,t)},r.prototype.getDisplayList=function(e,t){t=t||!1;var i=this._displayList;return(e||!i.length)&&this.updateDisplayList(t),i},r.prototype.updateDisplayList=function(e){this._displayListLen=0;for(var t=this._roots,i=this._displayList,n=0,o=t.length;n<o;n++)this._updateAndAddDisplayable(t[n],null,e);i.length=this._displayListLen,Gn(i,sS)},r.prototype._updateAndAddDisplayable=function(e,t,i){if(!(e.ignore&&!i)){e.beforeUpdate(),e.update(),e.afterUpdate();var n=e.getClipPath();if(e.ignoreClip)t=null;else if(n){t?t=t.slice():t=[];for(var o=n,a=e;o;)o.parent=a,o.updateTransform(),t.push(o),a=o,o=o.getClipPath()}if(e.childrenRef){for(var s=e.childrenRef(),l=0;l<s.length;l++){var u=s[l];e.__dirty&&(u.__dirty|=tt),this._updateAndAddDisplayable(u,t,i)}e.__dirty=0}else{var f=e;t&&t.length?f.__clipPaths=t:f.__clipPaths&&f.__clipPaths.length>0&&(f.__clipPaths=[]),isNaN(f.z)&&(jp(),f.z=0),isNaN(f.z2)&&(jp(),f.z2=0),isNaN(f.zlevel)&&(jp(),f.zlevel=0),this._displayList[this._displayListLen++]=f}var c=e.getDecalElement&&e.getDecalElement();c&&this._updateAndAddDisplayable(c,t,i);var p=e.getTextGuideLine();p&&this._updateAndAddDisplayable(p,t,i);var h=e.getTextContent();h&&this._updateAndAddDisplayable(h,t,i)}},r.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},r.prototype.delRoot=function(e){if(e instanceof Array){for(var t=0,i=e.length;t<i;t++)this.delRoot(e[t]);return}var n=he(this._roots,e);n>=0&&this._roots.splice(n,1)},r.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},r.prototype.getRoots=function(){return this._roots},r.prototype.dispose=function(){this._displayList=null,this._roots=null},r})(),lS=YE;var uS;uS=Q.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(r){return setTimeout(r,16)};var ds=uS;function Yn(){return new Date().getTime()}var qE=(function(r){J(e,r);function e(t){var i=r.call(this)||this;return i._running=!1,i._time=0,i._pausedTime=0,i._pauseStart=0,i._paused=!1,t=t||{},i.stage=t.stage||{},i}return e.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._head?(this._tail.next=t,t.prev=this._tail,t.next=null,this._tail=t):this._head=this._tail=t,t.animation=this},e.prototype.addAnimator=function(t){t.animation=this;var i=t.getClip();i&&this.addClip(i)},e.prototype.removeClip=function(t){if(t.animation){var i=t.prev,n=t.next;i?i.next=n:this._head=n,n?n.prev=i:this._tail=i,t.next=t.prev=t.animation=null}},e.prototype.removeAnimator=function(t){var i=t.getClip();i&&this.removeClip(i),t.animation=null},e.prototype.update=function(t){for(var i=Yn()-this._pausedTime,n=i-this._time,o=this._head;o;){var a=o.next,s=o.step(i,n);s&&(o.ondestroy(),this.removeClip(o)),o=a}this._time=i,t||(this.trigger("frame",n),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0;function i(){t._running&&(ds(i),!t._paused&&t.update())}ds(i)},e.prototype.start=function(){this._running||(this._time=Yn(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=Yn(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=Yn()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._head;t;){var i=t.next;t.prev=t.next=t.animation=null,t=i}this._head=this._tail=null},e.prototype.isFinished=function(){return this._head==null},e.prototype.animate=function(t,i){i=i||{},this.start();var n=new Da(t,i.loop);return this.addAnimator(n),n},e})(St),fS=qE;var XE=300,Zp=Q.domSupported,Kp=(function(){var r=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],t={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},i=X(r,function(n){var o=n.replace("mouse","pointer");return t.hasOwnProperty(o)?o:n});return{mouse:r,touch:e,pointer:i}})(),cS={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},hS=!1;function Jp(r){var e=r.pointerType;return e==="pen"||e==="touch"}function jE(r){r.touching=!0,r.touchTimer!=null&&(clearTimeout(r.touchTimer),r.touchTimer=null),r.touchTimer=setTimeout(function(){r.touching=!1,r.touchTimer=null},700)}function $p(r){r&&(r.zrByTouch=!0)}function ZE(r,e){return Zt(r.dom,new KE(r,e),!0)}function dS(r,e){for(var t=e,i=!1;t&&t.nodeType!==9&&!(i=t.domBelongToZr||t!==e&&t===r.painterRoot);)t=t.parentNode;return i}var KE=(function(){function r(e,t){this.stopPropagation=it,this.stopImmediatePropagation=it,this.preventDefault=it,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return r})(),Er={mousedown:function(r){r=Zt(this.dom,r),this.__mayPointerCapture=[r.zrX,r.zrY],this.trigger("mousedown",r)},mousemove:function(r){r=Zt(this.dom,r);var e=this.__mayPointerCapture;e&&(r.zrX!==e[0]||r.zrY!==e[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",r)},mouseup:function(r){r=Zt(this.dom,r),this.__togglePointerCapture(!1),this.trigger("mouseup",r)},mouseout:function(r){r=Zt(this.dom,r);var e=r.toElement||r.relatedTarget;dS(this,e)||(this.__pointerCapturing&&(r.zrEventControl="no_globalout"),this.trigger("mouseout",r))},wheel:function(r){hS=!0,r=Zt(this.dom,r),this.trigger("mousewheel",r)},mousewheel:function(r){hS||(r=Zt(this.dom,r),this.trigger("mousewheel",r))},touchstart:function(r){r=Zt(this.dom,r),$p(r),this.__lastTouchMoment=new Date,this.handler.processGesture(r,"start"),Er.mousemove.call(this,r),Er.mousedown.call(this,r)},touchmove:function(r){r=Zt(this.dom,r),$p(r),this.handler.processGesture(r,"change"),Er.mousemove.call(this,r)},touchend:function(r){r=Zt(this.dom,r),$p(r),this.handler.processGesture(r,"end"),Er.mouseup.call(this,r),+new Date-+this.__lastTouchMoment<XE&&Er.click.call(this,r)},pointerdown:function(r){Er.mousedown.call(this,r)},pointermove:function(r){Jp(r)||Er.mousemove.call(this,r)},pointerup:function(r){Er.mouseup.call(this,r)},pointerout:function(r){Jp(r)||Er.mouseout.call(this,r)}};S(["click","dblclick","contextmenu"],function(r){Er[r]=function(e){e=Zt(this.dom,e),this.trigger(r,e)}});var ed={pointermove:function(r){Jp(r)||ed.mousemove.call(this,r)},pointerup:function(r){ed.mouseup.call(this,r)},mousemove:function(r){this.trigger("mousemove",r)},mouseup:function(r){var e=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",r),e&&(r.zrEventControl="only_globalout",this.trigger("mouseout",r))}};function $E(r,e){var t=e.domHandlers;Q.pointerEventsSupported?S(Kp.pointer,function(i){df(e,i,function(n){t[i].call(r,n)})}):(Q.touchEventsSupported&&S(Kp.touch,function(i){df(e,i,function(n){t[i].call(r,n),jE(e)})}),S(Kp.mouse,function(i){df(e,i,function(n){n=lf(n),e.touching||t[i].call(r,n)})}))}function QE(r,e){Q.pointerEventsSupported?S(cS.pointer,t):Q.touchEventsSupported||S(cS.mouse,t);function t(i){function n(o){o=lf(o),dS(r,o.target)||(o=ZE(r,o),e.domHandlers[i].call(r,o))}df(e,i,n,{capture:!0})}}function df(r,e,t,i){r.mounted[e]=t,r.listenerOpts[e]=i,Cx(r.domTarget,e,t,i)}function Qp(r){var e=r.mounted;for(var t in e)e.hasOwnProperty(t)&&Tx(r.domTarget,t,e[t],r.listenerOpts[t]);r.mounted={}}var pS=(function(){function r(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t}return r})(),JE=(function(r){J(e,r);function e(t,i){var n=r.call(this)||this;return n.__pointerCapturing=!1,n.dom=t,n.painterRoot=i,n._localHandlerScope=new pS(t,Er),Zp&&(n._globalHandlerScope=new pS(document,ed)),$E(n,n._localHandlerScope),n}return e.prototype.dispose=function(){Qp(this._localHandlerScope),Zp&&Qp(this._globalHandlerScope)},e.prototype.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},e.prototype.__togglePointerCapture=function(t){if(this.__mayPointerCapture=null,Zp&&+this.__pointerCapturing^+t){this.__pointerCapturing=t;var i=this._globalHandlerScope;t?QE(this,i):Qp(i)}},e})(St),vS=JE;var vf={},mS={};function eR(r){delete mS[r]}function tR(r){if(!r)return!1;if(typeof r=="string")return wo(r,1)<Ra;if(r.colorStops){for(var e=r.colorStops,t=0,i=e.length,n=0;n<i;n++)t+=wo(e[n].color,1);return t/=i,t<Ra}return!1}var rR=(function(){function r(e,t,i){var n=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,i=i||{},this.dom=t,this.id=e;var o=new lS,a=i.renderer||"canvas";vf[a]||(a=me(vf)[0]),i.useDirtyRect=i.useDirtyRect==null?!1:i.useDirtyRect;var s=new vf[a](t,o,i,e),l=i.ssr||s.ssrOnly;this.storage=o,this.painter=s;var u=!Q.node&&!Q.worker&&!l?new vS(s.getViewportRoot(),s.root):null,f=i.useCoarsePointer,c=f==null||f==="auto"?Q.touchEventsSupported:!!f,p=44,h;c&&(h=te(i.pointerSize,p)),this.handler=new rS(o,s,u,s.root,h),this.animation=new fS({stage:{update:l?null:function(){return n._flush(!0)}}}),l||this.animation.start()}return r.prototype.add=function(e){this._disposed||!e||(this.storage.addRoot(e),e.addSelfToZr(this),this.refresh())},r.prototype.remove=function(e){this._disposed||!e||(this.storage.delRoot(e),e.removeSelfFromZr(this),this.refresh())},r.prototype.configLayer=function(e,t){this._disposed||(this.painter.configLayer&&this.painter.configLayer(e,t),this.refresh())},r.prototype.setBackgroundColor=function(e){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this.refresh(),this._backgroundColor=e,this._darkMode=tR(e))},r.prototype.getBackgroundColor=function(){return this._backgroundColor},r.prototype.setDarkMode=function(e){this._darkMode=e},r.prototype.isDarkMode=function(){return this._darkMode},r.prototype.refreshImmediately=function(e){this._disposed||(e||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1)},r.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},r.prototype.flush=function(){this._disposed||this._flush(!1)},r.prototype._flush=function(e){var t,i=Yn();this._needsRefresh&&(t=!0,this.refreshImmediately(e)),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately());var n=Yn();t?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:n-i})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},r.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},r.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},r.prototype.refreshHover=function(){this._needsRefreshHover=!0},r.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},r.prototype.resize=function(e){this._disposed||(e=e||{},this.painter.resize(e.width,e.height),this.handler.resize())},r.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},r.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},r.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},r.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},r.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},r.prototype.on=function(e,t,i){return this._disposed||this.handler.on(e,t,i),this},r.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},r.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},r.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t<e.length;t++)e[t]instanceof wt&&e[t].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},r.prototype.dispose=function(){this._disposed||(this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,this._disposed=!0,eR(this.id))},r})();function td(r,e){var t=new rR(_l(),r,e);return mS[t.id]=t,t}function gS(r,e){vf[r]=e}var iR;function yS(r){iR=r}var _S="";typeof navigator<"u"&&(_S=navigator.platform||"");var $o="rgba(0, 0, 0, 0.2)",xS={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:$o,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:$o,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:$o,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:$o,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:$o,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:$o,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:_S.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1};var oR=Z();function SS(r,e,t){var i=oR.get(e);if(!i)return t;var n=i(r);if(!n)return t;if(0)for(var o;o<n.length;o++);return t.concat(n)}var wS=ye(),aR=ye(),vs=(function(){function r(){}return r.prototype.getColorFromPalette=function(e,t,i){var n=Be(this.get("color",!0)),o=this.get("colorLayer",!0);return CS(this,wS,n,o,e,t,i)},r.prototype.clearColorPalette=function(){lR(this,wS)},r})();function rd(r,e,t,i){var n=Be(r.get(["aria","decal","decals"]));return CS(r,aR,n,null,e,t,i)}function sR(r,e){for(var t=r.length,i=0;i<t;i++)if(r[i].length>e)return r[i];return r[t-1]}function CS(r,e,t,i,n,o,a){o=o||r;var s=e(o),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(n))return u[n];var f=a==null||!i?t:sR(i,a);if(f=f||t,!(!f||!f.length)){var c=f[l];return n&&(u[n]=c),s.paletteIdx=(l+1)%f.length,c}}function lR(r,e){e(r).paletteIdx=0,e(r).paletteNameMap={}}var mf,ms,TS,bS="\0_ec_inner",uR=1;var RS=(function(r){we(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(t,i,n,o,a,s){o=o||{},this.option=null,this._theme=new ze(o),this._locale=new ze(a),this._optionManager=s},e.prototype.setOption=function(t,i,n){var o=ES(i);this._optionManager.setOption(t,n,o),this._resetOption(null,o)},e.prototype.resetOption=function(t,i){return this._resetOption(t,ES(i))},e.prototype._resetOption=function(t,i){var n=!1,o=this._optionManager;if(!t||t==="recreate"){var a=o.mountOption(t==="recreate");!this.option||t==="recreate"?TS(this,a):(this.restoreData(),this._mergeOption(a,i)),n=!0}if((t==="timeline"||t==="media")&&this.restoreData(),!t||t==="recreate"||t==="timeline"){var s=o.getTimelineOption(this);s&&(n=!0,this._mergeOption(s,i))}if(!t||t==="recreate"||t==="media"){var l=o.getMediaOption(this);l.length&&S(l,function(u){n=!0,this._mergeOption(u,i)},this)}return n},e.prototype.mergeOption=function(t){this._mergeOption(t,null)},e.prototype._mergeOption=function(t,i){var n=this.option,o=this._componentsMap,a=this._componentsCount,s=[],l=Z(),u=i&&i.replaceMergeMainTypeMap;B_(this),S(t,function(c,p){c!=null&&(Fe.hasClass(p)?p&&(s.push(p),l.set(p,!0)):n[p]=n[p]==null?re(c):Ee(n[p],c,!0))}),u&&u.each(function(c,p){Fe.hasClass(p)&&!l.get(p)&&(s.push(p),l.set(p,!0))}),Fe.topologicalTravel(s,Fe.getAllClassMainTypes(),f,this);function f(c){var p=SS(this,c,Be(t[c])),h=o.get(c),d=h?u&&u.get(c)?"replaceMerge":"normalMerge":"replaceAll",g=r0(h,p,d);n0(g,c,Fe),n[c]=null,o.set(c,null),a.set(c,0);var v=[],m=[],y=0,_,x;S(g,function(C,w){var T=C.existing,D=C.newOption;if(!D)T&&(T.mergeOption({},this),T.optionUpdated({},!1));else{var b=c==="series",E=Fe.getClass(c,C.keyInfo.subType,!b);if(!E){if(0)var M,R;return}if(c==="tooltip"){if(_)return;_=!0}if(T&&T.constructor===E)T.name=C.keyInfo.name,T.mergeOption(D,this),T.optionUpdated(D,!1);else{var O=P({componentIndex:w},C.keyInfo);T=new E(D,this,this,O),P(T,O),C.brandNew&&(T.__requireNewView=!0),T.init(D,this,this),T.optionUpdated(null,!0)}}T?(v.push(T.option),m.push(T),y++):(v.push(void 0),m.push(void 0))},this),n[c]=v,o.set(c,m),a.set(c,y),c==="series"&&mf(this)}this._seriesIndices||mf(this)},e.prototype.getOption=function(){var t=re(this.option);return S(t,function(i,n){if(Fe.hasClass(n)){for(var o=Be(i),a=o.length,s=!1,l=a-1;l>=0;l--)o[l]&&!Ro(o[l])?s=!0:(o[l]=null,!s&&a--);o.length=a,t[n]=o}}),delete t[bS],t},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(t){this._payload=t},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(t,i){var n=this._componentsMap.get(t);if(n){var o=n[i||0];if(o)return o;if(i==null){for(var a=0;a<n.length;a++)if(n[a])return n[a]}}},e.prototype.queryComponents=function(t){var i=t.mainType;if(!i)return[];var n=t.index,o=t.id,a=t.name,s=this._componentsMap.get(i);if(!s||!s.length)return[];var l;return n!=null?(l=[],S(Be(n),function(u){s[u]&&l.push(s[u])})):o!=null?l=DS("id",o,s):a!=null?l=DS("name",a,s):l=Ue(s,function(u){return!!u}),MS(l,t)},e.prototype.findComponents=function(t){var i=t.query,n=t.mainType,o=s(i),a=o?this.queryComponents(o):Ue(this._componentsMap.get(n),function(u){return!!u});return l(MS(a,t));function s(u){var f=n+"Index",c=n+"Id",p=n+"Name";return u&&(u[f]!=null||u[c]!=null||u[p]!=null)?{mainType:n,index:u[f],id:u[c],name:u[p]}:null}function l(u){return t.filter?Ue(u,t.filter):u}},e.prototype.eachComponent=function(t,i,n){var o=this._componentsMap;if(j(t)){var a=i,s=t;o.each(function(c,p){for(var h=0;c&&h<c.length;h++){var d=c[h];d&&s.call(a,p,d,d.componentIndex)}})}else for(var l=N(t)?o.get(t):F(t)?this.findComponents(t):null,u=0;l&&u<l.length;u++){var f=l[u];f&&i.call(n,f,f.componentIndex)}},e.prototype.getSeriesByName=function(t){var i=nr(t,null);return Ue(this._componentsMap.get("series"),function(n){return!!n&&i!=null&&n.name===i})},e.prototype.getSeriesByIndex=function(t){return this._componentsMap.get("series")[t]},e.prototype.getSeriesByType=function(t){return Ue(this._componentsMap.get("series"),function(i){return!!i&&i.subType===t})},e.prototype.getSeries=function(){return Ue(this._componentsMap.get("series"),function(t){return!!t})},e.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},e.prototype.eachSeries=function(t,i){ms(this),S(this._seriesIndices,function(n){var o=this._componentsMap.get("series")[n];t.call(i,o,n)},this)},e.prototype.eachRawSeries=function(t,i){S(this._componentsMap.get("series"),function(n){n&&t.call(i,n,n.componentIndex)})},e.prototype.eachSeriesByType=function(t,i,n){ms(this),S(this._seriesIndices,function(o){var a=this._componentsMap.get("series")[o];a.subType===t&&i.call(n,a,o)},this)},e.prototype.eachRawSeriesByType=function(t,i,n){return S(this.getSeriesByType(t),i,n)},e.prototype.isSeriesFiltered=function(t){return ms(this),this._seriesIndicesMap.get(t.componentIndex)==null},e.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},e.prototype.filterSeries=function(t,i){ms(this);var n=[];S(this._seriesIndices,function(o){var a=this._componentsMap.get("series")[o];t.call(i,a,o)&&n.push(o)},this),this._seriesIndices=n,this._seriesIndicesMap=Z(n)},e.prototype.restoreData=function(t){mf(this);var i=this._componentsMap,n=[];i.each(function(o,a){Fe.hasClass(a)&&n.push(a)}),Fe.topologicalTravel(n,Fe.getAllClassMainTypes(),function(o){S(i.get(o),function(a){a&&(o!=="series"||!fR(a,t))&&a.restoreData()})})},e.internalField=(function(){mf=function(t){var i=t._seriesIndices=[];S(t._componentsMap.get("series"),function(n){n&&i.push(n.componentIndex)}),t._seriesIndicesMap=Z(i)},ms=function(t){},TS=function(t,i){t.option={},t.option[bS]=uR,t._componentsMap=Z({series:[]}),t._componentsCount=Z();var n=i.aria;F(n)&&n.enabled==null&&(n.enabled=!0),cR(i,t._theme.option),Ee(i,xS,!1),t._mergeOption(i,null)}})(),e})(ze);function fR(r,e){if(e){var t=e.seriesIndex,i=e.seriesId,n=e.seriesName;return t!=null&&r.componentIndex!==t||i!=null&&r.id!==i||n!=null&&r.name!==n}}function cR(r,e){var t=r.color&&!r.colorLayer;S(e,function(i,n){n==="colorLayer"&&t||Fe.hasClass(n)||(typeof i=="object"?r[n]=r[n]?Ee(r[n],i,!1):re(i):r[n]==null&&(r[n]=i))})}function DS(r,e,t){if(L(e)){var i=Z();return S(e,function(o){if(o!=null){var a=nr(o,null);a!=null&&i.set(o,!0)}}),Ue(t,function(o){return o&&i.get(o[r])})}else{var n=nr(e,null);return Ue(t,function(o){return o&&n!=null&&o[r]===n})}}function MS(r,e){return e.hasOwnProperty("subType")?Ue(r,function(t){return t&&t.subType===e.subType}):r}function ES(r){var e=Z();return r&&S(Be(r.replaceMerge),function(t){e.set(t,!0)}),{replaceMergeMainTypeMap:e}}Lt(RS,vs);var gf=RS;var hR=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],pR=(function(){function r(e){S(hR,function(t){this[t]=De(e[t],e)},this)}return r})(),yf=pR;var id={},dR=(function(){function r(){this._coordinateSystems=[]}return r.prototype.create=function(e,t){var i=[];S(id,function(n,o){var a=n.create(e,t);i=i.concat(a||[])}),this._coordinateSystems=i},r.prototype.update=function(e,t){S(this._coordinateSystems,function(i){i.update&&i.update(e,t)})},r.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},r.register=function(e,t){id[e]=t},r.get=function(e){return id[e]},r})(),gs=dR;var vR=/^(min|max)?(.+)$/,mR=(function(){function r(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return r.prototype.setOption=function(e,t,i){e&&(S(Be(e.series),function(a){a&&a.data&&Ye(a.data)&&on(a.data)}),S(Be(e.dataset),function(a){a&&a.source&&Ye(a.source)&&on(a.source)})),e=re(e);var n=this._optionBackup,o=gR(e,t,!n);this._newBaseOption=o.baseOption,n?(o.timelineOptions.length&&(n.timelineOptions=o.timelineOptions),o.mediaList.length&&(n.mediaList=o.mediaList),o.mediaDefault&&(n.mediaDefault=o.mediaDefault)):this._optionBackup=o},r.prototype.mountOption=function(e){var t=this._optionBackup;return this._timelineOptions=t.timelineOptions,this._mediaList=t.mediaList,this._mediaDefault=t.mediaDefault,this._currentMediaIndices=[],re(e?t.baseOption:this._newBaseOption)},r.prototype.getTimelineOption=function(e){var t,i=this._timelineOptions;if(i.length){var n=e.getComponent("timeline");n&&(t=re(i[n.getCurrentIndex()]))}return t},r.prototype.getMediaOption=function(e){var t=this._api.getWidth(),i=this._api.getHeight(),n=this._mediaList,o=this._mediaDefault,a=[],s=[];if(!n.length&&!o)return s;for(var l=0,u=n.length;l<u;l++)yR(n[l].query,t,i)&&a.push(l);return!a.length&&o&&(a=[-1]),a.length&&!xR(a,this._currentMediaIndices)&&(s=X(a,function(f){return re(f===-1?o.option:n[f].option)})),this._currentMediaIndices=a,s},r})();function gR(r,e,t){var i=[],n,o,a=r.baseOption,s=r.timeline,l=r.options,u=r.media,f=!!r.media,c=!!(l||s||a&&a.timeline);a?(o=a,o.timeline||(o.timeline=s)):((c||f)&&(r.options=r.media=null),o=r),f&&L(u)&&S(u,function(h){h&&h.option&&(h.query?i.push(h):n||(n=h))}),p(o),S(l,function(h){return p(h)}),S(i,function(h){return p(h.option)});function p(h){S(e,function(d){d(h,t)})}return{baseOption:o,timelineOptions:l||[],mediaDefault:n,mediaList:i}}function yR(r,e,t){var i={width:e,height:t,aspectratio:e/t},n=!0;return S(r,function(o,a){var s=a.match(vR);if(!(!s||!s[1]||!s[2])){var l=s[1],u=s[2].toLowerCase();_R(i[u],o,l)||(n=!1)}}),n}function _R(r,e,t){return t==="min"?r>=e:t==="max"?r<=e:r===e}function xR(r,e){return r.join(",")===e.join(",")}var OS=mR;var Rr=S,_s=F,IS=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function nd(r){var e=r&&r.itemStyle;if(e)for(var t=0,i=IS.length;t<i;t++){var n=IS[t],o=e.normal,a=e.emphasis;o&&o[n]&&(r[n]=r[n]||{},r[n].normal?Ee(r[n].normal,o[n]):r[n].normal=o[n],o[n]=null),a&&a[n]&&(r[n]=r[n]||{},r[n].emphasis?Ee(r[n].emphasis,a[n]):r[n].emphasis=a[n],a[n]=null)}}function Rt(r,e,t){if(r&&r[e]&&(r[e].normal||r[e].emphasis)){var i=r[e].normal,n=r[e].emphasis;i&&(t?(r[e].normal=r[e].emphasis=null,ce(r[e],i)):r[e]=i),n&&(r.emphasis=r.emphasis||{},r.emphasis[e]=n,n.focus&&(r.emphasis.focus=n.focus),n.blurScope&&(r.emphasis.blurScope=n.blurScope))}}function ys(r){Rt(r,"itemStyle"),Rt(r,"lineStyle"),Rt(r,"areaStyle"),Rt(r,"label"),Rt(r,"labelLine"),Rt(r,"upperLabel"),Rt(r,"edgeLabel")}function Ke(r,e){var t=_s(r)&&r[e],i=_s(t)&&t.textStyle;if(i)for(var n=0,o=gh.length;n<o;n++){var a=gh[n];i.hasOwnProperty(a)&&(t[a]=i[a])}}function Sr(r){r&&(ys(r),Ke(r,"label"),r.emphasis&&Ke(r.emphasis,"label"))}function SR(r){if(_s(r)){nd(r),ys(r),Ke(r,"label"),Ke(r,"upperLabel"),Ke(r,"edgeLabel"),r.emphasis&&(Ke(r.emphasis,"label"),Ke(r.emphasis,"upperLabel"),Ke(r.emphasis,"edgeLabel"));var e=r.markPoint;e&&(nd(e),Sr(e));var t=r.markLine;t&&(nd(t),Sr(t));var i=r.markArea;i&&Sr(i);var n=r.data;if(r.type==="graph"){n=n||r.nodes;var o=r.links||r.edges;if(o&&!Ye(o))for(var a=0;a<o.length;a++)Sr(o[a]);S(r.categories,function(u){ys(u)})}if(n&&!Ye(n))for(var a=0;a<n.length;a++)Sr(n[a]);if(e=r.markPoint,e&&e.data)for(var s=e.data,a=0;a<s.length;a++)Sr(s[a]);if(t=r.markLine,t&&t.data)for(var l=t.data,a=0;a<l.length;a++)L(l[a])?(Sr(l[a][0]),Sr(l[a][1])):Sr(l[a]);r.type==="gauge"?(Ke(r,"axisLabel"),Ke(r,"title"),Ke(r,"detail")):r.type==="treemap"?(Rt(r.breadcrumb,"itemStyle"),S(r.levels,function(u){ys(u)})):r.type==="tree"&&ys(r.leaves)}}function hi(r){return L(r)?r:r?[r]:[]}function AS(r){return(L(r)?r[0]:r)||{}}function od(r,e){Rr(hi(r.series),function(i){_s(i)&&SR(i)});var t=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&t.push("valueAxis","categoryAxis","logAxis","timeAxis"),Rr(t,function(i){Rr(hi(r[i]),function(n){n&&(Ke(n,"axisLabel"),Ke(n.axisPointer,"label"))})}),Rr(hi(r.parallel),function(i){var n=i&&i.parallelAxisDefault;Ke(n,"axisLabel"),Ke(n&&n.axisPointer,"label")}),Rr(hi(r.calendar),function(i){Rt(i,"itemStyle"),Ke(i,"dayLabel"),Ke(i,"monthLabel"),Ke(i,"yearLabel")}),Rr(hi(r.radar),function(i){Ke(i,"name"),i.name&&i.axisName==null&&(i.axisName=i.name,delete i.name),i.nameGap!=null&&i.axisNameGap==null&&(i.axisNameGap=i.nameGap,delete i.nameGap)}),Rr(hi(r.geo),function(i){_s(i)&&(Sr(i),Rr(hi(i.regions),function(n){Sr(n)}))}),Rr(hi(r.timeline),function(i){Sr(i),Rt(i,"label"),Rt(i,"itemStyle"),Rt(i,"controlStyle",!0);var n=i.data;L(n)&&S(n,function(o){F(o)&&(Rt(o,"label"),Rt(o,"itemStyle"))})}),Rr(hi(r.toolbox),function(i){Rt(i,"iconStyle"),Rr(i.feature,function(n){Rt(n,"iconStyle")})}),Ke(AS(r.axisPointer),"label"),Ke(AS(r.tooltip).axisPointer,"label")}function wR(r,e){for(var t=e.split(","),i=r,n=0;n<t.length&&(i=i&&i[t[n]],i!=null);n++);return i}function CR(r,e,t,i){for(var n=e.split(","),o=r,a,s=0;s<n.length-1;s++)a=n[s],o[a]==null&&(o[a]={}),o=o[a];(i||o[n[s]]==null)&&(o[n[s]]=t)}function PS(r){r&&S(TR,function(e){e[0]in r&&!(e[1]in r)&&(r[e[1]]=r[e[0]])})}var TR=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],bR=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],ad=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function xs(r){var e=r&&r.itemStyle;if(e)for(var t=0;t<ad.length;t++){var i=ad[t][1],n=ad[t][0];e[i]!=null&&(e[n]=e[i])}}function LS(r){r&&r.alignTo==="edge"&&r.margin!=null&&r.edgeDistance==null&&(r.edgeDistance=r.margin)}function NS(r){r&&r.downplay&&!r.blur&&(r.blur=r.downplay)}function DR(r){r&&r.focusNodeAdjacency!=null&&(r.emphasis=r.emphasis||{},r.emphasis.focus==null&&(r.emphasis.focus="adjacency"))}function kS(r,e){if(r)for(var t=0;t<r.length;t++)e(r[t]),r[t]&&kS(r[t].children,e)}function _f(r,e){od(r,e),r.series=Be(r.series),S(r.series,function(t){if(F(t)){var i=t.type;if(i==="line")t.clipOverflow!=null&&(t.clip=t.clipOverflow);else if(i==="pie"||i==="gauge"){t.clockWise!=null&&(t.clockwise=t.clockWise),LS(t.label);var n=t.data;if(n&&!Ye(n))for(var o=0;o<n.length;o++)LS(n[o]);t.hoverOffset!=null&&(t.emphasis=t.emphasis||{},(t.emphasis.scaleSize=null)&&(t.emphasis.scaleSize=t.hoverOffset))}else if(i==="gauge"){var a=wR(t,"pointer.color");a!=null&&CR(t,"itemStyle.color",a)}else if(i==="bar"){xs(t),xs(t.backgroundStyle),xs(t.emphasis);var n=t.data;if(n&&!Ye(n))for(var o=0;o<n.length;o++)typeof n[o]=="object"&&(xs(n[o]),xs(n[o]&&n[o].emphasis))}else if(i==="sunburst"){var s=t.highlightPolicy;s&&(t.emphasis=t.emphasis||{},t.emphasis.focus||(t.emphasis.focus=s)),NS(t),kS(t.data,NS)}else i==="graph"||i==="sankey"?DR(t):i==="map"&&(t.mapType&&!t.map&&(t.map=t.mapType),t.mapLocation&&ce(t,t.mapLocation));t.hoverAnimation!=null&&(t.emphasis=t.emphasis||{},t.emphasis&&t.emphasis.scale==null&&(t.emphasis.scale=t.hoverAnimation)),PS(t)}}),r.dataRange&&(r.visualMap=r.dataRange),S(bR,function(t){var i=r[t];i&&(L(i)||(i=[i]),S(i,function(n){PS(n)}))})}function sd(r){var e=Z();r.eachSeries(function(t){var i=t.get("stack");if(i){var n=e.get(i)||e.set(i,[]),o=t.getData(),a={stackResultDimension:o.getCalculationInfo("stackResultDimension"),stackedOverDimension:o.getCalculationInfo("stackedOverDimension"),stackedDimension:o.getCalculationInfo("stackedDimension"),stackedByDimension:o.getCalculationInfo("stackedByDimension"),isStackedByIndex:o.getCalculationInfo("isStackedByIndex"),data:o,seriesModel:t};if(!a.stackedDimension||!(a.isStackedByIndex||a.stackedByDimension))return;n.length&&o.setCalculationInfo("stackedOnSeries",n[n.length-1].seriesModel),n.push(a)}}),e.each(MR)}function MR(r){S(r,function(e,t){var i=[],n=[NaN,NaN],o=[e.stackResultDimension,e.stackedOverDimension],a=e.data,s=e.isStackedByIndex,l=e.seriesModel.get("stackStrategy")||"samesign";a.modify(o,function(u,f,c){var p=a.get(e.stackedDimension,c);if(isNaN(p))return n;var h,d;s?d=a.getRawIndex(c):h=a.get(e.stackedByDimension,c);for(var g=NaN,v=t-1;v>=0;v--){var m=r[v];if(s||(d=m.data.rawIndexOf(m.stackedByDimension,h)),d>=0){var y=m.data.getByRawIndex(m.stackResultDimension,d);if(l==="all"||l==="positive"&&y>0||l==="negative"&&y<0||l==="samesign"&&p>=0&&y>0||l==="samesign"&&p<=0&&y<0){p=jy(p,y),g=y;break}}}return i[0]=p,i[1]=g,i})})}var qn,Xn,jn,zS,FS,xf=(function(){function r(e,t){var i=qo(e)?e:Xo(e);this._source=i;var n=this._data=i.data;i.sourceFormat===sr&&(this._offset=0,this._dimSize=t,this._data=n),FS(this,n,i)}return r.prototype.getSource=function(){return this._source},r.prototype.count=function(){return 0},r.prototype.getItem=function(e,t){},r.prototype.appendData=function(e){},r.prototype.clean=function(){},r.protoInitialize=(function(){var e=r.prototype;e.pure=!1,e.persistent=!0})(),r.internalField=(function(){var e;FS=function(a,s,l){var u=l.sourceFormat,f=l.seriesLayoutBy,c=l.startIndex,p=l.dimensionsDefine,h=zS[hd(u,f)];if(P(a,h),u===sr)a.getItem=t,a.count=n,a.fillStorage=i;else{var d=ud(u,f);a.getItem=De(d,null,s,c,p);var g=fd(u,f);a.count=De(g,null,s,c,p)}};var t=function(a,s){a=a-this._offset,s=s||[];for(var l=this._data,u=this._dimSize,f=u*a,c=0;c<u;c++)s[c]=l[f+c];return s},i=function(a,s,l,u){for(var f=this._data,c=this._dimSize,p=0;p<c;p++){for(var h=u[p],d=h[0]==null?1/0:h[0],g=h[1]==null?-1/0:h[1],v=s-a,m=l[p],y=0;y<v;y++){var _=f[y*c+p];m[a+y]=_,_<d&&(d=_),_>g&&(g=_)}h[0]=d,h[1]=g}},n=function(){return this._data?this._data.length/this._dimSize:0};zS=(e={},e[ht+"_"+jt]={pure:!0,appendData:o},e[ht+"_"+fi]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[Xt]={pure:!0,appendData:o},e[_r]={pure:!0,appendData:function(a){var s=this._data;S(a,function(l,u){for(var f=s[u]||(s[u]=[]),c=0;c<(l||[]).length;c++)f.push(l[c])})}},e[ct]={appendData:o},e[sr]={persistent:!1,pure:!0,appendData:function(a){this._data=a},clean:function(){this._offset+=this.count(),this._data=null}},e);function o(a){for(var s=0;s<a.length;s++)this._data.push(a[s])}})(),r})();var BS=function(r,e,t,i){return r[i]},ER=(qn={},qn[ht+"_"+jt]=function(r,e,t,i){return r[i+e]},qn[ht+"_"+fi]=function(r,e,t,i,n){i+=e;for(var o=n||[],a=r,s=0;s<a.length;s++){var l=a[s];o[s]=l?l[i]:null}return o},qn[Xt]=BS,qn[_r]=function(r,e,t,i,n){for(var o=n||[],a=0;a<t.length;a++){var s=t[a].name,l=r[s];o[a]=l?l[i]:null}return o},qn[ct]=BS,qn);function ud(r,e){var t=ER[hd(r,e)];return t}var WS=function(r,e,t){return r.length},RR=(Xn={},Xn[ht+"_"+jt]=function(r,e,t){return Math.max(0,r.length-e)},Xn[ht+"_"+fi]=function(r,e,t){var i=r[0];return i?Math.max(0,i.length-e):0},Xn[Xt]=WS,Xn[_r]=function(r,e,t){var i=t[0].name,n=r[i];return n?n.length:0},Xn[ct]=WS,Xn);function fd(r,e){var t=RR[hd(r,e)];return t}var ld=function(r,e,t){return r[e]},OR=(jn={},jn[ht]=ld,jn[Xt]=function(r,e,t){return r[t]},jn[_r]=ld,jn[ct]=function(r,e,t){var i=ni(r);return i instanceof Array?i[e]:i},jn[sr]=ld,jn);function cd(r){var e=OR[r];return e}function hd(r,e){return r===ht?r+"_"+e:r}function Qo(r,e,t){if(r){var i=r.getRawDataItem(e);if(i!=null){var n=r.getStore(),o=n.getSource().sourceFormat;if(t!=null){var a=r.getDimensionIndex(t),s=n.getDimensionProperty(a);return cd(o)(i,a,s)}else{var l=i;return o===ct&&(l=ni(i)),l}}}}var IR=/\{@(.+?)\}/g,US=(function(){function r(){}return r.prototype.getDataParams=function(e,t){var i=this.getData(t),n=this.getRawValue(e,t),o=i.getRawIndex(e),a=i.getName(e),s=i.getRawDataItem(e),l=i.getItemVisual(e,"style"),u=l&&l[i.getItemVisual(e,"drawType")||"fill"],f=l&&l.stroke,c=this.mainType,p=c==="series",h=i.userOutput&&i.userOutput.get();return{componentType:c,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:p?this.subType:null,seriesIndex:this.seriesIndex,seriesId:p?this.id:null,seriesName:p?this.name:null,name:a,dataIndex:o,data:s,dataType:t,value:n,color:u,borderColor:f,dimensionNames:h?h.fullDimensions:null,encode:h?h.encode:null,$vars:["seriesName","name","value"]}},r.prototype.getFormattedLabel=function(e,t,i,n,o,a){t=t||"normal";var s=this.getData(i),l=this.getDataParams(e,i);if(a&&(l.value=a.interpolatedValue),n!=null&&L(l.value)&&(l.value=l.value[n]),!o){var u=s.getItemModel(e);o=u.get(t==="normal"?["label","formatter"]:[t,"label","formatter"])}if(j(o))return l.status=t,l.dimensionIndex=n,o(l);if(N(o)){var f=Ho(o,l);return f.replace(IR,function(c,p){var h=p.length,d=p;d.charAt(0)==="["&&d.charAt(h-1)==="]"&&(d=+d.slice(1,h-1));var g=Qo(s,e,d);if(a&&L(a.interpolatedValue)){var v=s.getDimensionIndex(d);v>=0&&(g=a.interpolatedValue[v])}return g!=null?g+"":""})}},r.prototype.getRawValue=function(e,t){return Qo(this.getData(t),e)},r.prototype.formatTooltip=function(e,t,i){},r})();function pd(r){var e,t;return F(r)?r.type&&(t=r):e=r,{text:e,frag:t}}function Vi(r){return new AR(r)}var AR=(function(){function r(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return r.prototype.perform=function(e){var t=this._upstream,i=e&&e.skip;if(this._dirty&&t){var n=this.context;n.data=n.outputData=t.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var o;this._plan&&!i&&(o=this._plan(this.context));var a=f(this._modBy),s=this._modDataCount||0,l=f(e&&e.modBy),u=e&&e.modDataCount||0;(a!==l||s!==u)&&(o="reset");function f(y){return!(y>=1)&&(y=1),y}var c;(this._dirty||o==="reset")&&(this._dirty=!1,c=this._doReset(i)),this._modBy=l,this._modDataCount=u;var p=e&&e.step;if(t?this._dueEnd=t._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var h=this._dueIndex,d=Math.min(p!=null?this._dueIndex+p:1/0,this._dueEnd);if(!i&&(c||h<d)){var g=this._progress;if(L(g))for(var v=0;v<g.length;v++)this._doProgress(g[v],h,d,l,u);else this._doProgress(g,h,d,l,u)}this._dueIndex=d;var m=this._settedOutputEnd!=null?this._settedOutputEnd:d;this._outputDueEnd=m}else this._dueIndex=this._outputDueEnd=this._settedOutputEnd!=null?this._settedOutputEnd:this._dueEnd;return this.unfinished()},r.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},r.prototype._doProgress=function(e,t,i,n,o){HS.reset(t,i,n,o),this._callingProgress=e,this._callingProgress({start:t,end:i,count:i-t,next:HS.next},this.context)},r.prototype._doReset=function(e){this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null;var t,i;!e&&this._reset&&(t=this._reset(this.context),t&&t.progress&&(i=t.forceFirstProgress,t=t.progress),L(t)&&!t.length&&(t=null)),this._progress=t,this._modBy=this._modDataCount=null;var n=this._downstream;return n&&n.dirty(),i},r.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},r.prototype.pipe=function(e){(this._downstream!==e||this._dirty)&&(this._downstream=e,e._upstream=this,e.dirty())},r.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},r.prototype.getUpstream=function(){return this._upstream},r.prototype.getDownstream=function(){return this._downstream},r.prototype.setOutputEnd=function(e){this._outputDueEnd=this._settedOutputEnd=e},r})();var HS=(function(){var r,e,t,i,n,o={reset:function(l,u,f,c){e=l,r=u,t=f,i=c,n=Math.ceil(i/t),o.next=t>1&&i>0?s:a}};return o;function a(){return e<r?e++:null}function s(){var l=e%n*t+Math.ceil(e/n),u=e>=r?null:l<i?l:e;return e++,u}})();function Jo(r,e){var t=e&&e.type;return t==="ordinal"?r:(t==="time"&&!Ce(r)&&r!=null&&r!=="-"&&(r=+Dt(r)),r==null||r===""?NaN:Number(r))}var H5=Z({number:function(r){return parseFloat(r)},time:function(r){return+Dt(r)},trim:function(r){return N(r)?xt(r):r}});var PR={lt:function(r,e){return r<e},lte:function(r,e){return r<=e},gt:function(r,e){return r>e},gte:function(r,e){return r>=e}},V5=(function(){function r(e,t){if(!Ce(t)){var i="";ut(i)}this._opFn=PR[e],this._rvalFloat=gr(t)}return r.prototype.evaluate=function(e){return Ce(e)?this._opFn(e,this._rvalFloat):this._opFn(gr(e),this._rvalFloat)},r})(),VS=(function(){function r(e,t){var i=e==="desc";this._resultLT=i?1:-1,t==null&&(t=i?"min":"max"),this._incomparable=t==="min"?-1/0:1/0}return r.prototype.evaluate=function(e,t){var i=Ce(e)?e:gr(e),n=Ce(t)?t:gr(t),o=isNaN(i),a=isNaN(n);if(o&&(i=this._incomparable),a&&(n=this._incomparable),o&&a){var s=N(e),l=N(t);s&&(i=l?e:0),l&&(n=s?t:0)}return i<n?this._resultLT:i>n?-this._resultLT:0},r})();var G5=(function(){function r(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=gr(t)}return r.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var i=typeof e;i!==this._rvalTypeof&&(i==="number"||this._rvalTypeof==="number")&&(t=gr(e)===this._rvalFloat)}return this._isEQ?t:!t},r})();var LR=(function(){function r(){}return r.prototype.getRawData=function(){throw new Error("not supported")},r.prototype.getRawDataItem=function(e){throw new Error("not supported")},r.prototype.cloneRawData=function(){},r.prototype.getDimensionInfo=function(e){},r.prototype.cloneAllDimensionInfo=function(){},r.prototype.count=function(){},r.prototype.retrieveValue=function(e,t){},r.prototype.retrieveValueFromItem=function(e,t){},r.prototype.convertValue=function(e,t){return Jo(e,t)},r})();function NR(r,e){var t=new LR,i=r.data,n=t.sourceFormat=r.sourceFormat,o=r.startIndex,a="";r.seriesLayoutBy!==jt&&ut(a);var s=[],l={},u=r.dimensionsDefine;if(u)S(u,function(g,v){var m=g.name,y={index:v,name:m,displayName:g.displayName};if(s.push(y),m!=null){var _="";br(l,m)&&ut(_),l[m]=y}});else for(var f=0;f<r.dimensionsDetectedCount;f++)s.push({index:f});var c=ud(n,jt);e.__isBuiltIn&&(t.getRawDataItem=function(g){return c(i,o,s,g)},t.getRawData=De(kR,null,r)),t.cloneRawData=De(zR,null,r);var p=fd(n,jt);t.count=De(p,null,i,o,s);var h=cd(n);t.retrieveValue=function(g,v){var m=c(i,o,s,g);return d(m,v)};var d=t.retrieveValueFromItem=function(g,v){if(g!=null){var m=s[v];if(m)return h(g,v,m.name)}};return t.getDimensionInfo=De(FR,null,s,l),t.cloneAllDimensionInfo=De(BR,null,s),t}function kR(r){var e=r.sourceFormat;if(!dd(e)){var t="";ut(t)}return r.data}function zR(r){var e=r.sourceFormat,t=r.data;if(!dd(e)){var i="";ut(i)}if(e===ht){for(var n=[],o=0,a=t.length;o<a;o++)n.push(t[o].slice());return n}else if(e===Xt){for(var n=[],o=0,a=t.length;o<a;o++)n.push(P({},t[o]));return n}}function FR(r,e,t){if(t!=null){if(Ce(t)||!isNaN(t)&&!br(e,t))return r[t];if(br(e,t))return e[t]}}function BR(r){return re(r)}var GS=Z();function YS(r){r=re(r);var e=r.type,t="";e||ut(t);var i=e.split(":");i.length!==2&&ut(t);var n=!1;i[0]==="echarts"&&(e=i[1],n=!0),r.__isBuiltIn=n,GS.set(e,r)}function qS(r,e,t){var i=Be(r),n=i.length,o="";n||ut(o);for(var a=0,s=n;a<s;a++){var l=i[a];e=WR(l,e,t,n===1?null:a),a!==s-1&&(e.length=Math.max(e.length,1))}return e}function WR(r,e,t,i){var n="";e.length||ut(n),F(r)||ut(n);var o=r.type,a=GS.get(o);a||ut(n);var s=X(e,function(f){return NR(f,a)}),l=Be(a.transform({upstream:s[0],upstreamList:s,config:re(r.config)}));if(0&&r.print)var u;return X(l,function(f,c){var p="";F(f)||ut(p),f.data||ut(p);var h=wp(f.data);dd(h)||ut(p);var d,g=e[0];if(g&&c===0&&!f.dimensions){var v=g.startIndex;v&&(f.data=g.data.slice(0,v).concat(f.data)),d={seriesLayoutBy:jt,sourceHeader:v,dimensions:g.metaRawOption.dimensions}}else d={seriesLayoutBy:jt,sourceHeader:0,dimensions:f.dimensions};return ss(f.data,d,null)})}function dd(r){return r===ht||r===Xt}var Sf="undefined",UR=typeof Uint32Array===Sf?Array:Uint32Array,HR=typeof Uint16Array===Sf?Array:Uint16Array,md=typeof Int32Array===Sf?Array:Int32Array,XS=typeof Float64Array===Sf?Array:Float64Array,ZS={float:XS,int:md,ordinal:Array,number:Array,time:XS},vd;function ea(r){return r>65535?UR:HR}function ta(){return[1/0,-1/0]}function VR(r){var e=r.constructor;return e===Array?r.slice():new e(r)}function jS(r,e,t,i,n){var o=ZS[t||"float"];if(n){var a=r[e],s=a&&a.length;if(s!==i){for(var l=new o(i),u=0;u<s;u++)l[u]=a[u];r[e]=l}}else r[e]=new o(i)}var GR=(function(){function r(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=Z()}return r.prototype.initData=function(e,t,i){this._provider=e,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var n=e.getSource(),o=this.defaultDimValueGetter=vd[n.sourceFormat];this._dimValueGetter=i||o,this._rawExtent=[];var a=Zu(n);this._dimensions=X(t,function(s){return{type:s.type,property:s.property}}),this._initDataFromProvider(0,e.count())},r.prototype.getProvider=function(){return this._provider},r.prototype.getSource=function(){return this._provider.getSource()},r.prototype.ensureCalculationDimension=function(e,t){var i=this._calcDimNameToIdx,n=this._dimensions,o=i.get(e);if(o!=null){if(n[o].type===t)return o}else o=n.length;return n[o]={type:t},i.set(e,o),this._chunks[o]=new ZS[t||"float"](this._rawCount),this._rawExtent[o]=ta(),o},r.prototype.collectOrdinalMeta=function(e,t){var i=this._chunks[e],n=this._dimensions[e],o=this._rawExtent,a=n.ordinalOffset||0,s=i.length;a===0&&(o[e]=ta());for(var l=o[e],u=a;u<s;u++){var f=i[u]=t.parseAndCollect(i[u]);isNaN(f)||(l[0]=Math.min(f,l[0]),l[1]=Math.max(f,l[1]))}n.ordinalMeta=t,n.ordinalOffset=s,n.type="ordinal"},r.prototype.getOrdinalMeta=function(e){var t=this._dimensions[e],i=t.ordinalMeta;return i},r.prototype.getDimensionProperty=function(e){var t=this._dimensions[e];return t&&t.property},r.prototype.appendData=function(e){var t=this._provider,i=this.count();t.appendData(e);var n=t.count();return t.persistent||(n+=i),i<n&&this._initDataFromProvider(i,n,!0),[i,n]},r.prototype.appendValues=function(e,t){for(var i=this._chunks,n=this._dimensions,o=n.length,a=this._rawExtent,s=this.count(),l=s+Math.max(e.length,t||0),u=0;u<o;u++){var f=n[u];jS(i,u,f.type,l,!0)}for(var c=[],p=s;p<l;p++)for(var h=p-s,d=0;d<o;d++){var f=n[d],g=vd.arrayRows.call(this,e[h]||c,f.property,h,d);i[d][p]=g;var v=a[d];g<v[0]&&(v[0]=g),g>v[1]&&(v[1]=g)}return this._rawCount=this._count=l,{start:s,end:l}},r.prototype._initDataFromProvider=function(e,t,i){for(var n=this._provider,o=this._chunks,a=this._dimensions,s=a.length,l=this._rawExtent,u=X(a,function(y){return y.property}),f=0;f<s;f++){var c=a[f];l[f]||(l[f]=ta()),jS(o,f,c.type,t,i)}if(n.fillStorage)n.fillStorage(e,t,o,l);else for(var p=[],h=e;h<t;h++){p=n.getItem(h,p);for(var d=0;d<s;d++){var g=o[d],v=this._dimValueGetter(p,u[d],h,d);g[h]=v;var m=l[d];v<m[0]&&(m[0]=v),v>m[1]&&(m[1]=v)}}!n.persistent&&n.clean&&n.clean(),this._rawCount=this._count=t,this._extent=[]},r.prototype.count=function(){return this._count},r.prototype.get=function(e,t){if(!(t>=0&&t<this._count))return NaN;var i=this._chunks[e];return i?i[this.getRawIndex(t)]:NaN},r.prototype.getValues=function(e,t){var i=[],n=[];if(t==null){t=e,e=[];for(var o=0;o<this._dimensions.length;o++)n.push(o)}else n=e;for(var o=0,a=n.length;o<a;o++)i.push(this.get(n[o],t));return i},r.prototype.getByRawIndex=function(e,t){if(!(t>=0&&t<this._rawCount))return NaN;var i=this._chunks[e];return i?i[t]:NaN},r.prototype.getSum=function(e){var t=this._chunks[e],i=0;if(t)for(var n=0,o=this.count();n<o;n++){var a=this.get(e,n);isNaN(a)||(i+=a)}return i},r.prototype.getMedian=function(e){var t=[];this.each([e],function(o){isNaN(o)||t.push(o)});var i=t.sort(function(o,a){return o-a}),n=this.count();return n===0?0:n%2===1?i[(n-1)/2]:(i[n/2]+i[n/2-1])/2},r.prototype.indexOfRawIndex=function(e){if(e>=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,i=t[e];if(i!=null&&i<this._count&&i===e)return e;for(var n=0,o=this._count-1;n<=o;){var a=(n+o)/2|0;if(t[a]<e)n=a+1;else if(t[a]>e)o=a-1;else return a}return-1},r.prototype.indicesOfNearest=function(e,t,i){var n=this._chunks,o=n[e],a=[];if(!o)return a;i==null&&(i=1/0);for(var s=1/0,l=-1,u=0,f=0,c=this.count();f<c;f++){var p=this.getRawIndex(f),h=t-o[p],d=Math.abs(h);d<=i&&((d<s||d===s&&h>=0&&l<0)&&(s=d,l=h,u=0),h===l&&(a[u++]=f))}return a.length=u,a},r.prototype.getIndices=function(){var e,t=this._indices;if(t){var i=t.constructor,n=this._count;if(i===Array){e=new i(n);for(var o=0;o<n;o++)e[o]=t[o]}else e=new i(t.buffer,0,n)}else{var i=ea(this._rawCount);e=new i(this.count());for(var o=0;o<e.length;o++)e[o]=o}return e},r.prototype.filter=function(e,t){if(!this._count)return this;for(var i=this.clone(),n=i.count(),o=ea(i._rawCount),a=new o(n),s=[],l=e.length,u=0,f=e[0],c=i._chunks,p=0;p<n;p++){var h=void 0,d=i.getRawIndex(p);if(l===0)h=t(p);else if(l===1){var g=c[f][d];h=t(g,p)}else{for(var v=0;v<l;v++)s[v]=c[e[v]][d];s[v]=p,h=t.apply(null,s)}h&&(a[u++]=d)}return u<n&&(i._indices=a),i._count=u,i._extent=[],i._updateGetRawIdx(),i},r.prototype.selectRange=function(e){var t=this.clone(),i=t._count;if(!i)return this;var n=me(e),o=n.length;if(!o)return this;var a=t.count(),s=ea(t._rawCount),l=new s(a),u=0,f=n[0],c=e[f][0],p=e[f][1],h=t._chunks,d=!1;if(!t._indices){var g=0;if(o===1){for(var v=h[n[0]],m=0;m<i;m++){var y=v[m];(y>=c&&y<=p||isNaN(y))&&(l[u++]=g),g++}d=!0}else if(o===2){for(var v=h[n[0]],_=h[n[1]],x=e[n[1]][0],C=e[n[1]][1],m=0;m<i;m++){var y=v[m],w=_[m];(y>=c&&y<=p||isNaN(y))&&(w>=x&&w<=C||isNaN(w))&&(l[u++]=g),g++}d=!0}}if(!d)if(o===1)for(var m=0;m<a;m++){var T=t.getRawIndex(m),y=h[n[0]][T];(y>=c&&y<=p||isNaN(y))&&(l[u++]=T)}else for(var m=0;m<a;m++){for(var D=!0,T=t.getRawIndex(m),b=0;b<o;b++){var E=n[b],y=h[E][T];(y<e[E][0]||y>e[E][1])&&(D=!1)}D&&(l[u++]=t.getRawIndex(m))}return u<a&&(t._indices=l),t._count=u,t._extent=[],t._updateGetRawIdx(),t},r.prototype.map=function(e,t){var i=this.clone(e);return this._updateDims(i,e,t),i},r.prototype.modify=function(e,t){this._updateDims(this,e,t)},r.prototype._updateDims=function(e,t,i){for(var n=e._chunks,o=[],a=t.length,s=e.count(),l=[],u=e._rawExtent,f=0;f<t.length;f++)u[t[f]]=ta();for(var c=0;c<s;c++){for(var p=e.getRawIndex(c),h=0;h<a;h++)l[h]=n[t[h]][p];l[a]=c;var d=i&&i.apply(null,l);if(d!=null){typeof d!="object"&&(o[0]=d,d=o);for(var f=0;f<d.length;f++){var g=t[f],v=d[f],m=u[g],y=n[g];y&&(y[p]=v),v<m[0]&&(m[0]=v),v>m[1]&&(m[1]=v)}}}},r.prototype.lttbDownSample=function(e,t){var i=this.clone([e],!0),n=i._chunks,o=n[e],a=this.count(),s=0,l=Math.floor(1/t),u=this.getRawIndex(0),f,c,p,h=new(ea(this._rawCount))(Math.min((Math.ceil(a/l)+2)*2,a));h[s++]=u;for(var d=1;d<a-1;d+=l){for(var g=Math.min(d+l,a-1),v=Math.min(d+l*2,a),m=(v+g)/2,y=0,_=g;_<v;_++){var x=this.getRawIndex(_),C=o[x];isNaN(C)||(y+=C)}y/=v-g;var w=d,T=Math.min(d+l,a),D=d-1,b=o[u];f=-1,p=w;for(var E=-1,M=0,_=w;_<T;_++){var x=this.getRawIndex(_),C=o[x];if(isNaN(C)){M++,E<0&&(E=x);continue}c=Math.abs((D-m)*(C-b)-(D-_)*(y-b)),c>f&&(f=c,p=x)}M>0&&M<T-w&&(h[s++]=Math.min(E,p),p=Math.max(E,p)),h[s++]=p,u=p}return h[s++]=this.getRawIndex(a-1),i._count=s,i._indices=h,i.getRawIndex=this._getRawIdx,i},r.prototype.minmaxDownSample=function(e,t){for(var i=this.clone([e],!0),n=i._chunks,o=Math.floor(1/t),a=n[e],s=this.count(),l=new(ea(this._rawCount))(Math.ceil(s/o)*2),u=0,f=0;f<s;f+=o){var c=f,p=a[this.getRawIndex(c)],h=f,d=a[this.getRawIndex(h)],g=o;f+o>s&&(g=s-f);for(var v=0;v<g;v++){var m=this.getRawIndex(f+v),y=a[m];y<p&&(p=y,c=f+v),y>d&&(d=y,h=f+v)}var _=this.getRawIndex(c),x=this.getRawIndex(h);c<h?(l[u++]=_,l[u++]=x):(l[u++]=x,l[u++]=_)}return i._count=u,i._indices=l,i._updateGetRawIdx(),i},r.prototype.downSample=function(e,t,i,n){for(var o=this.clone([e],!0),a=o._chunks,s=[],l=Math.floor(1/t),u=a[e],f=this.count(),c=o._rawExtent[e]=ta(),p=new(ea(this._rawCount))(Math.ceil(f/l)),h=0,d=0;d<f;d+=l){l>f-d&&(l=f-d,s.length=l);for(var g=0;g<l;g++){var v=this.getRawIndex(d+g);s[g]=u[v]}var m=i(s),y=this.getRawIndex(Math.min(d+n(s,m)||0,f-1));u[y]=m,m<c[0]&&(c[0]=m),m>c[1]&&(c[1]=m),p[h++]=y}return o._count=h,o._indices=p,o._updateGetRawIdx(),o},r.prototype.each=function(e,t){if(this._count)for(var i=e.length,n=this._chunks,o=0,a=this.count();o<a;o++){var s=this.getRawIndex(o);switch(i){case 0:t(o);break;case 1:t(n[e[0]][s],o);break;case 2:t(n[e[0]][s],n[e[1]][s],o);break;default:for(var l=0,u=[];l<i;l++)u[l]=n[e[l]][s];u[l]=o,t.apply(null,u)}}},r.prototype.getDataExtent=function(e){var t=this._chunks[e],i=ta();if(!t)return i;var n=this.count(),o=!this._indices,a;if(o)return this._rawExtent[e].slice();if(a=this._extent[e],a)return a.slice();a=i;for(var s=a[0],l=a[1],u=0;u<n;u++){var f=this.getRawIndex(u),c=t[f];c<s&&(s=c),c>l&&(l=c)}return a=[s,l],this._extent[e]=a,a},r.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var i=[],n=this._chunks,o=0;o<n.length;o++)i.push(n[o][t]);return i},r.prototype.clone=function(e,t){var i=new r,n=this._chunks,o=e&&Nt(e,function(s,l){return s[l]=!0,s},{});if(o)for(var a=0;a<n.length;a++)i._chunks[a]=o[a]?VR(n[a]):n[a];else i._chunks=n;return this._copyCommonProps(i),t||(i._indices=this._cloneIndices()),i._updateGetRawIdx(),i},r.prototype._copyCommonProps=function(e){e._count=this._count,e._rawCount=this._rawCount,e._provider=this._provider,e._dimensions=this._dimensions,e._extent=re(this._extent),e._rawExtent=re(this._rawExtent)},r.prototype._cloneIndices=function(){if(this._indices){var e=this._indices.constructor,t=void 0;if(e===Array){var i=this._indices.length;t=new e(i);for(var n=0;n<i;n++)t[n]=this._indices[n]}else t=new e(this._indices);return t}return null},r.prototype._getRawIdxIdentity=function(e){return e},r.prototype._getRawIdx=function(e){return e<this._count&&e>=0?this._indices[e]:-1},r.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},r.internalField=(function(){function e(t,i,n,o){return Jo(t[o],this._dimensions[o])}vd={arrayRows:e,objectRows:function(t,i,n,o){return Jo(t[i],this._dimensions[o])},keyedColumns:e,original:function(t,i,n,o){var a=t&&(t.value==null?t:t.value);return Jo(a instanceof Array?a[o]:a,this._dimensions[o])},typedArray:function(t,i,n,o){return t[o]}}})(),r})(),Ss=GR;var Cf=(function(){function r(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return r.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},r.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},r.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},r.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},r.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,t=this._getUpstreamSourceManagers(),i=!!t.length,n,o;if(wf(e)){var a=e,s=void 0,l=void 0,u=void 0;if(i){var f=t[0];f.prepareSource(),u=f.getSource(),s=u.data,l=u.sourceFormat,o=[f._getVersionSign()]}else s=a.get("data",!0),l=Ye(s)?sr:ct,o=[];var c=this._getSourceMetaRawOption()||{},p=u&&u.metaRawOption||{},h=te(c.seriesLayoutBy,p.seriesLayoutBy)||null,d=te(c.sourceHeader,p.sourceHeader),g=te(c.dimensions,p.dimensions),v=h!==p.seriesLayoutBy||!!d!=!!p.sourceHeader||g;n=v?[ss(s,{seriesLayoutBy:h,sourceHeader:d,dimensions:g},l)]:[]}else{var m=e;if(i){var y=this._applyTransform(t);n=y.sourceList,o=y.upstreamSignList}else{var _=m.get("source",!0);n=[ss(_,this._getSourceMetaRawOption(),null)],o=[]}}this._setLocalSource(n,o)},r.prototype._applyTransform=function(e){var t=this._sourceHost,i=t.get("transform",!0),n=t.get("fromTransformResult",!0);if(n!=null){var o="";e.length!==1&&KS(o)}var a,s=[],l=[];return S(e,function(u){u.prepareSource();var f=u.getSource(n||0),c="";n!=null&&!f&&KS(c),s.push(f),l.push(u._getVersionSign())}),i?a=qS(i,s,{datasetIndex:t.componentIndex}):n!=null&&(a=[G_(s[0])]),{sourceList:a,upstreamSignList:l}},r.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t<e.length;t++){var i=e[t];if(i._isDirty()||this._upstreamSignList[t]!==i._getVersionSign())return!0}},r.prototype.getSource=function(e){e=e||0;var t=this._sourceList[e];if(!t){var i=this._getUpstreamSourceManagers();return i[0]&&i[0].getSource(e)}return t},r.prototype.getSharedDataStore=function(e){var t=e.makeStoreSchema();return this._innerGetDataStore(t.dimensions,e.source,t.hash)},r.prototype._innerGetDataStore=function(e,t,i){var n=0,o=this._storeList,a=o[n];a||(a=o[n]={});var s=a[i];if(!s){var l=this._getUpstreamSourceManagers()[0];wf(this._sourceHost)&&l?s=l._innerGetDataStore(e,t,i):(s=new Ss,s.initData(new xf(t,e.length),e)),a[i]=s}return s},r.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(wf(e)){var t=Sp(e);return t?[t.getSourceManager()]:[]}else return X(U_(e),function(i){return i.getSourceManager()})},r.prototype._getSourceMetaRawOption=function(){var e=this._sourceHost,t,i,n;if(wf(e))t=e.get("seriesLayoutBy",!0),i=e.get("sourceHeader",!0),n=e.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var o=e;t=o.get("seriesLayoutBy",!0),i=o.get("sourceHeader",!0),n=o.get("dimensions",!0)}return{seriesLayoutBy:t,sourceHeader:i,dimensions:n}},r})();function gd(r){var e=r.option.transform;e&&on(r.option.transform)}function wf(r){return r.mainType==="series"}function KS(r){throw new Error(r)}var YR="line-height:1";function $S(r){var e=r.lineHeight;return e==null?YR:"line-height:"+ot(e+"")+"px"}function QS(r,e){var t=r.color||"#6e7079",i=r.fontSize||12,n=r.fontWeight||"400",o=r.color||"#464646",a=r.fontSize||14,s=r.fontWeight||"900";return e==="html"?{nameStyle:"font-size:"+ot(i+"")+"px;color:"+ot(t)+";font-weight:"+ot(n+""),valueStyle:"font-size:"+ot(a+"")+"px;color:"+ot(o)+";font-weight:"+ot(s+"")}:{nameStyle:{fontSize:i,fill:t,fontWeight:n},valueStyle:{fontSize:a,fill:o,fontWeight:s}}}var qR=[0,10,20,30],XR=["",`
|
|
10
|
+
`,`
|
|
11
|
+
|
|
12
|
+
`,`
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
`];function Zn(r,e){return e.type=r,e}function yd(r){return r.type==="section"}function JS(r){return yd(r)?jR:ZR}function ew(r){if(yd(r)){var e=0,t=r.blocks.length,i=t>1||t>0&&!r.noHeader;return S(r.blocks,function(n){var o=ew(n);o>=e&&(e=o+ +(i&&(!o||yd(n)&&!n.noHeader)))}),e}return 0}function jR(r,e,t,i){var n=e.noHeader,o=KR(ew(e)),a=[],s=e.blocks||[];_t(!s||L(s)),s=s||[];var l=r.orderMode;if(e.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(br(u,l)){var f=new VS(u[l],null);s.sort(function(g,v){return f.evaluate(g.sortParam,v.sortParam)})}else l==="seriesDesc"&&s.reverse()}S(s,function(g,v){var m=e.valueFormatter,y=JS(g)(m?P(P({},r),{valueFormatter:m}):r,g,v>0?o.html:0,i);y!=null&&a.push(y)});var c=r.renderMode==="richText"?a.join(o.richText):_d(i,a.join(""),n?t:o.html);if(n)return c;var p=Bu(e.header,"ordinal",r.useUTC),h=QS(i,r.renderMode).nameStyle,d=$S(i);return r.renderMode==="richText"?tw(r,p,h)+o.richText+c:_d(i,'<div style="'+h+";"+d+';">'+ot(p)+"</div>"+c,t)}function ZR(r,e,t,i){var n=r.renderMode,o=e.noName,a=e.noValue,s=!e.markerType,l=e.name,u=r.useUTC,f=e.valueFormatter||r.valueFormatter||function(x){return x=L(x)?x:[x],X(x,function(C,w){return Bu(C,L(h)?h[w]:h,u)})};if(!(o&&a)){var c=s?"":r.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",n),p=o?"":Bu(l,"ordinal",u),h=e.valueType,d=a?[]:f(e.value,e.dataIndex),g=!s||!o,v=!s&&o,m=QS(i,n),y=m.nameStyle,_=m.valueStyle;return n==="richText"?(s?"":c)+(o?"":tw(r,p,y))+(a?"":JR(r,d,g,v,_)):_d(i,(s?"":c)+(o?"":$R(p,!s,y))+(a?"":QR(d,g,v,_)),t)}}function xd(r,e,t,i,n,o){if(r){var a=JS(r),s={useUTC:n,renderMode:t,orderMode:i,markupStyleCreator:e,valueFormatter:r.valueFormatter};return a(s,r,0,o)}}function KR(r){return{html:qR[r],richText:XR[r]}}function _d(r,e,t){var i='<div style="clear:both"></div>',n="margin: "+t+"px 0 0",o=$S(r);return'<div style="'+n+";"+o+';">'+e+i+"</div>"}function $R(r,e,t){var i=e?"margin-left:2px":"";return'<span style="'+t+";"+i+'">'+ot(r)+"</span>"}function QR(r,e,t,i){var n=t?"10px":"20px",o=e?"float:right;margin-left:"+n:"";return r=L(r)?r:[r],'<span style="'+o+";"+i+'">'+X(r,function(a){return ot(a)}).join(" ")+"</span>"}function tw(r,e,t){return r.markupStyleCreator.wrapRichTextStyle(e,t)}function JR(r,e,t,i,n){var o=[n],a=i?10:20;return t&&o.push({padding:[0,0,0,a],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(L(e)?e.join(" "):e,o)}function rw(r,e){var t=r.getData().getItemVisual(e,"style"),i=t[r.visualDrawType];return Fi(i)}function Tf(r,e){var t=r.get("padding");return t??(e==="richText"?[8,10]:10)}var bf=(function(){function r(){this.richTextStyles={},this._nextStyleNameId=iu()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(e,t,i){var n=i==="richText"?this._generateStyleName():null,o=Wu({color:t,type:e,renderMode:i,markerId:n});return N(o)?o:(this.richTextStyles[n]=o.style,o.content)},r.prototype.wrapRichTextStyle=function(e,t){var i={};L(t)?S(t,function(o){return P(i,o)}):P(i,t);var n=this._generateStyleName();return this.richTextStyles[n]=i,"{"+n+"|"+e+"}"},r})();function iw(r){var e=r.series,t=r.dataIndex,i=r.multipleSeries,n=e.getData(),o=n.mapDimensionsAll("defaultedTooltip"),a=o.length,s=e.getRawValue(t),l=L(s),u=rw(e,t),f,c,p,h;if(a>1||l&&!a){var d=eO(s,e,t,o,u);f=d.inlineValues,c=d.inlineValueTypes,p=d.blocks,h=d.inlineValues[0]}else if(a){var g=n.getDimensionInfo(o[0]);h=f=Qo(n,t,o[0]),c=g.type}else h=f=l?s[0]:s;var v=ou(e),m=v&&e.name||"",y=n.getName(t),_=i?m:y;return Zn("section",{header:m,noHeader:i||!v,sortParam:h,blocks:[Zn("nameValue",{markerType:"item",markerColor:u,name:_,noName:!xt(_),value:f,valueType:c,dataIndex:t})].concat(p||[])})}function eO(r,e,t,i,n){var o=e.getData(),a=Nt(r,function(c,p,h){var d=o.getDimensionInfo(h);return c=c||d&&d.tooltip!==!1&&d.displayName!=null},!1),s=[],l=[],u=[];i.length?S(i,function(c){f(Qo(o,t,c),c)}):S(r,f);function f(c,p){var h=o.getDimensionInfo(p);!h||h.otherDims.tooltip===!1||(a?u.push(Zn("nameValue",{markerType:"subItem",markerColor:n,name:h.displayName,value:c,valueType:h.type})):(s.push(c),l.push(h.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var Gi=ye();function Df(r,e){return r.getName(e)||r.getId(e)}var tO="__universalTransitionEnabled",Mf=(function(r){we(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return e.prototype.init=function(t,i,n){this.seriesIndex=this.componentIndex,this.dataTask=Vi({count:iO,reset:nO}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n);var o=Gi(this).sourceManager=new Cf(this);o.prepareSource();var a=this.getInitialData(t,n);ow(a,this),this.dataTask.context.data=a,Gi(this).dataBeforeProcessed=a,nw(this),this._initSelectedMapFromData(a)},e.prototype.mergeDefaultAndTheme=function(t,i){var n=Vo(this),o=n?Gu(t):{},a=this.subType;Fe.hasClass(a)&&(a+="Series"),Ee(t,i.getTheme().get(this.subType)),Ee(t,this.getDefaultOption()),mh(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&Go(t,o,n)},e.prototype.mergeOption=function(t,i){t=Ee(this.option,t,!0),this.fillDataTextStyle(t.data);var n=Vo(this);n&&Go(this.option,t,n);var o=Gi(this).sourceManager;o.dirty(),o.prepareSource();var a=this.getInitialData(t,i);ow(a,this),this.dataTask.dirty(),this.dataTask.context.data=a,Gi(this).dataBeforeProcessed=a,nw(this),this._initSelectedMapFromData(a)},e.prototype.fillDataTextStyle=function(t){if(t&&!Ye(t))for(var i=["show"],n=0;n<t.length;n++)t[n]&&t[n].label&&mh(t[n],"label",i)},e.prototype.getInitialData=function(t,i){},e.prototype.appendData=function(t){var i=this.getRawData();i.appendData(t.data)},e.prototype.getData=function(t){var i=Sd(this);if(i){var n=i.context.data;return t==null||!n.getLinkedData?n:n.getLinkedData(t)}else return Gi(this).data},e.prototype.getAllData=function(){var t=this.getData();return t&&t.getLinkedDataAll?t.getLinkedDataAll():[{data:t}]},e.prototype.setData=function(t){var i=Sd(this);if(i){var n=i.context;n.outputData=t,i!==this.dataTask&&(n.data=t)}Gi(this).data=t},e.prototype.getEncode=function(){var t=this.get("encode",!0);if(t)return Z(t)},e.prototype.getSourceManager=function(){return Gi(this).sourceManager},e.prototype.getSource=function(){return this.getSourceManager().getSource()},e.prototype.getRawData=function(){return Gi(this).dataBeforeProcessed},e.prototype.getColorBy=function(){var t=this.get("colorBy");return t||"series"},e.prototype.isColorBySeries=function(){return this.getColorBy()==="series"},e.prototype.getBaseAxis=function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},e.prototype.formatTooltip=function(t,i,n){return iw({series:this,dataIndex:t,multipleSeries:i})},e.prototype.isAnimationEnabled=function(){var t=this.ecModel;if(Q.node&&!(t&&t.ssr))return!1;var i=this.getShallow("animation");return i&&this.getData().count()>this.getShallow("animationThreshold")&&(i=!1),!!i},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,i,n){var o=this.ecModel,a=vs.prototype.getColorFromPalette.call(this,t,i,n);return a||(a=o.getColorFromPalette(t,i,n)),a},e.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(t,i){this._innerSelect(this.getData(i),t)},e.prototype.unselect=function(t,i){var n=this.option.selectedMap;if(n){var o=this.option.selectedMode,a=this.getData(i);if(o==="series"||n==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s<t.length;s++){var l=t[s],u=Df(a,l);n[u]=!1,this._selectedDataIndicesMap[u]=-1}}},e.prototype.toggleSelect=function(t,i){for(var n=[],o=0;o<t.length;o++)n[0]=t[o],this.isSelected(t[o],i)?this.unselect(n,i):this.select(n,i)},e.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap==="all")return[].slice.call(this.getData().getIndices());for(var t=this._selectedDataIndicesMap,i=me(t),n=[],o=0;o<i.length;o++){var a=t[i[o]];a>=0&&n.push(a)}return n},e.prototype.isSelected=function(t,i){var n=this.option.selectedMap;if(!n)return!1;var o=this.getData(i);return(n==="all"||n[Df(o,t)])&&!o.getItemModel(t).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[tO])return!0;var t=this.option.universalTransition;return t?t===!0?!0:t&&t.enabled:!1},e.prototype._innerSelect=function(t,i){var n,o,a=this.option,s=a.selectedMode,l=i.length;if(!(!s||!l)){if(s==="series")a.selectedMap="all";else if(s==="multiple"){F(a.selectedMap)||(a.selectedMap={});for(var u=a.selectedMap,f=0;f<l;f++){var c=i[f],p=Df(t,c);u[p]=!0,this._selectedDataIndicesMap[p]=t.getRawIndex(c)}}else if(s==="single"||s===!0){var h=i[l-1],p=Df(t,h);a.selectedMap=(n={},n[p]=!0,n),this._selectedDataIndicesMap=(o={},o[p]=t.getRawIndex(h),o)}}},e.prototype._initSelectedMapFromData=function(t){if(!this.option.selectedMap){var i=[];t.hasItemOption&&t.each(function(n){var o=t.getRawDataItem(n);o&&o.selected&&i.push(n)}),i.length>0&&this._innerSelect(t,i)}},e.registerClass=function(t){return Fe.registerClass(t)},e.protoInitialize=(function(){var t=e.prototype;t.type="series.__base__",t.seriesIndex=0,t.ignoreStyleOnData=!1,t.hasSymbolVisual=!1,t.defaultSymbol="circle",t.visualStyleAccessPath="itemStyle",t.visualDrawType="fill"})(),e})(Fe);Lt(Mf,US);Lt(Mf,vs);Kl(Mf,Fe);function nw(r){var e=r.name;ou(r)||(r.name=rO(r)||e)}function rO(r){var e=r.getRawData(),t=e.mapDimensionsAll("seriesName"),i=[];return S(t,function(n){var o=e.getDimensionInfo(n);o.displayName&&i.push(o.displayName)}),i.join(" ")}function iO(r){return r.model.getRawData().count()}function nO(r){var e=r.model;return e.setData(e.getRawData().cloneShallow()),oO}function oO(r,e){e.outputData&&r.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function ow(r,e){S(xg(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(t){r.wrapMethod(t,je(aO,e))})}function aO(r,e){var t=Sd(r);return t&&t.setOutputEnd((e||this).count()),e}function Sd(r){var e=(r.ecModel||{}).scheduler,t=e&&e.getPipeline(r.uid);if(t){var i=t.currentTask;if(i){var n=i.agentStubMap;n&&(i=n.get(r.uid))}return i}}var pi=Mf;var lw=ye(),sO=Ep(),wd=(function(){function r(){this.group=new wt,this.uid=Ei("viewChart"),this.renderTask=Vi({plan:lO,reset:uO}),this.renderTask.context={view:this}}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,i,n){},r.prototype.highlight=function(e,t,i,n){var o=e.getData(n&&n.dataType);o&&sw(o,n,"emphasis")},r.prototype.downplay=function(e,t,i,n){var o=e.getData(n&&n.dataType);o&&sw(o,n,"normal")},r.prototype.remove=function(e,t){this.group.removeAll()},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,i,n){this.render(e,t,i,n)},r.prototype.updateLayout=function(e,t,i,n){this.render(e,t,i,n)},r.prototype.updateVisual=function(e,t,i,n){this.render(e,t,i,n)},r.prototype.eachRendered=function(e){Yh(this.group,e)},r.markUpdateMethod=function(e,t){lw(e).updateMethod=t},r.protoInitialize=(function(){var e=r.prototype;e.type="chart"})(),r})();function aw(r,e,t){r&&Ga(r)&&(e==="emphasis"?Ha:Va)(r,t)}function sw(r,e,t){var i=oi(r,e),n=e&&e.highlightKey!=null?M0(e.highlightKey):null;i!=null?S(Be(i),function(o){aw(r.getItemGraphicEl(o),t,n)}):r.eachItemGraphicEl(function(o){aw(o,t,n)})}bo(wd,["dispose"]);Mi(wd);function lO(r){return sO(r.model)}function uO(r){var e=r.model,t=r.ecModel,i=r.api,n=r.payload,o=e.pipelineContext.progressiveRender,a=r.view,s=n&&lw(n).updateMethod,l=o?"incrementalPrepareRender":s&&a[s]?s:"render";return l!=="render"&&a[l](e,t,i,n),fO[l]}var fO={incrementalPrepareRender:{progress:function(r,e){e.view.incrementalRender(r,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(r,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},qr=wd;var uw=ye(),fw={itemStyle:Fr($h,!0),lineStyle:Fr(Kh,!0)},cO={lineStyle:"stroke",itemStyle:"fill"};function cw(r,e){var t=r.visualStyleMapper||fw[e];return t||(console.warn("Unknown style type '"+e+"'."),fw.itemStyle)}function hw(r,e){var t=r.visualDrawType||cO[e];return t||(console.warn("Unknown style type '"+e+"'."),"fill")}var pw={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData(),i=r.visualStyleAccessPath||"itemStyle",n=r.getModel(i),o=cw(r,i),a=o(n),s=n.getShallow("decal");s&&(t.setVisual("decal",s),s.dirty=!0);var l=hw(r,i),u=a[l],f=j(u)?u:null,c=a.fill==="auto"||a.stroke==="auto";if(!a[l]||f||c){var p=r.getColorFromPalette(r.name,null,e.getSeriesCount());a[l]||(a[l]=p,t.setVisual("colorFromPalette",!0)),a.fill=a.fill==="auto"||j(a.fill)?p:a.fill,a.stroke=a.stroke==="auto"||j(a.stroke)?p:a.stroke}if(t.setVisual("style",a),t.setVisual("drawType",l),!e.isSeriesFiltered(r)&&f)return t.setVisual("colorFromPalette",!1),{dataEach:function(h,d){var g=r.getDataParams(d),v=P({},a);v[l]=f(g),h.setItemVisual(d,"style",v)}}}},ws=new ze,dw={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){if(!(r.ignoreStyleOnData||e.isSeriesFiltered(r))){var t=r.getData(),i=r.visualStyleAccessPath||"itemStyle",n=cw(r,i),o=t.getVisual("drawType");return{dataEach:t.hasItemOption?function(a,s){var l=a.getRawDataItem(s);if(l&&l[i]){ws.option=l[i];var u=n(ws),f=a.ensureUniqueItemVisual(s,"style");P(f,u),ws.option.decal&&(a.setItemVisual(s,"decal",ws.option.decal),ws.option.decal.dirty=!0),o in u&&a.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},vw={performRawSeries:!0,overallReset:function(r){var e=Z();r.eachSeries(function(t){var i=t.getColorBy();if(!t.isColorBySeries()){var n=t.type+"-"+i,o=e.get(n);o||(o={},e.set(n,o)),uw(t).scope=o}}),r.eachSeries(function(t){if(!(t.isColorBySeries()||r.isSeriesFiltered(t))){var i=t.getRawData(),n={},o=t.getData(),a=uw(t).scope,s=t.visualStyleAccessPath||"itemStyle",l=hw(t,s);o.each(function(u){var f=o.getRawIndex(u);n[f]=u}),i.each(function(u){var f=n[u],c=o.getItemVisual(f,"colorFromPalette");if(c){var p=o.ensureUniqueItemVisual(f,"style"),h=i.getName(u)||u+"",d=i.count();p[l]=t.getColorFromPalette(h,a,d)}})}})}};var Ef=Math.PI;function Cd(r,e){e=e||{},ce(e,{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var t=new wt,i=new ft({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});t.add(i);var n=new Ct({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),o=new ft({style:{fill:"none"},textContent:n,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});t.add(o);var a;return e.showSpinner&&(a=new An({shape:{startAngle:-Ef/2,endAngle:-Ef/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001}),a.animateShape(!0).when(1e3,{endAngle:Ef*3/2}).start("circularInOut"),a.animateShape(!0).when(1e3,{startAngle:Ef*3/2}).delay(300).start("circularInOut"),t.add(a)),t.resize=function(){var s=n.getBoundingRect().width,l=e.showSpinner?e.spinnerRadius:0,u=(r.getWidth()-l*2-(e.showSpinner&&s?10:0)-s)/2-(e.showSpinner&&s?0:5+s/2)+(e.showSpinner?0:s/2)+(s?0:l),f=r.getHeight()/2;e.showSpinner&&a.setShape({cx:u,cy:f}),o.setShape({x:u-l,y:f-l,width:l*2,height:l*2}),i.setShape({x:0,y:0,width:r.getWidth(),height:r.getHeight()})},t.resize(),t}var hO=(function(){function r(e,t,i,n){this._stageTaskMap=Z(),this.ecInstance=e,this.api=t,i=this._dataProcessorHandlers=i.slice(),n=this._visualHandlers=n.slice(),this._allHandlers=i.concat(n)}return r.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(i){var n=i.overallTask;n&&n.dirty()})},r.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var i=this._pipelineMap.get(e.__pipeline.id),n=i.context,o=!t&&i.progressiveEnabled&&(!n||n.progressiveRender)&&e.__idxInPipeline>i.blockIndex,a=o?i.step:null,s=n&&n.modDataCount,l=s!=null?Math.ceil(s/a):null;return{step:a,modBy:l,modDataCount:s}}},r.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},r.prototype.updateStreamModes=function(e,t){var i=this._pipelineMap.get(e.uid),n=e.getData(),o=n.count(),a=i.progressiveEnabled&&t.incrementalPrepareRender&&o>=i.threshold,s=e.get("large")&&o>=e.get("largeThreshold"),l=e.get("progressiveChunkMode")==="mod"?o:null;e.pipelineContext=i.context={progressiveRender:a,modDataCount:l,large:s}},r.prototype.restorePipelines=function(e){var t=this,i=t._pipelineMap=Z();e.eachSeries(function(n){var o=n.getProgressive(),a=n.uid;i.set(a,{id:a,head:null,tail:null,threshold:n.getProgressiveThreshold(),progressiveEnabled:o&&!(n.preventIncremental&&n.preventIncremental()),blockIndex:-1,step:Math.round(o||700),count:0}),t._pipe(n,n.dataTask)})},r.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),i=this.api;S(this._allHandlers,function(n){var o=e.get(n.uid)||e.set(n.uid,{}),a="";_t(!(n.reset&&n.overallReset),a),n.reset&&this._createSeriesStageTask(n,o,t,i),n.overallReset&&this._createOverallStageTask(n,o,t,i)},this)},r.prototype.prepareView=function(e,t,i,n){var o=e.renderTask,a=o.context;a.model=t,a.ecModel=i,a.api=n,o.__block=!e.incrementalPrepareRender,this._pipe(t,o)},r.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},r.prototype.performVisualTasks=function(e,t,i){this._performStageTasks(this._visualHandlers,e,t,i)},r.prototype._performStageTasks=function(e,t,i,n){n=n||{};var o=!1,a=this;S(e,function(l,u){if(!(n.visualType&&n.visualType!==l.visualType)){var f=a._stageTaskMap.get(l.uid),c=f.seriesTaskMap,p=f.overallTask;if(p){var h,d=p.agentStubMap;d.each(function(v){s(n,v)&&(v.dirty(),h=!0)}),h&&p.dirty(),a.updatePayload(p,i);var g=a.getPerformArgs(p,n.block);d.each(function(v){v.perform(g)}),p.perform(g)&&(o=!0)}else c&&c.each(function(v,m){s(n,v)&&v.dirty();var y=a.getPerformArgs(v,n.block);y.skip=!l.performRawSeries&&t.isSeriesFiltered(v.context.model),a.updatePayload(v,i),v.perform(y)&&(o=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=o||this.unfinished},r.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(i){t=i.dataTask.perform()||t}),this.unfinished=t||this.unfinished},r.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},r.prototype.updatePayload=function(e,t){t!=="remain"&&(e.context.payload=t)},r.prototype._createSeriesStageTask=function(e,t,i,n){var o=this,a=t.seriesTaskMap,s=t.seriesTaskMap=Z(),l=e.seriesType,u=e.getTargetSeries;e.createOnAllSeries?i.eachRawSeries(f):l?i.eachRawSeriesByType(l,f):u&&u(i,n).each(f);function f(c){var p=c.uid,h=s.set(p,a&&a.get(p)||Vi({plan:gO,reset:yO,count:xO}));h.context={model:c,ecModel:i,api:n,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:o},o._pipe(c,h)}},r.prototype._createOverallStageTask=function(e,t,i,n){var o=this,a=t.overallTask=t.overallTask||Vi({reset:pO});a.context={ecModel:i,api:n,overallReset:e.overallReset,scheduler:o};var s=a.agentStubMap,l=a.agentStubMap=Z(),u=e.seriesType,f=e.getTargetSeries,c=!0,p=!1,h="";_t(!e.createOnAllSeries,h),u?i.eachRawSeriesByType(u,d):f?f(i,n).each(d):(c=!1,S(i.getSeries(),d));function d(g){var v=g.uid,m=l.set(v,s&&s.get(v)||(p=!0,Vi({reset:dO,onDirty:mO})));m.context={model:g,overallProgress:c},m.agent=a,m.__block=c,o._pipe(g,m)}p&&a.dirty()},r.prototype._pipe=function(e,t){var i=e.uid,n=this._pipelineMap.get(i);!n.head&&(n.head=t),n.tail&&n.tail.pipe(t),n.tail=t,t.__idxInPipeline=n.count++,t.__pipeline=n},r.wrapStageHandler=function(e,t){return j(e)&&(e={overallReset:e,seriesType:SO(e)}),e.uid=Ei("stageHandler"),t&&(e.visualType=t),e},r})();function pO(r){r.overallReset(r.ecModel,r.api,r.payload)}function dO(r){return r.overallProgress&&vO}function vO(){this.agent.dirty(),this.getDownstream().dirty()}function mO(){this.agent&&this.agent.dirty()}function gO(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function yO(r){r.useClearVisual&&r.data.clearAllVisual();var e=r.resetDefines=Be(r.reset(r.model,r.ecModel,r.api,r.payload));return e.length>1?X(e,function(t,i){return mw(i)}):_O}var _O=mw(0);function mw(r){return function(e,t){var i=t.data,n=t.resetDefines[r];if(n&&n.dataEach)for(var o=e.start;o<e.end;o++)n.dataEach(i,o);else n&&n.progress&&n.progress(e,i)}}function xO(r){return r.data.count()}function SO(r){Rf=null;try{r(Cs,gw)}catch{}return Rf}var Cs={},gw={},Rf;yw(Cs,gf);yw(gw,yf);Cs.eachSeriesByType=Cs.eachRawSeriesByType=function(r){Rf=r};Cs.eachComponent=function(r){r.mainType==="series"&&r.subType&&(Rf=r.subType)};function yw(r,e){for(var t in e.prototype)r[t]=it}var Td=hO;var _w=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],xw={color:_w,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],_w]};var Ot="#B9B8CE",Sw="#100C2A",Of=function(){return{axisLine:{lineStyle:{color:Ot}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}},ww=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],Cw={darkMode:!0,color:ww,backgroundColor:Sw,axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:Ot},pageTextStyle:{color:Ot}},textStyle:{color:Ot},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:Ot}},dataZoom:{borderColor:"#71708A",textStyle:{color:Ot},brushStyle:{color:"rgba(135,163,206,0.3)"},handleStyle:{color:"#353450",borderColor:"#C5CBE3"},moveHandleStyle:{color:"#B0B6C3",opacity:.3},fillerColor:"rgba(135,163,206,0.2)",emphasis:{handleStyle:{borderColor:"#91B7F2",color:"#4D587D"},moveHandleStyle:{color:"#636D9A",opacity:.7}},dataBackground:{lineStyle:{color:"#71708A",width:1},areaStyle:{color:"#71708A"}},selectedDataBackground:{lineStyle:{color:"#87A3CE"},areaStyle:{color:"#87A3CE"}}},visualMap:{textStyle:{color:Ot}},timeline:{lineStyle:{color:Ot},label:{color:Ot},controlStyle:{color:Ot,borderColor:Ot}},calendar:{itemStyle:{color:Sw},dayLabel:{color:Ot},monthLabel:{color:Ot},yearLabel:{color:Ot}},timeAxis:Of(),logAxis:Of(),valueAxis:Of(),categoryAxis:Of(),line:{symbol:"circle"},graph:{color:ww},gauge:{title:{color:Ot},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:Ot},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}}};Cw.categoryAxis.splitLine.show=!1;var Tw=Cw;var bw=(function(){function r(){}return r.prototype.normalizeQuery=function(e){var t={},i={},n={};if(N(e)){var o=Gt(e);t.mainType=o.main||null,t.subType=o.sub||null}else{var a=["Index","Name","Id"],s={name:1,dataIndex:1,dataType:1};S(e,function(l,u){for(var f=!1,c=0;c<a.length;c++){var p=a[c],h=u.lastIndexOf(p);if(h>0&&h===u.length-p.length){var d=u.slice(0,h);d!=="data"&&(t.mainType=d,t[p.toLowerCase()]=l,f=!0)}}s.hasOwnProperty(u)&&(i[u]=l,f=!0),f||(n[u]=l)})}return{cptQuery:t,dataQuery:i,otherQuery:n}},r.prototype.filter=function(e,t){var i=this.eventInfo;if(!i)return!0;var n=i.targetEl,o=i.packedEvent,a=i.model,s=i.view;if(!a||!s)return!0;var l=t.cptQuery,u=t.dataQuery;return f(l,a,"mainType")&&f(l,a,"subType")&&f(l,a,"index","componentIndex")&&f(l,a,"name")&&f(l,a,"id")&&f(u,o,"name")&&f(u,o,"dataIndex")&&f(u,o,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(e,t.otherQuery,n,o));function f(c,p,h,d){return c[h]==null||p[d||h]===c[h]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r})();var bd=["symbol","symbolSize","symbolRotate","symbolOffset"],Dw=bd.concat(["symbolKeepAspect"]),Mw={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData();if(r.legendIcon&&t.setVisual("legendIcon",r.legendIcon),!r.hasSymbolVisual)return;for(var i={},n={},o=!1,a=0;a<bd.length;a++){var s=bd[a],l=r.get(s);j(l)?(o=!0,n[s]=l):i[s]=l}if(i.symbol=i.symbol||r.defaultSymbol,t.setVisual(P({legendIcon:r.legendIcon||i.symbol,symbolKeepAspect:r.get("symbolKeepAspect")},i)),e.isSeriesFiltered(r))return;var u=me(n);function f(c,p){for(var h=r.getRawValue(p),d=r.getDataParams(p),g=0;g<u.length;g++){var v=u[g];c.setItemVisual(p,v,n[v](h,d))}}return{dataEach:o?f:null}}},Ew={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){if(!r.hasSymbolVisual||e.isSeriesFiltered(r))return;var t=r.getData();function i(n,o){for(var a=n.getItemModel(o),s=0;s<Dw.length;s++){var l=Dw[s],u=a.getShallow(l,!0);u!=null&&n.setItemVisual(o,l,u)}}return{dataEach:t.hasItemOption?i:null}}};function Rw(r,e,t){switch(t){case"color":var i=r.getItemVisual(e,"style");return i[r.getVisual("drawType")];case"opacity":return r.getItemVisual(e,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return r.getItemVisual(e,t);default:}}function Ow(r,e){switch(e){case"color":var t=r.getVisual("style");return t[r.getVisual("drawType")];case"opacity":return r.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return r.getVisual(e);default:}}function ra(r,e,t,i,n){var o=r+e;t.isSilent(o)||i.eachComponent({mainType:"series",subType:"pie"},function(a){for(var s=a.seriesIndex,l=a.option.selectedMap,u=n.selected,f=0;f<u.length;f++)if(u[f].seriesIndex===s){var c=a.getData(),p=oi(c,n.fromActionPayload);t.trigger(o,{type:o,seriesId:a.id,name:L(p)?c.getName(p[0]):c.getName(p),selected:N(l)?l:P({},l)})}})}function Iw(r,e,t){r.on("selectchanged",function(i){var n=t.getModel();i.isFromClick?(ra("map","selectchanged",e,n,i),ra("pie","selectchanged",e,n,i)):i.fromAction==="select"?(ra("map","selected",e,n,i),ra("pie","selected",e,n,i)):i.fromAction==="unselect"&&(ra("map","unselected",e,n,i),ra("pie","unselected",e,n,i))})}function Kn(r,e,t){for(var i;r&&!(e(r)&&(i=r,t));)r=r.__hostTarget||r.parent;return i}var wO=Math.round(Math.random()*9),CO=typeof Object.defineProperty=="function",TO=(function(){function r(){this._id="__ec_inner_"+wO++}return r.prototype.get=function(e){return this._guard(e)[this._id]},r.prototype.set=function(e,t){var i=this._guard(e);return CO?Object.defineProperty(i,this._id,{value:t,enumerable:!1,configurable:!0}):i[this._id]=t,this},r.prototype.delete=function(e){return this.has(e)?(delete this._guard(e)[this._id],!0):!1},r.prototype.has=function(e){return!!this._guard(e)[this._id]},r.prototype._guard=function(e){if(e!==Object(e))throw TypeError("Value of WeakMap is not a non-null object.");return e},r})(),Aw=TO;function $n(r){return isFinite(r)}function bO(r,e,t){var i=e.x==null?0:e.x,n=e.x2==null?1:e.x2,o=e.y==null?0:e.y,a=e.y2==null?0:e.y2;e.global||(i=i*t.width+t.x,n=n*t.width+t.x,o=o*t.height+t.y,a=a*t.height+t.y),i=$n(i)?i:0,n=$n(n)?n:1,o=$n(o)?o:0,a=$n(a)?a:0;var s=r.createLinearGradient(i,o,n,a);return s}function DO(r,e,t){var i=t.width,n=t.height,o=Math.min(i,n),a=e.x==null?.5:e.x,s=e.y==null?.5:e.y,l=e.r==null?.5:e.r;e.global||(a=a*i+t.x,s=s*n+t.y,l=l*o),a=$n(a)?a:.5,s=$n(s)?s:.5,l=l>=0&&$n(l)?l:.5;var u=r.createRadialGradient(a,s,0,a,s,l);return u}function Ts(r,e,t){for(var i=e.type==="radial"?DO(r,e,t):bO(r,e,t),n=e.colorStops,o=0;o<n.length;o++)i.addColorStop(n[o].offset,n[o].color);return i}function Pw(r,e){if(r===e||!r&&!e)return!1;if(!r||!e||r.length!==e.length)return!0;for(var t=0;t<r.length;t++)if(r[t]!==e[t])return!0;return!1}function If(r){return parseInt(r,10)}function bs(r,e,t){var i=["width","height"][e],n=["clientWidth","clientHeight"][e],o=["paddingLeft","paddingTop"][e],a=["paddingRight","paddingBottom"][e];if(t[i]!=null&&t[i]!=="auto")return parseFloat(t[i]);var s=document.defaultView.getComputedStyle(r);return(r[n]||If(s[i])||If(r.style[i]))-(If(s[o])||0)-(If(s[a])||0)|0}function MO(r,e){return!r||r==="solid"||!(e>0)?null:r==="dashed"?[4*e,2*e]:r==="dotted"?[e]:Ce(r)?[r]:L(r)?r:null}function Dd(r){var e=r.style,t=e.lineDash&&e.lineWidth>0&&MO(e.lineDash,e.lineWidth),i=e.lineDashOffset;if(t){var n=e.strokeNoScale&&r.getLineScale?r.getLineScale():1;n&&n!==1&&(t=X(t,function(o){return o/n}),i/=n)}return[t,i]}var EO=new ir(!0);function Af(r){var e=r.stroke;return!(e==null||e==="none"||!(r.lineWidth>0))}function Lw(r){return typeof r=="string"&&r!=="none"}function Pf(r){var e=r.fill;return e!=null&&e!=="none"}function Nw(r,e){if(e.fillOpacity!=null&&e.fillOpacity!==1){var t=r.globalAlpha;r.globalAlpha=e.fillOpacity*e.opacity,r.fill(),r.globalAlpha=t}else r.fill()}function kw(r,e){if(e.strokeOpacity!=null&&e.strokeOpacity!==1){var t=r.globalAlpha;r.globalAlpha=e.strokeOpacity*e.opacity,r.stroke(),r.globalAlpha=t}else r.stroke()}function Lf(r,e,t){var i=Kc(e.image,e.__image,t);if(Do(i)){var n=r.createPattern(i,e.repeat||"repeat");if(typeof DOMMatrix=="function"&&n&&n.setTransform){var o=new DOMMatrix;o.translateSelf(e.x||0,e.y||0),o.rotateSelf(0,0,(e.rotation||0)*bc),o.scaleSelf(e.scaleX||1,e.scaleY||1),n.setTransform(o)}return n}}function RO(r,e,t,i){var n,o=Af(t),a=Pf(t),s=t.strokePercent,l=s<1,u=!e.path;(!e.silent||l)&&u&&e.createPathProxy();var f=e.path||EO,c=e.__dirty;if(!i){var p=t.fill,h=t.stroke,d=a&&!!p.colorStops,g=o&&!!h.colorStops,v=a&&!!p.image,m=o&&!!h.image,y=void 0,_=void 0,x=void 0,C=void 0,w=void 0;(d||g)&&(w=e.getBoundingRect()),d&&(y=c?Ts(r,p,w):e.__canvasFillGradient,e.__canvasFillGradient=y),g&&(_=c?Ts(r,h,w):e.__canvasStrokeGradient,e.__canvasStrokeGradient=_),v&&(x=c||!e.__canvasFillPattern?Lf(r,p,e):e.__canvasFillPattern,e.__canvasFillPattern=x),m&&(C=c||!e.__canvasStrokePattern?Lf(r,h,e):e.__canvasStrokePattern,e.__canvasStrokePattern=x),d?r.fillStyle=y:v&&(x?r.fillStyle=x:a=!1),g?r.strokeStyle=_:m&&(C?r.strokeStyle=C:o=!1)}var T=e.getGlobalScale();f.setScale(T[0],T[1],e.segmentIgnoreThreshold);var D,b;r.setLineDash&&t.lineDash&&(n=Dd(e),D=n[0],b=n[1]);var E=!0;(u||c&Di)&&(f.setDPR(r.dpr),l?f.setContext(null):(f.setContext(r),E=!1),f.reset(),e.buildPath(f,e.shape,i),f.toStatic(),e.pathUpdated()),E&&f.rebuildPath(r,l?s:1),D&&(r.setLineDash(D),r.lineDashOffset=b),i||(t.strokeFirst?(o&&kw(r,t),a&&Nw(r,t)):(a&&Nw(r,t),o&&kw(r,t))),D&&r.setLineDash([])}function OO(r,e,t){var i=e.__image=Kc(t.image,e.__image,e,e.onload);if(!(!i||!Do(i))){var n=t.x||0,o=t.y||0,a=e.getWidth(),s=e.getHeight(),l=i.width/i.height;if(a==null&&s!=null?a=s*l:s==null&&a!=null?s=a/l:a==null&&s==null&&(a=i.width,s=i.height),t.sWidth&&t.sHeight){var u=t.sx||0,f=t.sy||0;r.drawImage(i,u,f,t.sWidth,t.sHeight,n,o,a,s)}else if(t.sx&&t.sy){var u=t.sx,f=t.sy,c=a-u,p=s-f;r.drawImage(i,u,f,c,p,n,o,a,s)}else r.drawImage(i,n,o,a,s)}}function IO(r,e,t){var i,n=t.text;if(n!=null&&(n+=""),n){r.font=t.font||Tr,r.textAlign=t.textAlign,r.textBaseline=t.textBaseline;var o=void 0,a=void 0;r.setLineDash&&t.lineDash&&(i=Dd(e),o=i[0],a=i[1]),o&&(r.setLineDash(o),r.lineDashOffset=a),t.strokeFirst?(Af(t)&&r.strokeText(n,t.x,t.y),Pf(t)&&r.fillText(n,t.x,t.y)):(Pf(t)&&r.fillText(n,t.x,t.y),Af(t)&&r.strokeText(n,t.x,t.y)),o&&r.setLineDash([])}}var zw=["shadowBlur","shadowOffsetX","shadowOffsetY"],Fw=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function Gw(r,e,t,i,n){var o=!1;if(!i&&(t=t||{},e===t))return!1;if(i||e.opacity!==t.opacity){Kt(r,n),o=!0;var a=Math.max(Math.min(e.opacity,1),0);r.globalAlpha=isNaN(a)?Br.opacity:a}(i||e.blend!==t.blend)&&(o||(Kt(r,n),o=!0),r.globalCompositeOperation=e.blend||Br.blend);for(var s=0;s<zw.length;s++){var l=zw[s];(i||e[l]!==t[l])&&(o||(Kt(r,n),o=!0),r[l]=r.dpr*(e[l]||0))}return(i||e.shadowColor!==t.shadowColor)&&(o||(Kt(r,n),o=!0),r.shadowColor=e.shadowColor||Br.shadowColor),o}function Bw(r,e,t,i,n){var o=Ds(e,n.inHover),a=i?null:t&&Ds(t,n.inHover)||{};if(o===a)return!1;var s=Gw(r,o,a,i,n);if((i||o.fill!==a.fill)&&(s||(Kt(r,n),s=!0),Lw(o.fill)&&(r.fillStyle=o.fill)),(i||o.stroke!==a.stroke)&&(s||(Kt(r,n),s=!0),Lw(o.stroke)&&(r.strokeStyle=o.stroke)),(i||o.opacity!==a.opacity)&&(s||(Kt(r,n),s=!0),r.globalAlpha=o.opacity==null?1:o.opacity),e.hasStroke()){var l=o.lineWidth,u=l/(o.strokeNoScale&&e.getLineScale?e.getLineScale():1);r.lineWidth!==u&&(s||(Kt(r,n),s=!0),r.lineWidth=u)}for(var f=0;f<Fw.length;f++){var c=Fw[f],p=c[0];(i||o[p]!==a[p])&&(s||(Kt(r,n),s=!0),r[p]=o[p]||c[1])}return s}function AO(r,e,t,i,n){return Gw(r,Ds(e,n.inHover),t&&Ds(t,n.inHover),i,n)}function Yw(r,e){var t=e.transform,i=r.dpr||1;t?r.setTransform(i*t[0],i*t[1],i*t[2],i*t[3],i*t[4],i*t[5]):r.setTransform(i,0,0,i,0,0)}function PO(r,e,t){for(var i=!1,n=0;n<r.length;n++){var o=r[n];i=i||o.isZeroArea(),Yw(e,o),e.beginPath(),o.buildPath(e,o.shape),e.clip()}t.allClipped=i}function LO(r,e){return r&&e?r[0]!==e[0]||r[1]!==e[1]||r[2]!==e[2]||r[3]!==e[3]||r[4]!==e[4]||r[5]!==e[5]:!(!r&&!e)}var Ww=1,Uw=2,Hw=3,Vw=4;function NO(r){var e=Pf(r),t=Af(r);return!(r.lineDash||!(+e^+t)||e&&typeof r.fill!="string"||t&&typeof r.stroke!="string"||r.strokePercent<1||r.strokeOpacity<1||r.fillOpacity<1)}function Kt(r,e){e.batchFill&&r.fill(),e.batchStroke&&r.stroke(),e.batchFill="",e.batchStroke=""}function Ds(r,e){return e&&r.__hoverStyle||r.style}function Nf(r,e){Yi(r,e,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function Yi(r,e,t,i){var n=e.transform;if(!e.shouldBePainted(t.viewWidth,t.viewHeight,!1,!1)){e.__dirty&=~tt,e.__isRendered=!1;return}var o=e.__clipPaths,a=t.prevElClipPaths,s=!1,l=!1;if((!a||Pw(o,a))&&(a&&a.length&&(Kt(r,t),r.restore(),l=s=!0,t.prevElClipPaths=null,t.allClipped=!1,t.prevEl=null),o&&o.length&&(Kt(r,t),r.save(),PO(o,r,t),s=!0),t.prevElClipPaths=o),t.allClipped){e.__isRendered=!1;return}e.beforeBrush&&e.beforeBrush(),e.innerBeforeBrush();var u=t.prevEl;u||(l=s=!0);var f=e instanceof pe&&e.autoBatch&&NO(e.style);s||LO(n,u.transform)?(Kt(r,t),Yw(r,e)):f||Kt(r,t);var c=Ds(e,t.inHover);e instanceof pe?(t.lastDrawType!==Ww&&(l=!0,t.lastDrawType=Ww),Bw(r,e,u,l,t),(!f||!t.batchFill&&!t.batchStroke)&&r.beginPath(),RO(r,e,c,f),f&&(t.batchFill=c.fill||"",t.batchStroke=c.stroke||"")):e instanceof La?(t.lastDrawType!==Hw&&(l=!0,t.lastDrawType=Hw),Bw(r,e,u,l,t),IO(r,e,c)):e instanceof mr?(t.lastDrawType!==Uw&&(l=!0,t.lastDrawType=Uw),AO(r,e,u,l,t),OO(r,e,c)):e.getTemporalDisplayables&&(t.lastDrawType!==Vw&&(l=!0,t.lastDrawType=Vw),kO(r,e,t)),f&&i&&Kt(r,t),e.innerAfterBrush(),e.afterBrush&&e.afterBrush(),t.prevEl=e,e.__dirty=0,e.__isRendered=!0}function kO(r,e,t){var i=e.getDisplayables(),n=e.getTemporalDisplayables();r.save();var o={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:t.viewWidth,viewHeight:t.viewHeight,inHover:t.inHover},a,s;for(a=e.getCursor(),s=i.length;a<s;a++){var l=i[a];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),Yi(r,l,o,a===s-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),o.prevEl=l}for(var u=0,f=n.length;u<f;u++){var l=n[u];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),Yi(r,l,o,u===f-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),o.prevEl=l}e.clearTemporalDisplayables(),e.notClear=!0,r.restore()}var Md=new Aw,qw=new ei(100),Xw=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function Ed(r,e){if(r==="none")return null;var t=e.getDevicePixelRatio(),i=e.getZr(),n=i.painter.type==="svg";r.dirty&&Md.delete(r);var o=Md.get(r);if(o)return o;var a=ce(r,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});a.backgroundColor==="none"&&(a.backgroundColor=null);var s={repeat:"repeat"};return l(s),s.rotation=a.rotation,s.scaleX=s.scaleY=n?1:1/t,Md.set(r,s),r.dirty=!1,s;function l(u){for(var f=[t],c=!0,p=0;p<Xw.length;++p){var h=a[Xw[p]];if(h!=null&&!L(h)&&!N(h)&&!Ce(h)&&typeof h!="boolean"){c=!1;break}f.push(h)}var d;if(c){d=f.join(",")+(n?"-svg":"");var g=qw.get(d);g&&(n?u.svgElement=g:u.image=g)}var v=Zw(a.dashArrayX),m=zO(a.dashArrayY),y=jw(a.symbol),_=FO(v),x=Kw(m),C=!n&&tr.createCanvas(),w=n&&{tag:"g",attrs:{},key:"dcl",children:[]},T=b(),D;C&&(C.width=T.width*t,C.height=T.height*t,D=C.getContext("2d")),E(),c&&qw.put(d,C||w),u.image=C,u.svgElement=w,u.svgWidth=T.width,u.svgHeight=T.height;function b(){for(var M=1,R=0,O=_.length;R<O;++R)M=vh(M,_[R]);for(var I=1,R=0,O=y.length;R<O;++R)I=vh(I,y[R].length);M*=I;var W=x*_.length*y.length;if(0)var U;return{width:Math.max(1,Math.min(M,a.maxTileWidth)),height:Math.max(1,Math.min(W,a.maxTileHeight))}}function E(){D&&(D.clearRect(0,0,C.width,C.height),a.backgroundColor&&(D.fillStyle=a.backgroundColor,D.fillRect(0,0,C.width,C.height)));for(var M=0,R=0;R<m.length;++R)M+=m[R];if(M<=0)return;for(var O=-x,I=0,W=0,U=0;O<T.height;){if(I%2===0){for(var de=W/2%y.length,fe=0,ae=0,Me=0;fe<T.width*2;){for(var Ve=0,R=0;R<v[U].length;++R)Ve+=v[U][R];if(Ve<=0)break;if(ae%2===0){var Ae=(1-a.symbolSize)*.5,At=fe+v[U][ae]*Ae,ne=O+m[I]*Ae,A=v[U][ae]*a.symbolSize,H=m[I]*a.symbolSize,V=Me/2%y[de].length;se(At,ne,A,H,y[de][V])}fe+=v[U][ae],++Me,++ae,ae===v[U].length&&(ae=0)}++U,U===v.length&&(U=0)}O+=m[I],++W,++I,I===m.length&&(I=0)}function se(K,oe,k,G,Oe){var ee=n?1:t,Pe=jo(Oe,K*ee,oe*ee,k*ee,G*ee,a.color,a.symbolKeepAspect);if(n){var Ie=i.painter.renderOneToVNode(Pe);Ie&&w.children.push(Ie)}else Nf(D,Pe)}}}}function jw(r){if(!r||r.length===0)return[["rect"]];if(N(r))return[[r]];for(var e=!0,t=0;t<r.length;++t)if(!N(r[t])){e=!1;break}if(e)return jw([r]);for(var i=[],t=0;t<r.length;++t)N(r[t])?i.push([r[t]]):i.push(r[t]);return i}function Zw(r){if(!r||r.length===0)return[[0,0]];if(Ce(r)){var e=Math.ceil(r);return[[e,e]]}for(var t=!0,i=0;i<r.length;++i)if(!Ce(r[i])){t=!1;break}if(t)return Zw([r]);for(var n=[],i=0;i<r.length;++i)if(Ce(r[i])){var e=Math.ceil(r[i]);n.push([e,e])}else{var e=X(r[i],function(s){return Math.ceil(s)});e.length%2===1?n.push(e.concat(e)):n.push(e)}return n}function zO(r){if(!r||typeof r=="object"&&r.length===0)return[0,0];if(Ce(r)){var e=Math.ceil(r);return[e,e]}var t=X(r,function(i){return Math.ceil(i)});return r.length%2?t.concat(t):t}function FO(r){return X(r,function(e){return Kw(e)})}function Kw(r){for(var e=0,t=0;t<r.length;++t)e+=r[t];return r.length%2===1?e*2:e}function Rd(r,e){r.eachRawSeries(function(t){if(!r.isSeriesFiltered(t)){var i=t.getData();i.hasItemVisual()&&i.each(function(a){var s=i.getItemVisual(a,"decal");if(s){var l=i.ensureUniqueItemVisual(a,"style");l.decal=Ed(s,e)}});var n=i.getVisual("decal");if(n){var o=i.getVisual("style");o.decal=Ed(n,e)}}})}var BO=new St,wr=BO;var $w={};function Qw(r,e){$w[r]=e}function Jw(r){return $w[r]}var WO=1,UO=800,HO=900,VO=1e3,GO=2e3,YO=5e3,u1=1e3,qO=1100,Wd=2e3,f1=3e3,XO=4e3,Wf=4500,jO=4600,ZO=5e3,KO=6e3,c1=7e3,h1={PROCESSOR:{FILTER:VO,SERIES_FILTER:UO,STATISTIC:YO},VISUAL:{LAYOUT:u1,PROGRESSIVE_LAYOUT:qO,GLOBAL:Wd,CHART:f1,POST_CHART_LAYOUT:jO,COMPONENT:XO,BRUSH:ZO,CHART_ITEM:Wf,ARIA:KO,DECAL:c1}},It="__flagInMainProcess",$t="__pendingUpdate",Od="__needsUpdateStatus",e1=/^[a-zA-Z0-9_]+$/,Id="__connectUpdateStatus",t1=0,$O=1,QO=2;function p1(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(this.isDisposed()){this.id;return}return v1(this,r,e)}}function d1(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return v1(this,r,e)}}function v1(r,e,t){return t[0]=t[0]&&t[0].toLowerCase(),St.prototype[e].apply(r,t)}var m1=(function(r){we(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e})(St),g1=m1.prototype;g1.on=d1("on");g1.off=d1("off");var ia,Ad,kf,qi,Pd,Ld,Nd,Ms,Es,r1,i1,kd,n1,zf,o1,y1,Cr,a1,_1=(function(r){we(e,r);function e(t,i,n){var o=r.call(this,new bw)||this;o._chartsViews=[],o._chartsMap={},o._componentsViews=[],o._componentsMap={},o._pendingActions=[],n=n||{},N(i)&&(i=x1[i]),o._dom=t;var a="canvas",s="auto",l=!1;if(0)var u;n.ssr&&yS(function(h){var d=Re(h),g=d.dataIndex;if(g!=null){var v=Z();return v.set("series_index",d.seriesIndex),v.set("data_index",g),d.ssrType&&v.set("ssr_type",d.ssrType),v}});var f=o._zr=td(t,{renderer:n.renderer||a,devicePixelRatio:n.devicePixelRatio,width:n.width,height:n.height,ssr:n.ssr,useDirtyRect:te(n.useDirtyRect,l),useCoarsePointer:te(n.useCoarsePointer,s),pointerSize:n.pointerSize});o._ssr=n.ssr,o._throttledZrFlush=Fp(De(f.flush,f),17),i=re(i),i&&_f(i,!0),o._theme=i,o._locale=__(n.locale||Lu),o._coordSysMgr=new gs;var c=o._api=o1(o);function p(h,d){return h.__prio-d.__prio}return Gn(Bf,p),Gn(zd,p),o._scheduler=new Td(o,c,zd,Bf),o._messageCenter=new m1,o._initEvents(),o.resize=De(o.resize,o),f.animation.on("frame",o._onframe,o),r1(f,o),i1(f,o),on(o),o}return e.prototype._onframe=function(){if(!this._disposed){a1(this);var t=this._scheduler;if(this[$t]){var i=this[$t].silent;this[It]=!0;try{ia(this),qi.update.call(this,null,this[$t].updateParams)}catch(l){throw this[It]=!1,this[$t]=null,l}this._zr.flush(),this[It]=!1,this[$t]=null,Ms.call(this,i),Es.call(this,i)}else if(t.unfinished){var n=WO,o=this._model,a=this._api;t.unfinished=!1;do{var s=+new Date;t.performSeriesTasks(o),t.performDataProcessorTasks(o),Ld(this,o),t.performVisualTasks(o),zf(this,this._model,a,"remain",{}),n-=+new Date-s}while(n>0&&t.unfinished);t.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(t,i,n){if(!this[It]){if(this._disposed){this.id;return}var o,a,s;if(F(i)&&(n=i.lazyUpdate,o=i.silent,a=i.replaceMerge,s=i.transition,i=i.notMerge),this[It]=!0,!this._model||i){var l=new OS(this._api),u=this._theme,f=this._model=new gf;f.scheduler=this._scheduler,f.ssr=this._ssr,f.init(null,null,null,u,this._locale,l)}this._model.setOption(t,{replaceMerge:a},Fd);var c={seriesTransition:s,optionChanged:!0};if(n)this[$t]={silent:o,updateParams:c},this[It]=!1,this.getZr().wakeUp();else{try{ia(this),qi.update.call(this,null,c)}catch(p){throw this[$t]=null,this[It]=!1,p}this._ssr||this._zr.flush(),this[$t]=null,this[It]=!1,Ms.call(this,o),Es.call(this,o)}}},e.prototype.setTheme=function(){},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Q.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){return this.renderToCanvas(t)},e.prototype.renderToCanvas=function(t){t=t||{};var i=this._zr.painter;return i.getRenderedCanvas({backgroundColor:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(t){t=t||{};var i=this._zr.painter;return i.renderToString({useViewBox:t.useViewBox})},e.prototype.getSvgDataURL=function(){if(Q.svgSupported){var t=this._zr,i=t.storage.getDisplayList();return S(i,function(n){n.stopAnimation(null,!0)}),t.painter.toDataURL()}},e.prototype.getDataURL=function(t){if(this._disposed){this.id;return}t=t||{};var i=t.excludeComponents,n=this._model,o=[],a=this;S(i,function(l){n.eachComponent({mainType:l},function(u){var f=a._componentsMap[u.__viewId];f.group.ignore||(o.push(f),f.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return S(o,function(l){l.group.ignore=!1}),s},e.prototype.getConnectedDataURL=function(t){if(this._disposed){this.id;return}var i=t.type==="svg",n=this.group,o=Math.min,a=Math.max,s=1/0;if(s1[n]){var l=s,u=s,f=-s,c=-s,p=[],h=t&&t.pixelRatio||this.getDevicePixelRatio();S(Os,function(_,x){if(_.group===n){var C=i?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(re(t)),w=_.getDom().getBoundingClientRect();l=o(w.left,l),u=o(w.top,u),f=a(w.right,f),c=a(w.bottom,c),p.push({dom:C,left:w.left,top:w.top})}}),l*=h,u*=h,f*=h,c*=h;var d=f-l,g=c-u,v=tr.createCanvas(),m=td(v,{renderer:i?"svg":"canvas"});if(m.resize({width:d,height:g}),i){var y="";return S(p,function(_){var x=_.left-l,C=_.top-u;y+='<g transform="translate('+x+","+C+')">'+_.dom+"</g>"}),m.painter.getSvgRoot().innerHTML=y,t.connectedBackgroundColor&&m.painter.setBackgroundColor(t.connectedBackgroundColor),m.refreshImmediately(),m.painter.toDataURL()}else return t.connectedBackgroundColor&&m.add(new ft({shape:{x:0,y:0,width:d,height:g},style:{fill:t.connectedBackgroundColor}})),S(p,function(_){var x=new mr({style:{x:_.left*h-l,y:_.top*h-u,image:_.dom}});m.add(x)}),m.refreshImmediately(),v.toDataURL("image/"+(t&&t.type||"png"))}else return this.getDataURL(t)},e.prototype.convertToPixel=function(t,i){return Pd(this,"convertToPixel",t,i)},e.prototype.convertFromPixel=function(t,i){return Pd(this,"convertFromPixel",t,i)},e.prototype.containPixel=function(t,i){if(this._disposed){this.id;return}var n=this._model,o,a=au(n,t);return S(a,function(s,l){l.indexOf("Models")>=0&&S(s,function(u){var f=u.coordinateSystem;if(f&&f.containPoint)o=o||!!f.containPoint(i);else if(l==="seriesModels"){var c=this._chartsMap[u.__viewId];c&&c.containPoint&&(o=o||c.containPoint(i,u))}},this)},this),!!o},e.prototype.getVisual=function(t,i){var n=this._model,o=au(n,t,{defaultMainType:"series"}),a=o.seriesModel,s=a.getData(),l=o.hasOwnProperty("dataIndexInside")?o.dataIndexInside:o.hasOwnProperty("dataIndex")?s.indexOfRawIndex(o.dataIndex):null;return l!=null?Rw(s,l,i):Ow(s,i)},e.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},e.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},e.prototype._initEvents=function(){var t=this;S(JO,function(i){var n=function(o){var a=t.getModel(),s=o.target,l,u=i==="globalout";if(u?l={}:s&&Kn(s,function(d){var g=Re(d);if(g&&g.dataIndex!=null){var v=g.dataModel||a.getSeriesByIndex(g.seriesIndex);return l=v&&v.getDataParams(g.dataIndex,g.dataType,s)||{},!0}else if(g.eventData)return l=P({},g.eventData),!0},!0),l){var f=l.componentType,c=l.componentIndex;(f==="markLine"||f==="markPoint"||f==="markArea")&&(f="series",c=l.seriesIndex);var p=f&&c!=null&&a.getComponent(f,c),h=p&&t[p.mainType==="series"?"_chartsMap":"_componentsMap"][p.__viewId];l.event=o,l.type=i,t._$eventProcessor.eventInfo={targetEl:s,packedEvent:l,model:p,view:h},t.trigger(i,l)}};n.zrEventfulCallAtLast=!0,t._zr.on(i,n,t)}),S(Rs,function(i,n){t._messageCenter.on(n,function(o){this.trigger(n,o)},t)}),S(["selectchanged"],function(i){t._messageCenter.on(i,function(n){this.trigger(i,n)},t)}),Iw(this._messageCenter,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var t=this.getDom();t&&yh(this.getDom(),Hd,"");var i=this,n=i._api,o=i._model;S(i._componentsViews,function(a){a.dispose(o,n)}),S(i._chartsViews,function(a){a.dispose(o,n)}),i._zr.dispose(),i._dom=i._model=i._chartsMap=i._componentsMap=i._chartsViews=i._componentsViews=i._scheduler=i._api=i._zr=i._throttledZrFlush=i._theme=i._coordSysMgr=i._messageCenter=null,delete Os[i.id]},e.prototype.resize=function(t){if(!this[It]){if(this._disposed){this.id;return}this._zr.resize(t);var i=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!i){var n=i.resetOption("media"),o=t&&t.silent;this[$t]&&(o==null&&(o=this[$t].silent),n=!0,this[$t]=null),this[It]=!0;try{n&&ia(this),qi.update.call(this,{type:"resize",animation:P({duration:0},t&&t.animation)})}catch(a){throw this[It]=!1,a}this[It]=!1,Ms.call(this,o),Es.call(this,o)}}},e.prototype.showLoading=function(t,i){if(this._disposed){this.id;return}if(F(t)&&(i=t,t=""),t=t||"default",this.hideLoading(),!!Bd[t]){var n=Bd[t](this._api,i),o=this._zr;this._loadingFX=n,o.add(n)}},e.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},e.prototype.makeActionFromEvent=function(t){var i=P({},t);return i.type=Rs[t.type],i},e.prototype.dispatchAction=function(t,i){if(this._disposed){this.id;return}if(F(i)||(i={silent:!!i}),!!Ff[t.type]&&this._model){if(this[It]){this._pendingActions.push(t);return}var n=i.silent;Nd.call(this,t,n);var o=i.flush;o?this._zr.flush():o!==!1&&Q.browser.weChat&&this._throttledZrFlush(),Ms.call(this,n),Es.call(this,n)}},e.prototype.updateLabelLayout=function(){wr.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(t){if(this._disposed){this.id;return}var i=t.seriesIndex,n=this.getModel(),o=n.getSeriesByIndex(i);o.appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()},e.internalField=(function(){ia=function(c){var p=c._scheduler;p.restorePipelines(c._model),p.prepareStageTasks(),Ad(c,!0),Ad(c,!1),p.plan()},Ad=function(c,p){for(var h=c._model,d=c._scheduler,g=p?c._componentsViews:c._chartsViews,v=p?c._componentsMap:c._chartsMap,m=c._zr,y=c._api,_=0;_<g.length;_++)g[_].__alive=!1;p?h.eachComponent(function(w,T){w!=="series"&&x(T)}):h.eachSeries(x);function x(w){var T=w.__requireNewView;w.__requireNewView=!1;var D="_ec_"+w.id+"_"+w.type,b=!T&&v[D];if(!b){var E=Gt(w.type),M=p?rr.getClass(E.main,E.sub):qr.getClass(E.sub);b=new M,b.init(h,y),v[D]=b,g.push(b),m.add(b.group)}w.__viewId=b.__id=D,b.__alive=!0,b.__model=w,b.group.__ecComponentInfo={mainType:w.mainType,index:w.componentIndex},!p&&d.prepareView(b,w,h,y)}for(var _=0;_<g.length;){var C=g[_];C.__alive?_++:(!p&&C.renderTask.dispose(),m.remove(C.group),C.dispose(h,y),g.splice(_,1),v[C.__id]===C&&delete v[C.__id],C.__id=C.group.__ecComponentInfo=null)}},kf=function(c,p,h,d,g){var v=c._model;if(v.setUpdatePayload(h),!d){S([].concat(c._componentsViews).concat(c._chartsViews),C);return}var m={};m[d+"Id"]=h[d+"Id"],m[d+"Index"]=h[d+"Index"],m[d+"Name"]=h[d+"Name"];var y={mainType:d,query:m};g&&(y.subType=g);var _=h.excludeSeriesId,x;_!=null&&(x=Z(),S(Be(_),function(w){var T=nr(w,null);T!=null&&x.set(T,!0)})),v&&v.eachComponent(y,function(w){var T=x&&x.get(w.id)!=null;if(!T)if(Eh(h))if(w instanceof pi)h.type===Ni&&!h.notBlur&&!w.get(["emphasis","disabled"])&&S0(w,h,c._api);else{var D=hu(w.mainType,w.componentIndex,h.name,c._api),b=D.focusSelf,E=D.dispatchers;h.type===Ni&&b&&!h.notBlur&&su(w.mainType,w.componentIndex,c._api),E&&S(E,function(M){h.type===Ni?Ha(M):Va(M)})}else pu(h)&&w instanceof pi&&(T0(w,h,c._api),Mh(w),Cr(c))},c),v&&v.eachComponent(y,function(w){var T=x&&x.get(w.id)!=null;T||C(c[d==="series"?"_chartsMap":"_componentsMap"][w.__viewId])},c);function C(w){w&&w.__alive&&w[p]&&w[p](w.__model,v,c._api,h)}},qi={prepareAndUpdate:function(c){ia(this),qi.update.call(this,c,{optionChanged:c.newOption!=null})},update:function(c,p){var h=this._model,d=this._api,g=this._zr,v=this._coordSysMgr,m=this._scheduler;if(h){h.setUpdatePayload(c),m.restoreData(h,c),m.performSeriesTasks(h),v.create(h,d),m.performDataProcessorTasks(h,c),Ld(this,h),v.update(h,d),t(h),m.performVisualTasks(h,c),kd(this,h,d,c,p);var y=h.get("backgroundColor")||"transparent",_=h.get("darkMode");g.setBackgroundColor(y),_!=null&&_!=="auto"&&g.setDarkMode(_),wr.trigger("afterupdate",h,d)}},updateTransform:function(c){var p=this,h=this._model,d=this._api;if(h){h.setUpdatePayload(c);var g=[];h.eachComponent(function(m,y){if(m!=="series"){var _=p.getViewOfComponentModel(y);if(_&&_.__alive)if(_.updateTransform){var x=_.updateTransform(y,h,d,c);x&&x.update&&g.push(_)}else g.push(_)}});var v=Z();h.eachSeries(function(m){var y=p._chartsMap[m.__viewId];if(y.updateTransform){var _=y.updateTransform(m,h,d,c);_&&_.update&&v.set(m.uid,1)}else v.set(m.uid,1)}),t(h),this._scheduler.performVisualTasks(h,c,{setDirty:!0,dirtyMap:v}),zf(this,h,d,c,{},v),wr.trigger("afterupdate",h,d)}},updateView:function(c){var p=this._model;p&&(p.setUpdatePayload(c),qr.markUpdateMethod(c,"updateView"),t(p),this._scheduler.performVisualTasks(p,c,{setDirty:!0}),kd(this,p,this._api,c,{}),wr.trigger("afterupdate",p,this._api))},updateVisual:function(c){var p=this,h=this._model;h&&(h.setUpdatePayload(c),h.eachSeries(function(d){d.getData().clearAllVisual()}),qr.markUpdateMethod(c,"updateVisual"),t(h),this._scheduler.performVisualTasks(h,c,{visualType:"visual",setDirty:!0}),h.eachComponent(function(d,g){if(d!=="series"){var v=p.getViewOfComponentModel(g);v&&v.__alive&&v.updateVisual(g,h,p._api,c)}}),h.eachSeries(function(d){var g=p._chartsMap[d.__viewId];g.updateVisual(d,h,p._api,c)}),wr.trigger("afterupdate",h,this._api))},updateLayout:function(c){qi.update.call(this,c)}},Pd=function(c,p,h,d){if(c._disposed){c.id;return}for(var g=c._model,v=c._coordSysMgr.getCoordinateSystems(),m,y=au(g,h),_=0;_<v.length;_++){var x=v[_];if(x[p]&&(m=x[p](g,y,d))!=null)return m}},Ld=function(c,p){var h=c._chartsMap,d=c._scheduler;p.eachSeries(function(g){d.updateStreamModes(g,h[g.__viewId])})},Nd=function(c,p){var h=this,d=this.getModel(),g=c.type,v=c.escapeConnect,m=Ff[g],y=m.actionInfo,_=(y.update||"update").split(":"),x=_.pop(),C=_[0]!=null&&Gt(_[0]);this[It]=!0;var w=[c],T=!1;c.batch&&(T=!0,w=X(c.batch,function(I){return I=ce(P({},I),c),I.batch=null,I}));var D=[],b,E=pu(c),M=Eh(c);if(M&&Dh(this._api),S(w,function(I){if(b=m.action(I,h._model,h._api),b=b||P({},I),b.type=y.event||b.type,D.push(b),M){var W=Ba(c),U=W.queryOptionMap,de=W.mainTypeSpecified,fe=de?U.keys()[0]:"series";kf(h,x,I,fe),Cr(h)}else E?(kf(h,x,I,"series"),Cr(h)):C&&kf(h,x,I,C.main,C.sub)}),x!=="none"&&!M&&!E&&!C)try{this[$t]?(ia(this),qi.update.call(this,c),this[$t]=null):qi[x].call(this,c)}catch(I){throw this[It]=!1,I}if(T?b={type:y.event||g,escapeConnect:v,batch:D}:b=D[0],this[It]=!1,!p){var R=this._messageCenter;if(R.trigger(b.type,b),E){var O={type:"selectchanged",escapeConnect:v,selected:b0(d),isFromClick:c.isFromClick||!1,fromAction:c.type,fromActionPayload:c};R.trigger(O.type,O)}}},Ms=function(c){for(var p=this._pendingActions;p.length;){var h=p.shift();Nd.call(this,h,c)}},Es=function(c){!c&&this.trigger("updated")},r1=function(c,p){c.on("rendered",function(h){p.trigger("rendered",h),c.animation.isFinished()&&!p[$t]&&!p._scheduler.unfinished&&!p._pendingActions.length&&p.trigger("finished")})},i1=function(c,p){c.on("mouseover",function(h){var d=h.target,g=Kn(d,Ga);g&&(w0(g,h,p._api),Cr(p))}).on("mouseout",function(h){var d=h.target,g=Kn(d,Ga);g&&(C0(g,h,p._api),Cr(p))}).on("click",function(h){var d=h.target,g=Kn(d,function(y){return Re(y).dataIndex!=null},!0);if(g){var v=g.selected?"unselect":"select",m=Re(g);p._api.dispatchAction({type:v,dataType:m.dataType,dataIndexInside:m.dataIndex,seriesIndex:m.seriesIndex,isFromClick:!0})}})};function t(c){c.clearColorPalette(),c.eachSeries(function(p){p.clearColorPalette()})}function i(c){var p=[],h=[],d=!1;if(c.eachComponent(function(y,_){var x=_.get("zlevel")||0,C=_.get("z")||0,w=_.getZLevelKey();d=d||!!w,(y==="series"?h:p).push({zlevel:x,z:C,idx:_.componentIndex,type:y,key:w})}),d){var g=p.concat(h),v,m;Gn(g,function(y,_){return y.zlevel===_.zlevel?y.z-_.z:y.zlevel-_.zlevel}),S(g,function(y){var _=c.getComponent(y.type,y.idx),x=y.zlevel,C=y.key;v!=null&&(x=Math.max(v,x)),C?(x===v&&C!==m&&x++,m=C):m&&(x===v&&x++,m=""),v=x,_.setZLevel(x)})}}kd=function(c,p,h,d,g){i(p),n1(c,p,h,d,g),S(c._chartsViews,function(v){v.__alive=!1}),zf(c,p,h,d,g),S(c._chartsViews,function(v){v.__alive||v.remove(p,h)})},n1=function(c,p,h,d,g,v){S(v||c._componentsViews,function(m){var y=m.__model;u(y,m),m.render(y,p,h,d),s(y,m),f(y,m)})},zf=function(c,p,h,d,g,v){var m=c._scheduler;g=P(g||{},{updatedSeries:p.getSeries()}),wr.trigger("series:beforeupdate",p,h,g);var y=!1;p.eachSeries(function(_){var x=c._chartsMap[_.__viewId];x.__alive=!0;var C=x.renderTask;m.updatePayload(C,d),u(_,x),v&&v.get(_.uid)&&C.dirty(),C.perform(m.getPerformArgs(C))&&(y=!0),x.group.silent=!!_.get("silent"),a(_,x),Mh(_)}),m.unfinished=y||m.unfinished,wr.trigger("series:layoutlabels",p,h,g),wr.trigger("series:transition",p,h,g),p.eachSeries(function(_){var x=c._chartsMap[_.__viewId];s(_,x),f(_,x)}),o(c,p),wr.trigger("series:afterupdate",p,h,g)},Cr=function(c){c[Od]=!0,c.getZr().wakeUp()},a1=function(c){c[Od]&&(c.getZr().storage.traverse(function(p){ui(p)||n(p)}),c[Od]=!1)};function n(c){for(var p=[],h=c.currentStates,d=0;d<h.length;d++){var g=h[d];g==="emphasis"||g==="blur"||g==="select"||p.push(g)}c.selected&&c.states.select&&p.push("select"),c.hoverState===uu&&c.states.emphasis?p.push("emphasis"):c.hoverState===lu&&c.states.blur&&p.push("blur"),c.useStates(p)}function o(c,p){var h=c._zr,d=h.storage,g=0;d.traverse(function(v){v.isGroup||g++}),g>p.get("hoverLayerThreshold")&&!Q.node&&!Q.worker&&p.eachSeries(function(v){if(!v.preventUsingHoverLayer){var m=c._chartsMap[v.__viewId];m.__alive&&m.eachRendered(function(y){y.states.emphasis&&(y.states.emphasis.hoverLayer=!0)})}})}function a(c,p){var h=c.get("blendMode")||null;p.eachRendered(function(d){d.isGroup||(d.style.blend=h)})}function s(c,p){if(!c.preventAutoZ){var h=c.get("z")||0,d=c.get("zlevel")||0;p.eachRendered(function(g){return l(g,h,d,-1/0),!0})}}function l(c,p,h,d){var g=c.getTextContent(),v=c.getTextGuideLine(),m=c.isGroup;if(m)for(var y=c.childrenRef(),_=0;_<y.length;_++)d=Math.max(l(y[_],p,h,d),d);else c.z=p,c.zlevel=h,d=Math.max(c.z2,d);if(g&&(g.z=p,g.zlevel=h,isFinite(d)&&(g.z2=d+2)),v){var x=c.textGuideLineConfig;v.z=p,v.zlevel=h,isFinite(d)&&(v.z2=d+(x&&x.showAbove?1:-1))}return d}function u(c,p){p.eachRendered(function(h){if(!ui(h)){var d=h.getTextContent(),g=h.getTextGuideLine();h.stateTransition&&(h.stateTransition=null),d&&d.stateTransition&&(d.stateTransition=null),g&&g.stateTransition&&(g.stateTransition=null),h.hasState()?(h.prevStates=h.currentStates,h.clearStates()):h.prevStates&&(h.prevStates=null)}})}function f(c,p){var h=c.getModel("stateAnimation"),d=c.isAnimationEnabled(),g=h.get("duration"),v=g>0?{duration:g,delay:h.get("delay"),easing:h.get("easing")}:null;p.eachRendered(function(m){if(m.states&&m.states.emphasis){if(ui(m))return;if(m instanceof pe&&E0(m),m.__dirty){var y=m.prevStates;y&&m.useStates(y)}if(d){m.stateTransition=v;var _=m.getTextContent(),x=m.getTextGuideLine();_&&(_.stateTransition=v),x&&(x.stateTransition=v)}m.__dirty&&n(m)}})}o1=function(c){return new((function(p){we(h,p);function h(){return p!==null&&p.apply(this,arguments)||this}return h.prototype.getCoordinateSystems=function(){return c._coordSysMgr.getCoordinateSystems()},h.prototype.getComponentByElement=function(d){for(;d;){var g=d.__ecComponentInfo;if(g!=null)return c._model.getComponent(g.mainType,g.index);d=d.parent}},h.prototype.enterEmphasis=function(d,g){Ha(d,g),Cr(c)},h.prototype.leaveEmphasis=function(d,g){Va(d,g),Cr(c)},h.prototype.enterBlur=function(d){_0(d),Cr(c)},h.prototype.leaveBlur=function(d){Ch(d),Cr(c)},h.prototype.enterSelect=function(d){Th(d),Cr(c)},h.prototype.leaveSelect=function(d){bh(d),Cr(c)},h.prototype.getModel=function(){return c.getModel()},h.prototype.getViewOfComponentModel=function(d){return c.getViewOfComponentModel(d)},h.prototype.getViewOfSeriesModel=function(d){return c.getViewOfSeriesModel(d)},h})(yf))(c)},y1=function(c){function p(h,d){for(var g=0;g<h.length;g++){var v=h[g];v[Id]=d}}S(Rs,function(h,d){c._messageCenter.on(d,function(g){if(s1[c.group]&&c[Id]!==t1){if(g&&g.escapeConnect)return;var v=c.makeActionFromEvent(g),m=[];S(Os,function(y){y!==c&&y.group===c.group&&m.push(y)}),p(m,t1),S(m,function(y){y[Id]!==$O&&y.dispatchAction(v)}),p(m,QO)}})})}})(),e})(St),Ud=_1.prototype;Ud.on=p1("on");Ud.off=p1("off");Ud.one=function(r,e,t){var i=this;function n(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];e&&e.apply&&e.apply(this,o),i.off(r,n)}this.on.call(this,r,n,t)};var JO=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];var Ff={},Rs={},zd=[],Fd=[],Bf=[],x1={},Bd={},Os={},s1={},eI=+new Date-0,EG=+new Date-0,Hd="_echarts_instance_";function S1(r,e,t){var i=!(t&&t.ssr);if(i){var n=tI(r);if(n)return n}var o=new _1(r,e,t);return o.id="ec_"+eI++,Os[o.id]=o,i&&yh(r,Hd,o.id),y1(o),wr.trigger("afterinit",o),o}function tI(r){return Os[o0(r,Hd)]}function w1(r,e){x1[r]=e}function Is(r){he(Fd,r)<0&&Fd.push(r)}function Vd(r,e){Gd(zd,r,e,GO)}function C1(r){Uf("afterinit",r)}function T1(r){Uf("afterupdate",r)}function Uf(r,e){wr.on(r,e)}function Qn(r,e,t){j(e)&&(t=e,e="");var i=F(r)?r.type:[r,r={event:e}][0];r.event=(r.event||i).toLowerCase(),e=r.event,!Rs[e]&&(_t(e1.test(i)&&e1.test(e)),Ff[i]||(Ff[i]={action:t,actionInfo:r}),Rs[e]=i)}function b1(r,e){gs.register(r,e)}function Hf(r,e){Gd(Bf,r,e,u1,"layout")}function Xi(r,e){Gd(Bf,r,e,f1,"visual")}var l1=[];function Gd(r,e,t,i,n){if((j(e)||F(e))&&(t=e,e=i),!(he(l1,t)>=0)){l1.push(t);var o=Td.wrapStageHandler(t,n);o.__prio=e,o.__raw=t,r.push(o)}}function Yd(r,e){Bd[r]=e}function D1(r,e,t){var i=Jw("registerMap");i&&i(r,e,t)}var M1=YS;Xi(Wd,pw);Xi(Wf,dw);Xi(Wf,vw);Xi(Wd,Mw);Xi(Wf,Ew);Xi(c1,Rd);Is(_f);Vd(HO,sd);Yd("default",Cd);Qn({type:Ni,event:Ni,update:Ni},it);Qn({type:Wa,event:Wa,update:Wa},it);Qn({type:Ao,event:Ao,update:Ao},it);Qn({type:Ua,event:Ua,update:Ua},it);Qn({type:Po,event:Po,update:Po},it);w1("light",xw);w1("dark",Tw);var E1=[],rI={registerPreprocessor:Is,registerProcessor:Vd,registerPostInit:C1,registerPostUpdate:T1,registerUpdateLifecycle:Uf,registerAction:Qn,registerCoordinateSystem:b1,registerLayout:Hf,registerVisual:Xi,registerTransform:M1,registerLoading:Yd,registerMap:D1,registerImpl:Qw,PRIORITY:h1,ComponentModel:Fe,ComponentView:rr,SeriesModel:pi,ChartView:qr,registerComponentModel:function(r){Fe.registerClass(r)},registerComponentView:function(r){rr.registerClass(r)},registerSeriesModel:function(r){pi.registerClass(r)},registerChartView:function(r){qr.registerClass(r)},registerSubTypeDefaulter:function(r,e){Fe.registerSubTypeDefaulter(r,e)},registerPainter:function(r,e){gS(r,e)}};function di(r){if(L(r)){S(r,function(e){di(e)});return}he(E1,r)>=0||(E1.push(r),j(r)&&(r={install:r}),r.install(rI))}function As(r){return r==null?0:r.length||1}function R1(r){return r}var iI=(function(){function r(e,t,i,n,o,a){this._old=e,this._new=t,this._oldKeyGetter=i||R1,this._newKeyGetter=n||R1,this.context=o,this._diffModeMultiple=a==="multiple"}return r.prototype.add=function(e){return this._add=e,this},r.prototype.update=function(e){return this._update=e,this},r.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},r.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},r.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},r.prototype.remove=function(e){return this._remove=e,this},r.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},r.prototype._executeOneToOne=function(){var e=this._old,t=this._new,i={},n=new Array(e.length),o=new Array(t.length);this._initIndexMap(e,null,n,"_oldKeyGetter"),this._initIndexMap(t,i,o,"_newKeyGetter");for(var a=0;a<e.length;a++){var s=n[a],l=i[s],u=As(l);if(u>1){var f=l.shift();l.length===1&&(i[s]=l[0]),this._update&&this._update(f,a)}else u===1?(i[s]=null,this._update&&this._update(l,a)):this._remove&&this._remove(a)}this._performRestAdd(o,i)},r.prototype._executeMultiple=function(){var e=this._old,t=this._new,i={},n={},o=[],a=[];this._initIndexMap(e,i,o,"_oldKeyGetter"),this._initIndexMap(t,n,a,"_newKeyGetter");for(var s=0;s<o.length;s++){var l=o[s],u=i[l],f=n[l],c=As(u),p=As(f);if(c>1&&p===1)this._updateManyToOne&&this._updateManyToOne(f,u),n[l]=null;else if(c===1&&p>1)this._updateOneToMany&&this._updateOneToMany(f,u),n[l]=null;else if(c===1&&p===1)this._update&&this._update(f,u),n[l]=null;else if(c>1&&p>1)this._updateManyToMany&&this._updateManyToMany(f,u),n[l]=null;else if(c>1)for(var h=0;h<c;h++)this._remove&&this._remove(u[h]);else this._remove&&this._remove(u)}this._performRestAdd(a,n)},r.prototype._performRestAdd=function(e,t){for(var i=0;i<e.length;i++){var n=e[i],o=t[n],a=As(o);if(a>1)for(var s=0;s<a;s++)this._add&&this._add(o[s]);else a===1&&this._add&&this._add(o);t[n]=null}},r.prototype._initIndexMap=function(e,t,i,n){for(var o=this._diffModeMultiple,a=0;a<e.length;a++){var s="_ec_"+this[n](e[a],a);if(o||(i[a]=s),!!t){var l=t[s],u=As(l);u===0?(t[s]=a,o&&i.push(s)):u===1?t[s]=[l,a]:l.push(a)}}},r})(),O1=iI;var nI=(function(r){we(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},e})(Fe),I1=nI;function Vf(r){var e=r.get("confine");return e!=null?!!e:r.get("renderMode")==="richText"}function A1(r){if(Q.domSupported){for(var e=document.documentElement.style,t=0,i=r.length;t<i;t++)if(r[t]in e)return r[t]}}var qd=A1(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),P1=A1(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);function Xd(r,e){if(!r)return e;e=Uo(e,!0);var t=r.indexOf(e);return r=t===-1?e:"-"+r.slice(0,t)+"-"+e,r.toLowerCase()}function L1(r,e){var t=r.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(r);return t?e?t[e]:t:null}var oI=Xd(P1,"transition"),jd=Xd(qd,"transform"),aI="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(Q.transform3dSupported?"will-change:transform;":"");function sI(r){return r=r==="left"?"right":r==="right"?"left":r==="top"?"bottom":"top",r}function lI(r,e,t){if(!N(t)||t==="inside")return"";var i=r.get("backgroundColor"),n=r.get("borderWidth");e=Fi(e);var o=sI(t),a=Math.max(Math.round(n)*1.5,6),s="",l=jd+":",u;he(["left","right"],o)>-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=o==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=o==="top"?225:45)+"deg)");var f=u*Math.PI/180,c=a+n,p=c*Math.abs(Math.cos(f))+c*Math.abs(Math.sin(f)),h=Math.round(((p-Math.SQRT2*n)/2+Math.SQRT2*n-(p-c)/2)*100)/100;s+=";"+o+":-"+h+"px";var d=e+" solid "+n+"px;",g=["position:absolute;width:"+a+"px;height:"+a+"px;z-index:-1;",s+";"+l+";","border-bottom:"+d,"border-right:"+d,"background-color:"+i+";"];return'<div style="'+g.join("")+'"></div>'}function uI(r,e){var t="cubic-bezier(0.23,1,0.32,1)",i=" "+r/2+"s "+t,n="opacity"+i+",visibility"+i;return e||(i=" "+r+"s "+t,n+=Q.transformSupported?","+jd+i:",left"+i+",top"+i),oI+":"+n}function N1(r,e,t){var i=r.toFixed(0)+"px",n=e.toFixed(0)+"px";if(!Q.transformSupported)return t?"top:"+n+";left:"+i+";":[["top",n],["left",i]];var o=Q.transform3dSupported,a="translate"+(o?"3d":"")+"("+i+","+n+(o?",0":"")+")";return t?"top:0;left:0;"+jd+":"+a+";":[["top",0],["left",0],[qd,a]]}function fI(r){var e=[],t=r.get("fontSize"),i=r.getTextColor();i&&e.push("color:"+i),e.push("font:"+r.getFont());var n=te(r.get("lineHeight"),Math.round(t*3/2));t&&e.push("line-height:"+n+"px");var o=r.get("textShadowColor"),a=r.get("textShadowBlur")||0,s=r.get("textShadowOffsetX")||0,l=r.get("textShadowOffsetY")||0;return o&&a&&e.push("text-shadow:"+s+"px "+l+"px "+a+"px "+o),S(["decoration","align"],function(u){var f=r.get(u);f&&e.push("text-"+u+":"+f)}),e.join(";")}function cI(r,e,t){var i=[],n=r.get("transitionDuration"),o=r.get("backgroundColor"),a=r.get("shadowBlur"),s=r.get("shadowColor"),l=r.get("shadowOffsetX"),u=r.get("shadowOffsetY"),f=r.getModel("textStyle"),c=Tf(r,"html"),p=l+"px "+u+"px "+a+"px "+s;return i.push("box-shadow:"+p),e&&n&&i.push(uI(n,t)),o&&i.push("background-color:"+o),S(["width","color","radius"],function(h){var d="border-"+h,g=Uo(d),v=r.get(g);v!=null&&i.push(d+":"+v+(h==="color"?"":"px"))}),i.push(fI(f)),c!=null&&i.push("padding:"+zi(c).join("px ")+"px"),i.join(";")+";"}function k1(r,e,t,i,n){var o=e&&e.painter;if(t){var a=o&&o.getViewportRoot();a&&v_(r,a,t,i,n)}else{r[0]=i,r[1]=n;var s=o&&o.getViewportRootOffset();s&&(r[0]+=s.offsetLeft,r[1]+=s.offsetTop)}r[2]=r[0]/e.getWidth(),r[3]=r[1]/e.getHeight()}var hI=(function(){function r(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,Q.wxa)return null;var i=document.createElement("div");i.domBelongToZr=!0,this.el=i;var n=this._zr=e.getZr(),o=t.appendTo,a=o&&(N(o)?document.querySelector(o):fo(o)?o:j(o)&&o(e.getDom()));k1(this._styleCoord,n,a,e.getWidth()/2,e.getHeight()/2),(a||e.getDom()).appendChild(i),this._api=e,this._container=a;var s=this;i.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},i.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=n.handler,f=n.painter.getViewportRoot();Zt(f,l,!0),u.dispatch("mousemove",l)}},i.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return r.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),i=L1(t,"position"),n=t.style;n.position!=="absolute"&&i!=="absolute"&&(n.position="relative")}var o=e.get("alwaysShowContent");o&&this._moveIfResized(),this._alwaysShowContent=o,this.el.className=e.get("className")||""},r.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var i=this.el,n=i.style,o=this._styleCoord;i.innerHTML?n.cssText=aI+cI(e,!this._firstShow,this._longHide)+N1(o[0],o[1],!0)+("border-color:"+Fi(t)+";")+(e.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):n.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},r.prototype.setContent=function(e,t,i,n,o){var a=this.el;if(e==null){a.innerHTML="";return}var s="";if(N(o)&&i.get("trigger")==="item"&&!Vf(i)&&(s=lI(i,n,o)),N(e))a.innerHTML=e+s;else if(e){a.innerHTML="",L(e)||(e=[e]);for(var l=0;l<e.length;l++)fo(e[l])&&e[l].parentNode!==a&&a.appendChild(e[l]);if(s&&a.childNodes.length){var u=document.createElement("div");u.innerHTML=s,a.appendChild(u)}}},r.prototype.setEnterable=function(e){this._enterable=e},r.prototype.getSize=function(){var e=this.el;return e?[e.offsetWidth,e.offsetHeight]:[0,0]},r.prototype.moveTo=function(e,t){if(this.el){var i=this._styleCoord;if(k1(i,this._zr,this._container,e,t),i[0]!=null&&i[1]!=null){var n=this.el.style,o=N1(i[0],i[1]);S(o,function(a){n[a[0]]=a[1]})}}},r.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},r.prototype.hide=function(){var e=this,t=this.el.style;t.visibility="hidden",t.opacity="0",Q.transform3dSupported&&(t.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return e._longHide=!0},500)},r.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(De(this.hide,this),e)):this.hide())},r.prototype.isShow=function(){return this._show},r.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var e=this.el.parentNode;e&&e.removeChild(this.el),this.el=this._container=null},r})(),z1=hI;var pI=(function(){function r(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),B1(this._styleCoord,this._zr,e.getWidth()/2,e.getHeight()/2)}return r.prototype.update=function(e){var t=e.get("alwaysShowContent");t&&this._moveIfResized(),this._alwaysShowContent=t},r.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},r.prototype.setContent=function(e,t,i,n,o){var a=this;F(e)&&ut(""),this.el&&this._zr.remove(this.el);var s=i.getModel("textStyle");this.el=new Ct({style:{rich:t.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:n,textShadowColor:s.get("textShadowColor"),fill:i.get(["textStyle","color"]),padding:Tf(i,"richText"),verticalAlign:"top",align:"left"},z:i.get("z")}),S(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(u){a.el.style[u]=i.get(u)}),S(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],function(u){a.el.style[u]=s.get(u)||0}),this._zr.add(this.el);var l=this;this.el.on("mouseover",function(){l._enterable&&(clearTimeout(l._hideTimeout),l._show=!0),l._inContent=!0}),this.el.on("mouseout",function(){l._enterable&&l._show&&l.hideLater(l._hideDelay),l._inContent=!1})},r.prototype.setEnterable=function(e){this._enterable=e},r.prototype.getSize=function(){var e=this.el,t=this.el.getBoundingRect(),i=F1(e.style);return[t.width+i.left+i.right,t.height+i.top+i.bottom]},r.prototype.moveTo=function(e,t){var i=this.el;if(i){var n=this._styleCoord;B1(n,this._zr,e,t),e=n[0],t=n[1];var o=i.style,a=ji(o.borderWidth||0),s=F1(o);i.x=e+a+s.left,i.y=t+a+s.top,i.markRedraw()}},r.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},r.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},r.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(De(this.hide,this),e)):this.hide())},r.prototype.isShow=function(){return this._show},r.prototype.dispose=function(){this._zr.remove(this.el)},r})();function ji(r){return Math.max(0,r)}function F1(r){var e=ji(r.shadowBlur||0),t=ji(r.shadowOffsetX||0),i=ji(r.shadowOffsetY||0);return{left:ji(e-t),right:ji(e+t),top:ji(e-i),bottom:ji(e+i)}}function B1(r,e,t,i){r[0]=t,r[1]=i,r[2]=r[0]/e.getWidth(),r[3]=r[1]/e.getHeight()}var W1=pI;var dI=new ft({shape:{x:-1,y:-1,width:2,height:2}}),vI=(function(r){we(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,i){if(!(Q.node||!i.getDom())){var n=t.getComponent("tooltip"),o=this._renderMode=a0(n.get("renderMode"));this._tooltipContent=o==="richText"?new W1(i):new z1(i,{appendTo:n.get("appendToBody",!0)?"body":n.get("appendTo",!0)})}},e.prototype.render=function(t,i,n){if(!(Q.node||!n.getDom())){this.group.removeAll(),this._tooltipModel=t,this._ecModel=i,this._api=n;var o=this._tooltipContent;o.update(t),o.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow(),this._renderMode!=="richText"&&t.get("transitionDuration")?cf(this,"_updatePosition",50,"fixRate"):us(this,"_updatePosition")}},e.prototype._initGlobalListener=function(){var t=this._tooltipModel,i=t.get("triggerOn");hf("itemTooltip",this._api,De(function(n,o,a){i!=="none"&&(i.indexOf(n)>=0?this._tryShow(o,a):n==="leave"&&this._hide(a))},this))},e.prototype._keepShow=function(){var t=this._tooltipModel,i=this._ecModel,n=this._api,o=t.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&o!=="none"&&o!=="click"){var a=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&a.manuallyShowTip(t,i,n,{x:a._lastX,y:a._lastY,dataByCoordSys:a._lastDataByCoordSys})})}},e.prototype.manuallyShowTip=function(t,i,n,o){if(!(o.from===this.uid||Q.node||!n.getDom())){var a=U1(o,n);this._ticket="";var s=o.dataByCoordSys,l=_I(o,i,n);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:o.position,positionDefault:"bottom"},a)}else if(o.tooltip&&o.x!=null&&o.y!=null){var f=dI;f.x=o.x,f.y=o.y,f.update(),Re(f).tooltipConfig={name:null,option:o.tooltip},this._tryShow({offsetX:o.x,offsetY:o.y,target:f},a)}else if(s)this._tryShow({offsetX:o.x,offsetY:o.y,position:o.position,dataByCoordSys:s,tooltipOption:o.tooltipOption},a);else if(o.seriesIndex!=null){if(this._manuallyAxisShowTip(t,i,n,o))return;var c=cs(o,i),p=c.point[0],h=c.point[1];p!=null&&h!=null&&this._tryShow({offsetX:p,offsetY:h,target:c.el,position:o.position,positionDefault:"bottom"},a)}else o.x!=null&&o.y!=null&&(n.dispatchAction({type:"updateAxisPointer",x:o.x,y:o.y}),this._tryShow({offsetX:o.x,offsetY:o.y,position:o.position,target:n.getZr().findHover(o.x,o.y).target},a))}},e.prototype.manuallyHideTip=function(t,i,n,o){var a=this._tooltipContent;this._tooltipModel&&a.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,o.from!==this.uid&&this._hide(U1(o,n))},e.prototype._manuallyAxisShowTip=function(t,i,n,o){var a=o.seriesIndex,s=o.dataIndex,l=i.getComponent("axisPointer").coordSysAxesInfo;if(!(a==null||s==null||l==null)){var u=i.getSeriesByIndex(a);if(u){var f=u.getData(),c=Ps([f.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(c.get("trigger")==="axis")return n.dispatchAction({type:"updateAxisPointer",seriesIndex:a,dataIndex:s,position:o.position}),!0}}},e.prototype._tryShow=function(t,i){var n=t.target,o=this._tooltipModel;if(o){this._lastX=t.offsetX,this._lastY=t.offsetY;var a=t.dataByCoordSys;if(a&&a.length)this._showAxisTooltip(a,t);else if(n){var s=Re(n);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;Kn(n,function(f){if(Re(f).dataIndex!=null)return l=f,!0;if(Re(f).tooltipConfig!=null)return u=f,!0},!0),l?this._showSeriesItemTooltip(t,l,i):u?this._showComponentItemTooltip(t,u,i):this._hide(i)}else this._lastDataByCoordSys=null,this._hide(i)}},e.prototype._showOrMove=function(t,i){var n=t.get("showDelay");i=De(i,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(i,n):i()},e.prototype._showAxisTooltip=function(t,i){var n=this._ecModel,o=this._tooltipModel,a=[i.offsetX,i.offsetY],s=Ps([i.tooltipOption],o),l=this._renderMode,u=[],f=Zn("section",{blocks:[],noHeader:!0}),c=[],p=new bf;S(t,function(y){S(y.dataByAxis,function(_){var x=n.getComponent(_.axisDim+"Axis",_.axisIndex),C=_.value;if(!(!x||C==null)){var w=Up(C,x.axis,n,_.seriesDataIndices,_.valueLabelOpt),T=Zn("section",{header:w,noHeader:!xt(w),sortBlocks:!0,blocks:[]});f.blocks.push(T),S(_.seriesDataIndices,function(D){var b=n.getSeriesByIndex(D.seriesIndex),E=D.dataIndexInside,M=b.getDataParams(E);if(!(M.dataIndex<0)){M.axisDim=_.axisDim,M.axisIndex=_.axisIndex,M.axisType=_.axisType,M.axisId=_.axisId,M.axisValue=rf(x.axis,{value:C}),M.axisValueLabel=w,M.marker=p.makeTooltipMarker("item",Fi(M.color),l);var R=pd(b.formatTooltip(E,!0,null)),O=R.frag;if(O){var I=Ps([b],o).get("valueFormatter");T.blocks.push(I?P({valueFormatter:I},O):O)}R.text&&c.push(R.text),u.push(M)}})}})}),f.blocks.reverse(),c.reverse();var h=i.position,d=s.get("order"),g=xd(f,p,l,d,n.get("useUTC"),s.get("textStyle"));g&&c.unshift(g);var v=l==="richText"?`
|
|
16
|
+
|
|
17
|
+
`:"<br/>",m=c.join(v);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(t,u)?this._updatePosition(s,h,a[0],a[1],this._tooltipContent,u):this._showTooltipContent(s,m,u,Math.random()+"",a[0],a[1],h,null,p)})},e.prototype._showSeriesItemTooltip=function(t,i,n){var o=this._ecModel,a=Re(i),s=a.seriesIndex,l=o.getSeriesByIndex(s),u=a.dataModel||l,f=a.dataIndex,c=a.dataType,p=u.getData(c),h=this._renderMode,d=t.positionDefault,g=Ps([p.getItemModel(f),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,d?{position:d}:null),v=g.get("trigger");if(!(v!=null&&v!=="item")){var m=u.getDataParams(f,c),y=new bf;m.marker=y.makeTooltipMarker("item",Fi(m.color),h);var _=pd(u.formatTooltip(f,!1,c)),x=g.get("order"),C=g.get("valueFormatter"),w=_.frag,T=w?xd(C?P({valueFormatter:C},w):w,y,h,x,o.get("useUTC"),g.get("textStyle")):_.text,D="item_"+u.name+"_"+f;this._showOrMove(g,function(){this._showTooltipContent(g,T,m,D,t.offsetX,t.offsetY,t.position,t.target,y)}),n({type:"showTip",dataIndexInside:f,dataIndex:p.getRawIndex(f),seriesIndex:s,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,i,n){var o=this._renderMode==="html",a=Re(i),s=a.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(N(l)){var f=l;l={content:f,formatter:f},u=!0}u&&o&&l.content&&(l=re(l),l.content=ot(l.content));var c=[l],p=this._ecModel.getComponent(a.componentMainType,a.componentIndex);p&&c.push(p),c.push({formatter:l.content});var h=t.positionDefault,d=Ps(c,this._tooltipModel,h?{position:h}:null),g=d.get("content"),v=Math.random()+"",m=new bf;this._showOrMove(d,function(){var y=re(d.get("formatterParams")||{});this._showTooltipContent(d,g,y,v,t.offsetX,t.offsetY,t.position,i,m)}),n({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,i,n,o,a,s,l,u,f){if(this._ticket="",!(!t.get("showContent")||!t.get("show"))){var c=this._tooltipContent;c.setEnterable(t.get("enterable"));var p=t.get("formatter");l=l||t.get("position");var h=i,d=this._getNearestPoint([a,s],n,t.get("trigger"),t.get("borderColor")),g=d.color;if(p)if(N(p)){var v=t.ecModel.get("useUTC"),m=L(n)?n[0]:n,y=m&&m.axisType&&m.axisType.indexOf("time")>=0;h=p,y&&(h=Bn(m.axisValue,h,v)),h=Ho(h,n,!0)}else if(j(p)){var _=De(function(x,C){x===this._ticket&&(c.setContent(C,f,t,g,l),this._updatePosition(t,l,a,s,c,n,u))},this);this._ticket=o,h=p(n,o,_)}else h=p;c.setContent(h,f,t,g,l),c.show(t,g),this._updatePosition(t,l,a,s,c,n,u)}},e.prototype._getNearestPoint=function(t,i,n,o){if(n==="axis"||L(i))return{color:o||(this._renderMode==="html"?"#fff":"none")};if(!L(i))return{color:o||i.color||i.borderColor}},e.prototype._updatePosition=function(t,i,n,o,a,s,l){var u=this._api.getWidth(),f=this._api.getHeight();i=i||t.get("position");var c=a.getSize(),p=t.get("align"),h=t.get("verticalAlign"),d=l&&l.getBoundingRect().clone();if(l&&d.applyTransform(l.transform),j(i)&&(i=i([n,o],s,a.el,d,{viewSize:[u,f],contentSize:c.slice()})),L(i))n=qe(i[0],u),o=qe(i[1],f);else if(F(i)){var g=i;g.width=c[0],g.height=c[1];var v=Vu(g,{width:u,height:f});n=v.x,o=v.y,p=null,h=null}else if(N(i)&&l){var m=yI(i,d,c,t.get("borderWidth"));n=m[0],o=m[1]}else{var m=mI(n,o,a,u,f,p?null:20,h?null:20);n=m[0],o=m[1]}if(p&&(n-=H1(p)?c[0]/2:p==="right"?c[0]:0),h&&(o-=H1(h)?c[1]/2:h==="bottom"?c[1]:0),Vf(t)){var m=gI(n,o,a,u,f);n=m[0],o=m[1]}a.moveTo(n,o)},e.prototype._updateContentNotChangedOnAxis=function(t,i){var n=this._lastDataByCoordSys,o=this._cbParamsList,a=!!n&&n.length===t.length;return a&&S(n,function(s,l){var u=s.dataByAxis||[],f=t[l]||{},c=f.dataByAxis||[];a=a&&u.length===c.length,a&&S(u,function(p,h){var d=c[h]||{},g=p.seriesDataIndices||[],v=d.seriesDataIndices||[];a=a&&p.value===d.value&&p.axisType===d.axisType&&p.axisId===d.axisId&&g.length===v.length,a&&S(g,function(m,y){var _=v[y];a=a&&m.seriesIndex===_.seriesIndex&&m.dataIndex===_.dataIndex}),o&&S(p.seriesDataIndices,function(m){var y=m.seriesIndex,_=i[y],x=o[y];_&&x&&x.data!==_.data&&(a=!1)})})}),this._lastDataByCoordSys=t,this._cbParamsList=i,!!a},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,i){Q.node||!i.getDom()||(us(this,"_updatePosition"),this._tooltipContent.dispose(),fs("itemTooltip",i))},e.type="tooltip",e})(rr);function Ps(r,e,t){var i=e.ecModel,n;t?(n=new ze(t,i,i),n=new ze(e.option,n,i)):n=e;for(var o=r.length-1;o>=0;o--){var a=r[o];a&&(a instanceof ze&&(a=a.get("tooltip",!0)),N(a)&&(a={formatter:a}),a&&(n=new ze(a,n,i)))}return n}function U1(r,e){return r.dispatchAction||De(e.dispatchAction,e)}function mI(r,e,t,i,n,o,a){var s=t.getSize(),l=s[0],u=s[1];return o!=null&&(r+l+o+2>i?r-=l+o:r+=o),a!=null&&(e+u+a>n?e-=u+a:e+=a),[r,e]}function gI(r,e,t,i,n){var o=t.getSize(),a=o[0],s=o[1];return r=Math.min(r+a,i)-a,e=Math.min(e+s,n)-s,r=Math.max(r,0),e=Math.max(e,0),[r,e]}function yI(r,e,t,i){var n=t[0],o=t[1],a=Math.ceil(Math.SQRT2*i)+8,s=0,l=0,u=e.width,f=e.height;switch(r){case"inside":s=e.x+u/2-n/2,l=e.y+f/2-o/2;break;case"top":s=e.x+u/2-n/2,l=e.y-o-a;break;case"bottom":s=e.x+u/2-n/2,l=e.y+f+a;break;case"left":s=e.x-n-a,l=e.y+f/2-o/2;break;case"right":s=e.x+u+a,l=e.y+f/2-o/2}return[s,l]}function H1(r){return r==="center"||r==="middle"}function _I(r,e,t){var i=Ba(r).queryOptionMap,n=i.keys()[0];if(!(!n||n==="series")){var o=Pi(e,n,i.get(n),{useDefault:!1,enableAll:!1,enableNone:!1}),a=o.models[0];if(a){var s=t.getViewOfComponentModel(a),l;if(s.group.traverse(function(u){var f=Re(u).tooltipConfig;if(f&&f.name===r.name)return l=u,!0}),l)return{componentMainType:n,componentIndex:a.componentIndex,el:l}}}}var V1=vI;function Zd(r){di(jx),r.registerComponentModel(I1),r.registerComponentView(V1),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},it),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},it)}var xI=(function(){function r(e,t){this._encode=e,this._schema=t}return r.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},r.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},r})();function G1(r,e){var t={},i=t.encode={},n=Z(),o=[],a=[],s={};S(r.dimensions,function(p){var h=r.getDimensionInfo(p),d=h.coordDim;if(d){var g=h.coordDimIndex;Kd(i,d)[g]=p,h.isExtraCoord||(n.set(d,1),SI(h.type)&&(o[0]=p),Kd(s,d)[g]=r.getDimensionIndex(h.name)),h.defaultTooltip&&a.push(p)}qu.each(function(v,m){var y=Kd(i,m),_=h.otherDims[m];_!=null&&_!==!1&&(y[_]=h.name)})});var l=[],u={};n.each(function(p,h){var d=i[h];u[h]=d[0],l=l.concat(d)}),t.dataDimsOnCoord=l,t.dataDimIndicesOnCoord=X(l,function(p){return r.getDimensionInfo(p).storeDimIndex}),t.encodeFirstDimNotExtra=u;var f=i.label;f&&f.length&&(o=f.slice());var c=i.tooltip;return c&&c.length?a=c.slice():a.length||(a=o.slice()),i.defaultedLabel=o,i.defaultedTooltip=a,t.userOutput=new xI(s,e),t}function Kd(r,e){return r.hasOwnProperty(e)||(r[e]=[]),r[e]}function Y1(r){return r==="category"?"ordinal":r==="time"?"time":"float"}function SI(r){return!(r==="ordinal"||r==="time")}var wI=(function(){function r(e){this.otherDims={},e!=null&&P(this,e)}return r})(),na=wI;var Ls=F,Zi=X,CI=typeof Int32Array>"u"?Array:Int32Array,TI="e\0\0",q1=-1,bI=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],DI=["_approximateExtent"],X1,Gf,Ns,ks,$d,zs,Qd,MI=(function(){function r(e,t){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var i,n=!1;Ku(e)?(i=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(n=!0,i=e),i=i||["x","y"];for(var o={},a=[],s={},l=!1,u={},f=0;f<i.length;f++){var c=i[f],p=N(c)?new na({name:c}):c instanceof na?c:new na(c),h=p.name;p.type=p.type||"float",p.coordDim||(p.coordDim=h,p.coordDimIndex=0);var d=p.otherDims=p.otherDims||{};a.push(h),o[h]=p,u[h]!=null&&(l=!0),p.createInvertedIndices&&(s[h]=[]),d.itemName===0&&(this._nameDimIdx=f),d.itemId===0&&(this._idDimIdx=f),n&&(p.storeDimIndex=f)}if(this.dimensions=a,this._dimInfos=o,this._initGetDimensionInfo(l),this.hostModel=t,this._invertedIndicesMap=s,this._dimOmitted){var g=this._dimIdxToName=Z();S(a,function(v){g.set(o[v].storeDimIndex,v)})}}return r.prototype.getDimension=function(e){var t=this._recognizeDimIndex(e);if(t==null)return e;if(t=e,!this._dimOmitted)return this.dimensions[t];var i=this._dimIdxToName.get(t);if(i!=null)return i;var n=this._schema.getSourceDimension(t);if(n)return n.name},r.prototype.getDimensionIndex=function(e){var t=this._recognizeDimIndex(e);if(t!=null)return t;if(e==null)return-1;var i=this._getDimInfo(e);return i?i.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(e):-1},r.prototype._recognizeDimIndex=function(e){if(Ce(e)||e!=null&&!isNaN(e)&&!this._getDimInfo(e)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(e)<0))return+e},r.prototype._getStoreDimIndex=function(e){var t=this.getDimensionIndex(e);return t},r.prototype.getDimensionInfo=function(e){return this._getDimInfo(this.getDimension(e))},r.prototype._initGetDimensionInfo=function(e){var t=this._dimInfos;this._getDimInfo=e?function(i){return t.hasOwnProperty(i)?t[i]:void 0}:function(i){return t[i]}},r.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},r.prototype.mapDimension=function(e,t){var i=this._dimSummary;if(t==null)return i.encodeFirstDimNotExtra[e];var n=i.encode[e];return n?n[t]:null},r.prototype.mapDimensionsAll=function(e){var t=this._dimSummary,i=t.encode[e];return(i||[]).slice()},r.prototype.getStore=function(){return this._store},r.prototype.initData=function(e,t,i){var n=this,o;if(e instanceof Ss&&(o=e),!o){var a=this.dimensions,s=qo(e)||et(e)?new xf(e,a.length):e;o=new Ss;var l=Zi(a,function(u){return{type:n._dimInfos[u].type,property:u}});o.initData(s,l,i)}this._store=o,this._nameList=(t||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,o.count()),this._dimSummary=G1(this,this._schema),this.userOutput=this._dimSummary.userOutput},r.prototype.appendData=function(e){var t=this._store.appendData(e);this._doInit(t[0],t[1])},r.prototype.appendValues=function(e,t){var i=this._store.appendValues(e,t&&t.length),n=i.start,o=i.end,a=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),t)for(var s=n;s<o;s++){var l=s-n;this._nameList[s]=t[l],a&&Qd(this,s)}},r.prototype._updateOrdinalMeta=function(){for(var e=this._store,t=this.dimensions,i=0;i<t.length;i++){var n=this._dimInfos[t[i]];n.ordinalMeta&&e.collectOrdinalMeta(n.storeDimIndex,n.ordinalMeta)}},r.prototype._shouldMakeIdFromName=function(){var e=this._store.getProvider();return this._idDimIdx==null&&e.getSource().sourceFormat!==sr&&!e.fillStorage},r.prototype._doInit=function(e,t){if(!(e>=t)){var i=this._store,n=i.getProvider();this._updateOrdinalMeta();var o=this._nameList,a=this._idList,s=n.getSource().sourceFormat,l=s===ct;if(l&&!n.pure)for(var u=[],f=e;f<t;f++){var c=n.getItem(f,u);if(!this.hasItemOption&&t0(c)&&(this.hasItemOption=!0),c){var p=c.name;o[f]==null&&p!=null&&(o[f]=nr(p,null));var h=c.id;a[f]==null&&h!=null&&(a[f]=nr(h,null))}}if(this._shouldMakeIdFromName())for(var f=e;f<t;f++)Qd(this,f);X1(this)}},r.prototype.getApproximateExtent=function(e){return this._approximateExtent[e]||this._store.getDataExtent(this._getStoreDimIndex(e))},r.prototype.setApproximateExtent=function(e,t){t=this.getDimension(t),this._approximateExtent[t]=e.slice()},r.prototype.getCalculationInfo=function(e){return this._calculationInfo[e]},r.prototype.setCalculationInfo=function(e,t){Ls(e)?P(this._calculationInfo,e):this._calculationInfo[e]=t},r.prototype.getName=function(e){var t=this.getRawIndex(e),i=this._nameList[t];return i==null&&this._nameDimIdx!=null&&(i=Ns(this,this._nameDimIdx,t)),i==null&&(i=""),i},r.prototype._getCategory=function(e,t){var i=this._store.get(e,t),n=this._store.getOrdinalMeta(e);return n?n.categories[i]:i},r.prototype.getId=function(e){return Gf(this,this.getRawIndex(e))},r.prototype.count=function(){return this._store.count()},r.prototype.get=function(e,t){var i=this._store,n=this._dimInfos[e];if(n)return i.get(n.storeDimIndex,t)},r.prototype.getByRawIndex=function(e,t){var i=this._store,n=this._dimInfos[e];if(n)return i.getByRawIndex(n.storeDimIndex,t)},r.prototype.getIndices=function(){return this._store.getIndices()},r.prototype.getDataExtent=function(e){return this._store.getDataExtent(this._getStoreDimIndex(e))},r.prototype.getSum=function(e){return this._store.getSum(this._getStoreDimIndex(e))},r.prototype.getMedian=function(e){return this._store.getMedian(this._getStoreDimIndex(e))},r.prototype.getValues=function(e,t){var i=this,n=this._store;return L(e)?n.getValues(Zi(e,function(o){return i._getStoreDimIndex(o)}),t):n.getValues(e)},r.prototype.hasValue=function(e){for(var t=this._dimSummary.dataDimIndicesOnCoord,i=0,n=t.length;i<n;i++)if(isNaN(this._store.get(t[i],e)))return!1;return!0},r.prototype.indexOfName=function(e){for(var t=0,i=this._store.count();t<i;t++)if(this.getName(t)===e)return t;return-1},r.prototype.getRawIndex=function(e){return this._store.getRawIndex(e)},r.prototype.indexOfRawIndex=function(e){return this._store.indexOfRawIndex(e)},r.prototype.rawIndexOf=function(e,t){var i=e&&this._invertedIndicesMap[e],n=i&&i[t];return n==null||isNaN(n)?q1:n},r.prototype.indicesOfNearest=function(e,t,i){return this._store.indicesOfNearest(this._getStoreDimIndex(e),t,i)},r.prototype.each=function(e,t,i){"use strict";j(e)&&(i=t,t=e,e=[]);var n=i||this,o=Zi(ks(e),this._getStoreDimIndex,this);this._store.each(o,n?De(t,n):t)},r.prototype.filterSelf=function(e,t,i){"use strict";j(e)&&(i=t,t=e,e=[]);var n=i||this,o=Zi(ks(e),this._getStoreDimIndex,this);return this._store=this._store.filter(o,n?De(t,n):t),this},r.prototype.selectRange=function(e){"use strict";var t=this,i={},n=me(e),o=[];return S(n,function(a){var s=t._getStoreDimIndex(a);i[s]=e[a],o.push(s)}),this._store=this._store.selectRange(i),this},r.prototype.mapArray=function(e,t,i){"use strict";j(e)&&(i=t,t=e,e=[]),i=i||this;var n=[];return this.each(e,function(){n.push(t&&t.apply(this,arguments))},i),n},r.prototype.map=function(e,t,i,n){"use strict";var o=i||n||this,a=Zi(ks(e),this._getStoreDimIndex,this),s=zs(this);return s._store=this._store.map(a,o?De(t,o):t),s},r.prototype.modify=function(e,t,i,n){var o=this,a=i||n||this,s=Zi(ks(e),this._getStoreDimIndex,this);this._store.modify(s,a?De(t,a):t)},r.prototype.downSample=function(e,t,i,n){var o=zs(this);return o._store=this._store.downSample(this._getStoreDimIndex(e),t,i,n),o},r.prototype.minmaxDownSample=function(e,t){var i=zs(this);return i._store=this._store.minmaxDownSample(this._getStoreDimIndex(e),t),i},r.prototype.lttbDownSample=function(e,t){var i=zs(this);return i._store=this._store.lttbDownSample(this._getStoreDimIndex(e),t),i},r.prototype.getRawDataItem=function(e){return this._store.getRawDataItem(e)},r.prototype.getItemModel=function(e){var t=this.hostModel,i=this.getRawDataItem(e);return new ze(i,t,t&&t.ecModel)},r.prototype.diff=function(e){var t=this;return new O1(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(i){return Gf(e,i)},function(i){return Gf(t,i)})},r.prototype.getVisual=function(e){var t=this._visual;return t&&t[e]},r.prototype.setVisual=function(e,t){this._visual=this._visual||{},Ls(e)?P(this._visual,e):this._visual[e]=t},r.prototype.getItemVisual=function(e,t){var i=this._itemVisuals[e],n=i&&i[t];return n??this.getVisual(t)},r.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},r.prototype.ensureUniqueItemVisual=function(e,t){var i=this._itemVisuals,n=i[e];n||(n=i[e]={});var o=n[t];return o==null&&(o=this.getVisual(t),L(o)?o=o.slice():Ls(o)&&(o=P({},o)),n[t]=o),o},r.prototype.setItemVisual=function(e,t,i){var n=this._itemVisuals[e]||{};this._itemVisuals[e]=n,Ls(t)?P(n,t):n[t]=i},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(e,t){Ls(e)?P(this._layout,e):this._layout[e]=t},r.prototype.getLayout=function(e){return this._layout[e]},r.prototype.getItemLayout=function(e){return this._itemLayouts[e]},r.prototype.setItemLayout=function(e,t,i){this._itemLayouts[e]=i?P(this._itemLayouts[e]||{},t):t},r.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},r.prototype.setItemGraphicEl=function(e,t){var i=this.hostModel&&this.hostModel.seriesIndex;l0(i,this.dataType,e,t),this._graphicEls[e]=t},r.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},r.prototype.eachItemGraphicEl=function(e,t){S(this._graphicEls,function(i,n){i&&e&&e.call(t,i,n)})},r.prototype.cloneShallow=function(e){return e||(e=new r(this._schema?this._schema:Zi(this.dimensions,this._getDimInfo,this),this.hostModel)),$d(e,this),e._store=this._store,e},r.prototype.wrapMethod=function(e,t){var i=this[e];j(i)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var n=i.apply(this,arguments);return t.apply(this,[n].concat(Sl(arguments)))})},r.internalField=(function(){X1=function(e){var t=e._invertedIndicesMap;S(t,function(i,n){var o=e._dimInfos[n],a=o.ordinalMeta,s=e._store;if(a){i=t[n]=new CI(a.categories.length);for(var l=0;l<i.length;l++)i[l]=q1;for(var l=0;l<s.count();l++)i[s.get(o.storeDimIndex,l)]=l}})},Ns=function(e,t,i){return nr(e._getCategory(t,i),null)},Gf=function(e,t){var i=e._idList[t];return i==null&&e._idDimIdx!=null&&(i=Ns(e,e._idDimIdx,t)),i==null&&(i=TI+t),i},ks=function(e){return L(e)||(e=e!=null?[e]:[]),e},zs=function(e){var t=new r(e._schema?e._schema:Zi(e.dimensions,e._getDimInfo,e),e.hostModel);return $d(t,e),t},$d=function(e,t){S(bI.concat(t.__wrappedMethods||[]),function(i){t.hasOwnProperty(i)&&(e[i]=t[i])}),e.__wrappedMethods=t.__wrappedMethods,S(DI,function(i){e[i]=re(t[i])}),e._calculationInfo=P({},t._calculationInfo)},Qd=function(e,t){var i=e._nameList,n=e._idList,o=e._nameDimIdx,a=e._idDimIdx,s=i[t],l=n[t];if(s==null&&o!=null&&(i[t]=s=Ns(e,o,t)),l==null&&a!=null&&(n[t]=l=Ns(e,a,t)),l==null&&s!=null){var u=e._nameRepeatCount,f=u[s]=(u[s]||0)+1;l=s,f>1&&(l+="__ec__"+f),n[t]=l}}})(),r})(),Fs=MI;var EI={label:{enabled:!0},decal:{show:!1}},j1=ye(),RI={};function Jd(r,e){var t=r.getModel("aria");if(!t.get("enabled"))return;var i=re(EI);Ee(i.label,r.getLocaleModel().get("aria"),!1),Ee(t.option,i,!1),n(),o();function n(){var u=t.getModel("decal"),f=u.get("show");if(f){var c=Z();r.eachSeries(function(p){if(!p.isColorBySeries()){var h=c.get(p.type);h||(h={},c.set(p.type,h)),j1(p).scope=h}}),r.eachRawSeries(function(p){if(r.isSeriesFiltered(p))return;if(j(p.enableAriaDecal)){p.enableAriaDecal();return}var h=p.getData();if(p.isColorBySeries()){var y=rd(p.ecModel,p.name,RI,r.getSeriesCount()),_=h.getVisual("decal");h.setVisual("decal",x(_,y))}else{var d=p.getRawData(),g={},v=j1(p).scope;h.each(function(C){var w=h.getRawIndex(C);g[w]=C});var m=d.count();d.each(function(C){var w=g[C],T=d.getName(C)||C+"",D=rd(p.ecModel,T,v,m),b=h.getItemVisual(w,"decal");h.setItemVisual(w,"decal",x(b,D))})}function x(C,w){var T=C?P(P({},w),C):w;return T.dirty=!0,T}})}}function o(){var u=e.getZr().dom;if(u){var f=r.getLocaleModel().get("aria"),c=t.getModel("label");if(c.option=ce(c.option,f),!!c.get("enabled")){if(u.setAttribute("role","img"),c.get("description")){u.setAttribute("aria-label",c.get("description"));return}var p=r.getSeriesCount(),h=c.get(["data","maxCount"])||10,d=c.get(["series","maxCount"])||10,g=Math.min(p,d),v;if(!(p<1)){var m=s();if(m){var y=c.get(["general","withTitle"]);v=a(y,{title:m})}else v=c.get(["general","withoutTitle"]);var _=[],x=p>1?c.get(["series","multiple","prefix"]):c.get(["series","single","prefix"]);v+=a(x,{seriesCount:p}),r.eachSeries(function(D,b){if(b<g){var E=void 0,M=D.get("name"),R=M?"withName":"withoutName";E=p>1?c.get(["series","multiple",R]):c.get(["series","single",R]),E=a(E,{seriesId:D.seriesIndex,seriesName:D.get("name"),seriesType:l(D.subType)});var O=D.getData();if(O.count()>h){var I=c.get(["data","partialData"]);E+=a(I,{displayCnt:h})}else E+=c.get(["data","allData"]);for(var W=c.get(["data","separator","middle"]),U=c.get(["data","separator","end"]),de=c.get(["data","excludeDimensionId"]),fe=[],ae=0;ae<O.count();ae++)if(ae<h){var Me=O.getName(ae),Ve=de?Ue(O.getValues(ae),function(At,ne){return he(de,ne)===-1}):O.getValues(ae),Ae=c.get(["data",Me?"withName":"withoutName"]);fe.push(a(Ae,{name:Me,value:Ve.join(W)}))}E+=fe.join(W)+U,_.push(E)}});var C=c.getModel(["series","multiple","separator"]),w=C.get("middle"),T=C.get("end");v+=_.join(w)+T,u.setAttribute("aria-label",v)}}}}function a(u,f){if(!N(u))return u;var c=u;return S(f,function(p,h){c=c.replace(new RegExp("\\{\\s*"+h+"\\s*\\}","g"),p)}),c}function s(){var u=r.get("title");return u&&u.length&&(u=u[0]),u&&u.text}function l(u){var f=r.getLocaleModel().get(["series","typeNames"]);return f[u]||f.chart}}function ev(r){if(!(!r||!r.aria)){var e=r.aria;e.show!=null&&(e.enabled=e.show),e.label=e.label||{},S(["description","general","series","data"],function(t){e[t]!=null&&(e.label[t]=e[t])})}}function tv(r){r.registerPreprocessor(ev),r.registerVisual(r.PRIORITY.VISUAL.ARIA,Jd)}var OI=(function(r){we(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataset",t}return e.prototype.init=function(t,i,n){r.prototype.init.call(this,t,i,n),this._sourceManager=new Cf(this),gd(this)},e.prototype.mergeOption=function(t,i){r.prototype.mergeOption.call(this,t,i),gd(this)},e.prototype.optionUpdated=function(){this._sourceManager.dirty()},e.prototype.getSourceManager=function(){return this._sourceManager},e.type="dataset",e.defaultOption={seriesLayoutBy:jt},e})(Fe);var II=(function(r){we(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataset",t}return e.type="dataset",e})(rr);function Z1(r){r.registerComponentModel(OI),r.registerComponentView(II)}var Or={};no(Or,{createDimensions:()=>K1,createList:()=>HI,createScale:()=>GI,createSymbol:()=>jo,createTextStyle:()=>qI,dataStack:()=>VI,enableHoverEmphasis:()=>D0,getECData:()=>Re,getLayoutRect:()=>Vu,mixinAxisModelCommonMethods:()=>YI});function K1(r,e){return Yf(r,e).dimensions}function Yf(r,e){qo(r)||(r=Xo(r)),e=e||{};var t=e.coordDimensions||[],i=e.dimensionsDefine||r.dimensionsDefine||[],n=Z(),o=[],a=PI(r,t,i,e.dimensionsCount),s=e.canOmitUnusedDimensions&&Dp(a),l=i===r.dimensionsDefine,u=l?bp(r):Tp(i),f=e.encodeDefine;!f&&e.encodeDefaulter&&(f=e.encodeDefaulter(r,a));for(var c=Z(f),p=new md(a),h=0;h<p.length;h++)p[h]=-1;function d(b){var E=p[b];if(E<0){var M=i[b],R=F(M)?M:{name:M},O=new na,I=R.name;I!=null&&u.get(I)!=null&&(O.name=O.displayName=I),R.type!=null&&(O.type=R.type),R.displayName!=null&&(O.displayName=R.displayName);var W=o.length;return p[b]=W,O.storeDimIndex=b,o.push(O),O}return o[E]}if(!s)for(var h=0;h<a;h++)d(h);c.each(function(b,E){var M=Be(b).slice();if(M.length===1&&!N(M[0])&&M[0]<0){c.set(E,!1);return}var R=c.set(E,[]);S(M,function(O,I){var W=N(O)?u.get(O):O;W!=null&&W<a&&(R[I]=W,v(d(W),E,I))})});var g=0;S(t,function(b){var E,M,R,O;if(N(b))E=b,O={};else{O=b,E=O.name;var I=O.ordinalMeta;O.ordinalMeta=null,O=P({},O),O.ordinalMeta=I,M=O.dimsDef,R=O.otherDims,O.name=O.coordDim=O.coordDimIndex=O.dimsDef=O.otherDims=null}var W=c.get(E);if(W!==!1){if(W=Be(W),!W.length)for(var U=0;U<(M&&M.length||1);U++){for(;g<a&&d(g).coordDim!=null;)g++;g<a&&W.push(g++)}S(W,function(de,fe){var ae=d(de);if(l&&O.type!=null&&(ae.type=O.type),v(ce(ae,O),E,fe),ae.name==null&&M){var Me=M[fe];!F(Me)&&(Me={name:Me}),ae.name=ae.displayName=Me.name,ae.defaultTooltip=Me.defaultTooltip}R&&ce(ae.otherDims,R)})}});function v(b,E,M){qu.get(E)!=null?b.otherDims[E]=M:(b.coordDim=E,b.coordDimIndex=M,n.set(E,!0))}var m=e.generateCoord,y=e.generateCoordCount,_=y!=null;y=m?y||1:0;var x=m||"value";function C(b){b.name==null&&(b.name=b.coordDim)}if(s)S(o,function(b){C(b)}),o.sort(function(b,E){return b.storeDimIndex-E.storeDimIndex});else for(var w=0;w<a;w++){var T=d(w),D=T.coordDim;D==null&&(T.coordDim=LI(x,n,_),T.coordDimIndex=0,(!m||y<=0)&&(T.isExtraCoord=!0),y--),C(T),T.type==null&&(Xu(r,w)===Ft.Must||T.isExtraCoord&&(T.otherDims.itemName!=null||T.otherDims.seriesName!=null))&&(T.type="ordinal")}return AI(o),new Cp({source:r,dimensions:o,fullDimensionCount:a,dimensionOmitted:s})}function AI(r){for(var e=Z(),t=0;t<r.length;t++){var i=r[t],n=i.name,o=e.get(n)||0;o>0&&(i.name=n+(o-1)),o++,e.set(n,o)}}function PI(r,e,t,i){var n=Math.max(r.dimensionsDetectedCount||1,e.length,t.length,i||0);return S(e,function(o){var a;F(o)&&(a=o.dimsDef)&&(n=Math.max(n,a.length))}),n}function LI(r,e,t){if(t||e.hasKey(r)){for(var i=0;e.hasKey(r+i);)i++;r+=i}return e.set(r,!0),r}var NI=(function(){function r(e){this.coordSysDims=[],this.axisMap=Z(),this.categoryAxisMap=Z(),this.coordSysName=e}return r})();function $1(r){var e=r.get("coordinateSystem"),t=new NI(e),i=kI[e];if(i)return i(r,t,t.axisMap,t.categoryAxisMap),t}var kI={cartesian2d:function(r,e,t,i){var n=r.getReferringComponents("xAxis",ai).models[0],o=r.getReferringComponents("yAxis",ai).models[0];e.coordSysDims=["x","y"],t.set("x",n),t.set("y",o),oa(n)&&(i.set("x",n),e.firstCategoryDimIndex=0),oa(o)&&(i.set("y",o),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(r,e,t,i){var n=r.getReferringComponents("singleAxis",ai).models[0];e.coordSysDims=["single"],t.set("single",n),oa(n)&&(i.set("single",n),e.firstCategoryDimIndex=0)},polar:function(r,e,t,i){var n=r.getReferringComponents("polar",ai).models[0],o=n.findAxisModel("radiusAxis"),a=n.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],t.set("radius",o),t.set("angle",a),oa(o)&&(i.set("radius",o),e.firstCategoryDimIndex=0),oa(a)&&(i.set("angle",a),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},geo:function(r,e,t,i){e.coordSysDims=["lng","lat"]},parallel:function(r,e,t,i){var n=r.ecModel,o=n.getComponent("parallel",r.get("parallelIndex")),a=e.coordSysDims=o.dimensions.slice();S(o.parallelAxisIndex,function(s,l){var u=n.getComponent("parallelAxis",s),f=a[l];t.set(f,u),oa(u)&&(i.set(f,u),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=l))})}};function oa(r){return r.get("type")==="category"}function zI(r,e){var t=r.get("coordinateSystem"),i=gs.get(t),n;return e&&e.coordSysDims&&(n=X(e.coordSysDims,function(o){var a={name:o},s=e.axisMap.get(o);if(s){var l=s.get("type");a.type=Y1(l)}return a})),n||(n=i&&(i.getDimensionsInfo?i.getDimensionsInfo():i.dimensions.slice())||["x","y"]),n}function FI(r,e,t){var i,n;return t&&S(r,function(o,a){var s=o.coordDim,l=t.categoryAxisMap.get(s);l&&(i==null&&(i=a),o.ordinalMeta=l.getOrdinalMeta(),e&&(o.createInvertedIndices=!0)),o.otherDims.itemName!=null&&(n=!0)}),!n&&i!=null&&(r[i].otherDims.itemName=0),i}function BI(r,e,t){t=t||{};var i=e.getSourceManager(),n,o=!1;r?(o=!0,n=Xo(r)):(n=i.getSource(),o=n.sourceFormat===ct);var a=$1(e),s=zI(e,a),l=t.useEncodeDefaulter,u=j(l)?l:l?je(W_,s,e):null,f={coordDimensions:s,generateCoord:t.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!o},c=Yf(n,f),p=FI(c.dimensions,t.createInvertedIndices,a),h=o?null:i.getSharedDataStore(c),d=$u(e,{schema:c,store:h}),g=new Fs(c,e);g.setCalculationInfo(d);var v=p!=null&&WI(n)?function(m,y,_,x){return x===p?_:this.defaultDimValueGetter(m,y,_,x)}:null;return g.hasItemOption=!1,g.initData(o?n:h,null,v),g}function WI(r){if(r.sourceFormat===ct){var e=UI(r.data||[]);return!L(ni(e))}}function UI(r){for(var e=0;e<r.length&&r[e]==null;)e++;return r[e]}var Q1=BI;function HI(r){return Q1(null,r)}var VI={isDimensionStacked:Mp,enableDataStack:$u,getStackedDimension:Y_};function GI(r,e){var t=e;e instanceof ze||(t=new ze(e));var i=ox(t);return i.setExtent(r[0],r[1]),nx(i,t),i}function YI(r){Lt(r,I_)}function qI(r,e){return e=e||{},Nn(r,null,null,e.state!=="normal")}var qf={};no(qf,{MAX_SAFE_INTEGER:()=>Zy,asc:()=>Yy,getPercentWithPrecision:()=>Xy,getPixelPrecision:()=>qy,getPrecision:()=>zt,getPrecisionSafe:()=>dh,isNumeric:()=>za,isRadianAroundZero:()=>En,linearMap:()=>Gy,nice:()=>Eo,numericToNumber:()=>gr,parseDate:()=>Dt,quantile:()=>Ky,quantity:()=>ru,quantityExponent:()=>ka,reformIntervals:()=>$y,remRadian:()=>Na,round:()=>bt});var Xf={};no(Xf,{Arc:()=>An,BezierCurve:()=>Qa,BoundingRect:()=>ue,Circle:()=>Rn,CompoundPath:()=>yu,Ellipse:()=>qa,Group:()=>wt,Image:()=>mr,IncrementalDisplayable:()=>Tu,Line:()=>Yr,LinearGradient:()=>xu,Polygon:()=>$a,Polyline:()=>In,RadialGradient:()=>Su,Rect:()=>ft,Ring:()=>Ka,Sector:()=>Za,Text:()=>Ct,clipPointsByRect:()=>Vh,clipRectByRect:()=>Gh,createIcon:()=>es,extendPath:()=>Bh,extendShape:()=>Fh,getShapeClass:()=>Wh,getTransform:()=>Hh,initProps:()=>li,makeImage:()=>Ja,makePath:()=>zo,mergePath:()=>Uh,registerShape:()=>or,resizePath:()=>Mu,updateProps:()=>yr});var jf={};no(jf,{addCommas:()=>as,capitalFirst:()=>R_,encodeHTML:()=>ot,formatTime:()=>E_,formatTpl:()=>Ho,getTextRect:()=>vp,getTooltipMarker:()=>Wu,normalizeCssArray:()=>zi,toCamelCase:()=>Uo,truncateText:()=>Jc});var aa={};no(aa,{bind:()=>De,clone:()=>re,curry:()=>je,defaults:()=>ce,each:()=>S,extend:()=>P,filter:()=>Ue,indexOf:()=>he,inherits:()=>xl,isArray:()=>L,isFunction:()=>j,isObject:()=>F,isString:()=>N,map:()=>X,merge:()=>Ee,reduce:()=>Nt});function J1(r){var e=pi.extend(r);return pi.registerClass(e),e}function eC(r){var e=qr.extend(r);return qr.registerClass(e),e}var Bs=Math.PI*2,Jn=ir.CMD,XI=["top","right","bottom","left"];function jI(r,e,t,i,n){var o=t.width,a=t.height;switch(r){case"top":i.set(t.x+o/2,t.y-e),n.set(0,-1);break;case"bottom":i.set(t.x+o/2,t.y+a+e),n.set(0,1);break;case"left":i.set(t.x-e,t.y+a/2),n.set(-1,0);break;case"right":i.set(t.x+o+e,t.y+a/2),n.set(1,0);break}}function ZI(r,e,t,i,n,o,a,s,l){a-=r,s-=e;var u=Math.sqrt(a*a+s*s);a/=u,s/=u;var f=a*t+r,c=s*t+e;if(Math.abs(i-n)%Bs<1e-4)return l[0]=f,l[1]=c,u-t;if(o){var p=i;i=dr(n),n=dr(p)}else i=dr(i),n=dr(n);i>n&&(n+=Bs);var h=Math.atan2(s,a);if(h<0&&(h+=Bs),h>=i&&h<=n||h+Bs>=i&&h+Bs<=n)return l[0]=f,l[1]=c,u-t;var d=t*Math.cos(i)+r,g=t*Math.sin(i)+e,v=t*Math.cos(n)+r,m=t*Math.sin(n)+e,y=(d-a)*(d-a)+(g-s)*(g-s),_=(v-a)*(v-a)+(m-s)*(m-s);return y<_?(l[0]=d,l[1]=g,Math.sqrt(y)):(l[0]=v,l[1]=m,Math.sqrt(_))}function iv(r,e,t,i,n,o,a,s){var l=n-r,u=o-e,f=t-r,c=i-e,p=Math.sqrt(f*f+c*c);f/=p,c/=p;var h=l*f+u*c,d=h/p;s&&(d=Math.min(Math.max(d,0),1)),d*=p;var g=a[0]=r+d*f,v=a[1]=e+d*c;return Math.sqrt((g-n)*(g-n)+(v-o)*(v-o))}function rC(r,e,t,i,n,o,a){t<0&&(r=r+t,t=-t),i<0&&(e=e+i,i=-i);var s=r+t,l=e+i,u=a[0]=Math.min(Math.max(n,r),s),f=a[1]=Math.min(Math.max(o,e),l);return Math.sqrt((u-n)*(u-n)+(f-o)*(f-o))}var Ir=[];function KI(r,e,t){var i=rC(e.x,e.y,e.width,e.height,r.x,r.y,Ir);return t.set(Ir[0],Ir[1]),i}function $I(r,e,t){for(var i=0,n=0,o=0,a=0,s,l,u=1/0,f=e.data,c=r.x,p=r.y,h=0;h<f.length;){var d=f[h++];h===1&&(i=f[h],n=f[h+1],o=i,a=n);var g=u;switch(d){case Jn.M:o=f[h++],a=f[h++],i=o,n=a;break;case Jn.L:g=iv(i,n,f[h],f[h+1],c,p,Ir,!0),i=f[h++],n=f[h++];break;case Jn.C:g=Ll(i,n,f[h++],f[h++],f[h++],f[h++],f[h],f[h+1],c,p,Ir),i=f[h++],n=f[h++];break;case Jn.Q:g=kl(i,n,f[h++],f[h++],f[h],f[h+1],c,p,Ir),i=f[h++],n=f[h++];break;case Jn.A:var v=f[h++],m=f[h++],y=f[h++],_=f[h++],x=f[h++],C=f[h++];h+=1;var w=!!(1-f[h++]);s=Math.cos(x)*y+v,l=Math.sin(x)*_+m,h<=1&&(o=s,a=l);var T=(c-v)*_/y+v;g=ZI(v,m,_,x,x+C,w,T,p,Ir),i=Math.cos(x+C)*y+v,n=Math.sin(x+C)*_+m;break;case Jn.R:o=i=f[h++],a=n=f[h++];var D=f[h++],b=f[h++];g=rC(o,a,D,b,c,p,Ir);break;case Jn.Z:g=iv(i,n,o,a,c,p,Ir,!0),i=o,n=a;break}g<u&&(u=g,t.set(Ir[0],Ir[1]))}return u}var to=new ve,pt=new ve,lr=new ve,sa=new ve,Ws=new ve;function nv(r,e){if(r){var t=r.getTextGuideLine(),i=r.getTextContent();if(i&&t){var n=r.textGuideLineConfig||{},o=[[0,0],[0,0],[0,0]],a=n.candidates||XI,s=i.getBoundingRect().clone();s.applyTransform(i.getComputedTransform());var l=1/0,u=n.anchor,f=r.getComputedTransform(),c=f&&mo([],f),p=e.get("length2")||0;u&&lr.copy(u);for(var h=0;h<a.length;h++){var d=a[h];jI(d,0,s,to,sa),ve.scaleAndAdd(pt,to,sa,p),pt.transform(c);var g=r.getBoundingRect(),v=u?u.distance(pt):r instanceof pe?$I(pt,r.path,lr):KI(pt,g,lr);v<l&&(l=v,pt.transform(f),lr.transform(f),lr.toArray(o[0]),pt.toArray(o[1]),to.toArray(o[2]))}QI(o,e.get("minTurnAngle")),t.setShape({points:o})}}}var tC=[],eo=new ve;function QI(r,e){if(e<=180&&e>0){e=e/180*Math.PI,to.fromArray(r[0]),pt.fromArray(r[1]),lr.fromArray(r[2]),ve.sub(sa,to,pt),ve.sub(Ws,lr,pt);var t=sa.len(),i=Ws.len();if(!(t<.001||i<.001)){sa.scale(1/t),Ws.scale(1/i);var n=sa.dot(Ws),o=Math.cos(e);if(o<n){var a=iv(pt.x,pt.y,lr.x,lr.y,to.x,to.y,tC,!1);eo.fromArray(tC),eo.scaleAndAdd(Ws,a/Math.tan(Math.PI-e));var s=lr.x!==pt.x?(eo.x-pt.x)/(lr.x-pt.x):(eo.y-pt.y)/(lr.y-pt.y);if(isNaN(s))return;s<0?ve.copy(eo,pt):s>1&&ve.copy(eo,lr),eo.toArray(r[1])}}}}function rv(r,e,t,i){var n=t==="normal",o=n?r:r.ensureState(t);o.ignore=e;var a=i.get("smooth");a&&a===!0&&(a=.3),o.shape=o.shape||{},a>0&&(o.shape.smooth=a);var s=i.getModel("lineStyle").getLineStyle();n?r.useStyle(s):o.style=s}function JI(r,e){var t=e.smooth,i=e.points;if(i)if(r.moveTo(i[0][0],i[0][1]),t>0&&i.length>=3){var n=xa(i[0],i[1]),o=xa(i[1],i[2]);if(!n||!o){r.lineTo(i[1][0],i[1][1]),r.lineTo(i[2][0],i[2][1]);return}var a=Math.min(n,o)*t,s=Dl([],i[1],i[0],a/n),l=Dl([],i[1],i[2],a/o),u=Dl([],s,l,.5);r.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),r.bezierCurveTo(l[0],l[1],l[0],l[1],i[2][0],i[2][1])}else for(var f=1;f<i.length;f++)r.lineTo(i[f][0],i[f][1])}function iC(r,e,t){var i=r.getTextGuideLine(),n=r.getTextContent();if(!n){i&&r.removeTextGuideLine();return}for(var o=e.normal,a=o.get("show"),s=n.ignore,l=0;l<fu.length;l++){var u=fu[l],f=e[u],c=u==="normal";if(f){var p=f.get("show"),h=c?s:te(n.states[u]&&n.states[u].ignore,s);if(h||!te(p,a)){var d=c?i:i&&i.states[u];d&&(d.ignore=!0),i&&rv(i,!0,u,f);continue}i||(i=new In,r.setTextGuideLine(i),!c&&(s||!a)&&rv(i,!0,"normal",e.normal),r.stateProxy&&(i.stateProxy=r.stateProxy)),rv(i,!1,u,f)}}if(i){ce(i.style,t),i.style.fill=null;var g=o.get("showAbove"),v=r.textGuideLineConfig=r.textGuideLineConfig||{};v.showAbove=g||!1,i.buildPath=JI}}function nC(r,e){e=e||"labelLine";for(var t={normal:r.getModel(e)},i=0;i<Li.length;i++){var n=Li[i];t[n]=r.getModel([n,e])}return t}function eA(r){if(r){for(var e=[],t=0;t<r.length;t++)e.push(r[t].slice());return e}}function tA(r,e){var t=r.label,i=e&&e.getTextGuideLine();return{dataIndex:r.dataIndex,dataType:r.dataType,seriesIndex:r.seriesModel.seriesIndex,text:r.label.style.text,rect:r.hostRect,labelRect:r.rect,align:t.style.align,verticalAlign:t.style.verticalAlign,labelLinePoints:eA(i&&i.shape.points)}}var oC=["align","verticalAlign","width","height","fontSize"],Bt=new cn,ov=ye(),rA=ye();function Zf(r,e,t){for(var i=0;i<t.length;i++){var n=t[i];e[n]!=null&&(r[n]=e[n])}}var Kf=["x","y","rotation"],iA=(function(){function r(){this._labelList=[],this._chartViewList=[]}return r.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},r.prototype._addLabel=function(e,t,i,n,o){var a=n.style,s=n.__hostTarget,l=s.textConfig||{},u=n.getComputedTransform(),f=n.getBoundingRect().plain();ue.applyTransform(f,f,u),u?Bt.setLocalTransform(u):(Bt.x=Bt.y=Bt.rotation=Bt.originX=Bt.originY=0,Bt.scaleX=Bt.scaleY=1),Bt.rotation=dr(Bt.rotation);var c=n.__hostTarget,p;if(c){p=c.getBoundingRect().plain();var h=c.getComputedTransform();ue.applyTransform(p,p,h)}var d=p&&c.getTextGuideLine();this._labelList.push({label:n,labelLine:d,seriesModel:i,dataIndex:e,dataType:t,layoutOption:o,computedLayoutOption:null,rect:f,hostRect:p,priority:p?p.width*p.height:0,defaultAttr:{ignore:n.ignore,labelGuideIgnore:d&&d.ignore,x:Bt.x,y:Bt.y,scaleX:Bt.scaleX,scaleY:Bt.scaleY,rotation:Bt.rotation,style:{x:a.x,y:a.y,align:a.align,verticalAlign:a.verticalAlign,width:a.width,height:a.height,fontSize:a.fontSize},cursor:n.cursor,attachedPos:l.position,attachedRot:l.rotation}})},r.prototype.addLabelsOfSeries=function(e){var t=this;this._chartViewList.push(e);var i=e.__model,n=i.get("labelLayout");(j(n)||me(n).length)&&e.group.traverse(function(o){if(o.ignore)return!0;var a=o.getTextContent(),s=Re(o);a&&!a.disableLabelLayout&&t._addLabel(s.dataIndex,s.dataType,i,a,n)})},r.prototype.updateLayoutConfig=function(e){var t=e.getWidth(),i=e.getHeight();function n(_,x){return function(){nv(_,x)}}for(var o=0;o<this._labelList.length;o++){var a=this._labelList[o],s=a.label,l=s.__hostTarget,u=a.defaultAttr,f=void 0;j(a.layoutOption)?f=a.layoutOption(tA(a,l)):f=a.layoutOption,f=f||{},a.computedLayoutOption=f;var c=Math.PI/180;l&&l.setTextConfig({local:!1,position:f.x!=null||f.y!=null?null:u.attachedPos,rotation:f.rotate!=null?f.rotate*c:u.attachedRot,offset:[f.dx||0,f.dy||0]});var p=!1;if(f.x!=null?(s.x=qe(f.x,t),s.setStyle("x",0),p=!0):(s.x=u.x,s.setStyle("x",u.style.x)),f.y!=null?(s.y=qe(f.y,i),s.setStyle("y",0),p=!0):(s.y=u.y,s.setStyle("y",u.style.y)),f.labelLinePoints){var h=l.getTextGuideLine();h&&(h.setShape({points:f.labelLinePoints}),p=!1)}var d=ov(s);d.needsUpdateLabelLine=p,s.rotation=f.rotate!=null?f.rotate*c:u.rotation,s.scaleX=u.scaleX,s.scaleY=u.scaleY;for(var g=0;g<oC.length;g++){var v=oC[g];s.setStyle(v,f[v]!=null?f[v]:u.style[v])}if(f.draggable){if(s.draggable=!0,s.cursor="move",l){var m=a.seriesModel;if(a.dataIndex!=null){var y=a.seriesModel.getData(a.dataType);m=y.getItemModel(a.dataIndex)}s.on("drag",n(l,m.getModel("labelLine")))}}else s.off("drag"),s.cursor=u.cursor}},r.prototype.layout=function(e){var t=e.getWidth(),i=e.getHeight(),n=nf(this._labelList),o=Ue(n,function(l){return l.layoutOption.moveOverlap==="shiftX"}),a=Ue(n,function(l){return l.layoutOption.moveOverlap==="shiftY"});ux(o,0,t),fx(a,0,i);var s=Ue(n,function(l){return l.layoutOption.hideOverlap});of(s)},r.prototype.processLabelsOverall=function(){var e=this;S(this._chartViewList,function(t){var i=t.__model,n=t.ignoreLabelLineUpdate,o=i.isAnimationEnabled();t.group.traverse(function(a){if(a.ignore&&!a.forceLabelAnimation)return!0;var s=!n,l=a.getTextContent();!s&&l&&(s=ov(l).needsUpdateLabelLine),s&&e._updateLabelLine(a,i),o&&e._animateLabels(a,i)})})},r.prototype._updateLabelLine=function(e,t){var i=e.getTextContent(),n=Re(e),o=n.dataIndex;if(i&&o!=null){var a=t.getData(n.dataType),s=a.getItemModel(o),l={},u=a.getItemVisual(o,"style");if(u){var f=a.getVisual("drawType");l.stroke=u[f]}var c=s.getModel("labelLine");iC(e,nC(s),l),nv(e,c)}},r.prototype._animateLabels=function(e,t){var i=e.getTextContent(),n=e.getTextGuideLine();if(i&&(e.forceLabelAnimation||!i.ignore&&!i.invisible&&!e.disableLabelAnimation&&!ui(e))){var o=ov(i),a=o.oldLayout,s=Re(e),l=s.dataIndex,u={x:i.x,y:i.y,rotation:i.rotation},f=t.getData(s.dataType);if(a){i.attr(a);var p=e.prevStates;p&&(he(p,"select")>=0&&i.attr(o.oldLayoutSelect),he(p,"emphasis")>=0&&i.attr(o.oldLayoutEmphasis)),yr(i,u,t,l)}else if(i.attr(u),!Xh(i).valueAnimation){var c=te(i.style.opacity,1);i.style.opacity=0,li(i,{style:{opacity:c}},t,l)}if(o.oldLayout=u,i.states.select){var h=o.oldLayoutSelect={};Zf(h,u,Kf),Zf(h,i.states.select,Kf)}if(i.states.emphasis){var d=o.oldLayoutEmphasis={};Zf(d,u,Kf),Zf(d,i.states.emphasis,Kf)}f_(i,l,f,t,t)}if(n&&!n.ignore&&!n.invisible){var o=rA(n),a=o.oldLayout,g={points:n.shape.points};a?(n.attr({shape:a}),yr(n,{shape:g},t)):(n.setShape(g),n.style.strokePercent=0,li(n,{style:{strokePercent:1}},t)),o.oldLayout=g}},r})(),aC=iA;var av=ye();function sC(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,i){var n=av(t).labelManager;n||(n=av(t).labelManager=new aC),n.clearLabels()}),r.registerUpdateLifecycle("series:layoutlabels",function(e,t,i){var n=av(t).labelManager;i.updatedSeries.forEach(function(o){n.addLabelsOfSeries(t.getViewOfSeriesModel(o))}),n.updateLayoutConfig(t),n.layout(t),n.processLabelsOverall()})}function lC(r,e,t){var i=tr.createCanvas(),n=e.getWidth(),o=e.getHeight(),a=i.style;return a&&(a.position="absolute",a.left="0",a.top="0",a.width=n+"px",a.height=o+"px",i.setAttribute("data-zr-dom-id",r)),i.width=n*t,i.height=o*t,i}var nA=(function(r){J(e,r);function e(t,i,n){var o=r.call(this)||this;o.motionBlur=!1,o.lastFrameAlpha=.7,o.dpr=1,o.virtual=!1,o.config={},o.incremental=!1,o.zlevel=0,o.maxRepaintRectCount=5,o.__dirty=!0,o.__firstTimePaint=!0,o.__used=!1,o.__drawIndex=0,o.__startIndex=0,o.__endIndex=0,o.__prevStartIndex=null,o.__prevEndIndex=null;var a;n=n||gn,typeof t=="string"?a=lC(t,i,n):F(t)&&(a=t,t=a.id),o.id=t,o.dom=a;var s=a.style;return s&&(Cl(a),a.onselectstart=function(){return!1},s.padding="0",s.margin="0",s.borderWidth="0"),o.painter=i,o.dpr=n,o}return e.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},e.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},e.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},e.prototype.setUnpainted=function(){this.__firstTimePaint=!0},e.prototype.createBackBuffer=function(){var t=this.dpr;this.domBack=lC("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),t!==1&&this.ctxBack.scale(t,t)},e.prototype.createRepaintRects=function(t,i,n,o){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var a=[],s=this.maxRepaintRectCount,l=!1,u=new ue(0,0,0,0);function f(y){if(!(!y.isFinite()||y.isZero()))if(a.length===0){var _=new ue(0,0,0,0);_.copy(y),a.push(_)}else{for(var x=!1,C=1/0,w=0,T=0;T<a.length;++T){var D=a[T];if(D.intersect(y)){var b=new ue(0,0,0,0);b.copy(D),b.union(y),a[T]=b,x=!0;break}else if(l){u.copy(y),u.union(D);var E=y.width*y.height,M=D.width*D.height,R=u.width*u.height,O=R-E-M;O<C&&(C=O,w=T)}}if(l&&(a[w].union(y),x=!0),!x){var _=new ue(0,0,0,0);_.copy(y),a.push(_)}l||(l=a.length>=s)}}for(var c=this.__startIndex;c<this.__endIndex;++c){var p=t[c];if(p){var h=p.shouldBePainted(n,o,!0,!0),d=p.__isRendered&&(p.__dirty&tt||!h)?p.getPrevPaintRect():null;d&&f(d);var g=h&&(p.__dirty&tt||!p.__isRendered)?p.getPaintRect():null;g&&f(g)}}for(var c=this.__prevStartIndex;c<this.__prevEndIndex;++c){var p=i[c],h=p&&p.shouldBePainted(n,o,!0,!0);if(p&&(!h||!p.__zr)&&p.__isRendered){var d=p.getPrevPaintRect();d&&f(d)}}var v;do{v=!1;for(var c=0;c<a.length;){if(a[c].isZero()){a.splice(c,1);continue}for(var m=c+1;m<a.length;)a[c].intersect(a[m])?(v=!0,a[c].union(a[m]),a.splice(m,1)):m++;c++}}while(v);return this._paintRects=a,a},e.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},e.prototype.resize=function(t,i){var n=this.dpr,o=this.dom,a=o.style,s=this.domBack;a&&(a.width=t+"px",a.height=i+"px"),o.width=t*n,o.height=i*n,s&&(s.width=t*n,s.height=i*n,n!==1&&this.ctxBack.scale(n,n))},e.prototype.clear=function(t,i,n){var o=this.dom,a=this.ctx,s=o.width,l=o.height;i=i||this.clearColor;var u=this.motionBlur&&!t,f=this.lastFrameAlpha,c=this.dpr,p=this;u&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(o,0,0,s/c,l/c));var h=this.domBack;function d(g,v,m,y){if(a.clearRect(g,v,m,y),i&&i!=="transparent"){var _=void 0;if(_i(i)){var x=i.global||i.__width===m&&i.__height===y;_=x&&i.__canvasGradient||Ts(a,i,{x:0,y:0,width:m,height:y}),i.__canvasGradient=_,i.__width=m,i.__height=y}else gg(i)&&(i.scaleX=i.scaleX||c,i.scaleY=i.scaleY||c,_=Lf(a,i,{dirty:function(){p.setUnpainted(),p.painter.refresh()}}));a.save(),a.fillStyle=_||i,a.fillRect(g,v,m,y),a.restore()}u&&(a.save(),a.globalAlpha=f,a.drawImage(h,g,v,m,y),a.restore())}!n||u?d(0,0,s,l):n.length&&S(n,function(g){d(g.x*c,g.y*c,g.width*c,g.height*c)})},e})(St),$f=nA;var uC=1e5,ro=314159,Qf=.01,oA=.001;function aA(r){return r?r.__builtin__?!0:!(typeof r.resize!="function"||typeof r.refresh!="function"):!1}function sA(r,e){var t=document.createElement("div");return t.style.cssText=["position:relative","width:"+r+"px","height:"+e+"px","padding:0","margin:0","border-width:0"].join(";")+";",t}var lA=(function(){function r(e,t,i,n){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var o=!e.nodeName||e.nodeName.toUpperCase()==="CANVAS";this._opts=i=P({},i||{}),this.dpr=i.devicePixelRatio||gn,this._singleCanvas=o,this.root=e;var a=e.style;a&&(Cl(e),e.innerHTML=""),this.storage=t;var s=this._zlevelList;this._prevDisplayList=[];var l=this._layers;if(o){var f=e,c=f.width,p=f.height;i.width!=null&&(c=i.width),i.height!=null&&(p=i.height),this.dpr=i.devicePixelRatio||1,f.width=c*this.dpr,f.height=p*this.dpr,this._width=c,this._height=p;var h=new $f(f,this,this.dpr);h.__builtin__=!0,h.initContext(),l[ro]=h,h.zlevel=ro,s.push(ro),this._domRoot=e}else{this._width=bs(e,0,i),this._height=bs(e,1,i);var u=this._domRoot=sA(this._width,this._height);e.appendChild(u)}}return r.prototype.getType=function(){return"canvas"},r.prototype.isSingleCanvas=function(){return this._singleCanvas},r.prototype.getViewportRoot=function(){return this._domRoot},r.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},r.prototype.refresh=function(e){var t=this.storage.getDisplayList(!0),i=this._prevDisplayList,n=this._zlevelList;this._redrawId=Math.random(),this._paintList(t,i,e,this._redrawId);for(var o=0;o<n.length;o++){var a=n[o],s=this._layers[a];if(!s.__builtin__&&s.refresh){var l=o===0?this._backgroundColor:null;s.refresh(l)}}return this._opts.useDirtyRect&&(this._prevDisplayList=t.slice()),this},r.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},r.prototype._paintHoverList=function(e){var t=e.length,i=this._hoverlayer;if(i&&i.clear(),!!t){for(var n={inHover:!0,viewWidth:this._width,viewHeight:this._height},o,a=0;a<t;a++){var s=e[a];s.__inHover&&(i||(i=this._hoverlayer=this.getLayer(uC)),o||(o=i.ctx,o.save()),Yi(o,s,n,a===t-1))}o&&o.restore()}},r.prototype.getHoverLayer=function(){return this.getLayer(uC)},r.prototype.paintOne=function(e,t){Nf(e,t)},r.prototype._paintList=function(e,t,i,n){if(this._redrawId===n){i=i||!1,this._updateLayerStatus(e);var o=this._doPaintList(e,t,i),a=o.finished,s=o.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),s&&this._paintHoverList(e),a)this.eachLayer(function(u){u.afterBrush&&u.afterBrush()});else{var l=this;ds(function(){l._paintList(e,t,i,n)})}}},r.prototype._compositeManually=function(){var e=this.getLayer(ro).ctx,t=this._domRoot.width,i=this._domRoot.height;e.clearRect(0,0,t,i),this.eachBuiltinLayer(function(n){n.virtual&&e.drawImage(n.dom,0,0,t,i)})},r.prototype._doPaintList=function(e,t,i){for(var n=this,o=[],a=this._opts.useDirtyRect,s=0;s<this._zlevelList.length;s++){var l=this._zlevelList[s],u=this._layers[l];u.__builtin__&&u!==this._hoverlayer&&(u.__dirty||i)&&o.push(u)}for(var f=!0,c=!1,p=function(g){var v=o[g],m=v.ctx,y=a&&v.createRepaintRects(e,t,h._width,h._height),_=i?v.__startIndex:v.__drawIndex,x=!i&&v.incremental&&Date.now,C=x&&Date.now(),w=v.zlevel===h._zlevelList[0]?h._backgroundColor:null;if(v.__startIndex===v.__endIndex)v.clear(!1,w,y);else if(_===v.__startIndex){var T=e[_];(!T.incremental||!T.notClear||i)&&v.clear(!1,w,y)}_===-1&&(console.error("For some unknown reason. drawIndex is -1"),_=v.__startIndex);var D,b=function(O){var I={inHover:!1,allClipped:!1,prevEl:null,viewWidth:n._width,viewHeight:n._height};for(D=_;D<v.__endIndex;D++){var W=e[D];if(W.__inHover&&(c=!0),n._doPaintEl(W,v,a,O,I,D===v.__endIndex-1),x){var U=Date.now()-C;if(U>15)break}}I.prevElClipPaths&&m.restore()};if(y)if(y.length===0)D=v.__endIndex;else for(var E=h.dpr,M=0;M<y.length;++M){var R=y[M];m.save(),m.beginPath(),m.rect(R.x*E,R.y*E,R.width*E,R.height*E),m.clip(),b(R),m.restore()}else m.save(),b(),m.restore();v.__drawIndex=D,v.__drawIndex<v.__endIndex&&(f=!1)},h=this,d=0;d<o.length;d++)p(d);return Q.wxa&&S(this._layers,function(g){g&&g.ctx&&g.ctx.draw&&g.ctx.draw()}),{finished:f,needsRefreshHover:c}},r.prototype._doPaintEl=function(e,t,i,n,o,a){var s=t.ctx;if(i){var l=e.getPaintRect();(!n||l&&l.intersect(n))&&(Yi(s,e,o,a),e.setPrevPaintRect(l))}else Yi(s,e,o,a)},r.prototype.getLayer=function(e,t){this._singleCanvas&&!this._needsManuallyCompositing&&(e=ro);var i=this._layers[e];return i||(i=new $f("zr_"+e,this,this.dpr),i.zlevel=e,i.__builtin__=!0,this._layerConfig[e]?Ee(i,this._layerConfig[e],!0):this._layerConfig[e-Qf]&&Ee(i,this._layerConfig[e-Qf],!0),t&&(i.virtual=t),this.insertLayer(e,i),i.initContext()),i},r.prototype.insertLayer=function(e,t){var i=this._layers,n=this._zlevelList,o=n.length,a=this._domRoot,s=null,l=-1;if(!i[e]&&aA(t)){if(o>0&&e>n[0]){for(l=0;l<o-1&&!(n[l]<e&&n[l+1]>e);l++);s=i[n[l]]}if(n.splice(l+1,0,e),i[e]=t,!t.virtual)if(s){var u=s.dom;u.nextSibling?a.insertBefore(t.dom,u.nextSibling):a.appendChild(t.dom)}else a.firstChild?a.insertBefore(t.dom,a.firstChild):a.appendChild(t.dom);t.painter||(t.painter=this)}},r.prototype.eachLayer=function(e,t){for(var i=this._zlevelList,n=0;n<i.length;n++){var o=i[n];e.call(t,this._layers[o],o)}},r.prototype.eachBuiltinLayer=function(e,t){for(var i=this._zlevelList,n=0;n<i.length;n++){var o=i[n],a=this._layers[o];a.__builtin__&&e.call(t,a,o)}},r.prototype.eachOtherLayer=function(e,t){for(var i=this._zlevelList,n=0;n<i.length;n++){var o=i[n],a=this._layers[o];a.__builtin__||e.call(t,a,o)}},r.prototype.getLayers=function(){return this._layers},r.prototype._updateLayerStatus=function(e){this.eachBuiltinLayer(function(c,p){c.__dirty=c.__used=!1});function t(c){o&&(o.__endIndex!==c&&(o.__dirty=!0),o.__endIndex=c)}if(this._singleCanvas)for(var i=1;i<e.length;i++){var n=e[i];if(n.zlevel!==e[i-1].zlevel||n.incremental){this._needsManuallyCompositing=!0;break}}var o=null,a=0,s,l;for(l=0;l<e.length;l++){var n=e[l],u=n.zlevel,f=void 0;s!==u&&(s=u,a=0),n.incremental?(f=this.getLayer(u+oA,this._needsManuallyCompositing),f.incremental=!0,a=1):f=this.getLayer(u+(a>0?Qf:0),this._needsManuallyCompositing),f.__builtin__||co("ZLevel "+u+" has been used by unkown layer "+f.id),f!==o&&(f.__used=!0,f.__startIndex!==l&&(f.__dirty=!0),f.__startIndex=l,f.incremental?f.__drawIndex=-1:f.__drawIndex=l,t(l),o=f),n.__dirty&tt&&!n.__inHover&&(f.__dirty=!0,f.incremental&&f.__drawIndex<0&&(f.__drawIndex=l))}t(l),this.eachBuiltinLayer(function(c,p){!c.__used&&c.getElementCount()>0&&(c.__dirty=!0,c.__startIndex=c.__endIndex=c.__drawIndex=0),c.__dirty&&c.__drawIndex<0&&(c.__drawIndex=c.__startIndex)})},r.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},r.prototype._clearLayer=function(e){e.clear()},r.prototype.setBackgroundColor=function(e){this._backgroundColor=e,S(this._layers,function(t){t.setUnpainted()})},r.prototype.configLayer=function(e,t){if(t){var i=this._layerConfig;i[e]?Ee(i[e],t,!0):i[e]=t;for(var n=0;n<this._zlevelList.length;n++){var o=this._zlevelList[n];if(o===e||o===e+Qf){var a=this._layers[o];Ee(a,i[e],!0)}}}},r.prototype.delLayer=function(e){var t=this._layers,i=this._zlevelList,n=t[e];n&&(n.dom.parentNode.removeChild(n.dom),delete t[e],i.splice(he(i,e),1))},r.prototype.resize=function(e,t){if(this._domRoot.style){var i=this._domRoot;i.style.display="none";var n=this._opts,o=this.root;if(e!=null&&(n.width=e),t!=null&&(n.height=t),e=bs(o,0,n),t=bs(o,1,n),i.style.display="",this._width!==e||t!==this._height){i.style.width=e+"px",i.style.height=t+"px";for(var a in this._layers)this._layers.hasOwnProperty(a)&&this._layers[a].resize(e,t);this.refresh(!0)}this._width=e,this._height=t}else{if(e==null||t==null)return;this._width=e,this._height=t,this.getLayer(ro).resize(e,t)}return this},r.prototype.clearLayer=function(e){var t=this._layers[e];t&&t.clear()},r.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},r.prototype.getRenderedCanvas=function(e){if(e=e||{},this._singleCanvas&&!this._compositeManually)return this._layers[ro].dom;var t=new $f("image",this,e.pixelRatio||this.dpr);t.initContext(),t.clear(!1,e.backgroundColor||this._backgroundColor);var i=t.ctx;if(e.pixelRatio<=this.dpr){this.refresh();var n=t.dom.width,o=t.dom.height;this.eachLayer(function(c){c.__builtin__?i.drawImage(c.dom,0,0,n,o):c.renderToCanvas&&(i.save(),c.renderToCanvas(i),i.restore())})}else for(var a={inHover:!1,viewWidth:this._width,viewHeight:this._height},s=this.storage.getDisplayList(!0),l=0,u=s.length;l<u;l++){var f=s[l];Yi(i,f,a,l===u-1)}return t.dom},r.prototype.getWidth=function(){return this._width},r.prototype.getHeight=function(){return this._height},r})(),fC=lA;function Us(r){r.registerPainter("canvas",fC)}di([Us,Z1]);di(sC);J1({type:"series.wordCloud",visualStyleAccessPath:"textStyle",visualStyleMapper:function(r){return{fill:r.get("color")}},visualDrawType:"fill",optionUpdated:function(){var r=this.option;r.gridSize=Math.max(Math.floor(r.gridSize),4)},getInitialData:function(r,e){var t=Or.createDimensions(r.data,{coordDimensions:["value"]}),i=new Fs(t,this);return i.initData(r.data),i},defaultOption:{maskImage:null,shape:"circle",keepAspect:!1,left:"center",top:"center",width:"70%",height:"80%",sizeRange:[12,60],rotationRange:[-90,90],rotationStep:45,gridSize:8,drawOutOfBound:!1,shrinkToFit:!1,textStyle:{fontWeight:"normal"}}});eC({type:"wordCloud",render:function(r,e,t){var i=this.group;i.removeAll();var n=r.getData(),o=r.get("gridSize");r.layoutInstance.ondraw=function(a,s,l,u){var f=n.getItemModel(l),c=f.getModel("textStyle"),p=new Xf.Text({style:Or.createTextStyle(c),scaleX:1/u.info.mu,scaleY:1/u.info.mu,x:(u.gx+u.info.gw/2)*o,y:(u.gy+u.info.gh/2)*o,rotation:u.rot});p.setStyle({x:u.info.fillTextOffsetX,y:u.info.fillTextOffsetY+s*.5,text:a,verticalAlign:"middle",fill:n.getItemVisual(l,"style").fill,fontSize:s}),i.add(p),n.setItemGraphicEl(l,p),p.ensureState("emphasis").style=Or.createTextStyle(f.getModel(["emphasis","textStyle"]),{state:"emphasis"}),p.ensureState("blur").style=Or.createTextStyle(f.getModel(["blur","textStyle"]),{state:"blur"}),Or.enableHoverEmphasis(p,f.get(["emphasis","focus"]),f.get(["emphasis","blurScope"])),p.stateTransition={duration:r.get("animation")?r.get(["stateAnimation","duration"]):0,easing:r.get(["stateAnimation","easing"])},p.__highDownDispatcher=!0},this._model=r},remove:function(){this.group.removeAll(),this._model.layoutInstance.dispose()},dispose:function(){this._model.layoutInstance.dispose()}});window.setImmediate||(window.setImmediate=(function(){return window.msSetImmediate||window.webkitSetImmediate||window.mozSetImmediate||window.oSetImmediate||(function(){if(!window.postMessage||!window.addEventListener)return null;var t=[void 0],i="zero-timeout-message",n=function(a){var s=t.length;return t.push(a),window.postMessage(i+s.toString(36),"*"),s};return window.addEventListener("message",function(a){if(!(typeof a.data!="string"||a.data.substr(0,i.length)!==i)){a.stopImmediatePropagation();var s=parseInt(a.data.substr(i.length),36);t[s]&&(t[s](),t[s]=void 0)}},!0),window.clearImmediate=function(a){t[a]&&(t[a]=void 0)},n})()||function(t){window.setTimeout(t,0)}})());window.clearImmediate||(window.clearImmediate=(function(){return window.msClearImmediate||window.webkitClearImmediate||window.mozClearImmediate||window.oClearImmediate||function(t){window.clearTimeout(t)}})());var uv=(function(){var e=document.createElement("canvas");if(!e||!e.getContext)return!1;var t=e.getContext("2d");return!(!t||!t.getImageData||!t.fillText||!Array.prototype.some||!Array.prototype.push)})(),lv=(function(){if(uv){for(var e=document.createElement("canvas").getContext("2d"),t=20,i,n;t;){if(e.font=t.toString(10)+"px sans-serif",e.measureText("\uFF37").width===i&&e.measureText("m").width===n)return t+1;i=e.measureText("\uFF37").width,n=e.measureText("m").width,t--}return 0}})(),uA=function(r){if(Array.isArray(r)){var e=r.slice();return e.splice(0,2),e}else return[]},fA=function(e){for(var t,i,n=e.length;n;)t=Math.floor(Math.random()*n),i=e[--n],e[n]=e[t],e[t]=i;return e},la={},fv=function(e,t){if(!uv)return;var i=Math.floor(Math.random()*Date.now());Array.isArray(e)||(e=[e]),e.forEach(function(ne,A){if(typeof ne=="string"){if(e[A]=document.getElementById(ne),!e[A])throw new Error("The element id specified is not found.")}else if(!ne.tagName&&!ne.appendChild)throw new Error("You must pass valid HTML elements, or ID of the element.")});var n={list:[],fontFamily:'"Trebuchet MS", "Heiti TC", "\u5FAE\u8EDF\u6B63\u9ED1\u9AD4", "Arial Unicode MS", "Droid Fallback Sans", sans-serif',fontWeight:"normal",color:"random-dark",minSize:0,weightFactor:1,clearCanvas:!0,backgroundColor:"#fff",gridSize:8,drawOutOfBound:!1,shrinkToFit:!1,origin:null,drawMask:!1,maskColor:"rgba(255,0,0,0.3)",maskGapWidth:.3,layoutAnimation:!0,wait:0,abortThreshold:0,abort:function(){},minRotation:-Math.PI/2,maxRotation:Math.PI/2,rotationStep:.1,shuffle:!0,rotateRatio:.1,shape:"circle",ellipticity:.65,classes:null,hover:null,click:null};if(t)for(var o in t)o in n&&(n[o]=t[o]);if(typeof n.weightFactor!="function"){var a=n.weightFactor;n.weightFactor=function(A){return A*a}}if(typeof n.shape!="function")switch(n.shape){case"circle":default:n.shape="circle";break;case"cardioid":n.shape=function(A){return 1-Math.sin(A)};break;case"diamond":n.shape=function(A){var H=A%(2*Math.PI/4);return 1/(Math.cos(H)+Math.sin(H))};break;case"square":n.shape=function(A){return Math.min(1/Math.abs(Math.cos(A)),1/Math.abs(Math.sin(A)))};break;case"triangle-forward":n.shape=function(A){var H=A%(2*Math.PI/3);return 1/(Math.cos(H)+Math.sqrt(3)*Math.sin(H))};break;case"triangle":case"triangle-upright":n.shape=function(A){var H=(A+Math.PI*3/2)%(2*Math.PI/3);return 1/(Math.cos(H)+Math.sqrt(3)*Math.sin(H))};break;case"pentagon":n.shape=function(A){var H=(A+.955)%(2*Math.PI/5);return 1/(Math.cos(H)+.726543*Math.sin(H))};break;case"star":n.shape=function(A){var H=(A+.955)%(2*Math.PI/10);return(A+.955)%(2*Math.PI/5)-2*Math.PI/10>=0?1/(Math.cos(2*Math.PI/10-H)+3.07768*Math.sin(2*Math.PI/10-H)):1/(Math.cos(H)+3.07768*Math.sin(H))};break}n.gridSize=Math.max(Math.floor(n.gridSize),4);var s=n.gridSize,l=s-n.maskGapWidth,u=Math.abs(n.maxRotation-n.minRotation),f=Math.min(n.maxRotation,n.minRotation),c=n.rotationStep,p,h,d,g,v,m,y;function _(ne,A){return"hsl("+(Math.random()*360).toFixed()+","+(Math.random()*30+70).toFixed()+"%,"+(Math.random()*(A-ne)+ne).toFixed()+"%)"}switch(n.color){case"random-dark":y=function(){return _(10,50)};break;case"random-light":y=function(){return _(50,90)};break;default:typeof n.color=="function"&&(y=n.color);break}var x;typeof n.fontWeight=="function"&&(x=n.fontWeight);var C=null;typeof n.classes=="function"&&(C=n.classes);var w=!1,T=[],D,b=function(A){var H=A.currentTarget,V=H.getBoundingClientRect(),se,K;A.touches?(se=A.touches[0].clientX,K=A.touches[0].clientY):(se=A.clientX,K=A.clientY);var oe=se-V.left,k=K-V.top,G=Math.floor(oe*(H.width/V.width||1)/s),Oe=Math.floor(k*(H.height/V.height||1)/s);return T[G]?T[G][Oe]:null},E=function(A){var H=b(A);if(D!==H){if(D=H,!H){n.hover(void 0,void 0,A);return}n.hover(H.item,H.dimension,A)}},M=function(A){var H=b(A);H&&(n.click(H.item,H.dimension,A),A.preventDefault())},R=[],O=function(A){if(R[A])return R[A];var H=A*8,V=H,se=[];for(A===0&&se.push([g[0],g[1],0]);V--;){var K=1;n.shape!=="circle"&&(K=n.shape(V/H*2*Math.PI)),se.push([g[0]+A*K*Math.cos(-V/H*2*Math.PI),g[1]+A*K*Math.sin(-V/H*2*Math.PI)*n.ellipticity,V/H*2*Math.PI])}return R[A]=se,se},I=function(){return n.abortThreshold>0&&new Date().getTime()-m>n.abortThreshold},W=function(){return n.rotateRatio===0||Math.random()>n.rotateRatio?0:u===0?f:f+Math.round(Math.random()*u/c)*c},U=function(A,H,V,se){var K=!1,oe=n.weightFactor(H);if(oe<=n.minSize)return!1;var k=1;oe<lv&&(k=(function(){for(var nc=2;nc*oe<lv;)nc+=2;return nc})());var G;x?G=x(A,H,oe,se):G=n.fontWeight;var Oe=document.createElement("canvas"),ee=Oe.getContext("2d",{willReadFrequently:!0});ee.font=G+" "+(oe*k).toString(10)+"px "+n.fontFamily;var Pe=ee.measureText(A).width/k,Ie=Math.max(oe*k,ee.measureText("m").width,ee.measureText("\uFF37").width)/k,$e=Pe+Ie*2,at=Ie*3,Qt=Math.ceil($e/s),Qe=Math.ceil(at/s);$e=Qt*s,at=Qe*s;var Te=-Pe/2,Ge=-Ie*.4,Je=Math.ceil(($e*Math.abs(Math.sin(V))+at*Math.abs(Math.cos(V)))/s),Jt=Math.ceil(($e*Math.abs(Math.cos(V))+at*Math.abs(Math.sin(V)))/s),Ki=Jt*s,io=Je*s;Oe.setAttribute("width",Ki),Oe.setAttribute("height",io),K&&(document.body.appendChild(Oe),ee.save()),ee.scale(1/k,1/k),ee.translate(Ki*k/2,io*k/2),ee.rotate(-V),ee.font=G+" "+(oe*k).toString(10)+"px "+n.fontFamily,ee.fillStyle="#000",ee.textBaseline="middle",ee.fillText(A,Te*k,(Ge+oe*.5)*k);var xC=ee.getImageData(0,0,Ki,io).data;if(I())return!1;K&&(ee.strokeRect(Te*k,Ge,Pe*k,Ie*k),ee.restore());for(var gv=[],Xr=Jt,Ar,rc,ic,Pt=[Je/2,Jt/2,Je/2,Jt/2];Xr--;)for(Ar=Je;Ar--;){ic=s;e:for(;ic--;)for(rc=s;rc--;)if(xC[((Ar*s+ic)*Ki+(Xr*s+rc))*4+3]){gv.push([Xr,Ar]),Xr<Pt[3]&&(Pt[3]=Xr),Xr>Pt[1]&&(Pt[1]=Xr),Ar<Pt[0]&&(Pt[0]=Ar),Ar>Pt[2]&&(Pt[2]=Ar),K&&(ee.fillStyle="rgba(255, 0, 0, 0.5)",ee.fillRect(Xr*s,Ar*s,s-.5,s-.5));break e}K&&(ee.fillStyle="rgba(0, 0, 255, 0.5)",ee.fillRect(Xr*s,Ar*s,s-.5,s-.5))}return K&&(ee.fillStyle="rgba(0, 255, 0, 0.5)",ee.fillRect(Pt[3]*s,Pt[0]*s,(Pt[1]-Pt[3]+1)*s,(Pt[2]-Pt[0]+1)*s)),{mu:k,occupied:gv,bounds:Pt,gw:Jt,gh:Je,fillTextOffsetX:Te,fillTextOffsetY:Ge,fillTextWidth:Pe,fillTextHeight:Ie,fontSize:oe}},de=function(A,H,V,se,K){for(var oe=K.length;oe--;){var k=A+K[oe][0],G=H+K[oe][1];if(k>=h||G>=d||k<0||G<0){if(!n.drawOutOfBound)return!1;continue}if(!p[k][G])return!1}return!0},fe=function(A,H,V,se,K,oe,k,G,Oe,ee){var Pe=V.fontSize,Ie;y?Ie=y(se,K,Pe,oe,k,ee):Ie=n.color;var $e;x?$e=x(se,K,Pe,ee):$e=n.fontWeight;var at;C?at=C(se,K,Pe,ee):at=n.classes,e.forEach(function(Qt){if(Qt.getContext){var Qe=Qt.getContext("2d"),Te=V.mu;Qe.save(),Qe.scale(1/Te,1/Te),Qe.font=$e+" "+(Pe*Te).toString(10)+"px "+n.fontFamily,Qe.fillStyle=Ie,Qe.translate((A+V.gw/2)*s*Te,(H+V.gh/2)*s*Te),G!==0&&Qe.rotate(-G),Qe.textBaseline="middle",Qe.fillText(se,V.fillTextOffsetX*Te,(V.fillTextOffsetY+Pe*.5)*Te),Qe.restore()}else{var Ge=document.createElement("span"),Je="";Je="rotate("+-G/Math.PI*180+"deg) ",V.mu!==1&&(Je+="translateX(-"+V.fillTextWidth/4+"px) scale("+1/V.mu+")");var Jt={position:"absolute",display:"block",font:$e+" "+Pe*V.mu+"px "+n.fontFamily,left:(A+V.gw/2)*s+V.fillTextOffsetX+"px",top:(H+V.gh/2)*s+V.fillTextOffsetY+"px",width:V.fillTextWidth+"px",height:V.fillTextHeight+"px",lineHeight:Pe+"px",whiteSpace:"nowrap",transform:Je,webkitTransform:Je,msTransform:Je,transformOrigin:"50% 40%",webkitTransformOrigin:"50% 40%",msTransformOrigin:"50% 40%"};Ie&&(Jt.color=Ie),Ge.textContent=se;for(var Ki in Jt)Ge.style[Ki]=Jt[Ki];if(Oe)for(var io in Oe)Ge.setAttribute(io,Oe[io]);at&&(Ge.className+=at),Qt.appendChild(Ge)}})},ae=function(A,H,V,se,K){if(!(A>=h||H>=d||A<0||H<0)){if(p[A][H]=!1,V){var oe=e[0].getContext("2d");oe.fillRect(A*s,H*s,l,l)}w&&(T[A][H]={item:K,dimension:se})}},Me=function(A,H,V,se,K,oe){var k=K.occupied,G=n.drawMask,Oe;G&&(Oe=e[0].getContext("2d"),Oe.save(),Oe.fillStyle=n.maskColor);var ee;if(w){var Pe=K.bounds;ee={x:(A+Pe[3])*s,y:(H+Pe[0])*s,w:(Pe[1]-Pe[3]+1)*s,h:(Pe[2]-Pe[0]+1)*s}}for(var Ie=k.length;Ie--;){var $e=A+k[Ie][0],at=H+k[Ie][1];$e>=h||at>=d||$e<0||at<0||ae($e,at,G,ee,oe)}G&&Oe.restore()},Ve=function ne(A,H){if(H>20)return null;var V,se,K;Array.isArray(A)?(V=A[0],se=A[1]):(V=A.word,se=A.weight,K=A.attributes);var oe=W(),k=uA(A),G=U(V,se,oe,k);if(!G||I())return!1;if(!n.drawOutOfBound&&!n.shrinkToFit){var Oe=G.bounds;if(Oe[1]-Oe[3]+1>h||Oe[2]-Oe[0]+1>d)return!1}for(var ee=v+1,Pe=function(Qt){var Qe=Math.floor(Qt[0]-G.gw/2),Te=Math.floor(Qt[1]-G.gh/2),Ge=G.gw,Je=G.gh;return de(Qe,Te,Ge,Je,G.occupied)?(fe(Qe,Te,G,V,se,v-ee,Qt[2],oe,K,k),Me(Qe,Te,Ge,Je,G,A),{gx:Qe,gy:Te,rot:oe,info:G}):!1};ee--;){var Ie=O(v-ee);n.shuffle&&(Ie=[].concat(Ie),fA(Ie));for(var $e=0;$e<Ie.length;$e++){var at=Pe(Ie[$e]);if(at)return at}}return n.shrinkToFit?(Array.isArray(A)?A[1]=A[1]*3/4:A.weight=A.weight*3/4,ne(A,H+1)):null},Ae=function(A,H,V){if(H)return!e.some(function(se){var K=new CustomEvent(A,{cancelable:!0,detail:V||{}});return!se.dispatchEvent(K)},this);e.forEach(function(se){var K=new CustomEvent(A,{detail:V||{}});se.dispatchEvent(K)},this)},At=function(){var A=e[0];if(A.getContext)h=Math.ceil(A.width/s),d=Math.ceil(A.height/s);else{var H=A.getBoundingClientRect();h=Math.ceil(H.width/s),d=Math.ceil(H.height/s)}if(Ae("wordcloudstart",!0)){g=n.origin?[n.origin[0]/s,n.origin[1]/s]:[h/2,d/2],v=Math.floor(Math.sqrt(h*h+d*d)),p=[];var V,se,K;if(!A.getContext||n.clearCanvas)for(e.forEach(function(Te){if(Te.getContext){var Ge=Te.getContext("2d");Ge.fillStyle=n.backgroundColor,Ge.clearRect(0,0,h*(s+1),d*(s+1)),Ge.fillRect(0,0,h*(s+1),d*(s+1))}else Te.textContent="",Te.style.backgroundColor=n.backgroundColor,Te.style.position="relative"}),V=h;V--;)for(p[V]=[],se=d;se--;)p[V][se]=!0;else{var oe=document.createElement("canvas").getContext("2d");oe.fillStyle=n.backgroundColor,oe.fillRect(0,0,1,1);var k=oe.getImageData(0,0,1,1).data,G=A.getContext("2d").getImageData(0,0,h*s,d*s).data;V=h;for(var Oe,ee;V--;)for(p[V]=[],se=d;se--;){ee=s;e:for(;ee--;)for(Oe=s;Oe--;)for(K=4;K--;)if(G[((se*s+ee)*h*s+(V*s+Oe))*4+K]!==k[K]){p[V][se]=!1;break e}p[V][se]!==!1&&(p[V][se]=!0)}G=oe=k=void 0}if(n.hover||n.click){for(w=!0,V=h+1;V--;)T[V]=[];n.hover&&A.addEventListener("mousemove",E),n.click&&(A.addEventListener("click",M),A.addEventListener("touchstart",M),A.addEventListener("touchend",function(Te){Te.preventDefault()}),A.style.webkitTapHighlightColor="rgba(0, 0, 0, 0)"),A.addEventListener("wordcloudstart",function Te(){A.removeEventListener("wordcloudstart",Te),A.removeEventListener("mousemove",E),A.removeEventListener("click",M),D=void 0})}K=0;var Pe,Ie,$e=!0;n.layoutAnimation?n.wait!==0?(Pe=window.setTimeout,Ie=window.clearTimeout):(Pe=window.setImmediate,Ie=window.clearImmediate):(Pe=function(Te){Te()},Ie=function(){$e=!1});var at=function(Ge,Je){e.forEach(function(Jt){Jt.addEventListener(Ge,Je)},this)},Qt=function(Ge,Je){e.forEach(function(Jt){Jt.removeEventListener(Ge,Je)},this)},Qe=function Te(){Qt("wordcloudstart",Te),Ie(la[i])};at("wordcloudstart",Qe),la[i]=(n.layoutAnimation?Pe:setTimeout)(function Te(){if($e){if(K>=n.list.length){Ie(la[i]),Ae("wordcloudstop",!1),Qt("wordcloudstart",Qe),delete la[i];return}m=new Date().getTime();var Ge=Ve(n.list[K],0),Je=!Ae("wordclouddrawn",!0,{item:n.list[K],drawn:Ge});if(I()||Je){Ie(la[i]),n.abort(),Ae("wordcloudabort",!1),Ae("wordcloudstop",!1),Qt("wordcloudstart",Qe);return}K++,la[i]=Pe(Te,n.wait)}},n.wait)}};At()};fv.isSupported=uv;fv.minFontSize=lv;var cv=fv;if(!cv.isSupported)throw new Error("Sorry your browser not support wordCloud");function cA(r){for(var e=r.getContext("2d"),t=e.getImageData(0,0,r.width,r.height),i=e.createImageData(t),n=0,o=0,a=0;a<t.data.length;a+=4){var s=t.data[a+3];if(s>128){var l=t.data[a]+t.data[a+1]+t.data[a+2];n+=l,++o}}for(var u=n/o,a=0;a<t.data.length;a+=4){var l=t.data[a]+t.data[a+1]+t.data[a+2],s=t.data[a+3];s<128||l>u?(i.data[a]=0,i.data[a+1]=0,i.data[a+2]=0,i.data[a+3]=0):(i.data[a]=255,i.data[a+1]=255,i.data[a+2]=255,i.data[a+3]=255)}e.putImageData(i,0,0)}Hf(function(r,e){r.eachSeriesByType("wordCloud",function(t){var i=Or.getLayoutRect(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),n=t.get("keepAspect"),o=t.get("maskImage"),a=o?o.width/o.height:1;n&&hA(i,a);var s=t.getData(),l=document.createElement("canvas");l.width=i.width,l.height=i.height;var u=l.getContext("2d");if(o)try{u.drawImage(o,0,0,l.width,l.height),cA(l)}catch(y){console.error("Invalid mask image"),console.error(y.toString())}var f=t.get("sizeRange"),c=t.get("rotationRange"),p=s.getDataExtent("value"),h=Math.PI/180,d=t.get("gridSize");cv(l,{list:s.mapArray("value",function(y,_){var x=s.getItemModel(_);return[s.getName(_),x.get("textStyle.fontSize",!0)||qf.linearMap(y,p,f),_]}).sort(function(y,_){return _[1]-y[1]}),fontFamily:t.get("textStyle.fontFamily")||t.get("emphasis.textStyle.fontFamily")||r.get("textStyle.fontFamily"),fontWeight:t.get("textStyle.fontWeight")||t.get("emphasis.textStyle.fontWeight")||r.get("textStyle.fontWeight"),gridSize:d,ellipticity:i.height/i.width,minRotation:c[0]*h,maxRotation:c[1]*h,clearCanvas:!o,rotateRatio:1,rotationStep:t.get("rotationStep")*h,drawOutOfBound:t.get("drawOutOfBound"),shrinkToFit:t.get("shrinkToFit"),layoutAnimation:t.get("layoutAnimation"),shuffle:!1,shape:t.get("shape")});function g(y){var _=y.detail.item;y.detail.drawn&&t.layoutInstance.ondraw&&(y.detail.drawn.gx+=i.x/d,y.detail.drawn.gy+=i.y/d,t.layoutInstance.ondraw(_[0],_[1],_[2],y.detail.drawn))}l.addEventListener("wordclouddrawn",g),t.layoutInstance&&t.layoutInstance.dispose();var v=e.__wordCloudRunningLayouts=e.__wordCloudRunningLayouts||{},m=t.seriesIndex;v[m]&&v[m].dispose(),t.layoutInstance={ondraw:null,dispose:function(){l.removeEventListener("wordclouddrawn",g),l.addEventListener("wordclouddrawn",function(y){y.preventDefault()})}},v[m]=t.layoutInstance})});Is(function(r){var e=(r||{}).series;!aa.isArray(e)&&(e=e?[e]:[]);var t=["shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];aa.each(e,function(n){if(n&&n.type==="wordCloud"){var o=n.textStyle||{};i(o.normal),i(o.emphasis)}});function i(n){n&&aa.each(t,function(o){n.hasOwnProperty(o)&&(n["text"+jf.capitalFirst(o)]=n[o])})}});function hA(r,e){var t=r.width,i=r.height;t>i*e?(r.x+=(t-i*e)/2,r.width=i*e):(r.y+=(i-t/e)/2,r.height=t/e)}di([Us,Zd,tv]);var pA=150,dA=200;function cC(r){r.preventDefault()}var Jf=class{constructor(e,t){this.chartRegistry=e,this.handlers=t,this.highlightedWord=null,this.mustRestoreHighlightAfterLayout=!1,this.measuredContainerSize=er({width:0,height:0},{equal:(i,n)=>i.width===n.width&&i.height===n.height}),this.drawnWords=er(null),this.containerSize=this.measuredContainerSize.asReadonly(),this.drawnWordCount=this.drawnWords.asReadonly()}attachTo(e){this.chart&&this.attachedContainer===e||(this.dispose(),this.attachedContainer=e,this.chart=S1(e),this.chart.on("finished",()=>{this.handlers.onLayoutFinished(),this.restoreTheHighlightALayoutWiped(),this.scheduleDrawnCountUpdate()}),this.chart.on("click",t=>this.reportClickedWord(t)),this.chart.on("contextmenu",t=>this.reportRightClickedWord(t)),e.addEventListener("contextmenu",cC),this.chartRegistry.register(this.chart),this.measuredContainerSize.set({width:e.clientWidth,height:e.clientHeight}),this.publishEveryMeasuredSize(e))}reportRightClickedWord({name:e,event:t}){let i=t?.event;!e||!i||this.handlers.onWordRightClicked(e,i.clientX,i.clientY)}highlightWord(e){this.highlightedWord=e,this.applyHighlight()}restoreTheHighlightALayoutWiped(){this.mustRestoreHighlightAfterLayout&&(this.mustRestoreHighlightAfterLayout=!1,this.applyHighlight())}applyHighlight(){this.chart&&(this.chart.dispatchAction({type:"downplay",seriesIndex:0}),this.highlightedWord!==null&&this.chart.dispatchAction({type:"highlight",seriesIndex:0,name:this.highlightedWord}))}reportClickedWord({name:e}){e&&this.handlers.onWordClicked(e)}render(e,t){this.cancelPendingRender(),this.renderTimeout=setTimeout(()=>{this.renderTimeout=void 0,this.hasMeasurableContainer()&&(this.drawnWords.set(null),this.chart?.clear(),this.chart?.resize(),this.chart?.setOption(e,!0),this.mustRestoreHighlightAfterLayout=!0,t())},pA)}cancelPendingRender(){this.renderTimeout!==void 0&&(clearTimeout(this.renderTimeout),this.renderTimeout=void 0)}hasMeasurableContainer(){return this.attachedContainer!==void 0&&this.attachedContainer.clientWidth>0&&this.attachedContainer.clientHeight>0}dispose(){this.attachedContainer?.removeEventListener("contextmenu",cC),this.resizeObserver?.disconnect(),this.resizeObserver=void 0,this.cancelPendingRender(),this.drawnCountTimeout!==void 0&&clearTimeout(this.drawnCountTimeout),this.drawnWords.set(null),this.chart&&this.chartRegistry.unregister(this.chart),this.chart?.dispose(),this.chart=void 0,this.attachedContainer=void 0}publishEveryMeasuredSize(e){this.resizeObserver=new ResizeObserver(()=>{this.measuredContainerSize.set({width:e.clientWidth,height:e.clientHeight})}),this.resizeObserver.observe(e)}scheduleDrawnCountUpdate(){this.drawnCountTimeout!==void 0&&clearTimeout(this.drawnCountTimeout),this.drawnCountTimeout=setTimeout(()=>{this.drawnCountTimeout=void 0,this.drawnWords.set(this.countWordsWithAGraphicElement())},dA)}countWordsWithAGraphicElement(){let e=this.chart?.getModel?.()?.getSeriesByIndex(0)?.getData();if(!e)return null;let t=0;for(let i=0;i<e.count();i++)e.getItemGraphicEl(i)&&t++;return t}};function hC(r,e){let t=r.slice(0,3).map(n=>n.text).join(", "),i=r.length===1?"domain term":"domain terms";return`Word cloud of ${r.length} ${i} for ${e}; largest: ${t}`}function pC(r,e){return r===null||r>=e?null:`${r} of ${e} words fit \u2014 enlarge the window, reduce word spacing, or enable "Fit all words" or "Draw outside bounds"`}var mA=["wordCloudCanvas"],gA=(r,e)=>e.text;function yA(r,e){if(r&1){let t=Wt();Xe(0,"div",1)(1,"p",2),ie(2),He(),Xe(3,"button",3),mi("click",function(){dt(t);let n=xe();return vt(n.showWholeMap())}),ie(4,"Show whole map"),He()()}if(r&2){let t=xe();z(2),Zr("No domain words for ",t.selectedNodeName(),". Select a folder or another file in the explorer.")}}function _A(r,e){if(r&1&&(Xe(0,"output",7),ie(1),He()),r&2){let t=xe(2);z(),Zr(" ",t.droppedWordNotice()," ")}}function xA(r,e){if(r&1&&(Xe(0,"li"),ie(1),He()),r&2){let t=e.$implicit;z(),wv("",t.text,": ",t.frequency)}}function SA(r,e){if(r&1&&(Xe(0,"figure",4)(1,"figcaption",5),ie(2),He(),fa(3,"div",6,0),He(),mt(5,_A,2,1,"output",7),Xe(6,"ol",5),Pr(7,xA,2,2,"li",null,gA),He()),r&2){let t=xe();z(2),Tt(t.description()),z(3),gt(t.droppedWordNotice()?5:-1),z(2),Lr(t.topWordsForScreenReaders())}}var wA="(prefers-reduced-motion: reduce)";function CA(r,e){return r!==null&&r.container===e.container&&r.words===e.words&&r.settings===e.settings&&r.maskImage===e.maskImage&&r.containerWidth===e.containerWidth&&r.containerHeight===e.containerHeight}var hv=(()=>{class r{constructor(){this.wordCloudReadStore=B(rg),this.viewReadinessStore=B(em),this.settings=ge(ol),this.selectedNodePath=ge(null),this.inspectedWord=ge(null),this.clearSelection=yt(),this.wordRightClicked=yt(),this.wordClicked=yt(),this.canvasRef=Js("wordCloudCanvas"),this.chartHost=new Jf(B(fc),{onLayoutFinished:()=>this.viewReadinessStore.markReady("domain"),onWordRightClicked:(t,i,n)=>this.wordRightClicked.emit({word:t,clientX:i,clientY:n}),onWordClicked:t=>this.wordClicked.emit(t)}),this.words=st(el(this.selectedNodePath).pipe(Ys(t=>this.wordCloudReadStore.wordsForSelectedNode(t))),{initialValue:[]}),this.selectedNodeName=le(()=>this.wordCloudReadStore.selectedNodeName(this.selectedNodePath())),this.renderedWords=le(()=>tn(this.words(),this.settings().sizingMode,this.settings().topN)),this.droppedWordNotice=le(()=>pC(this.chartHost.drawnWordCount(),this.renderedWords().length)),this.topWordsForScreenReaders=le(()=>this.renderedWords().slice(0,10)),this.description=le(()=>hC(this.renderedWords(),this.selectedNodeName())),this.prefersReducedMotion=typeof matchMedia=="function"&&matchMedia(wA).matches,this.maskImage=er(null),this.lastRenderedInputs=null,this.loadMaskImageAndKeepCircleFallbackOnFailure(),$i(()=>this.renderIntoTheChartOnceTheContainerIsMeasured()),$i(()=>this.chartHost.highlightWord(this.inspectedWord()))}ngOnDestroy(){this.disposeChart()}disposeChart(){this.chartHost.dispose(),this.lastRenderedInputs=null}showWholeMap(){this.clearSelection.emit()}renderIntoTheChartOnceTheContainerIsMeasured(){let t=this.words(),i=this.settings(),n=i.shape===Ji.logoM?this.maskImage()??void 0:void 0,o=this.canvasRef()?.nativeElement;if(!o){this.disposeChart(),this.viewReadinessStore.markReady("domain");return}this.chartHost.attachTo(o);let{width:a,height:s}=this.chartHost.containerSize();if(a===0||s===0){this.chartHost.cancelPendingRender();return}let l={container:o,words:t,settings:i,maskImage:n,containerWidth:a,containerHeight:s};if(CA(this.lastRenderedInputs,l)){this.viewReadinessStore.markReady("domain");return}this.chartHost.render(hg(t,i,{layoutAnimation:!this.prefersReducedMotion,containerWidth:a,maskImage:n}),()=>{this.lastRenderedInputs=l})}loadMaskImageAndKeepCircleFallbackOnFailure(){ig().then(t=>this.maskImage.set(t)).catch(()=>{})}static{this.\u0275fac=function(i){return new(i||r)}}static{this.\u0275cmp=_e({type:r,selectors:[["cc-word-cloud"]],viewQuery:function(i,n){i&1&&Zs(n.canvasRef,mA,5),i&2&&Ks()},hostAttrs:[1,"relative","block","h-full","w-full"],inputs:{settings:[1,"settings"],selectedNodePath:[1,"selectedNodePath"],inspectedWord:[1,"inspectedWord"]},outputs:{clearSelection:"clearSelection",wordRightClicked:"wordRightClicked",wordClicked:"wordClicked"},decls:2,vars:1,consts:[["wordCloudCanvas",""],[1,"flex","h-full","w-full","flex-col","items-center","justify-center","gap-3","px-6","text-center"],[1,"text-sm","opacity-60"],["type","button",1,"btn","btn-sm","btn-primary",3,"click"],[1,"h-full","w-full"],[1,"sr-only"],[1,"word-cloud-canvas","relative","h-full","w-full"],["data-testid","word-cloud-dropped-word-notice",1,"pointer-events-none","absolute","bottom-2","left-1/2","-translate-x-1/2","whitespace-nowrap","rounded-lg","bg-base-200/90","px-3","py-1","text-xs","opacity-80"]],template:function(i,n){i&1&&mt(0,yA,5,1,"div",1)(1,SA,9,2),i&2&>(n.words().length===0?0:1)},encapsulation:2,changeDetection:0})}}return r})();var pv={id:"words",label:"Words",icon:"fa-solid fa-font",searchPlaceholder:"payment, invoice",searchAriaLabel:"Search words"},dC=[fl,pv];var dv=(()=>{class r{constructor(){this.store=B(lt),this.pathsWithDomainWords=st(this.store.select(am),{requireSync:!0})}project(t){return Pm(t,{pathsWithDomainWords:this.pathsWithDomainWords()})}static{this.\u0275fac=function(i){return new(i||r)}}static{this.\u0275prov=We({token:r,factory:r.\u0275fac})}}return r})();var TA=gi(il,uc,(r,e)=>new Set(Ev(r,e).map(t=>t.path))),vC={patternSelector:uc,setPattern:Uv,searchedNodePathsSelector:TA};var bA=5,DA="No domain words",vv=(()=>{class r{constructor(){this.store=B(lt),this.domainSelectionStore=B(uo),this.domainBarReadStore=B(rt),this.hoverTooltipService=B(Rv),this.domainWords=st(this.store.select(Ov),{requireSync:!0}),this.clearsSelectionOnCollapse=!1}isSelected(t){return this.domainSelectionStore.selectedNodePath()===t.path}isHovered(){return!1}select(t){this.domainSelectionStore.select(t.path)}deselect(){this.domainSelectionStore.clear()}hover(t,i){let n=this.domainBarReadStore.settings().sizingMode,o=this.topWords(t.path,n);this.hoverTooltipService.show({title:t.name,rows:o.length>0?o.map(a=>({label:a.text,value:`${Nr(a,n)}`})):[{label:DA,value:""}]},i.right,i.top)}hoverEnd(){this.hoverTooltipService.hide()}topWords(t,i){return tn(this.domainWords()[t]??[],i,bA)}static{this.\u0275fac=function(i){return new(i||r)}}static{this.\u0275prov=We({token:r,factory:r.\u0275fac})}}return r})();var mC={options:[lc.NAME,lc.NUMBER_OF_FILES],optionSelector:Iv,ascendingSelector:Av,setOption:qv,toggleAscending:r=>Xv({value:!r})};var MA=(r,e)=>gi(il,t=>Em(Lm(t),r,e)),mv=(()=>{class r{constructor(){this.store=B(lt)}rootNodeFor(t,i){return this.store.select(MA(t,i))}static{this.\u0275fac=function(i){return new(i||r)}}static{this.\u0275prov=We({token:r,factory:r.\u0275fac})}}return r})();var gC=(()=>{class r{constructor(){this.domainSelectionStore=B(uo),this.revealService=B(Cm),this.modeService=B(cl),Nm("domain",t=>this.showNode(t))}showNode(t){this.modeService.activate(fl.id),this.domainSelectionStore.select(t),this.revealService.revealNode(t)}static{this.\u0275fac=function(i){return new(i||r)}}static{this.\u0275dir=_v({type:r,selectors:[["","ccShowsHandedOverNode",""]]})}}return r})();var yC=(()=>{class r{constructor(){this.inspected=er(null),this.inspectedWord=this.inspected.asReadonly()}inspect(t){this.inspected.set(t)}toggle(t){this.inspected.update(i=>i===t?null:t)}clear(){this.inspected.set(null)}static{this.\u0275fac=function(i){return new(i||r)}}static{this.\u0275prov=We({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var ec=(()=>{class r{constructor(){this.querySubject=new Gs(""),this.pattern$=this.querySubject.asObservable(),this.isPatternEmpty$=this.pattern$.pipe(ua(t=>t.trim().length===0))}setPattern(t){this.querySubject.next(t)}resetPattern(){this.setPattern("")}static{this.\u0275fac=function(i){return new(i||r)}}static{this.\u0275prov=We({token:r,factory:r.\u0275fac})}}return r})();var _C={[Ut.OCCURRENCES]:!1,[Ut.NAME]:!0,[Ut.RELEVANCE]:!1},RA={option:Ut.OCCURRENCES,ascending:_C[Ut.OCCURRENCES]},tc=(()=>{class r{constructor(){this.sortingSubject=new Gs(RA),this.options=Object.values(Ut),this.sorting$=this.sortingSubject.asObservable(),this.option$=this.sorting$.pipe(ua(({option:t})=>t)),this.ascending$=this.sorting$.pipe(ua(({ascending:t})=>t))}setOption(t){this.sortingSubject.next({option:t,ascending:_C[t]})}toggleAscending(){let{ascending:t}=this.sortingSubject.value;this.sortingSubject.next(Vs(Hs({},this.sortingSubject.value),{ascending:!t}))}static{this.\u0275fac=function(i){return new(i||r)}}static{this.\u0275prov=We({token:r,factory:r.\u0275fac})}}return r})();function OA(r,e){if(r&1){let t=Wt();Y(0,"span",12),ie(1),q(),Y(2,"button",13),be("click",function(){dt(t);let n=xe();return vt(n.copySelectedPath())}),Le(3,"i",14),q()}if(r&2){let t=xe();$("title",t.selectedNodePath()),z(),Zr(" ",t.selectedNodePath()," "),z(),$("title",t.copied()?"Copied!":"Copy path"),z(),$s("fa-copy",!t.copied())("fa-check",t.copied())}}function IA(r,e){if(r&1&&(Y(0,"span",5),ie(1),q()),r&2){let t=xe();z(),Tt(t.selectedNodeName()||"No selection")}}var jX=(()=>{class r{constructor(){this.domainBarReadStore=B(rt),this.explorerWidthService=B(ym),this.explorerCollapseService=B(mm),this.explorerModeService=B(cl),this.domainSelectionStore=B(uo),this.domainWordInspectionStore=B(yC),this.domainWordQueryStore=B(ec),this.domainWordSortStore=B(tc),this.hiddenWordsReadStore=B(pa),this.hiddenWordsWriteStore=B(da),this.clipboard=B(ca),this.settings=this.domainBarReadStore.settings,this.copied=this.clipboard.copied,this.selectedNodePath=this.domainSelectionStore.selectedNodePath,this.selectedNodeName=le(()=>tl(this.selectedNodePath(),"")),this.cloudLeftInset=le(()=>this.explorerCollapseService.isCollapsed()?0:this.explorerWidthService.width()),this.hiddenWordCount=le(()=>this.hiddenWordsReadStore.hiddenWords().length),this.hiddenWordsTooltip=le(()=>this.hiddenWordCount()===0?"No word is hidden":`${this.hiddenWordCount()} hidden from the cloud and the word list`),this.rightClickedWord=er(null),this.inspectedWord=this.domainWordInspectionStore.inspectedWord,this.wordQuery=st(this.domainWordQueryStore.pattern$,{requireSync:!0}),this.wordSorting=st(this.domainWordSortStore.sorting$,{requireSync:!0})}showWordOccurrences(t){this.explorerModeService.activate(pv.id),this.explorerCollapseService.expand(),this.domainWordQueryStore.setPattern(t),this.domainWordInspectionStore.inspect(t)}toggleInspectedWord(t){this.domainWordInspectionStore.toggle(t)}hideWord(t){this.inspectedWord()===t&&this.domainWordInspectionStore.toggle(t),this.hiddenWordsWriteStore.hide(t)}closeWordMenu(){this.rightClickedWord.set(null)}selectNode(t){this.domainSelectionStore.select(t)}clearSelection(){this.domainSelectionStore.clear()}async copySelectedPath(){let t=this.selectedNodePath();t&&await this.clipboard.copy(t)}static{this.\u0275fac=function(i){return new(i||r)}}static{this.\u0275cmp=_e({type:r,selectors:[["cc-domain-view"]],features:[Qs([dv,{provide:Sm,useExisting:dv},vv,{provide:wm,useExisting:vv},cc,{provide:Tm,useExisting:cc},mv,{provide:xm,useExisting:mv},Om(mC),Rm(vC),{provide:pm,useValue:{showRules:!1,showSearch:!0,showCounts:!1,modes:dC}},ec,{provide:dm,useExisting:ec},tc,{provide:_m,useExisting:tc},{provide:Im,useValue:{showMapActions:!1,jumpTargetView:"metrics"}},ca,Mm("domain"),rm()]),qs([gC])],decls:16,vars:15,consts:[["view","domain"],["headerChips","",1,"flex","items-stretch","border","border-base-300","mx-2","mt-2","rounded-md","overflow-hidden"],["label","Hidden","popoverId","domain-hidden-words","anchorName","domain-hidden-words-chip",3,"count","tooltip"],["explorerPopovers","","popoverId","domain-hidden-words","anchorName","domain-hidden-words-chip"],["collapsedContent","",1,"flex","flex-1","min-w-0","items-center","gap-1"],[1,"flex-1","min-w-0","truncate","text-xs","opacity-50"],["modeBody","",3,"wordToggled","nodeClicked","query","sorting","expandedWord","selectedNodePath"],[1,"fixed","right-0","top-[var(--cc-bars-height,49px)]","bottom-[var(--cc-bottom-bar-height,32px)]"],[3,"clearSelection","wordClicked","wordRightClicked","settings","selectedNodePath","inspectedWord"],[1,"absolute","right-[10px]","top-[10px]","z-10","flex"],[3,"showOccurrences","hideWord","closed","rightClickedWord"],[3,"showSelectedWhenNotHovered","selectedNodePath"],["data-testid","explorer-collapsed-path",1,"flex-1","min-w-0","truncate","text-xs","opacity-70",3,"title"],["type","button","data-testid","explorer-copy-path-button",1,"btn","btn-ghost","btn-sm","btn-square","shrink-0",3,"click","title"],[1,"fa"]],template:function(i,n){i&1&&(Le(0,"cc-loading-file-progress-spinner",0),Y(1,"cc-sidebar-explorer")(2,"div",1),Le(3,"cc-explorer-count-chip",2),q(),Le(4,"cc-hidden-words-popover",3),Y(5,"div",4),mt(6,OA,4,7)(7,IA,2,1,"span",5),q(),Y(8,"cc-domain-word-list",6),be("wordToggled",function(a){return n.toggleInspectedWord(a)})("nodeClicked",function(a){return n.selectNode(a)}),q()(),Y(9,"div",7)(10,"cc-word-cloud",8),be("clearSelection",function(){return n.clearSelection()})("wordClicked",function(a){return n.showWordOccurrences(a)})("wordRightClicked",function(a){return n.rightClickedWord.set(a)}),q(),Le(11,"cc-domain-toolbox",9),q(),Le(12,"cc-node-context-menu"),Y(13,"cc-domain-word-menu",10),be("showOccurrences",function(a){return n.showWordOccurrences(a)})("hideWord",function(a){return n.hideWord(a)})("closed",function(){return n.closeWordMenu()}),q(),Le(14,"cc-bottom-bar",11)(15,"cc-domain-bar")),i&2&&(z(3),$("count",n.hiddenWordCount())("tooltip",n.hiddenWordsTooltip()),z(3),gt(n.selectedNodePath()?6:7),z(2),$("query",n.wordQuery())("sorting",n.wordSorting())("expandedWord",n.inspectedWord())("selectedNodePath",n.selectedNodePath()),z(),jr("left",n.cloudLeftInset(),"px"),z(),$("settings",n.settings())("selectedNodePath",n.selectedNodePath())("inspectedWord",n.inspectedWord()),z(3),$("rightClickedWord",n.rightClickedWord()),z(),$("showSelectedWhenNotHovered",!0)("selectedNodePath",n.selectedNodePath()))},dependencies:[Dm,hv,hc,pc,dc,Am,mc,gc,hm,cm,tm],encapsulation:2,changeDetection:0})}}return r})();export{jX as DomainViewComponent};
|