import{bF as Mi,bG as xe,K as de,bH as gt,aw as ie,bI as Sn,j as ae,bJ as Z,bK as Ts,as as De,bL as As,bM as Ns,bN as Es,aq as E,bO as Li,bP as Di,bQ as Ci,bR as Ps,bS as Rs,bT as Ge,a6 as Te,at as _e,ac as se,bU as Vs,k as it,bV as V,bW as ye,P as oe,bX as Mn,bY as Ot,bZ as Ln,b_ as Ti,b$ as Ai,c0 as Ni,aF as he,c1 as Ei,c2 as Dn,c3 as ks,c4 as zs,J as Pi,ap as ce,c5 as Re,c6 as Gt,c7 as Cn,ao as te,c8 as Os,ar as W,az as F,av as G,c9 as Bt,ca as Tn,aH as Ie,ay as be,M as Be,cb as Ve,aE as pe,cc as Ri,cd as yt,ce as Gs,cf as ve,cg as ke,ch as Bs,ci as Fs,U as vt,Z as Ft,b as mt,cj as Ht,ck as fe,cl as Hs,cm as ot,am as re,cn as Vi,co as Ws,cp as ki,cq as Xs,cr as zi,cs as Wt,ct as Oi,cu as Fe,cv as Ae,cw as Ys,cx as An,X as He,cy as Gi,cz as Nn,cA as Bi,cB as Ne,l as Fi,cC as We,cD as xt,cE as Xe,cF as _t,cG as Zs,cH as Us,cI as rt,cJ as Hi,cK as js,cL as ge,cM as En,w as Xt,S as Wi,cN as Pn,G as qs,cO as Rn,cP as Vn,cQ as kn,cR as zn,f as On,cS as Yt,cT as Ks,cU as Xi,cV as Qs,cW as Gn,m as st,c as It,cX as Yi,cY as Bn,cZ as Fn,c_ as $s,V as Hn,c$ as lt,d0 as Ye,d1 as Js,d2 as Zi,d3 as el,d4 as Wn,y as tl,d5 as nl,bd as X,bo as Ui,T as al,d6 as Xn,d7 as Yn,d8 as il,d9 as ol,o as Zn,B as Un,da as ji,db as J,dc as jn,ax as qn,dd as Kn,de as Qn,df as rl,dg as qi,dh as sl,di as bt,dj as ll,dk as Ki,dl as ul,dm as Qi,dn as $n,dp as Zt,Q as $i,dq as dl,dr as Ji,ds as eo,dt as to,du as hl,_ as Jn,v as cl,dv as pl,dw as ea,dx as no,dy as ao,dz as io,dA as Ce,dB as fl,dC as gl,dD as yl,dE as vl,a8 as ml,a4 as xl,dF as _l,dG as Il,dH as bl,dI as wl,dJ as Sl,dK as Ml,dL as oo,dM as Ll,a9 as Dl,dN as Cl,aC as Ut,A as Tl,aG as Al,a as Nl,n as El,dO as Pl,dP as Rl,dQ as Vl,dR as kl,dS as zl,dT as Ol,aD as jt,dU as ro,dV as Gl,dW as wt,dX as qt,an as St,dY as Bl,dZ as Fl,d_ as Hl,d$ as Wl,e0 as Xl,e1 as Yl,aA as $e,e2 as Zl,e3 as Ul,aQ as so,e4 as jl,i as ql,s as Kl,e5 as Kt,e6 as Ql,e7 as $l,e8 as ta,g as Jl,e9 as lo,ea as eu,eb as tu,ec as nu,ed as au,ee as iu,ef as ou,eg as uo,eh as ru,ei as su,ej as ho,ek as na,el as lu,em as co,en as uu,eo as du,ep as hu,eq as cu,er as Qt,aW as pu,es as fu,et as gu,eu as $t,ev as yu,ew as Jt,ex as aa,ey as vu,ez as ia,eA as oa,eB as mu,bu as xu,bq as _u,bp as Iu,br as bu,bD as wu,bt as Su,bs as Mu,bE as Lu,bv as Du,bl as Cu,bm as Tu,eC as Au,bB as Nu,bC as Eu,bx as Pu,bk as Ru,bj as Vu,bA as ku,bi as zu,by as Ou,eD as Gu,eE as Bu,bz as Fu,eF as Hu,eG as Wu,bn as Xu}from"./installSVGRenderer-bd8c08f3.js";function Yu(n){if(n){for(var t=[],e=0;e=0&&a.attr(o.oldLayoutSelect),_e(h,"emphasis")>=0&&a.attr(o.oldLayoutEmphasis)),se(a,u,e,l)}else if(a.attr(u),!Rs(a).valueAnimation){var c=Ge(a.style.opacity,1);a.style.opacity=0,Te(a,{style:{opacity:c}},e,l)}if(o.oldLayout=u,a.states.select){var p=o.oldLayoutSelect={};en(p,u,tn),en(p,a.states.select,tn)}if(a.states.emphasis){var g=o.oldLayoutEmphasis={};en(g,u,tn),en(g,a.states.emphasis,tn)}Vs(a,l,d,e,e)}if(i&&!i.ignore&&!i.invisible){var o=Uu(i),r=o.oldLayout,f={points:i.shape.points};r?(i.attr({shape:r}),se(i,{shape:f},e)):(i.setShape(f),i.style.strokePercent=0,Te(i,{style:{strokePercent:1}},e)),o.oldLayout=f}},n}();const qu=ju;var sa=xe();function Ku(n){n.registerUpdateLifecycle("series:beforeupdate",function(t,e,a){var i=sa(e).labelManager;i||(i=sa(e).labelManager=new qu),i.clearLabels()}),n.registerUpdateLifecycle("series:layoutlabels",function(t,e,a){var i=sa(e).labelManager;a.updatedSeries.forEach(function(o){i.addLabelsOfSeries(e.getViewOfSeriesModel(o))}),i.updateLayoutConfig(e),i.layout(e),i.processLabelsOverall()})}function Qu(n){var t=n;t.hierNode={defaultAncestor:null,ancestor:t,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var e=[t],a,i;a=e.pop();)if(i=a.children,a.isExpand&&i.length)for(var o=i.length,r=o-1;r>=0;r--){var s=i[r];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:r,thread:null},e.push(s)}}function $u(n,t){var e=n.isExpand?n.children:[],a=n.parentNode.children,i=n.hierNode.i?a[n.hierNode.i-1]:null;if(e.length){td(n);var o=(e[0].hierNode.prelim+e[e.length-1].hierNode.prelim)/2;i?(n.hierNode.prelim=i.hierNode.prelim+t(n,i),n.hierNode.modifier=n.hierNode.prelim-o):n.hierNode.prelim=o}else i&&(n.hierNode.prelim=i.hierNode.prelim+t(n,i));n.parentNode.hierNode.defaultAncestor=nd(n,i,n.parentNode.hierNode.defaultAncestor||a[0],t)}function Ju(n){var t=n.hierNode.prelim+n.parentNode.hierNode.modifier;n.setLayout({x:t},!0),n.hierNode.modifier+=n.parentNode.hierNode.modifier}function fo(n){return arguments.length?n:od}function Mt(n,t){return n-=Math.PI/2,{x:t*Math.cos(n),y:t*Math.sin(n)}}function ed(n,t){return it(n.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function td(n){for(var t=n.children,e=t.length,a=0,i=0;--e>=0;){var o=t[e];o.hierNode.prelim+=a,o.hierNode.modifier+=a,i+=o.hierNode.change,a+=o.hierNode.shift+i}}function nd(n,t,e,a){if(t){for(var i=n,o=n,r=o.parentNode.children[0],s=t,l=i.hierNode.modifier,u=o.hierNode.modifier,d=r.hierNode.modifier,h=s.hierNode.modifier;s=la(s),o=ua(o),s&&o;){i=la(i),r=ua(r),i.hierNode.ancestor=n;var c=s.hierNode.prelim+h-o.hierNode.prelim-u+a(s,o);c>0&&(id(ad(s,n,e),n,c),u+=c,l+=c),h+=s.hierNode.modifier,u+=o.hierNode.modifier,l+=i.hierNode.modifier,d+=r.hierNode.modifier}s&&!la(i)&&(i.hierNode.thread=s,i.hierNode.modifier+=h-l),o&&!ua(r)&&(r.hierNode.thread=o,r.hierNode.modifier+=u-d,e=n)}return e}function la(n){var t=n.children;return t.length&&n.isExpand?t[t.length-1]:n.hierNode.thread}function ua(n){var t=n.children;return t.length&&n.isExpand?t[0]:n.hierNode.thread}function ad(n,t,e){return n.hierNode.ancestor.parentNode===t.parentNode?n.hierNode.ancestor:e}function id(n,t,e){var a=e/(t.hierNode.i-n.hierNode.i);t.hierNode.change-=a,t.hierNode.shift+=e,t.hierNode.modifier+=e,t.hierNode.prelim+=e,n.hierNode.change+=a}function od(n,t){return n.parentNode===t.parentNode?1:2}var rd=function(){function n(){this.parentPoint=[],this.childPoints=[]}return n}(),sd=function(n){V(t,n);function t(e){return n.call(this,e)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new rd},t.prototype.buildPath=function(e,a){var i=a.childPoints,o=i.length,r=a.parentPoint,s=i[0],l=i[o-1];if(o===1){e.moveTo(r[0],r[1]),e.lineTo(s[0],s[1]);return}var u=a.orient,d=u==="TB"||u==="BT"?0:1,h=1-d,c=Z(a.forkPosition,1),p=[];p[d]=r[d],p[h]=r[h]+(l[h]-r[h])*c,e.moveTo(r[0],r[1]),e.lineTo(p[0],p[1]),e.moveTo(s[0],s[1]),p[d]=s[d],e.lineTo(p[0],p[1]),p[d]=l[d],e.lineTo(p[0],p[1]),e.lineTo(l[0],l[1]);for(var g=1;gx.x,_||(I=I-Math.PI));var w=_?"left":"right",M=s.getModel("label"),S=M.get("rotate"),L=S*(Math.PI/180),D=y.getTextContent();D&&(y.setTextConfig({position:M.get("position")||w,rotation:S==null?-I:L,origin:"center"}),D.setStyle("verticalAlign","middle"))}var C=s.get(["emphasis","focus"]),N=C==="relative"?Dn(r.getAncestorsIndices(),r.getDescendantIndices()):C==="ancestor"?r.getAncestorsIndices():C==="descendant"?r.getDescendantIndices():null;N&&(ae(e).focus=N),ud(i,r,d,e,g,p,f,a),e.__edge&&(e.onHoverStateChange=function(T){if(T!=="blur"){var A=r.parentNode&&n.getItemGraphicEl(r.parentNode.dataIndex);A&&A.hoverState===ks||zs(e.__edge,T)}})}function ud(n,t,e,a,i,o,r,s){var l=t.getModel(),u=n.get("edgeShape"),d=n.get("layout"),h=n.getOrient(),c=n.get(["lineStyle","curveness"]),p=n.get("edgeForkPosition"),g=l.getModel("lineStyle").getLineStyle(),f=a.__edge;if(u==="curve")t.parentNode&&t.parentNode!==e&&(f||(f=a.__edge=new Pi({shape:da(d,h,c,i,i)})),se(f,{shape:da(d,h,c,o,r)},n));else if(u==="polyline"&&d==="orthogonal"&&t!==e&&t.children&&t.children.length!==0&&t.isExpand===!0){for(var y=t.children,m=[],x=0;xe&&(e=i.height)}this.height=e+1},n.prototype.getNodeById=function(t){if(this.getId()===t)return this;for(var e=0,a=this.children,i=a.length;e=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},n.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},n.prototype.getModel=function(t){if(!(this.dataIndex<0)){var e=this.hostTree,a=e.data.getItemModel(this.dataIndex);return a.getModel(t)}},n.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},n.prototype.setVisual=function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},n.prototype.getVisual=function(t){return this.hostTree.data.getItemVisual(this.dataIndex,t)},n.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},n.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},n.prototype.getChildIndex=function(){if(this.parentNode){for(var t=this.parentNode.children,e=0;e=0){var a=e.getData().tree.root,i=n.targetNode;if(be(i)&&(i=a.getNodeById(i)),i&&a.contains(i))return{node:i};var o=n.targetNodeId;if(o!=null&&(i=a.getNodeById(o)))return{node:i}}}function bo(n){for(var t=[];n;)n=n.parentNode,n&&t.push(n);return t.reverse()}function pa(n,t){var e=bo(n);return _e(e,t)>=0}function nn(n,t){for(var e=[];n;){var a=n.dataIndex;e.push({name:n.name,dataIndex:a,value:t.getRawValue(a)}),n=n.parentNode}return e.reverse(),e}var _d=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.hasSymbolVisual=!0,e.ignoreStyleOnData=!0,e}return t.prototype.getInitialData=function(e){var a={name:e.name,children:e.data},i=e.leaves||{},o=new Be(i,this,this.ecModel),r=ca.createTree(a,this,s);function s(h){h.wrapMethod("getItemModel",function(c,p){var g=r.getNodeByDataIndex(p);return g&&g.children.length&&g.isExpand||(c.parentModel=o),c})}var l=0;r.eachNode("preorder",function(h){h.depth>l&&(l=h.depth)});var u=e.expandAndCollapse,d=u&&e.initialTreeDepth>=0?e.initialTreeDepth:l;return r.root.eachNode("preorder",function(h){var c=h.hostTree.data.getRawDataItem(h.dataIndex);h.isExpand=c&&c.collapsed!=null?!c.collapsed:h.depth<=d}),r.data},t.prototype.getOrient=function(){var e=this.get("orient");return e==="horizontal"?e="LR":e==="vertical"&&(e="TB"),e},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.formatTooltip=function(e,a,i){for(var o=this.getData().tree,r=o.root.children[0],s=o.getNodeByDataIndex(e),l=s.getValue(),u=s.name;s&&s!==r;)u=s.parentNode.name+"."+u,s=s.parentNode;return Ve("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},t.prototype.getDataParams=function(e){var a=n.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return a.treeAncestors=nn(i,this),a.collapsed=!i.isExpand,a},t.type="series.tree",t.layoutMode="box",t.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},t}(pe);const Id=_d;function bd(n,t,e){for(var a=[n],i=[],o;o=a.pop();)if(i.push(o),o.isExpand){var r=o.children;if(r.length)for(var s=0;s=0;o--)e.push(i[o])}}function wd(n,t){n.eachSeriesByType("tree",function(e){Sd(e,t)})}function Sd(n,t){var e=ed(n,t);n.layoutInfo=e;var a=n.get("layout"),i=0,o=0,r=null;a==="radial"?(i=2*Math.PI,o=Math.min(e.height,e.width)/2,r=fo(function(v,I){return(v.parentNode===I.parentNode?1:2)/v.depth})):(i=e.width,o=e.height,r=fo());var s=n.getData().tree.root,l=s.children[0];if(l){Qu(s),bd(l,$u,r),s.hierNode.modifier=-l.hierNode.prelim,Dt(l,Ju);var u=l,d=l,h=l;Dt(l,function(v){var I=v.getLayout().x;Id.getLayout().x&&(d=v),v.depth>h.depth&&(h=v)});var c=u===d?1:r(u,d)/2,p=c-u.getLayout().x,g=0,f=0,y=0,m=0;if(a==="radial")g=i/(d.getLayout().x+c+p),f=o/(h.depth-1||1),Dt(l,function(v){y=(v.getLayout().x+p)*g,m=(v.depth-1)*f;var I=Mt(y,m);v.setLayout({x:I.x,y:I.y,rawX:y,rawY:m},!0)});else{var x=n.getOrient();x==="RL"||x==="LR"?(f=o/(d.getLayout().x+c+p),g=i/(h.depth-1||1),Dt(l,function(v){m=(v.getLayout().x+p)*f,y=x==="LR"?(v.depth-1)*g:i-(v.depth-1)*g,v.setLayout({x:y,y:m},!0)})):(x==="TB"||x==="BT")&&(g=i/(d.getLayout().x+c+p),f=o/(h.depth-1||1),Dt(l,function(v){y=(v.getLayout().x+p)*g,m=x==="TB"?(v.depth-1)*f:o-(v.depth-1)*f,v.setLayout({x:y,y:m},!0)}))}}}function Md(n){n.eachSeriesByType("tree",function(t){var e=t.getData(),a=e.tree;a.eachNode(function(i){var o=i.getModel(),r=o.getModel("itemStyle").getItemStyle(),s=e.ensureUniqueItemVisual(i.dataIndex,"style");W(s,r)})})}function Ld(n){n.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(t,e){e.eachComponent({mainType:"series",subType:"tree",query:t},function(a){var i=t.dataIndex,o=a.getData().tree,r=o.getNodeByDataIndex(i);r.isExpand=!r.isExpand})}),n.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(t,e,a){e.eachComponent({mainType:"series",subType:"tree",query:t},function(i){var o=i.coordinateSystem,r=Ri(o,t,void 0,a);i.setCenter&&i.setCenter(r.center),i.setZoom&&i.setZoom(r.zoom)})})}function Dd(n){n.registerChartView(dd),n.registerSeriesModel(Id),n.registerLayout(wd),n.registerVisual(Md),Ld(n)}var wo=["treemapZoomToNode","treemapRender","treemapMove"];function Cd(n){for(var t=0;t1;)o=o.parentNode;var r=Gs(n.ecModel,o.name||o.dataIndex+"",a);i.setVisual("decal",r)})}var Td=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.preventUsingHoverLayer=!0,e}return t.prototype.getInitialData=function(e,a){var i={name:e.name,children:e.data};Mo(i);var o=e.levels||[],r=this.designatedVisualItemStyle={},s=new Be({itemStyle:r},this,a);o=e.levels=Ad(o,a);var l=F(o||[],function(h){return new Be(h,s,a)},this),u=ca.createTree(i,this,d);function d(h){h.wrapMethod("getItemModel",function(c,p){var g=u.getNodeByDataIndex(p),f=g?l[g.depth]:null;return c.parentModel=f||s,c})}return u.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.formatTooltip=function(e,a,i){var o=this.getData(),r=this.getRawValue(e),s=o.getName(e);return Ve("nameValue",{name:s,value:r})},t.prototype.getDataParams=function(e){var a=n.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return a.treeAncestors=nn(i,this),a.treePathInfo=a.treeAncestors,a},t.prototype.setLayoutInfo=function(e){this.layoutInfo=this.layoutInfo||{},W(this.layoutInfo,e)},t.prototype.mapIdToIndex=function(e){var a=this._idIndexMap;a||(a=this._idIndexMap=ve(),this._idIndexMapCount=0);var i=a.get(e);return i==null&&a.set(e,i=this._idIndexMapCount++),i},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var a=this.getRawData().tree.root;(!e||e!==a&&!a.contains(e))&&(this._viewRoot=a)},t.prototype.enableAriaDecal=function(){So(this)},t.type="series.treemap",t.layoutMode="box",t.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"\u25B6",zoomToNodeRatio:.32*.32,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}},emphasis:{itemStyle:{color:"rgba(0,0,0,0.9)"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},t}(pe);function Mo(n){var t=0;E(n.children,function(a){Mo(a);var i=a.value;G(i)&&(i=i[0]),t+=i});var e=n.value;G(e)&&(e=e[0]),(e==null||isNaN(e))&&(e=t),e<0&&(e=0),G(n.value)?n.value[0]=e:n.value=e}function Ad(n,t){var e=ke(t.get("color")),a=ke(t.get(["aria","decal","decals"]));if(e){n=n||[];var i,o;E(n,function(s){var l=new Be(s),u=l.get("color"),d=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(i=!0),(l.get(["itemStyle","decal"])||d&&d!=="none")&&(o=!0)});var r=n[0]||(n[0]={});return i||(r.color=e.slice()),!o&&a&&(r.decal=a.slice()),n}}const Nd=Td;var Ed=8,Lo=8,fa=5,Pd=function(){function n(t){this.group=new oe,t.add(this.group)}return n.prototype.render=function(t,e,a,i){var o=t.getModel("breadcrumb"),r=this.group;if(r.removeAll(),!(!o.get("show")||!a)){var s=o.getModel("itemStyle"),l=o.getModel("emphasis"),u=s.getModel("textStyle"),d=l.getModel(["itemStyle","textStyle"]),h={pos:{left:o.get("left"),right:o.get("right"),top:o.get("top"),bottom:o.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:o.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(a,h,u),this._renderContent(t,h,s,l,u,d,i),Bs(r,h.pos,h.box)}},n.prototype._prepare=function(t,e,a){for(var i=t;i;i=i.parentNode){var o=Bt(i.getModel().get("name"),""),r=a.getTextRect(o),s=Math.max(r.width+Ed*2,e.emptyItemWidth);e.totalWidth+=s+Lo,e.renderList.push({node:i,text:o,width:s})}},n.prototype._renderContent=function(t,e,a,i,o,r,s){for(var l=0,u=e.emptyItemWidth,d=t.get(["breadcrumb","height"]),h=Fs(e.pos,e.box),c=e.totalWidth,p=e.renderList,g=i.getModel("itemStyle").getItemStyle(),f=p.length-1;f>=0;f--){var y=p[f],m=y.node,x=y.width,v=y.text;c>h.width&&(c-=x-u,x=u,v=null);var I=new vt({shape:{points:Rd(l,0,x,d,f===p.length-1,f===0)},style:ce(a.getItemStyle(),{lineJoin:"bevel"}),textContent:new Ft({style:mt(o,{text:v})}),textConfig:{position:"inside"},z2:Ht*1e4,onclick:te(s,m)});I.disableLabelAnimation=!0,I.getTextContent().ensureState("emphasis").style=mt(r,{text:v}),I.ensureState("emphasis").style=g,fe(I,i.get("focus"),i.get("blurScope"),i.get("disabled")),this.group.add(I),Vd(I,t,m),l+=x+Lo}},n.prototype.remove=function(){this.group.removeAll()},n}();function Rd(n,t,e,a,i,o){var r=[[i?n:n-fa,t],[n+e,t],[n+e,t+a],[i?n:n-fa,t+a]];return!o&&r.splice(2,0,[n+e+fa,t+a/2]),!i&&r.push([n,t+a/2]),r}function Vd(n,t,e){ae(n).eventData={componentType:"series",componentSubType:"treemap",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:e&&e.dataIndex,name:e&&e.name},treePathInfo:e&&nn(e,t)}}const kd=Pd;var zd=function(){function n(){this._storage=[],this._elExistsMap={}}return n.prototype.add=function(t,e,a,i,o){return this._elExistsMap[t.id]?!1:(this._elExistsMap[t.id]=!0,this._storage.push({el:t,target:e,duration:a,delay:i,easing:o}),!0)},n.prototype.finished=function(t){return this._finishedCallback=t,this},n.prototype.start=function(){for(var t=this,e=this._storage.length,a=function(){e--,e<=0&&(t._storage.length=0,t._elExistsMap={},t._finishedCallback&&t._finishedCallback())},i=0,o=this._storage.length;iCo||Math.abs(e.dy)>Co)){var a=this.seriesModel.getData().tree.root;if(!a)return;var i=a.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+e.dx,y:i.y+e.dy,width:i.width,height:i.height}})}},t.prototype._onZoom=function(e){var a=e.originX,i=e.originY;if(this._state!=="animating"){var o=this.seriesModel.getData().tree.root;if(!o)return;var r=o.getLayout();if(!r)return;var s=new de(r.x,r.y,r.width,r.height),l=this.seriesModel.layoutInfo;a-=l.x,i-=l.y;var u=Xs();Vi(u,u,[-a,-i]),Ws(u,u,[e.scale,e.scale]),Vi(u,u,[a,i]),s.applyTransform(u),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:s.x,y:s.y,width:s.width,height:s.height}})}},t.prototype._initEvents=function(e){var a=this;e.on("click",function(i){if(a._state==="ready"){var o=a.seriesModel.get("nodeClick",!0);if(o){var r=a.findTarget(i.offsetX,i.offsetY);if(r){var s=r.node;if(s.getLayout().isLeafRoot)a._rootToNode(r);else if(o==="zoomToNode")a._zoomToNode(r);else if(o==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),d=l.get("target",!0)||"blank";u&&ki(u,d)}}}}},this)},t.prototype._renderBreadcrumb=function(e,a,i){var o=this;i||(i=e.get("leafDepth",!0)!=null?{node:e.getViewRoot()}:this.findTarget(a.getWidth()/2,a.getHeight()/2),i||(i={node:e.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new kd(this.group))).render(e,a,i.node,function(r){o._state!=="animating"&&(pa(e.getViewRoot(),r)?o._rootToNode({node:r}):o._zoomToNode({node:r}))})},t.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=Ct(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},t.prototype.dispose=function(){this._clearController()},t.prototype._zoomToNode=function(e){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype._rootToNode=function(e){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype.findTarget=function(e,a){var i,o=this.seriesModel.getViewRoot();return o.eachNode({attr:"viewChildren",order:"preorder"},function(r){var s=this._storage.background[r.getRawIndex()];if(s){var l=s.transformCoordToLocal(e,a),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)i={node:r,offsetX:l[0],offsetY:l[1]};else return!1}},this),i},t.type="treemap",t}(he);function Ct(){return{nodeGroup:[],background:[],content:[]}}function Wd(n,t,e,a,i,o,r,s,l,u){if(!r)return;var d=r.getLayout(),h=n.getData(),c=r.getModel();if(h.setItemGraphicEl(r.dataIndex,null),!d||!d.isInView)return;var p=d.width,g=d.height,f=d.borderWidth,y=d.invisible,m=r.getRawIndex(),x=s&&s.getRawIndex(),v=r.viewChildren,I=d.upperHeight,_=v&&v.length,b=c.getModel("itemStyle"),w=c.getModel(["emphasis","itemStyle"]),M=c.getModel(["blur","itemStyle"]),S=c.getModel(["select","itemStyle"]),L=b.get("borderRadius")||0,D=q("nodeGroup",ga);if(!D)return;if(l.add(D),D.x=d.x||0,D.y=d.y||0,D.markRedraw(),an(D).nodeWidth=p,an(D).nodeHeight=g,d.isAboveViewRoot)return D;var C=q("background",Do,u,Bd);C&&z(D,C,_&&d.upperLabelHeight);var N=c.getModel("emphasis"),T=N.get("focus"),A=N.get("blurScope"),P=N.get("disabled"),R=T==="ancestor"?r.getAncestorsIndices():T==="descendant"?r.getDescendantIndices():T;if(_)zi(D)&&Wt(D,!1),C&&(Wt(C,!P),h.setItemGraphicEl(r.dataIndex,C),Oi(C,R,A));else{var k=q("content",Do,u,Fd);k&&H(D,k),C.disableMorphing=!0,C&&zi(C)&&Wt(C,!1),Wt(D,!P),h.setItemGraphicEl(r.dataIndex,D),Oi(D,R,A)}return D;function z(Y,O,j){var U=ae(O);if(U.dataIndex=r.dataIndex,U.seriesIndex=n.seriesIndex,O.setShape({x:0,y:0,width:p,height:g,r:L}),y)B(O);else{O.invisible=!1;var $=r.getVisual("style"),ue=$.stroke,Me=No(b);Me.fill=ue;var ne=Je(w);ne.fill=w.get("borderColor");var Le=Je(M);Le.fill=M.get("borderColor");var Pe=Je(S);if(Pe.fill=S.get("borderColor"),j){var at=p-2*f;K(O,ue,$.opacity,{x:f,y:0,width:at,height:I})}else O.removeTextContent();O.setStyle(Me),O.ensureState("emphasis").style=ne,O.ensureState("blur").style=Le,O.ensureState("select").style=Pe,Gt(O)}Y.add(O)}function H(Y,O){var j=ae(O);j.dataIndex=r.dataIndex,j.seriesIndex=n.seriesIndex;var U=Math.max(p-2*f,0),$=Math.max(g-2*f,0);if(O.culling=!0,O.setShape({x:f,y:f,width:U,height:$,r:L}),y)B(O);else{O.invisible=!1;var ue=r.getVisual("style"),Me=ue.fill,ne=No(b);ne.fill=Me,ne.decal=ue.decal;var Le=Je(w),Pe=Je(M),at=Je(S);K(O,Me,ue.opacity,null),O.setStyle(ne),O.ensureState("emphasis").style=Le,O.ensureState("blur").style=Pe,O.ensureState("select").style=at,Gt(O)}Y.add(O)}function B(Y){!Y.invisible&&o.push(Y)}function K(Y,O,j,U){var $=c.getModel(U?Ao:To),ue=Bt(c.get("name"),null),Me=$.getShallow("show");Fe(Y,Ae(c,U?Ao:To),{defaultText:Me?ue:null,inheritColor:O,defaultOpacity:j,labelFetcher:n,labelDataIndex:r.dataIndex});var ne=Y.getTextContent();if(ne){var Le=ne.style,Pe=Ys(Le.padding||0);U&&(Y.setTextConfig({layoutRect:U}),ne.disableLabelLayout=!0),ne.beforeUpdate=function(){var wi=Math.max((U?U.width:Y.shape.width)-Pe[1]-Pe[3],0),Si=Math.max((U?U.height:Y.shape.height)-Pe[0]-Pe[2],0);(Le.width!==wi||Le.height!==Si)&&ne.setStyle({width:wi,height:Si})},Le.truncateMinChar=2,Le.lineOverflow="truncate",Q(Le,U,d);var at=ne.getState("emphasis");Q(at?at.style:null,U,d)}}function Q(Y,O,j){var U=Y?Y.text:null;if(!O&&j.isLeafRoot&&U!=null){var $=n.get("drillDownIcon",!0);Y.text=$?$+" "+U:U}}function q(Y,O,j,U){var $=x!=null&&e[Y][x],ue=i[Y];return $?(e[Y][x]=null,ee(ue,$)):y||($=new O,$ instanceof An&&($.z2=Xd(j,U)),me(ue,$)),t[Y][m]=$}function ee(Y,O){var j=Y[m]={};O instanceof ga?(j.oldX=O.x,j.oldY=O.y):j.oldShape=W({},O.shape)}function me(Y,O){var j=Y[m]={},U=r.parentNode,$=O instanceof oe;if(U&&(!a||a.direction==="drillDown")){var ue=0,Me=0,ne=i.background[U.getRawIndex()];!a&&ne&&ne.oldShape&&(ue=ne.oldShape.width,Me=ne.oldShape.height),$?(j.oldX=0,j.oldY=Me):j.oldShape={x:ue,y:Me,width:0,height:0}}j.fadein=!$}}function Xd(n,t){return n*Gd+t}const Yd=Hd;var Zd="itemStyle",Eo=xe();const Ud={seriesType:"treemap",reset:function(n){var t=n.getData().tree,e=t.root;e.isRemoved()||Po(e,{},n.getViewRoot().getAncestors(),n)}};function Po(n,t,e,a){var i=n.getModel(),o=n.getLayout(),r=n.hostTree.data;if(!(!o||o.invisible||!o.isInView)){var s=i.getModel(Zd),l=jd(s,t,a),u=r.ensureUniqueItemVisual(n.dataIndex,"style"),d=s.get("borderColor"),h=s.get("borderColorSaturation"),c;h!=null&&(c=Ro(l),d=qd(h,c)),u.stroke=d;var p=n.viewChildren;if(!p||!p.length)c=Ro(l),u.fill=c;else{var g=Kd(n,i,o,s,l,p);E(p,function(f,y){if(f.depth>=e.length||f===e[f.depth]){var m=Qd(i,l,f,y,g,a);Po(f,m,e,a)}})}}}function jd(n,t,e){var a=W({},t),i=e.designatedVisualItemStyle;return E(["color","colorAlpha","colorSaturation"],function(o){i[o]=t[o];var r=n.get(o);i[o]=null,r!=null&&(a[o]=r)}),a}function Ro(n){var t=ya(n,"color");if(t){var e=ya(n,"colorAlpha"),a=ya(n,"colorSaturation");return a&&(t=Gi(t,null,null,a)),e&&(t=Nn(t,e)),t}}function qd(n,t){return t!=null?Gi(t,null,null,n):null}function ya(n,t){var e=n[t];if(e!=null&&e!=="none")return e}function Kd(n,t,e,a,i,o){if(!(!o||!o.length)){var r=va(t,"color")||i.color!=null&&i.color!=="none"&&(va(t,"colorAlpha")||va(t,"colorSaturation"));if(r){var s=t.get("visualMin"),l=t.get("visualMax"),u=e.dataExtent.slice();s!=null&&su[1]&&(u[1]=l);var d=t.get("colorMappingBy"),h={type:r.name,dataExtent:u,visual:r.range};h.type==="color"&&(d==="index"||d==="id")?(h.mappingMethod="category",h.loop=!0):h.mappingMethod="linear";var c=new Bi(h);return Eo(c).drColorMappingBy=d,c}}}function va(n,t){var e=n.get(t);return G(e)&&e.length?{name:t,range:e}:null}function Qd(n,t,e,a,i,o){var r=W({},t);if(i){var s=i.type,l=s==="color"&&Eo(i).drColorMappingBy,u=l==="index"?a:l==="id"?o.mapIdToIndex(e.getId()):e.getValue(n.get("visualDimension"));r[s]=i.mapValueToVisual(u)}return r}var Tt=Math.max,on=Math.min,Vo=Ne,ma=E,ko=["itemStyle","borderWidth"],$d=["itemStyle","gapWidth"],Jd=["upperLabel","show"],eh=["upperLabel","height"];const th={seriesType:"treemap",reset:function(n,t,e,a){var i=e.getWidth(),o=e.getHeight(),r=n.option,s=it(n.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),l=r.size||[],u=Z(Vo(s.width,l[0]),i),d=Z(Vo(s.height,l[1]),o),h=a&&a.type,c=["treemapZoomToNode","treemapRootToNode"],p=Lt(a,c,n),g=h==="treemapRender"||h==="treemapMove"?a.rootRect:null,f=n.getViewRoot(),y=bo(f);if(h!=="treemapMove"){var m=h==="treemapZoomToNode"?sh(n,p,f,u,d):g?[g.width,g.height]:[u,d],x=r.sort;x&&x!=="asc"&&x!=="desc"&&(x="desc");var v={squareRatio:r.squareRatio,sort:x,leafDepth:r.leafDepth};f.hostTree.clearLayouts();var I={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};f.setLayout(I),zo(f,v,!1,0),I=f.getLayout(),ma(y,function(b,w){var M=(y[w+1]||f).getValue();b.setLayout(W({dataExtent:[M,M],borderWidth:0,upperHeight:0},I))})}var _=n.getData().tree.root;_.setLayout(lh(s,g,p),!0),n.setLayoutInfo(s),Go(_,new de(-s.x,-s.y,i,o),y,f,0)}};function zo(n,t,e,a){var i,o;if(!n.isRemoved()){var r=n.getLayout();i=r.width,o=r.height;var s=n.getModel(),l=s.get(ko),u=s.get($d)/2,d=Bo(s),h=Math.max(l,d),c=l-u,p=h-u;n.setLayout({borderWidth:l,upperHeight:h,upperLabelHeight:d},!0),i=Tt(i-2*c,0),o=Tt(o-c-p,0);var g=i*o,f=nh(n,s,g,t,e,a);if(f.length){var y={x:c,y:p,width:i,height:o},m=on(i,o),x=1/0,v=[];v.area=0;for(var I=0,_=f.length;I<_;){var b=f[I];v.push(b),v.area+=b.getLayout().area;var w=rh(v,m,t.squareRatio);w<=x?(I++,x=w):(v.area-=v.pop().getLayout().area,Oo(v,m,y,u,!1),m=on(y.width,y.height),v.length=v.area=0,x=1/0)}if(v.length&&Oo(v,m,y,u,!0),!e){var M=s.get("childrenVisibleMin");M!=null&&g=0;l--){var u=i[a==="asc"?r-l-1:l].getValue();u/e*ts[1]&&(s[1]=u)})),{sum:a,dataExtent:s}}function rh(n,t,e){for(var a=0,i=1/0,o=0,r=void 0,s=n.length;oa&&(a=r));var l=n.area*n.area,u=t*t*e;return l?Tt(u*a/l,l/(u*i)):1/0}function Oo(n,t,e,a,i){var o=t===e.width?0:1,r=1-o,s=["x","y"],l=["width","height"],u=e[s[o]],d=t?n.area/t:0;(i||d>e[l[r]])&&(d=e[l[r]]);for(var h=0,c=n.length;hFi&&(u=Fi),o=s}ua&&(a=t);var o=a%2?a+2:a+3;i=[];for(var r=0;r0&&(_[0]=-_[0],_[1]=-_[1]);var w=I[0]<0?-1:1;if(o.__position!=="start"&&o.__position!=="end"){var M=-Math.atan2(I[1],I[0]);h[0].8?"left":c[0]<-.8?"right":"center",f=c[1]>.8?"top":c[1]<-.8?"bottom":"middle";break;case"start":o.x=-c[0]*m+d[0],o.y=-c[1]*x+d[1],g=c[0]>.8?"right":c[0]<-.8?"left":"center",f=c[1]>.8?"bottom":c[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":o.x=m*w+d[0],o.y=d[1]+S,g=I[0]<0?"right":"left",o.originX=-m*w,o.originY=-S;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":o.x=b[0],o.y=b[1]+S,g="center",o.originY=-S;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":o.x=-m*w+h[0],o.y=h[1]+S,g=I[0]>=0?"right":"left",o.originX=m*w,o.originY=-S;break}o.scaleX=o.scaleY=r,o.setStyle({verticalAlign:o.__verticalAlign||f,align:o.__align||g})}},t}(oe);const Ta=Dh;var Ch=function(){function n(t){this.group=new oe,this._LineCtor=t||Ta}return n.prototype.updateData=function(t){var e=this;this._progressiveEls=null;var a=this,i=a.group,o=a._lineData;a._lineData=t,o||i.removeAll();var r=Qo(t);t.diff(o).add(function(s){e._doAdd(t,s,r)}).update(function(s,l){e._doUpdate(o,t,l,s,r)}).remove(function(s){i.remove(o.getItemGraphicEl(s))}).execute()},n.prototype.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl(function(e,a){e.updateLayout(t,a)},this)},n.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=Qo(t),this._lineData=null,this.group.removeAll()},n.prototype.incrementalUpdate=function(t,e){this._progressiveEls=[];function a(s){!s.isGroup&&!Th(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var i=t.start;i0}function Qo(n){var t=n.hostModel,e=t.getModel("emphasis");return{lineStyle:t.getModel("lineStyle").getLineStyle(),emphasisLineStyle:e.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:t.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:t.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:e.get("disabled"),blurScope:e.get("blurScope"),focus:e.get("focus"),labelStatesModels:Ae(t)}}function $o(n){return isNaN(n[0])||isNaN(n[1])}function Aa(n){return n&&!$o(n[0])&&!$o(n[1])}const Na=Ch;var Ea=[],Pa=[],Ra=[],dt=Xi,Va=Qs,Jo=Math.abs;function er(n,t,e){for(var a=n[0],i=n[1],o=n[2],r=1/0,s,l=e*e,u=.1,d=.1;d<=.9;d+=.1){Ea[0]=dt(a[0],i[0],o[0],d),Ea[1]=dt(a[1],i[1],o[1],d);var h=Jo(Va(Ea,t)-l);h=0?s=s+u:s=s-u:g>=0?s=s-u:s=s+u}return s}function ka(n,t){var e=[],a=Ks,i=[[],[],[]],o=[[],[]],r=[];t/=2,n.eachEdge(function(s,l){var u=s.getLayout(),d=s.getVisual("fromSymbol"),h=s.getVisual("toSymbol");u.__original||(u.__original=[Xe(u[0]),Xe(u[1])],u[2]&&u.__original.push(Xe(u[2])));var c=u.__original;if(u[2]!=null){if(ge(i[0],c[0]),ge(i[1],c[2]),ge(i[2],c[1]),d&&d!=="none"){var p=Et(s.node1),g=er(i,c[0],p*t);a(i[0][0],i[1][0],i[2][0],g,e),i[0][0]=e[3],i[1][0]=e[4],a(i[0][1],i[1][1],i[2][1],g,e),i[0][1]=e[3],i[1][1]=e[4]}if(h&&h!=="none"){var p=Et(s.node2),g=er(i,c[1],p*t);a(i[0][0],i[1][0],i[2][0],g,e),i[1][0]=e[1],i[2][0]=e[2],a(i[0][1],i[1][1],i[2][1],g,e),i[1][1]=e[1],i[2][1]=e[2]}ge(u[0],i[0]),ge(u[1],i[2]),ge(u[2],i[1])}else{if(ge(o[0],c[0]),ge(o[1],c[1]),rt(r,o[1],o[0]),_t(r,r),d&&d!=="none"){var p=Et(s.node1);En(o[0],o[0],r,p*t)}if(h&&h!=="none"){var p=Et(s.node2);En(o[1],o[1],r,-p*t)}ge(u[0],o[0]),ge(u[1],o[1])}})}function tr(n){return n.type==="view"}var Ah=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,a){var i=new Gn,o=new Na,r=this.group;this._controller=new Mn(a.getZr()),this._controllerHost={target:r},r.add(i.group),r.add(o.group),this._symbolDraw=i,this._lineDraw=o,this._firstRender=!0},t.prototype.render=function(e,a,i){var o=this,r=e.coordinateSystem;this._model=e;var s=this._symbolDraw,l=this._lineDraw,u=this.group;if(tr(r)){var d={x:r.x,y:r.y,scaleX:r.scaleX,scaleY:r.scaleY};this._firstRender?u.attr(d):se(u,d,e)}ka(e.getGraph(),Nt(e));var h=e.getData();s.updateData(h);var c=e.getEdgeData();l.updateData(c),this._updateNodeAndLinkScale(),this._updateController(e,a,i),clearTimeout(this._layoutTimeout);var p=e.forceLayout,g=e.get(["force","layoutAnimation"]);p&&this._startForceLayoutIteration(p,g);var f=e.get("layout");h.graph.eachNode(function(v){var I=v.dataIndex,_=v.getGraphicEl(),b=v.getModel();if(_){_.off("drag").off("dragend");var w=b.get("draggable");w&&_.on("drag",function(S){switch(f){case"force":p.warmUp(),!o._layouting&&o._startForceLayoutIteration(p,g),p.setFixed(I),h.setItemLayout(I,[_.x,_.y]);break;case"circular":h.setItemLayout(I,[_.x,_.y]),v.setLayout({fixed:!0},!0),Sa(e,"symbolSize",v,[S.offsetX,S.offsetY]),o.updateLayout(e);break;case"none":default:h.setItemLayout(I,[_.x,_.y]),ba(e.getGraph(),e),o.updateLayout(e);break}}).on("dragend",function(){p&&p.setUnfixed(I)}),_.setDraggable(w,!!b.get("cursor"));var M=b.get(["emphasis","focus"]);M==="adjacency"&&(ae(_).focus=v.getAdjacentDataIndices())}}),h.graph.eachEdge(function(v){var I=v.getGraphicEl(),_=v.getModel().get(["emphasis","focus"]);I&&_==="adjacency"&&(ae(I).focus={edge:[v.dataIndex],node:[v.node1.dataIndex,v.node2.dataIndex]})});var y=e.get("layout")==="circular"&&e.get(["circular","rotateLabel"]),m=h.getLayout("cx"),x=h.getLayout("cy");h.graph.eachNode(function(v){Yo(v,y,m,x)}),this._firstRender=!1},t.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype._startForceLayoutIteration=function(e,a){var i=this;(function o(){e.step(function(r){i.updateLayout(i._model),(i._layouting=!r)&&(a?i._layoutTimeout=setTimeout(o,16):o())})})()},t.prototype._updateController=function(e,a,i){var o=this,r=this._controller,s=this._controllerHost,l=this.group;if(r.setPointerChecker(function(u,d,h){var c=l.getBoundingRect();return c.applyTransform(l.transform),c.contain(d,h)&&!Ti(u,i,e)}),!tr(e.coordinateSystem)){r.disable();return}r.enable(e.get("roam")),s.zoomLimit=e.get("scaleLimit"),s.zoom=e.coordinateSystem.getZoom(),r.off("pan").off("zoom").on("pan",function(u){Ai(s,u.dx,u.dy),i.dispatchAction({seriesId:e.id,type:"graphRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){Ni(s,u.scale,u.originX,u.originY),i.dispatchAction({seriesId:e.id,type:"graphRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),o._updateNodeAndLinkScale(),ka(e.getGraph(),Nt(e)),o._lineDraw.updateLayout(),i.updateLabelLayout()})},t.prototype._updateNodeAndLinkScale=function(){var e=this._model,a=e.getData(),i=Nt(e);a.eachItemGraphicEl(function(o,r){o&&o.setSymbolScale(i)})},t.prototype.updateLayout=function(e){ka(e.getGraph(),Nt(e)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},t.prototype.remove=function(){clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},t.type="graph",t}(he);const Nh=Ah;function ht(n){return"_EC_"+n}var Eh=function(){function n(t){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=t||!1}return n.prototype.isDirected=function(){return this._directed},n.prototype.addNode=function(t,e){t=t==null?""+e:""+t;var a=this._nodesMap;if(!a[ht(t)]){var i=new et(t,e);return i.hostGraph=this,this.nodes.push(i),a[ht(t)]=i,i}},n.prototype.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},n.prototype.getNodeById=function(t){return this._nodesMap[ht(t)]},n.prototype.addEdge=function(t,e,a){var i=this._nodesMap,o=this._edgesMap;if(We(t)&&(t=this.nodes[t]),We(e)&&(e=this.nodes[e]),t instanceof et||(t=i[ht(t)]),e instanceof et||(e=i[ht(e)]),!(!t||!e)){var r=t.id+"-"+e.id,s=new nr(t,e,a);return s.hostGraph=this,this._directed&&(t.outEdges.push(s),e.inEdges.push(s)),t.edges.push(s),t!==e&&e.edges.push(s),this.edges.push(s),o[r]=s,s}},n.prototype.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},n.prototype.getEdge=function(t,e){t instanceof et&&(t=t.id),e instanceof et&&(e=e.id);var a=this._edgesMap;return this._directed?a[t+"-"+e]:a[t+"-"+e]||a[e+"-"+t]},n.prototype.eachNode=function(t,e){for(var a=this.nodes,i=a.length,o=0;o=0&&t.call(e,a[o],o)},n.prototype.eachEdge=function(t,e){for(var a=this.edges,i=a.length,o=0;o=0&&a[o].node1.dataIndex>=0&&a[o].node2.dataIndex>=0&&t.call(e,a[o],o)},n.prototype.breadthFirstTraverse=function(t,e,a,i){if(e instanceof et||(e=this._nodesMap[ht(e)]),!!e){for(var o=a==="out"?"outEdges":a==="in"?"inEdges":"edges",r=0;r=0&&l.node2.dataIndex>=0});for(var o=0,r=i.length;o=0&&this[n][t].setItemVisual(this.dataIndex,e,a)},getVisual:function(e){return this[n][t].getItemVisual(this.dataIndex,e)},setLayout:function(e,a){this.dataIndex>=0&&this[n][t].setItemLayout(this.dataIndex,e,a)},getLayout:function(){return this[n][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[n][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[n][t].getRawIndex(this.dataIndex)}}}st(et,ar("hostGraph","data")),st(nr,ar("hostGraph","edgeData"));const Ph=Eh;function ir(n,t,e,a,i){for(var o=new Ph(a),r=0;r "+c)),u++)}var p=e.get("coordinateSystem"),g;if(p==="cartesian2d"||p==="polar")g=It(n,e);else{var f=Yi.get(p),y=f?f.dimensions||[]:[];_e(y,"value")<0&&y.concat(["value"]);var m=Tn(n,{coordDimensions:y,encodeDefine:e.getEncode()}).dimensions;g=new Ie(m,e),g.initData(n)}var x=new Ie(["value"],e);return x.initData(l,s),i&&i(g,x),_o({mainData:g,struct:o,structAttr:"graph",datas:{node:g,edge:x},datasAttr:{node:"data",edge:"edgeData"}}),o.update(),o}var Rh=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return t.prototype.init=function(e){n.prototype.init.apply(this,arguments);var a=this;function i(){return a._categoriesData}this.legendVisualProvider=new Bn(i,i),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},t.prototype.mergeOption=function(e){n.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},t.prototype.mergeDefaultAndTheme=function(e){n.prototype.mergeDefaultAndTheme.apply(this,arguments),Fn(e,"edgeLabel",["show"])},t.prototype.getInitialData=function(e,a){var i=e.edges||e.links||[],o=e.data||e.nodes||[],r=this;if(o&&i){gh(this);var s=ir(o,i,this,!0,l);return E(s.edges,function(u){yh(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,d){u.wrapMethod("getItemModel",function(g){var f=r._categoriesModels,y=g.getShallow("category"),m=f[y];return m&&(m.parentModel=g.parentModel,g.parentModel=m),g});var h=Be.prototype.getModel;function c(g,f){var y=h.call(this,g,f);return y.resolveParentPath=p,y}d.wrapMethod("getItemModel",function(g){return g.resolveParentPath=p,g.getModel=c,g});function p(g){if(g&&(g[0]==="label"||g[1]==="label")){var f=g.slice();return g[0]==="label"?f[0]="edgeLabel":g[1]==="label"&&(f[1]="edgeLabel"),f}return g}}},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.getCategoriesData=function(){return this._categoriesData},t.prototype.formatTooltip=function(e,a,i){if(i==="edge"){var o=this.getData(),r=this.getDataParams(e,i),s=o.graph.getEdgeByIndex(e),l=o.getName(s.node1.dataIndex),u=o.getName(s.node2.dataIndex),d=[];return l!=null&&d.push(l),u!=null&&d.push(u),Ve("nameValue",{name:d.join(" > "),value:r.value,noValue:r.value==null})}var h=$s({series:this,dataIndex:e,multipleSeries:a});return h},t.prototype._updateCategoriesData=function(){var e=F(this.option.categories||[],function(i){return i.value!=null?i:W({value:0},i)}),a=new Ie(["value"],this);a.initData(e),this._categoriesData=a,this._categoriesModels=a.mapArray(function(i){return a.getItemModel(i)})},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.isAnimationEnabled=function(){return n.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},t.type="series.graph",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},t}(pe);const Vh=Rh;var kh={type:"graphRoam",event:"graphRoam",update:"none"};function zh(n){n.registerChartView(Nh),n.registerSeriesModel(Vh),n.registerProcessor(dh),n.registerVisual(hh),n.registerVisual(ch),n.registerLayout(vh),n.registerLayout(n.PRIORITY.VISUAL.POST_CHART_LAYOUT,xh),n.registerLayout(Ih),n.registerCoordinateSystem("graphView",{dimensions:Ln.dimensions,create:wh}),n.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},yt),n.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},yt),n.registerAction(kh,function(t,e,a){e.eachComponent({mainType:"series",query:t},function(i){var o=i.coordinateSystem,r=Ri(o,t,void 0,a);i.setCenter&&i.setCenter(r.center),i.setZoom&&i.setZoom(r.zoom)})})}var Oh=["itemStyle","opacity"],Gh=function(n){V(t,n);function t(e,a){var i=n.call(this)||this,o=i,r=new Hn,s=new Ft;return o.setTextContent(s),i.setTextGuideLine(r),i.updateData(e,a,!0),i}return t.prototype.updateData=function(e,a,i){var o=this,r=e.hostModel,s=e.getItemModel(a),l=e.getItemLayout(a),u=s.getModel("emphasis"),d=s.get(Oh);d=d!=null?d:1,i||lt(o),o.useStyle(e.getItemVisual(a,"style")),o.style.lineJoin="round",i?(o.setShape({points:l.points}),o.style.opacity=0,Te(o,{style:{opacity:d}},r,a)):se(o,{style:{opacity:d},shape:{points:l.points}},r,a),Re(o,s),this._updateLabel(e,a),fe(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(e,a){var i=this,o=this.getTextGuideLine(),r=i.getTextContent(),s=e.hostModel,l=e.getItemModel(a),u=e.getItemLayout(a),d=u.label,h=e.getItemVisual(a,"style"),c=h.fill;Fe(r,Ae(l),{labelFetcher:e.hostModel,labelDataIndex:a,defaultOpacity:h.opacity,defaultText:e.getName(a)},{normal:{align:d.textAlign,verticalAlign:d.verticalAlign}}),i.setTextConfig({local:!0,inside:!!d.inside,insideStroke:c,outsideFill:c});var p=d.linePoints;o.setShape({points:p}),i.textGuideLineConfig={anchor:p?new Ye(p[0][0],p[0][1]):null},se(r,{style:{x:d.x,y:d.y}},s,a),r.attr({rotation:d.rotation,originX:d.x,originY:d.y,z2:10}),Li(i,Di(l),{stroke:c})},t}(vt),Bh=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.ignoreLabelLineUpdate=!0,e}return t.prototype.render=function(e,a,i){var o=e.getData(),r=this._data,s=this.group;o.diff(r).add(function(l){var u=new Gh(o,l);o.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var d=r.getItemGraphicEl(u);d.updateData(o,l),s.add(d),o.setItemGraphicEl(l,d)}).remove(function(l){var u=r.getItemGraphicEl(l);Js(u,e,l)}).execute(),this._data=o},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.prototype.dispose=function(){},t.type="funnel",t}(he);const Fh=Bh;var Hh=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e){n.prototype.init.apply(this,arguments),this.legendVisualProvider=new Bn(re(this.getData,this),re(this.getRawData,this)),this._defaultLabelLine(e)},t.prototype.getInitialData=function(e,a){return Zi(this,{coordDimensions:["value"],encodeDefaulter:te(el,this)})},t.prototype._defaultLabelLine=function(e){Fn(e,"labelLine",["show"]);var a=e.labelLine,i=e.emphasis.labelLine;a.show=a.show&&e.label.show,i.show=i.show&&e.emphasis.label.show},t.prototype.getDataParams=function(e){var a=this.getData(),i=n.prototype.getDataParams.call(this,e),o=a.mapDimension("value"),r=a.getSum(o);return i.percent=r?+(a.get(o,e)/r*100).toFixed(2):0,i.$vars.push("percent"),i},t.type="series.funnel",t.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},t}(pe);const Wh=Hh;function Xh(n,t){return it(n.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function Yh(n,t){for(var e=n.mapDimension("value"),a=n.mapArray(e,function(l){return l}),i=[],o=t==="ascending",r=0,s=n.count();r=0&&(s[r[l].depth]=new Be(r[l],this,a));if(o&&i){var u=ir(o,i,this,!0,d);return u.data}function d(h,c){h.wrapMethod("getItemModel",function(p,g){var f=p.parentModel,y=f.getData().getItemLayout(g);if(y){var m=y.depth,x=f.levelModels[m];x&&(p.parentModel=x)}return p}),c.wrapMethod("getItemModel",function(p,g){var f=p.parentModel,y=f.getGraph().getEdgeByIndex(g),m=y.node1.getLayout();if(m){var x=m.depth,v=f.levelModels[x];v&&(p.parentModel=v)}return p})}},t.prototype.setNodePosition=function(e,a){var i=this.option.data||this.option.nodes,o=i[e];o.localX=a[0],o.localY=a[1]},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.formatTooltip=function(e,a,i){function o(p){return isNaN(p)||p==null}if(i==="edge"){var r=this.getDataParams(e,i),s=r.data,l=r.value,u=s.source+" -- "+s.target;return Ve("nameValue",{name:u,value:l,noValue:o(l)})}else{var d=this.getGraph().getNodeByIndex(e),h=d.getLayout().value,c=this.getDataParams(e,i).data.name;return Ve("nameValue",{name:c!=null?c+"":null,value:h,noValue:o(h)})}},t.prototype.optionUpdated=function(){},t.prototype.getDataParams=function(e,a){var i=n.prototype.getDataParams.call(this,e,a);if(i.value==null&&a==="node"){var o=this.getGraph().getNodeByIndex(e),r=o.getLayout().value;i.value=r}return i},t.type="series.sankey",t.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},t}(pe);const fc=pc;function gc(n,t){n.eachSeriesByType("sankey",function(e){var a=e.get("nodeWidth"),i=e.get("nodeGap"),o=yc(e,t);e.layoutInfo=o;var r=o.width,s=o.height,l=e.getGraph(),u=l.nodes,d=l.edges;mc(u);var h=De(u,function(f){return f.getLayout().value===0}),c=h.length!==0?0:e.get("layoutIterations"),p=e.get("orient"),g=e.get("nodeAlign");vc(u,d,a,i,r,s,c,p,g)})}function yc(n,t){return it(n.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function vc(n,t,e,a,i,o,r,s,l){xc(n,t,e,i,o,s,l),wc(n,t,o,i,a,r,s),Ec(n,s)}function mc(n){E(n,function(t){var e=Ue(t.outEdges,ln),a=Ue(t.inEdges,ln),i=t.getValue()||0,o=Math.max(e,a,i);t.setLayout({value:o},!0)})}function xc(n,t,e,a,i,o,r){for(var s=[],l=[],u=[],d=[],h=0,c=0;c=0;m&&y.depth>p&&(p=y.depth),f.setLayout({depth:m?y.depth:h},!0),o==="vertical"?f.setLayout({dy:e},!0):f.setLayout({dx:e},!0);for(var x=0;xh-1?p:h-1;r&&r!=="left"&&_c(n,r,o,w);var M=o==="vertical"?(i-e)/w:(a-e)/w;bc(n,M,o)}function ur(n){var t=n.hostGraph.data.getRawDataItem(n.dataIndex);return t.depth!=null&&t.depth>=0}function _c(n,t,e,a){if(t==="right"){for(var i=[],o=n,r=0;o.length;){for(var s=0;s0;o--)l*=.99,Lc(s,l,r),Oa(s,i,e,a,r),Nc(s,l,r),Oa(s,i,e,a,r)}function Sc(n,t){var e=[],a=t==="vertical"?"y":"x",i=Xn(n,function(o){return o.getLayout()[a]});return i.keys.sort(function(o,r){return o-r}),E(i.keys,function(o){e.push(i.buckets.get(o))}),e}function Mc(n,t,e,a,i,o){var r=1/0;E(n,function(s){var l=s.length,u=0;E(s,function(h){u+=h.getLayout().value});var d=o==="vertical"?(a-(l-1)*i)/u:(e-(l-1)*i)/u;d0&&(s=l.getLayout()[o]+u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),d=l.getLayout()[o]+l.getLayout()[c]+t;var g=i==="vertical"?a:e;if(u=d-t-g,u>0){s=l.getLayout()[o]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),d=s;for(var p=h-2;p>=0;--p)l=r[p],u=l.getLayout()[o]+l.getLayout()[c]+t-d,u>0&&(s=l.getLayout()[o]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),d=l.getLayout()[o]}})}function Lc(n,t,e){E(n.slice().reverse(),function(a){E(a,function(i){if(i.outEdges.length){var o=Ue(i.outEdges,Dc,e)/Ue(i.outEdges,ln);if(isNaN(o)){var r=i.outEdges.length;o=r?Ue(i.outEdges,Cc,e)/r:0}if(e==="vertical"){var s=i.getLayout().x+(o-Ze(i,e))*t;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(o-Ze(i,e))*t;i.setLayout({y:l},!0)}}})})}function Dc(n,t){return Ze(n.node2,t)*n.getValue()}function Cc(n,t){return Ze(n.node2,t)}function Tc(n,t){return Ze(n.node1,t)*n.getValue()}function Ac(n,t){return Ze(n.node1,t)}function Ze(n,t){return t==="vertical"?n.getLayout().x+n.getLayout().dx/2:n.getLayout().y+n.getLayout().dy/2}function ln(n){return n.getValue()}function Ue(n,t,e){for(var a=0,i=n.length,o=-1;++or&&(r=l)}),E(a,function(s){var l=new Bi({type:"color",mappingMethod:"linear",dataExtent:[o,r],visual:t.get("color")}),u=l.mapValueToVisual(s.getLayout().value),d=s.getModel().get(["itemStyle","color"]);d!=null?(s.setVisual("color",d),s.setVisual("style",{fill:d})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}i.length&&E(i,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function Rc(n){n.registerChartView(cc),n.registerSeriesModel(fc),n.registerLayout(gc),n.registerVisual(Pc),n.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(t,e){e.eachComponent({mainType:"series",subType:"sankey",query:t},function(a){a.setNodePosition(t.dataIndex,[t.localX,t.localY])})})}var dr=function(){function n(){}return n.prototype.getInitialData=function(t,e){var a,i=e.getComponent("xAxis",this.get("xAxisIndex")),o=e.getComponent("yAxis",this.get("yAxisIndex")),r=i.get("type"),s=o.get("type"),l;r==="category"?(t.layout="horizontal",a=i.getOrdinalMeta(),l=!0):s==="category"?(t.layout="vertical",a=o.getOrdinalMeta(),l=!0):t.layout=t.layout||"horizontal";var u=["x","y"],d=t.layout==="horizontal"?0:1,h=this._baseAxisDim=u[d],c=u[1-d],p=[i,o],g=p[d].get("type"),f=p[1-d].get("type"),y=t.data;if(y&&l){var m=[];E(y,function(I,_){var b;G(I)?(b=I.slice(),I.unshift(_)):G(I.value)?(b=W({},I),b.value=b.value.slice(),I.value.unshift(_)):b=I,m.push(b)}),t.data=m}var x=this.defaultValueDimensions,v=[{name:h,type:Yn(g),ordinalMeta:a,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:c,type:Yn(f),dimsDef:x.slice()}];return Zi(this,{coordDimensions:v,dimensionsCount:x.length+1,encodeDefaulter:te(il,v,this)})},n.prototype.getBaseAxis=function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis},n}(),hr=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],e.visualDrawType="stroke",e}return t.type="series.boxplot",t.dependencies=["xAxis","yAxis","grid"],t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},t}(pe);st(hr,dr,!0);const Vc=hr;var kc=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,i){var o=e.getData(),r=this.group,s=this._data;this._data||r.removeAll();var l=e.get("layout")==="horizontal"?1:0;o.diff(s).add(function(u){if(o.hasValue(u)){var d=o.getItemLayout(u),h=cr(d,o,u,l,!0);o.setItemGraphicEl(u,h),r.add(h)}}).update(function(u,d){var h=s.getItemGraphicEl(d);if(!o.hasValue(u)){r.remove(h);return}var c=o.getItemLayout(u);h?(lt(h),pr(c,h,o,u)):h=cr(c,o,u,l),r.add(h),o.setItemGraphicEl(u,h)}).remove(function(u){var d=s.getItemGraphicEl(u);d&&r.remove(d)}).execute(),this._data=o},t.prototype.remove=function(e){var a=this.group,i=this._data;this._data=null,i&&i.eachItemGraphicEl(function(o){o&&a.remove(o)})},t.type="boxplot",t}(he),zc=function(){function n(){}return n}(),Oc=function(n){V(t,n);function t(e){var a=n.call(this,e)||this;return a.type="boxplotBoxPath",a}return t.prototype.getDefaultShape=function(){return new zc},t.prototype.buildPath=function(e,a){var i=a.points,o=0;for(e.moveTo(i[o][0],i[o][1]),o++;o<4;o++)e.lineTo(i[o][0],i[o][1]);for(e.closePath();of){var I=[m,v];a.push(I)}}}return{boxData:e,outliers:a}}var Zc={type:"echarts:boxplot",transform:function(n){var t=n.upstream;if(t.sourceFormat!==ji){var e="";J(e)}var a=Yc(t.getRawData(),n.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:a.boxData},{data:a.outliers}]}};function Uc(n){n.registerSeriesModel(Vc),n.registerChartView(Bc),n.registerLayout(Fc),n.registerTransform(Zc)}var jc=["color","borderColor"],qc=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,i){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(e),this._isLargeDraw?this._renderLarge(e):this._renderNormal(e)},t.prototype.incrementalPrepareRender=function(e,a,i){this._clear(),this._updateDrawMode(e)},t.prototype.incrementalRender=function(e,a,i,o){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(e,a):this._incrementalRenderNormal(e,a)},t.prototype.eachRendered=function(e){Yt(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var a=e.pipelineContext.large;(this._isLargeDraw==null||a!==this._isLargeDraw)&&(this._isLargeDraw=a,this._clear())},t.prototype._renderNormal=function(e){var a=e.getData(),i=this._data,o=this.group,r=a.getLayout("isSimpleBox"),s=e.get("clip",!0),l=e.coordinateSystem,u=l.getArea&&l.getArea();this._data||o.removeAll(),a.diff(i).add(function(d){if(a.hasValue(d)){var h=a.getItemLayout(d);if(s&&fr(u,h))return;var c=Ga(h,d,!0);Te(c,{shape:{points:h.ends}},e,d),Ba(c,a,d,r),o.add(c),a.setItemGraphicEl(d,c)}}).update(function(d,h){var c=i.getItemGraphicEl(h);if(!a.hasValue(d)){o.remove(c);return}var p=a.getItemLayout(d);if(s&&fr(u,p)){o.remove(c);return}c?(se(c,{shape:{points:p.ends}},e,d),lt(c)):c=Ga(p),Ba(c,a,d,r),o.add(c),a.setItemGraphicEl(d,c)}).remove(function(d){var h=i.getItemGraphicEl(d);h&&o.remove(h)}).execute(),this._data=a},t.prototype._renderLarge=function(e){this._clear(),gr(e,this.group);var a=e.get("clip",!0)?jn(e.coordinateSystem,!1,e):null;a?this.group.setClipPath(a):this.group.removeClipPath()},t.prototype._incrementalRenderNormal=function(e,a){for(var i=a.getData(),o=i.getLayout("isSimpleBox"),r;(r=e.next())!=null;){var s=i.getItemLayout(r),l=Ga(s);Ba(l,i,r,o),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},t.prototype._incrementalRenderLarge=function(e,a){gr(a,this.group,this._progressiveEls,!0)},t.prototype.remove=function(e){this._clear()},t.prototype._clear=function(){this.group.removeAll(),this._data=null},t.type="candlestick",t}(he),Kc=function(){function n(){}return n}(),Qc=function(n){V(t,n);function t(e){var a=n.call(this,e)||this;return a.type="normalCandlestickBox",a}return t.prototype.getDefaultShape=function(){return new Kc},t.prototype.buildPath=function(e,a){var i=a.points;this.__simpleBox?(e.moveTo(i[4][0],i[4][1]),e.lineTo(i[6][0],i[6][1])):(e.moveTo(i[0][0],i[0][1]),e.lineTo(i[1][0],i[1][1]),e.lineTo(i[2][0],i[2][1]),e.lineTo(i[3][0],i[3][1]),e.closePath(),e.moveTo(i[4][0],i[4][1]),e.lineTo(i[5][0],i[5][1]),e.moveTo(i[6][0],i[6][1]),e.lineTo(i[7][0],i[7][1]))},t}(ye);function Ga(n,t,e){var a=n.ends;return new Qc({shape:{points:e?$c(a,n):a},z2:100})}function fr(n,t){for(var e=!0,a=0;a0?"borderColor":"borderColor0"])||e.get(["itemStyle",n>0?"color":"color0"]);n===0&&(i=e.get(["itemStyle","borderColorDoji"]));var o=e.getModel("itemStyle").getItemStyle(jc);t.useStyle(o),t.style.fill=null,t.style.stroke=i}const ep=qc;var yr=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],e}return t.prototype.getShadowDim=function(){return"open"},t.prototype.brushSelector=function(e,a,i){var o=a.getItemLayout(e);return o&&i.rect(o.brushRect)},t.type="series.candlestick",t.dependencies=["xAxis","yAxis","grid"],t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderColorDoji:null,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},t}(pe);st(yr,dr,!0);const tp=yr;function np(n){!n||!G(n.series)||E(n.series,function(t){qn(t)&&t.type==="k"&&(t.type="candlestick")})}var ap=["itemStyle","borderColor"],ip=["itemStyle","borderColor0"],op=["itemStyle","borderColorDoji"],rp=["itemStyle","color"],sp=["itemStyle","color0"],lp={seriesType:"candlestick",plan:Kn(),performRawSeries:!0,reset:function(n,t){function e(o,r){return r.get(o>0?rp:sp)}function a(o,r){return r.get(o===0?op:o>0?ap:ip)}if(!t.isSeriesFiltered(n)){var i=n.pipelineContext.large;return!i&&{progress:function(o,r){for(var s;(s=o.next())!=null;){var l=r.getItemModel(s),u=r.getItemLayout(s).sign,d=l.getItemStyle();d.fill=e(u,l),d.stroke=a(u,l)||d.fill;var h=r.ensureUniqueItemVisual(s,"style");W(h,d)}}}}}};const up=lp;var dp={seriesType:"candlestick",plan:Kn(),reset:function(n){var t=n.coordinateSystem,e=n.getData(),a=hp(n,e),i=0,o=1,r=["x","y"],s=e.getDimensionIndex(e.mapDimension(r[i])),l=F(e.mapDimensionsAll(r[o]),e.getDimensionIndex,e),u=l[0],d=l[1],h=l[2],c=l[3];if(e.setLayout({candleWidth:a,isSimpleBox:a<=1.3}),s<0||l.length<4)return;return{progress:n.pipelineContext.large?g:p};function p(f,y){for(var m,x=y.getStore();(m=f.next())!=null;){var v=x.get(s,m),I=x.get(u,m),_=x.get(d,m),b=x.get(h,m),w=x.get(c,m),M=Math.min(I,_),S=Math.max(I,_),L=R(M,v),D=R(S,v),C=R(b,v),N=R(w,v),T=[];k(T,D,0),k(T,L,1),T.push(H(N),H(D),H(C),H(L));var A=y.getItemModel(m),P=!!A.get(["itemStyle","borderColorDoji"]);y.setItemLayout(m,{sign:vr(x,m,I,_,d,P),initBaseline:I>_?D[o]:L[o],ends:T,brushRect:z(b,w,v)})}function R(B,K){var Q=[];return Q[i]=K,Q[o]=B,isNaN(K)||isNaN(B)?[NaN,NaN]:t.dataToPoint(Q)}function k(B,K,Q){var q=K.slice(),ee=K.slice();q[i]=Qn(q[i]+a/2,1,!1),ee[i]=Qn(ee[i]-a/2,1,!0),Q?B.push(q,ee):B.push(ee,q)}function z(B,K,Q){var q=R(B,Q),ee=R(K,Q);return q[i]-=a/2,ee[i]-=a/2,{x:q[0],y:q[1],width:a,height:ee[1]-q[1]}}function H(B){return B[i]=Qn(B[i],1),B}}function g(f,y){for(var m=rl(f.count*4),x=0,v,I=[],_=[],b,w=y.getStore(),M=!!n.get(["itemStyle","borderColorDoji"]);(b=f.next())!=null;){var S=w.get(s,b),L=w.get(u,b),D=w.get(d,b),C=w.get(h,b),N=w.get(c,b);if(isNaN(S)||isNaN(C)||isNaN(N)){m[x++]=NaN,x+=3;continue}m[x++]=vr(w,b,L,D,d,M),I[i]=S,I[o]=C,v=t.dataToPoint(I,null,_),m[x++]=v?v[0]:NaN,m[x++]=v?v[1]:NaN,I[o]=N,v=t.dataToPoint(I,null,_),m[x++]=v?v[1]:NaN}y.setLayout("largePoints",m)}}};function vr(n,t,e,a,i,o){var r;return e>a?r=-1:e0?n.get(i,t-1)<=a?1:-1:1,r}function hp(n,t){var e=n.getBaseAxis(),a,i=e.type==="category"?e.getBandWidth():(a=e.getExtent(),Math.abs(a[1]-a[0])/t.count()),o=Z(Ge(n.get("barMaxWidth"),i),i),r=Z(Ge(n.get("barMinWidth"),1),i),s=n.get("barWidth");return s!=null?Z(s,i):Math.max(Math.min(i/2,o),r)}const cp=dp;function pp(n){n.registerChartView(ep),n.registerSeriesModel(tp),n.registerPreprocessor(np),n.registerVisual(up),n.registerLayout(cp)}function mr(n,t){var e=t.rippleEffectColor||t.color;n.eachChild(function(a){a.attr({z:t.z,zlevel:t.zlevel,style:{stroke:t.brushType==="stroke"?e:null,fill:t.brushType==="fill"?e:null}})})}var fp=function(n){V(t,n);function t(e,a){var i=n.call(this)||this,o=new Ei(e,a),r=new oe;return i.add(o),i.add(r),i.updateData(e,a),i}return t.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},t.prototype.startEffectAnimation=function(e){for(var a=e.symbolType,i=e.color,o=e.rippleNumber,r=this.childAt(1),s=0;s0&&(s=this._getLineLength(o)/d*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){o.stopAnimation();var c=void 0;ie(h)?c=h(i):c=h,o.__t>0&&(c=-s*o.__t),this._animateSymbol(o,s,c,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},t.prototype._animateSymbol=function(e,a,i,o,r){if(a>0){e.__t=0;var s=this,l=e.animate("",o).when(r?a*2:a,{__t:r?2:1}).delay(i).during(function(){s._updateSymbolPosition(e)});o||l.done(function(){s.remove(e)}),l.start()}},t.prototype._getLineLength=function(e){return bt(e.__p1,e.__cp1)+bt(e.__cp1,e.__p2)},t.prototype._updateAnimationPoints=function(e,a){e.__p1=a[0],e.__p2=a[1],e.__cp1=a[2]||[(a[0][0]+a[1][0])/2,(a[0][1]+a[1][1])/2]},t.prototype.updateData=function(e,a,i){this.childAt(0).updateData(e,a,i),this._updateEffectSymbol(e,a)},t.prototype._updateSymbolPosition=function(e){var a=e.__p1,i=e.__p2,o=e.__cp1,r=e.__t<1?e.__t:2-e.__t,s=[e.x,e.y],l=s.slice(),u=Xi,d=ll;s[0]=u(a[0],o[0],i[0],r),s[1]=u(a[1],o[1],i[1],r);var h=e.__t<1?d(a[0],o[0],i[0],r):d(i[0],o[0],a[0],1-r),c=e.__t<1?d(a[1],o[1],i[1],r):d(i[1],o[1],a[1],1-r);e.rotation=-Math.atan2(c,h)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(e.__lastT!==void 0&&e.__lastT=0&&!(o[l]<=a);l--);l=Math.min(l,r-2)}else{for(l=s;la);l++);l=Math.min(l-1,r-2)}var d=(a-o[l])/(o[l+1]-o[l]),h=i[l],c=i[l+1];e.x=h[0]*(1-d)+d*c[0],e.y=h[1]*(1-d)+d*c[1];var p=e.__t<1?c[0]-h[0]:h[0]-c[0],g=e.__t<1?c[1]-h[1]:h[1]-c[1];e.rotation=-Math.atan2(g,p)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=a,e.ignore=!1}},t}(xr);const Sp=wp;var Mp=function(){function n(){this.polyline=!1,this.curveness=0,this.segs=[]}return n}(),Lp=function(n){V(t,n);function t(e){var a=n.call(this,e)||this;return a._off=0,a.hoverDataIdx=-1,a}return t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new Mp},t.prototype.buildPath=function(e,a){var i=a.segs,o=a.curveness,r;if(a.polyline)for(r=this._off;r0){e.moveTo(i[r++],i[r++]);for(var l=1;l0){var p=(u+h)/2-(d-c)*o,g=(d+c)/2-(h-u)*o;e.quadraticCurveTo(p,g,h,c)}else e.lineTo(h,c)}this.incremental&&(this._off=r,this.notClear=!0)},t.prototype.findDataIndex=function(e,a){var i=this.shape,o=i.segs,r=i.curveness,s=this.style.lineWidth;if(i.polyline)for(var l=0,u=0;u0)for(var h=o[u++],c=o[u++],p=1;p0){var y=(h+g)/2-(c-f)*r,m=(c+f)/2-(g-h)*r;if(ul(h,c,y,m,g,f,s,e,a))return l}else if(Ki(h,c,g,f,s,e,a))return l;l++}return-1},t.prototype.contain=function(e,a){var i=this.transformCoordToLocal(e,a),o=this.getBoundingRect();if(e=i[0],a=i[1],o.contain(e,a)){var r=this.hoverDataIdx=this.findDataIndex(e,a);return r>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var a=this.shape,i=a.segs,o=1/0,r=1/0,s=-1/0,l=-1/0,u=0;u0&&(r.dataIndex=l+t.__startIndex)})},n.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},n}();const Cp=Dp;var Tp={seriesType:"lines",plan:Kn(),reset:function(n){var t=n.coordinateSystem;if(t){var e=n.get("polyline"),a=n.pipelineContext.large;return{progress:function(i,o){var r=[];if(a){var s=void 0,l=i.end-i.start;if(e){for(var u=0,d=i.start;d0&&(d||u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),r.updateData(o);var h=e.get("clip",!0)&&jn(e.coordinateSystem,!1,e);h?this.group.setClipPath(h):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},t.prototype.incrementalPrepareRender=function(e,a,i){var o=e.getData(),r=this._updateLineDraw(o,e);r.incrementalPrepareUpdate(o),this._clearLayer(i),this._finished=!1},t.prototype.incrementalRender=function(e,a,i){this._lineDraw.incrementalUpdate(e,a.getData()),this._finished=e.end===a.getData().count()},t.prototype.eachRendered=function(e){this._lineDraw&&this._lineDraw.eachRendered(e)},t.prototype.updateTransform=function(e,a,i){var o=e.getData(),r=e.pipelineContext;if(!this._finished||r.large||r.progressiveRender)return{update:!0};var s=Ir.reset(e,a,i);s.progress&&s.progress({start:0,end:o.count(),count:o.count()},o),this._lineDraw.updateLayout(),this._clearLayer(i)},t.prototype._updateLineDraw=function(e,a){var i=this._lineDraw,o=this._showEffect(a),r=!!a.get("polyline"),s=a.pipelineContext,l=s.large;return(!i||o!==this._hasEffet||r!==this._isPolyline||l!==this._isLargeDraw)&&(i&&i.remove(),i=this._lineDraw=l?new Cp:new Na(r?o?Sp:_r:o?xr:Ta),this._hasEffet=o,this._isPolyline=r,this._isLargeDraw=l),this.group.add(i.group),i},t.prototype._showEffect=function(e){return!!e.get(["effect","show"])},t.prototype._clearLayer=function(e){var a=e.getZr(),i=a.painter.getType()==="svg";!i&&this._lastZlevel!=null&&a.painter.getLayer(this._lastZlevel).clear(!0)},t.prototype.remove=function(e,a){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(a)},t.prototype.dispose=function(e,a){this.remove(e,a)},t.type="lines",t}(he);const Np=Ap;var Ep=typeof Uint32Array>"u"?Array:Uint32Array,Pp=typeof Float64Array>"u"?Array:Float64Array;function br(n){var t=n.data;t&&t[0]&&t[0][0]&&t[0][0].coord&&(n.data=F(t,function(e){var a=[e[0].coord,e[1].coord],i={coords:a};return e[0].name&&(i.fromName=e[0].name),e[1].name&&(i.toName=e[1].name),Qi([i,e[0],e[1]])}))}var Rp=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.visualStyleAccessPath="lineStyle",e.visualDrawType="stroke",e}return t.prototype.init=function(e){e.data=e.data||[],br(e);var a=this._processFlatCoordsArray(e.data);this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset,a.flatCoords&&(e.data=new Float32Array(a.count)),n.prototype.init.apply(this,arguments)},t.prototype.mergeOption=function(e){if(br(e),e.data){var a=this._processFlatCoordsArray(e.data);this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset,a.flatCoords&&(e.data=new Float32Array(a.count))}n.prototype.mergeOption.apply(this,arguments)},t.prototype.appendData=function(e){var a=this._processFlatCoordsArray(e.data);a.flatCoords&&(this._flatCoords?(this._flatCoords=Dn(this._flatCoords,a.flatCoords),this._flatCoordsOffset=Dn(this._flatCoordsOffset,a.flatCoordsOffset)):(this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset),e.data=new Float32Array(a.count)),this.getRawData().appendData(e.data)},t.prototype._getCoordsFromItemModel=function(e){var a=this.getData().getItemModel(e),i=a.option instanceof Array?a.option:a.getShallow("coords");return i},t.prototype.getLineCoordsCount=function(e){return this._flatCoordsOffset?this._flatCoordsOffset[e*2+1]:this._getCoordsFromItemModel(e).length},t.prototype.getLineCoords=function(e,a){if(this._flatCoordsOffset){for(var i=this._flatCoordsOffset[e*2],o=this._flatCoordsOffset[e*2+1],r=0;r ")})},t.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},t.prototype.getProgressive=function(){var e=this.option.progressive;return e!=null?e:this.option.large?1e4:this.get("progressive")},t.prototype.getProgressiveThreshold=function(){var e=this.option.progressiveThreshold;return e!=null?e:this.option.large?2e4:this.get("progressiveThreshold")},t.prototype.getZLevelKey=function(){var e=this.getModel("effect"),a=e.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:e.get("show")&&a>0?a+"":""},t.type="series.lines",t.dependencies=["grid","polar","geo","calendar"],t.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},t}(pe);const Vp=Rp;function un(n){return n instanceof Array||(n=[n,n]),n}var kp={seriesType:"lines",reset:function(n){var t=un(n.get("symbol")),e=un(n.get("symbolSize")),a=n.getData();a.setVisual("fromSymbol",t&&t[0]),a.setVisual("toSymbol",t&&t[1]),a.setVisual("fromSymbolSize",e&&e[0]),a.setVisual("toSymbolSize",e&&e[1]);function i(o,r){var s=o.getItemModel(r),l=un(s.getShallow("symbol",!0)),u=un(s.getShallow("symbolSize",!0));l[0]&&o.setItemVisual(r,"fromSymbol",l[0]),l[1]&&o.setItemVisual(r,"toSymbol",l[1]),u[0]&&o.setItemVisual(r,"fromSymbolSize",u[0]),u[1]&&o.setItemVisual(r,"toSymbolSize",u[1])}return{dataEach:a.hasItemOption?i:null}}};const zp=kp;function Op(n){n.registerChartView(Np),n.registerSeriesModel(Vp),n.registerLayout(Ir),n.registerVisual(zp)}var Gp=256,Bp=function(){function n(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var t=$n.createCanvas();this.canvas=t}return n.prototype.update=function(t,e,a,i,o,r){var s=this._getBrush(),l=this._getGradient(o,"inRange"),u=this._getGradient(o,"outOfRange"),d=this.pointSize+this.blurSize,h=this.canvas,c=h.getContext("2d"),p=t.length;h.width=e,h.height=a;for(var g=0;g0){var C=r(v)?l:u;v>0&&(v=v*L+M),_[b++]=C[D],_[b++]=C[D+1],_[b++]=C[D+2],_[b++]=C[D+3]*v*256}else b+=4}return c.putImageData(I,0,0),h},n.prototype._getBrush=function(){var t=this._brushCanvas||(this._brushCanvas=$n.createCanvas()),e=this.pointSize+this.blurSize,a=e*2;t.width=a,t.height=a;var i=t.getContext("2d");return i.clearRect(0,0,a,a),i.shadowOffsetX=a,i.shadowBlur=this.blurSize,i.shadowColor="#000",i.beginPath(),i.arc(-e,e,this.pointSize,0,Math.PI*2,!0),i.closePath(),i.fill(),t},n.prototype._getGradient=function(t,e){for(var a=this._gradientPixels,i=a[e]||(a[e]=new Uint8ClampedArray(256*4)),o=[0,0,0,0],r=0,s=0;s<256;s++)t[e](s/255,!0,o),i[r++]=o[0],i[r++]=o[1],i[r++]=o[2],i[r++]=o[3];return i},n}();const Fp=Bp;function Hp(n,t,e){var a=n[1]-n[0];t=F(t,function(r){return{interval:[(r.interval[0]-n[0])/a,(r.interval[1]-n[0])/a]}});var i=t.length,o=0;return function(r){var s;for(s=o;s=0;s--){var l=t[s].interval;if(l[0]<=r&&r<=l[1]){o=s;break}}return s>=0&&s=t[0]&&a<=t[1]}}function wr(n){var t=n.dimensions;return t[0]==="lng"&&t[1]==="lat"}var Xp=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,i){var o;a.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===e&&(o=s)})}),this._progressiveEls=null,this.group.removeAll();var r=e.coordinateSystem;r.type==="cartesian2d"||r.type==="calendar"?this._renderOnCartesianAndCalendar(e,i,0,e.getData().count()):wr(r)&&this._renderOnGeo(r,e,o,i)},t.prototype.incrementalPrepareRender=function(e,a,i){this.group.removeAll()},t.prototype.incrementalRender=function(e,a,i,o){var r=a.coordinateSystem;r&&(wr(r)?this.render(a,i,o):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(a,o,e.start,e.end,!0)))},t.prototype.eachRendered=function(e){Yt(this._progressiveEls||this.group,e)},t.prototype._renderOnCartesianAndCalendar=function(e,a,i,o,r){var s=e.coordinateSystem,l=Zt(s,"cartesian2d"),u,d,h,c;if(l){var p=s.getAxis("x"),g=s.getAxis("y");u=p.getBandWidth()+.5,d=g.getBandWidth()+.5,h=p.scale.getExtent(),c=g.scale.getExtent()}for(var f=this.group,y=e.getData(),m=e.getModel(["emphasis","itemStyle"]).getItemStyle(),x=e.getModel(["blur","itemStyle"]).getItemStyle(),v=e.getModel(["select","itemStyle"]).getItemStyle(),I=e.get(["itemStyle","borderRadius"]),_=Ae(e),b=e.getModel("emphasis"),w=b.get("focus"),M=b.get("blurScope"),S=b.get("disabled"),L=l?[y.mapDimension("x"),y.mapDimension("y"),y.mapDimension("value")]:[y.mapDimension("time"),y.mapDimension("value")],D=i;Dh[1]||Ac[1])continue;var P=s.dataToPoint([T,A]);C=new He({shape:{x:P[0]-u/2,y:P[1]-d/2,width:u,height:d},style:N})}else{if(isNaN(y.get(L[1],D)))continue;C=new He({z2:1,shape:s.dataToRect([y.get(L[0],D)]).contentShape,style:N})}if(y.hasItemOption){var R=y.getItemModel(D),k=R.getModel("emphasis");m=k.getModel("itemStyle").getItemStyle(),x=R.getModel(["blur","itemStyle"]).getItemStyle(),v=R.getModel(["select","itemStyle"]).getItemStyle(),I=R.get(["itemStyle","borderRadius"]),w=k.get("focus"),M=k.get("blurScope"),S=k.get("disabled"),_=Ae(R)}C.shape.r=I;var z=e.getRawValue(D),H="-";z&&z[2]!=null&&(H=z[2]+""),Fe(C,_,{labelFetcher:e,labelDataIndex:D,defaultOpacity:N.opacity,defaultText:H}),C.ensureState("emphasis").style=m,C.ensureState("blur").style=x,C.ensureState("select").style=v,fe(C,w,M,S),C.incremental=r,r&&(C.states.emphasis.hoverLayer=!0),f.add(C),y.setItemGraphicEl(D,C),this._progressiveEls&&this._progressiveEls.push(C)}},t.prototype._renderOnGeo=function(e,a,i,o){var r=i.targetVisuals.inRange,s=i.targetVisuals.outOfRange,l=a.getData(),u=this._hmLayer||this._hmLayer||new Fp;u.blurSize=a.get("blurSize"),u.pointSize=a.get("pointSize"),u.minOpacity=a.get("minOpacity"),u.maxOpacity=a.get("maxOpacity");var d=e.getViewRect().clone(),h=e.getRoamTransform();d.applyTransform(h);var c=Math.max(d.x,0),p=Math.max(d.y,0),g=Math.min(d.width+d.x,o.getWidth()),f=Math.min(d.height+d.y,o.getHeight()),y=g-c,m=f-p,x=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],v=l.mapArray(x,function(w,M,S){var L=e.dataToPoint([w,M]);return L[0]-=c,L[1]-=p,L.push(S),L}),I=i.getExtent(),_=i.type==="visualMap.continuous"?Wp(I,i.option.range):Hp(I,i.getPieceList(),i.option.selected);u.update(v,y,m,r.color.getNormalizer(),{inRange:r.color.getColorMapper(),outOfRange:s.color.getColorMapper()},_);var b=new $i({style:{width:y,height:m,x:c,y:p,image:u.canvas},silent:!0});this.group.add(b)},t.type="heatmap",t}(he);const Yp=Xp;var Zp=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(e,a){return It(null,this,{generateCoord:"value"})},t.prototype.preventIncremental=function(){var e=Yi.get(this.get("coordinateSystem"));if(e&&e.dimensions)return e.dimensions[0]==="lng"&&e.dimensions[1]==="lat"},t.type="series.heatmap",t.dependencies=["grid","geo","calendar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:"#212121"}}},t}(pe);const Up=Zp;function jp(n){n.registerChartView(Yp),n.registerSeriesModel(Up)}var qp=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e._layers=[],e}return t.prototype.render=function(e,a,i){var o=e.getData(),r=this,s=this.group,l=e.getLayerSeries(),u=o.getLayout("layoutInfo"),d=u.rect,h=u.boundaryGap;s.x=0,s.y=d.y+h[0];function c(y){return y.name}var p=new ot(this._layersSeries||[],l,c,c),g=[];p.add(re(f,this,"add")).update(re(f,this,"update")).remove(re(f,this,"remove")).execute();function f(y,m,x){var v=r._layers;if(y==="remove"){s.remove(v[m]);return}for(var I=[],_=[],b,w=l[m].indices,M=0;Mo&&(o=s),a.push(s)}for(var u=0;uo&&(o=h)}return{y0:i,max:o}}function nf(n){n.registerChartView(Qp),n.registerSeriesModel(Jp),n.registerLayout(ef),n.registerProcessor(Wn("themeRiver"))}var af=2,of=4,rf=function(n){V(t,n);function t(e,a,i,o){var r=n.call(this)||this;r.z2=af,r.textConfig={inside:!0},ae(r).seriesIndex=a.seriesIndex;var s=new Ft({z2:of,silent:e.getModel().get(["label","silent"])});return r.setTextContent(s),r.updateData(!0,e,a,i,o),r}return t.prototype.updateData=function(e,a,i,o,r){this.node=a,a.piece=this,i=i||this._seriesModel,o=o||this._ecModel;var s=this;ae(s).dataIndex=a.dataIndex;var l=a.getModel(),u=l.getModel("emphasis"),d=a.getLayout(),h=W({},d);h.label=null;var c=a.getVisual("style");c.lineJoin="bevel";var p=a.getVisual("decal");p&&(c.decal=eo(p,r));var g=to(l.getModel("itemStyle"),h,!0);W(h,g),E(Pn,function(x){var v=s.ensureState(x),I=l.getModel([x,"itemStyle"]);v.style=I.getItemStyle();var _=to(I,h);_&&(v.shape=_)}),e?(s.setShape(h),s.shape.r=d.r0,Te(s,{shape:{r:d.r}},i,a.dataIndex)):(se(s,{shape:h},i),lt(s)),s.useStyle(c),this._updateLabel(i);var f=l.getShallow("cursor");f&&s.attr("cursor",f),this._seriesModel=i||this._seriesModel,this._ecModel=o||this._ecModel;var y=u.get("focus"),m=y==="ancestor"?a.getAncestorsIndices():y==="descendant"?a.getDescendantIndices():y;fe(this,m,u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(e){var a=this,i=this.node.getModel(),o=i.getModel("label"),r=this.node.getLayout(),s=r.endAngle-r.startAngle,l=(r.startAngle+r.endAngle)/2,u=Math.cos(l),d=Math.sin(l),h=this,c=h.getTextContent(),p=this.node.dataIndex,g=o.get("minAngle")/180*Math.PI,f=o.get("show")&&!(g!=null&&Math.abs(s)T&&!cl(P-T)&&P0?(r.virtualPiece?r.virtualPiece.updateData(!1,x,e,a,i):(r.virtualPiece=new Mr(x,e,a,i),d.add(r.virtualPiece)),v.piece.off("click"),r.virtualPiece.on("click",function(I){r._rootToNode(v.parentNode)})):r.virtualPiece&&(d.remove(r.virtualPiece),r.virtualPiece=null)}},t.prototype._initEvents=function(){var e=this;this.group.off("click"),this.group.on("click",function(a){var i=!1,o=e.seriesModel.getViewRoot();o.eachNode(function(r){if(!i&&r.piece&&r.piece===a.target){var s=r.getModel().get("nodeClick");if(s==="rootToNode")e._rootToNode(r);else if(s==="link"){var l=r.getModel(),u=l.get("link");if(u){var d=l.get("target",!0)||"_blank";ki(u,d)}}i=!0}})})},t.prototype._rootToNode=function(e){e!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:Xa,from:this.uid,seriesId:this.seriesModel.id,targetNode:e})},t.prototype.containPoint=function(e,a){var i=a.getData(),o=i.getItemLayout(0);if(o){var r=e[0]-o.cx,s=e[1]-o.cy,l=Math.sqrt(r*r+s*s);return l<=o.r&&l>=o.r0}},t.type="sunburst",t}(he);const df=uf;var hf=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.ignoreStyleOnData=!0,e}return t.prototype.getInitialData=function(e,a){var i={name:e.name,children:e.data};Dr(i);var o=this._levelModels=F(e.levels||[],function(l){return new Be(l,this,a)},this),r=ca.createTree(i,this,s);function s(l){l.wrapMethod("getItemModel",function(u,d){var h=r.getNodeByDataIndex(d),c=o[h.depth];return c&&(u.parentModel=c),u})}return r.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.getDataParams=function(e){var a=n.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return a.treePathInfo=nn(i,this),a},t.prototype.getLevelModel=function(e){return this._levelModels&&this._levelModels[e.depth]},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var a=this.getRawData().tree.root;(!e||e!==a&&!a.contains(e))&&(this._viewRoot=a)},t.prototype.enableAriaDecal=function(){So(this)},t.type="series.sunburst",t.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},t}(pe);function Dr(n){var t=0;E(n.children,function(a){Dr(a);var i=a.value;G(i)&&(i=i[0]),t+=i});var e=n.value;G(e)&&(e=e[0]),(e==null||isNaN(e))&&(e=t),e<0&&(e=0),G(n.value)?n.value[0]=e:n.value=e}const cf=hf;var Cr=Math.PI/180;function pf(n,t,e){t.eachSeriesByType(n,function(a){var i=a.get("center"),o=a.get("radius");G(o)||(o=[0,o]),G(i)||(i=[i,i]);var r=e.getWidth(),s=e.getHeight(),l=Math.min(r,s),u=Z(i[0],r),d=Z(i[1],s),h=Z(o[0],l/2),c=Z(o[1],l/2),p=-a.get("startAngle")*Cr,g=a.get("minAngle")*Cr,f=a.getData().tree.root,y=a.getViewRoot(),m=y.depth,x=a.get("sort");x!=null&&Tr(y,x);var v=0;E(y.children,function(P){!isNaN(P.getValue())&&v++});var I=y.getValue(),_=Math.PI/(I||v)*2,b=y.depth>0,w=y.height-(b?-1:1),M=(c-h)/(w||1),S=a.get("clockwise"),L=a.get("stillShowZeroSum"),D=S?1:-1,C=function(P,R){if(P){var k=R;if(P!==f){var z=P.getValue(),H=I===0&&L?_:z*_;H1;)r=r.parentNode;var s=i.getColorFromPalette(r.name||r.dataIndex+"",t);return a.depth>1&&be(s)&&(s=pl(s,(a.depth-1)/(o-1)*.5)),s}n.eachSeriesByType("sunburst",function(a){var i=a.getData(),o=i.tree;o.eachNode(function(r){var s=r.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=e(r,a,o.root.height));var u=i.ensureUniqueItemVisual(r.dataIndex,"style");W(u,l)})})}function yf(n){n.registerChartView(df),n.registerSeriesModel(cf),n.registerLayout(te(pf,"sunburst")),n.registerProcessor(te(Wn,"sunburst")),n.registerVisual(gf),lf(n)}var Ar={color:"fill",borderColor:"stroke"},vf={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},ze=xe(),mf=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},t.prototype.getInitialData=function(e,a){return It(null,this)},t.prototype.getDataParams=function(e,a,i){var o=n.prototype.getDataParams.call(this,e,a);return i&&(o.info=ze(i).info),o},t.type="series.custom",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},t}(pe);const xf=mf;function _f(n,t){return t=t||[0,0],F(["x","y"],function(e,a){var i=this.getAxis(e),o=t[a],r=n[a]/2;return i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(o-r)-i.dataToCoord(o+r))},this)}function If(n){var t=n.master.getRect();return{coordSys:{type:"cartesian2d",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(e){return n.dataToPoint(e)},size:re(_f,n)}}}function bf(n,t){return t=t||[0,0],F([0,1],function(e){var a=t[e],i=n[e]/2,o=[],r=[];return o[e]=a-i,r[e]=a+i,o[1-e]=r[1-e]=t[1-e],Math.abs(this.dataToPoint(o)[e]-this.dataToPoint(r)[e])},this)}function wf(n){var t=n.getBoundingRect();return{coordSys:{type:"geo",x:t.x,y:t.y,width:t.width,height:t.height,zoom:n.getZoom()},api:{coord:function(e){return n.dataToPoint(e)},size:re(bf,n)}}}function Sf(n,t){var e=this.getAxis(),a=t instanceof Array?t[0]:t,i=(n instanceof Array?n[0]:n)/2;return e.type==="category"?e.getBandWidth():Math.abs(e.dataToCoord(a-i)-e.dataToCoord(a+i))}function Mf(n){var t=n.getRect();return{coordSys:{type:"singleAxis",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(e){return n.dataToPoint(e)},size:re(Sf,n)}}}function Lf(n,t){return t=t||[0,0],F(["Radius","Angle"],function(e,a){var i="get"+e+"Axis",o=this[i](),r=t[a],s=n[a]/2,l=o.type==="category"?o.getBandWidth():Math.abs(o.dataToCoord(r-s)-o.dataToCoord(r+s));return e==="Angle"&&(l=l*Math.PI/180),l},this)}function Df(n){var t=n.getRadiusAxis(),e=n.getAngleAxis(),a=t.getExtent();return a[0]>a[1]&&a.reverse(),{coordSys:{type:"polar",cx:n.cx,cy:n.cy,r:a[1],r0:a[0]},api:{coord:function(i){var o=t.dataToRadius(i[0]),r=e.dataToAngle(i[1]),s=n.coordToPoint([o,r]);return s.push(o,r*Math.PI/180),s},size:re(Lf,n)}}}function Cf(n){var t=n.getRect(),e=n.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:n.getCellWidth(),cellHeight:n.getCellHeight(),rangeInfo:{start:e.start,end:e.end,weeks:e.weeks,dayCount:e.allDay}},api:{coord:function(a,i){return n.dataToPoint(a,i)}}}}var Oe="emphasis",je="normal",Ya="blur",Za="select",qe=[je,Oe,Ya,Za],Ua={normal:["itemStyle"],emphasis:[Oe,"itemStyle"],blur:[Ya,"itemStyle"],select:[Za,"itemStyle"]},ja={normal:["label"],emphasis:[Oe,"label"],blur:[Ya,"label"],select:[Za,"label"]},Tf=["x","y"],Af="e\0\0",Se={normal:{},emphasis:{},blur:{},select:{}},Nf={cartesian2d:If,geo:wf,single:Mf,polar:Df,calendar:Cf};function qa(n){return n instanceof ye}function Ka(n){return n instanceof An}function Ef(n,t){t.copyTransform(n),Ka(t)&&Ka(n)&&(t.setStyle(n.style),t.z=n.z,t.z2=n.z2,t.zlevel=n.zlevel,t.invisible=n.invisible,t.ignore=n.ignore,qa(t)&&qa(n)&&t.setShape(n.shape))}var Pf=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,i,o){this._progressiveEls=null;var r=this._data,s=e.getData(),l=this.group,u=Er(e,s,a,i);r||l.removeAll(),s.diff(r).add(function(h){Ja(i,null,h,u(h,o),e,l,s)}).remove(function(h){var c=r.getItemGraphicEl(h);c&&ea(c,ze(c).option,e)}).update(function(h,c){var p=r.getItemGraphicEl(c);Ja(i,p,h,u(h,o),e,l,s)}).execute();var d=e.get("clip",!0)?jn(e.coordinateSystem,!1,e):null;d?l.setClipPath(d):l.removeClipPath(),this._data=s},t.prototype.incrementalPrepareRender=function(e,a,i){this.group.removeAll(),this._data=null},t.prototype.incrementalRender=function(e,a,i,o,r){var s=a.getData(),l=Er(a,s,i,o),u=this._progressiveEls=[];function d(p){p.isGroup||(p.incremental=!0,p.ensureState("emphasis").hoverLayer=!0)}for(var h=e.start;h=0?t.getStore().get(R,A):void 0}var k=t.get(P.name,A),z=P&&P.ordinalMeta;return z?z.categories[k]:k}function b(T,A){A==null&&(A=u);var P=t.getItemVisual(A,"style"),R=P&&P.fill,k=P&&P.opacity,z=x(A,je).getItemStyle();R!=null&&(z.fill=R),k!=null&&(z.opacity=k);var H={inheritColor:be(R)?R:"#000"},B=v(A,je),K=mt(B,null,H,!1,!0);K.text=B.getShallow("show")?Ge(n.getFormattedLabel(A,je),no(t,A)):null;var Q=ao(B,H,!1);return S(T,z),z=io(z,K,Q),T&&M(z,T),z.legacy=!0,z}function w(T,A){A==null&&(A=u);var P=x(A,Oe).getItemStyle(),R=v(A,Oe),k=mt(R,null,null,!0,!0);k.text=R.getShallow("show")?xt(n.getFormattedLabel(A,Oe),n.getFormattedLabel(A,je),no(t,A)):null;var z=ao(R,null,!0);return S(T,P),P=io(P,k,z),T&&M(P,T),P.legacy=!0,P}function M(T,A){for(var P in A)Ce(A,P)&&(T[P]=A[P])}function S(T,A){T&&(T.textFill&&(A.textFill=T.textFill),T.textPosition&&(A.textPosition=T.textPosition))}function L(T,A){if(A==null&&(A=u),Ce(Ar,T)){var P=t.getItemVisual(A,"style");return P?P[Ar[T]]:null}if(Ce(vf,T))return t.getItemVisual(A,T)}function D(T){if(o.type==="cartesian2d"){var A=o.getBaseAxis();return fl(ce({axis:A},T))}}function C(){return e.getCurrentSeriesIndices()}function N(T){return gl(T,e)}}function zf(n){var t={};return E(n.dimensions,function(e){var a=n.getDimensionInfo(e);if(!a.isExtraCoord){var i=a.coordDim,o=t[i]=t[i]||[];o[a.coordDimIndex]=n.getDimensionIndex(e)}}),t}function Ja(n,t,e,a,i,o,r){if(!a){o.remove(t);return}var s=ei(n,t,e,a,i,o);return s&&r.setItemGraphicEl(e,s),s&&fe(s,a.focus,a.blurScope,a.emphasisDisabled),s}function ei(n,t,e,a,i,o){var r=-1,s=t;t&&Pr(t,a,i)&&(r=_e(o.childrenRef(),t),t=null);var l=!t,u=t;u?u.clearStates():(u=Qa(a),s&&Ef(s,u)),a.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),Se.normal.cfg=Se.normal.conOpt=Se.emphasis.cfg=Se.emphasis.conOpt=Se.blur.cfg=Se.blur.conOpt=Se.select.cfg=Se.select.conOpt=null,Se.isLegacy=!1,Gf(u,e,a,i,l,Se),Of(u,e,a,i,l),$a(n,u,e,a,Se,i,l),Ce(a,"info")&&(ze(u).info=a.info);for(var d=0;d=0?o.replaceAt(u,r):o.add(u),u}function Pr(n,t,e){var a=ze(n),i=t.type,o=t.shape,r=t.style;return e.isUniversalTransitionEnabled()||i!=null&&i!==a.customGraphicType||i==="path"&&Xf(o)&&zr(o)!==a.customPathData||i==="image"&&Ce(r,"image")&&r.image!==a.customImagePath}function Of(n,t,e,a,i){var o=e.clipPath;if(o===!1)n&&n.getClipPath()&&n.removeClipPath();else if(o){var r=n.getClipPath();r&&Pr(r,o,a)&&(r=null),r||(r=Qa(o),n.setClipPath(r)),$a(null,r,t,o,null,a,i)}}function Gf(n,t,e,a,i,o){if(!n.isGroup){Rr(e,null,o),Rr(e,Oe,o);var r=o.normal.conOpt,s=o.emphasis.conOpt,l=o.blur.conOpt,u=o.select.conOpt;if(r!=null||s!=null||u!=null||l!=null){var d=n.getTextContent();if(r===!1)d&&n.removeTextContent();else{r=o.normal.conOpt=r||{type:"text"},d?d.clearStates():(d=Qa(r),n.setTextContent(d)),$a(null,d,t,r,null,a,i);for(var h=r&&r.style,c=0;c=d;p--){var g=t.childAt(p);Ff(t,g,i)}}}function Ff(n,t,e){t&&ea(t,ze(n).option,e)}function Hf(n){new ot(n.oldChildren,n.newChildren,Vr,Vr,n).add(kr).update(kr).remove(Wf).execute()}function Vr(n,t){var e=n&&n.name;return e!=null?e:Af+t}function kr(n,t){var e=this.context,a=n!=null?e.newChildren[n]:null,i=t!=null?e.oldChildren[t]:null;ei(e.api,i,e.dataIndex,a,e.seriesModel,e.group)}function Wf(n){var t=this.context,e=t.oldChildren[n];e&&ea(e,ze(e).option,t.seriesModel)}function zr(n){return n&&(n.pathData||n.d)}function Xf(n){return n&&(Ce(n,"pathData")||Ce(n,"d"))}function Yf(n){n.registerChartView(Rf),n.registerSeriesModel(xf)}function ni(n,t){t=t||{};var e=n.coordinateSystem,a=n.axis,i={},o=a.position,r=a.orient,s=e.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};i.position=[r==="vertical"?u.vertical[o]:l[0],r==="horizontal"?u.horizontal[o]:l[3]];var d={horizontal:0,vertical:1};i.rotation=Math.PI/2*d[r];var h={top:-1,bottom:1,right:1,left:-1};i.labelDirection=i.tickDirection=i.nameDirection=h[o],n.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),Ne(t.labelInside,n.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var c=t.rotate;return c==null&&(c=n.get(["axisLabel","rotate"])),i.labelRotation=o==="top"?-c:c,i.z2=1,i}var Zf=["axisLine","axisTickLabel","axisName"],Uf=["splitArea","splitLine"],jf=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.axisPointerClass="SingleAxisPointer",e}return t.prototype.render=function(e,a,i,o){var r=this.group;r.removeAll();var s=this._axisGroup;this._axisGroup=new oe;var l=ni(e),u=new wl(e,l);E(Zf,u.add,u),r.add(this._axisGroup),r.add(u.getGroup()),E(Uf,function(d){e.get([d,"show"])&&qf[d](this,this.group,this._axisGroup,e)},this),Sl(s,this._axisGroup,e),n.prototype.render.call(this,e,a,i,o)},t.prototype.remove=function(){Ml(this)},t.type="singleAxis",t}(oo),qf={splitLine:function(n,t,e,a){var i=a.axis;if(!i.scale.isBlank()){var o=a.getModel("splitLine"),r=o.getModel("lineStyle"),s=r.get("color");s=s instanceof Array?s:[s];for(var l=r.get("width"),u=a.coordinateSystem.getRect(),d=i.isHorizontal(),h=[],c=0,p=i.getTicksCoords({tickModel:o}),g=[],f=[],y=0;y=e.y&&t[1]<=e.y+e.height:a.contain(a.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},n.prototype.pointToData=function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t[e.orient==="horizontal"?0:1]))]},n.prototype.dataToPoint=function(t){var e=this.getAxis(),a=this.getRect(),i=[],o=e.orient==="horizontal"?0:1;return t instanceof Array&&(t=t[0]),i[o]=e.toGlobalCoord(e.dataToCoord(+t)),i[1-o]=o===0?a.y+a.height/2:a.x+a.width/2,i},n.prototype.convertToPixel=function(t,e,a){var i=Br(e);return i===this?this.dataToPoint(a):null},n.prototype.convertFromPixel=function(t,e,a){var i=Br(e);return i===this?this.pointToData(a):null},n}();function Br(n){var t=n.seriesModel,e=n.singleAxisModel;return e&&e.coordinateSystem||t&&t.coordinateSystem}function eg(n,t){var e=[];return n.eachComponent("singleAxis",function(a,i){var o=new Jf(a,n,t);o.name="single_"+i,o.resize(a,t),a.coordinateSystem=o,e.push(o)}),n.eachSeries(function(a){if(a.get("coordinateSystem")==="singleAxis"){var i=a.getReferringComponents("singleAxis",Ji).models[0];a.coordinateSystem=i&&i.coordinateSystem}}),e}var tg={create:eg,dimensions:Gr};const ng=tg;var Fr=["x","y"],ag=["width","height"],ig=function(n){V(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,a,i,o,r){var s=i.axis,l=s.coordinateSystem,u=ii(l,1-hn(s)),d=l.dataToPoint(a)[0],h=o.get("type");if(h&&h!=="none"){var c=Pl(o),p=og[h](s,d,u);p.style=c,e.graphicKey=p.type,e.pointer=p}var g=ni(i);Rl(a,e,g,i,o,r)},t.prototype.getHandleTransform=function(e,a,i){var o=ni(a,{labelInside:!1});o.labelMargin=i.get(["handle","margin"]);var r=Vl(a.axis,e,o);return{x:r[0],y:r[1],rotation:o.rotation+(o.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,a,i,o){var r=i.axis,s=r.coordinateSystem,l=hn(r),u=ii(s,l),d=[e.x,e.y];d[l]+=a[l],d[l]=Math.min(u[1],d[l]),d[l]=Math.max(u[0],d[l]);var h=ii(s,1-l),c=(h[1]+h[0])/2,p=[c,c];return p[l]=d[l],{x:d[0],y:d[1],rotation:e.rotation,cursorPoint:p,tooltipOption:{verticalAlign:"middle"}}},t}(kl),og={line:function(n,t,e){var a=zl([t,e[0]],[t,e[1]],hn(n));return{type:"Line",subPixelOptimize:!0,shape:a}},shadow:function(n,t,e){var a=n.getBandWidth(),i=e[1]-e[0];return{type:"Rect",shape:Ol([t-a/2,e[0]],[a,i],hn(n))}}};function hn(n){return n.isHorizontal()?0:1}function ii(n,t){var e=n.getRect();return[e[Fr[t]],e[Fr[t]]+e[ag[t]]]}const rg=ig;var sg=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.type="single",t}(jt);function lg(n){X(ro),oo.registerAxisPointerClass("SingleAxisPointer",rg),n.registerComponentView(sg),n.registerComponentView(Kf),n.registerComponentModel(ai),Gl(n,"single",ai,ai.defaultOption),n.registerCoordinateSystem("single",ng)}var ug=["rect","polygon","keep","clear"];function dg(n,t){var e=ke(n?n.brush:[]);if(e.length){var a=[];E(e,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(a=a.concat(u))});var i=n&&n.toolbox;G(i)&&(i=i[0]),i||(i={feature:{}},n.toolbox=[i]);var o=i.feature||(i.feature={}),r=o.brush||(o.brush={}),s=r.type||(r.type=[]);s.push.apply(s,a),hg(s),t&&!s.length&&s.push.apply(s,ug)}}function hg(n){var t={};E(n,function(e){t[e]=1}),n.length=0,E(t,function(e,a){n.push(a)})}function cg(n){var t=n.brushType,e={point:function(a){return Hr[t].point(a,e,n)},rect:function(a){return Hr[t].rect(a,e,n)}};return e}var Hr={lineX:Wr(0),lineY:Wr(1),rect:{point:function(n,t,e){return n&&e.boundingRect.contain(n[0],n[1])},rect:function(n,t,e){return n&&e.boundingRect.intersect(n)}},polygon:{point:function(n,t,e){return n&&e.boundingRect.contain(n[0],n[1])&&wt(e.range,n[0],n[1])},rect:function(n,t,e){var a=e.range;if(!n||a.length<=1)return!1;var i=n.x,o=n.y,r=n.width,s=n.height,l=a[0];if(wt(a,i,o)||wt(a,i+r,o)||wt(a,i,o+s)||wt(a,i+r,o+s)||de.create(n).contain(l[0],l[1])||qt(i,o,i+r,o,a)||qt(i,o,i,o+s,a)||qt(i+r,o,i+r,o+s,a)||qt(i,o+s,i+r,o+s,a))return!0}}};function Wr(n){var t=["x","y"],e=["width","height"];return{point:function(a,i,o){if(a){var r=o.range,s=a[n];return Rt(s,r)}},rect:function(a,i,o){if(a){var r=o.range,s=[a[t[n]],a[t[n]]+a[e[n]]];return s[1]t[0][1]&&(t[0][1]=o[0]),o[1]t[1][1]&&(t[1][1]=o[1])}return t&&Ur(t)}};function Ur(n){return new de(n[0][0],n[1][0],n[0][1]-n[0][0],n[1][1]-n[1][0])}var mg=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,a){this.ecModel=e,this.api=a,this.model,(this._brushController=new Xl(a.getZr())).on("brush",re(this._onBrush,this)).mount()},t.prototype.render=function(e,a,i,o){this.model=e,this._updateController(e,a,i,o)},t.prototype.updateTransform=function(e,a,i,o){Yr(a),this._updateController(e,a,i,o)},t.prototype.updateVisual=function(e,a,i,o){this.updateTransform(e,a,i,o)},t.prototype.updateView=function(e,a,i,o){this._updateController(e,a,i,o)},t.prototype._updateController=function(e,a,i,o){(!o||o.$from!==e.id)&&this._brushController.setPanels(e.brushTargetManager.makePanelOpts(i)).enableBrush(e.brushOption).updateCovers(e.areas.slice())},t.prototype.dispose=function(){this._brushController.dispose()},t.prototype._onBrush=function(e){var a=this.model.id,i=this.model.brushTargetManager.setOutputRanges(e.areas,this.ecModel);(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:a,areas:St(i),$from:a}),e.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:a,areas:St(i),$from:a})},t.type="brush",t}(jt);const xg=mg;var _g="#ddd",Ig=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.areas=[],e.brushOption={},e}return t.prototype.optionUpdated=function(e,a){var i=this.option;!a&&Yl(i,e,["inBrush","outOfBrush"]);var o=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:_g},o.hasOwnProperty("liftZ")||(o.liftZ=5)},t.prototype.setAreas=function(e){e&&(this.areas=F(e,function(a){return jr(this.option,a)},this))},t.prototype.setBrushOption=function(e){this.brushOption=jr(this.option,e),this.brushType=this.brushOption.brushType},t.type="brush",t.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],t.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},t}(Ut);function jr(n,t){return $e({brushType:n.brushType,brushMode:n.brushMode,transformable:n.transformable,brushStyle:new Be(n.brushStyle).getItemStyle(),removeOnClick:n.removeOnClick,z:n.z},t,!0)}const bg=Ig;var wg=["rect","polygon","lineX","lineY","keep","clear"],Sg=function(n){V(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.render=function(e,a,i){var o,r,s;a.eachComponent({mainType:"brush"},function(l){o=l.brushType,r=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=o,this._brushMode=r,E(e.get("type",!0),function(l){e.setIconStatus(l,(l==="keep"?r==="multiple":l==="clear"?s:l===o)?"emphasis":"normal")})},t.prototype.updateView=function(e,a,i){this.render(e,a,i)},t.prototype.getIcons=function(){var e=this.model,a=e.get("icon",!0),i={};return E(e.get("type",!0),function(o){a[o]&&(i[o]=a[o])}),i},t.prototype.onclick=function(e,a,i){var o=this._brushType,r=this._brushMode;i==="clear"?(a.dispatchAction({type:"axisAreaSelect",intervals:[]}),a.dispatchAction({type:"brush",command:"clear",areas:[]})):a.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:i==="keep"?o:o===i?!1:i,brushMode:i==="keep"?r==="multiple"?"single":"multiple":r}})},t.getDefaultOption=function(e){var a={show:!0,type:wg.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:e.getLocaleModel().get(["toolbox","brush","title"])};return a},t}(Zl);const Mg=Sg;function Lg(n){n.registerComponentView(xg),n.registerComponentModel(bg),n.registerPreprocessor(dg),n.registerVisual(n.PRIORITY.VISUAL.BRUSH,pg),n.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(t,e){e.eachComponent({mainType:"brush",query:t},function(a){a.setAreas(t.areas)})}),n.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},yt),n.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},yt),Ul("brush",Mg)}function si(n,t){if(!n)return!1;for(var e=G(n)?n:[n],a=0;a=0&&(r[o]=+r[o].toFixed(c)),[r,h]}var ui={min:te(fn,"min"),max:te(fn,"max"),average:te(fn,"average"),median:te(fn,"median")};function Vt(n,t){if(t){var e=n.getData(),a=n.coordinateSystem,i=a&&a.dimensions;if(!Tg(t)&&!G(t.coord)&&G(i)){var o=Kr(t,e,a,n);if(t=St(t),t.type&&ui[t.type]&&o.baseAxis&&o.valueAxis){var r=_e(i,o.baseAxis.dim),s=_e(i,o.valueAxis.dim),l=ui[t.type](e,o.baseDataDim,o.valueDataDim,r,s);t.coord=l[0],t.value=l[1]}else t.coord=[t.xAxis!=null?t.xAxis:t.radiusAxis,t.yAxis!=null?t.yAxis:t.angleAxis]}if(t.coord==null||!G(i))t.coord=[];else for(var u=t.coord,d=0;d<2;d++)ui[u[d]]&&(u[d]=di(e,e.mapDimension(i[d]),u[d]));return t}}function Kr(n,t,e,a){var i={};return n.valueIndex!=null||n.valueDim!=null?(i.valueDataDim=n.valueIndex!=null?t.getDimension(n.valueIndex):n.valueDim,i.valueAxis=e.getAxis(Ag(a,i.valueDataDim)),i.baseAxis=e.getOtherAxis(i.valueAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim)):(i.baseAxis=a.getBaseAxis(),i.valueAxis=e.getOtherAxis(i.baseAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim),i.valueDataDim=t.mapDimension(i.valueAxis.dim)),i}function Ag(n,t){var e=n.getData().getDimensionInfo(t);return e&&e.coordDim}function kt(n,t){return n&&n.containData&&t.coord&&!li(t)?n.containData(t.coord):!0}function Ng(n,t,e){return n&&n.containZone&&t.coord&&e.coord&&!li(t)&&!li(e)?n.containZone(t.coord,e.coord):!0}function Qr(n,t){return n?function(e,a,i,o){var r=o<2?e.coord&&e.coord[o]:e.value;return Kt(r,t[o])}:function(e,a,i,o){return Kt(e.value,t[o])}}function di(n,t,e){if(e==="average"){var a=0,i=0;return n.each(t,function(o,r){isNaN(o)||(a+=o,i++)}),a/i}else return e==="median"?n.getMedian(t):n.getDataExtent(t)[e==="max"?1:0]}var hi=xe(),Eg=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(){this.markerGroupMap=ve()},t.prototype.render=function(e,a,i){var o=this,r=this.markerGroupMap;r.each(function(s){hi(s).keep=!1}),a.eachSeries(function(s){var l=Ke.getMarkerModelFromSeries(s,o.type);l&&o.renderSeries(s,l,a,i)}),r.each(function(s){!hi(s).keep&&o.group.remove(s.group)})},t.prototype.markKeep=function(e){hi(e).keep=!0},t.prototype.toggleBlurSeries=function(e,a){var i=this;E(e,function(o){var r=Ke.getMarkerModelFromSeries(o,i.type);if(r){var s=r.getData();s.eachItemGraphicEl(function(l){l&&(a?Ql(l):$l(l))})}})},t.type="marker",t}(jt);const ci=Eg;function $r(n,t,e){var a=t.coordinateSystem;n.each(function(i){var o=n.getItemModel(i),r,s=Z(o.get("x"),e.getWidth()),l=Z(o.get("y"),e.getHeight());if(!isNaN(s)&&!isNaN(l))r=[s,l];else if(t.getMarkerPosition)r=t.getMarkerPosition(n.getValues(n.dimensions,i));else if(a){var u=n.get(a.dimensions[0],i),d=n.get(a.dimensions[1],i);r=a.dataToPoint([u,d])}isNaN(s)||(r[0]=s),isNaN(l)||(r[1]=l),n.setItemLayout(i,r)})}var Pg=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.updateTransform=function(e,a,i){a.eachSeries(function(o){var r=Ke.getMarkerModelFromSeries(o,"markPoint");r&&($r(r.getData(),o,i),this.markerGroupMap.get(o.id).updateLayout())},this)},t.prototype.renderSeries=function(e,a,i,o){var r=e.coordinateSystem,s=e.id,l=e.getData(),u=this.markerGroupMap,d=u.get(s)||u.set(s,new Gn),h=Rg(r,e,a);a.setData(h),$r(a.getData(),e,o),h.each(function(c){var p=h.getItemModel(c),g=p.getShallow("symbol"),f=p.getShallow("symbolSize"),y=p.getShallow("symbolRotate"),m=p.getShallow("symbolOffset"),x=p.getShallow("symbolKeepAspect");if(ie(g)||ie(f)||ie(y)||ie(m)){var v=a.getRawValue(c),I=a.getDataParams(c);ie(g)&&(g=g(v,I)),ie(f)&&(f=f(v,I)),ie(y)&&(y=y(v,I)),ie(m)&&(m=m(v,I))}var _=p.getModel("itemStyle").getItemStyle(),b=ta(l,"color");_.fill||(_.fill=b),h.setItemVisual(c,{symbol:g,symbolSize:f,symbolRotate:y,symbolOffset:m,symbolKeepAspect:x,style:_})}),d.updateData(h),this.group.add(d.group),h.eachItemGraphicEl(function(c){c.traverse(function(p){ae(p).dataModel=a})}),this.markKeep(d),d.group.silent=a.get("silent")||e.get("silent")},t.type="markPoint",t}(ci);function Rg(n,t,e){var a;n?a=F(n&&n.dimensions,function(s){var l=t.getData().getDimensionInfo(t.getData().mapDimension(s))||{};return W(W({},l),{name:s,ordinalMeta:null})}):a=[{name:"value",type:"float"}];var i=new Ie(a,e),o=F(e.get("data"),te(Vt,t));n&&(o=De(o,te(kt,n)));var r=Qr(!!n,a);return i.initData(o,null,r),i}const Vg=Pg;function kg(n){n.registerComponentModel(Cg),n.registerComponentView(Vg),n.registerPreprocessor(function(t){si(t.series,"markPoint")&&(t.markPoint=t.markPoint||{})})}var zg=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.createMarkerModelFromSeries=function(e,a,i){return new t(e,a,i)},t.type="markLine",t.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},t}(Ke);const Og=zg;var gn=xe(),Gg=function(n,t,e,a){var i=n.getData(),o;if(G(a))o=a;else{var r=a.type;if(r==="min"||r==="max"||r==="average"||r==="median"||a.xAxis!=null||a.yAxis!=null){var s=void 0,l=void 0;if(a.yAxis!=null||a.xAxis!=null)s=t.getAxis(a.yAxis!=null?"y":"x"),l=Ne(a.yAxis,a.xAxis);else{var u=Kr(a,i,t,n);s=u.valueAxis;var d=Jl(i,u.valueDataDim);l=di(i,d,r)}var h=s.dim==="x"?0:1,c=1-h,p=St(a),g={coord:[]};p.type=null,p.coord=[],p.coord[c]=-1/0,g.coord[c]=1/0;var f=e.get("precision");f>=0&&We(l)&&(l=+l.toFixed(Math.min(f,20))),p.coord[h]=g.coord[h]=l,o=[p,g,{type:r,valueIndex:a.valueIndex,value:l}]}else o=[]}var y=[Vt(n,o[0]),Vt(n,o[1]),W({},o[2])];return y[2].type=y[2].type||null,$e(y[2],y[0]),$e(y[2],y[1]),y};function yn(n){return!isNaN(n)&&!isFinite(n)}function Jr(n,t,e,a){var i=1-n,o=a.dimensions[n];return yn(t[i])&&yn(e[i])&&t[n]===e[n]&&a.getAxis(o).containData(t[n])}function Bg(n,t){if(n.type==="cartesian2d"){var e=t[0].coord,a=t[1].coord;if(e&&a&&(Jr(1,e,a,n)||Jr(0,e,a,n)))return!0}return kt(n,t[0])&&kt(n,t[1])}function pi(n,t,e,a,i){var o=a.coordinateSystem,r=n.getItemModel(t),s,l=Z(r.get("x"),i.getWidth()),u=Z(r.get("y"),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(a.getMarkerPosition)s=a.getMarkerPosition(n.getValues(n.dimensions,t));else{var d=o.dimensions,h=n.get(d[0],t),c=n.get(d[1],t);s=o.dataToPoint([h,c])}if(Zt(o,"cartesian2d")){var p=o.getAxis("x"),g=o.getAxis("y"),d=o.dimensions;yn(n.get(d[0],t))?s[0]=p.toGlobalCoord(p.getExtent()[e?0:1]):yn(n.get(d[1],t))&&(s[1]=g.toGlobalCoord(g.getExtent()[e?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}n.setItemLayout(t,s)}var Fg=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.updateTransform=function(e,a,i){a.eachSeries(function(o){var r=Ke.getMarkerModelFromSeries(o,"markLine");if(r){var s=r.getData(),l=gn(r).from,u=gn(r).to;l.each(function(d){pi(l,d,!0,o,i),pi(u,d,!1,o,i)}),s.each(function(d){s.setItemLayout(d,[l.getItemLayout(d),u.getItemLayout(d)])}),this.markerGroupMap.get(o.id).updateLayout()}},this)},t.prototype.renderSeries=function(e,a,i,o){var r=e.coordinateSystem,s=e.id,l=e.getData(),u=this.markerGroupMap,d=u.get(s)||u.set(s,new Na);this.group.add(d.group);var h=Hg(r,e,a),c=h.from,p=h.to,g=h.line;gn(a).from=c,gn(a).to=p,a.setData(g);var f=a.get("symbol"),y=a.get("symbolSize"),m=a.get("symbolRotate"),x=a.get("symbolOffset");G(f)||(f=[f,f]),G(y)||(y=[y,y]),G(m)||(m=[m,m]),G(x)||(x=[x,x]),h.from.each(function(I){v(c,I,!0),v(p,I,!1)}),g.each(function(I){var _=g.getItemModel(I).getModel("lineStyle").getLineStyle();g.setItemLayout(I,[c.getItemLayout(I),p.getItemLayout(I)]),_.stroke==null&&(_.stroke=c.getItemVisual(I,"style").fill),g.setItemVisual(I,{fromSymbolKeepAspect:c.getItemVisual(I,"symbolKeepAspect"),fromSymbolOffset:c.getItemVisual(I,"symbolOffset"),fromSymbolRotate:c.getItemVisual(I,"symbolRotate"),fromSymbolSize:c.getItemVisual(I,"symbolSize"),fromSymbol:c.getItemVisual(I,"symbol"),toSymbolKeepAspect:p.getItemVisual(I,"symbolKeepAspect"),toSymbolOffset:p.getItemVisual(I,"symbolOffset"),toSymbolRotate:p.getItemVisual(I,"symbolRotate"),toSymbolSize:p.getItemVisual(I,"symbolSize"),toSymbol:p.getItemVisual(I,"symbol"),style:_})}),d.updateData(g),h.line.eachItemGraphicEl(function(I){ae(I).dataModel=a,I.traverse(function(_){ae(_).dataModel=a})});function v(I,_,b){var w=I.getItemModel(_);pi(I,_,b,e,o);var M=w.getModel("itemStyle").getItemStyle();M.fill==null&&(M.fill=ta(l,"color")),I.setItemVisual(_,{symbolKeepAspect:w.get("symbolKeepAspect"),symbolOffset:Ge(w.get("symbolOffset",!0),x[b?0:1]),symbolRotate:Ge(w.get("symbolRotate",!0),m[b?0:1]),symbolSize:Ge(w.get("symbolSize"),y[b?0:1]),symbol:Ge(w.get("symbol",!0),f[b?0:1]),style:M})}this.markKeep(d),d.group.silent=a.get("silent")||e.get("silent")},t.type="markLine",t}(ci);function Hg(n,t,e){var a;n?a=F(n&&n.dimensions,function(u){var d=t.getData().getDimensionInfo(t.getData().mapDimension(u))||{};return W(W({},d),{name:u,ordinalMeta:null})}):a=[{name:"value",type:"float"}];var i=new Ie(a,e),o=new Ie(a,e),r=new Ie([],e),s=F(e.get("data"),te(Gg,t,n,e));n&&(s=De(s,te(Bg,n)));var l=Qr(!!n,a);return i.initData(F(s,function(u){return u[0]}),null,l),o.initData(F(s,function(u){return u[1]}),null,l),r.initData(F(s,function(u){return u[2]})),r.hasItemOption=!0,{from:i,to:o,line:r}}const Wg=Fg;function Xg(n){n.registerComponentModel(Og),n.registerComponentView(Wg),n.registerPreprocessor(function(t){si(t.series,"markLine")&&(t.markLine=t.markLine||{})})}var Yg=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.createMarkerModelFromSeries=function(e,a,i){return new t(e,a,i)},t.type="markArea",t.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},t}(Ke);const Zg=Yg;var vn=xe(),Ug=function(n,t,e,a){var i=a[0],o=a[1];if(!(!i||!o)){var r=Vt(n,i),s=Vt(n,o),l=r.coord,u=s.coord;l[0]=Ne(l[0],-1/0),l[1]=Ne(l[1],-1/0),u[0]=Ne(u[0],1/0),u[1]=Ne(u[1],1/0);var d=Qi([{},r,s]);return d.coord=[r.coord,s.coord],d.x0=r.x,d.y0=r.y,d.x1=s.x,d.y1=s.y,d}};function mn(n){return!isNaN(n)&&!isFinite(n)}function es(n,t,e,a){var i=1-n;return mn(t[i])&&mn(e[i])}function jg(n,t){var e=t.coord[0],a=t.coord[1],i={coord:e,x:t.x0,y:t.y0},o={coord:a,x:t.x1,y:t.y1};return Zt(n,"cartesian2d")?e&&a&&(es(1,e,a)||es(0,e,a))?!0:Ng(n,i,o):kt(n,i)||kt(n,o)}function ts(n,t,e,a,i){var o=a.coordinateSystem,r=n.getItemModel(t),s,l=Z(r.get(e[0]),i.getWidth()),u=Z(r.get(e[1]),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(a.getMarkerPosition){var d=n.getValues(["x0","y0"],t),h=n.getValues(["x1","y1"],t),c=o.clampData(d),p=o.clampData(h),g=[];e[0]==="x0"?g[0]=c[0]>p[0]?h[0]:d[0]:g[0]=c[0]>p[0]?d[0]:h[0],e[1]==="y0"?g[1]=c[1]>p[1]?h[1]:d[1]:g[1]=c[1]>p[1]?d[1]:h[1],s=a.getMarkerPosition(g,e,!0)}else{var f=n.get(e[0],t),y=n.get(e[1],t),m=[f,y];o.clampData&&o.clampData(m,m),s=o.dataToPoint(m,!0)}if(Zt(o,"cartesian2d")){var x=o.getAxis("x"),v=o.getAxis("y"),f=n.get(e[0],t),y=n.get(e[1],t);mn(f)?s[0]=x.toGlobalCoord(x.getExtent()[e[0]==="x0"?0:1]):mn(y)&&(s[1]=v.toGlobalCoord(v.getExtent()[e[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var ns=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],qg=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.updateTransform=function(e,a,i){a.eachSeries(function(o){var r=Ke.getMarkerModelFromSeries(o,"markArea");if(r){var s=r.getData();s.each(function(l){var u=F(ns,function(h){return ts(s,l,h,o,i)});s.setItemLayout(l,u);var d=s.getItemGraphicEl(l);d.setShape("points",u)})}},this)},t.prototype.renderSeries=function(e,a,i,o){var r=e.coordinateSystem,s=e.id,l=e.getData(),u=this.markerGroupMap,d=u.get(s)||u.set(s,{group:new oe});this.group.add(d.group),this.markKeep(d);var h=Kg(r,e,a);a.setData(h),h.each(function(c){var p=F(ns,function(M){return ts(h,c,M,e,o)}),g=r.getAxis("x").scale,f=r.getAxis("y").scale,y=g.getExtent(),m=f.getExtent(),x=[g.parse(h.get("x0",c)),g.parse(h.get("x1",c))],v=[f.parse(h.get("y0",c)),f.parse(h.get("y1",c))];Zn(x),Zn(v);var I=!(y[0]>x[1]||y[1]v[1]||m[1]":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},Jg=function(){function n(t){var e=this._condVal=be(t)?new RegExp(t):nu(t)?t:null;if(e==null){var a="";J(a)}}return n.prototype.evaluate=function(t){var e=typeof t;return be(e)?this._condVal.test(t):We(e)?this._condVal.test(t+""):!1},n}(),ey=function(){function n(){}return n.prototype.evaluate=function(){return this.value},n}(),ty=function(){function n(){}return n.prototype.evaluate=function(){for(var t=this.children,e=0;e=s)}}for(var h=this.__startIndex;h15)break}}T.prevElClipPaths&&m.restore()};if(x)if(x.length===0)M=y.__endIndex;else for(var L=p.dpr,D=0;D0&&t>i[0]){for(l=0;lt);l++);s=a[i[l]]}if(i.splice(l+1,0,t),a[t]=e,!e.virtual)if(s){var u=s.dom;u.nextSibling?r.insertBefore(e.dom,u.nextSibling):r.appendChild(e.dom)}else r.firstChild?r.insertBefore(e.dom,r.firstChild):r.appendChild(e.dom);e.painter||(e.painter=this)}},n.prototype.eachLayer=function(t,e){for(var a=this._zlevelList,i=0;i0?xn:0),this._needsManuallyCompositing),d.__builtin__||gu("ZLevel "+u+" has been used by unkown layer "+d.id),d!==o&&(d.__used=!0,d.__startIndex!==l&&(d.__dirty=!0),d.__startIndex=l,d.incremental?d.__drawIndex=-1:d.__drawIndex=l,e(l),o=d),i.__dirty&na&&!i.__inHover&&(d.__dirty=!0,d.incremental&&d.__drawIndex<0&&(d.__drawIndex=l))}e(l),this.eachBuiltinLayer(function(h,c){!h.__used&&h.getElementCount()>0&&(h.__dirty=!0,h.__startIndex=h.__endIndex=h.__drawIndex=0),h.__dirty&&h.__drawIndex<0&&(h.__drawIndex=h.__startIndex)})},n.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},n.prototype._clearLayer=function(t){t.clear()},n.prototype.setBackgroundColor=function(t){this._backgroundColor=t,E(this._layers,function(e){e.setUnpainted()})},n.prototype.configLayer=function(t,e){if(e){var a=this._layerConfig;a[t]?$e(a[t],e,!0):a[t]=e;for(var i=0;i2&&a.push(i),i=[N,T]}function d(N,T,A,P){ct(N,A)&&ct(T,P)||i.push(N,T,A,P,A,P)}function h(N,T,A,P,R,k){var z=Math.abs(T-N),H=Math.tan(z/4)*4/3,B=TM:D2&&a.push(i),a}function vi(n,t,e,a,i,o,r,s,l,u){if(ct(n,e)&&ct(t,a)&&ct(i,r)&&ct(o,s)){l.push(r,s);return}var d=2/u,h=d*d,c=r-n,p=s-t,g=Math.sqrt(c*c+p*p);c/=g,p/=g;var f=e-n,y=a-t,m=i-r,x=o-s,v=f*f+y*y,I=m*m+x*x;if(v=0&&M=0){l.push(r,s);return}var S=[],L=[];Jt(n,e,i,r,.5,S),Jt(t,a,o,s,.5,L),vi(S[0],L[0],S[1],L[1],S[2],L[2],S[3],L[3],l,u),vi(S[4],L[4],S[5],L[5],S[6],L[6],S[7],L[7],l,u)}function by(n,t){var e=yi(n),a=[];t=t||1;for(var i=0;i0)for(var u=0;uMath.abs(u),h=ls([l,u],d?0:1,t),c=(d?s:u)/h.length,p=0;pi,r=ls([a,i],o?0:1,t),s=o?"width":"height",l=o?"height":"width",u=o?"x":"y",d=o?"y":"x",h=n[s]/r.length,c=0;c1?null:new Ye(f*l+n,f*u+t)}function My(n,t,e){var a=new Ye;Ye.sub(a,e,t),a.normalize();var i=new Ye;Ye.sub(i,n,t);var o=i.dot(a);return o}function pt(n,t){var e=n[n.length-1];e&&e[0]===t[0]&&e[1]===t[1]||n.push(t)}function Ly(n,t,e){for(var a=n.length,i=[],o=0;or?(u.x=d.x=s+o/2,u.y=l,d.y=l+r):(u.y=d.y=l+r/2,u.x=s,d.x=s+o),Ly(t,u,d)}function _n(n,t,e,a){if(e===1)a.push(t);else{var i=Math.floor(e/2),o=n(t);_n(n,o[0],i,a),_n(n,o[1],e-i,a)}return a}function Dy(n,t){for(var e=[],a=0;a0)for(var _=a/e,b=-a/2;b<=a/2;b+=_){for(var w=Math.sin(b),M=Math.cos(b),S=0,v=0;v0;u/=2){var d=0,h=0;(n&u)>0&&(d=1),(t&u)>0&&(h=1),s+=u*u*(3*d^h),h===0&&(d===1&&(n=u-1-n,t=u-1-t),l=n,n=t,t=l)}return s}function wn(n){var t=1/0,e=1/0,a=-1/0,i=-1/0,o=F(n,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),d=l.x+l.width/2+(u?u[4]:0),h=l.y+l.height/2+(u?u[5]:0);return t=Math.min(d,t),e=Math.min(h,e),a=Math.max(d,a),i=Math.max(h,i),[d,h]}),r=F(o,function(s,l){return{cp:s,z:ky(s[0],s[1],t,e,a,i),path:n[l]}});return r.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function vs(n){return Ay(n.path,n.count)}function xi(){return{fromIndividuals:[],toIndividuals:[],count:0}}function zy(n,t,e){var a=[];function i(_){for(var b=0;b<_.length;b++){var w=_[b];In(w)?i(w.childrenRef()):w instanceof ye&&a.push(w)}}i(n);var o=a.length;if(!o)return xi();var r=e.dividePath||vs,s=r({path:t,count:o});if(s.length!==o)return xi();a=wn(a),s=wn(s);for(var l=e.done,u=e.during,d=e.individualDelay,h=new Mi,c=0;c=0;i--)if(!e[i].many.length){var l=e[s].many;if(l.length<=1)if(s)s=0;else return e;var o=l.length,u=Math.ceil(o/2);e[i].many=l.slice(u,o),e[s].many=l.slice(0,u),s++}return e}var Gy={clone:function(n){for(var t=[],e=1-Math.pow(1-n.path.style.opacity,1/n.count),a=0;a0))return;var s=a.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},r),u,d;ms(n)&&(u=n,d=t),ms(t)&&(u=t,d=n);function h(m,x,v,I,_){var b=m.many,w=m.one;if(b.length===1&&!_){var M=x?b[0]:w,S=x?w:b[0];if(In(M))h({many:[M],one:S},!0,v,I,!0);else{var L=s?ce({delay:s(v,I)},l):l;mi(M,S,L),o(M,S,M,S,L)}}else for(var D=ce({dividePath:Gy[e],individualDelay:s&&function(R,k,z,H){return s(R+v,I)}},l),C=x?zy(b,w,D):Oy(w,b,D),N=C.fromIndividuals,T=C.toIndividuals,A=N.length,P=0;Pt.length,p=u?xs(d,u):xs(c?t:n,[c?n:t]),g=0,f=0;f_s))for(var o=a.getIndices(),r=0;r0&&b.group.traverse(function(M){M instanceof ye&&!M.animators.length&&M.animateFrom({style:{opacity:0}},w)})})}function Ls(n){var t=n.getModel("universalTransition").get("seriesKey");return t||n.id}function Ds(n){return G(n)?n.sort().join(","):n}function Qe(n){if(n.hostModel)return n.hostModel.getModel("universalTransition").get("divideShape")}function Zy(n,t){var e=ve(),a=ve(),i=ve();return E(n.oldSeries,function(o,r){var s=n.oldDataGroupIds[r],l=n.oldData[r],u=Ls(o),d=Ds(u);a.set(d,{dataGroupId:s,data:l}),G(u)&&E(u,function(h){i.set(h,{key:d,dataGroupId:s,data:l})})}),E(t.updatedSeries,function(o){if(o.isUniversalTransitionEnabled()&&o.isAnimationEnabled()){var r=o.get("dataGroupId"),s=o.getData(),l=Ls(o),u=Ds(l),d=a.get(u);if(d)e.set(u,{oldSeries:[{dataGroupId:d.dataGroupId,divide:Qe(d.data),data:d.data}],newSeries:[{dataGroupId:r,divide:Qe(s),data:s}]});else if(G(l)){var h=[];E(l,function(g){var f=a.get(g);f.data&&h.push({dataGroupId:f.dataGroupId,divide:Qe(f.data),data:f.data})}),h.length&&e.set(u,{oldSeries:h,newSeries:[{dataGroupId:r,data:s,divide:Qe(s)}]})}else{var c=i.get(l);if(c){var p=e.get(c.key);p||(p={oldSeries:[{dataGroupId:c.dataGroupId,data:c.data,divide:Qe(c.data)}],newSeries:[]},e.set(c.key,p)),p.newSeries.push({dataGroupId:r,data:s,divide:Qe(s)})}}}}),e}function Cs(n,t){for(var e=0;e=0&&i.push({dataGroupId:t.oldDataGroupIds[s],data:t.oldData[s],divide:Qe(t.oldData[s]),groupIdDim:r.dimension})}),E(ke(n.to),function(r){var s=Cs(e.updatedSeries,r);if(s>=0){var l=e.updatedSeries[s].getData();o.push({dataGroupId:t.oldDataGroupIds[s],data:l,divide:Qe(l),groupIdDim:r.dimension})}}),i.length>0&&o.length>0&&Ms(i,o,a)}function jy(n){n.registerUpdateLifecycle("series:beforeupdate",function(t,e,a){E(ke(a.seriesTransition),function(i){E(ke(i.to),function(o){for(var r=a.updatedSeries,s=0;s