| 1 |
- var Mr=(r,e,t)=>new Promise((a,n)=>{var i=l=>{try{s(t.next(l))}catch(u){n(u)}},o=l=>{try{s(t.throw(l))}catch(u){n(u)}},s=l=>l.done?a(l.value):Promise.resolve(l.value).then(i,o);s((t=t.apply(r,e)).next())});import{A as Gs}from"./entry/index-CRWhxBeP.js";import{m as Lt,B as dt,n as Ie,i as nt,k as Ba,g as it,p as B,a as zs,f as Ct,s as Bs,b as Os,h as Hs,e as R,c as yo,d as mo,j as Nn,l as Fs,o as Ws,r as $t,q as It,t as wt,v as ot,w as So,T as _o,x as ge,_ as k,P as yt,G as rt,R as Oa,y as br,V as Ha,z as bo,A as xo,C as Io,D as ht,S as wo,E as ir,H as Us,F as $s,I as Lo,J as gt,K as Pt,L as or,M as ga,N as et,O as Zs,Q as U,U as W,W as F,X as xr,Y as Fa,Z as bt,$ as St,a0 as jt,a1 as Ot,a2 as ft,a3 as Do,a4 as Me,a5 as Ys,a6 as mt,a7 as Gt,a8 as Xs,a9 as qs,aa as Pe,ab as Zt,ac as kt,ad as Ir,ae as st,af as Ks,ag as de,ah as lt,ai as Rn,aj as js,ak as To,al as Qs,am as Vn,an as We,ao as kn,ap as Qt,aq as Rt,ar as Js,as as Wa,at as Jt,au as Ao,av as ya,aw as Co,ax as Nt,ay as Gn,az as Ht,aA as Oe,aB as qt,aC as He,aD as tl,aE as el,aF as ce,aG as zn,aH as rl,aI as pt,aJ as ma,aK as At,aL as sr,aM as Sa,aN as Mo,aO as Ua,aP as $a,aQ as Za,aR as Ya,aS as Ee,aT as wr,aU as al,aV as Po,aW as nl,aX as Xa,aY as ye,aZ as Fe,a_ as Eo,a$ as qa,b0 as Ka,b1 as il,b2 as ol,b3 as Bn,b4 as ja,b5 as sl,b6 as On,b7 as Ne,b8 as Qa,b9 as Ja,ba as me,bb as Yt,bc as ll,bd as ul,be as tn,bf as vl,bg as hl,bh as Y,bi as No,bj as fl,bk as _a,bl as ba,bm as cl,bn as pl,bo as xa,bp as Pr,bq as Ro,br as J,bs as en,bt as rn,bu as an,bv as Er,bw as dl,bx as Vo,by as gl,bz as we,bA as yl,bB as Hn,bC as ml,bD as ko,bE as Ia,bF as Lr,bG as Sl,bH as Go,bI as zo,bJ as Fn,bK as _l,bL as bl,bM as xl,bN as nn,bO as Wn,bP as Un,bQ as $n,bR as Mt,bS as Il,bT as wl,bU as Ll,bV as Dl,bW as Tl,bX as Al,bY as Cl,bZ as Ml,b_ as Pl,b$ as El,c0 as Nl,c1 as Rl,c2 as Bo,c3 as Vl,c4 as kl,c5 as Gl,c6 as Dr,c7 as zl,c8 as Bl,c9 as Ol,ca as Hl,cb as Fl,cc as Wl,cd as Ul,ce as $l,cf as Zl,cg as Yl,ch as Tr,ci as Oo,cj as Xl,ck as Se,cl as Ue,cm as Re,cn as ql,co as Kl,cp as jl,cq as Ql,cr as Jl,cs as tu,ct as oe,cu as eu,cv as ru,cw as Ho,cx as Fo,cy as au,cz as nu,cA as lr,cB as iu,cC as ou,cD as on,cE as su,cF as Wo,cG as lu,cH as uu,cI as vu,cJ as hu,cK as fu,cL as cu,cM as Zn,cN as pu,cO as Uo,cP as wa,cQ as du,cR as $o,cS as gu,cT as yu,cU as mu,cV as Su,cW as $e,cX as _u,cY as bu,cZ as xu,c_ as Ze,c$ as Iu,d0 as ur,d1 as sn,d2 as wu,d3 as ln,d4 as Nr,d5 as Lu,d6 as Du,d7 as Tu,d8 as Au,d9 as Cu,da as Mu,db as Pu,dc as Eu,dd as Nu,de as Ru,df as Vu,dg as ku,dh as Gu,di as zu,dj as Bu,dk as Ou,dl as Hu,dm as Fu,dn as Wu,dp as Uu,dq as $u,dr as Zu,ds as Yu,dt as Xu,du as qu,dv as Ku,u as ju,dw as Qu}from"./useECharts-C8Dd640M.js";import{m as Ju}from"./data-A0kLGLbM.js";import{d as tv,f as ev,o as rv,Z as av,_ as nv,ad as iv}from"./vue-DM5HGU8Z.js";import"./antd-BfqWtMX3.js";function ov(r){if(r){for(var e=[],t=0;t<r.length;t++)e.push(r[t].slice());return e}}function sv(r,e){var t=r.label,a=e&&e.getTextGuideLine();return{dataIndex:r.dataIndex,dataType:r.dataType,seriesIndex:r.seriesModel.seriesIndex,text:r.label.style.text,rect:r.hostRect,labelRect:r.rect,align:t.style.align,verticalAlign:t.style.verticalAlign,labelLinePoints:ov(a&&a.shape.points)}}var Yn=["align","verticalAlign","width","height","fontSize"],vt=new _o,Rr=Lt(),lv=Lt();function Ye(r,e,t){for(var a=0;a<t.length;a++){var n=t[a];e[n]!=null&&(r[n]=e[n])}}var Xe=["x","y","rotation"],uv=function(){function r(){this._labelList=[],this._chartViewList=[]}return r.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},r.prototype._addLabel=function(e,t,a,n,i){var o=n.style,s=n.__hostTarget,l=s.textConfig||{},u=n.getComputedTransform(),v=n.getBoundingRect().plain();dt.applyTransform(v,v,u),u?vt.setLocalTransform(u):(vt.x=vt.y=vt.rotation=vt.originX=vt.originY=0,vt.scaleX=vt.scaleY=1),vt.rotation=Ie(vt.rotation);var h=n.__hostTarget,f;if(h){f=h.getBoundingRect().plain();var c=h.getComputedTransform();dt.applyTransform(f,f,c)}var d=f&&h.getTextGuideLine();this._labelList.push({label:n,labelLine:d,seriesModel:a,dataIndex:e,dataType:t,layoutOption:i,computedLayoutOption:null,rect:v,hostRect:f,priority:f?f.width*f.height:0,defaultAttr:{ignore:n.ignore,labelGuideIgnore:d&&d.ignore,x:vt.x,y:vt.y,scaleX:vt.scaleX,scaleY:vt.scaleY,rotation:vt.rotation,style:{x:o.x,y:o.y,align:o.align,verticalAlign:o.verticalAlign,width:o.width,height:o.height,fontSize:o.fontSize},cursor:n.cursor,attachedPos:l.position,attachedRot:l.rotation}})},r.prototype.addLabelsOfSeries=function(e){var t=this;this._chartViewList.push(e);var a=e.__model,n=a.get("labelLayout");(nt(n)||Ba(n).length)&&e.group.traverse(function(i){if(i.ignore)return!0;var o=i.getTextContent(),s=it(i);o&&!o.disableLabelLayout&&t._addLabel(s.dataIndex,s.dataType,a,o,n)})},r.prototype.updateLayoutConfig=function(e){var t=e.getWidth(),a=e.getHeight();function n(y,b){return function(){Nn(y,b)}}for(var i=0;i<this._labelList.length;i++){var o=this._labelList[i],s=o.label,l=s.__hostTarget,u=o.defaultAttr,v=void 0;nt(o.layoutOption)?v=o.layoutOption(sv(o,l)):v=o.layoutOption,v=v||{},o.computedLayoutOption=v;var h=Math.PI/180;l&&l.setTextConfig({local:!1,position:v.x!=null||v.y!=null?null:u.attachedPos,rotation:v.rotate!=null?v.rotate*h:u.attachedRot,offset:[v.dx||0,v.dy||0]});var f=!1;if(v.x!=null?(s.x=B(v.x,t),s.setStyle("x",0),f=!0):(s.x=u.x,s.setStyle("x",u.style.x)),v.y!=null?(s.y=B(v.y,a),s.setStyle("y",0),f=!0):(s.y=u.y,s.setStyle("y",u.style.y)),v.labelLinePoints){var c=l.getTextGuideLine();c&&(c.setShape({points:v.labelLinePoints}),f=!1)}var d=Rr(s);d.needsUpdateLabelLine=f,s.rotation=v.rotate!=null?v.rotate*h:u.rotation,s.scaleX=u.scaleX,s.scaleY=u.scaleY;for(var p=0;p<Yn.length;p++){var g=Yn[p];s.setStyle(g,v[g]!=null?v[g]:u.style[g])}if(v.draggable){if(s.draggable=!0,s.cursor="move",l){var S=o.seriesModel;if(o.dataIndex!=null){var m=o.seriesModel.getData(o.dataType);S=m.getItemModel(o.dataIndex)}s.on("drag",n(l,S.getModel("labelLine")))}}else s.off("drag"),s.cursor=u.cursor}},r.prototype.layout=function(e){var t=e.getWidth(),a=e.getHeight(),n=zs(this._labelList),i=Ct(n,function(l){return l.layoutOption.moveOverlap==="shiftX"}),o=Ct(n,function(l){return l.layoutOption.moveOverlap==="shiftY"});Bs(i,0,t),Os(o,0,a);var s=Ct(n,function(l){return l.layoutOption.hideOverlap});Hs(s)},r.prototype.processLabelsOverall=function(){var e=this;R(this._chartViewList,function(t){var a=t.__model,n=t.ignoreLabelLineUpdate,i=a.isAnimationEnabled();t.group.traverse(function(o){if(o.ignore&&!o.forceLabelAnimation)return!0;var s=!n,l=o.getTextContent();!s&&l&&(s=Rr(l).needsUpdateLabelLine),s&&e._updateLabelLine(o,a),i&&e._animateLabels(o,a)})})},r.prototype._updateLabelLine=function(e,t){var a=e.getTextContent(),n=it(e),i=n.dataIndex;if(a&&i!=null){var o=t.getData(n.dataType),s=o.getItemModel(i),l={},u=o.getItemVisual(i,"style");if(u){var v=o.getVisual("drawType");l.stroke=u[v]}var h=s.getModel("labelLine");yo(e,mo(s),l),Nn(e,h)}},r.prototype._animateLabels=function(e,t){var a=e.getTextContent(),n=e.getTextGuideLine();if(a&&(e.forceLabelAnimation||!a.ignore&&!a.invisible&&!e.disableLabelAnimation&&!Fs(e))){var i=Rr(a),o=i.oldLayout,s=it(e),l=s.dataIndex,u={x:a.x,y:a.y,rotation:a.rotation},v=t.getData(s.dataType);if(o){a.attr(o);var f=e.prevStates;f&&(wt(f,"select")>=0&&a.attr(i.oldLayoutSelect),wt(f,"emphasis")>=0&&a.attr(i.oldLayoutEmphasis)),ot(a,u,t,l)}else if(a.attr(u),!Ws(a).valueAnimation){var h=$t(a.style.opacity,1);a.style.opacity=0,It(a,{style:{opacity:h}},t,l)}if(i.oldLayout=u,a.states.select){var c=i.oldLayoutSelect={};Ye(c,u,Xe),Ye(c,a.states.select,Xe)}if(a.states.emphasis){var d=i.oldLayoutEmphasis={};Ye(d,u,Xe),Ye(d,a.states.emphasis,Xe)}So(a,l,v,t,t)}if(n&&!n.ignore&&!n.invisible){var i=lv(n),o=i.oldLayout,p={points:n.shape.points};o?(n.attr({shape:o}),ot(n,{shape:p},t)):(n.setShape(p),n.style.strokePercent=0,It(n,{style:{strokePercent:1}},t)),i.oldLayout=p}},r}(),Vr=Lt();function vv(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,a){var n=Vr(t).labelManager;n||(n=Vr(t).labelManager=new uv),n.clearLabels()}),r.registerUpdateLifecycle("series:layoutlabels",function(e,t,a){var n=Vr(t).labelManager;a.updatedSeries.forEach(function(i){n.addLabelsOfSeries(t.getViewOfSeriesModel(i))}),n.updateLayoutConfig(t),n.layout(t),n.processLabelsOverall()})}function hv(r){var e=r;e.hierNode={defaultAncestor:null,ancestor:e,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var t=[e],a,n;a=t.pop();)if(n=a.children,a.isExpand&&n.length)for(var i=n.length,o=i-1;o>=0;o--){var s=n[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},t.push(s)}}function fv(r,e){var t=r.isExpand?r.children:[],a=r.parentNode.children,n=r.hierNode.i?a[r.hierNode.i-1]:null;if(t.length){dv(r);var i=(t[0].hierNode.prelim+t[t.length-1].hierNode.prelim)/2;n?(r.hierNode.prelim=n.hierNode.prelim+e(r,n),r.hierNode.modifier=r.hierNode.prelim-i):r.hierNode.prelim=i}else n&&(r.hierNode.prelim=n.hierNode.prelim+e(r,n));r.parentNode.hierNode.defaultAncestor=gv(r,n,r.parentNode.hierNode.defaultAncestor||a[0],e)}function cv(r){var e=r.hierNode.prelim+r.parentNode.hierNode.modifier;r.setLayout({x:e},!0),r.hierNode.modifier+=r.parentNode.hierNode.modifier}function Xn(r){return arguments.length?r:Sv}function Le(r,e){return r-=Math.PI/2,{x:e*Math.cos(r),y:e*Math.sin(r)}}function pv(r,e){return ge(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function dv(r){for(var e=r.children,t=e.length,a=0,n=0;--t>=0;){var i=e[t];i.hierNode.prelim+=a,i.hierNode.modifier+=a,n+=i.hierNode.change,a+=i.hierNode.shift+n}}function gv(r,e,t,a){if(e){for(var n=r,i=r,o=i.parentNode.children[0],s=e,l=n.hierNode.modifier,u=i.hierNode.modifier,v=o.hierNode.modifier,h=s.hierNode.modifier;s=kr(s),i=Gr(i),s&&i;){n=kr(n),o=Gr(o),n.hierNode.ancestor=r;var f=s.hierNode.prelim+h-i.hierNode.prelim-u+a(s,i);f>0&&(mv(yv(s,r,t),r,f),u+=f,l+=f),h+=s.hierNode.modifier,u+=i.hierNode.modifier,l+=n.hierNode.modifier,v+=o.hierNode.modifier}s&&!kr(n)&&(n.hierNode.thread=s,n.hierNode.modifier+=h-l),i&&!Gr(o)&&(o.hierNode.thread=i,o.hierNode.modifier+=u-v,t=r)}return t}function kr(r){var e=r.children;return e.length&&r.isExpand?e[e.length-1]:r.hierNode.thread}function Gr(r){var e=r.children;return e.length&&r.isExpand?e[0]:r.hierNode.thread}function yv(r,e,t){return r.hierNode.ancestor.parentNode===e.parentNode?r.hierNode.ancestor:t}function mv(r,e,t){var a=t/(e.hierNode.i-r.hierNode.i);e.hierNode.change-=a,e.hierNode.shift+=t,e.hierNode.modifier+=t,e.hierNode.prelim+=t,r.hierNode.change+=a}function Sv(r,e){return r.parentNode===e.parentNode?1:2}var _v=function(){function r(){this.parentPoint=[],this.childPoints=[]}return r}(),bv=function(r){k(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new _v},e.prototype.buildPath=function(t,a){var n=a.childPoints,i=n.length,o=a.parentPoint,s=n[0],l=n[i-1];if(i===1){t.moveTo(o[0],o[1]),t.lineTo(s[0],s[1]);return}var u=a.orient,v=u==="TB"||u==="BT"?0:1,h=1-v,f=B(a.forkPosition,1),c=[];c[v]=o[v],c[h]=o[h]+(l[h]-o[h])*f,t.moveTo(o[0],o[1]),t.lineTo(c[0],c[1]),t.moveTo(s[0],s[1]),c[v]=s[v],t.lineTo(c[0],c[1]),c[v]=l[v],t.lineTo(c[0],c[1]),t.lineTo(l[0],l[1]);for(var d=1;d<i-1;d++){var p=n[d];t.moveTo(p[0],p[1]),c[v]=p[v],t.lineTo(c[0],c[1])}},e}(yt),xv=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._mainGroup=new rt,t}return e.prototype.init=function(t,a){this._controller=new Oa(a.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},e.prototype.render=function(t,a,n){var i=t.getData(),o=t.layoutInfo,s=this._mainGroup,l=t.get("layout");l==="radial"?(s.x=o.x+o.width/2,s.y=o.y+o.height/2):(s.x=o.x,s.y=o.y),this._updateViewCoordSys(t,n),this._updateController(t,a,n);var u=this._data;i.diff(u).add(function(v){qn(i,v)&&Kn(i,v,null,s,t)}).update(function(v,h){var f=u.getItemGraphicEl(h);if(!qn(i,v)){f&&Qn(u,h,f,s,t);return}Kn(i,v,f,s,t)}).remove(function(v){var h=u.getItemGraphicEl(v);h&&Qn(u,v,h,s,t)}).execute(),this._nodeScaleRatio=t.get("nodeScaleRatio"),this._updateNodeAndLinkScale(t),t.get("expandAndCollapse")===!0&&i.eachItemGraphicEl(function(v,h){v.off("click").on("click",function(){n.dispatchAction({type:"treeExpandAndCollapse",seriesId:t.id,dataIndex:h})})}),this._data=i},e.prototype._updateViewCoordSys=function(t,a){var n=t.getData(),i=[];n.each(function(h){var f=n.getItemLayout(h);f&&!isNaN(f.x)&&!isNaN(f.y)&&i.push([+f.x,+f.y])});var o=[],s=[];br(i,o,s);var l=this._min,u=this._max;s[0]-o[0]===0&&(o[0]=l?l[0]:o[0]-1,s[0]=u?u[0]:s[0]+1),s[1]-o[1]===0&&(o[1]=l?l[1]:o[1]-1,s[1]=u?u[1]:s[1]+1);var v=t.coordinateSystem=new Ha;v.zoomLimit=t.get("scaleLimit"),v.setBoundingRect(o[0],o[1],s[0]-o[0],s[1]-o[1]),v.setCenter(t.get("center"),a),v.setZoom(t.get("zoom")),this.group.attr({x:v.x,y:v.y,scaleX:v.scaleX,scaleY:v.scaleY}),this._min=o,this._max=s},e.prototype._updateController=function(t,a,n){var i=this,o=this._controller,s=this._controllerHost,l=this.group;o.setPointerChecker(function(u,v,h){var f=l.getBoundingRect();return f.applyTransform(l.transform),f.contain(v,h)&&!bo(u,n,t)}),o.enable(t.get("roam")),s.zoomLimit=t.get("scaleLimit"),s.zoom=t.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",function(u){xo(s,u.dx,u.dy),n.dispatchAction({seriesId:t.id,type:"treeRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){Io(s,u.scale,u.originX,u.originY),n.dispatchAction({seriesId:t.id,type:"treeRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),i._updateNodeAndLinkScale(t),n.updateLabelLayout()})},e.prototype._updateNodeAndLinkScale=function(t){var a=t.getData(),n=this._getNodeGlobalScale(t);a.eachItemGraphicEl(function(i,o){i.setSymbolScale(n)})},e.prototype._getNodeGlobalScale=function(t){var a=t.coordinateSystem;if(a.type!=="view")return 1;var n=this._nodeScaleRatio,i=a.scaleX||1,o=a.getZoom(),s=(o-1)*n+1;return s/i},e.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype.remove=function(){this._mainGroup.removeAll(),this._data=null},e.type="tree",e}(ht);function qn(r,e){var t=r.getItemLayout(e);return t&&!isNaN(t.x)&&!isNaN(t.y)}function Kn(r,e,t,a,n){var i=!t,o=r.tree.getNodeByDataIndex(e),s=o.getModel(),l=o.getVisual("style").fill,u=o.isExpand===!1&&o.children.length!==0?l:"#fff",v=r.tree.root,h=o.parentNode===v?o:o.parentNode||o,f=r.getItemGraphicEl(h.dataIndex),c=h.getLayout(),d=f?{x:f.__oldX,y:f.__oldY,rawX:f.__radialOldRawX,rawY:f.__radialOldRawY}:c,p=o.getLayout();i?(t=new wo(r,e,null,{symbolInnerColor:u,useNameLabel:!0}),t.x=d.x,t.y=d.y):t.updateData(r,e,null,{symbolInnerColor:u,useNameLabel:!0}),t.__radialOldRawX=t.__radialRawX,t.__radialOldRawY=t.__radialRawY,t.__radialRawX=p.rawX,t.__radialRawY=p.rawY,a.add(t),r.setItemGraphicEl(e,t),t.__oldX=t.x,t.__oldY=t.y,ot(t,{x:p.x,y:p.y},n);var g=t.getSymbolPath();if(n.get("layout")==="radial"){var S=v.children[0],m=S.getLayout(),y=S.children.length,b=void 0,_=void 0;if(p.x===m.x&&o.isExpand===!0&&S.children.length){var x={x:(S.children[0].getLayout().x+S.children[y-1].getLayout().x)/2,y:(S.children[0].getLayout().y+S.children[y-1].getLayout().y)/2};b=Math.atan2(x.y-m.y,x.x-m.x),b<0&&(b=Math.PI*2+b),_=x.x<m.x,_&&(b=b-Math.PI)}else b=Math.atan2(p.y-m.y,p.x-m.x),b<0&&(b=Math.PI*2+b),o.children.length===0||o.children.length!==0&&o.isExpand===!1?(_=p.x<m.x,_&&(b=b-Math.PI)):(_=p.x>m.x,_||(b=b-Math.PI));var I=_?"left":"right",w=s.getModel("label"),L=w.get("rotate"),D=L*(Math.PI/180),T=g.getTextContent();T&&(g.setTextConfig({position:w.get("position")||I,rotation:L==null?-b:D,origin:"center"}),T.setStyle("verticalAlign","middle"))}var A=s.get(["emphasis","focus"]),P=A==="relative"?ir(o.getAncestorsIndices(),o.getDescendantIndices()):A==="ancestor"?o.getAncestorsIndices():A==="descendant"?o.getDescendantIndices():null;P&&(it(t).focus=P),Iv(n,o,v,t,d,c,p,a),t.__edge&&(t.onHoverStateChange=function(C){if(C!=="blur"){var M=o.parentNode&&r.getItemGraphicEl(o.parentNode.dataIndex);M&&M.hoverState===Us||$s(t.__edge,C)}})}function Iv(r,e,t,a,n,i,o,s){var l=e.getModel(),u=r.get("edgeShape"),v=r.get("layout"),h=r.getOrient(),f=r.get(["lineStyle","curveness"]),c=r.get("edgeForkPosition"),d=l.getModel("lineStyle").getLineStyle(),p=a.__edge;if(u==="curve")e.parentNode&&e.parentNode!==t&&(p||(p=a.__edge=new Lo({shape:La(v,h,f,n,n)})),ot(p,{shape:La(v,h,f,i,o)},r));else if(u==="polyline"&&v==="orthogonal"&&e!==t&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var g=e.children,S=[],m=0;m<g.length;m++){var y=g[m].getLayout();S.push([y.x,y.y])}p||(p=a.__edge=new bv({shape:{parentPoint:[o.x,o.y],childPoints:[[o.x,o.y]],orient:h,forkPosition:c}})),ot(p,{shape:{parentPoint:[o.x,o.y],childPoints:S}},r)}p&&!(u==="polyline"&&!e.isExpand)&&(p.useStyle(gt({strokeNoScale:!0,fill:null},d)),Pt(p,l,"lineStyle"),or(p),s.add(p))}function jn(r,e,t,a,n){var i=e.tree.root,o=Zo(i,r),s=o.source,l=o.sourceLayout,u=e.getItemGraphicEl(r.dataIndex);if(u){var v=e.getItemGraphicEl(s.dataIndex),h=v.__edge,f=u.__edge||(s.isExpand===!1||s.children.length===1?h:void 0),c=a.get("edgeShape"),d=a.get("layout"),p=a.get("orient"),g=a.get(["lineStyle","curveness"]);f&&(c==="curve"?ga(f,{shape:La(d,p,g,l,l),style:{opacity:0}},a,{cb:function(){t.remove(f)},removeOpt:n}):c==="polyline"&&a.get("layout")==="orthogonal"&&ga(f,{shape:{parentPoint:[l.x,l.y],childPoints:[[l.x,l.y]]},style:{opacity:0}},a,{cb:function(){t.remove(f)},removeOpt:n}))}}function Zo(r,e){for(var t=e.parentNode===r?e:e.parentNode||e,a;a=t.getLayout(),a==null;)t=t.parentNode===r?t:t.parentNode||t;return{source:t,sourceLayout:a}}function Qn(r,e,t,a,n){var i=r.tree.getNodeByDataIndex(e),o=r.tree.root,s=Zo(o,i).sourceLayout,l={duration:n.get("animationDurationUpdate"),easing:n.get("animationEasingUpdate")};ga(t,{x:s.x+1,y:s.y+1},n,{cb:function(){a.remove(t),r.setItemGraphicEl(e,null)},removeOpt:l}),t.fadeOut(null,r.hostModel,{fadeLabel:!0,animation:l}),i.children.forEach(function(u){jn(u,r,a,n,l)}),jn(i,r,a,n,l)}function La(r,e,t,a,n){var i,o,s,l,u,v,h,f;if(r==="radial"){u=a.rawX,h=a.rawY,v=n.rawX,f=n.rawY;var c=Le(u,h),d=Le(u,h+(f-h)*t),p=Le(v,f+(h-f)*t),g=Le(v,f);return{x1:c.x||0,y1:c.y||0,x2:g.x||0,y2:g.y||0,cpx1:d.x||0,cpy1:d.y||0,cpx2:p.x||0,cpy2:p.y||0}}else u=a.x,h=a.y,v=n.x,f=n.y,(e==="LR"||e==="RL")&&(i=u+(v-u)*t,o=h,s=v+(u-v)*t,l=f),(e==="TB"||e==="BT")&&(i=u,o=h+(f-h)*t,s=v,l=f+(h-f)*t);return{x1:u,y1:h,x2:v,y2:f,cpx1:i,cpy1:o,cpx2:s,cpy2:l}}var xt=Lt();function Yo(r){var e=r.mainData,t=r.datas;t||(t={main:e},r.datasAttr={main:"data"}),r.datas=r.mainData=null,Xo(e,t,r),R(t,function(a){R(e.TRANSFERABLE_METHODS,function(n){a.wrapMethod(n,et(wv,r))})}),e.wrapMethod("cloneShallow",et(Dv,r)),R(e.CHANGABLE_METHODS,function(a){e.wrapMethod(a,et(Lv,r))}),Zs(t[e.dataType]===e)}function wv(r,e){if(Cv(this)){var t=U({},xt(this).datas);t[this.dataType]=e,Xo(e,t,r)}else un(e,this.dataType,xt(this).mainData,r);return e}function Lv(r,e){return r.struct&&r.struct.update(),e}function Dv(r,e){return R(xt(e).datas,function(t,a){t!==e&&un(t.cloneShallow(),a,e,r)}),e}function Tv(r){var e=xt(this).mainData;return r==null||e==null?e:xt(e).datas[r]}function Av(){var r=xt(this).mainData;return r==null?[{data:r}]:W(Ba(xt(r).datas),function(e){return{type:e,data:xt(r).datas[e]}})}function Cv(r){return xt(r).mainData===r}function Xo(r,e,t){xt(r).datas={},R(e,function(a,n){un(a,n,r,t)})}function un(r,e,t,a){xt(t).datas[e]=r,xt(r).mainData=t,r.dataType=e,a.struct&&(r[a.structAttr]=a.struct,a.struct[a.datasAttr[e]]=r),r.getLinkedData=Tv,r.getLinkedDataAll=Av}var Mv=function(){function r(e,t){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=e||"",this.hostTree=t}return r.prototype.isRemoved=function(){return this.dataIndex<0},r.prototype.eachNode=function(e,t,a){nt(e)&&(a=t,t=e,e=null),e=e||{},St(e)&&(e={order:e});var n=e.order||"preorder",i=this[e.attr||"children"],o;n==="preorder"&&(o=t.call(a,this));for(var s=0;!o&&s<i.length;s++)i[s].eachNode(e,t,a);n==="postorder"&&t.call(a,this)},r.prototype.updateDepthAndHeight=function(e){var t=0;this.depth=e;for(var a=0;a<this.children.length;a++){var n=this.children[a];n.updateDepthAndHeight(e+1),n.height>t&&(t=n.height)}this.height=t+1},r.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,a=this.children,n=a.length;t<n;t++){var i=a[t].getNodeById(e);if(i)return i}},r.prototype.contains=function(e){if(e===this)return!0;for(var t=0,a=this.children,n=a.length;t<n;t++){var i=a[t].contains(e);if(i)return i}},r.prototype.getAncestors=function(e){for(var t=[],a=e?this:this.parentNode;a;)t.push(a),a=a.parentNode;return t.reverse(),t},r.prototype.getAncestorsIndices=function(){for(var e=[],t=this;t;)e.push(t.dataIndex),t=t.parentNode;return e.reverse(),e},r.prototype.getDescendantIndices=function(){var e=[];return this.eachNode(function(t){e.push(t.dataIndex)}),e},r.prototype.getValue=function(e){var t=this.hostTree.data;return t.getStore().get(t.getDimensionIndex(e||"value"),this.dataIndex)},r.prototype.setLayout=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},r.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostTree,a=t.data.getItemModel(this.dataIndex);return a.getModel(e)}},r.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},r.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},r.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},r.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},r.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},r.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,t=0;t<e.length;++t)if(e[t]===this)return t;return-1}return-1},r.prototype.isAncestorOf=function(e){for(var t=e.parentNode;t;){if(t===this)return!0;t=t.parentNode}return!1},r.prototype.isDescendantOf=function(e){return e!==this&&e.isAncestorOf(this)},r}(),vn=function(){function r(e){this.type="tree",this._nodes=[],this.hostModel=e}return r.prototype.eachNode=function(e,t,a){this.root.eachNode(e,t,a)},r.prototype.getNodeByDataIndex=function(e){var t=this.data.getRawIndex(e);return this._nodes[t]},r.prototype.getNodeById=function(e){return this.root.getNodeById(e)},r.prototype.update=function(){for(var e=this.data,t=this._nodes,a=0,n=t.length;a<n;a++)t[a].dataIndex=-1;for(var a=0,n=e.count();a<n;a++)t[e.getRawIndex(a)].dataIndex=a},r.prototype.clearLayouts=function(){this.data.clearItemLayouts()},r.createTree=function(e,t,a){var n=new r(t),i=[],o=1;s(e);function s(v,h){var f=v.value;o=Math.max(o,F(f)?f.length:1),i.push(v);var c=new Mv(xr(v.name,""),n);h?Pv(c,h):n.root=c,n._nodes.push(c);var d=v.children;if(d)for(var p=0;p<d.length;p++)s(d[p],c)}n.root.updateDepthAndHeight(0);var l=Fa(i,{coordDimensions:["value"],dimensionsCount:o}).dimensions,u=new bt(l,t);return u.initData(i),a&&a(u),Yo({mainData:u,struct:n,structAttr:"tree"}),n.update(),n},r}();function Pv(r,e){var t=e.children;r.parentNode!==e&&(t.push(r),r.parentNode=e)}function Ve(r,e,t){if(r&&wt(e,r.type)>=0){var a=t.getData().tree.root,n=r.targetNode;if(St(n)&&(n=a.getNodeById(n)),n&&a.contains(n))return{node:n};var i=r.targetNodeId;if(i!=null&&(n=a.getNodeById(i)))return{node:n}}}function qo(r){for(var e=[];r;)r=r.parentNode,r&&e.push(r);return e.reverse()}function hn(r,e){var t=qo(r);return wt(t,e)>=0}function Ar(r,e){for(var t=[];r;){var a=r.dataIndex;t.push({name:r.name,dataIndex:a,value:e.getRawValue(a)}),r=r.parentNode}return t.reverse(),t}var Ev=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.hasSymbolVisual=!0,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t){var a={name:t.name,children:t.data},n=t.leaves||{},i=new jt(n,this,this.ecModel),o=vn.createTree(a,this,s);function s(h){h.wrapMethod("getItemModel",function(f,c){var d=o.getNodeByDataIndex(c);return d&&d.children.length&&d.isExpand||(f.parentModel=i),f})}var l=0;o.eachNode("preorder",function(h){h.depth>l&&(l=h.depth)});var u=t.expandAndCollapse,v=u&&t.initialTreeDepth>=0?t.initialTreeDepth:l;return o.root.eachNode("preorder",function(h){var f=h.hostTree.data.getRawDataItem(h.dataIndex);h.isExpand=f&&f.collapsed!=null?!f.collapsed:h.depth<=v}),o.data},e.prototype.getOrient=function(){var t=this.get("orient");return t==="horizontal"?t="LR":t==="vertical"&&(t="TB"),t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.formatTooltip=function(t,a,n){for(var i=this.getData().tree,o=i.root.children[0],s=i.getNodeByDataIndex(t),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return Ot("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},e.prototype.getDataParams=function(t){var a=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return a.treeAncestors=Ar(n,this),a.collapsed=!n.isExpand,a},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(ft);function Nv(r,e,t){for(var a=[r],n=[],i;i=a.pop();)if(n.push(i),i.isExpand){var o=i.children;if(o.length)for(var s=0;s<o.length;s++)a.push(o[s])}for(;i=n.pop();)e(i,t)}function _e(r,e){for(var t=[r],a;a=t.pop();)if(e(a),a.isExpand){var n=a.children;if(n.length)for(var i=n.length-1;i>=0;i--)t.push(n[i])}}function Rv(r,e){r.eachSeriesByType("tree",function(t){Vv(t,e)})}function Vv(r,e){var t=pv(r,e);r.layoutInfo=t;var a=r.get("layout"),n=0,i=0,o=null;a==="radial"?(n=2*Math.PI,i=Math.min(t.height,t.width)/2,o=Xn(function(y,b){return(y.parentNode===b.parentNode?1:2)/y.depth})):(n=t.width,i=t.height,o=Xn());var s=r.getData().tree.root,l=s.children[0];if(l){hv(s),Nv(l,fv,o),s.hierNode.modifier=-l.hierNode.prelim,_e(l,cv);var u=l,v=l,h=l;_e(l,function(y){var b=y.getLayout().x;b<u.getLayout().x&&(u=y),b>v.getLayout().x&&(v=y),y.depth>h.depth&&(h=y)});var f=u===v?1:o(u,v)/2,c=f-u.getLayout().x,d=0,p=0,g=0,S=0;if(a==="radial")d=n/(v.getLayout().x+f+c),p=i/(h.depth-1||1),_e(l,function(y){g=(y.getLayout().x+c)*d,S=(y.depth-1)*p;var b=Le(g,S);y.setLayout({x:b.x,y:b.y,rawX:g,rawY:S},!0)});else{var m=r.getOrient();m==="RL"||m==="LR"?(p=i/(v.getLayout().x+f+c),d=n/(h.depth-1||1),_e(l,function(y){S=(y.getLayout().x+c)*p,g=m==="LR"?(y.depth-1)*d:n-(y.depth-1)*d,y.setLayout({x:g,y:S},!0)})):(m==="TB"||m==="BT")&&(d=n/(v.getLayout().x+f+c),p=i/(h.depth-1||1),_e(l,function(y){g=(y.getLayout().x+c)*d,S=m==="TB"?(y.depth-1)*p:i-(y.depth-1)*p,y.setLayout({x:g,y:S},!0)}))}}}function kv(r){r.eachSeriesByType("tree",function(e){var t=e.getData(),a=t.tree;a.eachNode(function(n){var i=n.getModel(),o=i.getModel("itemStyle").getItemStyle(),s=t.ensureUniqueItemVisual(n.dataIndex,"style");U(s,o)})})}function Gv(r){r.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},function(a){var n=e.dataIndex,i=a.getData().tree,o=i.getNodeByDataIndex(n);o.isExpand=!o.isExpand})}),r.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(e,t,a){t.eachComponent({mainType:"series",subType:"tree",query:e},function(n){var i=n.coordinateSystem,o=Do(i,e,void 0,a);n.setCenter&&n.setCenter(o.center),n.setZoom&&n.setZoom(o.zoom)})})}function zv(r){r.registerChartView(xv),r.registerSeriesModel(Ev),r.registerLayout(Rv),r.registerVisual(kv),Gv(r)}var Jn=["treemapZoomToNode","treemapRender","treemapMove"];function Bv(r){for(var e=0;e<Jn.length;e++)r.registerAction({type:Jn[e],update:"updateView"},Me);r.registerAction({type:"treemapRootToNode",update:"updateView"},function(t,a){a.eachComponent({mainType:"series",subType:"treemap",query:t},n);function n(i,o){var s=["treemapZoomToNode","treemapRootToNode"],l=Ve(t,s,i);if(l){var u=i.getViewRoot();u&&(t.direction=hn(u,l.node)?"rollUp":"drillDown"),i.resetViewRoot(l.node)}}})}function Ko(r){var e=r.getData(),t=e.tree,a={};t.eachNode(function(n){for(var i=n;i&&i.depth>1;)i=i.parentNode;var o=Ys(r.ecModel,i.name||i.dataIndex+"",a);n.setVisual("decal",o)})}var Ov=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.preventUsingHoverLayer=!0,t}return e.prototype.getInitialData=function(t,a){var n={name:t.name,children:t.data};jo(n);var i=t.levels||[],o=this.designatedVisualItemStyle={},s=new jt({itemStyle:o},this,a);i=t.levels=Hv(i,a);var l=W(i||[],function(h){return new jt(h,s,a)},this),u=vn.createTree(n,this,v);function v(h){h.wrapMethod("getItemModel",function(f,c){var d=u.getNodeByDataIndex(c),p=d?l[d.depth]:null;return f.parentModel=p||s,f})}return u.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,a,n){var i=this.getData(),o=this.getRawValue(t),s=i.getName(t);return Ot("nameValue",{name:s,value:o})},e.prototype.getDataParams=function(t){var a=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return a.treeAncestors=Ar(n,this),a.treePathInfo=a.treeAncestors,a},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},U(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var a=this._idIndexMap;a||(a=this._idIndexMap=mt(),this._idIndexMapCount=0);var n=a.get(t);return n==null&&a.set(t,n=this._idIndexMapCount++),n},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var a=this.getRawData().tree.root;(!t||t!==a&&!a.contains(t))&&(this._viewRoot=a)},e.prototype.enableAriaDecal=function(){Ko(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.32*.32,scaleLimit:null,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}},emphasis:{itemStyle:{color:"rgba(0,0,0,0.9)"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e}(ft);function jo(r){var e=0;R(r.children,function(a){jo(a);var n=a.value;F(n)&&(n=n[0]),e+=n});var t=r.value;F(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),F(r.value)?r.value[0]=t:r.value=t}function Hv(r,e){var t=Gt(e.get("color")),a=Gt(e.get(["aria","decal","decals"]));if(t){r=r||[];var n,i;R(r,function(s){var l=new jt(s),u=l.get("color"),v=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(n=!0),(l.get(["itemStyle","decal"])||v&&v!=="none")&&(i=!0)});var o=r[0]||(r[0]={});return n||(o.color=t.slice()),!i&&a&&(o.decal=a.slice()),r}}var Fv=8,ti=8,zr=5,Wv=function(){function r(e){this.group=new rt,e.add(this.group)}return r.prototype.render=function(e,t,a,n){var i=e.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!i.get("show")||!a)){var s=i.getModel("itemStyle"),l=i.getModel("emphasis"),u=s.getModel("textStyle"),v=l.getModel(["itemStyle","textStyle"]),h={pos:{left:i.get("left"),right:i.get("right"),top:i.get("top"),bottom:i.get("bottom")},box:{width:t.getWidth(),height:t.getHeight()},emptyItemWidth:i.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(a,h,u),this._renderContent(e,h,s,l,u,v,n),Xs(o,h.pos,h.box)}},r.prototype._prepare=function(e,t,a){for(var n=e;n;n=n.parentNode){var i=xr(n.getModel().get("name"),""),o=a.getTextRect(i),s=Math.max(o.width+Fv*2,t.emptyItemWidth);t.totalWidth+=s+ti,t.renderList.push({node:n,text:i,width:s})}},r.prototype._renderContent=function(e,t,a,n,i,o,s){for(var l=0,u=t.emptyItemWidth,v=e.get(["breadcrumb","height"]),h=qs(t.pos,t.box),f=t.totalWidth,c=t.renderList,d=n.getModel("itemStyle").getItemStyle(),p=c.length-1;p>=0;p--){var g=c[p],S=g.node,m=g.width,y=g.text;f>h.width&&(f-=m-u,m=u,y=null);var b=new Pe({shape:{points:Uv(l,0,m,v,p===c.length-1,p===0)},style:gt(a.getItemStyle(),{lineJoin:"bevel"}),textContent:new Zt({style:kt(i,{text:y})}),textConfig:{position:"inside"},z2:Ir*1e4,onclick:et(s,S)});b.disableLabelAnimation=!0,b.getTextContent().ensureState("emphasis").style=kt(o,{text:y}),b.ensureState("emphasis").style=d,st(b,n.get("focus"),n.get("blurScope"),n.get("disabled")),this.group.add(b),$v(b,e,S),l+=m+ti}},r.prototype.remove=function(){this.group.removeAll()},r}();function Uv(r,e,t,a,n,i){var o=[[n?r:r-zr,e],[r+t,e],[r+t,e+a],[n?r:r-zr,e+a]];return!i&&o.splice(2,0,[r+t+zr,e+a/2]),!n&&o.push([r,e+a/2]),o}function $v(r,e,t){it(r).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:t&&t.dataIndex,name:t&&t.name},treePathInfo:t&&Ar(t,e)}}var Zv=function(){function r(){this._storage=[],this._elExistsMap={}}return r.prototype.add=function(e,t,a,n,i){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:a,delay:n,easing:i}),!0)},r.prototype.finished=function(e){return this._finishedCallback=e,this},r.prototype.start=function(){for(var e=this,t=this._storage.length,a=function(){t--,t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},n=0,i=this._storage.length;n<i;n++){var o=this._storage[n];o.el.animateTo(o.target,{duration:o.duration,delay:o.delay,easing:o.easing,setToFinal:!0,done:a,aborted:a})}return this},r}();function Yv(){return new Zv}var Da=rt,ei=Jt,ri=3,ai="label",ni="upperLabel",Xv=Ir*10,qv=Ir*2,Kv=Ir*3,ae=Ks([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),ii=function(r){var e=ae(r);return e.stroke=e.fill=e.lineWidth=null,e},vr=Lt(),jv=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._state="ready",t._storage=be(),t}return e.prototype.render=function(t,a,n,i){var o=a.findComponents({mainType:"series",subType:"treemap",query:i});if(!(wt(o,t)<0)){this.seriesModel=t,this.api=n,this.ecModel=a;var s=["treemapZoomToNode","treemapRootToNode"],l=Ve(i,s,t),u=i&&i.type,v=t.layoutInfo,h=!this._oldTree,f=this._storage,c=u==="treemapRootToNode"&&l&&f?{rootNodeGroup:f.nodeGroup[l.node.getRawIndex()],direction:i.direction}:null,d=this._giveContainerGroup(v),p=t.get("animation"),g=this._doRender(d,t,c);p&&!h&&(!u||u==="treemapZoomToNode"||u==="treemapRootToNode")?this._doAnimation(d,g,t,c):g.renderFinally(),this._resetController(n),this._renderBreadcrumb(t,n,l)}},e.prototype._giveContainerGroup=function(t){var a=this._containerGroup;return a||(a=this._containerGroup=new Da,this._initEvents(a),this.group.add(a)),a.x=t.x,a.y=t.y,a},e.prototype._doRender=function(t,a,n){var i=a.getData().tree,o=this._oldTree,s=be(),l=be(),u=this._storage,v=[];function h(m,y,b,_){return Qv(a,l,u,n,s,v,m,y,b,_)}p(i.root?[i.root]:[],o&&o.root?[o.root]:[],t,i===o||!o,0);var f=g(u);if(this._oldTree=i,this._storage=l,this._controllerHost){var c=this.seriesModel.layoutInfo,d=i.root.getLayout();d.width===c.width&&d.height===c.height&&(this._controllerHost.zoom=1)}return{lastsForAnimation:s,willDeleteEls:f,renderFinally:S};function p(m,y,b,_,x){_?(y=m,R(m,function(L,D){!L.isRemoved()&&w(D,D)})):new de(y,m,I,I).add(w).update(w).remove(et(w,null)).execute();function I(L){return L.getId()}function w(L,D){var T=L!=null?m[L]:null,A=D!=null?y[D]:null,P=h(T,A,b,x);P&&p(T&&T.viewChildren||[],A&&A.viewChildren||[],P,_,x+1)}}function g(m){var y=be();return m&&R(m,function(b,_){var x=y[_];R(b,function(I){I&&(x.push(I),vr(I).willDelete=!0)})}),y}function S(){R(f,function(m){R(m,function(y){y.parent&&y.parent.remove(y)})}),R(v,function(m){m.invisible=!0,m.dirty()})}},e.prototype._doAnimation=function(t,a,n,i){var o=n.get("animationDurationUpdate"),s=n.get("animationEasing"),l=(nt(o)?0:o)||0,u=(nt(s)?null:s)||"cubicOut",v=Yv();R(a.willDeleteEls,function(h,f){R(h,function(c,d){if(!c.invisible){var p=c.parent,g,S=vr(p);if(i&&i.direction==="drillDown")g=p===i.rootNodeGroup?{shape:{x:0,y:0,width:S.nodeWidth,height:S.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var m=0,y=0;S.willDelete||(m=S.nodeWidth/2,y=S.nodeHeight/2),g=f==="nodeGroup"?{x:m,y,style:{opacity:0}}:{shape:{x:m,y,width:0,height:0},style:{opacity:0}}}g&&v.add(c,g,l,0,u)}})}),R(this._storage,function(h,f){R(h,function(c,d){var p=a.lastsForAnimation[f][d],g={};p&&(c instanceof rt?p.oldX!=null&&(g.x=c.x,g.y=c.y,c.x=p.oldX,c.y=p.oldY):(p.oldShape&&(g.shape=U({},c.shape),c.setShape(p.oldShape)),p.fadein?(c.setStyle("opacity",0),g.style={opacity:1}):c.style.opacity!==1&&(g.style={opacity:1})),v.add(c,g,l,0,u))})},this),this._state="animating",v.finished(lt(function(){this._state="ready",a.renderFinally()},this)).start()},e.prototype._resetController=function(t){var a=this._controller,n=this._controllerHost;n||(this._controllerHost={target:this.group},n=this._controllerHost),a||(a=this._controller=new Oa(t.getZr()),a.enable(this.seriesModel.get("roam")),n.zoomLimit=this.seriesModel.get("scaleLimit"),n.zoom=this.seriesModel.get("zoom"),a.on("pan",lt(this._onPan,this)),a.on("zoom",lt(this._onZoom,this)));var i=new dt(0,0,t.getWidth(),t.getHeight());a.setPointerChecker(function(o,s,l){return i.contain(s,l)})},e.prototype._clearController=function(){var t=this._controller;this._controllerHost=null,t&&(t.dispose(),t=null)},e.prototype._onPan=function(t){if(this._state!=="animating"&&(Math.abs(t.dx)>ri||Math.abs(t.dy)>ri)){var a=this.seriesModel.getData().tree.root;if(!a)return;var n=a.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+t.dx,y:n.y+t.dy,width:n.width,height:n.height}})}},e.prototype._onZoom=function(t){var a=t.originX,n=t.originY,i=t.scale;if(this._state!=="animating"){var o=this.seriesModel.getData().tree.root;if(!o)return;var s=o.getLayout();if(!s)return;var l=new dt(s.x,s.y,s.width,s.height),u=null,v=this._controllerHost;u=v.zoomLimit;var h=v.zoom=v.zoom||1;if(h*=i,u){var f=u.min||0,c=u.max||1/0;h=Math.max(Math.min(c,h),f)}var d=h/v.zoom;v.zoom=h;var p=this.seriesModel.layoutInfo;a-=p.x,n-=p.y;var g=Qs();Rn(g,g,[-a,-n]),js(g,g,[d,d]),Rn(g,g,[a,n]),l.applyTransform(g),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:l.x,y:l.y,width:l.width,height:l.height}})}},e.prototype._initEvents=function(t){var a=this;t.on("click",function(n){if(a._state==="ready"){var i=a.seriesModel.get("nodeClick",!0);if(i){var o=a.findTarget(n.offsetX,n.offsetY);if(o){var s=o.node;if(s.getLayout().isLeafRoot)a._rootToNode(o);else if(i==="zoomToNode")a._zoomToNode(o);else if(i==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),v=l.get("target",!0)||"blank";u&&To(u,v)}}}}},this)},e.prototype._renderBreadcrumb=function(t,a,n){var i=this;n||(n=t.get("leafDepth",!0)!=null?{node:t.getViewRoot()}:this.findTarget(a.getWidth()/2,a.getHeight()/2),n||(n={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new Wv(this.group))).render(t,a,n.node,function(o){i._state!=="animating"&&(hn(t.getViewRoot(),o)?i._rootToNode({node:o}):i._zoomToNode({node:o}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=be(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype._rootToNode=function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype.findTarget=function(t,a){var n,i=this.seriesModel.getViewRoot();return i.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(t,a),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)n={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),n},e.type="treemap",e}(ht);function be(){return{nodeGroup:[],background:[],content:[]}}function Qv(r,e,t,a,n,i,o,s,l,u){if(!o)return;var v=o.getLayout(),h=r.getData(),f=o.getModel();if(h.setItemGraphicEl(o.dataIndex,null),!v||!v.isInView)return;var c=v.width,d=v.height,p=v.borderWidth,g=v.invisible,S=o.getRawIndex(),m=s&&s.getRawIndex(),y=o.viewChildren,b=v.upperHeight,_=y&&y.length,x=f.getModel("itemStyle"),I=f.getModel(["emphasis","itemStyle"]),w=f.getModel(["blur","itemStyle"]),L=f.getModel(["select","itemStyle"]),D=x.get("borderRadius")||0,T=q("nodeGroup",Da);if(!T)return;if(l.add(T),T.x=v.x||0,T.y=v.y||0,T.markRedraw(),vr(T).nodeWidth=c,vr(T).nodeHeight=d,v.isAboveViewRoot)return T;var A=q("background",ei,u,qv);A&&O(T,A,_&&v.upperLabelHeight);var P=f.getModel("emphasis"),C=P.get("focus"),M=P.get("blurScope"),E=P.get("disabled"),N=C==="ancestor"?o.getAncestorsIndices():C==="descendant"?o.getDescendantIndices():C;if(_)Vn(T)&&We(T,!1),A&&(We(A,!E),h.setItemGraphicEl(o.dataIndex,A),kn(A,N,M));else{var V=q("content",ei,u,Kv);V&&z(T,V),A.disableMorphing=!0,A&&Vn(A)&&We(A,!1),We(T,!E),h.setItemGraphicEl(o.dataIndex,T);var G=f.getShallow("cursor");G&&V.attr("cursor",G),kn(T,N,M)}return T;function O(Z,H,Q){var j=it(H);if(j.dataIndex=o.dataIndex,j.seriesIndex=r.seriesIndex,H.setShape({x:0,y:0,width:c,height:d,r:D}),g)K(H);else{H.invisible=!1;var tt=o.getVisual("style"),ct=tt.stroke,Dt=ii(x);Dt.fill=ct;var at=ae(I);at.fill=I.get("borderColor");var Tt=ae(w);Tt.fill=w.get("borderColor");var Vt=ae(L);if(Vt.fill=L.get("borderColor"),Q){var se=c-2*p;X(H,ct,tt.opacity,{x:p,y:0,width:se,height:b})}else H.removeTextContent();H.setStyle(Dt),H.ensureState("emphasis").style=at,H.ensureState("blur").style=Tt,H.ensureState("select").style=Vt,or(H)}Z.add(H)}function z(Z,H){var Q=it(H);Q.dataIndex=o.dataIndex,Q.seriesIndex=r.seriesIndex;var j=Math.max(c-2*p,0),tt=Math.max(d-2*p,0);if(H.culling=!0,H.setShape({x:p,y:p,width:j,height:tt,r:D}),g)K(H);else{H.invisible=!1;var ct=o.getVisual("style"),Dt=ct.fill,at=ii(x);at.fill=Dt,at.decal=ct.decal;var Tt=ae(I),Vt=ae(w),se=ae(L);X(H,Dt,ct.opacity,null),H.setStyle(at),H.ensureState("emphasis").style=Tt,H.ensureState("blur").style=Vt,H.ensureState("select").style=se,or(H)}Z.add(H)}function K(Z){!Z.invisible&&i.push(Z)}function X(Z,H,Q,j){var tt=f.getModel(j?ni:ai),ct=xr(f.get("name"),null),Dt=tt.getShallow("show");Qt(Z,Rt(f,j?ni:ai),{defaultText:Dt?ct:null,inheritColor:H,defaultOpacity:Q,labelFetcher:r,labelDataIndex:o.dataIndex});var at=Z.getTextContent();if(at){var Tt=at.style,Vt=Js(Tt.padding||0);j&&(Z.setTextConfig({layoutRect:j}),at.disableLabelLayout=!0),at.beforeUpdate=function(){var Pn=Math.max((j?j.width:Z.shape.width)-Vt[1]-Vt[3],0),En=Math.max((j?j.height:Z.shape.height)-Vt[0]-Vt[2],0);(Tt.width!==Pn||Tt.height!==En)&&at.setStyle({width:Pn,height:En})},Tt.truncateMinChar=2,Tt.lineOverflow="truncate",$(Tt,j,v);var se=at.getState("emphasis");$(se?se.style:null,j,v)}}function $(Z,H,Q){var j=Z?Z.text:null;if(!H&&Q.isLeafRoot&&j!=null){var tt=r.get("drillDownIcon",!0);Z.text=tt?tt+" "+j:j}}function q(Z,H,Q,j){var tt=m!=null&&t[Z][m],ct=n[Z];return tt?(t[Z][m]=null,ut(ct,tt)):g||(tt=new H,tt instanceof Wa&&(tt.z2=Jv(Q,j)),Wt(ct,tt)),e[Z][S]=tt}function ut(Z,H){var Q=Z[S]={};H instanceof Da?(Q.oldX=H.x,Q.oldY=H.y):Q.oldShape=U({},H.shape)}function Wt(Z,H){var Q=Z[S]={},j=o.parentNode,tt=H instanceof rt;if(j&&(!a||a.direction==="drillDown")){var ct=0,Dt=0,at=n.background[j.getRawIndex()];!a&&at&&at.oldShape&&(ct=at.oldShape.width,Dt=at.oldShape.height),tt?(Q.oldX=0,Q.oldY=Dt):Q.oldShape={x:ct,y:Dt,width:0,height:0}}Q.fadein=!tt}}function Jv(r,e){return r*Xv+e}var th="itemStyle",Qo=Lt();const eh={seriesType:"treemap",reset:function(r){var e=r.getData().tree,t=e.root;t.isRemoved()||Jo(t,{},r.getViewRoot().getAncestors(),r)}};function Jo(r,e,t,a){var n=r.getModel(),i=r.getLayout(),o=r.hostTree.data;if(!(!i||i.invisible||!i.isInView)){var s=n.getModel(th),l=rh(s,e,a),u=o.ensureUniqueItemVisual(r.dataIndex,"style"),v=s.get("borderColor"),h=s.get("borderColorSaturation"),f;h!=null&&(f=oi(l),v=ah(h,f)),u.stroke=v;var c=r.viewChildren;if(!c||!c.length)f=oi(l),u.fill=f;else{var d=nh(r,n,i,s,l,c);R(c,function(p,g){if(p.depth>=t.length||p===t[p.depth]){var S=ih(n,l,p,g,d,a);Jo(p,S,t,a)}})}}}function rh(r,e,t){var a=U({},e),n=t.designatedVisualItemStyle;return R(["color","colorAlpha","colorSaturation"],function(i){n[i]=e[i];var o=r.get(i);n[i]=null,o!=null&&(a[i]=o)}),a}function oi(r){var e=Br(r,"color");if(e){var t=Br(r,"colorAlpha"),a=Br(r,"colorSaturation");return a&&(e=Ao(e,null,null,a)),t&&(e=ya(e,t)),e}}function ah(r,e){return e!=null?Ao(e,null,null,r):null}function Br(r,e){var t=r[e];if(t!=null&&t!=="none")return t}function nh(r,e,t,a,n,i){if(!(!i||!i.length)){var o=Or(e,"color")||n.color!=null&&n.color!=="none"&&(Or(e,"colorAlpha")||Or(e,"colorSaturation"));if(o){var s=e.get("visualMin"),l=e.get("visualMax"),u=t.dataExtent.slice();s!=null&&s<u[0]&&(u[0]=s),l!=null&&l>u[1]&&(u[1]=l);var v=e.get("colorMappingBy"),h={type:o.name,dataExtent:u,visual:o.range};h.type==="color"&&(v==="index"||v==="id")?(h.mappingMethod="category",h.loop=!0):h.mappingMethod="linear";var f=new Co(h);return Qo(f).drColorMappingBy=v,f}}}function Or(r,e){var t=r.get(e);return F(t)&&t.length?{name:e,range:t}:null}function ih(r,e,t,a,n,i){var o=U({},e);if(n){var s=n.type,l=s==="color"&&Qo(n).drColorMappingBy,u=l==="index"?a:l==="id"?i.mapIdToIndex(t.getId()):t.getValue(r.get("visualDimension"));o[s]=n.mapValueToVisual(u)}return o}var ke=Math.max,hr=Math.min,si=Nt,fn=R,ts=["itemStyle","borderWidth"],oh=["itemStyle","gapWidth"],sh=["upperLabel","show"],lh=["upperLabel","height"];const uh={seriesType:"treemap",reset:function(r,e,t,a){var n=t.getWidth(),i=t.getHeight(),o=r.option,s=ge(r.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),l=o.size||[],u=B(si(s.width,l[0]),n),v=B(si(s.height,l[1]),i),h=a&&a.type,f=["treemapZoomToNode","treemapRootToNode"],c=Ve(a,f,r),d=h==="treemapRender"||h==="treemapMove"?a.rootRect:null,p=r.getViewRoot(),g=qo(p);if(h!=="treemapMove"){var S=h==="treemapZoomToNode"?dh(r,c,p,u,v):d?[d.width,d.height]:[u,v],m=o.sort;m&&m!=="asc"&&m!=="desc"&&(m="desc");var y={squareRatio:o.squareRatio,sort:m,leafDepth:o.leafDepth};p.hostTree.clearLayouts();var b={x:0,y:0,width:S[0],height:S[1],area:S[0]*S[1]};p.setLayout(b),es(p,y,!1,0),b=p.getLayout(),fn(g,function(x,I){var w=(g[I+1]||p).getValue();x.setLayout(U({dataExtent:[w,w],borderWidth:0,upperHeight:0},b))})}var _=r.getData().tree.root;_.setLayout(gh(s,d,c),!0),r.setLayoutInfo(s),rs(_,new dt(-s.x,-s.y,n,i),g,p,0)}};function es(r,e,t,a){var n,i;if(!r.isRemoved()){var o=r.getLayout();n=o.width,i=o.height;var s=r.getModel(),l=s.get(ts),u=s.get(oh)/2,v=as(s),h=Math.max(l,v),f=l-u,c=h-u;r.setLayout({borderWidth:l,upperHeight:h,upperLabelHeight:v},!0),n=ke(n-2*f,0),i=ke(i-f-c,0);var d=n*i,p=vh(r,s,d,e,t,a);if(p.length){var g={x:f,y:c,width:n,height:i},S=hr(n,i),m=1/0,y=[];y.area=0;for(var b=0,_=p.length;b<_;){var x=p[b];y.push(x),y.area+=x.getLayout().area;var I=ph(y,S,e.squareRatio);I<=m?(b++,m=I):(y.area-=y.pop().getLayout().area,li(y,S,g,u,!1),S=hr(g.width,g.height),y.length=y.area=0,m=1/0)}if(y.length&&li(y,S,g,u,!0),!t){var w=s.get("childrenVisibleMin");w!=null&&d<w&&(t=!0)}for(var b=0,_=p.length;b<_;b++)es(p[b],e,t,a+1)}}}function vh(r,e,t,a,n,i){var o=r.children||[],s=a.sort;s!=="asc"&&s!=="desc"&&(s=null);var l=a.leafDepth!=null&&a.leafDepth<=i;if(n&&!l)return r.viewChildren=[];o=Ct(o,function(c){return!c.isRemoved()}),fh(o,s);var u=ch(e,o,s);if(u.sum===0)return r.viewChildren=[];if(u.sum=hh(e,t,u.sum,s,o),u.sum===0)return r.viewChildren=[];for(var v=0,h=o.length;v<h;v++){var f=o[v].getValue()/u.sum*t;o[v].setLayout({area:f})}return l&&(o.length&&r.setLayout({isLeafRoot:!0},!0),o.length=0),r.viewChildren=o,r.setLayout({dataExtent:u.dataExtent},!0),o}function hh(r,e,t,a,n){if(!a)return t;for(var i=r.get("visibleMin"),o=n.length,s=o,l=o-1;l>=0;l--){var u=n[a==="asc"?o-l-1:l].getValue();u/t*e<i&&(s=l,t-=u)}return a==="asc"?n.splice(0,o-s):n.splice(s,o-s),t}function fh(r,e){return e&&r.sort(function(t,a){var n=e==="asc"?t.getValue()-a.getValue():a.getValue()-t.getValue();return n===0?e==="asc"?t.dataIndex-a.dataIndex:a.dataIndex-t.dataIndex:n}),r}function ch(r,e,t){for(var a=0,n=0,i=e.length;n<i;n++)a+=e[n].getValue();var o=r.get("visualDimension"),s;return!e||!e.length?s=[NaN,NaN]:o==="value"&&t?(s=[e[e.length-1].getValue(),e[0].getValue()],t==="asc"&&s.reverse()):(s=[1/0,-1/0],fn(e,function(l){var u=l.getValue(o);u<s[0]&&(s[0]=u),u>s[1]&&(s[1]=u)})),{sum:a,dataExtent:s}}function ph(r,e,t){for(var a=0,n=1/0,i=0,o=void 0,s=r.length;i<s;i++)o=r[i].getLayout().area,o&&(o<n&&(n=o),o>a&&(a=o));var l=r.area*r.area,u=e*e*t;return l?ke(u*a/l,l/(u*n)):1/0}function li(r,e,t,a,n){var i=e===t.width?0:1,o=1-i,s=["x","y"],l=["width","height"],u=t[s[i]],v=e?r.area/e:0;(n||v>t[l[o]])&&(v=t[l[o]]);for(var h=0,f=r.length;h<f;h++){var c=r[h],d={},p=v?c.getLayout().area/v:0,g=d[l[o]]=ke(v-2*a,0),S=t[s[i]]+t[l[i]]-u,m=h===f-1||S<p?S:p,y=d[l[i]]=ke(m-2*a,0);d[s[o]]=t[s[o]]+hr(a,g/2),d[s[i]]=u+hr(a,y/2),u+=m,c.setLayout(d,!0)}t[s[o]]+=v,t[l[o]]-=v}function dh(r,e,t,a,n){var i=(e||{}).node,o=[a,n];if(!i||i===t)return o;for(var s,l=a*n,u=l*r.option.zoomToNodeRatio;s=i.parentNode;){for(var v=0,h=s.children,f=0,c=h.length;f<c;f++)v+=h[f].getValue();var d=i.getValue();if(d===0)return o;u*=v/d;var p=s.getModel(),g=p.get(ts),S=Math.max(g,as(p));u+=4*g*g+(3*g+S)*Math.pow(u,.5),u>Gn&&(u=Gn),i=s}u<l&&(u=l);var m=Math.pow(u/l,.5);return[a*m,n*m]}function gh(r,e,t){if(e)return{x:e.x,y:e.y};var a={x:0,y:0};if(!t)return a;var n=t.node,i=n.getLayout();if(!i)return a;for(var o=[i.width/2,i.height/2],s=n;s;){var l=s.getLayout();o[0]+=l.x,o[1]+=l.y,s=s.parentNode}return{x:r.width/2-o[0],y:r.height/2-o[1]}}function rs(r,e,t,a,n){var i=r.getLayout(),o=t[n],s=o&&o===r;if(!(o&&!s||n===t.length&&r!==a)){r.setLayout({isInView:!0,invisible:!s&&!e.intersect(i),isAboveViewRoot:s},!0);var l=new dt(e.x-i.x,e.y-i.y,e.width,e.height);fn(r.viewChildren||[],function(u){rs(u,l,t,a,n+1)})}}function as(r){return r.get(sh)?r.get(lh):0}function yh(r){r.registerSeriesModel(Ov),r.registerChartView(jv),r.registerVisual(eh),r.registerLayout(uh),Bv(r)}function mh(r){var e=r.findComponents({mainType:"legend"});!e||!e.length||r.eachSeriesByType("graph",function(t){var a=t.getCategoriesData(),n=t.getGraph(),i=n.data,o=a.mapArray(a.getName);i.filterSelf(function(s){var l=i.getItemModel(s),u=l.getShallow("category");if(u!=null){Ht(u)&&(u=o[u]);for(var v=0;v<e.length;v++)if(!e[v].isSelected(u))return!1}return!0})})}function Sh(r){var e={};r.eachSeriesByType("graph",function(t){var a=t.getCategoriesData(),n=t.getData(),i={};a.each(function(o){var s=a.getName(o);i["ec-"+s]=o;var l=a.getItemModel(o),u=l.getModel("itemStyle").getItemStyle();u.fill||(u.fill=t.getColorFromPalette(s,e)),a.setItemVisual(o,"style",u);for(var v=["symbol","symbolSize","symbolKeepAspect"],h=0;h<v.length;h++){var f=l.getShallow(v[h],!0);f!=null&&a.setItemVisual(o,v[h],f)}}),a.count()&&n.each(function(o){var s=n.getItemModel(o),l=s.getShallow("category");if(l!=null){St(l)&&(l=i["ec-"+l]);var u=a.getItemVisual(l,"style"),v=n.ensureUniqueItemVisual(o,"style");U(v,u);for(var h=["symbol","symbolSize","symbolKeepAspect"],f=0;f<h.length;f++)n.setItemVisual(o,h[f],a.getItemVisual(l,h[f]))}})})}function qe(r){return r instanceof Array||(r=[r,r]),r}function _h(r){r.eachSeriesByType("graph",function(e){var t=e.getGraph(),a=e.getEdgeData(),n=qe(e.get("edgeSymbol")),i=qe(e.get("edgeSymbolSize"));a.setVisual("fromSymbol",n&&n[0]),a.setVisual("toSymbol",n&&n[1]),a.setVisual("fromSymbolSize",i&&i[0]),a.setVisual("toSymbolSize",i&&i[1]),a.setVisual("style",e.getModel("lineStyle").getLineStyle()),a.each(function(o){var s=a.getItemModel(o),l=t.getEdgeByIndex(o),u=qe(s.getShallow("symbol",!0)),v=qe(s.getShallow("symbolSize",!0)),h=s.getModel("lineStyle").getLineStyle(),f=a.ensureUniqueItemVisual(o,"style");switch(U(f,h),f.stroke){case"source":{var c=l.node1.getVisual("style");f.stroke=c&&c.fill;break}case"target":{var c=l.node2.getVisual("style");f.stroke=c&&c.fill;break}}u[0]&&l.setVisual("fromSymbol",u[0]),u[1]&&l.setVisual("toSymbol",u[1]),v[0]&&l.setVisual("fromSymbolSize",v[0]),v[1]&&l.setVisual("toSymbolSize",v[1])})})}var Ta="-->",Cr=function(r){return r.get("autoCurveness")||null},ns=function(r,e){var t=Cr(r),a=20,n=[];if(Ht(t))a=t;else if(F(t)){r.__curvenessList=t;return}e>a&&(a=e);var i=a%2?a+2:a+3;n=[];for(var o=0;o<i;o++)n.push((o%2?o+1:o)/10*(o%2?-1:1));r.__curvenessList=n},Ge=function(r,e,t){var a=[r.id,r.dataIndex].join("."),n=[e.id,e.dataIndex].join(".");return[t.uid,a,n].join(Ta)},is=function(r){var e=r.split(Ta);return[e[0],e[2],e[1]].join(Ta)},bh=function(r,e){var t=Ge(r.node1,r.node2,e);return e.__edgeMap[t]},xh=function(r,e){var t=Aa(Ge(r.node1,r.node2,e),e),a=Aa(Ge(r.node2,r.node1,e),e);return t+a},Aa=function(r,e){var t=e.__edgeMap;return t[r]?t[r].length:0};function Ih(r){Cr(r)&&(r.__curvenessList=[],r.__edgeMap={},ns(r))}function wh(r,e,t,a){if(Cr(t)){var n=Ge(r,e,t),i=t.__edgeMap,o=i[is(n)];i[n]&&!o?i[n].isForward=!0:o&&i[n]&&(o.isForward=!0,i[n].isForward=!1),i[n]=i[n]||[],i[n].push(a)}}function cn(r,e,t,a){var n=Cr(e),i=F(n);if(!n)return null;var o=bh(r,e);if(!o)return null;for(var s=-1,l=0;l<o.length;l++)if(o[l]===t){s=l;break}var u=xh(r,e);ns(e,u),r.lineStyle=r.lineStyle||{};var v=Ge(r.node1,r.node2,e),h=e.__curvenessList,f=i||u%2?0:1;if(o.isForward)return h[f+s];var c=is(v),d=Aa(c,e),p=h[s+d+f];return a?i?n&&n[0]===0?(d+f)%2?p:-p:((d%2?0:1)+f)%2?p:-p:(d+f)%2?p:-p:h[s+d+f]}function os(r){var e=r.coordinateSystem;if(!(e&&e.type!=="view")){var t=r.getGraph();t.eachNode(function(a){var n=a.getModel();a.setLayout([+n.get("x"),+n.get("y")])}),pn(t,r)}}function pn(r,e){r.eachEdge(function(t,a){var n=Oe(t.getModel().get(["lineStyle","curveness"]),-cn(t,e,a,!0),0),i=qt(t.node1.getLayout()),o=qt(t.node2.getLayout()),s=[i,o];+n&&s.push([(i[0]+o[0])/2-(i[1]-o[1])*n,(i[1]+o[1])/2-(o[0]-i[0])*n]),t.setLayout(s)})}function Lh(r,e){r.eachSeriesByType("graph",function(t){var a=t.get("layout"),n=t.coordinateSystem;if(n&&n.type!=="view"){var i=t.getData(),o=[];R(n.dimensions,function(f){o=o.concat(i.mapDimensionsAll(f))});for(var s=0;s<i.count();s++){for(var l=[],u=!1,v=0;v<o.length;v++){var h=i.get(o[v],s);isNaN(h)||(u=!0),l.push(h)}u?i.setItemLayout(s,n.dataToPoint(l)):i.setItemLayout(s,[NaN,NaN])}pn(i.graph,t)}else(!a||a==="none")&&os(t)})}function De(r){var e=r.coordinateSystem;if(e.type!=="view")return 1;var t=r.option.nodeScaleRatio,a=e.scaleX,n=e.getZoom(),i=(n-1)*t+1;return i/a}function Te(r){var e=r.getVisual("symbolSize");return e instanceof Array&&(e=(e[0]+e[1])/2),+e}var ui=Math.PI,Hr=[];function dn(r,e,t,a){var n=r.coordinateSystem;if(!(n&&n.type!=="view")){var i=n.getBoundingRect(),o=r.getData(),s=o.graph,l=i.width/2+i.x,u=i.height/2+i.y,v=Math.min(i.width,i.height)/2,h=o.count();if(o.setLayout({cx:l,cy:u}),!!h){if(t){var f=n.pointToData(a),c=f[0],d=f[1],p=[c-l,d-u];He(p,p),tl(p,p,v),t.setLayout([l+p[0],u+p[1]],!0);var g=r.get(["circular","rotateLabel"]);ss(t,g,l,u)}Dh[e](r,s,o,v,l,u,h),s.eachEdge(function(S,m){var y=Oe(S.getModel().get(["lineStyle","curveness"]),cn(S,r,m),0),b=qt(S.node1.getLayout()),_=qt(S.node2.getLayout()),x,I=(b[0]+_[0])/2,w=(b[1]+_[1])/2;+y&&(y*=3,x=[l*y+I*(1-y),u*y+w*(1-y)]),S.setLayout([b,_,x])})}}}var Dh={value:function(r,e,t,a,n,i,o){var s=0,l=t.getSum("value"),u=Math.PI*2/(l||o);e.eachNode(function(v){var h=v.getValue("value"),f=u*(l?h:1)/2;s+=f,v.setLayout([a*Math.cos(s)+n,a*Math.sin(s)+i]),s+=f})},symbolSize:function(r,e,t,a,n,i,o){var s=0;Hr.length=o;var l=De(r);e.eachNode(function(h){var f=Te(h);isNaN(f)&&(f=2),f<0&&(f=0),f*=l;var c=Math.asin(f/2/a);isNaN(c)&&(c=ui/2),Hr[h.dataIndex]=c,s+=c*2});var u=(2*ui-s)/o/2,v=0;e.eachNode(function(h){var f=u+Hr[h.dataIndex];v+=f,(!h.getLayout()||!h.getLayout().fixed)&&h.setLayout([a*Math.cos(v)+n,a*Math.sin(v)+i]),v+=f})}};function ss(r,e,t,a){var n=r.getGraphicEl();if(n){var i=r.getModel(),o=i.get(["label","rotate"])||0,s=n.getSymbolPath();if(e){var l=r.getLayout(),u=Math.atan2(l[1]-a,l[0]-t);u<0&&(u=Math.PI*2+u);var v=l[0]<t;v&&(u=u-Math.PI);var h=v?"left":"right";s.setTextConfig({rotation:-u,position:h,origin:"center"});var f=s.ensureState("emphasis");U(f.textConfig||(f.textConfig={}),{position:h})}else s.setTextConfig({rotation:o*=Math.PI/180})}}function Th(r){r.eachSeriesByType("graph",function(e){e.get("layout")==="circular"&&dn(e,"symbolSize")})}var le=ma;function Ah(r,e,t){for(var a=r,n=e,i=t.rect,o=i.width,s=i.height,l=[i.x+o/2,i.y+s/2],u=t.gravity==null?.1:t.gravity,v=0;v<a.length;v++){var h=a[v];h.p||(h.p=el(o*(Math.random()-.5)+l[0],s*(Math.random()-.5)+l[1])),h.pp=qt(h.p),h.edges=null}var f=t.friction==null?.6:t.friction,c=f,d,p;return{warmUp:function(){c=f*.8},setFixed:function(g){a[g].fixed=!0},setUnfixed:function(g){a[g].fixed=!1},beforeStep:function(g){d=g},afterStep:function(g){p=g},step:function(g){d&&d(a,n);for(var S=[],m=a.length,y=0;y<n.length;y++){var b=n[y];if(!b.ignoreForceLayout){var _=b.n1,x=b.n2;ce(S,x.p,_.p);var I=zn(S)-b.d,w=x.w/(_.w+x.w);isNaN(w)&&(w=0),He(S,S),!_.fixed&&le(_.p,_.p,S,w*I*c),!x.fixed&&le(x.p,x.p,S,-(1-w)*I*c)}}for(var y=0;y<m;y++){var L=a[y];L.fixed||(ce(S,l,L.p),le(L.p,L.p,S,u*c))}for(var y=0;y<m;y++)for(var _=a[y],D=y+1;D<m;D++){var x=a[D];ce(S,x.p,_.p);var I=zn(S);I===0&&(rl(S,Math.random()-.5,Math.random()-.5),I=1);var T=(_.rep+x.rep)/I/I;!_.fixed&&le(_.pp,_.pp,S,T),!x.fixed&&le(x.pp,x.pp,S,-T)}for(var A=[],y=0;y<m;y++){var L=a[y];L.fixed||(ce(A,L.p,L.pp),le(L.p,L.p,A,c),pt(L.pp,L.p))}c=c*.992;var P=c<.01;p&&p(a,n,P),g&&g(P)}}}function Ch(r){r.eachSeriesByType("graph",function(e){var t=e.coordinateSystem;if(!(t&&t.type!=="view"))if(e.get("layout")==="force"){var a=e.preservedPoints||{},n=e.getGraph(),i=n.data,o=n.edgeData,s=e.getModel("force"),l=s.get("initLayout");e.preservedPoints?i.each(function(y){var b=i.getId(y);i.setItemLayout(y,a[b]||[NaN,NaN])}):!l||l==="none"?os(e):l==="circular"&&dn(e,"value");var u=i.getDataExtent("value"),v=o.getDataExtent("value"),h=s.get("repulsion"),f=s.get("edgeLength"),c=F(h)?h:[h,h],d=F(f)?f:[f,f];d=[d[1],d[0]];var p=i.mapArray("value",function(y,b){var _=i.getItemLayout(b),x=At(y,u,c);return isNaN(x)&&(x=(c[0]+c[1])/2),{w:x,rep:x,fixed:i.getItemModel(b).get("fixed"),p:!_||isNaN(_[0])||isNaN(_[1])?null:_}}),g=o.mapArray("value",function(y,b){var _=n.getEdgeByIndex(b),x=At(y,v,d);isNaN(x)&&(x=(d[0]+d[1])/2);var I=_.getModel(),w=Oe(_.getModel().get(["lineStyle","curveness"]),-cn(_,e,b,!0),0);return{n1:p[_.node1.dataIndex],n2:p[_.node2.dataIndex],d:x,curveness:w,ignoreForceLayout:I.get("ignoreForceLayout")}}),S=t.getBoundingRect(),m=Ah(p,g,{rect:S,gravity:s.get("gravity"),friction:s.get("friction")});m.beforeStep(function(y,b){for(var _=0,x=y.length;_<x;_++)y[_].fixed&&pt(y[_].p,n.getNodeByIndex(_).getLayout())}),m.afterStep(function(y,b,_){for(var x=0,I=y.length;x<I;x++)y[x].fixed||n.getNodeByIndex(x).setLayout(y[x].p),a[i.getId(x)]=y[x].p;for(var x=0,I=b.length;x<I;x++){var w=b[x],L=n.getEdgeByIndex(x),D=w.n1.p,T=w.n2.p,A=L.getLayout();A=A?A.slice():[],A[0]=A[0]||[],A[1]=A[1]||[],pt(A[0],D),pt(A[1],T),+w.curveness&&(A[2]=[(D[0]+T[0])/2-(D[1]-T[1])*w.curveness,(D[1]+T[1])/2-(T[0]-D[0])*w.curveness]),L.setLayout(A)}}),e.forceLayout=m,e.preservedPoints=a,m.step()}else e.forceLayout=null})}function Mh(r,e,t){var a=U(r.getBoxLayoutParams(),{aspect:t});return ge(a,{width:e.getWidth(),height:e.getHeight()})}function Ph(r,e){var t=[];return r.eachSeriesByType("graph",function(a){var n=a.get("coordinateSystem");if(!n||n==="view"){var i=a.getData(),o=i.mapArray(function(g){var S=i.getItemModel(g);return[+S.get("x"),+S.get("y")]}),s=[],l=[];br(o,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]),v=Mh(a,e,u);isNaN(u)&&(s=[v.x,v.y],l=[v.x+v.width,v.y+v.height]);var h=l[0]-s[0],f=l[1]-s[1],c=v.width,d=v.height,p=a.coordinateSystem=new Ha;p.zoomLimit=a.get("scaleLimit"),p.setBoundingRect(s[0],s[1],h,f),p.setViewRect(v.x,v.y,c,d),p.setCenter(a.get("center"),e),p.setZoom(a.get("zoom")),t.push(p)}}),t}var vi=sr.prototype,Fr=Lo.prototype,ls=function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return r}();(function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e})(ls);function Wr(r){return isNaN(+r.cpx1)||isNaN(+r.cpy1)}var Eh=function(r){k(e,r);function e(t){var a=r.call(this,t)||this;return a.type="ec-line",a}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new ls},e.prototype.buildPath=function(t,a){Wr(a)?vi.buildPath.call(this,t,a):Fr.buildPath.call(this,t,a)},e.prototype.pointAt=function(t){return Wr(this.shape)?vi.pointAt.call(this,t):Fr.pointAt.call(this,t)},e.prototype.tangentAt=function(t){var a=this.shape,n=Wr(a)?[a.x2-a.x1,a.y2-a.y1]:Fr.tangentAt.call(this,t);return He(n,n)},e}(yt),Ur=["fromSymbol","toSymbol"];function hi(r){return"_"+r+"Type"}function fi(r,e,t){var a=e.getItemVisual(t,r);if(!a||a==="none")return a;var n=e.getItemVisual(t,r+"Size"),i=e.getItemVisual(t,r+"Rotate"),o=e.getItemVisual(t,r+"Offset"),s=e.getItemVisual(t,r+"KeepAspect"),l=Za(n),u=Ya(o||0,l);return a+l+u+(i||"")+(s||"")}function ci(r,e,t){var a=e.getItemVisual(t,r);if(!(!a||a==="none")){var n=e.getItemVisual(t,r+"Size"),i=e.getItemVisual(t,r+"Rotate"),o=e.getItemVisual(t,r+"Offset"),s=e.getItemVisual(t,r+"KeepAspect"),l=Za(n),u=Ya(o||0,l),v=Ee(a,-l[0]/2+u[0],-l[1]/2+u[1],l[0],l[1],null,s);return v.__specifiedRotation=i==null||isNaN(i)?void 0:+i*Math.PI/180||0,v.name=r,v}}function Nh(r){var e=new Eh({name:"line",subPixelOptimize:!0});return Ca(e.shape,r),e}function Ca(r,e){r.x1=e[0][0],r.y1=e[0][1],r.x2=e[1][0],r.y2=e[1][1],r.percent=1;var t=e[2];t?(r.cpx1=t[0],r.cpy1=t[1]):(r.cpx1=NaN,r.cpy1=NaN)}var gn=function(r){k(e,r);function e(t,a,n){var i=r.call(this)||this;return i._createLine(t,a,n),i}return e.prototype._createLine=function(t,a,n){var i=t.hostModel,o=t.getItemLayout(a),s=Nh(o);s.shape.percent=0,It(s,{shape:{percent:1}},i,a),this.add(s),R(Ur,function(l){var u=ci(l,t,a);this.add(u),this[hi(l)]=fi(l,t,a)},this),this._updateCommonStl(t,a,n)},e.prototype.updateData=function(t,a,n){var i=t.hostModel,o=this.childOfName("line"),s=t.getItemLayout(a),l={shape:{}};Ca(l.shape,s),ot(o,l,i,a),R(Ur,function(u){var v=fi(u,t,a),h=hi(u);if(this[h]!==v){this.remove(this.childOfName(u));var f=ci(u,t,a);this.add(f)}this[h]=v},this),this._updateCommonStl(t,a,n)},e.prototype.getLinePath=function(){return this.childAt(0)},e.prototype._updateCommonStl=function(t,a,n){var i=t.hostModel,o=this.childOfName("line"),s=n&&n.emphasisLineStyle,l=n&&n.blurLineStyle,u=n&&n.selectLineStyle,v=n&&n.labelStatesModels,h=n&&n.emphasisDisabled,f=n&&n.focus,c=n&&n.blurScope;if(!n||t.hasItemOption){var d=t.getItemModel(a),p=d.getModel("emphasis");s=p.getModel("lineStyle").getLineStyle(),l=d.getModel(["blur","lineStyle"]).getLineStyle(),u=d.getModel(["select","lineStyle"]).getLineStyle(),h=p.get("disabled"),f=p.get("focus"),c=p.get("blurScope"),v=Rt(d)}var g=t.getItemVisual(a,"style"),S=g.stroke;o.useStyle(g),o.style.fill=null,o.style.strokeNoScale=!0,o.ensureState("emphasis").style=s,o.ensureState("blur").style=l,o.ensureState("select").style=u,R(Ur,function(x){var I=this.childOfName(x);if(I){I.setColor(S),I.style.opacity=g.opacity;for(var w=0;w<Sa.length;w++){var L=Sa[w],D=o.getState(L);if(D){var T=D.style||{},A=I.ensureState(L),P=A.style||(A.style={});T.stroke!=null&&(P[I.__isEmptyBrush?"stroke":"fill"]=T.stroke),T.opacity!=null&&(P.opacity=T.opacity)}}I.markRedraw()}},this);var m=i.getRawValue(a);Qt(this,v,{labelDataIndex:a,labelFetcher:{getFormattedLabel:function(x,I){return i.getFormattedLabel(x,I,t.dataType)}},inheritColor:S||"#000",defaultOpacity:g.opacity,defaultText:(m==null?t.getName(a):isFinite(m)?Mo(m):m)+""});var y=this.getTextContent();if(y){var b=v.normal;y.__align=y.style.align,y.__verticalAlign=y.style.verticalAlign,y.__position=b.get("position")||"middle";var _=b.get("distance");F(_)||(_=[_,_]),y.__labelDistance=_}this.setTextConfig({position:null,local:!0,inside:!1}),st(this,f,c,h)},e.prototype.highlight=function(){Ua(this)},e.prototype.downplay=function(){$a(this)},e.prototype.updateLayout=function(t,a){this.setLinePoints(t.getItemLayout(a))},e.prototype.setLinePoints=function(t){var a=this.childOfName("line");Ca(a.shape,t),a.dirty()},e.prototype.beforeUpdate=function(){var t=this,a=t.childOfName("fromSymbol"),n=t.childOfName("toSymbol"),i=t.getTextContent();if(!a&&!n&&(!i||i.ignore))return;for(var o=1,s=this.parent;s;)s.scaleX&&(o/=s.scaleX),s=s.parent;var l=t.childOfName("line");if(!this.__dirty&&!l.__dirty)return;var u=l.shape.percent,v=l.pointAt(0),h=l.pointAt(u),f=ce([],h,v);He(f,f);function c(D,T){var A=D.__specifiedRotation;if(A==null){var P=l.tangentAt(T);D.attr("rotation",(T===1?-1:1)*Math.PI/2-Math.atan2(P[1],P[0]))}else D.attr("rotation",A)}if(a&&(a.setPosition(v),c(a,0),a.scaleX=a.scaleY=o*u,a.markRedraw()),n&&(n.setPosition(h),c(n,1),n.scaleX=n.scaleY=o*u,n.markRedraw()),i&&!i.ignore){i.x=i.y=0,i.originX=i.originY=0;var d=void 0,p=void 0,g=i.__labelDistance,S=g[0]*o,m=g[1]*o,y=u/2,b=l.tangentAt(y),_=[b[1],-b[0]],x=l.pointAt(y);_[1]>0&&(_[0]=-_[0],_[1]=-_[1]);var I=b[0]<0?-1:1;if(i.__position!=="start"&&i.__position!=="end"){var w=-Math.atan2(b[1],b[0]);h[0]<v[0]&&(w=Math.PI+w),i.rotation=w}var L=void 0;switch(i.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":L=-m,p="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":L=m,p="top";break;default:L=0,p="middle"}switch(i.__position){case"end":i.x=f[0]*S+h[0],i.y=f[1]*m+h[1],d=f[0]>.8?"left":f[0]<-.8?"right":"center",p=f[1]>.8?"top":f[1]<-.8?"bottom":"middle";break;case"start":i.x=-f[0]*S+v[0],i.y=-f[1]*m+v[1],d=f[0]>.8?"right":f[0]<-.8?"left":"center",p=f[1]>.8?"bottom":f[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":i.x=S*I+v[0],i.y=v[1]+L,d=b[0]<0?"right":"left",i.originX=-S*I,i.originY=-L;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=x[0],i.y=x[1]+L,d="center",i.originY=-L;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-S*I+h[0],i.y=h[1]+L,d=b[0]>=0?"right":"left",i.originX=S*I,i.originY=-L;break}i.scaleX=i.scaleY=o,i.setStyle({verticalAlign:i.__verticalAlign||p,align:i.__align||d})}},e}(rt),yn=function(){function r(e){this.group=new rt,this._LineCtor=e||gn}return r.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var a=this,n=a.group,i=a._lineData;a._lineData=e,i||n.removeAll();var o=pi(e);e.diff(i).add(function(s){t._doAdd(e,s,o)}).update(function(s,l){t._doUpdate(i,e,l,s,o)}).remove(function(s){n.remove(i.getItemGraphicEl(s))}).execute()},r.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(t,a){t.updateLayout(e,a)},this)},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=pi(e),this._lineData=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t){this._progressiveEls=[];function a(s){!s.isGroup&&!Rh(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var n=e.start;n<e.end;n++){var i=t.getItemLayout(n);if($r(i)){var o=new this._LineCtor(t,n,this._seriesScope);o.traverse(a),this.group.add(o),t.setItemGraphicEl(n,o),this._progressiveEls.push(o)}}},r.prototype.remove=function(){this.group.removeAll()},r.prototype.eachRendered=function(e){wr(this._progressiveEls||this.group,e)},r.prototype._doAdd=function(e,t,a){var n=e.getItemLayout(t);if($r(n)){var i=new this._LineCtor(e,t,a);e.setItemGraphicEl(t,i),this.group.add(i)}},r.prototype._doUpdate=function(e,t,a,n,i){var o=e.getItemGraphicEl(a);if(!$r(t.getItemLayout(n))){this.group.remove(o);return}o?o.updateData(t,n,i):o=new this._LineCtor(t,n,i),t.setItemGraphicEl(n,o),this.group.add(o)},r}();function Rh(r){return r.animators&&r.animators.length>0}function pi(r){var e=r.hostModel,t=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:t.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:t.get("disabled"),blurScope:t.get("blurScope"),focus:t.get("focus"),labelStatesModels:Rt(e)}}function di(r){return isNaN(r[0])||isNaN(r[1])}function $r(r){return r&&!di(r[0])&&!di(r[1])}var Zr=[],Yr=[],Xr=[],ue=Po,qr=nl,gi=Math.abs;function yi(r,e,t){for(var a=r[0],n=r[1],i=r[2],o=1/0,s,l=t*t,u=.1,v=.1;v<=.9;v+=.1){Zr[0]=ue(a[0],n[0],i[0],v),Zr[1]=ue(a[1],n[1],i[1],v);var h=gi(qr(Zr,e)-l);h<o&&(o=h,s=v)}for(var f=0;f<32;f++){var c=s+u;Yr[0]=ue(a[0],n[0],i[0],s),Yr[1]=ue(a[1],n[1],i[1],s),Xr[0]=ue(a[0],n[0],i[0],c),Xr[1]=ue(a[1],n[1],i[1],c);var h=qr(Yr,e)-l;if(gi(h)<.01)break;var d=qr(Xr,e)-l;u/=2,h<0?d>=0?s=s+u:s=s-u:d>=0?s=s-u:s=s+u}return s}function Kr(r,e){var t=[],a=al,n=[[],[],[]],i=[[],[]],o=[];e/=2,r.eachEdge(function(s,l){var u=s.getLayout(),v=s.getVisual("fromSymbol"),h=s.getVisual("toSymbol");u.__original||(u.__original=[qt(u[0]),qt(u[1])],u[2]&&u.__original.push(qt(u[2])));var f=u.__original;if(u[2]!=null){if(pt(n[0],f[0]),pt(n[1],f[2]),pt(n[2],f[1]),v&&v!=="none"){var c=Te(s.node1),d=yi(n,f[0],c*e);a(n[0][0],n[1][0],n[2][0],d,t),n[0][0]=t[3],n[1][0]=t[4],a(n[0][1],n[1][1],n[2][1],d,t),n[0][1]=t[3],n[1][1]=t[4]}if(h&&h!=="none"){var c=Te(s.node2),d=yi(n,f[1],c*e);a(n[0][0],n[1][0],n[2][0],d,t),n[1][0]=t[1],n[2][0]=t[2],a(n[0][1],n[1][1],n[2][1],d,t),n[1][1]=t[1],n[2][1]=t[2]}pt(u[0],n[0]),pt(u[1],n[2]),pt(u[2],n[1])}else{if(pt(i[0],f[0]),pt(i[1],f[1]),ce(o,i[1],i[0]),He(o,o),v&&v!=="none"){var c=Te(s.node1);ma(i[0],i[0],o,c*e)}if(h&&h!=="none"){var c=Te(s.node2);ma(i[1],i[1],o,-c*e)}pt(u[0],i[0]),pt(u[1],i[1])}})}function mi(r){return r.type==="view"}var Vh=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a){var n=new Xa,i=new yn,o=this.group;this._controller=new Oa(a.getZr()),this._controllerHost={target:o},o.add(n.group),o.add(i.group),this._symbolDraw=n,this._lineDraw=i,this._firstRender=!0},e.prototype.render=function(t,a,n){var i=this,o=t.coordinateSystem;this._model=t;var s=this._symbolDraw,l=this._lineDraw,u=this.group;if(mi(o)){var v={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?u.attr(v):ot(u,v,t)}Kr(t.getGraph(),De(t));var h=t.getData();s.updateData(h);var f=t.getEdgeData();l.updateData(f),this._updateNodeAndLinkScale(),this._updateController(t,a,n),clearTimeout(this._layoutTimeout);var c=t.forceLayout,d=t.get(["force","layoutAnimation"]);c&&this._startForceLayoutIteration(c,d);var p=t.get("layout");h.graph.eachNode(function(y){var b=y.dataIndex,_=y.getGraphicEl(),x=y.getModel();if(_){_.off("drag").off("dragend");var I=x.get("draggable");I&&_.on("drag",function(L){switch(p){case"force":c.warmUp(),!i._layouting&&i._startForceLayoutIteration(c,d),c.setFixed(b),h.setItemLayout(b,[_.x,_.y]);break;case"circular":h.setItemLayout(b,[_.x,_.y]),y.setLayout({fixed:!0},!0),dn(t,"symbolSize",y,[L.offsetX,L.offsetY]),i.updateLayout(t);break;case"none":default:h.setItemLayout(b,[_.x,_.y]),pn(t.getGraph(),t),i.updateLayout(t);break}}).on("dragend",function(){c&&c.setUnfixed(b)}),_.setDraggable(I,!!x.get("cursor"));var w=x.get(["emphasis","focus"]);w==="adjacency"&&(it(_).focus=y.getAdjacentDataIndices())}}),h.graph.eachEdge(function(y){var b=y.getGraphicEl(),_=y.getModel().get(["emphasis","focus"]);b&&_==="adjacency"&&(it(b).focus={edge:[y.dataIndex],node:[y.node1.dataIndex,y.node2.dataIndex]})});var g=t.get("layout")==="circular"&&t.get(["circular","rotateLabel"]),S=h.getLayout("cx"),m=h.getLayout("cy");h.graph.eachNode(function(y){ss(y,g,S,m)}),this._firstRender=!1},e.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(t,a){var n=this;(function i(){t.step(function(o){n.updateLayout(n._model),(n._layouting=!o)&&(a?n._layoutTimeout=setTimeout(i,16):i())})})()},e.prototype._updateController=function(t,a,n){var i=this,o=this._controller,s=this._controllerHost,l=this.group;if(o.setPointerChecker(function(u,v,h){var f=l.getBoundingRect();return f.applyTransform(l.transform),f.contain(v,h)&&!bo(u,n,t)}),!mi(t.coordinateSystem)){o.disable();return}o.enable(t.get("roam")),s.zoomLimit=t.get("scaleLimit"),s.zoom=t.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",function(u){xo(s,u.dx,u.dy),n.dispatchAction({seriesId:t.id,type:"graphRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){Io(s,u.scale,u.originX,u.originY),n.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),i._updateNodeAndLinkScale(),Kr(t.getGraph(),De(t)),i._lineDraw.updateLayout(),n.updateLabelLayout()})},e.prototype._updateNodeAndLinkScale=function(){var t=this._model,a=t.getData(),n=De(t);a.eachItemGraphicEl(function(i,o){i&&i.setSymbolScale(n)})},e.prototype.updateLayout=function(t){Kr(t.getGraph(),De(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},e.prototype.remove=function(){clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},e.type="graph",e}(ht);function ve(r){return"_EC_"+r}var kh=function(){function r(e){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=e||!1}return r.prototype.isDirected=function(){return this._directed},r.prototype.addNode=function(e,t){e=e==null?""+t:""+e;var a=this._nodesMap;if(!a[ve(e)]){var n=new ne(e,t);return n.hostGraph=this,this.nodes.push(n),a[ve(e)]=n,n}},r.prototype.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},r.prototype.getNodeById=function(e){return this._nodesMap[ve(e)]},r.prototype.addEdge=function(e,t,a){var n=this._nodesMap,i=this._edgesMap;if(Ht(e)&&(e=this.nodes[e]),Ht(t)&&(t=this.nodes[t]),e instanceof ne||(e=n[ve(e)]),t instanceof ne||(t=n[ve(t)]),!(!e||!t)){var o=e.id+"-"+t.id,s=new us(e,t,a);return s.hostGraph=this,this._directed&&(e.outEdges.push(s),t.inEdges.push(s)),e.edges.push(s),e!==t&&t.edges.push(s),this.edges.push(s),i[o]=s,s}},r.prototype.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},r.prototype.getEdge=function(e,t){e instanceof ne&&(e=e.id),t instanceof ne&&(t=t.id);var a=this._edgesMap;return this._directed?a[e+"-"+t]:a[e+"-"+t]||a[t+"-"+e]},r.prototype.eachNode=function(e,t){for(var a=this.nodes,n=a.length,i=0;i<n;i++)a[i].dataIndex>=0&&e.call(t,a[i],i)},r.prototype.eachEdge=function(e,t){for(var a=this.edges,n=a.length,i=0;i<n;i++)a[i].dataIndex>=0&&a[i].node1.dataIndex>=0&&a[i].node2.dataIndex>=0&&e.call(t,a[i],i)},r.prototype.breadthFirstTraverse=function(e,t,a,n){if(t instanceof ne||(t=this._nodesMap[ve(t)]),!!t){for(var i=a==="out"?"outEdges":a==="in"?"inEdges":"edges",o=0;o<this.nodes.length;o++)this.nodes[o].__visited=!1;if(!e.call(n,t,null))for(var s=[t];s.length;)for(var l=s.shift(),u=l[i],o=0;o<u.length;o++){var v=u[o],h=v.node1===l?v.node2:v.node1;if(!h.__visited){if(e.call(n,h,l))return;s.push(h),h.__visited=!0}}}},r.prototype.update=function(){for(var e=this.data,t=this.edgeData,a=this.nodes,n=this.edges,i=0,o=a.length;i<o;i++)a[i].dataIndex=-1;for(var i=0,o=e.count();i<o;i++)a[e.getRawIndex(i)].dataIndex=i;t.filterSelf(function(s){var l=n[t.getRawIndex(s)];return l.node1.dataIndex>=0&&l.node2.dataIndex>=0});for(var i=0,o=n.length;i<o;i++)n[i].dataIndex=-1;for(var i=0,o=t.count();i<o;i++)n[t.getRawIndex(i)].dataIndex=i},r.prototype.clone=function(){for(var e=new r(this._directed),t=this.nodes,a=this.edges,n=0;n<t.length;n++)e.addNode(t[n].id,t[n].dataIndex);for(var n=0;n<a.length;n++){var i=a[n];e.addEdge(i.node1.id,i.node2.id,i.dataIndex)}return e},r}(),ne=function(){function r(e,t){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=e==null?"":e,this.dataIndex=t==null?-1:t}return r.prototype.degree=function(){return this.edges.length},r.prototype.inDegree=function(){return this.inEdges.length},r.prototype.outDegree=function(){return this.outEdges.length},r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostGraph,a=t.data.getItemModel(this.dataIndex);return a.getModel(e)}},r.prototype.getAdjacentDataIndices=function(){for(var e={edge:[],node:[]},t=0;t<this.edges.length;t++){var a=this.edges[t];a.dataIndex<0||(e.edge.push(a.dataIndex),e.node.push(a.node1.dataIndex,a.node2.dataIndex))}return e},r.prototype.getTrajectoryDataIndices=function(){for(var e=mt(),t=mt(),a=0;a<this.edges.length;a++){var n=this.edges[a];if(!(n.dataIndex<0)){e.set(n.dataIndex,!0);for(var i=[n.node1],o=[n.node2],s=0;s<i.length;){var l=i[s];s++,t.set(l.dataIndex,!0);for(var u=0;u<l.inEdges.length;u++)e.set(l.inEdges[u].dataIndex,!0),i.push(l.inEdges[u].node1)}for(s=0;s<o.length;){var v=o[s];s++,t.set(v.dataIndex,!0);for(var u=0;u<v.outEdges.length;u++)e.set(v.outEdges[u].dataIndex,!0),o.push(v.outEdges[u].node2)}}}return{edge:e.keys(),node:t.keys()}},r}(),us=function(){function r(e,t,a){this.dataIndex=-1,this.node1=e,this.node2=t,this.dataIndex=a==null?-1:a}return r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostGraph,a=t.edgeData.getItemModel(this.dataIndex);return a.getModel(e)}},r.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},r.prototype.getTrajectoryDataIndices=function(){var e=mt(),t=mt();e.set(this.dataIndex,!0);for(var a=[this.node1],n=[this.node2],i=0;i<a.length;){var o=a[i];i++,t.set(o.dataIndex,!0);for(var s=0;s<o.inEdges.length;s++)e.set(o.inEdges[s].dataIndex,!0),a.push(o.inEdges[s].node1)}for(i=0;i<n.length;){var l=n[i];i++,t.set(l.dataIndex,!0);for(var s=0;s<l.outEdges.length;s++)e.set(l.outEdges[s].dataIndex,!0),n.push(l.outEdges[s].node2)}return{edge:e.keys(),node:t.keys()}},r}();function vs(r,e){return{getValue:function(t){var a=this[r][e];return a.getStore().get(a.getDimensionIndex(t||"value"),this.dataIndex)},setVisual:function(t,a){this.dataIndex>=0&&this[r][e].setItemVisual(this.dataIndex,t,a)},getVisual:function(t){return this[r][e].getItemVisual(this.dataIndex,t)},setLayout:function(t,a){this.dataIndex>=0&&this[r][e].setItemLayout(this.dataIndex,t,a)},getLayout:function(){return this[r][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[r][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[r][e].getRawIndex(this.dataIndex)}}}ye(ne,vs("hostGraph","data"));ye(us,vs("hostGraph","edgeData"));function hs(r,e,t,a,n){for(var i=new kh(a),o=0;o<r.length;o++)i.addNode(Nt(r[o].id,r[o].name,o),o);for(var s=[],l=[],u=0,o=0;o<e.length;o++){var v=e[o],h=v.source,f=v.target;i.addEdge(h,f,u)&&(l.push(v),s.push(Nt(xr(v.id,null),h+" > "+f)),u++)}var c=t.get("coordinateSystem"),d;if(c==="cartesian2d"||c==="polar")d=Fe(r,t);else{var p=Eo.get(c),g=p?p.dimensions||[]:[];wt(g,"value")<0&&g.concat(["value"]);var S=Fa(r,{coordDimensions:g,encodeDefine:t.getEncode()}).dimensions;d=new bt(S,t),d.initData(r)}var m=new bt(["value"],t);return m.initData(l,s),n&&n(d,m),Yo({mainData:d,struct:i,structAttr:"graph",datas:{node:d,edge:m},datasAttr:{node:"data",edge:"edgeData"}}),i.update(),i}var Gh=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments);var a=this;function n(){return a._categoriesData}this.legendVisualProvider=new qa(n,n),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(t){r.prototype.mergeDefaultAndTheme.apply(this,arguments),Ka(t,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,a){var n=t.edges||t.links||[],i=t.data||t.nodes||[],o=this;{Ih(this);var s=hs(i,n,this,!0,l);return R(s.edges,function(u){wh(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,v){u.wrapMethod("getItemModel",function(d){var p=o._categoriesModels,g=d.getShallow("category"),S=p[g];return S&&(S.parentModel=d.parentModel,d.parentModel=S),d});var h=jt.prototype.getModel;function f(d,p){var g=h.call(this,d,p);return g.resolveParentPath=c,g}v.wrapMethod("getItemModel",function(d){return d.resolveParentPath=c,d.getModel=f,d});function c(d){if(d&&(d[0]==="label"||d[1]==="label")){var p=d.slice();return d[0]==="label"?p[0]="edgeLabel":d[1]==="label"&&(p[1]="edgeLabel"),p}return d}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(t,a,n){if(n==="edge"){var i=this.getData(),o=this.getDataParams(t,n),s=i.graph.getEdgeByIndex(t),l=i.getName(s.node1.dataIndex),u=i.getName(s.node2.dataIndex),v=[];return l!=null&&v.push(l),u!=null&&v.push(u),Ot("nameValue",{name:v.join(" > "),value:o.value,noValue:o.value==null})}var h=il({series:this,dataIndex:t,multipleSeries:a});return h},e.prototype._updateCategoriesData=function(){var t=W(this.option.categories||[],function(n){return n.value!=null?n:U({value:0},n)}),a=new bt(["value"],this);a.initData(t),this._categoriesData=a,this._categoriesModels=a.mapArray(function(n){return a.getItemModel(n)})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return r.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(ft),zh={type:"graphRoam",event:"graphRoam",update:"none"};function Bh(r){r.registerChartView(Vh),r.registerSeriesModel(Gh),r.registerProcessor(mh),r.registerVisual(Sh),r.registerVisual(_h),r.registerLayout(Lh),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,Th),r.registerLayout(Ch),r.registerCoordinateSystem("graphView",{dimensions:Ha.dimensions,create:Ph}),r.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},Me),r.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},Me),r.registerAction(zh,function(e,t,a){t.eachComponent({mainType:"series",query:e},function(n){var i=n.coordinateSystem,o=Do(i,e,void 0,a);n.setCenter&&n.setCenter(o.center),n.setZoom&&n.setZoom(o.zoom)})})}var Oh=function(){function r(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return r}(),Hh=function(r){k(e,r);function e(t){var a=r.call(this,t)||this;return a.type="pointer",a}return e.prototype.getDefaultShape=function(){return new Oh},e.prototype.buildPath=function(t,a){var n=Math.cos,i=Math.sin,o=a.r,s=a.width,l=a.angle,u=a.x-n(l)*s*(s>=o/3?1:2),v=a.y-i(l)*s*(s>=o/3?1:2);l=a.angle-Math.PI/2,t.moveTo(u,v),t.lineTo(a.x+n(l)*s,a.y+i(l)*s),t.lineTo(a.x+n(a.angle)*o,a.y+i(a.angle)*o),t.lineTo(a.x-n(l)*s,a.y-i(l)*s),t.lineTo(u,v)},e}(yt);function Fh(r,e){var t=r.get("center"),a=e.getWidth(),n=e.getHeight(),i=Math.min(a,n),o=B(t[0],e.getWidth()),s=B(t[1],e.getHeight()),l=B(r.get("radius"),i/2);return{cx:o,cy:s,r:l}}function Ke(r,e){var t=r==null?"":r+"";return e&&(St(e)?t=e.replace("{value}",t):nt(e)&&(t=e(r))),t}var Wh=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){this.group.removeAll();var i=t.get(["axisLine","lineStyle","color"]),o=Fh(t,n);this._renderMain(t,a,n,i,o),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,a,n,i,o){var s=this.group,l=t.get("clockwise"),u=-t.get("startAngle")/180*Math.PI,v=-t.get("endAngle")/180*Math.PI,h=t.getModel("axisLine"),f=h.get("roundCap"),c=f?On:Ne,d=h.get("show"),p=h.getModel("lineStyle"),g=p.get("width"),S=[u,v];ol(S,!l),u=S[0],v=S[1];for(var m=v-u,y=u,b=[],_=0;d&&_<i.length;_++){var x=Math.min(Math.max(i[_][0],0),1);v=u+m*x;var I=new c({shape:{startAngle:y,endAngle:v,cx:o.cx,cy:o.cy,clockwise:l,r0:o.r-g,r:o.r},silent:!0});I.setStyle({fill:i[_][1]}),I.setStyle(p.getLineStyle(["color","width"])),b.push(I),y=v}b.reverse(),R(b,function(L){return s.add(L)});var w=function(L){if(L<=0)return i[0][1];var D;for(D=0;D<i.length;D++)if(i[D][0]>=L&&(D===0?0:i[D-1][0])<L)return i[D][1];return i[D-1][1]};this._renderTicks(t,a,n,w,o,u,v,l,g),this._renderTitleAndDetail(t,a,n,w,o),this._renderAnchor(t,o),this._renderPointer(t,a,n,w,o,u,v,l,g)},e.prototype._renderTicks=function(t,a,n,i,o,s,l,u,v){for(var h=this.group,f=o.cx,c=o.cy,d=o.r,p=+t.get("min"),g=+t.get("max"),S=t.getModel("splitLine"),m=t.getModel("axisTick"),y=t.getModel("axisLabel"),b=t.get("splitNumber"),_=m.get("splitNumber"),x=B(S.get("length"),d),I=B(m.get("length"),d),w=s,L=(l-s)/b,D=L/_,T=S.getModel("lineStyle").getLineStyle(),A=m.getModel("lineStyle").getLineStyle(),P=S.get("distance"),C,M,E=0;E<=b;E++){if(C=Math.cos(w),M=Math.sin(w),S.get("show")){var N=P?P+v:v,V=new sr({shape:{x1:C*(d-N)+f,y1:M*(d-N)+c,x2:C*(d-x-N)+f,y2:M*(d-x-N)+c},style:T,silent:!0});T.stroke==="auto"&&V.setStyle({stroke:i(E/b)}),h.add(V)}if(y.get("show")){var N=y.get("distance")+P,G=Ke(Mo(E/b*(g-p)+p),y.get("formatter")),O=i(E/b),z=C*(d-x-N)+f,K=M*(d-x-N)+c,X=y.get("rotate"),$=0;X==="radial"?($=-w+2*Math.PI,$>Math.PI/2&&($+=Math.PI)):X==="tangential"?$=-w-Math.PI/2:Ht(X)&&($=X*Math.PI/180),$===0?h.add(new Zt({style:kt(y,{text:G,x:z,y:K,verticalAlign:M<-.8?"top":M>.8?"bottom":"middle",align:C<-.4?"left":C>.4?"right":"center"},{inheritColor:O}),silent:!0})):h.add(new Zt({style:kt(y,{text:G,x:z,y:K,verticalAlign:"middle",align:"center"},{inheritColor:O}),silent:!0,originX:z,originY:K,rotation:$}))}if(m.get("show")&&E!==b){var N=m.get("distance");N=N?N+v:v;for(var q=0;q<=_;q++){C=Math.cos(w),M=Math.sin(w);var ut=new sr({shape:{x1:C*(d-N)+f,y1:M*(d-N)+c,x2:C*(d-I-N)+f,y2:M*(d-I-N)+c},silent:!0,style:A});A.stroke==="auto"&&ut.setStyle({stroke:i((E+q/_)/b)}),h.add(ut),w+=D}w-=D}else w+=L}},e.prototype._renderPointer=function(t,a,n,i,o,s,l,u,v){var h=this.group,f=this._data,c=this._progressEls,d=[],p=t.get(["pointer","show"]),g=t.getModel("progress"),S=g.get("show"),m=t.getData(),y=m.mapDimension("value"),b=+t.get("min"),_=+t.get("max"),x=[b,_],I=[s,l];function w(D,T){var A=m.getItemModel(D),P=A.getModel("pointer"),C=B(P.get("width"),o.r),M=B(P.get("length"),o.r),E=t.get(["pointer","icon"]),N=P.get("offsetCenter"),V=B(N[0],o.r),G=B(N[1],o.r),O=P.get("keepAspect"),z;return E?z=Ee(E,V-C/2,G-M,C,M,null,O):z=new Hh({shape:{angle:-Math.PI/2,width:C,r:M,x:V,y:G}}),z.rotation=-(T+Math.PI/2),z.x=o.cx,z.y=o.cy,z}function L(D,T){var A=g.get("roundCap"),P=A?On:Ne,C=g.get("overlap"),M=C?g.get("width"):v/m.count(),E=C?o.r-M:o.r-(D+1)*M,N=C?o.r:o.r-D*M,V=new P({shape:{startAngle:s,endAngle:T,cx:o.cx,cy:o.cy,clockwise:u,r0:E,r:N}});return C&&(V.z2=At(m.get(y,D),[b,_],[100,0],!0)),V}(S||p)&&(m.diff(f).add(function(D){var T=m.get(y,D);if(p){var A=w(D,s);It(A,{rotation:-((isNaN(+T)?I[0]:At(T,x,I,!0))+Math.PI/2)},t),h.add(A),m.setItemGraphicEl(D,A)}if(S){var P=L(D,s),C=g.get("clip");It(P,{shape:{endAngle:At(T,x,I,C)}},t),h.add(P),Bn(t.seriesIndex,m.dataType,D,P),d[D]=P}}).update(function(D,T){var A=m.get(y,D);if(p){var P=f.getItemGraphicEl(T),C=P?P.rotation:s,M=w(D,C);M.rotation=C,ot(M,{rotation:-((isNaN(+A)?I[0]:At(A,x,I,!0))+Math.PI/2)},t),h.add(M),m.setItemGraphicEl(D,M)}if(S){var E=c[T],N=E?E.shape.endAngle:s,V=L(D,N),G=g.get("clip");ot(V,{shape:{endAngle:At(A,x,I,G)}},t),h.add(V),Bn(t.seriesIndex,m.dataType,D,V),d[D]=V}}).execute(),m.each(function(D){var T=m.getItemModel(D),A=T.getModel("emphasis"),P=A.get("focus"),C=A.get("blurScope"),M=A.get("disabled");if(p){var E=m.getItemGraphicEl(D),N=m.getItemVisual(D,"style"),V=N.fill;if(E instanceof ja){var G=E.style;E.useStyle(U({image:G.image,x:G.x,y:G.y,width:G.width,height:G.height},N))}else E.useStyle(N),E.type!=="pointer"&&E.setColor(V);E.setStyle(T.getModel(["pointer","itemStyle"]).getItemStyle()),E.style.fill==="auto"&&E.setStyle("fill",i(At(m.get(y,D),x,[0,1],!0))),E.z2EmphasisLift=0,Pt(E,T),st(E,P,C,M)}if(S){var O=d[D];O.useStyle(m.getItemVisual(D,"style")),O.setStyle(T.getModel(["progress","itemStyle"]).getItemStyle()),O.z2EmphasisLift=0,Pt(O,T),st(O,P,C,M)}}),this._progressEls=d)},e.prototype._renderAnchor=function(t,a){var n=t.getModel("anchor"),i=n.get("show");if(i){var o=n.get("size"),s=n.get("icon"),l=n.get("offsetCenter"),u=n.get("keepAspect"),v=Ee(s,a.cx-o/2+B(l[0],a.r),a.cy-o/2+B(l[1],a.r),o,o,null,u);v.z2=n.get("showAbove")?1:0,v.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(v)}},e.prototype._renderTitleAndDetail=function(t,a,n,i,o){var s=this,l=t.getData(),u=l.mapDimension("value"),v=+t.get("min"),h=+t.get("max"),f=new rt,c=[],d=[],p=t.isAnimationEnabled(),g=t.get(["pointer","showAbove"]);l.diff(this._data).add(function(S){c[S]=new Zt({silent:!0}),d[S]=new Zt({silent:!0})}).update(function(S,m){c[S]=s._titleEls[m],d[S]=s._detailEls[m]}).execute(),l.each(function(S){var m=l.getItemModel(S),y=l.get(u,S),b=new rt,_=i(At(y,[v,h],[0,1],!0)),x=m.getModel("title");if(x.get("show")){var I=x.get("offsetCenter"),w=o.cx+B(I[0],o.r),L=o.cy+B(I[1],o.r),D=c[S];D.attr({z2:g?0:2,style:kt(x,{x:w,y:L,text:l.getName(S),align:"center",verticalAlign:"middle"},{inheritColor:_})}),b.add(D)}var T=m.getModel("detail");if(T.get("show")){var A=T.get("offsetCenter"),P=o.cx+B(A[0],o.r),C=o.cy+B(A[1],o.r),M=B(T.get("width"),o.r),E=B(T.get("height"),o.r),N=t.get(["progress","show"])?l.getItemVisual(S,"style").fill:_,D=d[S],V=T.get("formatter");D.attr({z2:g?0:2,style:kt(T,{x:P,y:C,text:Ke(y,V),width:isNaN(M)?null:M,height:isNaN(E)?null:E,align:"center",verticalAlign:"middle"},{inheritColor:N})}),sl(D,{normal:T},y,function(O){return Ke(O,V)}),p&&So(D,S,l,t,{getFormattedLabel:function(O,z,K,X,$,q){return Ke(q?q.interpolatedValue:y,V)}}),b.add(D)}f.add(b)}),this.group.add(f),this._titleEls=c,this._detailEls=d},e.type="gauge",e}(ht),Uh=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="itemStyle",t}return e.prototype.getInitialData=function(t,a){return Qa(this,["value"])},e.type="series.gauge",e.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(ft);function $h(r){r.registerChartView(Wh),r.registerSeriesModel(Uh)}var Zh=["itemStyle","opacity"],Yh=function(r){k(e,r);function e(t,a){var n=r.call(this)||this,i=n,o=new Ja,s=new Zt;return i.setTextContent(s),n.setTextGuideLine(o),n.updateData(t,a,!0),n}return e.prototype.updateData=function(t,a,n){var i=this,o=t.hostModel,s=t.getItemModel(a),l=t.getItemLayout(a),u=s.getModel("emphasis"),v=s.get(Zh);v=v==null?1:v,n||me(i),i.useStyle(t.getItemVisual(a,"style")),i.style.lineJoin="round",n?(i.setShape({points:l.points}),i.style.opacity=0,It(i,{style:{opacity:v}},o,a)):ot(i,{style:{opacity:v},shape:{points:l.points}},o,a),Pt(i,s),this._updateLabel(t,a),st(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t,a){var n=this,i=this.getTextGuideLine(),o=n.getTextContent(),s=t.hostModel,l=t.getItemModel(a),u=t.getItemLayout(a),v=u.label,h=t.getItemVisual(a,"style"),f=h.fill;Qt(o,Rt(l),{labelFetcher:t.hostModel,labelDataIndex:a,defaultOpacity:h.opacity,defaultText:t.getName(a)},{normal:{align:v.textAlign,verticalAlign:v.verticalAlign}}),n.setTextConfig({local:!0,inside:!!v.inside,insideStroke:f,outsideFill:f});var c=v.linePoints;i.setShape({points:c}),n.textGuideLineConfig={anchor:c?new Yt(c[0][0],c[0][1]):null},ot(o,{style:{x:v.x,y:v.y}},s,a),o.attr({rotation:v.rotation,originX:v.x,originY:v.y,z2:10}),yo(n,mo(l),{stroke:f})},e}(Pe),Xh=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.ignoreLabelLineUpdate=!0,t}return e.prototype.render=function(t,a,n){var i=t.getData(),o=this._data,s=this.group;i.diff(o).add(function(l){var u=new Yh(i,l);i.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var v=o.getItemGraphicEl(u);v.updateData(i,l),s.add(v),i.setItemGraphicEl(l,v)}).remove(function(l){var u=o.getItemGraphicEl(l);ll(u,t,l)}).execute(),this._data=i},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(ht),qh=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new qa(lt(this.getData,this),lt(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.getInitialData=function(t,a){return Qa(this,{coordDimensions:["value"],encodeDefaulter:et(ul,this)})},e.prototype._defaultLabelLine=function(t){Ka(t,"labelLine",["show"]);var a=t.labelLine,n=t.emphasis.labelLine;a.show=a.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.prototype.getDataParams=function(t){var a=this.getData(),n=r.prototype.getDataParams.call(this,t),i=a.mapDimension("value"),o=a.getSum(i);return n.percent=o?+(a.get(i,t)/o*100).toFixed(2):0,n.$vars.push("percent"),n},e.type="series.funnel",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(ft);function Kh(r,e){return ge(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function jh(r,e){for(var t=r.mapDimension("value"),a=r.mapArray(t,function(l){return l}),n=[],i=e==="ascending",o=0,s=r.count();o<s;o++)n[o]=o;return nt(e)?n.sort(e):e!=="none"&&n.sort(function(l,u){return i?a[l]-a[u]:a[u]-a[l]}),n}function Qh(r){var e=r.hostModel,t=e.get("orient");r.each(function(a){var n=r.getItemModel(a),i=n.getModel("label"),o=i.get("position"),s=n.getModel("labelLine"),l=r.getItemLayout(a),u=l.points,v=o==="inner"||o==="inside"||o==="center"||o==="insideLeft"||o==="insideRight",h,f,c,d;if(v)o==="insideLeft"?(f=(u[0][0]+u[3][0])/2+5,c=(u[0][1]+u[3][1])/2,h="left"):o==="insideRight"?(f=(u[1][0]+u[2][0])/2-5,c=(u[1][1]+u[2][1])/2,h="right"):(f=(u[0][0]+u[1][0]+u[2][0]+u[3][0])/4,c=(u[0][1]+u[1][1]+u[2][1]+u[3][1])/4,h="center"),d=[[f,c],[f,c]];else{var p=void 0,g=void 0,S=void 0,m=void 0,y=s.get("length");o==="left"?(p=(u[3][0]+u[0][0])/2,g=(u[3][1]+u[0][1])/2,S=p-y,f=S-5,h="right"):o==="right"?(p=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,S=p+y,f=S+5,h="left"):o==="top"?(p=(u[3][0]+u[0][0])/2,g=(u[3][1]+u[0][1])/2,m=g-y,c=m-5,h="center"):o==="bottom"?(p=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,m=g+y,c=m+5,h="center"):o==="rightTop"?(p=t==="horizontal"?u[3][0]:u[1][0],g=t==="horizontal"?u[3][1]:u[1][1],t==="horizontal"?(m=g-y,c=m-5,h="center"):(S=p+y,f=S+5,h="top")):o==="rightBottom"?(p=u[2][0],g=u[2][1],t==="horizontal"?(m=g+y,c=m+5,h="center"):(S=p+y,f=S+5,h="bottom")):o==="leftTop"?(p=u[0][0],g=t==="horizontal"?u[0][1]:u[1][1],t==="horizontal"?(m=g-y,c=m-5,h="center"):(S=p-y,f=S-5,h="right")):o==="leftBottom"?(p=t==="horizontal"?u[1][0]:u[3][0],g=t==="horizontal"?u[1][1]:u[2][1],t==="horizontal"?(m=g+y,c=m+5,h="center"):(S=p-y,f=S-5,h="right")):(p=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,t==="horizontal"?(m=g+y,c=m+5,h="center"):(S=p+y,f=S+5,h="left")),t==="horizontal"?(S=p,f=S):(m=g,c=m),d=[[p,g],[S,m]]}l.label={linePoints:d,x:f,y:c,verticalAlign:"middle",textAlign:h,inside:v}})}function Jh(r,e){r.eachSeriesByType("funnel",function(t){var a=t.getData(),n=a.mapDimension("value"),i=t.get("sort"),o=Kh(t,e),s=t.get("orient"),l=o.width,u=o.height,v=jh(a,i),h=o.x,f=o.y,c=s==="horizontal"?[B(t.get("minSize"),u),B(t.get("maxSize"),u)]:[B(t.get("minSize"),l),B(t.get("maxSize"),l)],d=a.getDataExtent(n),p=t.get("min"),g=t.get("max");p==null&&(p=Math.min(d[0],0)),g==null&&(g=d[1]);var S=t.get("funnelAlign"),m=t.get("gap"),y=s==="horizontal"?l:u,b=(y-m*(a.count()-1))/a.count(),_=function(C,M){if(s==="horizontal"){var E=a.get(n,C)||0,N=At(E,[p,g],c,!0),V=void 0;switch(S){case"top":V=f;break;case"center":V=f+(u-N)/2;break;case"bottom":V=f+(u-N);break}return[[M,V],[M,V+N]]}var G=a.get(n,C)||0,O=At(G,[p,g],c,!0),z;switch(S){case"left":z=h;break;case"center":z=h+(l-O)/2;break;case"right":z=h+l-O;break}return[[z,M],[z+O,M]]};i==="ascending"&&(b=-b,m=-m,s==="horizontal"?h+=l:f+=u,v=v.reverse());for(var x=0;x<v.length;x++){var I=v[x],w=v[x+1],L=a.getItemModel(I);if(s==="horizontal"){var D=L.get(["itemStyle","width"]);D==null?D=b:(D=B(D,l),i==="ascending"&&(D=-D));var T=_(I,h),A=_(w,h+D);h+=D+m,a.setItemLayout(I,{points:T.concat(A.slice().reverse())})}else{var P=L.get(["itemStyle","height"]);P==null?P=b:(P=B(P,u),i==="ascending"&&(P=-P));var T=_(I,f),A=_(w,f+P);f+=P+m,a.setItemLayout(I,{points:T.concat(A.slice().reverse())})}}Qh(a)})}function tf(r){r.registerChartView(Xh),r.registerSeriesModel(qh),r.registerLayout(Jh),r.registerProcessor(tn("funnel"))}var ef=.3,rf=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._dataGroup=new rt,t._initialized=!1,t}return e.prototype.init=function(){this.group.add(this._dataGroup)},e.prototype.render=function(t,a,n,i){this._progressiveEls=null;var o=this._dataGroup,s=t.getData(),l=this._data,u=t.coordinateSystem,v=u.dimensions,h=_i(t);s.diff(l).add(f).update(c).remove(d).execute();function f(g){var S=Si(s,o,g,v,u);jr(S,s,g,h)}function c(g,S){var m=l.getItemGraphicEl(S),y=fs(s,g,v,u);s.setItemGraphicEl(g,m),ot(m,{shape:{points:y}},t,g),me(m),jr(m,s,g,h)}function d(g){var S=l.getItemGraphicEl(g);o.remove(S)}if(!this._initialized){this._initialized=!0;var p=af(u,t,function(){setTimeout(function(){o.removeClipPath()})});o.setClipPath(p)}this._data=s},e.prototype.incrementalPrepareRender=function(t,a,n){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},e.prototype.incrementalRender=function(t,a,n){for(var i=a.getData(),o=a.coordinateSystem,s=o.dimensions,l=_i(a),u=this._progressiveEls=[],v=t.start;v<t.end;v++){var h=Si(i,this._dataGroup,v,s,o);h.incremental=!0,jr(h,i,v,l),u.push(h)}},e.prototype.remove=function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null},e.type="parallel",e}(ht);function af(r,e,t){var a=r.model,n=r.getRect(),i=new Jt({shape:{x:n.x,y:n.y,width:n.width,height:n.height}}),o=a.get("layout")==="horizontal"?"width":"height";return i.setShape(o,0),It(i,{shape:{width:n.width,height:n.height}},e,t),i}function fs(r,e,t,a){for(var n=[],i=0;i<t.length;i++){var o=t[i],s=r.get(r.mapDimension(o),e);nf(s,a.getAxis(o).type)||n.push(a.dataToPoint(s,o))}return n}function Si(r,e,t,a,n){var i=fs(r,t,a,n),o=new Ja({shape:{points:i},z2:10});return e.add(o),r.setItemGraphicEl(t,o),o}function _i(r){var e=r.get("smooth",!0);return e===!0&&(e=ef),e=vl(e),hl(e)&&(e=0),{smooth:e}}function jr(r,e,t,a){r.useStyle(e.getItemVisual(t,"style")),r.style.fill=null,r.setShape("smooth",a.smooth);var n=e.getItemModel(t),i=n.getModel("emphasis");Pt(r,n,"lineStyle"),st(r,i.get("focus"),i.get("blurScope"),i.get("disabled"))}function nf(r,e){return e==="category"?r==null:r==null||isNaN(r)}var of=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="lineStyle",t.visualDrawType="stroke",t}return e.prototype.getInitialData=function(t,a){return Fe(null,this,{useEncodeDefaulter:lt(sf,null,this)})},e.prototype.getRawIndicesByActiveState=function(t){var a=this.coordinateSystem,n=this.getData(),i=[];return a.eachActiveState(n,function(o,s){t===o&&i.push(n.getRawIndex(s))}),i},e.type="series.parallel",e.dependencies=["parallel"],e.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"},e}(ft);function sf(r){var e=r.ecModel.getComponent("parallel",r.get("parallelIndex"));if(e){var t={};return R(e.dimensions,function(a){var n=lf(a);t[a]=n}),t}}function lf(r){return+r.replace("dim","")}var uf=["lineStyle","opacity"],vf={seriesType:"parallel",reset:function(r,e){var t=r.coordinateSystem,a={normal:r.get(["lineStyle","opacity"]),active:r.get("activeOpacity"),inactive:r.get("inactiveOpacity")};return{progress:function(n,i){t.eachActiveState(i,function(o,s){var l=a[o];if(o==="normal"&&i.hasItemOption){var u=i.getItemModel(s).get(uf,!0);u!=null&&(l=u)}var v=i.ensureUniqueItemVisual(s,"style");v.opacity=l},n.start,n.end)}}}};function hf(r){Y(No),r.registerChartView(rf),r.registerSeriesModel(of),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,vf)}var ff=function(){function r(){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 r}(),cf=function(r){k(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new ff},e.prototype.buildPath=function(t,a){var n=a.extent;t.moveTo(a.x1,a.y1),t.bezierCurveTo(a.cpx1,a.cpy1,a.cpx2,a.cpy2,a.x2,a.y2),a.orient==="vertical"?(t.lineTo(a.x2+n,a.y2),t.bezierCurveTo(a.cpx2+n,a.cpy2,a.cpx1+n,a.cpy1,a.x1+n,a.y1)):(t.lineTo(a.x2,a.y2+n),t.bezierCurveTo(a.cpx2,a.cpy2+n,a.cpx1,a.cpy1+n,a.x1,a.y1+n)),t.closePath()},e.prototype.highlight=function(){Ua(this)},e.prototype.downplay=function(){$a(this)},e}(yt),pf=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._focusAdjacencyDisabled=!1,t}return e.prototype.render=function(t,a,n){var i=this,o=t.getGraph(),s=this.group,l=t.layoutInfo,u=l.width,v=l.height,h=t.getData(),f=t.getData("edge"),c=t.get("orient");this._model=t,s.removeAll(),s.x=l.x,s.y=l.y,o.eachEdge(function(d){var p=new cf,g=it(p);g.dataIndex=d.dataIndex,g.seriesIndex=t.seriesIndex,g.dataType="edge";var S=d.getModel(),m=S.getModel("lineStyle"),y=m.get("curveness"),b=d.node1.getLayout(),_=d.node1.getModel(),x=_.get("localX"),I=_.get("localY"),w=d.node2.getLayout(),L=d.node2.getModel(),D=L.get("localX"),T=L.get("localY"),A=d.getLayout(),P,C,M,E,N,V,G,O;p.shape.extent=Math.max(1,A.dy),p.shape.orient=c,c==="vertical"?(P=(x!=null?x*u:b.x)+A.sy,C=(I!=null?I*v:b.y)+b.dy,M=(D!=null?D*u:w.x)+A.ty,E=T!=null?T*v:w.y,N=P,V=C*(1-y)+E*y,G=M,O=C*y+E*(1-y)):(P=(x!=null?x*u:b.x)+b.dx,C=(I!=null?I*v:b.y)+A.sy,M=D!=null?D*u:w.x,E=(T!=null?T*v:w.y)+A.ty,N=P*(1-y)+M*y,V=C,G=P*y+M*(1-y),O=E),p.setShape({x1:P,y1:C,x2:M,y2:E,cpx1:N,cpy1:V,cpx2:G,cpy2:O}),p.useStyle(m.getItemStyle()),bi(p.style,c,d);var z=""+S.get("value"),K=Rt(S,"edgeLabel");Qt(p,K,{labelFetcher:{getFormattedLabel:function(q,ut,Wt,Z,H,Q){return t.getFormattedLabel(q,ut,"edge",Z,Oe(H,K.normal&&K.normal.get("formatter"),z),Q)}},labelDataIndex:d.dataIndex,defaultText:z}),p.setTextConfig({position:"inside"});var X=S.getModel("emphasis");Pt(p,S,"lineStyle",function(q){var ut=q.getItemStyle();return bi(ut,c,d),ut}),s.add(p),f.setItemGraphicEl(d.dataIndex,p);var $=X.get("focus");st(p,$==="adjacency"?d.getAdjacentDataIndices():$==="trajectory"?d.getTrajectoryDataIndices():$,X.get("blurScope"),X.get("disabled"))}),o.eachNode(function(d){var p=d.getLayout(),g=d.getModel(),S=g.get("localX"),m=g.get("localY"),y=g.getModel("emphasis"),b=g.get(["itemStyle","borderRadius"])||0,_=new Jt({shape:{x:S!=null?S*u:p.x,y:m!=null?m*v:p.y,width:p.dx,height:p.dy,r:b},style:g.getModel("itemStyle").getItemStyle(),z2:10});Qt(_,Rt(g),{labelFetcher:{getFormattedLabel:function(I,w){return t.getFormattedLabel(I,w,"node")}},labelDataIndex:d.dataIndex,defaultText:d.id}),_.disableLabelAnimation=!0,_.setStyle("fill",d.getVisual("color")),_.setStyle("decal",d.getVisual("style").decal),Pt(_,g),s.add(_),h.setItemGraphicEl(d.dataIndex,_),it(_).dataType="node";var x=y.get("focus");st(_,x==="adjacency"?d.getAdjacentDataIndices():x==="trajectory"?d.getTrajectoryDataIndices():x,y.get("blurScope"),y.get("disabled"))}),h.eachItemGraphicEl(function(d,p){var g=h.getItemModel(p);g.get("draggable")&&(d.drift=function(S,m){i._focusAdjacencyDisabled=!0,this.shape.x+=S,this.shape.y+=m,this.dirty(),n.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:h.getRawIndex(p),localX:this.shape.x/u,localY:this.shape.y/v})},d.ondragend=function(){i._focusAdjacencyDisabled=!1},d.draggable=!0,d.cursor="move")}),!this._data&&t.isAnimationEnabled()&&s.setClipPath(df(s.getBoundingRect(),t,function(){s.removeClipPath()})),this._data=t.getData()},e.prototype.dispose=function(){},e.type="sankey",e}(ht);function bi(r,e,t){switch(r.fill){case"source":r.fill=t.node1.getVisual("color"),r.decal=t.node1.getVisual("style").decal;break;case"target":r.fill=t.node2.getVisual("color"),r.decal=t.node2.getVisual("style").decal;break;case"gradient":var a=t.node1.getVisual("color"),n=t.node2.getVisual("color");St(a)&&St(n)&&(r.fill=new fl(0,0,+(e==="horizontal"),+(e==="vertical"),[{color:a,offset:0},{color:n,offset:1}]))}}function df(r,e,t){var a=new Jt({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return It(a,{shape:{width:r.width+20}},e,t),a}var gf=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,a){var n=t.edges||t.links||[],i=t.data||t.nodes||[],o=t.levels||[];this.levelModels=[];for(var s=this.levelModels,l=0;l<o.length;l++)o[l].depth!=null&&o[l].depth>=0&&(s[o[l].depth]=new jt(o[l],this,a));var u=hs(i,n,this,!0,v);return u.data;function v(h,f){h.wrapMethod("getItemModel",function(c,d){var p=c.parentModel,g=p.getData().getItemLayout(d);if(g){var S=g.depth,m=p.levelModels[S];m&&(c.parentModel=m)}return c}),f.wrapMethod("getItemModel",function(c,d){var p=c.parentModel,g=p.getGraph().getEdgeByIndex(d),S=g.node1.getLayout();if(S){var m=S.depth,y=p.levelModels[m];y&&(c.parentModel=y)}return c})}},e.prototype.setNodePosition=function(t,a){var n=this.option.data||this.option.nodes,i=n[t];i.localX=a[0],i.localY=a[1]},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,a,n){function i(c){return isNaN(c)||c==null}if(n==="edge"){var o=this.getDataParams(t,n),s=o.data,l=o.value,u=s.source+" -- "+s.target;return Ot("nameValue",{name:u,value:l,noValue:i(l)})}else{var v=this.getGraph().getNodeByIndex(t),h=v.getLayout().value,f=this.getDataParams(t,n).data.name;return Ot("nameValue",{name:f!=null?f+"":null,value:h,noValue:i(h)})}},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(t,a){var n=r.prototype.getDataParams.call(this,t,a);if(n.value==null&&a==="node"){var i=this.getGraph().getNodeByIndex(t),o=i.getLayout().value;n.value=o}return n},e.type="series.sankey",e.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},e}(ft);function yf(r,e){r.eachSeriesByType("sankey",function(t){var a=t.get("nodeWidth"),n=t.get("nodeGap"),i=mf(t,e);t.layoutInfo=i;var o=i.width,s=i.height,l=t.getGraph(),u=l.nodes,v=l.edges;_f(u);var h=Ct(u,function(p){return p.getLayout().value===0}),f=h.length!==0?0:t.get("layoutIterations"),c=t.get("orient"),d=t.get("nodeAlign");Sf(u,v,a,n,o,s,f,c,d)})}function mf(r,e){return ge(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function Sf(r,e,t,a,n,i,o,s,l){bf(r,e,t,n,i,s,l),Lf(r,e,i,n,a,o,s),Rf(r,s)}function _f(r){R(r,function(e){var t=Kt(e.outEdges,fr),a=Kt(e.inEdges,fr),n=e.getValue()||0,i=Math.max(t,a,n);e.setLayout({value:i},!0)})}function bf(r,e,t,a,n,i,o){for(var s=[],l=[],u=[],v=[],h=0,f=0;f<e.length;f++)s[f]=1;for(var f=0;f<r.length;f++)l[f]=r[f].inEdges.length,l[f]===0&&u.push(r[f]);for(var c=-1;u.length;){for(var d=0;d<u.length;d++){var p=u[d],g=p.hostGraph.data.getRawDataItem(p.dataIndex),S=g.depth!=null&&g.depth>=0;S&&g.depth>c&&(c=g.depth),p.setLayout({depth:S?g.depth:h},!0),i==="vertical"?p.setLayout({dy:t},!0):p.setLayout({dx:t},!0);for(var m=0;m<p.outEdges.length;m++){var y=p.outEdges[m],b=e.indexOf(y);s[b]=0;var _=y.node2,x=r.indexOf(_);--l[x]===0&&v.indexOf(_)<0&&v.push(_)}}++h,u=v,v=[]}for(var f=0;f<s.length;f++)if(s[f]===1)throw new Error("Sankey is a DAG, the original data has cycle!");var I=c>h-1?c:h-1;o&&o!=="left"&&xf(r,o,i,I);var w=i==="vertical"?(n-t)/I:(a-t)/I;wf(r,w,i)}function cs(r){var e=r.hostGraph.data.getRawDataItem(r.dataIndex);return e.depth!=null&&e.depth>=0}function xf(r,e,t,a){if(e==="right"){for(var n=[],i=r,o=0;i.length;){for(var s=0;s<i.length;s++){var l=i[s];l.setLayout({skNodeHeight:o},!0);for(var u=0;u<l.inEdges.length;u++){var v=l.inEdges[u];n.indexOf(v.node1)<0&&n.push(v.node1)}}i=n,n=[],++o}R(r,function(h){cs(h)||h.setLayout({depth:Math.max(0,a-h.getLayout().skNodeHeight)},!0)})}else e==="justify"&&If(r,a)}function If(r,e){R(r,function(t){!cs(t)&&!t.outEdges.length&&t.setLayout({depth:e},!0)})}function wf(r,e,t){R(r,function(a){var n=a.getLayout().depth*e;t==="vertical"?a.setLayout({y:n},!0):a.setLayout({x:n},!0)})}function Lf(r,e,t,a,n,i,o){var s=Df(r,o);Tf(s,e,t,a,n,o),Qr(s,n,t,a,o);for(var l=1;i>0;i--)l*=.99,Af(s,l,o),Qr(s,n,t,a,o),Nf(s,l,o),Qr(s,n,t,a,o)}function Df(r,e){var t=[],a=e==="vertical"?"y":"x",n=_a(r,function(i){return i.getLayout()[a]});return n.keys.sort(function(i,o){return i-o}),R(n.keys,function(i){t.push(n.buckets.get(i))}),t}function Tf(r,e,t,a,n,i){var o=1/0;R(r,function(s){var l=s.length,u=0;R(s,function(h){u+=h.getLayout().value});var v=i==="vertical"?(a-(l-1)*n)/u:(t-(l-1)*n)/u;v<o&&(o=v)}),R(r,function(s){R(s,function(l,u){var v=l.getLayout().value*o;i==="vertical"?(l.setLayout({x:u},!0),l.setLayout({dx:v},!0)):(l.setLayout({y:u},!0),l.setLayout({dy:v},!0))})}),R(e,function(s){var l=+s.getValue()*o;s.setLayout({dy:l},!0)})}function Qr(r,e,t,a,n){var i=n==="vertical"?"x":"y";R(r,function(o){o.sort(function(p,g){return p.getLayout()[i]-g.getLayout()[i]});for(var s,l,u,v=0,h=o.length,f=n==="vertical"?"dx":"dy",c=0;c<h;c++)l=o[c],u=v-l.getLayout()[i],u>0&&(s=l.getLayout()[i]+u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),v=l.getLayout()[i]+l.getLayout()[f]+e;var d=n==="vertical"?a:t;if(u=v-e-d,u>0){s=l.getLayout()[i]-u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),v=s;for(var c=h-2;c>=0;--c)l=o[c],u=l.getLayout()[i]+l.getLayout()[f]+e-v,u>0&&(s=l.getLayout()[i]-u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),v=l.getLayout()[i]}})}function Af(r,e,t){R(r.slice().reverse(),function(a){R(a,function(n){if(n.outEdges.length){var i=Kt(n.outEdges,Cf,t)/Kt(n.outEdges,fr);if(isNaN(i)){var o=n.outEdges.length;i=o?Kt(n.outEdges,Mf,t)/o:0}if(t==="vertical"){var s=n.getLayout().x+(i-te(n,t))*e;n.setLayout({x:s},!0)}else{var l=n.getLayout().y+(i-te(n,t))*e;n.setLayout({y:l},!0)}}})})}function Cf(r,e){return te(r.node2,e)*r.getValue()}function Mf(r,e){return te(r.node2,e)}function Pf(r,e){return te(r.node1,e)*r.getValue()}function Ef(r,e){return te(r.node1,e)}function te(r,e){return e==="vertical"?r.getLayout().x+r.getLayout().dx/2:r.getLayout().y+r.getLayout().dy/2}function fr(r){return r.getValue()}function Kt(r,e,t){for(var a=0,n=r.length,i=-1;++i<n;){var o=+e(r[i],t);isNaN(o)||(a+=o)}return a}function Nf(r,e,t){R(r,function(a){R(a,function(n){if(n.inEdges.length){var i=Kt(n.inEdges,Pf,t)/Kt(n.inEdges,fr);if(isNaN(i)){var o=n.inEdges.length;i=o?Kt(n.inEdges,Ef,t)/o:0}if(t==="vertical"){var s=n.getLayout().x+(i-te(n,t))*e;n.setLayout({x:s},!0)}else{var l=n.getLayout().y+(i-te(n,t))*e;n.setLayout({y:l},!0)}}})})}function Rf(r,e){var t=e==="vertical"?"x":"y";R(r,function(a){a.outEdges.sort(function(n,i){return n.node2.getLayout()[t]-i.node2.getLayout()[t]}),a.inEdges.sort(function(n,i){return n.node1.getLayout()[t]-i.node1.getLayout()[t]})}),R(r,function(a){var n=0,i=0;R(a.outEdges,function(o){o.setLayout({sy:n},!0),n+=o.getLayout().dy}),R(a.inEdges,function(o){o.setLayout({ty:i},!0),i+=o.getLayout().dy})})}function Vf(r){r.eachSeriesByType("sankey",function(e){var t=e.getGraph(),a=t.nodes,n=t.edges;if(a.length){var i=1/0,o=-1/0;R(a,function(s){var l=s.getLayout().value;l<i&&(i=l),l>o&&(o=l)}),R(a,function(s){var l=new Co({type:"color",mappingMethod:"linear",dataExtent:[i,o],visual:e.get("color")}),u=l.mapValueToVisual(s.getLayout().value),v=s.getModel().get(["itemStyle","color"]);v!=null?(s.setVisual("color",v),s.setVisual("style",{fill:v})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}n.length&&R(n,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function kf(r){r.registerChartView(pf),r.registerSeriesModel(gf),r.registerLayout(yf),r.registerVisual(Vf),r.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(a){a.setNodePosition(e.dataIndex,[e.localX,e.localY])})})}var ps=function(){function r(){}return r.prototype._hasEncodeRule=function(e){var t=this.getEncode();return t&&t.get(e)!=null},r.prototype.getInitialData=function(e,t){var a,n=t.getComponent("xAxis",this.get("xAxisIndex")),i=t.getComponent("yAxis",this.get("yAxisIndex")),o=n.get("type"),s=i.get("type"),l;o==="category"?(e.layout="horizontal",a=n.getOrdinalMeta(),l=!this._hasEncodeRule("x")):s==="category"?(e.layout="vertical",a=i.getOrdinalMeta(),l=!this._hasEncodeRule("y")):e.layout=e.layout||"horizontal";var u=["x","y"],v=e.layout==="horizontal"?0:1,h=this._baseAxisDim=u[v],f=u[1-v],c=[n,i],d=c[v].get("type"),p=c[1-v].get("type"),g=e.data;if(g&&l){var S=[];R(g,function(b,_){var x;F(b)?(x=b.slice(),b.unshift(_)):F(b.value)?(x=U({},b),x.value=x.value.slice(),b.value.unshift(_)):x=b,S.push(x)}),e.data=S}var m=this.defaultValueDimensions,y=[{name:h,type:ba(d),ordinalMeta:a,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:f,type:ba(p),dimsDef:m.slice()}];return Qa(this,{coordDimensions:y,dimensionsCount:m.length+1,encodeDefaulter:et(cl,y,this)})},r.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},r}(),ds=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],t.visualDrawType="stroke",t}return e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},e}(ft);ye(ds,ps,!0);var Gf=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){var i=t.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=t.get("layout")==="horizontal"?1:0;i.diff(s).add(function(u){if(i.hasValue(u)){var v=i.getItemLayout(u),h=xi(v,i,u,l,!0);i.setItemGraphicEl(u,h),o.add(h)}}).update(function(u,v){var h=s.getItemGraphicEl(v);if(!i.hasValue(u)){o.remove(h);return}var f=i.getItemLayout(u);h?(me(h),gs(f,h,i,u)):h=xi(f,i,u,l),o.add(h),i.setItemGraphicEl(u,h)}).remove(function(u){var v=s.getItemGraphicEl(u);v&&o.remove(v)}).execute(),this._data=i},e.prototype.remove=function(t){var a=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl(function(i){i&&a.remove(i)})},e.type="boxplot",e}(ht),zf=function(){function r(){}return r}(),Bf=function(r){k(e,r);function e(t){var a=r.call(this,t)||this;return a.type="boxplotBoxPath",a}return e.prototype.getDefaultShape=function(){return new zf},e.prototype.buildPath=function(t,a){var n=a.points,i=0;for(t.moveTo(n[i][0],n[i][1]),i++;i<4;i++)t.lineTo(n[i][0],n[i][1]);for(t.closePath();i<n.length;i++)t.moveTo(n[i][0],n[i][1]),i++,t.lineTo(n[i][0],n[i][1])},e}(yt);function xi(r,e,t,a,n){var i=r.ends,o=new Bf({shape:{points:n?Of(i,a,r):i}});return gs(r,o,e,t,n),o}function gs(r,e,t,a,n){var i=t.hostModel,o=pl[n?"initProps":"updateProps"];o(e,{shape:{points:r.ends}},i,a),e.useStyle(t.getItemVisual(a,"style")),e.style.strokeNoScale=!0,e.z2=100;var s=t.getItemModel(a),l=s.getModel("emphasis");Pt(e,s),st(e,l.get("focus"),l.get("blurScope"),l.get("disabled"))}function Of(r,e,t){return W(r,function(a){return a=a.slice(),a[e]=t.initBaseline,a})}var Ae=R;function Hf(r){var e=Ff(r);Ae(e,function(t){var a=t.seriesModels;a.length&&(Wf(t),Ae(a,function(n,i){Uf(n,t.boxOffsetList[i],t.boxWidthList[i])}))})}function Ff(r){var e=[],t=[];return r.eachSeriesByType("boxplot",function(a){var n=a.getBaseAxis(),i=wt(t,n);i<0&&(i=t.length,t[i]=n,e[i]={axis:n,seriesModels:[]}),e[i].seriesModels.push(a)}),e}function Wf(r){var e=r.axis,t=r.seriesModels,a=t.length,n=r.boxWidthList=[],i=r.boxOffsetList=[],o=[],s;if(e.type==="category")s=e.getBandWidth();else{var l=0;Ae(t,function(d){l=Math.max(l,d.getData().count())});var u=e.getExtent();s=Math.abs(u[1]-u[0])/l}Ae(t,function(d){var p=d.get("boxWidth");F(p)||(p=[p,p]),o.push([B(p[0],s)||0,B(p[1],s)||0])});var v=s*.8-2,h=v/a*.3,f=(v-h*(a-1))/a,c=f/2-v/2;Ae(t,function(d,p){i.push(c),c+=h+f,n.push(Math.min(Math.max(f,o[p][0]),o[p][1]))})}function Uf(r,e,t){var a=r.coordinateSystem,n=r.getData(),i=t/2,o=r.get("layout")==="horizontal"?0:1,s=1-o,l=["x","y"],u=n.mapDimension(l[o]),v=n.mapDimensionsAll(l[s]);if(u==null||v.length<5)return;for(var h=0;h<n.count();h++){var f=n.get(u,h),c=y(f,v[2],h),d=y(f,v[0],h),p=y(f,v[1],h),g=y(f,v[3],h),S=y(f,v[4],h),m=[];b(m,p,!1),b(m,g,!0),m.push(d,p,S,g),_(m,d),_(m,S),_(m,c),n.setItemLayout(h,{initBaseline:c[s],ends:m})}function y(x,I,w){var L=n.get(I,w),D=[];D[o]=x,D[s]=L;var T;return isNaN(x)||isNaN(L)?T=[NaN,NaN]:(T=a.dataToPoint(D),T[o]+=e),T}function b(x,I,w){var L=I.slice(),D=I.slice();L[o]+=i,D[o]-=i,w?x.push(L,D):x.push(D,L)}function _(x,I){var w=I.slice(),L=I.slice();w[o]-=i,L[o]+=i,x.push(w,L)}}function $f(r,e){e=e||{};for(var t=[],a=[],n=e.boundIQR,i=n==="none"||n===0,o=0;o<r.length;o++){var s=xa(r[o].slice()),l=Pr(s,.25),u=Pr(s,.5),v=Pr(s,.75),h=s[0],f=s[s.length-1],c=(n==null?1.5:n)*(v-l),d=i?h:Math.max(h,l-c),p=i?f:Math.min(f,v+c),g=e.itemNameFormatter,S=nt(g)?g({value:o}):St(g)?g.replace("{value}",o+""):o+"";t.push([S,d,l,u,v,p]);for(var m=0;m<s.length;m++){var y=s[m];if(y<d||y>p){var b=[S,y];a.push(b)}}}return{boxData:t,outliers:a}}var Zf={type:"echarts:boxplot",transform:function(e){var t=e.upstream;if(t.sourceFormat!==Ro){var a="";J(a)}var n=$f(t.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:n.boxData},{data:n.outliers}]}};function Yf(r){r.registerSeriesModel(ds),r.registerChartView(Gf),r.registerLayout(Hf),r.registerTransform(Zf)}var Xf=["itemStyle","borderColor"],qf=["itemStyle","borderColor0"],Kf=["itemStyle","borderColorDoji"],jf=["itemStyle","color"],Qf=["itemStyle","color0"];function mn(r,e){return e.get(r>0?jf:Qf)}function Sn(r,e){return e.get(r===0?Kf:r>0?Xf:qf)}var Jf={seriesType:"candlestick",plan:en(),performRawSeries:!0,reset:function(r,e){if(!e.isSeriesFiltered(r)){var t=r.pipelineContext.large;return!t&&{progress:function(a,n){for(var i;(i=a.next())!=null;){var o=n.getItemModel(i),s=n.getItemLayout(i).sign,l=o.getItemStyle();l.fill=mn(s,o),l.stroke=Sn(s,o)||l.fill;var u=n.ensureUniqueItemVisual(i,"style");U(u,l)}}}}}},tc=["color","borderColor"],ec=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,a,n){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,a,n,i){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,a):this._incrementalRenderNormal(t,a)},e.prototype.eachRendered=function(t){wr(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var a=t.pipelineContext.large;(this._isLargeDraw==null||a!==this._isLargeDraw)&&(this._isLargeDraw=a,this._clear())},e.prototype._renderNormal=function(t){var a=t.getData(),n=this._data,i=this.group,o=a.getLayout("isSimpleBox"),s=t.get("clip",!0),l=t.coordinateSystem,u=l.getArea&&l.getArea();this._data||i.removeAll(),a.diff(n).add(function(v){if(a.hasValue(v)){var h=a.getItemLayout(v);if(s&&Ii(u,h))return;var f=Jr(h,v,!0);It(f,{shape:{points:h.ends}},t,v),ta(f,a,v,o),i.add(f),a.setItemGraphicEl(v,f)}}).update(function(v,h){var f=n.getItemGraphicEl(h);if(!a.hasValue(v)){i.remove(f);return}var c=a.getItemLayout(v);if(s&&Ii(u,c)){i.remove(f);return}f?(ot(f,{shape:{points:c.ends}},t,v),me(f)):f=Jr(c),ta(f,a,v,o),i.add(f),a.setItemGraphicEl(v,f)}).remove(function(v){var h=n.getItemGraphicEl(v);h&&i.remove(h)}).execute(),this._data=a},e.prototype._renderLarge=function(t){this._clear(),wi(t,this.group);var a=t.get("clip",!0)?rn(t.coordinateSystem,!1,t):null;a?this.group.setClipPath(a):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,a){for(var n=a.getData(),i=n.getLayout("isSimpleBox"),o;(o=t.next())!=null;){var s=n.getItemLayout(o),l=Jr(s);ta(l,n,o,i),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},e.prototype._incrementalRenderLarge=function(t,a){wi(a,this.group,this._progressiveEls,!0)},e.prototype.remove=function(t){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(ht),rc=function(){function r(){}return r}(),ac=function(r){k(e,r);function e(t){var a=r.call(this,t)||this;return a.type="normalCandlestickBox",a}return e.prototype.getDefaultShape=function(){return new rc},e.prototype.buildPath=function(t,a){var n=a.points;this.__simpleBox?(t.moveTo(n[4][0],n[4][1]),t.lineTo(n[6][0],n[6][1])):(t.moveTo(n[0][0],n[0][1]),t.lineTo(n[1][0],n[1][1]),t.lineTo(n[2][0],n[2][1]),t.lineTo(n[3][0],n[3][1]),t.closePath(),t.moveTo(n[4][0],n[4][1]),t.lineTo(n[5][0],n[5][1]),t.moveTo(n[6][0],n[6][1]),t.lineTo(n[7][0],n[7][1]))},e}(yt);function Jr(r,e,t){var a=r.ends;return new ac({shape:{points:t?nc(a,r):a},z2:100})}function Ii(r,e){for(var t=!0,a=0;a<e.ends.length;a++)if(r.contain(e.ends[a][0],e.ends[a][1])){t=!1;break}return t}function ta(r,e,t,a){var n=e.getItemModel(t);r.useStyle(e.getItemVisual(t,"style")),r.style.strokeNoScale=!0,r.__simpleBox=a,Pt(r,n);var i=e.getItemLayout(t).sign;R(r.states,function(s,l){var u=n.getModel(l),v=mn(i,u),h=Sn(i,u)||v,f=s.style||(s.style={});v&&(f.fill=v),h&&(f.stroke=h)});var o=n.getModel("emphasis");st(r,o.get("focus"),o.get("blurScope"),o.get("disabled"))}function nc(r,e){return W(r,function(t){return t=t.slice(),t[1]=e.initBaseline,t})}var ic=function(){function r(){}return r}(),ea=function(r){k(e,r);function e(t){var a=r.call(this,t)||this;return a.type="largeCandlestickBox",a}return e.prototype.getDefaultShape=function(){return new ic},e.prototype.buildPath=function(t,a){for(var n=a.points,i=0;i<n.length;)if(this.__sign===n[i++]){var o=n[i++];t.moveTo(o,n[i++]),t.lineTo(o,n[i++])}else i+=3},e}(yt);function wi(r,e,t,a){var n=r.getData(),i=n.getLayout("largePoints"),o=new ea({shape:{points:i},__sign:1,ignoreCoarsePointer:!0});e.add(o);var s=new ea({shape:{points:i},__sign:-1,ignoreCoarsePointer:!0});e.add(s);var l=new ea({shape:{points:i},__sign:0,ignoreCoarsePointer:!0});e.add(l),ra(1,o,r),ra(-1,s,r),ra(0,l,r),a&&(o.incremental=!0,s.incremental=!0),t&&t.push(o,s)}function ra(r,e,t,a){var n=Sn(r,t)||mn(r,t),i=t.getModel("itemStyle").getItemStyle(tc);e.useStyle(i),e.style.fill=null,e.style.stroke=n}var ys=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],t}return e.prototype.getShadowDim=function(){return"open"},e.prototype.brushSelector=function(t,a,n){var i=a.getItemLayout(t);return i&&n.rect(i.brushRect)},e.type="series.candlestick",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderColorDoji:null,borderWidth:1},emphasis:{itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},e}(ft);ye(ys,ps,!0);function oc(r){!r||!F(r.series)||R(r.series,function(e){an(e)&&e.type==="k"&&(e.type="candlestick")})}var sc={seriesType:"candlestick",plan:en(),reset:function(r){var e=r.coordinateSystem,t=r.getData(),a=lc(r,t),n=0,i=1,o=["x","y"],s=t.getDimensionIndex(t.mapDimension(o[n])),l=W(t.mapDimensionsAll(o[i]),t.getDimensionIndex,t),u=l[0],v=l[1],h=l[2],f=l[3];if(t.setLayout({candleWidth:a,isSimpleBox:a<=1.3}),s<0||l.length<4)return;return{progress:r.pipelineContext.large?d:c};function c(p,g){for(var S,m=g.getStore();(S=p.next())!=null;){var y=m.get(s,S),b=m.get(u,S),_=m.get(v,S),x=m.get(h,S),I=m.get(f,S),w=Math.min(b,_),L=Math.max(b,_),D=N(w,y),T=N(L,y),A=N(x,y),P=N(I,y),C=[];V(C,T,0),V(C,D,1),C.push(O(P),O(T),O(A),O(D));var M=g.getItemModel(S),E=!!M.get(["itemStyle","borderColorDoji"]);g.setItemLayout(S,{sign:Li(m,S,b,_,v,E),initBaseline:b>_?T[i]:D[i],ends:C,brushRect:G(x,I,y)})}function N(z,K){var X=[];return X[n]=K,X[i]=z,isNaN(K)||isNaN(z)?[NaN,NaN]:e.dataToPoint(X)}function V(z,K,X){var $=K.slice(),q=K.slice();$[n]=Er($[n]+a/2,1,!1),q[n]=Er(q[n]-a/2,1,!0),X?z.push($,q):z.push(q,$)}function G(z,K,X){var $=N(z,X),q=N(K,X);return $[n]-=a/2,q[n]-=a/2,{x:$[0],y:$[1],width:a,height:q[1]-$[1]}}function O(z){return z[n]=Er(z[n],1),z}}function d(p,g){for(var S=dl(p.count*4),m=0,y,b=[],_=[],x,I=g.getStore(),w=!!r.get(["itemStyle","borderColorDoji"]);(x=p.next())!=null;){var L=I.get(s,x),D=I.get(u,x),T=I.get(v,x),A=I.get(h,x),P=I.get(f,x);if(isNaN(L)||isNaN(A)||isNaN(P)){S[m++]=NaN,m+=3;continue}S[m++]=Li(I,x,D,T,v,w),b[n]=L,b[i]=A,y=e.dataToPoint(b,null,_),S[m++]=y?y[0]:NaN,S[m++]=y?y[1]:NaN,b[i]=P,y=e.dataToPoint(b,null,_),S[m++]=y?y[1]:NaN}g.setLayout("largePoints",S)}}};function Li(r,e,t,a,n,i){var o;return t>a?o=-1:t<a?o=1:o=i?0:e>0?r.get(n,e-1)<=a?1:-1:1,o}function lc(r,e){var t=r.getBaseAxis(),a,n=t.type==="category"?t.getBandWidth():(a=t.getExtent(),Math.abs(a[1]-a[0])/e.count()),i=B($t(r.get("barMaxWidth"),n),n),o=B($t(r.get("barMinWidth"),1),n),s=r.get("barWidth");return s!=null?B(s,n):Math.max(Math.min(n/2,i),o)}function uc(r){r.registerChartView(ec),r.registerSeriesModel(ys),r.registerPreprocessor(oc),r.registerVisual(Jf),r.registerLayout(sc)}function Di(r,e){var t=e.rippleEffectColor||e.color;r.eachChild(function(a){a.attr({z:e.z,zlevel:e.zlevel,style:{stroke:e.brushType==="stroke"?t:null,fill:e.brushType==="fill"?t:null}})})}var vc=function(r){k(e,r);function e(t,a){var n=r.call(this)||this,i=new wo(t,a),o=new rt;return n.add(i),n.add(o),n.updateData(t,a),n}return e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var a=t.symbolType,n=t.color,i=t.rippleNumber,o=this.childAt(1),s=0;s<i;s++){var l=Ee(a,-1,-1,2,2,n);l.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var u=-s/i*t.period+t.effectOffset;l.animate("",!0).when(t.period,{scaleX:t.rippleScale/2,scaleY:t.rippleScale/2}).delay(u).start(),l.animateStyle(!0).when(t.period,{opacity:0}).delay(u).start(),o.add(l)}Di(o,t)},e.prototype.updateEffectAnimation=function(t){for(var a=this._effectCfg,n=this.childAt(1),i=["symbolType","period","rippleScale","rippleNumber"],o=0;o<i.length;o++){var s=i[o];if(a[s]!==t[s]){this.stopEffectAnimation(),this.startEffectAnimation(t);return}}Di(n,t)},e.prototype.highlight=function(){Ua(this)},e.prototype.downplay=function(){$a(this)},e.prototype.getSymbolType=function(){var t=this.childAt(0);return t&&t.getSymbolType()},e.prototype.updateData=function(t,a){var n=this,i=t.hostModel;this.childAt(0).updateData(t,a);var o=this.childAt(1),s=t.getItemModel(a),l=t.getItemVisual(a,"symbol"),u=Za(t.getItemVisual(a,"symbolSize")),v=t.getItemVisual(a,"style"),h=v&&v.fill,f=s.getModel("emphasis");o.setScale(u),o.traverse(function(g){g.setStyle("fill",h)});var c=Ya(t.getItemVisual(a,"symbolOffset"),u);c&&(o.x=c[0],o.y=c[1]);var d=t.getItemVisual(a,"symbolRotate");o.rotation=(d||0)*Math.PI/180||0;var p={};p.showEffectOn=i.get("showEffectOn"),p.rippleScale=s.get(["rippleEffect","scale"]),p.brushType=s.get(["rippleEffect","brushType"]),p.period=s.get(["rippleEffect","period"])*1e3,p.effectOffset=a/t.count(),p.z=i.getShallow("z")||0,p.zlevel=i.getShallow("zlevel")||0,p.symbolType=l,p.color=h,p.rippleEffectColor=s.get(["rippleEffect","color"]),p.rippleNumber=s.get(["rippleEffect","number"]),p.showEffectOn==="render"?(this._effectCfg?this.updateEffectAnimation(p):this.startEffectAnimation(p),this._effectCfg=p):(this._effectCfg=null,this.stopEffectAnimation(),this.onHoverStateChange=function(g){g==="emphasis"?p.showEffectOn!=="render"&&n.startEffectAnimation(p):g==="normal"&&p.showEffectOn!=="render"&&n.stopEffectAnimation()}),this._effectCfg=p,st(this,f.get("focus"),f.get("blurScope"),f.get("disabled"))},e.prototype.fadeOut=function(t){t&&t()},e}(rt),hc=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this._symbolDraw=new Xa(vc)},e.prototype.render=function(t,a,n){var i=t.getData(),o=this._symbolDraw;o.updateData(i,{clipShape:this._getClipShape(t)}),this.group.add(o.group)},e.prototype._getClipShape=function(t){var a=t.coordinateSystem,n=a&&a.getArea&&a.getArea();return t.get("clip",!0)?n:null},e.prototype.updateTransform=function(t,a,n){var i=t.getData();this.group.dirty();var o=Vo("").reset(t,a,n);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout()},e.prototype._updateGroupTransform=function(t){var a=t.coordinateSystem;a&&a.getRoamTransform&&(this.group.transform=gl(a.getRoamTransform()),this.group.decomposeTransform())},e.prototype.remove=function(t,a){this._symbolDraw&&this._symbolDraw.remove(!0)},e.type="effectScatter",e}(ht),fc=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t,a){return Fe(null,this,{useEncodeDefaulter:!0})},e.prototype.brushSelector=function(t,a,n){return n.point(a.getItemLayout(t))},e.type="series.effectScatter",e.dependencies=["grid","polar"],e.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},e}(ft);function cc(r){r.registerChartView(hc),r.registerSeriesModel(fc),r.registerLayout(Vo("effectScatter"))}var ms=function(r){k(e,r);function e(t,a,n){var i=r.call(this)||this;return i.add(i.createLine(t,a,n)),i._updateEffectSymbol(t,a),i}return e.prototype.createLine=function(t,a,n){return new gn(t,a,n)},e.prototype._updateEffectSymbol=function(t,a){var n=t.getItemModel(a),i=n.getModel("effect"),o=i.get("symbolSize"),s=i.get("symbol");F(o)||(o=[o,o]);var l=t.getItemVisual(a,"style"),u=i.get("color")||l&&l.stroke,v=this.childAt(1);this._symbolType!==s&&(this.remove(v),v=Ee(s,-.5,-.5,1,1,u),v.z2=100,v.culling=!0,this.add(v)),v&&(v.setStyle("shadowColor",u),v.setStyle(i.getItemStyle(["color"])),v.scaleX=o[0],v.scaleY=o[1],v.setColor(u),this._symbolType=s,this._symbolScale=o,this._updateEffectAnimation(t,i,a))},e.prototype._updateEffectAnimation=function(t,a,n){var i=this.childAt(1);if(i){var o=t.getItemLayout(n),s=a.get("period")*1e3,l=a.get("loop"),u=a.get("roundTrip"),v=a.get("constantSpeed"),h=Nt(a.get("delay"),function(c){return c/t.count()*s/3});if(i.ignore=!0,this._updateAnimationPoints(i,o),v>0&&(s=this._getLineLength(i)/v*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){i.stopAnimation();var f=void 0;nt(h)?f=h(n):f=h,i.__t>0&&(f=-s*i.__t),this._animateSymbol(i,s,f,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},e.prototype._animateSymbol=function(t,a,n,i,o){if(a>0){t.__t=0;var s=this,l=t.animate("",i).when(o?a*2:a,{__t:o?2:1}).delay(n).during(function(){s._updateSymbolPosition(t)});i||l.done(function(){s.remove(t)}),l.start()}},e.prototype._getLineLength=function(t){return we(t.__p1,t.__cp1)+we(t.__cp1,t.__p2)},e.prototype._updateAnimationPoints=function(t,a){t.__p1=a[0],t.__p2=a[1],t.__cp1=a[2]||[(a[0][0]+a[1][0])/2,(a[0][1]+a[1][1])/2]},e.prototype.updateData=function(t,a,n){this.childAt(0).updateData(t,a,n),this._updateEffectSymbol(t,a)},e.prototype._updateSymbolPosition=function(t){var a=t.__p1,n=t.__p2,i=t.__cp1,o=t.__t<1?t.__t:2-t.__t,s=[t.x,t.y],l=s.slice(),u=Po,v=yl;s[0]=u(a[0],i[0],n[0],o),s[1]=u(a[1],i[1],n[1],o);var h=t.__t<1?v(a[0],i[0],n[0],o):v(n[0],i[0],a[0],1-o),f=t.__t<1?v(a[1],i[1],n[1],o):v(n[1],i[1],a[1],1-o);t.rotation=-Math.atan2(f,h)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(t.__lastT!==void 0&&t.__lastT<t.__t?(t.scaleY=we(l,s)*1.05,o===1&&(s[0]=l[0]+(s[0]-l[0])/2,s[1]=l[1]+(s[1]-l[1])/2)):t.__lastT===1?t.scaleY=2*we(a,s):t.scaleY=this._symbolScale[1]),t.__lastT=t.__t,t.ignore=!1,t.x=s[0],t.y=s[1]},e.prototype.updateLayout=function(t,a){this.childAt(0).updateLayout(t,a);var n=t.getItemModel(a).getModel("effect");this._updateEffectAnimation(t,n,a)},e}(rt),Ss=function(r){k(e,r);function e(t,a,n){var i=r.call(this)||this;return i._createPolyline(t,a,n),i}return e.prototype._createPolyline=function(t,a,n){var i=t.getItemLayout(a),o=new Ja({shape:{points:i}});this.add(o),this._updateCommonStl(t,a,n)},e.prototype.updateData=function(t,a,n){var i=t.hostModel,o=this.childAt(0),s={shape:{points:t.getItemLayout(a)}};ot(o,s,i,a),this._updateCommonStl(t,a,n)},e.prototype._updateCommonStl=function(t,a,n){var i=this.childAt(0),o=t.getItemModel(a),s=n&&n.emphasisLineStyle,l=n&&n.focus,u=n&&n.blurScope,v=n&&n.emphasisDisabled;if(!n||t.hasItemOption){var h=o.getModel("emphasis");s=h.getModel("lineStyle").getLineStyle(),v=h.get("disabled"),l=h.get("focus"),u=h.get("blurScope")}i.useStyle(t.getItemVisual(a,"style")),i.style.fill=null,i.style.strokeNoScale=!0;var f=i.ensureState("emphasis");f.style=s,st(this,l,u,v)},e.prototype.updateLayout=function(t,a){var n=this.childAt(0);n.setShape("points",t.getItemLayout(a))},e}(rt),pc=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t._lastFrame=0,t._lastFramePercent=0,t}return e.prototype.createLine=function(t,a,n){return new Ss(t,a,n)},e.prototype._updateAnimationPoints=function(t,a){this._points=a;for(var n=[0],i=0,o=1;o<a.length;o++){var s=a[o-1],l=a[o];i+=we(s,l),n.push(i)}if(i===0){this._length=0;return}for(var o=0;o<n.length;o++)n[o]/=i;this._offsets=n,this._length=i},e.prototype._getLineLength=function(){return this._length},e.prototype._updateSymbolPosition=function(t){var a=t.__t<1?t.__t:2-t.__t,n=this._points,i=this._offsets,o=n.length;if(i){var s=this._lastFrame,l;if(a<this._lastFramePercent){var u=Math.min(s+1,o-1);for(l=u;l>=0&&!(i[l]<=a);l--);l=Math.min(l,o-2)}else{for(l=s;l<o&&!(i[l]>a);l++);l=Math.min(l-1,o-2)}var v=(a-i[l])/(i[l+1]-i[l]),h=n[l],f=n[l+1];t.x=h[0]*(1-v)+v*f[0],t.y=h[1]*(1-v)+v*f[1];var c=t.__t<1?f[0]-h[0]:h[0]-f[0],d=t.__t<1?f[1]-h[1]:h[1]-f[1];t.rotation=-Math.atan2(d,c)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=a,t.ignore=!1}},e}(ms),dc=function(){function r(){this.polyline=!1,this.curveness=0,this.segs=[]}return r}(),gc=function(r){k(e,r);function e(t){var a=r.call(this,t)||this;return a._off=0,a.hoverDataIdx=-1,a}return e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new dc},e.prototype.buildPath=function(t,a){var n=a.segs,i=a.curveness,o;if(a.polyline)for(o=this._off;o<n.length;){var s=n[o++];if(s>0){t.moveTo(n[o++],n[o++]);for(var l=1;l<s;l++)t.lineTo(n[o++],n[o++])}}else for(o=this._off;o<n.length;){var u=n[o++],v=n[o++],h=n[o++],f=n[o++];if(t.moveTo(u,v),i>0){var c=(u+h)/2-(v-f)*i,d=(v+f)/2-(h-u)*i;t.quadraticCurveTo(c,d,h,f)}else t.lineTo(h,f)}this.incremental&&(this._off=o,this.notClear=!0)},e.prototype.findDataIndex=function(t,a){var n=this.shape,i=n.segs,o=n.curveness,s=this.style.lineWidth;if(n.polyline)for(var l=0,u=0;u<i.length;){var v=i[u++];if(v>0)for(var h=i[u++],f=i[u++],c=1;c<v;c++){var d=i[u++],p=i[u++];if(Hn(h,f,d,p,s,t,a))return l}l++}else for(var l=0,u=0;u<i.length;){var h=i[u++],f=i[u++],d=i[u++],p=i[u++];if(o>0){var g=(h+d)/2-(f-p)*o,S=(f+p)/2-(d-h)*o;if(ml(h,f,g,S,d,p,s,t,a))return l}else if(Hn(h,f,d,p,s,t,a))return l;l++}return-1},e.prototype.contain=function(t,a){var n=this.transformCoordToLocal(t,a),i=this.getBoundingRect();if(t=n[0],a=n[1],i.contain(t,a)){var o=this.hoverDataIdx=this.findDataIndex(t,a);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var a=this.shape,n=a.segs,i=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u<n.length;){var v=n[u++],h=n[u++];i=Math.min(v,i),s=Math.max(v,s),o=Math.min(h,o),l=Math.max(h,l)}t=this._rect=new dt(i,o,s,l)}return t},e}(yt),yc=function(){function r(){this.group=new rt}return r.prototype.updateData=function(e){this._clear();var t=this._create();t.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(t,e)},r.prototype.incrementalPrepareUpdate=function(e){this.group.removeAll(),this._clear()},r.prototype.incrementalUpdate=function(e,t){var a=this._newAdded[0],n=t.getLayout("linesPoints"),i=a&&a.shape.segs;if(i&&i.length<2e4){var o=i.length,s=new Float32Array(o+n.length);s.set(i),s.set(n,o),a.setShape({segs:s})}else{this._newAdded=[];var l=this._create();l.incremental=!0,l.setShape({segs:n}),this._setCommon(l,t),l.__startIndex=e.start}},r.prototype.remove=function(){this._clear()},r.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},r.prototype._create=function(){var e=new gc({cursor:"default",ignoreCoarsePointer:!0});return this._newAdded.push(e),this.group.add(e),e},r.prototype._setCommon=function(e,t,a){var n=t.hostModel;e.setShape({polyline:n.get("polyline"),curveness:n.get(["lineStyle","curveness"])}),e.useStyle(n.getModel("lineStyle").getLineStyle()),e.style.strokeNoScale=!0;var i=t.getVisual("style");i&&i.stroke&&e.setStyle("stroke",i.stroke),e.setStyle("fill",null);var o=it(e);o.seriesIndex=n.seriesIndex,e.on("mousemove",function(s){o.dataIndex=null;var l=e.hoverDataIdx;l>0&&(o.dataIndex=l+e.__startIndex)})},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}(),_s={seriesType:"lines",plan:en(),reset:function(r){var e=r.coordinateSystem;if(e){var t=r.get("polyline"),a=r.pipelineContext.large;return{progress:function(n,i){var o=[];if(a){var s=void 0,l=n.end-n.start;if(t){for(var u=0,v=n.start;v<n.end;v++)u+=r.getLineCoordsCount(v);s=new Float32Array(l+u*2)}else s=new Float32Array(l*4);for(var h=0,f=[],v=n.start;v<n.end;v++){var c=r.getLineCoords(v,o);t&&(s[h++]=c);for(var d=0;d<c;d++)f=e.dataToPoint(o[d],!1,f),s[h++]=f[0],s[h++]=f[1]}i.setLayout("linesPoints",s)}else for(var v=n.start;v<n.end;v++){var p=i.getItemModel(v),c=r.getLineCoords(v,o),g=[];if(t)for(var S=0;S<c;S++)g.push(e.dataToPoint(o[S]));else{g[0]=e.dataToPoint(o[0]),g[1]=e.dataToPoint(o[1]);var m=p.get(["lineStyle","curveness"]);+m&&(g[2]=[(g[0][0]+g[1][0])/2-(g[0][1]-g[1][1])*m,(g[0][1]+g[1][1])/2-(g[1][0]-g[0][0])*m])}i.setItemLayout(v,g)}}}}}},mc=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){var i=t.getData(),o=this._updateLineDraw(i,t),s=t.get("zlevel"),l=t.get(["effect","trailLength"]),u=n.getZr(),v=u.painter.getType()==="svg";v||u.painter.getLayer(s).clear(!0),this._lastZlevel!=null&&!v&&u.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(t)&&l>0&&(v||u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(i);var h=t.get("clip",!0)&&rn(t.coordinateSystem,!1,t);h?this.group.setClipPath(h):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},e.prototype.incrementalPrepareRender=function(t,a,n){var i=t.getData(),o=this._updateLineDraw(i,t);o.incrementalPrepareUpdate(i),this._clearLayer(n),this._finished=!1},e.prototype.incrementalRender=function(t,a,n){this._lineDraw.incrementalUpdate(t,a.getData()),this._finished=t.end===a.getData().count()},e.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},e.prototype.updateTransform=function(t,a,n){var i=t.getData(),o=t.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=_s.reset(t,a,n);s.progress&&s.progress({start:0,end:i.count(),count:i.count()},i),this._lineDraw.updateLayout(),this._clearLayer(n)},e.prototype._updateLineDraw=function(t,a){var n=this._lineDraw,i=this._showEffect(a),o=!!a.get("polyline"),s=a.pipelineContext,l=s.large;return(!n||i!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(n&&n.remove(),n=this._lineDraw=l?new yc:new yn(o?i?pc:Ss:i?ms:gn),this._hasEffet=i,this._isPolyline=o,this._isLargeDraw=l),this.group.add(n.group),n},e.prototype._showEffect=function(t){return!!t.get(["effect","show"])},e.prototype._clearLayer=function(t){var a=t.getZr(),n=a.painter.getType()==="svg";!n&&this._lastZlevel!=null&&a.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(t,a){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(a)},e.prototype.dispose=function(t,a){this.remove(t,a)},e.type="lines",e}(ht),Sc=typeof Uint32Array=="undefined"?Array:Uint32Array,_c=typeof Float64Array=="undefined"?Array:Float64Array;function Ti(r){var e=r.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(r.data=W(e,function(t){var a=[t[0].coord,t[1].coord],n={coords:a};return t[0].name&&(n.fromName=t[0].name),t[1].name&&(n.toName=t[1].name),ko([n,t[0],t[1]])}))}var bc=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="lineStyle",t.visualDrawType="stroke",t}return e.prototype.init=function(t){t.data=t.data||[],Ti(t);var a=this._processFlatCoordsArray(t.data);this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset,a.flatCoords&&(t.data=new Float32Array(a.count)),r.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(t){if(Ti(t),t.data){var a=this._processFlatCoordsArray(t.data);this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset,a.flatCoords&&(t.data=new Float32Array(a.count))}r.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(t){var a=this._processFlatCoordsArray(t.data);a.flatCoords&&(this._flatCoords?(this._flatCoords=ir(this._flatCoords,a.flatCoords),this._flatCoordsOffset=ir(this._flatCoordsOffset,a.flatCoordsOffset)):(this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset),t.data=new Float32Array(a.count)),this.getRawData().appendData(t.data)},e.prototype._getCoordsFromItemModel=function(t){var a=this.getData().getItemModel(t),n=a.option instanceof Array?a.option:a.getShallow("coords");return n},e.prototype.getLineCoordsCount=function(t){return this._flatCoordsOffset?this._flatCoordsOffset[t*2+1]:this._getCoordsFromItemModel(t).length},e.prototype.getLineCoords=function(t,a){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[t*2],i=this._flatCoordsOffset[t*2+1],o=0;o<i;o++)a[o]=a[o]||[],a[o][0]=this._flatCoords[n+o*2],a[o][1]=this._flatCoords[n+o*2+1];return i}else{for(var s=this._getCoordsFromItemModel(t),o=0;o<s.length;o++)a[o]=a[o]||[],a[o][0]=s[o][0],a[o][1]=s[o][1];return s.length}},e.prototype._processFlatCoordsArray=function(t){var a=0;if(this._flatCoords&&(a=this._flatCoords.length),Ht(t[0])){for(var n=t.length,i=new Sc(n),o=new _c(n),s=0,l=0,u=0,v=0;v<n;){u++;var h=t[v++];i[l++]=s+a,i[l++]=h;for(var f=0;f<h;f++){var c=t[v++],d=t[v++];o[s++]=c,o[s++]=d}}return{flatCoordsOffset:new Uint32Array(i.buffer,0,l),flatCoords:o,count:u}}return{flatCoordsOffset:null,flatCoords:null,count:t.length}},e.prototype.getInitialData=function(t,a){var n=new bt(["value"],this);return n.hasItemOption=!1,n.initData(t.data,[],function(i,o,s,l){if(i instanceof Array)return NaN;n.hasItemOption=!0;var u=i.value;if(u!=null)return u instanceof Array?u[l]:u}),n},e.prototype.formatTooltip=function(t,a,n){var i=this.getData(),o=i.getItemModel(t),s=o.get("name");if(s)return s;var l=o.get("fromName"),u=o.get("toName"),v=[];return l!=null&&v.push(l),u!=null&&v.push(u),Ot("nameValue",{name:v.join(" > ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return t==null?this.option.large?1e4:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t==null?this.option.large?2e4:this.get("progressiveThreshold"):t},e.prototype.getZLevelKey=function(){var t=this.getModel("effect"),a=t.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:t.get("show")&&a>0?a+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e}(ft);function je(r){return r instanceof Array||(r=[r,r]),r}var xc={seriesType:"lines",reset:function(r){var e=je(r.get("symbol")),t=je(r.get("symbolSize")),a=r.getData();a.setVisual("fromSymbol",e&&e[0]),a.setVisual("toSymbol",e&&e[1]),a.setVisual("fromSymbolSize",t&&t[0]),a.setVisual("toSymbolSize",t&&t[1]);function n(i,o){var s=i.getItemModel(o),l=je(s.getShallow("symbol",!0)),u=je(s.getShallow("symbolSize",!0));l[0]&&i.setItemVisual(o,"fromSymbol",l[0]),l[1]&&i.setItemVisual(o,"toSymbol",l[1]),u[0]&&i.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&i.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:a.hasItemOption?n:null}}};function Ic(r){r.registerChartView(mc),r.registerSeriesModel(bc),r.registerLayout(_s),r.registerVisual(xc)}var wc=256,Lc=function(){function r(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=Ia.createCanvas();this.canvas=e}return r.prototype.update=function(e,t,a,n,i,o){var s=this._getBrush(),l=this._getGradient(i,"inRange"),u=this._getGradient(i,"outOfRange"),v=this.pointSize+this.blurSize,h=this.canvas,f=h.getContext("2d"),c=e.length;h.width=t,h.height=a;for(var d=0;d<c;++d){var p=e[d],g=p[0],S=p[1],m=p[2],y=n(m);f.globalAlpha=y,f.drawImage(s,g-v,S-v)}if(!h.width||!h.height)return h;for(var b=f.getImageData(0,0,h.width,h.height),_=b.data,x=0,I=_.length,w=this.minOpacity,L=this.maxOpacity,D=L-w;x<I;){var y=_[x+3]/256,T=Math.floor(y*(wc-1))*4;if(y>0){var A=o(y)?l:u;y>0&&(y=y*D+w),_[x++]=A[T],_[x++]=A[T+1],_[x++]=A[T+2],_[x++]=A[T+3]*y*256}else x+=4}return f.putImageData(b,0,0),h},r.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=Ia.createCanvas()),t=this.pointSize+this.blurSize,a=t*2;e.width=a,e.height=a;var n=e.getContext("2d");return n.clearRect(0,0,a,a),n.shadowOffsetX=a,n.shadowBlur=this.blurSize,n.shadowColor="#000",n.beginPath(),n.arc(-t,t,this.pointSize,0,Math.PI*2,!0),n.closePath(),n.fill(),e},r.prototype._getGradient=function(e,t){for(var a=this._gradientPixels,n=a[t]||(a[t]=new Uint8ClampedArray(256*4)),i=[0,0,0,0],o=0,s=0;s<256;s++)e[t](s/255,!0,i),n[o++]=i[0],n[o++]=i[1],n[o++]=i[2],n[o++]=i[3];return n},r}();function Dc(r,e,t){var a=r[1]-r[0];e=W(e,function(o){return{interval:[(o.interval[0]-r[0])/a,(o.interval[1]-r[0])/a]}});var n=e.length,i=0;return function(o){var s;for(s=i;s<n;s++){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){i=s;break}}if(s===n)for(s=i-1;s>=0;s--){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){i=s;break}}return s>=0&&s<n&&t[s]}}function Tc(r,e){var t=r[1]-r[0];return e=[(e[0]-r[0])/t,(e[1]-r[0])/t],function(a){return a>=e[0]&&a<=e[1]}}function Ai(r){var e=r.dimensions;return e[0]==="lng"&&e[1]==="lat"}var Ac=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){var i;a.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===t&&(i=s)})}),this._progressiveEls=null,this.group.removeAll();var o=t.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"?this._renderOnCartesianAndCalendar(t,n,0,t.getData().count()):Ai(o)&&this._renderOnGeo(o,t,i,n)},e.prototype.incrementalPrepareRender=function(t,a,n){this.group.removeAll()},e.prototype.incrementalRender=function(t,a,n,i){var o=a.coordinateSystem;o&&(Ai(o)?this.render(a,n,i):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(a,i,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){wr(this._progressiveEls||this.group,t)},e.prototype._renderOnCartesianAndCalendar=function(t,a,n,i,o){var s=t.coordinateSystem,l=Lr(s,"cartesian2d"),u,v,h,f;if(l){var c=s.getAxis("x"),d=s.getAxis("y");u=c.getBandWidth()+.5,v=d.getBandWidth()+.5,h=c.scale.getExtent(),f=d.scale.getExtent()}for(var p=this.group,g=t.getData(),S=t.getModel(["emphasis","itemStyle"]).getItemStyle(),m=t.getModel(["blur","itemStyle"]).getItemStyle(),y=t.getModel(["select","itemStyle"]).getItemStyle(),b=t.get(["itemStyle","borderRadius"]),_=Rt(t),x=t.getModel("emphasis"),I=x.get("focus"),w=x.get("blurScope"),L=x.get("disabled"),D=l?[g.mapDimension("x"),g.mapDimension("y"),g.mapDimension("value")]:[g.mapDimension("time"),g.mapDimension("value")],T=n;T<i;T++){var A=void 0,P=g.getItemVisual(T,"style");if(l){var C=g.get(D[0],T),M=g.get(D[1],T);if(isNaN(g.get(D[2],T))||isNaN(C)||isNaN(M)||C<h[0]||C>h[1]||M<f[0]||M>f[1])continue;var E=s.dataToPoint([C,M]);A=new Jt({shape:{x:E[0]-u/2,y:E[1]-v/2,width:u,height:v},style:P})}else{if(isNaN(g.get(D[1],T)))continue;A=new Jt({z2:1,shape:s.dataToRect([g.get(D[0],T)]).contentShape,style:P})}if(g.hasItemOption){var N=g.getItemModel(T),V=N.getModel("emphasis");S=V.getModel("itemStyle").getItemStyle(),m=N.getModel(["blur","itemStyle"]).getItemStyle(),y=N.getModel(["select","itemStyle"]).getItemStyle(),b=N.get(["itemStyle","borderRadius"]),I=V.get("focus"),w=V.get("blurScope"),L=V.get("disabled"),_=Rt(N)}A.shape.r=b;var G=t.getRawValue(T),O="-";G&&G[2]!=null&&(O=G[2]+""),Qt(A,_,{labelFetcher:t,labelDataIndex:T,defaultOpacity:P.opacity,defaultText:O}),A.ensureState("emphasis").style=S,A.ensureState("blur").style=m,A.ensureState("select").style=y,st(A,I,w,L),A.incremental=o,o&&(A.states.emphasis.hoverLayer=!0),p.add(A),g.setItemGraphicEl(T,A),this._progressiveEls&&this._progressiveEls.push(A)}},e.prototype._renderOnGeo=function(t,a,n,i){var o=n.targetVisuals.inRange,s=n.targetVisuals.outOfRange,l=a.getData(),u=this._hmLayer||this._hmLayer||new Lc;u.blurSize=a.get("blurSize"),u.pointSize=a.get("pointSize"),u.minOpacity=a.get("minOpacity"),u.maxOpacity=a.get("maxOpacity");var v=t.getViewRect().clone(),h=t.getRoamTransform();v.applyTransform(h);var f=Math.max(v.x,0),c=Math.max(v.y,0),d=Math.min(v.width+v.x,i.getWidth()),p=Math.min(v.height+v.y,i.getHeight()),g=d-f,S=p-c,m=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],y=l.mapArray(m,function(I,w,L){var D=t.dataToPoint([I,w]);return D[0]-=f,D[1]-=c,D.push(L),D}),b=n.getExtent(),_=n.type==="visualMap.continuous"?Tc(b,n.option.range):Dc(b,n.getPieceList(),n.option.selected);u.update(y,g,S,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},_);var x=new ja({style:{width:g,height:S,x:f,y:c,image:u.canvas},silent:!0});this.group.add(x)},e.type="heatmap",e}(ht),Cc=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,a){return Fe(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var t=Eo.get(this.get("coordinateSystem"));if(t&&t.dimensions)return t.dimensions[0]==="lng"&&t.dimensions[1]==="lat"},e.type="series.heatmap",e.dependencies=["grid","geo","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:"#212121"}}},e}(ft);function Mc(r){r.registerChartView(Ac),r.registerSeriesModel(Cc)}var Pc=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._layers=[],t}return e.prototype.render=function(t,a,n){var i=t.getData(),o=this,s=this.group,l=t.getLayerSeries(),u=i.getLayout("layoutInfo"),v=u.rect,h=u.boundaryGap;s.x=0,s.y=v.y+h[0];function f(g){return g.name}var c=new de(this._layersSeries||[],l,f,f),d=[];c.add(lt(p,this,"add")).update(lt(p,this,"update")).remove(lt(p,this,"remove")).execute();function p(g,S,m){var y=o._layers;if(g==="remove"){s.remove(y[S]);return}for(var b=[],_=[],x,I=l[S].indices,w=0;w<I.length;w++){var L=i.getItemLayout(I[w]),D=L.x,T=L.y0,A=L.y;b.push(D,T),_.push(D,T+A),x=i.getItemVisual(I[w],"style")}var P,C=i.getItemLayout(I[0]),M=t.getModel("label"),E=M.get("margin"),N=t.getModel("emphasis");if(g==="add"){var V=d[S]=new rt;P=new Sl({shape:{points:b,stackedOnPoints:_,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),V.add(P),s.add(V),t.isAnimationEnabled()&&P.setClipPath(Ec(P.getBoundingRect(),t,function(){P.removeClipPath()}))}else{var V=y[m];P=V.childAt(0),s.add(V),d[S]=V,ot(P,{shape:{points:b,stackedOnPoints:_}},t),me(P)}Qt(P,Rt(t),{labelDataIndex:I[w-1],defaultText:i.getName(I[w-1]),inheritColor:x.fill},{normal:{verticalAlign:"middle"}}),P.setTextConfig({position:null,local:!0});var G=P.getTextContent();G&&(G.x=C.x-E,G.y=C.y0+C.y/2),P.useStyle(x),i.setItemGraphicEl(S,P),Pt(P,t),st(P,N.get("focus"),N.get("blurScope"),N.get("disabled"))}this._layersSeries=l,this._layers=d},e.type="themeRiver",e}(ht);function Ec(r,e,t){var a=new Jt({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return It(a,{shape:{x:r.x-50,width:r.width+100,height:r.height+20}},e,t),a}var aa=2,Nc=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new qa(lt(this.getData,this),lt(this.getRawData,this))},e.prototype.fixData=function(t){var a=t.length,n={},i=_a(t,function(f){return n.hasOwnProperty(f[0]+"")||(n[f[0]+""]=-1),f[2]}),o=[];i.buckets.each(function(f,c){o.push({name:c,dataList:f})});for(var s=o.length,l=0;l<s;++l){for(var u=o[l].name,v=0;v<o[l].dataList.length;++v){var h=o[l].dataList[v][0]+"";n[h]=l}for(var h in n)n.hasOwnProperty(h)&&n[h]!==l&&(n[h]=l,t[a]=[h,0,u],a++)}return t},e.prototype.getInitialData=function(t,a){for(var n=this.getReferringComponents("singleAxis",Go).models[0],i=n.get("type"),o=Ct(t.data,function(d){return d[2]!==void 0}),s=this.fixData(o||[]),l=[],u=this.nameMap=mt(),v=0,h=0;h<s.length;++h)l.push(s[h][aa]),u.get(s[h][aa])||(u.set(s[h][aa],v),v++);var f=Fa(s,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:ba(i)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}).dimensions,c=new bt(f,this);return c.initData(s),c},e.prototype.getLayerSeries=function(){for(var t=this.getData(),a=t.count(),n=[],i=0;i<a;++i)n[i]=i;var o=t.mapDimension("single"),s=_a(n,function(u){return t.get("name",u)}),l=[];return s.buckets.each(function(u,v){u.sort(function(h,f){return t.get(o,h)-t.get(o,f)}),l.push({name:v,indices:u})}),l},e.prototype.getAxisTooltipData=function(t,a,n){F(t)||(t=t?[t]:[]);for(var i=this.getData(),o=this.getLayerSeries(),s=[],l=o.length,u,v=0;v<l;++v){for(var h=Number.MAX_VALUE,f=-1,c=o[v].indices.length,d=0;d<c;++d){var p=i.get(t[0],o[v].indices[d]),g=Math.abs(p-a);g<=h&&(u=p,h=g,f=o[v].indices[d])}s.push(f)}return{dataIndices:s,nestestValue:u}},e.prototype.formatTooltip=function(t,a,n){var i=this.getData(),o=i.getName(t),s=i.get(i.mapDimension("value"),t);return Ot("nameValue",{name:o,value:s})},e.type="series.themeRiver",e.dependencies=["singleAxis"],e.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}}},e}(ft);function Rc(r,e){r.eachSeriesByType("themeRiver",function(t){var a=t.getData(),n=t.coordinateSystem,i={},o=n.getRect();i.rect=o;var s=t.get("boundaryGap"),l=n.getAxis();if(i.boundaryGap=s,l.orient==="horizontal"){s[0]=B(s[0],o.height),s[1]=B(s[1],o.height);var u=o.height-s[0]-s[1];Ci(a,t,u)}else{s[0]=B(s[0],o.width),s[1]=B(s[1],o.width);var v=o.width-s[0]-s[1];Ci(a,t,v)}a.setLayout("layoutInfo",i)})}function Ci(r,e,t){if(r.count())for(var a=e.coordinateSystem,n=e.getLayerSeries(),i=r.mapDimension("single"),o=r.mapDimension("value"),s=W(n,function(g){return W(g.indices,function(S){var m=a.dataToPoint(r.get(i,S));return m[1]=r.get(o,S),m})}),l=Vc(s),u=l.y0,v=t/l.max,h=n.length,f=n[0].indices.length,c,d=0;d<f;++d){c=u[d]*v,r.setItemLayout(n[0].indices[d],{layerIndex:0,x:s[0][d][0],y0:c,y:s[0][d][1]*v});for(var p=1;p<h;++p)c+=s[p-1][d][1]*v,r.setItemLayout(n[p].indices[d],{layerIndex:p,x:s[p][d][0],y0:c,y:s[p][d][1]*v})}}function Vc(r){for(var e=r.length,t=r[0].length,a=[],n=[],i=0,o=0;o<t;++o){for(var s=0,l=0;l<e;++l)s+=r[l][o][1];s>i&&(i=s),a.push(s)}for(var u=0;u<t;++u)n[u]=(i-a[u])/2;i=0;for(var v=0;v<t;++v){var h=a[v]+n[v];h>i&&(i=h)}return{y0:n,max:i}}function kc(r){r.registerChartView(Pc),r.registerSeriesModel(Nc),r.registerLayout(Rc),r.registerProcessor(tn("themeRiver"))}var Gc=2,zc=4,Mi=function(r){k(e,r);function e(t,a,n,i){var o=r.call(this)||this;o.z2=Gc,o.textConfig={inside:!0},it(o).seriesIndex=a.seriesIndex;var s=new Zt({z2:zc,silent:t.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,t,a,n,i),o}return e.prototype.updateData=function(t,a,n,i,o){this.node=a,a.piece=this,n=n||this._seriesModel,i=i||this._ecModel;var s=this;it(s).dataIndex=a.dataIndex;var l=a.getModel(),u=l.getModel("emphasis"),v=a.getLayout(),h=U({},v);h.label=null;var f=a.getVisual("style");f.lineJoin="bevel";var c=a.getVisual("decal");c&&(f.decal=zo(c,o));var d=Fn(l.getModel("itemStyle"),h,!0);U(h,d),R(Sa,function(m){var y=s.ensureState(m),b=l.getModel([m,"itemStyle"]);y.style=b.getItemStyle();var _=Fn(b,h);_&&(y.shape=_)}),t?(s.setShape(h),s.shape.r=v.r0,It(s,{shape:{r:v.r}},n,a.dataIndex)):(ot(s,{shape:h},n),me(s)),s.useStyle(f),this._updateLabel(n);var p=l.getShallow("cursor");p&&s.attr("cursor",p),this._seriesModel=n||this._seriesModel,this._ecModel=i||this._ecModel;var g=u.get("focus"),S=g==="relative"?ir(a.getAncestorsIndices(),a.getDescendantIndices()):g==="ancestor"?a.getAncestorsIndices():g==="descendant"?a.getDescendantIndices():g;st(this,S,u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t){var a=this,n=this.node.getModel(),i=n.getModel("label"),o=this.node.getLayout(),s=o.endAngle-o.startAngle,l=(o.startAngle+o.endAngle)/2,u=Math.cos(l),v=Math.sin(l),h=this,f=h.getTextContent(),c=this.node.dataIndex,d=i.get("minAngle")/180*Math.PI,p=i.get("show")&&!(d!=null&&Math.abs(s)<d);f.ignore=!p,R(_l,function(S){var m=S==="normal"?n.getModel("label"):n.getModel([S,"label"]),y=S==="normal",b=y?f:f.ensureState(S),_=t.getFormattedLabel(c,S);y&&(_=_||a.node.name),b.style=kt(m,{},null,S!=="normal",!0),_&&(b.style.text=_);var x=m.get("show");x!=null&&!y&&(b.ignore=!x);var I=g(m,"position"),w=y?h:h.states[S],L=w.style.fill;w.textConfig={outsideFill:m.get("color")==="inherit"?L:null,inside:I!=="outside"};var D,T=g(m,"distance")||0,A=g(m,"align"),P=g(m,"rotate"),C=Math.PI*.5,M=Math.PI*1.5,E=Ie(P==="tangential"?Math.PI/2-l:l),N=E>C&&!bl(E-C)&&E<M;I==="outside"?(D=o.r+T,A=N?"right":"left"):!A||A==="center"?(s===2*Math.PI&&o.r0===0?D=0:D=(o.r+o.r0)/2,A="center"):A==="left"?(D=o.r0+T,A=N?"right":"left"):A==="right"&&(D=o.r-T,A=N?"left":"right"),b.style.align=A,b.style.verticalAlign=g(m,"verticalAlign")||"middle",b.x=D*u+o.cx,b.y=D*v+o.cy;var V=0;P==="radial"?V=Ie(-l)+(N?Math.PI:0):P==="tangential"?V=Ie(Math.PI/2-l)+(N?Math.PI:0):Ht(P)&&(V=P*Math.PI/180),b.rotation=Ie(V)});function g(S,m){var y=S.get(m);return y==null?i.get(m):y}f.dirtyStyle()},e}(Ne),Ma="sunburstRootToNode",Pi="sunburstHighlight",Bc="sunburstUnhighlight";function Oc(r){r.registerAction({type:Ma,update:"updateView"},function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},a);function a(n,i){var o=Ve(e,[Ma],n);if(o){var s=n.getViewRoot();s&&(e.direction=hn(s,o.node)?"rollUp":"drillDown"),n.resetViewRoot(o.node)}}}),r.registerAction({type:Pi,update:"none"},function(e,t,a){e=U({},e),t.eachComponent({mainType:"series",subType:"sunburst",query:e},n);function n(i){var o=Ve(e,[Pi],i);o&&(e.dataIndex=o.node.dataIndex)}a.dispatchAction(U(e,{type:"highlight"}))}),r.registerAction({type:Bc,update:"updateView"},function(e,t,a){e=U({},e),a.dispatchAction(U(e,{type:"downplay"}))})}var Hc=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n,i){var o=this;this.seriesModel=t,this.api=n,this.ecModel=a;var s=t.getData(),l=s.tree.root,u=t.getViewRoot(),v=this.group,h=t.get("renderLabelForZeroData"),f=[];u.eachNode(function(m){f.push(m)});var c=this._oldChildren||[];d(f,c),S(l,u),this._initEvents(),this._oldChildren=f;function d(m,y){if(m.length===0&&y.length===0)return;new de(y,m,b,b).add(_).update(_).remove(et(_,null)).execute();function b(x){return x.getId()}function _(x,I){var w=x==null?null:m[x],L=I==null?null:y[I];p(w,L)}}function p(m,y){if(!h&&m&&!m.getValue()&&(m=null),m!==l&&y!==l){if(y&&y.piece)m?(y.piece.updateData(!1,m,t,a,n),s.setItemGraphicEl(m.dataIndex,y.piece)):g(y);else if(m){var b=new Mi(m,t,a,n);v.add(b),s.setItemGraphicEl(m.dataIndex,b)}}}function g(m){m&&m.piece&&(v.remove(m.piece),m.piece=null)}function S(m,y){y.depth>0?(o.virtualPiece?o.virtualPiece.updateData(!1,m,t,a,n):(o.virtualPiece=new Mi(m,t,a,n),v.add(o.virtualPiece)),y.piece.off("click"),o.virtualPiece.on("click",function(b){o._rootToNode(y.parentNode)})):o.virtualPiece&&(v.remove(o.virtualPiece),o.virtualPiece=null)}},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",function(a){var n=!1,i=t.seriesModel.getViewRoot();i.eachNode(function(o){if(!n&&o.piece&&o.piece===a.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")t._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var v=l.get("target",!0)||"_blank";To(u,v)}}n=!0}})})},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:Ma,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,a){var n=a.getData(),i=n.getItemLayout(0);if(i){var o=t[0]-i.cx,s=t[1]-i.cy,l=Math.sqrt(o*o+s*s);return l<=i.r&&l>=i.r0}},e.type="sunburst",e}(ht),Fc=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t,a){var n={name:t.name,children:t.data};bs(n);var i=this._levelModels=W(t.levels||[],function(l){return new jt(l,this,a)},this),o=vn.createTree(n,this,s);function s(l){l.wrapMethod("getItemModel",function(u,v){var h=o.getNodeByDataIndex(v),f=i[h.depth];return f&&(u.parentModel=f),u})}return o.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(t){var a=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return a.treePathInfo=Ar(n,this),a},e.prototype.getLevelModel=function(t){return this._levelModels&&this._levelModels[t.depth]},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var a=this.getRawData().tree.root;(!t||t!==a&&!a.contains(t))&&(this._viewRoot=a)},e.prototype.enableAriaDecal=function(){Ko(this)},e.type="series.sunburst",e.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},e}(ft);function bs(r){var e=0;R(r.children,function(a){bs(a);var n=a.value;F(n)&&(n=n[0]),e+=n});var t=r.value;F(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),F(r.value)?r.value[0]=t:r.value=t}var Ei=Math.PI/180;function Wc(r,e,t){e.eachSeriesByType(r,function(a){var n=a.get("center"),i=a.get("radius");F(i)||(i=[0,i]),F(n)||(n=[n,n]);var o=t.getWidth(),s=t.getHeight(),l=Math.min(o,s),u=B(n[0],o),v=B(n[1],s),h=B(i[0],l/2),f=B(i[1],l/2),c=-a.get("startAngle")*Ei,d=a.get("minAngle")*Ei,p=a.getData().tree.root,g=a.getViewRoot(),S=g.depth,m=a.get("sort");m!=null&&xs(g,m);var y=0;R(g.children,function(E){!isNaN(E.getValue())&&y++});var b=g.getValue(),_=Math.PI/(b||y)*2,x=g.depth>0,I=g.height-(x?-1:1),w=(f-h)/(I||1),L=a.get("clockwise"),D=a.get("stillShowZeroSum"),T=L?1:-1,A=function(E,N){if(E){var V=N;if(E!==p){var G=E.getValue(),O=b===0&&D?_:G*_;O<d&&(O=d),V=N+T*O;var z=E.depth-S-(x?-1:1),K=h+w*z,X=h+w*(z+1),$=a.getLevelModel(E);if($){var q=$.get("r0",!0),ut=$.get("r",!0),Wt=$.get("radius",!0);Wt!=null&&(q=Wt[0],ut=Wt[1]),q!=null&&(K=B(q,l/2)),ut!=null&&(X=B(ut,l/2))}E.setLayout({angle:O,startAngle:N,endAngle:V,clockwise:L,cx:u,cy:v,r0:K,r:X})}if(E.children&&E.children.length){var Z=0;R(E.children,function(H){Z+=A(H,N+Z)})}return V-N}};if(x){var P=h,C=h+w,M=Math.PI*2;p.setLayout({angle:M,startAngle:c,endAngle:c+M,clockwise:L,cx:u,cy:v,r0:P,r:C})}A(g,c)})}function xs(r,e){var t=r.children||[];r.children=Uc(t,e),t.length&&R(r.children,function(a){xs(a,e)})}function Uc(r,e){if(nt(e)){var t=W(r,function(n,i){var o=n.getValue();return{params:{depth:n.depth,height:n.height,dataIndex:n.dataIndex,getValue:function(){return o}},index:i}});return t.sort(function(n,i){return e(n.params,i.params)}),W(t,function(n){return r[n.index]})}else{var a=e==="asc";return r.sort(function(n,i){var o=(n.getValue()-i.getValue())*(a?1:-1);return o===0?(n.dataIndex-i.dataIndex)*(a?-1:1):o})}}function $c(r){var e={};function t(a,n,i){for(var o=a;o&&o.depth>1;)o=o.parentNode;var s=n.getColorFromPalette(o.name||o.dataIndex+"",e);return a.depth>1&&St(s)&&(s=xl(s,(a.depth-1)/(i-1)*.5)),s}r.eachSeriesByType("sunburst",function(a){var n=a.getData(),i=n.tree;i.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=t(o,a,i.root.height));var u=n.ensureUniqueItemVisual(o.dataIndex,"style");U(u,l)})})}function Zc(r){r.registerChartView(Hc),r.registerSeriesModel(Fc),r.registerLayout(et(Wc,"sunburst")),r.registerProcessor(et(tn,"sunburst")),r.registerVisual($c),Oc(r)}var Ni={color:"fill",borderColor:"stroke"},Yc={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},zt=Lt(),Xc=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(t,a){return Fe(null,this)},e.prototype.getDataParams=function(t,a,n){var i=r.prototype.getDataParams.call(this,t,a);return n&&(i.info=zt(n).info),i},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(ft);function qc(r,e){return e=e||[0,0],W(["x","y"],function(t,a){var n=this.getAxis(t),i=e[a],o=r[a]/2;return n.type==="category"?n.getBandWidth():Math.abs(n.dataToCoord(i-o)-n.dataToCoord(i+o))},this)}function Kc(r){var e=r.master.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:lt(qc,r)}}}function jc(r,e){return e=e||[0,0],W([0,1],function(t){var a=e[t],n=r[t]/2,i=[],o=[];return i[t]=a-n,o[t]=a+n,i[1-t]=o[1-t]=e[1-t],Math.abs(this.dataToPoint(i)[t]-this.dataToPoint(o)[t])},this)}function Qc(r){var e=r.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:r.getZoom()},api:{coord:function(t){return r.dataToPoint(t)},size:lt(jc,r)}}}function Jc(r,e){var t=this.getAxis(),a=e instanceof Array?e[0]:e,n=(r instanceof Array?r[0]:r)/2;return t.type==="category"?t.getBandWidth():Math.abs(t.dataToCoord(a-n)-t.dataToCoord(a+n))}function tp(r){var e=r.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:lt(Jc,r)}}}function ep(r,e){return e=e||[0,0],W(["Radius","Angle"],function(t,a){var n="get"+t+"Axis",i=this[n](),o=e[a],s=r[a]/2,l=i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(o-s)-i.dataToCoord(o+s));return t==="Angle"&&(l=l*Math.PI/180),l},this)}function rp(r){var e=r.getRadiusAxis(),t=r.getAngleAxis(),a=e.getExtent();return a[0]>a[1]&&a.reverse(),{coordSys:{type:"polar",cx:r.cx,cy:r.cy,r:a[1],r0:a[0]},api:{coord:function(n){var i=e.dataToRadius(n[0]),o=t.dataToAngle(n[1]),s=r.coordToPoint([i,o]);return s.push(i,o*Math.PI/180),s},size:lt(ep,r)}}}function ap(r){var e=r.getRect(),t=r.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:r.getCellWidth(),cellHeight:r.getCellHeight(),rangeInfo:{start:t.start,end:t.end,weeks:t.weeks,dayCount:t.allDay}},api:{coord:function(a,n){return r.dataToPoint(a,n)}}}}var Bt="emphasis",Xt="normal",_n="blur",bn="select",ee=[Xt,Bt,_n,bn],na={normal:["itemStyle"],emphasis:[Bt,"itemStyle"],blur:[_n,"itemStyle"],select:[bn,"itemStyle"]},ia={normal:["label"],emphasis:[Bt,"label"],blur:[_n,"label"],select:[bn,"label"]},np=["x","y"],ip="e\0\0",_t={normal:{},emphasis:{},blur:{},select:{}},op={cartesian2d:Kc,geo:Qc,single:tp,polar:rp,calendar:ap};function Pa(r){return r instanceof yt}function Ea(r){return r instanceof Wa}function sp(r,e){e.copyTransform(r),Ea(e)&&Ea(r)&&(e.setStyle(r.style),e.z=r.z,e.z2=r.z2,e.zlevel=r.zlevel,e.invisible=r.invisible,e.ignore=r.ignore,Pa(e)&&Pa(r)&&e.setShape(r.shape))}var lp=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n,i){this._progressiveEls=null;var o=this._data,s=t.getData(),l=this.group,u=Ri(t,s,a,n);o||l.removeAll(),s.diff(o).add(function(h){oa(n,null,h,u(h,i),t,l,s)}).remove(function(h){var f=o.getItemGraphicEl(h);f&&nn(f,zt(f).option,t)}).update(function(h,f){var c=o.getItemGraphicEl(f);oa(n,c,h,u(h,i),t,l,s)}).execute();var v=t.get("clip",!0)?rn(t.coordinateSystem,!1,t):null;v?l.setClipPath(v):l.removeClipPath(),this._data=s},e.prototype.incrementalPrepareRender=function(t,a,n){this.group.removeAll(),this._data=null},e.prototype.incrementalRender=function(t,a,n,i,o){var s=a.getData(),l=Ri(a,s,n,i),u=this._progressiveEls=[];function v(c){c.isGroup||(c.incremental=!0,c.ensureState("emphasis").hoverLayer=!0)}for(var h=t.start;h<t.end;h++){var f=oa(null,null,h,l(h,o),a,this.group,s);f&&(f.traverse(v),u.push(f))}},e.prototype.eachRendered=function(t){wr(this._progressiveEls||this.group,t)},e.prototype.filterForExposedEvent=function(t,a,n,i){var o=a.element;if(o==null||n.name===o)return!0;for(;(n=n.__hostTarget||n.parent)&&n!==this.group;)if(n.name===o)return!0;return!1},e.type="custom",e}(ht);function xn(r){var e=r.type,t;if(e==="path"){var a=r.shape,n=a.width!=null&&a.height!=null?{x:a.x||0,y:a.y||0,width:a.width,height:a.height}:null,i=Ls(a);t=Tl(i,null,n,a.layout||"center"),zt(t).customPathData=i}else if(e==="image")t=new ja({}),zt(t).customImagePath=r.style.image;else if(e==="text")t=new Zt({});else if(e==="group")t=new rt;else{if(e==="compoundPath")throw new Error('"compoundPath" is not supported yet.');var o=Al(e);if(!o){var s="";J(s)}t=new o}return zt(t).customGraphicType=e,t.name=r.name,t.z2EmphasisLift=1,t.z2SelectLift=1,t}function In(r,e,t,a,n,i,o){Cl(e);var s=n&&n.normal.cfg;s&&e.setTextConfig(s),a&&a.transition==null&&(a.transition=np);var l=a&&a.style;if(l){if(e.type==="text"){var u=l;Mt(u,"textFill")&&(u.fill=u.textFill),Mt(u,"textStroke")&&(u.stroke=u.textStroke)}var v=void 0,h=Pa(e)?l.decal:null;r&&h&&(h.dirty=!0,v=zo(h,r)),l.__decalPattern=v}if(Ea(e)&&l){var v=l.__decalPattern;v&&(l.decal=v)}Ml(e,a,i,{dataIndex:t,isInit:o,clearStyle:!0}),Pl(e,a.keyframeAnimation,i)}function Is(r,e,t,a,n){var i=e.isGroup?null:e,o=n&&n[r].cfg;if(i){var s=i.ensureState(r);if(a===!1){var l=i.getState(r);l&&(l.style=null)}else s.style=a||null;o&&(s.textConfig=o),or(i)}}function up(r,e,t){if(!r.isGroup){var a=r,n=t.currentZ,i=t.currentZLevel;a.z=n,a.zlevel=i;var o=e.z2;o!=null&&(a.z2=o||0);for(var s=0;s<ee.length;s++)vp(a,e,ee[s])}}function vp(r,e,t){var a=t===Xt,n=a?e:cr(e,t),i=n?n.z2:null,o;i!=null&&(o=a?r:r.ensureState(t),o.z2=i||0)}function Ri(r,e,t,a){var n=r.get("renderItem"),i=r.coordinateSystem,o={};i&&(o=i.prepareCustoms?i.prepareCustoms(i):op[i.type](i));for(var s=gt({getWidth:a.getWidth,getHeight:a.getHeight,getZr:a.getZr,getDevicePixelRatio:a.getDevicePixelRatio,value:b,style:x,ordinalRawValue:_,styleEmphasis:I,visual:D,barLayout:T,currentSeriesIndices:A,font:P},o.api||{}),l={context:{},seriesId:r.id,seriesName:r.name,seriesIndex:r.seriesIndex,coordSys:o.coordSys,dataInsideLength:e.count(),encode:hp(r.getData())},u,v,h={},f={},c={},d={},p=0;p<ee.length;p++){var g=ee[p];c[g]=r.getModel(na[g]),d[g]=r.getModel(ia[g])}function S(C){return C===u?v||(v=e.getItemModel(C)):e.getItemModel(C)}function m(C,M){return e.hasItemOption?C===u?h[M]||(h[M]=S(C).getModel(na[M])):S(C).getModel(na[M]):c[M]}function y(C,M){return e.hasItemOption?C===u?f[M]||(f[M]=S(C).getModel(ia[M])):S(C).getModel(ia[M]):d[M]}return function(C,M){return u=C,v=null,h={},f={},n&&n(gt({dataIndexInside:C,dataIndex:e.getRawIndex(C),actionType:M?M.type:null},l),s)};function b(C,M){return M==null&&(M=u),e.getStore().get(e.getDimensionIndex(C||0),M)}function _(C,M){M==null&&(M=u),C=C||0;var E=e.getDimensionInfo(C);if(!E){var N=e.getDimensionIndex(C);return N>=0?e.getStore().get(N,M):void 0}var V=e.get(E.name,M),G=E&&E.ordinalMeta;return G?G.categories[V]:V}function x(C,M){M==null&&(M=u);var E=e.getItemVisual(M,"style"),N=E&&E.fill,V=E&&E.opacity,G=m(M,Xt).getItemStyle();N!=null&&(G.fill=N),V!=null&&(G.opacity=V);var O={inheritColor:St(N)?N:"#000"},z=y(M,Xt),K=kt(z,null,O,!1,!0);K.text=z.getShallow("show")?$t(r.getFormattedLabel(M,Xt),Wn(e,M)):null;var X=Un(z,O,!1);return L(C,G),G=$n(G,K,X),C&&w(G,C),G.legacy=!0,G}function I(C,M){M==null&&(M=u);var E=m(M,Bt).getItemStyle(),N=y(M,Bt),V=kt(N,null,null,!0,!0);V.text=N.getShallow("show")?Oe(r.getFormattedLabel(M,Bt),r.getFormattedLabel(M,Xt),Wn(e,M)):null;var G=Un(N,null,!0);return L(C,E),E=$n(E,V,G),C&&w(E,C),E.legacy=!0,E}function w(C,M){for(var E in M)Mt(M,E)&&(C[E]=M[E])}function L(C,M){C&&(C.textFill&&(M.textFill=C.textFill),C.textPosition&&(M.textPosition=C.textPosition))}function D(C,M){if(M==null&&(M=u),Mt(Ni,C)){var E=e.getItemVisual(M,"style");return E?E[Ni[C]]:null}if(Mt(Yc,C))return e.getItemVisual(M,C)}function T(C){if(i.type==="cartesian2d"){var M=i.getBaseAxis();return Il(gt({axis:M},C))}}function A(){return t.getCurrentSeriesIndices()}function P(C){return wl(C,t)}}function hp(r){var e={};return R(r.dimensions,function(t){var a=r.getDimensionInfo(t);if(!a.isExtraCoord){var n=a.coordDim,i=e[n]=e[n]||[];i[a.coordDimIndex]=r.getDimensionIndex(t)}}),e}function oa(r,e,t,a,n,i,o){if(!a){i.remove(e);return}var s=wn(r,e,t,a,n,i);return s&&o.setItemGraphicEl(t,s),s&&st(s,a.focus,a.blurScope,a.emphasisDisabled),s}function wn(r,e,t,a,n,i){var o=-1,s=e;e&&ws(e,a,n)&&(o=wt(i.childrenRef(),e),e=null);var l=!e,u=e;u?u.clearStates():(u=xn(a),s&&sp(s,u)),a.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),_t.normal.cfg=_t.normal.conOpt=_t.emphasis.cfg=_t.emphasis.conOpt=_t.blur.cfg=_t.blur.conOpt=_t.select.cfg=_t.select.conOpt=null,_t.isLegacy=!1,cp(u,t,a,n,l,_t),fp(u,t,a,n,l),In(r,u,t,a,_t,n,l),Mt(a,"info")&&(zt(u).info=a.info);for(var v=0;v<ee.length;v++){var h=ee[v];if(h!==Xt){var f=cr(a,h),c=Ln(a,f,h);Is(h,u,f,c,_t)}}return up(u,a,n),a.type==="group"&&pp(r,u,t,a,n),o>=0?i.replaceAt(u,o):i.add(u),u}function ws(r,e,t){var a=zt(r),n=e.type,i=e.shape,o=e.style;return t.isUniversalTransitionEnabled()||n!=null&&n!==a.customGraphicType||n==="path"&&mp(i)&&Ls(i)!==a.customPathData||n==="image"&&Mt(o,"image")&&o.image!==a.customImagePath}function fp(r,e,t,a,n){var i=t.clipPath;if(i===!1)r&&r.getClipPath()&&r.removeClipPath();else if(i){var o=r.getClipPath();o&&ws(o,i,a)&&(o=null),o||(o=xn(i),r.setClipPath(o)),In(null,o,e,i,null,a,n)}}function cp(r,e,t,a,n,i){if(!r.isGroup){Vi(t,null,i),Vi(t,Bt,i);var o=i.normal.conOpt,s=i.emphasis.conOpt,l=i.blur.conOpt,u=i.select.conOpt;if(o!=null||s!=null||u!=null||l!=null){var v=r.getTextContent();if(o===!1)v&&r.removeTextContent();else{o=i.normal.conOpt=o||{type:"text"},v?v.clearStates():(v=xn(o),r.setTextContent(v)),In(null,v,e,o,null,a,n);for(var h=o&&o.style,f=0;f<ee.length;f++){var c=ee[f];if(c!==Xt){var d=i[c].conOpt;Is(c,v,d,Ln(o,d,c),null)}}h?v.dirty():v.markRedraw()}}}}function Vi(r,e,t){var a=e?cr(r,e):r,n=e?Ln(r,a,Bt):r.style,i=r.type,o=a?a.textConfig:null,s=r.textContent,l=s?e?cr(s,e):s:null;if(n&&(t.isLegacy||Ll(n,i,!!o,!!l))){t.isLegacy=!0;var u=Dl(n,i,!e);!o&&u.textConfig&&(o=u.textConfig),!l&&u.textContent&&(l=u.textContent)}if(!e&&l){var v=l;!v.type&&(v.type="text")}var h=e?t[e]:t.normal;h.cfg=o,h.conOpt=l}function cr(r,e){return e?r?r[e]:null:r}function Ln(r,e,t){var a=e&&e.style;return a==null&&t===Bt&&r&&(a=r.styleEmphasis),a}function pp(r,e,t,a,n){var i=a.children,o=i?i.length:0,s=a.$mergeChildren,l=s==="byName"||a.diffChildrenByName,u=s===!1;if(!(!o&&!l&&!u)){if(l){gp({api:r,oldChildren:e.children()||[],newChildren:i||[],dataIndex:t,seriesModel:n,group:e});return}u&&e.removeAll();for(var v=0;v<o;v++){var h=i[v],f=e.childAt(v);h?(h.ignore==null&&(h.ignore=!1),wn(r,f,t,h,n,e)):f.ignore=!0}for(var c=e.childCount()-1;c>=v;c--){var d=e.childAt(c);dp(e,d,n)}}}function dp(r,e,t){e&&nn(e,zt(r).option,t)}function gp(r){new de(r.oldChildren,r.newChildren,ki,ki,r).add(Gi).update(Gi).remove(yp).execute()}function ki(r,e){var t=r&&r.name;return t!=null?t:ip+e}function Gi(r,e){var t=this.context,a=r!=null?t.newChildren[r]:null,n=e!=null?t.oldChildren[e]:null;wn(t.api,n,t.dataIndex,a,t.seriesModel,t.group)}function yp(r){var e=this.context,t=e.oldChildren[r];t&&nn(t,zt(t).option,e.seriesModel)}function Ls(r){return r&&(r.pathData||r.d)}function mp(r){return r&&(Mt(r,"pathData")||Mt(r,"d"))}function Sp(r){r.registerChartView(lp),r.registerSeriesModel(Xc)}function Na(r,e){e=e||{};var t=r.coordinateSystem,a=r.axis,n={},i=a.position,o=a.orient,s=t.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};n.position=[o==="vertical"?u.vertical[i]:l[0],o==="horizontal"?u.horizontal[i]:l[3]];var v={horizontal:0,vertical:1};n.rotation=Math.PI/2*v[o];var h={top:-1,bottom:1,right:1,left:-1};n.labelDirection=n.tickDirection=n.nameDirection=h[i],r.get(["axisTick","inside"])&&(n.tickDirection=-n.tickDirection),Nt(e.labelInside,r.get(["axisLabel","inside"]))&&(n.labelDirection=-n.labelDirection);var f=e.rotate;return f==null&&(f=r.get(["axisLabel","rotate"])),n.labelRotation=i==="top"?-f:f,n.z2=1,n}var _p=["axisLine","axisTickLabel","axisName"],bp=["splitArea","splitLine"],xp=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="SingleAxisPointer",t}return e.prototype.render=function(t,a,n,i){var o=this.group;o.removeAll();var s=this._axisGroup;this._axisGroup=new rt;var l=Na(t),u=new El(t,l);R(_p,u.add,u),o.add(this._axisGroup),o.add(u.getGroup()),R(bp,function(v){t.get([v,"show"])&&Ip[v](this,this.group,this._axisGroup,t)},this),Nl(s,this._axisGroup,t),r.prototype.render.call(this,t,a,n,i)},e.prototype.remove=function(){Rl(this)},e.type="singleAxis",e}(Bo),Ip={splitLine:function(r,e,t,a){var n=a.axis;if(!n.scale.isBlank()){var i=a.getModel("splitLine"),o=i.getModel("lineStyle"),s=o.get("color");s=s instanceof Array?s:[s];for(var l=o.get("width"),u=a.coordinateSystem.getRect(),v=n.isHorizontal(),h=[],f=0,c=n.getTicksCoords({tickModel:i}),d=[],p=[],g=0;g<c.length;++g){var S=n.toGlobalCoord(c[g].coord);v?(d[0]=S,d[1]=u.y,p[0]=S,p[1]=u.y+u.height):(d[0]=u.x,d[1]=S,p[0]=u.x+u.width,p[1]=S);var m=new sr({shape:{x1:d[0],y1:d[1],x2:p[0],y2:p[1]},silent:!0});Vl(m.shape,l);var y=f++%s.length;h[y]=h[y]||[],h[y].push(m)}for(var b=o.getLineStyle(["color"]),g=0;g<h.length;++g)e.add(kl(h[g],{style:gt({stroke:s[g%s.length]},b),silent:!0}))}},splitArea:function(r,e,t,a){Gl(r,t,a,a)}},nr=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getCoordSysModel=function(){return this},e.type="singleAxis",e.layoutMode="box",e.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}}},e}(Dr);ye(nr,zl.prototype);var wp=function(r){k(e,r);function e(t,a,n,i,o){var s=r.call(this,t,a,n)||this;return s.type=i||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var t=this.position;return t==="top"||t==="bottom"},e.prototype.pointToData=function(t,a){return this.coordinateSystem.pointToData(t)[0]},e}(Bl),Ds=["single"],Lp=function(){function r(e,t,a){this.type="single",this.dimension="single",this.dimensions=Ds,this.axisPointerEnabled=!0,this.model=e,this._init(e,t,a)}return r.prototype._init=function(e,t,a){var n=this.dimension,i=new wp(n,Ol(e),[0,0],e.get("type"),e.get("position")),o=i.type==="category";i.onBand=o&&e.get("boundaryGap"),i.inverse=e.get("inverse"),i.orient=e.get("orient"),e.axis=i,i.model=e,i.coordinateSystem=this,this._axis=i},r.prototype.update=function(e,t){e.eachSeries(function(a){if(a.coordinateSystem===this){var n=a.getData();R(n.mapDimensionsAll(this.dimension),function(i){this._axis.scale.unionExtentFromData(n,i)},this),Hl(this._axis.scale,this._axis.model)}},this)},r.prototype.resize=function(e,t){this._rect=ge({left:e.get("left"),top:e.get("top"),right:e.get("right"),bottom:e.get("bottom"),width:e.get("width"),height:e.get("height")},{width:t.getWidth(),height:t.getHeight()}),this._adjustAxis()},r.prototype.getRect=function(){return this._rect},r.prototype._adjustAxis=function(){var e=this._rect,t=this._axis,a=t.isHorizontal(),n=a?[0,e.width]:[0,e.height],i=t.inverse?1:0;t.setExtent(n[i],n[1-i]),this._updateAxisTransform(t,a?e.x:e.y)},r.prototype._updateAxisTransform=function(e,t){var a=e.getExtent(),n=a[0]+a[1],i=e.isHorizontal();e.toGlobalCoord=i?function(o){return o+t}:function(o){return n-o+t},e.toLocalCoord=i?function(o){return o-t}:function(o){return n-o+t}},r.prototype.getAxis=function(){return this._axis},r.prototype.getBaseAxis=function(){return this._axis},r.prototype.getAxes=function(){return[this._axis]},r.prototype.getTooltipAxes=function(){return{baseAxes:[this.getAxis()],otherAxes:[]}},r.prototype.containPoint=function(e){var t=this.getRect(),a=this.getAxis(),n=a.orient;return n==="horizontal"?a.contain(a.toLocalCoord(e[0]))&&e[1]>=t.y&&e[1]<=t.y+t.height:a.contain(a.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},r.prototype.pointToData=function(e){var t=this.getAxis();return[t.coordToData(t.toLocalCoord(e[t.orient==="horizontal"?0:1]))]},r.prototype.dataToPoint=function(e){var t=this.getAxis(),a=this.getRect(),n=[],i=t.orient==="horizontal"?0:1;return e instanceof Array&&(e=e[0]),n[i]=t.toGlobalCoord(t.dataToCoord(+e)),n[1-i]=i===0?a.y+a.height/2:a.x+a.width/2,n},r.prototype.convertToPixel=function(e,t,a){var n=zi(t);return n===this?this.dataToPoint(a):null},r.prototype.convertFromPixel=function(e,t,a){var n=zi(t);return n===this?this.pointToData(a):null},r}();function zi(r){var e=r.seriesModel,t=r.singleAxisModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function Dp(r,e){var t=[];return r.eachComponent("singleAxis",function(a,n){var i=new Lp(a,r,e);i.name="single_"+n,i.resize(a,e),a.coordinateSystem=i,t.push(i)}),r.eachSeries(function(a){if(a.get("coordinateSystem")==="singleAxis"){var n=a.getReferringComponents("singleAxis",Go).models[0];a.coordinateSystem=n&&n.coordinateSystem}}),t}var Tp={create:Dp,dimensions:Ds},Bi=["x","y"],Ap=["width","height"],Cp=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,a,n,i,o){var s=n.axis,l=s.coordinateSystem,u=sa(l,1-pr(s)),v=l.dataToPoint(a)[0],h=i.get("type");if(h&&h!=="none"){var f=Fl(i),c=Mp[h](s,v,u);c.style=f,t.graphicKey=c.type,t.pointer=c}var d=Na(n);Wl(a,t,d,n,i,o)},e.prototype.getHandleTransform=function(t,a,n){var i=Na(a,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var o=Ul(a.axis,t,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,a,n,i){var o=n.axis,s=o.coordinateSystem,l=pr(o),u=sa(s,l),v=[t.x,t.y];v[l]+=a[l],v[l]=Math.min(u[1],v[l]),v[l]=Math.max(u[0],v[l]);var h=sa(s,1-l),f=(h[1]+h[0])/2,c=[f,f];return c[l]=v[l],{x:v[0],y:v[1],rotation:t.rotation,cursorPoint:c,tooltipOption:{verticalAlign:"middle"}}},e}($l),Mp={line:function(r,e,t){var a=Zl([e,t[0]],[e,t[1]],pr(r));return{type:"Line",subPixelOptimize:!0,shape:a}},shadow:function(r,e,t){var a=r.getBandWidth(),n=t[1]-t[0];return{type:"Rect",shape:Yl([e-a/2,t[0]],[a,n],pr(r))}}};function pr(r){return r.isHorizontal()?0:1}function sa(r,e){var t=r.getRect();return[t[Bi[e]],t[Bi[e]]+t[Ap[e]]]}var Pp=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="single",e}(Tr);function Ep(r){Y(Oo),Bo.registerAxisPointerClass("SingleAxisPointer",Cp),r.registerComponentView(Pp),r.registerComponentView(xp),r.registerComponentModel(nr),Xl(r,"single",nr,nr.defaultOption),r.registerCoordinateSystem("single",Tp)}var Np=["rect","polygon","keep","clear"];function Rp(r,e){var t=Gt(r?r.brush:[]);if(t.length){var a=[];R(t,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(a=a.concat(u))});var n=r&&r.toolbox;F(n)&&(n=n[0]),n||(n={feature:{}},r.toolbox=[n]);var i=n.feature||(n.feature={}),o=i.brush||(i.brush={}),s=o.type||(o.type=[]);s.push.apply(s,a),Vp(s),e&&!s.length&&s.push.apply(s,Np)}}function Vp(r){var e={};R(r,function(t){e[t]=1}),r.length=0,R(e,function(t,a){r.push(a)})}function kp(r){var e=r.brushType,t={point:function(a){return Oi[e].point(a,t,r)},rect:function(a){return Oi[e].rect(a,t,r)}};return t}var Oi={lineX:Hi(0),lineY:Hi(1),rect:{point:function(r,e,t){return r&&t.boundingRect.contain(r[0],r[1])},rect:function(r,e,t){return r&&t.boundingRect.intersect(r)}},polygon:{point:function(r,e,t){return r&&t.boundingRect.contain(r[0],r[1])&&Se(t.range,r[0],r[1])},rect:function(r,e,t){var a=t.range;if(!r||a.length<=1)return!1;var n=r.x,i=r.y,o=r.width,s=r.height,l=a[0];if(Se(a,n,i)||Se(a,n+o,i)||Se(a,n,i+s)||Se(a,n+o,i+s)||dt.create(r).contain(l[0],l[1])||Ue(n,i,n+o,i,a)||Ue(n,i,n,i+s,a)||Ue(n+o,i,n+o,i+s,a)||Ue(n,i+s,n+o,i+s,a))return!0}}};function Hi(r){var e=["x","y"],t=["width","height"];return{point:function(a,n,i){if(a){var o=i.range,s=a[r];return xe(s,o)}},rect:function(a,n,i){if(a){var o=i.range,s=[a[e[r]],a[e[r]]+a[t[r]]];return s[1]<s[0]&&s.reverse(),xe(s[0],o)||xe(s[1],o)||xe(o[0],s)||xe(o[1],s)}}}}function xe(r,e){return e[0]<=r&&r<=e[1]}var Fi=["inBrush","outOfBrush"],la="__ecBrushSelect",Ra="__ecInBrushSelectEvent";function Ts(r){r.eachComponent({mainType:"brush"},function(e){var t=e.brushTargetManager=new jl(e.option,r);t.setInputRanges(e.areas,r)})}function Gp(r,e,t){var a=[],n,i;r.eachComponent({mainType:"brush"},function(o){t&&t.type==="takeGlobalCursor"&&o.setBrushOption(t.key==="brush"?t.brushOption:{brushType:!1})}),Ts(r),r.eachComponent({mainType:"brush"},function(o,s){var l={brushId:o.id,brushIndex:s,brushName:o.name,areas:Re(o.areas),selected:[]};a.push(l);var u=o.option,v=u.brushLink,h=[],f=[],c=[],d=!1;s||(n=u.throttleType,i=u.throttleDelay);var p=W(o.areas,function(_){var x=Hp[_.brushType],I=gt({boundingRect:x?x(_):void 0},_);return I.selectors=kp(I),I}),g=ql(o.option,Fi,function(_){_.mappingMethod="fixed"});F(v)&&R(v,function(_){h[_]=1});function S(_){return v==="all"||!!h[_]}function m(_){return!!_.length}r.eachSeries(function(_,x){var I=c[x]=[];_.subType==="parallel"?y(_,x):b(_,x,I)});function y(_,x){var I=_.coordinateSystem;d=d||I.hasAxisBrushed(),S(x)&&I.eachActiveState(_.getData(),function(w,L){w==="active"&&(f[L]=1)})}function b(_,x,I){if(!(!_.brushSelector||Op(o,x))&&(R(p,function(L){o.brushTargetManager.controlSeries(L,_,r)&&I.push(L),d=d||m(I)}),S(x)&&m(I))){var w=_.getData();w.each(function(L){Wi(_,I,w,L)&&(f[L]=1)})}}r.eachSeries(function(_,x){var I={seriesId:_.id,seriesIndex:x,seriesName:_.name,dataIndex:[]};l.selected.push(I);var w=c[x],L=_.getData(),D=S(x)?function(T){return f[T]?(I.dataIndex.push(L.getRawIndex(T)),"inBrush"):"outOfBrush"}:function(T){return Wi(_,w,L,T)?(I.dataIndex.push(L.getRawIndex(T)),"inBrush"):"outOfBrush"};(S(x)?d:m(w))&&Kl(Fi,g,L,D)})}),zp(e,n,i,a,t)}function zp(r,e,t,a,n){if(n){var i=r.getZr();if(!i[Ra]){i[la]||(i[la]=Bp);var o=Ql(i,la,t,e);o(r,a)}}}function Bp(r,e){if(!r.isDisposed()){var t=r.getZr();t[Ra]=!0,r.dispatchAction({type:"brushSelect",batch:e}),t[Ra]=!1}}function Wi(r,e,t,a){for(var n=0,i=e.length;n<i;n++){var o=e[n];if(r.brushSelector(a,t,o.selectors,o))return!0}}function Op(r,e){var t=r.option.seriesIndex;return t!=null&&t!=="all"&&(F(t)?wt(t,e)<0:e!==t)}var Hp={rect:function(r){return Ui(r.range)},polygon:function(r){for(var e,t=r.range,a=0,n=t.length;a<n;a++){e=e||[[1/0,-1/0],[1/0,-1/0]];var i=t[a];i[0]<e[0][0]&&(e[0][0]=i[0]),i[0]>e[0][1]&&(e[0][1]=i[0]),i[1]<e[1][0]&&(e[1][0]=i[1]),i[1]>e[1][1]&&(e[1][1]=i[1])}return e&&Ui(e)}};function Ui(r){return new dt(r[0][0],r[1][0],r[0][1]-r[0][0],r[1][1]-r[1][0])}var Fp=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a){this.ecModel=t,this.api=a,this.model,(this._brushController=new Jl(a.getZr())).on("brush",lt(this._onBrush,this)).mount()},e.prototype.render=function(t,a,n,i){this.model=t,this._updateController(t,a,n,i)},e.prototype.updateTransform=function(t,a,n,i){Ts(a),this._updateController(t,a,n,i)},e.prototype.updateVisual=function(t,a,n,i){this.updateTransform(t,a,n,i)},e.prototype.updateView=function(t,a,n,i){this._updateController(t,a,n,i)},e.prototype._updateController=function(t,a,n,i){(!i||i.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(n)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var a=this.model.id,n=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:a,areas:Re(n),$from:a}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:a,areas:Re(n),$from:a})},e.type="brush",e}(Tr),Wp="#ddd",Up=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.areas=[],t.brushOption={},t}return e.prototype.optionUpdated=function(t,a){var n=this.option;!a&&tu(n,t,["inBrush","outOfBrush"]);var i=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:Wp},i.hasOwnProperty("liftZ")||(i.liftZ=5)},e.prototype.setAreas=function(t){t&&(this.areas=W(t,function(a){return $i(this.option,a)},this))},e.prototype.setBrushOption=function(t){this.brushOption=$i(this.option,t),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},e}(Dr);function $i(r,e){return oe({brushType:r.brushType,brushMode:r.brushMode,transformable:r.transformable,brushStyle:new jt(r.brushStyle).getItemStyle(),removeOnClick:r.removeOnClick,z:r.z},e,!0)}var $p=["rect","polygon","lineX","lineY","keep","clear"],Zp=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,a,n){var i,o,s;a.eachComponent({mainType:"brush"},function(l){i=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=i,this._brushMode=o,R(t.get("type",!0),function(l){t.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===i)?"emphasis":"normal")})},e.prototype.updateView=function(t,a,n){this.render(t,a,n)},e.prototype.getIcons=function(){var t=this.model,a=t.get("icon",!0),n={};return R(t.get("type",!0),function(i){a[i]&&(n[i]=a[i])}),n},e.prototype.onclick=function(t,a,n){var i=this._brushType,o=this._brushMode;n==="clear"?(a.dispatchAction({type:"axisAreaSelect",intervals:[]}),a.dispatchAction({type:"brush",command:"clear",areas:[]})):a.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:n==="keep"?i:i===n?!1:n,brushMode:n==="keep"?o==="multiple"?"single":"multiple":o}})},e.getDefaultOption=function(t){var a={show:!0,type:$p.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:t.getLocaleModel().get(["toolbox","brush","title"])};return a},e}(eu);function Yp(r){r.registerComponentView(Fp),r.registerComponentModel(Up),r.registerPreprocessor(Rp),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,Gp),r.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(a){a.setAreas(e.areas)})}),r.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},Me),r.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},Me),ru("brush",Zp)}function Dn(r,e){if(!r)return!1;for(var t=F(r)?r:[r],a=0;a<t.length;a++)if(t[a]&&t[a][e])return!0;return!1}function Qe(r){Ka(r,"label",["show"])}var Je=Lt(),Ft=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.createdBySelf=!1,t}return e.prototype.init=function(t,a,n){this.mergeDefaultAndTheme(t,n),this._mergeOption(t,n,!1,!0)},e.prototype.isAnimationEnabled=function(){if(Ho.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},e.prototype.mergeOption=function(t,a){this._mergeOption(t,a,!1,!1)},e.prototype._mergeOption=function(t,a,n,i){var o=this.mainType;n||a.eachSeries(function(s){var l=s.get(this.mainType,!0),u=Je(s)[o];if(!l||!l.data){Je(s)[o]=null;return}u?u._mergeOption(l,a,!0):(i&&Qe(l),R(l.data,function(v){v instanceof Array?(Qe(v[0]),Qe(v[1])):Qe(v)}),u=this.createMarkerModelFromSeries(l,this,a),U(u,{mainType:this.mainType,seriesIndex:s.seriesIndex,name:s.name,createdBySelf:!0}),u.__hostSeries=s),Je(s)[o]=u},this)},e.prototype.formatTooltip=function(t,a,n){var i=this.getData(),o=this.getRawValue(t),s=i.getName(t);return Ot("section",{header:this.name,blocks:[Ot("nameValue",{name:s,value:o,noName:!s,noValue:o==null})]})},e.prototype.getData=function(){return this._data},e.prototype.setData=function(t){this._data=t},e.prototype.getDataParams=function(t,a){var n=Fo.prototype.getDataParams.call(this,t,a),i=this.__hostSeries;return i&&(n.seriesId=i.id,n.seriesName=i.name,n.seriesType=i.subType),n},e.getMarkerModelFromSeries=function(t,a){return Je(t)[a]},e.type="marker",e.dependencies=["series","grid","polar","geo"],e}(Dr);ye(Ft,Fo.prototype);var Xp=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,a,n){return new e(t,a,n)},e.type="markPoint",e.defaultOption={z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},e}(Ft);function Va(r){return!(isNaN(parseFloat(r.x))&&isNaN(parseFloat(r.y)))}function qp(r){return!isNaN(parseFloat(r.x))&&!isNaN(parseFloat(r.y))}function tr(r,e,t,a,n,i){var o=[],s=au(e,a),l=s?e.getCalculationInfo("stackResultDimension"):a,u=Tn(e,l,r),v=e.indicesOfNearest(l,u)[0];o[n]=e.get(t,v),o[i]=e.get(l,v);var h=e.get(a,v),f=nu(e.get(a,v));return f=Math.min(f,20),f>=0&&(o[i]=+o[i].toFixed(f)),[o,h]}var ua={min:et(tr,"min"),max:et(tr,"max"),average:et(tr,"average"),median:et(tr,"median")};function ze(r,e){if(e){var t=r.getData(),a=r.coordinateSystem,n=a&&a.dimensions;if(!qp(e)&&!F(e.coord)&&F(n)){var i=As(e,t,a,r);if(e=Re(e),e.type&&ua[e.type]&&i.baseAxis&&i.valueAxis){var o=wt(n,i.baseAxis.dim),s=wt(n,i.valueAxis.dim),l=ua[e.type](t,i.baseDataDim,i.valueDataDim,o,s);e.coord=l[0],e.value=l[1]}else e.coord=[e.xAxis!=null?e.xAxis:e.radiusAxis,e.yAxis!=null?e.yAxis:e.angleAxis]}if(e.coord==null||!F(n))e.coord=[];else for(var u=e.coord,v=0;v<2;v++)ua[u[v]]&&(u[v]=Tn(t,t.mapDimension(n[v]),u[v]));return e}}function As(r,e,t,a){var n={};return r.valueIndex!=null||r.valueDim!=null?(n.valueDataDim=r.valueIndex!=null?e.getDimension(r.valueIndex):r.valueDim,n.valueAxis=t.getAxis(Kp(a,n.valueDataDim)),n.baseAxis=t.getOtherAxis(n.valueAxis),n.baseDataDim=e.mapDimension(n.baseAxis.dim)):(n.baseAxis=a.getBaseAxis(),n.valueAxis=t.getOtherAxis(n.baseAxis),n.baseDataDim=e.mapDimension(n.baseAxis.dim),n.valueDataDim=e.mapDimension(n.valueAxis.dim)),n}function Kp(r,e){var t=r.getData().getDimensionInfo(e);return t&&t.coordDim}function Be(r,e){return r&&r.containData&&e.coord&&!Va(e)?r.containData(e.coord):!0}function jp(r,e,t){return r&&r.containZone&&e.coord&&t.coord&&!Va(e)&&!Va(t)?r.containZone(e.coord,t.coord):!0}function Cs(r,e){return r?function(t,a,n,i){var o=i<2?t.coord&&t.coord[i]:t.value;return lr(o,e[i])}:function(t,a,n,i){return lr(t.value,e[i])}}function Tn(r,e,t){if(t==="average"){var a=0,n=0;return r.each(e,function(i,o){isNaN(i)||(a+=i,n++)}),a/n}else return t==="median"?r.getMedian(e):r.getDataExtent(e)[t==="max"?1:0]}var va=Lt(),An=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this.markerGroupMap=mt()},e.prototype.render=function(t,a,n){var i=this,o=this.markerGroupMap;o.each(function(s){va(s).keep=!1}),a.eachSeries(function(s){var l=Ft.getMarkerModelFromSeries(s,i.type);l&&i.renderSeries(s,l,a,n)}),o.each(function(s){!va(s).keep&&i.group.remove(s.group)})},e.prototype.markKeep=function(t){va(t).keep=!0},e.prototype.toggleBlurSeries=function(t,a){var n=this;R(t,function(i){var o=Ft.getMarkerModelFromSeries(i,n.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(a?iu(l):ou(l))})}})},e.type="marker",e}(Tr);function Zi(r,e,t){var a=e.coordinateSystem;r.each(function(n){var i=r.getItemModel(n),o,s=B(i.get("x"),t.getWidth()),l=B(i.get("y"),t.getHeight());if(!isNaN(s)&&!isNaN(l))o=[s,l];else if(e.getMarkerPosition)o=e.getMarkerPosition(r.getValues(r.dimensions,n));else if(a){var u=r.get(a.dimensions[0],n),v=r.get(a.dimensions[1],n);o=a.dataToPoint([u,v])}isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),r.setItemLayout(n,o)})}var Qp=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,a,n){a.eachSeries(function(i){var o=Ft.getMarkerModelFromSeries(i,"markPoint");o&&(Zi(o.getData(),i,n),this.markerGroupMap.get(i.id).updateLayout())},this)},e.prototype.renderSeries=function(t,a,n,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,v=u.get(s)||u.set(s,new Xa),h=Jp(o,t,a);a.setData(h),Zi(a.getData(),t,i),h.each(function(f){var c=h.getItemModel(f),d=c.getShallow("symbol"),p=c.getShallow("symbolSize"),g=c.getShallow("symbolRotate"),S=c.getShallow("symbolOffset"),m=c.getShallow("symbolKeepAspect");if(nt(d)||nt(p)||nt(g)||nt(S)){var y=a.getRawValue(f),b=a.getDataParams(f);nt(d)&&(d=d(y,b)),nt(p)&&(p=p(y,b)),nt(g)&&(g=g(y,b)),nt(S)&&(S=S(y,b))}var _=c.getModel("itemStyle").getItemStyle(),x=on(l,"color");_.fill||(_.fill=x),h.setItemVisual(f,{symbol:d,symbolSize:p,symbolRotate:g,symbolOffset:S,symbolKeepAspect:m,style:_})}),v.updateData(h),this.group.add(v.group),h.eachItemGraphicEl(function(f){f.traverse(function(c){it(c).dataModel=a})}),this.markKeep(v),v.group.silent=a.get("silent")||t.get("silent")},e.type="markPoint",e}(An);function Jp(r,e,t){var a;r?a=W(r&&r.dimensions,function(s){var l=e.getData().getDimensionInfo(e.getData().mapDimension(s))||{};return U(U({},l),{name:s,ordinalMeta:null})}):a=[{name:"value",type:"float"}];var n=new bt(a,t),i=W(t.get("data"),et(ze,e));r&&(i=Ct(i,et(Be,r)));var o=Cs(!!r,a);return n.initData(i,null,o),n}function td(r){r.registerComponentModel(Xp),r.registerComponentView(Qp),r.registerPreprocessor(function(e){Dn(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var ed=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,a,n){return new e(t,a,n)},e.type="markLine",e.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},e}(Ft),er=Lt(),rd=function(r,e,t,a){var n=r.getData(),i;if(F(a))i=a;else{var o=a.type;if(o==="min"||o==="max"||o==="average"||o==="median"||a.xAxis!=null||a.yAxis!=null){var s=void 0,l=void 0;if(a.yAxis!=null||a.xAxis!=null)s=e.getAxis(a.yAxis!=null?"y":"x"),l=Nt(a.yAxis,a.xAxis);else{var u=As(a,n,e,r);s=u.valueAxis;var v=su(n,u.valueDataDim);l=Tn(n,v,o)}var h=s.dim==="x"?0:1,f=1-h,c=Re(a),d={coord:[]};c.type=null,c.coord=[],c.coord[f]=-1/0,d.coord[f]=1/0;var p=t.get("precision");p>=0&&Ht(l)&&(l=+l.toFixed(Math.min(p,20))),c.coord[h]=d.coord[h]=l,i=[c,d,{type:o,valueIndex:a.valueIndex,value:l}]}else i=[]}var g=[ze(r,i[0]),ze(r,i[1]),U({},i[2])];return g[2].type=g[2].type||null,oe(g[2],g[0]),oe(g[2],g[1]),g};function dr(r){return!isNaN(r)&&!isFinite(r)}function Yi(r,e,t,a){var n=1-r,i=a.dimensions[r];return dr(e[n])&&dr(t[n])&&e[r]===t[r]&&a.getAxis(i).containData(e[r])}function ad(r,e){if(r.type==="cartesian2d"){var t=e[0].coord,a=e[1].coord;if(t&&a&&(Yi(1,t,a,r)||Yi(0,t,a,r)))return!0}return Be(r,e[0])&&Be(r,e[1])}function ha(r,e,t,a,n){var i=a.coordinateSystem,o=r.getItemModel(e),s,l=B(o.get("x"),n.getWidth()),u=B(o.get("y"),n.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(a.getMarkerPosition)s=a.getMarkerPosition(r.getValues(r.dimensions,e));else{var v=i.dimensions,h=r.get(v[0],e),f=r.get(v[1],e);s=i.dataToPoint([h,f])}if(Lr(i,"cartesian2d")){var c=i.getAxis("x"),d=i.getAxis("y"),v=i.dimensions;dr(r.get(v[0],e))?s[0]=c.toGlobalCoord(c.getExtent()[t?0:1]):dr(r.get(v[1],e))&&(s[1]=d.toGlobalCoord(d.getExtent()[t?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}r.setItemLayout(e,s)}var nd=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,a,n){a.eachSeries(function(i){var o=Ft.getMarkerModelFromSeries(i,"markLine");if(o){var s=o.getData(),l=er(o).from,u=er(o).to;l.each(function(v){ha(l,v,!0,i,n),ha(u,v,!1,i,n)}),s.each(function(v){s.setItemLayout(v,[l.getItemLayout(v),u.getItemLayout(v)])}),this.markerGroupMap.get(i.id).updateLayout()}},this)},e.prototype.renderSeries=function(t,a,n,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,v=u.get(s)||u.set(s,new yn);this.group.add(v.group);var h=id(o,t,a),f=h.from,c=h.to,d=h.line;er(a).from=f,er(a).to=c,a.setData(d);var p=a.get("symbol"),g=a.get("symbolSize"),S=a.get("symbolRotate"),m=a.get("symbolOffset");F(p)||(p=[p,p]),F(g)||(g=[g,g]),F(S)||(S=[S,S]),F(m)||(m=[m,m]),h.from.each(function(b){y(f,b,!0),y(c,b,!1)}),d.each(function(b){var _=d.getItemModel(b).getModel("lineStyle").getLineStyle();d.setItemLayout(b,[f.getItemLayout(b),c.getItemLayout(b)]),_.stroke==null&&(_.stroke=f.getItemVisual(b,"style").fill),d.setItemVisual(b,{fromSymbolKeepAspect:f.getItemVisual(b,"symbolKeepAspect"),fromSymbolOffset:f.getItemVisual(b,"symbolOffset"),fromSymbolRotate:f.getItemVisual(b,"symbolRotate"),fromSymbolSize:f.getItemVisual(b,"symbolSize"),fromSymbol:f.getItemVisual(b,"symbol"),toSymbolKeepAspect:c.getItemVisual(b,"symbolKeepAspect"),toSymbolOffset:c.getItemVisual(b,"symbolOffset"),toSymbolRotate:c.getItemVisual(b,"symbolRotate"),toSymbolSize:c.getItemVisual(b,"symbolSize"),toSymbol:c.getItemVisual(b,"symbol"),style:_})}),v.updateData(d),h.line.eachItemGraphicEl(function(b){it(b).dataModel=a,b.traverse(function(_){it(_).dataModel=a})});function y(b,_,x){var I=b.getItemModel(_);ha(b,_,x,t,i);var w=I.getModel("itemStyle").getItemStyle();w.fill==null&&(w.fill=on(l,"color")),b.setItemVisual(_,{symbolKeepAspect:I.get("symbolKeepAspect"),symbolOffset:$t(I.get("symbolOffset",!0),m[x?0:1]),symbolRotate:$t(I.get("symbolRotate",!0),S[x?0:1]),symbolSize:$t(I.get("symbolSize"),g[x?0:1]),symbol:$t(I.get("symbol",!0),p[x?0:1]),style:w})}this.markKeep(v),v.group.silent=a.get("silent")||t.get("silent")},e.type="markLine",e}(An);function id(r,e,t){var a;r?a=W(r&&r.dimensions,function(u){var v=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return U(U({},v),{name:u,ordinalMeta:null})}):a=[{name:"value",type:"float"}];var n=new bt(a,t),i=new bt(a,t),o=new bt([],t),s=W(t.get("data"),et(rd,e,r,t));r&&(s=Ct(s,et(ad,r)));var l=Cs(!!r,a);return n.initData(W(s,function(u){return u[0]}),null,l),i.initData(W(s,function(u){return u[1]}),null,l),o.initData(W(s,function(u){return u[2]})),o.hasItemOption=!0,{from:n,to:i,line:o}}function od(r){r.registerComponentModel(ed),r.registerComponentView(nd),r.registerPreprocessor(function(e){Dn(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var sd=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,a,n){return new e(t,a,n)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(Ft),rr=Lt(),ld=function(r,e,t,a){var n=a[0],i=a[1];if(!(!n||!i)){var o=ze(r,n),s=ze(r,i),l=o.coord,u=s.coord;l[0]=Nt(l[0],-1/0),l[1]=Nt(l[1],-1/0),u[0]=Nt(u[0],1/0),u[1]=Nt(u[1],1/0);var v=ko([{},o,s]);return v.coord=[o.coord,s.coord],v.x0=o.x,v.y0=o.y,v.x1=s.x,v.y1=s.y,v}};function gr(r){return!isNaN(r)&&!isFinite(r)}function Xi(r,e,t,a){var n=1-r;return gr(e[n])&&gr(t[n])}function ud(r,e){var t=e.coord[0],a=e.coord[1],n={coord:t,x:e.x0,y:e.y0},i={coord:a,x:e.x1,y:e.y1};return Lr(r,"cartesian2d")?t&&a&&(Xi(1,t,a)||Xi(0,t,a))?!0:jp(r,n,i):Be(r,n)||Be(r,i)}function qi(r,e,t,a,n){var i=a.coordinateSystem,o=r.getItemModel(e),s,l=B(o.get(t[0]),n.getWidth()),u=B(o.get(t[1]),n.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(a.getMarkerPosition){var v=r.getValues(["x0","y0"],e),h=r.getValues(["x1","y1"],e),f=i.clampData(v),c=i.clampData(h),d=[];t[0]==="x0"?d[0]=f[0]>c[0]?h[0]:v[0]:d[0]=f[0]>c[0]?v[0]:h[0],t[1]==="y0"?d[1]=f[1]>c[1]?h[1]:v[1]:d[1]=f[1]>c[1]?v[1]:h[1],s=a.getMarkerPosition(d,t,!0)}else{var p=r.get(t[0],e),g=r.get(t[1],e),S=[p,g];i.clampData&&i.clampData(S,S),s=i.dataToPoint(S,!0)}if(Lr(i,"cartesian2d")){var m=i.getAxis("x"),y=i.getAxis("y"),p=r.get(t[0],e),g=r.get(t[1],e);gr(p)?s[0]=m.toGlobalCoord(m.getExtent()[t[0]==="x0"?0:1]):gr(g)&&(s[1]=y.toGlobalCoord(y.getExtent()[t[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var Ki=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],vd=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,a,n){a.eachSeries(function(i){var o=Ft.getMarkerModelFromSeries(i,"markArea");if(o){var s=o.getData();s.each(function(l){var u=W(Ki,function(h){return qi(s,l,h,i,n)});s.setItemLayout(l,u);var v=s.getItemGraphicEl(l);v.setShape("points",u)})}},this)},e.prototype.renderSeries=function(t,a,n,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,v=u.get(s)||u.set(s,{group:new rt});this.group.add(v.group),this.markKeep(v);var h=hd(o,t,a);a.setData(h),h.each(function(f){var c=W(Ki,function(w){return qi(h,f,w,t,i)}),d=o.getAxis("x").scale,p=o.getAxis("y").scale,g=d.getExtent(),S=p.getExtent(),m=[d.parse(h.get("x0",f)),d.parse(h.get("x1",f))],y=[p.parse(h.get("y0",f)),p.parse(h.get("y1",f))];xa(m),xa(y);var b=!(g[0]>m[1]||g[1]<m[0]||S[0]>y[1]||S[1]<y[0]),_=!b;h.setItemLayout(f,{points:c,allClipped:_});var x=h.getItemModel(f).getModel("itemStyle").getItemStyle(),I=on(l,"color");x.fill||(x.fill=I,St(x.fill)&&(x.fill=ya(x.fill,.4))),x.stroke||(x.stroke=I),h.setItemVisual(f,"style",x)}),h.diff(rr(v).data).add(function(f){var c=h.getItemLayout(f);if(!c.allClipped){var d=new Pe({shape:{points:c.points}});h.setItemGraphicEl(f,d),v.group.add(d)}}).update(function(f,c){var d=rr(v).data.getItemGraphicEl(c),p=h.getItemLayout(f);p.allClipped?d&&v.group.remove(d):(d?ot(d,{shape:{points:p.points}},a,f):d=new Pe({shape:{points:p.points}}),h.setItemGraphicEl(f,d),v.group.add(d))}).remove(function(f){var c=rr(v).data.getItemGraphicEl(f);v.group.remove(c)}).execute(),h.eachItemGraphicEl(function(f,c){var d=h.getItemModel(c),p=h.getItemVisual(c,"style");f.useStyle(h.getItemVisual(c,"style")),Qt(f,Rt(d),{labelFetcher:a,labelDataIndex:c,defaultText:h.getName(c)||"",inheritColor:St(p.fill)?ya(p.fill,1):"#000"}),Pt(f,d),st(f,null,null,d.get(["emphasis","disabled"])),it(f).dataModel=a}),rr(v).data=h,v.group.silent=a.get("silent")||t.get("silent")},e.type="markArea",e}(An);function hd(r,e,t){var a,n,i=["x0","y0","x1","y1"];if(r){var o=W(r&&r.dimensions,function(u){var v=e.getData(),h=v.getDimensionInfo(v.mapDimension(u))||{};return U(U({},h),{name:u,ordinalMeta:null})});n=W(i,function(u,v){return{name:u,type:o[v%2].type}}),a=new bt(n,t)}else n=[{name:"value",type:"float"}],a=new bt(n,t);var s=W(t.get("data"),et(ld,e,r,t));r&&(s=Ct(s,et(ud,r)));var l=r?function(u,v,h,f){var c=u.coord[Math.floor(f/2)][f%2];return lr(c,n[f])}:function(u,v,h,f){return lr(u.value,n[f])};return a.initData(s,null,l),a.hasItemOption=!0,a}function fd(r){r.registerComponentModel(sd),r.registerComponentView(vd),r.registerPreprocessor(function(e){Dn(e.series,"markArea")&&(e.markArea=e.markArea||{})})}var ji={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},cd=function(){function r(e){var t=this._condVal=St(e)?new RegExp(e):vu(e)?e:null;if(t==null){var a="";J(a)}}return r.prototype.evaluate=function(e){var t=typeof e;return St(t)?this._condVal.test(e):Ht(t)?this._condVal.test(e+""):!1},r}(),pd=function(){function r(){}return r.prototype.evaluate=function(){return this.value},r}(),dd=function(){function r(){}return r.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(!e[t].evaluate())return!1;return!0},r}(),gd=function(){function r(){}return r.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(e[t].evaluate())return!0;return!1},r}(),yd=function(){function r(){}return r.prototype.evaluate=function(){return!this.child.evaluate()},r}(),md=function(){function r(){}return r.prototype.evaluate=function(){for(var e=!!this.valueParser,t=this.getValue,a=t(this.valueGetterParam),n=e?this.valueParser(a):null,i=0;i<this.subCondList.length;i++)if(!this.subCondList[i].evaluate(e?n:a))return!1;return!0},r}();function Cn(r,e){if(r===!0||r===!1){var t=new pd;return t.value=r,t}var a="";return Ms(r)||J(a),r.and?Qi("and",r,e):r.or?Qi("or",r,e):r.not?Sd(r,e):_d(r,e)}function Qi(r,e,t){var a=e[r],n="";F(a)||J(n),a.length||J(n);var i=r==="and"?new dd:new gd;return i.children=W(a,function(o){return Cn(o,t)}),i.children.length||J(n),i}function Sd(r,e){var t=r.not,a="";Ms(t)||J(a);var n=new yd;return n.child=Cn(t,e),n.child||J(a),n}function _d(r,e){for(var t="",a=e.prepareGetValue(r),n=[],i=Ba(r),o=r.parser,s=o?Wo(o):null,l=0;l<i.length;l++){var u=i[l];if(!(u==="parser"||e.valueGetterAttrMap.get(u))){var v=Mt(ji,u)?ji[u]:u,h=r[u],f=s?s(h):h,c=lu(v,f)||v==="reg"&&new cd(f);c||J(t),n.push(c)}}n.length||J(t);var d=new md;return d.valueGetterParam=a,d.valueParser=s,d.getValue=e.getValue,d.subCondList=n,d}function Ms(r){return an(r)&&!uu(r)}var bd=function(){function r(e,t){this._cond=Cn(e,t)}return r.prototype.evaluate=function(){return this._cond.evaluate()},r}();function xd(r,e){return new bd(r,e)}var Id={type:"echarts:filter",transform:function(r){for(var e=r.upstream,t,a=xd(r.config,{valueGetterAttrMap:mt({dimension:!0}),prepareGetValue:function(s){var l="",u=s.dimension;Mt(s,"dimension")||J(l);var v=e.getDimensionInfo(u);return v||J(l),{dimIdx:v.index}},getValue:function(s){return e.retrieveValueFromItem(t,s.dimIdx)}}),n=[],i=0,o=e.count();i<o;i++)t=e.getRawDataItem(i),a.evaluate()&&n.push(t);return{data:n}}},wd={type:"echarts:sort",transform:function(r){var e=r.upstream,t=r.config,a="",n=Gt(t);n.length||J(a);var i=[];R(n,function(v){var h=v.dimension,f=v.order,c=v.parser,d=v.incomparable;if(h==null&&J(a),f!=="asc"&&f!=="desc"&&J(a),d&&d!=="min"&&d!=="max"){var p="";J(p)}if(f!=="asc"&&f!=="desc"){var g="";J(g)}var S=e.getDimensionInfo(h);S||J(a);var m=c?Wo(c):null;c&&!m&&J(a),i.push({dimIdx:S.index,parser:m,comparator:new hu(f,d)})});var o=e.sourceFormat;o!==Ro&&o!==fu&&J(a);for(var s=[],l=0,u=e.count();l<u;l++)s.push(e.getRawDataItem(l));return s.sort(function(v,h){for(var f=0;f<i.length;f++){var c=i[f],d=e.retrieveValueFromItem(v,c.dimIdx),p=e.retrieveValueFromItem(h,c.dimIdx);c.parser&&(d=c.parser(d),p=c.parser(p));var g=c.comparator.evaluate(d,p);if(g!==0)return g}return 0}),{data:s}}};function Ld(r){r.registerTransform(Id),r.registerTransform(wd)}var Dd=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataset",t}return e.prototype.init=function(t,a,n){r.prototype.init.call(this,t,a,n),this._sourceManager=new cu(this),Zn(this)},e.prototype.mergeOption=function(t,a){r.prototype.mergeOption.call(this,t,a),Zn(this)},e.prototype.optionUpdated=function(){this._sourceManager.dirty()},e.prototype.getSourceManager=function(){return this._sourceManager},e.type="dataset",e.defaultOption={seriesLayoutBy:pu},e}(Dr),Td=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataset",t}return e.type="dataset",e}(Tr);function Ad(r){r.registerComponentModel(Dd),r.registerComponentView(Td)}function Ji(r,e,t){var a=Ia.createCanvas(),n=e.getWidth(),i=e.getHeight(),o=a.style;return o&&(o.position="absolute",o.left="0",o.top="0",o.width=n+"px",o.height=i+"px",a.setAttribute("data-zr-dom-id",r)),a.width=n*t,a.height=i*t,a}var fa=function(r){k(e,r);function e(t,a,n){var i=r.call(this)||this;i.motionBlur=!1,i.lastFrameAlpha=.7,i.dpr=1,i.virtual=!1,i.config={},i.incremental=!1,i.zlevel=0,i.maxRepaintRectCount=5,i.__dirty=!0,i.__firstTimePaint=!0,i.__used=!1,i.__drawIndex=0,i.__startIndex=0,i.__endIndex=0,i.__prevStartIndex=null,i.__prevEndIndex=null;var o;n=n||$o,typeof t=="string"?o=Ji(t,a,n):an(t)&&(o=t,t=o.id),i.id=t,i.dom=o;var s=o.style;return s&&(Uo(o),o.onselectstart=function(){return!1},s.padding="0",s.margin="0",s.borderWidth="0"),i.painter=a,i.dpr=n,i}return e.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},e.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},e.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},e.prototype.setUnpainted=function(){this.__firstTimePaint=!0},e.prototype.createBackBuffer=function(){var t=this.dpr;this.domBack=Ji("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),t!==1&&this.ctxBack.scale(t,t)},e.prototype.createRepaintRects=function(t,a,n,i){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var o=[],s=this.maxRepaintRectCount,l=!1,u=new dt(0,0,0,0);function v(m){if(!(!m.isFinite()||m.isZero()))if(o.length===0){var y=new dt(0,0,0,0);y.copy(m),o.push(y)}else{for(var b=!1,_=1/0,x=0,I=0;I<o.length;++I){var w=o[I];if(w.intersect(m)){var L=new dt(0,0,0,0);L.copy(w),L.union(m),o[I]=L,b=!0;break}else if(l){u.copy(m),u.union(w);var D=m.width*m.height,T=w.width*w.height,A=u.width*u.height,P=A-D-T;P<_&&(_=P,x=I)}}if(l&&(o[x].union(m),b=!0),!b){var y=new dt(0,0,0,0);y.copy(m),o.push(y)}l||(l=o.length>=s)}}for(var h=this.__startIndex;h<this.__endIndex;++h){var f=t[h];if(f){var c=f.shouldBePainted(n,i,!0,!0),d=f.__isRendered&&(f.__dirty&wa||!c)?f.getPrevPaintRect():null;d&&v(d);var p=c&&(f.__dirty&wa||!f.__isRendered)?f.getPaintRect():null;p&&v(p)}}for(var h=this.__prevStartIndex;h<this.__prevEndIndex;++h){var f=a[h],c=f&&f.shouldBePainted(n,i,!0,!0);if(f&&(!c||!f.__zr)&&f.__isRendered){var d=f.getPrevPaintRect();d&&v(d)}}var g;do{g=!1;for(var h=0;h<o.length;){if(o[h].isZero()){o.splice(h,1);continue}for(var S=h+1;S<o.length;)o[h].intersect(o[S])?(g=!0,o[h].union(o[S]),o.splice(S,1)):S++;h++}}while(g);return this._paintRects=o,o},e.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},e.prototype.resize=function(t,a){var n=this.dpr,i=this.dom,o=i.style,s=this.domBack;o&&(o.width=t+"px",o.height=a+"px"),i.width=t*n,i.height=a*n,s&&(s.width=t*n,s.height=a*n,n!==1&&this.ctxBack.scale(n,n))},e.prototype.clear=function(t,a,n){var i=this.dom,o=this.ctx,s=i.width,l=i.height;a=a||this.clearColor;var u=this.motionBlur&&!t,v=this.lastFrameAlpha,h=this.dpr,f=this;u&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(i,0,0,s/h,l/h));var c=this.domBack;function d(p,g,S,m){if(o.clearRect(p,g,S,m),a&&a!=="transparent"){var y=void 0;if(gu(a)){var b=a.global||a.__width===S&&a.__height===m;y=b&&a.__canvasGradient||yu(o,a,{x:0,y:0,width:S,height:m}),a.__canvasGradient=y,a.__width=S,a.__height=m}else mu(a)&&(a.scaleX=a.scaleX||h,a.scaleY=a.scaleY||h,y=Su(o,a,{dirty:function(){f.setUnpainted(),f.painter.refresh()}}));o.save(),o.fillStyle=y||a,o.fillRect(p,g,S,m),o.restore()}u&&(o.save(),o.globalAlpha=v,o.drawImage(c,p,g,S,m),o.restore())}!n||u?d(0,0,s,l):n.length&&R(n,function(p){d(p.x*h,p.y*h,p.width*h,p.height*h)})},e}(du),to=1e5,re=314159,ar=.01,Cd=.001;function Md(r){return r?r.__builtin__?!0:!(typeof r.resize!="function"||typeof r.refresh!="function"):!1}function Pd(r,e){var t=document.createElement("div");return t.style.cssText=["position:relative","width:"+r+"px","height:"+e+"px","padding:0","margin:0","border-width:0"].join(";")+";",t}var Ed=function(){function r(e,t,a,n){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var i=!e.nodeName||e.nodeName.toUpperCase()==="CANVAS";this._opts=a=U({},a||{}),this.dpr=a.devicePixelRatio||$o,this._singleCanvas=i,this.root=e;var o=e.style;o&&(Uo(e),e.innerHTML=""),this.storage=t;var s=this._zlevelList;this._prevDisplayList=[];var l=this._layers;if(i){var v=e,h=v.width,f=v.height;a.width!=null&&(h=a.width),a.height!=null&&(f=a.height),this.dpr=a.devicePixelRatio||1,v.width=h*this.dpr,v.height=f*this.dpr,this._width=h,this._height=f;var c=new fa(v,this,this.dpr);c.__builtin__=!0,c.initContext(),l[re]=c,c.zlevel=re,s.push(re),this._domRoot=e}else{this._width=Ze(e,0,a),this._height=Ze(e,1,a);var u=this._domRoot=Pd(this._width,this._height);e.appendChild(u)}}return r.prototype.getType=function(){return"canvas"},r.prototype.isSingleCanvas=function(){return this._singleCanvas},r.prototype.getViewportRoot=function(){return this._domRoot},r.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},r.prototype.refresh=function(e){var t=this.storage.getDisplayList(!0),a=this._prevDisplayList,n=this._zlevelList;this._redrawId=Math.random(),this._paintList(t,a,e,this._redrawId);for(var i=0;i<n.length;i++){var o=n[i],s=this._layers[o];if(!s.__builtin__&&s.refresh){var l=i===0?this._backgroundColor:null;s.refresh(l)}}return this._opts.useDirtyRect&&(this._prevDisplayList=t.slice()),this},r.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},r.prototype._paintHoverList=function(e){var t=e.length,a=this._hoverlayer;if(a&&a.clear(),!!t){for(var n={inHover:!0,viewWidth:this._width,viewHeight:this._height},i,o=0;o<t;o++){var s=e[o];s.__inHover&&(a||(a=this._hoverlayer=this.getLayer(to)),i||(i=a.ctx,i.save()),$e(i,s,n,o===t-1))}i&&i.restore()}},r.prototype.getHoverLayer=function(){return this.getLayer(to)},r.prototype.paintOne=function(e,t){_u(e,t)},r.prototype._paintList=function(e,t,a,n){if(this._redrawId===n){a=a||!1,this._updateLayerStatus(e);var i=this._doPaintList(e,t,a),o=i.finished,s=i.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),s&&this._paintHoverList(e),o)this.eachLayer(function(u){u.afterBrush&&u.afterBrush()});else{var l=this;bu(function(){l._paintList(e,t,a,n)})}}},r.prototype._compositeManually=function(){var e=this.getLayer(re).ctx,t=this._domRoot.width,a=this._domRoot.height;e.clearRect(0,0,t,a),this.eachBuiltinLayer(function(n){n.virtual&&e.drawImage(n.dom,0,0,t,a)})},r.prototype._doPaintList=function(e,t,a){for(var n=this,i=[],o=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)&&i.push(u)}for(var v=!0,h=!1,f=function(p){var g=i[p],S=g.ctx,m=o&&g.createRepaintRects(e,t,c._width,c._height),y=a?g.__startIndex:g.__drawIndex,b=!a&&g.incremental&&Date.now,_=b&&Date.now(),x=g.zlevel===c._zlevelList[0]?c._backgroundColor:null;if(g.__startIndex===g.__endIndex)g.clear(!1,x,m);else if(y===g.__startIndex){var I=e[y];(!I.incremental||!I.notClear||a)&&g.clear(!1,x,m)}y===-1&&(y=g.__startIndex);var w,L=function(P){var C={inHover:!1,allClipped:!1,prevEl:null,viewWidth:n._width,viewHeight:n._height};for(w=y;w<g.__endIndex;w++){var M=e[w];if(M.__inHover&&(h=!0),n._doPaintEl(M,g,o,P,C,w===g.__endIndex-1),b){var E=Date.now()-_;if(E>15)break}}C.prevElClipPaths&&S.restore()};if(m)if(m.length===0)w=g.__endIndex;else for(var D=c.dpr,T=0;T<m.length;++T){var A=m[T];S.save(),S.beginPath(),S.rect(A.x*D,A.y*D,A.width*D,A.height*D),S.clip(),L(A),S.restore()}else S.save(),L(),S.restore();g.__drawIndex=w,g.__drawIndex<g.__endIndex&&(v=!1)},c=this,d=0;d<i.length;d++)f(d);return Ho.wxa&&R(this._layers,function(p){p&&p.ctx&&p.ctx.draw&&p.ctx.draw()}),{finished:v,needsRefreshHover:h}},r.prototype._doPaintEl=function(e,t,a,n,i,o){var s=t.ctx;if(a){var l=e.getPaintRect();(!n||l&&l.intersect(n))&&($e(s,e,i,o),e.setPrevPaintRect(l))}else $e(s,e,i,o)},r.prototype.getLayer=function(e,t){this._singleCanvas&&!this._needsManuallyCompositing&&(e=re);var a=this._layers[e];return a||(a=new fa("zr_"+e,this,this.dpr),a.zlevel=e,a.__builtin__=!0,this._layerConfig[e]?oe(a,this._layerConfig[e],!0):this._layerConfig[e-ar]&&oe(a,this._layerConfig[e-ar],!0),t&&(a.virtual=t),this.insertLayer(e,a),a.initContext()),a},r.prototype.insertLayer=function(e,t){var a=this._layers,n=this._zlevelList,i=n.length,o=this._domRoot,s=null,l=-1;if(!a[e]&&Md(t)){if(i>0&&e>n[0]){for(l=0;l<i-1&&!(n[l]<e&&n[l+1]>e);l++);s=a[n[l]]}if(n.splice(l+1,0,e),a[e]=t,!t.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(t.dom,u.nextSibling):o.appendChild(t.dom)}else o.firstChild?o.insertBefore(t.dom,o.firstChild):o.appendChild(t.dom);t.painter||(t.painter=this)}},r.prototype.eachLayer=function(e,t){for(var a=this._zlevelList,n=0;n<a.length;n++){var i=a[n];e.call(t,this._layers[i],i)}},r.prototype.eachBuiltinLayer=function(e,t){for(var a=this._zlevelList,n=0;n<a.length;n++){var i=a[n],o=this._layers[i];o.__builtin__&&e.call(t,o,i)}},r.prototype.eachOtherLayer=function(e,t){for(var a=this._zlevelList,n=0;n<a.length;n++){var i=a[n],o=this._layers[i];o.__builtin__||e.call(t,o,i)}},r.prototype.getLayers=function(){return this._layers},r.prototype._updateLayerStatus=function(e){this.eachBuiltinLayer(function(h,f){h.__dirty=h.__used=!1});function t(h){i&&(i.__endIndex!==h&&(i.__dirty=!0),i.__endIndex=h)}if(this._singleCanvas)for(var a=1;a<e.length;a++){var n=e[a];if(n.zlevel!==e[a-1].zlevel||n.incremental){this._needsManuallyCompositing=!0;break}}var i=null,o=0,s,l;for(l=0;l<e.length;l++){var n=e[l],u=n.zlevel,v=void 0;s!==u&&(s=u,o=0),n.incremental?(v=this.getLayer(u+Cd,this._needsManuallyCompositing),v.incremental=!0,o=1):v=this.getLayer(u+(o>0?ar:0),this._needsManuallyCompositing),v.__builtin__||xu("ZLevel "+u+" has been used by unkown layer "+v.id),v!==i&&(v.__used=!0,v.__startIndex!==l&&(v.__dirty=!0),v.__startIndex=l,v.incremental?v.__drawIndex=-1:v.__drawIndex=l,t(l),i=v),n.__dirty&wa&&!n.__inHover&&(v.__dirty=!0,v.incremental&&v.__drawIndex<0&&(v.__drawIndex=l))}t(l),this.eachBuiltinLayer(function(h,f){!h.__used&&h.getElementCount()>0&&(h.__dirty=!0,h.__startIndex=h.__endIndex=h.__drawIndex=0),h.__dirty&&h.__drawIndex<0&&(h.__drawIndex=h.__startIndex)})},r.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},r.prototype._clearLayer=function(e){e.clear()},r.prototype.setBackgroundColor=function(e){this._backgroundColor=e,R(this._layers,function(t){t.setUnpainted()})},r.prototype.configLayer=function(e,t){if(t){var a=this._layerConfig;a[e]?oe(a[e],t,!0):a[e]=t;for(var n=0;n<this._zlevelList.length;n++){var i=this._zlevelList[n];if(i===e||i===e+ar){var o=this._layers[i];oe(o,a[e],!0)}}}},r.prototype.delLayer=function(e){var t=this._layers,a=this._zlevelList,n=t[e];n&&(n.dom.parentNode.removeChild(n.dom),delete t[e],a.splice(wt(a,e),1))},r.prototype.resize=function(e,t){if(this._domRoot.style){var a=this._domRoot;a.style.display="none";var n=this._opts,i=this.root;if(e!=null&&(n.width=e),t!=null&&(n.height=t),e=Ze(i,0,n),t=Ze(i,1,n),a.style.display="",this._width!==e||t!==this._height){a.style.width=e+"px",a.style.height=t+"px";for(var o in this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(e,t);this.refresh(!0)}this._width=e,this._height=t}else{if(e==null||t==null)return;this._width=e,this._height=t,this.getLayer(re).resize(e,t)}return this},r.prototype.clearLayer=function(e){var t=this._layers[e];t&&t.clear()},r.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},r.prototype.getRenderedCanvas=function(e){if(e=e||{},this._singleCanvas&&!this._compositeManually)return this._layers[re].dom;var t=new fa("image",this,e.pixelRatio||this.dpr);t.initContext(),t.clear(!1,e.backgroundColor||this._backgroundColor);var a=t.ctx;if(e.pixelRatio<=this.dpr){this.refresh();var n=t.dom.width,i=t.dom.height;this.eachLayer(function(h){h.__builtin__?a.drawImage(h.dom,0,0,n,i):h.renderToCanvas&&(a.save(),h.renderToCanvas(a),a.restore())})}else for(var o={inHover:!1,viewWidth:this._width,viewHeight:this._height},s=this.storage.getDisplayList(!0),l=0,u=s.length;l<u;l++){var v=s[l];$e(a,v,o,l===u-1)}return t.dom},r.prototype.getWidth=function(){return this._width},r.prototype.getHeight=function(){return this._height},r}();function Nd(r){r.registerPainter("canvas",Ed)}var Et=Iu.CMD;function pe(r,e){return Math.abs(r-e)<1e-5}function ka(r){var e=r.data,t=r.len(),a=[],n,i=0,o=0,s=0,l=0;function u(P,C){n&&n.length>2&&a.push(n),n=[P,C]}function v(P,C,M,E){pe(P,M)&&pe(C,E)||n.push(P,C,M,E,M,E)}function h(P,C,M,E,N,V){var G=Math.abs(C-P),O=Math.tan(G/4)*4/3,z=C<P?-1:1,K=Math.cos(P),X=Math.sin(P),$=Math.cos(C),q=Math.sin(C),ut=K*N+M,Wt=X*V+E,Z=$*N+M,H=q*V+E,Q=N*O*z,j=V*O*z;n.push(ut-Q*X,Wt+j*K,Z+Q*q,H-j*$,Z,H)}for(var f,c,d,p,g=0;g<t;){var S=e[g++],m=g===1;switch(m&&(i=e[g],o=e[g+1],s=i,l=o,(S===Et.L||S===Et.C||S===Et.Q)&&(n=[s,l])),S){case Et.M:i=s=e[g++],o=l=e[g++],u(s,l);break;case Et.L:f=e[g++],c=e[g++],v(i,o,f,c),i=f,o=c;break;case Et.C:n.push(e[g++],e[g++],e[g++],e[g++],i=e[g++],o=e[g++]);break;case Et.Q:f=e[g++],c=e[g++],d=e[g++],p=e[g++],n.push(i+2/3*(f-i),o+2/3*(c-o),d+2/3*(f-d),p+2/3*(c-p),d,p),i=d,o=p;break;case Et.A:var y=e[g++],b=e[g++],_=e[g++],x=e[g++],I=e[g++],w=e[g++]+I;g+=1;var L=!e[g++];f=Math.cos(I)*_+y,c=Math.sin(I)*x+b,m?(s=f,l=c,u(s,l)):v(i,o,f,c),i=Math.cos(w)*_+y,o=Math.sin(w)*x+b;for(var D=(L?-1:1)*Math.PI/2,T=I;L?T>w:T<w;T+=D){var A=L?Math.max(T+D,w):Math.min(T+D,w);h(T,A,y,b,_,x)}break;case Et.R:s=i=e[g++],l=o=e[g++],f=s+e[g++],c=l+e[g++],u(f,l),v(f,l,f,c),v(f,c,s,c),v(s,c,s,l),v(s,l,f,l);break;case Et.Z:n&&v(i,o,s,l),i=s,o=l;break}}return n&&n.length>2&&a.push(n),a}function Ga(r,e,t,a,n,i,o,s,l,u){if(pe(r,t)&&pe(e,a)&&pe(n,o)&&pe(i,s)){l.push(o,s);return}var v=2/u,h=v*v,f=o-r,c=s-e,d=Math.sqrt(f*f+c*c);f/=d,c/=d;var p=t-r,g=a-e,S=n-o,m=i-s,y=p*p+g*g,b=S*S+m*m;if(y<h&&b<h){l.push(o,s);return}var _=f*p+c*g,x=-f*S-c*m,I=y-_*_,w=b-x*x;if(I<h&&_>=0&&w<h&&x>=0){l.push(o,s);return}var L=[],D=[];ur(r,t,n,o,.5,L),ur(e,a,i,s,.5,D),Ga(L[0],D[0],L[1],D[1],L[2],D[2],L[3],D[3],l,u),Ga(L[4],D[4],L[5],D[5],L[6],D[6],L[7],D[7],l,u)}function Rd(r,e){var t=ka(r),a=[];e=e||1;for(var n=0;n<t.length;n++){var i=t[n],o=[],s=i[0],l=i[1];o.push(s,l);for(var u=2;u<i.length;){var v=i[u++],h=i[u++],f=i[u++],c=i[u++],d=i[u++],p=i[u++];Ga(s,l,v,h,f,c,d,p,o,e),s=d,l=p}a.push(o)}return a}function Ps(r,e,t){var a=r[e],n=r[1-e],i=Math.abs(a/n),o=Math.ceil(Math.sqrt(i*t)),s=Math.floor(t/o);s===0&&(s=1,o=t);for(var l=[],u=0;u<o;u++)l.push(s);var v=o*s,h=t-v;if(h>0)for(var u=0;u<h;u++)l[u%o]+=1;return l}function eo(r,e,t){for(var a=r.r0,n=r.r,i=r.startAngle,o=r.endAngle,s=Math.abs(o-i),l=s*n,u=n-a,v=l>Math.abs(u),h=Ps([l,u],v?0:1,e),f=(v?s:u)/h.length,c=0;c<h.length;c++)for(var d=(v?u:s)/h[c],p=0;p<h[c];p++){var g={};v?(g.startAngle=i+f*c,g.endAngle=i+f*(c+1),g.r0=a+d*p,g.r=a+d*(p+1)):(g.startAngle=i+d*p,g.endAngle=i+d*(p+1),g.r0=a+f*c,g.r=a+f*(c+1)),g.clockwise=r.clockwise,g.cx=r.cx,g.cy=r.cy,t.push(g)}}function Vd(r,e,t){for(var a=r.width,n=r.height,i=a>n,o=Ps([a,n],i?0:1,e),s=i?"width":"height",l=i?"height":"width",u=i?"x":"y",v=i?"y":"x",h=r[s]/o.length,f=0;f<o.length;f++)for(var c=r[l]/o[f],d=0;d<o[f];d++){var p={};p[u]=f*h,p[v]=d*c,p[s]=h,p[l]=c,p.x+=r.x,p.y+=r.y,t.push(p)}}function ro(r,e,t,a){return r*a-t*e}function kd(r,e,t,a,n,i,o,s){var l=t-r,u=a-e,v=o-n,h=s-i,f=ro(v,h,l,u);if(Math.abs(f)<1e-6)return null;var c=r-n,d=e-i,p=ro(c,d,v,h)/f;return p<0||p>1?null:new Yt(p*l+r,p*u+e)}function Gd(r,e,t){var a=new Yt;Yt.sub(a,t,e),a.normalize();var n=new Yt;Yt.sub(n,r,e);var i=n.dot(a);return i}function he(r,e){var t=r[r.length-1];t&&t[0]===e[0]&&t[1]===e[1]||r.push(e)}function zd(r,e,t){for(var a=r.length,n=[],i=0;i<a;i++){var o=r[i],s=r[(i+1)%a],l=kd(o[0],o[1],s[0],s[1],e.x,e.y,t.x,t.y);l&&n.push({projPt:Gd(l,e,t),pt:l,idx:i})}if(n.length<2)return[{points:r},{points:r}];n.sort(function(g,S){return g.projPt-S.projPt});var u=n[0],v=n[n.length-1];if(v.idx<u.idx){var h=u;u=v,v=h}for(var f=[u.pt.x,u.pt.y],c=[v.pt.x,v.pt.y],d=[f],p=[c],i=u.idx+1;i<=v.idx;i++)he(d,r[i].slice());he(d,c),he(d,f);for(var i=v.idx+1;i<=u.idx+a;i++)he(p,r[i%a].slice());return he(p,f),he(p,c),[{points:d},{points:p}]}function ao(r){var e=r.points,t=[],a=[];br(e,t,a);var n=new dt(t[0],t[1],a[0]-t[0],a[1]-t[1]),i=n.width,o=n.height,s=n.x,l=n.y,u=new Yt,v=new Yt;return i>o?(u.x=v.x=s+i/2,u.y=l,v.y=l+o):(u.y=v.y=l+o/2,u.x=s,v.x=s+i),zd(e,u,v)}function yr(r,e,t,a){if(t===1)a.push(e);else{var n=Math.floor(t/2),i=r(e);yr(r,i[0],n,a),yr(r,i[1],t-n,a)}return a}function Bd(r,e){for(var t=[],a=0;a<e;a++)t.push(sn(r));return t}function Od(r,e){e.setStyle(r.style),e.z=r.z,e.z2=r.z2,e.zlevel=r.zlevel}function Hd(r){for(var e=[],t=0;t<r.length;)e.push([r[t++],r[t++]]);return e}function Fd(r,e){var t=[],a=r.shape,n;switch(r.type){case"rect":Vd(a,e,t),n=Jt;break;case"sector":eo(a,e,t),n=Ne;break;case"circle":eo({r0:0,r:a.r,startAngle:0,endAngle:Math.PI*2,cx:a.cx,cy:a.cy},e,t),n=Ne;break;default:var i=r.getComputedTransform(),o=i?Math.sqrt(Math.max(i[0]*i[0]+i[1]*i[1],i[2]*i[2]+i[3]*i[3])):1,s=W(Rd(r.getUpdatedPathProxy(),o),function(S){return Hd(S)}),l=s.length;if(l===0)yr(ao,{points:s[0]},e,t);else if(l===e)for(var u=0;u<l;u++)t.push({points:s[u]});else{var v=0,h=W(s,function(S){var m=[],y=[];br(S,m,y);var b=(y[1]-m[1])*(y[0]-m[0]);return v+=b,{poly:S,area:b}});h.sort(function(S,m){return m.area-S.area});for(var f=e,u=0;u<l;u++){var c=h[u];if(f<=0)break;var d=u===l-1?f:Math.ceil(c.area/v*e);d<0||(yr(ao,{points:c.poly},d,t),f-=d)}}n=Pe;break}if(!n)return Bd(r,e);for(var p=[],u=0;u<t.length;u++){var g=new n;g.setShape(t[u]),Od(r,g),p.push(g)}return p}function Wd(r,e){var t=r.length,a=e.length;if(t===a)return[r,e];for(var n=[],i=[],o=t<a?r:e,s=Math.min(t,a),l=Math.abs(a-t)/6,u=(s-2)/6,v=Math.ceil(l/u)+1,h=[o[0],o[1]],f=l,c=2;c<s;){var d=o[c-2],p=o[c-1],g=o[c++],S=o[c++],m=o[c++],y=o[c++],b=o[c++],_=o[c++];if(f<=0){h.push(g,S,m,y,b,_);continue}for(var x=Math.min(f,v-1)+1,I=1;I<=x;I++){var w=I/x;ur(d,g,m,b,w,n),ur(p,S,y,_,w,i),d=n[3],p=i[3],h.push(n[1],i[1],n[2],i[2],d,p),g=n[5],S=i[5],m=n[6],y=i[6]}f-=x-1}return o===r?[h,e]:[r,h]}function no(r,e){for(var t=r.length,a=r[t-2],n=r[t-1],i=[],o=0;o<e.length;)i[o++]=a,i[o++]=n;return i}function Ud(r,e){for(var t,a,n,i=[],o=[],s=0;s<Math.max(r.length,e.length);s++){var l=r[s],u=e[s],v=void 0,h=void 0;l?u?(t=Wd(l,u),v=t[0],h=t[1],a=v,n=h):(h=no(n||l,l),v=l):(v=no(a||u,u),h=u),i.push(v),o.push(h)}return[i,o]}function io(r){for(var e=0,t=0,a=0,n=r.length,i=0,o=n-2;i<n;o=i,i+=2){var s=r[o],l=r[o+1],u=r[i],v=r[i+1],h=s*v-u*l;e+=h,t+=(s+u)*h,a+=(l+v)*h}return e===0?[r[0]||0,r[1]||0]:[t/e/3,a/e/3,e]}function $d(r,e,t,a){for(var n=(r.length-2)/6,i=1/0,o=0,s=r.length,l=s-2,u=0;u<n;u++){for(var v=u*6,h=0,f=0;f<s;f+=2){var c=f===0?v:(v+f-2)%l+2,d=r[c]-t[0],p=r[c+1]-t[1],g=e[f]-a[0],S=e[f+1]-a[1],m=g-d,y=S-p;h+=m*m+y*y}h<i&&(i=h,o=u)}return o}function Zd(r){for(var e=[],t=r.length,a=0;a<t;a+=2)e[a]=r[t-a-2],e[a+1]=r[t-a-1];return e}function Yd(r,e,t,a){for(var n=[],i,o=0;o<r.length;o++){var s=r[o],l=e[o],u=io(s),v=io(l);i==null&&(i=u[2]<0!=v[2]<0);var h=[],f=[],c=0,d=1/0,p=[],g=s.length;i&&(s=Zd(s));for(var S=$d(s,l,u,v)*6,m=g-2,y=0;y<m;y+=2){var b=(S+y)%m+2;h[y+2]=s[b]-u[0],h[y+3]=s[b+1]-u[1]}h[0]=s[S]-u[0],h[1]=s[S+1]-u[1];for(var _=a/t,x=-a/2;x<=a/2;x+=_){for(var I=Math.sin(x),w=Math.cos(x),L=0,y=0;y<s.length;y+=2){var D=h[y],T=h[y+1],A=l[y]-v[0],P=l[y+1]-v[1],C=A*w-P*I,M=A*I+P*w;p[y]=C,p[y+1]=M;var E=C-D,N=M-T;L+=E*E+N*N}if(L<d){d=L,c=x;for(var V=0;V<p.length;V++)f[V]=p[V]}}n.push({from:h,to:f,fromCp:u,toCp:v,rotation:-c})}return n}function mr(r){return r.__isCombineMorphing}var Es="__mOriginal_";function Sr(r,e,t){var a=Es+e,n=r[a]||r[e];r[a]||(r[a]=r[e]);var i=t.replace,o=t.after,s=t.before;r[e]=function(){var l=arguments,u;return s&&s.apply(this,l),i?u=i.apply(this,l):u=n.apply(this,l),o&&o.apply(this,l),u}}function Ce(r,e){var t=Es+e;r[t]&&(r[e]=r[t],r[t]=null)}function oo(r,e){for(var t=0;t<r.length;t++)for(var a=r[t],n=0;n<a.length;){var i=a[n],o=a[n+1];a[n++]=e[0]*i+e[2]*o+e[4],a[n++]=e[1]*i+e[3]*o+e[5]}}function Ns(r,e){var t=r.getUpdatedPathProxy(),a=e.getUpdatedPathProxy(),n=Ud(ka(t),ka(a)),i=n[0],o=n[1],s=r.getComputedTransform(),l=e.getComputedTransform();function u(){this.transform=null}s&&oo(i,s),l&&oo(o,l),Sr(e,"updateTransform",{replace:u}),e.transform=null;var v=Yd(i,o,10,Math.PI),h=[];Sr(e,"buildPath",{replace:function(f){for(var c=e.__morphT,d=1-c,p=[],g=0;g<v.length;g++){var S=v[g],m=S.from,y=S.to,b=S.rotation*c,_=S.fromCp,x=S.toCp,I=Math.sin(b),w=Math.cos(b);wu(p,_,x,c);for(var L=0;L<m.length;L+=2){var D=m[L],T=m[L+1],A=y[L],P=y[L+1],C=D*d+A*c,M=T*d+P*c;h[L]=C*w-M*I+p[0],h[L+1]=C*I+M*w+p[1]}var E=h[0],N=h[1];f.moveTo(E,N);for(var L=2;L<m.length;){var A=h[L++],P=h[L++],V=h[L++],G=h[L++],O=h[L++],z=h[L++];E===A&&N===P&&V===O&&G===z?f.lineTo(O,z):f.bezierCurveTo(A,P,V,G,O,z),E=O,N=z}}}})}function Mn(r,e,t){if(!r||!e)return e;var a=t.done,n=t.during;Ns(r,e),e.__morphT=0;function i(){Ce(e,"buildPath"),Ce(e,"updateTransform"),e.__morphT=-1,e.createPathProxy(),e.dirtyShape()}return e.animateTo({__morphT:1},gt({during:function(o){e.dirtyShape(),n&&n(o)},done:function(){i(),a&&a()}},t)),e}function Xd(r,e,t,a,n,i){var o=16;r=n===t?0:Math.round(32767*(r-t)/(n-t)),e=i===a?0:Math.round(32767*(e-a)/(i-a));for(var s=0,l,u=(1<<o)/2;u>0;u/=2){var v=0,h=0;(r&u)>0&&(v=1),(e&u)>0&&(h=1),s+=u*u*(3*v^h),h===0&&(v===1&&(r=u-1-r,e=u-1-e),l=r,r=e,e=l)}return s}function _r(r){var e=1/0,t=1/0,a=-1/0,n=-1/0,i=W(r,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),v=l.x+l.width/2+(u?u[4]:0),h=l.y+l.height/2+(u?u[5]:0);return e=Math.min(v,e),t=Math.min(h,t),a=Math.max(v,a),n=Math.max(h,n),[v,h]}),o=W(i,function(s,l){return{cp:s,z:Xd(s[0],s[1],e,t,a,n),path:r[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function Rs(r){return Fd(r.path,r.count)}function za(){return{fromIndividuals:[],toIndividuals:[],count:0}}function qd(r,e,t){var a=[];function n(_){for(var x=0;x<_.length;x++){var I=_[x];mr(I)?n(I.childrenRef()):I instanceof yt&&a.push(I)}}n(r);var i=a.length;if(!i)return za();var o=t.dividePath||Rs,s=o({path:e,count:i});if(s.length!==i)return za();a=_r(a),s=_r(s);for(var l=t.done,u=t.during,v=t.individualDelay,h=new _o,f=0;f<i;f++){var c=a[f],d=s[f];d.parent=e,d.copyTransform(h),v||Ns(c,d)}e.__isCombineMorphing=!0,e.childrenRef=function(){return s};function p(_){for(var x=0;x<s.length;x++)s[x].addSelfToZr(_)}Sr(e,"addSelfToZr",{after:function(_){p(_)}}),Sr(e,"removeSelfFromZr",{after:function(_){for(var x=0;x<s.length;x++)s[x].removeSelfFromZr(_)}});function g(){e.__isCombineMorphing=!1,e.__morphT=-1,e.childrenRef=null,Ce(e,"addSelfToZr"),Ce(e,"removeSelfFromZr")}var S=s.length;if(v)for(var m=S,y=function(){m--,m===0&&(g(),l&&l())},f=0;f<S;f++){var b=v?gt({delay:(t.delay||0)+v(f,S,a[f],s[f]),done:y},t):t;Mn(a[f],s[f],b)}else e.__morphT=0,e.animateTo({__morphT:1},gt({during:function(_){for(var x=0;x<S;x++){var I=s[x];I.__morphT=e.__morphT,I.dirtyShape()}u&&u(_)},done:function(){g();for(var _=0;_<r.length;_++)Ce(r[_],"updateTransform");l&&l()}},t));return e.__zr&&p(e.__zr),{fromIndividuals:a,toIndividuals:s,count:S}}function Kd(r,e,t){var a=e.length,n=[],i=t.dividePath||Rs;function o(c){for(var d=0;d<c.length;d++){var p=c[d];mr(p)?o(p.childrenRef()):p instanceof yt&&n.push(p)}}if(mr(r)){o(r.childrenRef());var s=n.length;if(s<a)for(var l=0,u=s;u<a;u++)n.push(sn(n[l++%s]));n.length=a}else{n=i({path:r,count:a});for(var v=r.getComputedTransform(),u=0;u<n.length;u++)n[u].setLocalTransform(v);if(n.length!==a)return za()}n=_r(n),e=_r(e);for(var h=t.individualDelay,u=0;u<a;u++){var f=h?gt({delay:(t.delay||0)+h(u,a,n[u],e[u])},t):t;Mn(n[u],e[u],f)}return{fromIndividuals:n,toIndividuals:e,count:e.length}}function so(r){return F(r[0])}function lo(r,e){for(var t=[],a=r.length,n=0;n<a;n++)t.push({one:r[n],many:[]});for(var n=0;n<e.length;n++){var i=e[n].length,o=void 0;for(o=0;o<i;o++)t[o%a].many.push(e[n][o])}for(var s=0,n=a-1;n>=0;n--)if(!t[n].many.length){var l=t[s].many;if(l.length<=1)if(s)s=0;else return t;var i=l.length,u=Math.ceil(i/2);t[n].many=l.slice(u,i),t[s].many=l.slice(0,u),s++}return t}var jd={clone:function(r){for(var e=[],t=1-Math.pow(1-r.path.style.opacity,1/r.count),a=0;a<r.count;a++){var n=sn(r.path);n.setStyle("opacity",t),e.push(n)}return e},split:null};function ca(r,e,t,a,n,i){if(!r.length||!e.length)return;var o=ln("update",a,n);if(!(o&&o.duration>0))return;var s=a.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,v;so(r)&&(u=r,v=e),so(e)&&(u=e,v=r);function h(S,m,y,b,_){var x=S.many,I=S.one;if(x.length===1&&!_){var w=m?x[0]:I,L=m?I:x[0];if(mr(w))h({many:[w],one:L},!0,y,b,!0);else{var D=s?gt({delay:s(y,b)},l):l;Mn(w,L,D),i(w,L,w,L,D)}}else for(var T=gt({dividePath:jd[t],individualDelay:s&&function(N,V,G,O){return s(N+y,b)}},l),A=m?qd(x,I,T):Kd(I,x,T),P=A.fromIndividuals,C=A.toIndividuals,M=P.length,E=0;E<M;E++){var D=s?gt({delay:s(E,M)},l):l;i(P[E],C[E],m?x[E]:S.one,m?S.one:x[E],D)}}for(var f=u?u===r:r.length>e.length,c=u?lo(v,u):lo(f?e:r,[f?r:e]),d=0,p=0;p<c.length;p++)d+=c[p].many.length;for(var g=0,p=0;p<c.length;p++)h(c[p],f,g,d),g+=c[p].many.length}function ie(r){if(!r)return[];if(F(r)){for(var e=[],t=0;t<r.length;t++)e.push(ie(r[t]));return e}var a=[];return r.traverse(function(n){n instanceof yt&&!n.disableMorphing&&!n.invisible&&!n.ignore&&a.push(n)}),a}var Vs=1e4,Qd=0,uo=1,vo=2,Jd=Lt();function tg(r,e){for(var t=r.dimensions,a=0;a<t.length;a++){var n=r.getDimensionInfo(t[a]);if(n&&n.otherDims[e]===0)return t[a]}}function eg(r,e,t){var a=r.getDimensionInfo(t),n=a&&a.ordinalMeta;if(a){var i=r.get(a.name,e);return n&&n.categories[i]||i+""}}function ho(r,e,t,a){var n=a?"itemChildGroupId":"itemGroupId",i=tg(r,n);if(i){var o=eg(r,e,i);return o}var s=r.getRawDataItem(e),l=a?"childGroupId":"groupId";if(s&&s[l])return s[l]+"";if(!a)return t||r.getId(e)}function fo(r){var e=[];return R(r,function(t){var a=t.data,n=t.dataGroupId;if(!(a.count()>Vs))for(var i=a.getIndices(),o=0;o<i.length;o++)e.push({data:a,groupId:ho(a,o,n,!1),childGroupId:ho(a,o,n,!0),divide:t.divide,dataIndex:o})}),e}function pa(r,e,t){r.traverse(function(a){a instanceof yt&&It(a,{style:{opacity:0}},e,{dataIndex:t,isFrom:!0})})}function da(r){if(r.parent){var e=r.getComputedTransform();r.setLocalTransform(e),r.parent.remove(r)}}function fe(r){r.stopAnimation(),r.isGroup&&r.traverse(function(e){e.stopAnimation()})}function rg(r,e,t){var a=ln("update",t,e);a&&r.traverse(function(n){if(n instanceof Wa){var i=Lu(n);i&&n.animateFrom({style:i},a)}})}function ag(r,e){var t=r.length;if(t!==e.length)return!1;for(var a=0;a<t;a++){var n=r[a],i=e[a];if(n.data.getId(n.dataIndex)!==i.data.getId(i.dataIndex))return!1}return!0}function ks(r,e,t){var a=fo(r),n=fo(e);function i(y,b,_,x,I){(_||y)&&b.animateFrom({style:_&&_!==y?U(U({},_.style),y.style):y.style},I)}var o=!1,s=Qd,l=mt(),u=mt();a.forEach(function(y){y.groupId&&l.set(y.groupId,!0),y.childGroupId&&u.set(y.childGroupId,!0)});for(var v=0;v<n.length;v++){var h=n[v].groupId;if(u.get(h)){s=uo;break}var f=n[v].childGroupId;if(f&&l.get(f)){s=vo;break}}function c(y,b){return function(_){var x=_.data,I=_.dataIndex;return b?x.getId(I):y?s===uo?_.childGroupId:_.groupId:s===vo?_.childGroupId:_.groupId}}var d=ag(a,n),p={};if(!d)for(var v=0;v<n.length;v++){var g=n[v],S=g.data.getItemGraphicEl(g.dataIndex);S&&(p[S.id]=!0)}function m(y,b){var _=a[b],x=n[y],I=x.data.hostModel,w=_.data.getItemGraphicEl(_.dataIndex),L=x.data.getItemGraphicEl(x.dataIndex);if(w===L){L&&rg(L,x.dataIndex,I);return}w&&p[w.id]||L&&(fe(L),w?(fe(w),da(w),o=!0,ca(ie(w),ie(L),x.divide,I,y,i)):pa(L,I,y))}new de(a,n,c(!0,d),c(!1,d),null,"multiple").update(m).updateManyToOne(function(y,b){var _=n[y],x=_.data,I=x.hostModel,w=x.getItemGraphicEl(_.dataIndex),L=Ct(W(b,function(D){return a[D].data.getItemGraphicEl(a[D].dataIndex)}),function(D){return D&&D!==w&&!p[D.id]});w&&(fe(w),L.length?(R(L,function(D){fe(D),da(D)}),o=!0,ca(ie(L),ie(w),_.divide,I,y,i)):pa(w,I,_.dataIndex))}).updateOneToMany(function(y,b){var _=a[b],x=_.data.getItemGraphicEl(_.dataIndex);if(!(x&&p[x.id])){var I=Ct(W(y,function(L){return n[L].data.getItemGraphicEl(n[L].dataIndex)}),function(L){return L&&L!==x}),w=n[y[0]].data.hostModel;I.length&&(R(I,function(L){return fe(L)}),x?(fe(x),da(x),o=!0,ca(ie(x),ie(I),_.divide,w,y[0],i)):R(I,function(L){return pa(L,w,y[0])}))}}).updateManyToMany(function(y,b){new de(b,y,function(_){return a[_].data.getId(a[_].dataIndex)},function(_){return n[_].data.getId(n[_].dataIndex)}).update(function(_,x){m(y[_],b[x])}).execute()}).execute(),o&&R(e,function(y){var b=y.data,_=b.hostModel,x=_&&t.getViewOfSeriesModel(_),I=ln("update",_,0);x&&_.isAnimationEnabled()&&I&&I.duration>0&&x.group.traverse(function(w){w instanceof yt&&!w.animators.length&&w.animateFrom({style:{opacity:0}},I)})})}function co(r){var e=r.getModel("universalTransition").get("seriesKey");return e||r.id}function po(r){return F(r)?r.sort().join(","):r}function Ut(r){if(r.hostModel)return r.hostModel.getModel("universalTransition").get("divideShape")}function ng(r,e){var t=mt(),a=mt(),n=mt();return R(r.oldSeries,function(i,o){var s=r.oldDataGroupIds[o],l=r.oldData[o],u=co(i),v=po(u);a.set(v,{dataGroupId:s,data:l}),F(u)&&R(u,function(h){n.set(h,{key:v,dataGroupId:s,data:l})})}),R(e.updatedSeries,function(i){if(i.isUniversalTransitionEnabled()&&i.isAnimationEnabled()){var o=i.get("dataGroupId"),s=i.getData(),l=co(i),u=po(l),v=a.get(u);if(v)t.set(u,{oldSeries:[{dataGroupId:v.dataGroupId,divide:Ut(v.data),data:v.data}],newSeries:[{dataGroupId:o,divide:Ut(s),data:s}]});else if(F(l)){var h=[];R(l,function(d){var p=a.get(d);p.data&&h.push({dataGroupId:p.dataGroupId,divide:Ut(p.data),data:p.data})}),h.length&&t.set(u,{oldSeries:h,newSeries:[{dataGroupId:o,data:s,divide:Ut(s)}]})}else{var f=n.get(l);if(f){var c=t.get(f.key);c||(c={oldSeries:[{dataGroupId:f.dataGroupId,data:f.data,divide:Ut(f.data)}],newSeries:[]},t.set(f.key,c)),c.newSeries.push({dataGroupId:o,data:s,divide:Ut(s)})}}}}),t}function go(r,e){for(var t=0;t<r.length;t++){var a=e.seriesIndex!=null&&e.seriesIndex===r[t].seriesIndex||e.seriesId!=null&&e.seriesId===r[t].id;if(a)return t}}function ig(r,e,t,a){var n=[],i=[];R(Gt(r.from),function(o){var s=go(e.oldSeries,o);s>=0&&n.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:Ut(e.oldData[s]),groupIdDim:o.dimension})}),R(Gt(r.to),function(o){var s=go(t.updatedSeries,o);if(s>=0){var l=t.updatedSeries[s].getData();i.push({dataGroupId:e.oldDataGroupIds[s],data:l,divide:Ut(l),groupIdDim:o.dimension})}}),n.length>0&&i.length>0&&ks(n,i,a)}function og(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,a){R(Gt(a.seriesTransition),function(n){R(Gt(n.to),function(i){for(var o=a.updatedSeries,s=0;s<o.length;s++)(i.seriesIndex!=null&&i.seriesIndex===o[s].seriesIndex||i.seriesId!=null&&i.seriesId===o[s].id)&&(o[s][Nr]=!0)})})}),r.registerUpdateLifecycle("series:transition",function(e,t,a){var n=Jd(t);if(n.oldSeries&&a.updatedSeries&&a.optionChanged){var i=a.seriesTransition;if(i)R(Gt(i),function(c){ig(c,n,a,t)});else{var o=ng(n,a);R(o.keys(),function(c){var d=o.get(c);ks(d.oldSeries,d.newSeries,t)})}R(a.updatedSeries,function(c){c[Nr]&&(c[Nr]=!1)})}for(var s=e.getSeries(),l=n.oldSeries=[],u=n.oldDataGroupIds=[],v=n.oldData=[],h=0;h<s.length;h++){var f=s[h].getData();f.count()<Vs&&(l.push(s[h]),u.push(s[h].get("dataGroupId")),v.push(f))}})}Y([Nd]);Y([Du]);Y([Tu,Au,Cu,Mu,Pu,Eu,zv,yh,Bh,$h,tf,hf,kf,Yf,uc,cc,Ic,Mc,Nu,kc,Zc,Sp]);Y(Ru);Y(Vu);Y(ku);Y(Ep);Y(No);Y(Gu);Y(zu);Y(Bu);Y(Ou);Y(Oo);Y(Yp);Y(Hu);Y(Fu);Y(td);Y(od);Y(fd);Y(Wu);Y(Uu);Y($u);Y(Zu);Y(Yu);Y(Xu);Y(qu);Y(Ku);Y(Ld);Y(Ad);Y(og);Y(vv);const cg=tv({__name:"Map",props:{width:{type:String,default:"100%"},height:{type:String,default:"calc(100vh - 78px)"}},setup(r){const e=ev(null),{setOptions:t}=ju(e);return rv(()=>Mr(this,null,function*(){const a=yield(yield Gs(()=>Mr(this,null,function*(){const{default:n}=yield import("./china-BPXA1fkd.js");return{default:n}}),[])).default;Qu("china",a),t({visualMap:[{min:0,max:1e3,left:"left",top:"bottom",text:["高","低"],calculable:!1,orient:"horizontal",inRange:{color:["#e0ffff","#006edd"],symbolSize:[30,100]}}],tooltip:{trigger:"item",backgroundColor:"rgba(0, 0, 0, .6)",textStyle:{color:"#fff",fontSize:12}},series:[{name:"iphone4",type:"map",map:"china",label:{show:!0,color:"rgb(249, 249, 249)",fontSize:10},itemStyle:{areaColor:"#2f82ce",borderColor:"#0DAAC1"},data:Ju}]})})),(a,n)=>(av(),nv("div",{ref_key:"chartRef",ref:e,style:iv({height:r.height,width:r.width})},null,4))}});export{cg as default};
|