1 |
- import{bF as Mi,bG as xe,K as de,bH as gt,aw as ie,bI as Sn,j as ae,bJ as Z,bK as Ts,as as De,bL as As,bM as Ns,bN as Es,aq as E,bO as Li,bP as Di,bQ as Ci,bR as Ps,bS as Rs,bT as Ge,a6 as Te,at as _e,ac as se,bU as Vs,k as it,bV as V,bW as ye,P as oe,bX as Mn,bY as Ot,bZ as Ln,b_ as Ti,b$ as Ai,c0 as Ni,aF as he,c1 as Ei,c2 as Dn,c3 as ks,c4 as zs,J as Pi,ap as ce,c5 as Re,c6 as Gt,c7 as Cn,ao as te,c8 as Os,ar as W,az as F,av as G,c9 as Bt,ca as Tn,aH as Ie,ay as be,M as Be,cb as Ve,aE as pe,cc as Ri,cd as yt,ce as Gs,cf as ve,cg as ke,ch as Bs,ci as Fs,U as vt,Z as Ft,b as mt,cj as Ht,ck as fe,cl as Hs,cm as ot,am as re,cn as Vi,co as Ws,cp as ki,cq as Xs,cr as zi,cs as Wt,ct as Oi,cu as Fe,cv as Ae,cw as Ys,cx as An,X as He,cy as Gi,cz as Nn,cA as Bi,cB as Ne,l as Fi,cC as We,cD as xt,cE as Xe,cF as _t,cG as Zs,cH as Us,cI as rt,cJ as Hi,cK as js,cL as ge,cM as En,w as Xt,S as Wi,cN as Pn,G as qs,cO as Rn,cP as Vn,cQ as kn,cR as zn,f as On,cS as Yt,cT as Ks,cU as Xi,cV as Qs,cW as Gn,m as st,c as It,cX as Yi,cY as Bn,cZ as Fn,c_ as $s,V as Hn,c$ as lt,d0 as Ye,d1 as Js,d2 as Zi,d3 as el,d4 as Wn,y as tl,d5 as nl,bd as X,bo as Ui,T as al,d6 as Xn,d7 as Yn,d8 as il,d9 as ol,o as Zn,B as Un,da as ji,db as J,dc as jn,ax as qn,dd as Kn,de as Qn,df as rl,dg as qi,dh as sl,di as bt,dj as ll,dk as Ki,dl as ul,dm as Qi,dn as $n,dp as Zt,Q as $i,dq as dl,dr as Ji,ds as eo,dt as to,du as hl,_ as Jn,v as cl,dv as pl,dw as ea,dx as no,dy as ao,dz as io,dA as Ce,dB as fl,dC as gl,dD as yl,dE as vl,a8 as ml,a4 as xl,dF as _l,dG as Il,dH as bl,dI as wl,dJ as Sl,dK as Ml,dL as oo,dM as Ll,a9 as Dl,dN as Cl,aC as Ut,A as Tl,aG as Al,a as Nl,n as El,dO as Pl,dP as Rl,dQ as Vl,dR as kl,dS as zl,dT as Ol,aD as jt,dU as ro,dV as Gl,dW as wt,dX as qt,an as St,dY as Bl,dZ as Fl,d_ as Hl,d$ as Wl,e0 as Xl,e1 as Yl,aA as $e,e2 as Zl,e3 as Ul,aQ as so,e4 as jl,i as ql,s as Kl,e5 as Kt,e6 as Ql,e7 as $l,e8 as ta,g as Jl,e9 as lo,ea as eu,eb as tu,ec as nu,ed as au,ee as iu,ef as ou,eg as uo,eh as ru,ei as su,ej as ho,ek as na,el as lu,em as co,en as uu,eo as du,ep as hu,eq as cu,er as Qt,aW as pu,es as fu,et as gu,eu as $t,ev as yu,ew as Jt,ex as aa,ey as vu,ez as ia,eA as oa,eB as mu,bu as xu,bq as _u,bp as Iu,br as bu,bD as wu,bt as Su,bs as Mu,bE as Lu,bv as Du,bl as Cu,bm as Tu,eC as Au,bB as Nu,bC as Eu,bx as Pu,bk as Ru,bj as Vu,bA as ku,bi as zu,by as Ou,eD as Gu,eE as Bu,bz as Fu,eF as Hu,eG as Wu,bn as Xu}from"./installSVGRenderer-bd8c08f3.js";function Yu(n){if(n){for(var t=[],e=0;e<n.length;e++)t.push(n[e].slice());return t}}function Zu(n,t){var e=n.label,a=t&&t.getTextGuideLine();return{dataIndex:n.dataIndex,dataType:n.dataType,seriesIndex:n.seriesModel.seriesIndex,text:n.label.style.text,rect:n.hostRect,labelRect:n.rect,align:e.style.align,verticalAlign:e.style.verticalAlign,labelLinePoints:Yu(a&&a.shape.points)}}var po=["align","verticalAlign","width","height","fontSize"],le=new Mi,ra=xe(),Uu=xe();function en(n,t,e){for(var a=0;a<e.length;a++){var i=e[a];t[i]!=null&&(n[i]=t[i])}}var tn=["x","y","rotation"],ju=function(){function n(){this._labelList=[],this._chartViewList=[]}return n.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},n.prototype._addLabel=function(t,e,a,i,o){var r=i.style,s=i.__hostTarget,l=s.textConfig||{},u=i.getComputedTransform(),d=i.getBoundingRect().plain();de.applyTransform(d,d,u),u?le.setLocalTransform(u):(le.x=le.y=le.rotation=le.originX=le.originY=0,le.scaleX=le.scaleY=1),le.rotation=gt(le.rotation);var h=i.__hostTarget,c;if(h){c=h.getBoundingRect().plain();var p=h.getComputedTransform();de.applyTransform(c,c,p)}var g=c&&h.getTextGuideLine();this._labelList.push({label:i,labelLine:g,seriesModel:a,dataIndex:t,dataType:e,layoutOption:o,computedLayoutOption:null,rect:d,hostRect:c,priority:c?c.width*c.height:0,defaultAttr:{ignore:i.ignore,labelGuideIgnore:g&&g.ignore,x:le.x,y:le.y,scaleX:le.scaleX,scaleY:le.scaleY,rotation:le.rotation,style:{x:r.x,y:r.y,align:r.align,verticalAlign:r.verticalAlign,width:r.width,height:r.height,fontSize:r.fontSize},cursor:i.cursor,attachedPos:l.position,attachedRot:l.rotation}})},n.prototype.addLabelsOfSeries=function(t){var e=this;this._chartViewList.push(t);var a=t.__model,i=a.get("labelLayout");(ie(i)||Sn(i).length)&&t.group.traverse(function(o){if(o.ignore)return!0;var r=o.getTextContent(),s=ae(o);r&&!r.disableLabelLayout&&e._addLabel(s.dataIndex,s.dataType,a,r,i)})},n.prototype.updateLayoutConfig=function(t){var e=t.getWidth(),a=t.getHeight();function i(v,I){return function(){Ci(v,I)}}for(var o=0;o<this._labelList.length;o++){var r=this._labelList[o],s=r.label,l=s.__hostTarget,u=r.defaultAttr,d=void 0;ie(r.layoutOption)?d=r.layoutOption(Zu(r,l)):d=r.layoutOption,d=d||{},r.computedLayoutOption=d;var h=Math.PI/180;l&&l.setTextConfig({local:!1,position:d.x!=null||d.y!=null?null:u.attachedPos,rotation:d.rotate!=null?d.rotate*h:u.attachedRot,offset:[d.dx||0,d.dy||0]});var c=!1;if(d.x!=null?(s.x=Z(d.x,e),s.setStyle("x",0),c=!0):(s.x=u.x,s.setStyle("x",u.style.x)),d.y!=null?(s.y=Z(d.y,a),s.setStyle("y",0),c=!0):(s.y=u.y,s.setStyle("y",u.style.y)),d.labelLinePoints){var p=l.getTextGuideLine();p&&(p.setShape({points:d.labelLinePoints}),c=!1)}var g=ra(s);g.needsUpdateLabelLine=c,s.rotation=d.rotate!=null?d.rotate*h:u.rotation,s.scaleX=u.scaleX,s.scaleY=u.scaleY;for(var f=0;f<po.length;f++){var y=po[f];s.setStyle(y,d[y]!=null?d[y]:u.style[y])}if(d.draggable){if(s.draggable=!0,s.cursor="move",l){var m=r.seriesModel;if(r.dataIndex!=null){var x=r.seriesModel.getData(r.dataType);m=x.getItemModel(r.dataIndex)}s.on("drag",i(l,m.getModel("labelLine")))}}else s.off("drag"),s.cursor=u.cursor}},n.prototype.layout=function(t){var e=t.getWidth(),a=t.getHeight(),i=Ts(this._labelList),o=De(i,function(l){return l.layoutOption.moveOverlap==="shiftX"}),r=De(i,function(l){return l.layoutOption.moveOverlap==="shiftY"});As(o,0,e),Ns(r,0,a);var s=De(i,function(l){return l.layoutOption.hideOverlap});Es(s)},n.prototype.processLabelsOverall=function(){var t=this;E(this._chartViewList,function(e){var a=e.__model,i=e.ignoreLabelLineUpdate,o=a.isAnimationEnabled();e.group.traverse(function(r){if(r.ignore&&!r.forceLabelAnimation)return!0;var s=!i,l=r.getTextContent();!s&&l&&(s=ra(l).needsUpdateLabelLine),s&&t._updateLabelLine(r,a),o&&t._animateLabels(r,a)})})},n.prototype._updateLabelLine=function(t,e){var a=t.getTextContent(),i=ae(t),o=i.dataIndex;if(a&&o!=null){var r=e.getData(i.dataType),s=r.getItemModel(o),l={},u=r.getItemVisual(o,"style");if(u){var d=r.getVisual("drawType");l.stroke=u[d]}var h=s.getModel("labelLine");Li(t,Di(s),l),Ci(t,h)}},n.prototype._animateLabels=function(t,e){var a=t.getTextContent(),i=t.getTextGuideLine();if(a&&(t.forceLabelAnimation||!a.ignore&&!a.invisible&&!t.disableLabelAnimation&&!Ps(t))){var o=ra(a),r=o.oldLayout,s=ae(t),l=s.dataIndex,u={x:a.x,y:a.y,rotation:a.rotation},d=e.getData(s.dataType);if(r){a.attr(r);var h=t.prevStates;h&&(_e(h,"select")>=0&&a.attr(o.oldLayoutSelect),_e(h,"emphasis")>=0&&a.attr(o.oldLayoutEmphasis)),se(a,u,e,l)}else if(a.attr(u),!Rs(a).valueAnimation){var c=Ge(a.style.opacity,1);a.style.opacity=0,Te(a,{style:{opacity:c}},e,l)}if(o.oldLayout=u,a.states.select){var p=o.oldLayoutSelect={};en(p,u,tn),en(p,a.states.select,tn)}if(a.states.emphasis){var g=o.oldLayoutEmphasis={};en(g,u,tn),en(g,a.states.emphasis,tn)}Vs(a,l,d,e,e)}if(i&&!i.ignore&&!i.invisible){var o=Uu(i),r=o.oldLayout,f={points:i.shape.points};r?(i.attr({shape:r}),se(i,{shape:f},e)):(i.setShape(f),i.style.strokePercent=0,Te(i,{style:{strokePercent:1}},e)),o.oldLayout=f}},n}();const qu=ju;var sa=xe();function Ku(n){n.registerUpdateLifecycle("series:beforeupdate",function(t,e,a){var i=sa(e).labelManager;i||(i=sa(e).labelManager=new qu),i.clearLabels()}),n.registerUpdateLifecycle("series:layoutlabels",function(t,e,a){var i=sa(e).labelManager;a.updatedSeries.forEach(function(o){i.addLabelsOfSeries(e.getViewOfSeriesModel(o))}),i.updateLayoutConfig(e),i.layout(e),i.processLabelsOverall()})}function Qu(n){var t=n;t.hierNode={defaultAncestor:null,ancestor:t,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var e=[t],a,i;a=e.pop();)if(i=a.children,a.isExpand&&i.length)for(var o=i.length,r=o-1;r>=0;r--){var s=i[r];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:r,thread:null},e.push(s)}}function $u(n,t){var e=n.isExpand?n.children:[],a=n.parentNode.children,i=n.hierNode.i?a[n.hierNode.i-1]:null;if(e.length){td(n);var o=(e[0].hierNode.prelim+e[e.length-1].hierNode.prelim)/2;i?(n.hierNode.prelim=i.hierNode.prelim+t(n,i),n.hierNode.modifier=n.hierNode.prelim-o):n.hierNode.prelim=o}else i&&(n.hierNode.prelim=i.hierNode.prelim+t(n,i));n.parentNode.hierNode.defaultAncestor=nd(n,i,n.parentNode.hierNode.defaultAncestor||a[0],t)}function Ju(n){var t=n.hierNode.prelim+n.parentNode.hierNode.modifier;n.setLayout({x:t},!0),n.hierNode.modifier+=n.parentNode.hierNode.modifier}function fo(n){return arguments.length?n:od}function Mt(n,t){return n-=Math.PI/2,{x:t*Math.cos(n),y:t*Math.sin(n)}}function ed(n,t){return it(n.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function td(n){for(var t=n.children,e=t.length,a=0,i=0;--e>=0;){var o=t[e];o.hierNode.prelim+=a,o.hierNode.modifier+=a,i+=o.hierNode.change,a+=o.hierNode.shift+i}}function nd(n,t,e,a){if(t){for(var i=n,o=n,r=o.parentNode.children[0],s=t,l=i.hierNode.modifier,u=o.hierNode.modifier,d=r.hierNode.modifier,h=s.hierNode.modifier;s=la(s),o=ua(o),s&&o;){i=la(i),r=ua(r),i.hierNode.ancestor=n;var c=s.hierNode.prelim+h-o.hierNode.prelim-u+a(s,o);c>0&&(id(ad(s,n,e),n,c),u+=c,l+=c),h+=s.hierNode.modifier,u+=o.hierNode.modifier,l+=i.hierNode.modifier,d+=r.hierNode.modifier}s&&!la(i)&&(i.hierNode.thread=s,i.hierNode.modifier+=h-l),o&&!ua(r)&&(r.hierNode.thread=o,r.hierNode.modifier+=u-d,e=n)}return e}function la(n){var t=n.children;return t.length&&n.isExpand?t[t.length-1]:n.hierNode.thread}function ua(n){var t=n.children;return t.length&&n.isExpand?t[0]:n.hierNode.thread}function ad(n,t,e){return n.hierNode.ancestor.parentNode===t.parentNode?n.hierNode.ancestor:e}function id(n,t,e){var a=e/(t.hierNode.i-n.hierNode.i);t.hierNode.change-=a,t.hierNode.shift+=e,t.hierNode.modifier+=e,t.hierNode.prelim+=e,n.hierNode.change+=a}function od(n,t){return n.parentNode===t.parentNode?1:2}var rd=function(){function n(){this.parentPoint=[],this.childPoints=[]}return n}(),sd=function(n){V(t,n);function t(e){return n.call(this,e)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new rd},t.prototype.buildPath=function(e,a){var i=a.childPoints,o=i.length,r=a.parentPoint,s=i[0],l=i[o-1];if(o===1){e.moveTo(r[0],r[1]),e.lineTo(s[0],s[1]);return}var u=a.orient,d=u==="TB"||u==="BT"?0:1,h=1-d,c=Z(a.forkPosition,1),p=[];p[d]=r[d],p[h]=r[h]+(l[h]-r[h])*c,e.moveTo(r[0],r[1]),e.lineTo(p[0],p[1]),e.moveTo(s[0],s[1]),p[d]=s[d],e.lineTo(p[0],p[1]),p[d]=l[d],e.lineTo(p[0],p[1]),e.lineTo(l[0],l[1]);for(var g=1;g<o-1;g++){var f=i[g];e.moveTo(f[0],f[1]),p[d]=f[d],e.lineTo(p[0],p[1])}},t}(ye),ld=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e._mainGroup=new oe,e}return t.prototype.init=function(e,a){this._controller=new Mn(a.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},t.prototype.render=function(e,a,i){var o=e.getData(),r=e.layoutInfo,s=this._mainGroup,l=e.get("layout");l==="radial"?(s.x=r.x+r.width/2,s.y=r.y+r.height/2):(s.x=r.x,s.y=r.y),this._updateViewCoordSys(e,i),this._updateController(e,a,i);var u=this._data;o.diff(u).add(function(d){go(o,d)&&yo(o,d,null,s,e)}).update(function(d,h){var c=u.getItemGraphicEl(h);if(!go(o,d)){c&&xo(u,h,c,s,e);return}yo(o,d,c,s,e)}).remove(function(d){var h=u.getItemGraphicEl(d);h&&xo(u,d,h,s,e)}).execute(),this._nodeScaleRatio=e.get("nodeScaleRatio"),this._updateNodeAndLinkScale(e),e.get("expandAndCollapse")===!0&&o.eachItemGraphicEl(function(d,h){d.off("click").on("click",function(){i.dispatchAction({type:"treeExpandAndCollapse",seriesId:e.id,dataIndex:h})})}),this._data=o},t.prototype._updateViewCoordSys=function(e,a){var i=e.getData(),o=[];i.each(function(h){var c=i.getItemLayout(h);c&&!isNaN(c.x)&&!isNaN(c.y)&&o.push([+c.x,+c.y])});var r=[],s=[];Ot(o,r,s);var l=this._min,u=this._max;s[0]-r[0]===0&&(r[0]=l?l[0]:r[0]-1,s[0]=u?u[0]:s[0]+1),s[1]-r[1]===0&&(r[1]=l?l[1]:r[1]-1,s[1]=u?u[1]:s[1]+1);var d=e.coordinateSystem=new Ln;d.zoomLimit=e.get("scaleLimit"),d.setBoundingRect(r[0],r[1],s[0]-r[0],s[1]-r[1]),d.setCenter(e.get("center"),a),d.setZoom(e.get("zoom")),this.group.attr({x:d.x,y:d.y,scaleX:d.scaleX,scaleY:d.scaleY}),this._min=r,this._max=s},t.prototype._updateController=function(e,a,i){var o=this,r=this._controller,s=this._controllerHost,l=this.group;r.setPointerChecker(function(u,d,h){var c=l.getBoundingRect();return c.applyTransform(l.transform),c.contain(d,h)&&!Ti(u,i,e)}),r.enable(e.get("roam")),s.zoomLimit=e.get("scaleLimit"),s.zoom=e.coordinateSystem.getZoom(),r.off("pan").off("zoom").on("pan",function(u){Ai(s,u.dx,u.dy),i.dispatchAction({seriesId:e.id,type:"treeRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){Ni(s,u.scale,u.originX,u.originY),i.dispatchAction({seriesId:e.id,type:"treeRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),o._updateNodeAndLinkScale(e),i.updateLabelLayout()})},t.prototype._updateNodeAndLinkScale=function(e){var a=e.getData(),i=this._getNodeGlobalScale(e);a.eachItemGraphicEl(function(o,r){o.setSymbolScale(i)})},t.prototype._getNodeGlobalScale=function(e){var a=e.coordinateSystem;if(a.type!=="view")return 1;var i=this._nodeScaleRatio,o=a.scaleX||1,r=a.getZoom(),s=(r-1)*i+1;return s/o},t.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype.remove=function(){this._mainGroup.removeAll(),this._data=null},t.type="tree",t}(he);function go(n,t){var e=n.getItemLayout(t);return e&&!isNaN(e.x)&&!isNaN(e.y)}function yo(n,t,e,a,i){var o=!e,r=n.tree.getNodeByDataIndex(t),s=r.getModel(),l=r.getVisual("style").fill,u=r.isExpand===!1&&r.children.length!==0?l:"#fff",d=n.tree.root,h=r.parentNode===d?r:r.parentNode||r,c=n.getItemGraphicEl(h.dataIndex),p=h.getLayout(),g=c?{x:c.__oldX,y:c.__oldY,rawX:c.__radialOldRawX,rawY:c.__radialOldRawY}:p,f=r.getLayout();o?(e=new Ei(n,t,null,{symbolInnerColor:u,useNameLabel:!0}),e.x=g.x,e.y=g.y):e.updateData(n,t,null,{symbolInnerColor:u,useNameLabel:!0}),e.__radialOldRawX=e.__radialRawX,e.__radialOldRawY=e.__radialRawY,e.__radialRawX=f.rawX,e.__radialRawY=f.rawY,a.add(e),n.setItemGraphicEl(t,e),e.__oldX=e.x,e.__oldY=e.y,se(e,{x:f.x,y:f.y},i);var y=e.getSymbolPath();if(i.get("layout")==="radial"){var m=d.children[0],x=m.getLayout(),v=m.children.length,I=void 0,_=void 0;if(f.x===x.x&&r.isExpand===!0&&m.children.length){var b={x:(m.children[0].getLayout().x+m.children[v-1].getLayout().x)/2,y:(m.children[0].getLayout().y+m.children[v-1].getLayout().y)/2};I=Math.atan2(b.y-x.y,b.x-x.x),I<0&&(I=Math.PI*2+I),_=b.x<x.x,_&&(I=I-Math.PI)}else I=Math.atan2(f.y-x.y,f.x-x.x),I<0&&(I=Math.PI*2+I),r.children.length===0||r.children.length!==0&&r.isExpand===!1?(_=f.x<x.x,_&&(I=I-Math.PI)):(_=f.x>x.x,_||(I=I-Math.PI));var w=_?"left":"right",M=s.getModel("label"),S=M.get("rotate"),L=S*(Math.PI/180),D=y.getTextContent();D&&(y.setTextConfig({position:M.get("position")||w,rotation:S==null?-I:L,origin:"center"}),D.setStyle("verticalAlign","middle"))}var C=s.get(["emphasis","focus"]),N=C==="relative"?Dn(r.getAncestorsIndices(),r.getDescendantIndices()):C==="ancestor"?r.getAncestorsIndices():C==="descendant"?r.getDescendantIndices():null;N&&(ae(e).focus=N),ud(i,r,d,e,g,p,f,a),e.__edge&&(e.onHoverStateChange=function(T){if(T!=="blur"){var A=r.parentNode&&n.getItemGraphicEl(r.parentNode.dataIndex);A&&A.hoverState===ks||zs(e.__edge,T)}})}function ud(n,t,e,a,i,o,r,s){var l=t.getModel(),u=n.get("edgeShape"),d=n.get("layout"),h=n.getOrient(),c=n.get(["lineStyle","curveness"]),p=n.get("edgeForkPosition"),g=l.getModel("lineStyle").getLineStyle(),f=a.__edge;if(u==="curve")t.parentNode&&t.parentNode!==e&&(f||(f=a.__edge=new Pi({shape:da(d,h,c,i,i)})),se(f,{shape:da(d,h,c,o,r)},n));else if(u==="polyline"&&d==="orthogonal"&&t!==e&&t.children&&t.children.length!==0&&t.isExpand===!0){for(var y=t.children,m=[],x=0;x<y.length;x++){var v=y[x].getLayout();m.push([v.x,v.y])}f||(f=a.__edge=new sd({shape:{parentPoint:[r.x,r.y],childPoints:[[r.x,r.y]],orient:h,forkPosition:p}})),se(f,{shape:{parentPoint:[r.x,r.y],childPoints:m}},n)}f&&!(u==="polyline"&&!t.isExpand)&&(f.useStyle(ce({strokeNoScale:!0,fill:null},g)),Re(f,l,"lineStyle"),Gt(f),s.add(f))}function vo(n,t,e,a,i){var o=t.tree.root,r=mo(o,n),s=r.source,l=r.sourceLayout,u=t.getItemGraphicEl(n.dataIndex);if(u){var d=t.getItemGraphicEl(s.dataIndex),h=d.__edge,c=u.__edge||(s.isExpand===!1||s.children.length===1?h:void 0),p=a.get("edgeShape"),g=a.get("layout"),f=a.get("orient"),y=a.get(["lineStyle","curveness"]);c&&(p==="curve"?Cn(c,{shape:da(g,f,y,l,l),style:{opacity:0}},a,{cb:function(){e.remove(c)},removeOpt:i}):p==="polyline"&&a.get("layout")==="orthogonal"&&Cn(c,{shape:{parentPoint:[l.x,l.y],childPoints:[[l.x,l.y]]},style:{opacity:0}},a,{cb:function(){e.remove(c)},removeOpt:i}))}}function mo(n,t){for(var e=t.parentNode===n?t:t.parentNode||t,a;a=e.getLayout(),a==null;)e=e.parentNode===n?e:e.parentNode||e;return{source:e,sourceLayout:a}}function xo(n,t,e,a,i){var o=n.tree.getNodeByDataIndex(t),r=n.tree.root,s=mo(r,o).sourceLayout,l={duration:i.get("animationDurationUpdate"),easing:i.get("animationEasingUpdate")};Cn(e,{x:s.x+1,y:s.y+1},i,{cb:function(){a.remove(e),n.setItemGraphicEl(t,null)},removeOpt:l}),e.fadeOut(null,n.hostModel,{fadeLabel:!0,animation:l}),o.children.forEach(function(u){vo(u,n,a,i,l)}),vo(o,n,a,i,l)}function da(n,t,e,a,i){var o,r,s,l,u,d,h,c;if(n==="radial"){u=a.rawX,h=a.rawY,d=i.rawX,c=i.rawY;var p=Mt(u,h),g=Mt(u,h+(c-h)*e),f=Mt(d,c+(h-c)*e),y=Mt(d,c);return{x1:p.x||0,y1:p.y||0,x2:y.x||0,y2:y.y||0,cpx1:g.x||0,cpy1:g.y||0,cpx2:f.x||0,cpy2:f.y||0}}else u=a.x,h=a.y,d=i.x,c=i.y,(t==="LR"||t==="RL")&&(o=u+(d-u)*e,r=h,s=d+(u-d)*e,l=c),(t==="TB"||t==="BT")&&(o=u,r=h+(c-h)*e,s=d,l=c+(h-c)*e);return{x1:u,y1:h,x2:d,y2:c,cpx1:o,cpy1:r,cpx2:s,cpy2:l}}const dd=ld;var we=xe();function _o(n){var t=n.mainData,e=n.datas;e||(e={main:t},n.datasAttr={main:"data"}),n.datas=n.mainData=null,Io(t,e,n),E(e,function(a){E(t.TRANSFERABLE_METHODS,function(i){a.wrapMethod(i,te(hd,n))})}),t.wrapMethod("cloneShallow",te(pd,n)),E(t.CHANGABLE_METHODS,function(a){t.wrapMethod(a,te(cd,n))}),Os(e[t.dataType]===t)}function hd(n,t){if(yd(this)){var e=W({},we(this).datas);e[this.dataType]=t,Io(t,e,n)}else ha(t,this.dataType,we(this).mainData,n);return t}function cd(n,t){return n.struct&&n.struct.update(),t}function pd(n,t){return E(we(t).datas,function(e,a){e!==t&&ha(e.cloneShallow(),a,t,n)}),t}function fd(n){var t=we(this).mainData;return n==null||t==null?t:we(t).datas[n]}function gd(){var n=we(this).mainData;return n==null?[{data:n}]:F(Sn(we(n).datas),function(t){return{type:t,data:we(n).datas[t]}})}function yd(n){return we(n).mainData===n}function Io(n,t,e){we(n).datas={},E(t,function(a,i){ha(a,i,n,e)})}function ha(n,t,e,a){we(e).datas[t]=n,we(n).mainData=e,n.dataType=t,a.struct&&(n[a.structAttr]=a.struct,a.struct[a.datasAttr[t]]=n),n.getLinkedData=fd,n.getLinkedDataAll=gd}var vd=function(){function n(t,e){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=t||"",this.hostTree=e}return n.prototype.isRemoved=function(){return this.dataIndex<0},n.prototype.eachNode=function(t,e,a){ie(t)&&(a=e,e=t,t=null),t=t||{},be(t)&&(t={order:t});var i=t.order||"preorder",o=this[t.attr||"children"],r;i==="preorder"&&(r=e.call(a,this));for(var s=0;!r&&s<o.length;s++)o[s].eachNode(t,e,a);i==="postorder"&&e.call(a,this)},n.prototype.updateDepthAndHeight=function(t){var e=0;this.depth=t;for(var a=0;a<this.children.length;a++){var i=this.children[a];i.updateDepthAndHeight(t+1),i.height>e&&(e=i.height)}this.height=e+1},n.prototype.getNodeById=function(t){if(this.getId()===t)return this;for(var e=0,a=this.children,i=a.length;e<i;e++){var o=a[e].getNodeById(t);if(o)return o}},n.prototype.contains=function(t){if(t===this)return!0;for(var e=0,a=this.children,i=a.length;e<i;e++){var o=a[e].contains(t);if(o)return o}},n.prototype.getAncestors=function(t){for(var e=[],a=t?this:this.parentNode;a;)e.push(a),a=a.parentNode;return e.reverse(),e},n.prototype.getAncestorsIndices=function(){for(var t=[],e=this;e;)t.push(e.dataIndex),e=e.parentNode;return t.reverse(),t},n.prototype.getDescendantIndices=function(){var t=[];return this.eachNode(function(e){t.push(e.dataIndex)}),t},n.prototype.getValue=function(t){var e=this.hostTree.data;return e.getStore().get(e.getDimensionIndex(t||"value"),this.dataIndex)},n.prototype.setLayout=function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},n.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},n.prototype.getModel=function(t){if(!(this.dataIndex<0)){var e=this.hostTree,a=e.data.getItemModel(this.dataIndex);return a.getModel(t)}},n.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},n.prototype.setVisual=function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},n.prototype.getVisual=function(t){return this.hostTree.data.getItemVisual(this.dataIndex,t)},n.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},n.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},n.prototype.getChildIndex=function(){if(this.parentNode){for(var t=this.parentNode.children,e=0;e<t.length;++e)if(t[e]===this)return e;return-1}return-1},n.prototype.isAncestorOf=function(t){for(var e=t.parentNode;e;){if(e===this)return!0;e=e.parentNode}return!1},n.prototype.isDescendantOf=function(t){return t!==this&&t.isAncestorOf(this)},n}(),md=function(){function n(t){this.type="tree",this._nodes=[],this.hostModel=t}return n.prototype.eachNode=function(t,e,a){this.root.eachNode(t,e,a)},n.prototype.getNodeByDataIndex=function(t){var e=this.data.getRawIndex(t);return this._nodes[e]},n.prototype.getNodeById=function(t){return this.root.getNodeById(t)},n.prototype.update=function(){for(var t=this.data,e=this._nodes,a=0,i=e.length;a<i;a++)e[a].dataIndex=-1;for(var a=0,i=t.count();a<i;a++)e[t.getRawIndex(a)].dataIndex=a},n.prototype.clearLayouts=function(){this.data.clearItemLayouts()},n.createTree=function(t,e,a){var i=new n(e),o=[],r=1;s(t);function s(d,h){var c=d.value;r=Math.max(r,G(c)?c.length:1),o.push(d);var p=new vd(Bt(d.name,""),i);h?xd(p,h):i.root=p,i._nodes.push(p);var g=d.children;if(g)for(var f=0;f<g.length;f++)s(g[f],p)}i.root.updateDepthAndHeight(0);var l=Tn(o,{coordDimensions:["value"],dimensionsCount:r}).dimensions,u=new Ie(l,e);return u.initData(o),a&&a(u),_o({mainData:u,struct:i,structAttr:"tree"}),i.update(),i},n}();function xd(n,t){var e=t.children;n.parentNode!==t&&(e.push(n),n.parentNode=t)}const ca=md;function Lt(n,t,e){if(n&&_e(t,n.type)>=0){var a=e.getData().tree.root,i=n.targetNode;if(be(i)&&(i=a.getNodeById(i)),i&&a.contains(i))return{node:i};var o=n.targetNodeId;if(o!=null&&(i=a.getNodeById(o)))return{node:i}}}function bo(n){for(var t=[];n;)n=n.parentNode,n&&t.push(n);return t.reverse()}function pa(n,t){var e=bo(n);return _e(e,t)>=0}function nn(n,t){for(var e=[];n;){var a=n.dataIndex;e.push({name:n.name,dataIndex:a,value:t.getRawValue(a)}),n=n.parentNode}return e.reverse(),e}var _d=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.hasSymbolVisual=!0,e.ignoreStyleOnData=!0,e}return t.prototype.getInitialData=function(e){var a={name:e.name,children:e.data},i=e.leaves||{},o=new Be(i,this,this.ecModel),r=ca.createTree(a,this,s);function s(h){h.wrapMethod("getItemModel",function(c,p){var g=r.getNodeByDataIndex(p);return g&&g.children.length&&g.isExpand||(c.parentModel=o),c})}var l=0;r.eachNode("preorder",function(h){h.depth>l&&(l=h.depth)});var u=e.expandAndCollapse,d=u&&e.initialTreeDepth>=0?e.initialTreeDepth:l;return r.root.eachNode("preorder",function(h){var c=h.hostTree.data.getRawDataItem(h.dataIndex);h.isExpand=c&&c.collapsed!=null?!c.collapsed:h.depth<=d}),r.data},t.prototype.getOrient=function(){var e=this.get("orient");return e==="horizontal"?e="LR":e==="vertical"&&(e="TB"),e},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.formatTooltip=function(e,a,i){for(var o=this.getData().tree,r=o.root.children[0],s=o.getNodeByDataIndex(e),l=s.getValue(),u=s.name;s&&s!==r;)u=s.parentNode.name+"."+u,s=s.parentNode;return Ve("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},t.prototype.getDataParams=function(e){var a=n.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return a.treeAncestors=nn(i,this),a.collapsed=!i.isExpand,a},t.type="series.tree",t.layoutMode="box",t.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},t}(pe);const Id=_d;function bd(n,t,e){for(var a=[n],i=[],o;o=a.pop();)if(i.push(o),o.isExpand){var r=o.children;if(r.length)for(var s=0;s<r.length;s++)a.push(r[s])}for(;o=i.pop();)t(o,e)}function Dt(n,t){for(var e=[n],a;a=e.pop();)if(t(a),a.isExpand){var i=a.children;if(i.length)for(var o=i.length-1;o>=0;o--)e.push(i[o])}}function wd(n,t){n.eachSeriesByType("tree",function(e){Sd(e,t)})}function Sd(n,t){var e=ed(n,t);n.layoutInfo=e;var a=n.get("layout"),i=0,o=0,r=null;a==="radial"?(i=2*Math.PI,o=Math.min(e.height,e.width)/2,r=fo(function(v,I){return(v.parentNode===I.parentNode?1:2)/v.depth})):(i=e.width,o=e.height,r=fo());var s=n.getData().tree.root,l=s.children[0];if(l){Qu(s),bd(l,$u,r),s.hierNode.modifier=-l.hierNode.prelim,Dt(l,Ju);var u=l,d=l,h=l;Dt(l,function(v){var I=v.getLayout().x;I<u.getLayout().x&&(u=v),I>d.getLayout().x&&(d=v),v.depth>h.depth&&(h=v)});var c=u===d?1:r(u,d)/2,p=c-u.getLayout().x,g=0,f=0,y=0,m=0;if(a==="radial")g=i/(d.getLayout().x+c+p),f=o/(h.depth-1||1),Dt(l,function(v){y=(v.getLayout().x+p)*g,m=(v.depth-1)*f;var I=Mt(y,m);v.setLayout({x:I.x,y:I.y,rawX:y,rawY:m},!0)});else{var x=n.getOrient();x==="RL"||x==="LR"?(f=o/(d.getLayout().x+c+p),g=i/(h.depth-1||1),Dt(l,function(v){m=(v.getLayout().x+p)*f,y=x==="LR"?(v.depth-1)*g:i-(v.depth-1)*g,v.setLayout({x:y,y:m},!0)})):(x==="TB"||x==="BT")&&(g=i/(d.getLayout().x+c+p),f=o/(h.depth-1||1),Dt(l,function(v){y=(v.getLayout().x+p)*g,m=x==="TB"?(v.depth-1)*f:o-(v.depth-1)*f,v.setLayout({x:y,y:m},!0)}))}}}function Md(n){n.eachSeriesByType("tree",function(t){var e=t.getData(),a=e.tree;a.eachNode(function(i){var o=i.getModel(),r=o.getModel("itemStyle").getItemStyle(),s=e.ensureUniqueItemVisual(i.dataIndex,"style");W(s,r)})})}function Ld(n){n.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(t,e){e.eachComponent({mainType:"series",subType:"tree",query:t},function(a){var i=t.dataIndex,o=a.getData().tree,r=o.getNodeByDataIndex(i);r.isExpand=!r.isExpand})}),n.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(t,e,a){e.eachComponent({mainType:"series",subType:"tree",query:t},function(i){var o=i.coordinateSystem,r=Ri(o,t,void 0,a);i.setCenter&&i.setCenter(r.center),i.setZoom&&i.setZoom(r.zoom)})})}function Dd(n){n.registerChartView(dd),n.registerSeriesModel(Id),n.registerLayout(wd),n.registerVisual(Md),Ld(n)}var wo=["treemapZoomToNode","treemapRender","treemapMove"];function Cd(n){for(var t=0;t<wo.length;t++)n.registerAction({type:wo[t],update:"updateView"},yt);n.registerAction({type:"treemapRootToNode",update:"updateView"},function(e,a){a.eachComponent({mainType:"series",subType:"treemap",query:e},i);function i(o,r){var s=["treemapZoomToNode","treemapRootToNode"],l=Lt(e,s,o);if(l){var u=o.getViewRoot();u&&(e.direction=pa(u,l.node)?"rollUp":"drillDown"),o.resetViewRoot(l.node)}}})}function So(n){var t=n.getData(),e=t.tree,a={};e.eachNode(function(i){for(var o=i;o&&o.depth>1;)o=o.parentNode;var r=Gs(n.ecModel,o.name||o.dataIndex+"",a);i.setVisual("decal",r)})}var Td=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.preventUsingHoverLayer=!0,e}return t.prototype.getInitialData=function(e,a){var i={name:e.name,children:e.data};Mo(i);var o=e.levels||[],r=this.designatedVisualItemStyle={},s=new Be({itemStyle:r},this,a);o=e.levels=Ad(o,a);var l=F(o||[],function(h){return new Be(h,s,a)},this),u=ca.createTree(i,this,d);function d(h){h.wrapMethod("getItemModel",function(c,p){var g=u.getNodeByDataIndex(p),f=g?l[g.depth]:null;return c.parentModel=f||s,c})}return u.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.formatTooltip=function(e,a,i){var o=this.getData(),r=this.getRawValue(e),s=o.getName(e);return Ve("nameValue",{name:s,value:r})},t.prototype.getDataParams=function(e){var a=n.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return a.treeAncestors=nn(i,this),a.treePathInfo=a.treeAncestors,a},t.prototype.setLayoutInfo=function(e){this.layoutInfo=this.layoutInfo||{},W(this.layoutInfo,e)},t.prototype.mapIdToIndex=function(e){var a=this._idIndexMap;a||(a=this._idIndexMap=ve(),this._idIndexMapCount=0);var i=a.get(e);return i==null&&a.set(e,i=this._idIndexMapCount++),i},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var a=this.getRawData().tree.root;(!e||e!==a&&!a.contains(e))&&(this._viewRoot=a)},t.prototype.enableAriaDecal=function(){So(this)},t.type="series.treemap",t.layoutMode="box",t.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"\u25B6",zoomToNodeRatio:.32*.32,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}},emphasis:{itemStyle:{color:"rgba(0,0,0,0.9)"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},t}(pe);function Mo(n){var t=0;E(n.children,function(a){Mo(a);var i=a.value;G(i)&&(i=i[0]),t+=i});var e=n.value;G(e)&&(e=e[0]),(e==null||isNaN(e))&&(e=t),e<0&&(e=0),G(n.value)?n.value[0]=e:n.value=e}function Ad(n,t){var e=ke(t.get("color")),a=ke(t.get(["aria","decal","decals"]));if(e){n=n||[];var i,o;E(n,function(s){var l=new Be(s),u=l.get("color"),d=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(i=!0),(l.get(["itemStyle","decal"])||d&&d!=="none")&&(o=!0)});var r=n[0]||(n[0]={});return i||(r.color=e.slice()),!o&&a&&(r.decal=a.slice()),n}}const Nd=Td;var Ed=8,Lo=8,fa=5,Pd=function(){function n(t){this.group=new oe,t.add(this.group)}return n.prototype.render=function(t,e,a,i){var o=t.getModel("breadcrumb"),r=this.group;if(r.removeAll(),!(!o.get("show")||!a)){var s=o.getModel("itemStyle"),l=o.getModel("emphasis"),u=s.getModel("textStyle"),d=l.getModel(["itemStyle","textStyle"]),h={pos:{left:o.get("left"),right:o.get("right"),top:o.get("top"),bottom:o.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:o.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(a,h,u),this._renderContent(t,h,s,l,u,d,i),Bs(r,h.pos,h.box)}},n.prototype._prepare=function(t,e,a){for(var i=t;i;i=i.parentNode){var o=Bt(i.getModel().get("name"),""),r=a.getTextRect(o),s=Math.max(r.width+Ed*2,e.emptyItemWidth);e.totalWidth+=s+Lo,e.renderList.push({node:i,text:o,width:s})}},n.prototype._renderContent=function(t,e,a,i,o,r,s){for(var l=0,u=e.emptyItemWidth,d=t.get(["breadcrumb","height"]),h=Fs(e.pos,e.box),c=e.totalWidth,p=e.renderList,g=i.getModel("itemStyle").getItemStyle(),f=p.length-1;f>=0;f--){var y=p[f],m=y.node,x=y.width,v=y.text;c>h.width&&(c-=x-u,x=u,v=null);var I=new vt({shape:{points:Rd(l,0,x,d,f===p.length-1,f===0)},style:ce(a.getItemStyle(),{lineJoin:"bevel"}),textContent:new Ft({style:mt(o,{text:v})}),textConfig:{position:"inside"},z2:Ht*1e4,onclick:te(s,m)});I.disableLabelAnimation=!0,I.getTextContent().ensureState("emphasis").style=mt(r,{text:v}),I.ensureState("emphasis").style=g,fe(I,i.get("focus"),i.get("blurScope"),i.get("disabled")),this.group.add(I),Vd(I,t,m),l+=x+Lo}},n.prototype.remove=function(){this.group.removeAll()},n}();function Rd(n,t,e,a,i,o){var r=[[i?n:n-fa,t],[n+e,t],[n+e,t+a],[i?n:n-fa,t+a]];return!o&&r.splice(2,0,[n+e+fa,t+a/2]),!i&&r.push([n,t+a/2]),r}function Vd(n,t,e){ae(n).eventData={componentType:"series",componentSubType:"treemap",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:e&&e.dataIndex,name:e&&e.name},treePathInfo:e&&nn(e,t)}}const kd=Pd;var zd=function(){function n(){this._storage=[],this._elExistsMap={}}return n.prototype.add=function(t,e,a,i,o){return this._elExistsMap[t.id]?!1:(this._elExistsMap[t.id]=!0,this._storage.push({el:t,target:e,duration:a,delay:i,easing:o}),!0)},n.prototype.finished=function(t){return this._finishedCallback=t,this},n.prototype.start=function(){for(var t=this,e=this._storage.length,a=function(){e--,e<=0&&(t._storage.length=0,t._elExistsMap={},t._finishedCallback&&t._finishedCallback())},i=0,o=this._storage.length;i<o;i++){var r=this._storage[i];r.el.animateTo(r.target,{duration:r.duration,delay:r.delay,easing:r.easing,setToFinal:!0,done:a,aborted:a})}return this},n}();function Od(){return new zd}var ga=oe,Do=He,Co=3,To="label",Ao="upperLabel",Gd=Ht*10,Bd=Ht*2,Fd=Ht*3,Je=Hs([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),No=function(n){var t=Je(n);return t.stroke=t.fill=t.lineWidth=null,t},an=xe(),Hd=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e._state="ready",e._storage=Ct(),e}return t.prototype.render=function(e,a,i,o){var r=a.findComponents({mainType:"series",subType:"treemap",query:o});if(!(_e(r,e)<0)){this.seriesModel=e,this.api=i,this.ecModel=a;var s=["treemapZoomToNode","treemapRootToNode"],l=Lt(o,s,e),u=o&&o.type,d=e.layoutInfo,h=!this._oldTree,c=this._storage,p=u==="treemapRootToNode"&&l&&c?{rootNodeGroup:c.nodeGroup[l.node.getRawIndex()],direction:o.direction}:null,g=this._giveContainerGroup(d),f=e.get("animation"),y=this._doRender(g,e,p);f&&!h&&(!u||u==="treemapZoomToNode"||u==="treemapRootToNode")?this._doAnimation(g,y,e,p):y.renderFinally(),this._resetController(i),this._renderBreadcrumb(e,i,l)}},t.prototype._giveContainerGroup=function(e){var a=this._containerGroup;return a||(a=this._containerGroup=new ga,this._initEvents(a),this.group.add(a)),a.x=e.x,a.y=e.y,a},t.prototype._doRender=function(e,a,i){var o=a.getData().tree,r=this._oldTree,s=Ct(),l=Ct(),u=this._storage,d=[];function h(y,m,x,v){return Wd(a,l,u,i,s,d,y,m,x,v)}p(o.root?[o.root]:[],r&&r.root?[r.root]:[],e,o===r||!r,0);var c=g(u);return this._oldTree=o,this._storage=l,{lastsForAnimation:s,willDeleteEls:c,renderFinally:f};function p(y,m,x,v,I){v?(m=y,E(y,function(w,M){!w.isRemoved()&&b(M,M)})):new ot(m,y,_,_).add(b).update(b).remove(te(b,null)).execute();function _(w){return w.getId()}function b(w,M){var S=w!=null?y[w]:null,L=M!=null?m[M]:null,D=h(S,L,x,I);D&&p(S&&S.viewChildren||[],L&&L.viewChildren||[],D,v,I+1)}}function g(y){var m=Ct();return y&&E(y,function(x,v){var I=m[v];E(x,function(_){_&&(I.push(_),an(_).willDelete=!0)})}),m}function f(){E(c,function(y){E(y,function(m){m.parent&&m.parent.remove(m)})}),E(d,function(y){y.invisible=!0,y.dirty()})}},t.prototype._doAnimation=function(e,a,i,o){var r=i.get("animationDurationUpdate"),s=i.get("animationEasing"),l=(ie(r)?0:r)||0,u=(ie(s)?null:s)||"cubicOut",d=Od();E(a.willDeleteEls,function(h,c){E(h,function(p,g){if(!p.invisible){var f=p.parent,y,m=an(f);if(o&&o.direction==="drillDown")y=f===o.rootNodeGroup?{shape:{x:0,y:0,width:m.nodeWidth,height:m.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var x=0,v=0;m.willDelete||(x=m.nodeWidth/2,v=m.nodeHeight/2),y=c==="nodeGroup"?{x,y:v,style:{opacity:0}}:{shape:{x,y:v,width:0,height:0},style:{opacity:0}}}y&&d.add(p,y,l,0,u)}})}),E(this._storage,function(h,c){E(h,function(p,g){var f=a.lastsForAnimation[c][g],y={};f&&(p instanceof oe?f.oldX!=null&&(y.x=p.x,y.y=p.y,p.x=f.oldX,p.y=f.oldY):(f.oldShape&&(y.shape=W({},p.shape),p.setShape(f.oldShape)),f.fadein?(p.setStyle("opacity",0),y.style={opacity:1}):p.style.opacity!==1&&(y.style={opacity:1})),d.add(p,y,l,0,u))})},this),this._state="animating",d.finished(re(function(){this._state="ready",a.renderFinally()},this)).start()},t.prototype._resetController=function(e){var a=this._controller;a||(a=this._controller=new Mn(e.getZr()),a.enable(this.seriesModel.get("roam")),a.on("pan",re(this._onPan,this)),a.on("zoom",re(this._onZoom,this)));var i=new de(0,0,e.getWidth(),e.getHeight());a.setPointerChecker(function(o,r,s){return i.contain(r,s)})},t.prototype._clearController=function(){var e=this._controller;e&&(e.dispose(),e=null)},t.prototype._onPan=function(e){if(this._state!=="animating"&&(Math.abs(e.dx)>Co||Math.abs(e.dy)>Co)){var a=this.seriesModel.getData().tree.root;if(!a)return;var i=a.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+e.dx,y:i.y+e.dy,width:i.width,height:i.height}})}},t.prototype._onZoom=function(e){var a=e.originX,i=e.originY;if(this._state!=="animating"){var o=this.seriesModel.getData().tree.root;if(!o)return;var r=o.getLayout();if(!r)return;var s=new de(r.x,r.y,r.width,r.height),l=this.seriesModel.layoutInfo;a-=l.x,i-=l.y;var u=Xs();Vi(u,u,[-a,-i]),Ws(u,u,[e.scale,e.scale]),Vi(u,u,[a,i]),s.applyTransform(u),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:s.x,y:s.y,width:s.width,height:s.height}})}},t.prototype._initEvents=function(e){var a=this;e.on("click",function(i){if(a._state==="ready"){var o=a.seriesModel.get("nodeClick",!0);if(o){var r=a.findTarget(i.offsetX,i.offsetY);if(r){var s=r.node;if(s.getLayout().isLeafRoot)a._rootToNode(r);else if(o==="zoomToNode")a._zoomToNode(r);else if(o==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),d=l.get("target",!0)||"blank";u&&ki(u,d)}}}}},this)},t.prototype._renderBreadcrumb=function(e,a,i){var o=this;i||(i=e.get("leafDepth",!0)!=null?{node:e.getViewRoot()}:this.findTarget(a.getWidth()/2,a.getHeight()/2),i||(i={node:e.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new kd(this.group))).render(e,a,i.node,function(r){o._state!=="animating"&&(pa(e.getViewRoot(),r)?o._rootToNode({node:r}):o._zoomToNode({node:r}))})},t.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=Ct(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},t.prototype.dispose=function(){this._clearController()},t.prototype._zoomToNode=function(e){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype._rootToNode=function(e){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype.findTarget=function(e,a){var i,o=this.seriesModel.getViewRoot();return o.eachNode({attr:"viewChildren",order:"preorder"},function(r){var s=this._storage.background[r.getRawIndex()];if(s){var l=s.transformCoordToLocal(e,a),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)i={node:r,offsetX:l[0],offsetY:l[1]};else return!1}},this),i},t.type="treemap",t}(he);function Ct(){return{nodeGroup:[],background:[],content:[]}}function Wd(n,t,e,a,i,o,r,s,l,u){if(!r)return;var d=r.getLayout(),h=n.getData(),c=r.getModel();if(h.setItemGraphicEl(r.dataIndex,null),!d||!d.isInView)return;var p=d.width,g=d.height,f=d.borderWidth,y=d.invisible,m=r.getRawIndex(),x=s&&s.getRawIndex(),v=r.viewChildren,I=d.upperHeight,_=v&&v.length,b=c.getModel("itemStyle"),w=c.getModel(["emphasis","itemStyle"]),M=c.getModel(["blur","itemStyle"]),S=c.getModel(["select","itemStyle"]),L=b.get("borderRadius")||0,D=q("nodeGroup",ga);if(!D)return;if(l.add(D),D.x=d.x||0,D.y=d.y||0,D.markRedraw(),an(D).nodeWidth=p,an(D).nodeHeight=g,d.isAboveViewRoot)return D;var C=q("background",Do,u,Bd);C&&z(D,C,_&&d.upperLabelHeight);var N=c.getModel("emphasis"),T=N.get("focus"),A=N.get("blurScope"),P=N.get("disabled"),R=T==="ancestor"?r.getAncestorsIndices():T==="descendant"?r.getDescendantIndices():T;if(_)zi(D)&&Wt(D,!1),C&&(Wt(C,!P),h.setItemGraphicEl(r.dataIndex,C),Oi(C,R,A));else{var k=q("content",Do,u,Fd);k&&H(D,k),C.disableMorphing=!0,C&&zi(C)&&Wt(C,!1),Wt(D,!P),h.setItemGraphicEl(r.dataIndex,D),Oi(D,R,A)}return D;function z(Y,O,j){var U=ae(O);if(U.dataIndex=r.dataIndex,U.seriesIndex=n.seriesIndex,O.setShape({x:0,y:0,width:p,height:g,r:L}),y)B(O);else{O.invisible=!1;var $=r.getVisual("style"),ue=$.stroke,Me=No(b);Me.fill=ue;var ne=Je(w);ne.fill=w.get("borderColor");var Le=Je(M);Le.fill=M.get("borderColor");var Pe=Je(S);if(Pe.fill=S.get("borderColor"),j){var at=p-2*f;K(O,ue,$.opacity,{x:f,y:0,width:at,height:I})}else O.removeTextContent();O.setStyle(Me),O.ensureState("emphasis").style=ne,O.ensureState("blur").style=Le,O.ensureState("select").style=Pe,Gt(O)}Y.add(O)}function H(Y,O){var j=ae(O);j.dataIndex=r.dataIndex,j.seriesIndex=n.seriesIndex;var U=Math.max(p-2*f,0),$=Math.max(g-2*f,0);if(O.culling=!0,O.setShape({x:f,y:f,width:U,height:$,r:L}),y)B(O);else{O.invisible=!1;var ue=r.getVisual("style"),Me=ue.fill,ne=No(b);ne.fill=Me,ne.decal=ue.decal;var Le=Je(w),Pe=Je(M),at=Je(S);K(O,Me,ue.opacity,null),O.setStyle(ne),O.ensureState("emphasis").style=Le,O.ensureState("blur").style=Pe,O.ensureState("select").style=at,Gt(O)}Y.add(O)}function B(Y){!Y.invisible&&o.push(Y)}function K(Y,O,j,U){var $=c.getModel(U?Ao:To),ue=Bt(c.get("name"),null),Me=$.getShallow("show");Fe(Y,Ae(c,U?Ao:To),{defaultText:Me?ue:null,inheritColor:O,defaultOpacity:j,labelFetcher:n,labelDataIndex:r.dataIndex});var ne=Y.getTextContent();if(ne){var Le=ne.style,Pe=Ys(Le.padding||0);U&&(Y.setTextConfig({layoutRect:U}),ne.disableLabelLayout=!0),ne.beforeUpdate=function(){var wi=Math.max((U?U.width:Y.shape.width)-Pe[1]-Pe[3],0),Si=Math.max((U?U.height:Y.shape.height)-Pe[0]-Pe[2],0);(Le.width!==wi||Le.height!==Si)&&ne.setStyle({width:wi,height:Si})},Le.truncateMinChar=2,Le.lineOverflow="truncate",Q(Le,U,d);var at=ne.getState("emphasis");Q(at?at.style:null,U,d)}}function Q(Y,O,j){var U=Y?Y.text:null;if(!O&&j.isLeafRoot&&U!=null){var $=n.get("drillDownIcon",!0);Y.text=$?$+" "+U:U}}function q(Y,O,j,U){var $=x!=null&&e[Y][x],ue=i[Y];return $?(e[Y][x]=null,ee(ue,$)):y||($=new O,$ instanceof An&&($.z2=Xd(j,U)),me(ue,$)),t[Y][m]=$}function ee(Y,O){var j=Y[m]={};O instanceof ga?(j.oldX=O.x,j.oldY=O.y):j.oldShape=W({},O.shape)}function me(Y,O){var j=Y[m]={},U=r.parentNode,$=O instanceof oe;if(U&&(!a||a.direction==="drillDown")){var ue=0,Me=0,ne=i.background[U.getRawIndex()];!a&&ne&&ne.oldShape&&(ue=ne.oldShape.width,Me=ne.oldShape.height),$?(j.oldX=0,j.oldY=Me):j.oldShape={x:ue,y:Me,width:0,height:0}}j.fadein=!$}}function Xd(n,t){return n*Gd+t}const Yd=Hd;var Zd="itemStyle",Eo=xe();const Ud={seriesType:"treemap",reset:function(n){var t=n.getData().tree,e=t.root;e.isRemoved()||Po(e,{},n.getViewRoot().getAncestors(),n)}};function Po(n,t,e,a){var i=n.getModel(),o=n.getLayout(),r=n.hostTree.data;if(!(!o||o.invisible||!o.isInView)){var s=i.getModel(Zd),l=jd(s,t,a),u=r.ensureUniqueItemVisual(n.dataIndex,"style"),d=s.get("borderColor"),h=s.get("borderColorSaturation"),c;h!=null&&(c=Ro(l),d=qd(h,c)),u.stroke=d;var p=n.viewChildren;if(!p||!p.length)c=Ro(l),u.fill=c;else{var g=Kd(n,i,o,s,l,p);E(p,function(f,y){if(f.depth>=e.length||f===e[f.depth]){var m=Qd(i,l,f,y,g,a);Po(f,m,e,a)}})}}}function jd(n,t,e){var a=W({},t),i=e.designatedVisualItemStyle;return E(["color","colorAlpha","colorSaturation"],function(o){i[o]=t[o];var r=n.get(o);i[o]=null,r!=null&&(a[o]=r)}),a}function Ro(n){var t=ya(n,"color");if(t){var e=ya(n,"colorAlpha"),a=ya(n,"colorSaturation");return a&&(t=Gi(t,null,null,a)),e&&(t=Nn(t,e)),t}}function qd(n,t){return t!=null?Gi(t,null,null,n):null}function ya(n,t){var e=n[t];if(e!=null&&e!=="none")return e}function Kd(n,t,e,a,i,o){if(!(!o||!o.length)){var r=va(t,"color")||i.color!=null&&i.color!=="none"&&(va(t,"colorAlpha")||va(t,"colorSaturation"));if(r){var s=t.get("visualMin"),l=t.get("visualMax"),u=e.dataExtent.slice();s!=null&&s<u[0]&&(u[0]=s),l!=null&&l>u[1]&&(u[1]=l);var d=t.get("colorMappingBy"),h={type:r.name,dataExtent:u,visual:r.range};h.type==="color"&&(d==="index"||d==="id")?(h.mappingMethod="category",h.loop=!0):h.mappingMethod="linear";var c=new Bi(h);return Eo(c).drColorMappingBy=d,c}}}function va(n,t){var e=n.get(t);return G(e)&&e.length?{name:t,range:e}:null}function Qd(n,t,e,a,i,o){var r=W({},t);if(i){var s=i.type,l=s==="color"&&Eo(i).drColorMappingBy,u=l==="index"?a:l==="id"?o.mapIdToIndex(e.getId()):e.getValue(n.get("visualDimension"));r[s]=i.mapValueToVisual(u)}return r}var Tt=Math.max,on=Math.min,Vo=Ne,ma=E,ko=["itemStyle","borderWidth"],$d=["itemStyle","gapWidth"],Jd=["upperLabel","show"],eh=["upperLabel","height"];const th={seriesType:"treemap",reset:function(n,t,e,a){var i=e.getWidth(),o=e.getHeight(),r=n.option,s=it(n.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),l=r.size||[],u=Z(Vo(s.width,l[0]),i),d=Z(Vo(s.height,l[1]),o),h=a&&a.type,c=["treemapZoomToNode","treemapRootToNode"],p=Lt(a,c,n),g=h==="treemapRender"||h==="treemapMove"?a.rootRect:null,f=n.getViewRoot(),y=bo(f);if(h!=="treemapMove"){var m=h==="treemapZoomToNode"?sh(n,p,f,u,d):g?[g.width,g.height]:[u,d],x=r.sort;x&&x!=="asc"&&x!=="desc"&&(x="desc");var v={squareRatio:r.squareRatio,sort:x,leafDepth:r.leafDepth};f.hostTree.clearLayouts();var I={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};f.setLayout(I),zo(f,v,!1,0),I=f.getLayout(),ma(y,function(b,w){var M=(y[w+1]||f).getValue();b.setLayout(W({dataExtent:[M,M],borderWidth:0,upperHeight:0},I))})}var _=n.getData().tree.root;_.setLayout(lh(s,g,p),!0),n.setLayoutInfo(s),Go(_,new de(-s.x,-s.y,i,o),y,f,0)}};function zo(n,t,e,a){var i,o;if(!n.isRemoved()){var r=n.getLayout();i=r.width,o=r.height;var s=n.getModel(),l=s.get(ko),u=s.get($d)/2,d=Bo(s),h=Math.max(l,d),c=l-u,p=h-u;n.setLayout({borderWidth:l,upperHeight:h,upperLabelHeight:d},!0),i=Tt(i-2*c,0),o=Tt(o-c-p,0);var g=i*o,f=nh(n,s,g,t,e,a);if(f.length){var y={x:c,y:p,width:i,height:o},m=on(i,o),x=1/0,v=[];v.area=0;for(var I=0,_=f.length;I<_;){var b=f[I];v.push(b),v.area+=b.getLayout().area;var w=rh(v,m,t.squareRatio);w<=x?(I++,x=w):(v.area-=v.pop().getLayout().area,Oo(v,m,y,u,!1),m=on(y.width,y.height),v.length=v.area=0,x=1/0)}if(v.length&&Oo(v,m,y,u,!0),!e){var M=s.get("childrenVisibleMin");M!=null&&g<M&&(e=!0)}for(var I=0,_=f.length;I<_;I++)zo(f[I],t,e,a+1)}}}function nh(n,t,e,a,i,o){var r=n.children||[],s=a.sort;s!=="asc"&&s!=="desc"&&(s=null);var l=a.leafDepth!=null&&a.leafDepth<=o;if(i&&!l)return n.viewChildren=[];r=De(r,function(p){return!p.isRemoved()}),ih(r,s);var u=oh(t,r,s);if(u.sum===0)return n.viewChildren=[];if(u.sum=ah(t,e,u.sum,s,r),u.sum===0)return n.viewChildren=[];for(var d=0,h=r.length;d<h;d++){var c=r[d].getValue()/u.sum*e;r[d].setLayout({area:c})}return l&&(r.length&&n.setLayout({isLeafRoot:!0},!0),r.length=0),n.viewChildren=r,n.setLayout({dataExtent:u.dataExtent},!0),r}function ah(n,t,e,a,i){if(!a)return e;for(var o=n.get("visibleMin"),r=i.length,s=r,l=r-1;l>=0;l--){var u=i[a==="asc"?r-l-1:l].getValue();u/e*t<o&&(s=l,e-=u)}return a==="asc"?i.splice(0,r-s):i.splice(s,r-s),e}function ih(n,t){return t&&n.sort(function(e,a){var i=t==="asc"?e.getValue()-a.getValue():a.getValue()-e.getValue();return i===0?t==="asc"?e.dataIndex-a.dataIndex:a.dataIndex-e.dataIndex:i}),n}function oh(n,t,e){for(var a=0,i=0,o=t.length;i<o;i++)a+=t[i].getValue();var r=n.get("visualDimension"),s;return!t||!t.length?s=[NaN,NaN]:r==="value"&&e?(s=[t[t.length-1].getValue(),t[0].getValue()],e==="asc"&&s.reverse()):(s=[1/0,-1/0],ma(t,function(l){var u=l.getValue(r);u<s[0]&&(s[0]=u),u>s[1]&&(s[1]=u)})),{sum:a,dataExtent:s}}function rh(n,t,e){for(var a=0,i=1/0,o=0,r=void 0,s=n.length;o<s;o++)r=n[o].getLayout().area,r&&(r<i&&(i=r),r>a&&(a=r));var l=n.area*n.area,u=t*t*e;return l?Tt(u*a/l,l/(u*i)):1/0}function Oo(n,t,e,a,i){var o=t===e.width?0:1,r=1-o,s=["x","y"],l=["width","height"],u=e[s[o]],d=t?n.area/t:0;(i||d>e[l[r]])&&(d=e[l[r]]);for(var h=0,c=n.length;h<c;h++){var p=n[h],g={},f=d?p.getLayout().area/d:0,y=g[l[r]]=Tt(d-2*a,0),m=e[s[o]]+e[l[o]]-u,x=h===c-1||m<f?m:f,v=g[l[o]]=Tt(x-2*a,0);g[s[r]]=e[s[r]]+on(a,y/2),g[s[o]]=u+on(a,v/2),u+=x,p.setLayout(g,!0)}e[s[r]]+=d,e[l[r]]-=d}function sh(n,t,e,a,i){var o=(t||{}).node,r=[a,i];if(!o||o===e)return r;for(var s,l=a*i,u=l*n.option.zoomToNodeRatio;s=o.parentNode;){for(var d=0,h=s.children,c=0,p=h.length;c<p;c++)d+=h[c].getValue();var g=o.getValue();if(g===0)return r;u*=d/g;var f=s.getModel(),y=f.get(ko),m=Math.max(y,Bo(f));u+=4*y*y+(3*y+m)*Math.pow(u,.5),u>Fi&&(u=Fi),o=s}u<l&&(u=l);var x=Math.pow(u/l,.5);return[a*x,i*x]}function lh(n,t,e){if(t)return{x:t.x,y:t.y};var a={x:0,y:0};if(!e)return a;var i=e.node,o=i.getLayout();if(!o)return a;for(var r=[o.width/2,o.height/2],s=i;s;){var l=s.getLayout();r[0]+=l.x,r[1]+=l.y,s=s.parentNode}return{x:n.width/2-r[0],y:n.height/2-r[1]}}function Go(n,t,e,a,i){var o=n.getLayout(),r=e[i],s=r&&r===n;if(!(r&&!s||i===e.length&&n!==a)){n.setLayout({isInView:!0,invisible:!s&&!t.intersect(o),isAboveViewRoot:s},!0);var l=new de(t.x-o.x,t.y-o.y,t.width,t.height);ma(n.viewChildren||[],function(u){Go(u,l,e,a,i+1)})}}function Bo(n){return n.get(Jd)?n.get(eh):0}function uh(n){n.registerSeriesModel(Nd),n.registerChartView(Yd),n.registerVisual(Ud),n.registerLayout(th),Cd(n)}function dh(n){var t=n.findComponents({mainType:"legend"});!t||!t.length||n.eachSeriesByType("graph",function(e){var a=e.getCategoriesData(),i=e.getGraph(),o=i.data,r=a.mapArray(a.getName);o.filterSelf(function(s){var l=o.getItemModel(s),u=l.getShallow("category");if(u!=null){We(u)&&(u=r[u]);for(var d=0;d<t.length;d++)if(!t[d].isSelected(u))return!1}return!0})})}function hh(n){var t={};n.eachSeriesByType("graph",function(e){var a=e.getCategoriesData(),i=e.getData(),o={};a.each(function(r){var s=a.getName(r);o["ec-"+s]=r;var l=a.getItemModel(r),u=l.getModel("itemStyle").getItemStyle();u.fill||(u.fill=e.getColorFromPalette(s,t)),a.setItemVisual(r,"style",u);for(var d=["symbol","symbolSize","symbolKeepAspect"],h=0;h<d.length;h++){var c=l.getShallow(d[h],!0);c!=null&&a.setItemVisual(r,d[h],c)}}),a.count()&&i.each(function(r){var s=i.getItemModel(r),l=s.getShallow("category");if(l!=null){be(l)&&(l=o["ec-"+l]);var u=a.getItemVisual(l,"style"),d=i.ensureUniqueItemVisual(r,"style");W(d,u);for(var h=["symbol","symbolSize","symbolKeepAspect"],c=0;c<h.length;c++)i.setItemVisual(r,h[c],a.getItemVisual(l,h[c]))}})})}function rn(n){return n instanceof Array||(n=[n,n]),n}function ch(n){n.eachSeriesByType("graph",function(t){var e=t.getGraph(),a=t.getEdgeData(),i=rn(t.get("edgeSymbol")),o=rn(t.get("edgeSymbolSize"));a.setVisual("fromSymbol",i&&i[0]),a.setVisual("toSymbol",i&&i[1]),a.setVisual("fromSymbolSize",o&&o[0]),a.setVisual("toSymbolSize",o&&o[1]),a.setVisual("style",t.getModel("lineStyle").getLineStyle()),a.each(function(r){var s=a.getItemModel(r),l=e.getEdgeByIndex(r),u=rn(s.getShallow("symbol",!0)),d=rn(s.getShallow("symbolSize",!0)),h=s.getModel("lineStyle").getLineStyle(),c=a.ensureUniqueItemVisual(r,"style");switch(W(c,h),c.stroke){case"source":{var p=l.node1.getVisual("style");c.stroke=p&&p.fill;break}case"target":{var p=l.node2.getVisual("style");c.stroke=p&&p.fill;break}}u[0]&&l.setVisual("fromSymbol",u[0]),u[1]&&l.setVisual("toSymbol",u[1]),d[0]&&l.setVisual("fromSymbolSize",d[0]),d[1]&&l.setVisual("toSymbolSize",d[1])})})}var xa="-->",sn=function(n){return n.get("autoCurveness")||null},Fo=function(n,t){var e=sn(n),a=20,i=[];if(We(e))a=e;else if(G(e)){n.__curvenessList=e;return}t>a&&(a=t);var o=a%2?a+2:a+3;i=[];for(var r=0;r<o;r++)i.push((r%2?r+1:r)/10*(r%2?-1:1));n.__curvenessList=i},At=function(n,t,e){var a=[n.id,n.dataIndex].join("."),i=[t.id,t.dataIndex].join(".");return[e.uid,a,i].join(xa)},Ho=function(n){var t=n.split(xa);return[t[0],t[2],t[1]].join(xa)},ph=function(n,t){var e=At(n.node1,n.node2,t);return t.__edgeMap[e]},fh=function(n,t){var e=_a(At(n.node1,n.node2,t),t),a=_a(At(n.node2,n.node1,t),t);return e+a},_a=function(n,t){var e=t.__edgeMap;return e[n]?e[n].length:0};function gh(n){sn(n)&&(n.__curvenessList=[],n.__edgeMap={},Fo(n))}function yh(n,t,e,a){if(sn(e)){var i=At(n,t,e),o=e.__edgeMap,r=o[Ho(i)];o[i]&&!r?o[i].isForward=!0:r&&o[i]&&(r.isForward=!0,o[i].isForward=!1),o[i]=o[i]||[],o[i].push(a)}}function Ia(n,t,e,a){var i=sn(t),o=G(i);if(!i)return null;var r=ph(n,t);if(!r)return null;for(var s=-1,l=0;l<r.length;l++)if(r[l]===e){s=l;break}var u=fh(n,t);Fo(t,u),n.lineStyle=n.lineStyle||{};var d=At(n.node1,n.node2,t),h=t.__curvenessList,c=o||u%2?0:1;if(r.isForward)return h[c+s];var p=Ho(d),g=_a(p,t),f=h[s+g+c];return a?o?i&&i[0]===0?(g+c)%2?f:-f:((g%2?0:1)+c)%2?f:-f:(g+c)%2?f:-f:h[s+g+c]}function Wo(n){var t=n.coordinateSystem;if(!(t&&t.type!=="view")){var e=n.getGraph();e.eachNode(function(a){var i=a.getModel();a.setLayout([+i.get("x"),+i.get("y")])}),ba(e,n)}}function ba(n,t){n.eachEdge(function(e,a){var i=xt(e.getModel().get(["lineStyle","curveness"]),-Ia(e,t,a,!0),0),o=Xe(e.node1.getLayout()),r=Xe(e.node2.getLayout()),s=[o,r];+i&&s.push([(o[0]+r[0])/2-(o[1]-r[1])*i,(o[1]+r[1])/2-(r[0]-o[0])*i]),e.setLayout(s)})}function vh(n,t){n.eachSeriesByType("graph",function(e){var a=e.get("layout"),i=e.coordinateSystem;if(i&&i.type!=="view"){var o=e.getData(),r=[];E(i.dimensions,function(c){r=r.concat(o.mapDimensionsAll(c))});for(var s=0;s<o.count();s++){for(var l=[],u=!1,d=0;d<r.length;d++){var h=o.get(r[d],s);isNaN(h)||(u=!0),l.push(h)}u?o.setItemLayout(s,i.dataToPoint(l)):o.setItemLayout(s,[NaN,NaN])}ba(o.graph,e)}else(!a||a==="none")&&Wo(e)})}function Nt(n){var t=n.coordinateSystem;if(t.type!=="view")return 1;var e=n.option.nodeScaleRatio,a=t.scaleX,i=t.getZoom(),o=(i-1)*e+1;return o/a}function Et(n){var t=n.getVisual("symbolSize");return t instanceof Array&&(t=(t[0]+t[1])/2),+t}var Xo=Math.PI,wa=[];function Sa(n,t,e,a){var i=n.coordinateSystem;if(!(i&&i.type!=="view")){var o=i.getBoundingRect(),r=n.getData(),s=r.graph,l=o.width/2+o.x,u=o.height/2+o.y,d=Math.min(o.width,o.height)/2,h=r.count();if(r.setLayout({cx:l,cy:u}),!!h){if(e){var c=i.pointToData(a),p=c[0],g=c[1],f=[p-l,g-u];_t(f,f),Zs(f,f,d),e.setLayout([l+f[0],u+f[1]],!0);var y=n.get(["circular","rotateLabel"]);Yo(e,y,l,u)}mh[t](n,s,r,d,l,u,h),s.eachEdge(function(m,x){var v=xt(m.getModel().get(["lineStyle","curveness"]),Ia(m,n,x),0),I=Xe(m.node1.getLayout()),_=Xe(m.node2.getLayout()),b,w=(I[0]+_[0])/2,M=(I[1]+_[1])/2;+v&&(v*=3,b=[l*v+w*(1-v),u*v+M*(1-v)]),m.setLayout([I,_,b])})}}}var mh={value:function(n,t,e,a,i,o,r){var s=0,l=e.getSum("value"),u=Math.PI*2/(l||r);t.eachNode(function(d){var h=d.getValue("value"),c=u*(l?h:1)/2;s+=c,d.setLayout([a*Math.cos(s)+i,a*Math.sin(s)+o]),s+=c})},symbolSize:function(n,t,e,a,i,o,r){var s=0;wa.length=r;var l=Nt(n);t.eachNode(function(h){var c=Et(h);isNaN(c)&&(c=2),c<0&&(c=0),c*=l;var p=Math.asin(c/2/a);isNaN(p)&&(p=Xo/2),wa[h.dataIndex]=p,s+=p*2});var u=(2*Xo-s)/r/2,d=0;t.eachNode(function(h){var c=u+wa[h.dataIndex];d+=c,(!h.getLayout()||!h.getLayout().fixed)&&h.setLayout([a*Math.cos(d)+i,a*Math.sin(d)+o]),d+=c})}};function Yo(n,t,e,a){var i=n.getGraphicEl();if(i){var o=n.getModel(),r=o.get(["label","rotate"])||0,s=i.getSymbolPath();if(t){var l=n.getLayout(),u=Math.atan2(l[1]-a,l[0]-e);u<0&&(u=Math.PI*2+u);var d=l[0]<e;d&&(u=u-Math.PI);var h=d?"left":"right";s.setTextConfig({rotation:-u,position:h,origin:"center"});var c=s.ensureState("emphasis");W(c.textConfig||(c.textConfig={}),{position:h})}else s.setTextConfig({rotation:r*=Math.PI/180})}}function xh(n){n.eachSeriesByType("graph",function(t){t.get("layout")==="circular"&&Sa(t,"symbolSize")})}var ut=En;function _h(n,t,e){for(var a=n,i=t,o=e.rect,r=o.width,s=o.height,l=[o.x+r/2,o.y+s/2],u=e.gravity==null?.1:e.gravity,d=0;d<a.length;d++){var h=a[d];h.p||(h.p=Us(r*(Math.random()-.5)+l[0],s*(Math.random()-.5)+l[1])),h.pp=Xe(h.p),h.edges=null}var c=e.friction==null?.6:e.friction,p=c,g,f;return{warmUp:function(){p=c*.8},setFixed:function(y){a[y].fixed=!0},setUnfixed:function(y){a[y].fixed=!1},beforeStep:function(y){g=y},afterStep:function(y){f=y},step:function(y){g&&g(a,i);for(var m=[],x=a.length,v=0;v<i.length;v++){var I=i[v];if(!I.ignoreForceLayout){var _=I.n1,b=I.n2;rt(m,b.p,_.p);var w=Hi(m)-I.d,M=b.w/(_.w+b.w);isNaN(M)&&(M=0),_t(m,m),!_.fixed&&ut(_.p,_.p,m,M*w*p),!b.fixed&&ut(b.p,b.p,m,-(1-M)*w*p)}}for(var v=0;v<x;v++){var S=a[v];S.fixed||(rt(m,l,S.p),ut(S.p,S.p,m,u*p))}for(var v=0;v<x;v++)for(var _=a[v],L=v+1;L<x;L++){var b=a[L];rt(m,b.p,_.p);var w=Hi(m);w===0&&(js(m,Math.random()-.5,Math.random()-.5),w=1);var D=(_.rep+b.rep)/w/w;!_.fixed&&ut(_.pp,_.pp,m,D),!b.fixed&&ut(b.pp,b.pp,m,-D)}for(var C=[],v=0;v<x;v++){var S=a[v];S.fixed||(rt(C,S.p,S.pp),ut(S.p,S.p,C,p),ge(S.pp,S.p))}p=p*.992;var N=p<.01;f&&f(a,i,N),y&&y(N)}}}function Ih(n){n.eachSeriesByType("graph",function(t){var e=t.coordinateSystem;if(!(e&&e.type!=="view"))if(t.get("layout")==="force"){var a=t.preservedPoints||{},i=t.getGraph(),o=i.data,r=i.edgeData,s=t.getModel("force"),l=s.get("initLayout");t.preservedPoints?o.each(function(v){var I=o.getId(v);o.setItemLayout(v,a[I]||[NaN,NaN])}):!l||l==="none"?Wo(t):l==="circular"&&Sa(t,"value");var u=o.getDataExtent("value"),d=r.getDataExtent("value"),h=s.get("repulsion"),c=s.get("edgeLength"),p=G(h)?h:[h,h],g=G(c)?c:[c,c];g=[g[1],g[0]];var f=o.mapArray("value",function(v,I){var _=o.getItemLayout(I),b=Xt(v,u,p);return isNaN(b)&&(b=(p[0]+p[1])/2),{w:b,rep:b,fixed:o.getItemModel(I).get("fixed"),p:!_||isNaN(_[0])||isNaN(_[1])?null:_}}),y=r.mapArray("value",function(v,I){var _=i.getEdgeByIndex(I),b=Xt(v,d,g);isNaN(b)&&(b=(g[0]+g[1])/2);var w=_.getModel(),M=xt(_.getModel().get(["lineStyle","curveness"]),-Ia(_,t,I,!0),0);return{n1:f[_.node1.dataIndex],n2:f[_.node2.dataIndex],d:b,curveness:M,ignoreForceLayout:w.get("ignoreForceLayout")}}),m=e.getBoundingRect(),x=_h(f,y,{rect:m,gravity:s.get("gravity"),friction:s.get("friction")});x.beforeStep(function(v,I){for(var _=0,b=v.length;_<b;_++)v[_].fixed&&ge(v[_].p,i.getNodeByIndex(_).getLayout())}),x.afterStep(function(v,I,_){for(var b=0,w=v.length;b<w;b++)v[b].fixed||i.getNodeByIndex(b).setLayout(v[b].p),a[o.getId(b)]=v[b].p;for(var b=0,w=I.length;b<w;b++){var M=I[b],S=i.getEdgeByIndex(b),L=M.n1.p,D=M.n2.p,C=S.getLayout();C=C?C.slice():[],C[0]=C[0]||[],C[1]=C[1]||[],ge(C[0],L),ge(C[1],D),+M.curveness&&(C[2]=[(L[0]+D[0])/2-(L[1]-D[1])*M.curveness,(L[1]+D[1])/2-(D[0]-L[0])*M.curveness]),S.setLayout(C)}}),t.forceLayout=x,t.preservedPoints=a,x.step()}else t.forceLayout=null})}function bh(n,t,e){var a=W(n.getBoxLayoutParams(),{aspect:e});return it(a,{width:t.getWidth(),height:t.getHeight()})}function wh(n,t){var e=[];return n.eachSeriesByType("graph",function(a){var i=a.get("coordinateSystem");if(!i||i==="view"){var o=a.getData(),r=o.mapArray(function(y){var m=o.getItemModel(y);return[+m.get("x"),+m.get("y")]}),s=[],l=[];Ot(r,s,l),l[0]-s[0]===0&&(l[0]+=1,s[0]-=1),l[1]-s[1]===0&&(l[1]+=1,s[1]-=1);var u=(l[0]-s[0])/(l[1]-s[1]),d=bh(a,t,u);isNaN(u)&&(s=[d.x,d.y],l=[d.x+d.width,d.y+d.height]);var h=l[0]-s[0],c=l[1]-s[1],p=d.width,g=d.height,f=a.coordinateSystem=new Ln;f.zoomLimit=a.get("scaleLimit"),f.setBoundingRect(s[0],s[1],h,c),f.setViewRect(d.x,d.y,p,g),f.setCenter(a.get("center"),t),f.setZoom(a.get("zoom")),e.push(f)}}),e}var Zo=Wi.prototype,Ma=Pi.prototype,Uo=function(){function n(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return n}();(function(n){V(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t})(Uo);function La(n){return isNaN(+n.cpx1)||isNaN(+n.cpy1)}var Sh=function(n){V(t,n);function t(e){var a=n.call(this,e)||this;return a.type="ec-line",a}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new Uo},t.prototype.buildPath=function(e,a){La(a)?Zo.buildPath.call(this,e,a):Ma.buildPath.call(this,e,a)},t.prototype.pointAt=function(e){return La(this.shape)?Zo.pointAt.call(this,e):Ma.pointAt.call(this,e)},t.prototype.tangentAt=function(e){var a=this.shape,i=La(a)?[a.x2-a.x1,a.y2-a.y1]:Ma.tangentAt.call(this,e);return _t(i,i)},t}(ye);const Mh=Sh;var Da=["fromSymbol","toSymbol"];function jo(n){return"_"+n+"Type"}function qo(n,t,e){var a=t.getItemVisual(e,n);if(!a||a==="none")return a;var i=t.getItemVisual(e,n+"Size"),o=t.getItemVisual(e,n+"Rotate"),r=t.getItemVisual(e,n+"Offset"),s=t.getItemVisual(e,n+"KeepAspect"),l=kn(i),u=zn(r||0,l);return a+l+u+(o||"")+(s||"")}function Ko(n,t,e){var a=t.getItemVisual(e,n);if(!(!a||a==="none")){var i=t.getItemVisual(e,n+"Size"),o=t.getItemVisual(e,n+"Rotate"),r=t.getItemVisual(e,n+"Offset"),s=t.getItemVisual(e,n+"KeepAspect"),l=kn(i),u=zn(r||0,l),d=On(a,-l[0]/2+u[0],-l[1]/2+u[1],l[0],l[1],null,s);return d.__specifiedRotation=o==null||isNaN(o)?void 0:+o*Math.PI/180||0,d.name=n,d}}function Lh(n){var t=new Mh({name:"line",subPixelOptimize:!0});return Ca(t.shape,n),t}function Ca(n,t){n.x1=t[0][0],n.y1=t[0][1],n.x2=t[1][0],n.y2=t[1][1],n.percent=1;var e=t[2];e?(n.cpx1=e[0],n.cpy1=e[1]):(n.cpx1=NaN,n.cpy1=NaN)}var Dh=function(n){V(t,n);function t(e,a,i){var o=n.call(this)||this;return o._createLine(e,a,i),o}return t.prototype._createLine=function(e,a,i){var o=e.hostModel,r=e.getItemLayout(a),s=Lh(r);s.shape.percent=0,Te(s,{shape:{percent:1}},o,a),this.add(s),E(Da,function(l){var u=Ko(l,e,a);this.add(u),this[jo(l)]=qo(l,e,a)},this),this._updateCommonStl(e,a,i)},t.prototype.updateData=function(e,a,i){var o=e.hostModel,r=this.childOfName("line"),s=e.getItemLayout(a),l={shape:{}};Ca(l.shape,s),se(r,l,o,a),E(Da,function(u){var d=qo(u,e,a),h=jo(u);if(this[h]!==d){this.remove(this.childOfName(u));var c=Ko(u,e,a);this.add(c)}this[h]=d},this),this._updateCommonStl(e,a,i)},t.prototype.getLinePath=function(){return this.childAt(0)},t.prototype._updateCommonStl=function(e,a,i){var o=e.hostModel,r=this.childOfName("line"),s=i&&i.emphasisLineStyle,l=i&&i.blurLineStyle,u=i&&i.selectLineStyle,d=i&&i.labelStatesModels,h=i&&i.emphasisDisabled,c=i&&i.focus,p=i&&i.blurScope;if(!i||e.hasItemOption){var g=e.getItemModel(a),f=g.getModel("emphasis");s=f.getModel("lineStyle").getLineStyle(),l=g.getModel(["blur","lineStyle"]).getLineStyle(),u=g.getModel(["select","lineStyle"]).getLineStyle(),h=f.get("disabled"),c=f.get("focus"),p=f.get("blurScope"),d=Ae(g)}var y=e.getItemVisual(a,"style"),m=y.stroke;r.useStyle(y),r.style.fill=null,r.style.strokeNoScale=!0,r.ensureState("emphasis").style=s,r.ensureState("blur").style=l,r.ensureState("select").style=u,E(Da,function(b){var w=this.childOfName(b);if(w){w.setColor(m),w.style.opacity=y.opacity;for(var M=0;M<Pn.length;M++){var S=Pn[M],L=r.getState(S);if(L){var D=L.style||{},C=w.ensureState(S),N=C.style||(C.style={});D.stroke!=null&&(N[w.__isEmptyBrush?"stroke":"fill"]=D.stroke),D.opacity!=null&&(N.opacity=D.opacity)}}w.markRedraw()}},this);var x=o.getRawValue(a);Fe(this,d,{labelDataIndex:a,labelFetcher:{getFormattedLabel:function(b,w){return o.getFormattedLabel(b,w,e.dataType)}},inheritColor:m||"#000",defaultOpacity:y.opacity,defaultText:(x==null?e.getName(a):isFinite(x)?qs(x):x)+""});var v=this.getTextContent();if(v){var I=d.normal;v.__align=v.style.align,v.__verticalAlign=v.style.verticalAlign,v.__position=I.get("position")||"middle";var _=I.get("distance");G(_)||(_=[_,_]),v.__labelDistance=_}this.setTextConfig({position:null,local:!0,inside:!1}),fe(this,c,p,h)},t.prototype.highlight=function(){Rn(this)},t.prototype.downplay=function(){Vn(this)},t.prototype.updateLayout=function(e,a){this.setLinePoints(e.getItemLayout(a))},t.prototype.setLinePoints=function(e){var a=this.childOfName("line");Ca(a.shape,e),a.dirty()},t.prototype.beforeUpdate=function(){var e=this,a=e.childOfName("fromSymbol"),i=e.childOfName("toSymbol"),o=e.getTextContent();if(!a&&!i&&(!o||o.ignore))return;for(var r=1,s=this.parent;s;)s.scaleX&&(r/=s.scaleX),s=s.parent;var l=e.childOfName("line");if(!this.__dirty&&!l.__dirty)return;var u=l.shape.percent,d=l.pointAt(0),h=l.pointAt(u),c=rt([],h,d);_t(c,c);function p(L,D){var C=L.__specifiedRotation;if(C==null){var N=l.tangentAt(D);L.attr("rotation",(D===1?-1:1)*Math.PI/2-Math.atan2(N[1],N[0]))}else L.attr("rotation",C)}if(a&&(a.setPosition(d),p(a,0),a.scaleX=a.scaleY=r*u,a.markRedraw()),i&&(i.setPosition(h),p(i,1),i.scaleX=i.scaleY=r*u,i.markRedraw()),o&&!o.ignore){o.x=o.y=0,o.originX=o.originY=0;var g=void 0,f=void 0,y=o.__labelDistance,m=y[0]*r,x=y[1]*r,v=u/2,I=l.tangentAt(v),_=[I[1],-I[0]],b=l.pointAt(v);_[1]>0&&(_[0]=-_[0],_[1]=-_[1]);var w=I[0]<0?-1:1;if(o.__position!=="start"&&o.__position!=="end"){var M=-Math.atan2(I[1],I[0]);h[0]<d[0]&&(M=Math.PI+M),o.rotation=M}var S=void 0;switch(o.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":S=-x,f="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":S=x,f="top";break;default:S=0,f="middle"}switch(o.__position){case"end":o.x=c[0]*m+h[0],o.y=c[1]*x+h[1],g=c[0]>.8?"left":c[0]<-.8?"right":"center",f=c[1]>.8?"top":c[1]<-.8?"bottom":"middle";break;case"start":o.x=-c[0]*m+d[0],o.y=-c[1]*x+d[1],g=c[0]>.8?"right":c[0]<-.8?"left":"center",f=c[1]>.8?"bottom":c[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":o.x=m*w+d[0],o.y=d[1]+S,g=I[0]<0?"right":"left",o.originX=-m*w,o.originY=-S;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":o.x=b[0],o.y=b[1]+S,g="center",o.originY=-S;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":o.x=-m*w+h[0],o.y=h[1]+S,g=I[0]>=0?"right":"left",o.originX=m*w,o.originY=-S;break}o.scaleX=o.scaleY=r,o.setStyle({verticalAlign:o.__verticalAlign||f,align:o.__align||g})}},t}(oe);const Ta=Dh;var Ch=function(){function n(t){this.group=new oe,this._LineCtor=t||Ta}return n.prototype.updateData=function(t){var e=this;this._progressiveEls=null;var a=this,i=a.group,o=a._lineData;a._lineData=t,o||i.removeAll();var r=Qo(t);t.diff(o).add(function(s){e._doAdd(t,s,r)}).update(function(s,l){e._doUpdate(o,t,l,s,r)}).remove(function(s){i.remove(o.getItemGraphicEl(s))}).execute()},n.prototype.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl(function(e,a){e.updateLayout(t,a)},this)},n.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=Qo(t),this._lineData=null,this.group.removeAll()},n.prototype.incrementalUpdate=function(t,e){this._progressiveEls=[];function a(s){!s.isGroup&&!Th(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var i=t.start;i<t.end;i++){var o=e.getItemLayout(i);if(Aa(o)){var r=new this._LineCtor(e,i,this._seriesScope);r.traverse(a),this.group.add(r),e.setItemGraphicEl(i,r),this._progressiveEls.push(r)}}},n.prototype.remove=function(){this.group.removeAll()},n.prototype.eachRendered=function(t){Yt(this._progressiveEls||this.group,t)},n.prototype._doAdd=function(t,e,a){var i=t.getItemLayout(e);if(Aa(i)){var o=new this._LineCtor(t,e,a);t.setItemGraphicEl(e,o),this.group.add(o)}},n.prototype._doUpdate=function(t,e,a,i,o){var r=t.getItemGraphicEl(a);if(!Aa(e.getItemLayout(i))){this.group.remove(r);return}r?r.updateData(e,i,o):r=new this._LineCtor(e,i,o),e.setItemGraphicEl(i,r),this.group.add(r)},n}();function Th(n){return n.animators&&n.animators.length>0}function Qo(n){var t=n.hostModel,e=t.getModel("emphasis");return{lineStyle:t.getModel("lineStyle").getLineStyle(),emphasisLineStyle:e.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:t.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:t.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:e.get("disabled"),blurScope:e.get("blurScope"),focus:e.get("focus"),labelStatesModels:Ae(t)}}function $o(n){return isNaN(n[0])||isNaN(n[1])}function Aa(n){return n&&!$o(n[0])&&!$o(n[1])}const Na=Ch;var Ea=[],Pa=[],Ra=[],dt=Xi,Va=Qs,Jo=Math.abs;function er(n,t,e){for(var a=n[0],i=n[1],o=n[2],r=1/0,s,l=e*e,u=.1,d=.1;d<=.9;d+=.1){Ea[0]=dt(a[0],i[0],o[0],d),Ea[1]=dt(a[1],i[1],o[1],d);var h=Jo(Va(Ea,t)-l);h<r&&(r=h,s=d)}for(var c=0;c<32;c++){var p=s+u;Pa[0]=dt(a[0],i[0],o[0],s),Pa[1]=dt(a[1],i[1],o[1],s),Ra[0]=dt(a[0],i[0],o[0],p),Ra[1]=dt(a[1],i[1],o[1],p);var h=Va(Pa,t)-l;if(Jo(h)<.01)break;var g=Va(Ra,t)-l;u/=2,h<0?g>=0?s=s+u:s=s-u:g>=0?s=s-u:s=s+u}return s}function ka(n,t){var e=[],a=Ks,i=[[],[],[]],o=[[],[]],r=[];t/=2,n.eachEdge(function(s,l){var u=s.getLayout(),d=s.getVisual("fromSymbol"),h=s.getVisual("toSymbol");u.__original||(u.__original=[Xe(u[0]),Xe(u[1])],u[2]&&u.__original.push(Xe(u[2])));var c=u.__original;if(u[2]!=null){if(ge(i[0],c[0]),ge(i[1],c[2]),ge(i[2],c[1]),d&&d!=="none"){var p=Et(s.node1),g=er(i,c[0],p*t);a(i[0][0],i[1][0],i[2][0],g,e),i[0][0]=e[3],i[1][0]=e[4],a(i[0][1],i[1][1],i[2][1],g,e),i[0][1]=e[3],i[1][1]=e[4]}if(h&&h!=="none"){var p=Et(s.node2),g=er(i,c[1],p*t);a(i[0][0],i[1][0],i[2][0],g,e),i[1][0]=e[1],i[2][0]=e[2],a(i[0][1],i[1][1],i[2][1],g,e),i[1][1]=e[1],i[2][1]=e[2]}ge(u[0],i[0]),ge(u[1],i[2]),ge(u[2],i[1])}else{if(ge(o[0],c[0]),ge(o[1],c[1]),rt(r,o[1],o[0]),_t(r,r),d&&d!=="none"){var p=Et(s.node1);En(o[0],o[0],r,p*t)}if(h&&h!=="none"){var p=Et(s.node2);En(o[1],o[1],r,-p*t)}ge(u[0],o[0]),ge(u[1],o[1])}})}function tr(n){return n.type==="view"}var Ah=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,a){var i=new Gn,o=new Na,r=this.group;this._controller=new Mn(a.getZr()),this._controllerHost={target:r},r.add(i.group),r.add(o.group),this._symbolDraw=i,this._lineDraw=o,this._firstRender=!0},t.prototype.render=function(e,a,i){var o=this,r=e.coordinateSystem;this._model=e;var s=this._symbolDraw,l=this._lineDraw,u=this.group;if(tr(r)){var d={x:r.x,y:r.y,scaleX:r.scaleX,scaleY:r.scaleY};this._firstRender?u.attr(d):se(u,d,e)}ka(e.getGraph(),Nt(e));var h=e.getData();s.updateData(h);var c=e.getEdgeData();l.updateData(c),this._updateNodeAndLinkScale(),this._updateController(e,a,i),clearTimeout(this._layoutTimeout);var p=e.forceLayout,g=e.get(["force","layoutAnimation"]);p&&this._startForceLayoutIteration(p,g);var f=e.get("layout");h.graph.eachNode(function(v){var I=v.dataIndex,_=v.getGraphicEl(),b=v.getModel();if(_){_.off("drag").off("dragend");var w=b.get("draggable");w&&_.on("drag",function(S){switch(f){case"force":p.warmUp(),!o._layouting&&o._startForceLayoutIteration(p,g),p.setFixed(I),h.setItemLayout(I,[_.x,_.y]);break;case"circular":h.setItemLayout(I,[_.x,_.y]),v.setLayout({fixed:!0},!0),Sa(e,"symbolSize",v,[S.offsetX,S.offsetY]),o.updateLayout(e);break;case"none":default:h.setItemLayout(I,[_.x,_.y]),ba(e.getGraph(),e),o.updateLayout(e);break}}).on("dragend",function(){p&&p.setUnfixed(I)}),_.setDraggable(w,!!b.get("cursor"));var M=b.get(["emphasis","focus"]);M==="adjacency"&&(ae(_).focus=v.getAdjacentDataIndices())}}),h.graph.eachEdge(function(v){var I=v.getGraphicEl(),_=v.getModel().get(["emphasis","focus"]);I&&_==="adjacency"&&(ae(I).focus={edge:[v.dataIndex],node:[v.node1.dataIndex,v.node2.dataIndex]})});var y=e.get("layout")==="circular"&&e.get(["circular","rotateLabel"]),m=h.getLayout("cx"),x=h.getLayout("cy");h.graph.eachNode(function(v){Yo(v,y,m,x)}),this._firstRender=!1},t.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype._startForceLayoutIteration=function(e,a){var i=this;(function o(){e.step(function(r){i.updateLayout(i._model),(i._layouting=!r)&&(a?i._layoutTimeout=setTimeout(o,16):o())})})()},t.prototype._updateController=function(e,a,i){var o=this,r=this._controller,s=this._controllerHost,l=this.group;if(r.setPointerChecker(function(u,d,h){var c=l.getBoundingRect();return c.applyTransform(l.transform),c.contain(d,h)&&!Ti(u,i,e)}),!tr(e.coordinateSystem)){r.disable();return}r.enable(e.get("roam")),s.zoomLimit=e.get("scaleLimit"),s.zoom=e.coordinateSystem.getZoom(),r.off("pan").off("zoom").on("pan",function(u){Ai(s,u.dx,u.dy),i.dispatchAction({seriesId:e.id,type:"graphRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){Ni(s,u.scale,u.originX,u.originY),i.dispatchAction({seriesId:e.id,type:"graphRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),o._updateNodeAndLinkScale(),ka(e.getGraph(),Nt(e)),o._lineDraw.updateLayout(),i.updateLabelLayout()})},t.prototype._updateNodeAndLinkScale=function(){var e=this._model,a=e.getData(),i=Nt(e);a.eachItemGraphicEl(function(o,r){o&&o.setSymbolScale(i)})},t.prototype.updateLayout=function(e){ka(e.getGraph(),Nt(e)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},t.prototype.remove=function(){clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},t.type="graph",t}(he);const Nh=Ah;function ht(n){return"_EC_"+n}var Eh=function(){function n(t){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=t||!1}return n.prototype.isDirected=function(){return this._directed},n.prototype.addNode=function(t,e){t=t==null?""+e:""+t;var a=this._nodesMap;if(!a[ht(t)]){var i=new et(t,e);return i.hostGraph=this,this.nodes.push(i),a[ht(t)]=i,i}},n.prototype.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},n.prototype.getNodeById=function(t){return this._nodesMap[ht(t)]},n.prototype.addEdge=function(t,e,a){var i=this._nodesMap,o=this._edgesMap;if(We(t)&&(t=this.nodes[t]),We(e)&&(e=this.nodes[e]),t instanceof et||(t=i[ht(t)]),e instanceof et||(e=i[ht(e)]),!(!t||!e)){var r=t.id+"-"+e.id,s=new nr(t,e,a);return s.hostGraph=this,this._directed&&(t.outEdges.push(s),e.inEdges.push(s)),t.edges.push(s),t!==e&&e.edges.push(s),this.edges.push(s),o[r]=s,s}},n.prototype.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},n.prototype.getEdge=function(t,e){t instanceof et&&(t=t.id),e instanceof et&&(e=e.id);var a=this._edgesMap;return this._directed?a[t+"-"+e]:a[t+"-"+e]||a[e+"-"+t]},n.prototype.eachNode=function(t,e){for(var a=this.nodes,i=a.length,o=0;o<i;o++)a[o].dataIndex>=0&&t.call(e,a[o],o)},n.prototype.eachEdge=function(t,e){for(var a=this.edges,i=a.length,o=0;o<i;o++)a[o].dataIndex>=0&&a[o].node1.dataIndex>=0&&a[o].node2.dataIndex>=0&&t.call(e,a[o],o)},n.prototype.breadthFirstTraverse=function(t,e,a,i){if(e instanceof et||(e=this._nodesMap[ht(e)]),!!e){for(var o=a==="out"?"outEdges":a==="in"?"inEdges":"edges",r=0;r<this.nodes.length;r++)this.nodes[r].__visited=!1;if(!t.call(i,e,null))for(var s=[e];s.length;)for(var l=s.shift(),u=l[o],r=0;r<u.length;r++){var d=u[r],h=d.node1===l?d.node2:d.node1;if(!h.__visited){if(t.call(i,h,l))return;s.push(h),h.__visited=!0}}}},n.prototype.update=function(){for(var t=this.data,e=this.edgeData,a=this.nodes,i=this.edges,o=0,r=a.length;o<r;o++)a[o].dataIndex=-1;for(var o=0,r=t.count();o<r;o++)a[t.getRawIndex(o)].dataIndex=o;e.filterSelf(function(s){var l=i[e.getRawIndex(s)];return l.node1.dataIndex>=0&&l.node2.dataIndex>=0});for(var o=0,r=i.length;o<r;o++)i[o].dataIndex=-1;for(var o=0,r=e.count();o<r;o++)i[e.getRawIndex(o)].dataIndex=o},n.prototype.clone=function(){for(var t=new n(this._directed),e=this.nodes,a=this.edges,i=0;i<e.length;i++)t.addNode(e[i].id,e[i].dataIndex);for(var i=0;i<a.length;i++){var o=a[i];t.addEdge(o.node1.id,o.node2.id,o.dataIndex)}return t},n}(),et=function(){function n(t,e){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=t!=null?t:"",this.dataIndex=e!=null?e:-1}return n.prototype.degree=function(){return this.edges.length},n.prototype.inDegree=function(){return this.inEdges.length},n.prototype.outDegree=function(){return this.outEdges.length},n.prototype.getModel=function(t){if(!(this.dataIndex<0)){var e=this.hostGraph,a=e.data.getItemModel(this.dataIndex);return a.getModel(t)}},n.prototype.getAdjacentDataIndices=function(){for(var t={edge:[],node:[]},e=0;e<this.edges.length;e++){var a=this.edges[e];a.dataIndex<0||(t.edge.push(a.dataIndex),t.node.push(a.node1.dataIndex,a.node2.dataIndex))}return t},n.prototype.getTrajectoryDataIndices=function(){for(var t=ve(),e=ve(),a=0;a<this.edges.length;a++){var i=this.edges[a];if(!(i.dataIndex<0)){t.set(i.dataIndex,!0);for(var o=[i.node1],r=[i.node2],s=0;s<o.length;){var l=o[s];s++,e.set(l.dataIndex,!0);for(var u=0;u<l.inEdges.length;u++)t.set(l.inEdges[u].dataIndex,!0),o.push(l.inEdges[u].node1)}for(s=0;s<r.length;){var d=r[s];s++,e.set(d.dataIndex,!0);for(var u=0;u<d.outEdges.length;u++)t.set(d.outEdges[u].dataIndex,!0),r.push(d.outEdges[u].node2)}}}return{edge:t.keys(),node:e.keys()}},n}(),nr=function(){function n(t,e,a){this.dataIndex=-1,this.node1=t,this.node2=e,this.dataIndex=a!=null?a:-1}return n.prototype.getModel=function(t){if(!(this.dataIndex<0)){var e=this.hostGraph,a=e.edgeData.getItemModel(this.dataIndex);return a.getModel(t)}},n.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},n.prototype.getTrajectoryDataIndices=function(){var t=ve(),e=ve();t.set(this.dataIndex,!0);for(var a=[this.node1],i=[this.node2],o=0;o<a.length;){var r=a[o];o++,e.set(r.dataIndex,!0);for(var s=0;s<r.inEdges.length;s++)t.set(r.inEdges[s].dataIndex,!0),a.push(r.inEdges[s].node1)}for(o=0;o<i.length;){var l=i[o];o++,e.set(l.dataIndex,!0);for(var s=0;s<l.outEdges.length;s++)t.set(l.outEdges[s].dataIndex,!0),i.push(l.outEdges[s].node2)}return{edge:t.keys(),node:e.keys()}},n}();function ar(n,t){return{getValue:function(e){var a=this[n][t];return a.getStore().get(a.getDimensionIndex(e||"value"),this.dataIndex)},setVisual:function(e,a){this.dataIndex>=0&&this[n][t].setItemVisual(this.dataIndex,e,a)},getVisual:function(e){return this[n][t].getItemVisual(this.dataIndex,e)},setLayout:function(e,a){this.dataIndex>=0&&this[n][t].setItemLayout(this.dataIndex,e,a)},getLayout:function(){return this[n][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[n][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[n][t].getRawIndex(this.dataIndex)}}}st(et,ar("hostGraph","data")),st(nr,ar("hostGraph","edgeData"));const Ph=Eh;function ir(n,t,e,a,i){for(var o=new Ph(a),r=0;r<n.length;r++)o.addNode(Ne(n[r].id,n[r].name,r),r);for(var s=[],l=[],u=0,r=0;r<t.length;r++){var d=t[r],h=d.source,c=d.target;o.addEdge(h,c,u)&&(l.push(d),s.push(Ne(Bt(d.id,null),h+" > "+c)),u++)}var p=e.get("coordinateSystem"),g;if(p==="cartesian2d"||p==="polar")g=It(n,e);else{var f=Yi.get(p),y=f?f.dimensions||[]:[];_e(y,"value")<0&&y.concat(["value"]);var m=Tn(n,{coordDimensions:y,encodeDefine:e.getEncode()}).dimensions;g=new Ie(m,e),g.initData(n)}var x=new Ie(["value"],e);return x.initData(l,s),i&&i(g,x),_o({mainData:g,struct:o,structAttr:"graph",datas:{node:g,edge:x},datasAttr:{node:"data",edge:"edgeData"}}),o.update(),o}var Rh=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return t.prototype.init=function(e){n.prototype.init.apply(this,arguments);var a=this;function i(){return a._categoriesData}this.legendVisualProvider=new Bn(i,i),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},t.prototype.mergeOption=function(e){n.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},t.prototype.mergeDefaultAndTheme=function(e){n.prototype.mergeDefaultAndTheme.apply(this,arguments),Fn(e,"edgeLabel",["show"])},t.prototype.getInitialData=function(e,a){var i=e.edges||e.links||[],o=e.data||e.nodes||[],r=this;if(o&&i){gh(this);var s=ir(o,i,this,!0,l);return E(s.edges,function(u){yh(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,d){u.wrapMethod("getItemModel",function(g){var f=r._categoriesModels,y=g.getShallow("category"),m=f[y];return m&&(m.parentModel=g.parentModel,g.parentModel=m),g});var h=Be.prototype.getModel;function c(g,f){var y=h.call(this,g,f);return y.resolveParentPath=p,y}d.wrapMethod("getItemModel",function(g){return g.resolveParentPath=p,g.getModel=c,g});function p(g){if(g&&(g[0]==="label"||g[1]==="label")){var f=g.slice();return g[0]==="label"?f[0]="edgeLabel":g[1]==="label"&&(f[1]="edgeLabel"),f}return g}}},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.getCategoriesData=function(){return this._categoriesData},t.prototype.formatTooltip=function(e,a,i){if(i==="edge"){var o=this.getData(),r=this.getDataParams(e,i),s=o.graph.getEdgeByIndex(e),l=o.getName(s.node1.dataIndex),u=o.getName(s.node2.dataIndex),d=[];return l!=null&&d.push(l),u!=null&&d.push(u),Ve("nameValue",{name:d.join(" > "),value:r.value,noValue:r.value==null})}var h=$s({series:this,dataIndex:e,multipleSeries:a});return h},t.prototype._updateCategoriesData=function(){var e=F(this.option.categories||[],function(i){return i.value!=null?i:W({value:0},i)}),a=new Ie(["value"],this);a.initData(e),this._categoriesData=a,this._categoriesModels=a.mapArray(function(i){return a.getItemModel(i)})},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.isAnimationEnabled=function(){return n.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},t.type="series.graph",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},t}(pe);const Vh=Rh;var kh={type:"graphRoam",event:"graphRoam",update:"none"};function zh(n){n.registerChartView(Nh),n.registerSeriesModel(Vh),n.registerProcessor(dh),n.registerVisual(hh),n.registerVisual(ch),n.registerLayout(vh),n.registerLayout(n.PRIORITY.VISUAL.POST_CHART_LAYOUT,xh),n.registerLayout(Ih),n.registerCoordinateSystem("graphView",{dimensions:Ln.dimensions,create:wh}),n.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},yt),n.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},yt),n.registerAction(kh,function(t,e,a){e.eachComponent({mainType:"series",query:t},function(i){var o=i.coordinateSystem,r=Ri(o,t,void 0,a);i.setCenter&&i.setCenter(r.center),i.setZoom&&i.setZoom(r.zoom)})})}var Oh=["itemStyle","opacity"],Gh=function(n){V(t,n);function t(e,a){var i=n.call(this)||this,o=i,r=new Hn,s=new Ft;return o.setTextContent(s),i.setTextGuideLine(r),i.updateData(e,a,!0),i}return t.prototype.updateData=function(e,a,i){var o=this,r=e.hostModel,s=e.getItemModel(a),l=e.getItemLayout(a),u=s.getModel("emphasis"),d=s.get(Oh);d=d!=null?d:1,i||lt(o),o.useStyle(e.getItemVisual(a,"style")),o.style.lineJoin="round",i?(o.setShape({points:l.points}),o.style.opacity=0,Te(o,{style:{opacity:d}},r,a)):se(o,{style:{opacity:d},shape:{points:l.points}},r,a),Re(o,s),this._updateLabel(e,a),fe(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(e,a){var i=this,o=this.getTextGuideLine(),r=i.getTextContent(),s=e.hostModel,l=e.getItemModel(a),u=e.getItemLayout(a),d=u.label,h=e.getItemVisual(a,"style"),c=h.fill;Fe(r,Ae(l),{labelFetcher:e.hostModel,labelDataIndex:a,defaultOpacity:h.opacity,defaultText:e.getName(a)},{normal:{align:d.textAlign,verticalAlign:d.verticalAlign}}),i.setTextConfig({local:!0,inside:!!d.inside,insideStroke:c,outsideFill:c});var p=d.linePoints;o.setShape({points:p}),i.textGuideLineConfig={anchor:p?new Ye(p[0][0],p[0][1]):null},se(r,{style:{x:d.x,y:d.y}},s,a),r.attr({rotation:d.rotation,originX:d.x,originY:d.y,z2:10}),Li(i,Di(l),{stroke:c})},t}(vt),Bh=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.ignoreLabelLineUpdate=!0,e}return t.prototype.render=function(e,a,i){var o=e.getData(),r=this._data,s=this.group;o.diff(r).add(function(l){var u=new Gh(o,l);o.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var d=r.getItemGraphicEl(u);d.updateData(o,l),s.add(d),o.setItemGraphicEl(l,d)}).remove(function(l){var u=r.getItemGraphicEl(l);Js(u,e,l)}).execute(),this._data=o},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.prototype.dispose=function(){},t.type="funnel",t}(he);const Fh=Bh;var Hh=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e){n.prototype.init.apply(this,arguments),this.legendVisualProvider=new Bn(re(this.getData,this),re(this.getRawData,this)),this._defaultLabelLine(e)},t.prototype.getInitialData=function(e,a){return Zi(this,{coordDimensions:["value"],encodeDefaulter:te(el,this)})},t.prototype._defaultLabelLine=function(e){Fn(e,"labelLine",["show"]);var a=e.labelLine,i=e.emphasis.labelLine;a.show=a.show&&e.label.show,i.show=i.show&&e.emphasis.label.show},t.prototype.getDataParams=function(e){var a=this.getData(),i=n.prototype.getDataParams.call(this,e),o=a.mapDimension("value"),r=a.getSum(o);return i.percent=r?+(a.get(o,e)/r*100).toFixed(2):0,i.$vars.push("percent"),i},t.type="series.funnel",t.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},t}(pe);const Wh=Hh;function Xh(n,t){return it(n.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function Yh(n,t){for(var e=n.mapDimension("value"),a=n.mapArray(e,function(l){return l}),i=[],o=t==="ascending",r=0,s=n.count();r<s;r++)i[r]=r;return ie(t)?i.sort(t):t!=="none"&&i.sort(function(l,u){return o?a[l]-a[u]:a[u]-a[l]}),i}function Zh(n){var t=n.hostModel,e=t.get("orient");n.each(function(a){var i=n.getItemModel(a),o=i.getModel("label"),r=o.get("position"),s=i.getModel("labelLine"),l=n.getItemLayout(a),u=l.points,d=r==="inner"||r==="inside"||r==="center"||r==="insideLeft"||r==="insideRight",h,c,p,g;if(d)r==="insideLeft"?(c=(u[0][0]+u[3][0])/2+5,p=(u[0][1]+u[3][1])/2,h="left"):r==="insideRight"?(c=(u[1][0]+u[2][0])/2-5,p=(u[1][1]+u[2][1])/2,h="right"):(c=(u[0][0]+u[1][0]+u[2][0]+u[3][0])/4,p=(u[0][1]+u[1][1]+u[2][1]+u[3][1])/4,h="center"),g=[[c,p],[c,p]];else{var f=void 0,y=void 0,m=void 0,x=void 0,v=s.get("length");r==="left"?(f=(u[3][0]+u[0][0])/2,y=(u[3][1]+u[0][1])/2,m=f-v,c=m-5,h="right"):r==="right"?(f=(u[1][0]+u[2][0])/2,y=(u[1][1]+u[2][1])/2,m=f+v,c=m+5,h="left"):r==="top"?(f=(u[3][0]+u[0][0])/2,y=(u[3][1]+u[0][1])/2,x=y-v,p=x-5,h="center"):r==="bottom"?(f=(u[1][0]+u[2][0])/2,y=(u[1][1]+u[2][1])/2,x=y+v,p=x+5,h="center"):r==="rightTop"?(f=e==="horizontal"?u[3][0]:u[1][0],y=e==="horizontal"?u[3][1]:u[1][1],e==="horizontal"?(x=y-v,p=x-5,h="center"):(m=f+v,c=m+5,h="top")):r==="rightBottom"?(f=u[2][0],y=u[2][1],e==="horizontal"?(x=y+v,p=x+5,h="center"):(m=f+v,c=m+5,h="bottom")):r==="leftTop"?(f=u[0][0],y=e==="horizontal"?u[0][1]:u[1][1],e==="horizontal"?(x=y-v,p=x-5,h="center"):(m=f-v,c=m-5,h="right")):r==="leftBottom"?(f=e==="horizontal"?u[1][0]:u[3][0],y=e==="horizontal"?u[1][1]:u[2][1],e==="horizontal"?(x=y+v,p=x+5,h="center"):(m=f-v,c=m-5,h="right")):(f=(u[1][0]+u[2][0])/2,y=(u[1][1]+u[2][1])/2,e==="horizontal"?(x=y+v,p=x+5,h="center"):(m=f+v,c=m+5,h="left")),e==="horizontal"?(m=f,c=m):(x=y,p=x),g=[[f,y],[m,x]]}l.label={linePoints:g,x:c,y:p,verticalAlign:"middle",textAlign:h,inside:d}})}function Uh(n,t){n.eachSeriesByType("funnel",function(e){var a=e.getData(),i=a.mapDimension("value"),o=e.get("sort"),r=Xh(e,t),s=e.get("orient"),l=r.width,u=r.height,d=Yh(a,o),h=r.x,c=r.y,p=s==="horizontal"?[Z(e.get("minSize"),u),Z(e.get("maxSize"),u)]:[Z(e.get("minSize"),l),Z(e.get("maxSize"),l)],g=a.getDataExtent(i),f=e.get("min"),y=e.get("max");f==null&&(f=Math.min(g[0],0)),y==null&&(y=g[1]);var m=e.get("funnelAlign"),x=e.get("gap"),v=s==="horizontal"?l:u,I=(v-x*(a.count()-1))/a.count(),_=function(T,A){if(s==="horizontal"){var P=a.get(i,T)||0,R=Xt(P,[f,y],p,!0),k=void 0;switch(m){case"top":k=c;break;case"center":k=c+(u-R)/2;break;case"bottom":k=c+(u-R);break}return[[A,k],[A,k+R]]}var z=a.get(i,T)||0,H=Xt(z,[f,y],p,!0),B;switch(m){case"left":B=h;break;case"center":B=h+(l-H)/2;break;case"right":B=h+l-H;break}return[[B,A],[B+H,A]]};o==="ascending"&&(I=-I,x=-x,s==="horizontal"?h+=l:c+=u,d=d.reverse());for(var b=0;b<d.length;b++){var w=d[b],M=d[b+1],S=a.getItemModel(w);if(s==="horizontal"){var L=S.get(["itemStyle","width"]);L==null?L=I:(L=Z(L,l),o==="ascending"&&(L=-L));var D=_(w,h),C=_(M,h+L);h+=L+x,a.setItemLayout(w,{points:D.concat(C.slice().reverse())})}else{var N=S.get(["itemStyle","height"]);N==null?N=I:(N=Z(N,u),o==="ascending"&&(N=-N));var D=_(w,c),C=_(M,c+N);c+=N+x,a.setItemLayout(w,{points:D.concat(C.slice().reverse())})}}Zh(a)})}function jh(n){n.registerChartView(Fh),n.registerSeriesModel(Wh),n.registerLayout(Uh),n.registerProcessor(Wn("funnel"))}var qh=.3,Kh=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e._dataGroup=new oe,e._initialized=!1,e}return t.prototype.init=function(){this.group.add(this._dataGroup)},t.prototype.render=function(e,a,i,o){this._progressiveEls=null;var r=this._dataGroup,s=e.getData(),l=this._data,u=e.coordinateSystem,d=u.dimensions,h=sr(e);s.diff(l).add(c).update(p).remove(g).execute();function c(y){var m=rr(s,r,y,d,u);za(m,s,y,h)}function p(y,m){var x=l.getItemGraphicEl(m),v=or(s,y,d,u);s.setItemGraphicEl(y,x),se(x,{shape:{points:v}},e,y),lt(x),za(x,s,y,h)}function g(y){var m=l.getItemGraphicEl(y);r.remove(m)}if(!this._initialized){this._initialized=!0;var f=Qh(u,e,function(){setTimeout(function(){r.removeClipPath()})});r.setClipPath(f)}this._data=s},t.prototype.incrementalPrepareRender=function(e,a,i){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},t.prototype.incrementalRender=function(e,a,i){for(var o=a.getData(),r=a.coordinateSystem,s=r.dimensions,l=sr(a),u=this._progressiveEls=[],d=e.start;d<e.end;d++){var h=rr(o,this._dataGroup,d,s,r);h.incremental=!0,za(h,o,d,l),u.push(h)}},t.prototype.remove=function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null},t.type="parallel",t}(he);function Qh(n,t,e){var a=n.model,i=n.getRect(),o=new He({shape:{x:i.x,y:i.y,width:i.width,height:i.height}}),r=a.get("layout")==="horizontal"?"width":"height";return o.setShape(r,0),Te(o,{shape:{width:i.width,height:i.height}},t,e),o}function or(n,t,e,a){for(var i=[],o=0;o<e.length;o++){var r=e[o],s=n.get(n.mapDimension(r),t);$h(s,a.getAxis(r).type)||i.push(a.dataToPoint(s,r))}return i}function rr(n,t,e,a,i){var o=or(n,e,a,i),r=new Hn({shape:{points:o},z2:10});return t.add(r),n.setItemGraphicEl(e,r),r}function sr(n){var t=n.get("smooth",!0);return t===!0&&(t=qh),t=tl(t),nl(t)&&(t=0),{smooth:t}}function za(n,t,e,a){n.useStyle(t.getItemVisual(e,"style")),n.style.fill=null,n.setShape("smooth",a.smooth);var i=t.getItemModel(e),o=i.getModel("emphasis");Re(n,i,"lineStyle"),fe(n,o.get("focus"),o.get("blurScope"),o.get("disabled"))}function $h(n,t){return t==="category"?n==null:n==null||isNaN(n)}const Jh=Kh;var ec=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.visualStyleAccessPath="lineStyle",e.visualDrawType="stroke",e}return t.prototype.getInitialData=function(e,a){return It(null,this,{useEncodeDefaulter:re(tc,null,this)})},t.prototype.getRawIndicesByActiveState=function(e){var a=this.coordinateSystem,i=this.getData(),o=[];return a.eachActiveState(i,function(r,s){e===r&&o.push(i.getRawIndex(s))}),o},t.type="series.parallel",t.dependencies=["parallel"],t.defaultOption={z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"},t}(pe);function tc(n){var t=n.ecModel.getComponent("parallel",n.get("parallelIndex"));if(t){var e={};return E(t.dimensions,function(a){var i=nc(a);e[a]=i}),e}}function nc(n){return+n.replace("dim","")}const ac=ec;var ic=["lineStyle","opacity"],oc={seriesType:"parallel",reset:function(n,t){var e=n.coordinateSystem,a={normal:n.get(["lineStyle","opacity"]),active:n.get("activeOpacity"),inactive:n.get("inactiveOpacity")};return{progress:function(i,o){e.eachActiveState(o,function(r,s){var l=a[r];if(r==="normal"&&o.hasItemOption){var u=o.getItemModel(s).get(ic,!0);u!=null&&(l=u)}var d=o.ensureUniqueItemVisual(s,"style");d.opacity=l},i.start,i.end)}}}};const rc=oc;function sc(n){X(Ui),n.registerChartView(Jh),n.registerSeriesModel(ac),n.registerVisual(n.PRIORITY.VISUAL.BRUSH,rc)}var lc=function(){function n(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return n}(),uc=function(n){V(t,n);function t(e){return n.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new lc},t.prototype.buildPath=function(e,a){var i=a.extent;e.moveTo(a.x1,a.y1),e.bezierCurveTo(a.cpx1,a.cpy1,a.cpx2,a.cpy2,a.x2,a.y2),a.orient==="vertical"?(e.lineTo(a.x2+i,a.y2),e.bezierCurveTo(a.cpx2+i,a.cpy2,a.cpx1+i,a.cpy1,a.x1+i,a.y1)):(e.lineTo(a.x2,a.y2+i),e.bezierCurveTo(a.cpx2,a.cpy2+i,a.cpx1,a.cpy1+i,a.x1,a.y1+i)),e.closePath()},t.prototype.highlight=function(){Rn(this)},t.prototype.downplay=function(){Vn(this)},t}(ye),dc=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e._focusAdjacencyDisabled=!1,e}return t.prototype.render=function(e,a,i){var o=this,r=e.getGraph(),s=this.group,l=e.layoutInfo,u=l.width,d=l.height,h=e.getData(),c=e.getData("edge"),p=e.get("orient");this._model=e,s.removeAll(),s.x=l.x,s.y=l.y,r.eachEdge(function(g){var f=new uc,y=ae(f);y.dataIndex=g.dataIndex,y.seriesIndex=e.seriesIndex,y.dataType="edge";var m=g.getModel(),x=m.getModel("lineStyle"),v=x.get("curveness"),I=g.node1.getLayout(),_=g.node1.getModel(),b=_.get("localX"),w=_.get("localY"),M=g.node2.getLayout(),S=g.node2.getModel(),L=S.get("localX"),D=S.get("localY"),C=g.getLayout(),N,T,A,P,R,k,z,H;f.shape.extent=Math.max(1,C.dy),f.shape.orient=p,p==="vertical"?(N=(b!=null?b*u:I.x)+C.sy,T=(w!=null?w*d:I.y)+I.dy,A=(L!=null?L*u:M.x)+C.ty,P=D!=null?D*d:M.y,R=N,k=T*(1-v)+P*v,z=A,H=T*v+P*(1-v)):(N=(b!=null?b*u:I.x)+I.dx,T=(w!=null?w*d:I.y)+C.sy,A=L!=null?L*u:M.x,P=(D!=null?D*d:M.y)+C.ty,R=N*(1-v)+A*v,k=T,z=N*v+A*(1-v),H=P),f.setShape({x1:N,y1:T,x2:A,y2:P,cpx1:R,cpy1:k,cpx2:z,cpy2:H}),f.useStyle(x.getItemStyle()),lr(f.style,p,g);var B=""+m.get("value"),K=Ae(m,"edgeLabel");Fe(f,K,{labelFetcher:{getFormattedLabel:function(ee,me,Y,O,j,U){return e.getFormattedLabel(ee,me,"edge",O,xt(j,K.normal&&K.normal.get("formatter"),B),U)}},labelDataIndex:g.dataIndex,defaultText:B}),f.setTextConfig({position:"inside"});var Q=m.getModel("emphasis");Re(f,m,"lineStyle",function(ee){var me=ee.getItemStyle();return lr(me,p,g),me}),s.add(f),c.setItemGraphicEl(g.dataIndex,f);var q=Q.get("focus");fe(f,q==="adjacency"?g.getAdjacentDataIndices():q==="trajectory"?g.getTrajectoryDataIndices():q,Q.get("blurScope"),Q.get("disabled"))}),r.eachNode(function(g){var f=g.getLayout(),y=g.getModel(),m=y.get("localX"),x=y.get("localY"),v=y.getModel("emphasis"),I=new He({shape:{x:m!=null?m*u:f.x,y:x!=null?x*d:f.y,width:f.dx,height:f.dy},style:y.getModel("itemStyle").getItemStyle(),z2:10});Fe(I,Ae(y),{labelFetcher:{getFormattedLabel:function(b,w){return e.getFormattedLabel(b,w,"node")}},labelDataIndex:g.dataIndex,defaultText:g.id}),I.disableLabelAnimation=!0,I.setStyle("fill",g.getVisual("color")),I.setStyle("decal",g.getVisual("style").decal),Re(I,y),s.add(I),h.setItemGraphicEl(g.dataIndex,I),ae(I).dataType="node";var _=v.get("focus");fe(I,_==="adjacency"?g.getAdjacentDataIndices():_==="trajectory"?g.getTrajectoryDataIndices():_,v.get("blurScope"),v.get("disabled"))}),h.eachItemGraphicEl(function(g,f){var y=h.getItemModel(f);y.get("draggable")&&(g.drift=function(m,x){o._focusAdjacencyDisabled=!0,this.shape.x+=m,this.shape.y+=x,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:e.id,dataIndex:h.getRawIndex(f),localX:this.shape.x/u,localY:this.shape.y/d})},g.ondragend=function(){o._focusAdjacencyDisabled=!1},g.draggable=!0,g.cursor="move")}),!this._data&&e.isAnimationEnabled()&&s.setClipPath(hc(s.getBoundingRect(),e,function(){s.removeClipPath()})),this._data=e.getData()},t.prototype.dispose=function(){},t.type="sankey",t}(he);function lr(n,t,e){switch(n.fill){case"source":n.fill=e.node1.getVisual("color"),n.decal=e.node1.getVisual("style").decal;break;case"target":n.fill=e.node2.getVisual("color"),n.decal=e.node2.getVisual("style").decal;break;case"gradient":var a=e.node1.getVisual("color"),i=e.node2.getVisual("color");be(a)&&be(i)&&(n.fill=new al(0,0,+(t==="horizontal"),+(t==="vertical"),[{color:a,offset:0},{color:i,offset:1}]))}}function hc(n,t,e){var a=new He({shape:{x:n.x-10,y:n.y-10,width:0,height:n.height+20}});return Te(a,{shape:{width:n.width+20}},t,e),a}const cc=dc;var pc=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(e,a){var i=e.edges||e.links,o=e.data||e.nodes,r=e.levels;this.levelModels=[];for(var s=this.levelModels,l=0;l<r.length;l++)r[l].depth!=null&&r[l].depth>=0&&(s[r[l].depth]=new Be(r[l],this,a));if(o&&i){var u=ir(o,i,this,!0,d);return u.data}function d(h,c){h.wrapMethod("getItemModel",function(p,g){var f=p.parentModel,y=f.getData().getItemLayout(g);if(y){var m=y.depth,x=f.levelModels[m];x&&(p.parentModel=x)}return p}),c.wrapMethod("getItemModel",function(p,g){var f=p.parentModel,y=f.getGraph().getEdgeByIndex(g),m=y.node1.getLayout();if(m){var x=m.depth,v=f.levelModels[x];v&&(p.parentModel=v)}return p})}},t.prototype.setNodePosition=function(e,a){var i=this.option.data||this.option.nodes,o=i[e];o.localX=a[0],o.localY=a[1]},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.formatTooltip=function(e,a,i){function o(p){return isNaN(p)||p==null}if(i==="edge"){var r=this.getDataParams(e,i),s=r.data,l=r.value,u=s.source+" -- "+s.target;return Ve("nameValue",{name:u,value:l,noValue:o(l)})}else{var d=this.getGraph().getNodeByIndex(e),h=d.getLayout().value,c=this.getDataParams(e,i).data.name;return Ve("nameValue",{name:c!=null?c+"":null,value:h,noValue:o(h)})}},t.prototype.optionUpdated=function(){},t.prototype.getDataParams=function(e,a){var i=n.prototype.getDataParams.call(this,e,a);if(i.value==null&&a==="node"){var o=this.getGraph().getNodeByIndex(e),r=o.getLayout().value;i.value=r}return i},t.type="series.sankey",t.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},t}(pe);const fc=pc;function gc(n,t){n.eachSeriesByType("sankey",function(e){var a=e.get("nodeWidth"),i=e.get("nodeGap"),o=yc(e,t);e.layoutInfo=o;var r=o.width,s=o.height,l=e.getGraph(),u=l.nodes,d=l.edges;mc(u);var h=De(u,function(f){return f.getLayout().value===0}),c=h.length!==0?0:e.get("layoutIterations"),p=e.get("orient"),g=e.get("nodeAlign");vc(u,d,a,i,r,s,c,p,g)})}function yc(n,t){return it(n.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function vc(n,t,e,a,i,o,r,s,l){xc(n,t,e,i,o,s,l),wc(n,t,o,i,a,r,s),Ec(n,s)}function mc(n){E(n,function(t){var e=Ue(t.outEdges,ln),a=Ue(t.inEdges,ln),i=t.getValue()||0,o=Math.max(e,a,i);t.setLayout({value:o},!0)})}function xc(n,t,e,a,i,o,r){for(var s=[],l=[],u=[],d=[],h=0,c=0;c<t.length;c++)s[c]=1;for(var c=0;c<n.length;c++)l[c]=n[c].inEdges.length,l[c]===0&&u.push(n[c]);for(var p=-1;u.length;){for(var g=0;g<u.length;g++){var f=u[g],y=f.hostGraph.data.getRawDataItem(f.dataIndex),m=y.depth!=null&&y.depth>=0;m&&y.depth>p&&(p=y.depth),f.setLayout({depth:m?y.depth:h},!0),o==="vertical"?f.setLayout({dy:e},!0):f.setLayout({dx:e},!0);for(var x=0;x<f.outEdges.length;x++){var v=f.outEdges[x],I=t.indexOf(v);s[I]=0;var _=v.node2,b=n.indexOf(_);--l[b]===0&&d.indexOf(_)<0&&d.push(_)}}++h,u=d,d=[]}for(var c=0;c<s.length;c++)if(s[c]===1)throw new Error("Sankey is a DAG, the original data has cycle!");var w=p>h-1?p:h-1;r&&r!=="left"&&_c(n,r,o,w);var M=o==="vertical"?(i-e)/w:(a-e)/w;bc(n,M,o)}function ur(n){var t=n.hostGraph.data.getRawDataItem(n.dataIndex);return t.depth!=null&&t.depth>=0}function _c(n,t,e,a){if(t==="right"){for(var i=[],o=n,r=0;o.length;){for(var s=0;s<o.length;s++){var l=o[s];l.setLayout({skNodeHeight:r},!0);for(var u=0;u<l.inEdges.length;u++){var d=l.inEdges[u];i.indexOf(d.node1)<0&&i.push(d.node1)}}o=i,i=[],++r}E(n,function(h){ur(h)||h.setLayout({depth:Math.max(0,a-h.getLayout().skNodeHeight)},!0)})}else t==="justify"&&Ic(n,a)}function Ic(n,t){E(n,function(e){!ur(e)&&!e.outEdges.length&&e.setLayout({depth:t},!0)})}function bc(n,t,e){E(n,function(a){var i=a.getLayout().depth*t;e==="vertical"?a.setLayout({y:i},!0):a.setLayout({x:i},!0)})}function wc(n,t,e,a,i,o,r){var s=Sc(n,r);Mc(s,t,e,a,i,r),Oa(s,i,e,a,r);for(var l=1;o>0;o--)l*=.99,Lc(s,l,r),Oa(s,i,e,a,r),Nc(s,l,r),Oa(s,i,e,a,r)}function Sc(n,t){var e=[],a=t==="vertical"?"y":"x",i=Xn(n,function(o){return o.getLayout()[a]});return i.keys.sort(function(o,r){return o-r}),E(i.keys,function(o){e.push(i.buckets.get(o))}),e}function Mc(n,t,e,a,i,o){var r=1/0;E(n,function(s){var l=s.length,u=0;E(s,function(h){u+=h.getLayout().value});var d=o==="vertical"?(a-(l-1)*i)/u:(e-(l-1)*i)/u;d<r&&(r=d)}),E(n,function(s){E(s,function(l,u){var d=l.getLayout().value*r;o==="vertical"?(l.setLayout({x:u},!0),l.setLayout({dx:d},!0)):(l.setLayout({y:u},!0),l.setLayout({dy:d},!0))})}),E(t,function(s){var l=+s.getValue()*r;s.setLayout({dy:l},!0)})}function Oa(n,t,e,a,i){var o=i==="vertical"?"x":"y";E(n,function(r){r.sort(function(f,y){return f.getLayout()[o]-y.getLayout()[o]});for(var s,l,u,d=0,h=r.length,c=i==="vertical"?"dx":"dy",p=0;p<h;p++)l=r[p],u=d-l.getLayout()[o],u>0&&(s=l.getLayout()[o]+u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),d=l.getLayout()[o]+l.getLayout()[c]+t;var g=i==="vertical"?a:e;if(u=d-t-g,u>0){s=l.getLayout()[o]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),d=s;for(var p=h-2;p>=0;--p)l=r[p],u=l.getLayout()[o]+l.getLayout()[c]+t-d,u>0&&(s=l.getLayout()[o]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),d=l.getLayout()[o]}})}function Lc(n,t,e){E(n.slice().reverse(),function(a){E(a,function(i){if(i.outEdges.length){var o=Ue(i.outEdges,Dc,e)/Ue(i.outEdges,ln);if(isNaN(o)){var r=i.outEdges.length;o=r?Ue(i.outEdges,Cc,e)/r:0}if(e==="vertical"){var s=i.getLayout().x+(o-Ze(i,e))*t;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(o-Ze(i,e))*t;i.setLayout({y:l},!0)}}})})}function Dc(n,t){return Ze(n.node2,t)*n.getValue()}function Cc(n,t){return Ze(n.node2,t)}function Tc(n,t){return Ze(n.node1,t)*n.getValue()}function Ac(n,t){return Ze(n.node1,t)}function Ze(n,t){return t==="vertical"?n.getLayout().x+n.getLayout().dx/2:n.getLayout().y+n.getLayout().dy/2}function ln(n){return n.getValue()}function Ue(n,t,e){for(var a=0,i=n.length,o=-1;++o<i;){var r=+t(n[o],e);isNaN(r)||(a+=r)}return a}function Nc(n,t,e){E(n,function(a){E(a,function(i){if(i.inEdges.length){var o=Ue(i.inEdges,Tc,e)/Ue(i.inEdges,ln);if(isNaN(o)){var r=i.inEdges.length;o=r?Ue(i.inEdges,Ac,e)/r:0}if(e==="vertical"){var s=i.getLayout().x+(o-Ze(i,e))*t;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(o-Ze(i,e))*t;i.setLayout({y:l},!0)}}})})}function Ec(n,t){var e=t==="vertical"?"x":"y";E(n,function(a){a.outEdges.sort(function(i,o){return i.node2.getLayout()[e]-o.node2.getLayout()[e]}),a.inEdges.sort(function(i,o){return i.node1.getLayout()[e]-o.node1.getLayout()[e]})}),E(n,function(a){var i=0,o=0;E(a.outEdges,function(r){r.setLayout({sy:i},!0),i+=r.getLayout().dy}),E(a.inEdges,function(r){r.setLayout({ty:o},!0),o+=r.getLayout().dy})})}function Pc(n){n.eachSeriesByType("sankey",function(t){var e=t.getGraph(),a=e.nodes,i=e.edges;if(a.length){var o=1/0,r=-1/0;E(a,function(s){var l=s.getLayout().value;l<o&&(o=l),l>r&&(r=l)}),E(a,function(s){var l=new Bi({type:"color",mappingMethod:"linear",dataExtent:[o,r],visual:t.get("color")}),u=l.mapValueToVisual(s.getLayout().value),d=s.getModel().get(["itemStyle","color"]);d!=null?(s.setVisual("color",d),s.setVisual("style",{fill:d})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}i.length&&E(i,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function Rc(n){n.registerChartView(cc),n.registerSeriesModel(fc),n.registerLayout(gc),n.registerVisual(Pc),n.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(t,e){e.eachComponent({mainType:"series",subType:"sankey",query:t},function(a){a.setNodePosition(t.dataIndex,[t.localX,t.localY])})})}var dr=function(){function n(){}return n.prototype.getInitialData=function(t,e){var a,i=e.getComponent("xAxis",this.get("xAxisIndex")),o=e.getComponent("yAxis",this.get("yAxisIndex")),r=i.get("type"),s=o.get("type"),l;r==="category"?(t.layout="horizontal",a=i.getOrdinalMeta(),l=!0):s==="category"?(t.layout="vertical",a=o.getOrdinalMeta(),l=!0):t.layout=t.layout||"horizontal";var u=["x","y"],d=t.layout==="horizontal"?0:1,h=this._baseAxisDim=u[d],c=u[1-d],p=[i,o],g=p[d].get("type"),f=p[1-d].get("type"),y=t.data;if(y&&l){var m=[];E(y,function(I,_){var b;G(I)?(b=I.slice(),I.unshift(_)):G(I.value)?(b=W({},I),b.value=b.value.slice(),I.value.unshift(_)):b=I,m.push(b)}),t.data=m}var x=this.defaultValueDimensions,v=[{name:h,type:Yn(g),ordinalMeta:a,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:c,type:Yn(f),dimsDef:x.slice()}];return Zi(this,{coordDimensions:v,dimensionsCount:x.length+1,encodeDefaulter:te(il,v,this)})},n.prototype.getBaseAxis=function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis},n}(),hr=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],e.visualDrawType="stroke",e}return t.type="series.boxplot",t.dependencies=["xAxis","yAxis","grid"],t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},t}(pe);st(hr,dr,!0);const Vc=hr;var kc=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,i){var o=e.getData(),r=this.group,s=this._data;this._data||r.removeAll();var l=e.get("layout")==="horizontal"?1:0;o.diff(s).add(function(u){if(o.hasValue(u)){var d=o.getItemLayout(u),h=cr(d,o,u,l,!0);o.setItemGraphicEl(u,h),r.add(h)}}).update(function(u,d){var h=s.getItemGraphicEl(d);if(!o.hasValue(u)){r.remove(h);return}var c=o.getItemLayout(u);h?(lt(h),pr(c,h,o,u)):h=cr(c,o,u,l),r.add(h),o.setItemGraphicEl(u,h)}).remove(function(u){var d=s.getItemGraphicEl(u);d&&r.remove(d)}).execute(),this._data=o},t.prototype.remove=function(e){var a=this.group,i=this._data;this._data=null,i&&i.eachItemGraphicEl(function(o){o&&a.remove(o)})},t.type="boxplot",t}(he),zc=function(){function n(){}return n}(),Oc=function(n){V(t,n);function t(e){var a=n.call(this,e)||this;return a.type="boxplotBoxPath",a}return t.prototype.getDefaultShape=function(){return new zc},t.prototype.buildPath=function(e,a){var i=a.points,o=0;for(e.moveTo(i[o][0],i[o][1]),o++;o<4;o++)e.lineTo(i[o][0],i[o][1]);for(e.closePath();o<i.length;o++)e.moveTo(i[o][0],i[o][1]),o++,e.lineTo(i[o][0],i[o][1])},t}(ye);function cr(n,t,e,a,i){var o=n.ends,r=new Oc({shape:{points:i?Gc(o,a,n):o}});return pr(n,r,t,e,i),r}function pr(n,t,e,a,i){var o=e.hostModel,r=ol[i?"initProps":"updateProps"];r(t,{shape:{points:n.ends}},o,a),t.useStyle(e.getItemVisual(a,"style")),t.style.strokeNoScale=!0,t.z2=100;var s=e.getItemModel(a),l=s.getModel("emphasis");Re(t,s),fe(t,l.get("focus"),l.get("blurScope"),l.get("disabled"))}function Gc(n,t,e){return F(n,function(a){return a=a.slice(),a[t]=e.initBaseline,a})}const Bc=kc;var Pt=E;function Fc(n){var t=Hc(n);Pt(t,function(e){var a=e.seriesModels;a.length&&(Wc(e),Pt(a,function(i,o){Xc(i,e.boxOffsetList[o],e.boxWidthList[o])}))})}function Hc(n){var t=[],e=[];return n.eachSeriesByType("boxplot",function(a){var i=a.getBaseAxis(),o=_e(e,i);o<0&&(o=e.length,e[o]=i,t[o]={axis:i,seriesModels:[]}),t[o].seriesModels.push(a)}),t}function Wc(n){var t=n.axis,e=n.seriesModels,a=e.length,i=n.boxWidthList=[],o=n.boxOffsetList=[],r=[],s;if(t.type==="category")s=t.getBandWidth();else{var l=0;Pt(e,function(g){l=Math.max(l,g.getData().count())});var u=t.getExtent();s=Math.abs(u[1]-u[0])/l}Pt(e,function(g){var f=g.get("boxWidth");G(f)||(f=[f,f]),r.push([Z(f[0],s)||0,Z(f[1],s)||0])});var d=s*.8-2,h=d/a*.3,c=(d-h*(a-1))/a,p=c/2-d/2;Pt(e,function(g,f){o.push(p),p+=h+c,i.push(Math.min(Math.max(c,r[f][0]),r[f][1]))})}function Xc(n,t,e){var a=n.coordinateSystem,i=n.getData(),o=e/2,r=n.get("layout")==="horizontal"?0:1,s=1-r,l=["x","y"],u=i.mapDimension(l[r]),d=i.mapDimensionsAll(l[s]);if(u==null||d.length<5)return;for(var h=0;h<i.count();h++){var c=i.get(u,h),p=v(c,d[2],h),g=v(c,d[0],h),f=v(c,d[1],h),y=v(c,d[3],h),m=v(c,d[4],h),x=[];I(x,f,!1),I(x,y,!0),x.push(g,f,m,y),_(x,g),_(x,m),_(x,p),i.setItemLayout(h,{initBaseline:p[s],ends:x})}function v(b,w,M){var S=i.get(w,M),L=[];L[r]=b,L[s]=S;var D;return isNaN(b)||isNaN(S)?D=[NaN,NaN]:(D=a.dataToPoint(L),D[r]+=t),D}function I(b,w,M){var S=w.slice(),L=w.slice();S[r]+=o,L[r]-=o,M?b.push(S,L):b.push(L,S)}function _(b,w){var M=w.slice(),S=w.slice();M[r]-=o,S[r]+=o,b.push(M,S)}}function Yc(n,t){t=t||{};for(var e=[],a=[],i=t.boundIQR,o=i==="none"||i===0,r=0;r<n.length;r++){var s=Zn(n[r].slice()),l=Un(s,.25),u=Un(s,.5),d=Un(s,.75),h=s[0],c=s[s.length-1],p=(i!=null?i:1.5)*(d-l),g=o?h:Math.max(h,l-p),f=o?c:Math.min(c,d+p),y=t.itemNameFormatter,m=ie(y)?y({value:r}):be(y)?y.replace("{value}",r+""):r+"";e.push([m,g,l,u,d,f]);for(var x=0;x<s.length;x++){var v=s[x];if(v<g||v>f){var I=[m,v];a.push(I)}}}return{boxData:e,outliers:a}}var Zc={type:"echarts:boxplot",transform:function(n){var t=n.upstream;if(t.sourceFormat!==ji){var e="";J(e)}var a=Yc(t.getRawData(),n.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:a.boxData},{data:a.outliers}]}};function Uc(n){n.registerSeriesModel(Vc),n.registerChartView(Bc),n.registerLayout(Fc),n.registerTransform(Zc)}var jc=["color","borderColor"],qc=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,i){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(e),this._isLargeDraw?this._renderLarge(e):this._renderNormal(e)},t.prototype.incrementalPrepareRender=function(e,a,i){this._clear(),this._updateDrawMode(e)},t.prototype.incrementalRender=function(e,a,i,o){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(e,a):this._incrementalRenderNormal(e,a)},t.prototype.eachRendered=function(e){Yt(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var a=e.pipelineContext.large;(this._isLargeDraw==null||a!==this._isLargeDraw)&&(this._isLargeDraw=a,this._clear())},t.prototype._renderNormal=function(e){var a=e.getData(),i=this._data,o=this.group,r=a.getLayout("isSimpleBox"),s=e.get("clip",!0),l=e.coordinateSystem,u=l.getArea&&l.getArea();this._data||o.removeAll(),a.diff(i).add(function(d){if(a.hasValue(d)){var h=a.getItemLayout(d);if(s&&fr(u,h))return;var c=Ga(h,d,!0);Te(c,{shape:{points:h.ends}},e,d),Ba(c,a,d,r),o.add(c),a.setItemGraphicEl(d,c)}}).update(function(d,h){var c=i.getItemGraphicEl(h);if(!a.hasValue(d)){o.remove(c);return}var p=a.getItemLayout(d);if(s&&fr(u,p)){o.remove(c);return}c?(se(c,{shape:{points:p.ends}},e,d),lt(c)):c=Ga(p),Ba(c,a,d,r),o.add(c),a.setItemGraphicEl(d,c)}).remove(function(d){var h=i.getItemGraphicEl(d);h&&o.remove(h)}).execute(),this._data=a},t.prototype._renderLarge=function(e){this._clear(),gr(e,this.group);var a=e.get("clip",!0)?jn(e.coordinateSystem,!1,e):null;a?this.group.setClipPath(a):this.group.removeClipPath()},t.prototype._incrementalRenderNormal=function(e,a){for(var i=a.getData(),o=i.getLayout("isSimpleBox"),r;(r=e.next())!=null;){var s=i.getItemLayout(r),l=Ga(s);Ba(l,i,r,o),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},t.prototype._incrementalRenderLarge=function(e,a){gr(a,this.group,this._progressiveEls,!0)},t.prototype.remove=function(e){this._clear()},t.prototype._clear=function(){this.group.removeAll(),this._data=null},t.type="candlestick",t}(he),Kc=function(){function n(){}return n}(),Qc=function(n){V(t,n);function t(e){var a=n.call(this,e)||this;return a.type="normalCandlestickBox",a}return t.prototype.getDefaultShape=function(){return new Kc},t.prototype.buildPath=function(e,a){var i=a.points;this.__simpleBox?(e.moveTo(i[4][0],i[4][1]),e.lineTo(i[6][0],i[6][1])):(e.moveTo(i[0][0],i[0][1]),e.lineTo(i[1][0],i[1][1]),e.lineTo(i[2][0],i[2][1]),e.lineTo(i[3][0],i[3][1]),e.closePath(),e.moveTo(i[4][0],i[4][1]),e.lineTo(i[5][0],i[5][1]),e.moveTo(i[6][0],i[6][1]),e.lineTo(i[7][0],i[7][1]))},t}(ye);function Ga(n,t,e){var a=n.ends;return new Qc({shape:{points:e?$c(a,n):a},z2:100})}function fr(n,t){for(var e=!0,a=0;a<t.ends.length;a++)if(n.contain(t.ends[a][0],t.ends[a][1])){e=!1;break}return e}function Ba(n,t,e,a){var i=t.getItemModel(e);n.useStyle(t.getItemVisual(e,"style")),n.style.strokeNoScale=!0,n.__simpleBox=a,Re(n,i)}function $c(n,t){return F(n,function(e){return e=e.slice(),e[1]=t.initBaseline,e})}var Jc=function(){function n(){}return n}(),Fa=function(n){V(t,n);function t(e){var a=n.call(this,e)||this;return a.type="largeCandlestickBox",a}return t.prototype.getDefaultShape=function(){return new Jc},t.prototype.buildPath=function(e,a){for(var i=a.points,o=0;o<i.length;)if(this.__sign===i[o++]){var r=i[o++];e.moveTo(r,i[o++]),e.lineTo(r,i[o++])}else o+=3},t}(ye);function gr(n,t,e,a){var i=n.getData(),o=i.getLayout("largePoints"),r=new Fa({shape:{points:o},__sign:1,ignoreCoarsePointer:!0});t.add(r);var s=new Fa({shape:{points:o},__sign:-1,ignoreCoarsePointer:!0});t.add(s);var l=new Fa({shape:{points:o},__sign:0,ignoreCoarsePointer:!0});t.add(l),Ha(1,r,n),Ha(-1,s,n),Ha(0,l,n),a&&(r.incremental=!0,s.incremental=!0),e&&e.push(r,s)}function Ha(n,t,e,a){var i=e.get(["itemStyle",n>0?"borderColor":"borderColor0"])||e.get(["itemStyle",n>0?"color":"color0"]);n===0&&(i=e.get(["itemStyle","borderColorDoji"]));var o=e.getModel("itemStyle").getItemStyle(jc);t.useStyle(o),t.style.fill=null,t.style.stroke=i}const ep=qc;var yr=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],e}return t.prototype.getShadowDim=function(){return"open"},t.prototype.brushSelector=function(e,a,i){var o=a.getItemLayout(e);return o&&i.rect(o.brushRect)},t.type="series.candlestick",t.dependencies=["xAxis","yAxis","grid"],t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderColorDoji:null,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},t}(pe);st(yr,dr,!0);const tp=yr;function np(n){!n||!G(n.series)||E(n.series,function(t){qn(t)&&t.type==="k"&&(t.type="candlestick")})}var ap=["itemStyle","borderColor"],ip=["itemStyle","borderColor0"],op=["itemStyle","borderColorDoji"],rp=["itemStyle","color"],sp=["itemStyle","color0"],lp={seriesType:"candlestick",plan:Kn(),performRawSeries:!0,reset:function(n,t){function e(o,r){return r.get(o>0?rp:sp)}function a(o,r){return r.get(o===0?op:o>0?ap:ip)}if(!t.isSeriesFiltered(n)){var i=n.pipelineContext.large;return!i&&{progress:function(o,r){for(var s;(s=o.next())!=null;){var l=r.getItemModel(s),u=r.getItemLayout(s).sign,d=l.getItemStyle();d.fill=e(u,l),d.stroke=a(u,l)||d.fill;var h=r.ensureUniqueItemVisual(s,"style");W(h,d)}}}}}};const up=lp;var dp={seriesType:"candlestick",plan:Kn(),reset:function(n){var t=n.coordinateSystem,e=n.getData(),a=hp(n,e),i=0,o=1,r=["x","y"],s=e.getDimensionIndex(e.mapDimension(r[i])),l=F(e.mapDimensionsAll(r[o]),e.getDimensionIndex,e),u=l[0],d=l[1],h=l[2],c=l[3];if(e.setLayout({candleWidth:a,isSimpleBox:a<=1.3}),s<0||l.length<4)return;return{progress:n.pipelineContext.large?g:p};function p(f,y){for(var m,x=y.getStore();(m=f.next())!=null;){var v=x.get(s,m),I=x.get(u,m),_=x.get(d,m),b=x.get(h,m),w=x.get(c,m),M=Math.min(I,_),S=Math.max(I,_),L=R(M,v),D=R(S,v),C=R(b,v),N=R(w,v),T=[];k(T,D,0),k(T,L,1),T.push(H(N),H(D),H(C),H(L));var A=y.getItemModel(m),P=!!A.get(["itemStyle","borderColorDoji"]);y.setItemLayout(m,{sign:vr(x,m,I,_,d,P),initBaseline:I>_?D[o]:L[o],ends:T,brushRect:z(b,w,v)})}function R(B,K){var Q=[];return Q[i]=K,Q[o]=B,isNaN(K)||isNaN(B)?[NaN,NaN]:t.dataToPoint(Q)}function k(B,K,Q){var q=K.slice(),ee=K.slice();q[i]=Qn(q[i]+a/2,1,!1),ee[i]=Qn(ee[i]-a/2,1,!0),Q?B.push(q,ee):B.push(ee,q)}function z(B,K,Q){var q=R(B,Q),ee=R(K,Q);return q[i]-=a/2,ee[i]-=a/2,{x:q[0],y:q[1],width:a,height:ee[1]-q[1]}}function H(B){return B[i]=Qn(B[i],1),B}}function g(f,y){for(var m=rl(f.count*4),x=0,v,I=[],_=[],b,w=y.getStore(),M=!!n.get(["itemStyle","borderColorDoji"]);(b=f.next())!=null;){var S=w.get(s,b),L=w.get(u,b),D=w.get(d,b),C=w.get(h,b),N=w.get(c,b);if(isNaN(S)||isNaN(C)||isNaN(N)){m[x++]=NaN,x+=3;continue}m[x++]=vr(w,b,L,D,d,M),I[i]=S,I[o]=C,v=t.dataToPoint(I,null,_),m[x++]=v?v[0]:NaN,m[x++]=v?v[1]:NaN,I[o]=N,v=t.dataToPoint(I,null,_),m[x++]=v?v[1]:NaN}y.setLayout("largePoints",m)}}};function vr(n,t,e,a,i,o){var r;return e>a?r=-1:e<a?r=1:r=o?0:t>0?n.get(i,t-1)<=a?1:-1:1,r}function hp(n,t){var e=n.getBaseAxis(),a,i=e.type==="category"?e.getBandWidth():(a=e.getExtent(),Math.abs(a[1]-a[0])/t.count()),o=Z(Ge(n.get("barMaxWidth"),i),i),r=Z(Ge(n.get("barMinWidth"),1),i),s=n.get("barWidth");return s!=null?Z(s,i):Math.max(Math.min(i/2,o),r)}const cp=dp;function pp(n){n.registerChartView(ep),n.registerSeriesModel(tp),n.registerPreprocessor(np),n.registerVisual(up),n.registerLayout(cp)}function mr(n,t){var e=t.rippleEffectColor||t.color;n.eachChild(function(a){a.attr({z:t.z,zlevel:t.zlevel,style:{stroke:t.brushType==="stroke"?e:null,fill:t.brushType==="fill"?e:null}})})}var fp=function(n){V(t,n);function t(e,a){var i=n.call(this)||this,o=new Ei(e,a),r=new oe;return i.add(o),i.add(r),i.updateData(e,a),i}return t.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},t.prototype.startEffectAnimation=function(e){for(var a=e.symbolType,i=e.color,o=e.rippleNumber,r=this.childAt(1),s=0;s<o;s++){var l=On(a,-1,-1,2,2,i);l.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var u=-s/o*e.period+e.effectOffset;l.animate("",!0).when(e.period,{scaleX:e.rippleScale/2,scaleY:e.rippleScale/2}).delay(u).start(),l.animateStyle(!0).when(e.period,{opacity:0}).delay(u).start(),r.add(l)}mr(r,e)},t.prototype.updateEffectAnimation=function(e){for(var a=this._effectCfg,i=this.childAt(1),o=["symbolType","period","rippleScale","rippleNumber"],r=0;r<o.length;r++){var s=o[r];if(a[s]!==e[s]){this.stopEffectAnimation(),this.startEffectAnimation(e);return}}mr(i,e)},t.prototype.highlight=function(){Rn(this)},t.prototype.downplay=function(){Vn(this)},t.prototype.getSymbolType=function(){var e=this.childAt(0);return e&&e.getSymbolType()},t.prototype.updateData=function(e,a){var i=this,o=e.hostModel;this.childAt(0).updateData(e,a);var r=this.childAt(1),s=e.getItemModel(a),l=e.getItemVisual(a,"symbol"),u=kn(e.getItemVisual(a,"symbolSize")),d=e.getItemVisual(a,"style"),h=d&&d.fill,c=s.getModel("emphasis");r.setScale(u),r.traverse(function(y){y.setStyle("fill",h)});var p=zn(e.getItemVisual(a,"symbolOffset"),u);p&&(r.x=p[0],r.y=p[1]);var g=e.getItemVisual(a,"symbolRotate");r.rotation=(g||0)*Math.PI/180||0;var f={};f.showEffectOn=o.get("showEffectOn"),f.rippleScale=s.get(["rippleEffect","scale"]),f.brushType=s.get(["rippleEffect","brushType"]),f.period=s.get(["rippleEffect","period"])*1e3,f.effectOffset=a/e.count(),f.z=o.getShallow("z")||0,f.zlevel=o.getShallow("zlevel")||0,f.symbolType=l,f.color=h,f.rippleEffectColor=s.get(["rippleEffect","color"]),f.rippleNumber=s.get(["rippleEffect","number"]),f.showEffectOn==="render"?(this._effectCfg?this.updateEffectAnimation(f):this.startEffectAnimation(f),this._effectCfg=f):(this._effectCfg=null,this.stopEffectAnimation(),this.onHoverStateChange=function(y){y==="emphasis"?f.showEffectOn!=="render"&&i.startEffectAnimation(f):y==="normal"&&f.showEffectOn!=="render"&&i.stopEffectAnimation()}),this._effectCfg=f,fe(this,c.get("focus"),c.get("blurScope"),c.get("disabled"))},t.prototype.fadeOut=function(e){e&&e()},t}(oe);const gp=fp;var yp=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(){this._symbolDraw=new Gn(gp)},t.prototype.render=function(e,a,i){var o=e.getData(),r=this._symbolDraw;r.updateData(o,{clipShape:this._getClipShape(e)}),this.group.add(r.group)},t.prototype._getClipShape=function(e){var a=e.coordinateSystem,i=a&&a.getArea&&a.getArea();return e.get("clip",!0)?i:null},t.prototype.updateTransform=function(e,a,i){var o=e.getData();this.group.dirty();var r=qi("").reset(e,a,i);r.progress&&r.progress({start:0,end:o.count(),count:o.count()},o),this._symbolDraw.updateLayout()},t.prototype._updateGroupTransform=function(e){var a=e.coordinateSystem;a&&a.getRoamTransform&&(this.group.transform=sl(a.getRoamTransform()),this.group.decomposeTransform())},t.prototype.remove=function(e,a){this._symbolDraw&&this._symbolDraw.remove(!0)},t.type="effectScatter",t}(he);const vp=yp;var mp=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return t.prototype.getInitialData=function(e,a){return It(null,this,{useEncodeDefaulter:!0})},t.prototype.brushSelector=function(e,a,i){return i.point(a.getItemLayout(e))},t.type="series.effectScatter",t.dependencies=["grid","polar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",clip:!0,rippleEffect:{period:4,scale:2.5,brushType:"fill",number:3},universalTransition:{divideShape:"clone"},symbolSize:10},t}(pe);const xp=mp;function _p(n){n.registerChartView(vp),n.registerSeriesModel(xp),n.registerLayout(qi("effectScatter"))}var Ip=function(n){V(t,n);function t(e,a,i){var o=n.call(this)||this;return o.add(o.createLine(e,a,i)),o._updateEffectSymbol(e,a),o}return t.prototype.createLine=function(e,a,i){return new Ta(e,a,i)},t.prototype._updateEffectSymbol=function(e,a){var i=e.getItemModel(a),o=i.getModel("effect"),r=o.get("symbolSize"),s=o.get("symbol");G(r)||(r=[r,r]);var l=e.getItemVisual(a,"style"),u=o.get("color")||l&&l.stroke,d=this.childAt(1);this._symbolType!==s&&(this.remove(d),d=On(s,-.5,-.5,1,1,u),d.z2=100,d.culling=!0,this.add(d)),d&&(d.setStyle("shadowColor",u),d.setStyle(o.getItemStyle(["color"])),d.scaleX=r[0],d.scaleY=r[1],d.setColor(u),this._symbolType=s,this._symbolScale=r,this._updateEffectAnimation(e,o,a))},t.prototype._updateEffectAnimation=function(e,a,i){var o=this.childAt(1);if(o){var r=e.getItemLayout(i),s=a.get("period")*1e3,l=a.get("loop"),u=a.get("roundTrip"),d=a.get("constantSpeed"),h=Ne(a.get("delay"),function(p){return p/e.count()*s/3});if(o.ignore=!0,this._updateAnimationPoints(o,r),d>0&&(s=this._getLineLength(o)/d*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){o.stopAnimation();var c=void 0;ie(h)?c=h(i):c=h,o.__t>0&&(c=-s*o.__t),this._animateSymbol(o,s,c,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},t.prototype._animateSymbol=function(e,a,i,o,r){if(a>0){e.__t=0;var s=this,l=e.animate("",o).when(r?a*2:a,{__t:r?2:1}).delay(i).during(function(){s._updateSymbolPosition(e)});o||l.done(function(){s.remove(e)}),l.start()}},t.prototype._getLineLength=function(e){return bt(e.__p1,e.__cp1)+bt(e.__cp1,e.__p2)},t.prototype._updateAnimationPoints=function(e,a){e.__p1=a[0],e.__p2=a[1],e.__cp1=a[2]||[(a[0][0]+a[1][0])/2,(a[0][1]+a[1][1])/2]},t.prototype.updateData=function(e,a,i){this.childAt(0).updateData(e,a,i),this._updateEffectSymbol(e,a)},t.prototype._updateSymbolPosition=function(e){var a=e.__p1,i=e.__p2,o=e.__cp1,r=e.__t<1?e.__t:2-e.__t,s=[e.x,e.y],l=s.slice(),u=Xi,d=ll;s[0]=u(a[0],o[0],i[0],r),s[1]=u(a[1],o[1],i[1],r);var h=e.__t<1?d(a[0],o[0],i[0],r):d(i[0],o[0],a[0],1-r),c=e.__t<1?d(a[1],o[1],i[1],r):d(i[1],o[1],a[1],1-r);e.rotation=-Math.atan2(c,h)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(e.__lastT!==void 0&&e.__lastT<e.__t?(e.scaleY=bt(l,s)*1.05,r===1&&(s[0]=l[0]+(s[0]-l[0])/2,s[1]=l[1]+(s[1]-l[1])/2)):e.__lastT===1?e.scaleY=2*bt(a,s):e.scaleY=this._symbolScale[1]),e.__lastT=e.__t,e.ignore=!1,e.x=s[0],e.y=s[1]},t.prototype.updateLayout=function(e,a){this.childAt(0).updateLayout(e,a);var i=e.getItemModel(a).getModel("effect");this._updateEffectAnimation(e,i,a)},t}(oe);const xr=Ip;var bp=function(n){V(t,n);function t(e,a,i){var o=n.call(this)||this;return o._createPolyline(e,a,i),o}return t.prototype._createPolyline=function(e,a,i){var o=e.getItemLayout(a),r=new Hn({shape:{points:o}});this.add(r),this._updateCommonStl(e,a,i)},t.prototype.updateData=function(e,a,i){var o=e.hostModel,r=this.childAt(0),s={shape:{points:e.getItemLayout(a)}};se(r,s,o,a),this._updateCommonStl(e,a,i)},t.prototype._updateCommonStl=function(e,a,i){var o=this.childAt(0),r=e.getItemModel(a),s=i&&i.emphasisLineStyle,l=i&&i.focus,u=i&&i.blurScope,d=i&&i.emphasisDisabled;if(!i||e.hasItemOption){var h=r.getModel("emphasis");s=h.getModel("lineStyle").getLineStyle(),d=h.get("disabled"),l=h.get("focus"),u=h.get("blurScope")}o.useStyle(e.getItemVisual(a,"style")),o.style.fill=null,o.style.strokeNoScale=!0;var c=o.ensureState("emphasis");c.style=s,fe(this,l,u,d)},t.prototype.updateLayout=function(e,a){var i=this.childAt(0);i.setShape("points",e.getItemLayout(a))},t}(oe);const _r=bp;var wp=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e._lastFrame=0,e._lastFramePercent=0,e}return t.prototype.createLine=function(e,a,i){return new _r(e,a,i)},t.prototype._updateAnimationPoints=function(e,a){this._points=a;for(var i=[0],o=0,r=1;r<a.length;r++){var s=a[r-1],l=a[r];o+=bt(s,l),i.push(o)}if(o===0){this._length=0;return}for(var r=0;r<i.length;r++)i[r]/=o;this._offsets=i,this._length=o},t.prototype._getLineLength=function(){return this._length},t.prototype._updateSymbolPosition=function(e){var a=e.__t<1?e.__t:2-e.__t,i=this._points,o=this._offsets,r=i.length;if(o){var s=this._lastFrame,l;if(a<this._lastFramePercent){var u=Math.min(s+1,r-1);for(l=u;l>=0&&!(o[l]<=a);l--);l=Math.min(l,r-2)}else{for(l=s;l<r&&!(o[l]>a);l++);l=Math.min(l-1,r-2)}var d=(a-o[l])/(o[l+1]-o[l]),h=i[l],c=i[l+1];e.x=h[0]*(1-d)+d*c[0],e.y=h[1]*(1-d)+d*c[1];var p=e.__t<1?c[0]-h[0]:h[0]-c[0],g=e.__t<1?c[1]-h[1]:h[1]-c[1];e.rotation=-Math.atan2(g,p)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=a,e.ignore=!1}},t}(xr);const Sp=wp;var Mp=function(){function n(){this.polyline=!1,this.curveness=0,this.segs=[]}return n}(),Lp=function(n){V(t,n);function t(e){var a=n.call(this,e)||this;return a._off=0,a.hoverDataIdx=-1,a}return t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new Mp},t.prototype.buildPath=function(e,a){var i=a.segs,o=a.curveness,r;if(a.polyline)for(r=this._off;r<i.length;){var s=i[r++];if(s>0){e.moveTo(i[r++],i[r++]);for(var l=1;l<s;l++)e.lineTo(i[r++],i[r++])}}else for(r=this._off;r<i.length;){var u=i[r++],d=i[r++],h=i[r++],c=i[r++];if(e.moveTo(u,d),o>0){var p=(u+h)/2-(d-c)*o,g=(d+c)/2-(h-u)*o;e.quadraticCurveTo(p,g,h,c)}else e.lineTo(h,c)}this.incremental&&(this._off=r,this.notClear=!0)},t.prototype.findDataIndex=function(e,a){var i=this.shape,o=i.segs,r=i.curveness,s=this.style.lineWidth;if(i.polyline)for(var l=0,u=0;u<o.length;){var d=o[u++];if(d>0)for(var h=o[u++],c=o[u++],p=1;p<d;p++){var g=o[u++],f=o[u++];if(Ki(h,c,g,f,s,e,a))return l}l++}else for(var l=0,u=0;u<o.length;){var h=o[u++],c=o[u++],g=o[u++],f=o[u++];if(r>0){var y=(h+g)/2-(c-f)*r,m=(c+f)/2-(g-h)*r;if(ul(h,c,y,m,g,f,s,e,a))return l}else if(Ki(h,c,g,f,s,e,a))return l;l++}return-1},t.prototype.contain=function(e,a){var i=this.transformCoordToLocal(e,a),o=this.getBoundingRect();if(e=i[0],a=i[1],o.contain(e,a)){var r=this.hoverDataIdx=this.findDataIndex(e,a);return r>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var a=this.shape,i=a.segs,o=1/0,r=1/0,s=-1/0,l=-1/0,u=0;u<i.length;){var d=i[u++],h=i[u++];o=Math.min(d,o),s=Math.max(d,s),r=Math.min(h,r),l=Math.max(h,l)}e=this._rect=new de(o,r,s,l)}return e},t}(ye),Dp=function(){function n(){this.group=new oe}return n.prototype.updateData=function(t){this._clear();var e=this._create();e.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(e,t)},n.prototype.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clear()},n.prototype.incrementalUpdate=function(t,e){var a=this._newAdded[0],i=e.getLayout("linesPoints"),o=a&&a.shape.segs;if(o&&o.length<2e4){var r=o.length,s=new Float32Array(r+i.length);s.set(o),s.set(i,r),a.setShape({segs:s})}else{this._newAdded=[];var l=this._create();l.incremental=!0,l.setShape({segs:i}),this._setCommon(l,e),l.__startIndex=t.start}},n.prototype.remove=function(){this._clear()},n.prototype.eachRendered=function(t){this._newAdded[0]&&t(this._newAdded[0])},n.prototype._create=function(){var t=new Lp({cursor:"default",ignoreCoarsePointer:!0});return this._newAdded.push(t),this.group.add(t),t},n.prototype._setCommon=function(t,e,a){var i=e.hostModel;t.setShape({polyline:i.get("polyline"),curveness:i.get(["lineStyle","curveness"])}),t.useStyle(i.getModel("lineStyle").getLineStyle()),t.style.strokeNoScale=!0;var o=e.getVisual("style");o&&o.stroke&&t.setStyle("stroke",o.stroke),t.setStyle("fill",null);var r=ae(t);r.seriesIndex=i.seriesIndex,t.on("mousemove",function(s){r.dataIndex=null;var l=t.hoverDataIdx;l>0&&(r.dataIndex=l+t.__startIndex)})},n.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},n}();const Cp=Dp;var Tp={seriesType:"lines",plan:Kn(),reset:function(n){var t=n.coordinateSystem;if(t){var e=n.get("polyline"),a=n.pipelineContext.large;return{progress:function(i,o){var r=[];if(a){var s=void 0,l=i.end-i.start;if(e){for(var u=0,d=i.start;d<i.end;d++)u+=n.getLineCoordsCount(d);s=new Float32Array(l+u*2)}else s=new Float32Array(l*4);for(var h=0,c=[],d=i.start;d<i.end;d++){var p=n.getLineCoords(d,r);e&&(s[h++]=p);for(var g=0;g<p;g++)c=t.dataToPoint(r[g],!1,c),s[h++]=c[0],s[h++]=c[1]}o.setLayout("linesPoints",s)}else for(var d=i.start;d<i.end;d++){var f=o.getItemModel(d),p=n.getLineCoords(d,r),y=[];if(e)for(var m=0;m<p;m++)y.push(t.dataToPoint(r[m]));else{y[0]=t.dataToPoint(r[0]),y[1]=t.dataToPoint(r[1]);var x=f.get(["lineStyle","curveness"]);+x&&(y[2]=[(y[0][0]+y[1][0])/2-(y[0][1]-y[1][1])*x,(y[0][1]+y[1][1])/2-(y[1][0]-y[0][0])*x])}o.setItemLayout(d,y)}}}}}};const Ir=Tp;var Ap=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,i){var o=e.getData(),r=this._updateLineDraw(o,e),s=e.get("zlevel"),l=e.get(["effect","trailLength"]),u=i.getZr(),d=u.painter.getType()==="svg";d||u.painter.getLayer(s).clear(!0),this._lastZlevel!=null&&!d&&u.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(e)&&l>0&&(d||u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),r.updateData(o);var h=e.get("clip",!0)&&jn(e.coordinateSystem,!1,e);h?this.group.setClipPath(h):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},t.prototype.incrementalPrepareRender=function(e,a,i){var o=e.getData(),r=this._updateLineDraw(o,e);r.incrementalPrepareUpdate(o),this._clearLayer(i),this._finished=!1},t.prototype.incrementalRender=function(e,a,i){this._lineDraw.incrementalUpdate(e,a.getData()),this._finished=e.end===a.getData().count()},t.prototype.eachRendered=function(e){this._lineDraw&&this._lineDraw.eachRendered(e)},t.prototype.updateTransform=function(e,a,i){var o=e.getData(),r=e.pipelineContext;if(!this._finished||r.large||r.progressiveRender)return{update:!0};var s=Ir.reset(e,a,i);s.progress&&s.progress({start:0,end:o.count(),count:o.count()},o),this._lineDraw.updateLayout(),this._clearLayer(i)},t.prototype._updateLineDraw=function(e,a){var i=this._lineDraw,o=this._showEffect(a),r=!!a.get("polyline"),s=a.pipelineContext,l=s.large;return(!i||o!==this._hasEffet||r!==this._isPolyline||l!==this._isLargeDraw)&&(i&&i.remove(),i=this._lineDraw=l?new Cp:new Na(r?o?Sp:_r:o?xr:Ta),this._hasEffet=o,this._isPolyline=r,this._isLargeDraw=l),this.group.add(i.group),i},t.prototype._showEffect=function(e){return!!e.get(["effect","show"])},t.prototype._clearLayer=function(e){var a=e.getZr(),i=a.painter.getType()==="svg";!i&&this._lastZlevel!=null&&a.painter.getLayer(this._lastZlevel).clear(!0)},t.prototype.remove=function(e,a){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(a)},t.prototype.dispose=function(e,a){this.remove(e,a)},t.type="lines",t}(he);const Np=Ap;var Ep=typeof Uint32Array>"u"?Array:Uint32Array,Pp=typeof Float64Array>"u"?Array:Float64Array;function br(n){var t=n.data;t&&t[0]&&t[0][0]&&t[0][0].coord&&(n.data=F(t,function(e){var a=[e[0].coord,e[1].coord],i={coords:a};return e[0].name&&(i.fromName=e[0].name),e[1].name&&(i.toName=e[1].name),Qi([i,e[0],e[1]])}))}var Rp=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.visualStyleAccessPath="lineStyle",e.visualDrawType="stroke",e}return t.prototype.init=function(e){e.data=e.data||[],br(e);var a=this._processFlatCoordsArray(e.data);this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset,a.flatCoords&&(e.data=new Float32Array(a.count)),n.prototype.init.apply(this,arguments)},t.prototype.mergeOption=function(e){if(br(e),e.data){var a=this._processFlatCoordsArray(e.data);this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset,a.flatCoords&&(e.data=new Float32Array(a.count))}n.prototype.mergeOption.apply(this,arguments)},t.prototype.appendData=function(e){var a=this._processFlatCoordsArray(e.data);a.flatCoords&&(this._flatCoords?(this._flatCoords=Dn(this._flatCoords,a.flatCoords),this._flatCoordsOffset=Dn(this._flatCoordsOffset,a.flatCoordsOffset)):(this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset),e.data=new Float32Array(a.count)),this.getRawData().appendData(e.data)},t.prototype._getCoordsFromItemModel=function(e){var a=this.getData().getItemModel(e),i=a.option instanceof Array?a.option:a.getShallow("coords");return i},t.prototype.getLineCoordsCount=function(e){return this._flatCoordsOffset?this._flatCoordsOffset[e*2+1]:this._getCoordsFromItemModel(e).length},t.prototype.getLineCoords=function(e,a){if(this._flatCoordsOffset){for(var i=this._flatCoordsOffset[e*2],o=this._flatCoordsOffset[e*2+1],r=0;r<o;r++)a[r]=a[r]||[],a[r][0]=this._flatCoords[i+r*2],a[r][1]=this._flatCoords[i+r*2+1];return o}else{for(var s=this._getCoordsFromItemModel(e),r=0;r<s.length;r++)a[r]=a[r]||[],a[r][0]=s[r][0],a[r][1]=s[r][1];return s.length}},t.prototype._processFlatCoordsArray=function(e){var a=0;if(this._flatCoords&&(a=this._flatCoords.length),We(e[0])){for(var i=e.length,o=new Ep(i),r=new Pp(i),s=0,l=0,u=0,d=0;d<i;){u++;var h=e[d++];o[l++]=s+a,o[l++]=h;for(var c=0;c<h;c++){var p=e[d++],g=e[d++];r[s++]=p,r[s++]=g}}return{flatCoordsOffset:new Uint32Array(o.buffer,0,l),flatCoords:r,count:u}}return{flatCoordsOffset:null,flatCoords:null,count:e.length}},t.prototype.getInitialData=function(e,a){var i=new Ie(["value"],this);return i.hasItemOption=!1,i.initData(e.data,[],function(o,r,s,l){if(o instanceof Array)return NaN;i.hasItemOption=!0;var u=o.value;if(u!=null)return u instanceof Array?u[l]:u}),i},t.prototype.formatTooltip=function(e,a,i){var o=this.getData(),r=o.getItemModel(e),s=r.get("name");if(s)return s;var l=r.get("fromName"),u=r.get("toName"),d=[];return l!=null&&d.push(l),u!=null&&d.push(u),Ve("nameValue",{name:d.join(" > ")})},t.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},t.prototype.getProgressive=function(){var e=this.option.progressive;return e!=null?e:this.option.large?1e4:this.get("progressive")},t.prototype.getProgressiveThreshold=function(){var e=this.option.progressiveThreshold;return e!=null?e:this.option.large?2e4:this.get("progressiveThreshold")},t.prototype.getZLevelKey=function(){var e=this.getModel("effect"),a=e.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:e.get("show")&&a>0?a+"":""},t.type="series.lines",t.dependencies=["grid","polar","geo","calendar"],t.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},t}(pe);const Vp=Rp;function un(n){return n instanceof Array||(n=[n,n]),n}var kp={seriesType:"lines",reset:function(n){var t=un(n.get("symbol")),e=un(n.get("symbolSize")),a=n.getData();a.setVisual("fromSymbol",t&&t[0]),a.setVisual("toSymbol",t&&t[1]),a.setVisual("fromSymbolSize",e&&e[0]),a.setVisual("toSymbolSize",e&&e[1]);function i(o,r){var s=o.getItemModel(r),l=un(s.getShallow("symbol",!0)),u=un(s.getShallow("symbolSize",!0));l[0]&&o.setItemVisual(r,"fromSymbol",l[0]),l[1]&&o.setItemVisual(r,"toSymbol",l[1]),u[0]&&o.setItemVisual(r,"fromSymbolSize",u[0]),u[1]&&o.setItemVisual(r,"toSymbolSize",u[1])}return{dataEach:a.hasItemOption?i:null}}};const zp=kp;function Op(n){n.registerChartView(Np),n.registerSeriesModel(Vp),n.registerLayout(Ir),n.registerVisual(zp)}var Gp=256,Bp=function(){function n(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var t=$n.createCanvas();this.canvas=t}return n.prototype.update=function(t,e,a,i,o,r){var s=this._getBrush(),l=this._getGradient(o,"inRange"),u=this._getGradient(o,"outOfRange"),d=this.pointSize+this.blurSize,h=this.canvas,c=h.getContext("2d"),p=t.length;h.width=e,h.height=a;for(var g=0;g<p;++g){var f=t[g],y=f[0],m=f[1],x=f[2],v=i(x);c.globalAlpha=v,c.drawImage(s,y-d,m-d)}if(!h.width||!h.height)return h;for(var I=c.getImageData(0,0,h.width,h.height),_=I.data,b=0,w=_.length,M=this.minOpacity,S=this.maxOpacity,L=S-M;b<w;){var v=_[b+3]/256,D=Math.floor(v*(Gp-1))*4;if(v>0){var C=r(v)?l:u;v>0&&(v=v*L+M),_[b++]=C[D],_[b++]=C[D+1],_[b++]=C[D+2],_[b++]=C[D+3]*v*256}else b+=4}return c.putImageData(I,0,0),h},n.prototype._getBrush=function(){var t=this._brushCanvas||(this._brushCanvas=$n.createCanvas()),e=this.pointSize+this.blurSize,a=e*2;t.width=a,t.height=a;var i=t.getContext("2d");return i.clearRect(0,0,a,a),i.shadowOffsetX=a,i.shadowBlur=this.blurSize,i.shadowColor="#000",i.beginPath(),i.arc(-e,e,this.pointSize,0,Math.PI*2,!0),i.closePath(),i.fill(),t},n.prototype._getGradient=function(t,e){for(var a=this._gradientPixels,i=a[e]||(a[e]=new Uint8ClampedArray(256*4)),o=[0,0,0,0],r=0,s=0;s<256;s++)t[e](s/255,!0,o),i[r++]=o[0],i[r++]=o[1],i[r++]=o[2],i[r++]=o[3];return i},n}();const Fp=Bp;function Hp(n,t,e){var a=n[1]-n[0];t=F(t,function(r){return{interval:[(r.interval[0]-n[0])/a,(r.interval[1]-n[0])/a]}});var i=t.length,o=0;return function(r){var s;for(s=o;s<i;s++){var l=t[s].interval;if(l[0]<=r&&r<=l[1]){o=s;break}}if(s===i)for(s=o-1;s>=0;s--){var l=t[s].interval;if(l[0]<=r&&r<=l[1]){o=s;break}}return s>=0&&s<i&&e[s]}}function Wp(n,t){var e=n[1]-n[0];return t=[(t[0]-n[0])/e,(t[1]-n[0])/e],function(a){return a>=t[0]&&a<=t[1]}}function wr(n){var t=n.dimensions;return t[0]==="lng"&&t[1]==="lat"}var Xp=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,i){var o;a.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===e&&(o=s)})}),this._progressiveEls=null,this.group.removeAll();var r=e.coordinateSystem;r.type==="cartesian2d"||r.type==="calendar"?this._renderOnCartesianAndCalendar(e,i,0,e.getData().count()):wr(r)&&this._renderOnGeo(r,e,o,i)},t.prototype.incrementalPrepareRender=function(e,a,i){this.group.removeAll()},t.prototype.incrementalRender=function(e,a,i,o){var r=a.coordinateSystem;r&&(wr(r)?this.render(a,i,o):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(a,o,e.start,e.end,!0)))},t.prototype.eachRendered=function(e){Yt(this._progressiveEls||this.group,e)},t.prototype._renderOnCartesianAndCalendar=function(e,a,i,o,r){var s=e.coordinateSystem,l=Zt(s,"cartesian2d"),u,d,h,c;if(l){var p=s.getAxis("x"),g=s.getAxis("y");u=p.getBandWidth()+.5,d=g.getBandWidth()+.5,h=p.scale.getExtent(),c=g.scale.getExtent()}for(var f=this.group,y=e.getData(),m=e.getModel(["emphasis","itemStyle"]).getItemStyle(),x=e.getModel(["blur","itemStyle"]).getItemStyle(),v=e.getModel(["select","itemStyle"]).getItemStyle(),I=e.get(["itemStyle","borderRadius"]),_=Ae(e),b=e.getModel("emphasis"),w=b.get("focus"),M=b.get("blurScope"),S=b.get("disabled"),L=l?[y.mapDimension("x"),y.mapDimension("y"),y.mapDimension("value")]:[y.mapDimension("time"),y.mapDimension("value")],D=i;D<o;D++){var C=void 0,N=y.getItemVisual(D,"style");if(l){var T=y.get(L[0],D),A=y.get(L[1],D);if(isNaN(y.get(L[2],D))||isNaN(T)||isNaN(A)||T<h[0]||T>h[1]||A<c[0]||A>c[1])continue;var P=s.dataToPoint([T,A]);C=new He({shape:{x:P[0]-u/2,y:P[1]-d/2,width:u,height:d},style:N})}else{if(isNaN(y.get(L[1],D)))continue;C=new He({z2:1,shape:s.dataToRect([y.get(L[0],D)]).contentShape,style:N})}if(y.hasItemOption){var R=y.getItemModel(D),k=R.getModel("emphasis");m=k.getModel("itemStyle").getItemStyle(),x=R.getModel(["blur","itemStyle"]).getItemStyle(),v=R.getModel(["select","itemStyle"]).getItemStyle(),I=R.get(["itemStyle","borderRadius"]),w=k.get("focus"),M=k.get("blurScope"),S=k.get("disabled"),_=Ae(R)}C.shape.r=I;var z=e.getRawValue(D),H="-";z&&z[2]!=null&&(H=z[2]+""),Fe(C,_,{labelFetcher:e,labelDataIndex:D,defaultOpacity:N.opacity,defaultText:H}),C.ensureState("emphasis").style=m,C.ensureState("blur").style=x,C.ensureState("select").style=v,fe(C,w,M,S),C.incremental=r,r&&(C.states.emphasis.hoverLayer=!0),f.add(C),y.setItemGraphicEl(D,C),this._progressiveEls&&this._progressiveEls.push(C)}},t.prototype._renderOnGeo=function(e,a,i,o){var r=i.targetVisuals.inRange,s=i.targetVisuals.outOfRange,l=a.getData(),u=this._hmLayer||this._hmLayer||new Fp;u.blurSize=a.get("blurSize"),u.pointSize=a.get("pointSize"),u.minOpacity=a.get("minOpacity"),u.maxOpacity=a.get("maxOpacity");var d=e.getViewRect().clone(),h=e.getRoamTransform();d.applyTransform(h);var c=Math.max(d.x,0),p=Math.max(d.y,0),g=Math.min(d.width+d.x,o.getWidth()),f=Math.min(d.height+d.y,o.getHeight()),y=g-c,m=f-p,x=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],v=l.mapArray(x,function(w,M,S){var L=e.dataToPoint([w,M]);return L[0]-=c,L[1]-=p,L.push(S),L}),I=i.getExtent(),_=i.type==="visualMap.continuous"?Wp(I,i.option.range):Hp(I,i.getPieceList(),i.option.selected);u.update(v,y,m,r.color.getNormalizer(),{inRange:r.color.getColorMapper(),outOfRange:s.color.getColorMapper()},_);var b=new $i({style:{width:y,height:m,x:c,y:p,image:u.canvas},silent:!0});this.group.add(b)},t.type="heatmap",t}(he);const Yp=Xp;var Zp=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(e,a){return It(null,this,{generateCoord:"value"})},t.prototype.preventIncremental=function(){var e=Yi.get(this.get("coordinateSystem"));if(e&&e.dimensions)return e.dimensions[0]==="lng"&&e.dimensions[1]==="lat"},t.type="series.heatmap",t.dependencies=["grid","geo","calendar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:"#212121"}}},t}(pe);const Up=Zp;function jp(n){n.registerChartView(Yp),n.registerSeriesModel(Up)}var qp=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e._layers=[],e}return t.prototype.render=function(e,a,i){var o=e.getData(),r=this,s=this.group,l=e.getLayerSeries(),u=o.getLayout("layoutInfo"),d=u.rect,h=u.boundaryGap;s.x=0,s.y=d.y+h[0];function c(y){return y.name}var p=new ot(this._layersSeries||[],l,c,c),g=[];p.add(re(f,this,"add")).update(re(f,this,"update")).remove(re(f,this,"remove")).execute();function f(y,m,x){var v=r._layers;if(y==="remove"){s.remove(v[m]);return}for(var I=[],_=[],b,w=l[m].indices,M=0;M<w.length;M++){var S=o.getItemLayout(w[M]),L=S.x,D=S.y0,C=S.y;I.push(L,D),_.push(L,D+C),b=o.getItemVisual(w[M],"style")}var N,T=o.getItemLayout(w[0]),A=e.getModel("label"),P=A.get("margin"),R=e.getModel("emphasis");if(y==="add"){var k=g[m]=new oe;N=new dl({shape:{points:I,stackedOnPoints:_,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),k.add(N),s.add(k),e.isAnimationEnabled()&&N.setClipPath(Kp(N.getBoundingRect(),e,function(){N.removeClipPath()}))}else{var k=v[x];N=k.childAt(0),s.add(k),g[m]=k,se(N,{shape:{points:I,stackedOnPoints:_}},e),lt(N)}Fe(N,Ae(e),{labelDataIndex:w[M-1],defaultText:o.getName(w[M-1]),inheritColor:b.fill},{normal:{verticalAlign:"middle"}}),N.setTextConfig({position:null,local:!0});var z=N.getTextContent();z&&(z.x=T.x-P,z.y=T.y0+T.y/2),N.useStyle(b),o.setItemGraphicEl(m,N),Re(N,e),fe(N,R.get("focus"),R.get("blurScope"),R.get("disabled"))}this._layersSeries=l,this._layers=g},t.type="themeRiver",t}(he);function Kp(n,t,e){var a=new He({shape:{x:n.x-10,y:n.y-10,width:0,height:n.height+20}});return Te(a,{shape:{x:n.x-50,width:n.width+100,height:n.height+20}},t,e),a}const Qp=qp;var Wa=2,$p=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e){n.prototype.init.apply(this,arguments),this.legendVisualProvider=new Bn(re(this.getData,this),re(this.getRawData,this))},t.prototype.fixData=function(e){var a=e.length,i={},o=Xn(e,function(c){return i.hasOwnProperty(c[0]+"")||(i[c[0]+""]=-1),c[2]}),r=[];o.buckets.each(function(c,p){r.push({name:p,dataList:c})});for(var s=r.length,l=0;l<s;++l){for(var u=r[l].name,d=0;d<r[l].dataList.length;++d){var h=r[l].dataList[d][0]+"";i[h]=l}for(var h in i)i.hasOwnProperty(h)&&i[h]!==l&&(i[h]=l,e[a]=[h,0,u],a++)}return e},t.prototype.getInitialData=function(e,a){for(var i=this.getReferringComponents("singleAxis",Ji).models[0],o=i.get("type"),r=De(e.data,function(g){return g[2]!==void 0}),s=this.fixData(r||[]),l=[],u=this.nameMap=ve(),d=0,h=0;h<s.length;++h)l.push(s[h][Wa]),u.get(s[h][Wa])||(u.set(s[h][Wa],d),d++);var c=Tn(s,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:Yn(o)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}).dimensions,p=new Ie(c,this);return p.initData(s),p},t.prototype.getLayerSeries=function(){for(var e=this.getData(),a=e.count(),i=[],o=0;o<a;++o)i[o]=o;var r=e.mapDimension("single"),s=Xn(i,function(u){return e.get("name",u)}),l=[];return s.buckets.each(function(u,d){u.sort(function(h,c){return e.get(r,h)-e.get(r,c)}),l.push({name:d,indices:u})}),l},t.prototype.getAxisTooltipData=function(e,a,i){G(e)||(e=e?[e]:[]);for(var o=this.getData(),r=this.getLayerSeries(),s=[],l=r.length,u,d=0;d<l;++d){for(var h=Number.MAX_VALUE,c=-1,p=r[d].indices.length,g=0;g<p;++g){var f=o.get(e[0],r[d].indices[g]),y=Math.abs(f-a);y<=h&&(u=f,h=y,c=r[d].indices[g])}s.push(c)}return{dataIndices:s,nestestValue:u}},t.prototype.formatTooltip=function(e,a,i){var o=this.getData(),r=o.getName(e),s=o.get(o.mapDimension("value"),e);return Ve("nameValue",{name:r,value:s})},t.type="series.themeRiver",t.dependencies=["singleAxis"],t.defaultOption={z:2,colorBy:"data",coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",fontSize:11},emphasis:{label:{show:!0}}},t}(pe);const Jp=$p;function ef(n,t){n.eachSeriesByType("themeRiver",function(e){var a=e.getData(),i=e.coordinateSystem,o={},r=i.getRect();o.rect=r;var s=e.get("boundaryGap"),l=i.getAxis();if(o.boundaryGap=s,l.orient==="horizontal"){s[0]=Z(s[0],r.height),s[1]=Z(s[1],r.height);var u=r.height-s[0]-s[1];Sr(a,e,u)}else{s[0]=Z(s[0],r.width),s[1]=Z(s[1],r.width);var d=r.width-s[0]-s[1];Sr(a,e,d)}a.setLayout("layoutInfo",o)})}function Sr(n,t,e){if(n.count())for(var a=t.coordinateSystem,i=t.getLayerSeries(),o=n.mapDimension("single"),r=n.mapDimension("value"),s=F(i,function(y){return F(y.indices,function(m){var x=a.dataToPoint(n.get(o,m));return x[1]=n.get(r,m),x})}),l=tf(s),u=l.y0,d=e/l.max,h=i.length,c=i[0].indices.length,p,g=0;g<c;++g){p=u[g]*d,n.setItemLayout(i[0].indices[g],{layerIndex:0,x:s[0][g][0],y0:p,y:s[0][g][1]*d});for(var f=1;f<h;++f)p+=s[f-1][g][1]*d,n.setItemLayout(i[f].indices[g],{layerIndex:f,x:s[f][g][0],y0:p,y:s[f][g][1]*d})}}function tf(n){for(var t=n.length,e=n[0].length,a=[],i=[],o=0,r=0;r<e;++r){for(var s=0,l=0;l<t;++l)s+=n[l][r][1];s>o&&(o=s),a.push(s)}for(var u=0;u<e;++u)i[u]=(o-a[u])/2;o=0;for(var d=0;d<e;++d){var h=a[d]+i[d];h>o&&(o=h)}return{y0:i,max:o}}function nf(n){n.registerChartView(Qp),n.registerSeriesModel(Jp),n.registerLayout(ef),n.registerProcessor(Wn("themeRiver"))}var af=2,of=4,rf=function(n){V(t,n);function t(e,a,i,o){var r=n.call(this)||this;r.z2=af,r.textConfig={inside:!0},ae(r).seriesIndex=a.seriesIndex;var s=new Ft({z2:of,silent:e.getModel().get(["label","silent"])});return r.setTextContent(s),r.updateData(!0,e,a,i,o),r}return t.prototype.updateData=function(e,a,i,o,r){this.node=a,a.piece=this,i=i||this._seriesModel,o=o||this._ecModel;var s=this;ae(s).dataIndex=a.dataIndex;var l=a.getModel(),u=l.getModel("emphasis"),d=a.getLayout(),h=W({},d);h.label=null;var c=a.getVisual("style");c.lineJoin="bevel";var p=a.getVisual("decal");p&&(c.decal=eo(p,r));var g=to(l.getModel("itemStyle"),h,!0);W(h,g),E(Pn,function(x){var v=s.ensureState(x),I=l.getModel([x,"itemStyle"]);v.style=I.getItemStyle();var _=to(I,h);_&&(v.shape=_)}),e?(s.setShape(h),s.shape.r=d.r0,Te(s,{shape:{r:d.r}},i,a.dataIndex)):(se(s,{shape:h},i),lt(s)),s.useStyle(c),this._updateLabel(i);var f=l.getShallow("cursor");f&&s.attr("cursor",f),this._seriesModel=i||this._seriesModel,this._ecModel=o||this._ecModel;var y=u.get("focus"),m=y==="ancestor"?a.getAncestorsIndices():y==="descendant"?a.getDescendantIndices():y;fe(this,m,u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(e){var a=this,i=this.node.getModel(),o=i.getModel("label"),r=this.node.getLayout(),s=r.endAngle-r.startAngle,l=(r.startAngle+r.endAngle)/2,u=Math.cos(l),d=Math.sin(l),h=this,c=h.getTextContent(),p=this.node.dataIndex,g=o.get("minAngle")/180*Math.PI,f=o.get("show")&&!(g!=null&&Math.abs(s)<g);c.ignore=!f,E(hl,function(m){var x=m==="normal"?i.getModel("label"):i.getModel([m,"label"]),v=m==="normal",I=v?c:c.ensureState(m),_=e.getFormattedLabel(p,m);v&&(_=_||a.node.name),I.style=mt(x,{},null,m!=="normal",!0),_&&(I.style.text=_);var b=x.get("show");b!=null&&!v&&(I.ignore=!b);var w=y(x,"position"),M=v?h:h.states[m],S=M.style.fill;M.textConfig={outsideFill:x.get("color")==="inherit"?S:null,inside:w!=="outside"};var L,D=y(x,"distance")||0,C=y(x,"align"),N=y(x,"rotate"),T=Math.PI*.5,A=Math.PI*1.5,P=gt(N==="tangential"?Math.PI/2-l:l),R=P>T&&!cl(P-T)&&P<A;w==="outside"?(L=r.r+D,C=R?"right":"left"):!C||C==="center"?(s===2*Math.PI&&r.r0===0?L=0:L=(r.r+r.r0)/2,C="center"):C==="left"?(L=r.r0+D,C=R?"right":"left"):C==="right"&&(L=r.r-D,C=R?"left":"right"),I.style.align=C,I.style.verticalAlign=y(x,"verticalAlign")||"middle",I.x=L*u+r.cx,I.y=L*d+r.cy;var k=0;N==="radial"?k=gt(-l)+(R?Math.PI:0):N==="tangential"?k=gt(Math.PI/2-l)+(R?Math.PI:0):We(N)&&(k=N*Math.PI/180),I.rotation=gt(k)});function y(m,x){var v=m.get(x);return v!=null?v:o.get(x)}c.dirtyStyle()},t}(Jn);const Mr=rf;var Xa="sunburstRootToNode",Lr="sunburstHighlight",sf="sunburstUnhighlight";function lf(n){n.registerAction({type:Xa,update:"updateView"},function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},a);function a(i,o){var r=Lt(t,[Xa],i);if(r){var s=i.getViewRoot();s&&(t.direction=pa(s,r.node)?"rollUp":"drillDown"),i.resetViewRoot(r.node)}}}),n.registerAction({type:Lr,update:"none"},function(t,e,a){t=W({},t),e.eachComponent({mainType:"series",subType:"sunburst",query:t},i);function i(o){var r=Lt(t,[Lr],o);r&&(t.dataIndex=r.node.dataIndex)}a.dispatchAction(W(t,{type:"highlight"}))}),n.registerAction({type:sf,update:"updateView"},function(t,e,a){t=W({},t),a.dispatchAction(W(t,{type:"downplay"}))})}var uf=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,i,o){var r=this;this.seriesModel=e,this.api=i,this.ecModel=a;var s=e.getData(),l=s.tree.root,u=e.getViewRoot(),d=this.group,h=e.get("renderLabelForZeroData"),c=[];u.eachNode(function(x){c.push(x)});var p=this._oldChildren||[];g(c,p),m(l,u),this._initEvents(),this._oldChildren=c;function g(x,v){if(x.length===0&&v.length===0)return;new ot(v,x,I,I).add(_).update(_).remove(te(_,null)).execute();function I(b){return b.getId()}function _(b,w){var M=b==null?null:x[b],S=w==null?null:v[w];f(M,S)}}function f(x,v){if(!h&&x&&!x.getValue()&&(x=null),x!==l&&v!==l){if(v&&v.piece)x?(v.piece.updateData(!1,x,e,a,i),s.setItemGraphicEl(x.dataIndex,v.piece)):y(v);else if(x){var I=new Mr(x,e,a,i);d.add(I),s.setItemGraphicEl(x.dataIndex,I)}}}function y(x){x&&x.piece&&(d.remove(x.piece),x.piece=null)}function m(x,v){v.depth>0?(r.virtualPiece?r.virtualPiece.updateData(!1,x,e,a,i):(r.virtualPiece=new Mr(x,e,a,i),d.add(r.virtualPiece)),v.piece.off("click"),r.virtualPiece.on("click",function(I){r._rootToNode(v.parentNode)})):r.virtualPiece&&(d.remove(r.virtualPiece),r.virtualPiece=null)}},t.prototype._initEvents=function(){var e=this;this.group.off("click"),this.group.on("click",function(a){var i=!1,o=e.seriesModel.getViewRoot();o.eachNode(function(r){if(!i&&r.piece&&r.piece===a.target){var s=r.getModel().get("nodeClick");if(s==="rootToNode")e._rootToNode(r);else if(s==="link"){var l=r.getModel(),u=l.get("link");if(u){var d=l.get("target",!0)||"_blank";ki(u,d)}}i=!0}})})},t.prototype._rootToNode=function(e){e!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:Xa,from:this.uid,seriesId:this.seriesModel.id,targetNode:e})},t.prototype.containPoint=function(e,a){var i=a.getData(),o=i.getItemLayout(0);if(o){var r=e[0]-o.cx,s=e[1]-o.cy,l=Math.sqrt(r*r+s*s);return l<=o.r&&l>=o.r0}},t.type="sunburst",t}(he);const df=uf;var hf=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.ignoreStyleOnData=!0,e}return t.prototype.getInitialData=function(e,a){var i={name:e.name,children:e.data};Dr(i);var o=this._levelModels=F(e.levels||[],function(l){return new Be(l,this,a)},this),r=ca.createTree(i,this,s);function s(l){l.wrapMethod("getItemModel",function(u,d){var h=r.getNodeByDataIndex(d),c=o[h.depth];return c&&(u.parentModel=c),u})}return r.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.getDataParams=function(e){var a=n.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return a.treePathInfo=nn(i,this),a},t.prototype.getLevelModel=function(e){return this._levelModels&&this._levelModels[e.depth]},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var a=this.getRawData().tree.root;(!e||e!==a&&!a.contains(e))&&(this._viewRoot=a)},t.prototype.enableAriaDecal=function(){So(this)},t.type="series.sunburst",t.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},t}(pe);function Dr(n){var t=0;E(n.children,function(a){Dr(a);var i=a.value;G(i)&&(i=i[0]),t+=i});var e=n.value;G(e)&&(e=e[0]),(e==null||isNaN(e))&&(e=t),e<0&&(e=0),G(n.value)?n.value[0]=e:n.value=e}const cf=hf;var Cr=Math.PI/180;function pf(n,t,e){t.eachSeriesByType(n,function(a){var i=a.get("center"),o=a.get("radius");G(o)||(o=[0,o]),G(i)||(i=[i,i]);var r=e.getWidth(),s=e.getHeight(),l=Math.min(r,s),u=Z(i[0],r),d=Z(i[1],s),h=Z(o[0],l/2),c=Z(o[1],l/2),p=-a.get("startAngle")*Cr,g=a.get("minAngle")*Cr,f=a.getData().tree.root,y=a.getViewRoot(),m=y.depth,x=a.get("sort");x!=null&&Tr(y,x);var v=0;E(y.children,function(P){!isNaN(P.getValue())&&v++});var I=y.getValue(),_=Math.PI/(I||v)*2,b=y.depth>0,w=y.height-(b?-1:1),M=(c-h)/(w||1),S=a.get("clockwise"),L=a.get("stillShowZeroSum"),D=S?1:-1,C=function(P,R){if(P){var k=R;if(P!==f){var z=P.getValue(),H=I===0&&L?_:z*_;H<g&&(H=g),k=R+D*H;var B=P.depth-m-(b?-1:1),K=h+M*B,Q=h+M*(B+1),q=a.getLevelModel(P);if(q){var ee=q.get("r0",!0),me=q.get("r",!0),Y=q.get("radius",!0);Y!=null&&(ee=Y[0],me=Y[1]),ee!=null&&(K=Z(ee,l/2)),me!=null&&(Q=Z(me,l/2))}P.setLayout({angle:H,startAngle:R,endAngle:k,clockwise:S,cx:u,cy:d,r0:K,r:Q})}if(P.children&&P.children.length){var O=0;E(P.children,function(j){O+=C(j,R+O)})}return k-R}};if(b){var N=h,T=h+M,A=Math.PI*2;f.setLayout({angle:A,startAngle:p,endAngle:p+A,clockwise:S,cx:u,cy:d,r0:N,r:T})}C(y,p)})}function Tr(n,t){var e=n.children||[];n.children=ff(e,t),e.length&&E(n.children,function(a){Tr(a,t)})}function ff(n,t){if(ie(t)){var e=F(n,function(i,o){var r=i.getValue();return{params:{depth:i.depth,height:i.height,dataIndex:i.dataIndex,getValue:function(){return r}},index:o}});return e.sort(function(i,o){return t(i.params,o.params)}),F(e,function(i){return n[i.index]})}else{var a=t==="asc";return n.sort(function(i,o){var r=(i.getValue()-o.getValue())*(a?1:-1);return r===0?(i.dataIndex-o.dataIndex)*(a?-1:1):r})}}function gf(n){var t={};function e(a,i,o){for(var r=a;r&&r.depth>1;)r=r.parentNode;var s=i.getColorFromPalette(r.name||r.dataIndex+"",t);return a.depth>1&&be(s)&&(s=pl(s,(a.depth-1)/(o-1)*.5)),s}n.eachSeriesByType("sunburst",function(a){var i=a.getData(),o=i.tree;o.eachNode(function(r){var s=r.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=e(r,a,o.root.height));var u=i.ensureUniqueItemVisual(r.dataIndex,"style");W(u,l)})})}function yf(n){n.registerChartView(df),n.registerSeriesModel(cf),n.registerLayout(te(pf,"sunburst")),n.registerProcessor(te(Wn,"sunburst")),n.registerVisual(gf),lf(n)}var Ar={color:"fill",borderColor:"stroke"},vf={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},ze=xe(),mf=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},t.prototype.getInitialData=function(e,a){return It(null,this)},t.prototype.getDataParams=function(e,a,i){var o=n.prototype.getDataParams.call(this,e,a);return i&&(o.info=ze(i).info),o},t.type="series.custom",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},t}(pe);const xf=mf;function _f(n,t){return t=t||[0,0],F(["x","y"],function(e,a){var i=this.getAxis(e),o=t[a],r=n[a]/2;return i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(o-r)-i.dataToCoord(o+r))},this)}function If(n){var t=n.master.getRect();return{coordSys:{type:"cartesian2d",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(e){return n.dataToPoint(e)},size:re(_f,n)}}}function bf(n,t){return t=t||[0,0],F([0,1],function(e){var a=t[e],i=n[e]/2,o=[],r=[];return o[e]=a-i,r[e]=a+i,o[1-e]=r[1-e]=t[1-e],Math.abs(this.dataToPoint(o)[e]-this.dataToPoint(r)[e])},this)}function wf(n){var t=n.getBoundingRect();return{coordSys:{type:"geo",x:t.x,y:t.y,width:t.width,height:t.height,zoom:n.getZoom()},api:{coord:function(e){return n.dataToPoint(e)},size:re(bf,n)}}}function Sf(n,t){var e=this.getAxis(),a=t instanceof Array?t[0]:t,i=(n instanceof Array?n[0]:n)/2;return e.type==="category"?e.getBandWidth():Math.abs(e.dataToCoord(a-i)-e.dataToCoord(a+i))}function Mf(n){var t=n.getRect();return{coordSys:{type:"singleAxis",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(e){return n.dataToPoint(e)},size:re(Sf,n)}}}function Lf(n,t){return t=t||[0,0],F(["Radius","Angle"],function(e,a){var i="get"+e+"Axis",o=this[i](),r=t[a],s=n[a]/2,l=o.type==="category"?o.getBandWidth():Math.abs(o.dataToCoord(r-s)-o.dataToCoord(r+s));return e==="Angle"&&(l=l*Math.PI/180),l},this)}function Df(n){var t=n.getRadiusAxis(),e=n.getAngleAxis(),a=t.getExtent();return a[0]>a[1]&&a.reverse(),{coordSys:{type:"polar",cx:n.cx,cy:n.cy,r:a[1],r0:a[0]},api:{coord:function(i){var o=t.dataToRadius(i[0]),r=e.dataToAngle(i[1]),s=n.coordToPoint([o,r]);return s.push(o,r*Math.PI/180),s},size:re(Lf,n)}}}function Cf(n){var t=n.getRect(),e=n.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:n.getCellWidth(),cellHeight:n.getCellHeight(),rangeInfo:{start:e.start,end:e.end,weeks:e.weeks,dayCount:e.allDay}},api:{coord:function(a,i){return n.dataToPoint(a,i)}}}}var Oe="emphasis",je="normal",Ya="blur",Za="select",qe=[je,Oe,Ya,Za],Ua={normal:["itemStyle"],emphasis:[Oe,"itemStyle"],blur:[Ya,"itemStyle"],select:[Za,"itemStyle"]},ja={normal:["label"],emphasis:[Oe,"label"],blur:[Ya,"label"],select:[Za,"label"]},Tf=["x","y"],Af="e\0\0",Se={normal:{},emphasis:{},blur:{},select:{}},Nf={cartesian2d:If,geo:wf,single:Mf,polar:Df,calendar:Cf};function qa(n){return n instanceof ye}function Ka(n){return n instanceof An}function Ef(n,t){t.copyTransform(n),Ka(t)&&Ka(n)&&(t.setStyle(n.style),t.z=n.z,t.z2=n.z2,t.zlevel=n.zlevel,t.invisible=n.invisible,t.ignore=n.ignore,qa(t)&&qa(n)&&t.setShape(n.shape))}var Pf=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,i,o){this._progressiveEls=null;var r=this._data,s=e.getData(),l=this.group,u=Er(e,s,a,i);r||l.removeAll(),s.diff(r).add(function(h){Ja(i,null,h,u(h,o),e,l,s)}).remove(function(h){var c=r.getItemGraphicEl(h);c&&ea(c,ze(c).option,e)}).update(function(h,c){var p=r.getItemGraphicEl(c);Ja(i,p,h,u(h,o),e,l,s)}).execute();var d=e.get("clip",!0)?jn(e.coordinateSystem,!1,e):null;d?l.setClipPath(d):l.removeClipPath(),this._data=s},t.prototype.incrementalPrepareRender=function(e,a,i){this.group.removeAll(),this._data=null},t.prototype.incrementalRender=function(e,a,i,o,r){var s=a.getData(),l=Er(a,s,i,o),u=this._progressiveEls=[];function d(p){p.isGroup||(p.incremental=!0,p.ensureState("emphasis").hoverLayer=!0)}for(var h=e.start;h<e.end;h++){var c=Ja(null,null,h,l(h,r),a,this.group,s);c&&(c.traverse(d),u.push(c))}},t.prototype.eachRendered=function(e){Yt(this._progressiveEls||this.group,e)},t.prototype.filterForExposedEvent=function(e,a,i,o){var r=a.element;if(r==null||i.name===r)return!0;for(;(i=i.__hostTarget||i.parent)&&i!==this.group;)if(i.name===r)return!0;return!1},t.type="custom",t}(he);const Rf=Pf;function Qa(n){var t=n.type,e;if(t==="path"){var a=n.shape,i=a.width!=null&&a.height!=null?{x:a.x||0,y:a.y||0,width:a.width,height:a.height}:null,o=zr(a);e=ml(o,null,i,a.layout||"center"),ze(e).customPathData=o}else if(t==="image")e=new $i({}),ze(e).customImagePath=n.style.image;else if(t==="text")e=new Ft({});else if(t==="group")e=new oe;else{if(t==="compoundPath")throw new Error('"compoundPath" is not supported yet.');var r=xl(t);if(!r){var s="";J(s)}e=new r}return ze(e).customGraphicType=t,e.name=n.name,e.z2EmphasisLift=1,e.z2SelectLift=1,e}function $a(n,t,e,a,i,o,r){_l(t);var s=i&&i.normal.cfg;s&&t.setTextConfig(s),a&&a.transition==null&&(a.transition=Tf);var l=a&&a.style;if(l){if(t.type==="text"){var u=l;Ce(u,"textFill")&&(u.fill=u.textFill),Ce(u,"textStroke")&&(u.stroke=u.textStroke)}var d=void 0,h=qa(t)?l.decal:null;n&&h&&(h.dirty=!0,d=eo(h,n)),l.__decalPattern=d}if(Ka(t)&&l){var d=l.__decalPattern;d&&(l.decal=d)}Il(t,a,o,{dataIndex:e,isInit:r,clearStyle:!0}),bl(t,a.keyframeAnimation,o)}function Nr(n,t,e,a,i){var o=t.isGroup?null:t,r=i&&i[n].cfg;if(o){var s=o.ensureState(n);if(a===!1){var l=o.getState(n);l&&(l.style=null)}else s.style=a||null;r&&(s.textConfig=r),Gt(o)}}function Vf(n,t,e){if(!n.isGroup){var a=n,i=e.currentZ,o=e.currentZLevel;a.z=i,a.zlevel=o;var r=t.z2;r!=null&&(a.z2=r||0);for(var s=0;s<qe.length;s++)kf(a,t,qe[s])}}function kf(n,t,e){var a=e===je,i=a?t:dn(t,e),o=i?i.z2:null,r;o!=null&&(r=a?n:n.ensureState(e),r.z2=o||0)}function Er(n,t,e,a){var i=n.get("renderItem"),o=n.coordinateSystem,r={};o&&(r=o.prepareCustoms?o.prepareCustoms(o):Nf[o.type](o));for(var s=ce({getWidth:a.getWidth,getHeight:a.getHeight,getZr:a.getZr,getDevicePixelRatio:a.getDevicePixelRatio,value:I,style:b,ordinalRawValue:_,styleEmphasis:w,visual:L,barLayout:D,currentSeriesIndices:C,font:N},r.api||{}),l={context:{},seriesId:n.id,seriesName:n.name,seriesIndex:n.seriesIndex,coordSys:r.coordSys,dataInsideLength:t.count(),encode:zf(n.getData())},u,d,h={},c={},p={},g={},f=0;f<qe.length;f++){var y=qe[f];p[y]=n.getModel(Ua[y]),g[y]=n.getModel(ja[y])}function m(T){return T===u?d||(d=t.getItemModel(T)):t.getItemModel(T)}function x(T,A){return t.hasItemOption?T===u?h[A]||(h[A]=m(T).getModel(Ua[A])):m(T).getModel(Ua[A]):p[A]}function v(T,A){return t.hasItemOption?T===u?c[A]||(c[A]=m(T).getModel(ja[A])):m(T).getModel(ja[A]):g[A]}return function(T,A){return u=T,d=null,h={},c={},i&&i(ce({dataIndexInside:T,dataIndex:t.getRawIndex(T),actionType:A?A.type:null},l),s)};function I(T,A){return A==null&&(A=u),t.getStore().get(t.getDimensionIndex(T||0),A)}function _(T,A){A==null&&(A=u),T=T||0;var P=t.getDimensionInfo(T);if(!P){var R=t.getDimensionIndex(T);return R>=0?t.getStore().get(R,A):void 0}var k=t.get(P.name,A),z=P&&P.ordinalMeta;return z?z.categories[k]:k}function b(T,A){A==null&&(A=u);var P=t.getItemVisual(A,"style"),R=P&&P.fill,k=P&&P.opacity,z=x(A,je).getItemStyle();R!=null&&(z.fill=R),k!=null&&(z.opacity=k);var H={inheritColor:be(R)?R:"#000"},B=v(A,je),K=mt(B,null,H,!1,!0);K.text=B.getShallow("show")?Ge(n.getFormattedLabel(A,je),no(t,A)):null;var Q=ao(B,H,!1);return S(T,z),z=io(z,K,Q),T&&M(z,T),z.legacy=!0,z}function w(T,A){A==null&&(A=u);var P=x(A,Oe).getItemStyle(),R=v(A,Oe),k=mt(R,null,null,!0,!0);k.text=R.getShallow("show")?xt(n.getFormattedLabel(A,Oe),n.getFormattedLabel(A,je),no(t,A)):null;var z=ao(R,null,!0);return S(T,P),P=io(P,k,z),T&&M(P,T),P.legacy=!0,P}function M(T,A){for(var P in A)Ce(A,P)&&(T[P]=A[P])}function S(T,A){T&&(T.textFill&&(A.textFill=T.textFill),T.textPosition&&(A.textPosition=T.textPosition))}function L(T,A){if(A==null&&(A=u),Ce(Ar,T)){var P=t.getItemVisual(A,"style");return P?P[Ar[T]]:null}if(Ce(vf,T))return t.getItemVisual(A,T)}function D(T){if(o.type==="cartesian2d"){var A=o.getBaseAxis();return fl(ce({axis:A},T))}}function C(){return e.getCurrentSeriesIndices()}function N(T){return gl(T,e)}}function zf(n){var t={};return E(n.dimensions,function(e){var a=n.getDimensionInfo(e);if(!a.isExtraCoord){var i=a.coordDim,o=t[i]=t[i]||[];o[a.coordDimIndex]=n.getDimensionIndex(e)}}),t}function Ja(n,t,e,a,i,o,r){if(!a){o.remove(t);return}var s=ei(n,t,e,a,i,o);return s&&r.setItemGraphicEl(e,s),s&&fe(s,a.focus,a.blurScope,a.emphasisDisabled),s}function ei(n,t,e,a,i,o){var r=-1,s=t;t&&Pr(t,a,i)&&(r=_e(o.childrenRef(),t),t=null);var l=!t,u=t;u?u.clearStates():(u=Qa(a),s&&Ef(s,u)),a.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),Se.normal.cfg=Se.normal.conOpt=Se.emphasis.cfg=Se.emphasis.conOpt=Se.blur.cfg=Se.blur.conOpt=Se.select.cfg=Se.select.conOpt=null,Se.isLegacy=!1,Gf(u,e,a,i,l,Se),Of(u,e,a,i,l),$a(n,u,e,a,Se,i,l),Ce(a,"info")&&(ze(u).info=a.info);for(var d=0;d<qe.length;d++){var h=qe[d];if(h!==je){var c=dn(a,h),p=ti(a,c,h);Nr(h,u,c,p,Se)}}return Vf(u,a,i),a.type==="group"&&Bf(n,u,e,a,i),r>=0?o.replaceAt(u,r):o.add(u),u}function Pr(n,t,e){var a=ze(n),i=t.type,o=t.shape,r=t.style;return e.isUniversalTransitionEnabled()||i!=null&&i!==a.customGraphicType||i==="path"&&Xf(o)&&zr(o)!==a.customPathData||i==="image"&&Ce(r,"image")&&r.image!==a.customImagePath}function Of(n,t,e,a,i){var o=e.clipPath;if(o===!1)n&&n.getClipPath()&&n.removeClipPath();else if(o){var r=n.getClipPath();r&&Pr(r,o,a)&&(r=null),r||(r=Qa(o),n.setClipPath(r)),$a(null,r,t,o,null,a,i)}}function Gf(n,t,e,a,i,o){if(!n.isGroup){Rr(e,null,o),Rr(e,Oe,o);var r=o.normal.conOpt,s=o.emphasis.conOpt,l=o.blur.conOpt,u=o.select.conOpt;if(r!=null||s!=null||u!=null||l!=null){var d=n.getTextContent();if(r===!1)d&&n.removeTextContent();else{r=o.normal.conOpt=r||{type:"text"},d?d.clearStates():(d=Qa(r),n.setTextContent(d)),$a(null,d,t,r,null,a,i);for(var h=r&&r.style,c=0;c<qe.length;c++){var p=qe[c];if(p!==je){var g=o[p].conOpt;Nr(p,d,g,ti(r,g,p),null)}}h?d.dirty():d.markRedraw()}}}}function Rr(n,t,e){var a=t?dn(n,t):n,i=t?ti(n,a,Oe):n.style,o=n.type,r=a?a.textConfig:null,s=n.textContent,l=s?t?dn(s,t):s:null;if(i&&(e.isLegacy||yl(i,o,!!r,!!l))){e.isLegacy=!0;var u=vl(i,o,!t);!r&&u.textConfig&&(r=u.textConfig),!l&&u.textContent&&(l=u.textContent)}if(!t&&l){var d=l;!d.type&&(d.type="text")}var h=t?e[t]:e.normal;h.cfg=r,h.conOpt=l}function dn(n,t){return t?n?n[t]:null:n}function ti(n,t,e){var a=t&&t.style;return a==null&&e===Oe&&n&&(a=n.styleEmphasis),a}function Bf(n,t,e,a,i){var o=a.children,r=o?o.length:0,s=a.$mergeChildren,l=s==="byName"||a.diffChildrenByName,u=s===!1;if(!(!r&&!l&&!u)){if(l){Hf({api:n,oldChildren:t.children()||[],newChildren:o||[],dataIndex:e,seriesModel:i,group:t});return}u&&t.removeAll();for(var d=0;d<r;d++){var h=o[d],c=t.childAt(d);h?(h.ignore==null&&(h.ignore=!1),ei(n,c,e,h,i,t)):c.ignore=!0}for(var p=t.childCount()-1;p>=d;p--){var g=t.childAt(p);Ff(t,g,i)}}}function Ff(n,t,e){t&&ea(t,ze(n).option,e)}function Hf(n){new ot(n.oldChildren,n.newChildren,Vr,Vr,n).add(kr).update(kr).remove(Wf).execute()}function Vr(n,t){var e=n&&n.name;return e!=null?e:Af+t}function kr(n,t){var e=this.context,a=n!=null?e.newChildren[n]:null,i=t!=null?e.oldChildren[t]:null;ei(e.api,i,e.dataIndex,a,e.seriesModel,e.group)}function Wf(n){var t=this.context,e=t.oldChildren[n];e&&ea(e,ze(e).option,t.seriesModel)}function zr(n){return n&&(n.pathData||n.d)}function Xf(n){return n&&(Ce(n,"pathData")||Ce(n,"d"))}function Yf(n){n.registerChartView(Rf),n.registerSeriesModel(xf)}function ni(n,t){t=t||{};var e=n.coordinateSystem,a=n.axis,i={},o=a.position,r=a.orient,s=e.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};i.position=[r==="vertical"?u.vertical[o]:l[0],r==="horizontal"?u.horizontal[o]:l[3]];var d={horizontal:0,vertical:1};i.rotation=Math.PI/2*d[r];var h={top:-1,bottom:1,right:1,left:-1};i.labelDirection=i.tickDirection=i.nameDirection=h[o],n.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),Ne(t.labelInside,n.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var c=t.rotate;return c==null&&(c=n.get(["axisLabel","rotate"])),i.labelRotation=o==="top"?-c:c,i.z2=1,i}var Zf=["axisLine","axisTickLabel","axisName"],Uf=["splitArea","splitLine"],jf=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.axisPointerClass="SingleAxisPointer",e}return t.prototype.render=function(e,a,i,o){var r=this.group;r.removeAll();var s=this._axisGroup;this._axisGroup=new oe;var l=ni(e),u=new wl(e,l);E(Zf,u.add,u),r.add(this._axisGroup),r.add(u.getGroup()),E(Uf,function(d){e.get([d,"show"])&&qf[d](this,this.group,this._axisGroup,e)},this),Sl(s,this._axisGroup,e),n.prototype.render.call(this,e,a,i,o)},t.prototype.remove=function(){Ml(this)},t.type="singleAxis",t}(oo),qf={splitLine:function(n,t,e,a){var i=a.axis;if(!i.scale.isBlank()){var o=a.getModel("splitLine"),r=o.getModel("lineStyle"),s=r.get("color");s=s instanceof Array?s:[s];for(var l=r.get("width"),u=a.coordinateSystem.getRect(),d=i.isHorizontal(),h=[],c=0,p=i.getTicksCoords({tickModel:o}),g=[],f=[],y=0;y<p.length;++y){var m=i.toGlobalCoord(p[y].coord);d?(g[0]=m,g[1]=u.y,f[0]=m,f[1]=u.y+u.height):(g[0]=u.x,g[1]=m,f[0]=u.x+u.width,f[1]=m);var x=new Wi({shape:{x1:g[0],y1:g[1],x2:f[0],y2:f[1]},silent:!0});Ll(x.shape,l);var v=c++%s.length;h[v]=h[v]||[],h[v].push(x)}for(var I=r.getLineStyle(["color"]),y=0;y<h.length;++y)t.add(Dl(h[y],{style:ce({stroke:s[y%s.length]},I),silent:!0}))}},splitArea:function(n,t,e,a){Cl(n,e,a,a)}};const Kf=jf;var Or=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getCoordSysModel=function(){return this},t.type="singleAxis",t.layoutMode="box",t.defaultOption={left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:1,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}},t}(Ut);st(Or,Tl.prototype);const ai=Or;var Qf=function(n){V(t,n);function t(e,a,i,o,r){var s=n.call(this,e,a,i)||this;return s.type=o||"value",s.position=r||"bottom",s}return t.prototype.isHorizontal=function(){var e=this.position;return e==="top"||e==="bottom"},t.prototype.pointToData=function(e,a){return this.coordinateSystem.pointToData(e)[0]},t}(Al);const $f=Qf;var Gr=["single"],Jf=function(){function n(t,e,a){this.type="single",this.dimension="single",this.dimensions=Gr,this.axisPointerEnabled=!0,this.model=t,this._init(t,e,a)}return n.prototype._init=function(t,e,a){var i=this.dimension,o=new $f(i,Nl(t),[0,0],t.get("type"),t.get("position")),r=o.type==="category";o.onBand=r&&t.get("boundaryGap"),o.inverse=t.get("inverse"),o.orient=t.get("orient"),t.axis=o,o.model=t,o.coordinateSystem=this,this._axis=o},n.prototype.update=function(t,e){t.eachSeries(function(a){if(a.coordinateSystem===this){var i=a.getData();E(i.mapDimensionsAll(this.dimension),function(o){this._axis.scale.unionExtentFromData(i,o)},this),El(this._axis.scale,this._axis.model)}},this)},n.prototype.resize=function(t,e){this._rect=it({left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")},{width:e.getWidth(),height:e.getHeight()}),this._adjustAxis()},n.prototype.getRect=function(){return this._rect},n.prototype._adjustAxis=function(){var t=this._rect,e=this._axis,a=e.isHorizontal(),i=a?[0,t.width]:[0,t.height],o=e.inverse?1:0;e.setExtent(i[o],i[1-o]),this._updateAxisTransform(e,a?t.x:t.y)},n.prototype._updateAxisTransform=function(t,e){var a=t.getExtent(),i=a[0]+a[1],o=t.isHorizontal();t.toGlobalCoord=o?function(r){return r+e}:function(r){return i-r+e},t.toLocalCoord=o?function(r){return r-e}:function(r){return i-r+e}},n.prototype.getAxis=function(){return this._axis},n.prototype.getBaseAxis=function(){return this._axis},n.prototype.getAxes=function(){return[this._axis]},n.prototype.getTooltipAxes=function(){return{baseAxes:[this.getAxis()],otherAxes:[]}},n.prototype.containPoint=function(t){var e=this.getRect(),a=this.getAxis(),i=a.orient;return i==="horizontal"?a.contain(a.toLocalCoord(t[0]))&&t[1]>=e.y&&t[1]<=e.y+e.height:a.contain(a.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},n.prototype.pointToData=function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t[e.orient==="horizontal"?0:1]))]},n.prototype.dataToPoint=function(t){var e=this.getAxis(),a=this.getRect(),i=[],o=e.orient==="horizontal"?0:1;return t instanceof Array&&(t=t[0]),i[o]=e.toGlobalCoord(e.dataToCoord(+t)),i[1-o]=o===0?a.y+a.height/2:a.x+a.width/2,i},n.prototype.convertToPixel=function(t,e,a){var i=Br(e);return i===this?this.dataToPoint(a):null},n.prototype.convertFromPixel=function(t,e,a){var i=Br(e);return i===this?this.pointToData(a):null},n}();function Br(n){var t=n.seriesModel,e=n.singleAxisModel;return e&&e.coordinateSystem||t&&t.coordinateSystem}function eg(n,t){var e=[];return n.eachComponent("singleAxis",function(a,i){var o=new Jf(a,n,t);o.name="single_"+i,o.resize(a,t),a.coordinateSystem=o,e.push(o)}),n.eachSeries(function(a){if(a.get("coordinateSystem")==="singleAxis"){var i=a.getReferringComponents("singleAxis",Ji).models[0];a.coordinateSystem=i&&i.coordinateSystem}}),e}var tg={create:eg,dimensions:Gr};const ng=tg;var Fr=["x","y"],ag=["width","height"],ig=function(n){V(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,a,i,o,r){var s=i.axis,l=s.coordinateSystem,u=ii(l,1-hn(s)),d=l.dataToPoint(a)[0],h=o.get("type");if(h&&h!=="none"){var c=Pl(o),p=og[h](s,d,u);p.style=c,e.graphicKey=p.type,e.pointer=p}var g=ni(i);Rl(a,e,g,i,o,r)},t.prototype.getHandleTransform=function(e,a,i){var o=ni(a,{labelInside:!1});o.labelMargin=i.get(["handle","margin"]);var r=Vl(a.axis,e,o);return{x:r[0],y:r[1],rotation:o.rotation+(o.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,a,i,o){var r=i.axis,s=r.coordinateSystem,l=hn(r),u=ii(s,l),d=[e.x,e.y];d[l]+=a[l],d[l]=Math.min(u[1],d[l]),d[l]=Math.max(u[0],d[l]);var h=ii(s,1-l),c=(h[1]+h[0])/2,p=[c,c];return p[l]=d[l],{x:d[0],y:d[1],rotation:e.rotation,cursorPoint:p,tooltipOption:{verticalAlign:"middle"}}},t}(kl),og={line:function(n,t,e){var a=zl([t,e[0]],[t,e[1]],hn(n));return{type:"Line",subPixelOptimize:!0,shape:a}},shadow:function(n,t,e){var a=n.getBandWidth(),i=e[1]-e[0];return{type:"Rect",shape:Ol([t-a/2,e[0]],[a,i],hn(n))}}};function hn(n){return n.isHorizontal()?0:1}function ii(n,t){var e=n.getRect();return[e[Fr[t]],e[Fr[t]]+e[ag[t]]]}const rg=ig;var sg=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.type="single",t}(jt);function lg(n){X(ro),oo.registerAxisPointerClass("SingleAxisPointer",rg),n.registerComponentView(sg),n.registerComponentView(Kf),n.registerComponentModel(ai),Gl(n,"single",ai,ai.defaultOption),n.registerCoordinateSystem("single",ng)}var ug=["rect","polygon","keep","clear"];function dg(n,t){var e=ke(n?n.brush:[]);if(e.length){var a=[];E(e,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(a=a.concat(u))});var i=n&&n.toolbox;G(i)&&(i=i[0]),i||(i={feature:{}},n.toolbox=[i]);var o=i.feature||(i.feature={}),r=o.brush||(o.brush={}),s=r.type||(r.type=[]);s.push.apply(s,a),hg(s),t&&!s.length&&s.push.apply(s,ug)}}function hg(n){var t={};E(n,function(e){t[e]=1}),n.length=0,E(t,function(e,a){n.push(a)})}function cg(n){var t=n.brushType,e={point:function(a){return Hr[t].point(a,e,n)},rect:function(a){return Hr[t].rect(a,e,n)}};return e}var Hr={lineX:Wr(0),lineY:Wr(1),rect:{point:function(n,t,e){return n&&e.boundingRect.contain(n[0],n[1])},rect:function(n,t,e){return n&&e.boundingRect.intersect(n)}},polygon:{point:function(n,t,e){return n&&e.boundingRect.contain(n[0],n[1])&&wt(e.range,n[0],n[1])},rect:function(n,t,e){var a=e.range;if(!n||a.length<=1)return!1;var i=n.x,o=n.y,r=n.width,s=n.height,l=a[0];if(wt(a,i,o)||wt(a,i+r,o)||wt(a,i,o+s)||wt(a,i+r,o+s)||de.create(n).contain(l[0],l[1])||qt(i,o,i+r,o,a)||qt(i,o,i,o+s,a)||qt(i+r,o,i+r,o+s,a)||qt(i,o+s,i+r,o+s,a))return!0}}};function Wr(n){var t=["x","y"],e=["width","height"];return{point:function(a,i,o){if(a){var r=o.range,s=a[n];return Rt(s,r)}},rect:function(a,i,o){if(a){var r=o.range,s=[a[t[n]],a[t[n]]+a[e[n]]];return s[1]<s[0]&&s.reverse(),Rt(s[0],r)||Rt(s[1],r)||Rt(r[0],s)||Rt(r[1],s)}}}}function Rt(n,t){return t[0]<=n&&n<=t[1]}var Xr=["inBrush","outOfBrush"],oi="__ecBrushSelect",ri="__ecInBrushSelectEvent";function Yr(n){n.eachComponent({mainType:"brush"},function(t){var e=t.brushTargetManager=new Hl(t.option,n);e.setInputRanges(t.areas,n)})}function pg(n,t,e){var a=[],i,o;n.eachComponent({mainType:"brush"},function(r){e&&e.type==="takeGlobalCursor"&&r.setBrushOption(e.key==="brush"?e.brushOption:{brushType:!1})}),Yr(n),n.eachComponent({mainType:"brush"},function(r,s){var l={brushId:r.id,brushIndex:s,brushName:r.name,areas:St(r.areas),selected:[]};a.push(l);var u=r.option,d=u.brushLink,h=[],c=[],p=[],g=!1;s||(i=u.throttleType,o=u.throttleDelay);var f=F(r.areas,function(_){var b=vg[_.brushType],w=ce({boundingRect:b?b(_):void 0},_);return w.selectors=cg(w),w}),y=Bl(r.option,Xr,function(_){_.mappingMethod="fixed"});G(d)&&E(d,function(_){h[_]=1});function m(_){return d==="all"||!!h[_]}function x(_){return!!_.length}n.eachSeries(function(_,b){var w=p[b]=[];_.subType==="parallel"?v(_,b):I(_,b,w)});function v(_,b){var w=_.coordinateSystem;g=g||w.hasAxisBrushed(),m(b)&&w.eachActiveState(_.getData(),function(M,S){M==="active"&&(c[S]=1)})}function I(_,b,w){if(!(!_.brushSelector||yg(r,b))&&(E(f,function(S){r.brushTargetManager.controlSeries(S,_,n)&&w.push(S),g=g||x(w)}),m(b)&&x(w))){var M=_.getData();M.each(function(S){Zr(_,w,M,S)&&(c[S]=1)})}}n.eachSeries(function(_,b){var w={seriesId:_.id,seriesIndex:b,seriesName:_.name,dataIndex:[]};l.selected.push(w);var M=p[b],S=_.getData(),L=m(b)?function(D){return c[D]?(w.dataIndex.push(S.getRawIndex(D)),"inBrush"):"outOfBrush"}:function(D){return Zr(_,M,S,D)?(w.dataIndex.push(S.getRawIndex(D)),"inBrush"):"outOfBrush"};(m(b)?g:x(M))&&Fl(Xr,y,S,L)})}),fg(t,i,o,a,e)}function fg(n,t,e,a,i){if(i){var o=n.getZr();if(!o[ri]){o[oi]||(o[oi]=gg);var r=Wl(o,oi,e,t);r(n,a)}}}function gg(n,t){if(!n.isDisposed()){var e=n.getZr();e[ri]=!0,n.dispatchAction({type:"brushSelect",batch:t}),e[ri]=!1}}function Zr(n,t,e,a){for(var i=0,o=t.length;i<o;i++){var r=t[i];if(n.brushSelector(a,e,r.selectors,r))return!0}}function yg(n,t){var e=n.option.seriesIndex;return e!=null&&e!=="all"&&(G(e)?_e(e,t)<0:t!==e)}var vg={rect:function(n){return Ur(n.range)},polygon:function(n){for(var t,e=n.range,a=0,i=e.length;a<i;a++){t=t||[[1/0,-1/0],[1/0,-1/0]];var o=e[a];o[0]<t[0][0]&&(t[0][0]=o[0]),o[0]>t[0][1]&&(t[0][1]=o[0]),o[1]<t[1][0]&&(t[1][0]=o[1]),o[1]>t[1][1]&&(t[1][1]=o[1])}return t&&Ur(t)}};function Ur(n){return new de(n[0][0],n[1][0],n[0][1]-n[0][0],n[1][1]-n[1][0])}var mg=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,a){this.ecModel=e,this.api=a,this.model,(this._brushController=new Xl(a.getZr())).on("brush",re(this._onBrush,this)).mount()},t.prototype.render=function(e,a,i,o){this.model=e,this._updateController(e,a,i,o)},t.prototype.updateTransform=function(e,a,i,o){Yr(a),this._updateController(e,a,i,o)},t.prototype.updateVisual=function(e,a,i,o){this.updateTransform(e,a,i,o)},t.prototype.updateView=function(e,a,i,o){this._updateController(e,a,i,o)},t.prototype._updateController=function(e,a,i,o){(!o||o.$from!==e.id)&&this._brushController.setPanels(e.brushTargetManager.makePanelOpts(i)).enableBrush(e.brushOption).updateCovers(e.areas.slice())},t.prototype.dispose=function(){this._brushController.dispose()},t.prototype._onBrush=function(e){var a=this.model.id,i=this.model.brushTargetManager.setOutputRanges(e.areas,this.ecModel);(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:a,areas:St(i),$from:a}),e.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:a,areas:St(i),$from:a})},t.type="brush",t}(jt);const xg=mg;var _g="#ddd",Ig=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.areas=[],e.brushOption={},e}return t.prototype.optionUpdated=function(e,a){var i=this.option;!a&&Yl(i,e,["inBrush","outOfBrush"]);var o=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:_g},o.hasOwnProperty("liftZ")||(o.liftZ=5)},t.prototype.setAreas=function(e){e&&(this.areas=F(e,function(a){return jr(this.option,a)},this))},t.prototype.setBrushOption=function(e){this.brushOption=jr(this.option,e),this.brushType=this.brushOption.brushType},t.type="brush",t.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],t.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},t}(Ut);function jr(n,t){return $e({brushType:n.brushType,brushMode:n.brushMode,transformable:n.transformable,brushStyle:new Be(n.brushStyle).getItemStyle(),removeOnClick:n.removeOnClick,z:n.z},t,!0)}const bg=Ig;var wg=["rect","polygon","lineX","lineY","keep","clear"],Sg=function(n){V(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.render=function(e,a,i){var o,r,s;a.eachComponent({mainType:"brush"},function(l){o=l.brushType,r=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=o,this._brushMode=r,E(e.get("type",!0),function(l){e.setIconStatus(l,(l==="keep"?r==="multiple":l==="clear"?s:l===o)?"emphasis":"normal")})},t.prototype.updateView=function(e,a,i){this.render(e,a,i)},t.prototype.getIcons=function(){var e=this.model,a=e.get("icon",!0),i={};return E(e.get("type",!0),function(o){a[o]&&(i[o]=a[o])}),i},t.prototype.onclick=function(e,a,i){var o=this._brushType,r=this._brushMode;i==="clear"?(a.dispatchAction({type:"axisAreaSelect",intervals:[]}),a.dispatchAction({type:"brush",command:"clear",areas:[]})):a.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:i==="keep"?o:o===i?!1:i,brushMode:i==="keep"?r==="multiple"?"single":"multiple":r}})},t.getDefaultOption=function(e){var a={show:!0,type:wg.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:e.getLocaleModel().get(["toolbox","brush","title"])};return a},t}(Zl);const Mg=Sg;function Lg(n){n.registerComponentView(xg),n.registerComponentModel(bg),n.registerPreprocessor(dg),n.registerVisual(n.PRIORITY.VISUAL.BRUSH,pg),n.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(t,e){e.eachComponent({mainType:"brush",query:t},function(a){a.setAreas(t.areas)})}),n.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},yt),n.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},yt),Ul("brush",Mg)}function si(n,t){if(!n)return!1;for(var e=G(n)?n:[n],a=0;a<e.length;a++)if(e[a]&&e[a][t])return!0;return!1}function cn(n){Fn(n,"label",["show"])}var pn=xe(),qr=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.createdBySelf=!1,e}return t.prototype.init=function(e,a,i){this.mergeDefaultAndTheme(e,i),this._mergeOption(e,i,!1,!0)},t.prototype.isAnimationEnabled=function(){if(so.node)return!1;var e=this.__hostSeries;return this.getShallow("animation")&&e&&e.isAnimationEnabled()},t.prototype.mergeOption=function(e,a){this._mergeOption(e,a,!1,!1)},t.prototype._mergeOption=function(e,a,i,o){var r=this.mainType;i||a.eachSeries(function(s){var l=s.get(this.mainType,!0),u=pn(s)[r];if(!l||!l.data){pn(s)[r]=null;return}u?u._mergeOption(l,a,!0):(o&&cn(l),E(l.data,function(d){d instanceof Array?(cn(d[0]),cn(d[1])):cn(d)}),u=this.createMarkerModelFromSeries(l,this,a),W(u,{mainType:this.mainType,seriesIndex:s.seriesIndex,name:s.name,createdBySelf:!0}),u.__hostSeries=s),pn(s)[r]=u},this)},t.prototype.formatTooltip=function(e,a,i){var o=this.getData(),r=this.getRawValue(e),s=o.getName(e);return Ve("section",{header:this.name,blocks:[Ve("nameValue",{name:s,value:r,noName:!s,noValue:r==null})]})},t.prototype.getData=function(){return this._data},t.prototype.setData=function(e){this._data=e},t.getMarkerModelFromSeries=function(e,a){return pn(e)[a]},t.type="marker",t.dependencies=["series","grid","polar","geo"],t}(Ut);st(qr,jl.prototype);const Ke=qr;var Dg=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.createMarkerModelFromSeries=function(e,a,i){return new t(e,a,i)},t.type="markPoint",t.defaultOption={z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},t}(Ke);const Cg=Dg;function li(n){return!(isNaN(parseFloat(n.x))&&isNaN(parseFloat(n.y)))}function Tg(n){return!isNaN(parseFloat(n.x))&&!isNaN(parseFloat(n.y))}function fn(n,t,e,a,i,o){var r=[],s=ql(t,a),l=s?t.getCalculationInfo("stackResultDimension"):a,u=di(t,l,n),d=t.indicesOfNearest(l,u)[0];r[i]=t.get(e,d),r[o]=t.get(l,d);var h=t.get(a,d),c=Kl(t.get(a,d));return c=Math.min(c,20),c>=0&&(r[o]=+r[o].toFixed(c)),[r,h]}var ui={min:te(fn,"min"),max:te(fn,"max"),average:te(fn,"average"),median:te(fn,"median")};function Vt(n,t){if(t){var e=n.getData(),a=n.coordinateSystem,i=a&&a.dimensions;if(!Tg(t)&&!G(t.coord)&&G(i)){var o=Kr(t,e,a,n);if(t=St(t),t.type&&ui[t.type]&&o.baseAxis&&o.valueAxis){var r=_e(i,o.baseAxis.dim),s=_e(i,o.valueAxis.dim),l=ui[t.type](e,o.baseDataDim,o.valueDataDim,r,s);t.coord=l[0],t.value=l[1]}else t.coord=[t.xAxis!=null?t.xAxis:t.radiusAxis,t.yAxis!=null?t.yAxis:t.angleAxis]}if(t.coord==null||!G(i))t.coord=[];else for(var u=t.coord,d=0;d<2;d++)ui[u[d]]&&(u[d]=di(e,e.mapDimension(i[d]),u[d]));return t}}function Kr(n,t,e,a){var i={};return n.valueIndex!=null||n.valueDim!=null?(i.valueDataDim=n.valueIndex!=null?t.getDimension(n.valueIndex):n.valueDim,i.valueAxis=e.getAxis(Ag(a,i.valueDataDim)),i.baseAxis=e.getOtherAxis(i.valueAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim)):(i.baseAxis=a.getBaseAxis(),i.valueAxis=e.getOtherAxis(i.baseAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim),i.valueDataDim=t.mapDimension(i.valueAxis.dim)),i}function Ag(n,t){var e=n.getData().getDimensionInfo(t);return e&&e.coordDim}function kt(n,t){return n&&n.containData&&t.coord&&!li(t)?n.containData(t.coord):!0}function Ng(n,t,e){return n&&n.containZone&&t.coord&&e.coord&&!li(t)&&!li(e)?n.containZone(t.coord,e.coord):!0}function Qr(n,t){return n?function(e,a,i,o){var r=o<2?e.coord&&e.coord[o]:e.value;return Kt(r,t[o])}:function(e,a,i,o){return Kt(e.value,t[o])}}function di(n,t,e){if(e==="average"){var a=0,i=0;return n.each(t,function(o,r){isNaN(o)||(a+=o,i++)}),a/i}else return e==="median"?n.getMedian(t):n.getDataExtent(t)[e==="max"?1:0]}var hi=xe(),Eg=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(){this.markerGroupMap=ve()},t.prototype.render=function(e,a,i){var o=this,r=this.markerGroupMap;r.each(function(s){hi(s).keep=!1}),a.eachSeries(function(s){var l=Ke.getMarkerModelFromSeries(s,o.type);l&&o.renderSeries(s,l,a,i)}),r.each(function(s){!hi(s).keep&&o.group.remove(s.group)})},t.prototype.markKeep=function(e){hi(e).keep=!0},t.prototype.toggleBlurSeries=function(e,a){var i=this;E(e,function(o){var r=Ke.getMarkerModelFromSeries(o,i.type);if(r){var s=r.getData();s.eachItemGraphicEl(function(l){l&&(a?Ql(l):$l(l))})}})},t.type="marker",t}(jt);const ci=Eg;function $r(n,t,e){var a=t.coordinateSystem;n.each(function(i){var o=n.getItemModel(i),r,s=Z(o.get("x"),e.getWidth()),l=Z(o.get("y"),e.getHeight());if(!isNaN(s)&&!isNaN(l))r=[s,l];else if(t.getMarkerPosition)r=t.getMarkerPosition(n.getValues(n.dimensions,i));else if(a){var u=n.get(a.dimensions[0],i),d=n.get(a.dimensions[1],i);r=a.dataToPoint([u,d])}isNaN(s)||(r[0]=s),isNaN(l)||(r[1]=l),n.setItemLayout(i,r)})}var Pg=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.updateTransform=function(e,a,i){a.eachSeries(function(o){var r=Ke.getMarkerModelFromSeries(o,"markPoint");r&&($r(r.getData(),o,i),this.markerGroupMap.get(o.id).updateLayout())},this)},t.prototype.renderSeries=function(e,a,i,o){var r=e.coordinateSystem,s=e.id,l=e.getData(),u=this.markerGroupMap,d=u.get(s)||u.set(s,new Gn),h=Rg(r,e,a);a.setData(h),$r(a.getData(),e,o),h.each(function(c){var p=h.getItemModel(c),g=p.getShallow("symbol"),f=p.getShallow("symbolSize"),y=p.getShallow("symbolRotate"),m=p.getShallow("symbolOffset"),x=p.getShallow("symbolKeepAspect");if(ie(g)||ie(f)||ie(y)||ie(m)){var v=a.getRawValue(c),I=a.getDataParams(c);ie(g)&&(g=g(v,I)),ie(f)&&(f=f(v,I)),ie(y)&&(y=y(v,I)),ie(m)&&(m=m(v,I))}var _=p.getModel("itemStyle").getItemStyle(),b=ta(l,"color");_.fill||(_.fill=b),h.setItemVisual(c,{symbol:g,symbolSize:f,symbolRotate:y,symbolOffset:m,symbolKeepAspect:x,style:_})}),d.updateData(h),this.group.add(d.group),h.eachItemGraphicEl(function(c){c.traverse(function(p){ae(p).dataModel=a})}),this.markKeep(d),d.group.silent=a.get("silent")||e.get("silent")},t.type="markPoint",t}(ci);function Rg(n,t,e){var a;n?a=F(n&&n.dimensions,function(s){var l=t.getData().getDimensionInfo(t.getData().mapDimension(s))||{};return W(W({},l),{name:s,ordinalMeta:null})}):a=[{name:"value",type:"float"}];var i=new Ie(a,e),o=F(e.get("data"),te(Vt,t));n&&(o=De(o,te(kt,n)));var r=Qr(!!n,a);return i.initData(o,null,r),i}const Vg=Pg;function kg(n){n.registerComponentModel(Cg),n.registerComponentView(Vg),n.registerPreprocessor(function(t){si(t.series,"markPoint")&&(t.markPoint=t.markPoint||{})})}var zg=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.createMarkerModelFromSeries=function(e,a,i){return new t(e,a,i)},t.type="markLine",t.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},t}(Ke);const Og=zg;var gn=xe(),Gg=function(n,t,e,a){var i=n.getData(),o;if(G(a))o=a;else{var r=a.type;if(r==="min"||r==="max"||r==="average"||r==="median"||a.xAxis!=null||a.yAxis!=null){var s=void 0,l=void 0;if(a.yAxis!=null||a.xAxis!=null)s=t.getAxis(a.yAxis!=null?"y":"x"),l=Ne(a.yAxis,a.xAxis);else{var u=Kr(a,i,t,n);s=u.valueAxis;var d=Jl(i,u.valueDataDim);l=di(i,d,r)}var h=s.dim==="x"?0:1,c=1-h,p=St(a),g={coord:[]};p.type=null,p.coord=[],p.coord[c]=-1/0,g.coord[c]=1/0;var f=e.get("precision");f>=0&&We(l)&&(l=+l.toFixed(Math.min(f,20))),p.coord[h]=g.coord[h]=l,o=[p,g,{type:r,valueIndex:a.valueIndex,value:l}]}else o=[]}var y=[Vt(n,o[0]),Vt(n,o[1]),W({},o[2])];return y[2].type=y[2].type||null,$e(y[2],y[0]),$e(y[2],y[1]),y};function yn(n){return!isNaN(n)&&!isFinite(n)}function Jr(n,t,e,a){var i=1-n,o=a.dimensions[n];return yn(t[i])&&yn(e[i])&&t[n]===e[n]&&a.getAxis(o).containData(t[n])}function Bg(n,t){if(n.type==="cartesian2d"){var e=t[0].coord,a=t[1].coord;if(e&&a&&(Jr(1,e,a,n)||Jr(0,e,a,n)))return!0}return kt(n,t[0])&&kt(n,t[1])}function pi(n,t,e,a,i){var o=a.coordinateSystem,r=n.getItemModel(t),s,l=Z(r.get("x"),i.getWidth()),u=Z(r.get("y"),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(a.getMarkerPosition)s=a.getMarkerPosition(n.getValues(n.dimensions,t));else{var d=o.dimensions,h=n.get(d[0],t),c=n.get(d[1],t);s=o.dataToPoint([h,c])}if(Zt(o,"cartesian2d")){var p=o.getAxis("x"),g=o.getAxis("y"),d=o.dimensions;yn(n.get(d[0],t))?s[0]=p.toGlobalCoord(p.getExtent()[e?0:1]):yn(n.get(d[1],t))&&(s[1]=g.toGlobalCoord(g.getExtent()[e?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}n.setItemLayout(t,s)}var Fg=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.updateTransform=function(e,a,i){a.eachSeries(function(o){var r=Ke.getMarkerModelFromSeries(o,"markLine");if(r){var s=r.getData(),l=gn(r).from,u=gn(r).to;l.each(function(d){pi(l,d,!0,o,i),pi(u,d,!1,o,i)}),s.each(function(d){s.setItemLayout(d,[l.getItemLayout(d),u.getItemLayout(d)])}),this.markerGroupMap.get(o.id).updateLayout()}},this)},t.prototype.renderSeries=function(e,a,i,o){var r=e.coordinateSystem,s=e.id,l=e.getData(),u=this.markerGroupMap,d=u.get(s)||u.set(s,new Na);this.group.add(d.group);var h=Hg(r,e,a),c=h.from,p=h.to,g=h.line;gn(a).from=c,gn(a).to=p,a.setData(g);var f=a.get("symbol"),y=a.get("symbolSize"),m=a.get("symbolRotate"),x=a.get("symbolOffset");G(f)||(f=[f,f]),G(y)||(y=[y,y]),G(m)||(m=[m,m]),G(x)||(x=[x,x]),h.from.each(function(I){v(c,I,!0),v(p,I,!1)}),g.each(function(I){var _=g.getItemModel(I).getModel("lineStyle").getLineStyle();g.setItemLayout(I,[c.getItemLayout(I),p.getItemLayout(I)]),_.stroke==null&&(_.stroke=c.getItemVisual(I,"style").fill),g.setItemVisual(I,{fromSymbolKeepAspect:c.getItemVisual(I,"symbolKeepAspect"),fromSymbolOffset:c.getItemVisual(I,"symbolOffset"),fromSymbolRotate:c.getItemVisual(I,"symbolRotate"),fromSymbolSize:c.getItemVisual(I,"symbolSize"),fromSymbol:c.getItemVisual(I,"symbol"),toSymbolKeepAspect:p.getItemVisual(I,"symbolKeepAspect"),toSymbolOffset:p.getItemVisual(I,"symbolOffset"),toSymbolRotate:p.getItemVisual(I,"symbolRotate"),toSymbolSize:p.getItemVisual(I,"symbolSize"),toSymbol:p.getItemVisual(I,"symbol"),style:_})}),d.updateData(g),h.line.eachItemGraphicEl(function(I){ae(I).dataModel=a,I.traverse(function(_){ae(_).dataModel=a})});function v(I,_,b){var w=I.getItemModel(_);pi(I,_,b,e,o);var M=w.getModel("itemStyle").getItemStyle();M.fill==null&&(M.fill=ta(l,"color")),I.setItemVisual(_,{symbolKeepAspect:w.get("symbolKeepAspect"),symbolOffset:Ge(w.get("symbolOffset",!0),x[b?0:1]),symbolRotate:Ge(w.get("symbolRotate",!0),m[b?0:1]),symbolSize:Ge(w.get("symbolSize"),y[b?0:1]),symbol:Ge(w.get("symbol",!0),f[b?0:1]),style:M})}this.markKeep(d),d.group.silent=a.get("silent")||e.get("silent")},t.type="markLine",t}(ci);function Hg(n,t,e){var a;n?a=F(n&&n.dimensions,function(u){var d=t.getData().getDimensionInfo(t.getData().mapDimension(u))||{};return W(W({},d),{name:u,ordinalMeta:null})}):a=[{name:"value",type:"float"}];var i=new Ie(a,e),o=new Ie(a,e),r=new Ie([],e),s=F(e.get("data"),te(Gg,t,n,e));n&&(s=De(s,te(Bg,n)));var l=Qr(!!n,a);return i.initData(F(s,function(u){return u[0]}),null,l),o.initData(F(s,function(u){return u[1]}),null,l),r.initData(F(s,function(u){return u[2]})),r.hasItemOption=!0,{from:i,to:o,line:r}}const Wg=Fg;function Xg(n){n.registerComponentModel(Og),n.registerComponentView(Wg),n.registerPreprocessor(function(t){si(t.series,"markLine")&&(t.markLine=t.markLine||{})})}var Yg=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.createMarkerModelFromSeries=function(e,a,i){return new t(e,a,i)},t.type="markArea",t.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},t}(Ke);const Zg=Yg;var vn=xe(),Ug=function(n,t,e,a){var i=a[0],o=a[1];if(!(!i||!o)){var r=Vt(n,i),s=Vt(n,o),l=r.coord,u=s.coord;l[0]=Ne(l[0],-1/0),l[1]=Ne(l[1],-1/0),u[0]=Ne(u[0],1/0),u[1]=Ne(u[1],1/0);var d=Qi([{},r,s]);return d.coord=[r.coord,s.coord],d.x0=r.x,d.y0=r.y,d.x1=s.x,d.y1=s.y,d}};function mn(n){return!isNaN(n)&&!isFinite(n)}function es(n,t,e,a){var i=1-n;return mn(t[i])&&mn(e[i])}function jg(n,t){var e=t.coord[0],a=t.coord[1],i={coord:e,x:t.x0,y:t.y0},o={coord:a,x:t.x1,y:t.y1};return Zt(n,"cartesian2d")?e&&a&&(es(1,e,a)||es(0,e,a))?!0:Ng(n,i,o):kt(n,i)||kt(n,o)}function ts(n,t,e,a,i){var o=a.coordinateSystem,r=n.getItemModel(t),s,l=Z(r.get(e[0]),i.getWidth()),u=Z(r.get(e[1]),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(a.getMarkerPosition){var d=n.getValues(["x0","y0"],t),h=n.getValues(["x1","y1"],t),c=o.clampData(d),p=o.clampData(h),g=[];e[0]==="x0"?g[0]=c[0]>p[0]?h[0]:d[0]:g[0]=c[0]>p[0]?d[0]:h[0],e[1]==="y0"?g[1]=c[1]>p[1]?h[1]:d[1]:g[1]=c[1]>p[1]?d[1]:h[1],s=a.getMarkerPosition(g,e,!0)}else{var f=n.get(e[0],t),y=n.get(e[1],t),m=[f,y];o.clampData&&o.clampData(m,m),s=o.dataToPoint(m,!0)}if(Zt(o,"cartesian2d")){var x=o.getAxis("x"),v=o.getAxis("y"),f=n.get(e[0],t),y=n.get(e[1],t);mn(f)?s[0]=x.toGlobalCoord(x.getExtent()[e[0]==="x0"?0:1]):mn(y)&&(s[1]=v.toGlobalCoord(v.getExtent()[e[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var ns=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],qg=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.updateTransform=function(e,a,i){a.eachSeries(function(o){var r=Ke.getMarkerModelFromSeries(o,"markArea");if(r){var s=r.getData();s.each(function(l){var u=F(ns,function(h){return ts(s,l,h,o,i)});s.setItemLayout(l,u);var d=s.getItemGraphicEl(l);d.setShape("points",u)})}},this)},t.prototype.renderSeries=function(e,a,i,o){var r=e.coordinateSystem,s=e.id,l=e.getData(),u=this.markerGroupMap,d=u.get(s)||u.set(s,{group:new oe});this.group.add(d.group),this.markKeep(d);var h=Kg(r,e,a);a.setData(h),h.each(function(c){var p=F(ns,function(M){return ts(h,c,M,e,o)}),g=r.getAxis("x").scale,f=r.getAxis("y").scale,y=g.getExtent(),m=f.getExtent(),x=[g.parse(h.get("x0",c)),g.parse(h.get("x1",c))],v=[f.parse(h.get("y0",c)),f.parse(h.get("y1",c))];Zn(x),Zn(v);var I=!(y[0]>x[1]||y[1]<x[0]||m[0]>v[1]||m[1]<v[0]),_=!I;h.setItemLayout(c,{points:p,allClipped:_});var b=h.getItemModel(c).getModel("itemStyle").getItemStyle(),w=ta(l,"color");b.fill||(b.fill=w,be(b.fill)&&(b.fill=Nn(b.fill,.4))),b.stroke||(b.stroke=w),h.setItemVisual(c,"style",b)}),h.diff(vn(d).data).add(function(c){var p=h.getItemLayout(c);if(!p.allClipped){var g=new vt({shape:{points:p.points}});h.setItemGraphicEl(c,g),d.group.add(g)}}).update(function(c,p){var g=vn(d).data.getItemGraphicEl(p),f=h.getItemLayout(c);f.allClipped?g&&d.group.remove(g):(g?se(g,{shape:{points:f.points}},a,c):g=new vt({shape:{points:f.points}}),h.setItemGraphicEl(c,g),d.group.add(g))}).remove(function(c){var p=vn(d).data.getItemGraphicEl(c);d.group.remove(p)}).execute(),h.eachItemGraphicEl(function(c,p){var g=h.getItemModel(p),f=h.getItemVisual(p,"style");c.useStyle(h.getItemVisual(p,"style")),Fe(c,Ae(g),{labelFetcher:a,labelDataIndex:p,defaultText:h.getName(p)||"",inheritColor:be(f.fill)?Nn(f.fill,1):"#000"}),Re(c,g),fe(c,null,null,g.get(["emphasis","disabled"])),ae(c).dataModel=a}),vn(d).data=h,d.group.silent=a.get("silent")||e.get("silent")},t.type="markArea",t}(ci);function Kg(n,t,e){var a,i,o=["x0","y0","x1","y1"];if(n){var r=F(n&&n.dimensions,function(u){var d=t.getData(),h=d.getDimensionInfo(d.mapDimension(u))||{};return W(W({},h),{name:u,ordinalMeta:null})});i=F(o,function(u,d){return{name:u,type:r[d%2].type}}),a=new Ie(i,e)}else i=[{name:"value",type:"float"}],a=new Ie(i,e);var s=F(e.get("data"),te(Ug,t,n,e));n&&(s=De(s,te(jg,n)));var l=n?function(u,d,h,c){var p=u.coord[Math.floor(c/2)][c%2];return Kt(p,i[c])}:function(u,d,h,c){return Kt(u.value,i[c])};return a.initData(s,null,l),a.hasItemOption=!0,a}const Qg=qg;function $g(n){n.registerComponentModel(Zg),n.registerComponentView(Qg),n.registerPreprocessor(function(t){si(t.series,"markArea")&&(t.markArea=t.markArea||{})})}var as={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},Jg=function(){function n(t){var e=this._condVal=be(t)?new RegExp(t):nu(t)?t:null;if(e==null){var a="";J(a)}}return n.prototype.evaluate=function(t){var e=typeof t;return be(e)?this._condVal.test(t):We(e)?this._condVal.test(t+""):!1},n}(),ey=function(){function n(){}return n.prototype.evaluate=function(){return this.value},n}(),ty=function(){function n(){}return n.prototype.evaluate=function(){for(var t=this.children,e=0;e<t.length;e++)if(!t[e].evaluate())return!1;return!0},n}(),ny=function(){function n(){}return n.prototype.evaluate=function(){for(var t=this.children,e=0;e<t.length;e++)if(t[e].evaluate())return!0;return!1},n}(),ay=function(){function n(){}return n.prototype.evaluate=function(){return!this.child.evaluate()},n}(),iy=function(){function n(){}return n.prototype.evaluate=function(){for(var t=!!this.valueParser,e=this.getValue,a=e(this.valueGetterParam),i=t?this.valueParser(a):null,o=0;o<this.subCondList.length;o++)if(!this.subCondList[o].evaluate(t?i:a))return!1;return!0},n}();function fi(n,t){if(n===!0||n===!1){var e=new ey;return e.value=n,e}var a="";return os(n)||J(a),n.and?is("and",n,t):n.or?is("or",n,t):n.not?oy(n,t):ry(n,t)}function is(n,t,e){var a=t[n],i="";G(a)||J(i),a.length||J(i);var o=n==="and"?new ty:new ny;return o.children=F(a,function(r){return fi(r,e)}),o.children.length||J(i),o}function oy(n,t){var e=n.not,a="";os(e)||J(a);var i=new ay;return i.child=fi(e,t),i.child||J(a),i}function ry(n,t){for(var e="",a=t.prepareGetValue(n),i=[],o=Sn(n),r=n.parser,s=r?lo(r):null,l=0;l<o.length;l++){var u=o[l];if(!(u==="parser"||t.valueGetterAttrMap.get(u))){var d=Ce(as,u)?as[u]:u,h=n[u],c=s?s(h):h,p=eu(d,c)||d==="reg"&&new Jg(c);p||J(e),i.push(p)}}i.length||J(e);var g=new iy;return g.valueGetterParam=a,g.valueParser=s,g.getValue=t.getValue,g.subCondList=i,g}function os(n){return qn(n)&&!tu(n)}var sy=function(){function n(t,e){this._cond=fi(t,e)}return n.prototype.evaluate=function(){return this._cond.evaluate()},n}();function ly(n,t){return new sy(n,t)}var uy={type:"echarts:filter",transform:function(n){for(var t=n.upstream,e,a=ly(n.config,{valueGetterAttrMap:ve({dimension:!0}),prepareGetValue:function(s){var l="",u=s.dimension;Ce(s,"dimension")||J(l);var d=t.getDimensionInfo(u);return d||J(l),{dimIdx:d.index}},getValue:function(s){return t.retrieveValueFromItem(e,s.dimIdx)}}),i=[],o=0,r=t.count();o<r;o++)e=t.getRawDataItem(o),a.evaluate()&&i.push(e);return{data:i}}},dy={type:"echarts:sort",transform:function(n){var t=n.upstream,e=n.config,a="",i=ke(e);i.length||J(a);var o=[];E(i,function(d){var h=d.dimension,c=d.order,p=d.parser,g=d.incomparable;if(h==null&&J(a),c!=="asc"&&c!=="desc"&&J(a),g&&g!=="min"&&g!=="max"){var f="";J(f)}if(c!=="asc"&&c!=="desc"){var y="";J(y)}var m=t.getDimensionInfo(h);m||J(a);var x=p?lo(p):null;p&&!x&&J(a),o.push({dimIdx:m.index,parser:x,comparator:new au(c,g)})});var r=t.sourceFormat;r!==ji&&r!==iu&&J(a);for(var s=[],l=0,u=t.count();l<u;l++)s.push(t.getRawDataItem(l));return s.sort(function(d,h){for(var c=0;c<o.length;c++){var p=o[c],g=t.retrieveValueFromItem(d,p.dimIdx),f=t.retrieveValueFromItem(h,p.dimIdx);p.parser&&(g=p.parser(g),f=p.parser(f));var y=p.comparator.evaluate(g,f);if(y!==0)return y}return 0}),{data:s}}};function hy(n){n.registerTransform(uy),n.registerTransform(dy)}var cy=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type="dataset",e}return t.prototype.init=function(e,a,i){n.prototype.init.call(this,e,a,i),this._sourceManager=new ou(this),uo(this)},t.prototype.mergeOption=function(e,a){n.prototype.mergeOption.call(this,e,a),uo(this)},t.prototype.optionUpdated=function(){this._sourceManager.dirty()},t.prototype.getSourceManager=function(){return this._sourceManager},t.type="dataset",t.defaultOption={seriesLayoutBy:ru},t}(Ut),py=function(n){V(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type="dataset",e}return t.type="dataset",t}(jt);function fy(n){n.registerComponentModel(cy),n.registerComponentView(py)}function rs(n,t,e){var a=$n.createCanvas(),i=t.getWidth(),o=t.getHeight(),r=a.style;return r&&(r.position="absolute",r.left="0",r.top="0",r.width=i+"px",r.height=o+"px",a.setAttribute("data-zr-dom-id",n)),a.width=i*e,a.height=o*e,a}var gy=function(n){su(t,n);function t(e,a,i){var o=n.call(this)||this;o.motionBlur=!1,o.lastFrameAlpha=.7,o.dpr=1,o.virtual=!1,o.config={},o.incremental=!1,o.zlevel=0,o.maxRepaintRectCount=5,o.__dirty=!0,o.__firstTimePaint=!0,o.__used=!1,o.__drawIndex=0,o.__startIndex=0,o.__endIndex=0,o.__prevStartIndex=null,o.__prevEndIndex=null;var r;i=i||co,typeof e=="string"?r=rs(e,a,i):qn(e)&&(r=e,e=r.id),o.id=e,o.dom=r;var s=r.style;return s&&(ho(r),r.onselectstart=function(){return!1},s.padding="0",s.margin="0",s.borderWidth="0"),o.painter=a,o.dpr=i,o}return t.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},t.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},t.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},t.prototype.setUnpainted=function(){this.__firstTimePaint=!0},t.prototype.createBackBuffer=function(){var e=this.dpr;this.domBack=rs("back-"+this.id,this.painter,e),this.ctxBack=this.domBack.getContext("2d"),e!==1&&this.ctxBack.scale(e,e)},t.prototype.createRepaintRects=function(e,a,i,o){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var r=[],s=this.maxRepaintRectCount,l=!1,u=new de(0,0,0,0);function d(x){if(!(!x.isFinite()||x.isZero()))if(r.length===0){var v=new de(0,0,0,0);v.copy(x),r.push(v)}else{for(var I=!1,_=1/0,b=0,w=0;w<r.length;++w){var M=r[w];if(M.intersect(x)){var S=new de(0,0,0,0);S.copy(M),S.union(x),r[w]=S,I=!0;break}else if(l){u.copy(x),u.union(M);var L=x.width*x.height,D=M.width*M.height,C=u.width*u.height,N=C-L-D;N<_&&(_=N,b=w)}}if(l&&(r[b].union(x),I=!0),!I){var v=new de(0,0,0,0);v.copy(x),r.push(v)}l||(l=r.length>=s)}}for(var h=this.__startIndex;h<this.__endIndex;++h){var c=e[h];if(c){var p=c.shouldBePainted(i,o,!0,!0),g=c.__isRendered&&(c.__dirty&na||!p)?c.getPrevPaintRect():null;g&&d(g);var f=p&&(c.__dirty&na||!c.__isRendered)?c.getPaintRect():null;f&&d(f)}}for(var h=this.__prevStartIndex;h<this.__prevEndIndex;++h){var c=a[h],p=c&&c.shouldBePainted(i,o,!0,!0);if(c&&(!p||!c.__zr)&&c.__isRendered){var g=c.getPrevPaintRect();g&&d(g)}}var y;do{y=!1;for(var h=0;h<r.length;){if(r[h].isZero()){r.splice(h,1);continue}for(var m=h+1;m<r.length;)r[h].intersect(r[m])?(y=!0,r[h].union(r[m]),r.splice(m,1)):m++;h++}}while(y);return this._paintRects=r,r},t.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},t.prototype.resize=function(e,a){var i=this.dpr,o=this.dom,r=o.style,s=this.domBack;r&&(r.width=e+"px",r.height=a+"px"),o.width=e*i,o.height=a*i,s&&(s.width=e*i,s.height=a*i,i!==1&&this.ctxBack.scale(i,i))},t.prototype.clear=function(e,a,i){var o=this.dom,r=this.ctx,s=o.width,l=o.height;a=a||this.clearColor;var u=this.motionBlur&&!e,d=this.lastFrameAlpha,h=this.dpr,c=this;u&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(o,0,0,s/h,l/h));var p=this.domBack;function g(f,y,m,x){if(r.clearRect(f,y,m,x),a&&a!=="transparent"){var v=void 0;if(uu(a)){var I=a.global||a.__width===m&&a.__height===x;v=I&&a.__canvasGradient||du(r,a,{x:0,y:0,width:m,height:x}),a.__canvasGradient=v,a.__width=m,a.__height=x}else hu(a)&&(a.scaleX=a.scaleX||h,a.scaleY=a.scaleY||h,v=cu(r,a,{dirty:function(){c.setUnpainted(),c.painter.refresh()}}));r.save(),r.fillStyle=v||a,r.fillRect(f,y,m,x),r.restore()}u&&(r.save(),r.globalAlpha=d,r.drawImage(p,f,y,m,x),r.restore())}!i||u?g(0,0,s,l):i.length&&E(i,function(f){g(f.x*h,f.y*h,f.width*h,f.height*h)})},t}(lu);const gi=gy;var ss=1e5,tt=314159,xn=.01,yy=.001;function vy(n){return n?n.__builtin__?!0:!(typeof n.resize!="function"||typeof n.refresh!="function"):!1}function my(n,t){var e=document.createElement("div");return e.style.cssText=["position:relative","width:"+n+"px","height:"+t+"px","padding:0","margin:0","border-width:0"].join(";")+";",e}var xy=function(){function n(t,e,a,i){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var o=!t.nodeName||t.nodeName.toUpperCase()==="CANVAS";this._opts=a=W({},a||{}),this.dpr=a.devicePixelRatio||co,this._singleCanvas=o,this.root=t;var r=t.style;r&&(ho(t),t.innerHTML=""),this.storage=e;var s=this._zlevelList;this._prevDisplayList=[];var l=this._layers;if(o){var u=t,d=u.width,h=u.height;a.width!=null&&(d=a.width),a.height!=null&&(h=a.height),this.dpr=a.devicePixelRatio||1,u.width=d*this.dpr,u.height=h*this.dpr,this._width=d,this._height=h;var c=new gi(u,this,this.dpr);c.__builtin__=!0,c.initContext(),l[tt]=c,c.zlevel=tt,s.push(tt),this._domRoot=t}else{this._width=$t(t,0,a),this._height=$t(t,1,a);var p=this._domRoot=my(this._width,this._height);t.appendChild(p)}}return n.prototype.getType=function(){return"canvas"},n.prototype.isSingleCanvas=function(){return this._singleCanvas},n.prototype.getViewportRoot=function(){return this._domRoot},n.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},n.prototype.refresh=function(t){var e=this.storage.getDisplayList(!0),a=this._prevDisplayList,i=this._zlevelList;this._redrawId=Math.random(),this._paintList(e,a,t,this._redrawId);for(var o=0;o<i.length;o++){var r=i[o],s=this._layers[r];if(!s.__builtin__&&s.refresh){var l=o===0?this._backgroundColor:null;s.refresh(l)}}return this._opts.useDirtyRect&&(this._prevDisplayList=e.slice()),this},n.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},n.prototype._paintHoverList=function(t){var e=t.length,a=this._hoverlayer;if(a&&a.clear(),!!e){for(var i={inHover:!0,viewWidth:this._width,viewHeight:this._height},o,r=0;r<e;r++){var s=t[r];s.__inHover&&(a||(a=this._hoverlayer=this.getLayer(ss)),o||(o=a.ctx,o.save()),Qt(o,s,i,r===e-1))}o&&o.restore()}},n.prototype.getHoverLayer=function(){return this.getLayer(ss)},n.prototype.paintOne=function(t,e){pu(t,e)},n.prototype._paintList=function(t,e,a,i){if(this._redrawId===i){a=a||!1,this._updateLayerStatus(t);var o=this._doPaintList(t,e,a),r=o.finished,s=o.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),s&&this._paintHoverList(t),r)this.eachLayer(function(u){u.afterBrush&&u.afterBrush()});else{var l=this;fu(function(){l._paintList(t,e,a,i)})}}},n.prototype._compositeManually=function(){var t=this.getLayer(tt).ctx,e=this._domRoot.width,a=this._domRoot.height;t.clearRect(0,0,e,a),this.eachBuiltinLayer(function(i){i.virtual&&t.drawImage(i.dom,0,0,e,a)})},n.prototype._doPaintList=function(t,e,a){for(var i=this,o=[],r=this._opts.useDirtyRect,s=0;s<this._zlevelList.length;s++){var l=this._zlevelList[s],u=this._layers[l];u.__builtin__&&u!==this._hoverlayer&&(u.__dirty||a)&&o.push(u)}for(var d=!0,h=!1,c=function(f){var y=o[f],m=y.ctx,x=r&&y.createRepaintRects(t,e,p._width,p._height),v=a?y.__startIndex:y.__drawIndex,I=!a&&y.incremental&&Date.now,_=I&&Date.now(),b=y.zlevel===p._zlevelList[0]?p._backgroundColor:null;if(y.__startIndex===y.__endIndex)y.clear(!1,b,x);else if(v===y.__startIndex){var w=t[v];(!w.incremental||!w.notClear||a)&&y.clear(!1,b,x)}v===-1&&(v=y.__startIndex);var M,S=function(N){var T={inHover:!1,allClipped:!1,prevEl:null,viewWidth:i._width,viewHeight:i._height};for(M=v;M<y.__endIndex;M++){var A=t[M];if(A.__inHover&&(h=!0),i._doPaintEl(A,y,r,N,T,M===y.__endIndex-1),I){var P=Date.now()-_;if(P>15)break}}T.prevElClipPaths&&m.restore()};if(x)if(x.length===0)M=y.__endIndex;else for(var L=p.dpr,D=0;D<x.length;++D){var C=x[D];m.save(),m.beginPath(),m.rect(C.x*L,C.y*L,C.width*L,C.height*L),m.clip(),S(C),m.restore()}else m.save(),S(),m.restore();y.__drawIndex=M,y.__drawIndex<y.__endIndex&&(d=!1)},p=this,g=0;g<o.length;g++)c(g);return so.wxa&&E(this._layers,function(f){f&&f.ctx&&f.ctx.draw&&f.ctx.draw()}),{finished:d,needsRefreshHover:h}},n.prototype._doPaintEl=function(t,e,a,i,o,r){var s=e.ctx;if(a){var l=t.getPaintRect();(!i||l&&l.intersect(i))&&(Qt(s,t,o,r),t.setPrevPaintRect(l))}else Qt(s,t,o,r)},n.prototype.getLayer=function(t,e){this._singleCanvas&&!this._needsManuallyCompositing&&(t=tt);var a=this._layers[t];return a||(a=new gi("zr_"+t,this,this.dpr),a.zlevel=t,a.__builtin__=!0,this._layerConfig[t]?$e(a,this._layerConfig[t],!0):this._layerConfig[t-xn]&&$e(a,this._layerConfig[t-xn],!0),e&&(a.virtual=e),this.insertLayer(t,a),a.initContext()),a},n.prototype.insertLayer=function(t,e){var a=this._layers,i=this._zlevelList,o=i.length,r=this._domRoot,s=null,l=-1;if(!a[t]&&vy(e)){if(o>0&&t>i[0]){for(l=0;l<o-1&&!(i[l]<t&&i[l+1]>t);l++);s=a[i[l]]}if(i.splice(l+1,0,t),a[t]=e,!e.virtual)if(s){var u=s.dom;u.nextSibling?r.insertBefore(e.dom,u.nextSibling):r.appendChild(e.dom)}else r.firstChild?r.insertBefore(e.dom,r.firstChild):r.appendChild(e.dom);e.painter||(e.painter=this)}},n.prototype.eachLayer=function(t,e){for(var a=this._zlevelList,i=0;i<a.length;i++){var o=a[i];t.call(e,this._layers[o],o)}},n.prototype.eachBuiltinLayer=function(t,e){for(var a=this._zlevelList,i=0;i<a.length;i++){var o=a[i],r=this._layers[o];r.__builtin__&&t.call(e,r,o)}},n.prototype.eachOtherLayer=function(t,e){for(var a=this._zlevelList,i=0;i<a.length;i++){var o=a[i],r=this._layers[o];r.__builtin__||t.call(e,r,o)}},n.prototype.getLayers=function(){return this._layers},n.prototype._updateLayerStatus=function(t){this.eachBuiltinLayer(function(h,c){h.__dirty=h.__used=!1});function e(h){o&&(o.__endIndex!==h&&(o.__dirty=!0),o.__endIndex=h)}if(this._singleCanvas)for(var a=1;a<t.length;a++){var i=t[a];if(i.zlevel!==t[a-1].zlevel||i.incremental){this._needsManuallyCompositing=!0;break}}var o=null,r=0,s,l;for(l=0;l<t.length;l++){var i=t[l],u=i.zlevel,d=void 0;s!==u&&(s=u,r=0),i.incremental?(d=this.getLayer(u+yy,this._needsManuallyCompositing),d.incremental=!0,r=1):d=this.getLayer(u+(r>0?xn:0),this._needsManuallyCompositing),d.__builtin__||gu("ZLevel "+u+" has been used by unkown layer "+d.id),d!==o&&(d.__used=!0,d.__startIndex!==l&&(d.__dirty=!0),d.__startIndex=l,d.incremental?d.__drawIndex=-1:d.__drawIndex=l,e(l),o=d),i.__dirty&na&&!i.__inHover&&(d.__dirty=!0,d.incremental&&d.__drawIndex<0&&(d.__drawIndex=l))}e(l),this.eachBuiltinLayer(function(h,c){!h.__used&&h.getElementCount()>0&&(h.__dirty=!0,h.__startIndex=h.__endIndex=h.__drawIndex=0),h.__dirty&&h.__drawIndex<0&&(h.__drawIndex=h.__startIndex)})},n.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},n.prototype._clearLayer=function(t){t.clear()},n.prototype.setBackgroundColor=function(t){this._backgroundColor=t,E(this._layers,function(e){e.setUnpainted()})},n.prototype.configLayer=function(t,e){if(e){var a=this._layerConfig;a[t]?$e(a[t],e,!0):a[t]=e;for(var i=0;i<this._zlevelList.length;i++){var o=this._zlevelList[i];if(o===t||o===t+xn){var r=this._layers[o];$e(r,a[t],!0)}}}},n.prototype.delLayer=function(t){var e=this._layers,a=this._zlevelList,i=e[t];i&&(i.dom.parentNode.removeChild(i.dom),delete e[t],a.splice(_e(a,t),1))},n.prototype.resize=function(t,e){if(this._domRoot.style){var a=this._domRoot;a.style.display="none";var i=this._opts,o=this.root;if(t!=null&&(i.width=t),e!=null&&(i.height=e),t=$t(o,0,i),e=$t(o,1,i),a.style.display="",this._width!==t||e!==this._height){a.style.width=t+"px",a.style.height=e+"px";for(var r in this._layers)this._layers.hasOwnProperty(r)&&this._layers[r].resize(t,e);this.refresh(!0)}this._width=t,this._height=e}else{if(t==null||e==null)return;this._width=t,this._height=e,this.getLayer(tt).resize(t,e)}return this},n.prototype.clearLayer=function(t){var e=this._layers[t];e&&e.clear()},n.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},n.prototype.getRenderedCanvas=function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._layers[tt].dom;var e=new gi("image",this,t.pixelRatio||this.dpr);e.initContext(),e.clear(!1,t.backgroundColor||this._backgroundColor);var a=e.ctx;if(t.pixelRatio<=this.dpr){this.refresh();var i=e.dom.width,o=e.dom.height;this.eachLayer(function(h){h.__builtin__?a.drawImage(h.dom,0,0,i,o):h.renderToCanvas&&(a.save(),h.renderToCanvas(a),a.restore())})}else for(var r={inHover:!1,viewWidth:this._width,viewHeight:this._height},s=this.storage.getDisplayList(!0),l=0,u=s.length;l<u;l++){var d=s[l];Qt(a,d,r,l===u-1)}return e.dom},n.prototype.getWidth=function(){return this._width},n.prototype.getHeight=function(){return this._height},n}();const _y=xy;function Iy(n){n.registerPainter("canvas",_y)}var Ee=yu.CMD;function ct(n,t){return Math.abs(n-t)<1e-5}function yi(n){var t=n.data,e=n.len(),a=[],i,o=0,r=0,s=0,l=0;function u(N,T){i&&i.length>2&&a.push(i),i=[N,T]}function d(N,T,A,P){ct(N,A)&&ct(T,P)||i.push(N,T,A,P,A,P)}function h(N,T,A,P,R,k){var z=Math.abs(T-N),H=Math.tan(z/4)*4/3,B=T<N?-1:1,K=Math.cos(N),Q=Math.sin(N),q=Math.cos(T),ee=Math.sin(T),me=K*R+A,Y=Q*k+P,O=q*R+A,j=ee*k+P,U=R*H*B,$=k*H*B;i.push(me-U*Q,Y+$*K,O+U*ee,j-$*q,O,j)}for(var c,p,g,f,y=0;y<e;){var m=t[y++],x=y===1;switch(x&&(o=t[y],r=t[y+1],s=o,l=r,(m===Ee.L||m===Ee.C||m===Ee.Q)&&(i=[s,l])),m){case Ee.M:o=s=t[y++],r=l=t[y++],u(s,l);break;case Ee.L:c=t[y++],p=t[y++],d(o,r,c,p),o=c,r=p;break;case Ee.C:i.push(t[y++],t[y++],t[y++],t[y++],o=t[y++],r=t[y++]);break;case Ee.Q:c=t[y++],p=t[y++],g=t[y++],f=t[y++],i.push(o+2/3*(c-o),r+2/3*(p-r),g+2/3*(c-g),f+2/3*(p-f),g,f),o=g,r=f;break;case Ee.A:var v=t[y++],I=t[y++],_=t[y++],b=t[y++],w=t[y++],M=t[y++]+w;y+=1;var S=!t[y++];c=Math.cos(w)*_+v,p=Math.sin(w)*b+I,x?(s=c,l=p,u(s,l)):d(o,r,c,p),o=Math.cos(M)*_+v,r=Math.sin(M)*b+I;for(var L=(S?-1:1)*Math.PI/2,D=w;S?D>M:D<M;D+=L){var C=S?Math.max(D+L,M):Math.min(D+L,M);h(D,C,v,I,_,b)}break;case Ee.R:s=o=t[y++],l=r=t[y++],c=s+t[y++],p=l+t[y++],u(c,l),d(c,l,c,p),d(c,p,s,p),d(s,p,s,l),d(s,l,c,l);break;case Ee.Z:i&&d(o,r,s,l),o=s,r=l;break}}return i&&i.length>2&&a.push(i),a}function vi(n,t,e,a,i,o,r,s,l,u){if(ct(n,e)&&ct(t,a)&&ct(i,r)&&ct(o,s)){l.push(r,s);return}var d=2/u,h=d*d,c=r-n,p=s-t,g=Math.sqrt(c*c+p*p);c/=g,p/=g;var f=e-n,y=a-t,m=i-r,x=o-s,v=f*f+y*y,I=m*m+x*x;if(v<h&&I<h){l.push(r,s);return}var _=c*f+p*y,b=-c*m-p*x,w=v-_*_,M=I-b*b;if(w<h&&_>=0&&M<h&&b>=0){l.push(r,s);return}var S=[],L=[];Jt(n,e,i,r,.5,S),Jt(t,a,o,s,.5,L),vi(S[0],L[0],S[1],L[1],S[2],L[2],S[3],L[3],l,u),vi(S[4],L[4],S[5],L[5],S[6],L[6],S[7],L[7],l,u)}function by(n,t){var e=yi(n),a=[];t=t||1;for(var i=0;i<e.length;i++){var o=e[i],r=[],s=o[0],l=o[1];r.push(s,l);for(var u=2;u<o.length;){var d=o[u++],h=o[u++],c=o[u++],p=o[u++],g=o[u++],f=o[u++];vi(s,l,d,h,c,p,g,f,r,t),s=g,l=f}a.push(r)}return a}function ls(n,t,e){var a=n[t],i=n[1-t],o=Math.abs(a/i),r=Math.ceil(Math.sqrt(o*e)),s=Math.floor(e/r);s===0&&(s=1,r=e);for(var l=[],u=0;u<r;u++)l.push(s);var d=r*s,h=e-d;if(h>0)for(var u=0;u<h;u++)l[u%r]+=1;return l}function us(n,t,e){for(var a=n.r0,i=n.r,o=n.startAngle,r=n.endAngle,s=Math.abs(r-o),l=s*i,u=i-a,d=l>Math.abs(u),h=ls([l,u],d?0:1,t),c=(d?s:u)/h.length,p=0;p<h.length;p++)for(var g=(d?u:s)/h[p],f=0;f<h[p];f++){var y={};d?(y.startAngle=o+c*p,y.endAngle=o+c*(p+1),y.r0=a+g*f,y.r=a+g*(f+1)):(y.startAngle=o+g*f,y.endAngle=o+g*(f+1),y.r0=a+c*p,y.r=a+c*(p+1)),y.clockwise=n.clockwise,y.cx=n.cx,y.cy=n.cy,e.push(y)}}function wy(n,t,e){for(var a=n.width,i=n.height,o=a>i,r=ls([a,i],o?0:1,t),s=o?"width":"height",l=o?"height":"width",u=o?"x":"y",d=o?"y":"x",h=n[s]/r.length,c=0;c<r.length;c++)for(var p=n[l]/r[c],g=0;g<r[c];g++){var f={};f[u]=c*h,f[d]=g*p,f[s]=h,f[l]=p,f.x+=n.x,f.y+=n.y,e.push(f)}}function ds(n,t,e,a){return n*a-e*t}function Sy(n,t,e,a,i,o,r,s){var l=e-n,u=a-t,d=r-i,h=s-o,c=ds(d,h,l,u);if(Math.abs(c)<1e-6)return null;var p=n-i,g=t-o,f=ds(p,g,d,h)/c;return f<0||f>1?null:new Ye(f*l+n,f*u+t)}function My(n,t,e){var a=new Ye;Ye.sub(a,e,t),a.normalize();var i=new Ye;Ye.sub(i,n,t);var o=i.dot(a);return o}function pt(n,t){var e=n[n.length-1];e&&e[0]===t[0]&&e[1]===t[1]||n.push(t)}function Ly(n,t,e){for(var a=n.length,i=[],o=0;o<a;o++){var r=n[o],s=n[(o+1)%a],l=Sy(r[0],r[1],s[0],s[1],t.x,t.y,e.x,e.y);l&&i.push({projPt:My(l,t,e),pt:l,idx:o})}if(i.length<2)return[{points:n},{points:n}];i.sort(function(y,m){return y.projPt-m.projPt});var u=i[0],d=i[i.length-1];if(d.idx<u.idx){var h=u;u=d,d=h}for(var c=[u.pt.x,u.pt.y],p=[d.pt.x,d.pt.y],g=[c],f=[p],o=u.idx+1;o<=d.idx;o++)pt(g,n[o].slice());pt(g,p),pt(g,c);for(var o=d.idx+1;o<=u.idx+a;o++)pt(f,n[o%a].slice());return pt(f,c),pt(f,p),[{points:g},{points:f}]}function hs(n){var t=n.points,e=[],a=[];Ot(t,e,a);var i=new de(e[0],e[1],a[0]-e[0],a[1]-e[1]),o=i.width,r=i.height,s=i.x,l=i.y,u=new Ye,d=new Ye;return o>r?(u.x=d.x=s+o/2,u.y=l,d.y=l+r):(u.y=d.y=l+r/2,u.x=s,d.x=s+o),Ly(t,u,d)}function _n(n,t,e,a){if(e===1)a.push(t);else{var i=Math.floor(e/2),o=n(t);_n(n,o[0],i,a),_n(n,o[1],e-i,a)}return a}function Dy(n,t){for(var e=[],a=0;a<t;a++)e.push(aa(n));return e}function Cy(n,t){t.setStyle(n.style),t.z=n.z,t.z2=n.z2,t.zlevel=n.zlevel}function Ty(n){for(var t=[],e=0;e<n.length;)t.push([n[e++],n[e++]]);return t}function Ay(n,t){var e=[],a=n.shape,i;switch(n.type){case"rect":wy(a,t,e),i=He;break;case"sector":us(a,t,e),i=Jn;break;case"circle":us({r0:0,r:a.r,startAngle:0,endAngle:Math.PI*2,cx:a.cx,cy:a.cy},t,e),i=Jn;break;default:var o=n.getComputedTransform(),r=o?Math.sqrt(Math.max(o[0]*o[0]+o[1]*o[1],o[2]*o[2]+o[3]*o[3])):1,s=F(by(n.getUpdatedPathProxy(),r),function(m){return Ty(m)}),l=s.length;if(l===0)_n(hs,{points:s[0]},t,e);else if(l===t)for(var u=0;u<l;u++)e.push({points:s[u]});else{var d=0,h=F(s,function(m){var x=[],v=[];Ot(m,x,v);var I=(v[1]-x[1])*(v[0]-x[0]);return d+=I,{poly:m,area:I}});h.sort(function(m,x){return x.area-m.area});for(var c=t,u=0;u<l;u++){var p=h[u];if(c<=0)break;var g=u===l-1?c:Math.ceil(p.area/d*t);g<0||(_n(hs,{points:p.poly},g,e),c-=g)}}i=vt;break}if(!i)return Dy(n,t);for(var f=[],u=0;u<e.length;u++){var y=new i;y.setShape(e[u]),Cy(n,y),f.push(y)}return f}function Ny(n,t){var e=n.length,a=t.length;if(e===a)return[n,t];for(var i=[],o=[],r=e<a?n:t,s=Math.min(e,a),l=Math.abs(a-e)/6,u=(s-2)/6,d=Math.ceil(l/u)+1,h=[r[0],r[1]],c=l,p=2;p<s;){var g=r[p-2],f=r[p-1],y=r[p++],m=r[p++],x=r[p++],v=r[p++],I=r[p++],_=r[p++];if(c<=0){h.push(y,m,x,v,I,_);continue}for(var b=Math.min(c,d-1)+1,w=1;w<=b;w++){var M=w/b;Jt(g,y,x,I,M,i),Jt(f,m,v,_,M,o),g=i[3],f=o[3],h.push(i[1],o[1],i[2],o[2],g,f),y=i[5],m=o[5],x=i[6],v=o[6]}c-=b-1}return r===n?[h,t]:[n,h]}function cs(n,t){for(var e=n.length,a=n[e-2],i=n[e-1],o=[],r=0;r<t.length;)o[r++]=a,o[r++]=i;return o}function Ey(n,t){for(var e,a,i,o=[],r=[],s=0;s<Math.max(n.length,t.length);s++){var l=n[s],u=t[s],d=void 0,h=void 0;l?u?(e=Ny(l,u),d=e[0],h=e[1],a=d,i=h):(h=cs(i||l,l),d=l):(d=cs(a||u,u),h=u),o.push(d),r.push(h)}return[o,r]}function ps(n){for(var t=0,e=0,a=0,i=n.length,o=0,r=i-2;o<i;r=o,o+=2){var s=n[r],l=n[r+1],u=n[o],d=n[o+1],h=s*d-u*l;t+=h,e+=(s+u)*h,a+=(l+d)*h}return t===0?[n[0]||0,n[1]||0]:[e/t/3,a/t/3,t]}function Py(n,t,e,a){for(var i=(n.length-2)/6,o=1/0,r=0,s=n.length,l=s-2,u=0;u<i;u++){for(var d=u*6,h=0,c=0;c<s;c+=2){var p=c===0?d:(d+c-2)%l+2,g=n[p]-e[0],f=n[p+1]-e[1],y=t[c]-a[0],m=t[c+1]-a[1],x=y-g,v=m-f;h+=x*x+v*v}h<o&&(o=h,r=u)}return r}function Ry(n){for(var t=[],e=n.length,a=0;a<e;a+=2)t[a]=n[e-a-2],t[a+1]=n[e-a-1];return t}function Vy(n,t,e,a){for(var i=[],o,r=0;r<n.length;r++){var s=n[r],l=t[r],u=ps(s),d=ps(l);o==null&&(o=u[2]<0!=d[2]<0);var h=[],c=[],p=0,g=1/0,f=[],y=s.length;o&&(s=Ry(s));for(var m=Py(s,l,u,d)*6,x=y-2,v=0;v<x;v+=2){var I=(m+v)%x+2;h[v+2]=s[I]-u[0],h[v+3]=s[I+1]-u[1]}if(h[0]=s[m]-u[0],h[1]=s[m+1]-u[1],e>0)for(var _=a/e,b=-a/2;b<=a/2;b+=_){for(var w=Math.sin(b),M=Math.cos(b),S=0,v=0;v<s.length;v+=2){var L=h[v],D=h[v+1],C=l[v]-d[0],N=l[v+1]-d[1],T=C*M-N*w,A=C*w+N*M;f[v]=T,f[v+1]=A;var P=T-L,R=A-D;S+=P*P+R*R}if(S<g){g=S,p=b;for(var k=0;k<f.length;k++)c[k]=f[k]}}else for(var z=0;z<y;z+=2)c[z]=l[z]-d[0],c[z+1]=l[z+1]-d[1];i.push({from:h,to:c,fromCp:u,toCp:d,rotation:-p})}return i}function In(n){return n.__isCombineMorphing}var fs="__mOriginal_";function bn(n,t,e){var a=fs+t,i=n[a]||n[t];n[a]||(n[a]=n[t]);var o=e.replace,r=e.after,s=e.before;n[t]=function(){var l=arguments,u;return s&&s.apply(this,l),o?u=o.apply(this,l):u=i.apply(this,l),r&&r.apply(this,l),u}}function zt(n,t){var e=fs+t;n[e]&&(n[t]=n[e],n[e]=null)}function gs(n,t){for(var e=0;e<n.length;e++)for(var a=n[e],i=0;i<a.length;){var o=a[i],r=a[i+1];a[i++]=t[0]*o+t[2]*r+t[4],a[i++]=t[1]*o+t[3]*r+t[5]}}function ys(n,t){var e=n.getUpdatedPathProxy(),a=t.getUpdatedPathProxy(),i=Ey(yi(e),yi(a)),o=i[0],r=i[1],s=n.getComputedTransform(),l=t.getComputedTransform();function u(){this.transform=null}s&&gs(o,s),l&&gs(r,l),bn(t,"updateTransform",{replace:u}),t.transform=null;var d=Vy(o,r,10,Math.PI),h=[];bn(t,"buildPath",{replace:function(c){for(var p=t.__morphT,g=1-p,f=[],y=0;y<d.length;y++){var m=d[y],x=m.from,v=m.to,I=m.rotation*p,_=m.fromCp,b=m.toCp,w=Math.sin(I),M=Math.cos(I);vu(f,_,b,p);for(var S=0;S<x.length;S+=2){var L=x[S],D=x[S+1],C=v[S],N=v[S+1],T=L*g+C*p,A=D*g+N*p;h[S]=T*M-A*w+f[0],h[S+1]=T*w+A*M+f[1]}var P=h[0],R=h[1];c.moveTo(P,R);for(var S=2;S<x.length;){var C=h[S++],N=h[S++],k=h[S++],z=h[S++],H=h[S++],B=h[S++];P===C&&R===N&&k===H&&z===B?c.lineTo(H,B):c.bezierCurveTo(C,N,k,z,H,B),P=H,R=B}}}})}function mi(n,t,e){if(!n||!t)return t;var a=e.done,i=e.during;ys(n,t),t.__morphT=0;function o(){zt(t,"buildPath"),zt(t,"updateTransform"),t.__morphT=-1,t.createPathProxy(),t.dirtyShape()}return t.animateTo({__morphT:1},ce({during:function(r){t.dirtyShape(),i&&i(r)},done:function(){o(),a&&a()}},e)),t}function ky(n,t,e,a,i,o){var r=16;n=i===e?0:Math.round(32767*(n-e)/(i-e)),t=o===a?0:Math.round(32767*(t-a)/(o-a));for(var s=0,l,u=(1<<r)/2;u>0;u/=2){var d=0,h=0;(n&u)>0&&(d=1),(t&u)>0&&(h=1),s+=u*u*(3*d^h),h===0&&(d===1&&(n=u-1-n,t=u-1-t),l=n,n=t,t=l)}return s}function wn(n){var t=1/0,e=1/0,a=-1/0,i=-1/0,o=F(n,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),d=l.x+l.width/2+(u?u[4]:0),h=l.y+l.height/2+(u?u[5]:0);return t=Math.min(d,t),e=Math.min(h,e),a=Math.max(d,a),i=Math.max(h,i),[d,h]}),r=F(o,function(s,l){return{cp:s,z:ky(s[0],s[1],t,e,a,i),path:n[l]}});return r.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function vs(n){return Ay(n.path,n.count)}function xi(){return{fromIndividuals:[],toIndividuals:[],count:0}}function zy(n,t,e){var a=[];function i(_){for(var b=0;b<_.length;b++){var w=_[b];In(w)?i(w.childrenRef()):w instanceof ye&&a.push(w)}}i(n);var o=a.length;if(!o)return xi();var r=e.dividePath||vs,s=r({path:t,count:o});if(s.length!==o)return xi();a=wn(a),s=wn(s);for(var l=e.done,u=e.during,d=e.individualDelay,h=new Mi,c=0;c<o;c++){var p=a[c],g=s[c];g.parent=t,g.copyTransform(h),d||ys(p,g)}t.__isCombineMorphing=!0,t.childrenRef=function(){return s};function f(_){for(var b=0;b<s.length;b++)s[b].addSelfToZr(_)}bn(t,"addSelfToZr",{after:function(_){f(_)}}),bn(t,"removeSelfFromZr",{after:function(_){for(var b=0;b<s.length;b++)s[b].removeSelfFromZr(_)}});function y(){t.__isCombineMorphing=!1,t.__morphT=-1,t.childrenRef=null,zt(t,"addSelfToZr"),zt(t,"removeSelfFromZr")}var m=s.length;if(d)for(var x=m,v=function(){x--,x===0&&(y(),l&&l())},c=0;c<m;c++){var I=d?ce({delay:(e.delay||0)+d(c,m,a[c],s[c]),done:v},e):e;mi(a[c],s[c],I)}else t.__morphT=0,t.animateTo({__morphT:1},ce({during:function(_){for(var b=0;b<m;b++){var w=s[b];w.__morphT=t.__morphT,w.dirtyShape()}u&&u(_)},done:function(){y();for(var _=0;_<n.length;_++)zt(n[_],"updateTransform");l&&l()}},e));return t.__zr&&f(t.__zr),{fromIndividuals:a,toIndividuals:s,count:m}}function Oy(n,t,e){var a=t.length,i=[],o=e.dividePath||vs;function r(p){for(var g=0;g<p.length;g++){var f=p[g];In(f)?r(f.childrenRef()):f instanceof ye&&i.push(f)}}if(In(n)){r(n.childrenRef());var s=i.length;if(s<a)for(var l=0,u=s;u<a;u++)i.push(aa(i[l++%s]));i.length=a}else{i=o({path:n,count:a});for(var d=n.getComputedTransform(),u=0;u<i.length;u++)i[u].setLocalTransform(d);if(i.length!==a)return xi()}i=wn(i),t=wn(t);for(var h=e.individualDelay,u=0;u<a;u++){var c=h?ce({delay:(e.delay||0)+h(u,a,i[u],t[u])},e):e;mi(i[u],t[u],c)}return{fromIndividuals:i,toIndividuals:t,count:t.length}}function ms(n){return G(n[0])}function xs(n,t){for(var e=[],a=n.length,i=0;i<a;i++)e.push({one:n[i],many:[]});for(var i=0;i<t.length;i++){var o=t[i].length,r=void 0;for(r=0;r<o;r++)e[r%a].many.push(t[i][r])}for(var s=0,i=a-1;i>=0;i--)if(!e[i].many.length){var l=e[s].many;if(l.length<=1)if(s)s=0;else return e;var o=l.length,u=Math.ceil(o/2);e[i].many=l.slice(u,o),e[s].many=l.slice(0,u),s++}return e}var Gy={clone:function(n){for(var t=[],e=1-Math.pow(1-n.path.style.opacity,1/n.count),a=0;a<n.count;a++){var i=aa(n.path);i.setStyle("opacity",e),t.push(i)}return t},split:null};function _i(n,t,e,a,i,o){if(!n.length||!t.length)return;var r=ia("update",a,i);if(!(r&&r.duration>0))return;var s=a.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},r),u,d;ms(n)&&(u=n,d=t),ms(t)&&(u=t,d=n);function h(m,x,v,I,_){var b=m.many,w=m.one;if(b.length===1&&!_){var M=x?b[0]:w,S=x?w:b[0];if(In(M))h({many:[M],one:S},!0,v,I,!0);else{var L=s?ce({delay:s(v,I)},l):l;mi(M,S,L),o(M,S,M,S,L)}}else for(var D=ce({dividePath:Gy[e],individualDelay:s&&function(R,k,z,H){return s(R+v,I)}},l),C=x?zy(b,w,D):Oy(w,b,D),N=C.fromIndividuals,T=C.toIndividuals,A=N.length,P=0;P<A;P++){var L=s?ce({delay:s(P,A)},l):l;o(N[P],T[P],x?b[P]:m.one,x?m.one:b[P],L)}}for(var c=u?u===n:n.length>t.length,p=u?xs(d,u):xs(c?t:n,[c?n:t]),g=0,f=0;f<p.length;f++)g+=p[f].many.length;for(var y=0,f=0;f<p.length;f++)h(p[f],c,y,g),y+=p[f].many.length}function nt(n){if(!n)return[];if(G(n)){for(var t=[],e=0;e<n.length;e++)t.push(nt(n[e]));return t}var a=[];return n.traverse(function(i){i instanceof ye&&!i.disableMorphing&&!i.invisible&&!i.ignore&&a.push(i)}),a}var _s=1e4,By=0,Is=1,bs=2,Fy=xe();function Hy(n,t){for(var e=n.dimensions,a=0;a<e.length;a++){var i=n.getDimensionInfo(e[a]);if(i&&i.otherDims[t]===0)return e[a]}}function Wy(n,t,e){var a=n.getDimensionInfo(e),i=a&&a.ordinalMeta;if(a){var o=n.get(a.name,t);return i&&i.categories[o]||o+""}}function ws(n,t,e,a){var i=a?"itemChildGroupId":"itemGroupId",o=Hy(n,i);if(o){var r=Wy(n,t,o);return r}var s=n.getRawDataItem(t),l=a?"childGroupId":"groupId";if(s&&s[l])return s[l]+"";if(!a)return e||n.getId(t)}function Ss(n){var t=[];return E(n,function(e){var a=e.data,i=e.dataGroupId;if(!(a.count()>_s))for(var o=a.getIndices(),r=0;r<o.length;r++)t.push({data:a,groupId:ws(a,r,i,!1),childGroupId:ws(a,r,i,!0),divide:e.divide,dataIndex:r})}),t}function Ii(n,t,e){n.traverse(function(a){a instanceof ye&&Te(a,{style:{opacity:0}},t,{dataIndex:e,isFrom:!0})})}function bi(n){if(n.parent){var t=n.getComputedTransform();n.setLocalTransform(t),n.parent.remove(n)}}function ft(n){n.stopAnimation(),n.isGroup&&n.traverse(function(t){t.stopAnimation()})}function Xy(n,t,e){var a=ia("update",e,t);a&&n.traverse(function(i){if(i instanceof An){var o=mu(i);o&&i.animateFrom({style:o},a)}})}function Yy(n,t){var e=n.length;if(e!==t.length)return!1;for(var a=0;a<e;a++){var i=n[a],o=t[a];if(i.data.getId(i.dataIndex)!==o.data.getId(o.dataIndex))return!1}return!0}function Ms(n,t,e){var a=Ss(n),i=Ss(t);function o(v,I,_,b,w){(_||v)&&I.animateFrom({style:_&&_!==v?W(W({},_.style),v.style):v.style},w)}var r=!1,s=By,l=ve(),u=ve();a.forEach(function(v){v.groupId&&l.set(v.groupId,!0),v.childGroupId&&u.set(v.childGroupId,!0)});for(var d=0;d<i.length;d++){var h=i[d].groupId;if(u.get(h)){s=Is;break}var c=i[d].childGroupId;if(c&&l.get(c)){s=bs;break}}function p(v,I){return function(_){var b=_.data,w=_.dataIndex;return I?b.getId(w):v?s===Is?_.childGroupId:_.groupId:s===bs?_.childGroupId:_.groupId}}var g=Yy(a,i),f={};if(!g)for(var d=0;d<i.length;d++){var y=i[d],m=y.data.getItemGraphicEl(y.dataIndex);m&&(f[m.id]=!0)}function x(v,I){var _=a[I],b=i[v],w=b.data.hostModel,M=_.data.getItemGraphicEl(_.dataIndex),S=b.data.getItemGraphicEl(b.dataIndex);if(M===S){S&&Xy(S,b.dataIndex,w);return}M&&f[M.id]||S&&(ft(S),M?(ft(M),bi(M),r=!0,_i(nt(M),nt(S),b.divide,w,v,o)):Ii(S,w,v))}new ot(a,i,p(!0,g),p(!1,g),null,"multiple").update(x).updateManyToOne(function(v,I){var _=i[v],b=_.data,w=b.hostModel,M=b.getItemGraphicEl(_.dataIndex),S=De(F(I,function(L){return a[L].data.getItemGraphicEl(a[L].dataIndex)}),function(L){return L&&L!==M&&!f[L.id]});M&&(ft(M),S.length?(E(S,function(L){ft(L),bi(L)}),r=!0,_i(nt(S),nt(M),_.divide,w,v,o)):Ii(M,w,_.dataIndex))}).updateOneToMany(function(v,I){var _=a[I],b=_.data.getItemGraphicEl(_.dataIndex);if(!(b&&f[b.id])){var w=De(F(v,function(S){return i[S].data.getItemGraphicEl(i[S].dataIndex)}),function(S){return S&&S!==b}),M=i[v[0]].data.hostModel;w.length&&(E(w,function(S){return ft(S)}),b?(ft(b),bi(b),r=!0,_i(nt(b),nt(w),_.divide,M,v[0],o)):E(w,function(S){return Ii(S,M,v[0])}))}}).updateManyToMany(function(v,I){new ot(I,v,function(_){return a[_].data.getId(a[_].dataIndex)},function(_){return i[_].data.getId(i[_].dataIndex)}).update(function(_,b){x(v[_],I[b])}).execute()}).execute(),r&&E(t,function(v){var I=v.data,_=I.hostModel,b=_&&e.getViewOfSeriesModel(_),w=ia("update",_,0);b&&_.isAnimationEnabled()&&w&&w.duration>0&&b.group.traverse(function(M){M instanceof ye&&!M.animators.length&&M.animateFrom({style:{opacity:0}},w)})})}function Ls(n){var t=n.getModel("universalTransition").get("seriesKey");return t||n.id}function Ds(n){return G(n)?n.sort().join(","):n}function Qe(n){if(n.hostModel)return n.hostModel.getModel("universalTransition").get("divideShape")}function Zy(n,t){var e=ve(),a=ve(),i=ve();return E(n.oldSeries,function(o,r){var s=n.oldDataGroupIds[r],l=n.oldData[r],u=Ls(o),d=Ds(u);a.set(d,{dataGroupId:s,data:l}),G(u)&&E(u,function(h){i.set(h,{key:d,dataGroupId:s,data:l})})}),E(t.updatedSeries,function(o){if(o.isUniversalTransitionEnabled()&&o.isAnimationEnabled()){var r=o.get("dataGroupId"),s=o.getData(),l=Ls(o),u=Ds(l),d=a.get(u);if(d)e.set(u,{oldSeries:[{dataGroupId:d.dataGroupId,divide:Qe(d.data),data:d.data}],newSeries:[{dataGroupId:r,divide:Qe(s),data:s}]});else if(G(l)){var h=[];E(l,function(g){var f=a.get(g);f.data&&h.push({dataGroupId:f.dataGroupId,divide:Qe(f.data),data:f.data})}),h.length&&e.set(u,{oldSeries:h,newSeries:[{dataGroupId:r,data:s,divide:Qe(s)}]})}else{var c=i.get(l);if(c){var p=e.get(c.key);p||(p={oldSeries:[{dataGroupId:c.dataGroupId,data:c.data,divide:Qe(c.data)}],newSeries:[]},e.set(c.key,p)),p.newSeries.push({dataGroupId:r,data:s,divide:Qe(s)})}}}}),e}function Cs(n,t){for(var e=0;e<n.length;e++){var a=t.seriesIndex!=null&&t.seriesIndex===n[e].seriesIndex||t.seriesId!=null&&t.seriesId===n[e].id;if(a)return e}}function Uy(n,t,e,a){var i=[],o=[];E(ke(n.from),function(r){var s=Cs(t.oldSeries,r);s>=0&&i.push({dataGroupId:t.oldDataGroupIds[s],data:t.oldData[s],divide:Qe(t.oldData[s]),groupIdDim:r.dimension})}),E(ke(n.to),function(r){var s=Cs(e.updatedSeries,r);if(s>=0){var l=e.updatedSeries[s].getData();o.push({dataGroupId:t.oldDataGroupIds[s],data:l,divide:Qe(l),groupIdDim:r.dimension})}}),i.length>0&&o.length>0&&Ms(i,o,a)}function jy(n){n.registerUpdateLifecycle("series:beforeupdate",function(t,e,a){E(ke(a.seriesTransition),function(i){E(ke(i.to),function(o){for(var r=a.updatedSeries,s=0;s<r.length;s++)(o.seriesIndex!=null&&o.seriesIndex===r[s].seriesIndex||o.seriesId!=null&&o.seriesId===r[s].id)&&(r[s][oa]=!0)})})}),n.registerUpdateLifecycle("series:transition",function(t,e,a){var i=Fy(e);if(i.oldSeries&&a.updatedSeries&&a.optionChanged){var o=a.seriesTransition;if(o)E(ke(o),function(p){Uy(p,i,a,e)});else{var r=Zy(i,a);E(r.keys(),function(p){var g=r.get(p);Ms(g.oldSeries,g.newSeries,e)})}E(a.updatedSeries,function(p){p[oa]&&(p[oa]=!1)})}for(var s=t.getSeries(),l=i.oldSeries=[],u=i.oldDataGroupIds=[],d=i.oldData=[],h=0;h<s.length;h++){var c=s[h].getData();c.count()<_s&&(l.push(s[h]),u.push(s[h].get("dataGroupId")),d.push(c))}})}X([Iy]),X([xu]),X([_u,Iu,bu,wu,Su,Mu,Dd,uh,zh,Lu,jh,sc,Rc,Uc,pp,_p,Op,jp,Du,nf,yf,Yf]),X(Cu),X(Tu),X(Au),X(lg),X(Ui),X(Nu),X(Eu),X(Pu),X(Ru),X(ro),X(Lg),X(Vu),X(ku),X(kg),X(Xg),X($g),X(zu),X(Ou),X(Gu),X(Bu),X(Fu),X(Hu),X(Wu),X(Xu),X(hy),X(fy),X(jy),X(Ku);
|