var Cn=(r,e,t)=>new Promise((a,n)=>{var i=l=>{try{s(t.next(l))}catch(u){n(u)}},o=l=>{try{s(t.throw(l))}catch(u){n(u)}},s=l=>l.done?a(l.value):Promise.resolve(l.value).then(i,o);s((t=t.apply(r,e)).next())});import{aw as Es,a as Ns,s as Rs,N as Vs,br as ks,o as Gs,h as Bs,bk as zs}from"./index.7e08ba81.js";import{T as vo,m as It,B as dt,n as fa,i as nt,k as Ga,g as it,p as z,a as Os,f as Tt,s as Hs,b as $s,h as Fs,e as N,c as ho,d as fo,j as Mn,l as Ws,o as Us,r as Ft,q as xt,t as wt,v as ot,w as co,x as de,_ as k,P as yt,G as rt,R as Ba,y as yr,V as za,z as po,A as go,C as yo,D as ht,S as mo,E as ca,H as Zs,F as Ys,I as So,J as gt,K as Mt,L as rr,M as pa,N as et,O as Xs,Q as U,U as F,W as $,X as mr,Y as Oa,Z as _t,$ as mt,a0 as qt,a1 as Ot,a2 as ft,a3 as _o,a4 as Ae,a5 as qs,a6 as At,a7 as Gt,a8 as Ks,a9 as js,aa as Ce,ab as Wt,ac as kt,ad as Sr,ae as lt,af as Qs,ag as pe,ah as st,ai as Pn,aj as Js,ak as bo,al as tl,am as En,an as He,ao as Nn,ap as Kt,aq as Rt,ar as el,as as Ha,at as jt,au as xo,av as da,aw as wo,ax as Nt,ay as Rn,az as Ht,aA as Be,aB as Yt,aC as ze,aD as rl,aE as al,aF as fe,aG as Vn,aH as nl,aI as pt,aJ as ga,aK as Et,aL as ar,aM as ya,aN as Io,aO as $a,aP as Fa,aQ as Wa,aR as Ua,aS as Me,aT as _r,aU as il,aV as Lo,aW as ol,aX as Za,aY as ge,aZ as Oe,a_ as Do,a$ as Ya,b0 as Xa,b1 as sl,b2 as ll,b3 as kn,b4 as qa,b5 as ul,b6 as Gn,b7 as Pe,b8 as Ka,b9 as ja,ba as ye,bb as Ut,bc as vl,bd as hl,be as Qa,bf as fl,bg as cl,bh as Z,bi as To,bj as pl,bk as ma,bl as Sa,bm as dl,bn as gl,bo as _a,bp as Dr,bq as Ao,br as tt,bs as Ja,bt as tn,bu as en,bv as Tr,bw as yl,bx as Co,by as ml,bz as xe,bA as Sl,bB as Bn,bC as _l,bD as Mo,bE as ba,bF as br,bG as bl,bH as Po,bI as Eo,bJ as zn,bK as xl,bL as wl,bM as rn,bN as On,bO as Hn,bP as $n,bQ as Ct,bR as Il,bS as Ll,bT as Dl,bU as Tl,bV as Al,bW as Cl,bX as Ml,bY as Pl,bZ as El,b_ as Nl,b$ as Rl,c0 as Vl,c1 as No,c2 as kl,c3 as Gl,c4 as Bl,c5 as xr,c6 as zl,c7 as Ol,c8 as Hl,c9 as $l,ca as Fl,cb as Wl,cc as Ul,cd as Zl,ce as Yl,cf as Xl,cg as wr,ch as Ro,ci as ql,cj as me,ck as $e,cl as Ee,cm as Kl,cn as jl,co as Ql,cp as Jl,cq as tu,cr as eu,cs as ie,ct as ru,cu as au,cv as Vo,cw as nu,cx as iu,cy as ou,cz as nr,cA as su,cB as lu,cC as an,cD as uu,cE as ko,cF as vu,cG as hu,cH as fu,cI as cu,cJ as pu,cK as du,cL as Fn,cM as gu,cN as yu,cO as Go,cP as xa,cQ as mu,cR as Bo,cS as Su,cT as _u,cU as bu,cV as xu,cW as Fe,cX as wu,cY as Iu,cZ as Lu,c_ as We,c$ as Du,d0 as ir,d1 as nn,d2 as Tu,d3 as on,d4 as Ar,d5 as Au,d6 as Cu,d7 as Mu,d8 as Pu,d9 as Eu,da as Nu,db as Ru,dc as Vu,dd as ku,de as Gu,df as Bu,dg as zu,dh as Ou,di as Hu,dj as $u,dk as Fu,dl as Wu,dm as Uu,dn as Zu,dp as Yu,dq as Xu,dr as qu,ds as Ku,dt as ju,du as Qu,dv as Ju,u as tv,dw as ev}from"./useECharts.c20a8b08.js";import{m as rv}from"./data.29a5f341.js";function av(r){if(r){for(var e=[],t=0;t=0&&a.attr(i.oldLayoutSelect),wt(f,"emphasis")>=0&&a.attr(i.oldLayoutEmphasis)),ot(a,u,t,l)}else if(a.attr(u),!Us(a).valueAnimation){var h=Ft(a.style.opacity,1);a.style.opacity=0,xt(a,{style:{opacity:h}},t,l)}if(i.oldLayout=u,a.states.select){var c=i.oldLayoutSelect={};Ue(c,u,Ze),Ue(c,a.states.select,Ze)}if(a.states.emphasis){var d=i.oldLayoutEmphasis={};Ue(d,u,Ze),Ue(d,a.states.emphasis,Ze)}co(a,l,v,t,t)}if(n&&!n.ignore&&!n.invisible){var i=iv(n),o=i.oldLayout,p={points:n.shape.points};o?(n.attr({shape:o}),ot(n,{shape:p},t)):(n.setShape(p),n.style.strokePercent=0,xt(n,{style:{strokePercent:1}},t)),i.oldLayout=p}},r}(),sv=ov,Mr=It();function lv(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,a){var n=Mr(t).labelManager;n||(n=Mr(t).labelManager=new sv),n.clearLabels()}),r.registerUpdateLifecycle("series:layoutlabels",function(e,t,a){var n=Mr(t).labelManager;a.updatedSeries.forEach(function(i){n.addLabelsOfSeries(t.getViewOfSeriesModel(i))}),n.updateLayoutConfig(t),n.layout(t),n.processLabelsOverall()})}function uv(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 s=n[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},t.push(s)}}function vv(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){cv(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=pv(r,n,r.parentNode.hierNode.defaultAncestor||a[0],e)}function hv(r){var e=r.hierNode.prelim+r.parentNode.hierNode.modifier;r.setLayout({x:e},!0),r.hierNode.modifier+=r.parentNode.hierNode.modifier}function Un(r){return arguments.length?r:yv}function we(r,e){return r-=Math.PI/2,{x:e*Math.cos(r),y:e*Math.sin(r)}}function fv(r,e){return de(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function cv(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 pv(r,e,t,a){if(e){for(var n=r,i=r,o=i.parentNode.children[0],s=e,l=n.hierNode.modifier,u=i.hierNode.modifier,v=o.hierNode.modifier,h=s.hierNode.modifier;s=Pr(s),i=Er(i),s&&i;){n=Pr(n),o=Er(o),n.hierNode.ancestor=r;var f=s.hierNode.prelim+h-i.hierNode.prelim-u+a(s,i);f>0&&(gv(dv(s,r,t),r,f),u+=f,l+=f),h+=s.hierNode.modifier,u+=i.hierNode.modifier,l+=n.hierNode.modifier,v+=o.hierNode.modifier}s&&!Pr(n)&&(n.hierNode.thread=s,n.hierNode.modifier+=h-l),i&&!Er(o)&&(o.hierNode.thread=i,o.hierNode.modifier+=u-v,t=r)}return t}function Pr(r){var e=r.children;return e.length&&r.isExpand?e[e.length-1]:r.hierNode.thread}function Er(r){var e=r.children;return e.length&&r.isExpand?e[0]:r.hierNode.thread}function dv(r,e,t){return r.hierNode.ancestor.parentNode===e.parentNode?r.hierNode.ancestor:t}function gv(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 yv(r,e){return r.parentNode===e.parentNode?1:2}var mv=function(){function r(){this.parentPoint=[],this.childPoints=[]}return r}(),Sv=function(r){k(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 mv},e.prototype.buildPath=function(t,a){var n=a.childPoints,i=n.length,o=a.parentPoint,s=n[0],l=n[i-1];if(i===1){t.moveTo(o[0],o[1]),t.lineTo(s[0],s[1]);return}var u=a.orient,v=u==="TB"||u==="BT"?0:1,h=1-v,f=z(a.forkPosition,1),c=[];c[v]=o[v],c[h]=o[h]+(l[h]-o[h])*f,t.moveTo(o[0],o[1]),t.lineTo(c[0],c[1]),t.moveTo(s[0],s[1]),c[v]=s[v],t.lineTo(c[0],c[1]),c[v]=l[v],t.lineTo(c[0],c[1]),t.lineTo(l[0],l[1]);for(var d=1;dS.x,b||(_=_-Math.PI));var w=b?"left":"right",I=s.getModel("label"),D=I.get("rotate"),L=D*(Math.PI/180),T=g.getTextContent();T&&(g.setTextConfig({position:I.get("position")||w,rotation:D==null?-_:L,origin:"center"}),T.setStyle("verticalAlign","middle"))}var M=s.get(["emphasis","focus"]),P=M==="relative"?ca(o.getAncestorsIndices(),o.getDescendantIndices()):M==="ancestor"?o.getAncestorsIndices():M==="descendant"?o.getDescendantIndices():null;P&&(it(t).focus=P),bv(n,o,v,t,d,c,p,a),t.__edge&&(t.onHoverStateChange=function(A){if(A!=="blur"){var C=o.parentNode&&r.getItemGraphicEl(o.parentNode.dataIndex);C&&C.hoverState===Zs||Ys(t.__edge,A)}})}function bv(r,e,t,a,n,i,o,s){var l=e.getModel(),u=r.get("edgeShape"),v=r.get("layout"),h=r.getOrient(),f=r.get(["lineStyle","curveness"]),c=r.get("edgeForkPosition"),d=l.getModel("lineStyle").getLineStyle(),p=a.__edge;if(u==="curve")e.parentNode&&e.parentNode!==t&&(p||(p=a.__edge=new So({shape:wa(v,h,f,n,n)})),ot(p,{shape:wa(v,h,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(mt(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 $o(r){for(var e=[];r;)r=r.parentNode,r&&e.push(r);return e.reverse()}function un(r,e){var t=$o(r);return wt(t,e)>=0}function Ir(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 Ev=function(r){k(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 qt(n,this,this.ecModel),o=ln.createTree(a,this,s);function s(h){h.wrapMethod("getItemModel",function(f,c){var d=o.getNodeByDataIndex(c);return d&&d.children.length&&d.isExpand||(f.parentModel=i),f})}var l=0;o.eachNode("preorder",function(h){h.depth>l&&(l=h.depth)});var u=t.expandAndCollapse,v=u&&t.initialTreeDepth>=0?t.initialTreeDepth:l;return o.root.eachNode("preorder",function(h){var f=h.hostTree.data.getRawDataItem(h.dataIndex);h.isExpand=f&&f.collapsed!=null?!f.collapsed:h.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],s=i.getNodeByDataIndex(t),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return Ot("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},e.prototype.getDataParams=function(t){var a=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return a.treeAncestors=Ir(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}(ft),Nv=Ev;function Rv(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 s=0;s=0;i--)t.push(n[i])}}function Vv(r,e){r.eachSeriesByType("tree",function(t){kv(t,e)})}function kv(r,e){var t=fv(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=Un(function(y,_){return(y.parentNode===_.parentNode?1:2)/y.depth})):(n=t.width,i=t.height,o=Un());var s=r.getData().tree.root,l=s.children[0];if(l){uv(s),Rv(l,vv,o),s.hierNode.modifier=-l.hierNode.prelim,Se(l,hv);var u=l,v=l,h=l;Se(l,function(y){var _=y.getLayout().x;_v.getLayout().x&&(v=y),y.depth>h.depth&&(h=y)});var f=u===v?1:o(u,v)/2,c=f-u.getLayout().x,d=0,p=0,g=0,m=0;if(a==="radial")d=n/(v.getLayout().x+f+c),p=i/(h.depth-1||1),Se(l,function(y){g=(y.getLayout().x+c)*d,m=(y.depth-1)*p;var _=we(g,m);y.setLayout({x:_.x,y:_.y,rawX:g,rawY:m},!0)});else{var S=r.getOrient();S==="RL"||S==="LR"?(p=i/(v.getLayout().x+f+c),d=n/(h.depth-1||1),Se(l,function(y){m=(y.getLayout().x+c)*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+c),p=i/(h.depth-1||1),Se(l,function(y){g=(y.getLayout().x+c)*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(),s=t.ensureUniqueItemVisual(n.dataIndex,"style");U(s,o)})})}function Bv(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=_o(i,e,void 0,a);n.setCenter&&n.setCenter(o.center),n.setZoom&&n.setZoom(o.zoom)})})}function zv(r){r.registerChartView(xv),r.registerSeriesModel(Nv),r.registerLayout(Vv),r.registerVisual(Gv),Bv(r)}var Kn=["treemapZoomToNode","treemapRender","treemapMove"];function Ov(r){for(var e=0;e1;)i=i.parentNode;var o=qs(r.ecModel,i.name||i.dataIndex+"",a);n.setVisual("decal",o)})}var Hv=function(r){k(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};Wo(n);var i=t.levels||[],o=this.designatedVisualItemStyle={},s=new qt({itemStyle:o},this,a);i=t.levels=$v(i,a);var l=F(i||[],function(h){return new qt(h,s,a)},this),u=ln.createTree(n,this,v);function v(h){h.wrapMethod("getItemModel",function(f,c){var d=u.getNodeByDataIndex(c),p=d?l[d.depth]:null;return f.parentModel=p||s,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),s=i.getName(t);return Ot("nameValue",{name:s,value:o})},e.prototype.getDataParams=function(t){var a=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return a.treeAncestors=Ir(n,this),a.treePathInfo=a.treeAncestors,a},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},U(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var a=this._idIndexMap;a||(a=this._idIndexMap=At(),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(){Fo(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}(ft);function Wo(r){var e=0;N(r.children,function(a){Wo(a);var n=a.value;$(n)&&(n=n[0]),e+=n});var t=r.value;$(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),$(r.value)?r.value[0]=t:r.value=t}function $v(r,e){var t=Gt(e.get("color")),a=Gt(e.get(["aria","decal","decals"]));if(!!t){r=r||[];var n,i;N(r,function(s){var l=new qt(s),u=l.get("color"),v=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(n=!0),(l.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 Fv=Hv,Wv=8,jn=8,Nr=5,Uv=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 s=i.getModel("itemStyle"),l=i.getModel("emphasis"),u=s.getModel("textStyle"),v=l.getModel(["itemStyle","textStyle"]),h={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,h,u),this._renderContent(e,h,s,l,u,v,n),Ks(o,h.pos,h.box)}},r.prototype._prepare=function(e,t,a){for(var n=e;n;n=n.parentNode){var i=mr(n.getModel().get("name"),""),o=a.getTextRect(i),s=Math.max(o.width+Wv*2,t.emptyItemWidth);t.totalWidth+=s+jn,t.renderList.push({node:n,text:i,width:s})}},r.prototype._renderContent=function(e,t,a,n,i,o,s){for(var l=0,u=t.emptyItemWidth,v=e.get(["breadcrumb","height"]),h=js(t.pos,t.box),f=t.totalWidth,c=t.renderList,d=n.getModel("itemStyle").getItemStyle(),p=c.length-1;p>=0;p--){var g=c[p],m=g.node,S=g.width,y=g.text;f>h.width&&(f-=S-u,S=u,y=null);var _=new Ce({shape:{points:Zv(l,0,S,v,p===c.length-1,p===0)},style:gt(a.getItemStyle(),{lineJoin:"bevel"}),textContent:new Wt({style:kt(i,{text:y})}),textConfig:{position:"inside"},z2:Sr*1e4,onclick:et(s,m)});_.disableLabelAnimation=!0,_.getTextContent().ensureState("emphasis").style=kt(o,{text:y}),_.ensureState("emphasis").style=d,lt(_,n.get("focus"),n.get("blurScope"),n.get("disabled")),this.group.add(_),Yv(_,e,m),l+=S+jn}},r.prototype.remove=function(){this.group.removeAll()},r}();function Zv(r,e,t,a,n,i){var o=[[n?r:r-Nr,e],[r+t,e],[r+t,e+a],[n?r:r-Nr,e+a]];return!i&&o.splice(2,0,[r+t+Nr,e+a/2]),!n&&o.push([r,e+a/2]),o}function Yv(r,e,t){it(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&&Ir(t,e)}}var Xv=Uv,qv=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;nJn||Math.abs(t.dy)>Jn)){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 s=new dt(o.x,o.y,o.width,o.height),l=this.seriesModel.layoutInfo;a-=l.x,n-=l.y;var u=tl();Pn(u,u,[-a,-n]),Js(u,u,[t.scale,t.scale]),Pn(u,u,[a,n]),s.applyTransform(u),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:s.x,y:s.y,width:s.width,height:s.height}})}},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 s=o.node;if(s.getLayout().isLeafRoot)a._rootToNode(o);else if(i==="zoomToNode")a._zoomToNode(o);else if(i==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),v=l.get("target",!0)||"blank";u&&bo(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 Xv(this.group))).render(t,a,n.node,function(o){i._state!=="animating"&&(un(t.getViewRoot(),o)?i._rootToNode({node:o}):i._zoomToNode({node:o}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=_e(),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 s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(t,a),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)n={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),n},e.type="treemap",e}(ht);function _e(){return{nodeGroup:[],background:[],content:[]}}function eh(r,e,t,a,n,i,o,s,l,u){if(!o)return;var v=o.getLayout(),h=r.getData(),f=o.getModel();if(h.setItemGraphicEl(o.dataIndex,null),!v||!v.isInView)return;var c=v.width,d=v.height,p=v.borderWidth,g=v.invisible,m=o.getRawIndex(),S=s&&s.getRawIndex(),y=o.viewChildren,_=v.upperHeight,b=y&&y.length,x=f.getModel("itemStyle"),w=f.getModel(["emphasis","itemStyle"]),I=f.getModel(["blur","itemStyle"]),D=f.getModel(["select","itemStyle"]),L=x.get("borderRadius")||0,T=W("nodeGroup",Ia);if(!T)return;if(l.add(T),T.x=v.x||0,T.y=v.y||0,T.markRedraw(),or(T).nodeWidth=c,or(T).nodeHeight=d,v.isAboveViewRoot)return T;var M=W("background",Qn,u,Qv);M&&G(T,M,b&&v.upperLabelHeight);var P=f.getModel("emphasis"),A=P.get("focus"),C=P.get("blurScope"),E=P.get("disabled"),R=A==="ancestor"?o.getAncestorsIndices():A==="descendant"?o.getDescendantIndices():A;if(b)En(T)&&He(T,!1),M&&(He(M,!E),h.setItemGraphicEl(o.dataIndex,M),Nn(M,R,C));else{var V=W("content",Qn,u,Jv);V&&O(T,V),M.disableMorphing=!0,M&&En(M)&&He(M,!1),He(T,!E),h.setItemGraphicEl(o.dataIndex,T),Nn(T,R,C)}return T;function G(Y,H,Q){var q=it(H);if(q.dataIndex=o.dataIndex,q.seriesIndex=r.seriesIndex,H.setShape({x:0,y:0,width:c,height:d,r:L}),g)B(H);else{H.invisible=!1;var J=o.getVisual("style"),ct=J.stroke,Lt=ri(x);Lt.fill=ct;var at=re(w);at.fill=w.get("borderColor");var Dt=re(I);Dt.fill=I.get("borderColor");var Vt=re(D);if(Vt.fill=D.get("borderColor"),Q){var oe=c-2*p;K(H,ct,J.opacity,{x:p,y:0,width:oe,height:_})}else H.removeTextContent();H.setStyle(Lt),H.ensureState("emphasis").style=at,H.ensureState("blur").style=Dt,H.ensureState("select").style=Vt,rr(H)}Y.add(H)}function O(Y,H){var Q=it(H);Q.dataIndex=o.dataIndex,Q.seriesIndex=r.seriesIndex;var q=Math.max(c-2*p,0),J=Math.max(d-2*p,0);if(H.culling=!0,H.setShape({x:p,y:p,width:q,height:J,r:L}),g)B(H);else{H.invisible=!1;var ct=o.getVisual("style"),Lt=ct.fill,at=ri(x);at.fill=Lt,at.decal=ct.decal;var Dt=re(w),Vt=re(I),oe=re(D);K(H,Lt,ct.opacity,null),H.setStyle(at),H.ensureState("emphasis").style=Dt,H.ensureState("blur").style=Vt,H.ensureState("select").style=oe,rr(H)}Y.add(H)}function B(Y){!Y.invisible&&i.push(Y)}function K(Y,H,Q,q){var J=f.getModel(q?ei:ti),ct=mr(f.get("name"),null),Lt=J.getShallow("show");Kt(Y,Rt(f,q?ei:ti),{defaultText:Lt?ct:null,inheritColor:H,defaultOpacity:Q,labelFetcher:r,labelDataIndex:o.dataIndex});var at=Y.getTextContent();if(!!at){var Dt=at.style,Vt=el(Dt.padding||0);q&&(Y.setTextConfig({layoutRect:q}),at.disableLabelLayout=!0),at.beforeUpdate=function(){var Tn=Math.max((q?q.width:Y.shape.width)-Vt[1]-Vt[3],0),An=Math.max((q?q.height:Y.shape.height)-Vt[0]-Vt[2],0);(Dt.width!==Tn||Dt.height!==An)&&at.setStyle({width:Tn,height:An})},Dt.truncateMinChar=2,Dt.lineOverflow="truncate",X(Dt,q,v);var oe=at.getState("emphasis");X(oe?oe.style:null,q,v)}}function X(Y,H,Q){var q=Y?Y.text:null;if(!H&&Q.isLeafRoot&&q!=null){var J=r.get("drillDownIcon",!0);Y.text=J?J+" "+q:q}}function W(Y,H,Q,q){var J=S!=null&&t[Y][S],ct=n[Y];return J?(t[Y][S]=null,j(ct,J)):g||(J=new H,J instanceof Ha&&(J.z2=rh(Q,q)),ut(ct,J)),e[Y][m]=J}function j(Y,H){var Q=Y[m]={};H instanceof Ia?(Q.oldX=H.x,Q.oldY=H.y):Q.oldShape=U({},H.shape)}function ut(Y,H){var Q=Y[m]={},q=o.parentNode,J=H instanceof rt;if(q&&(!a||a.direction==="drillDown")){var ct=0,Lt=0,at=n.background[q.getRawIndex()];!a&&at&&at.oldShape&&(ct=at.oldShape.width,Lt=at.oldShape.height),J?(Q.oldX=0,Q.oldY=Lt):Q.oldShape={x:ct,y:Lt,width:0,height:0}}Q.fadein=!J}}function rh(r,e){return r*jv+e}var ah=th,nh="itemStyle",Uo=It(),ih={seriesType:"treemap",reset:function(r){var e=r.getData().tree,t=e.root;t.isRemoved()||Zo(t,{},r.getViewRoot().getAncestors(),r)}};function Zo(r,e,t,a){var n=r.getModel(),i=r.getLayout(),o=r.hostTree.data;if(!(!i||i.invisible||!i.isInView)){var s=n.getModel(nh),l=oh(s,e,a),u=o.ensureUniqueItemVisual(r.dataIndex,"style"),v=s.get("borderColor"),h=s.get("borderColorSaturation"),f;h!=null&&(f=ai(l),v=sh(h,f)),u.stroke=v;var c=r.viewChildren;if(!c||!c.length)f=ai(l),u.fill=f;else{var d=lh(r,n,i,s,l,c);N(c,function(p,g){if(p.depth>=t.length||p===t[p.depth]){var m=uh(n,l,p,g,d,a);Zo(p,m,t,a)}})}}}function oh(r,e,t){var a=U({},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 ai(r){var e=Rr(r,"color");if(e){var t=Rr(r,"colorAlpha"),a=Rr(r,"colorSaturation");return a&&(e=xo(e,null,null,a)),t&&(e=da(e,t)),e}}function sh(r,e){return e!=null?xo(e,null,null,r):null}function Rr(r,e){var t=r[e];if(t!=null&&t!=="none")return t}function lh(r,e,t,a,n,i){if(!(!i||!i.length)){var o=Vr(e,"color")||n.color!=null&&n.color!=="none"&&(Vr(e,"colorAlpha")||Vr(e,"colorSaturation"));if(!!o){var s=e.get("visualMin"),l=e.get("visualMax"),u=t.dataExtent.slice();s!=null&&su[1]&&(u[1]=l);var v=e.get("colorMappingBy"),h={type:o.name,dataExtent:u,visual:o.range};h.type==="color"&&(v==="index"||v==="id")?(h.mappingMethod="category",h.loop=!0):h.mappingMethod="linear";var f=new wo(h);return Uo(f).drColorMappingBy=v,f}}}function Vr(r,e){var t=r.get(e);return $(t)&&t.length?{name:e,range:t}:null}function uh(r,e,t,a,n,i){var o=U({},e);if(n){var s=n.type,l=s==="color"&&Uo(n).drColorMappingBy,u=l==="index"?a:l==="id"?i.mapIdToIndex(t.getId()):t.getValue(r.get("visualDimension"));o[s]=n.mapValueToVisual(u)}return o}var Re=Math.max,sr=Math.min,ni=Nt,vn=N,Yo=["itemStyle","borderWidth"],vh=["itemStyle","gapWidth"],hh=["upperLabel","show"],fh=["upperLabel","height"],ch={seriesType:"treemap",reset:function(r,e,t,a){var n=t.getWidth(),i=t.getHeight(),o=r.option,s=de(r.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),l=o.size||[],u=z(ni(s.width,l[0]),n),v=z(ni(s.height,l[1]),i),h=a&&a.type,f=["treemapZoomToNode","treemapRootToNode"],c=Ne(a,f,r),d=h==="treemapRender"||h==="treemapMove"?a.rootRect:null,p=r.getViewRoot(),g=$o(p);if(h!=="treemapMove"){var m=h==="treemapZoomToNode"?Sh(r,c,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 _={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};p.setLayout(_),Xo(p,y,!1,0),_=p.getLayout(),vn(g,function(x,w){var I=(g[w+1]||p).getValue();x.setLayout(U({dataExtent:[I,I],borderWidth:0,upperHeight:0},_))})}var b=r.getData().tree.root;b.setLayout(_h(s,d,c),!0),r.setLayoutInfo(s),qo(b,new dt(-s.x,-s.y,n,i),g,p,0)}};function Xo(r,e,t,a){var n,i;if(!r.isRemoved()){var o=r.getLayout();n=o.width,i=o.height;var s=r.getModel(),l=s.get(Yo),u=s.get(vh)/2,v=Ko(s),h=Math.max(l,v),f=l-u,c=h-u;r.setLayout({borderWidth:l,upperHeight:h,upperLabelHeight:v},!0),n=Re(n-2*f,0),i=Re(i-f-c,0);var d=n*i,p=ph(r,s,d,e,t,a);if(!!p.length){var g={x:f,y:c,width:n,height:i},m=sr(n,i),S=1/0,y=[];y.area=0;for(var _=0,b=p.length;_=0;l--){var u=n[a==="asc"?o-l-1:l].getValue();u/t*es[1]&&(s[1]=u)})),{sum:a,dataExtent:s}}function mh(r,e,t){for(var a=0,n=1/0,i=0,o=void 0,s=r.length;ia&&(a=o));var l=r.area*r.area,u=e*e*t;return l?Re(u*a/l,l/(u*n)):1/0}function ii(r,e,t,a,n){var i=e===t.width?0:1,o=1-i,s=["x","y"],l=["width","height"],u=t[s[i]],v=e?r.area/e:0;(n||v>t[l[o]])&&(v=t[l[o]]);for(var h=0,f=r.length;hRn&&(u=Rn),i=s}ua&&(a=e);var i=a%2?a+2:a+3;n=[];for(var o=0;o0&&(b[0]=-b[0],b[1]=-b[1]);var w=_[0]<0?-1:1;if(i.__position!=="start"&&i.__position!=="end"){var I=-Math.atan2(_[1],_[0]);h[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*w+v[0],i.y=v[1]+D,d=_[0]<0?"right":"left",i.originX=-m*w,i.originY=-D;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=x[0],i.y=x[1]+D,d="center",i.originY=-D;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-m*w+h[0],i.y=h[1]+D,d=_[0]>=0?"right":"left",i.originX=m*w,i.originY=-D;break}i.scaleX=i.scaleY=o,i.setStyle({verticalAlign:i.__verticalAlign||p,align:i.__align||d})}},e}(rt),pn=zh,Oh=function(){function r(e){this.group=new rt,this._LineCtor=e||pn}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=hi(e);e.diff(i).add(function(s){t._doAdd(e,s,o)}).update(function(s,l){t._doUpdate(i,e,l,s,o)}).remove(function(s){n.remove(i.getItemGraphicEl(s))}).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=hi(e),this._lineData=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t){this._progressiveEls=[];function a(s){!s.isGroup&&!Hh(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var n=e.start;n0}function hi(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:Rt(e)}}function fi(r){return isNaN(r[0])||isNaN(r[1])}function Or(r){return r&&!fi(r[0])&&!fi(r[1])}var dn=Oh,Hr=[],$r=[],Fr=[],le=Lo,Wr=ol,ci=Math.abs;function pi(r,e,t){for(var a=r[0],n=r[1],i=r[2],o=1/0,s,l=t*t,u=.1,v=.1;v<=.9;v+=.1){Hr[0]=le(a[0],n[0],i[0],v),Hr[1]=le(a[1],n[1],i[1],v);var h=ci(Wr(Hr,e)-l);h=0?s=s+u:s=s-u:d>=0?s=s-u:s=s+u}return s}function Ur(r,e){var t=[],a=il,n=[[],[],[]],i=[[],[]],o=[];e/=2,r.eachEdge(function(s,l){var u=s.getLayout(),v=s.getVisual("fromSymbol"),h=s.getVisual("toSymbol");u.__original||(u.__original=[Yt(u[0]),Yt(u[1])],u[2]&&u.__original.push(Yt(u[2])));var f=u.__original;if(u[2]!=null){if(pt(n[0],f[0]),pt(n[1],f[2]),pt(n[2],f[1]),v&&v!=="none"){var c=Le(s.node1),d=pi(n,f[0],c*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(h&&h!=="none"){var c=Le(s.node2),d=pi(n,f[1],c*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]}pt(u[0],n[0]),pt(u[1],n[2]),pt(u[2],n[1])}else{if(pt(i[0],f[0]),pt(i[1],f[1]),fe(o,i[1],i[0]),ze(o,o),v&&v!=="none"){var c=Le(s.node1);ga(i[0],i[0],o,c*e)}if(h&&h!=="none"){var c=Le(s.node2);ga(i[1],i[1],o,-c*e)}pt(u[0],i[0]),pt(u[1],i[1])}})}function di(r){return r.type==="view"}var $h=function(r){k(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 Za,i=new dn,o=this.group;this._controller=new Ba(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 s=this._symbolDraw,l=this._lineDraw,u=this.group;if(di(o)){var v={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?u.attr(v):ot(u,v,t)}Ur(t.getGraph(),Ie(t));var h=t.getData();s.updateData(h);var f=t.getEdgeData();l.updateData(f),this._updateNodeAndLinkScale(),this._updateController(t,a,n),clearTimeout(this._layoutTimeout);var c=t.forceLayout,d=t.get(["force","layoutAnimation"]);c&&this._startForceLayoutIteration(c,d);var p=t.get("layout");h.graph.eachNode(function(y){var _=y.dataIndex,b=y.getGraphicEl(),x=y.getModel();if(!!b){b.off("drag").off("dragend");var w=x.get("draggable");w&&b.on("drag",function(D){switch(p){case"force":c.warmUp(),!i._layouting&&i._startForceLayoutIteration(c,d),c.setFixed(_),h.setItemLayout(_,[b.x,b.y]);break;case"circular":h.setItemLayout(_,[b.x,b.y]),y.setLayout({fixed:!0},!0),cn(t,"symbolSize",y,[D.offsetX,D.offsetY]),i.updateLayout(t);break;case"none":default:h.setItemLayout(_,[b.x,b.y]),fn(t.getGraph(),t),i.updateLayout(t);break}}).on("dragend",function(){c&&c.setUnfixed(_)}),b.setDraggable(w,!!x.get("cursor"));var I=x.get(["emphasis","focus"]);I==="adjacency"&&(it(b).focus=y.getAdjacentDataIndices())}}),h.graph.eachEdge(function(y){var _=y.getGraphicEl(),b=y.getModel().get(["emphasis","focus"]);!_||b==="adjacency"&&(it(_).focus={edge:[y.dataIndex],node:[y.node1.dataIndex,y.node2.dataIndex]})});var g=t.get("layout")==="circular"&&t.get(["circular","rotateLabel"]),m=h.getLayout("cx"),S=h.getLayout("cy");h.graph.eachNode(function(y){ts(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,s=this._controllerHost,l=this.group;if(o.setPointerChecker(function(u,v,h){var f=l.getBoundingRect();return f.applyTransform(l.transform),f.contain(v,h)&&!po(u,n,t)}),!di(t.coordinateSystem)){o.disable();return}o.enable(t.get("roam")),s.zoomLimit=t.get("scaleLimit"),s.zoom=t.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",function(u){go(s,u.dx,u.dy),n.dispatchAction({seriesId:t.id,type:"graphRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){yo(s,u.scale,u.originX,u.originY),n.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),i._updateNodeAndLinkScale(),Ur(t.getGraph(),Ie(t)),i._lineDraw.updateLayout(),n.updateLabelLayout()})},e.prototype._updateNodeAndLinkScale=function(){var t=this._model,a=t.getData(),n=Ie(t);a.eachItemGraphicEl(function(i,o){i&&i.setSymbolScale(n)})},e.prototype.updateLayout=function(t){Ur(t.getGraph(),Ie(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}(ht),Fh=$h;function ue(r){return"_EC_"+r}var Wh=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[ue(e)]){var n=new ae(e,t);return n.hostGraph=this,this.nodes.push(n),a[ue(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[ue(e)]},r.prototype.addEdge=function(e,t,a){var n=this._nodesMap,i=this._edgesMap;if(Ht(e)&&(e=this.nodes[e]),Ht(t)&&(t=this.nodes[t]),e instanceof ae||(e=n[ue(e)]),t instanceof ae||(t=n[ue(t)]),!(!e||!t)){var o=e.id+"-"+t.id,s=new rs(e,t,a);return s.hostGraph=this,this._directed&&(e.outEdges.push(s),t.inEdges.push(s)),e.edges.push(s),e!==t&&t.edges.push(s),this.edges.push(s),i[o]=s,s}},r.prototype.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},r.prototype.getEdge=function(e,t){e instanceof ae&&(e=e.id),t instanceof ae&&(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 ae||(t=this._nodesMap[ue(t)]),!!t){for(var i=a==="out"?"outEdges":a==="in"?"inEdges":"edges",o=0;o=0&&l.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)}}}ge(ae,as("hostGraph","data"));ge(rs,as("hostGraph","edgeData"));var Uh=Wh;function ns(r,e,t,a,n){for(var i=new Uh(a),o=0;o "+f)),u++)}var c=t.get("coordinateSystem"),d;if(c==="cartesian2d"||c==="polar")d=Oe(r,t);else{var p=Do.get(c),g=p?p.dimensions||[]:[];wt(g,"value")<0&&g.concat(["value"]);var m=Oa(r,{coordDimensions:g,encodeDefine:t.getEncode()}).dimensions;d=new _t(m,t),d.initData(r)}var S=new _t(["value"],t);return S.initData(l,s),n&&n(d,S),Oo({mainData:d,struct:i,structAttr:"graph",datas:{node:d,edge:S},datasAttr:{node:"data",edge:"edgeData"}}),i.update(),i}var Zh=function(r){k(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 Ya(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),Xa(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){Th(this);var s=ns(i,n,this,!0,l);return N(s.edges,function(u){Ah(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(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 h=qt.prototype.getModel;function f(d,p){var g=h.call(this,d,p);return g.resolveParentPath=c,g}v.wrapMethod("getItemModel",function(d){return d.resolveParentPath=c,d.getModel=f,d});function c(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),s=i.graph.getEdgeByIndex(t),l=i.getName(s.node1.dataIndex),u=i.getName(s.node2.dataIndex),v=[];return l!=null&&v.push(l),u!=null&&v.push(u),Ot("nameValue",{name:v.join(" > "),value:o.value,noValue:o.value==null})}var h=sl({series:this,dataIndex:t,multipleSeries:a});return h},e.prototype._updateCategoriesData=function(){var t=F(this.option.categories||[],function(n){return n.value!=null?n:U({value:0},n)}),a=new _t(["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}(ft),Yh=Zh,Xh={type:"graphRoam",event:"graphRoam",update:"none"};function qh(r){r.registerChartView(Fh),r.registerSeriesModel(Yh),r.registerProcessor(xh),r.registerVisual(wh),r.registerVisual(Ih),r.registerLayout(Ch),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,Ph),r.registerLayout(Nh),r.registerCoordinateSystem("graphView",{dimensions:za.dimensions,create:Vh}),r.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},Ae),r.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},Ae),r.registerAction(Xh,function(e,t,a){t.eachComponent({mainType:"series",query:e},function(n){var i=n.coordinateSystem,o=_o(i,e,void 0,a);n.setCenter&&n.setCenter(o.center),n.setZoom&&n.setZoom(o.zoom)})})}var Kh=function(){function r(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return r}(),jh=function(r){k(e,r);function e(t){var a=r.call(this,t)||this;return a.type="pointer",a}return e.prototype.getDefaultShape=function(){return new Kh},e.prototype.buildPath=function(t,a){var n=Math.cos,i=Math.sin,o=a.r,s=a.width,l=a.angle,u=a.x-n(l)*s*(s>=o/3?1:2),v=a.y-i(l)*s*(s>=o/3?1:2);l=a.angle-Math.PI/2,t.moveTo(u,v),t.lineTo(a.x+n(l)*s,a.y+i(l)*s),t.lineTo(a.x+n(a.angle)*o,a.y+i(a.angle)*o),t.lineTo(a.x-n(l)*s,a.y-i(l)*s),t.lineTo(u,v)},e}(yt),Qh=jh;function Jh(r,e){var t=r.get("center"),a=e.getWidth(),n=e.getHeight(),i=Math.min(a,n),o=z(t[0],e.getWidth()),s=z(t[1],e.getHeight()),l=z(r.get("radius"),i/2);return{cx:o,cy:s,r:l}}function Xe(r,e){var t=r==null?"":r+"";return e&&(mt(e)?t=e.replace("{value}",t):nt(e)&&(t=e(r))),t}var tf=function(r){k(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=Jh(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 s=this.group,l=t.get("clockwise"),u=-t.get("startAngle")/180*Math.PI,v=-t.get("endAngle")/180*Math.PI,h=t.getModel("axisLine"),f=h.get("roundCap"),c=f?Gn:Pe,d=h.get("show"),p=h.getModel("lineStyle"),g=p.get("width"),m=[u,v];ll(m,!l),u=m[0],v=m[1];for(var S=v-u,y=u,_=[],b=0;d&&b=D&&(L===0?0:i[L-1][0])Math.PI/2&&(W+=Math.PI)):X==="tangential"?W=-I-Math.PI/2:Ht(X)&&(W=X*Math.PI/180),W===0?h.add(new Wt({style:kt(y,{text:G,x:B,y:K,verticalAlign:C<-.8?"top":C>.8?"bottom":"middle",align:A<-.4?"left":A>.4?"right":"center"},{inheritColor:O}),silent:!0})):h.add(new Wt({style:kt(y,{text:G,x:B,y:K,verticalAlign:"middle",align:"center"},{inheritColor:O}),silent:!0,originX:B,originY:K,rotation:W}))}if(S.get("show")&&E!==_){var R=S.get("distance");R=R?R+v:v;for(var j=0;j<=b;j++){A=Math.cos(I),C=Math.sin(I);var ut=new ar({shape:{x1:A*(d-R)+f,y1:C*(d-R)+c,x2:A*(d-w-R)+f,y2:C*(d-w-R)+c},silent:!0,style:M});M.stroke==="auto"&&ut.setStyle({stroke:i((E+j/b)/_)}),h.add(ut),I+=L}I-=L}else I+=D}},e.prototype._renderPointer=function(t,a,n,i,o,s,l,u,v){var h=this.group,f=this._data,c=this._progressEls,d=[],p=t.get(["pointer","show"]),g=t.getModel("progress"),m=g.get("show"),S=t.getData(),y=S.mapDimension("value"),_=+t.get("min"),b=+t.get("max"),x=[_,b],w=[s,l];function I(L,T){var M=S.getItemModel(L),P=M.getModel("pointer"),A=z(P.get("width"),o.r),C=z(P.get("length"),o.r),E=t.get(["pointer","icon"]),R=P.get("offsetCenter"),V=z(R[0],o.r),G=z(R[1],o.r),O=P.get("keepAspect"),B;return E?B=Me(E,V-A/2,G-C,A,C,null,O):B=new Qh({shape:{angle:-Math.PI/2,width:A,r:C,x:V,y:G}}),B.rotation=-(T+Math.PI/2),B.x=o.cx,B.y=o.cy,B}function D(L,T){var M=g.get("roundCap"),P=M?Gn:Pe,A=g.get("overlap"),C=A?g.get("width"):v/S.count(),E=A?o.r-C:o.r-(L+1)*C,R=A?o.r:o.r-L*C,V=new P({shape:{startAngle:s,endAngle:T,cx:o.cx,cy:o.cy,clockwise:u,r0:E,r:R}});return A&&(V.z2=b-S.get(y,L)%b),V}(m||p)&&(S.diff(f).add(function(L){var T=S.get(y,L);if(p){var M=I(L,s);xt(M,{rotation:-((isNaN(+T)?w[0]:Et(T,x,w,!0))+Math.PI/2)},t),h.add(M),S.setItemGraphicEl(L,M)}if(m){var P=D(L,s),A=g.get("clip");xt(P,{shape:{endAngle:Et(T,x,w,A)}},t),h.add(P),kn(t.seriesIndex,S.dataType,L,P),d[L]=P}}).update(function(L,T){var M=S.get(y,L);if(p){var P=f.getItemGraphicEl(T),A=P?P.rotation:s,C=I(L,A);C.rotation=A,ot(C,{rotation:-((isNaN(+M)?w[0]:Et(M,x,w,!0))+Math.PI/2)},t),h.add(C),S.setItemGraphicEl(L,C)}if(m){var E=c[T],R=E?E.shape.endAngle:s,V=D(L,R),G=g.get("clip");ot(V,{shape:{endAngle:Et(M,x,w,G)}},t),h.add(V),kn(t.seriesIndex,S.dataType,L,V),d[L]=V}}).execute(),S.each(function(L){var T=S.getItemModel(L),M=T.getModel("emphasis"),P=M.get("focus"),A=M.get("blurScope"),C=M.get("disabled");if(p){var E=S.getItemGraphicEl(L),R=S.getItemVisual(L,"style"),V=R.fill;if(E instanceof qa){var G=E.style;E.useStyle(U({image:G.image,x:G.x,y:G.y,width:G.width,height:G.height},R))}else E.useStyle(R),E.type!=="pointer"&&E.setColor(V);E.setStyle(T.getModel(["pointer","itemStyle"]).getItemStyle()),E.style.fill==="auto"&&E.setStyle("fill",i(Et(S.get(y,L),x,[0,1],!0))),E.z2EmphasisLift=0,Mt(E,T),lt(E,P,A,C)}if(m){var O=d[L];O.useStyle(S.getItemVisual(L,"style")),O.setStyle(T.getModel(["progress","itemStyle"]).getItemStyle()),O.z2EmphasisLift=0,Mt(O,T),lt(O,P,A,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"),s=n.get("icon"),l=n.get("offsetCenter"),u=n.get("keepAspect"),v=Me(s,a.cx-o/2+z(l[0],a.r),a.cy-o/2+z(l[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 s=this,l=t.getData(),u=l.mapDimension("value"),v=+t.get("min"),h=+t.get("max"),f=new rt,c=[],d=[],p=t.isAnimationEnabled(),g=t.get(["pointer","showAbove"]);l.diff(this._data).add(function(m){c[m]=new Wt({silent:!0}),d[m]=new Wt({silent:!0})}).update(function(m,S){c[m]=s._titleEls[S],d[m]=s._detailEls[S]}).execute(),l.each(function(m){var S=l.getItemModel(m),y=l.get(u,m),_=new rt,b=i(Et(y,[v,h],[0,1],!0)),x=S.getModel("title");if(x.get("show")){var w=x.get("offsetCenter"),I=o.cx+z(w[0],o.r),D=o.cy+z(w[1],o.r),L=c[m];L.attr({z2:g?0:2,style:kt(x,{x:I,y:D,text:l.getName(m),align:"center",verticalAlign:"middle"},{inheritColor:b})}),_.add(L)}var T=S.getModel("detail");if(T.get("show")){var M=T.get("offsetCenter"),P=o.cx+z(M[0],o.r),A=o.cy+z(M[1],o.r),C=z(T.get("width"),o.r),E=z(T.get("height"),o.r),R=t.get(["progress","show"])?l.getItemVisual(m,"style").fill:b,L=d[m],V=T.get("formatter");L.attr({z2:g?0:2,style:kt(T,{x:P,y:A,text:Xe(y,V),width:isNaN(C)?null:C,height:isNaN(E)?null:E,align:"center",verticalAlign:"middle"},{inheritColor:R})}),ul(L,{normal:T},y,function(O){return Xe(O,V)}),p&&co(L,m,l,t,{getFormattedLabel:function(O,B,K,X,W,j){return Xe(j?j.interpolatedValue:y,V)}}),_.add(L)}f.add(_)}),this.group.add(f),this._titleEls=c,this._detailEls=d},e.type="gauge",e}(ht),ef=tf,rf=function(r){k(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 Ka(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}(ft),af=rf;function nf(r){r.registerChartView(ef),r.registerSeriesModel(af)}var of=["itemStyle","opacity"],sf=function(r){k(e,r);function e(t,a){var n=r.call(this)||this,i=n,o=new ja,s=new Wt;return i.setTextContent(s),n.setTextGuideLine(o),n.updateData(t,a,!0),n}return e.prototype.updateData=function(t,a,n){var i=this,o=t.hostModel,s=t.getItemModel(a),l=t.getItemLayout(a),u=s.getModel("emphasis"),v=s.get(of);v=v==null?1:v,n||ye(i),i.useStyle(t.getItemVisual(a,"style")),i.style.lineJoin="round",n?(i.setShape({points:l.points}),i.style.opacity=0,xt(i,{style:{opacity:v}},o,a)):ot(i,{style:{opacity:v},shape:{points:l.points}},o,a),Mt(i,s),this._updateLabel(t,a),lt(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(),s=t.hostModel,l=t.getItemModel(a),u=t.getItemLayout(a),v=u.label,h=t.getItemVisual(a,"style"),f=h.fill;Kt(o,Rt(l),{labelFetcher:t.hostModel,labelDataIndex:a,defaultOpacity:h.opacity,defaultText:t.getName(a)},{normal:{align:v.textAlign,verticalAlign:v.verticalAlign}}),n.setTextConfig({local:!0,inside:!!v.inside,insideStroke:f,outsideFill:f});var c=v.linePoints;i.setShape({points:c}),n.textGuideLineConfig={anchor:c?new Ut(c[0][0],c[0][1]):null},ot(o,{style:{x:v.x,y:v.y}},s,a),o.attr({rotation:v.rotation,originX:v.x,originY:v.y,z2:10}),ho(n,fo(l),{stroke:f})},e}(Ce),lf=function(r){k(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,s=this.group;i.diff(o).add(function(l){var u=new sf(i,l);i.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var v=o.getItemGraphicEl(u);v.updateData(i,l),s.add(v),i.setItemGraphicEl(l,v)}).remove(function(l){var u=o.getItemGraphicEl(l);vl(u,t,l)}).execute(),this._data=i},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(ht),uf=lf,vf=function(r){k(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 Ya(st(this.getData,this),st(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.getInitialData=function(t,a){return Ka(this,{coordDimensions:["value"],encodeDefaulter:et(hl,this)})},e.prototype._defaultLabelLine=function(t){Xa(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}(ft),hf=vf;function ff(r,e){return de(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function cf(r,e){for(var t=r.mapDimension("value"),a=r.mapArray(t,function(l){return l}),n=[],i=e==="ascending",o=0,s=r.count();o=0&&(s[o[l].depth]=new qt(o[l],this,a));if(i&&n){var u=ns(i,n,this,!0,v);return u.data}function v(h,f){h.wrapMethod("getItemModel",function(c,d){var p=c.parentModel,g=p.getData().getItemLayout(d);if(g){var m=g.depth,S=p.levelModels[m];S&&(c.parentModel=S)}return c}),f.wrapMethod("getItemModel",function(c,d){var p=c.parentModel,g=p.getGraph().getEdgeByIndex(d),m=g.node1.getLayout();if(m){var S=m.depth,y=p.levelModels[S];y&&(c.parentModel=y)}return c})}},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(c){return isNaN(c)||c==null}if(n==="edge"){var o=this.getDataParams(t,n),s=o.data,l=o.value,u=s.source+" -- "+s.target;return Ot("nameValue",{name:u,value:l,noValue:i(l)})}else{var v=this.getGraph().getNodeByIndex(t),h=v.getLayout().value,f=this.getDataParams(t,n).data.name;return Ot("nameValue",{name:f!=null?f+"":null,value:h,noValue:i(h)})}},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},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},e}(ft),kf=Vf;function Gf(r,e){r.eachSeriesByType("sankey",function(t){var a=t.get("nodeWidth"),n=t.get("nodeGap"),i=Bf(t,e);t.layoutInfo=i;var o=i.width,s=i.height,l=t.getGraph(),u=l.nodes,v=l.edges;Of(u);var h=Tt(u,function(p){return p.getLayout().value===0}),f=h.length!==0?0:t.get("layoutIterations"),c=t.get("orient"),d=t.get("nodeAlign");zf(u,v,a,n,o,s,f,c,d)})}function Bf(r,e){return de(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function zf(r,e,t,a,n,i,o,s,l){Hf(r,e,t,n,i,s,l),Uf(r,e,i,n,a,o,s),tc(r,s)}function Of(r){N(r,function(e){var t=Xt(e.outEdges,lr),a=Xt(e.inEdges,lr),n=e.getValue()||0,i=Math.max(t,a,n);e.setLayout({value:i},!0)})}function Hf(r,e,t,a,n,i,o){for(var s=[],l=[],u=[],v=[],h=0,f=0;f=0;m&&g.depth>c&&(c=g.depth),p.setLayout({depth:m?g.depth:h},!0),i==="vertical"?p.setLayout({dy:t},!0):p.setLayout({dx:t},!0);for(var S=0;Sh-1?c:h-1;o&&o!=="left"&&$f(r,o,i,w);var I=i==="vertical"?(n-t)/w:(a-t)/w;Wf(r,I,i)}function os(r){var e=r.hostGraph.data.getRawDataItem(r.dataIndex);return e.depth!=null&&e.depth>=0}function $f(r,e,t,a){if(e==="right"){for(var n=[],i=r,o=0;i.length;){for(var s=0;s0;i--)l*=.99,Xf(s,l,o),Yr(s,n,t,a,o),Jf(s,l,o),Yr(s,n,t,a,o)}function Zf(r,e){var t=[],a=e==="vertical"?"y":"x",n=ma(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 Yf(r,e,t,a,n,i){var o=1/0;N(r,function(s){var l=s.length,u=0;N(s,function(h){u+=h.getLayout().value});var v=i==="vertical"?(a-(l-1)*n)/u:(t-(l-1)*n)/u;v0&&(s=l.getLayout()[i]+u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),v=l.getLayout()[i]+l.getLayout()[f]+e;var d=n==="vertical"?a:t;if(u=v-e-d,u>0){s=l.getLayout()[i]-u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),v=s;for(var c=h-2;c>=0;--c)l=o[c],u=l.getLayout()[i]+l.getLayout()[f]+e-v,u>0&&(s=l.getLayout()[i]-u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),v=l.getLayout()[i]}})}function Xf(r,e,t){N(r.slice().reverse(),function(a){N(a,function(n){if(n.outEdges.length){var i=Xt(n.outEdges,qf,t)/Xt(n.outEdges,lr);if(isNaN(i)){var o=n.outEdges.length;i=o?Xt(n.outEdges,Kf,t)/o:0}if(t==="vertical"){var s=n.getLayout().x+(i-Qt(n,t))*e;n.setLayout({x:s},!0)}else{var l=n.getLayout().y+(i-Qt(n,t))*e;n.setLayout({y:l},!0)}}})})}function qf(r,e){return Qt(r.node2,e)*r.getValue()}function Kf(r,e){return Qt(r.node2,e)}function jf(r,e){return Qt(r.node1,e)*r.getValue()}function Qf(r,e){return Qt(r.node1,e)}function Qt(r,e){return e==="vertical"?r.getLayout().x+r.getLayout().dx/2:r.getLayout().y+r.getLayout().dy/2}function lr(r){return r.getValue()}function Xt(r,e,t){for(var a=0,n=r.length,i=-1;++io&&(o=l)}),N(a,function(s){var l=new wo({type:"color",mappingMethod:"linear",dataExtent:[i,o],visual:e.get("color")}),u=l.mapValueToVisual(s.getLayout().value),v=s.getModel().get(["itemStyle","color"]);v!=null?(s.setVisual("color",v),s.setVisual("style",{fill:v})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}n.length&&N(n,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function rc(r){r.registerChartView(Rf),r.registerSeriesModel(kf),r.registerLayout(Gf),r.registerVisual(ec),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 ss=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"),s=i.get("type"),l;o==="category"?(e.layout="horizontal",a=n.getOrdinalMeta(),l=!0):s==="category"?(e.layout="vertical",a=i.getOrdinalMeta(),l=!0):e.layout=e.layout||"horizontal";var u=["x","y"],v=e.layout==="horizontal"?0:1,h=this._baseAxisDim=u[v],f=u[1-v],c=[n,i],d=c[v].get("type"),p=c[1-v].get("type"),g=e.data;if(g&&l){var m=[];N(g,function(_,b){var x;$(_)?(x=_.slice(),_.unshift(b)):$(_.value)?(x=U({},_),x.value=x.value.slice(),_.value.unshift(b)):x=_,m.push(x)}),e.data=m}var S=this.defaultValueDimensions,y=[{name:h,type:Sa(d),ordinalMeta:a,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:f,type:Sa(p),dimsDef:S.slice()}];return Ka(this,{coordDimensions:y,dimensionsCount:S.length+1,encodeDefaulter:et(dl,y,this)})},r.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},r}(),ls=function(r){k(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}(ft);ge(ls,ss,!0);var ac=ls,nc=function(r){k(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,s=this._data;this._data||o.removeAll();var l=t.get("layout")==="horizontal"?1:0;i.diff(s).add(function(u){if(i.hasValue(u)){var v=i.getItemLayout(u),h=Si(v,i,u,l,!0);i.setItemGraphicEl(u,h),o.add(h)}}).update(function(u,v){var h=s.getItemGraphicEl(v);if(!i.hasValue(u)){o.remove(h);return}var f=i.getItemLayout(u);h?(ye(h),us(f,h,i,u)):h=Si(f,i,u,l),o.add(h),i.setItemGraphicEl(u,h)}).remove(function(u){var v=s.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}(ht),ic=function(){function r(){}return r}(),oc=function(r){k(e,r);function e(t){var a=r.call(this,t)||this;return a.type="boxplotBoxPath",a}return e.prototype.getDefaultShape=function(){return new ic},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 _=[m,y];a.push(_)}}}return{boxData:t,outliers:a}}var pc={type:"echarts:boxplot",transform:function(e){var t=e.upstream;if(t.sourceFormat!==Ao){var a="";tt(a)}var n=cc(t.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:n.boxData},{data:n.outliers}]}};function dc(r){r.registerSeriesModel(ac),r.registerChartView(lc),r.registerLayout(uc),r.registerTransform(pc)}var gc=["color","borderColor"],yc=function(r){k(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){_r(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"),s=t.get("clip",!0),l=t.coordinateSystem,u=l.getArea&&l.getArea();this._data||i.removeAll(),a.diff(n).add(function(v){if(a.hasValue(v)){var h=a.getItemLayout(v);if(s&&_i(u,h))return;var f=Xr(h,v,!0);xt(f,{shape:{points:h.ends}},t,v),qr(f,a,v,o),i.add(f),a.setItemGraphicEl(v,f)}}).update(function(v,h){var f=n.getItemGraphicEl(h);if(!a.hasValue(v)){i.remove(f);return}var c=a.getItemLayout(v);if(s&&_i(u,c)){i.remove(f);return}f?(ot(f,{shape:{points:c.ends}},t,v),ye(f)):f=Xr(c),qr(f,a,v,o),i.add(f),a.setItemGraphicEl(v,f)}).remove(function(v){var h=n.getItemGraphicEl(v);h&&i.remove(h)}).execute(),this._data=a},e.prototype._renderLarge=function(t){this._clear(),bi(t,this.group);var a=t.get("clip",!0)?Ja(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 s=n.getItemLayout(o),l=Xr(s);qr(l,n,o,i),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},e.prototype._incrementalRenderLarge=function(t,a){bi(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}(ht),mc=function(){function r(){}return r}(),Sc=function(r){k(e,r);function e(t){var a=r.call(this,t)||this;return a.type="normalCandlestickBox",a}return e.prototype.getDefaultShape=function(){return new mc},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}(yt);function Xr(r,e,t){var a=r.ends;return new Sc({shape:{points:t?_c(a,r):a},z2:100})}function _i(r,e){for(var t=!0,a=0;a0?"borderColor":"borderColor0"])||t.get(["itemStyle",r>0?"color":"color0"]);r===0&&(n=t.get(["itemStyle","borderColorDoji"]));var i=t.getModel("itemStyle").getItemStyle(gc);e.useStyle(i),e.style.fill=null,e.style.stroke=n}var xc=yc,vs=function(r){k(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",borderColorDoji:null,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},e}(ft);ge(vs,ss,!0);var wc=vs;function Ic(r){!r||!$(r.series)||N(r.series,function(e){tn(e)&&e.type==="k"&&(e.type="candlestick")})}var Lc=["itemStyle","borderColor"],Dc=["itemStyle","borderColor0"],Tc=["itemStyle","borderColorDoji"],Ac=["itemStyle","color"],Cc=["itemStyle","color0"],Mc={seriesType:"candlestick",plan:en(),performRawSeries:!0,reset:function(r,e){function t(i,o){return o.get(i>0?Ac:Cc)}function a(i,o){return o.get(i===0?Tc:i>0?Lc:Dc)}if(!e.isSeriesFiltered(r)){var n=r.pipelineContext.large;return!n&&{progress:function(i,o){for(var s;(s=i.next())!=null;){var l=o.getItemModel(s),u=o.getItemLayout(s).sign,v=l.getItemStyle();v.fill=t(u,l),v.stroke=a(u,l)||v.fill;var h=o.ensureUniqueItemVisual(s,"style");U(h,v)}}}}}},Pc=Mc,Ec={seriesType:"candlestick",plan:en(),reset:function(r){var e=r.coordinateSystem,t=r.getData(),a=Nc(r,t),n=0,i=1,o=["x","y"],s=t.getDimensionIndex(t.mapDimension(o[n])),l=F(t.mapDimensionsAll(o[i]),t.getDimensionIndex,t),u=l[0],v=l[1],h=l[2],f=l[3];if(t.setLayout({candleWidth:a,isSimpleBox:a<=1.3}),s<0||l.length<4)return;return{progress:r.pipelineContext.large?d:c};function c(p,g){for(var m,S=g.getStore();(m=p.next())!=null;){var y=S.get(s,m),_=S.get(u,m),b=S.get(v,m),x=S.get(h,m),w=S.get(f,m),I=Math.min(_,b),D=Math.max(_,b),L=R(I,y),T=R(D,y),M=R(x,y),P=R(w,y),A=[];V(A,T,0),V(A,L,1),A.push(O(P),O(T),O(M),O(L));var C=g.getItemModel(m),E=!!C.get(["itemStyle","borderColorDoji"]);g.setItemLayout(m,{sign:xi(S,m,_,b,v,E),initBaseline:_>b?T[i]:L[i],ends:A,brushRect:G(x,w,y)})}function R(B,K){var X=[];return X[n]=K,X[i]=B,isNaN(K)||isNaN(B)?[NaN,NaN]:e.dataToPoint(X)}function V(B,K,X){var W=K.slice(),j=K.slice();W[n]=Tr(W[n]+a/2,1,!1),j[n]=Tr(j[n]-a/2,1,!0),X?B.push(W,j):B.push(j,W)}function G(B,K,X){var W=R(B,X),j=R(K,X);return W[n]-=a/2,j[n]-=a/2,{x:W[0],y:W[1],width:a,height:j[1]-W[1]}}function O(B){return B[n]=Tr(B[n],1),B}}function d(p,g){for(var m=yl(p.count*4),S=0,y,_=[],b=[],x,w=g.getStore(),I=!!r.get(["itemStyle","borderColorDoji"]);(x=p.next())!=null;){var D=w.get(s,x),L=w.get(u,x),T=w.get(v,x),M=w.get(h,x),P=w.get(f,x);if(isNaN(D)||isNaN(M)||isNaN(P)){m[S++]=NaN,S+=3;continue}m[S++]=xi(w,x,L,T,v,I),_[n]=D,_[i]=M,y=e.dataToPoint(_,null,b),m[S++]=y?y[0]:NaN,m[S++]=y?y[1]:NaN,_[i]=P,y=e.dataToPoint(_,null,b),m[S++]=y?y[1]:NaN}g.setLayout("largePoints",m)}}};function xi(r,e,t,a,n,i){var o;return t>a?o=-1:t0?r.get(n,e-1)<=a?1:-1:1,o}function Nc(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=z(Ft(r.get("barMaxWidth"),n),n),o=z(Ft(r.get("barMinWidth"),1),n),s=r.get("barWidth");return s!=null?z(s,n):Math.max(Math.min(n/2,i),o)}var Rc=Ec;function Vc(r){r.registerChartView(xc),r.registerSeriesModel(wc),r.registerPreprocessor(Ic),r.registerVisual(Pc),r.registerLayout(Rc)}function wi(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 kc=function(r){k(e,r);function e(t,a){var n=r.call(this)||this,i=new mo(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),s=0;s0&&(s=this._getLineLength(i)/v*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){i.stopAnimation();var f=void 0;nt(h)?f=h(n):f=h,i.__t>0&&(f=-s*i.__t),this._animateSymbol(i,s,f,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},e.prototype._animateSymbol=function(t,a,n,i,o){if(a>0){t.__t=0;var s=this,l=t.animate("",i).when(o?a*2:a,{__t:o?2:1}).delay(n).during(function(){s._updateSymbolPosition(t)});i||l.done(function(){s.remove(t)}),l.start()}},e.prototype._getLineLength=function(t){return xe(t.__p1,t.__cp1)+xe(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,s=[t.x,t.y],l=s.slice(),u=Lo,v=Sl;s[0]=u(a[0],i[0],n[0],o),s[1]=u(a[1],i[1],n[1],o);var h=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,h)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(t.__lastT!==void 0&&t.__lastT=0&&!(i[l]<=a);l--);l=Math.min(l,o-2)}else{for(l=s;la);l++);l=Math.min(l-1,o-2)}var v=(a-i[l])/(i[l+1]-i[l]),h=n[l],f=n[l+1];t.x=h[0]*(1-v)+v*f[0],t.y=h[1]*(1-v)+v*f[1];var c=t.__t<1?f[0]-h[0]:h[0]-f[0],d=t.__t<1?f[1]-h[1]:h[1]-f[1];t.rotation=-Math.atan2(d,c)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=a,t.ignore=!1}},e}(hs),Zc=Uc,Yc=function(){function r(){this.polyline=!1,this.curveness=0,this.segs=[]}return r}(),Xc=function(r){k(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 Yc},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 l=1;l0){var c=(u+h)/2-(v-f)*i,d=(v+f)/2-(h-u)*i;t.quadraticCurveTo(c,d,h,f)}else t.lineTo(h,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,s=this.style.lineWidth;if(n.polyline)for(var l=0,u=0;u0)for(var h=i[u++],f=i[u++],c=1;c0){var g=(h+d)/2-(f-p)*o,m=(f+p)/2-(d-h)*o;if(_l(h,f,g,m,d,p,s,t,a))return l}else if(Bn(h,f,d,p,s,t,a))return l;l++}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,s=-1/0,l=-1/0,u=0;u0&&(o.dataIndex=l+e.__startIndex)})},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}(),Kc=qc,jc={seriesType:"lines",plan:en(),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 s=void 0,l=n.end-n.start;if(t){for(var u=0,v=n.start;v0&&(v||u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(i);var h=t.get("clip",!0)&&Ja(t.coordinateSystem,!1,t);h?this.group.setClipPath(h):this.group.removeClipPath(),this._lastZlevel=s,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 s=cs.reset(t,a,n);s.progress&&s.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"),s=a.pipelineContext,l=s.large;return(!n||i!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(n&&n.remove(),n=this._lineDraw=l?new Kc:new dn(o?i?Zc:fs:i?hs:pn),this._hasEffet=i,this._isPolyline=o,this._isLargeDraw=l),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}(ht),Jc=Qc,tp=typeof Uint32Array=="undefined"?Array:Uint32Array,ep=typeof Float64Array=="undefined"?Array:Float64Array;function Ii(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),Mo([n,t[0],t[1]])}))}var rp=function(r){k(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||[],Ii(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(Ii(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=ca(this._flatCoords,a.flatCoords),this._flatCoordsOffset=ca(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}(ft),ap=rp;function qe(r){return r instanceof Array||(r=[r,r]),r}var np={seriesType:"lines",reset:function(r){var e=qe(r.get("symbol")),t=qe(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 s=i.getItemModel(o),l=qe(s.getShallow("symbol",!0)),u=qe(s.getShallow("symbolSize",!0));l[0]&&i.setItemVisual(o,"fromSymbol",l[0]),l[1]&&i.setItemVisual(o,"toSymbol",l[1]),u[0]&&i.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&i.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:a.hasItemOption?n:null}}},ip=np;function op(r){r.registerChartView(Jc),r.registerSeriesModel(ap),r.registerLayout(cs),r.registerVisual(ip)}var sp=256,lp=function(){function r(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=ba.createCanvas();this.canvas=e}return r.prototype.update=function(e,t,a,n,i,o){var s=this._getBrush(),l=this._getGradient(i,"inRange"),u=this._getGradient(i,"outOfRange"),v=this.pointSize+this.blurSize,h=this.canvas,f=h.getContext("2d"),c=e.length;h.width=t,h.height=a;for(var d=0;d0){var M=o(y)?l:u;y>0&&(y=y*L+I),b[x++]=M[T],b[x++]=M[T+1],b[x++]=M[T+2],b[x++]=M[T+3]*y*256}else x+=4}return f.putImageData(_,0,0),h},r.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=ba.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,s=0;s<256;s++)e[t](s/255,!0,i),n[o++]=i[0],n[o++]=i[1],n[o++]=i[2],n[o++]=i[3];return n},r}(),up=lp;function vp(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 s;for(s=i;s=0;s--){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){i=s;break}}return s>=0&&s=e[0]&&a<=e[1]}}function Li(r){var e=r.dimensions;return e[0]==="lng"&&e[1]==="lat"}var fp=function(r){k(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(s){s.eachTargetSeries(function(l){l===t&&(i=s)})}),this._progressiveEls=null,this.group.removeAll();var o=t.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"?this._renderOnCartesianAndCalendar(t,n,0,t.getData().count()):Li(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&&(Li(o)?this.render(a,n,i):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(a,i,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){_r(this._progressiveEls||this.group,t)},e.prototype._renderOnCartesianAndCalendar=function(t,a,n,i,o){var s=t.coordinateSystem,l=br(s,"cartesian2d"),u,v,h,f;if(l){var c=s.getAxis("x"),d=s.getAxis("y");u=c.getBandWidth()+.5,v=d.getBandWidth()+.5,h=c.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(),_=t.get(["itemStyle","borderRadius"]),b=Rt(t),x=t.getModel("emphasis"),w=x.get("focus"),I=x.get("blurScope"),D=x.get("disabled"),L=l?[g.mapDimension("x"),g.mapDimension("y"),g.mapDimension("value")]:[g.mapDimension("time"),g.mapDimension("value")],T=n;Th[1]||Cf[1])continue;var E=s.dataToPoint([A,C]);M=new jt({shape:{x:E[0]-u/2,y:E[1]-v/2,width:u,height:v},style:P})}else{if(isNaN(g.get(L[1],T)))continue;M=new jt({z2:1,shape:s.dataToRect([g.get(L[0],T)]).contentShape,style:P})}if(g.hasItemOption){var R=g.getItemModel(T),V=R.getModel("emphasis");m=V.getModel("itemStyle").getItemStyle(),S=R.getModel(["blur","itemStyle"]).getItemStyle(),y=R.getModel(["select","itemStyle"]).getItemStyle(),_=R.get(["itemStyle","borderRadius"]),w=V.get("focus"),I=V.get("blurScope"),D=V.get("disabled"),b=Rt(R)}M.shape.r=_;var G=t.getRawValue(T),O="-";G&&G[2]!=null&&(O=G[2]+""),Kt(M,b,{labelFetcher:t,labelDataIndex:T,defaultOpacity:P.opacity,defaultText:O}),M.ensureState("emphasis").style=m,M.ensureState("blur").style=S,M.ensureState("select").style=y,lt(M,w,I,D),M.incremental=o,o&&(M.states.emphasis.hoverLayer=!0),p.add(M),g.setItemGraphicEl(T,M),this._progressiveEls&&this._progressiveEls.push(M)}},e.prototype._renderOnGeo=function(t,a,n,i){var o=n.targetVisuals.inRange,s=n.targetVisuals.outOfRange,l=a.getData(),u=this._hmLayer||this._hmLayer||new up;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(),h=t.getRoamTransform();v.applyTransform(h);var f=Math.max(v.x,0),c=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-c,S=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],y=l.mapArray(S,function(w,I,D){var L=t.dataToPoint([w,I]);return L[0]-=f,L[1]-=c,L.push(D),L}),_=n.getExtent(),b=n.type==="visualMap.continuous"?hp(_,n.option.range):vp(_,n.getPieceList(),n.option.selected);u.update(y,g,m,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},b);var x=new qa({style:{width:g,height:m,x:f,y:c,image:u.canvas},silent:!0});this.group.add(x)},e.type="heatmap",e}(ht),cp=fp,pp=function(r){k(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 Oe(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var t=Do.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}(ft),dp=pp;function gp(r){r.registerChartView(cp),r.registerSeriesModel(dp)}var yp=function(r){k(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,s=this.group,l=t.getLayerSeries(),u=i.getLayout("layoutInfo"),v=u.rect,h=u.boundaryGap;s.x=0,s.y=v.y+h[0];function f(g){return g.name}var c=new pe(this._layersSeries||[],l,f,f),d=[];c.add(st(p,this,"add")).update(st(p,this,"update")).remove(st(p,this,"remove")).execute();function p(g,m,S){var y=o._layers;if(g==="remove"){s.remove(y[m]);return}for(var _=[],b=[],x,w=l[m].indices,I=0;Ii&&(i=s),a.push(s)}for(var u=0;ui&&(i=h)}return{y0:n,max:i}}function Ip(r){r.registerChartView(Sp),r.registerSeriesModel(bp),r.registerLayout(xp),r.registerProcessor(Qa("themeRiver"))}var Lp=2,Dp=4,Tp=function(r){k(e,r);function e(t,a,n,i){var o=r.call(this)||this;o.z2=Lp,o.textConfig={inside:!0},it(o).seriesIndex=a.seriesIndex;var s=new Wt({z2:Dp,silent:t.getModel().get(["label","silent"])});return o.setTextContent(s),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 s=this;it(s).dataIndex=a.dataIndex;var l=a.getModel(),u=l.getModel("emphasis"),v=a.getLayout(),h=U({},v);h.label=null;var f=a.getVisual("style");f.lineJoin="bevel";var c=a.getVisual("decal");c&&(f.decal=Eo(c,o));var d=zn(l.getModel("itemStyle"),h,!0);U(h,d),N(ya,function(S){var y=s.ensureState(S),_=l.getModel([S,"itemStyle"]);y.style=_.getItemStyle();var b=zn(_,h);b&&(y.shape=b)}),t?(s.setShape(h),s.shape.r=v.r0,xt(s,{shape:{r:v.r}},n,a.dataIndex)):(ot(s,{shape:h},n),ye(s)),s.useStyle(f),this._updateLabel(n);var p=l.getShallow("cursor");p&&s.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;lt(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(),s=o.endAngle-o.startAngle,l=(o.startAngle+o.endAngle)/2,u=Math.cos(l),v=Math.sin(l),h=this,f=h.getTextContent(),c=this.node.dataIndex,d=i.get("minAngle")/180*Math.PI,p=i.get("show")&&!(d!=null&&Math.abs(s)Math.PI/2?"right":"left"):!M||M==="center"?(s===2*Math.PI&&o.r0===0?L=0:L=(o.r+o.r0)/2,M="center"):M==="left"?(L=o.r0+T,l>Math.PI/2&&(M="right")):M==="right"&&(L=o.r-T,l>Math.PI/2&&(M="left")),_.style.align=M,_.style.verticalAlign=g(S,"verticalAlign")||"middle",_.x=L*u+o.cx,_.y=L*v+o.cy;var P=g(S,"rotate"),A=0;P==="radial"?(A=fa(-l),A>Math.PI/2&&AMath.PI/2?A-=Math.PI:A<-Math.PI/2&&(A+=Math.PI)):Ht(P)&&(A=P*Math.PI/180),_.rotation=fa(A)});function g(m,S){var y=m.get(S);return y==null?i.get(S):y}f.dirtyStyle()},e}(Pe),Ti=Tp,Aa="sunburstRootToNode",Ai="sunburstHighlight",Ap="sunburstUnhighlight";function Cp(r){r.registerAction({type:Aa,update:"updateView"},function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},a);function a(n,i){var o=Ne(e,[Aa],n);if(o){var s=n.getViewRoot();s&&(e.direction=un(s,o.node)?"rollUp":"drillDown"),n.resetViewRoot(o.node)}}}),r.registerAction({type:Ai,update:"none"},function(e,t,a){e=U({},e),t.eachComponent({mainType:"series",subType:"sunburst",query:e},n);function n(i){var o=Ne(e,[Ai],i);o&&(e.dataIndex=o.node.dataIndex)}a.dispatchAction(U(e,{type:"highlight"}))}),r.registerAction({type:Ap,update:"updateView"},function(e,t,a){e=U({},e),a.dispatchAction(U(e,{type:"downplay"}))})}var Mp=function(r){k(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 s=t.getData(),l=s.tree.root,u=t.getViewRoot(),v=this.group,h=t.get("renderLabelForZeroData"),f=[];u.eachNode(function(S){f.push(S)});var c=this._oldChildren||[];d(f,c),m(l,u),this._initEvents(),this._oldChildren=f;function d(S,y){if(S.length===0&&y.length===0)return;new pe(y,S,_,_).add(b).update(b).remove(et(b,null)).execute();function _(x){return x.getId()}function b(x,w){var I=x==null?null:S[x],D=w==null?null:y[w];p(I,D)}}function p(S,y){if(!h&&S&&!S.getValue()&&(S=null),S!==l&&y!==l){if(y&&y.piece)S?(y.piece.updateData(!1,S,t,a,n),s.setItemGraphicEl(S.dataIndex,y.piece)):g(y);else if(S){var _=new Ti(S,t,a,n);v.add(_),s.setItemGraphicEl(S.dataIndex,_)}}}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 Ti(S,t,a,n),v.add(o.virtualPiece)),y.piece.off("click"),o.virtualPiece.on("click",function(_){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 s=o.getModel().get("nodeClick");if(s==="rootToNode")t._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var v=l.get("target",!0)||"_blank";bo(u,v)}}n=!0}})})},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:Aa,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,s=t[1]-i.cy,l=Math.sqrt(o*o+s*s);return l<=i.r&&l>=i.r0}},e.type="sunburst",e}(ht),Pp=Mp,Ep=function(r){k(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};ps(n);var i=this._levelModels=F(t.levels||[],function(l){return new qt(l,this,a)},this),o=ln.createTree(n,this,s);function s(l){l.wrapMethod("getItemModel",function(u,v){var h=o.getNodeByDataIndex(v),f=i[h.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=Ir(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(){Fo(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}(ft);function ps(r){var e=0;N(r.children,function(a){ps(a);var n=a.value;$(n)&&(n=n[0]),e+=n});var t=r.value;$(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),$(r.value)?r.value[0]=t:r.value=t}var Np=Ep,Ci=Math.PI/180;function Rp(r,e,t){e.eachSeriesByType(r,function(a){var n=a.get("center"),i=a.get("radius");$(i)||(i=[0,i]),$(n)||(n=[n,n]);var o=t.getWidth(),s=t.getHeight(),l=Math.min(o,s),u=z(n[0],o),v=z(n[1],s),h=z(i[0],l/2),f=z(i[1],l/2),c=-a.get("startAngle")*Ci,d=a.get("minAngle")*Ci,p=a.getData().tree.root,g=a.getViewRoot(),m=g.depth,S=a.get("sort");S!=null&&ds(g,S);var y=0;N(g.children,function(E){!isNaN(E.getValue())&&y++});var _=g.getValue(),b=Math.PI/(_||y)*2,x=g.depth>0,w=g.height-(x?-1:1),I=(f-h)/(w||1),D=a.get("clockwise"),L=a.get("stillShowZeroSum"),T=D?1:-1,M=function(E,R){if(!!E){var V=R;if(E!==p){var G=E.getValue(),O=_===0&&L?b:G*b;O1;)o=o.parentNode;var s=n.getColorFromPalette(o.name||o.dataIndex+"",e);return a.depth>1&&mt(s)&&(s=wl(s,(a.depth-1)/(i-1)*.5)),s}r.eachSeriesByType("sunburst",function(a){var n=a.getData(),i=n.tree;i.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=t(o,a,i.root.height));var u=n.ensureUniqueItemVisual(o.dataIndex,"style");U(u,l)})})}function Gp(r){r.registerChartView(Pp),r.registerSeriesModel(Np),r.registerLayout(et(Rp,"sunburst")),r.registerProcessor(et(Qa,"sunburst")),r.registerVisual(kp),Cp(r)}var Mi={color:"fill",borderColor:"stroke"},Bp={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},Bt=It(),zp=function(r){k(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 Oe(null,this)},e.prototype.getDataParams=function(t,a,n){var i=r.prototype.getDataParams.call(this,t,a);return n&&(i.info=Bt(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}(ft),Op=zp;function Hp(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 $p(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:st(Hp,r)}}}function Fp(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 Wp(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:st(Fp,r)}}}function Up(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 Zp(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:st(Up,r)}}}function Yp(r,e){return e=e||[0,0],F(["Radius","Angle"],function(t,a){var n="get"+t+"Axis",i=this[n](),o=e[a],s=r[a]/2,l=i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(o-s)-i.dataToCoord(o+s));return t==="Angle"&&(l=l*Math.PI/180),l},this)}function Xp(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]),s=r.coordToPoint([i,o]);return s.push(i,o*Math.PI/180),s},size:st(Yp,r)}}}function qp(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 zt="emphasis",Zt="normal",gn="blur",yn="select",Jt=[Zt,zt,gn,yn],Jr={normal:["itemStyle"],emphasis:[zt,"itemStyle"],blur:[gn,"itemStyle"],select:[yn,"itemStyle"]},ta={normal:["label"],emphasis:[zt,"label"],blur:[gn,"label"],select:[yn,"label"]},Kp=["x","y"],jp="e\0\0",St={normal:{},emphasis:{},blur:{},select:{}},Qp={cartesian2d:$p,geo:Wp,single:Zp,polar:Xp,calendar:qp};function Ca(r){return r instanceof yt}function Ma(r){return r instanceof Ha}function Jp(r,e){e.copyTransform(r),Ma(e)&&Ma(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,Ca(e)&&Ca(r)&&e.setShape(r.shape))}var td=function(r){k(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,s=t.getData(),l=this.group,u=Pi(t,s,a,n);o||l.removeAll(),s.diff(o).add(function(h){ea(n,null,h,u(h,i),t,l,s)}).remove(function(h){var f=o.getItemGraphicEl(h);f&&rn(f,Bt(f).option,t)}).update(function(h,f){var c=o.getItemGraphicEl(f);ea(n,c,h,u(h,i),t,l,s)}).execute();var v=t.get("clip",!0)?Ja(t.coordinateSystem,!1,t):null;v?l.setClipPath(v):l.removeClipPath(),this._data=s},e.prototype.incrementalPrepareRender=function(t,a,n){this.group.removeAll(),this._data=null},e.prototype.incrementalRender=function(t,a,n,i,o){var s=a.getData(),l=Pi(a,s,n,i),u=this._progressiveEls=[];function v(c){c.isGroup||(c.incremental=!0,c.ensureState("emphasis").hoverLayer=!0)}for(var h=t.start;h=0?e.getStore().get(R,C):void 0}var V=e.get(E.name,C),G=E&&E.ordinalMeta;return G?G.categories[V]:V}function x(A,C){C==null&&(C=u);var E=e.getItemVisual(C,"style"),R=E&&E.fill,V=E&&E.opacity,G=S(C,Zt).getItemStyle();R!=null&&(G.fill=R),V!=null&&(G.opacity=V);var O={inheritColor:mt(R)?R:"#000"},B=y(C,Zt),K=kt(B,null,O,!1,!0);K.text=B.getShallow("show")?Ft(r.getFormattedLabel(C,Zt),On(e,C)):null;var X=Hn(B,O,!1);return D(A,G),G=$n(G,K,X),A&&I(G,A),G.legacy=!0,G}function w(A,C){C==null&&(C=u);var E=S(C,zt).getItemStyle(),R=y(C,zt),V=kt(R,null,null,!0,!0);V.text=R.getShallow("show")?Be(r.getFormattedLabel(C,zt),r.getFormattedLabel(C,Zt),On(e,C)):null;var G=Hn(R,null,!0);return D(A,E),E=$n(E,V,G),A&&I(E,A),E.legacy=!0,E}function I(A,C){for(var E in C)Ct(C,E)&&(A[E]=C[E])}function D(A,C){A&&(A.textFill&&(C.textFill=A.textFill),A.textPosition&&(C.textPosition=A.textPosition))}function L(A,C){if(C==null&&(C=u),Ct(Mi,A)){var E=e.getItemVisual(C,"style");return E?E[Mi[A]]:null}if(Ct(Bp,A))return e.getItemVisual(C,A)}function T(A){if(i.type==="cartesian2d"){var C=i.getBaseAxis();return Il(gt({axis:C},A))}}function M(){return t.getCurrentSeriesIndices()}function P(A){return Ll(A,t)}}function nd(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 ea(r,e,t,a,n,i,o){if(!a){i.remove(e);return}var s=_n(r,e,t,a,n,i);return s&&o.setItemGraphicEl(t,s),s&<(s,a.focus,a.blurScope,a.emphasisDisabled),s}function _n(r,e,t,a,n,i){var o=-1,s=e;e&&ys(e,a,n)&&(o=wt(i.childrenRef(),e),e=null);var l=!e,u=e;u?u.clearStates():(u=mn(a),s&&Jp(s,u)),a.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),St.normal.cfg=St.normal.conOpt=St.emphasis.cfg=St.emphasis.conOpt=St.blur.cfg=St.blur.conOpt=St.select.cfg=St.select.conOpt=null,St.isLegacy=!1,od(u,t,a,n,l,St),id(u,t,a,n,l),Sn(r,u,t,a,St,n,l),Ct(a,"info")&&(Bt(u).info=a.info);for(var v=0;v=0?i.replaceAt(u,o):i.add(u),u}function ys(r,e,t){var a=Bt(r),n=e.type,i=e.shape,o=e.style;return t.isUniversalTransitionEnabled()||n!=null&&n!==a.customGraphicType||n==="path"&&hd(i)&&ms(i)!==a.customPathData||n==="image"&&Ct(o,"image")&&o.image!==a.customImagePath}function id(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&&ys(o,i,a)&&(o=null),o||(o=mn(i),r.setClipPath(o)),Sn(null,o,e,i,null,a,n)}}function od(r,e,t,a,n,i){if(!r.isGroup){Ei(t,null,i),Ei(t,zt,i);var o=i.normal.conOpt,s=i.emphasis.conOpt,l=i.blur.conOpt,u=i.select.conOpt;if(o!=null||s!=null||u!=null||l!=null){var v=r.getTextContent();if(o===!1)v&&r.removeTextContent();else{o=i.normal.conOpt=o||{type:"text"},v?v.clearStates():(v=mn(o),r.setTextContent(v)),Sn(null,v,e,o,null,a,n);for(var h=o&&o.style,f=0;f=v;c--){var d=e.childAt(c);ld(e,d,n)}}}function ld(r,e,t){e&&rn(e,Bt(r).option,t)}function ud(r){new pe(r.oldChildren,r.newChildren,Ni,Ni,r).add(Ri).update(Ri).remove(vd).execute()}function Ni(r,e){var t=r&&r.name;return t!=null?t:jp+e}function Ri(r,e){var t=this.context,a=r!=null?t.newChildren[r]:null,n=e!=null?t.oldChildren[e]:null;_n(t.api,n,t.dataIndex,a,t.seriesModel,t.group)}function vd(r){var e=this.context,t=e.oldChildren[r];t&&rn(t,Bt(t).option,e.seriesModel)}function ms(r){return r&&(r.pathData||r.d)}function hd(r){return r&&(Ct(r,"pathData")||Ct(r,"d"))}function fd(r){r.registerChartView(ed),r.registerSeriesModel(Op)}function Pa(r,e){e=e||{};var t=r.coordinateSystem,a=r.axis,n={},i=a.position,o=a.orient,s=t.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};n.position=[o==="vertical"?u.vertical[i]:l[0],o==="horizontal"?u.horizontal[i]:l[3]];var v={horizontal:0,vertical:1};n.rotation=Math.PI/2*v[o];var h={top:-1,bottom:1,right:1,left:-1};n.labelDirection=n.tickDirection=n.nameDirection=h[i],r.get(["axisTick","inside"])&&(n.tickDirection=-n.tickDirection),Nt(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 cd=["axisLine","axisTickLabel","axisName"],pd=["splitArea","splitLine"],dd=function(r){k(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 s=this._axisGroup;this._axisGroup=new rt;var l=Pa(t),u=new Nl(t,l);N(cd,u.add,u),o.add(this._axisGroup),o.add(u.getGroup()),N(pd,function(v){t.get([v,"show"])&&gd[v](this,this.group,this._axisGroup,t)},this),Rl(s,this._axisGroup,t),r.prototype.render.call(this,t,a,n,i)},e.prototype.remove=function(){Vl(this)},e.type="singleAxis",e}(No),gd={splitLine:function(r,e,t,a){var n=a.axis;if(!n.scale.isBlank()){var i=a.getModel("splitLine"),o=i.getModel("lineStyle"),s=o.get("color");s=s instanceof Array?s:[s];for(var l=o.get("width"),u=a.coordinateSystem.getRect(),v=n.isHorizontal(),h=[],f=0,c=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=Vi(t);return n===this?this.dataToPoint(a):null},r.prototype.convertFromPixel=function(e,t,a){var n=Vi(t);return n===this?this.pointToData(a):null},r}();function Vi(r){var e=r.seriesModel,t=r.singleAxisModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function bd(r,e){var t=[];return r.eachComponent("singleAxis",function(a,n){var i=new _d(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",Po).models[0];a.coordinateSystem=n&&n.coordinateSystem}}),t}var xd={create:bd,dimensions:_s},wd=xd,ki=["x","y"],Id=["width","height"],Ld=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,a,n,i,o){var s=n.axis,l=s.coordinateSystem,u=aa(l,1-vr(s)),v=l.dataToPoint(a)[0],h=i.get("type");if(h&&h!=="none"){var f=Fl(i),c=Dd[h](s,v,u);c.style=f,t.graphicKey=c.type,t.pointer=c}var d=Pa(n);Wl(a,t,d,n,i,o)},e.prototype.getHandleTransform=function(t,a,n){var i=Pa(a,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var o=Ul(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,s=o.coordinateSystem,l=vr(o),u=aa(s,l),v=[t.x,t.y];v[l]+=a[l],v[l]=Math.min(u[1],v[l]),v[l]=Math.max(u[0],v[l]);var h=aa(s,1-l),f=(h[1]+h[0])/2,c=[f,f];return c[l]=v[l],{x:v[0],y:v[1],rotation:t.rotation,cursorPoint:c,tooltipOption:{verticalAlign:"middle"}}},e}(Zl),Dd={line:function(r,e,t){var a=Yl([e,t[0]],[e,t[1]],vr(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:Xl([e-a/2,t[0]],[a,n],vr(r))}}};function vr(r){return r.isHorizontal()?0:1}function aa(r,e){var t=r.getRect();return[t[ki[e]],t[ki[e]]+t[Id[e]]]}var Td=Ld,Ad=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="single",e}(wr);function Cd(r){Z(Ro),No.registerAxisPointerClass("SingleAxisPointer",Td),r.registerComponentView(Ad),r.registerComponentView(yd),r.registerComponentModel(ra),ql(r,"single",ra,ra.defaultOption),r.registerCoordinateSystem("single",wd)}var Md=["rect","polygon","keep","clear"];function Pd(r,e){var t=Gt(r?r.brush:[]);if(!!t.length){var a=[];N(t,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(a=a.concat(u))});var n=r&&r.toolbox;$(n)&&(n=n[0]),n||(n={feature:{}},r.toolbox=[n]);var i=n.feature||(n.feature={}),o=i.brush||(i.brush={}),s=o.type||(o.type=[]);s.push.apply(s,a),Ed(s),e&&!s.length&&s.push.apply(s,Md)}}function Ed(r){var e={};N(r,function(t){e[t]=1}),r.length=0,N(e,function(t,a){r.push(a)})}function Nd(r){var e=r.brushType,t={point:function(a){return Gi[e].point(a,t,r)},rect:function(a){return Gi[e].rect(a,t,r)}};return t}var Gi={lineX:Bi(0),lineY:Bi(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])&&me(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,s=r.height,l=a[0];if(me(a,n,i)||me(a,n+o,i)||me(a,n,i+s)||me(a,n+o,i+s)||dt.create(r).contain(l[0],l[1])||$e(n,i,n+o,i,a)||$e(n,i,n,i+s,a)||$e(n+o,i,n+o,i+s,a)||$e(n,i+s,n+o,i+s,a))return!0}}};function Bi(r){var e=["x","y"],t=["width","height"];return{point:function(a,n,i){if(a){var o=i.range,s=a[r];return be(s,o)}},rect:function(a,n,i){if(a){var o=i.range,s=[a[e[r]],a[e[r]]+a[t[r]]];return s[1]e[0][1]&&(e[0][1]=i[0]),i[1]e[1][1]&&(e[1][1]=i[1])}return e&&Hi(e)}};function Hi(r){return new dt(r[0][0],r[1][0],r[0][1]-r[0][0],r[1][1]-r[1][0])}var zd=function(r){k(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 tu(a.getZr())).on("brush",st(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){bs(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:Ee(n),$from:a}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:a,areas:Ee(n),$from:a})},e.type="brush",e}(wr),Od=zd,Hd="#ddd",$d=function(r){k(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&&eu(n,t,["inBrush","outOfBrush"]);var i=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:Hd},i.hasOwnProperty("liftZ")||(i.liftZ=5)},e.prototype.setAreas=function(t){!t||(this.areas=F(t,function(a){return $i(this.option,a)},this))},e.prototype.setBrushOption=function(t){this.brushOption=$i(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}(xr);function $i(r,e){return ie({brushType:r.brushType,brushMode:r.brushMode,transformable:r.transformable,brushStyle:new qt(r.brushStyle).getItemStyle(),removeOnClick:r.removeOnClick,z:r.z},e,!0)}var Fd=$d,Wd=["rect","polygon","lineX","lineY","keep","clear"],Ud=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,a,n){var i,o,s;a.eachComponent({mainType:"brush"},function(l){i=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=i,this._brushMode=o,N(t.get("type",!0),function(l){t.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===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:Wd.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}(ru),Zd=Ud;function Yd(r){r.registerComponentView(Od),r.registerComponentModel(Fd),r.registerPreprocessor(Pd),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,Rd),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"},Ae),r.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},Ae),au("brush",Zd)}function xn(r,e){if(!r)return!1;for(var t=$(r)?r:[r],a=0;a=0&&(o[i]=+o[i].toFixed(f)),[o,h]}var ia={min:et(Qe,"min"),max:et(Qe,"max"),average:et(Qe,"average"),median:et(Qe,"median")};function ke(r,e){if(!!e){var t=r.getData(),a=r.coordinateSystem,n=a&&a.dimensions;if(!Kd(e)&&!$(e.coord)&&$(n)){var i=ws(e,t,a,r);if(e=Ee(e),e.type&&ia[e.type]&&i.baseAxis&&i.valueAxis){var o=wt(n,i.baseAxis.dim),s=wt(n,i.valueAxis.dim),l=ia[e.type](t,i.baseDataDim,i.valueDataDim,o,s);e.coord=l[0],e.value=l[1]}else e.coord=[e.xAxis!=null?e.xAxis:e.radiusAxis,e.yAxis!=null?e.yAxis:e.angleAxis]}if(e.coord==null||!$(n))e.coord=[];else for(var u=e.coord,v=0;v<2;v++)ia[u[v]]&&(u[v]=wn(t,t.mapDimension(n[v]),u[v]));return e}}function ws(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(jd(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 jd(r,e){var t=r.getData().getDimensionInfo(e);return t&&t.coordDim}function Ge(r,e){return r&&r.containData&&e.coord&&!Na(e)?r.containData(e.coord):!0}function Qd(r,e,t){return r&&r.containZone&&e.coord&&t.coord&&!Na(e)&&!Na(t)?r.containZone(e.coord,t.coord):!0}function Is(r,e){return r?function(t,a,n,i){var o=i<2?t.coord&&t.coord[i]:t.value;return nr(o,e[i])}:function(t,a,n,i){return nr(t.value,e[i])}}function wn(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 oa=It(),Jd=function(r){k(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=At()},e.prototype.render=function(t,a,n){var i=this,o=this.markerGroupMap;o.each(function(s){oa(s).keep=!1}),a.eachSeries(function(s){var l=te.getMarkerModelFromSeries(s,i.type);l&&i.renderSeries(s,l,a,n)}),o.each(function(s){!oa(s).keep&&i.group.remove(s.group)})},e.prototype.markKeep=function(t){oa(t).keep=!0},e.prototype.toggleBlurSeries=function(t,a){var n=this;N(t,function(i){var o=te.getMarkerModelFromSeries(i,n.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(a?su(l):lu(l))})}})},e.type="marker",e}(wr),In=Jd;function Fi(r,e,t){var a=e.coordinateSystem;r.each(function(n){var i=r.getItemModel(n),o,s=z(i.get("x"),t.getWidth()),l=z(i.get("y"),t.getHeight());if(!isNaN(s)&&!isNaN(l))o=[s,l];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(s)||(o[0]=s),isNaN(l)||(o[1]=l),r.setItemLayout(n,o)})}var tg=function(r){k(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=te.getMarkerModelFromSeries(i,"markPoint");o&&(Fi(o.getData(),i,n),this.markerGroupMap.get(i.id).updateLayout())},this)},e.prototype.renderSeries=function(t,a,n,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,v=u.get(s)||u.set(s,new Za),h=eg(o,t,a);a.setData(h),Fi(a.getData(),t,i),h.each(function(f){var c=h.getItemModel(f),d=c.getShallow("symbol"),p=c.getShallow("symbolSize"),g=c.getShallow("symbolRotate"),m=c.getShallow("symbolOffset"),S=c.getShallow("symbolKeepAspect");if(nt(d)||nt(p)||nt(g)||nt(m)){var y=a.getRawValue(f),_=a.getDataParams(f);nt(d)&&(d=d(y,_)),nt(p)&&(p=p(y,_)),nt(g)&&(g=g(y,_)),nt(m)&&(m=m(y,_))}var b=c.getModel("itemStyle").getItemStyle(),x=an(l,"color");b.fill||(b.fill=x),h.setItemVisual(f,{symbol:d,symbolSize:p,symbolRotate:g,symbolOffset:m,symbolKeepAspect:S,style:b})}),v.updateData(h),this.group.add(v.group),h.eachItemGraphicEl(function(f){f.traverse(function(c){it(c).dataModel=a})}),this.markKeep(v),v.group.silent=a.get("silent")||t.get("silent")},e.type="markPoint",e}(In);function eg(r,e,t){var a;r?a=F(r&&r.dimensions,function(s){var l=e.getData().getDimensionInfo(e.getData().mapDimension(s))||{};return U(U({},l),{name:s,ordinalMeta:null})}):a=[{name:"value",type:"float"}];var n=new _t(a,t),i=F(t.get("data"),et(ke,e));r&&(i=Tt(i,et(Ge,r)));var o=Is(!!r,a);return n.initData(i,null,o),n}var rg=tg;function ag(r){r.registerComponentModel(qd),r.registerComponentView(rg),r.registerPreprocessor(function(e){xn(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var ng=function(r){k(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}(te),ig=ng,Je=It(),og=function(r,e,t,a){var n=r.getData(),i;if($(a))i=a;else{var o=a.type;if(o==="min"||o==="max"||o==="average"||o==="median"||a.xAxis!=null||a.yAxis!=null){var s=void 0,l=void 0;if(a.yAxis!=null||a.xAxis!=null)s=e.getAxis(a.yAxis!=null?"y":"x"),l=Nt(a.yAxis,a.xAxis);else{var u=ws(a,n,e,r);s=u.valueAxis;var v=uu(n,u.valueDataDim);l=wn(n,v,o)}var h=s.dim==="x"?0:1,f=1-h,c=Ee(a),d={coord:[]};c.type=null,c.coord=[],c.coord[f]=-1/0,d.coord[f]=1/0;var p=t.get("precision");p>=0&&Ht(l)&&(l=+l.toFixed(Math.min(p,20))),c.coord[h]=d.coord[h]=l,i=[c,d,{type:o,valueIndex:a.valueIndex,value:l}]}else i=[]}var g=[ke(r,i[0]),ke(r,i[1]),U({},i[2])];return g[2].type=g[2].type||null,ie(g[2],g[0]),ie(g[2],g[1]),g};function hr(r){return!isNaN(r)&&!isFinite(r)}function Wi(r,e,t,a){var n=1-r,i=a.dimensions[r];return hr(e[n])&&hr(t[n])&&e[r]===t[r]&&a.getAxis(i).containData(e[r])}function sg(r,e){if(r.type==="cartesian2d"){var t=e[0].coord,a=e[1].coord;if(t&&a&&(Wi(1,t,a,r)||Wi(0,t,a,r)))return!0}return Ge(r,e[0])&&Ge(r,e[1])}function sa(r,e,t,a,n){var i=a.coordinateSystem,o=r.getItemModel(e),s,l=z(o.get("x"),n.getWidth()),u=z(o.get("y"),n.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(a.getMarkerPosition)s=a.getMarkerPosition(r.getValues(r.dimensions,e));else{var v=i.dimensions,h=r.get(v[0],e),f=r.get(v[1],e);s=i.dataToPoint([h,f])}if(br(i,"cartesian2d")){var c=i.getAxis("x"),d=i.getAxis("y"),v=i.dimensions;hr(r.get(v[0],e))?s[0]=c.toGlobalCoord(c.getExtent()[t?0:1]):hr(r.get(v[1],e))&&(s[1]=d.toGlobalCoord(d.getExtent()[t?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}r.setItemLayout(e,s)}var lg=function(r){k(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=te.getMarkerModelFromSeries(i,"markLine");if(o){var s=o.getData(),l=Je(o).from,u=Je(o).to;l.each(function(v){sa(l,v,!0,i,n),sa(u,v,!1,i,n)}),s.each(function(v){s.setItemLayout(v,[l.getItemLayout(v),u.getItemLayout(v)])}),this.markerGroupMap.get(i.id).updateLayout()}},this)},e.prototype.renderSeries=function(t,a,n,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,v=u.get(s)||u.set(s,new dn);this.group.add(v.group);var h=ug(o,t,a),f=h.from,c=h.to,d=h.line;Je(a).from=f,Je(a).to=c,a.setData(d);var p=a.get("symbol"),g=a.get("symbolSize"),m=a.get("symbolRotate"),S=a.get("symbolOffset");$(p)||(p=[p,p]),$(g)||(g=[g,g]),$(m)||(m=[m,m]),$(S)||(S=[S,S]),h.from.each(function(_){y(f,_,!0),y(c,_,!1)}),d.each(function(_){var b=d.getItemModel(_).getModel("lineStyle").getLineStyle();d.setItemLayout(_,[f.getItemLayout(_),c.getItemLayout(_)]),b.stroke==null&&(b.stroke=f.getItemVisual(_,"style").fill),d.setItemVisual(_,{fromSymbolKeepAspect:f.getItemVisual(_,"symbolKeepAspect"),fromSymbolOffset:f.getItemVisual(_,"symbolOffset"),fromSymbolRotate:f.getItemVisual(_,"symbolRotate"),fromSymbolSize:f.getItemVisual(_,"symbolSize"),fromSymbol:f.getItemVisual(_,"symbol"),toSymbolKeepAspect:c.getItemVisual(_,"symbolKeepAspect"),toSymbolOffset:c.getItemVisual(_,"symbolOffset"),toSymbolRotate:c.getItemVisual(_,"symbolRotate"),toSymbolSize:c.getItemVisual(_,"symbolSize"),toSymbol:c.getItemVisual(_,"symbol"),style:b})}),v.updateData(d),h.line.eachItemGraphicEl(function(_){it(_).dataModel=a,_.traverse(function(b){it(b).dataModel=a})});function y(_,b,x){var w=_.getItemModel(b);sa(_,b,x,t,i);var I=w.getModel("itemStyle").getItemStyle();I.fill==null&&(I.fill=an(l,"color")),_.setItemVisual(b,{symbolKeepAspect:w.get("symbolKeepAspect"),symbolOffset:Ft(w.get("symbolOffset",!0),S[x?0:1]),symbolRotate:Ft(w.get("symbolRotate",!0),m[x?0:1]),symbolSize:Ft(w.get("symbolSize"),g[x?0:1]),symbol:Ft(w.get("symbol",!0),p[x?0:1]),style:I})}this.markKeep(v),v.group.silent=a.get("silent")||t.get("silent")},e.type="markLine",e}(In);function ug(r,e,t){var a;r?a=F(r&&r.dimensions,function(u){var v=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return U(U({},v),{name:u,ordinalMeta:null})}):a=[{name:"value",type:"float"}];var n=new _t(a,t),i=new _t(a,t),o=new _t([],t),s=F(t.get("data"),et(og,e,r,t));r&&(s=Tt(s,et(sg,r)));var l=Is(!!r,a);return n.initData(F(s,function(u){return u[0]}),null,l),i.initData(F(s,function(u){return u[1]}),null,l),o.initData(F(s,function(u){return u[2]})),o.hasItemOption=!0,{from:n,to:i,line:o}}var vg=lg;function hg(r){r.registerComponentModel(ig),r.registerComponentView(vg),r.registerPreprocessor(function(e){xn(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var fg=function(r){k(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}(te),cg=fg,tr=It(),pg=function(r,e,t,a){var n=a[0],i=a[1];if(!(!n||!i)){var o=ke(r,n),s=ke(r,i),l=o.coord,u=s.coord;l[0]=Nt(l[0],-1/0),l[1]=Nt(l[1],-1/0),u[0]=Nt(u[0],1/0),u[1]=Nt(u[1],1/0);var v=Mo([{},o,s]);return v.coord=[o.coord,s.coord],v.x0=o.x,v.y0=o.y,v.x1=s.x,v.y1=s.y,v}};function fr(r){return!isNaN(r)&&!isFinite(r)}function Ui(r,e,t,a){var n=1-r;return fr(e[n])&&fr(t[n])}function dg(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 br(r,"cartesian2d")?t&&a&&(Ui(1,t,a)||Ui(0,t,a))?!0:Qd(r,n,i):Ge(r,n)||Ge(r,i)}function Zi(r,e,t,a,n){var i=a.coordinateSystem,o=r.getItemModel(e),s,l=z(o.get(t[0]),n.getWidth()),u=z(o.get(t[1]),n.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(a.getMarkerPosition){var v=r.getValues(["x0","y0"],e),h=r.getValues(["x1","y1"],e),f=i.clampData(v),c=i.clampData(h),d=[];t[0]==="x0"?d[0]=f[0]>c[0]?h[0]:v[0]:d[0]=f[0]>c[0]?v[0]:h[0],t[1]==="y0"?d[1]=f[1]>c[1]?h[1]:v[1]:d[1]=f[1]>c[1]?v[1]:h[1],s=a.getMarkerPosition(d,t,!0)}else{var p=r.get(t[0],e),g=r.get(t[1],e),m=[p,g];i.clampData&&i.clampData(m,m),s=i.dataToPoint(m,!0)}if(br(i,"cartesian2d")){var S=i.getAxis("x"),y=i.getAxis("y"),p=r.get(t[0],e),g=r.get(t[1],e);fr(p)?s[0]=S.toGlobalCoord(S.getExtent()[t[0]==="x0"?0:1]):fr(g)&&(s[1]=y.toGlobalCoord(y.getExtent()[t[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var Yi=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],gg=function(r){k(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=te.getMarkerModelFromSeries(i,"markArea");if(o){var s=o.getData();s.each(function(l){var u=F(Yi,function(h){return Zi(s,l,h,i,n)});s.setItemLayout(l,u);var v=s.getItemGraphicEl(l);v.setShape("points",u)})}},this)},e.prototype.renderSeries=function(t,a,n,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,v=u.get(s)||u.set(s,{group:new rt});this.group.add(v.group),this.markKeep(v);var h=yg(o,t,a);a.setData(h),h.each(function(f){var c=F(Yi,function(I){return Zi(h,f,I,t,i)}),d=o.getAxis("x").scale,p=o.getAxis("y").scale,g=d.getExtent(),m=p.getExtent(),S=[d.parse(h.get("x0",f)),d.parse(h.get("x1",f))],y=[p.parse(h.get("y0",f)),p.parse(h.get("y1",f))];_a(S),_a(y);var _=!(g[0]>S[1]||g[1]y[1]||m[1]":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},_g=function(){function r(e){var t=this._condVal=mt(e)?new RegExp(e):fu(e)?e:null;if(t==null){var a="";tt(a)}}return r.prototype.evaluate=function(e){var t=typeof e;return mt(t)?this._condVal.test(e):Ht(t)?this._condVal.test(e+""):!1},r}(),bg=function(){function r(){}return r.prototype.evaluate=function(){return this.value},r}(),xg=function(){function r(){}return r.prototype.evaluate=function(){for(var e=this.children,t=0;t=s)}}for(var h=this.__startIndex;h15)break}}A.prevElClipPaths&&m.restore()};if(S)if(S.length===0)I=g.__endIndex;else for(var L=c.dpr,T=0;T0&&e>n[0]){for(l=0;le);l++);s=a[n[l]]}if(n.splice(l+1,0,e),a[e]=t,!t.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(t.dom,u.nextSibling):o.appendChild(t.dom)}else o.firstChild?o.insertBefore(t.dom,o.firstChild):o.appendChild(t.dom);t.__painter=this}},r.prototype.eachLayer=function(e,t){for(var a=this._zlevelList,n=0;n0?er:0),this._needsManuallyCompositing),v.__builtin__||Lu("ZLevel "+u+" has been used by unkown layer "+v.id),v!==i&&(v.__used=!0,v.__startIndex!==l&&(v.__dirty=!0),v.__startIndex=l,v.incremental?v.__drawIndex=-1:v.__drawIndex=l,t(l),i=v),n.__dirty&xa&&!n.__inHover&&(v.__dirty=!0,v.incremental&&v.__drawIndex<0&&(v.__drawIndex=l))}t(l),this.eachBuiltinLayer(function(h,f){!h.__used&&h.getElementCount()>0&&(h.__dirty=!0,h.__startIndex=h.__endIndex=h.__drawIndex=0),h.__dirty&&h.__drawIndex<0&&(h.__drawIndex=h.__startIndex)})},r.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},r.prototype._clearLayer=function(e){e.clear()},r.prototype.setBackgroundColor=function(e){this._backgroundColor=e,N(this._layers,function(t){t.setUnpainted()})},r.prototype.configLayer=function(e,t){if(t){var a=this._layerConfig;a[e]?ie(a[e],t,!0):a[e]=t;for(var n=0;n2&&a.push(n),n=[P,A]}function v(P,A,C,E){ce(P,C)&&ce(A,E)||n.push(P,A,C,E,C,E)}function h(P,A,C,E,R,V){var G=Math.abs(A-P),O=Math.tan(G/4)*4/3,B=AI:T2&&a.push(n),a}function Va(r,e,t,a,n,i,o,s,l,u){if(ce(r,t)&&ce(e,a)&&ce(n,o)&&ce(i,s)){l.push(o,s);return}var v=2/u,h=v*v,f=o-r,c=s-e,d=Math.sqrt(f*f+c*c);f/=d,c/=d;var p=t-r,g=a-e,m=n-o,S=i-s,y=p*p+g*g,_=m*m+S*S;if(y=0&&I=0){l.push(o,s);return}var D=[],L=[];ir(r,t,n,o,.5,D),ir(e,a,i,s,.5,L),Va(D[0],L[0],D[1],L[1],D[2],L[2],D[3],L[3],l,u),Va(D[4],L[4],D[5],L[5],D[6],L[6],D[7],L[7],l,u)}function Fg(r,e){var t=Ra(r),a=[];e=e||1;for(var n=0;n0)for(var u=0;uMath.abs(u),h=Ds([l,u],v?0:1,e),f=(v?s:u)/h.length,c=0;cn,o=Ds([a,n],i?0:1,e),s=i?"width":"height",l=i?"height":"width",u=i?"x":"y",v=i?"y":"x",h=r[s]/o.length,f=0;f1?null:new Ut(p*l+r,p*u+e)}function Zg(r,e,t){var a=new Ut;Ut.sub(a,t,e),a.normalize();var n=new Ut;Ut.sub(n,r,e);var i=n.dot(a);return i}function ve(r,e){var t=r[r.length-1];t&&t[0]===e[0]&&t[1]===e[1]||r.push(e)}function Yg(r,e,t){for(var a=r.length,n=[],i=0;io?(u.x=v.x=s+i/2,u.y=l,v.y=l+o):(u.y=v.y=l+o/2,u.x=s,v.x=s+i),Yg(e,u,v)}function cr(r,e,t,a){if(t===1)a.push(e);else{var n=Math.floor(t/2),i=r(e);cr(r,i[0],n,a),cr(r,i[1],t-n,a)}return a}function Xg(r,e){for(var t=[],a=0;a0)for(var b=a/t,x=-a/2;x<=a/2;x+=b){for(var w=Math.sin(x),I=Math.cos(x),D=0,y=0;y0;u/=2){var v=0,h=0;(r&u)>0&&(v=1),(e&u)>0&&(h=1),s+=u*u*(3*v^h),h===0&&(v===1&&(r=u-1-r,e=u-1-e),l=r,r=e,e=l)}return s}function gr(r){var e=1/0,t=1/0,a=-1/0,n=-1/0,i=F(r,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),v=l.x+l.width/2+(u?u[4]:0),h=l.y+l.height/2+(u?u[5]:0);return e=Math.min(v,e),t=Math.min(h,t),a=Math.max(v,a),n=Math.max(h,n),[v,h]}),o=F(i,function(s,l){return{cp:s,z:ay(s[0],s[1],e,t,a,n),path:r[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function Cs(r){return jg(r.path,r.count)}function ka(){return{fromIndividuals:[],toIndividuals:[],count:0}}function ny(r,e,t){var a=[];function n(b){for(var x=0;x=0;n--)if(!t[n].many.length){var l=t[s].many;if(l.length<=1)if(s)s=0;else return t;var i=l.length,u=Math.ceil(i/2);t[n].many=l.slice(u,i),t[s].many=l.slice(0,u),s++}return t}var oy={clone:function(r){for(var e=[],t=1-Math.pow(1-r.path.style.opacity,1/r.count),a=0;a0))return;var s=a.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,v;no(r)&&(u=r,v=e),no(e)&&(u=e,v=r);function h(m,S,y,_,b){var x=m.many,w=m.one;if(x.length===1&&!b){var I=S?x[0]:w,D=S?w:x[0];if(pr(I))h({many:[I],one:D},!0,y,_,!0);else{var L=s?gt({delay:s(y,_)},l):l;Dn(I,D,L),i(I,D,I,D,L)}}else for(var T=gt({dividePath:oy[t],individualDelay:s&&function(R,V,G,O){return s(R+y,_)}},l),M=S?ny(x,w,T):iy(w,x,T),P=M.fromIndividuals,A=M.toIndividuals,C=P.length,E=0;Ee.length,c=u?io(v,u):io(f?e:r,[f?r:e]),d=0,p=0;pMs))for(var n=a.getIndices(),i=ly(a),o=0;o0&&_.group.traverse(function(x){x instanceof yt&&!x.animators.length&&x.animateFrom({style:{opacity:0}},b)})})}function so(r){var e=r.getModel("universalTransition").get("seriesKey");return e||r.id}function lo(r){return $(r)?r.sort().join(","):r}function $t(r){if(r.hostModel)return r.hostModel.getModel("universalTransition").get("divideShape")}function hy(r,e){var t=At(),a=At(),n=At();return N(r.oldSeries,function(i,o){var s=r.oldDataGroupIds[o],l=r.oldData[o],u=so(i),v=lo(u);a.set(v,{dataGroupId:s,data:l}),$(u)&&N(u,function(h){n.set(h,{key:v,dataGroupId:s,data:l})})}),N(e.updatedSeries,function(i){if(i.isUniversalTransitionEnabled()&&i.isAnimationEnabled()){var o=i.get("dataGroupId"),s=i.getData(),l=so(i),u=lo(l),v=a.get(u);if(v)t.set(u,{oldSeries:[{dataGroupId:v.dataGroupId,divide:$t(v.data),data:v.data}],newSeries:[{dataGroupId:o,divide:$t(s),data:s}]});else if($(l)){var h=[];N(l,function(d){var p=a.get(d);p.data&&h.push({dataGroupId:p.dataGroupId,divide:$t(p.data),data:p.data})}),h.length&&t.set(u,{oldSeries:h,newSeries:[{dataGroupId:o,data:s,divide:$t(s)}]})}else{var f=n.get(l);if(f){var c=t.get(f.key);c||(c={oldSeries:[{dataGroupId:f.dataGroupId,data:f.data,divide:$t(f.data)}],newSeries:[]},t.set(f.key,c)),c.newSeries.push({dataGroupId:o,data:s,divide:$t(s)})}}}}),t}function uo(r,e){for(var t=0;t=0&&n.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:$t(e.oldData[s]),dim:o.dimension})}),N(Gt(r.to),function(o){var s=uo(t.updatedSeries,o);if(s>=0){var l=t.updatedSeries[s].getData();i.push({dataGroupId:e.oldDataGroupIds[s],data:l,divide:$t(l),dim:o.dimension})}}),n.length>0&&i.length>0&&Ps(n,i,a)}function cy(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,a){N(Gt(a.seriesTransition),function(n){N(Gt(n.to),function(i){for(var o=a.updatedSeries,s=0;sCn(this,null,function*(){const t=yield(yield ks(()=>import("./china.a225b5d5.js"),[])).default;ev("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:rv}]})})),{chartRef:r}}});function dy(r,e,t,a,n,i){return Gs(),Bs("div",{ref:"chartRef",style:zs({height:r.height,width:r.width})},null,4)}var _y=Es(py,[["render",dy]]);export{_y as default};