var gn=(r,e,t)=>new Promise((a,n)=>{var i=s=>{try{l(t.next(s))}catch(u){n(u)}},o=s=>{try{l(t.throw(s))}catch(u){n(u)}},l=s=>s.done?a(s.value):Promise.resolve(s.value).then(i,o);l((t=t.apply(r,e)).next())});import{j as ml,a as Sl,r as bl,p as xl,dC as wl,o as Il,e as Ll,ag as _l}from"./index.ae52ebae.js";import{m as bt,B as Et,i as nt,k as Aa,g as et,p as O,a as Dl,f as It,s as Al,b as Tl,h as Cl,e as N,c as Ki,d as Qi,j as yn,l as Ml,n as Pl,r as Ft,o as _t,q as Dt,t as it,v as ji,T as Ji,w as he,_ as G,P as pt,G as rt,R as Ta,x as cr,V as Ca,y as to,z as eo,A as ro,C as ut,S as ao,D as na,H as El,E as Nl,F as no,I as ht,J as At,K as Ke,L as ia,M as tt,N as Vl,O as W,Q as F,U as H,W as fr,X as Ma,Y as mt,Z as gt,$ as Xt,a0 as zt,a1 as vt,a2 as io,a3 as De,a4 as Rl,a5 as re,a6 as Rt,a7 as kl,a8 as Gl,a9 as Ae,aa as Ht,ab as Vt,ac as hr,ad as st,ae as zl,af as fe,ag as lt,ah as mn,ai as Ol,aj as oo,ak as Bl,al as Sn,am as ze,an as bn,ao as ae,ap as Ot,aq as $l,ar as Pa,as as qt,at as lo,au as oa,av as so,aw as Pt,ax as xn,ay as Bt,az as pr,aA as Zt,aB as ke,aC as Fl,aD as Hl,aE as ve,aF as wn,aG as Wl,aH as ft,aI as la,aJ as Mt,aK as Qe,aL as sa,aM as uo,aN as Ea,aO as Na,aP as vo,aQ as co,aR as Te,aS as dr,aT as Ul,aU as fo,aV as Zl,aW as Va,aX as pe,aY as Ge,aZ as ho,a_ as Ra,a$ as ka,b0 as Yl,b1 as Xl,b2 as In,b3 as Ga,b4 as ql,b5 as Ln,b6 as Ce,b7 as za,b8 as Oa,b9 as de,ba as Wt,bb as Kl,bc as Ql,bd as Ba,be as jl,bf as Jl,bg as U,bh as po,bi as ts,bj as ua,bk as va,bl as es,bm as rs,bn as ca,bo as xr,bp as go,bq as J,br as $a,bs as yo,bt as Fa,bu as wr,bv as as,bw as mo,bx as ns,by as be,bz as is,bA as _n,bB as os,bC as So,bD as Dn,bE as gr,bF as ls,bG as bo,bH as xo,bI as An,bJ as ss,bK as us,bL as Ha,bM as Tn,bN as Cn,bO as Mn,bP as Lt,bQ as vs,bR as cs,bS as fs,bT as hs,bU as ps,bV as ds,bW as gs,bX as ys,bY as ms,bZ as Ss,b_ as bs,b$ as xs,c0 as wo,c1 as ws,c2 as Is,c3 as Ls,c4 as yr,c5 as _s,c6 as Ds,c7 as As,c8 as Ts,c9 as Cs,ca as Ms,cb as Ps,cc as Es,cd as Ns,ce as Vs,cf as mr,cg as Io,ch as Rs,ci as ge,cj as Oe,ck as Me,cl as ks,cm as Gs,cn as zs,co as Os,cp as Bs,cq as $s,cr as fa,cs as Fs,ct as Hs,cu as Ws,cv as Us,cw as Zs,cx as Ys,cy as je,cz as Xs,cA as qs,cB as Wa,cC as Ks,cD as Lo,cE as Qs,cF as js,cG as Js,cH as tu,cI as eu,cJ as ru,cK as Pn,cL as au,cM as nu,cN as Je,cO as Ua,cP as iu,cQ as Za,cR as Ir,cS as ou,cT as lu,cU as su,cV as uu,cW as vu,cX as cu,cY as fu,cZ as hu,c_ as pu,c$ as du,d0 as gu,d1 as yu,d2 as mu,d3 as Su,d4 as bu,d5 as xu,d6 as wu,d7 as Iu,d8 as Lu,d9 as _u,da as Du,db as Au,dc as Tu,dd as Cu,de as Mu,df as Pu,dg as Eu,u as Nu,dh as Vu}from"./useECharts.514ffc33.js";import{m as Ru}from"./data.29a5f341.js";function ku(r){if(r){for(var e=[],t=0;t=0&&a.attr(i.oldLayoutSelect),Dt(f,"emphasis")>=0&&a.attr(i.oldLayoutEmphasis)),it(a,u,t,s)}else if(a.attr(u),!Pl(a).valueAnimation){var c=Ft(a.style.opacity,1);a.style.opacity=0,_t(a,{style:{opacity:c}},t,s)}if(i.oldLayout=u,a.states.select){var h=i.oldLayoutSelect={};Be(h,u,$e),Be(h,a.states.select,$e)}if(a.states.emphasis){var d=i.oldLayoutEmphasis={};Be(d,u,$e),Be(d,a.states.emphasis,$e)}ji(a,s,v,t,t)}if(n&&!n.ignore&&!n.invisible){var i=zu(n),o=i.oldLayout,p={points:n.shape.points};o?(n.attr({shape:o}),it(n,{shape:p},t)):(n.setShape(p),n.style.strokePercent=0,_t(n,{style:{strokePercent:1}},t)),i.oldLayout=p}},r}(),Bu=Ou,_r=bt();function $u(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,a){var n=_r(t).labelManager;n||(n=_r(t).labelManager=new Bu),n.clearLabels()}),r.registerUpdateLifecycle("series:layoutlabels",function(e,t,a){var n=_r(t).labelManager;a.updatedSeries.forEach(function(i){n.addLabelsOfSeries(t.getViewOfSeriesModel(i))}),n.updateLayoutConfig(t),n.layout(t),n.processLabelsOverall()})}function Fu(r){var e=r;e.hierNode={defaultAncestor:null,ancestor:e,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var t=[e],a,n;a=t.pop();)if(n=a.children,a.isExpand&&n.length)for(var i=n.length,o=i-1;o>=0;o--){var l=n[o];l.hierNode={defaultAncestor:null,ancestor:l,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},t.push(l)}}function Hu(r,e){var t=r.isExpand?r.children:[],a=r.parentNode.children,n=r.hierNode.i?a[r.hierNode.i-1]:null;if(t.length){Zu(r);var i=(t[0].hierNode.prelim+t[t.length-1].hierNode.prelim)/2;n?(r.hierNode.prelim=n.hierNode.prelim+e(r,n),r.hierNode.modifier=r.hierNode.prelim-i):r.hierNode.prelim=i}else n&&(r.hierNode.prelim=n.hierNode.prelim+e(r,n));r.parentNode.hierNode.defaultAncestor=Yu(r,n,r.parentNode.hierNode.defaultAncestor||a[0],e)}function Wu(r){var e=r.hierNode.prelim+r.parentNode.hierNode.modifier;r.setLayout({x:e},!0),r.hierNode.modifier+=r.parentNode.hierNode.modifier}function Nn(r){return arguments.length?r:Ku}function xe(r,e){return r-=Math.PI/2,{x:e*Math.cos(r),y:e*Math.sin(r)}}function Uu(r,e){return he(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function Zu(r){for(var e=r.children,t=e.length,a=0,n=0;--t>=0;){var i=e[t];i.hierNode.prelim+=a,i.hierNode.modifier+=a,n+=i.hierNode.change,a+=i.hierNode.shift+n}}function Yu(r,e,t,a){if(e){for(var n=r,i=r,o=i.parentNode.children[0],l=e,s=n.hierNode.modifier,u=i.hierNode.modifier,v=o.hierNode.modifier,c=l.hierNode.modifier;l=Dr(l),i=Ar(i),l&&i;){n=Dr(n),o=Ar(o),n.hierNode.ancestor=r;var f=l.hierNode.prelim+c-i.hierNode.prelim-u+a(l,i);f>0&&(qu(Xu(l,r,t),r,f),u+=f,s+=f),c+=l.hierNode.modifier,u+=i.hierNode.modifier,s+=n.hierNode.modifier,v+=o.hierNode.modifier}l&&!Dr(n)&&(n.hierNode.thread=l,n.hierNode.modifier+=c-s),i&&!Ar(o)&&(o.hierNode.thread=i,o.hierNode.modifier+=u-v,t=r)}return t}function Dr(r){var e=r.children;return e.length&&r.isExpand?e[e.length-1]:r.hierNode.thread}function Ar(r){var e=r.children;return e.length&&r.isExpand?e[0]:r.hierNode.thread}function Xu(r,e,t){return r.hierNode.ancestor.parentNode===e.parentNode?r.hierNode.ancestor:t}function qu(r,e,t){var a=t/(e.hierNode.i-r.hierNode.i);e.hierNode.change-=a,e.hierNode.shift+=t,e.hierNode.modifier+=t,e.hierNode.prelim+=t,r.hierNode.change+=a}function Ku(r,e){return r.parentNode===e.parentNode?1:2}var Qu=function(){function r(){this.parentPoint=[],this.childPoints=[]}return r}(),ju=function(r){G(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new Qu},e.prototype.buildPath=function(t,a){var n=a.childPoints,i=n.length,o=a.parentPoint,l=n[0],s=n[i-1];if(i===1){t.moveTo(o[0],o[1]),t.lineTo(l[0],l[1]);return}var u=a.orient,v=u==="TB"||u==="BT"?0:1,c=1-v,f=O(a.forkPosition,1),h=[];h[v]=o[v],h[c]=o[c]+(s[c]-o[c])*f,t.moveTo(o[0],o[1]),t.lineTo(h[0],h[1]),t.moveTo(l[0],l[1]),h[v]=l[v],t.lineTo(h[0],h[1]),h[v]=s[v],t.lineTo(h[0],h[1]),t.lineTo(s[0],s[1]);for(var d=1;dS.x,x||(b=b-Math.PI));var I=x?"left":"right",L=l.getModel("label"),_=L.get("rotate"),D=_*(Math.PI/180),A=g.getTextContent();A&&(g.setTextConfig({position:L.get("position")||I,rotation:_==null?-b:D,origin:"center"}),A.setStyle("verticalAlign","middle"))}var M=l.get(["emphasis","focus"]),E=M==="relative"?na(o.getAncestorsIndices(),o.getDescendantIndices()):M==="ancestor"?o.getAncestorsIndices():M==="descendant"?o.getDescendantIndices():null;E&&(et(t).focus=E),tv(n,o,v,t,d,h,p,a),t.__edge&&(t.onHoverStateChange=function(T){if(T!=="blur"){var C=o.parentNode&&r.getItemGraphicEl(o.parentNode.dataIndex);C&&C.hoverState===El||Nl(t.__edge,T)}})}function tv(r,e,t,a,n,i,o,l){var s=e.getModel(),u=r.get("edgeShape"),v=r.get("layout"),c=r.getOrient(),f=r.get(["lineStyle","curveness"]),h=r.get("edgeForkPosition"),d=s.getModel("lineStyle").getLineStyle(),p=a.__edge;if(u==="curve")e.parentNode&&e.parentNode!==t&&(p||(p=a.__edge=new no({shape:ha(v,c,f,n,n)})),it(p,{shape:ha(v,c,f,i,o)},r));else if(u==="polyline"&&v==="orthogonal"&&e!==t&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var g=e.children,m=[],S=0;St&&(t=n.height)}this.height=t+1},r.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,a=this.children,n=a.length;t=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},r.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostTree,a=t.data.getItemModel(this.dataIndex);return a.getModel(e)}},r.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},r.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},r.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},r.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},r.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},r.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,t=0;t=0){var a=t.getData().tree.root,n=r.targetNode;if(gt(n)&&(n=a.getNodeById(n)),n&&a.contains(n))return{node:n};var i=r.targetNodeId;if(i!=null&&(n=a.getNodeById(i)))return{node:n}}}function To(r){for(var e=[];r;)r=r.parentNode,r&&e.push(r);return e.reverse()}function qa(r,e){var t=To(r);return Dt(t,e)>=0}function Sr(r,e){for(var t=[];r;){var a=r.dataIndex;t.push({name:r.name,dataIndex:a,value:e.getRawValue(a)}),r=r.parentNode}return t.reverse(),t}var cv=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.hasSymbolVisual=!0,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t){var a={name:t.name,children:t.data},n=t.leaves||{},i=new Xt(n,this,this.ecModel),o=Xa.createTree(a,this,l);function l(c){c.wrapMethod("getItemModel",function(f,h){var d=o.getNodeByDataIndex(h);return d&&d.children.length&&d.isExpand||(f.parentModel=i),f})}var s=0;o.eachNode("preorder",function(c){c.depth>s&&(s=c.depth)});var u=t.expandAndCollapse,v=u&&t.initialTreeDepth>=0?t.initialTreeDepth:s;return o.root.eachNode("preorder",function(c){var f=c.hostTree.data.getRawDataItem(c.dataIndex);c.isExpand=f&&f.collapsed!=null?!f.collapsed:c.depth<=v}),o.data},e.prototype.getOrient=function(){var t=this.get("orient");return t==="horizontal"?t="LR":t==="vertical"&&(t="TB"),t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.formatTooltip=function(t,a,n){for(var i=this.getData().tree,o=i.root.children[0],l=i.getNodeByDataIndex(t),s=l.getValue(),u=l.name;l&&l!==o;)u=l.parentNode.name+"."+u,l=l.parentNode;return zt("nameValue",{name:u,value:s,noValue:isNaN(s)||s==null})},e.prototype.getDataParams=function(t){var a=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return a.treeAncestors=Sr(n,this),a.collapsed=!n.isExpand,a},e.type="series.tree",e.layoutMode="box",e.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},e}(vt),fv=cv;function hv(r,e,t){for(var a=[r],n=[],i;i=a.pop();)if(n.push(i),i.isExpand){var o=i.children;if(o.length)for(var l=0;l=0;i--)t.push(n[i])}}function pv(r,e){r.eachSeriesByType("tree",function(t){dv(t,e)})}function dv(r,e){var t=Uu(r,e);r.layoutInfo=t;var a=r.get("layout"),n=0,i=0,o=null;a==="radial"?(n=2*Math.PI,i=Math.min(t.height,t.width)/2,o=Nn(function(y,b){return(y.parentNode===b.parentNode?1:2)/y.depth})):(n=t.width,i=t.height,o=Nn());var l=r.getData().tree.root,s=l.children[0];if(s){Fu(l),hv(s,Hu,o),l.hierNode.modifier=-s.hierNode.prelim,ye(s,Wu);var u=s,v=s,c=s;ye(s,function(y){var b=y.getLayout().x;bv.getLayout().x&&(v=y),y.depth>c.depth&&(c=y)});var f=u===v?1:o(u,v)/2,h=f-u.getLayout().x,d=0,p=0,g=0,m=0;if(a==="radial")d=n/(v.getLayout().x+f+h),p=i/(c.depth-1||1),ye(s,function(y){g=(y.getLayout().x+h)*d,m=(y.depth-1)*p;var b=xe(g,m);y.setLayout({x:b.x,y:b.y,rawX:g,rawY:m},!0)});else{var S=r.getOrient();S==="RL"||S==="LR"?(p=i/(v.getLayout().x+f+h),d=n/(c.depth-1||1),ye(s,function(y){m=(y.getLayout().x+h)*p,g=S==="LR"?(y.depth-1)*d:n-(y.depth-1)*d,y.setLayout({x:g,y:m},!0)})):(S==="TB"||S==="BT")&&(d=n/(v.getLayout().x+f+h),p=i/(c.depth-1||1),ye(s,function(y){g=(y.getLayout().x+h)*d,m=S==="TB"?(y.depth-1)*p:i-(y.depth-1)*p,y.setLayout({x:g,y:m},!0)}))}}}function gv(r){r.eachSeriesByType("tree",function(e){var t=e.getData(),a=t.tree;a.eachNode(function(n){var i=n.getModel(),o=i.getModel("itemStyle").getItemStyle(),l=t.ensureUniqueItemVisual(n.dataIndex,"style");W(l,o)})})}function yv(r){r.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},function(a){var n=e.dataIndex,i=a.getData().tree,o=i.getNodeByDataIndex(n);o.isExpand=!o.isExpand})}),r.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(e,t,a){t.eachComponent({mainType:"series",subType:"tree",query:e},function(n){var i=n.coordinateSystem,o=io(i,e,void 0,a);n.setCenter&&n.setCenter(o.center),n.setZoom&&n.setZoom(o.zoom)})})}function mv(r){r.registerChartView(ev),r.registerSeriesModel(fv),r.registerLayout(pv),r.registerVisual(gv),yv(r)}var zn=["treemapZoomToNode","treemapRender","treemapMove"];function Sv(r){for(var e=0;e1;)i=i.parentNode;var o=Rl(r.ecModel,i.name||i.dataIndex+"",a);n.setVisual("decal",o)})}var bv=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.preventUsingHoverLayer=!0,t}return e.prototype.getInitialData=function(t,a){var n={name:t.name,children:t.data};Mo(n);var i=t.levels||[],o=this.designatedVisualItemStyle={},l=new Xt({itemStyle:o},this,a);i=t.levels=xv(i,a);var s=F(i||[],function(c){return new Xt(c,l,a)},this),u=Xa.createTree(n,this,v);function v(c){c.wrapMethod("getItemModel",function(f,h){var d=u.getNodeByDataIndex(h),p=d?s[d.depth]:null;return f.parentModel=p||l,f})}return u.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,a,n){var i=this.getData(),o=this.getRawValue(t),l=i.getName(t);return zt("nameValue",{name:l,value:o})},e.prototype.getDataParams=function(t){var a=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return a.treeAncestors=Sr(n,this),a.treePathInfo=a.treeAncestors,a},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},W(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var a=this._idIndexMap;a||(a=this._idIndexMap=re(),this._idIndexMapCount=0);var n=a.get(t);return n==null&&a.set(t,n=this._idIndexMapCount++),n},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var a=this.getRawData().tree.root;(!t||t!==a&&!a.contains(t))&&(this._viewRoot=a)},e.prototype.enableAriaDecal=function(){Co(this)},e.type="series.treemap",e.layoutMode="box",e.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:[]},e}(vt);function Mo(r){var e=0;N(r.children,function(a){Mo(a);var n=a.value;H(n)&&(n=n[0]),e+=n});var t=r.value;H(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),H(r.value)?r.value[0]=t:r.value=t}function xv(r,e){var t=Rt(e.get("color")),a=Rt(e.get(["aria","decal","decals"]));if(!!t){r=r||[];var n,i;N(r,function(l){var s=new Xt(l),u=s.get("color"),v=s.get("decal");(s.get(["itemStyle","color"])||u&&u!=="none")&&(n=!0),(s.get(["itemStyle","decal"])||v&&v!=="none")&&(i=!0)});var o=r[0]||(r[0]={});return n||(o.color=t.slice()),!i&&a&&(o.decal=a.slice()),r}}var wv=bv,Iv=8,On=8,Tr=5,Lv=function(){function r(e){this.group=new rt,e.add(this.group)}return r.prototype.render=function(e,t,a,n){var i=e.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!i.get("show")||!a)){var l=i.getModel("itemStyle"),s=i.getModel("emphasis"),u=l.getModel("textStyle"),v=s.getModel(["itemStyle","textStyle"]),c={pos:{left:i.get("left"),right:i.get("right"),top:i.get("top"),bottom:i.get("bottom")},box:{width:t.getWidth(),height:t.getHeight()},emptyItemWidth:i.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(a,c,u),this._renderContent(e,c,l,s,u,v,n),kl(o,c.pos,c.box)}},r.prototype._prepare=function(e,t,a){for(var n=e;n;n=n.parentNode){var i=fr(n.getModel().get("name"),""),o=a.getTextRect(i),l=Math.max(o.width+Iv*2,t.emptyItemWidth);t.totalWidth+=l+On,t.renderList.push({node:n,text:i,width:l})}},r.prototype._renderContent=function(e,t,a,n,i,o,l){for(var s=0,u=t.emptyItemWidth,v=e.get(["breadcrumb","height"]),c=Gl(t.pos,t.box),f=t.totalWidth,h=t.renderList,d=n.getModel("itemStyle").getItemStyle(),p=h.length-1;p>=0;p--){var g=h[p],m=g.node,S=g.width,y=g.text;f>c.width&&(f-=S-u,S=u,y=null);var b=new Ae({shape:{points:_v(s,0,S,v,p===h.length-1,p===0)},style:ht(a.getItemStyle(),{lineJoin:"bevel"}),textContent:new Ht({style:Vt(i,{text:y})}),textConfig:{position:"inside"},z2:hr*1e4,onclick:tt(l,m)});b.disableLabelAnimation=!0,b.getTextContent().ensureState("emphasis").style=Vt(o,{text:y}),b.ensureState("emphasis").style=d,st(b,n.get("focus"),n.get("blurScope"),n.get("disabled")),this.group.add(b),Dv(b,e,m),s+=S+On}},r.prototype.remove=function(){this.group.removeAll()},r}();function _v(r,e,t,a,n,i){var o=[[n?r:r-Tr,e],[r+t,e],[r+t,e+a],[n?r:r-Tr,e+a]];return!i&&o.splice(2,0,[r+t+Tr,e+a/2]),!n&&o.push([r,e+a/2]),o}function Dv(r,e,t){et(r).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:t&&t.dataIndex,name:t&&t.name},treePathInfo:t&&Sr(t,e)}}var Av=Lv,Tv=function(){function r(){this._storage=[],this._elExistsMap={}}return r.prototype.add=function(e,t,a,n,i){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:a,delay:n,easing:i}),!0)},r.prototype.finished=function(e){return this._finishedCallback=e,this},r.prototype.start=function(){for(var e=this,t=this._storage.length,a=function(){t--,t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},n=0,i=this._storage.length;n$n||Math.abs(t.dy)>$n)){var a=this.seriesModel.getData().tree.root;if(!a)return;var n=a.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+t.dx,y:n.y+t.dy,width:n.width,height:n.height}})}},e.prototype._onZoom=function(t){var a=t.originX,n=t.originY;if(this._state!=="animating"){var i=this.seriesModel.getData().tree.root;if(!i)return;var o=i.getLayout();if(!o)return;var l=new Et(o.x,o.y,o.width,o.height),s=this.seriesModel.layoutInfo;a-=s.x,n-=s.y;var u=Bl();mn(u,u,[-a,-n]),Ol(u,u,[t.scale,t.scale]),mn(u,u,[a,n]),l.applyTransform(u),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:l.x,y:l.y,width:l.width,height:l.height}})}},e.prototype._initEvents=function(t){var a=this;t.on("click",function(n){if(a._state==="ready"){var i=a.seriesModel.get("nodeClick",!0);if(!!i){var o=a.findTarget(n.offsetX,n.offsetY);if(!!o){var l=o.node;if(l.getLayout().isLeafRoot)a._rootToNode(o);else if(i==="zoomToNode")a._zoomToNode(o);else if(i==="link"){var s=l.hostTree.data.getItemModel(l.dataIndex),u=s.get("link",!0),v=s.get("target",!0)||"blank";u&&oo(u,v)}}}}},this)},e.prototype._renderBreadcrumb=function(t,a,n){var i=this;n||(n=t.get("leafDepth",!0)!=null?{node:t.getViewRoot()}:this.findTarget(a.getWidth()/2,a.getHeight()/2),n||(n={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new Av(this.group))).render(t,a,n.node,function(o){i._state!=="animating"&&(qa(t.getViewRoot(),o)?i._rootToNode({node:o}):i._zoomToNode({node:o}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=me(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype._rootToNode=function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype.findTarget=function(t,a){var n,i=this.seriesModel.getViewRoot();return i.eachNode({attr:"viewChildren",order:"preorder"},function(o){var l=this._storage.background[o.getRawIndex()];if(l){var s=l.transformCoordToLocal(t,a),u=l.shape;if(u.x<=s[0]&&s[0]<=u.x+u.width&&u.y<=s[1]&&s[1]<=u.y+u.height)n={node:o,offsetX:s[0],offsetY:s[1]};else return!1}},this),n},e.type="treemap",e}(ut);function me(){return{nodeGroup:[],background:[],content:[]}}function Vv(r,e,t,a,n,i,o,l,s,u){if(!o)return;var v=o.getLayout(),c=r.getData(),f=o.getModel();if(c.setItemGraphicEl(o.dataIndex,null),!v||!v.isInView)return;var h=v.width,d=v.height,p=v.borderWidth,g=v.invisible,m=o.getRawIndex(),S=l&&l.getRawIndex(),y=o.viewChildren,b=v.upperHeight,x=y&&y.length,w=f.getModel("itemStyle"),I=f.getModel(["emphasis","itemStyle"]),L=f.getModel(["blur","itemStyle"]),_=f.getModel(["select","itemStyle"]),D=w.get("borderRadius")||0,A=Q("nodeGroup",pa);if(!A)return;if(s.add(A),A.x=v.x||0,A.y=v.y||0,A.markRedraw(),tr(A).nodeWidth=h,tr(A).nodeHeight=d,v.isAboveViewRoot)return A;var M=Q("background",Bn,u,Pv);M&&k(A,M,x&&v.upperLabelHeight);var E=f.getModel("emphasis"),T=E.get("focus"),C=E.get("blurScope"),P=E.get("disabled"),V=T==="ancestor"?o.getAncestorsIndices():T==="descendant"?o.getDescendantIndices():T;if(x)Sn(A)&&ze(A,!1),M&&(ze(M,!P),c.setItemGraphicEl(o.dataIndex,M),bn(M,V,C));else{var R=Q("content",Bn,u,Ev);R&&z(A,R),M.disableMorphing=!0,M&&Sn(M)&&ze(M,!1),ze(A,!P),c.setItemGraphicEl(o.dataIndex,A),bn(A,V,C)}return A;function k(Z,$,K){var q=et($);if(q.dataIndex=o.dataIndex,q.seriesIndex=r.seriesIndex,$.setShape({x:0,y:0,width:h,height:d,r:D}),g)B($);else{$.invisible=!1;var j=o.getVisual("style"),ct=j.stroke,xt=Wn(w);xt.fill=ct;var at=Jt(I);at.fill=I.get("borderColor");var wt=Jt(L);wt.fill=L.get("borderColor");var Nt=Jt(_);if(Nt.fill=_.get("borderColor"),K){var ne=h-2*p;Y($,ct,j.opacity,{x:p,y:0,width:ne,height:b})}else $.removeTextContent();$.setStyle(xt),$.ensureState("emphasis").style=at,$.ensureState("blur").style=wt,$.ensureState("select").style=Nt,Ke($)}Z.add($)}function z(Z,$){var K=et($);K.dataIndex=o.dataIndex,K.seriesIndex=r.seriesIndex;var q=Math.max(h-2*p,0),j=Math.max(d-2*p,0);if($.culling=!0,$.setShape({x:p,y:p,width:q,height:j,r:D}),g)B($);else{$.invisible=!1;var ct=o.getVisual("style"),xt=ct.fill,at=Wn(w);at.fill=xt,at.decal=ct.decal;var wt=Jt(I),Nt=Jt(L),ne=Jt(_);Y($,xt,ct.opacity,null),$.setStyle(at),$.ensureState("emphasis").style=wt,$.ensureState("blur").style=Nt,$.ensureState("select").style=ne,Ke($)}Z.add($)}function B(Z){!Z.invisible&&i.push(Z)}function Y(Z,$,K,q){var j=f.getModel(q?Hn:Fn),ct=fr(f.get("name"),null),xt=j.getShallow("show");ae(Z,Ot(f,q?Hn:Fn),{defaultText:xt?ct:null,inheritColor:$,defaultOpacity:K,labelFetcher:r,labelDataIndex:o.dataIndex});var at=Z.getTextContent();if(!!at){var wt=at.style,Nt=$l(wt.padding||0);q&&(Z.setTextConfig({layoutRect:q}),at.disableLabelLayout=!0),at.beforeUpdate=function(){var pn=Math.max((q?q.width:Z.shape.width)-Nt[1]-Nt[3],0),dn=Math.max((q?q.height:Z.shape.height)-Nt[0]-Nt[2],0);(wt.width!==pn||wt.height!==dn)&&at.setStyle({width:pn,height:dn})},wt.truncateMinChar=2,wt.lineOverflow="truncate",X(wt,q,v);var ne=at.getState("emphasis");X(ne?ne.style:null,q,v)}}function X(Z,$,K){var q=Z?Z.text:null;if(!$&&K.isLeafRoot&&q!=null){var j=r.get("drillDownIcon",!0);Z.text=j?j+" "+q:q}}function Q(Z,$,K,q){var j=S!=null&&t[Z][S],ct=n[Z];return j?(t[Z][S]=null,ot(ct,j)):g||(j=new $,j instanceof Pa&&(j.z2=Rv(K,q)),Tt(ct,j)),e[Z][m]=j}function ot(Z,$){var K=Z[m]={};$ instanceof pa?(K.oldX=$.x,K.oldY=$.y):K.oldShape=W({},$.shape)}function Tt(Z,$){var K=Z[m]={},q=o.parentNode,j=$ instanceof rt;if(q&&(!a||a.direction==="drillDown")){var ct=0,xt=0,at=n.background[q.getRawIndex()];!a&&at&&at.oldShape&&(ct=at.oldShape.width,xt=at.oldShape.height),j?(K.oldX=0,K.oldY=xt):K.oldShape={x:ct,y:xt,width:0,height:0}}K.fadein=!j}}function Rv(r,e){return r*Mv+e}var kv=Nv,Gv="itemStyle",Po=bt(),zv={seriesType:"treemap",reset:function(r){var e=r.getData().tree,t=e.root;t.isRemoved()||Eo(t,{},r.getViewRoot().getAncestors(),r)}};function Eo(r,e,t,a){var n=r.getModel(),i=r.getLayout(),o=r.hostTree.data;if(!(!i||i.invisible||!i.isInView)){var l=n.getModel(Gv),s=Ov(l,e,a),u=o.ensureUniqueItemVisual(r.dataIndex,"style"),v=l.get("borderColor"),c=l.get("borderColorSaturation"),f;c!=null&&(f=Un(s),v=Bv(c,f)),u.stroke=v;var h=r.viewChildren;if(!h||!h.length)f=Un(s),u.fill=f;else{var d=$v(r,n,i,l,s,h);N(h,function(p,g){if(p.depth>=t.length||p===t[p.depth]){var m=Fv(n,s,p,g,d,a);Eo(p,m,t,a)}})}}}function Ov(r,e,t){var a=W({},e),n=t.designatedVisualItemStyle;return N(["color","colorAlpha","colorSaturation"],function(i){n[i]=e[i];var o=r.get(i);n[i]=null,o!=null&&(a[i]=o)}),a}function Un(r){var e=Cr(r,"color");if(e){var t=Cr(r,"colorAlpha"),a=Cr(r,"colorSaturation");return a&&(e=lo(e,null,null,a)),t&&(e=oa(e,t)),e}}function Bv(r,e){return e!=null?lo(e,null,null,r):null}function Cr(r,e){var t=r[e];if(t!=null&&t!=="none")return t}function $v(r,e,t,a,n,i){if(!(!i||!i.length)){var o=Mr(e,"color")||n.color!=null&&n.color!=="none"&&(Mr(e,"colorAlpha")||Mr(e,"colorSaturation"));if(!!o){var l=e.get("visualMin"),s=e.get("visualMax"),u=t.dataExtent.slice();l!=null&&lu[1]&&(u[1]=s);var v=e.get("colorMappingBy"),c={type:o.name,dataExtent:u,visual:o.range};c.type==="color"&&(v==="index"||v==="id")?(c.mappingMethod="category",c.loop=!0):c.mappingMethod="linear";var f=new so(c);return Po(f).drColorMappingBy=v,f}}}function Mr(r,e){var t=r.get(e);return H(t)&&t.length?{name:e,range:t}:null}function Fv(r,e,t,a,n,i){var o=W({},e);if(n){var l=n.type,s=l==="color"&&Po(n).drColorMappingBy,u=s==="index"?a:s==="id"?i.mapIdToIndex(t.getId()):t.getValue(r.get("visualDimension"));o[l]=n.mapValueToVisual(u)}return o}var Ee=Math.max,er=Math.min,Zn=Pt,Ka=N,No=["itemStyle","borderWidth"],Hv=["itemStyle","gapWidth"],Wv=["upperLabel","show"],Uv=["upperLabel","height"],Zv={seriesType:"treemap",reset:function(r,e,t,a){var n=t.getWidth(),i=t.getHeight(),o=r.option,l=he(r.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),s=o.size||[],u=O(Zn(l.width,s[0]),n),v=O(Zn(l.height,s[1]),i),c=a&&a.type,f=["treemapZoomToNode","treemapRootToNode"],h=Pe(a,f,r),d=c==="treemapRender"||c==="treemapMove"?a.rootRect:null,p=r.getViewRoot(),g=To(p);if(c!=="treemapMove"){var m=c==="treemapZoomToNode"?jv(r,h,p,u,v):d?[d.width,d.height]:[u,v],S=o.sort;S&&S!=="asc"&&S!=="desc"&&(S="desc");var y={squareRatio:o.squareRatio,sort:S,leafDepth:o.leafDepth};p.hostTree.clearLayouts();var b={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};p.setLayout(b),Vo(p,y,!1,0),b=p.getLayout(),Ka(g,function(w,I){var L=(g[I+1]||p).getValue();w.setLayout(W({dataExtent:[L,L],borderWidth:0,upperHeight:0},b))})}var x=r.getData().tree.root;x.setLayout(Jv(l,d,h),!0),r.setLayoutInfo(l),Ro(x,new Et(-l.x,-l.y,n,i),g,p,0)}};function Vo(r,e,t,a){var n,i;if(!r.isRemoved()){var o=r.getLayout();n=o.width,i=o.height;var l=r.getModel(),s=l.get(No),u=l.get(Hv)/2,v=ko(l),c=Math.max(s,v),f=s-u,h=c-u;r.setLayout({borderWidth:s,upperHeight:c,upperLabelHeight:v},!0),n=Ee(n-2*f,0),i=Ee(i-f-h,0);var d=n*i,p=Yv(r,l,d,e,t,a);if(!!p.length){var g={x:f,y:h,width:n,height:i},m=er(n,i),S=1/0,y=[];y.area=0;for(var b=0,x=p.length;b=0;s--){var u=n[a==="asc"?o-s-1:s].getValue();u/t*el[1]&&(l[1]=u)})),{sum:a,dataExtent:l}}function Qv(r,e,t){for(var a=0,n=1/0,i=0,o=void 0,l=r.length;ia&&(a=o));var s=r.area*r.area,u=e*e*t;return s?Ee(u*a/s,s/(u*n)):1/0}function Yn(r,e,t,a,n){var i=e===t.width?0:1,o=1-i,l=["x","y"],s=["width","height"],u=t[l[i]],v=e?r.area/e:0;(n||v>t[s[o]])&&(v=t[s[o]]);for(var c=0,f=r.length;cxn&&(u=xn),i=l}ua&&(a=e);var i=a%2?a+2:a+3;n=[];for(var o=0;o0&&(x[0]=-x[0],x[1]=-x[1]);var I=b[0]<0?-1:1;if(i.__position!=="start"&&i.__position!=="end"){var L=-Math.atan2(b[1],b[0]);c[0].8?"left":f[0]<-.8?"right":"center",p=f[1]>.8?"top":f[1]<-.8?"bottom":"middle";break;case"start":i.x=-f[0]*m+v[0],i.y=-f[1]*S+v[1],d=f[0]>.8?"right":f[0]<-.8?"left":"center",p=f[1]>.8?"bottom":f[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":i.x=m*I+v[0],i.y=v[1]+_,d=b[0]<0?"right":"left",i.originX=-m*I,i.originY=-_;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=w[0],i.y=w[1]+_,d="center",i.originY=-_;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-m*I+c[0],i.y=c[1]+_,d=b[0]>=0?"right":"left",i.originX=m*I,i.originY=-_;break}i.scaleX=i.scaleY=o,i.setStyle({verticalAlign:i.__verticalAlign||p,align:i.__align||d})}},e}(rt),tn=mc,Sc=function(){function r(e){this.group=new rt,this._LineCtor=e||tn}return r.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var a=this,n=a.group,i=a._lineData;a._lineData=e,i||n.removeAll();var o=jn(e);e.diff(i).add(function(l){t._doAdd(e,l,o)}).update(function(l,s){t._doUpdate(i,e,s,l,o)}).remove(function(l){n.remove(i.getItemGraphicEl(l))}).execute()},r.prototype.updateLayout=function(){var e=this._lineData;!e||e.eachItemGraphicEl(function(t,a){t.updateLayout(e,a)},this)},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=jn(e),this._lineData=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t){this._progressiveEls=[];function a(l){!l.isGroup&&!bc(l)&&(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var n=e.start;n0}function jn(r){var e=r.hostModel,t=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:t.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:t.get("disabled"),blurScope:t.get("blurScope"),focus:t.get("focus"),labelStatesModels:Ot(e)}}function Jn(r){return isNaN(r[0])||isNaN(r[1])}function Rr(r){return r&&!Jn(r[0])&&!Jn(r[1])}var en=Sc,kr=[],Gr=[],zr=[],oe=fo,Or=Zl,ti=Math.abs;function ei(r,e,t){for(var a=r[0],n=r[1],i=r[2],o=1/0,l,s=t*t,u=.1,v=.1;v<=.9;v+=.1){kr[0]=oe(a[0],n[0],i[0],v),kr[1]=oe(a[1],n[1],i[1],v);var c=ti(Or(kr,e)-s);c=0?l=l+u:l=l-u:d>=0?l=l-u:l=l+u}return l}function Br(r,e){var t=[],a=Ul,n=[[],[],[]],i=[[],[]],o=[];e/=2,r.eachEdge(function(l,s){var u=l.getLayout(),v=l.getVisual("fromSymbol"),c=l.getVisual("toSymbol");u.__original||(u.__original=[Zt(u[0]),Zt(u[1])],u[2]&&u.__original.push(Zt(u[2])));var f=u.__original;if(u[2]!=null){if(ft(n[0],f[0]),ft(n[1],f[2]),ft(n[2],f[1]),v&&v!=="none"){var h=Ie(l.node1),d=ei(n,f[0],h*e);a(n[0][0],n[1][0],n[2][0],d,t),n[0][0]=t[3],n[1][0]=t[4],a(n[0][1],n[1][1],n[2][1],d,t),n[0][1]=t[3],n[1][1]=t[4]}if(c&&c!=="none"){var h=Ie(l.node2),d=ei(n,f[1],h*e);a(n[0][0],n[1][0],n[2][0],d,t),n[1][0]=t[1],n[2][0]=t[2],a(n[0][1],n[1][1],n[2][1],d,t),n[1][1]=t[1],n[2][1]=t[2]}ft(u[0],n[0]),ft(u[1],n[2]),ft(u[2],n[1])}else{if(ft(i[0],f[0]),ft(i[1],f[1]),ve(o,i[1],i[0]),ke(o,o),v&&v!=="none"){var h=Ie(l.node1);la(i[0],i[0],o,h*e)}if(c&&c!=="none"){var h=Ie(l.node2);la(i[1],i[1],o,-h*e)}ft(u[0],i[0]),ft(u[1],i[1])}})}function ri(r){return r.type==="view"}var xc=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a){var n=new Va,i=new en,o=this.group;this._controller=new Ta(a.getZr()),this._controllerHost={target:o},o.add(n.group),o.add(i.group),this._symbolDraw=n,this._lineDraw=i,this._firstRender=!0},e.prototype.render=function(t,a,n){var i=this,o=t.coordinateSystem;this._model=t;var l=this._symbolDraw,s=this._lineDraw,u=this.group;if(ri(o)){var v={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?u.attr(v):it(u,v,t)}Br(t.getGraph(),we(t));var c=t.getData();l.updateData(c);var f=t.getEdgeData();s.updateData(f),this._updateNodeAndLinkScale(),this._updateController(t,a,n),clearTimeout(this._layoutTimeout);var h=t.forceLayout,d=t.get(["force","layoutAnimation"]);h&&this._startForceLayoutIteration(h,d);var p=t.get("layout");c.graph.eachNode(function(y){var b=y.dataIndex,x=y.getGraphicEl(),w=y.getModel();if(!!x){x.off("drag").off("dragend");var I=w.get("draggable");I&&x.on("drag",function(_){switch(p){case"force":h.warmUp(),!i._layouting&&i._startForceLayoutIteration(h,d),h.setFixed(b),c.setItemLayout(b,[x.x,x.y]);break;case"circular":c.setItemLayout(b,[x.x,x.y]),y.setLayout({fixed:!0},!0),Ja(t,"symbolSize",y,[_.offsetX,_.offsetY]),i.updateLayout(t);break;case"none":default:c.setItemLayout(b,[x.x,x.y]),ja(t.getGraph(),t),i.updateLayout(t);break}}).on("dragend",function(){h&&h.setUnfixed(b)}),x.setDraggable(I&&!!h,!!w.get("cursor"));var L=w.get(["emphasis","focus"]);L==="adjacency"&&(et(x).focus=y.getAdjacentDataIndices())}}),c.graph.eachEdge(function(y){var b=y.getGraphicEl(),x=y.getModel().get(["emphasis","focus"]);!b||x==="adjacency"&&(et(b).focus={edge:[y.dataIndex],node:[y.node1.dataIndex,y.node2.dataIndex]})});var g=t.get("layout")==="circular"&&t.get(["circular","rotateLabel"]),m=c.getLayout("cx"),S=c.getLayout("cy");c.graph.eachNode(function(y){Bo(y,g,m,S)}),this._firstRender=!1},e.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(t,a){var n=this;(function i(){t.step(function(o){n.updateLayout(n._model),(n._layouting=!o)&&(a?n._layoutTimeout=setTimeout(i,16):i())})})()},e.prototype._updateController=function(t,a,n){var i=this,o=this._controller,l=this._controllerHost,s=this.group;if(o.setPointerChecker(function(u,v,c){var f=s.getBoundingRect();return f.applyTransform(s.transform),f.contain(v,c)&&!to(u,n,t)}),!ri(t.coordinateSystem)){o.disable();return}o.enable(t.get("roam")),l.zoomLimit=t.get("scaleLimit"),l.zoom=t.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",function(u){eo(l,u.dx,u.dy),n.dispatchAction({seriesId:t.id,type:"graphRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){ro(l,u.scale,u.originX,u.originY),n.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),i._updateNodeAndLinkScale(),Br(t.getGraph(),we(t)),i._lineDraw.updateLayout(),n.updateLabelLayout()})},e.prototype._updateNodeAndLinkScale=function(){var t=this._model,a=t.getData(),n=we(t);a.eachItemGraphicEl(function(i,o){i&&i.setSymbolScale(n)})},e.prototype.updateLayout=function(t){Br(t.getGraph(),we(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},e.prototype.remove=function(t,a){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},e.type="graph",e}(ut),wc=xc;function le(r){return"_EC_"+r}var Ic=function(){function r(e){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=e||!1}return r.prototype.isDirected=function(){return this._directed},r.prototype.addNode=function(e,t){e=e==null?""+t:""+e;var a=this._nodesMap;if(!a[le(e)]){var n=new te(e,t);return n.hostGraph=this,this.nodes.push(n),a[le(e)]=n,n}},r.prototype.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},r.prototype.getNodeById=function(e){return this._nodesMap[le(e)]},r.prototype.addEdge=function(e,t,a){var n=this._nodesMap,i=this._edgesMap;if(Bt(e)&&(e=this.nodes[e]),Bt(t)&&(t=this.nodes[t]),e instanceof te||(e=n[le(e)]),t instanceof te||(t=n[le(t)]),!(!e||!t)){var o=e.id+"-"+t.id,l=new Fo(e,t,a);return l.hostGraph=this,this._directed&&(e.outEdges.push(l),t.inEdges.push(l)),e.edges.push(l),e!==t&&t.edges.push(l),this.edges.push(l),i[o]=l,l}},r.prototype.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},r.prototype.getEdge=function(e,t){e instanceof te&&(e=e.id),t instanceof te&&(t=t.id);var a=this._edgesMap;return this._directed?a[e+"-"+t]:a[e+"-"+t]||a[t+"-"+e]},r.prototype.eachNode=function(e,t){for(var a=this.nodes,n=a.length,i=0;i=0&&e.call(t,a[i],i)},r.prototype.eachEdge=function(e,t){for(var a=this.edges,n=a.length,i=0;i=0&&a[i].node1.dataIndex>=0&&a[i].node2.dataIndex>=0&&e.call(t,a[i],i)},r.prototype.breadthFirstTraverse=function(e,t,a,n){if(t instanceof te||(t=this._nodesMap[le(t)]),!!t){for(var i=a==="out"?"outEdges":a==="in"?"inEdges":"edges",o=0;o=0&&s.node2.dataIndex>=0});for(var i=0,o=n.length;i=0&&this[r][e].setItemVisual(this.dataIndex,t,a)},getVisual:function(t){return this[r][e].getItemVisual(this.dataIndex,t)},setLayout:function(t,a){this.dataIndex>=0&&this[r][e].setItemLayout(this.dataIndex,t,a)},getLayout:function(){return this[r][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[r][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[r][e].getRawIndex(this.dataIndex)}}}pe(te,Ho("hostGraph","data"));pe(Fo,Ho("hostGraph","edgeData"));var Lc=Ic;function Wo(r,e,t,a,n){for(var i=new Lc(a),o=0;o "+f)),u++)}var h=t.get("coordinateSystem"),d;if(h==="cartesian2d"||h==="polar")d=Ge(r,t);else{var p=ho.get(h),g=p?p.dimensions||[]:[];Dt(g,"value")<0&&g.concat(["value"]);var m=Ma(r,{coordDimensions:g,encodeDefine:t.getEncode()}).dimensions;d=new mt(m,t),d.initData(r)}var S=new mt(["value"],t);return S.initData(s,l),n&&n(d,S),Do({mainData:d,struct:i,structAttr:"graph",datas:{node:d,edge:S},datasAttr:{node:"data",edge:"edgeData"}}),i.update(),i}var _c=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments);var a=this;function n(){return a._categoriesData}this.legendVisualProvider=new Ra(n,n),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(t){r.prototype.mergeDefaultAndTheme.apply(this,arguments),ka(t,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,a){var n=t.edges||t.links||[],i=t.data||t.nodes||[],o=this;if(i&&n){oc(this);var l=Wo(i,n,this,!0,s);return N(l.edges,function(u){lc(u.node1,u.node2,this,u.dataIndex)},this),l.data}function s(u,v){u.wrapMethod("getItemModel",function(d){var p=o._categoriesModels,g=d.getShallow("category"),m=p[g];return m&&(m.parentModel=d.parentModel,d.parentModel=m),d});var c=Xt.prototype.getModel;function f(d,p){var g=c.call(this,d,p);return g.resolveParentPath=h,g}v.wrapMethod("getItemModel",function(d){return d.resolveParentPath=h,d.getModel=f,d});function h(d){if(d&&(d[0]==="label"||d[1]==="label")){var p=d.slice();return d[0]==="label"?p[0]="edgeLabel":d[1]==="label"&&(p[1]="edgeLabel"),p}return d}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(t,a,n){if(n==="edge"){var i=this.getData(),o=this.getDataParams(t,n),l=i.graph.getEdgeByIndex(t),s=i.getName(l.node1.dataIndex),u=i.getName(l.node2.dataIndex),v=[];return s!=null&&v.push(s),u!=null&&v.push(u),zt("nameValue",{name:v.join(" > "),value:o.value,noValue:o.value==null})}var c=Yl({series:this,dataIndex:t,multipleSeries:a});return c},e.prototype._updateCategoriesData=function(){var t=F(this.option.categories||[],function(n){return n.value!=null?n:W({value:0},n)}),a=new mt(["value"],this);a.initData(t),this._categoriesData=a,this._categoriesModels=a.mapArray(function(n){return a.getItemModel(n)})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return r.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.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"}}},e}(vt),Dc=_c,Ac={type:"graphRoam",event:"graphRoam",update:"none"};function Tc(r){r.registerChartView(wc),r.registerSeriesModel(Dc),r.registerProcessor(ec),r.registerVisual(rc),r.registerVisual(ac),r.registerLayout(sc),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,vc),r.registerLayout(fc),r.registerCoordinateSystem("graphView",{dimensions:Ca.dimensions,create:pc}),r.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},De),r.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},De),r.registerAction(Ac,function(e,t,a){t.eachComponent({mainType:"series",query:e},function(n){var i=n.coordinateSystem,o=io(i,e,void 0,a);n.setCenter&&n.setCenter(o.center),n.setZoom&&n.setZoom(o.zoom)})})}var Cc=function(){function r(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return r}(),Mc=function(r){G(e,r);function e(t){var a=r.call(this,t)||this;return a.type="pointer",a}return e.prototype.getDefaultShape=function(){return new Cc},e.prototype.buildPath=function(t,a){var n=Math.cos,i=Math.sin,o=a.r,l=a.width,s=a.angle,u=a.x-n(s)*l*(l>=o/3?1:2),v=a.y-i(s)*l*(l>=o/3?1:2);s=a.angle-Math.PI/2,t.moveTo(u,v),t.lineTo(a.x+n(s)*l,a.y+i(s)*l),t.lineTo(a.x+n(a.angle)*o,a.y+i(a.angle)*o),t.lineTo(a.x-n(s)*l,a.y-i(s)*l),t.lineTo(u,v)},e}(pt),Pc=Mc;function Ec(r,e){var t=r.get("center"),a=e.getWidth(),n=e.getHeight(),i=Math.min(a,n),o=O(t[0],e.getWidth()),l=O(t[1],e.getHeight()),s=O(r.get("radius"),i/2);return{cx:o,cy:l,r:s}}function He(r,e){var t=r==null?"":r+"";return e&&(gt(e)?t=e.replace("{value}",t):nt(e)&&(t=e(r))),t}var Nc=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){this.group.removeAll();var i=t.get(["axisLine","lineStyle","color"]),o=Ec(t,n);this._renderMain(t,a,n,i,o),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,a,n,i,o){var l=this.group,s=t.get("clockwise"),u=-t.get("startAngle")/180*Math.PI,v=-t.get("endAngle")/180*Math.PI,c=t.getModel("axisLine"),f=c.get("roundCap"),h=f?Ln:Ce,d=c.get("show"),p=c.getModel("lineStyle"),g=p.get("width"),m=[u,v];Xl(m,!s),u=m[0],v=m[1];for(var S=v-u,y=u,b=0;d&&b=L&&(_===0?0:i[_-1][0])Math.PI/2&&(Q+=Math.PI)):X==="tangential"?Q=-L-Math.PI/2:Bt(X)&&(Q=X*Math.PI/180),Q===0?c.add(new Ht({style:Vt(y,{text:k,x:B,y:Y,verticalAlign:C<-.8?"top":C>.8?"bottom":"middle",align:T<-.4?"left":T>.4?"right":"center"},{inheritColor:z}),silent:!0})):c.add(new Ht({style:Vt(y,{text:k,x:B,y:Y,verticalAlign:"middle",align:"center"},{inheritColor:z}),silent:!0,originX:B,originY:Y,rotation:Q}))}if(S.get("show")&&P!==b){var V=S.get("distance");V=V?V+v:v;for(var ot=0;ot<=x;ot++){T=Math.cos(L),C=Math.sin(L);var Tt=new Qe({shape:{x1:T*(d-V)+f,y1:C*(d-V)+h,x2:T*(d-I-V)+f,y2:C*(d-I-V)+h},silent:!0,style:M});M.stroke==="auto"&&Tt.setStyle({stroke:i((P+ot/x)/b)}),c.add(Tt),L+=D}L-=D}else L+=_}},e.prototype._renderPointer=function(t,a,n,i,o,l,s,u,v){var c=this.group,f=this._data,h=this._progressEls,d=[],p=t.get(["pointer","show"]),g=t.getModel("progress"),m=g.get("show"),S=t.getData(),y=S.mapDimension("value"),b=+t.get("min"),x=+t.get("max"),w=[b,x],I=[l,s];function L(D,A){var M=S.getItemModel(D),E=M.getModel("pointer"),T=O(E.get("width"),o.r),C=O(E.get("length"),o.r),P=t.get(["pointer","icon"]),V=E.get("offsetCenter"),R=O(V[0],o.r),k=O(V[1],o.r),z=E.get("keepAspect"),B;return P?B=Te(P,R-T/2,k-C,T,C,null,z):B=new Pc({shape:{angle:-Math.PI/2,width:T,r:C,x:R,y:k}}),B.rotation=-(A+Math.PI/2),B.x=o.cx,B.y=o.cy,B}function _(D,A){var M=g.get("roundCap"),E=M?Ln:Ce,T=g.get("overlap"),C=T?g.get("width"):v/S.count(),P=T?o.r-C:o.r-(D+1)*C,V=T?o.r:o.r-D*C,R=new E({shape:{startAngle:l,endAngle:A,cx:o.cx,cy:o.cy,clockwise:u,r0:P,r:V}});return T&&(R.z2=x-S.get(y,D)%x),R}(m||p)&&(S.diff(f).add(function(D){var A=S.get(y,D);if(p){var M=L(D,l);_t(M,{rotation:-((isNaN(+A)?I[0]:Mt(A,w,I,!0))+Math.PI/2)},t),c.add(M),S.setItemGraphicEl(D,M)}if(m){var E=_(D,l),T=g.get("clip");_t(E,{shape:{endAngle:Mt(A,w,I,T)}},t),c.add(E),In(t.seriesIndex,S.dataType,D,E),d[D]=E}}).update(function(D,A){var M=S.get(y,D);if(p){var E=f.getItemGraphicEl(A),T=E?E.rotation:l,C=L(D,T);C.rotation=T,it(C,{rotation:-((isNaN(+M)?I[0]:Mt(M,w,I,!0))+Math.PI/2)},t),c.add(C),S.setItemGraphicEl(D,C)}if(m){var P=h[A],V=P?P.shape.endAngle:l,R=_(D,V),k=g.get("clip");it(R,{shape:{endAngle:Mt(M,w,I,k)}},t),c.add(R),In(t.seriesIndex,S.dataType,D,R),d[D]=R}}).execute(),S.each(function(D){var A=S.getItemModel(D),M=A.getModel("emphasis"),E=M.get("focus"),T=M.get("blurScope"),C=M.get("disabled");if(p){var P=S.getItemGraphicEl(D),V=S.getItemVisual(D,"style"),R=V.fill;if(P instanceof Ga){var k=P.style;P.useStyle(W({image:k.image,x:k.x,y:k.y,width:k.width,height:k.height},V))}else P.useStyle(V),P.type!=="pointer"&&P.setColor(R);P.setStyle(A.getModel(["pointer","itemStyle"]).getItemStyle()),P.style.fill==="auto"&&P.setStyle("fill",i(Mt(S.get(y,D),w,[0,1],!0))),P.z2EmphasisLift=0,At(P,A),st(P,E,T,C)}if(m){var z=d[D];z.useStyle(S.getItemVisual(D,"style")),z.setStyle(A.getModel(["progress","itemStyle"]).getItemStyle()),z.z2EmphasisLift=0,At(z,A),st(z,E,T,C)}}),this._progressEls=d)},e.prototype._renderAnchor=function(t,a){var n=t.getModel("anchor"),i=n.get("show");if(i){var o=n.get("size"),l=n.get("icon"),s=n.get("offsetCenter"),u=n.get("keepAspect"),v=Te(l,a.cx-o/2+O(s[0],a.r),a.cy-o/2+O(s[1],a.r),o,o,null,u);v.z2=n.get("showAbove")?1:0,v.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(v)}},e.prototype._renderTitleAndDetail=function(t,a,n,i,o){var l=this,s=t.getData(),u=s.mapDimension("value"),v=+t.get("min"),c=+t.get("max"),f=new rt,h=[],d=[],p=t.isAnimationEnabled(),g=t.get(["pointer","showAbove"]);s.diff(this._data).add(function(m){h[m]=new Ht({silent:!0}),d[m]=new Ht({silent:!0})}).update(function(m,S){h[m]=l._titleEls[S],d[m]=l._detailEls[S]}).execute(),s.each(function(m){var S=s.getItemModel(m),y=s.get(u,m),b=new rt,x=i(Mt(y,[v,c],[0,1],!0)),w=S.getModel("title");if(w.get("show")){var I=w.get("offsetCenter"),L=o.cx+O(I[0],o.r),_=o.cy+O(I[1],o.r),D=h[m];D.attr({z2:g?0:2,style:Vt(w,{x:L,y:_,text:s.getName(m),align:"center",verticalAlign:"middle"},{inheritColor:x})}),b.add(D)}var A=S.getModel("detail");if(A.get("show")){var M=A.get("offsetCenter"),E=o.cx+O(M[0],o.r),T=o.cy+O(M[1],o.r),C=O(A.get("width"),o.r),P=O(A.get("height"),o.r),V=t.get(["progress","show"])?s.getItemVisual(m,"style").fill:x,D=d[m],R=A.get("formatter");D.attr({z2:g?0:2,style:Vt(A,{x:E,y:T,text:He(y,R),width:isNaN(C)?null:C,height:isNaN(P)?null:P,align:"center",verticalAlign:"middle"},{inheritColor:V})}),ql(D,{normal:A},y,function(z){return He(z,R)}),p&&ji(D,m,s,t,{getFormattedLabel:function(z,B,Y,X,Q,ot){return He(ot?ot.interpolatedValue:y,R)}}),b.add(D)}f.add(b)}),this.group.add(f),this._titleEls=h,this._detailEls=d},e.type="gauge",e}(ut),Vc=Nc,Rc=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="itemStyle",t}return e.prototype.getInitialData=function(t,a){return za(this,["value"])},e.type="series.gauge",e.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(vt),kc=Rc;function Gc(r){r.registerChartView(Vc),r.registerSeriesModel(kc)}var zc=["itemStyle","opacity"],Oc=function(r){G(e,r);function e(t,a){var n=r.call(this)||this,i=n,o=new Oa,l=new Ht;return i.setTextContent(l),n.setTextGuideLine(o),n.updateData(t,a,!0),n}return e.prototype.updateData=function(t,a,n){var i=this,o=t.hostModel,l=t.getItemModel(a),s=t.getItemLayout(a),u=l.getModel("emphasis"),v=l.get(zc);v=v==null?1:v,n||de(i),i.useStyle(t.getItemVisual(a,"style")),i.style.lineJoin="round",n?(i.setShape({points:s.points}),i.style.opacity=0,_t(i,{style:{opacity:v}},o,a)):it(i,{style:{opacity:v},shape:{points:s.points}},o,a),At(i,l),this._updateLabel(t,a),st(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t,a){var n=this,i=this.getTextGuideLine(),o=n.getTextContent(),l=t.hostModel,s=t.getItemModel(a),u=t.getItemLayout(a),v=u.label,c=t.getItemVisual(a,"style"),f=c.fill;ae(o,Ot(s),{labelFetcher:t.hostModel,labelDataIndex:a,defaultOpacity:c.opacity,defaultText:t.getName(a)},{normal:{align:v.textAlign,verticalAlign:v.verticalAlign}}),n.setTextConfig({local:!0,inside:!!v.inside,insideStroke:f,outsideFill:f});var h=v.linePoints;i.setShape({points:h}),n.textGuideLineConfig={anchor:h?new Wt(h[0][0],h[0][1]):null},it(o,{style:{x:v.x,y:v.y}},l,a),o.attr({rotation:v.rotation,originX:v.x,originY:v.y,z2:10}),Ki(n,Qi(s),{stroke:f})},e}(Ae),Bc=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.ignoreLabelLineUpdate=!0,t}return e.prototype.render=function(t,a,n){var i=t.getData(),o=this._data,l=this.group;i.diff(o).add(function(s){var u=new Oc(i,s);i.setItemGraphicEl(s,u),l.add(u)}).update(function(s,u){var v=o.getItemGraphicEl(u);v.updateData(i,s),l.add(v),i.setItemGraphicEl(s,v)}).remove(function(s){var u=o.getItemGraphicEl(s);Kl(u,t,s)}).execute(),this._data=i},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(ut),$c=Bc,Fc=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new Ra(lt(this.getData,this),lt(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.getInitialData=function(t,a){return za(this,{coordDimensions:["value"],encodeDefaulter:tt(Ql,this)})},e.prototype._defaultLabelLine=function(t){ka(t,"labelLine",["show"]);var a=t.labelLine,n=t.emphasis.labelLine;a.show=a.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.prototype.getDataParams=function(t){var a=this.getData(),n=r.prototype.getDataParams.call(this,t),i=a.mapDimension("value"),o=a.getSum(i);return n.percent=o?+(a.get(i,t)/o*100).toFixed(2):0,n.$vars.push("percent"),n},e.type="series.funnel",e.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"}}},e}(vt),Hc=Fc;function Wc(r,e){return he(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function Uc(r,e){for(var t=r.mapDimension("value"),a=r.mapArray(t,function(s){return s}),n=[],i=e==="ascending",o=0,l=r.count();o=0&&(l[o[s].depth]=new Xt(o[s],this,a));if(i&&n){var u=Wo(i,n,this,!0,v);return u.data}function v(c,f){c.wrapMethod("getItemModel",function(h,d){var p=h.parentModel,g=p.getData().getItemLayout(d);if(g){var m=g.depth,S=p.levelModels[m];S&&(h.parentModel=S)}return h}),f.wrapMethod("getItemModel",function(h,d){var p=h.parentModel,g=p.getGraph().getEdgeByIndex(d),m=g.node1.getLayout();if(m){var S=m.depth,y=p.levelModels[S];y&&(h.parentModel=y)}return h})}},e.prototype.setNodePosition=function(t,a){var n=this.option.data||this.option.nodes,i=n[t];i.localX=a[0],i.localY=a[1]},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,a,n){function i(h){return isNaN(h)||h==null}if(n==="edge"){var o=this.getDataParams(t,n),l=o.data,s=o.value,u=l.source+" -- "+l.target;return zt("nameValue",{name:u,value:s,noValue:i(s)})}else{var v=this.getGraph().getNodeByIndex(t),c=v.getLayout().value,f=this.getDataParams(t,n).data.name;return zt("nameValue",{name:f!=null?f+"":null,value:c,noValue:i(c)})}},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(t,a){var n=r.prototype.getDataParams.call(this,t,a);if(n.value==null&&a==="node"){var i=this.getGraph().getNodeByIndex(t),o=i.getLayout().value;n.value=o}return n},e.type="series.sankey",e.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},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},e}(vt),df=pf;function gf(r,e){r.eachSeriesByType("sankey",function(t){var a=t.get("nodeWidth"),n=t.get("nodeGap"),i=yf(t,e);t.layoutInfo=i;var o=i.width,l=i.height,s=t.getGraph(),u=s.nodes,v=s.edges;Sf(u);var c=It(u,function(p){return p.getLayout().value===0}),f=c.length!==0?0:t.get("layoutIterations"),h=t.get("orient"),d=t.get("nodeAlign");mf(u,v,a,n,o,l,f,h,d)})}function yf(r,e){return he(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function mf(r,e,t,a,n,i,o,l,s){bf(r,e,t,n,i,l,s),Lf(r,e,i,n,a,o,l),Nf(r,l)}function Sf(r){N(r,function(e){var t=Yt(e.outEdges,rr),a=Yt(e.inEdges,rr),n=e.getValue()||0,i=Math.max(t,a,n);e.setLayout({value:i},!0)})}function bf(r,e,t,a,n,i,o){for(var l=[],s=[],u=[],v=[],c=0,f=0;f=0;m&&g.depth>h&&(h=g.depth),p.setLayout({depth:m?g.depth:c},!0),i==="vertical"?p.setLayout({dy:t},!0):p.setLayout({dx:t},!0);for(var S=0;Sc-1?h:c-1;o&&o!=="left"&&xf(r,o,i,I);var L=i==="vertical"?(n-t)/I:(a-t)/I;If(r,L,i)}function Zo(r){var e=r.hostGraph.data.getRawDataItem(r.dataIndex);return e.depth!=null&&e.depth>=0}function xf(r,e,t,a){if(e==="right"){for(var n=[],i=r,o=0;i.length;){for(var l=0;l0;i--)s*=.99,Af(l,s,o),Fr(l,n,t,a,o),Ef(l,s,o),Fr(l,n,t,a,o)}function _f(r,e){var t=[],a=e==="vertical"?"y":"x",n=ua(r,function(i){return i.getLayout()[a]});return n.keys.sort(function(i,o){return i-o}),N(n.keys,function(i){t.push(n.buckets.get(i))}),t}function Df(r,e,t,a,n,i){var o=1/0;N(r,function(l){var s=l.length,u=0;N(l,function(c){u+=c.getLayout().value});var v=i==="vertical"?(a-(s-1)*n)/u:(t-(s-1)*n)/u;v0&&(l=s.getLayout()[i]+u,n==="vertical"?s.setLayout({x:l},!0):s.setLayout({y:l},!0)),v=s.getLayout()[i]+s.getLayout()[f]+e;var d=n==="vertical"?a:t;if(u=v-e-d,u>0){l=s.getLayout()[i]-u,n==="vertical"?s.setLayout({x:l},!0):s.setLayout({y:l},!0),v=l;for(var h=c-2;h>=0;--h)s=o[h],u=s.getLayout()[i]+s.getLayout()[f]+e-v,u>0&&(l=s.getLayout()[i]-u,n==="vertical"?s.setLayout({x:l},!0):s.setLayout({y:l},!0)),v=s.getLayout()[i]}})}function Af(r,e,t){N(r.slice().reverse(),function(a){N(a,function(n){if(n.outEdges.length){var i=Yt(n.outEdges,Tf,t)/Yt(n.outEdges,rr);if(isNaN(i)){var o=n.outEdges.length;i=o?Yt(n.outEdges,Cf,t)/o:0}if(t==="vertical"){var l=n.getLayout().x+(i-Kt(n,t))*e;n.setLayout({x:l},!0)}else{var s=n.getLayout().y+(i-Kt(n,t))*e;n.setLayout({y:s},!0)}}})})}function Tf(r,e){return Kt(r.node2,e)*r.getValue()}function Cf(r,e){return Kt(r.node2,e)}function Mf(r,e){return Kt(r.node1,e)*r.getValue()}function Pf(r,e){return Kt(r.node1,e)}function Kt(r,e){return e==="vertical"?r.getLayout().x+r.getLayout().dx/2:r.getLayout().y+r.getLayout().dy/2}function rr(r){return r.getValue()}function Yt(r,e,t){for(var a=0,n=r.length,i=-1;++ii&&(i=l)}),N(a,function(o){var l=new so({type:"color",mappingMethod:"linear",dataExtent:[n,i],visual:e.get("color")}),s=l.mapValueToVisual(o.getLayout().value),u=o.getModel().get(["itemStyle","color"]);u!=null?(o.setVisual("color",u),o.setVisual("style",{fill:u})):(o.setVisual("color",s),o.setVisual("style",{fill:s}))})}})}function Rf(r){r.registerChartView(hf),r.registerSeriesModel(df),r.registerLayout(gf),r.registerVisual(Vf),r.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(a){a.setNodePosition(e.dataIndex,[e.localX,e.localY])})})}var Yo=function(){function r(){}return r.prototype.getInitialData=function(e,t){var a,n=t.getComponent("xAxis",this.get("xAxisIndex")),i=t.getComponent("yAxis",this.get("yAxisIndex")),o=n.get("type"),l=i.get("type"),s;o==="category"?(e.layout="horizontal",a=n.getOrdinalMeta(),s=!0):l==="category"?(e.layout="vertical",a=i.getOrdinalMeta(),s=!0):e.layout=e.layout||"horizontal";var u=["x","y"],v=e.layout==="horizontal"?0:1,c=this._baseAxisDim=u[v],f=u[1-v],h=[n,i],d=h[v].get("type"),p=h[1-v].get("type"),g=e.data;if(g&&s){var m=[];N(g,function(b,x){var w;H(b)?(w=b.slice(),b.unshift(x)):H(b.value)?(w=W({},b),w.value=w.value.slice(),b.value.unshift(x)):w=b,m.push(w)}),e.data=m}var S=this.defaultValueDimensions,y=[{name:c,type:va(d),ordinalMeta:a,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:f,type:va(p),dimsDef:S.slice()}];return za(this,{coordDimensions:y,dimensionsCount:S.length+1,encodeDefaulter:tt(es,y,this)})},r.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},r}(),Xo=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],t.visualDrawType="stroke",t}return e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.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},e}(vt);pe(Xo,Yo,!0);var kf=Xo,Gf=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){var i=t.getData(),o=this.group,l=this._data;this._data||o.removeAll();var s=t.get("layout")==="horizontal"?1:0;i.diff(l).add(function(u){if(i.hasValue(u)){var v=i.getItemLayout(u),c=ii(v,i,u,s,!0);i.setItemGraphicEl(u,c),o.add(c)}}).update(function(u,v){var c=l.getItemGraphicEl(v);if(!i.hasValue(u)){o.remove(c);return}var f=i.getItemLayout(u);c?(de(c),qo(f,c,i,u)):c=ii(f,i,u,s),o.add(c),i.setItemGraphicEl(u,c)}).remove(function(u){var v=l.getItemGraphicEl(u);v&&o.remove(v)}).execute(),this._data=i},e.prototype.remove=function(t){var a=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl(function(i){i&&a.remove(i)})},e.type="boxplot",e}(ut),zf=function(){function r(){}return r}(),Of=function(r){G(e,r);function e(t){var a=r.call(this,t)||this;return a.type="boxplotBoxPath",a}return e.prototype.getDefaultShape=function(){return new zf},e.prototype.buildPath=function(t,a){var n=a.points,i=0;for(t.moveTo(n[i][0],n[i][1]),i++;i<4;i++)t.lineTo(n[i][0],n[i][1]);for(t.closePath();ip){var b=[m,y];a.push(b)}}}return{boxData:t,outliers:a}}var Xf={type:"echarts:boxplot",transform:function(e){var t=e.upstream;if(t.sourceFormat!==go){var a="";J(a)}var n=Yf(t.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:n.boxData},{data:n.outliers}]}};function qf(r){r.registerSeriesModel(kf),r.registerChartView($f),r.registerVisual(Ff),r.registerLayout(Hf),r.registerTransform(Xf)}var Kf=["color","borderColor"],Qf=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,a,n){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,a,n,i){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,a):this._incrementalRenderNormal(t,a)},e.prototype.eachRendered=function(t){dr(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var a=t.pipelineContext.large;(this._isLargeDraw==null||a!==this._isLargeDraw)&&(this._isLargeDraw=a,this._clear())},e.prototype._renderNormal=function(t){var a=t.getData(),n=this._data,i=this.group,o=a.getLayout("isSimpleBox"),l=t.get("clip",!0),s=t.coordinateSystem,u=s.getArea&&s.getArea();this._data||i.removeAll(),a.diff(n).add(function(v){if(a.hasValue(v)){var c=a.getItemLayout(v);if(l&&oi(u,c))return;var f=Hr(c,v,!0);_t(f,{shape:{points:c.ends}},t,v),Wr(f,a,v,o),i.add(f),a.setItemGraphicEl(v,f)}}).update(function(v,c){var f=n.getItemGraphicEl(c);if(!a.hasValue(v)){i.remove(f);return}var h=a.getItemLayout(v);if(l&&oi(u,h)){i.remove(f);return}f?(it(f,{shape:{points:h.ends}},t,v),de(f)):f=Hr(h),Wr(f,a,v,o),i.add(f),a.setItemGraphicEl(v,f)}).remove(function(v){var c=n.getItemGraphicEl(v);c&&i.remove(c)}).execute(),this._data=a},e.prototype._renderLarge=function(t){this._clear(),si(t,this.group);var a=t.get("clip",!0)?$a(t.coordinateSystem,!1,t):null;a?this.group.setClipPath(a):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,a){for(var n=a.getData(),i=n.getLayout("isSimpleBox"),o;(o=t.next())!=null;){var l=n.getItemLayout(o),s=Hr(l);Wr(s,n,o,i),s.incremental=!0,this.group.add(s),this._progressiveEls.push(s)}},e.prototype._incrementalRenderLarge=function(t,a){si(a,this.group,this._progressiveEls,!0)},e.prototype.remove=function(t){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(ut),jf=function(){function r(){}return r}(),Jf=function(r){G(e,r);function e(t){var a=r.call(this,t)||this;return a.type="normalCandlestickBox",a}return e.prototype.getDefaultShape=function(){return new jf},e.prototype.buildPath=function(t,a){var n=a.points;this.__simpleBox?(t.moveTo(n[4][0],n[4][1]),t.lineTo(n[6][0],n[6][1])):(t.moveTo(n[0][0],n[0][1]),t.lineTo(n[1][0],n[1][1]),t.lineTo(n[2][0],n[2][1]),t.lineTo(n[3][0],n[3][1]),t.closePath(),t.moveTo(n[4][0],n[4][1]),t.lineTo(n[5][0],n[5][1]),t.moveTo(n[6][0],n[6][1]),t.lineTo(n[7][0],n[7][1]))},e}(pt);function Hr(r,e,t){var a=r.ends;return new Jf({shape:{points:t?th(a,r):a},z2:100})}function oi(r,e){for(var t=!0,a=0;a0?"borderColor":"borderColor0"])||t.get(["itemStyle",r>0?"color":"color0"]),i=t.getModel("itemStyle").getItemStyle(Kf);e.useStyle(i),e.style.fill=null,e.style.stroke=n}var rh=Qf,Ko=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],t}return e.prototype.getShadowDim=function(){return"open"},e.prototype.brushSelector=function(t,a,n){var i=a.getItemLayout(t);return i&&n.rect(i.brushRect)},e.type="series.candlestick",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",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},e}(vt);pe(Ko,Yo,!0);var ah=Ko;function nh(r){!r||!H(r.series)||N(r.series,function(e){yo(e)&&e.type==="k"&&(e.type="candlestick")})}var ih=["itemStyle","borderColor"],oh=["itemStyle","borderColor0"],lh=["itemStyle","color"],sh=["itemStyle","color0"],uh={seriesType:"candlestick",plan:Fa(),performRawSeries:!0,reset:function(r,e){function t(i,o){return o.get(i>0?lh:sh)}function a(i,o){return o.get(i>0?ih:oh)}if(!e.isSeriesFiltered(r)){var n=r.pipelineContext.large;return!n&&{progress:function(i,o){for(var l;(l=i.next())!=null;){var s=o.getItemModel(l),u=o.getItemLayout(l).sign,v=s.getItemStyle();v.fill=t(u,s),v.stroke=a(u,s)||v.fill;var c=o.ensureUniqueItemVisual(l,"style");W(c,v)}}}}}},vh=uh,ch={seriesType:"candlestick",plan:Fa(),reset:function(r){var e=r.coordinateSystem,t=r.getData(),a=fh(r,t),n=0,i=1,o=["x","y"],l=t.getDimensionIndex(t.mapDimension(o[n])),s=F(t.mapDimensionsAll(o[i]),t.getDimensionIndex,t),u=s[0],v=s[1],c=s[2],f=s[3];if(t.setLayout({candleWidth:a,isSimpleBox:a<=1.3}),l<0||s.length<4)return;return{progress:r.pipelineContext.large?d:h};function h(p,g){for(var m,S=g.getStore();(m=p.next())!=null;){var y=S.get(l,m),b=S.get(u,m),x=S.get(v,m),w=S.get(c,m),I=S.get(f,m),L=Math.min(b,x),_=Math.max(b,x),D=C(L,y),A=C(_,y),M=C(w,y),E=C(I,y),T=[];P(T,A,0),P(T,D,1),T.push(R(E),R(A),R(M),R(D)),g.setItemLayout(m,{sign:vi(S,m,b,x,v),initBaseline:b>x?A[i]:D[i],ends:T,brushRect:V(w,I,y)})}function C(k,z){var B=[];return B[n]=z,B[i]=k,isNaN(z)||isNaN(k)?[NaN,NaN]:e.dataToPoint(B)}function P(k,z,B){var Y=z.slice(),X=z.slice();Y[n]=wr(Y[n]+a/2,1,!1),X[n]=wr(X[n]-a/2,1,!0),B?k.push(Y,X):k.push(X,Y)}function V(k,z,B){var Y=C(k,B),X=C(z,B);return Y[n]-=a/2,X[n]-=a/2,{x:Y[0],y:Y[1],width:a,height:X[1]-Y[1]}}function R(k){return k[n]=wr(k[n],1),k}}function d(p,g){for(var m=as(p.count*4),S=0,y,b=[],x=[],w,I=g.getStore();(w=p.next())!=null;){var L=I.get(l,w),_=I.get(u,w),D=I.get(v,w),A=I.get(c,w),M=I.get(f,w);if(isNaN(L)||isNaN(A)||isNaN(M)){m[S++]=NaN,S+=3;continue}m[S++]=vi(I,w,_,D,v),b[n]=L,b[i]=A,y=e.dataToPoint(b,null,x),m[S++]=y?y[0]:NaN,m[S++]=y?y[1]:NaN,b[i]=M,y=e.dataToPoint(b,null,x),m[S++]=y?y[1]:NaN}g.setLayout("largePoints",m)}}};function vi(r,e,t,a,n){var i;return t>a?i=-1:t0?r.get(n,e-1)<=a?1:-1:1,i}function fh(r,e){var t=r.getBaseAxis(),a,n=t.type==="category"?t.getBandWidth():(a=t.getExtent(),Math.abs(a[1]-a[0])/e.count()),i=O(Ft(r.get("barMaxWidth"),n),n),o=O(Ft(r.get("barMinWidth"),1),n),l=r.get("barWidth");return l!=null?O(l,n):Math.max(Math.min(n/2,i),o)}var hh=ch;function ph(r){r.registerChartView(rh),r.registerSeriesModel(ah),r.registerPreprocessor(nh),r.registerVisual(vh),r.registerLayout(hh)}function ci(r,e){var t=e.rippleEffectColor||e.color;r.eachChild(function(a){a.attr({z:e.z,zlevel:e.zlevel,style:{stroke:e.brushType==="stroke"?t:null,fill:e.brushType==="fill"?t:null}})})}var dh=function(r){G(e,r);function e(t,a){var n=r.call(this)||this,i=new ao(t,a),o=new rt;return n.add(i),n.add(o),n.updateData(t,a),n}return e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var a=t.symbolType,n=t.color,i=t.rippleNumber,o=this.childAt(1),l=0;l0&&(l=this._getLineLength(i)/v*1e3),l!==this._period||s!==this._loop||u!==this._roundTrip){i.stopAnimation();var f=void 0;nt(c)?f=c(n):f=c,i.__t>0&&(f=-l*i.__t),this._animateSymbol(i,l,f,s,u)}this._period=l,this._loop=s,this._roundTrip=u}},e.prototype._animateSymbol=function(t,a,n,i,o){if(a>0){t.__t=0;var l=this,s=t.animate("",i).when(o?a*2:a,{__t:o?2:1}).delay(n).during(function(){l._updateSymbolPosition(t)});i||s.done(function(){l.remove(t)}),s.start()}},e.prototype._getLineLength=function(t){return be(t.__p1,t.__cp1)+be(t.__cp1,t.__p2)},e.prototype._updateAnimationPoints=function(t,a){t.__p1=a[0],t.__p2=a[1],t.__cp1=a[2]||[(a[0][0]+a[1][0])/2,(a[0][1]+a[1][1])/2]},e.prototype.updateData=function(t,a,n){this.childAt(0).updateData(t,a,n),this._updateEffectSymbol(t,a)},e.prototype._updateSymbolPosition=function(t){var a=t.__p1,n=t.__p2,i=t.__cp1,o=t.__t<1?t.__t:2-t.__t,l=[t.x,t.y],s=l.slice(),u=fo,v=is;l[0]=u(a[0],i[0],n[0],o),l[1]=u(a[1],i[1],n[1],o);var c=t.__t<1?v(a[0],i[0],n[0],o):v(n[0],i[0],a[0],1-o),f=t.__t<1?v(a[1],i[1],n[1],o):v(n[1],i[1],a[1],1-o);t.rotation=-Math.atan2(f,c)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(t.__lastT!==void 0&&t.__lastT=0&&!(i[s]<=a);s--);s=Math.min(s,o-2)}else{for(s=l;sa);s++);s=Math.min(s-1,o-2)}var v=(a-i[s])/(i[s+1]-i[s]),c=n[s],f=n[s+1];t.x=c[0]*(1-v)+v*f[0],t.y=c[1]*(1-v)+v*f[1];var h=t.__t<1?f[0]-c[0]:c[0]-f[0],d=t.__t<1?f[1]-c[1]:c[1]-f[1];t.rotation=-Math.atan2(d,h)-Math.PI/2,this._lastFrame=s,this._lastFramePercent=a,t.ignore=!1}},e}(Qo),_h=Lh,Dh=function(){function r(){this.polyline=!1,this.curveness=0,this.segs=[]}return r}(),Ah=function(r){G(e,r);function e(t){var a=r.call(this,t)||this;return a._off=0,a.hoverDataIdx=-1,a}return e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new Dh},e.prototype.buildPath=function(t,a){var n=a.segs,i=a.curveness,o;if(a.polyline)for(o=this._off;o0){t.moveTo(n[o++],n[o++]);for(var s=1;s0){var h=(u+c)/2-(v-f)*i,d=(v+f)/2-(c-u)*i;t.quadraticCurveTo(h,d,c,f)}else t.lineTo(c,f)}this.incremental&&(this._off=o,this.notClear=!0)},e.prototype.findDataIndex=function(t,a){var n=this.shape,i=n.segs,o=n.curveness,l=this.style.lineWidth;if(n.polyline)for(var s=0,u=0;u0)for(var c=i[u++],f=i[u++],h=1;h0){var g=(c+d)/2-(f-p)*o,m=(f+p)/2-(d-c)*o;if(os(c,f,g,m,d,p,l,t,a))return s}else if(_n(c,f,d,p,l,t,a))return s;s++}return-1},e.prototype.contain=function(t,a){var n=this.transformCoordToLocal(t,a),i=this.getBoundingRect();if(t=n[0],a=n[1],i.contain(t,a)){var o=this.hoverDataIdx=this.findDataIndex(t,a);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var a=this.shape,n=a.segs,i=1/0,o=1/0,l=-1/0,s=-1/0,u=0;u0&&(o.dataIndex=s+e.__startIndex)})},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}(),Ch=Th,Mh={seriesType:"lines",plan:Fa(),reset:function(r){var e=r.coordinateSystem;if(!!e){var t=r.get("polyline"),a=r.pipelineContext.large;return{progress:function(n,i){var o=[];if(a){var l=void 0,s=n.end-n.start;if(t){for(var u=0,v=n.start;v0&&(v||u.configLayer(l,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(s/10+.9,1),0)})),o.updateData(i);var c=t.get("clip",!0)&&$a(t.coordinateSystem,!1,t);c?this.group.setClipPath(c):this.group.removeClipPath(),this._lastZlevel=l,this._finished=!0},e.prototype.incrementalPrepareRender=function(t,a,n){var i=t.getData(),o=this._updateLineDraw(i,t);o.incrementalPrepareUpdate(i),this._clearLayer(n),this._finished=!1},e.prototype.incrementalRender=function(t,a,n){this._lineDraw.incrementalUpdate(t,a.getData()),this._finished=t.end===a.getData().count()},e.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},e.prototype.updateTransform=function(t,a,n){var i=t.getData(),o=t.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var l=Jo.reset(t,a,n);l.progress&&l.progress({start:0,end:i.count(),count:i.count()},i),this._lineDraw.updateLayout(),this._clearLayer(n)},e.prototype._updateLineDraw=function(t,a){var n=this._lineDraw,i=this._showEffect(a),o=!!a.get("polyline"),l=a.pipelineContext,s=l.large;return(!n||i!==this._hasEffet||o!==this._isPolyline||s!==this._isLargeDraw)&&(n&&n.remove(),n=this._lineDraw=s?new Ch:new en(o?i?_h:jo:i?Qo:tn),this._hasEffet=i,this._isPolyline=o,this._isLargeDraw=s),this.group.add(n.group),n},e.prototype._showEffect=function(t){return!!t.get(["effect","show"])},e.prototype._clearLayer=function(t){var a=t.getZr(),n=a.painter.getType()==="svg";!n&&this._lastZlevel!=null&&a.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(t,a){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(a)},e.prototype.dispose=function(t,a){this.remove(t,a)},e.type="lines",e}(ut),Eh=Ph,Nh=typeof Uint32Array=="undefined"?Array:Uint32Array,Vh=typeof Float64Array=="undefined"?Array:Float64Array;function fi(r){var e=r.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(r.data=F(e,function(t){var a=[t[0].coord,t[1].coord],n={coords:a};return t[0].name&&(n.fromName=t[0].name),t[1].name&&(n.toName=t[1].name),So([n,t[0],t[1]])}))}var Rh=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="lineStyle",t.visualDrawType="stroke",t}return e.prototype.init=function(t){t.data=t.data||[],fi(t);var a=this._processFlatCoordsArray(t.data);this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset,a.flatCoords&&(t.data=new Float32Array(a.count)),r.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(t){if(fi(t),t.data){var a=this._processFlatCoordsArray(t.data);this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset,a.flatCoords&&(t.data=new Float32Array(a.count))}r.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(t){var a=this._processFlatCoordsArray(t.data);a.flatCoords&&(this._flatCoords?(this._flatCoords=na(this._flatCoords,a.flatCoords),this._flatCoordsOffset=na(this._flatCoordsOffset,a.flatCoordsOffset)):(this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset),t.data=new Float32Array(a.count)),this.getRawData().appendData(t.data)},e.prototype._getCoordsFromItemModel=function(t){var a=this.getData().getItemModel(t),n=a.option instanceof Array?a.option:a.getShallow("coords");return n},e.prototype.getLineCoordsCount=function(t){return this._flatCoordsOffset?this._flatCoordsOffset[t*2+1]:this._getCoordsFromItemModel(t).length},e.prototype.getLineCoords=function(t,a){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[t*2],i=this._flatCoordsOffset[t*2+1],o=0;o ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return t==null?this.option.large?1e4:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t==null?this.option.large?2e4:this.get("progressiveThreshold"):t},e.prototype.getZLevelKey=function(){var t=this.getModel("effect"),a=t.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:t.get("show")&&a>0?a+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.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}},e}(vt),kh=Rh;function We(r){return r instanceof Array||(r=[r,r]),r}var Gh={seriesType:"lines",reset:function(r){var e=We(r.get("symbol")),t=We(r.get("symbolSize")),a=r.getData();a.setVisual("fromSymbol",e&&e[0]),a.setVisual("toSymbol",e&&e[1]),a.setVisual("fromSymbolSize",t&&t[0]),a.setVisual("toSymbolSize",t&&t[1]);function n(i,o){var l=i.getItemModel(o),s=We(l.getShallow("symbol",!0)),u=We(l.getShallow("symbolSize",!0));s[0]&&i.setItemVisual(o,"fromSymbol",s[0]),s[1]&&i.setItemVisual(o,"toSymbol",s[1]),u[0]&&i.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&i.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:a.hasItemOption?n:null}}},zh=Gh;function Oh(r){r.registerChartView(Eh),r.registerSeriesModel(kh),r.registerLayout(Jo),r.registerVisual(zh)}var Bh=256,$h=function(){function r(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=Dn.createCanvas();this.canvas=e}return r.prototype.update=function(e,t,a,n,i,o){var l=this._getBrush(),s=this._getGradient(i,"inRange"),u=this._getGradient(i,"outOfRange"),v=this.pointSize+this.blurSize,c=this.canvas,f=c.getContext("2d"),h=e.length;c.width=t,c.height=a;for(var d=0;d0){var M=o(y)?s:u;y>0&&(y=y*D+L),x[w++]=M[A],x[w++]=M[A+1],x[w++]=M[A+2],x[w++]=M[A+3]*y*256}else w+=4}return f.putImageData(b,0,0),c},r.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=Dn.createCanvas()),t=this.pointSize+this.blurSize,a=t*2;e.width=a,e.height=a;var n=e.getContext("2d");return n.clearRect(0,0,a,a),n.shadowOffsetX=a,n.shadowBlur=this.blurSize,n.shadowColor="#000",n.beginPath(),n.arc(-t,t,this.pointSize,0,Math.PI*2,!0),n.closePath(),n.fill(),e},r.prototype._getGradient=function(e,t){for(var a=this._gradientPixels,n=a[t]||(a[t]=new Uint8ClampedArray(256*4)),i=[0,0,0,0],o=0,l=0;l<256;l++)e[t](l/255,!0,i),n[o++]=i[0],n[o++]=i[1],n[o++]=i[2],n[o++]=i[3];return n},r}(),Fh=$h;function Hh(r,e,t){var a=r[1]-r[0];e=F(e,function(o){return{interval:[(o.interval[0]-r[0])/a,(o.interval[1]-r[0])/a]}});var n=e.length,i=0;return function(o){var l;for(l=i;l=0;l--){var s=e[l].interval;if(s[0]<=o&&o<=s[1]){i=l;break}}return l>=0&&l=e[0]&&a<=e[1]}}function hi(r){var e=r.dimensions;return e[0]==="lng"&&e[1]==="lat"}var Uh=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){var i;a.eachComponent("visualMap",function(l){l.eachTargetSeries(function(s){s===t&&(i=l)})}),this._progressiveEls=null,this.group.removeAll();var o=t.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"?this._renderOnCartesianAndCalendar(t,n,0,t.getData().count()):hi(o)&&this._renderOnGeo(o,t,i,n)},e.prototype.incrementalPrepareRender=function(t,a,n){this.group.removeAll()},e.prototype.incrementalRender=function(t,a,n,i){var o=a.coordinateSystem;o&&(hi(o)?this.render(a,n,i):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(a,i,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){dr(this._progressiveEls||this.group,t)},e.prototype._renderOnCartesianAndCalendar=function(t,a,n,i,o){var l=t.coordinateSystem,s=gr(l,"cartesian2d"),u,v,c,f;if(s){var h=l.getAxis("x"),d=l.getAxis("y");u=h.getBandWidth()+.5,v=d.getBandWidth()+.5,c=h.scale.getExtent(),f=d.scale.getExtent()}for(var p=this.group,g=t.getData(),m=t.getModel(["emphasis","itemStyle"]).getItemStyle(),S=t.getModel(["blur","itemStyle"]).getItemStyle(),y=t.getModel(["select","itemStyle"]).getItemStyle(),b=t.get(["itemStyle","borderRadius"]),x=Ot(t),w=t.getModel("emphasis"),I=w.get("focus"),L=w.get("blurScope"),_=w.get("disabled"),D=s?[g.mapDimension("x"),g.mapDimension("y"),g.mapDimension("value")]:[g.mapDimension("time"),g.mapDimension("value")],A=n;Ac[1]||Cf[1])continue;var P=l.dataToPoint([T,C]);M=new qt({shape:{x:P[0]-u/2,y:P[1]-v/2,width:u,height:v},style:E})}else{if(isNaN(g.get(D[1],A)))continue;M=new qt({z2:1,shape:l.dataToRect([g.get(D[0],A)]).contentShape,style:E})}if(g.hasItemOption){var V=g.getItemModel(A),R=V.getModel("emphasis");m=R.getModel("itemStyle").getItemStyle(),S=V.getModel(["blur","itemStyle"]).getItemStyle(),y=V.getModel(["select","itemStyle"]).getItemStyle(),b=V.get(["itemStyle","borderRadius"]),I=R.get("focus"),L=R.get("blurScope"),_=R.get("disabled"),x=Ot(V)}M.shape.r=b;var k=t.getRawValue(A),z="-";k&&k[2]!=null&&(z=k[2]+""),ae(M,x,{labelFetcher:t,labelDataIndex:A,defaultOpacity:E.opacity,defaultText:z}),M.ensureState("emphasis").style=m,M.ensureState("blur").style=S,M.ensureState("select").style=y,st(M,I,L,_),M.incremental=o,o&&(M.states.emphasis.hoverLayer=!0),p.add(M),g.setItemGraphicEl(A,M),this._progressiveEls&&this._progressiveEls.push(M)}},e.prototype._renderOnGeo=function(t,a,n,i){var o=n.targetVisuals.inRange,l=n.targetVisuals.outOfRange,s=a.getData(),u=this._hmLayer||this._hmLayer||new Fh;u.blurSize=a.get("blurSize"),u.pointSize=a.get("pointSize"),u.minOpacity=a.get("minOpacity"),u.maxOpacity=a.get("maxOpacity");var v=t.getViewRect().clone(),c=t.getRoamTransform();v.applyTransform(c);var f=Math.max(v.x,0),h=Math.max(v.y,0),d=Math.min(v.width+v.x,i.getWidth()),p=Math.min(v.height+v.y,i.getHeight()),g=d-f,m=p-h,S=[s.mapDimension("lng"),s.mapDimension("lat"),s.mapDimension("value")],y=s.mapArray(S,function(I,L,_){var D=t.dataToPoint([I,L]);return D[0]-=f,D[1]-=h,D.push(_),D}),b=n.getExtent(),x=n.type==="visualMap.continuous"?Wh(b,n.option.range):Hh(b,n.getPieceList(),n.option.selected);u.update(y,g,m,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:l.color.getColorMapper()},x);var w=new Ga({style:{width:g,height:m,x:f,y:h,image:u.canvas},silent:!0});this.group.add(w)},e.type="heatmap",e}(ut),Zh=Uh,Yh=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,a){return Ge(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var t=ho.get(this.get("coordinateSystem"));if(t&&t.dimensions)return t.dimensions[0]==="lng"&&t.dimensions[1]==="lat"},e.type="series.heatmap",e.dependencies=["grid","geo","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:"#212121"}}},e}(vt),Xh=Yh;function qh(r){r.registerChartView(Zh),r.registerSeriesModel(Xh)}var Kh=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._layers=[],t}return e.prototype.render=function(t,a,n){var i=t.getData(),o=this,l=this.group,s=t.getLayerSeries(),u=i.getLayout("layoutInfo"),v=u.rect,c=u.boundaryGap;l.x=0,l.y=v.y+c[0];function f(g){return g.name}var h=new fe(this._layersSeries||[],s,f,f),d=[];h.add(lt(p,this,"add")).update(lt(p,this,"update")).remove(lt(p,this,"remove")).execute();function p(g,m,S){var y=o._layers;if(g==="remove"){l.remove(y[m]);return}for(var b=[],x=[],w,I=s[m].indices,L=0;Li&&(i=l),a.push(l)}for(var u=0;ui&&(i=c)}return{y0:n,max:i}}function ap(r){r.registerChartView(jh),r.registerSeriesModel(tp),r.registerLayout(ep),r.registerProcessor(Ba("themeRiver"))}var np=2,ip=4,op=function(r){G(e,r);function e(t,a,n,i){var o=r.call(this)||this;o.z2=np,o.textConfig={inside:!0},et(o).seriesIndex=a.seriesIndex;var l=new Ht({z2:ip,silent:t.getModel().get(["label","silent"])});return o.setTextContent(l),o.updateData(!0,t,a,n,i),o}return e.prototype.updateData=function(t,a,n,i,o){this.node=a,a.piece=this,n=n||this._seriesModel,i=i||this._ecModel;var l=this;et(l).dataIndex=a.dataIndex;var s=a.getModel(),u=s.getModel("emphasis"),v=a.getLayout(),c=W({},v);c.label=null;var f=a.getVisual("style");f.lineJoin="bevel";var h=a.getVisual("decal");h&&(f.decal=xo(h,o));var d=An(s.getModel("itemStyle"),c,!0);W(c,d),N(sa,function(S){var y=l.ensureState(S),b=s.getModel([S,"itemStyle"]);y.style=b.getItemStyle();var x=An(b,c);x&&(y.shape=x)}),t?(l.setShape(c),l.shape.r=v.r0,it(l,{shape:{r:v.r}},n,a.dataIndex)):(it(l,{shape:c},n),de(l)),l.useStyle(f),this._updateLabel(n);var p=s.getShallow("cursor");p&&l.attr("cursor",p),this._seriesModel=n||this._seriesModel,this._ecModel=i||this._ecModel;var g=u.get("focus"),m=g==="ancestor"?a.getAncestorsIndices():g==="descendant"?a.getDescendantIndices():g;st(this,m,u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t){var a=this,n=this.node.getModel(),i=n.getModel("label"),o=this.node.getLayout(),l=o.endAngle-o.startAngle,s=(o.startAngle+o.endAngle)/2,u=Math.cos(s),v=Math.sin(s),c=this,f=c.getTextContent(),h=this.node.dataIndex,d=i.get("minAngle")/180*Math.PI,p=i.get("show")&&!(d!=null&&Math.abs(l)Math.PI/2?"right":"left"):!M||M==="center"?(l===2*Math.PI&&o.r0===0?D=0:D=(o.r+o.r0)/2,M="center"):M==="left"?(D=o.r0+A,s>Math.PI/2&&(M="right")):M==="right"&&(D=o.r-A,s>Math.PI/2&&(M="left")),b.style.align=M,b.style.verticalAlign=g(S,"verticalAlign")||"middle",b.x=D*u+o.cx,b.y=D*v+o.cy;var E=g(S,"rotate"),T=0;E==="radial"?(T=-s,T<-Math.PI/2&&(T+=Math.PI)):E==="tangential"?(T=Math.PI/2-s,T>Math.PI/2?T-=Math.PI:T<-Math.PI/2&&(T+=Math.PI)):Bt(E)&&(T=E*Math.PI/180),b.rotation=T});function g(m,S){var y=m.get(S);return y==null?i.get(S):y}f.dirtyStyle()},e}(Ce),di=op,ma="sunburstRootToNode",gi="sunburstHighlight",lp="sunburstUnhighlight";function sp(r){r.registerAction({type:ma,update:"updateView"},function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},a);function a(n,i){var o=Pe(e,[ma],n);if(o){var l=n.getViewRoot();l&&(e.direction=qa(l,o.node)?"rollUp":"drillDown"),n.resetViewRoot(o.node)}}}),r.registerAction({type:gi,update:"none"},function(e,t,a){e=W({},e),t.eachComponent({mainType:"series",subType:"sunburst",query:e},n);function n(i){var o=Pe(e,[gi],i);o&&(e.dataIndex=o.node.dataIndex)}a.dispatchAction(W(e,{type:"highlight"}))}),r.registerAction({type:lp,update:"updateView"},function(e,t,a){e=W({},e),a.dispatchAction(W(e,{type:"downplay"}))})}var up=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n,i){var o=this;this.seriesModel=t,this.api=n,this.ecModel=a;var l=t.getData(),s=l.tree.root,u=t.getViewRoot(),v=this.group,c=t.get("renderLabelForZeroData"),f=[];u.eachNode(function(S){f.push(S)});var h=this._oldChildren||[];d(f,h),m(s,u),this._initEvents(),this._oldChildren=f;function d(S,y){if(S.length===0&&y.length===0)return;new fe(y,S,b,b).add(x).update(x).remove(tt(x,null)).execute();function b(w){return w.getId()}function x(w,I){var L=w==null?null:S[w],_=I==null?null:y[I];p(L,_)}}function p(S,y){if(!c&&S&&!S.getValue()&&(S=null),S!==s&&y!==s){if(y&&y.piece)S?(y.piece.updateData(!1,S,t,a,n),l.setItemGraphicEl(S.dataIndex,y.piece)):g(y);else if(S){var b=new di(S,t,a,n);v.add(b),l.setItemGraphicEl(S.dataIndex,b)}}}function g(S){!S||S.piece&&(v.remove(S.piece),S.piece=null)}function m(S,y){y.depth>0?(o.virtualPiece?o.virtualPiece.updateData(!1,S,t,a,n):(o.virtualPiece=new di(S,t,a,n),v.add(o.virtualPiece)),y.piece.off("click"),o.virtualPiece.on("click",function(b){o._rootToNode(y.parentNode)})):o.virtualPiece&&(v.remove(o.virtualPiece),o.virtualPiece=null)}},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",function(a){var n=!1,i=t.seriesModel.getViewRoot();i.eachNode(function(o){if(!n&&o.piece&&o.piece===a.target){var l=o.getModel().get("nodeClick");if(l==="rootToNode")t._rootToNode(o);else if(l==="link"){var s=o.getModel(),u=s.get("link");if(u){var v=s.get("target",!0)||"_blank";oo(u,v)}}n=!0}})})},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:ma,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,a){var n=a.getData(),i=n.getItemLayout(0);if(i){var o=t[0]-i.cx,l=t[1]-i.cy,s=Math.sqrt(o*o+l*l);return s<=i.r&&s>=i.r0}},e.type="sunburst",e}(ut),vp=up,cp=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t,a){var n={name:t.name,children:t.data};tl(n);var i=this._levelModels=F(t.levels||[],function(s){return new Xt(s,this,a)},this),o=Xa.createTree(n,this,l);function l(s){s.wrapMethod("getItemModel",function(u,v){var c=o.getNodeByDataIndex(v),f=i[c.depth];return f&&(u.parentModel=f),u})}return o.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(t){var a=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return a.treePathInfo=Sr(n,this),a},e.prototype.getLevelModel=function(t){return this._levelModels&&this._levelModels[t.depth]},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var a=this.getRawData().tree.root;(!t||t!==a&&!a.contains(t))&&(this._viewRoot=a)},e.prototype.enableAriaDecal=function(){Co(this)},e.type="series.sunburst",e.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"},e}(vt);function tl(r){var e=0;N(r.children,function(a){tl(a);var n=a.value;H(n)&&(n=n[0]),e+=n});var t=r.value;H(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),H(r.value)?r.value[0]=t:r.value=t}var fp=cp,yi=Math.PI/180;function hp(r,e,t){e.eachSeriesByType(r,function(a){var n=a.get("center"),i=a.get("radius");H(i)||(i=[0,i]),H(n)||(n=[n,n]);var o=t.getWidth(),l=t.getHeight(),s=Math.min(o,l),u=O(n[0],o),v=O(n[1],l),c=O(i[0],s/2),f=O(i[1],s/2),h=-a.get("startAngle")*yi,d=a.get("minAngle")*yi,p=a.getData().tree.root,g=a.getViewRoot(),m=g.depth,S=a.get("sort");S!=null&&el(g,S);var y=0;N(g.children,function(P){!isNaN(P.getValue())&&y++});var b=g.getValue(),x=Math.PI/(b||y)*2,w=g.depth>0,I=g.height-(w?-1:1),L=(f-c)/(I||1),_=a.get("clockwise"),D=a.get("stillShowZeroSum"),A=_?1:-1,M=function(P,V){if(!!P){var R=V;if(P!==p){var k=P.getValue(),z=b===0&&D?x:k*x;z1;)o=o.parentNode;var l=n.getColorFromPalette(o.name||o.dataIndex+"",e);return a.depth>1&>(l)&&(l=us(l,(a.depth-1)/(i-1)*.5)),l}r.eachSeriesByType("sunburst",function(a){var n=a.getData(),i=n.tree;i.eachNode(function(o){var l=o.getModel(),s=l.getModel("itemStyle").getItemStyle();s.fill||(s.fill=t(o,a,i.root.height));var u=n.ensureUniqueItemVisual(o.dataIndex,"style");W(u,s)})})}function gp(r){r.registerChartView(vp),r.registerSeriesModel(fp),r.registerLayout(tt(hp,"sunburst")),r.registerProcessor(tt(Ba,"sunburst")),r.registerVisual(dp),sp(r)}var mi={color:"fill",borderColor:"stroke"},yp={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},kt=bt(),mp=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(t,a){return Ge(null,this)},e.prototype.getDataParams=function(t,a,n){var i=r.prototype.getDataParams.call(this,t,a);return n&&(i.info=kt(n).info),i},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(vt),Sp=mp;function bp(r,e){return e=e||[0,0],F(["x","y"],function(t,a){var n=this.getAxis(t),i=e[a],o=r[a]/2;return n.type==="category"?n.getBandWidth():Math.abs(n.dataToCoord(i-o)-n.dataToCoord(i+o))},this)}function xp(r){var e=r.master.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:lt(bp,r)}}}function wp(r,e){return e=e||[0,0],F([0,1],function(t){var a=e[t],n=r[t]/2,i=[],o=[];return i[t]=a-n,o[t]=a+n,i[1-t]=o[1-t]=e[1-t],Math.abs(this.dataToPoint(i)[t]-this.dataToPoint(o)[t])},this)}function Ip(r){var e=r.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:r.getZoom()},api:{coord:function(t){return r.dataToPoint(t)},size:lt(wp,r)}}}function Lp(r,e){var t=this.getAxis(),a=e instanceof Array?e[0]:e,n=(r instanceof Array?r[0]:r)/2;return t.type==="category"?t.getBandWidth():Math.abs(t.dataToCoord(a-n)-t.dataToCoord(a+n))}function _p(r){var e=r.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:lt(Lp,r)}}}function Dp(r,e){return e=e||[0,0],F(["Radius","Angle"],function(t,a){var n="get"+t+"Axis",i=this[n](),o=e[a],l=r[a]/2,s=i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(o-l)-i.dataToCoord(o+l));return t==="Angle"&&(s=s*Math.PI/180),s},this)}function Ap(r){var e=r.getRadiusAxis(),t=r.getAngleAxis(),a=e.getExtent();return a[0]>a[1]&&a.reverse(),{coordSys:{type:"polar",cx:r.cx,cy:r.cy,r:a[1],r0:a[0]},api:{coord:function(n){var i=e.dataToRadius(n[0]),o=t.dataToAngle(n[1]),l=r.coordToPoint([i,o]);return l.push(i,o*Math.PI/180),l},size:lt(Dp,r)}}}function Tp(r){var e=r.getRect(),t=r.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:r.getCellWidth(),cellHeight:r.getCellHeight(),rangeInfo:{start:t.start,end:t.end,weeks:t.weeks,dayCount:t.allDay}},api:{coord:function(a,n){return r.dataToPoint(a,n)}}}}var Gt="emphasis",Ut="normal",rn="blur",an="select",Qt=[Ut,Gt,rn,an],Zr={normal:["itemStyle"],emphasis:[Gt,"itemStyle"],blur:[rn,"itemStyle"],select:[an,"itemStyle"]},Yr={normal:["label"],emphasis:[Gt,"label"],blur:[rn,"label"],select:[an,"label"]},Cp=["x","y"],Mp="e\0\0",yt={normal:{},emphasis:{},blur:{},select:{}},Pp={cartesian2d:xp,geo:Ip,single:_p,polar:Ap,calendar:Tp};function Sa(r){return r instanceof pt}function ba(r){return r instanceof Pa}function Ep(r,e){e.copyTransform(r),ba(e)&&ba(r)&&(e.setStyle(r.style),e.z=r.z,e.z2=r.z2,e.zlevel=r.zlevel,e.invisible=r.invisible,e.ignore=r.ignore,Sa(e)&&Sa(r)&&e.setShape(r.shape))}var Np=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n,i){this._progressiveEls=null;var o=this._data,l=t.getData(),s=this.group,u=Si(t,l,a,n);o||s.removeAll(),l.diff(o).add(function(c){Xr(n,null,c,u(c,i),t,s,l)}).remove(function(c){var f=o.getItemGraphicEl(c);f&&Ha(f,kt(f).option,t)}).update(function(c,f){var h=o.getItemGraphicEl(f);Xr(n,h,c,u(c,i),t,s,l)}).execute();var v=t.get("clip",!0)?$a(t.coordinateSystem,!1,t):null;v?s.setClipPath(v):s.removeClipPath(),this._data=l},e.prototype.incrementalPrepareRender=function(t,a,n){this.group.removeAll(),this._data=null},e.prototype.incrementalRender=function(t,a,n,i,o){var l=a.getData(),s=Si(a,l,n,i),u=this._progressiveEls=[];function v(h){h.isGroup||(h.incremental=!0,h.ensureState("emphasis").hoverLayer=!0)}for(var c=t.start;c=0?e.getStore().get(V,C):void 0}var R=e.get(P.name,C),k=P&&P.ordinalMeta;return k?k.categories[R]:R}function w(T,C){C==null&&(C=u);var P=e.getItemVisual(C,"style"),V=P&&P.fill,R=P&&P.opacity,k=S(C,Ut).getItemStyle();V!=null&&(k.fill=V),R!=null&&(k.opacity=R);var z={inheritColor:gt(V)?V:"#000"},B=y(C,Ut),Y=Vt(B,null,z,!1,!0);Y.text=B.getShallow("show")?Ft(r.getFormattedLabel(C,Ut),Tn(e,C)):null;var X=Cn(B,z,!1);return _(T,k),k=Mn(k,Y,X),T&&L(k,T),k.legacy=!0,k}function I(T,C){C==null&&(C=u);var P=S(C,Gt).getItemStyle(),V=y(C,Gt),R=Vt(V,null,null,!0,!0);R.text=V.getShallow("show")?pr(r.getFormattedLabel(C,Gt),r.getFormattedLabel(C,Ut),Tn(e,C)):null;var k=Cn(V,null,!0);return _(T,P),P=Mn(P,R,k),T&&L(P,T),P.legacy=!0,P}function L(T,C){for(var P in C)Lt(C,P)&&(T[P]=C[P])}function _(T,C){T&&(T.textFill&&(C.textFill=T.textFill),T.textPosition&&(C.textPosition=T.textPosition))}function D(T,C){if(C==null&&(C=u),Lt(mi,T)){var P=e.getItemVisual(C,"style");return P?P[mi[T]]:null}if(Lt(yp,T))return e.getItemVisual(C,T)}function A(T){if(i.type==="cartesian2d"){var C=i.getBaseAxis();return vs(ht({axis:C},T))}}function M(){return t.getCurrentSeriesIndices()}function E(T){return cs(T,t)}}function Gp(r){var e={};return N(r.dimensions,function(t){var a=r.getDimensionInfo(t);if(!a.isExtraCoord){var n=a.coordDim,i=e[n]=e[n]||[];i[a.coordDimIndex]=r.getDimensionIndex(t)}}),e}function Xr(r,e,t,a,n,i,o){if(!a){i.remove(e);return}var l=ln(r,e,t,a,n,i);return l&&o.setItemGraphicEl(t,l),l&&st(l,a.focus,a.blurScope,a.emphasisDisabled),l}function ln(r,e,t,a,n,i){var o=-1,l=e;e&&al(e,a,n)&&(o=Dt(i.childrenRef(),e),e=null);var s=!e,u=e;u?u.clearStates():(u=nn(a),l&&Ep(l,u)),a.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),yt.normal.cfg=yt.normal.conOpt=yt.emphasis.cfg=yt.emphasis.conOpt=yt.blur.cfg=yt.blur.conOpt=yt.select.cfg=yt.select.conOpt=null,yt.isLegacy=!1,Op(u,t,a,n,s,yt),zp(u,t,a,n,s),on(r,u,t,a,yt,n,s),Lt(a,"info")&&(kt(u).info=a.info);for(var v=0;v=0?i.replaceAt(u,o):i.add(u),u}function al(r,e,t){var a=kt(r),n=e.type,i=e.shape,o=e.style;return t.isUniversalTransitionEnabled()||n!=null&&n!==a.customGraphicType||n==="path"&&Wp(i)&&nl(i)!==a.customPathData||n==="image"&&Lt(o,"image")&&o.image!==a.customImagePath}function zp(r,e,t,a,n){var i=t.clipPath;if(i===!1)r&&r.getClipPath()&&r.removeClipPath();else if(i){var o=r.getClipPath();o&&al(o,i,a)&&(o=null),o||(o=nn(i),r.setClipPath(o)),on(null,o,e,i,null,a,n)}}function Op(r,e,t,a,n,i){if(!r.isGroup){bi(t,null,i),bi(t,Gt,i);var o=i.normal.conOpt,l=i.emphasis.conOpt,s=i.blur.conOpt,u=i.select.conOpt;if(o!=null||l!=null||u!=null||s!=null){var v=r.getTextContent();if(o===!1)v&&r.removeTextContent();else{o=i.normal.conOpt=o||{type:"text"},v?v.clearStates():(v=nn(o),r.setTextContent(v)),on(null,v,e,o,null,a,n);for(var c=o&&o.style,f=0;f=v;h--){var d=e.childAt(h);$p(e,d,n)}}}function $p(r,e,t){e&&Ha(e,kt(r).option,t)}function Fp(r){new fe(r.oldChildren,r.newChildren,xi,xi,r).add(wi).update(wi).remove(Hp).execute()}function xi(r,e){var t=r&&r.name;return t!=null?t:Mp+e}function wi(r,e){var t=this.context,a=r!=null?t.newChildren[r]:null,n=e!=null?t.oldChildren[e]:null;ln(t.api,n,t.dataIndex,a,t.seriesModel,t.group)}function Hp(r){var e=this.context,t=e.oldChildren[r];t&&Ha(t,kt(t).option,e.seriesModel)}function nl(r){return r&&(r.pathData||r.d)}function Wp(r){return r&&(Lt(r,"pathData")||Lt(r,"d"))}function Up(r){r.registerChartView(Vp),r.registerSeriesModel(Sp)}function xa(r,e){e=e||{};var t=r.coordinateSystem,a=r.axis,n={},i=a.position,o=a.orient,l=t.getRect(),s=[l.x,l.x+l.width,l.y,l.y+l.height],u={horizontal:{top:s[2],bottom:s[3]},vertical:{left:s[0],right:s[1]}};n.position=[o==="vertical"?u.vertical[i]:s[0],o==="horizontal"?u.horizontal[i]:s[3]];var v={horizontal:0,vertical:1};n.rotation=Math.PI/2*v[o];var c={top:-1,bottom:1,right:1,left:-1};n.labelDirection=n.tickDirection=n.nameDirection=c[i],r.get(["axisTick","inside"])&&(n.tickDirection=-n.tickDirection),Pt(e.labelInside,r.get(["axisLabel","inside"]))&&(n.labelDirection=-n.labelDirection);var f=e.rotate;return f==null&&(f=r.get(["axisLabel","rotate"])),n.labelRotation=i==="top"?-f:f,n.z2=1,n}var Zp=["axisLine","axisTickLabel","axisName"],Yp=["splitArea","splitLine"],Xp=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="SingleAxisPointer",t}return e.prototype.render=function(t,a,n,i){var o=this.group;o.removeAll();var l=this._axisGroup;this._axisGroup=new rt;var s=xa(t),u=new Ss(t,s);N(Zp,u.add,u),o.add(this._axisGroup),o.add(u.getGroup()),N(Yp,function(v){t.get([v,"show"])&&qp[v](this,this.group,this._axisGroup,t)},this),bs(l,this._axisGroup,t),r.prototype.render.call(this,t,a,n,i)},e.prototype.remove=function(){xs(this)},e.type="singleAxis",e}(wo),qp={splitLine:function(r,e,t,a){var n=a.axis;if(!n.scale.isBlank()){var i=a.getModel("splitLine"),o=i.getModel("lineStyle"),l=o.get("color");l=l instanceof Array?l:[l];for(var s=o.get("width"),u=a.coordinateSystem.getRect(),v=n.isHorizontal(),c=[],f=0,h=n.getTicksCoords({tickModel:i}),d=[],p=[],g=0;g=t.y&&e[1]<=t.y+t.height:a.contain(a.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},r.prototype.pointToData=function(e){var t=this.getAxis();return[t.coordToData(t.toLocalCoord(e[t.orient==="horizontal"?0:1]))]},r.prototype.dataToPoint=function(e){var t=this.getAxis(),a=this.getRect(),n=[],i=t.orient==="horizontal"?0:1;return e instanceof Array&&(e=e[0]),n[i]=t.toGlobalCoord(t.dataToCoord(+e)),n[1-i]=i===0?a.y+a.height/2:a.x+a.width/2,n},r.prototype.convertToPixel=function(e,t,a){var n=Ii(t);return n===this?this.dataToPoint(a):null},r.prototype.convertFromPixel=function(e,t,a){var n=Ii(t);return n===this?this.pointToData(a):null},r}();function Ii(r){var e=r.seriesModel,t=r.singleAxisModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function td(r,e){var t=[];return r.eachComponent("singleAxis",function(a,n){var i=new Jp(a,r,e);i.name="single_"+n,i.resize(a,e),a.coordinateSystem=i,t.push(i)}),r.eachSeries(function(a){if(a.get("coordinateSystem")==="singleAxis"){var n=a.getReferringComponents("singleAxis",bo).models[0];a.coordinateSystem=n&&n.coordinateSystem}}),t}var ed={create:td,dimensions:ol},rd=ed,Li=["x","y"],ad=["width","height"],nd=function(r){G(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,a,n,i,o){var l=n.axis,s=l.coordinateSystem,u=Kr(s,1-nr(l)),v=s.dataToPoint(a)[0],c=i.get("type");if(c&&c!=="none"){var f=Cs(i),h=id[c](l,v,u);h.style=f,t.graphicKey=h.type,t.pointer=h}var d=xa(n);Ms(a,t,d,n,i,o)},e.prototype.getHandleTransform=function(t,a,n){var i=xa(a,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var o=Ps(a.axis,t,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,a,n,i){var o=n.axis,l=o.coordinateSystem,s=nr(o),u=Kr(l,s),v=[t.x,t.y];v[s]+=a[s],v[s]=Math.min(u[1],v[s]),v[s]=Math.max(u[0],v[s]);var c=Kr(l,1-s),f=(c[1]+c[0])/2,h=[f,f];return h[s]=v[s],{x:v[0],y:v[1],rotation:t.rotation,cursorPoint:h,tooltipOption:{verticalAlign:"middle"}}},e}(Es),id={line:function(r,e,t){var a=Ns([e,t[0]],[e,t[1]],nr(r));return{type:"Line",subPixelOptimize:!0,shape:a}},shadow:function(r,e,t){var a=r.getBandWidth(),n=t[1]-t[0];return{type:"Rect",shape:Vs([e-a/2,t[0]],[a,n],nr(r))}}};function nr(r){return r.isHorizontal()?0:1}function Kr(r,e){var t=r.getRect();return[t[Li[e]],t[Li[e]]+t[ad[e]]]}var od=nd,ld=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="single",e}(mr);function sd(r){U(Io),wo.registerAxisPointerClass("SingleAxisPointer",od),r.registerComponentView(ld),r.registerComponentView(Kp),r.registerComponentModel(qr),Rs(r,"single",qr,qr.defaultOption),r.registerCoordinateSystem("single",rd)}var ud=["rect","polygon","keep","clear"];function vd(r,e){var t=Rt(r?r.brush:[]);if(!!t.length){var a=[];N(t,function(s){var u=s.hasOwnProperty("toolbox")?s.toolbox:[];u instanceof Array&&(a=a.concat(u))});var n=r&&r.toolbox;H(n)&&(n=n[0]),n||(n={feature:{}},r.toolbox=[n]);var i=n.feature||(n.feature={}),o=i.brush||(i.brush={}),l=o.type||(o.type=[]);l.push.apply(l,a),cd(l),e&&!l.length&&l.push.apply(l,ud)}}function cd(r){var e={};N(r,function(t){e[t]=1}),r.length=0,N(e,function(t,a){r.push(a)})}function fd(r){var e=r.brushType,t={point:function(a){return _i[e].point(a,t,r)},rect:function(a){return _i[e].rect(a,t,r)}};return t}var _i={lineX:Di(0),lineY:Di(1),rect:{point:function(r,e,t){return r&&t.boundingRect.contain(r[0],r[1])},rect:function(r,e,t){return r&&t.boundingRect.intersect(r)}},polygon:{point:function(r,e,t){return r&&t.boundingRect.contain(r[0],r[1])&&ge(t.range,r[0],r[1])},rect:function(r,e,t){var a=t.range;if(!r||a.length<=1)return!1;var n=r.x,i=r.y,o=r.width,l=r.height,s=a[0];if(ge(a,n,i)||ge(a,n+o,i)||ge(a,n,i+l)||ge(a,n+o,i+l)||Et.create(r).contain(s[0],s[1])||Oe(n,i,n+o,i,a)||Oe(n,i,n,i+l,a)||Oe(n+o,i,n+o,i+l,a)||Oe(n,i+l,n+o,i+l,a))return!0}}};function Di(r){var e=["x","y"],t=["width","height"];return{point:function(a,n,i){if(a){var o=i.range,l=a[r];return Se(l,o)}},rect:function(a,n,i){if(a){var o=i.range,l=[a[e[r]],a[e[r]]+a[t[r]]];return l[1]e[0][1]&&(e[0][1]=i[0]),i[1]e[1][1]&&(e[1][1]=i[1])}return e&&Ci(e)}};function Ci(r){return new Et(r[0][0],r[1][0],r[0][1]-r[0][0],r[1][1]-r[1][0])}var md=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a){this.ecModel=t,this.api=a,this.model,(this._brushController=new Bs(a.getZr())).on("brush",lt(this._onBrush,this)).mount()},e.prototype.render=function(t,a,n,i){this.model=t,this._updateController(t,a,n,i)},e.prototype.updateTransform=function(t,a,n,i){ll(a),this._updateController(t,a,n,i)},e.prototype.updateVisual=function(t,a,n,i){this.updateTransform(t,a,n,i)},e.prototype.updateView=function(t,a,n,i){this._updateController(t,a,n,i)},e.prototype._updateController=function(t,a,n,i){(!i||i.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(n)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var a=this.model.id,n=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:a,areas:Me(n),$from:a}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:a,areas:Me(n),$from:a})},e.type="brush",e}(mr),Sd=md,bd="#ddd",xd=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.areas=[],t.brushOption={},t}return e.prototype.optionUpdated=function(t,a){var n=this.option;!a&&$s(n,t,["inBrush","outOfBrush"]);var i=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:bd},i.hasOwnProperty("liftZ")||(i.liftZ=5)},e.prototype.setAreas=function(t){!t||(this.areas=F(t,function(a){return Mi(this.option,a)},this))},e.prototype.setBrushOption=function(t){this.brushOption=Mi(this.option,t),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.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},e}(yr);function Mi(r,e){return fa({brushType:r.brushType,brushMode:r.brushMode,transformable:r.transformable,brushStyle:new Xt(r.brushStyle).getItemStyle(),removeOnClick:r.removeOnClick,z:r.z},e,!0)}var wd=xd,Id=["rect","polygon","lineX","lineY","keep","clear"],Ld=function(r){G(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,a,n){var i,o,l;a.eachComponent({mainType:"brush"},function(s){i=s.brushType,o=s.brushOption.brushMode||"single",l=l||!!s.areas.length}),this._brushType=i,this._brushMode=o,N(t.get("type",!0),function(s){t.setIconStatus(s,(s==="keep"?o==="multiple":s==="clear"?l:s===i)?"emphasis":"normal")})},e.prototype.updateView=function(t,a,n){this.render(t,a,n)},e.prototype.getIcons=function(){var t=this.model,a=t.get("icon",!0),n={};return N(t.get("type",!0),function(i){a[i]&&(n[i]=a[i])}),n},e.prototype.onclick=function(t,a,n){var i=this._brushType,o=this._brushMode;n==="clear"?(a.dispatchAction({type:"axisAreaSelect",intervals:[]}),a.dispatchAction({type:"brush",command:"clear",areas:[]})):a.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:n==="keep"?i:i===n?!1:n,brushMode:n==="keep"?o==="multiple"?"single":"multiple":o}})},e.getDefaultOption=function(t){var a={show:!0,type:Id.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:t.getLocaleModel().get(["toolbox","brush","title"])};return a},e}(Fs),_d=Ld;function Dd(r){r.registerComponentView(Sd),r.registerComponentModel(wd),r.registerPreprocessor(vd),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,hd),r.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(a){a.setAreas(e.areas)})}),r.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},De),r.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},De),Hs("brush",_d)}function un(r,e){if(!r)return!1;for(var t=H(r)?r:[r],a=0;a=0&&(o[i]=+o[i].toFixed(f)),[o,c]}var jr={min:tt(Ye,"min"),max:tt(Ye,"max"),average:tt(Ye,"average"),median:tt(Ye,"median")};function Ve(r,e){var t=r.getData(),a=r.coordinateSystem;if(e&&!Cd(e)&&!H(e.coord)&&a){var n=a.dimensions,i=ul(e,t,a,r);if(e=Me(e),e.type&&jr[e.type]&&i.baseAxis&&i.valueAxis){var o=Dt(n,i.baseAxis.dim),l=Dt(n,i.valueAxis.dim),s=jr[e.type](t,i.baseDataDim,i.valueDataDim,o,l);e.coord=s[0],e.value=s[1]}else{for(var u=[e.xAxis!=null?e.xAxis:e.radiusAxis,e.yAxis!=null?e.yAxis:e.angleAxis],v=0;v<2;v++)jr[u[v]]&&(u[v]=vn(t,t.mapDimension(n[v]),u[v]));e.coord=u}}return e}function ul(r,e,t,a){var n={};return r.valueIndex!=null||r.valueDim!=null?(n.valueDataDim=r.valueIndex!=null?e.getDimension(r.valueIndex):r.valueDim,n.valueAxis=t.getAxis(Md(a,n.valueDataDim)),n.baseAxis=t.getOtherAxis(n.valueAxis),n.baseDataDim=e.mapDimension(n.baseAxis.dim)):(n.baseAxis=a.getBaseAxis(),n.valueAxis=t.getOtherAxis(n.baseAxis),n.baseDataDim=e.mapDimension(n.baseAxis.dim),n.valueDataDim=e.mapDimension(n.valueAxis.dim)),n}function Md(r,e){var t=r.getData().getDimensionInfo(e);return t&&t.coordDim}function Re(r,e){return r&&r.containData&&e.coord&&!Ia(e)?r.containData(e.coord):!0}function Pd(r,e,t){return r&&r.containZone&&e.coord&&t.coord&&!Ia(e)&&!Ia(t)?r.containZone(e.coord,t.coord):!0}function vl(r,e){return r?function(t,a,n,i){var o=i<2?t.coord&&t.coord[i]:t.value;return je(o,e[i])}:function(t,a,n,i){return je(t.value,e[i])}}function vn(r,e,t){if(t==="average"){var a=0,n=0;return r.each(e,function(i,o){isNaN(i)||(a+=i,n++)}),a/n}else return t==="median"?r.getMedian(e):r.getDataExtent(e)[t==="max"?1:0]}var Jr=bt(),Ed=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this.markerGroupMap=re()},e.prototype.render=function(t,a,n){var i=this,o=this.markerGroupMap;o.each(function(l){Jr(l).keep=!1}),a.eachSeries(function(l){var s=jt.getMarkerModelFromSeries(l,i.type);s&&i.renderSeries(l,s,a,n)}),o.each(function(l){!Jr(l).keep&&i.group.remove(l.group)})},e.prototype.markKeep=function(t){Jr(t).keep=!0},e.prototype.toggleBlurSeries=function(t,a){var n=this;N(t,function(i){var o=jt.getMarkerModelFromSeries(i,n.type);if(o){var l=o.getData();l.eachItemGraphicEl(function(s){s&&(a?Xs(s):qs(s))})}})},e.type="marker",e}(mr),cn=Ed;function Pi(r,e,t){var a=e.coordinateSystem;r.each(function(n){var i=r.getItemModel(n),o,l=O(i.get("x"),t.getWidth()),s=O(i.get("y"),t.getHeight());if(!isNaN(l)&&!isNaN(s))o=[l,s];else if(e.getMarkerPosition)o=e.getMarkerPosition(r.getValues(r.dimensions,n));else if(a){var u=r.get(a.dimensions[0],n),v=r.get(a.dimensions[1],n);o=a.dataToPoint([u,v])}isNaN(l)||(o[0]=l),isNaN(s)||(o[1]=s),r.setItemLayout(n,o)})}var Nd=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,a,n){a.eachSeries(function(i){var o=jt.getMarkerModelFromSeries(i,"markPoint");o&&(Pi(o.getData(),i,n),this.markerGroupMap.get(i.id).updateLayout())},this)},e.prototype.renderSeries=function(t,a,n,i){var o=t.coordinateSystem,l=t.id,s=t.getData(),u=this.markerGroupMap,v=u.get(l)||u.set(l,new Va),c=Vd(o,t,a);a.setData(c),Pi(a.getData(),t,i),c.each(function(f){var h=c.getItemModel(f),d=h.getShallow("symbol"),p=h.getShallow("symbolSize"),g=h.getShallow("symbolRotate"),m=h.getShallow("symbolOffset"),S=h.getShallow("symbolKeepAspect");if(nt(d)||nt(p)||nt(g)||nt(m)){var y=a.getRawValue(f),b=a.getDataParams(f);nt(d)&&(d=d(y,b)),nt(p)&&(p=p(y,b)),nt(g)&&(g=g(y,b)),nt(m)&&(m=m(y,b))}var x=h.getModel("itemStyle").getItemStyle(),w=Wa(s,"color");x.fill||(x.fill=w),c.setItemVisual(f,{symbol:d,symbolSize:p,symbolRotate:g,symbolOffset:m,symbolKeepAspect:S,style:x})}),v.updateData(c),this.group.add(v.group),c.eachItemGraphicEl(function(f){f.traverse(function(h){et(h).dataModel=a})}),this.markKeep(v),v.group.silent=a.get("silent")||t.get("silent")},e.type="markPoint",e}(cn);function Vd(r,e,t){var a;r?a=F(r&&r.dimensions,function(l){var s=e.getData().getDimensionInfo(e.getData().mapDimension(l))||{};return W(W({},s),{name:l,ordinalMeta:null})}):a=[{name:"value",type:"float"}];var n=new mt(a,t),i=F(t.get("data"),tt(Ve,e));r&&(i=It(i,tt(Re,r)));var o=vl(!!r,a);return n.initData(i,null,o),n}var Rd=Nd;function kd(r){r.registerComponentModel(Td),r.registerComponentView(Rd),r.registerPreprocessor(function(e){un(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var Gd=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,a,n){return new e(t,a,n)},e.type="markLine",e.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"},e}(jt),zd=Gd,Xe=bt(),Od=function(r,e,t,a){var n=r.getData(),i;if(H(a))i=a;else{var o=a.type;if(o==="min"||o==="max"||o==="average"||o==="median"||a.xAxis!=null||a.yAxis!=null){var l=void 0,s=void 0;if(a.yAxis!=null||a.xAxis!=null)l=e.getAxis(a.yAxis!=null?"y":"x"),s=Pt(a.yAxis,a.xAxis);else{var u=ul(a,n,e,r);l=u.valueAxis;var v=Ks(n,u.valueDataDim);s=vn(n,v,o)}var c=l.dim==="x"?0:1,f=1-c,h=Me(a),d={coord:[]};h.type=null,h.coord=[],h.coord[f]=-1/0,d.coord[f]=1/0;var p=t.get("precision");p>=0&&Bt(s)&&(s=+s.toFixed(Math.min(p,20))),h.coord[c]=d.coord[c]=s,i=[h,d,{type:o,valueIndex:a.valueIndex,value:s}]}else i=[]}var g=[Ve(r,i[0]),Ve(r,i[1]),W({},i[2])];return g[2].type=g[2].type||null,fa(g[2],g[0]),fa(g[2],g[1]),g};function ir(r){return!isNaN(r)&&!isFinite(r)}function Ei(r,e,t,a){var n=1-r,i=a.dimensions[r];return ir(e[n])&&ir(t[n])&&e[r]===t[r]&&a.getAxis(i).containData(e[r])}function Bd(r,e){if(r.type==="cartesian2d"){var t=e[0].coord,a=e[1].coord;if(t&&a&&(Ei(1,t,a,r)||Ei(0,t,a,r)))return!0}return Re(r,e[0])&&Re(r,e[1])}function ta(r,e,t,a,n){var i=a.coordinateSystem,o=r.getItemModel(e),l,s=O(o.get("x"),n.getWidth()),u=O(o.get("y"),n.getHeight());if(!isNaN(s)&&!isNaN(u))l=[s,u];else{if(a.getMarkerPosition)l=a.getMarkerPosition(r.getValues(r.dimensions,e));else{var v=i.dimensions,c=r.get(v[0],e),f=r.get(v[1],e);l=i.dataToPoint([c,f])}if(gr(i,"cartesian2d")){var h=i.getAxis("x"),d=i.getAxis("y"),v=i.dimensions;ir(r.get(v[0],e))?l[0]=h.toGlobalCoord(h.getExtent()[t?0:1]):ir(r.get(v[1],e))&&(l[1]=d.toGlobalCoord(d.getExtent()[t?0:1]))}isNaN(s)||(l[0]=s),isNaN(u)||(l[1]=u)}r.setItemLayout(e,l)}var $d=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,a,n){a.eachSeries(function(i){var o=jt.getMarkerModelFromSeries(i,"markLine");if(o){var l=o.getData(),s=Xe(o).from,u=Xe(o).to;s.each(function(v){ta(s,v,!0,i,n),ta(u,v,!1,i,n)}),l.each(function(v){l.setItemLayout(v,[s.getItemLayout(v),u.getItemLayout(v)])}),this.markerGroupMap.get(i.id).updateLayout()}},this)},e.prototype.renderSeries=function(t,a,n,i){var o=t.coordinateSystem,l=t.id,s=t.getData(),u=this.markerGroupMap,v=u.get(l)||u.set(l,new en);this.group.add(v.group);var c=Fd(o,t,a),f=c.from,h=c.to,d=c.line;Xe(a).from=f,Xe(a).to=h,a.setData(d);var p=a.get("symbol"),g=a.get("symbolSize"),m=a.get("symbolRotate"),S=a.get("symbolOffset");H(p)||(p=[p,p]),H(g)||(g=[g,g]),H(m)||(m=[m,m]),H(S)||(S=[S,S]),c.from.each(function(b){y(f,b,!0),y(h,b,!1)}),d.each(function(b){var x=d.getItemModel(b).getModel("lineStyle").getLineStyle();d.setItemLayout(b,[f.getItemLayout(b),h.getItemLayout(b)]),x.stroke==null&&(x.stroke=f.getItemVisual(b,"style").fill),d.setItemVisual(b,{fromSymbolKeepAspect:f.getItemVisual(b,"symbolKeepAspect"),fromSymbolOffset:f.getItemVisual(b,"symbolOffset"),fromSymbolRotate:f.getItemVisual(b,"symbolRotate"),fromSymbolSize:f.getItemVisual(b,"symbolSize"),fromSymbol:f.getItemVisual(b,"symbol"),toSymbolKeepAspect:h.getItemVisual(b,"symbolKeepAspect"),toSymbolOffset:h.getItemVisual(b,"symbolOffset"),toSymbolRotate:h.getItemVisual(b,"symbolRotate"),toSymbolSize:h.getItemVisual(b,"symbolSize"),toSymbol:h.getItemVisual(b,"symbol"),style:x})}),v.updateData(d),c.line.eachItemGraphicEl(function(b){et(b).dataModel=a,b.traverse(function(x){et(x).dataModel=a})});function y(b,x,w){var I=b.getItemModel(x);ta(b,x,w,t,i);var L=I.getModel("itemStyle").getItemStyle();L.fill==null&&(L.fill=Wa(s,"color")),b.setItemVisual(x,{symbolKeepAspect:I.get("symbolKeepAspect"),symbolOffset:Ft(I.get("symbolOffset",!0),S[w?0:1]),symbolRotate:Ft(I.get("symbolRotate",!0),m[w?0:1]),symbolSize:Ft(I.get("symbolSize"),g[w?0:1]),symbol:Ft(I.get("symbol",!0),p[w?0:1]),style:L})}this.markKeep(v),v.group.silent=a.get("silent")||t.get("silent")},e.type="markLine",e}(cn);function Fd(r,e,t){var a;r?a=F(r&&r.dimensions,function(u){var v=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return W(W({},v),{name:u,ordinalMeta:null})}):a=[{name:"value",type:"float"}];var n=new mt(a,t),i=new mt(a,t),o=new mt([],t),l=F(t.get("data"),tt(Od,e,r,t));r&&(l=It(l,tt(Bd,r)));var s=vl(!!r,a);return n.initData(F(l,function(u){return u[0]}),null,s),i.initData(F(l,function(u){return u[1]}),null,s),o.initData(F(l,function(u){return u[2]})),o.hasItemOption=!0,{from:n,to:i,line:o}}var Hd=$d;function Wd(r){r.registerComponentModel(zd),r.registerComponentView(Hd),r.registerPreprocessor(function(e){un(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var Ud=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,a,n){return new e(t,a,n)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(jt),Zd=Ud,qe=bt(),Yd=function(r,e,t,a){var n=Ve(r,a[0]),i=Ve(r,a[1]),o=n.coord,l=i.coord;o[0]=Pt(o[0],-1/0),o[1]=Pt(o[1],-1/0),l[0]=Pt(l[0],1/0),l[1]=Pt(l[1],1/0);var s=So([{},n,i]);return s.coord=[n.coord,i.coord],s.x0=n.x,s.y0=n.y,s.x1=i.x,s.y1=i.y,s};function or(r){return!isNaN(r)&&!isFinite(r)}function Ni(r,e,t,a){var n=1-r;return or(e[n])&&or(t[n])}function Xd(r,e){var t=e.coord[0],a=e.coord[1],n={coord:t,x:e.x0,y:e.y0},i={coord:a,x:e.x1,y:e.y1};return gr(r,"cartesian2d")?t&&a&&(Ni(1,t,a)||Ni(0,t,a))?!0:Pd(r,n,i):Re(r,n)||Re(r,i)}function Vi(r,e,t,a,n){var i=a.coordinateSystem,o=r.getItemModel(e),l,s=O(o.get(t[0]),n.getWidth()),u=O(o.get(t[1]),n.getHeight());if(!isNaN(s)&&!isNaN(u))l=[s,u];else{if(a.getMarkerPosition)l=a.getMarkerPosition(r.getValues(t,e));else{var v=r.get(t[0],e),c=r.get(t[1],e),f=[v,c];i.clampData&&i.clampData(f,f),l=i.dataToPoint(f,!0)}if(gr(i,"cartesian2d")){var h=i.getAxis("x"),d=i.getAxis("y"),v=r.get(t[0],e),c=r.get(t[1],e);or(v)?l[0]=h.toGlobalCoord(h.getExtent()[t[0]==="x0"?0:1]):or(c)&&(l[1]=d.toGlobalCoord(d.getExtent()[t[1]==="y0"?0:1]))}isNaN(s)||(l[0]=s),isNaN(u)||(l[1]=u)}return l}var Ri=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],qd=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,a,n){a.eachSeries(function(i){var o=jt.getMarkerModelFromSeries(i,"markArea");if(o){var l=o.getData();l.each(function(s){var u=F(Ri,function(c){return Vi(l,s,c,i,n)});l.setItemLayout(s,u);var v=l.getItemGraphicEl(s);v.setShape("points",u)})}},this)},e.prototype.renderSeries=function(t,a,n,i){var o=t.coordinateSystem,l=t.id,s=t.getData(),u=this.markerGroupMap,v=u.get(l)||u.set(l,{group:new rt});this.group.add(v.group),this.markKeep(v);var c=Kd(o,t,a);a.setData(c),c.each(function(f){var h=F(Ri,function(L){return Vi(c,f,L,t,i)}),d=o.getAxis("x").scale,p=o.getAxis("y").scale,g=d.getExtent(),m=p.getExtent(),S=[d.parse(c.get("x0",f)),d.parse(c.get("x1",f))],y=[p.parse(c.get("y0",f)),p.parse(c.get("y1",f))];ca(S),ca(y);var b=!(g[0]>S[1]||g[1]y[1]||m[1]":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},Jd=function(){function r(e){var t=this._condVal=gt(e)?new RegExp(e):Js(e)?e:null;if(t==null){var a="";J(a)}}return r.prototype.evaluate=function(e){var t=typeof e;return gt(t)?this._condVal.test(e):Bt(t)?this._condVal.test(e+""):!1},r}(),tg=function(){function r(){}return r.prototype.evaluate=function(){return this.value},r}(),eg=function(){function r(){}return r.prototype.evaluate=function(){for(var e=this.children,t=0;t2&&a.push(n),n=[E,T]}function v(E,T,C,P){ce(E,C)&&ce(T,P)||n.push(E,T,C,P,C,P)}function c(E,T,C,P,V,R){var k=Math.abs(T-E),z=Math.tan(k/4)*4/3,B=TL:A2&&a.push(n),a}function _a(r,e,t,a,n,i,o,l,s,u){if(ce(r,t)&&ce(e,a)&&ce(n,o)&&ce(i,l)){s.push(o,l);return}var v=2/u,c=v*v,f=o-r,h=l-e,d=Math.sqrt(f*f+h*h);f/=d,h/=d;var p=t-r,g=a-e,m=n-o,S=i-l,y=p*p+g*g,b=m*m+S*S;if(y=0&&L=0){s.push(o,l);return}var _=[],D=[];Je(r,t,n,o,.5,_),Je(e,a,i,l,.5,D),_a(_[0],D[0],_[1],D[1],_[2],D[2],_[3],D[3],s,u),_a(_[4],D[4],_[5],D[5],_[6],D[6],_[7],D[7],s,u)}function dg(r,e){var t=La(r),a=[];e=e||1;for(var n=0;n0)for(var u=0;uMath.abs(u),c=fl([s,u],v?0:1,e),f=(v?l:u)/c.length,h=0;hn,o=fl([a,n],i?0:1,e),l=i?"width":"height",s=i?"height":"width",u=i?"x":"y",v=i?"y":"x",c=r[l]/o.length,f=0;f1?null:new Wt(p*s+r,p*u+e)}function mg(r,e,t){var a=new Wt;Wt.sub(a,t,e),a.normalize();var n=new Wt;Wt.sub(n,r,e);var i=n.dot(a);return i}function se(r,e){var t=r[r.length-1];t&&t[0]===e[0]&&t[1]===e[1]||r.push(e)}function Sg(r,e,t){for(var a=r.length,n=[],i=0;io?(u.x=v.x=l+i/2,u.y=s,v.y=s+o):(u.y=v.y=s+o/2,u.x=l,v.x=l+i),Sg(e,u,v)}function lr(r,e,t,a){if(t===1)a.push(e);else{var n=Math.floor(t/2),i=r(e);lr(r,i[0],n,a),lr(r,i[1],t-n,a)}return a}function bg(r,e){for(var t=[],a=0;a0)for(var x=a/t,w=-a/2;w<=a/2;w+=x){for(var I=Math.sin(w),L=Math.cos(w),_=0,y=0;y0;u/=2){var v=0,c=0;(r&u)>0&&(v=1),(e&u)>0&&(c=1),l+=u*u*(3*v^c),c===0&&(v===1&&(r=u-1-r,e=u-1-e),s=r,r=e,e=s)}return l}function vr(r){var e=1/0,t=1/0,a=-1/0,n=-1/0,i=F(r,function(l){var s=l.getBoundingRect(),u=l.getComputedTransform(),v=s.x+s.width/2+(u?u[4]:0),c=s.y+s.height/2+(u?u[5]:0);return e=Math.min(v,e),t=Math.min(c,t),a=Math.max(v,a),n=Math.max(c,n),[v,c]}),o=F(i,function(l,s){return{cp:l,z:Cg(l[0],l[1],e,t,a,n),path:r[s]}});return o.sort(function(l,s){return l.z-s.z}).map(function(l){return l.path})}function dl(r){return Ig(r.path,r.count)}function Da(){return{fromIndividuals:[],toIndividuals:[],count:0}}function Mg(r,e,t){var a=[];function n(x){for(var w=0;w=0;n--)if(!t[n].many.length){var s=t[l].many;if(s.length<=1)if(l)l=0;else return t;var i=s.length,u=Math.ceil(i/2);t[n].many=s.slice(u,i),t[l].many=s.slice(0,u),l++}return t}var Eg={clone:function(r){for(var e=[],t=1-Math.pow(1-r.path.style.opacity,1/r.count),a=0;a0))return;var l=a.getModel("universalTransition").get("delay"),s=Object.assign({setToFinal:!0},o),u,v;Wi(r)&&(u=r,v=e),Wi(e)&&(u=e,v=r);function c(m,S,y,b,x){var w=m.many,I=m.one;if(w.length===1&&!x){var L=S?w[0]:I,_=S?I:w[0];if(sr(L))c({many:[L],one:_},!0,y,b,!0);else{var D=l?ht({delay:l(y,b)},s):s;hn(L,_,D),i(L,_,L,_,D)}}else for(var A=ht({dividePath:Eg[t],individualDelay:l&&function(V,R,k,z){return l(V+y,b)}},s),M=S?Mg(w,I,A):Pg(I,w,A),E=M.fromIndividuals,T=M.toIndividuals,C=E.length,P=0;Pe.length,h=u?Ui(v,u):Ui(f?e:r,[f?r:e]),d=0,p=0;pgl))for(var n=a.getIndices(),i=Vg(a),o=0;o0&&b.group.traverse(function(w){w instanceof pt&&!w.animators.length&&w.animateFrom({style:{opacity:0}},x)})})}function Yi(r){var e=r.getModel("universalTransition").get("seriesKey");return e||r.id}function Xi(r){return H(r)?r.sort().join(","):r}function $t(r){if(r.hostModel)return r.hostModel.getModel("universalTransition").get("divideShape")}function Gg(r,e){var t=re(),a=re(),n=re();return N(r.oldSeries,function(i,o){var l=r.oldData[o],s=Yi(i),u=Xi(s);a.set(u,l),H(s)&&N(s,function(v){n.set(v,{data:l,key:u})})}),N(e.updatedSeries,function(i){if(i.isUniversalTransitionEnabled()&&i.isAnimationEnabled()){var o=i.getData(),l=Yi(i),s=Xi(l),u=a.get(s);if(u)t.set(s,{oldSeries:[{divide:$t(u),data:u}],newSeries:[{divide:$t(o),data:o}]});else if(H(l)){var v=[];N(l,function(h){var d=a.get(h);d&&v.push({divide:$t(d),data:d})}),v.length&&t.set(s,{oldSeries:v,newSeries:[{data:o,divide:$t(o)}]})}else{var c=n.get(l);if(c){var f=t.get(c.key);f||(f={oldSeries:[{data:c.data,divide:$t(c.data)}],newSeries:[]},t.set(c.key,f)),f.newSeries.push({data:o,divide:$t(o)})}}}}),t}function qi(r,e){for(var t=0;t=0&&n.push({data:e.oldData[l],divide:$t(e.oldData[l]),dim:o.dimension})}),N(Rt(r.to),function(o){var l=qi(t.updatedSeries,o);if(l>=0){var s=t.updatedSeries[l].getData();i.push({data:s,divide:$t(s),dim:o.dimension})}}),n.length>0&&i.length>0&&yl(n,i,a)}function Og(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,a){N(Rt(a.seriesTransition),function(n){N(Rt(n.to),function(i){for(var o=a.updatedSeries,l=0;lgn(this,null,function*(){const t=yield(yield wl(()=>import("./china.a225b5d5.js"),[])).default;Vu("china",t),e({visualMap:[{min:0,max:1e3,left:"left",top:"bottom",text:["\u9AD8","\u4F4E"],calculable:!1,orient:"horizontal",inRange:{color:["#e0ffff","#006edd"],symbolSize:[30,100]}}],tooltip:{trigger:"item",backgroundColor:"rgba(0, 0, 0, .6)",textStyle:{color:"#fff",fontSize:12}},series:[{name:"iphone4",type:"map",map:"china",label:{show:!0,color:"rgb(249, 249, 249)",fontSize:10},itemStyle:{areaColor:"#2f82ce",borderColor:"#0DAAC1"},data:Ru}]})})),{chartRef:r}}});function $g(r,e,t,a,n,i){return Il(),Ll("div",{ref:"chartRef",style:_l({height:r.height,width:r.width})},null,4)}var Zg=ml(Bg,[["render",$g]]);export{Zg as default};