2 lines
257 KiB
JavaScript
2 lines
257 KiB
JavaScript
var Us=Object.defineProperty,$s=Object.defineProperties;var Zs=Object.getOwnPropertyDescriptors;var Mn=Object.getOwnPropertySymbols;var Xs=Object.prototype.hasOwnProperty,Ys=Object.prototype.propertyIsEnumerable;var Pn=(a,e,t)=>e in a?Us(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,Ma=(a,e)=>{for(var t in e||(e={}))Xs.call(e,t)&&Pn(a,t,e[t]);if(Mn)for(var t of Mn(e))Ys.call(e,t)&&Pn(a,t,e[t]);return a},Pa=(a,e)=>$s(a,Zs(e));var se=(a,e,t)=>new Promise((r,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?r(l.value):Promise.resolve(l.value).then(i,o);s((t=t.apply(a,e)).next())});import{a as qs,r as le,G as Ks,e3 as We,H as Js,J as Qs,bs as En,o as Nn,h as Rn,l as js,i as Me}from"./index.d96edf17.js";import{T as So,m as xt,B as ht,i as nt,k as zr,g as et,p as O,a as tl,f as At,s as el,b as al,h as rl,c as N,d as bo,j as _o,l as kn,n as nl,o as il,r as Ht,q as Dt,t as _t,v as it,w as xo,x as ye,_ as B,P as dt,G as at,R as Fr,y as ba,V as Hr,z as wo,A as Io,C as Ao,D as ut,S as Lo,E as gr,H as ol,F as sl,I as Do,J as pt,K as Tt,L as ia,M as yr,N as tt,O as ll,Q as U,U as H,W,X as _a,Y as Wr,Z as St,$ as yt,a0 as Yt,a1 as Gt,a2 as vt,a3 as To,a4 as Pe,a5 as ul,a6 as ne,a7 as kt,a8 as vl,a9 as cl,aa as Ee,ab as Wt,ac as Rt,ad as xa,ae as lt,af as fl,ag as ge,ah as st,ai as Vn,aj as hl,ak as Co,al as pl,am as Bn,an as Ue,ao as Gn,ap as ie,aq as Ot,ar as dl,as as Ur,at as qt,au as Mo,av as mr,aw as Po,ax as Et,ay as On,az as zt,aA as wa,aB as Zt,aC as Fe,aD as gl,aE as yl,aF as pe,aG as zn,aH as ml,aI as ft,aJ as Sr,aK as Pt,aL as oa,aM as br,aN as Eo,aO as $r,aP as Zr,aQ as No,aR as Ro,aS as Ne,aT as Ia,aU as Sl,aV as ko,aW as bl,aX as Xr,aY as me,aZ as He,a_ as Vo,a$ as Yr,b0 as qr,b1 as _l,b2 as xl,b3 as Fn,b4 as Kr,b5 as wl,b6 as Hn,b7 as Re,b8 as Jr,b9 as Qr,ba as Se,bb as Ut,bc as Il,bd as Al,be as jr,bf as Ll,bg as Dl,bh as $,bi as Bo,bj as Tl,bk as _r,bl as xr,bm as Cl,bn as Ml,bo as wr,bp as Ea,bq as Go,br as j,bs as tn,bt as en,bu as an,bv as Na,bw as Pl,bx as Oo,by as El,bz as Ie,bA as Nl,bB as Wn,bC as Rl,bD as zo,bE as Ir,bF as Aa,bG as kl,bH as Fo,bI as Ho,bJ as Un,bK as Vl,bL as Bl,bM as rn,bN as $n,bO as Zn,bP as Xn,bQ as Lt,bR as Gl,bS as Ol,bT as zl,bU as Fl,bV as Hl,bW as Wl,bX as Ul,bY as $l,bZ as Zl,b_ as Xl,b$ as Yl,c0 as ql,c1 as Wo,c2 as Kl,c3 as Jl,c4 as Ql,c5 as La,c6 as jl,c7 as tu,c8 as eu,c9 as au,ca as ru,cb as nu,cc as iu,cd as ou,ce as su,cf as lu,cg as Uo,ch as uu,ci as Da,cj as be,ck as $e,cl as ke,cm as vu,cn as cu,co as fu,cp as hu,cq as pu,cr as du,cs as re,ct as gu,cu as yu,cv as $o,cw as mu,cx as Su,cy as bu,cz as sa,cA as _u,cB as xu,cC as nn,cD as wu,cE as Zo,cF as Iu,cG as Au,cH as Lu,cI as Du,cJ as Tu,cK as Cu,cL as Yn,cM as Mu,cN as Pu,cO as Xo,cP as Ar,cQ as Eu,cR as Yo,cS as Nu,cT as Ru,cU as ku,cV as Vu,cW as Ze,cX as Bu,cY as Gu,cZ as Ou,c_ as Xe,c$ as zu,d0 as la,d1 as on,d2 as Fu,d3 as sn,d4 as Ra,d5 as Hu,d6 as Wu,d7 as Uu,d8 as $u,d9 as Zu,da as Xu,db as Yu,dc as qu,dd as Ku,de as Ju,df as Qu,dg as ju,dh as tv,di as ev,dj as av,dk as rv,dl as nv,dm as iv,dn as ov,dp as sv,dq as lv,dr as uv,ds as vv,dt as cv,du as fv,dv as hv,u as pv,dw as qn}from"./useECharts.3bc533c1.js";import{u as dv}from"./useVContext.196d6a81.js";import{a as gv,h as Kn}from"./other.2ace3f8e.js";import{u as yv}from"./visualization.e2a861b8.js";function mv(a){if(a){for(var e=[],t=0;t<a.length;t++)e.push(a[t].slice());return e}}function Sv(a,e){var t=a.label,r=e&&e.getTextGuideLine();return{dataIndex:a.dataIndex,dataType:a.dataType,seriesIndex:a.seriesModel.seriesIndex,text:a.label.style.text,rect:a.hostRect,labelRect:a.rect,align:t.style.align,verticalAlign:t.style.verticalAlign,labelLinePoints:mv(r&&r.shape.points)}}var Jn=["align","verticalAlign","width","height","fontSize"],gt=new So,ka=xt(),bv=xt();function Ye(a,e,t){for(var r=0;r<t.length;r++){var n=t[r];e[n]!=null&&(a[n]=e[n])}}var qe=["x","y","rotation"],_v=function(){function a(){this._labelList=[],this._chartViewList=[]}return a.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},a.prototype._addLabel=function(e,t,r,n,i){var o=n.style,s=n.__hostTarget,l=s.textConfig||{},u=n.getComputedTransform(),v=n.getBoundingRect().plain();ht.applyTransform(v,v,u),u?gt.setLocalTransform(u):(gt.x=gt.y=gt.rotation=gt.originX=gt.originY=0,gt.scaleX=gt.scaleY=1);var c=n.__hostTarget,f;if(c){f=c.getBoundingRect().plain();var h=c.getComputedTransform();ht.applyTransform(f,f,h)}var d=f&&c.getTextGuideLine();this._labelList.push({label:n,labelLine:d,seriesModel:r,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:gt.x,y:gt.y,scaleX:gt.scaleX,scaleY:gt.scaleY,rotation:gt.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}})},a.prototype.addLabelsOfSeries=function(e){var t=this;this._chartViewList.push(e);var r=e.__model,n=r.get("labelLayout");!(nt(n)||zr(n).length)||e.group.traverse(function(i){if(i.ignore)return!0;var o=i.getTextContent(),s=et(i);o&&!o.disableLabelLayout&&t._addLabel(s.dataIndex,s.dataType,r,o,n)})},a.prototype.updateLayoutConfig=function(e){var t=e.getWidth(),r=e.getHeight();function n(y,b){return function(){kn(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 c=Math.PI/180;l&&l.setTextConfig({local:!1,position:v.x!=null||v.y!=null?null:u.attachedPos,rotation:v.rotate!=null?v.rotate*c:u.attachedRot,offset:[v.dx||0,v.dy||0]});var f=!1;if(v.x!=null?(s.x=O(v.x,t),s.setStyle("x",0),f=!0):(s.x=u.x,s.setStyle("x",u.style.x)),v.y!=null?(s.y=O(v.y,r),s.setStyle("y",0),f=!0):(s.y=u.y,s.setStyle("y",u.style.y)),v.labelLinePoints){var h=l.getTextGuideLine();h&&(h.setShape({points:v.labelLinePoints}),f=!1)}var d=ka(s);d.needsUpdateLabelLine=f,s.rotation=v.rotate!=null?v.rotate*c:u.rotation,s.scaleX=u.scaleX,s.scaleY=u.scaleY;for(var p=0;p<Jn.length;p++){var g=Jn[p];s.setStyle(g,v[g]!=null?v[g]:u.style[g])}if(v.draggable){if(s.draggable=!0,s.cursor="move",l){var m=o.seriesModel;if(o.dataIndex!=null){var S=o.seriesModel.getData(o.dataType);m=S.getItemModel(o.dataIndex)}s.on("drag",n(l,m.getModel("labelLine")))}}else s.off("drag"),s.cursor=u.cursor}},a.prototype.layout=function(e){var t=e.getWidth(),r=e.getHeight(),n=tl(this._labelList),i=At(n,function(l){return l.layoutOption.moveOverlap==="shiftX"}),o=At(n,function(l){return l.layoutOption.moveOverlap==="shiftY"});el(i,0,t),al(o,0,r);var s=At(n,function(l){return l.layoutOption.hideOverlap});rl(s)},a.prototype.processLabelsOverall=function(){var e=this;N(this._chartViewList,function(t){var r=t.__model,n=t.ignoreLabelLineUpdate,i=r.isAnimationEnabled();t.group.traverse(function(o){if(o.ignore&&!o.forceLabelAnimation)return!0;var s=!n,l=o.getTextContent();!s&&l&&(s=ka(l).needsUpdateLabelLine),s&&e._updateLabelLine(o,r),i&&e._animateLabels(o,r)})})},a.prototype._updateLabelLine=function(e,t){var r=e.getTextContent(),n=et(e),i=n.dataIndex;if(r&&i!=null){var o=t.getData(n.dataType),s=o.getItemModel(i),l={},u=o.getItemVisual(i,"style"),v=o.getVisual("drawType");l.stroke=u[v];var c=s.getModel("labelLine");bo(e,_o(s),l),kn(e,c)}},a.prototype._animateLabels=function(e,t){var r=e.getTextContent(),n=e.getTextGuideLine();if(r&&(e.forceLabelAnimation||!r.ignore&&!r.invisible&&!e.disableLabelAnimation&&!nl(e))){var i=ka(r),o=i.oldLayout,s=et(e),l=s.dataIndex,u={x:r.x,y:r.y,rotation:r.rotation},v=t.getData(s.dataType);if(o){r.attr(o);var f=e.prevStates;f&&(_t(f,"select")>=0&&r.attr(i.oldLayoutSelect),_t(f,"emphasis")>=0&&r.attr(i.oldLayoutEmphasis)),it(r,u,t,l)}else if(r.attr(u),!il(r).valueAnimation){var c=Ht(r.style.opacity,1);r.style.opacity=0,Dt(r,{style:{opacity:c}},t,l)}if(i.oldLayout=u,r.states.select){var h=i.oldLayoutSelect={};Ye(h,u,qe),Ye(h,r.states.select,qe)}if(r.states.emphasis){var d=i.oldLayoutEmphasis={};Ye(d,u,qe),Ye(d,r.states.emphasis,qe)}xo(r,l,v,t,t)}if(n&&!n.ignore&&!n.invisible){var i=bv(n),o=i.oldLayout,p={points:n.shape.points};o?(n.attr({shape:o}),it(n,{shape:p},t)):(n.setShape(p),n.style.strokePercent=0,Dt(n,{style:{strokePercent:1}},t)),i.oldLayout=p}},a}(),xv=_v,Va=xt();function wv(a){a.registerUpdateLifecycle("series:beforeupdate",function(e,t,r){var n=Va(t).labelManager;n||(n=Va(t).labelManager=new xv),n.clearLabels()}),a.registerUpdateLifecycle("series:layoutlabels",function(e,t,r){var n=Va(t).labelManager;r.updatedSeries.forEach(function(i){n.addLabelsOfSeries(t.getViewOfSeriesModel(i))}),n.updateLayoutConfig(t),n.layout(t),n.processLabelsOverall()})}function Iv(a){var e=a;e.hierNode={defaultAncestor:null,ancestor:e,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var t=[e],r,n;r=t.pop();)if(n=r.children,r.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 Av(a,e){var t=a.isExpand?a.children:[],r=a.parentNode.children,n=a.hierNode.i?r[a.hierNode.i-1]:null;if(t.length){Tv(a);var i=(t[0].hierNode.prelim+t[t.length-1].hierNode.prelim)/2;n?(a.hierNode.prelim=n.hierNode.prelim+e(a,n),a.hierNode.modifier=a.hierNode.prelim-i):a.hierNode.prelim=i}else n&&(a.hierNode.prelim=n.hierNode.prelim+e(a,n));a.parentNode.hierNode.defaultAncestor=Cv(a,n,a.parentNode.hierNode.defaultAncestor||r[0],e)}function Lv(a){var e=a.hierNode.prelim+a.parentNode.hierNode.modifier;a.setLayout({x:e},!0),a.hierNode.modifier+=a.parentNode.hierNode.modifier}function Qn(a){return arguments.length?a:Ev}function Ae(a,e){return a-=Math.PI/2,{x:e*Math.cos(a),y:e*Math.sin(a)}}function Dv(a,e){return ye(a.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function Tv(a){for(var e=a.children,t=e.length,r=0,n=0;--t>=0;){var i=e[t];i.hierNode.prelim+=r,i.hierNode.modifier+=r,n+=i.hierNode.change,r+=i.hierNode.shift+n}}function Cv(a,e,t,r){if(e){for(var n=a,i=a,o=i.parentNode.children[0],s=e,l=n.hierNode.modifier,u=i.hierNode.modifier,v=o.hierNode.modifier,c=s.hierNode.modifier;s=Ba(s),i=Ga(i),s&&i;){n=Ba(n),o=Ga(o),n.hierNode.ancestor=a;var f=s.hierNode.prelim+c-i.hierNode.prelim-u+r(s,i);f>0&&(Pv(Mv(s,a,t),a,f),u+=f,l+=f),c+=s.hierNode.modifier,u+=i.hierNode.modifier,l+=n.hierNode.modifier,v+=o.hierNode.modifier}s&&!Ba(n)&&(n.hierNode.thread=s,n.hierNode.modifier+=c-l),i&&!Ga(o)&&(o.hierNode.thread=i,o.hierNode.modifier+=u-v,t=a)}return t}function Ba(a){var e=a.children;return e.length&&a.isExpand?e[e.length-1]:a.hierNode.thread}function Ga(a){var e=a.children;return e.length&&a.isExpand?e[0]:a.hierNode.thread}function Mv(a,e,t){return a.hierNode.ancestor.parentNode===e.parentNode?a.hierNode.ancestor:t}function Pv(a,e,t){var r=t/(e.hierNode.i-a.hierNode.i);e.hierNode.change-=r,e.hierNode.shift+=t,e.hierNode.modifier+=t,e.hierNode.prelim+=t,a.hierNode.change+=r}function Ev(a,e){return a.parentNode===e.parentNode?1:2}var Nv=function(){function a(){this.parentPoint=[],this.childPoints=[]}return a}(),Rv=function(a){B(e,a);function e(t){return a.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new Nv},e.prototype.buildPath=function(t,r){var n=r.childPoints,i=n.length,o=r.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=r.orient,v=u==="TB"||u==="BT"?0:1,c=1-v,f=O(r.forkPosition,1),h=[];h[v]=o[v],h[c]=o[c]+(l[c]-o[c])*f,t.moveTo(o[0],o[1]),t.lineTo(h[0],h[1]),t.moveTo(s[0],s[1]),h[v]=s[v],t.lineTo(h[0],h[1]),h[v]=l[v],t.lineTo(h[0],h[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]),h[v]=p[v],t.lineTo(h[0],h[1])}},e}(dt),kv=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t._mainGroup=new at,t}return e.prototype.init=function(t,r){this._controller=new Fr(r.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},e.prototype.render=function(t,r,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,r,n);var u=this._data;i.diff(u).add(function(v){jn(i,v)&&ti(i,v,null,s,t)}).update(function(v,c){var f=u.getItemGraphicEl(c);if(!jn(i,v)){f&&ai(u,c,f,s,t);return}ti(i,v,f,s,t)}).remove(function(v){var c=u.getItemGraphicEl(v);c&&ai(u,v,c,s,t)}).execute(),this._nodeScaleRatio=t.get("nodeScaleRatio"),this._updateNodeAndLinkScale(t),t.get("expandAndCollapse")===!0&&i.eachItemGraphicEl(function(v,c){v.off("click").on("click",function(){n.dispatchAction({type:"treeExpandAndCollapse",seriesId:t.id,dataIndex:c})})}),this._data=i},e.prototype._updateViewCoordSys=function(t,r){var n=t.getData(),i=[];n.each(function(c){var f=n.getItemLayout(c);f&&!isNaN(f.x)&&!isNaN(f.y)&&i.push([+f.x,+f.y])});var o=[],s=[];ba(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 Hr;v.zoomLimit=t.get("scaleLimit"),v.setBoundingRect(o[0],o[1],s[0]-o[0],s[1]-o[1]),v.setCenter(t.get("center"),r),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,r,n){var i=this,o=this._controller,s=this._controllerHost,l=this.group;o.setPointerChecker(function(u,v,c){var f=l.getBoundingRect();return f.applyTransform(l.transform),f.contain(v,c)&&!wo(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){Io(s,u.dx,u.dy),n.dispatchAction({seriesId:t.id,type:"treeRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){Ao(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 r=t.getData(),n=this._getNodeGlobalScale(t);r.eachItemGraphicEl(function(i,o){i.setSymbolScale(n)})},e.prototype._getNodeGlobalScale=function(t){var r=t.coordinateSystem;if(r.type!=="view")return 1;var n=this._nodeScaleRatio,i=r.scaleX||1,o=r.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}(ut);function jn(a,e){var t=a.getItemLayout(e);return t&&!isNaN(t.x)&&!isNaN(t.y)}function ti(a,e,t,r,n){var i=!t,o=a.tree.getNodeByDataIndex(e),s=o.getModel(),l=o.getVisual("style").fill,u=o.isExpand===!1&&o.children.length!==0?l:"#fff",v=a.tree.root,c=o.parentNode===v?o:o.parentNode||o,f=a.getItemGraphicEl(c.dataIndex),h=c.getLayout(),d=f?{x:f.__oldX,y:f.__oldY,rawX:f.__radialOldRawX,rawY:f.__radialOldRawY}:h,p=o.getLayout();i?(t=new Lo(a,e,null,{symbolInnerColor:u,useNameLabel:!0}),t.x=d.x,t.y=d.y):t.updateData(a,e,null,{symbolInnerColor:u,useNameLabel:!0}),t.__radialOldRawX=t.__radialRawX,t.__radialOldRawY=t.__radialRawY,t.__radialRawX=p.rawX,t.__radialRawY=p.rawY,r.add(t),a.setItemGraphicEl(e,t),t.__oldX=t.x,t.__oldY=t.y,it(t,{x:p.x,y:p.y},n);var g=t.getSymbolPath();if(n.get("layout")==="radial"){var m=v.children[0],S=m.getLayout(),y=m.children.length,b=void 0,x=void 0;if(p.x===S.x&&o.isExpand===!0&&m.children.length){var _={x:(m.children[0].getLayout().x+m.children[y-1].getLayout().x)/2,y:(m.children[0].getLayout().y+m.children[y-1].getLayout().y)/2};b=Math.atan2(_.y-S.y,_.x-S.x),b<0&&(b=Math.PI*2+b),x=_.x<S.x,x&&(b=b-Math.PI)}else b=Math.atan2(p.y-S.y,p.x-S.x),b<0&&(b=Math.PI*2+b),o.children.length===0||o.children.length!==0&&o.isExpand===!1?(x=p.x<S.x,x&&(b=b-Math.PI)):(x=p.x>S.x,x||(b=b-Math.PI));var w=x?"left":"right",I=s.getModel("label"),L=I.get("rotate"),A=L*(Math.PI/180),D=g.getTextContent();D&&(g.setTextConfig({position:I.get("position")||w,rotation:L==null?-b:A,origin:"center"}),D.setStyle("verticalAlign","middle"))}var C=s.get(["emphasis","focus"]),P=C==="relative"?gr(o.getAncestorsIndices(),o.getDescendantIndices()):C==="ancestor"?o.getAncestorsIndices():C==="descendant"?o.getDescendantIndices():null;P&&(et(t).focus=P),Vv(n,o,v,t,d,h,p,r),t.__edge&&(t.onHoverStateChange=function(T){if(T!=="blur"){var M=o.parentNode&&a.getItemGraphicEl(o.parentNode.dataIndex);M&&M.hoverState===ol||sl(t.__edge,T)}})}function Vv(a,e,t,r,n,i,o,s){var l=e.getModel(),u=a.get("edgeShape"),v=a.get("layout"),c=a.getOrient(),f=a.get(["lineStyle","curveness"]),h=a.get("edgeForkPosition"),d=l.getModel("lineStyle").getLineStyle(),p=r.__edge;if(u==="curve")e.parentNode&&e.parentNode!==t&&(p||(p=r.__edge=new Do({shape:Lr(v,c,f,n,n)})),it(p,{shape:Lr(v,c,f,i,o)},a));else if(u==="polyline"&&v==="orthogonal"&&e!==t&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var g=e.children,m=[],S=0;S<g.length;S++){var y=g[S].getLayout();m.push([y.x,y.y])}p||(p=r.__edge=new Rv({shape:{parentPoint:[o.x,o.y],childPoints:[[o.x,o.y]],orient:c,forkPosition:h}})),it(p,{shape:{parentPoint:[o.x,o.y],childPoints:m}},a)}p&&!(u==="polyline"&&!e.isExpand)&&(p.useStyle(pt({strokeNoScale:!0,fill:null},d)),Tt(p,l,"lineStyle"),ia(p),s.add(p))}function ei(a,e,t,r,n){var i=e.tree.root,o=qo(i,a),s=o.source,l=o.sourceLayout,u=e.getItemGraphicEl(a.dataIndex);if(!!u){var v=e.getItemGraphicEl(s.dataIndex),c=v.__edge,f=u.__edge||(s.isExpand===!1||s.children.length===1?c:void 0),h=r.get("edgeShape"),d=r.get("layout"),p=r.get("orient"),g=r.get(["lineStyle","curveness"]);f&&(h==="curve"?yr(f,{shape:Lr(d,p,g,l,l),style:{opacity:0}},r,{cb:function(){t.remove(f)},removeOpt:n}):h==="polyline"&&r.get("layout")==="orthogonal"&&yr(f,{shape:{parentPoint:[l.x,l.y],childPoints:[[l.x,l.y]]},style:{opacity:0}},r,{cb:function(){t.remove(f)},removeOpt:n}))}}function qo(a,e){for(var t=e.parentNode===a?e:e.parentNode||e,r;r=t.getLayout(),r==null;)t=t.parentNode===a?t:t.parentNode||t;return{source:t,sourceLayout:r}}function ai(a,e,t,r,n){var i=a.tree.getNodeByDataIndex(e),o=a.tree.root,s=qo(o,i).sourceLayout,l={duration:n.get("animationDurationUpdate"),easing:n.get("animationEasingUpdate")};yr(t,{x:s.x+1,y:s.y+1},n,{cb:function(){r.remove(t),a.setItemGraphicEl(e,null)},removeOpt:l}),t.fadeOut(null,a.hostModel,{fadeLabel:!0,animation:l}),i.children.forEach(function(u){ei(u,a,r,n,l)}),ei(i,a,r,n,l)}function Lr(a,e,t,r,n){var i,o,s,l,u,v,c,f;if(a==="radial"){u=r.rawX,c=r.rawY,v=n.rawX,f=n.rawY;var h=Ae(u,c),d=Ae(u,c+(f-c)*t),p=Ae(v,f+(c-f)*t),g=Ae(v,f);return{x1:h.x||0,y1:h.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=r.x,c=r.y,v=n.x,f=n.y,(e==="LR"||e==="RL")&&(i=u+(v-u)*t,o=c,s=v+(u-v)*t,l=f),(e==="TB"||e==="BT")&&(i=u,o=c+(f-c)*t,s=v,l=f+(c-f)*t);return{x1:u,y1:c,x2:v,y2:f,cpx1:i,cpy1:o,cpx2:s,cpy2:l}}var Bv=kv,bt=xt();function Ko(a){var e=a.mainData,t=a.datas;t||(t={main:e},a.datasAttr={main:"data"}),a.datas=a.mainData=null,Jo(e,t,a),N(t,function(r){N(e.TRANSFERABLE_METHODS,function(n){r.wrapMethod(n,tt(Gv,a))})}),e.wrapMethod("cloneShallow",tt(zv,a)),N(e.CHANGABLE_METHODS,function(r){e.wrapMethod(r,tt(Ov,a))}),ll(t[e.dataType]===e)}function Gv(a,e){if(Wv(this)){var t=U({},bt(this).datas);t[this.dataType]=e,Jo(e,t,a)}else ln(e,this.dataType,bt(this).mainData,a);return e}function Ov(a,e){return a.struct&&a.struct.update(),e}function zv(a,e){return N(bt(e).datas,function(t,r){t!==e&&ln(t.cloneShallow(),r,e,a)}),e}function Fv(a){var e=bt(this).mainData;return a==null||e==null?e:bt(e).datas[a]}function Hv(){var a=bt(this).mainData;return a==null?[{data:a}]:H(zr(bt(a).datas),function(e){return{type:e,data:bt(a).datas[e]}})}function Wv(a){return bt(a).mainData===a}function Jo(a,e,t){bt(a).datas={},N(e,function(r,n){ln(r,n,a,t)})}function ln(a,e,t,r){bt(t).datas[e]=a,bt(a).mainData=t,a.dataType=e,r.struct&&(a[r.structAttr]=r.struct,r.struct[r.datasAttr[e]]=a),a.getLinkedData=Fv,a.getLinkedDataAll=Hv}var Uv=function(){function a(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 a.prototype.isRemoved=function(){return this.dataIndex<0},a.prototype.eachNode=function(e,t,r){nt(e)&&(r=t,t=e,e=null),e=e||{},yt(e)&&(e={order:e});var n=e.order||"preorder",i=this[e.attr||"children"],o;n==="preorder"&&(o=t.call(r,this));for(var s=0;!o&&s<i.length;s++)i[s].eachNode(e,t,r);n==="postorder"&&t.call(r,this)},a.prototype.updateDepthAndHeight=function(e){var t=0;this.depth=e;for(var r=0;r<this.children.length;r++){var n=this.children[r];n.updateDepthAndHeight(e+1),n.height>t&&(t=n.height)}this.height=t+1},a.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,r=this.children,n=r.length;t<n;t++){var i=r[t].getNodeById(e);if(i)return i}},a.prototype.contains=function(e){if(e===this)return!0;for(var t=0,r=this.children,n=r.length;t<n;t++){var i=r[t].contains(e);if(i)return i}},a.prototype.getAncestors=function(e){for(var t=[],r=e?this:this.parentNode;r;)t.push(r),r=r.parentNode;return t.reverse(),t},a.prototype.getAncestorsIndices=function(){for(var e=[],t=this;t;)e.push(t.dataIndex),t=t.parentNode;return e.reverse(),e},a.prototype.getDescendantIndices=function(){var e=[];return this.eachNode(function(t){e.push(t.dataIndex)}),e},a.prototype.getValue=function(e){var t=this.hostTree.data;return t.getStore().get(t.getDimensionIndex(e||"value"),this.dataIndex)},a.prototype.setLayout=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},a.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},a.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostTree,r=t.data.getItemModel(this.dataIndex);return r.getModel(e)}},a.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},a.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},a.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},a.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},a.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},a.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},a.prototype.isAncestorOf=function(e){for(var t=e.parentNode;t;){if(t===this)return!0;t=t.parentNode}return!1},a.prototype.isDescendantOf=function(e){return e!==this&&e.isAncestorOf(this)},a}(),$v=function(){function a(e){this.type="tree",this._nodes=[],this.hostModel=e}return a.prototype.eachNode=function(e,t,r){this.root.eachNode(e,t,r)},a.prototype.getNodeByDataIndex=function(e){var t=this.data.getRawIndex(e);return this._nodes[t]},a.prototype.getNodeById=function(e){return this.root.getNodeById(e)},a.prototype.update=function(){for(var e=this.data,t=this._nodes,r=0,n=t.length;r<n;r++)t[r].dataIndex=-1;for(var r=0,n=e.count();r<n;r++)t[e.getRawIndex(r)].dataIndex=r},a.prototype.clearLayouts=function(){this.data.clearItemLayouts()},a.createTree=function(e,t,r){var n=new a(t),i=[],o=1;s(e);function s(v,c){var f=v.value;o=Math.max(o,W(f)?f.length:1),i.push(v);var h=new Uv(_a(v.name,""),n);c?Zv(h,c):n.root=h,n._nodes.push(h);var d=v.children;if(d)for(var p=0;p<d.length;p++)s(d[p],h)}n.root.updateDepthAndHeight(0);var l=Wr(i,{coordDimensions:["value"],dimensionsCount:o}).dimensions,u=new St(l,t);return u.initData(i),r&&r(u),Ko({mainData:u,struct:n,structAttr:"tree"}),n.update(),n},a}();function Zv(a,e){var t=e.children;a.parentNode!==e&&(t.push(a),a.parentNode=e)}var un=$v;function Ve(a,e,t){if(a&&_t(e,a.type)>=0){var r=t.getData().tree.root,n=a.targetNode;if(yt(n)&&(n=r.getNodeById(n)),n&&r.contains(n))return{node:n};var i=a.targetNodeId;if(i!=null&&(n=r.getNodeById(i)))return{node:n}}}function Qo(a){for(var e=[];a;)a=a.parentNode,a&&e.push(a);return e.reverse()}function vn(a,e){var t=Qo(a);return _t(t,e)>=0}function Ta(a,e){for(var t=[];a;){var r=a.dataIndex;t.push({name:a.name,dataIndex:r,value:e.getRawValue(r)}),a=a.parentNode}return t.reverse(),t}var Xv=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.hasSymbolVisual=!0,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t){var r={name:t.name,children:t.data},n=t.leaves||{},i=new Yt(n,this,this.ecModel),o=un.createTree(r,this,s);function s(c){c.wrapMethod("getItemModel",function(f,h){var d=o.getNodeByDataIndex(h);return d&&d.children.length&&d.isExpand||(f.parentModel=i),f})}var l=0;o.eachNode("preorder",function(c){c.depth>l&&(l=c.depth)});var u=t.expandAndCollapse,v=u&&t.initialTreeDepth>=0?t.initialTreeDepth:l;return o.root.eachNode("preorder",function(c){var f=c.hostTree.data.getRawDataItem(c.dataIndex);c.isExpand=f&&f.collapsed!=null?!f.collapsed:c.depth<=v}),o.data},e.prototype.getOrient=function(){var t=this.get("orient");return t==="horizontal"?t="LR":t==="vertical"&&(t="TB"),t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.formatTooltip=function(t,r,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 Gt("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},e.prototype.getDataParams=function(t){var r=a.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return r.treeAncestors=Ta(n,this),r.collapsed=!n.isExpand,r},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(vt),Yv=Xv;function qv(a,e,t){for(var r=[a],n=[],i;i=r.pop();)if(n.push(i),i.isExpand){var o=i.children;if(o.length)for(var s=0;s<o.length;s++)r.push(o[s])}for(;i=n.pop();)e(i,t)}function _e(a,e){for(var t=[a],r;r=t.pop();)if(e(r),r.isExpand){var n=r.children;if(n.length)for(var i=n.length-1;i>=0;i--)t.push(n[i])}}function Kv(a,e){a.eachSeriesByType("tree",function(t){Jv(t,e)})}function Jv(a,e){var t=Dv(a,e);a.layoutInfo=t;var r=a.get("layout"),n=0,i=0,o=null;r==="radial"?(n=2*Math.PI,i=Math.min(t.height,t.width)/2,o=Qn(function(y,b){return(y.parentNode===b.parentNode?1:2)/y.depth})):(n=t.width,i=t.height,o=Qn());var s=a.getData().tree.root,l=s.children[0];if(l){Iv(s),qv(l,Av,o),s.hierNode.modifier=-l.hierNode.prelim,_e(l,Lv);var u=l,v=l,c=l;_e(l,function(y){var b=y.getLayout().x;b<u.getLayout().x&&(u=y),b>v.getLayout().x&&(v=y),y.depth>c.depth&&(c=y)});var f=u===v?1:o(u,v)/2,h=f-u.getLayout().x,d=0,p=0,g=0,m=0;if(r==="radial")d=n/(v.getLayout().x+f+h),p=i/(c.depth-1||1),_e(l,function(y){g=(y.getLayout().x+h)*d,m=(y.depth-1)*p;var b=Ae(g,m);y.setLayout({x:b.x,y:b.y,rawX:g,rawY:m},!0)});else{var S=a.getOrient();S==="RL"||S==="LR"?(p=i/(v.getLayout().x+f+h),d=n/(c.depth-1||1),_e(l,function(y){m=(y.getLayout().x+h)*p,g=S==="LR"?(y.depth-1)*d:n-(y.depth-1)*d,y.setLayout({x:g,y:m},!0)})):(S==="TB"||S==="BT")&&(d=n/(v.getLayout().x+f+h),p=i/(c.depth-1||1),_e(l,function(y){g=(y.getLayout().x+h)*d,m=S==="TB"?(y.depth-1)*p:i-(y.depth-1)*p,y.setLayout({x:g,y:m},!0)}))}}}function Qv(a){a.eachSeriesByType("tree",function(e){var t=e.getData(),r=t.tree;r.eachNode(function(n){var i=n.getModel(),o=i.getModel("itemStyle").getItemStyle(),s=t.ensureUniqueItemVisual(n.dataIndex,"style");U(s,o)})})}function jv(a){a.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},function(r){var n=e.dataIndex,i=r.getData().tree,o=i.getNodeByDataIndex(n);o.isExpand=!o.isExpand})}),a.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(e,t,r){t.eachComponent({mainType:"series",subType:"tree",query:e},function(n){var i=n.coordinateSystem,o=To(i,e,void 0,r);n.setCenter&&n.setCenter(o.center),n.setZoom&&n.setZoom(o.zoom)})})}function tc(a){a.registerChartView(Bv),a.registerSeriesModel(Yv),a.registerLayout(Kv),a.registerVisual(Qv),jv(a)}var ri=["treemapZoomToNode","treemapRender","treemapMove"];function ec(a){for(var e=0;e<ri.length;e++)a.registerAction({type:ri[e],update:"updateView"},Pe);a.registerAction({type:"treemapRootToNode",update:"updateView"},function(t,r){r.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=vn(u,l.node)?"rollUp":"drillDown"),i.resetViewRoot(l.node)}}})}function jo(a){var e=a.getData(),t=e.tree,r={};t.eachNode(function(n){for(var i=n;i&&i.depth>1;)i=i.parentNode;var o=ul(a.ecModel,i.name||i.dataIndex+"",r);n.setVisual("decal",o)})}var ac=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.preventUsingHoverLayer=!0,t}return e.prototype.getInitialData=function(t,r){var n={name:t.name,children:t.data};ts(n);var i=t.levels||[],o=this.designatedVisualItemStyle={},s=new Yt({itemStyle:o},this,r);i=t.levels=rc(i,r);var l=H(i||[],function(c){return new Yt(c,s,r)},this),u=un.createTree(n,this,v);function v(c){c.wrapMethod("getItemModel",function(f,h){var d=u.getNodeByDataIndex(h),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,r,n){var i=this.getData(),o=this.getRawValue(t),s=i.getName(t);return Gt("nameValue",{name:s,value:o})},e.prototype.getDataParams=function(t){var r=a.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return r.treeAncestors=Ta(n,this),r.treePathInfo=r.treeAncestors,r},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},U(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var r=this._idIndexMap;r||(r=this._idIndexMap=ne(),this._idIndexMapCount=0);var n=r.get(t);return n==null&&r.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 r=this.getRawData().tree.root;(!t||t!==r&&!r.contains(t))&&(this._viewRoot=r)},e.prototype.enableAriaDecal=function(){jo(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"\u25B6",zoomToNodeRatio:.32*.32,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}},emphasis:{itemStyle:{color:"rgba(0,0,0,0.9)"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e}(vt);function ts(a){var e=0;N(a.children,function(r){ts(r);var n=r.value;W(n)&&(n=n[0]),e+=n});var t=a.value;W(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),W(a.value)?a.value[0]=t:a.value=t}function rc(a,e){var t=kt(e.get("color")),r=kt(e.get(["aria","decal","decals"]));if(!!t){a=a||[];var n,i;N(a,function(s){var l=new Yt(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=a[0]||(a[0]={});return n||(o.color=t.slice()),!i&&r&&(o.decal=r.slice()),a}}var nc=ac,ic=8,ni=8,Oa=5,oc=function(){function a(e){this.group=new at,e.add(this.group)}return a.prototype.render=function(e,t,r,n){var i=e.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!i.get("show")||!r)){var s=i.getModel("itemStyle"),l=i.getModel("emphasis"),u=s.getModel("textStyle"),v=l.getModel(["itemStyle","textStyle"]),c={pos:{left:i.get("left"),right:i.get("right"),top:i.get("top"),bottom:i.get("bottom")},box:{width:t.getWidth(),height:t.getHeight()},emptyItemWidth:i.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(r,c,u),this._renderContent(e,c,s,l,u,v,n),vl(o,c.pos,c.box)}},a.prototype._prepare=function(e,t,r){for(var n=e;n;n=n.parentNode){var i=_a(n.getModel().get("name"),""),o=r.getTextRect(i),s=Math.max(o.width+ic*2,t.emptyItemWidth);t.totalWidth+=s+ni,t.renderList.push({node:n,text:i,width:s})}},a.prototype._renderContent=function(e,t,r,n,i,o,s){for(var l=0,u=t.emptyItemWidth,v=e.get(["breadcrumb","height"]),c=cl(t.pos,t.box),f=t.totalWidth,h=t.renderList,d=n.getModel("itemStyle").getItemStyle(),p=h.length-1;p>=0;p--){var g=h[p],m=g.node,S=g.width,y=g.text;f>c.width&&(f-=S-u,S=u,y=null);var b=new Ee({shape:{points:sc(l,0,S,v,p===h.length-1,p===0)},style:pt(r.getItemStyle(),{lineJoin:"bevel"}),textContent:new Wt({style:Rt(i,{text:y})}),textConfig:{position:"inside"},z2:xa*1e4,onclick:tt(s,m)});b.disableLabelAnimation=!0,b.getTextContent().ensureState("emphasis").style=Rt(o,{text:y}),b.ensureState("emphasis").style=d,lt(b,n.get("focus"),n.get("blurScope"),n.get("disabled")),this.group.add(b),lc(b,e,m),l+=S+ni}},a.prototype.remove=function(){this.group.removeAll()},a}();function sc(a,e,t,r,n,i){var o=[[n?a:a-Oa,e],[a+t,e],[a+t,e+r],[n?a:a-Oa,e+r]];return!i&&o.splice(2,0,[a+t+Oa,e+r/2]),!n&&o.push([a,e+r/2]),o}function lc(a,e,t){et(a).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&&Ta(t,e)}}var uc=oc,vc=function(){function a(){this._storage=[],this._elExistsMap={}}return a.prototype.add=function(e,t,r,n,i){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:r,delay:n,easing:i}),!0)},a.prototype.finished=function(e){return this._finishedCallback=e,this},a.prototype.start=function(){for(var e=this,t=this._storage.length,r=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:r,aborted:r})}return this},a}();function cc(){return new vc}var Dr=at,ii=qt,oi=3,si="label",li="upperLabel",fc=xa*10,hc=xa*2,pc=xa*3,te=fl([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),ui=function(a){var e=te(a);return e.stroke=e.fill=e.lineWidth=null,e},ua=xt(),dc=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t._state="ready",t._storage=xe(),t}return e.prototype.render=function(t,r,n,i){var o=r.findComponents({mainType:"series",subType:"treemap",query:i});if(!(_t(o,t)<0)){this.seriesModel=t,this.api=n,this.ecModel=r;var s=["treemapZoomToNode","treemapRootToNode"],l=Ve(i,s,t),u=i&&i.type,v=t.layoutInfo,c=!this._oldTree,f=this._storage,h=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,h);p&&!c&&(!u||u==="treemapZoomToNode"||u==="treemapRootToNode")?this._doAnimation(d,g,t,h):g.renderFinally(),this._resetController(n),this._renderBreadcrumb(t,n,l)}},e.prototype._giveContainerGroup=function(t){var r=this._containerGroup;return r||(r=this._containerGroup=new Dr,this._initEvents(r),this.group.add(r)),r.x=t.x,r.y=t.y,r},e.prototype._doRender=function(t,r,n){var i=r.getData().tree,o=this._oldTree,s=xe(),l=xe(),u=this._storage,v=[];function c(g,m,S,y){return gc(r,l,u,n,s,v,g,m,S,y)}h(i.root?[i.root]:[],o&&o.root?[o.root]:[],t,i===o||!o,0);var f=d(u);return this._oldTree=i,this._storage=l,{lastsForAnimation:s,willDeleteEls:f,renderFinally:p};function h(g,m,S,y,b){y?(m=g,N(g,function(w,I){!w.isRemoved()&&_(I,I)})):new ge(m,g,x,x).add(_).update(_).remove(tt(_,null)).execute();function x(w){return w.getId()}function _(w,I){var L=w!=null?g[w]:null,A=I!=null?m[I]:null,D=c(L,A,S,b);D&&h(L&&L.viewChildren||[],A&&A.viewChildren||[],D,y,b+1)}}function d(g){var m=xe();return g&&N(g,function(S,y){var b=m[y];N(S,function(x){x&&(b.push(x),ua(x).willDelete=!0)})}),m}function p(){N(f,function(g){N(g,function(m){m.parent&&m.parent.remove(m)})}),N(v,function(g){g.invisible=!0,g.dirty()})}},e.prototype._doAnimation=function(t,r,n,i){var o=n.get("animationDurationUpdate"),s=n.get("animationEasing"),l=(nt(o)?0:o)||0,u=(nt(s)?null:s)||"cubicOut",v=cc();N(r.willDeleteEls,function(c,f){N(c,function(h,d){if(!h.invisible){var p=h.parent,g,m=ua(p);if(i&&i.direction==="drillDown")g=p===i.rootNodeGroup?{shape:{x:0,y:0,width:m.nodeWidth,height:m.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var S=0,y=0;m.willDelete||(S=m.nodeWidth/2,y=m.nodeHeight/2),g=f==="nodeGroup"?{x:S,y,style:{opacity:0}}:{shape:{x:S,y,width:0,height:0},style:{opacity:0}}}g&&v.add(h,g,l,0,u)}})}),N(this._storage,function(c,f){N(c,function(h,d){var p=r.lastsForAnimation[f][d],g={};!p||(h instanceof at?p.oldX!=null&&(g.x=h.x,g.y=h.y,h.x=p.oldX,h.y=p.oldY):(p.oldShape&&(g.shape=U({},h.shape),h.setShape(p.oldShape)),p.fadein?(h.setStyle("opacity",0),g.style={opacity:1}):h.style.opacity!==1&&(g.style={opacity:1})),v.add(h,g,l,0,u))})},this),this._state="animating",v.finished(st(function(){this._state="ready",r.renderFinally()},this)).start()},e.prototype._resetController=function(t){var r=this._controller;r||(r=this._controller=new Fr(t.getZr()),r.enable(this.seriesModel.get("roam")),r.on("pan",st(this._onPan,this)),r.on("zoom",st(this._onZoom,this)));var n=new ht(0,0,t.getWidth(),t.getHeight());r.setPointerChecker(function(i,o,s){return n.contain(o,s)})},e.prototype._clearController=function(){var t=this._controller;t&&(t.dispose(),t=null)},e.prototype._onPan=function(t){if(this._state!=="animating"&&(Math.abs(t.dx)>oi||Math.abs(t.dy)>oi)){var r=this.seriesModel.getData().tree.root;if(!r)return;var n=r.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 r=t.originX,n=t.originY;if(this._state!=="animating"){var i=this.seriesModel.getData().tree.root;if(!i)return;var o=i.getLayout();if(!o)return;var s=new ht(o.x,o.y,o.width,o.height),l=this.seriesModel.layoutInfo;r-=l.x,n-=l.y;var u=pl();Vn(u,u,[-r,-n]),hl(u,u,[t.scale,t.scale]),Vn(u,u,[r,n]),s.applyTransform(u),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:s.x,y:s.y,width:s.width,height:s.height}})}},e.prototype._initEvents=function(t){var r=this;t.on("click",function(n){if(r._state==="ready"){var i=r.seriesModel.get("nodeClick",!0);if(!!i){var o=r.findTarget(n.offsetX,n.offsetY);if(!!o){var s=o.node;if(s.getLayout().isLeafRoot)r._rootToNode(o);else if(i==="zoomToNode")r._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&&Co(u,v)}}}}},this)},e.prototype._renderBreadcrumb=function(t,r,n){var i=this;n||(n=t.get("leafDepth",!0)!=null?{node:t.getViewRoot()}:this.findTarget(r.getWidth()/2,r.getHeight()/2),n||(n={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new uc(this.group))).render(t,r,n.node,function(o){i._state!=="animating"&&(vn(t.getViewRoot(),o)?i._rootToNode({node:o}):i._zoomToNode({node:o}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=xe(),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,r){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,r),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}(ut);function xe(){return{nodeGroup:[],background:[],content:[]}}function gc(a,e,t,r,n,i,o,s,l,u){if(!o)return;var v=o.getLayout(),c=a.getData(),f=o.getModel();if(c.setItemGraphicEl(o.dataIndex,null),!v||!v.isInView)return;var h=v.width,d=v.height,p=v.borderWidth,g=v.invisible,m=o.getRawIndex(),S=s&&s.getRawIndex(),y=o.viewChildren,b=v.upperHeight,x=y&&y.length,_=f.getModel("itemStyle"),w=f.getModel(["emphasis","itemStyle"]),I=f.getModel(["blur","itemStyle"]),L=f.getModel(["select","itemStyle"]),A=_.get("borderRadius")||0,D=J("nodeGroup",Dr);if(!D)return;if(l.add(D),D.x=v.x||0,D.y=v.y||0,D.markRedraw(),ua(D).nodeWidth=h,ua(D).nodeHeight=d,v.isAboveViewRoot)return D;var C=J("background",ii,u,hc);C&&V(D,C,x&&v.upperLabelHeight);var P=f.getModel("emphasis"),T=P.get("focus"),M=P.get("blurScope"),E=P.get("disabled"),R=T==="ancestor"?o.getAncestorsIndices():T==="descendant"?o.getDescendantIndices():T;if(x)Bn(D)&&Ue(D,!1),C&&(Ue(C,!E),c.setItemGraphicEl(o.dataIndex,C),Gn(C,R,M));else{var k=J("content",ii,u,pc);k&&G(D,k),C.disableMorphing=!0,C&&Bn(C)&&Ue(C,!1),Ue(D,!E),c.setItemGraphicEl(o.dataIndex,D),Gn(D,R,M)}return D;function V(Z,F,K){var q=et(F);if(q.dataIndex=o.dataIndex,q.seriesIndex=a.seriesIndex,F.setShape({x:0,y:0,width:h,height:d,r:A}),g)z(F);else{F.invisible=!1;var Q=o.getVisual("style"),ct=Q.stroke,wt=ui(_);wt.fill=ct;var rt=te(w);rt.fill=w.get("borderColor");var It=te(I);It.fill=I.get("borderColor");var Nt=te(L);if(Nt.fill=L.get("borderColor"),K){var oe=h-2*p;X(F,ct,Q.opacity,{x:p,y:0,width:oe,height:b})}else F.removeTextContent();F.setStyle(wt),F.ensureState("emphasis").style=rt,F.ensureState("blur").style=It,F.ensureState("select").style=Nt,ia(F)}Z.add(F)}function G(Z,F){var K=et(F);K.dataIndex=o.dataIndex,K.seriesIndex=a.seriesIndex;var q=Math.max(h-2*p,0),Q=Math.max(d-2*p,0);if(F.culling=!0,F.setShape({x:p,y:p,width:q,height:Q,r:A}),g)z(F);else{F.invisible=!1;var ct=o.getVisual("style"),wt=ct.fill,rt=ui(_);rt.fill=wt,rt.decal=ct.decal;var It=te(w),Nt=te(I),oe=te(L);X(F,wt,ct.opacity,null),F.setStyle(rt),F.ensureState("emphasis").style=It,F.ensureState("blur").style=Nt,F.ensureState("select").style=oe,ia(F)}Z.add(F)}function z(Z){!Z.invisible&&i.push(Z)}function X(Z,F,K,q){var Q=f.getModel(q?li:si),ct=_a(f.get("name"),null),wt=Q.getShallow("show");ie(Z,Ot(f,q?li:si),{defaultText:wt?ct:null,inheritColor:F,defaultOpacity:K,labelFetcher:a,labelDataIndex:o.dataIndex});var rt=Z.getTextContent();if(!!rt){var It=rt.style,Nt=dl(It.padding||0);q&&(Z.setTextConfig({layoutRect:q}),rt.disableLabelLayout=!0),rt.beforeUpdate=function(){var Tn=Math.max((q?q.width:Z.shape.width)-Nt[1]-Nt[3],0),Cn=Math.max((q?q.height:Z.shape.height)-Nt[0]-Nt[2],0);(It.width!==Tn||It.height!==Cn)&&rt.setStyle({width:Tn,height:Cn})},It.truncateMinChar=2,It.lineOverflow="truncate",Y(It,q,v);var oe=rt.getState("emphasis");Y(oe?oe.style:null,q,v)}}function Y(Z,F,K){var q=Z?Z.text:null;if(!F&&K.isLeafRoot&&q!=null){var Q=a.get("drillDownIcon",!0);Z.text=Q?Q+" "+q:q}}function J(Z,F,K,q){var Q=S!=null&&t[Z][S],ct=n[Z];return Q?(t[Z][S]=null,ot(ct,Q)):g||(Q=new F,Q instanceof Ur&&(Q.z2=yc(K,q)),Ct(ct,Q)),e[Z][m]=Q}function ot(Z,F){var K=Z[m]={};F instanceof Dr?(K.oldX=F.x,K.oldY=F.y):K.oldShape=U({},F.shape)}function Ct(Z,F){var K=Z[m]={},q=o.parentNode,Q=F instanceof at;if(q&&(!r||r.direction==="drillDown")){var ct=0,wt=0,rt=n.background[q.getRawIndex()];!r&&rt&&rt.oldShape&&(ct=rt.oldShape.width,wt=rt.oldShape.height),Q?(K.oldX=0,K.oldY=wt):K.oldShape={x:ct,y:wt,width:0,height:0}}K.fadein=!Q}}function yc(a,e){return a*fc+e}var mc=dc,Sc="itemStyle",es=xt(),bc={seriesType:"treemap",reset:function(a){var e=a.getData().tree,t=e.root;t.isRemoved()||as(t,{},a.getViewRoot().getAncestors(),a)}};function as(a,e,t,r){var n=a.getModel(),i=a.getLayout(),o=a.hostTree.data;if(!(!i||i.invisible||!i.isInView)){var s=n.getModel(Sc),l=_c(s,e,r),u=o.ensureUniqueItemVisual(a.dataIndex,"style"),v=s.get("borderColor"),c=s.get("borderColorSaturation"),f;c!=null&&(f=vi(l),v=xc(c,f)),u.stroke=v;var h=a.viewChildren;if(!h||!h.length)f=vi(l),u.fill=f;else{var d=wc(a,n,i,s,l,h);N(h,function(p,g){if(p.depth>=t.length||p===t[p.depth]){var m=Ic(n,l,p,g,d,r);as(p,m,t,r)}})}}}function _c(a,e,t){var r=U({},e),n=t.designatedVisualItemStyle;return N(["color","colorAlpha","colorSaturation"],function(i){n[i]=e[i];var o=a.get(i);n[i]=null,o!=null&&(r[i]=o)}),r}function vi(a){var e=za(a,"color");if(e){var t=za(a,"colorAlpha"),r=za(a,"colorSaturation");return r&&(e=Mo(e,null,null,r)),t&&(e=mr(e,t)),e}}function xc(a,e){return e!=null?Mo(e,null,null,a):null}function za(a,e){var t=a[e];if(t!=null&&t!=="none")return t}function wc(a,e,t,r,n,i){if(!(!i||!i.length)){var o=Fa(e,"color")||n.color!=null&&n.color!=="none"&&(Fa(e,"colorAlpha")||Fa(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"),c={type:o.name,dataExtent:u,visual:o.range};c.type==="color"&&(v==="index"||v==="id")?(c.mappingMethod="category",c.loop=!0):c.mappingMethod="linear";var f=new Po(c);return es(f).drColorMappingBy=v,f}}}function Fa(a,e){var t=a.get(e);return W(t)&&t.length?{name:e,range:t}:null}function Ic(a,e,t,r,n,i){var o=U({},e);if(n){var s=n.type,l=s==="color"&&es(n).drColorMappingBy,u=l==="index"?r:l==="id"?i.mapIdToIndex(t.getId()):t.getValue(a.get("visualDimension"));o[s]=n.mapValueToVisual(u)}return o}var Be=Math.max,va=Math.min,ci=Et,cn=N,rs=["itemStyle","borderWidth"],Ac=["itemStyle","gapWidth"],Lc=["upperLabel","show"],Dc=["upperLabel","height"],Tc={seriesType:"treemap",reset:function(a,e,t,r){var n=t.getWidth(),i=t.getHeight(),o=a.option,s=ye(a.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),l=o.size||[],u=O(ci(s.width,l[0]),n),v=O(ci(s.height,l[1]),i),c=r&&r.type,f=["treemapZoomToNode","treemapRootToNode"],h=Ve(r,f,a),d=c==="treemapRender"||c==="treemapMove"?r.rootRect:null,p=a.getViewRoot(),g=Qo(p);if(c!=="treemapMove"){var m=c==="treemapZoomToNode"?Rc(a,h,p,u,v):d?[d.width,d.height]:[u,v],S=o.sort;S&&S!=="asc"&&S!=="desc"&&(S="desc");var y={squareRatio:o.squareRatio,sort:S,leafDepth:o.leafDepth};p.hostTree.clearLayouts();var b={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};p.setLayout(b),ns(p,y,!1,0),b=p.getLayout(),cn(g,function(_,w){var I=(g[w+1]||p).getValue();_.setLayout(U({dataExtent:[I,I],borderWidth:0,upperHeight:0},b))})}var x=a.getData().tree.root;x.setLayout(kc(s,d,h),!0),a.setLayoutInfo(s),is(x,new ht(-s.x,-s.y,n,i),g,p,0)}};function ns(a,e,t,r){var n,i;if(!a.isRemoved()){var o=a.getLayout();n=o.width,i=o.height;var s=a.getModel(),l=s.get(rs),u=s.get(Ac)/2,v=os(s),c=Math.max(l,v),f=l-u,h=c-u;a.setLayout({borderWidth:l,upperHeight:c,upperLabelHeight:v},!0),n=Be(n-2*f,0),i=Be(i-f-h,0);var d=n*i,p=Cc(a,s,d,e,t,r);if(!!p.length){var g={x:f,y:h,width:n,height:i},m=va(n,i),S=1/0,y=[];y.area=0;for(var b=0,x=p.length;b<x;){var _=p[b];y.push(_),y.area+=_.getLayout().area;var w=Nc(y,m,e.squareRatio);w<=S?(b++,S=w):(y.area-=y.pop().getLayout().area,fi(y,m,g,u,!1),m=va(g.width,g.height),y.length=y.area=0,S=1/0)}if(y.length&&fi(y,m,g,u,!0),!t){var I=s.get("childrenVisibleMin");I!=null&&d<I&&(t=!0)}for(var b=0,x=p.length;b<x;b++)ns(p[b],e,t,r+1)}}}function Cc(a,e,t,r,n,i){var o=a.children||[],s=r.sort;s!=="asc"&&s!=="desc"&&(s=null);var l=r.leafDepth!=null&&r.leafDepth<=i;if(n&&!l)return a.viewChildren=[];o=At(o,function(h){return!h.isRemoved()}),Pc(o,s);var u=Ec(e,o,s);if(u.sum===0)return a.viewChildren=[];if(u.sum=Mc(e,t,u.sum,s,o),u.sum===0)return a.viewChildren=[];for(var v=0,c=o.length;v<c;v++){var f=o[v].getValue()/u.sum*t;o[v].setLayout({area:f})}return l&&(o.length&&a.setLayout({isLeafRoot:!0},!0),o.length=0),a.viewChildren=o,a.setLayout({dataExtent:u.dataExtent},!0),o}function Mc(a,e,t,r,n){if(!r)return t;for(var i=a.get("visibleMin"),o=n.length,s=o,l=o-1;l>=0;l--){var u=n[r==="asc"?o-l-1:l].getValue();u/t*e<i&&(s=l,t-=u)}return r==="asc"?n.splice(0,o-s):n.splice(s,o-s),t}function Pc(a,e){return e&&a.sort(function(t,r){var n=e==="asc"?t.getValue()-r.getValue():r.getValue()-t.getValue();return n===0?e==="asc"?t.dataIndex-r.dataIndex:r.dataIndex-t.dataIndex:n}),a}function Ec(a,e,t){for(var r=0,n=0,i=e.length;n<i;n++)r+=e[n].getValue();var o=a.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],cn(e,function(l){var u=l.getValue(o);u<s[0]&&(s[0]=u),u>s[1]&&(s[1]=u)})),{sum:r,dataExtent:s}}function Nc(a,e,t){for(var r=0,n=1/0,i=0,o=void 0,s=a.length;i<s;i++)o=a[i].getLayout().area,o&&(o<n&&(n=o),o>r&&(r=o));var l=a.area*a.area,u=e*e*t;return l?Be(u*r/l,l/(u*n)):1/0}function fi(a,e,t,r,n){var i=e===t.width?0:1,o=1-i,s=["x","y"],l=["width","height"],u=t[s[i]],v=e?a.area/e:0;(n||v>t[l[o]])&&(v=t[l[o]]);for(var c=0,f=a.length;c<f;c++){var h=a[c],d={},p=v?h.getLayout().area/v:0,g=d[l[o]]=Be(v-2*r,0),m=t[s[i]]+t[l[i]]-u,S=c===f-1||m<p?m:p,y=d[l[i]]=Be(S-2*r,0);d[s[o]]=t[s[o]]+va(r,g/2),d[s[i]]=u+va(r,y/2),u+=S,h.setLayout(d,!0)}t[s[o]]+=v,t[l[o]]-=v}function Rc(a,e,t,r,n){var i=(e||{}).node,o=[r,n];if(!i||i===t)return o;for(var s,l=r*n,u=l*a.option.zoomToNodeRatio;s=i.parentNode;){for(var v=0,c=s.children,f=0,h=c.length;f<h;f++)v+=c[f].getValue();var d=i.getValue();if(d===0)return o;u*=v/d;var p=s.getModel(),g=p.get(rs),m=Math.max(g,os(p));u+=4*g*g+(3*g+m)*Math.pow(u,.5),u>On&&(u=On),i=s}u<l&&(u=l);var S=Math.pow(u/l,.5);return[r*S,n*S]}function kc(a,e,t){if(e)return{x:e.x,y:e.y};var r={x:0,y:0};if(!t)return r;var n=t.node,i=n.getLayout();if(!i)return r;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:a.width/2-o[0],y:a.height/2-o[1]}}function is(a,e,t,r,n){var i=a.getLayout(),o=t[n],s=o&&o===a;if(!(o&&!s||n===t.length&&a!==r)){a.setLayout({isInView:!0,invisible:!s&&!e.intersect(i),isAboveViewRoot:s},!0);var l=new ht(e.x-i.x,e.y-i.y,e.width,e.height);cn(a.viewChildren||[],function(u){is(u,l,t,r,n+1)})}}function os(a){return a.get(Lc)?a.get(Dc):0}function Vc(a){a.registerSeriesModel(nc),a.registerChartView(mc),a.registerVisual(bc),a.registerLayout(Tc),ec(a)}function Bc(a){var e=a.findComponents({mainType:"legend"});!e||!e.length||a.eachSeriesByType("graph",function(t){var r=t.getCategoriesData(),n=t.getGraph(),i=n.data,o=r.mapArray(r.getName);i.filterSelf(function(s){var l=i.getItemModel(s),u=l.getShallow("category");if(u!=null){zt(u)&&(u=o[u]);for(var v=0;v<e.length;v++)if(!e[v].isSelected(u))return!1}return!0})})}function Gc(a){var e={};a.eachSeriesByType("graph",function(t){var r=t.getCategoriesData(),n=t.getData(),i={};r.each(function(o){var s=r.getName(o);i["ec-"+s]=o;var l=r.getItemModel(o),u=l.getModel("itemStyle").getItemStyle();u.fill||(u.fill=t.getColorFromPalette(s,e)),r.setItemVisual(o,"style",u);for(var v=["symbol","symbolSize","symbolKeepAspect"],c=0;c<v.length;c++){var f=l.getShallow(v[c],!0);f!=null&&r.setItemVisual(o,v[c],f)}}),r.count()&&n.each(function(o){var s=n.getItemModel(o),l=s.getShallow("category");if(l!=null){yt(l)&&(l=i["ec-"+l]);var u=r.getItemVisual(l,"style"),v=n.ensureUniqueItemVisual(o,"style");U(v,u);for(var c=["symbol","symbolSize","symbolKeepAspect"],f=0;f<c.length;f++)n.setItemVisual(o,c[f],r.getItemVisual(l,c[f]))}})})}function Ke(a){return a instanceof Array||(a=[a,a]),a}function Oc(a){a.eachSeriesByType("graph",function(e){var t=e.getGraph(),r=e.getEdgeData(),n=Ke(e.get("edgeSymbol")),i=Ke(e.get("edgeSymbolSize"));r.setVisual("fromSymbol",n&&n[0]),r.setVisual("toSymbol",n&&n[1]),r.setVisual("fromSymbolSize",i&&i[0]),r.setVisual("toSymbolSize",i&&i[1]),r.setVisual("style",e.getModel("lineStyle").getLineStyle()),r.each(function(o){var s=r.getItemModel(o),l=t.getEdgeByIndex(o),u=Ke(s.getShallow("symbol",!0)),v=Ke(s.getShallow("symbolSize",!0)),c=s.getModel("lineStyle").getLineStyle(),f=r.ensureUniqueItemVisual(o,"style");switch(U(f,c),f.stroke){case"source":{var h=l.node1.getVisual("style");f.stroke=h&&h.fill;break}case"target":{var h=l.node2.getVisual("style");f.stroke=h&&h.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 Tr="-->",Ca=function(a){return a.get("autoCurveness")||null},ss=function(a,e){var t=Ca(a),r=20,n=[];if(zt(t))r=t;else if(W(t)){a.__curvenessList=t;return}e>r&&(r=e);var i=r%2?r+2:r+3;n=[];for(var o=0;o<i;o++)n.push((o%2?o+1:o)/10*(o%2?-1:1));a.__curvenessList=n},Ge=function(a,e,t){var r=[a.id,a.dataIndex].join("."),n=[e.id,e.dataIndex].join(".");return[t.uid,r,n].join(Tr)},ls=function(a){var e=a.split(Tr);return[e[0],e[2],e[1]].join(Tr)},zc=function(a,e){var t=Ge(a.node1,a.node2,e);return e.__edgeMap[t]},Fc=function(a,e){var t=Cr(Ge(a.node1,a.node2,e),e),r=Cr(Ge(a.node2,a.node1,e),e);return t+r},Cr=function(a,e){var t=e.__edgeMap;return t[a]?t[a].length:0};function Hc(a){!Ca(a)||(a.__curvenessList=[],a.__edgeMap={},ss(a))}function Wc(a,e,t,r){if(!!Ca(t)){var n=Ge(a,e,t),i=t.__edgeMap,o=i[ls(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(r)}}function fn(a,e,t,r){var n=Ca(e),i=W(n);if(!n)return null;var o=zc(a,e);if(!o)return null;for(var s=-1,l=0;l<o.length;l++)if(o[l]===t){s=l;break}var u=Fc(a,e);ss(e,u),a.lineStyle=a.lineStyle||{};var v=Ge(a.node1,a.node2,e),c=e.__curvenessList,f=i||u%2?0:1;if(o.isForward)return c[f+s];var h=ls(v),d=Cr(h,e),p=c[s+d+f];return r?i?n&&n[0]===0?(d+f)%2?p:-p:((d%2?0:1)+f)%2?p:-p:(d+f)%2?p:-p:c[s+d+f]}function us(a){var e=a.coordinateSystem;if(!(e&&e.type!=="view")){var t=a.getGraph();t.eachNode(function(r){var n=r.getModel();r.setLayout([+n.get("x"),+n.get("y")])}),hn(t,a)}}function hn(a,e){a.eachEdge(function(t,r){var n=wa(t.getModel().get(["lineStyle","curveness"]),-fn(t,e,r,!0),0),i=Zt(t.node1.getLayout()),o=Zt(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 Uc(a,e){a.eachSeriesByType("graph",function(t){var r=t.get("layout"),n=t.coordinateSystem;if(n&&n.type!=="view"){var i=t.getData(),o=[];N(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 c=i.get(o[v],s);isNaN(c)||(u=!0),l.push(c)}u?i.setItemLayout(s,n.dataToPoint(l)):i.setItemLayout(s,[NaN,NaN])}hn(i.graph,t)}else(!r||r==="none")&&us(t)})}function Le(a){var e=a.coordinateSystem;if(e.type!=="view")return 1;var t=a.option.nodeScaleRatio,r=e.scaleX,n=e.getZoom(),i=(n-1)*t+1;return i/r}function De(a){var e=a.getVisual("symbolSize");return e instanceof Array&&(e=(e[0]+e[1])/2),+e}var hi=Math.PI,Ha=[];function pn(a,e,t,r){var n=a.coordinateSystem;if(!(n&&n.type!=="view")){var i=n.getBoundingRect(),o=a.getData(),s=o.graph,l=i.width/2+i.x,u=i.height/2+i.y,v=Math.min(i.width,i.height)/2,c=o.count();if(o.setLayout({cx:l,cy:u}),!!c){if(t){var f=n.pointToData(r),h=f[0],d=f[1],p=[h-l,d-u];Fe(p,p),gl(p,p,v),t.setLayout([l+p[0],u+p[1]],!0);var g=a.get(["circular","rotateLabel"]);vs(t,g,l,u)}$c[e](a,s,o,v,l,u,c),s.eachEdge(function(m,S){var y=wa(m.getModel().get(["lineStyle","curveness"]),fn(m,a,S),0),b=Zt(m.node1.getLayout()),x=Zt(m.node2.getLayout()),_,w=(b[0]+x[0])/2,I=(b[1]+x[1])/2;+y&&(y*=3,_=[l*y+w*(1-y),u*y+I*(1-y)]),m.setLayout([b,x,_])})}}}var $c={value:function(a,e,t,r,n,i,o){var s=0,l=t.getSum("value"),u=Math.PI*2/(l||o);e.eachNode(function(v){var c=v.getValue("value"),f=u*(l?c:1)/2;s+=f,v.setLayout([r*Math.cos(s)+n,r*Math.sin(s)+i]),s+=f})},symbolSize:function(a,e,t,r,n,i,o){var s=0;Ha.length=o;var l=Le(a);e.eachNode(function(c){var f=De(c);isNaN(f)&&(f=2),f<0&&(f=0),f*=l;var h=Math.asin(f/2/r);isNaN(h)&&(h=hi/2),Ha[c.dataIndex]=h,s+=h*2});var u=(2*hi-s)/o/2,v=0;e.eachNode(function(c){var f=u+Ha[c.dataIndex];v+=f,(!c.getLayout()||!c.getLayout().fixed)&&c.setLayout([r*Math.cos(v)+n,r*Math.sin(v)+i]),v+=f})}};function vs(a,e,t,r){var n=a.getGraphicEl();if(!!n){var i=a.getModel(),o=i.get(["label","rotate"])||0,s=n.getSymbolPath();if(e){var l=a.getLayout(),u=Math.atan2(l[1]-r,l[0]-t);u<0&&(u=Math.PI*2+u);var v=l[0]<t;v&&(u=u-Math.PI);var c=v?"left":"right";s.setTextConfig({rotation:-u,position:c,origin:"center"});var f=s.ensureState("emphasis");U(f.textConfig||(f.textConfig={}),{position:c})}else s.setTextConfig({rotation:o*=Math.PI/180})}}function Zc(a){a.eachSeriesByType("graph",function(e){e.get("layout")==="circular"&&pn(e,"symbolSize")})}var ue=Sr;function Xc(a,e,t){for(var r=a,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<r.length;v++){var c=r[v];c.p||(c.p=yl(o*(Math.random()-.5)+l[0],s*(Math.random()-.5)+l[1])),c.pp=Zt(c.p),c.edges=null}var f=t.friction==null?.6:t.friction,h=f,d,p;return{warmUp:function(){h=f*.8},setFixed:function(g){r[g].fixed=!0},setUnfixed:function(g){r[g].fixed=!1},beforeStep:function(g){d=g},afterStep:function(g){p=g},step:function(g){d&&d(r,n);for(var m=[],S=r.length,y=0;y<n.length;y++){var b=n[y];if(!b.ignoreForceLayout){var x=b.n1,_=b.n2;pe(m,_.p,x.p);var w=zn(m)-b.d,I=_.w/(x.w+_.w);isNaN(I)&&(I=0),Fe(m,m),!x.fixed&&ue(x.p,x.p,m,I*w*h),!_.fixed&&ue(_.p,_.p,m,-(1-I)*w*h)}}for(var y=0;y<S;y++){var L=r[y];L.fixed||(pe(m,l,L.p),ue(L.p,L.p,m,u*h))}for(var y=0;y<S;y++)for(var x=r[y],A=y+1;A<S;A++){var _=r[A];pe(m,_.p,x.p);var w=zn(m);w===0&&(ml(m,Math.random()-.5,Math.random()-.5),w=1);var D=(x.rep+_.rep)/w/w;!x.fixed&&ue(x.pp,x.pp,m,D),!_.fixed&&ue(_.pp,_.pp,m,-D)}for(var C=[],y=0;y<S;y++){var L=r[y];L.fixed||(pe(C,L.p,L.pp),ue(L.p,L.p,C,h),ft(L.pp,L.p))}h=h*.992;var P=h<.01;p&&p(r,n,P),g&&g(P)}}}function Yc(a){a.eachSeriesByType("graph",function(e){var t=e.coordinateSystem;if(!(t&&t.type!=="view"))if(e.get("layout")==="force"){var r=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,r[b]||[NaN,NaN])}):!l||l==="none"?us(e):l==="circular"&&pn(e,"value");var u=i.getDataExtent("value"),v=o.getDataExtent("value"),c=s.get("repulsion"),f=s.get("edgeLength"),h=W(c)?c:[c,c],d=W(f)?f:[f,f];d=[d[1],d[0]];var p=i.mapArray("value",function(y,b){var x=i.getItemLayout(b),_=Pt(y,u,h);return isNaN(_)&&(_=(h[0]+h[1])/2),{w:_,rep:_,fixed:i.getItemModel(b).get("fixed"),p:!x||isNaN(x[0])||isNaN(x[1])?null:x}}),g=o.mapArray("value",function(y,b){var x=n.getEdgeByIndex(b),_=Pt(y,v,d);isNaN(_)&&(_=(d[0]+d[1])/2);var w=x.getModel(),I=wa(x.getModel().get(["lineStyle","curveness"]),-fn(x,e,b,!0),0);return{n1:p[x.node1.dataIndex],n2:p[x.node2.dataIndex],d:_,curveness:I,ignoreForceLayout:w.get("ignoreForceLayout")}}),m=t.getBoundingRect(),S=Xc(p,g,{rect:m,gravity:s.get("gravity"),friction:s.get("friction")});S.beforeStep(function(y,b){for(var x=0,_=y.length;x<_;x++)y[x].fixed&&ft(y[x].p,n.getNodeByIndex(x).getLayout())}),S.afterStep(function(y,b,x){for(var _=0,w=y.length;_<w;_++)y[_].fixed||n.getNodeByIndex(_).setLayout(y[_].p),r[i.getId(_)]=y[_].p;for(var _=0,w=b.length;_<w;_++){var I=b[_],L=n.getEdgeByIndex(_),A=I.n1.p,D=I.n2.p,C=L.getLayout();C=C?C.slice():[],C[0]=C[0]||[],C[1]=C[1]||[],ft(C[0],A),ft(C[1],D),+I.curveness&&(C[2]=[(A[0]+D[0])/2-(A[1]-D[1])*I.curveness,(A[1]+D[1])/2-(D[0]-A[0])*I.curveness]),L.setLayout(C)}}),e.forceLayout=S,e.preservedPoints=r,S.step()}else e.forceLayout=null})}function qc(a,e,t){var r=U(a.getBoxLayoutParams(),{aspect:t});return ye(r,{width:e.getWidth(),height:e.getHeight()})}function Kc(a,e){var t=[];return a.eachSeriesByType("graph",function(r){var n=r.get("coordinateSystem");if(!n||n==="view"){var i=r.getData(),o=i.mapArray(function(g){var m=i.getItemModel(g);return[+m.get("x"),+m.get("y")]}),s=[],l=[];ba(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=qc(r,e,u);isNaN(u)&&(s=[v.x,v.y],l=[v.x+v.width,v.y+v.height]);var c=l[0]-s[0],f=l[1]-s[1],h=v.width,d=v.height,p=r.coordinateSystem=new Hr;p.zoomLimit=r.get("scaleLimit"),p.setBoundingRect(s[0],s[1],c,f),p.setViewRect(v.x,v.y,h,d),p.setCenter(r.get("center"),e),p.setZoom(r.get("zoom")),t.push(p)}}),t}var pi=oa.prototype,Wa=Do.prototype,cs=function(){function a(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return a}();(function(a){B(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e})(cs);function Ua(a){return isNaN(+a.cpx1)||isNaN(+a.cpy1)}var Jc=function(a){B(e,a);function e(t){var r=a.call(this,t)||this;return r.type="ec-line",r}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new cs},e.prototype.buildPath=function(t,r){Ua(r)?pi.buildPath.call(this,t,r):Wa.buildPath.call(this,t,r)},e.prototype.pointAt=function(t){return Ua(this.shape)?pi.pointAt.call(this,t):Wa.pointAt.call(this,t)},e.prototype.tangentAt=function(t){var r=this.shape,n=Ua(r)?[r.x2-r.x1,r.y2-r.y1]:Wa.tangentAt.call(this,t);return Fe(n,n)},e}(dt),Qc=Jc,$a=["fromSymbol","toSymbol"];function di(a){return"_"+a+"Type"}function gi(a,e,t){var r=e.getItemVisual(t,a);if(!(!r||r==="none")){var n=e.getItemVisual(t,a+"Size"),i=e.getItemVisual(t,a+"Rotate"),o=e.getItemVisual(t,a+"Offset"),s=e.getItemVisual(t,a+"KeepAspect"),l=No(n),u=Ro(o||0,l),v=Ne(r,-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=a,v}}function jc(a){var e=new Qc({name:"line",subPixelOptimize:!0});return Mr(e.shape,a),e}function Mr(a,e){a.x1=e[0][0],a.y1=e[0][1],a.x2=e[1][0],a.y2=e[1][1],a.percent=1;var t=e[2];t?(a.cpx1=t[0],a.cpy1=t[1]):(a.cpx1=NaN,a.cpy1=NaN)}var tf=function(a){B(e,a);function e(t,r,n){var i=a.call(this)||this;return i._createLine(t,r,n),i}return e.prototype._createLine=function(t,r,n){var i=t.hostModel,o=t.getItemLayout(r),s=jc(o);s.shape.percent=0,Dt(s,{shape:{percent:1}},i,r),this.add(s),N($a,function(l){var u=gi(l,t,r);this.add(u),this[di(l)]=t.getItemVisual(r,l)},this),this._updateCommonStl(t,r,n)},e.prototype.updateData=function(t,r,n){var i=t.hostModel,o=this.childOfName("line"),s=t.getItemLayout(r),l={shape:{}};Mr(l.shape,s),it(o,l,i,r),N($a,function(u){var v=t.getItemVisual(r,u),c=di(u);if(this[c]!==v){this.remove(this.childOfName(u));var f=gi(u,t,r);this.add(f)}this[c]=v},this),this._updateCommonStl(t,r,n)},e.prototype.getLinePath=function(){return this.childAt(0)},e.prototype._updateCommonStl=function(t,r,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,c=n&&n.emphasisDisabled,f=n&&n.focus,h=n&&n.blurScope;if(!n||t.hasItemOption){var d=t.getItemModel(r),p=d.getModel("emphasis");s=p.getModel("lineStyle").getLineStyle(),l=d.getModel(["blur","lineStyle"]).getLineStyle(),u=d.getModel(["select","lineStyle"]).getLineStyle(),c=p.get("disabled"),f=p.get("focus"),h=p.get("blurScope"),v=Ot(d)}var g=t.getItemVisual(r,"style"),m=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,N($a,function(_){var w=this.childOfName(_);if(w){w.setColor(m),w.style.opacity=g.opacity;for(var I=0;I<br.length;I++){var L=br[I],A=o.getState(L);if(A){var D=A.style||{},C=w.ensureState(L),P=C.style||(C.style={});D.stroke!=null&&(P[w.__isEmptyBrush?"stroke":"fill"]=D.stroke),D.opacity!=null&&(P.opacity=D.opacity)}}w.markRedraw()}},this);var S=i.getRawValue(r);ie(this,v,{labelDataIndex:r,labelFetcher:{getFormattedLabel:function(_,w){return i.getFormattedLabel(_,w,t.dataType)}},inheritColor:m||"#000",defaultOpacity:g.opacity,defaultText:(S==null?t.getName(r):isFinite(S)?Eo(S):S)+""});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 x=b.get("distance");W(x)||(x=[x,x]),y.__labelDistance=x}this.setTextConfig({position:null,local:!0,inside:!1}),lt(this,f,h,c)},e.prototype.highlight=function(){$r(this)},e.prototype.downplay=function(){Zr(this)},e.prototype.updateLayout=function(t,r){this.setLinePoints(t.getItemLayout(r))},e.prototype.setLinePoints=function(t){var r=this.childOfName("line");Mr(r.shape,t),r.dirty()},e.prototype.beforeUpdate=function(){var t=this,r=t.childOfName("fromSymbol"),n=t.childOfName("toSymbol"),i=t.getTextContent();if(!r&&!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),c=l.pointAt(u),f=pe([],c,v);Fe(f,f);function h(A,D){var C=A.__specifiedRotation;if(C==null){var P=l.tangentAt(D);A.attr("rotation",(D===1?-1:1)*Math.PI/2-Math.atan2(P[1],P[0]))}else A.attr("rotation",C)}if(r&&(r.setPosition(v),h(r,0),r.scaleX=r.scaleY=o*u,r.markRedraw()),n&&(n.setPosition(c),h(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,m=g[0]*o,S=g[1]*o,y=u/2,b=l.tangentAt(y),x=[b[1],-b[0]],_=l.pointAt(y);x[1]>0&&(x[0]=-x[0],x[1]=-x[1]);var w=b[0]<0?-1:1;if(i.__position!=="start"&&i.__position!=="end"){var I=-Math.atan2(b[1],b[0]);c[0]<v[0]&&(I=Math.PI+I),i.rotation=I}var L=void 0;switch(i.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":L=-S,p="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":L=S,p="top";break;default:L=0,p="middle"}switch(i.__position){case"end":i.x=f[0]*m+c[0],i.y=f[1]*S+c[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]*m+v[0],i.y=-f[1]*S+v[1],d=f[0]>.8?"right":f[0]<-.8?"left":"center",p=f[1]>.8?"bottom":f[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":i.x=m*w+v[0],i.y=v[1]+L,d=b[0]<0?"right":"left",i.originX=-m*w,i.originY=-L;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=_[0],i.y=_[1]+L,d="center",i.originY=-L;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-m*w+c[0],i.y=c[1]+L,d=b[0]>=0?"right":"left",i.originX=m*w,i.originY=-L;break}i.scaleX=i.scaleY=o,i.setStyle({verticalAlign:i.__verticalAlign||p,align:i.__align||d})}},e}(at),dn=tf,ef=function(){function a(e){this.group=new at,this._LineCtor=e||dn}return a.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var r=this,n=r.group,i=r._lineData;r._lineData=e,i||n.removeAll();var o=yi(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()},a.prototype.updateLayout=function(){var e=this._lineData;!e||e.eachItemGraphicEl(function(t,r){t.updateLayout(e,r)},this)},a.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=yi(e),this._lineData=null,this.group.removeAll()},a.prototype.incrementalUpdate=function(e,t){this._progressiveEls=[];function r(s){!s.isGroup&&!af(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var n=e.start;n<e.end;n++){var i=t.getItemLayout(n);if(Za(i)){var o=new this._LineCtor(t,n,this._seriesScope);o.traverse(r),this.group.add(o),t.setItemGraphicEl(n,o),this._progressiveEls.push(o)}}},a.prototype.remove=function(){this.group.removeAll()},a.prototype.eachRendered=function(e){Ia(this._progressiveEls||this.group,e)},a.prototype._doAdd=function(e,t,r){var n=e.getItemLayout(t);if(!!Za(n)){var i=new this._LineCtor(e,t,r);e.setItemGraphicEl(t,i),this.group.add(i)}},a.prototype._doUpdate=function(e,t,r,n,i){var o=e.getItemGraphicEl(r);if(!Za(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)},a}();function af(a){return a.animators&&a.animators.length>0}function yi(a){var e=a.hostModel,t=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:t.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:t.get("disabled"),blurScope:t.get("blurScope"),focus:t.get("focus"),labelStatesModels:Ot(e)}}function mi(a){return isNaN(a[0])||isNaN(a[1])}function Za(a){return a&&!mi(a[0])&&!mi(a[1])}var gn=ef,Xa=[],Ya=[],qa=[],ve=ko,Ka=bl,Si=Math.abs;function bi(a,e,t){for(var r=a[0],n=a[1],i=a[2],o=1/0,s,l=t*t,u=.1,v=.1;v<=.9;v+=.1){Xa[0]=ve(r[0],n[0],i[0],v),Xa[1]=ve(r[1],n[1],i[1],v);var c=Si(Ka(Xa,e)-l);c<o&&(o=c,s=v)}for(var f=0;f<32;f++){var h=s+u;Ya[0]=ve(r[0],n[0],i[0],s),Ya[1]=ve(r[1],n[1],i[1],s),qa[0]=ve(r[0],n[0],i[0],h),qa[1]=ve(r[1],n[1],i[1],h);var c=Ka(Ya,e)-l;if(Si(c)<.01)break;var d=Ka(qa,e)-l;u/=2,c<0?d>=0?s=s+u:s=s-u:d>=0?s=s-u:s=s+u}return s}function Ja(a,e){var t=[],r=Sl,n=[[],[],[]],i=[[],[]],o=[];e/=2,a.eachEdge(function(s,l){var u=s.getLayout(),v=s.getVisual("fromSymbol"),c=s.getVisual("toSymbol");u.__original||(u.__original=[Zt(u[0]),Zt(u[1])],u[2]&&u.__original.push(Zt(u[2])));var f=u.__original;if(u[2]!=null){if(ft(n[0],f[0]),ft(n[1],f[2]),ft(n[2],f[1]),v&&v!=="none"){var h=De(s.node1),d=bi(n,f[0],h*e);r(n[0][0],n[1][0],n[2][0],d,t),n[0][0]=t[3],n[1][0]=t[4],r(n[0][1],n[1][1],n[2][1],d,t),n[0][1]=t[3],n[1][1]=t[4]}if(c&&c!=="none"){var h=De(s.node2),d=bi(n,f[1],h*e);r(n[0][0],n[1][0],n[2][0],d,t),n[1][0]=t[1],n[2][0]=t[2],r(n[0][1],n[1][1],n[2][1],d,t),n[1][1]=t[1],n[2][1]=t[2]}ft(u[0],n[0]),ft(u[1],n[2]),ft(u[2],n[1])}else{if(ft(i[0],f[0]),ft(i[1],f[1]),pe(o,i[1],i[0]),Fe(o,o),v&&v!=="none"){var h=De(s.node1);Sr(i[0],i[0],o,h*e)}if(c&&c!=="none"){var h=De(s.node2);Sr(i[1],i[1],o,-h*e)}ft(u[0],i[0]),ft(u[1],i[1])}})}function _i(a){return a.type==="view"}var rf=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,r){var n=new Xr,i=new gn,o=this.group;this._controller=new Fr(r.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,r,n){var i=this,o=t.coordinateSystem;this._model=t;var s=this._symbolDraw,l=this._lineDraw,u=this.group;if(_i(o)){var v={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?u.attr(v):it(u,v,t)}Ja(t.getGraph(),Le(t));var c=t.getData();s.updateData(c);var f=t.getEdgeData();l.updateData(f),this._updateNodeAndLinkScale(),this._updateController(t,r,n),clearTimeout(this._layoutTimeout);var h=t.forceLayout,d=t.get(["force","layoutAnimation"]);h&&this._startForceLayoutIteration(h,d);var p=t.get("layout");c.graph.eachNode(function(y){var b=y.dataIndex,x=y.getGraphicEl(),_=y.getModel();if(!!x){x.off("drag").off("dragend");var w=_.get("draggable");w&&x.on("drag",function(L){switch(p){case"force":h.warmUp(),!i._layouting&&i._startForceLayoutIteration(h,d),h.setFixed(b),c.setItemLayout(b,[x.x,x.y]);break;case"circular":c.setItemLayout(b,[x.x,x.y]),y.setLayout({fixed:!0},!0),pn(t,"symbolSize",y,[L.offsetX,L.offsetY]),i.updateLayout(t);break;case"none":default:c.setItemLayout(b,[x.x,x.y]),hn(t.getGraph(),t),i.updateLayout(t);break}}).on("dragend",function(){h&&h.setUnfixed(b)}),x.setDraggable(w&&!!h,!!_.get("cursor"));var I=_.get(["emphasis","focus"]);I==="adjacency"&&(et(x).focus=y.getAdjacentDataIndices())}}),c.graph.eachEdge(function(y){var b=y.getGraphicEl(),x=y.getModel().get(["emphasis","focus"]);!b||x==="adjacency"&&(et(b).focus={edge:[y.dataIndex],node:[y.node1.dataIndex,y.node2.dataIndex]})});var g=t.get("layout")==="circular"&&t.get(["circular","rotateLabel"]),m=c.getLayout("cx"),S=c.getLayout("cy");c.graph.eachNode(function(y){vs(y,g,m,S)}),this._firstRender=!1},e.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(t,r){var n=this;(function i(){t.step(function(o){n.updateLayout(n._model),(n._layouting=!o)&&(r?n._layoutTimeout=setTimeout(i,16):i())})})()},e.prototype._updateController=function(t,r,n){var i=this,o=this._controller,s=this._controllerHost,l=this.group;if(o.setPointerChecker(function(u,v,c){var f=l.getBoundingRect();return f.applyTransform(l.transform),f.contain(v,c)&&!wo(u,n,t)}),!_i(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){Io(s,u.dx,u.dy),n.dispatchAction({seriesId:t.id,type:"graphRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){Ao(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(),Ja(t.getGraph(),Le(t)),i._lineDraw.updateLayout(),n.updateLabelLayout()})},e.prototype._updateNodeAndLinkScale=function(){var t=this._model,r=t.getData(),n=Le(t);r.eachItemGraphicEl(function(i,o){i&&i.setSymbolScale(n)})},e.prototype.updateLayout=function(t){Ja(t.getGraph(),Le(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},e.prototype.remove=function(t,r){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},e.type="graph",e}(ut),nf=rf;function ce(a){return"_EC_"+a}var of=function(){function a(e){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=e||!1}return a.prototype.isDirected=function(){return this._directed},a.prototype.addNode=function(e,t){e=e==null?""+t:""+e;var r=this._nodesMap;if(!r[ce(e)]){var n=new ee(e,t);return n.hostGraph=this,this.nodes.push(n),r[ce(e)]=n,n}},a.prototype.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},a.prototype.getNodeById=function(e){return this._nodesMap[ce(e)]},a.prototype.addEdge=function(e,t,r){var n=this._nodesMap,i=this._edgesMap;if(zt(e)&&(e=this.nodes[e]),zt(t)&&(t=this.nodes[t]),e instanceof ee||(e=n[ce(e)]),t instanceof ee||(t=n[ce(t)]),!(!e||!t)){var o=e.id+"-"+t.id,s=new fs(e,t,r);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}},a.prototype.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},a.prototype.getEdge=function(e,t){e instanceof ee&&(e=e.id),t instanceof ee&&(t=t.id);var r=this._edgesMap;return this._directed?r[e+"-"+t]:r[e+"-"+t]||r[t+"-"+e]},a.prototype.eachNode=function(e,t){for(var r=this.nodes,n=r.length,i=0;i<n;i++)r[i].dataIndex>=0&&e.call(t,r[i],i)},a.prototype.eachEdge=function(e,t){for(var r=this.edges,n=r.length,i=0;i<n;i++)r[i].dataIndex>=0&&r[i].node1.dataIndex>=0&&r[i].node2.dataIndex>=0&&e.call(t,r[i],i)},a.prototype.breadthFirstTraverse=function(e,t,r,n){if(t instanceof ee||(t=this._nodesMap[ce(t)]),!!t){for(var i=r==="out"?"outEdges":r==="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],c=v.node1===l?v.node2:v.node1;if(!c.__visited){if(e.call(n,c,l))return;s.push(c),c.__visited=!0}}}},a.prototype.update=function(){for(var e=this.data,t=this.edgeData,r=this.nodes,n=this.edges,i=0,o=r.length;i<o;i++)r[i].dataIndex=-1;for(var i=0,o=e.count();i<o;i++)r[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},a.prototype.clone=function(){for(var e=new a(this._directed),t=this.nodes,r=this.edges,n=0;n<t.length;n++)e.addNode(t[n].id,t[n].dataIndex);for(var n=0;n<r.length;n++){var i=r[n];e.addEdge(i.node1.id,i.node2.id,i.dataIndex)}return e},a}(),ee=function(){function a(e,t){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=e==null?"":e,this.dataIndex=t==null?-1:t}return a.prototype.degree=function(){return this.edges.length},a.prototype.inDegree=function(){return this.inEdges.length},a.prototype.outDegree=function(){return this.outEdges.length},a.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostGraph,r=t.data.getItemModel(this.dataIndex);return r.getModel(e)}},a.prototype.getAdjacentDataIndices=function(){for(var e={edge:[],node:[]},t=0;t<this.edges.length;t++){var r=this.edges[t];r.dataIndex<0||(e.edge.push(r.dataIndex),e.node.push(r.node1.dataIndex,r.node2.dataIndex))}return e},a}(),fs=function(){function a(e,t,r){this.dataIndex=-1,this.node1=e,this.node2=t,this.dataIndex=r==null?-1:r}return a.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostGraph,r=t.edgeData.getItemModel(this.dataIndex);return r.getModel(e)}},a.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},a}();function hs(a,e){return{getValue:function(t){var r=this[a][e];return r.getStore().get(r.getDimensionIndex(t||"value"),this.dataIndex)},setVisual:function(t,r){this.dataIndex>=0&&this[a][e].setItemVisual(this.dataIndex,t,r)},getVisual:function(t){return this[a][e].getItemVisual(this.dataIndex,t)},setLayout:function(t,r){this.dataIndex>=0&&this[a][e].setItemLayout(this.dataIndex,t,r)},getLayout:function(){return this[a][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[a][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[a][e].getRawIndex(this.dataIndex)}}}me(ee,hs("hostGraph","data"));me(fs,hs("hostGraph","edgeData"));var sf=of;function ps(a,e,t,r,n){for(var i=new sf(r),o=0;o<a.length;o++)i.addNode(Et(a[o].id,a[o].name,o),o);for(var s=[],l=[],u=0,o=0;o<e.length;o++){var v=e[o],c=v.source,f=v.target;i.addEdge(c,f,u)&&(l.push(v),s.push(Et(_a(v.id,null),c+" > "+f)),u++)}var h=t.get("coordinateSystem"),d;if(h==="cartesian2d"||h==="polar")d=He(a,t);else{var p=Vo.get(h),g=p?p.dimensions||[]:[];_t(g,"value")<0&&g.concat(["value"]);var m=Wr(a,{coordDimensions:g,encodeDefine:t.getEncode()}).dimensions;d=new St(m,t),d.initData(a)}var S=new St(["value"],t);return S.initData(l,s),n&&n(d,S),Ko({mainData:d,struct:i,structAttr:"graph",datas:{node:d,edge:S},datasAttr:{node:"data",edge:"edgeData"}}),i.update(),i}var lf=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.init=function(t){a.prototype.init.apply(this,arguments);var r=this;function n(){return r._categoriesData}this.legendVisualProvider=new Yr(n,n),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeOption=function(t){a.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(t){a.prototype.mergeDefaultAndTheme.apply(this,arguments),qr(t,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,r){var n=t.edges||t.links||[],i=t.data||t.nodes||[],o=this;if(i&&n){Hc(this);var s=ps(i,n,this,!0,l);return N(s.edges,function(u){Wc(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,v){u.wrapMethod("getItemModel",function(d){var p=o._categoriesModels,g=d.getShallow("category"),m=p[g];return m&&(m.parentModel=d.parentModel,d.parentModel=m),d});var c=Yt.prototype.getModel;function f(d,p){var g=c.call(this,d,p);return g.resolveParentPath=h,g}v.wrapMethod("getItemModel",function(d){return d.resolveParentPath=h,d.getModel=f,d});function h(d){if(d&&(d[0]==="label"||d[1]==="label")){var p=d.slice();return d[0]==="label"?p[0]="edgeLabel":d[1]==="label"&&(p[1]="edgeLabel"),p}return d}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(t,r,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),Gt("nameValue",{name:v.join(" > "),value:o.value,noValue:o.value==null})}var c=_l({series:this,dataIndex:t,multipleSeries:r});return c},e.prototype._updateCategoriesData=function(){var t=H(this.option.categories||[],function(n){return n.value!=null?n:U({value:0},n)}),r=new St(["value"],this);r.initData(t),this._categoriesData=r,this._categoriesModels=r.mapArray(function(n){return r.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 a.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(vt),uf=lf,vf={type:"graphRoam",event:"graphRoam",update:"none"};function cf(a){a.registerChartView(nf),a.registerSeriesModel(uf),a.registerProcessor(Bc),a.registerVisual(Gc),a.registerVisual(Oc),a.registerLayout(Uc),a.registerLayout(a.PRIORITY.VISUAL.POST_CHART_LAYOUT,Zc),a.registerLayout(Yc),a.registerCoordinateSystem("graphView",{dimensions:Hr.dimensions,create:Kc}),a.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},Pe),a.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},Pe),a.registerAction(vf,function(e,t,r){t.eachComponent({mainType:"series",query:e},function(n){var i=n.coordinateSystem,o=To(i,e,void 0,r);n.setCenter&&n.setCenter(o.center),n.setZoom&&n.setZoom(o.zoom)})})}var ff=function(){function a(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return a}(),hf=function(a){B(e,a);function e(t){var r=a.call(this,t)||this;return r.type="pointer",r}return e.prototype.getDefaultShape=function(){return new ff},e.prototype.buildPath=function(t,r){var n=Math.cos,i=Math.sin,o=r.r,s=r.width,l=r.angle,u=r.x-n(l)*s*(s>=o/3?1:2),v=r.y-i(l)*s*(s>=o/3?1:2);l=r.angle-Math.PI/2,t.moveTo(u,v),t.lineTo(r.x+n(l)*s,r.y+i(l)*s),t.lineTo(r.x+n(r.angle)*o,r.y+i(r.angle)*o),t.lineTo(r.x-n(l)*s,r.y-i(l)*s),t.lineTo(u,v)},e}(dt),pf=hf;function df(a,e){var t=a.get("center"),r=e.getWidth(),n=e.getHeight(),i=Math.min(r,n),o=O(t[0],e.getWidth()),s=O(t[1],e.getHeight()),l=O(a.get("radius"),i/2);return{cx:o,cy:s,r:l}}function Je(a,e){var t=a==null?"":a+"";return e&&(yt(e)?t=e.replace("{value}",t):nt(e)&&(t=e(a))),t}var gf=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,n){this.group.removeAll();var i=t.get(["axisLine","lineStyle","color"]),o=df(t,n);this._renderMain(t,r,n,i,o),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,r,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,c=t.getModel("axisLine"),f=c.get("roundCap"),h=f?Hn:Re,d=c.get("show"),p=c.getModel("lineStyle"),g=p.get("width"),m=[u,v];xl(m,!l),u=m[0],v=m[1];for(var S=v-u,y=u,b=0;d&&b<i.length;b++){var x=Math.min(Math.max(i[b][0],0),1);v=u+S*x;var _=new h({shape:{startAngle:y,endAngle:v,cx:o.cx,cy:o.cy,clockwise:l,r0:o.r-g,r:o.r},silent:!0});_.setStyle({fill:i[b][1]}),_.setStyle(p.getLineStyle(["color","width"])),s.add(_),y=v}var w=function(I){if(I<=0)return i[0][1];var L;for(L=0;L<i.length;L++)if(i[L][0]>=I&&(L===0?0:i[L-1][0])<I)return i[L][1];return i[L-1][1]};this._renderTicks(t,r,n,w,o,u,v,l,g),this._renderTitleAndDetail(t,r,n,w,o),this._renderAnchor(t,o),this._renderPointer(t,r,n,w,o,u,v,l,g)},e.prototype._renderTicks=function(t,r,n,i,o,s,l,u,v){for(var c=this.group,f=o.cx,h=o.cy,d=o.r,p=+t.get("min"),g=+t.get("max"),m=t.getModel("splitLine"),S=t.getModel("axisTick"),y=t.getModel("axisLabel"),b=t.get("splitNumber"),x=S.get("splitNumber"),_=O(m.get("length"),d),w=O(S.get("length"),d),I=s,L=(l-s)/b,A=L/x,D=m.getModel("lineStyle").getLineStyle(),C=S.getModel("lineStyle").getLineStyle(),P=m.get("distance"),T,M,E=0;E<=b;E++){if(T=Math.cos(I),M=Math.sin(I),m.get("show")){var R=P?P+v:v,k=new oa({shape:{x1:T*(d-R)+f,y1:M*(d-R)+h,x2:T*(d-_-R)+f,y2:M*(d-_-R)+h},style:D,silent:!0});D.stroke==="auto"&&k.setStyle({stroke:i(E/b)}),c.add(k)}if(y.get("show")){var R=y.get("distance")+P,V=Je(Eo(E/b*(g-p)+p),y.get("formatter")),G=i(E/b),z=T*(d-_-R)+f,X=M*(d-_-R)+h,Y=y.get("rotate"),J=0;Y==="radial"?(J=-I+2*Math.PI,J>Math.PI/2&&(J+=Math.PI)):Y==="tangential"?J=-I-Math.PI/2:zt(Y)&&(J=Y*Math.PI/180),J===0?c.add(new Wt({style:Rt(y,{text:V,x:z,y:X,verticalAlign:M<-.8?"top":M>.8?"bottom":"middle",align:T<-.4?"left":T>.4?"right":"center"},{inheritColor:G}),silent:!0})):c.add(new Wt({style:Rt(y,{text:V,x:z,y:X,verticalAlign:"middle",align:"center"},{inheritColor:G}),silent:!0,originX:z,originY:X,rotation:J}))}if(S.get("show")&&E!==b){var R=S.get("distance");R=R?R+v:v;for(var ot=0;ot<=x;ot++){T=Math.cos(I),M=Math.sin(I);var Ct=new oa({shape:{x1:T*(d-R)+f,y1:M*(d-R)+h,x2:T*(d-w-R)+f,y2:M*(d-w-R)+h},silent:!0,style:C});C.stroke==="auto"&&Ct.setStyle({stroke:i((E+ot/x)/b)}),c.add(Ct),I+=A}I-=A}else I+=L}},e.prototype._renderPointer=function(t,r,n,i,o,s,l,u,v){var c=this.group,f=this._data,h=this._progressEls,d=[],p=t.get(["pointer","show"]),g=t.getModel("progress"),m=g.get("show"),S=t.getData(),y=S.mapDimension("value"),b=+t.get("min"),x=+t.get("max"),_=[b,x],w=[s,l];function I(A,D){var C=S.getItemModel(A),P=C.getModel("pointer"),T=O(P.get("width"),o.r),M=O(P.get("length"),o.r),E=t.get(["pointer","icon"]),R=P.get("offsetCenter"),k=O(R[0],o.r),V=O(R[1],o.r),G=P.get("keepAspect"),z;return E?z=Ne(E,k-T/2,V-M,T,M,null,G):z=new pf({shape:{angle:-Math.PI/2,width:T,r:M,x:k,y:V}}),z.rotation=-(D+Math.PI/2),z.x=o.cx,z.y=o.cy,z}function L(A,D){var C=g.get("roundCap"),P=C?Hn:Re,T=g.get("overlap"),M=T?g.get("width"):v/S.count(),E=T?o.r-M:o.r-(A+1)*M,R=T?o.r:o.r-A*M,k=new P({shape:{startAngle:s,endAngle:D,cx:o.cx,cy:o.cy,clockwise:u,r0:E,r:R}});return T&&(k.z2=x-S.get(y,A)%x),k}(m||p)&&(S.diff(f).add(function(A){var D=S.get(y,A);if(p){var C=I(A,s);Dt(C,{rotation:-((isNaN(+D)?w[0]:Pt(D,_,w,!0))+Math.PI/2)},t),c.add(C),S.setItemGraphicEl(A,C)}if(m){var P=L(A,s),T=g.get("clip");Dt(P,{shape:{endAngle:Pt(D,_,w,T)}},t),c.add(P),Fn(t.seriesIndex,S.dataType,A,P),d[A]=P}}).update(function(A,D){var C=S.get(y,A);if(p){var P=f.getItemGraphicEl(D),T=P?P.rotation:s,M=I(A,T);M.rotation=T,it(M,{rotation:-((isNaN(+C)?w[0]:Pt(C,_,w,!0))+Math.PI/2)},t),c.add(M),S.setItemGraphicEl(A,M)}if(m){var E=h[D],R=E?E.shape.endAngle:s,k=L(A,R),V=g.get("clip");it(k,{shape:{endAngle:Pt(C,_,w,V)}},t),c.add(k),Fn(t.seriesIndex,S.dataType,A,k),d[A]=k}}).execute(),S.each(function(A){var D=S.getItemModel(A),C=D.getModel("emphasis"),P=C.get("focus"),T=C.get("blurScope"),M=C.get("disabled");if(p){var E=S.getItemGraphicEl(A),R=S.getItemVisual(A,"style"),k=R.fill;if(E instanceof Kr){var V=E.style;E.useStyle(U({image:V.image,x:V.x,y:V.y,width:V.width,height:V.height},R))}else E.useStyle(R),E.type!=="pointer"&&E.setColor(k);E.setStyle(D.getModel(["pointer","itemStyle"]).getItemStyle()),E.style.fill==="auto"&&E.setStyle("fill",i(Pt(S.get(y,A),_,[0,1],!0))),E.z2EmphasisLift=0,Tt(E,D),lt(E,P,T,M)}if(m){var G=d[A];G.useStyle(S.getItemVisual(A,"style")),G.setStyle(D.getModel(["progress","itemStyle"]).getItemStyle()),G.z2EmphasisLift=0,Tt(G,D),lt(G,P,T,M)}}),this._progressEls=d)},e.prototype._renderAnchor=function(t,r){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=Ne(s,r.cx-o/2+O(l[0],r.r),r.cy-o/2+O(l[1],r.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,r,n,i,o){var s=this,l=t.getData(),u=l.mapDimension("value"),v=+t.get("min"),c=+t.get("max"),f=new at,h=[],d=[],p=t.isAnimationEnabled(),g=t.get(["pointer","showAbove"]);l.diff(this._data).add(function(m){h[m]=new Wt({silent:!0}),d[m]=new Wt({silent:!0})}).update(function(m,S){h[m]=s._titleEls[S],d[m]=s._detailEls[S]}).execute(),l.each(function(m){var S=l.getItemModel(m),y=l.get(u,m),b=new at,x=i(Pt(y,[v,c],[0,1],!0)),_=S.getModel("title");if(_.get("show")){var w=_.get("offsetCenter"),I=o.cx+O(w[0],o.r),L=o.cy+O(w[1],o.r),A=h[m];A.attr({z2:g?0:2,style:Rt(_,{x:I,y:L,text:l.getName(m),align:"center",verticalAlign:"middle"},{inheritColor:x})}),b.add(A)}var D=S.getModel("detail");if(D.get("show")){var C=D.get("offsetCenter"),P=o.cx+O(C[0],o.r),T=o.cy+O(C[1],o.r),M=O(D.get("width"),o.r),E=O(D.get("height"),o.r),R=t.get(["progress","show"])?l.getItemVisual(m,"style").fill:x,A=d[m],k=D.get("formatter");A.attr({z2:g?0:2,style:Rt(D,{x:P,y:T,text:Je(y,k),width:isNaN(M)?null:M,height:isNaN(E)?null:E,align:"center",verticalAlign:"middle"},{inheritColor:R})}),wl(A,{normal:D},y,function(G){return Je(G,k)}),p&&xo(A,m,l,t,{getFormattedLabel:function(G,z,X,Y,J,ot){return Je(ot?ot.interpolatedValue:y,k)}}),b.add(A)}f.add(b)}),this.group.add(f),this._titleEls=h,this._detailEls=d},e.type="gauge",e}(ut),yf=gf,mf=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="itemStyle",t}return e.prototype.getInitialData=function(t,r){return Jr(this,["value"])},e.type="series.gauge",e.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(vt),Sf=mf;function bf(a){a.registerChartView(yf),a.registerSeriesModel(Sf)}var _f=["itemStyle","opacity"],xf=function(a){B(e,a);function e(t,r){var n=a.call(this)||this,i=n,o=new Qr,s=new Wt;return i.setTextContent(s),n.setTextGuideLine(o),n.updateData(t,r,!0),n}return e.prototype.updateData=function(t,r,n){var i=this,o=t.hostModel,s=t.getItemModel(r),l=t.getItemLayout(r),u=s.getModel("emphasis"),v=s.get(_f);v=v==null?1:v,n||Se(i),i.useStyle(t.getItemVisual(r,"style")),i.style.lineJoin="round",n?(i.setShape({points:l.points}),i.style.opacity=0,Dt(i,{style:{opacity:v}},o,r)):it(i,{style:{opacity:v},shape:{points:l.points}},o,r),Tt(i,s),this._updateLabel(t,r),lt(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t,r){var n=this,i=this.getTextGuideLine(),o=n.getTextContent(),s=t.hostModel,l=t.getItemModel(r),u=t.getItemLayout(r),v=u.label,c=t.getItemVisual(r,"style"),f=c.fill;ie(o,Ot(l),{labelFetcher:t.hostModel,labelDataIndex:r,defaultOpacity:c.opacity,defaultText:t.getName(r)},{normal:{align:v.textAlign,verticalAlign:v.verticalAlign}}),n.setTextConfig({local:!0,inside:!!v.inside,insideStroke:f,outsideFill:f});var h=v.linePoints;i.setShape({points:h}),n.textGuideLineConfig={anchor:h?new Ut(h[0][0],h[0][1]):null},it(o,{style:{x:v.x,y:v.y}},s,r),o.attr({rotation:v.rotation,originX:v.x,originY:v.y,z2:10}),bo(n,_o(l),{stroke:f})},e}(Ee),wf=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.ignoreLabelLineUpdate=!0,t}return e.prototype.render=function(t,r,n){var i=t.getData(),o=this._data,s=this.group;i.diff(o).add(function(l){var u=new xf(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);Il(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}(ut),If=wf,Af=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){a.prototype.init.apply(this,arguments),this.legendVisualProvider=new Yr(st(this.getData,this),st(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.getInitialData=function(t,r){return Jr(this,{coordDimensions:["value"],encodeDefaulter:tt(Al,this)})},e.prototype._defaultLabelLine=function(t){qr(t,"labelLine",["show"]);var r=t.labelLine,n=t.emphasis.labelLine;r.show=r.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.prototype.getDataParams=function(t){var r=this.getData(),n=a.prototype.getDataParams.call(this,t),i=r.mapDimension("value"),o=r.getSum(i);return n.percent=o?+(r.get(i,t)/o*100).toFixed(2):0,n.$vars.push("percent"),n},e.type="series.funnel",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(vt),Lf=Af;function Df(a,e){return ye(a.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function Tf(a,e){for(var t=a.mapDimension("value"),r=a.mapArray(t,function(l){return l}),n=[],i=e==="ascending",o=0,s=a.count();o<s;o++)n[o]=o;return nt(e)?n.sort(e):e!=="none"&&n.sort(function(l,u){return i?r[l]-r[u]:r[u]-r[l]}),n}function Cf(a){var e=a.hostModel,t=e.get("orient");a.each(function(r){var n=a.getItemModel(r),i=n.getModel("label"),o=i.get("position"),s=n.getModel("labelLine"),l=a.getItemLayout(r),u=l.points,v=o==="inner"||o==="inside"||o==="center"||o==="insideLeft"||o==="insideRight",c,f,h,d;if(v)o==="insideLeft"?(f=(u[0][0]+u[3][0])/2+5,h=(u[0][1]+u[3][1])/2,c="left"):o==="insideRight"?(f=(u[1][0]+u[2][0])/2-5,h=(u[1][1]+u[2][1])/2,c="right"):(f=(u[0][0]+u[1][0]+u[2][0]+u[3][0])/4,h=(u[0][1]+u[1][1]+u[2][1]+u[3][1])/4,c="center"),d=[[f,h],[f,h]];else{var p=void 0,g=void 0,m=void 0,S=void 0,y=s.get("length");o==="left"?(p=(u[3][0]+u[0][0])/2,g=(u[3][1]+u[0][1])/2,m=p-y,f=m-5,c="right"):o==="right"?(p=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,m=p+y,f=m+5,c="left"):o==="top"?(p=(u[3][0]+u[0][0])/2,g=(u[3][1]+u[0][1])/2,S=g-y,h=S-5,c="center"):o==="bottom"?(p=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,S=g+y,h=S+5,c="center"):o==="rightTop"?(p=t==="horizontal"?u[3][0]:u[1][0],g=t==="horizontal"?u[3][1]:u[1][1],t==="horizontal"?(S=g-y,h=S-5,c="center"):(m=p+y,f=m+5,c="top")):o==="rightBottom"?(p=u[2][0],g=u[2][1],t==="horizontal"?(S=g+y,h=S+5,c="center"):(m=p+y,f=m+5,c="bottom")):o==="leftTop"?(p=u[0][0],g=t==="horizontal"?u[0][1]:u[1][1],t==="horizontal"?(S=g-y,h=S-5,c="center"):(m=p-y,f=m-5,c="right")):o==="leftBottom"?(p=t==="horizontal"?u[1][0]:u[3][0],g=t==="horizontal"?u[1][1]:u[2][1],t==="horizontal"?(S=g+y,h=S+5,c="center"):(m=p-y,f=m-5,c="right")):(p=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,t==="horizontal"?(S=g+y,h=S+5,c="center"):(m=p+y,f=m+5,c="left")),t==="horizontal"?(m=p,f=m):(S=g,h=S),d=[[p,g],[m,S]]}l.label={linePoints:d,x:f,y:h,verticalAlign:"middle",textAlign:c,inside:v}})}function Mf(a,e){a.eachSeriesByType("funnel",function(t){var r=t.getData(),n=r.mapDimension("value"),i=t.get("sort"),o=Df(t,e),s=t.get("orient"),l=o.width,u=o.height,v=Tf(r,i),c=o.x,f=o.y,h=s==="horizontal"?[O(t.get("minSize"),u),O(t.get("maxSize"),u)]:[O(t.get("minSize"),l),O(t.get("maxSize"),l)],d=r.getDataExtent(n),p=t.get("min"),g=t.get("max");p==null&&(p=Math.min(d[0],0)),g==null&&(g=d[1]);var m=t.get("funnelAlign"),S=t.get("gap"),y=s==="horizontal"?l:u,b=(y-S*(r.count()-1))/r.count(),x=function(T,M){if(s==="horizontal"){var E=r.get(n,T)||0,R=Pt(E,[p,g],h,!0),k=void 0;switch(m){case"top":k=f;break;case"center":k=f+(u-R)/2;break;case"bottom":k=f+(u-R);break}return[[M,k],[M,k+R]]}var V=r.get(n,T)||0,G=Pt(V,[p,g],h,!0),z;switch(m){case"left":z=c;break;case"center":z=c+(l-G)/2;break;case"right":z=c+l-G;break}return[[z,M],[z+G,M]]};i==="ascending"&&(b=-b,S=-S,s==="horizontal"?c+=l:f+=u,v=v.reverse());for(var _=0;_<v.length;_++){var w=v[_],I=v[_+1],L=r.getItemModel(w);if(s==="horizontal"){var A=L.get(["itemStyle","width"]);A==null?A=b:(A=O(A,l),i==="ascending"&&(A=-A));var D=x(w,c),C=x(I,c+A);c+=A+S,r.setItemLayout(w,{points:D.concat(C.slice().reverse())})}else{var P=L.get(["itemStyle","height"]);P==null?P=b:(P=O(P,u),i==="ascending"&&(P=-P));var D=x(w,f),C=x(I,f+P);f+=P+S,r.setItemLayout(w,{points:D.concat(C.slice().reverse())})}}Cf(r)})}function Pf(a){a.registerChartView(If),a.registerSeriesModel(Lf),a.registerLayout(Mf),a.registerProcessor(jr("funnel"))}var Ef=.3,Nf=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t._dataGroup=new at,t._initialized=!1,t}return e.prototype.init=function(){this.group.add(this._dataGroup)},e.prototype.render=function(t,r,n,i){this._progressiveEls=null;var o=this._dataGroup,s=t.getData(),l=this._data,u=t.coordinateSystem,v=u.dimensions,c=wi(t);s.diff(l).add(f).update(h).remove(d).execute();function f(g){var m=xi(s,o,g,v,u);Qa(m,s,g,c)}function h(g,m){var S=l.getItemGraphicEl(m),y=ds(s,g,v,u);s.setItemGraphicEl(g,S),it(S,{shape:{points:y}},t,g),Se(S),Qa(S,s,g,c)}function d(g){var m=l.getItemGraphicEl(g);o.remove(m)}if(!this._initialized){this._initialized=!0;var p=Rf(u,t,function(){setTimeout(function(){o.removeClipPath()})});o.setClipPath(p)}this._data=s},e.prototype.incrementalPrepareRender=function(t,r,n){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},e.prototype.incrementalRender=function(t,r,n){for(var i=r.getData(),o=r.coordinateSystem,s=o.dimensions,l=wi(r),u=this._progressiveEls=[],v=t.start;v<t.end;v++){var c=xi(i,this._dataGroup,v,s,o);c.incremental=!0,Qa(c,i,v,l),u.push(c)}},e.prototype.remove=function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null},e.type="parallel",e}(ut);function Rf(a,e,t){var r=a.model,n=a.getRect(),i=new qt({shape:{x:n.x,y:n.y,width:n.width,height:n.height}}),o=r.get("layout")==="horizontal"?"width":"height";return i.setShape(o,0),Dt(i,{shape:{width:n.width,height:n.height}},e,t),i}function ds(a,e,t,r){for(var n=[],i=0;i<t.length;i++){var o=t[i],s=a.get(a.mapDimension(o),e);kf(s,r.getAxis(o).type)||n.push(r.dataToPoint(s,o))}return n}function xi(a,e,t,r,n){var i=ds(a,t,r,n),o=new Qr({shape:{points:i},z2:10});return e.add(o),a.setItemGraphicEl(t,o),o}function wi(a){var e=a.get("smooth",!0);return e===!0&&(e=Ef),e=Ll(e),Dl(e)&&(e=0),{smooth:e}}function Qa(a,e,t,r){a.useStyle(e.getItemVisual(t,"style")),a.style.fill=null,a.setShape("smooth",r.smooth);var n=e.getItemModel(t),i=n.getModel("emphasis");Tt(a,n,"lineStyle"),lt(a,i.get("focus"),i.get("blurScope"),i.get("disabled"))}function kf(a,e){return e==="category"?a==null:a==null||isNaN(a)}var Vf=Nf,Bf=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="lineStyle",t.visualDrawType="stroke",t}return e.prototype.getInitialData=function(t,r){return He(null,this,{useEncodeDefaulter:st(Gf,null,this)})},e.prototype.getRawIndicesByActiveState=function(t){var r=this.coordinateSystem,n=this.getData(),i=[];return r.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}(vt);function Gf(a){var e=a.ecModel.getComponent("parallel",a.get("parallelIndex"));if(!!e){var t={};return N(e.dimensions,function(r){var n=Of(r);t[r]=n}),t}}function Of(a){return+a.replace("dim","")}var zf=Bf,Ff=["lineStyle","opacity"],Hf={seriesType:"parallel",reset:function(a,e){var t=a.coordinateSystem,r={normal:a.get(["lineStyle","opacity"]),active:a.get("activeOpacity"),inactive:a.get("inactiveOpacity")};return{progress:function(n,i){t.eachActiveState(i,function(o,s){var l=r[o];if(o==="normal"&&i.hasItemOption){var u=i.getItemModel(s).get(Ff,!0);u!=null&&(l=u)}var v=i.ensureUniqueItemVisual(s,"style");v.opacity=l},n.start,n.end)}}}},Wf=Hf;function Uf(a){$(Bo),a.registerChartView(Vf),a.registerSeriesModel(zf),a.registerVisual(a.PRIORITY.VISUAL.BRUSH,Wf)}var $f=function(){function a(){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 a}(),Zf=function(a){B(e,a);function e(t){return a.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new $f},e.prototype.buildPath=function(t,r){var n=r.extent;t.moveTo(r.x1,r.y1),t.bezierCurveTo(r.cpx1,r.cpy1,r.cpx2,r.cpy2,r.x2,r.y2),r.orient==="vertical"?(t.lineTo(r.x2+n,r.y2),t.bezierCurveTo(r.cpx2+n,r.cpy2,r.cpx1+n,r.cpy1,r.x1+n,r.y1)):(t.lineTo(r.x2,r.y2+n),t.bezierCurveTo(r.cpx2,r.cpy2+n,r.cpx1,r.cpy1+n,r.x1,r.y1+n)),t.closePath()},e.prototype.highlight=function(){$r(this)},e.prototype.downplay=function(){Zr(this)},e}(dt),Xf=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t._focusAdjacencyDisabled=!1,t}return e.prototype.render=function(t,r,n){var i=this,o=t.getGraph(),s=this.group,l=t.layoutInfo,u=l.width,v=l.height,c=t.getData(),f=t.getData("edge"),h=t.get("orient");this._model=t,s.removeAll(),s.x=l.x,s.y=l.y,o.eachEdge(function(d){var p=new Zf,g=et(p);g.dataIndex=d.dataIndex,g.seriesIndex=t.seriesIndex,g.dataType="edge";var m=d.getModel(),S=m.getModel("lineStyle"),y=S.get("curveness"),b=d.node1.getLayout(),x=d.node1.getModel(),_=x.get("localX"),w=x.get("localY"),I=d.node2.getLayout(),L=d.node2.getModel(),A=L.get("localX"),D=L.get("localY"),C=d.getLayout(),P,T,M,E,R,k,V,G;switch(p.shape.extent=Math.max(1,C.dy),p.shape.orient=h,h==="vertical"?(P=(_!=null?_*u:b.x)+C.sy,T=(w!=null?w*v:b.y)+b.dy,M=(A!=null?A*u:I.x)+C.ty,E=D!=null?D*v:I.y,R=P,k=T*(1-y)+E*y,V=M,G=T*y+E*(1-y)):(P=(_!=null?_*u:b.x)+b.dx,T=(w!=null?w*v:b.y)+C.sy,M=A!=null?A*u:I.x,E=(D!=null?D*v:I.y)+C.ty,R=P*(1-y)+M*y,k=T,V=P*y+M*(1-y),G=E),p.setShape({x1:P,y1:T,x2:M,y2:E,cpx1:R,cpy1:k,cpx2:V,cpy2:G}),p.useStyle(S.getItemStyle()),p.style.fill){case"source":p.style.fill=d.node1.getVisual("color"),p.style.decal=d.node1.getVisual("style").decal;break;case"target":p.style.fill=d.node2.getVisual("color"),p.style.decal=d.node2.getVisual("style").decal;break;case"gradient":var z=d.node1.getVisual("color"),X=d.node2.getVisual("color");yt(z)&&yt(X)&&(p.style.fill=new Tl(0,0,+(h==="horizontal"),+(h==="vertical"),[{color:z,offset:0},{color:X,offset:1}]))}var Y=m.getModel("emphasis");Tt(p,m,"lineStyle",function(ot){return ot.getItemStyle()}),s.add(p),f.setItemGraphicEl(d.dataIndex,p);var J=Y.get("focus");lt(p,J==="adjacency"?d.getAdjacentDataIndices():J,Y.get("blurScope"),Y.get("disabled")),et(p).dataType="edge"}),o.eachNode(function(d){var p=d.getLayout(),g=d.getModel(),m=g.get("localX"),S=g.get("localY"),y=g.getModel("emphasis"),b=new qt({shape:{x:m!=null?m*u:p.x,y:S!=null?S*v:p.y,width:p.dx,height:p.dy},style:g.getModel("itemStyle").getItemStyle(),z2:10});ie(b,Ot(g),{labelFetcher:t,labelDataIndex:d.dataIndex,defaultText:d.id}),b.disableLabelAnimation=!0,b.setStyle("fill",d.getVisual("color")),b.setStyle("decal",d.getVisual("style").decal),Tt(b,g),s.add(b),c.setItemGraphicEl(d.dataIndex,b),et(b).dataType="node";var x=y.get("focus");lt(b,x==="adjacency"?d.getAdjacentDataIndices():x,y.get("blurScope"),y.get("disabled"))}),c.eachItemGraphicEl(function(d,p){var g=c.getItemModel(p);g.get("draggable")&&(d.drift=function(m,S){i._focusAdjacencyDisabled=!0,this.shape.x+=m,this.shape.y+=S,this.dirty(),n.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:c.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(Yf(s.getBoundingRect(),t,function(){s.removeClipPath()})),this._data=t.getData()},e.prototype.dispose=function(){},e.type="sankey",e}(ut);function Yf(a,e,t){var r=new qt({shape:{x:a.x-10,y:a.y-10,width:0,height:a.height+20}});return Dt(r,{shape:{width:a.width+20}},e,t),r}var qf=Xf,Kf=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,r){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 Yt(o[l],this,r));if(i&&n){var u=ps(i,n,this,!0,v);return u.data}function v(c,f){c.wrapMethod("getItemModel",function(h,d){var p=h.parentModel,g=p.getData().getItemLayout(d);if(g){var m=g.depth,S=p.levelModels[m];S&&(h.parentModel=S)}return h}),f.wrapMethod("getItemModel",function(h,d){var p=h.parentModel,g=p.getGraph().getEdgeByIndex(d),m=g.node1.getLayout();if(m){var S=m.depth,y=p.levelModels[S];y&&(h.parentModel=y)}return h})}},e.prototype.setNodePosition=function(t,r){var n=this.option.data||this.option.nodes,i=n[t];i.localX=r[0],i.localY=r[1]},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,r,n){function i(h){return isNaN(h)||h==null}if(n==="edge"){var o=this.getDataParams(t,n),s=o.data,l=o.value,u=s.source+" -- "+s.target;return Gt("nameValue",{name:u,value:l,noValue:i(l)})}else{var v=this.getGraph().getNodeByIndex(t),c=v.getLayout().value,f=this.getDataParams(t,n).data.name;return Gt("nameValue",{name:f!=null?f+"":null,value:c,noValue:i(c)})}},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(t,r){var n=a.prototype.getDataParams.call(this,t,r);if(n.value==null&&r==="node"){var i=this.getGraph().getNodeByIndex(t),o=i.getLayout().value;n.value=o}return n},e.type="series.sankey",e.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},e}(vt),Jf=Kf;function Qf(a,e){a.eachSeriesByType("sankey",function(t){var r=t.get("nodeWidth"),n=t.get("nodeGap"),i=jf(t,e);t.layoutInfo=i;var o=i.width,s=i.height,l=t.getGraph(),u=l.nodes,v=l.edges;eh(u);var c=At(u,function(p){return p.getLayout().value===0}),f=c.length!==0?0:t.get("layoutIterations"),h=t.get("orient"),d=t.get("nodeAlign");th(u,v,r,n,o,s,f,h,d)})}function jf(a,e){return ye(a.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function th(a,e,t,r,n,i,o,s,l){ah(a,e,t,n,i,s,l),oh(a,e,i,n,r,o,s),dh(a,s)}function eh(a){N(a,function(e){var t=Xt(e.outEdges,ca),r=Xt(e.inEdges,ca),n=e.getValue()||0,i=Math.max(t,r,n);e.setLayout({value:i},!0)})}function ah(a,e,t,r,n,i,o){for(var s=[],l=[],u=[],v=[],c=0,f=0;f<e.length;f++)s[f]=1;for(var f=0;f<a.length;f++)l[f]=a[f].inEdges.length,l[f]===0&&u.push(a[f]);for(var h=-1;u.length;){for(var d=0;d<u.length;d++){var p=u[d],g=p.hostGraph.data.getRawDataItem(p.dataIndex),m=g.depth!=null&&g.depth>=0;m&&g.depth>h&&(h=g.depth),p.setLayout({depth:m?g.depth:c},!0),i==="vertical"?p.setLayout({dy:t},!0):p.setLayout({dx:t},!0);for(var S=0;S<p.outEdges.length;S++){var y=p.outEdges[S],b=e.indexOf(y);s[b]=0;var x=y.node2,_=a.indexOf(x);--l[_]===0&&v.indexOf(x)<0&&v.push(x)}}++c,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 w=h>c-1?h:c-1;o&&o!=="left"&&rh(a,o,i,w);var I=i==="vertical"?(n-t)/w:(r-t)/w;ih(a,I,i)}function gs(a){var e=a.hostGraph.data.getRawDataItem(a.dataIndex);return e.depth!=null&&e.depth>=0}function rh(a,e,t,r){if(e==="right"){for(var n=[],i=a,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}N(a,function(c){gs(c)||c.setLayout({depth:Math.max(0,r-c.getLayout().skNodeHeight)},!0)})}else e==="justify"&&nh(a,r)}function nh(a,e){N(a,function(t){!gs(t)&&!t.outEdges.length&&t.setLayout({depth:e},!0)})}function ih(a,e,t){N(a,function(r){var n=r.getLayout().depth*e;t==="vertical"?r.setLayout({y:n},!0):r.setLayout({x:n},!0)})}function oh(a,e,t,r,n,i,o){var s=sh(a,o);lh(s,e,t,r,n,o),ja(s,n,t,r,o);for(var l=1;i>0;i--)l*=.99,uh(s,l,o),ja(s,n,t,r,o),ph(s,l,o),ja(s,n,t,r,o)}function sh(a,e){var t=[],r=e==="vertical"?"y":"x",n=_r(a,function(i){return i.getLayout()[r]});return n.keys.sort(function(i,o){return i-o}),N(n.keys,function(i){t.push(n.buckets.get(i))}),t}function lh(a,e,t,r,n,i){var o=1/0;N(a,function(s){var l=s.length,u=0;N(s,function(c){u+=c.getLayout().value});var v=i==="vertical"?(r-(l-1)*n)/u:(t-(l-1)*n)/u;v<o&&(o=v)}),N(a,function(s){N(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))})}),N(e,function(s){var l=+s.getValue()*o;s.setLayout({dy:l},!0)})}function ja(a,e,t,r,n){var i=n==="vertical"?"x":"y";N(a,function(o){o.sort(function(p,g){return p.getLayout()[i]-g.getLayout()[i]});for(var s,l,u,v=0,c=o.length,f=n==="vertical"?"dx":"dy",h=0;h<c;h++)l=o[h],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"?r: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 h=c-2;h>=0;--h)l=o[h],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 uh(a,e,t){N(a.slice().reverse(),function(r){N(r,function(n){if(n.outEdges.length){var i=Xt(n.outEdges,vh,t)/Xt(n.outEdges,ca);if(isNaN(i)){var o=n.outEdges.length;i=o?Xt(n.outEdges,ch,t)/o:0}if(t==="vertical"){var s=n.getLayout().x+(i-Kt(n,t))*e;n.setLayout({x:s},!0)}else{var l=n.getLayout().y+(i-Kt(n,t))*e;n.setLayout({y:l},!0)}}})})}function vh(a,e){return Kt(a.node2,e)*a.getValue()}function ch(a,e){return Kt(a.node2,e)}function fh(a,e){return Kt(a.node1,e)*a.getValue()}function hh(a,e){return Kt(a.node1,e)}function Kt(a,e){return e==="vertical"?a.getLayout().x+a.getLayout().dx/2:a.getLayout().y+a.getLayout().dy/2}function ca(a){return a.getValue()}function Xt(a,e,t){for(var r=0,n=a.length,i=-1;++i<n;){var o=+e(a[i],t);isNaN(o)||(r+=o)}return r}function ph(a,e,t){N(a,function(r){N(r,function(n){if(n.inEdges.length){var i=Xt(n.inEdges,fh,t)/Xt(n.inEdges,ca);if(isNaN(i)){var o=n.inEdges.length;i=o?Xt(n.inEdges,hh,t)/o:0}if(t==="vertical"){var s=n.getLayout().x+(i-Kt(n,t))*e;n.setLayout({x:s},!0)}else{var l=n.getLayout().y+(i-Kt(n,t))*e;n.setLayout({y:l},!0)}}})})}function dh(a,e){var t=e==="vertical"?"x":"y";N(a,function(r){r.outEdges.sort(function(n,i){return n.node2.getLayout()[t]-i.node2.getLayout()[t]}),r.inEdges.sort(function(n,i){return n.node1.getLayout()[t]-i.node1.getLayout()[t]})}),N(a,function(r){var n=0,i=0;N(r.outEdges,function(o){o.setLayout({sy:n},!0),n+=o.getLayout().dy}),N(r.inEdges,function(o){o.setLayout({ty:i},!0),i+=o.getLayout().dy})})}function gh(a){a.eachSeriesByType("sankey",function(e){var t=e.getGraph(),r=t.nodes;if(r.length){var n=1/0,i=-1/0;N(r,function(o){var s=o.getLayout().value;s<n&&(n=s),s>i&&(i=s)}),N(r,function(o){var s=new Po({type:"color",mappingMethod:"linear",dataExtent:[n,i],visual:e.get("color")}),l=s.mapValueToVisual(o.getLayout().value),u=o.getModel().get(["itemStyle","color"]);u!=null?(o.setVisual("color",u),o.setVisual("style",{fill:u})):(o.setVisual("color",l),o.setVisual("style",{fill:l}))})}})}function yh(a){a.registerChartView(qf),a.registerSeriesModel(Jf),a.registerLayout(Qf),a.registerVisual(gh),a.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(r){r.setNodePosition(e.dataIndex,[e.localX,e.localY])})})}var ys=function(){function a(){}return a.prototype.getInitialData=function(e,t){var r,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",r=n.getOrdinalMeta(),l=!0):s==="category"?(e.layout="vertical",r=i.getOrdinalMeta(),l=!0):e.layout=e.layout||"horizontal";var u=["x","y"],v=e.layout==="horizontal"?0:1,c=this._baseAxisDim=u[v],f=u[1-v],h=[n,i],d=h[v].get("type"),p=h[1-v].get("type"),g=e.data;if(g&&l){var m=[];N(g,function(b,x){var _;W(b)?(_=b.slice(),b.unshift(x)):W(b.value)?(_=U({},b),_.value=_.value.slice(),b.value.unshift(x)):_=b,m.push(_)}),e.data=m}var S=this.defaultValueDimensions,y=[{name:c,type:xr(d),ordinalMeta:r,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:f,type:xr(p),dimsDef:S.slice()}];return Jr(this,{coordDimensions:y,dimensionsCount:S.length+1,encodeDefaulter:tt(Cl,y,this)})},a.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},a}(),ms=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],t.visualDrawType="stroke",t}return e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},e}(vt);me(ms,ys,!0);var mh=ms,Sh=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,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),c=Ii(v,i,u,l,!0);i.setItemGraphicEl(u,c),o.add(c)}}).update(function(u,v){var c=s.getItemGraphicEl(v);if(!i.hasValue(u)){o.remove(c);return}var f=i.getItemLayout(u);c?(Se(c),Ss(f,c,i,u)):c=Ii(f,i,u,l),o.add(c),i.setItemGraphicEl(u,c)}).remove(function(u){var v=s.getItemGraphicEl(u);v&&o.remove(v)}).execute(),this._data=i},e.prototype.remove=function(t){var r=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl(function(i){i&&r.remove(i)})},e.type="boxplot",e}(ut),bh=function(){function a(){}return a}(),_h=function(a){B(e,a);function e(t){var r=a.call(this,t)||this;return r.type="boxplotBoxPath",r}return e.prototype.getDefaultShape=function(){return new bh},e.prototype.buildPath=function(t,r){var n=r.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}(dt);function Ii(a,e,t,r,n){var i=a.ends,o=new _h({shape:{points:n?xh(i,r,a):i}});return Ss(a,o,e,t,n),o}function Ss(a,e,t,r,n){var i=t.hostModel,o=Ml[n?"initProps":"updateProps"];o(e,{shape:{points:a.ends}},i,r),e.useStyle(t.getItemVisual(r,"style")),e.style.strokeNoScale=!0,e.z2=100;var s=t.getItemModel(r),l=s.getModel("emphasis");Tt(e,s),lt(e,l.get("focus"),l.get("blurScope"),l.get("disabled"))}function xh(a,e,t){return H(a,function(r){return r=r.slice(),r[e]=t.initBaseline,r})}var wh=Sh;function Ih(a,e){}var Te=N;function Ah(a){var e=Lh(a);Te(e,function(t){var r=t.seriesModels;!r.length||(Dh(t),Te(r,function(n,i){Th(n,t.boxOffsetList[i],t.boxWidthList[i])}))})}function Lh(a){var e=[],t=[];return a.eachSeriesByType("boxplot",function(r){var n=r.getBaseAxis(),i=_t(t,n);i<0&&(i=t.length,t[i]=n,e[i]={axis:n,seriesModels:[]}),e[i].seriesModels.push(r)}),e}function Dh(a){var e=a.axis,t=a.seriesModels,r=t.length,n=a.boxWidthList=[],i=a.boxOffsetList=[],o=[],s;if(e.type==="category")s=e.getBandWidth();else{var l=0;Te(t,function(d){l=Math.max(l,d.getData().count())});var u=e.getExtent();s=Math.abs(u[1]-u[0])/l}Te(t,function(d){var p=d.get("boxWidth");W(p)||(p=[p,p]),o.push([O(p[0],s)||0,O(p[1],s)||0])});var v=s*.8-2,c=v/r*.3,f=(v-c*(r-1))/r,h=f/2-v/2;Te(t,function(d,p){i.push(h),h+=c+f,n.push(Math.min(Math.max(f,o[p][0]),o[p][1]))})}function Th(a,e,t){var r=a.coordinateSystem,n=a.getData(),i=t/2,o=a.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 c=0;c<n.count();c++){var f=n.get(u,c),h=y(f,v[2],c),d=y(f,v[0],c),p=y(f,v[1],c),g=y(f,v[3],c),m=y(f,v[4],c),S=[];b(S,p,!1),b(S,g,!0),S.push(d,p,m,g),x(S,d),x(S,m),x(S,h),n.setItemLayout(c,{initBaseline:h[s],ends:S})}function y(_,w,I){var L=n.get(w,I),A=[];A[o]=_,A[s]=L;var D;return isNaN(_)||isNaN(L)?D=[NaN,NaN]:(D=r.dataToPoint(A),D[o]+=e),D}function b(_,w,I){var L=w.slice(),A=w.slice();L[o]+=i,A[o]-=i,I?_.push(L,A):_.push(A,L)}function x(_,w){var I=w.slice(),L=w.slice();I[o]-=i,L[o]+=i,_.push(I,L)}}function Ch(a,e){e=e||{};for(var t=[],r=[],n=e.boundIQR,i=n==="none"||n===0,o=0;o<a.length;o++){var s=wr(a[o].slice()),l=Ea(s,.25),u=Ea(s,.5),v=Ea(s,.75),c=s[0],f=s[s.length-1],h=(n==null?1.5:n)*(v-l),d=i?c:Math.max(c,l-h),p=i?f:Math.min(f,v+h),g=e.itemNameFormatter,m=nt(g)?g({value:o}):yt(g)?g.replace("{value}",o+""):o+"";t.push([m,d,l,u,v,p]);for(var S=0;S<s.length;S++){var y=s[S];if(y<d||y>p){var b=[m,y];r.push(b)}}}return{boxData:t,outliers:r}}var Mh={type:"echarts:boxplot",transform:function(e){var t=e.upstream;if(t.sourceFormat!==Go){var r="";j(r)}var n=Ch(t.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:n.boxData},{data:n.outliers}]}};function Ph(a){a.registerSeriesModel(mh),a.registerChartView(wh),a.registerVisual(Ih),a.registerLayout(Ah),a.registerTransform(Mh)}var Eh=["color","borderColor"],Nh=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,n){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,r,n){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,r,n,i){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,r):this._incrementalRenderNormal(t,r)},e.prototype.eachRendered=function(t){Ia(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var r=t.pipelineContext.large;(this._isLargeDraw==null||r!==this._isLargeDraw)&&(this._isLargeDraw=r,this._clear())},e.prototype._renderNormal=function(t){var r=t.getData(),n=this._data,i=this.group,o=r.getLayout("isSimpleBox"),s=t.get("clip",!0),l=t.coordinateSystem,u=l.getArea&&l.getArea();this._data||i.removeAll(),r.diff(n).add(function(v){if(r.hasValue(v)){var c=r.getItemLayout(v);if(s&&Ai(u,c))return;var f=tr(c,v,!0);Dt(f,{shape:{points:c.ends}},t,v),er(f,r,v,o),i.add(f),r.setItemGraphicEl(v,f)}}).update(function(v,c){var f=n.getItemGraphicEl(c);if(!r.hasValue(v)){i.remove(f);return}var h=r.getItemLayout(v);if(s&&Ai(u,h)){i.remove(f);return}f?(it(f,{shape:{points:h.ends}},t,v),Se(f)):f=tr(h),er(f,r,v,o),i.add(f),r.setItemGraphicEl(v,f)}).remove(function(v){var c=n.getItemGraphicEl(v);c&&i.remove(c)}).execute(),this._data=r},e.prototype._renderLarge=function(t){this._clear(),Di(t,this.group);var r=t.get("clip",!0)?tn(t.coordinateSystem,!1,t):null;r?this.group.setClipPath(r):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,r){for(var n=r.getData(),i=n.getLayout("isSimpleBox"),o;(o=t.next())!=null;){var s=n.getItemLayout(o),l=tr(s);er(l,n,o,i),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},e.prototype._incrementalRenderLarge=function(t,r){Di(r,this.group,this._progressiveEls,!0)},e.prototype.remove=function(t){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(ut),Rh=function(){function a(){}return a}(),kh=function(a){B(e,a);function e(t){var r=a.call(this,t)||this;return r.type="normalCandlestickBox",r}return e.prototype.getDefaultShape=function(){return new Rh},e.prototype.buildPath=function(t,r){var n=r.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}(dt);function tr(a,e,t){var r=a.ends;return new kh({shape:{points:t?Vh(r,a):r},z2:100})}function Ai(a,e){for(var t=!0,r=0;r<e.ends.length;r++)if(a.contain(e.ends[r][0],e.ends[r][1])){t=!1;break}return t}function er(a,e,t,r){var n=e.getItemModel(t);a.useStyle(e.getItemVisual(t,"style")),a.style.strokeNoScale=!0,a.__simpleBox=r,Tt(a,n)}function Vh(a,e){return H(a,function(t){return t=t.slice(),t[1]=e.initBaseline,t})}var Bh=function(){function a(){}return a}(),Li=function(a){B(e,a);function e(t){var r=a.call(this,t)||this;return r.type="largeCandlestickBox",r}return e.prototype.getDefaultShape=function(){return new Bh},e.prototype.buildPath=function(t,r){for(var n=r.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}(dt);function Di(a,e,t,r){var n=a.getData(),i=n.getLayout("largePoints"),o=new Li({shape:{points:i},__sign:1,ignoreCoarsePointer:!0});e.add(o);var s=new Li({shape:{points:i},__sign:-1,ignoreCoarsePointer:!0});e.add(s),Ti(1,o,a),Ti(-1,s,a),r&&(o.incremental=!0,s.incremental=!0),t&&t.push(o,s)}function Ti(a,e,t,r){var n=t.get(["itemStyle",a>0?"borderColor":"borderColor0"])||t.get(["itemStyle",a>0?"color":"color0"]),i=t.getModel("itemStyle").getItemStyle(Eh);e.useStyle(i),e.style.fill=null,e.style.stroke=n}var Gh=Nh,bs=function(a){B(e,a);function e(){var t=a!==null&&a.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,r,n){var i=r.getItemLayout(t);return i&&n.rect(i.brushRect)},e.type="series.candlestick",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},e}(vt);me(bs,ys,!0);var Oh=bs;function zh(a){!a||!W(a.series)||N(a.series,function(e){en(e)&&e.type==="k"&&(e.type="candlestick")})}var Fh=["itemStyle","borderColor"],Hh=["itemStyle","borderColor0"],Wh=["itemStyle","color"],Uh=["itemStyle","color0"],$h={seriesType:"candlestick",plan:an(),performRawSeries:!0,reset:function(a,e){function t(i,o){return o.get(i>0?Wh:Uh)}function r(i,o){return o.get(i>0?Fh:Hh)}if(!e.isSeriesFiltered(a)){var n=a.pipelineContext.large;return!n&&{progress:function(i,o){for(var s;(s=i.next())!=null;){var l=o.getItemModel(s),u=o.getItemLayout(s).sign,v=l.getItemStyle();v.fill=t(u,l),v.stroke=r(u,l)||v.fill;var c=o.ensureUniqueItemVisual(s,"style");U(c,v)}}}}}},Zh=$h,Xh={seriesType:"candlestick",plan:an(),reset:function(a){var e=a.coordinateSystem,t=a.getData(),r=Yh(a,t),n=0,i=1,o=["x","y"],s=t.getDimensionIndex(t.mapDimension(o[n])),l=H(t.mapDimensionsAll(o[i]),t.getDimensionIndex,t),u=l[0],v=l[1],c=l[2],f=l[3];if(t.setLayout({candleWidth:r,isSimpleBox:r<=1.3}),s<0||l.length<4)return;return{progress:a.pipelineContext.large?d:h};function h(p,g){for(var m,S=g.getStore();(m=p.next())!=null;){var y=S.get(s,m),b=S.get(u,m),x=S.get(v,m),_=S.get(c,m),w=S.get(f,m),I=Math.min(b,x),L=Math.max(b,x),A=M(I,y),D=M(L,y),C=M(_,y),P=M(w,y),T=[];E(T,D,0),E(T,A,1),T.push(k(P),k(D),k(C),k(A)),g.setItemLayout(m,{sign:Ci(S,m,b,x,v),initBaseline:b>x?D[i]:A[i],ends:T,brushRect:R(_,w,y)})}function M(V,G){var z=[];return z[n]=G,z[i]=V,isNaN(G)||isNaN(V)?[NaN,NaN]:e.dataToPoint(z)}function E(V,G,z){var X=G.slice(),Y=G.slice();X[n]=Na(X[n]+r/2,1,!1),Y[n]=Na(Y[n]-r/2,1,!0),z?V.push(X,Y):V.push(Y,X)}function R(V,G,z){var X=M(V,z),Y=M(G,z);return X[n]-=r/2,Y[n]-=r/2,{x:X[0],y:X[1],width:r,height:Y[1]-X[1]}}function k(V){return V[n]=Na(V[n],1),V}}function d(p,g){for(var m=Pl(p.count*4),S=0,y,b=[],x=[],_,w=g.getStore();(_=p.next())!=null;){var I=w.get(s,_),L=w.get(u,_),A=w.get(v,_),D=w.get(c,_),C=w.get(f,_);if(isNaN(I)||isNaN(D)||isNaN(C)){m[S++]=NaN,S+=3;continue}m[S++]=Ci(w,_,L,A,v),b[n]=I,b[i]=D,y=e.dataToPoint(b,null,x),m[S++]=y?y[0]:NaN,m[S++]=y?y[1]:NaN,b[i]=C,y=e.dataToPoint(b,null,x),m[S++]=y?y[1]:NaN}g.setLayout("largePoints",m)}}};function Ci(a,e,t,r,n){var i;return t>r?i=-1:t<r?i=1:i=e>0?a.get(n,e-1)<=r?1:-1:1,i}function Yh(a,e){var t=a.getBaseAxis(),r,n=t.type==="category"?t.getBandWidth():(r=t.getExtent(),Math.abs(r[1]-r[0])/e.count()),i=O(Ht(a.get("barMaxWidth"),n),n),o=O(Ht(a.get("barMinWidth"),1),n),s=a.get("barWidth");return s!=null?O(s,n):Math.max(Math.min(n/2,i),o)}var qh=Xh;function Kh(a){a.registerChartView(Gh),a.registerSeriesModel(Oh),a.registerPreprocessor(zh),a.registerVisual(Zh),a.registerLayout(qh)}function Mi(a,e){var t=e.rippleEffectColor||e.color;a.eachChild(function(r){r.attr({z:e.z,zlevel:e.zlevel,style:{stroke:e.brushType==="stroke"?t:null,fill:e.brushType==="fill"?t:null}})})}var Jh=function(a){B(e,a);function e(t,r){var n=a.call(this)||this,i=new Lo(t,r),o=new at;return n.add(i),n.add(o),n.updateData(t,r),n}return e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var r=t.symbolType,n=t.color,i=t.rippleNumber,o=this.childAt(1),s=0;s<i;s++){var l=Ne(r,-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)}Mi(o,t)},e.prototype.updateEffectAnimation=function(t){for(var r=this._effectCfg,n=this.childAt(1),i=["symbolType","period","rippleScale","rippleNumber"],o=0;o<i.length;o++){var s=i[o];if(r[s]!==t[s]){this.stopEffectAnimation(),this.startEffectAnimation(t);return}}Mi(n,t)},e.prototype.highlight=function(){$r(this)},e.prototype.downplay=function(){Zr(this)},e.prototype.getSymbolType=function(){var t=this.childAt(0);return t&&t.getSymbolType()},e.prototype.updateData=function(t,r){var n=this,i=t.hostModel;this.childAt(0).updateData(t,r);var o=this.childAt(1),s=t.getItemModel(r),l=t.getItemVisual(r,"symbol"),u=No(t.getItemVisual(r,"symbolSize")),v=t.getItemVisual(r,"style"),c=v&&v.fill,f=s.getModel("emphasis");o.setScale(u),o.traverse(function(g){g.setStyle("fill",c)});var h=Ro(t.getItemVisual(r,"symbolOffset"),u);h&&(o.x=h[0],o.y=h[1]);var d=t.getItemVisual(r,"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=r/t.count(),p.z=i.getShallow("z")||0,p.zlevel=i.getShallow("zlevel")||0,p.symbolType=l,p.color=c,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,lt(this,f.get("focus"),f.get("blurScope"),f.get("disabled"))},e.prototype.fadeOut=function(t){t&&t()},e}(at),Qh=Jh,jh=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this._symbolDraw=new Xr(Qh)},e.prototype.render=function(t,r,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 r=t.coordinateSystem,n=r&&r.getArea&&r.getArea();return t.get("clip",!0)?n:null},e.prototype.updateTransform=function(t,r,n){var i=t.getData();this.group.dirty();var o=Oo("").reset(t,r,n);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout()},e.prototype._updateGroupTransform=function(t){var r=t.coordinateSystem;r&&r.getRoamTransform&&(this.group.transform=El(r.getRoamTransform()),this.group.decomposeTransform())},e.prototype.remove=function(t,r){this._symbolDraw&&this._symbolDraw.remove(!0)},e.type="effectScatter",e}(ut),tp=jh,ep=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t,r){return He(null,this,{useEncodeDefaulter:!0})},e.prototype.brushSelector=function(t,r,n){return n.point(r.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}(vt),ap=ep;function rp(a){a.registerChartView(tp),a.registerSeriesModel(ap),a.registerLayout(Oo("effectScatter"))}var np=function(a){B(e,a);function e(t,r,n){var i=a.call(this)||this;return i.add(i.createLine(t,r,n)),i._updateEffectSymbol(t,r),i}return e.prototype.createLine=function(t,r,n){return new dn(t,r,n)},e.prototype._updateEffectSymbol=function(t,r){var n=t.getItemModel(r),i=n.getModel("effect"),o=i.get("symbolSize"),s=i.get("symbol");W(o)||(o=[o,o]);var l=t.getItemVisual(r,"style"),u=i.get("color")||l&&l.stroke,v=this.childAt(1);this._symbolType!==s&&(this.remove(v),v=Ne(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,r))},e.prototype._updateEffectAnimation=function(t,r,n){var i=this.childAt(1);if(!!i){var o=t.getItemLayout(n),s=r.get("period")*1e3,l=r.get("loop"),u=r.get("roundTrip"),v=r.get("constantSpeed"),c=Et(r.get("delay"),function(h){return h/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(c)?f=c(n):f=c,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,r,n,i,o){if(r>0){t.__t=0;var s=this,l=t.animate("",i).when(o?r*2:r,{__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 Ie(t.__p1,t.__cp1)+Ie(t.__cp1,t.__p2)},e.prototype._updateAnimationPoints=function(t,r){t.__p1=r[0],t.__p2=r[1],t.__cp1=r[2]||[(r[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2]},e.prototype.updateData=function(t,r,n){this.childAt(0).updateData(t,r,n),this._updateEffectSymbol(t,r)},e.prototype._updateSymbolPosition=function(t){var r=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=ko,v=Nl;s[0]=u(r[0],i[0],n[0],o),s[1]=u(r[1],i[1],n[1],o);var c=t.__t<1?v(r[0],i[0],n[0],o):v(n[0],i[0],r[0],1-o),f=t.__t<1?v(r[1],i[1],n[1],o):v(n[1],i[1],r[1],1-o);t.rotation=-Math.atan2(f,c)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(t.__lastT!==void 0&&t.__lastT<t.__t?(t.scaleY=Ie(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*Ie(r,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,r){this.childAt(0).updateLayout(t,r);var n=t.getItemModel(r).getModel("effect");this._updateEffectAnimation(t,n,r)},e}(at),_s=np,ip=function(a){B(e,a);function e(t,r,n){var i=a.call(this)||this;return i._createPolyline(t,r,n),i}return e.prototype._createPolyline=function(t,r,n){var i=t.getItemLayout(r),o=new Qr({shape:{points:i}});this.add(o),this._updateCommonStl(t,r,n)},e.prototype.updateData=function(t,r,n){var i=t.hostModel,o=this.childAt(0),s={shape:{points:t.getItemLayout(r)}};it(o,s,i,r),this._updateCommonStl(t,r,n)},e.prototype._updateCommonStl=function(t,r,n){var i=this.childAt(0),o=t.getItemModel(r),s=n&&n.emphasisLineStyle,l=n&&n.focus,u=n&&n.blurScope,v=n&&n.emphasisDisabled;if(!n||t.hasItemOption){var c=o.getModel("emphasis");s=c.getModel("lineStyle").getLineStyle(),v=c.get("disabled"),l=c.get("focus"),u=c.get("blurScope")}i.useStyle(t.getItemVisual(r,"style")),i.style.fill=null,i.style.strokeNoScale=!0;var f=i.ensureState("emphasis");f.style=s,lt(this,l,u,v)},e.prototype.updateLayout=function(t,r){var n=this.childAt(0);n.setShape("points",t.getItemLayout(r))},e}(at),xs=ip,op=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t._lastFrame=0,t._lastFramePercent=0,t}return e.prototype.createLine=function(t,r,n){return new xs(t,r,n)},e.prototype._updateAnimationPoints=function(t,r){this._points=r;for(var n=[0],i=0,o=1;o<r.length;o++){var s=r[o-1],l=r[o];i+=Ie(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 r=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(r<this._lastFramePercent){var u=Math.min(s+1,o-1);for(l=u;l>=0&&!(i[l]<=r);l--);l=Math.min(l,o-2)}else{for(l=s;l<o&&!(i[l]>r);l++);l=Math.min(l-1,o-2)}var v=(r-i[l])/(i[l+1]-i[l]),c=n[l],f=n[l+1];t.x=c[0]*(1-v)+v*f[0],t.y=c[1]*(1-v)+v*f[1];var h=t.__t<1?f[0]-c[0]:c[0]-f[0],d=t.__t<1?f[1]-c[1]:c[1]-f[1];t.rotation=-Math.atan2(d,h)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=r,t.ignore=!1}},e}(_s),sp=op,lp=function(){function a(){this.polyline=!1,this.curveness=0,this.segs=[]}return a}(),up=function(a){B(e,a);function e(t){var r=a.call(this,t)||this;return r._off=0,r.hoverDataIdx=-1,r}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 lp},e.prototype.buildPath=function(t,r){var n=r.segs,i=r.curveness,o;if(r.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++],c=n[o++],f=n[o++];if(t.moveTo(u,v),i>0){var h=(u+c)/2-(v-f)*i,d=(v+f)/2-(c-u)*i;t.quadraticCurveTo(h,d,c,f)}else t.lineTo(c,f)}this.incremental&&(this._off=o,this.notClear=!0)},e.prototype.findDataIndex=function(t,r){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 c=i[u++],f=i[u++],h=1;h<v;h++){var d=i[u++],p=i[u++];if(Wn(c,f,d,p,s,t,r))return l}l++}else for(var l=0,u=0;u<i.length;){var c=i[u++],f=i[u++],d=i[u++],p=i[u++];if(o>0){var g=(c+d)/2-(f-p)*o,m=(f+p)/2-(d-c)*o;if(Rl(c,f,g,m,d,p,s,t,r))return l}else if(Wn(c,f,d,p,s,t,r))return l;l++}return-1},e.prototype.contain=function(t,r){var n=this.transformCoordToLocal(t,r),i=this.getBoundingRect();if(t=n[0],r=n[1],i.contain(t,r)){var o=this.hoverDataIdx=this.findDataIndex(t,r);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var r=this.shape,n=r.segs,i=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u<n.length;){var v=n[u++],c=n[u++];i=Math.min(v,i),s=Math.max(v,s),o=Math.min(c,o),l=Math.max(c,l)}t=this._rect=new ht(i,o,s,l)}return t},e}(dt),vp=function(){function a(){this.group=new at}return a.prototype.updateData=function(e){this._clear();var t=this._create();t.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(t,e)},a.prototype.incrementalPrepareUpdate=function(e){this.group.removeAll(),this._clear()},a.prototype.incrementalUpdate=function(e,t){var r=this._newAdded[0],n=t.getLayout("linesPoints"),i=r&&r.shape.segs;if(i&&i.length<2e4){var o=i.length,s=new Float32Array(o+n.length);s.set(i),s.set(n,o),r.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}},a.prototype.remove=function(){this._clear()},a.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},a.prototype._create=function(){var e=new up({cursor:"default",ignoreCoarsePointer:!0});return this._newAdded.push(e),this.group.add(e),e},a.prototype._setCommon=function(e,t,r){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=et(e);o.seriesIndex=n.seriesIndex,e.on("mousemove",function(s){o.dataIndex=null;var l=e.hoverDataIdx;l>0&&(o.dataIndex=l+e.__startIndex)})},a.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},a}(),cp=vp,fp={seriesType:"lines",plan:an(),reset:function(a){var e=a.coordinateSystem;if(!!e){var t=a.get("polyline"),r=a.pipelineContext.large;return{progress:function(n,i){var o=[];if(r){var s=void 0,l=n.end-n.start;if(t){for(var u=0,v=n.start;v<n.end;v++)u+=a.getLineCoordsCount(v);s=new Float32Array(l+u*2)}else s=new Float32Array(l*4);for(var c=0,f=[],v=n.start;v<n.end;v++){var h=a.getLineCoords(v,o);t&&(s[c++]=h);for(var d=0;d<h;d++)f=e.dataToPoint(o[d],!1,f),s[c++]=f[0],s[c++]=f[1]}i.setLayout("linesPoints",s)}else for(var v=n.start;v<n.end;v++){var p=i.getItemModel(v),h=a.getLineCoords(v,o),g=[];if(t)for(var m=0;m<h;m++)g.push(e.dataToPoint(o[m]));else{g[0]=e.dataToPoint(o[0]),g[1]=e.dataToPoint(o[1]);var S=p.get(["lineStyle","curveness"]);+S&&(g[2]=[(g[0][0]+g[1][0])/2-(g[0][1]-g[1][1])*S,(g[0][1]+g[1][1])/2-(g[1][0]-g[0][0])*S])}i.setItemLayout(v,g)}}}}}},ws=fp,hp=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,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 c=t.get("clip",!0)&&tn(t.coordinateSystem,!1,t);c?this.group.setClipPath(c):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},e.prototype.incrementalPrepareRender=function(t,r,n){var i=t.getData(),o=this._updateLineDraw(i,t);o.incrementalPrepareUpdate(i),this._clearLayer(n),this._finished=!1},e.prototype.incrementalRender=function(t,r,n){this._lineDraw.incrementalUpdate(t,r.getData()),this._finished=t.end===r.getData().count()},e.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},e.prototype.updateTransform=function(t,r,n){var i=t.getData(),o=t.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=ws.reset(t,r,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,r){var n=this._lineDraw,i=this._showEffect(r),o=!!r.get("polyline"),s=r.pipelineContext,l=s.large;return(!n||i!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(n&&n.remove(),n=this._lineDraw=l?new cp:new gn(o?i?sp:xs:i?_s:dn),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 r=t.getZr(),n=r.painter.getType()==="svg";!n&&this._lastZlevel!=null&&r.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(t,r){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(r)},e.prototype.dispose=function(t,r){this.remove(t,r)},e.type="lines",e}(ut),pp=hp,dp=typeof Uint32Array=="undefined"?Array:Uint32Array,gp=typeof Float64Array=="undefined"?Array:Float64Array;function Pi(a){var e=a.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(a.data=H(e,function(t){var r=[t[0].coord,t[1].coord],n={coords:r};return t[0].name&&(n.fromName=t[0].name),t[1].name&&(n.toName=t[1].name),zo([n,t[0],t[1]])}))}var yp=function(a){B(e,a);function e(){var t=a!==null&&a.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||[],Pi(t);var r=this._processFlatCoordsArray(t.data);this._flatCoords=r.flatCoords,this._flatCoordsOffset=r.flatCoordsOffset,r.flatCoords&&(t.data=new Float32Array(r.count)),a.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(t){if(Pi(t),t.data){var r=this._processFlatCoordsArray(t.data);this._flatCoords=r.flatCoords,this._flatCoordsOffset=r.flatCoordsOffset,r.flatCoords&&(t.data=new Float32Array(r.count))}a.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(t){var r=this._processFlatCoordsArray(t.data);r.flatCoords&&(this._flatCoords?(this._flatCoords=gr(this._flatCoords,r.flatCoords),this._flatCoordsOffset=gr(this._flatCoordsOffset,r.flatCoordsOffset)):(this._flatCoords=r.flatCoords,this._flatCoordsOffset=r.flatCoordsOffset),t.data=new Float32Array(r.count)),this.getRawData().appendData(t.data)},e.prototype._getCoordsFromItemModel=function(t){var r=this.getData().getItemModel(t),n=r.option instanceof Array?r.option:r.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,r){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[t*2],i=this._flatCoordsOffset[t*2+1],o=0;o<i;o++)r[o]=r[o]||[],r[o][0]=this._flatCoords[n+o*2],r[o][1]=this._flatCoords[n+o*2+1];return i}else{for(var s=this._getCoordsFromItemModel(t),o=0;o<s.length;o++)r[o]=r[o]||[],r[o][0]=s[o][0],r[o][1]=s[o][1];return s.length}},e.prototype._processFlatCoordsArray=function(t){var r=0;if(this._flatCoords&&(r=this._flatCoords.length),zt(t[0])){for(var n=t.length,i=new dp(n),o=new gp(n),s=0,l=0,u=0,v=0;v<n;){u++;var c=t[v++];i[l++]=s+r,i[l++]=c;for(var f=0;f<c;f++){var h=t[v++],d=t[v++];o[s++]=h,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,r){var n=new St(["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,r,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),Gt("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"),r=t.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:t.get("show")&&r>0?r+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e}(vt),mp=yp;function Qe(a){return a instanceof Array||(a=[a,a]),a}var Sp={seriesType:"lines",reset:function(a){var e=Qe(a.get("symbol")),t=Qe(a.get("symbolSize")),r=a.getData();r.setVisual("fromSymbol",e&&e[0]),r.setVisual("toSymbol",e&&e[1]),r.setVisual("fromSymbolSize",t&&t[0]),r.setVisual("toSymbolSize",t&&t[1]);function n(i,o){var s=i.getItemModel(o),l=Qe(s.getShallow("symbol",!0)),u=Qe(s.getShallow("symbolSize",!0));l[0]&&i.setItemVisual(o,"fromSymbol",l[0]),l[1]&&i.setItemVisual(o,"toSymbol",l[1]),u[0]&&i.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&i.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:r.hasItemOption?n:null}}},bp=Sp;function _p(a){a.registerChartView(pp),a.registerSeriesModel(mp),a.registerLayout(ws),a.registerVisual(bp)}var xp=256,wp=function(){function a(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=Ir.createCanvas();this.canvas=e}return a.prototype.update=function(e,t,r,n,i,o){var s=this._getBrush(),l=this._getGradient(i,"inRange"),u=this._getGradient(i,"outOfRange"),v=this.pointSize+this.blurSize,c=this.canvas,f=c.getContext("2d"),h=e.length;c.width=t,c.height=r;for(var d=0;d<h;++d){var p=e[d],g=p[0],m=p[1],S=p[2],y=n(S);f.globalAlpha=y,f.drawImage(s,g-v,m-v)}if(!c.width||!c.height)return c;for(var b=f.getImageData(0,0,c.width,c.height),x=b.data,_=0,w=x.length,I=this.minOpacity,L=this.maxOpacity,A=L-I;_<w;){var y=x[_+3]/256,D=Math.floor(y*(xp-1))*4;if(y>0){var C=o(y)?l:u;y>0&&(y=y*A+I),x[_++]=C[D],x[_++]=C[D+1],x[_++]=C[D+2],x[_++]=C[D+3]*y*256}else _+=4}return f.putImageData(b,0,0),c},a.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=Ir.createCanvas()),t=this.pointSize+this.blurSize,r=t*2;e.width=r,e.height=r;var n=e.getContext("2d");return n.clearRect(0,0,r,r),n.shadowOffsetX=r,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},a.prototype._getGradient=function(e,t){for(var r=this._gradientPixels,n=r[t]||(r[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},a}(),Ip=wp;function Ap(a,e,t){var r=a[1]-a[0];e=H(e,function(o){return{interval:[(o.interval[0]-a[0])/r,(o.interval[1]-a[0])/r]}});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 Lp(a,e){var t=a[1]-a[0];return e=[(e[0]-a[0])/t,(e[1]-a[0])/t],function(r){return r>=e[0]&&r<=e[1]}}function Ei(a){var e=a.dimensions;return e[0]==="lng"&&e[1]==="lat"}var Dp=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,n){var i;r.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()):Ei(o)&&this._renderOnGeo(o,t,i,n)},e.prototype.incrementalPrepareRender=function(t,r,n){this.group.removeAll()},e.prototype.incrementalRender=function(t,r,n,i){var o=r.coordinateSystem;o&&(Ei(o)?this.render(r,n,i):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(r,i,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){Ia(this._progressiveEls||this.group,t)},e.prototype._renderOnCartesianAndCalendar=function(t,r,n,i,o){var s=t.coordinateSystem,l=Aa(s,"cartesian2d"),u,v,c,f;if(l){var h=s.getAxis("x"),d=s.getAxis("y");u=h.getBandWidth()+.5,v=d.getBandWidth()+.5,c=h.scale.getExtent(),f=d.scale.getExtent()}for(var p=this.group,g=t.getData(),m=t.getModel(["emphasis","itemStyle"]).getItemStyle(),S=t.getModel(["blur","itemStyle"]).getItemStyle(),y=t.getModel(["select","itemStyle"]).getItemStyle(),b=t.get(["itemStyle","borderRadius"]),x=Ot(t),_=t.getModel("emphasis"),w=_.get("focus"),I=_.get("blurScope"),L=_.get("disabled"),A=l?[g.mapDimension("x"),g.mapDimension("y"),g.mapDimension("value")]:[g.mapDimension("time"),g.mapDimension("value")],D=n;D<i;D++){var C=void 0,P=g.getItemVisual(D,"style");if(l){var T=g.get(A[0],D),M=g.get(A[1],D);if(isNaN(g.get(A[2],D))||T<c[0]||T>c[1]||M<f[0]||M>f[1])continue;var E=s.dataToPoint([T,M]);C=new qt({shape:{x:E[0]-u/2,y:E[1]-v/2,width:u,height:v},style:P})}else{if(isNaN(g.get(A[1],D)))continue;C=new qt({z2:1,shape:s.dataToRect([g.get(A[0],D)]).contentShape,style:P})}if(g.hasItemOption){var R=g.getItemModel(D),k=R.getModel("emphasis");m=k.getModel("itemStyle").getItemStyle(),S=R.getModel(["blur","itemStyle"]).getItemStyle(),y=R.getModel(["select","itemStyle"]).getItemStyle(),b=R.get(["itemStyle","borderRadius"]),w=k.get("focus"),I=k.get("blurScope"),L=k.get("disabled"),x=Ot(R)}C.shape.r=b;var V=t.getRawValue(D),G="-";V&&V[2]!=null&&(G=V[2]+""),ie(C,x,{labelFetcher:t,labelDataIndex:D,defaultOpacity:P.opacity,defaultText:G}),C.ensureState("emphasis").style=m,C.ensureState("blur").style=S,C.ensureState("select").style=y,lt(C,w,I,L),C.incremental=o,o&&(C.states.emphasis.hoverLayer=!0),p.add(C),g.setItemGraphicEl(D,C),this._progressiveEls&&this._progressiveEls.push(C)}},e.prototype._renderOnGeo=function(t,r,n,i){var o=n.targetVisuals.inRange,s=n.targetVisuals.outOfRange,l=r.getData(),u=this._hmLayer||this._hmLayer||new Ip;u.blurSize=r.get("blurSize"),u.pointSize=r.get("pointSize"),u.minOpacity=r.get("minOpacity"),u.maxOpacity=r.get("maxOpacity");var v=t.getViewRect().clone(),c=t.getRoamTransform();v.applyTransform(c);var f=Math.max(v.x,0),h=Math.max(v.y,0),d=Math.min(v.width+v.x,i.getWidth()),p=Math.min(v.height+v.y,i.getHeight()),g=d-f,m=p-h,S=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],y=l.mapArray(S,function(w,I,L){var A=t.dataToPoint([w,I]);return A[0]-=f,A[1]-=h,A.push(L),A}),b=n.getExtent(),x=n.type==="visualMap.continuous"?Lp(b,n.option.range):Ap(b,n.getPieceList(),n.option.selected);u.update(y,g,m,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},x);var _=new Kr({style:{width:g,height:m,x:f,y:h,image:u.canvas},silent:!0});this.group.add(_)},e.type="heatmap",e}(ut),Tp=Dp,Cp=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,r){return He(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var t=Vo.get(this.get("coordinateSystem"));if(t&&t.dimensions)return t.dimensions[0]==="lng"&&t.dimensions[1]==="lat"},e.type="series.heatmap",e.dependencies=["grid","geo","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:"#212121"}}},e}(vt),Mp=Cp;function Pp(a){a.registerChartView(Tp),a.registerSeriesModel(Mp)}var Ep=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t._layers=[],t}return e.prototype.render=function(t,r,n){var i=t.getData(),o=this,s=this.group,l=t.getLayerSeries(),u=i.getLayout("layoutInfo"),v=u.rect,c=u.boundaryGap;s.x=0,s.y=v.y+c[0];function f(g){return g.name}var h=new ge(this._layersSeries||[],l,f,f),d=[];h.add(st(p,this,"add")).update(st(p,this,"update")).remove(st(p,this,"remove")).execute();function p(g,m,S){var y=o._layers;if(g==="remove"){s.remove(y[m]);return}for(var b=[],x=[],_,w=l[m].indices,I=0;I<w.length;I++){var L=i.getItemLayout(w[I]),A=L.x,D=L.y0,C=L.y;b.push(A,D),x.push(A,D+C),_=i.getItemVisual(w[I],"style")}var P,T=i.getItemLayout(w[0]),M=t.getModel("label"),E=M.get("margin"),R=t.getModel("emphasis");if(g==="add"){var k=d[m]=new at;P=new kl({shape:{points:b,stackedOnPoints:x,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),k.add(P),s.add(k),t.isAnimationEnabled()&&P.setClipPath(Np(P.getBoundingRect(),t,function(){P.removeClipPath()}))}else{var k=y[S];P=k.childAt(0),s.add(k),d[m]=k,it(P,{shape:{points:b,stackedOnPoints:x}},t),Se(P)}ie(P,Ot(t),{labelDataIndex:w[I-1],defaultText:i.getName(w[I-1]),inheritColor:_.fill},{normal:{verticalAlign:"middle"}}),P.setTextConfig({position:null,local:!0});var V=P.getTextContent();V&&(V.x=T.x-E,V.y=T.y0+T.y/2),P.useStyle(_),i.setItemGraphicEl(m,P),Tt(P,t),lt(P,R.get("focus"),R.get("blurScope"),R.get("disabled"))}this._layersSeries=l,this._layers=d},e.type="themeRiver",e}(ut);function Np(a,e,t){var r=new qt({shape:{x:a.x-10,y:a.y-10,width:0,height:a.height+20}});return Dt(r,{shape:{x:a.x-50,width:a.width+100,height:a.height+20}},e,t),r}var Rp=Ep,ar=2,kp=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){a.prototype.init.apply(this,arguments),this.legendVisualProvider=new Yr(st(this.getData,this),st(this.getRawData,this))},e.prototype.fixData=function(t){var r=t.length,n={},i=_r(t,function(f){return n.hasOwnProperty(f[0]+"")||(n[f[0]+""]=-1),f[2]}),o=[];i.buckets.each(function(f,h){o.push({name:h,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 c=o[l].dataList[v][0]+"";n[c]=l}for(var c in n)n.hasOwnProperty(c)&&n[c]!==l&&(n[c]=l,t[r]=[c,0,u],r++)}return t},e.prototype.getInitialData=function(t,r){for(var n=this.getReferringComponents("singleAxis",Fo).models[0],i=n.get("type"),o=At(t.data,function(d){return d[2]!==void 0}),s=this.fixData(o||[]),l=[],u=this.nameMap=ne(),v=0,c=0;c<s.length;++c)l.push(s[c][ar]),u.get(s[c][ar])||(u.set(s[c][ar],v),v++);var f=Wr(s,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:xr(i)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}).dimensions,h=new St(f,this);return h.initData(s),h},e.prototype.getLayerSeries=function(){for(var t=this.getData(),r=t.count(),n=[],i=0;i<r;++i)n[i]=i;var o=t.mapDimension("single"),s=_r(n,function(u){return t.get("name",u)}),l=[];return s.buckets.each(function(u,v){u.sort(function(c,f){return t.get(o,c)-t.get(o,f)}),l.push({name:v,indices:u})}),l},e.prototype.getAxisTooltipData=function(t,r,n){W(t)||(t=t?[t]:[]);for(var i=this.getData(),o=this.getLayerSeries(),s=[],l=o.length,u,v=0;v<l;++v){for(var c=Number.MAX_VALUE,f=-1,h=o[v].indices.length,d=0;d<h;++d){var p=i.get(t[0],o[v].indices[d]),g=Math.abs(p-r);g<=c&&(u=p,c=g,f=o[v].indices[d])}s.push(f)}return{dataIndices:s,nestestValue:u}},e.prototype.formatTooltip=function(t,r,n){var i=this.getData(),o=i.getName(t),s=i.get(i.mapDimension("value"),t);return Gt("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}(vt),Vp=kp;function Bp(a,e){a.eachSeriesByType("themeRiver",function(t){var r=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]=O(s[0],o.height),s[1]=O(s[1],o.height);var u=o.height-s[0]-s[1];Ni(r,t,u)}else{s[0]=O(s[0],o.width),s[1]=O(s[1],o.width);var v=o.width-s[0]-s[1];Ni(r,t,v)}r.setLayout("layoutInfo",i)})}function Ni(a,e,t){if(!!a.count())for(var r=e.coordinateSystem,n=e.getLayerSeries(),i=a.mapDimension("single"),o=a.mapDimension("value"),s=H(n,function(g){return H(g.indices,function(m){var S=r.dataToPoint(a.get(i,m));return S[1]=a.get(o,m),S})}),l=Gp(s),u=l.y0,v=t/l.max,c=n.length,f=n[0].indices.length,h,d=0;d<f;++d){h=u[d]*v,a.setItemLayout(n[0].indices[d],{layerIndex:0,x:s[0][d][0],y0:h,y:s[0][d][1]*v});for(var p=1;p<c;++p)h+=s[p-1][d][1]*v,a.setItemLayout(n[p].indices[d],{layerIndex:p,x:s[p][d][0],y0:h,y:s[p][d][1]*v})}}function Gp(a){for(var e=a.length,t=a[0].length,r=[],n=[],i=0,o=0;o<t;++o){for(var s=0,l=0;l<e;++l)s+=a[l][o][1];s>i&&(i=s),r.push(s)}for(var u=0;u<t;++u)n[u]=(i-r[u])/2;i=0;for(var v=0;v<t;++v){var c=r[v]+n[v];c>i&&(i=c)}return{y0:n,max:i}}function Op(a){a.registerChartView(Rp),a.registerSeriesModel(Vp),a.registerLayout(Bp),a.registerProcessor(jr("themeRiver"))}var zp=2,Fp=4,Hp=function(a){B(e,a);function e(t,r,n,i){var o=a.call(this)||this;o.z2=zp,o.textConfig={inside:!0},et(o).seriesIndex=r.seriesIndex;var s=new Wt({z2:Fp,silent:t.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,t,r,n,i),o}return e.prototype.updateData=function(t,r,n,i,o){this.node=r,r.piece=this,n=n||this._seriesModel,i=i||this._ecModel;var s=this;et(s).dataIndex=r.dataIndex;var l=r.getModel(),u=l.getModel("emphasis"),v=r.getLayout(),c=U({},v);c.label=null;var f=r.getVisual("style");f.lineJoin="bevel";var h=r.getVisual("decal");h&&(f.decal=Ho(h,o));var d=Un(l.getModel("itemStyle"),c,!0);U(c,d),N(br,function(S){var y=s.ensureState(S),b=l.getModel([S,"itemStyle"]);y.style=b.getItemStyle();var x=Un(b,c);x&&(y.shape=x)}),t?(s.setShape(c),s.shape.r=v.r0,it(s,{shape:{r:v.r}},n,r.dataIndex)):(it(s,{shape:c},n),Se(s)),s.useStyle(f),this._updateLabel(n);var p=l.getShallow("cursor");p&&s.attr("cursor",p),this._seriesModel=n||this._seriesModel,this._ecModel=i||this._ecModel;var g=u.get("focus"),m=g==="ancestor"?r.getAncestorsIndices():g==="descendant"?r.getDescendantIndices():g;lt(this,m,u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t){var r=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),c=this,f=c.getTextContent(),h=this.node.dataIndex,d=i.get("minAngle")/180*Math.PI,p=i.get("show")&&!(d!=null&&Math.abs(s)<d);f.ignore=!p,N(Vl,function(m){var S=m==="normal"?n.getModel("label"):n.getModel([m,"label"]),y=m==="normal",b=y?f:f.ensureState(m),x=t.getFormattedLabel(h,m);y&&(x=x||r.node.name),b.style=Rt(S,{},null,m!=="normal",!0),x&&(b.style.text=x);var _=S.get("show");_!=null&&!y&&(b.ignore=!_);var w=g(S,"position"),I=y?c:c.states[m],L=I.style.fill;I.textConfig={outsideFill:S.get("color")==="inherit"?L:null,inside:w!=="outside"};var A,D=g(S,"distance")||0,C=g(S,"align");w==="outside"?(A=o.r+D,C=l>Math.PI/2?"right":"left"):!C||C==="center"?(s===2*Math.PI&&o.r0===0?A=0:A=(o.r+o.r0)/2,C="center"):C==="left"?(A=o.r0+D,l>Math.PI/2&&(C="right")):C==="right"&&(A=o.r-D,l>Math.PI/2&&(C="left")),b.style.align=C,b.style.verticalAlign=g(S,"verticalAlign")||"middle",b.x=A*u+o.cx,b.y=A*v+o.cy;var P=g(S,"rotate"),T=0;P==="radial"?(T=-l,T<-Math.PI/2&&(T+=Math.PI)):P==="tangential"?(T=Math.PI/2-l,T>Math.PI/2?T-=Math.PI:T<-Math.PI/2&&(T+=Math.PI)):zt(P)&&(T=P*Math.PI/180),b.rotation=T});function g(m,S){var y=m.get(S);return y==null?i.get(S):y}f.dirtyStyle()},e}(Re),Ri=Hp,Pr="sunburstRootToNode",ki="sunburstHighlight",Wp="sunburstUnhighlight";function Up(a){a.registerAction({type:Pr,update:"updateView"},function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},r);function r(n,i){var o=Ve(e,[Pr],n);if(o){var s=n.getViewRoot();s&&(e.direction=vn(s,o.node)?"rollUp":"drillDown"),n.resetViewRoot(o.node)}}}),a.registerAction({type:ki,update:"none"},function(e,t,r){e=U({},e),t.eachComponent({mainType:"series",subType:"sunburst",query:e},n);function n(i){var o=Ve(e,[ki],i);o&&(e.dataIndex=o.node.dataIndex)}r.dispatchAction(U(e,{type:"highlight"}))}),a.registerAction({type:Wp,update:"updateView"},function(e,t,r){e=U({},e),r.dispatchAction(U(e,{type:"downplay"}))})}var $p=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,n,i){var o=this;this.seriesModel=t,this.api=n,this.ecModel=r;var s=t.getData(),l=s.tree.root,u=t.getViewRoot(),v=this.group,c=t.get("renderLabelForZeroData"),f=[];u.eachNode(function(S){f.push(S)});var h=this._oldChildren||[];d(f,h),m(l,u),this._initEvents(),this._oldChildren=f;function d(S,y){if(S.length===0&&y.length===0)return;new ge(y,S,b,b).add(x).update(x).remove(tt(x,null)).execute();function b(_){return _.getId()}function x(_,w){var I=_==null?null:S[_],L=w==null?null:y[w];p(I,L)}}function p(S,y){if(!c&&S&&!S.getValue()&&(S=null),S!==l&&y!==l){if(y&&y.piece)S?(y.piece.updateData(!1,S,t,r,n),s.setItemGraphicEl(S.dataIndex,y.piece)):g(y);else if(S){var b=new Ri(S,t,r,n);v.add(b),s.setItemGraphicEl(S.dataIndex,b)}}}function g(S){!S||S.piece&&(v.remove(S.piece),S.piece=null)}function m(S,y){y.depth>0?(o.virtualPiece?o.virtualPiece.updateData(!1,S,t,r,n):(o.virtualPiece=new Ri(S,t,r,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(r){var n=!1,i=t.seriesModel.getViewRoot();i.eachNode(function(o){if(!n&&o.piece&&o.piece===r.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";Co(u,v)}}n=!0}})})},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:Pr,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,r){var n=r.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}(ut),Zp=$p,Xp=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t,r){var n={name:t.name,children:t.data};Is(n);var i=this._levelModels=H(t.levels||[],function(l){return new Yt(l,this,r)},this),o=un.createTree(n,this,s);function s(l){l.wrapMethod("getItemModel",function(u,v){var c=o.getNodeByDataIndex(v),f=i[c.depth];return f&&(u.parentModel=f),u})}return o.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(t){var r=a.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return r.treePathInfo=Ta(n,this),r},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 r=this.getRawData().tree.root;(!t||t!==r&&!r.contains(t))&&(this._viewRoot=r)},e.prototype.enableAriaDecal=function(){jo(this)},e.type="series.sunburst",e.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},e}(vt);function Is(a){var e=0;N(a.children,function(r){Is(r);var n=r.value;W(n)&&(n=n[0]),e+=n});var t=a.value;W(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),W(a.value)?a.value[0]=t:a.value=t}var Yp=Xp,Vi=Math.PI/180;function qp(a,e,t){e.eachSeriesByType(a,function(r){var n=r.get("center"),i=r.get("radius");W(i)||(i=[0,i]),W(n)||(n=[n,n]);var o=t.getWidth(),s=t.getHeight(),l=Math.min(o,s),u=O(n[0],o),v=O(n[1],s),c=O(i[0],l/2),f=O(i[1],l/2),h=-r.get("startAngle")*Vi,d=r.get("minAngle")*Vi,p=r.getData().tree.root,g=r.getViewRoot(),m=g.depth,S=r.get("sort");S!=null&&As(g,S);var y=0;N(g.children,function(E){!isNaN(E.getValue())&&y++});var b=g.getValue(),x=Math.PI/(b||y)*2,_=g.depth>0,w=g.height-(_?-1:1),I=(f-c)/(w||1),L=r.get("clockwise"),A=r.get("stillShowZeroSum"),D=L?1:-1,C=function(E,R){if(!!E){var k=R;if(E!==p){var V=E.getValue(),G=b===0&&A?x:V*x;G<d&&(G=d),k=R+D*G;var z=E.depth-m-(_?-1:1),X=c+I*z,Y=c+I*(z+1),J=r.getLevelModel(E);if(J){var ot=J.get("r0",!0),Ct=J.get("r",!0),Z=J.get("radius",!0);Z!=null&&(ot=Z[0],Ct=Z[1]),ot!=null&&(X=O(ot,l/2)),Ct!=null&&(Y=O(Ct,l/2))}E.setLayout({angle:G,startAngle:R,endAngle:k,clockwise:L,cx:u,cy:v,r0:X,r:Y})}if(E.children&&E.children.length){var F=0;N(E.children,function(K){F+=C(K,R+F)})}return k-R}};if(_){var P=c,T=c+I,M=Math.PI*2;p.setLayout({angle:M,startAngle:h,endAngle:h+M,clockwise:L,cx:u,cy:v,r0:P,r:T})}C(g,h)})}function As(a,e){var t=a.children||[];a.children=Kp(t,e),t.length&&N(a.children,function(r){As(r,e)})}function Kp(a,e){if(nt(e)){var t=H(a,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)}),H(t,function(n){return a[n.index]})}else{var r=e==="asc";return a.sort(function(n,i){var o=(n.getValue()-i.getValue())*(r?1:-1);return o===0?(n.dataIndex-i.dataIndex)*(r?-1:1):o})}}function Jp(a){var e={};function t(r,n,i){for(var o=r;o&&o.depth>1;)o=o.parentNode;var s=n.getColorFromPalette(o.name||o.dataIndex+"",e);return r.depth>1&&yt(s)&&(s=Bl(s,(r.depth-1)/(i-1)*.5)),s}a.eachSeriesByType("sunburst",function(r){var n=r.getData(),i=n.tree;i.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=t(o,r,i.root.height));var u=n.ensureUniqueItemVisual(o.dataIndex,"style");U(u,l)})})}function Qp(a){a.registerChartView(Zp),a.registerSeriesModel(Yp),a.registerLayout(tt(qp,"sunburst")),a.registerProcessor(tt(jr,"sunburst")),a.registerVisual(Jp),Up(a)}var Bi={color:"fill",borderColor:"stroke"},jp={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},Vt=xt(),td=function(a){B(e,a);function e(){var t=a!==null&&a.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,r){return He(null,this)},e.prototype.getDataParams=function(t,r,n){var i=a.prototype.getDataParams.call(this,t,r);return n&&(i.info=Vt(n).info),i},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(vt),ed=td;function ad(a,e){return e=e||[0,0],H(["x","y"],function(t,r){var n=this.getAxis(t),i=e[r],o=a[r]/2;return n.type==="category"?n.getBandWidth():Math.abs(n.dataToCoord(i-o)-n.dataToCoord(i+o))},this)}function rd(a){var e=a.master.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return a.dataToPoint(t)},size:st(ad,a)}}}function nd(a,e){return e=e||[0,0],H([0,1],function(t){var r=e[t],n=a[t]/2,i=[],o=[];return i[t]=r-n,o[t]=r+n,i[1-t]=o[1-t]=e[1-t],Math.abs(this.dataToPoint(i)[t]-this.dataToPoint(o)[t])},this)}function id(a){var e=a.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:a.getZoom()},api:{coord:function(t){return a.dataToPoint(t)},size:st(nd,a)}}}function od(a,e){var t=this.getAxis(),r=e instanceof Array?e[0]:e,n=(a instanceof Array?a[0]:a)/2;return t.type==="category"?t.getBandWidth():Math.abs(t.dataToCoord(r-n)-t.dataToCoord(r+n))}function sd(a){var e=a.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return a.dataToPoint(t)},size:st(od,a)}}}function ld(a,e){return e=e||[0,0],H(["Radius","Angle"],function(t,r){var n="get"+t+"Axis",i=this[n](),o=e[r],s=a[r]/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 ud(a){var e=a.getRadiusAxis(),t=a.getAngleAxis(),r=e.getExtent();return r[0]>r[1]&&r.reverse(),{coordSys:{type:"polar",cx:a.cx,cy:a.cy,r:r[1],r0:r[0]},api:{coord:function(n){var i=e.dataToRadius(n[0]),o=t.dataToAngle(n[1]),s=a.coordToPoint([i,o]);return s.push(i,o*Math.PI/180),s},size:st(ld,a)}}}function vd(a){var e=a.getRect(),t=a.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:a.getCellWidth(),cellHeight:a.getCellHeight(),rangeInfo:{start:t.start,end:t.end,weeks:t.weeks,dayCount:t.allDay}},api:{coord:function(r,n){return a.dataToPoint(r,n)}}}}var Bt="emphasis",$t="normal",yn="blur",mn="select",Jt=[$t,Bt,yn,mn],rr={normal:["itemStyle"],emphasis:[Bt,"itemStyle"],blur:[yn,"itemStyle"],select:[mn,"itemStyle"]},nr={normal:["label"],emphasis:[Bt,"label"],blur:[yn,"label"],select:[mn,"label"]},cd=["x","y"],fd="e\0\0",mt={normal:{},emphasis:{},blur:{},select:{}},hd={cartesian2d:rd,geo:id,single:sd,polar:ud,calendar:vd};function Er(a){return a instanceof dt}function Nr(a){return a instanceof Ur}function pd(a,e){e.copyTransform(a),Nr(e)&&Nr(a)&&(e.setStyle(a.style),e.z=a.z,e.z2=a.z2,e.zlevel=a.zlevel,e.invisible=a.invisible,e.ignore=a.ignore,Er(e)&&Er(a)&&e.setShape(a.shape))}var dd=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,n,i){this._progressiveEls=null;var o=this._data,s=t.getData(),l=this.group,u=Gi(t,s,r,n);o||l.removeAll(),s.diff(o).add(function(c){ir(n,null,c,u(c,i),t,l,s)}).remove(function(c){var f=o.getItemGraphicEl(c);f&&rn(f,Vt(f).option,t)}).update(function(c,f){var h=o.getItemGraphicEl(f);ir(n,h,c,u(c,i),t,l,s)}).execute();var v=t.get("clip",!0)?tn(t.coordinateSystem,!1,t):null;v?l.setClipPath(v):l.removeClipPath(),this._data=s},e.prototype.incrementalPrepareRender=function(t,r,n){this.group.removeAll(),this._data=null},e.prototype.incrementalRender=function(t,r,n,i,o){var s=r.getData(),l=Gi(r,s,n,i),u=this._progressiveEls=[];function v(h){h.isGroup||(h.incremental=!0,h.ensureState("emphasis").hoverLayer=!0)}for(var c=t.start;c<t.end;c++){var f=ir(null,null,c,l(c,o),r,this.group,s);f&&(f.traverse(v),u.push(f))}},e.prototype.eachRendered=function(t){Ia(this._progressiveEls||this.group,t)},e.prototype.filterForExposedEvent=function(t,r,n,i){var o=r.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}(ut),gd=dd;function Sn(a){var e=a.type,t;if(e==="path"){var r=a.shape,n=r.width!=null&&r.height!=null?{x:r.x||0,y:r.y||0,width:r.width,height:r.height}:null,i=Ts(r);t=Hl(i,null,n,r.layout||"center"),Vt(t).customPathData=i}else if(e==="image")t=new Kr({}),Vt(t).customImagePath=a.style.image;else if(e==="text")t=new Wt({});else if(e==="group")t=new at;else{if(e==="compoundPath")throw new Error('"compoundPath" is not supported yet.');var o=Wl(e);if(!o){var s="";j(s)}t=new o}return Vt(t).customGraphicType=e,t.name=a.name,t.z2EmphasisLift=1,t.z2SelectLift=1,t}function bn(a,e,t,r,n,i,o){Ul(e);var s=n&&n.normal.cfg;s&&e.setTextConfig(s),r&&r.transition==null&&(r.transition=cd);var l=r&&r.style;if(l){if(e.type==="text"){var u=l;Lt(u,"textFill")&&(u.fill=u.textFill),Lt(u,"textStroke")&&(u.stroke=u.textStroke)}var v=void 0,c=Er(e)?l.decal:null;a&&c&&(c.dirty=!0,v=Ho(c,a)),l.__decalPattern=v}if(Nr(e)&&l){var v=l.__decalPattern;v&&(l.decal=v)}$l(e,r,i,{dataIndex:t,isInit:o,clearStyle:!0}),Zl(e,r.keyframeAnimation,i)}function Ls(a,e,t,r,n){var i=e.isGroup?null:e,o=n&&n[a].cfg;if(i){var s=i.ensureState(a);if(r===!1){var l=i.getState(a);l&&(l.style=null)}else s.style=r||null;o&&(s.textConfig=o),ia(i)}}function yd(a,e,t){if(!a.isGroup){var r=a,n=t.currentZ,i=t.currentZLevel;r.z=n,r.zlevel=i;var o=e.z2;o!=null&&(r.z2=o||0);for(var s=0;s<Jt.length;s++)md(r,e,Jt[s])}}function md(a,e,t){var r=t===$t,n=r?e:fa(e,t),i=n?n.z2:null,o;i!=null&&(o=r?a:a.ensureState(t),o.z2=i||0)}function Gi(a,e,t,r){var n=a.get("renderItem"),i=a.coordinateSystem,o={};i&&(o=i.prepareCustoms?i.prepareCustoms(i):hd[i.type](i));for(var s=pt({getWidth:r.getWidth,getHeight:r.getHeight,getZr:r.getZr,getDevicePixelRatio:r.getDevicePixelRatio,value:b,style:_,ordinalRawValue:x,styleEmphasis:w,visual:A,barLayout:D,currentSeriesIndices:C,font:P},o.api||{}),l={context:{},seriesId:a.id,seriesName:a.name,seriesIndex:a.seriesIndex,coordSys:o.coordSys,dataInsideLength:e.count(),encode:Sd(a.getData())},u,v,c={},f={},h={},d={},p=0;p<Jt.length;p++){var g=Jt[p];h[g]=a.getModel(rr[g]),d[g]=a.getModel(nr[g])}function m(T){return T===u?v||(v=e.getItemModel(T)):e.getItemModel(T)}function S(T,M){return e.hasItemOption?T===u?c[M]||(c[M]=m(T).getModel(rr[M])):m(T).getModel(rr[M]):h[M]}function y(T,M){return e.hasItemOption?T===u?f[M]||(f[M]=m(T).getModel(nr[M])):m(T).getModel(nr[M]):d[M]}return function(T,M){return u=T,v=null,c={},f={},n&&n(pt({dataIndexInside:T,dataIndex:e.getRawIndex(T),actionType:M?M.type:null},l),s)};function b(T,M){return M==null&&(M=u),e.getStore().get(e.getDimensionIndex(T||0),M)}function x(T,M){M==null&&(M=u),T=T||0;var E=e.getDimensionInfo(T);if(!E){var R=e.getDimensionIndex(T);return R>=0?e.getStore().get(R,M):void 0}var k=e.get(E.name,M),V=E&&E.ordinalMeta;return V?V.categories[k]:k}function _(T,M){M==null&&(M=u);var E=e.getItemVisual(M,"style"),R=E&&E.fill,k=E&&E.opacity,V=S(M,$t).getItemStyle();R!=null&&(V.fill=R),k!=null&&(V.opacity=k);var G={inheritColor:yt(R)?R:"#000"},z=y(M,$t),X=Rt(z,null,G,!1,!0);X.text=z.getShallow("show")?Ht(a.getFormattedLabel(M,$t),$n(e,M)):null;var Y=Zn(z,G,!1);return L(T,V),V=Xn(V,X,Y),T&&I(V,T),V.legacy=!0,V}function w(T,M){M==null&&(M=u);var E=S(M,Bt).getItemStyle(),R=y(M,Bt),k=Rt(R,null,null,!0,!0);k.text=R.getShallow("show")?wa(a.getFormattedLabel(M,Bt),a.getFormattedLabel(M,$t),$n(e,M)):null;var V=Zn(R,null,!0);return L(T,E),E=Xn(E,k,V),T&&I(E,T),E.legacy=!0,E}function I(T,M){for(var E in M)Lt(M,E)&&(T[E]=M[E])}function L(T,M){T&&(T.textFill&&(M.textFill=T.textFill),T.textPosition&&(M.textPosition=T.textPosition))}function A(T,M){if(M==null&&(M=u),Lt(Bi,T)){var E=e.getItemVisual(M,"style");return E?E[Bi[T]]:null}if(Lt(jp,T))return e.getItemVisual(M,T)}function D(T){if(i.type==="cartesian2d"){var M=i.getBaseAxis();return Gl(pt({axis:M},T))}}function C(){return t.getCurrentSeriesIndices()}function P(T){return Ol(T,t)}}function Sd(a){var e={};return N(a.dimensions,function(t){var r=a.getDimensionInfo(t);if(!r.isExtraCoord){var n=r.coordDim,i=e[n]=e[n]||[];i[r.coordDimIndex]=a.getDimensionIndex(t)}}),e}function ir(a,e,t,r,n,i,o){if(!r){i.remove(e);return}var s=_n(a,e,t,r,n,i);return s&&o.setItemGraphicEl(t,s),s&<(s,r.focus,r.blurScope,r.emphasisDisabled),s}function _n(a,e,t,r,n,i){var o=-1,s=e;e&&Ds(e,r,n)&&(o=_t(i.childrenRef(),e),e=null);var l=!e,u=e;u?u.clearStates():(u=Sn(r),s&&pd(s,u)),r.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),mt.normal.cfg=mt.normal.conOpt=mt.emphasis.cfg=mt.emphasis.conOpt=mt.blur.cfg=mt.blur.conOpt=mt.select.cfg=mt.select.conOpt=null,mt.isLegacy=!1,_d(u,t,r,n,l,mt),bd(u,t,r,n,l),bn(a,u,t,r,mt,n,l),Lt(r,"info")&&(Vt(u).info=r.info);for(var v=0;v<Jt.length;v++){var c=Jt[v];if(c!==$t){var f=fa(r,c),h=xn(r,f,c);Ls(c,u,f,h,mt)}}return yd(u,r,n),r.type==="group"&&xd(a,u,t,r,n),o>=0?i.replaceAt(u,o):i.add(u),u}function Ds(a,e,t){var r=Vt(a),n=e.type,i=e.shape,o=e.style;return t.isUniversalTransitionEnabled()||n!=null&&n!==r.customGraphicType||n==="path"&&Ld(i)&&Ts(i)!==r.customPathData||n==="image"&&Lt(o,"image")&&o.image!==r.customImagePath}function bd(a,e,t,r,n){var i=t.clipPath;if(i===!1)a&&a.getClipPath()&&a.removeClipPath();else if(i){var o=a.getClipPath();o&&Ds(o,i,r)&&(o=null),o||(o=Sn(i),a.setClipPath(o)),bn(null,o,e,i,null,r,n)}}function _d(a,e,t,r,n,i){if(!a.isGroup){Oi(t,null,i),Oi(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=a.getTextContent();if(o===!1)v&&a.removeTextContent();else{o=i.normal.conOpt=o||{type:"text"},v?v.clearStates():(v=Sn(o),a.setTextContent(v)),bn(null,v,e,o,null,r,n);for(var c=o&&o.style,f=0;f<Jt.length;f++){var h=Jt[f];if(h!==$t){var d=i[h].conOpt;Ls(h,v,d,xn(o,d,h),null)}}c?v.dirty():v.markRedraw()}}}}function Oi(a,e,t){var r=e?fa(a,e):a,n=e?xn(a,r,Bt):a.style,i=a.type,o=r?r.textConfig:null,s=a.textContent,l=s?e?fa(s,e):s:null;if(n&&(t.isLegacy||zl(n,i,!!o,!!l))){t.isLegacy=!0;var u=Fl(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 c=e?t[e]:t.normal;c.cfg=o,c.conOpt=l}function fa(a,e){return e?a?a[e]:null:a}function xn(a,e,t){var r=e&&e.style;return r==null&&t===Bt&&a&&(r=a.styleEmphasis),r}function xd(a,e,t,r,n){var i=r.children,o=i?i.length:0,s=r.$mergeChildren,l=s==="byName"||r.diffChildrenByName,u=s===!1;if(!(!o&&!l&&!u)){if(l){Id({api:a,oldChildren:e.children()||[],newChildren:i||[],dataIndex:t,seriesModel:n,group:e});return}u&&e.removeAll();for(var v=0;v<o;v++){var c=i[v],f=e.childAt(v);c?(c.ignore==null&&(c.ignore=!1),_n(a,f,t,c,n,e)):f.ignore=!0}for(var h=e.childCount()-1;h>=v;h--){var d=e.childAt(h);wd(e,d,n)}}}function wd(a,e,t){e&&rn(e,Vt(a).option,t)}function Id(a){new ge(a.oldChildren,a.newChildren,zi,zi,a).add(Fi).update(Fi).remove(Ad).execute()}function zi(a,e){var t=a&&a.name;return t!=null?t:fd+e}function Fi(a,e){var t=this.context,r=a!=null?t.newChildren[a]:null,n=e!=null?t.oldChildren[e]:null;_n(t.api,n,t.dataIndex,r,t.seriesModel,t.group)}function Ad(a){var e=this.context,t=e.oldChildren[a];t&&rn(t,Vt(t).option,e.seriesModel)}function Ts(a){return a&&(a.pathData||a.d)}function Ld(a){return a&&(Lt(a,"pathData")||Lt(a,"d"))}function Dd(a){a.registerChartView(gd),a.registerSeriesModel(ed)}function Rr(a,e){e=e||{};var t=a.coordinateSystem,r=a.axis,n={},i=r.position,o=r.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 c={top:-1,bottom:1,right:1,left:-1};n.labelDirection=n.tickDirection=n.nameDirection=c[i],a.get(["axisTick","inside"])&&(n.tickDirection=-n.tickDirection),Et(e.labelInside,a.get(["axisLabel","inside"]))&&(n.labelDirection=-n.labelDirection);var f=e.rotate;return f==null&&(f=a.get(["axisLabel","rotate"])),n.labelRotation=i==="top"?-f:f,n.z2=1,n}var Td=["axisLine","axisTickLabel","axisName"],Cd=["splitArea","splitLine"],Md=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="SingleAxisPointer",t}return e.prototype.render=function(t,r,n,i){var o=this.group;o.removeAll();var s=this._axisGroup;this._axisGroup=new at;var l=Rr(t),u=new Xl(t,l);N(Td,u.add,u),o.add(this._axisGroup),o.add(u.getGroup()),N(Cd,function(v){t.get([v,"show"])&&Pd[v](this,this.group,this._axisGroup,t)},this),Yl(s,this._axisGroup,t),a.prototype.render.call(this,t,r,n,i)},e.prototype.remove=function(){ql(this)},e.type="singleAxis",e}(Wo),Pd={splitLine:function(a,e,t,r){var n=r.axis;if(!n.scale.isBlank()){var i=r.getModel("splitLine"),o=i.getModel("lineStyle"),s=o.get("color");s=s instanceof Array?s:[s];for(var l=o.get("width"),u=r.coordinateSystem.getRect(),v=n.isHorizontal(),c=[],f=0,h=n.getTicksCoords({tickModel:i}),d=[],p=[],g=0;g<h.length;++g){var m=n.toGlobalCoord(h[g].coord);v?(d[0]=m,d[1]=u.y,p[0]=m,p[1]=u.y+u.height):(d[0]=u.x,d[1]=m,p[0]=u.x+u.width,p[1]=m);var S=new oa({shape:{x1:d[0],y1:d[1],x2:p[0],y2:p[1]},silent:!0});Kl(S.shape,l);var y=f++%s.length;c[y]=c[y]||[],c[y].push(S)}for(var b=o.getLineStyle(["color"]),g=0;g<c.length;++g)e.add(Jl(c[g],{style:pt({stroke:s[g%s.length]},b),silent:!0}))}},splitArea:function(a,e,t,r){Ql(a,t,r,r)}},Ed=Md,Cs=function(a){B(e,a);function e(){var t=a!==null&&a.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}(La);me(Cs,jl.prototype);var or=Cs,Nd=function(a){B(e,a);function e(t,r,n,i,o){var s=a.call(this,t,r,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,r){return this.coordinateSystem.pointToData(t)[0]},e}(tu),Rd=Nd,Ms=["single"],kd=function(){function a(e,t,r){this.type="single",this.dimension="single",this.dimensions=Ms,this.axisPointerEnabled=!0,this.model=e,this._init(e,t,r)}return a.prototype._init=function(e,t,r){var n=this.dimension,i=new Rd(n,eu(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},a.prototype.update=function(e,t){e.eachSeries(function(r){if(r.coordinateSystem===this){var n=r.getData();N(n.mapDimensionsAll(this.dimension),function(i){this._axis.scale.unionExtentFromData(n,i)},this),au(this._axis.scale,this._axis.model)}},this)},a.prototype.resize=function(e,t){this._rect=ye({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()},a.prototype.getRect=function(){return this._rect},a.prototype._adjustAxis=function(){var e=this._rect,t=this._axis,r=t.isHorizontal(),n=r?[0,e.width]:[0,e.height],i=t.inverse?1:0;t.setExtent(n[i],n[1-i]),this._updateAxisTransform(t,r?e.x:e.y)},a.prototype._updateAxisTransform=function(e,t){var r=e.getExtent(),n=r[0]+r[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}},a.prototype.getAxis=function(){return this._axis},a.prototype.getBaseAxis=function(){return this._axis},a.prototype.getAxes=function(){return[this._axis]},a.prototype.getTooltipAxes=function(){return{baseAxes:[this.getAxis()],otherAxes:[]}},a.prototype.containPoint=function(e){var t=this.getRect(),r=this.getAxis(),n=r.orient;return n==="horizontal"?r.contain(r.toLocalCoord(e[0]))&&e[1]>=t.y&&e[1]<=t.y+t.height:r.contain(r.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},a.prototype.pointToData=function(e){var t=this.getAxis();return[t.coordToData(t.toLocalCoord(e[t.orient==="horizontal"?0:1]))]},a.prototype.dataToPoint=function(e){var t=this.getAxis(),r=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?r.y+r.height/2:r.x+r.width/2,n},a.prototype.convertToPixel=function(e,t,r){var n=Hi(t);return n===this?this.dataToPoint(r):null},a.prototype.convertFromPixel=function(e,t,r){var n=Hi(t);return n===this?this.pointToData(r):null},a}();function Hi(a){var e=a.seriesModel,t=a.singleAxisModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function Vd(a,e){var t=[];return a.eachComponent("singleAxis",function(r,n){var i=new kd(r,a,e);i.name="single_"+n,i.resize(r,e),r.coordinateSystem=i,t.push(i)}),a.eachSeries(function(r){if(r.get("coordinateSystem")==="singleAxis"){var n=r.getReferringComponents("singleAxis",Fo).models[0];r.coordinateSystem=n&&n.coordinateSystem}}),t}var Bd={create:Vd,dimensions:Ms},Gd=Bd,Wi=["x","y"],Od=["width","height"],zd=function(a){B(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,r,n,i,o){var s=n.axis,l=s.coordinateSystem,u=sr(l,1-ha(s)),v=l.dataToPoint(r)[0],c=i.get("type");if(c&&c!=="none"){var f=ru(i),h=Fd[c](s,v,u);h.style=f,t.graphicKey=h.type,t.pointer=h}var d=Rr(n);nu(r,t,d,n,i,o)},e.prototype.getHandleTransform=function(t,r,n){var i=Rr(r,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var o=iu(r.axis,t,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,r,n,i){var o=n.axis,s=o.coordinateSystem,l=ha(o),u=sr(s,l),v=[t.x,t.y];v[l]+=r[l],v[l]=Math.min(u[1],v[l]),v[l]=Math.max(u[0],v[l]);var c=sr(s,1-l),f=(c[1]+c[0])/2,h=[f,f];return h[l]=v[l],{x:v[0],y:v[1],rotation:t.rotation,cursorPoint:h,tooltipOption:{verticalAlign:"middle"}}},e}(ou),Fd={line:function(a,e,t){var r=su([e,t[0]],[e,t[1]],ha(a));return{type:"Line",subPixelOptimize:!0,shape:r}},shadow:function(a,e,t){var r=a.getBandWidth(),n=t[1]-t[0];return{type:"Rect",shape:lu([e-r/2,t[0]],[r,n],ha(a))}}};function ha(a){return a.isHorizontal()?0:1}function sr(a,e){var t=a.getRect();return[t[Wi[e]],t[Wi[e]]+t[Od[e]]]}var Hd=zd,Wd=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.type="single",e}(Da);function Ud(a){$(Uo),Wo.registerAxisPointerClass("SingleAxisPointer",Hd),a.registerComponentView(Wd),a.registerComponentView(Ed),a.registerComponentModel(or),uu(a,"single",or,or.defaultOption),a.registerCoordinateSystem("single",Gd)}var $d=["rect","polygon","keep","clear"];function Zd(a,e){var t=kt(a?a.brush:[]);if(!!t.length){var r=[];N(t,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(r=r.concat(u))});var n=a&&a.toolbox;W(n)&&(n=n[0]),n||(n={feature:{}},a.toolbox=[n]);var i=n.feature||(n.feature={}),o=i.brush||(i.brush={}),s=o.type||(o.type=[]);s.push.apply(s,r),Xd(s),e&&!s.length&&s.push.apply(s,$d)}}function Xd(a){var e={};N(a,function(t){e[t]=1}),a.length=0,N(e,function(t,r){a.push(r)})}function Yd(a){var e=a.brushType,t={point:function(r){return Ui[e].point(r,t,a)},rect:function(r){return Ui[e].rect(r,t,a)}};return t}var Ui={lineX:$i(0),lineY:$i(1),rect:{point:function(a,e,t){return a&&t.boundingRect.contain(a[0],a[1])},rect:function(a,e,t){return a&&t.boundingRect.intersect(a)}},polygon:{point:function(a,e,t){return a&&t.boundingRect.contain(a[0],a[1])&&be(t.range,a[0],a[1])},rect:function(a,e,t){var r=t.range;if(!a||r.length<=1)return!1;var n=a.x,i=a.y,o=a.width,s=a.height,l=r[0];if(be(r,n,i)||be(r,n+o,i)||be(r,n,i+s)||be(r,n+o,i+s)||ht.create(a).contain(l[0],l[1])||$e(n,i,n+o,i,r)||$e(n,i,n,i+s,r)||$e(n+o,i,n+o,i+s,r)||$e(n,i+s,n+o,i+s,r))return!0}}};function $i(a){var e=["x","y"],t=["width","height"];return{point:function(r,n,i){if(r){var o=i.range,s=r[a];return we(s,o)}},rect:function(r,n,i){if(r){var o=i.range,s=[r[e[a]],r[e[a]]+r[t[a]]];return s[1]<s[0]&&s.reverse(),we(s[0],o)||we(s[1],o)||we(o[0],s)||we(o[1],s)}}}}function we(a,e){return e[0]<=a&&a<=e[1]}var Zi=["inBrush","outOfBrush"],lr="__ecBrushSelect",kr="__ecInBrushSelectEvent";function Ps(a){a.eachComponent({mainType:"brush"},function(e){var t=e.brushTargetManager=new fu(e.option,a);t.setInputRanges(e.areas,a)})}function qd(a,e,t){var r=[],n,i;a.eachComponent({mainType:"brush"},function(o){t&&t.type==="takeGlobalCursor"&&o.setBrushOption(t.key==="brush"?t.brushOption:{brushType:!1})}),Ps(a),a.eachComponent({mainType:"brush"},function(o,s){var l={brushId:o.id,brushIndex:s,brushName:o.name,areas:ke(o.areas),selected:[]};r.push(l);var u=o.option,v=u.brushLink,c=[],f=[],h=[],d=!1;s||(n=u.throttleType,i=u.throttleDelay);var p=H(o.areas,function(x){var _=jd[x.brushType],w=pt({boundingRect:_?_(x):void 0},x);return w.selectors=Yd(w),w}),g=vu(o.option,Zi,function(x){x.mappingMethod="fixed"});W(v)&&N(v,function(x){c[x]=1});function m(x){return v==="all"||!!c[x]}function S(x){return!!x.length}a.eachSeries(function(x,_){var w=h[_]=[];x.subType==="parallel"?y(x,_):b(x,_,w)});function y(x,_){var w=x.coordinateSystem;d=d||w.hasAxisBrushed(),m(_)&&w.eachActiveState(x.getData(),function(I,L){I==="active"&&(f[L]=1)})}function b(x,_,w){if(!(!x.brushSelector||Qd(o,_))&&(N(p,function(L){o.brushTargetManager.controlSeries(L,x,a)&&w.push(L),d=d||S(w)}),m(_)&&S(w))){var I=x.getData();I.each(function(L){Xi(x,w,I,L)&&(f[L]=1)})}}a.eachSeries(function(x,_){var w={seriesId:x.id,seriesIndex:_,seriesName:x.name,dataIndex:[]};l.selected.push(w);var I=h[_],L=x.getData(),A=m(_)?function(D){return f[D]?(w.dataIndex.push(L.getRawIndex(D)),"inBrush"):"outOfBrush"}:function(D){return Xi(x,I,L,D)?(w.dataIndex.push(L.getRawIndex(D)),"inBrush"):"outOfBrush"};(m(_)?d:S(I))&&cu(Zi,g,L,A)})}),Kd(e,n,i,r,t)}function Kd(a,e,t,r,n){if(!!n){var i=a.getZr();if(!i[kr]){i[lr]||(i[lr]=Jd);var o=hu(i,lr,t,e);o(a,r)}}}function Jd(a,e){if(!a.isDisposed()){var t=a.getZr();t[kr]=!0,a.dispatchAction({type:"brushSelect",batch:e}),t[kr]=!1}}function Xi(a,e,t,r){for(var n=0,i=e.length;n<i;n++){var o=e[n];if(a.brushSelector(r,t,o.selectors,o))return!0}}function Qd(a,e){var t=a.option.seriesIndex;return t!=null&&t!=="all"&&(W(t)?_t(t,e)<0:e!==t)}var jd={rect:function(a){return Yi(a.range)},polygon:function(a){for(var e,t=a.range,r=0,n=t.length;r<n;r++){e=e||[[1/0,-1/0],[1/0,-1/0]];var i=t[r];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&&Yi(e)}};function Yi(a){return new ht(a[0][0],a[1][0],a[0][1]-a[0][0],a[1][1]-a[1][0])}var tg=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,r){this.ecModel=t,this.api=r,this.model,(this._brushController=new pu(r.getZr())).on("brush",st(this._onBrush,this)).mount()},e.prototype.render=function(t,r,n,i){this.model=t,this._updateController(t,r,n,i)},e.prototype.updateTransform=function(t,r,n,i){Ps(r),this._updateController(t,r,n,i)},e.prototype.updateVisual=function(t,r,n,i){this.updateTransform(t,r,n,i)},e.prototype.updateView=function(t,r,n,i){this._updateController(t,r,n,i)},e.prototype._updateController=function(t,r,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 r=this.model.id,n=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:r,areas:ke(n),$from:r}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:r,areas:ke(n),$from:r})},e.type="brush",e}(Da),eg=tg,ag="#ddd",rg=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.areas=[],t.brushOption={},t}return e.prototype.optionUpdated=function(t,r){var n=this.option;!r&&du(n,t,["inBrush","outOfBrush"]);var i=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:ag},i.hasOwnProperty("liftZ")||(i.liftZ=5)},e.prototype.setAreas=function(t){!t||(this.areas=H(t,function(r){return qi(this.option,r)},this))},e.prototype.setBrushOption=function(t){this.brushOption=qi(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}(La);function qi(a,e){return re({brushType:a.brushType,brushMode:a.brushMode,transformable:a.transformable,brushStyle:new Yt(a.brushStyle).getItemStyle(),removeOnClick:a.removeOnClick,z:a.z},e,!0)}var ng=rg,ig=["rect","polygon","lineX","lineY","keep","clear"],og=function(a){B(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.render=function(t,r,n){var i,o,s;r.eachComponent({mainType:"brush"},function(l){i=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=i,this._brushMode=o,N(t.get("type",!0),function(l){t.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===i)?"emphasis":"normal")})},e.prototype.updateView=function(t,r,n){this.render(t,r,n)},e.prototype.getIcons=function(){var t=this.model,r=t.get("icon",!0),n={};return N(t.get("type",!0),function(i){r[i]&&(n[i]=r[i])}),n},e.prototype.onclick=function(t,r,n){var i=this._brushType,o=this._brushMode;n==="clear"?(r.dispatchAction({type:"axisAreaSelect",intervals:[]}),r.dispatchAction({type:"brush",command:"clear",areas:[]})):r.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 r={show:!0,type:ig.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 r},e}(gu),sg=og;function lg(a){a.registerComponentView(eg),a.registerComponentModel(ng),a.registerPreprocessor(Zd),a.registerVisual(a.PRIORITY.VISUAL.BRUSH,qd),a.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(r){r.setAreas(e.areas)})}),a.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},Pe),a.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},Pe),yu("brush",sg)}function wn(a,e){if(!a)return!1;for(var t=W(a)?a:[a],r=0;r<t.length;r++)if(t[r]&&t[r][e])return!0;return!1}function je(a){qr(a,"label",["show"])}var ta=xt(),Es=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.createdBySelf=!1,t}return e.prototype.init=function(t,r,n){this.mergeDefaultAndTheme(t,n),this._mergeOption(t,n,!1,!0)},e.prototype.isAnimationEnabled=function(){if($o.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},e.prototype.mergeOption=function(t,r){this._mergeOption(t,r,!1,!1)},e.prototype._mergeOption=function(t,r,n,i){var o=this.mainType;n||r.eachSeries(function(s){var l=s.get(this.mainType,!0),u=ta(s)[o];if(!l||!l.data){ta(s)[o]=null;return}u?u._mergeOption(l,r,!0):(i&&je(l),N(l.data,function(v){v instanceof Array?(je(v[0]),je(v[1])):je(v)}),u=this.createMarkerModelFromSeries(l,this,r),U(u,{mainType:this.mainType,seriesIndex:s.seriesIndex,name:s.name,createdBySelf:!0}),u.__hostSeries=s),ta(s)[o]=u},this)},e.prototype.formatTooltip=function(t,r,n){var i=this.getData(),o=this.getRawValue(t),s=i.getName(t);return Gt("section",{header:this.name,blocks:[Gt("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.getMarkerModelFromSeries=function(t,r){return ta(t)[r]},e.type="marker",e.dependencies=["series","grid","polar","geo"],e}(La);me(Es,mu.prototype);var Qt=Es,ug=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,r,n){return new e(t,r,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}(Qt),vg=ug;function Vr(a){return!(isNaN(parseFloat(a.x))&&isNaN(parseFloat(a.y)))}function cg(a){return!isNaN(parseFloat(a.x))&&!isNaN(parseFloat(a.y))}function ea(a,e,t,r,n,i){var o=[],s=Su(e,r),l=s?e.getCalculationInfo("stackResultDimension"):r,u=In(e,l,a),v=e.indicesOfNearest(l,u)[0];o[n]=e.get(t,v),o[i]=e.get(l,v);var c=e.get(r,v),f=bu(e.get(r,v));return f=Math.min(f,20),f>=0&&(o[i]=+o[i].toFixed(f)),[o,c]}var ur={min:tt(ea,"min"),max:tt(ea,"max"),average:tt(ea,"average"),median:tt(ea,"median")};function Oe(a,e){var t=a.getData(),r=a.coordinateSystem;if(e&&!cg(e)&&!W(e.coord)&&r){var n=r.dimensions,i=Ns(e,t,r,a);if(e=ke(e),e.type&&ur[e.type]&&i.baseAxis&&i.valueAxis){var o=_t(n,i.baseAxis.dim),s=_t(n,i.valueAxis.dim),l=ur[e.type](t,i.baseDataDim,i.valueDataDim,o,s);e.coord=l[0],e.value=l[1]}else{for(var u=[e.xAxis!=null?e.xAxis:e.radiusAxis,e.yAxis!=null?e.yAxis:e.angleAxis],v=0;v<2;v++)ur[u[v]]&&(u[v]=In(t,t.mapDimension(n[v]),u[v]));e.coord=u}}return e}function Ns(a,e,t,r){var n={};return a.valueIndex!=null||a.valueDim!=null?(n.valueDataDim=a.valueIndex!=null?e.getDimension(a.valueIndex):a.valueDim,n.valueAxis=t.getAxis(fg(r,n.valueDataDim)),n.baseAxis=t.getOtherAxis(n.valueAxis),n.baseDataDim=e.mapDimension(n.baseAxis.dim)):(n.baseAxis=r.getBaseAxis(),n.valueAxis=t.getOtherAxis(n.baseAxis),n.baseDataDim=e.mapDimension(n.baseAxis.dim),n.valueDataDim=e.mapDimension(n.valueAxis.dim)),n}function fg(a,e){var t=a.getData().getDimensionInfo(e);return t&&t.coordDim}function ze(a,e){return a&&a.containData&&e.coord&&!Vr(e)?a.containData(e.coord):!0}function hg(a,e,t){return a&&a.containZone&&e.coord&&t.coord&&!Vr(e)&&!Vr(t)?a.containZone(e.coord,t.coord):!0}function Rs(a,e){return a?function(t,r,n,i){var o=i<2?t.coord&&t.coord[i]:t.value;return sa(o,e[i])}:function(t,r,n,i){return sa(t.value,e[i])}}function In(a,e,t){if(t==="average"){var r=0,n=0;return a.each(e,function(i,o){isNaN(i)||(r+=i,n++)}),r/n}else return t==="median"?a.getMedian(e):a.getDataExtent(e)[t==="max"?1:0]}var vr=xt(),pg=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this.markerGroupMap=ne()},e.prototype.render=function(t,r,n){var i=this,o=this.markerGroupMap;o.each(function(s){vr(s).keep=!1}),r.eachSeries(function(s){var l=Qt.getMarkerModelFromSeries(s,i.type);l&&i.renderSeries(s,l,r,n)}),o.each(function(s){!vr(s).keep&&i.group.remove(s.group)})},e.prototype.markKeep=function(t){vr(t).keep=!0},e.prototype.toggleBlurSeries=function(t,r){var n=this;N(t,function(i){var o=Qt.getMarkerModelFromSeries(i,n.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(r?_u(l):xu(l))})}})},e.type="marker",e}(Da),An=pg;function Ki(a,e,t){var r=e.coordinateSystem;a.each(function(n){var i=a.getItemModel(n),o,s=O(i.get("x"),t.getWidth()),l=O(i.get("y"),t.getHeight());if(!isNaN(s)&&!isNaN(l))o=[s,l];else if(e.getMarkerPosition)o=e.getMarkerPosition(a.getValues(a.dimensions,n));else if(r){var u=a.get(r.dimensions[0],n),v=a.get(r.dimensions[1],n);o=r.dataToPoint([u,v])}isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),a.setItemLayout(n,o)})}var dg=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,r,n){r.eachSeries(function(i){var o=Qt.getMarkerModelFromSeries(i,"markPoint");o&&(Ki(o.getData(),i,n),this.markerGroupMap.get(i.id).updateLayout())},this)},e.prototype.renderSeries=function(t,r,n,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,v=u.get(s)||u.set(s,new Xr),c=gg(o,t,r);r.setData(c),Ki(r.getData(),t,i),c.each(function(f){var h=c.getItemModel(f),d=h.getShallow("symbol"),p=h.getShallow("symbolSize"),g=h.getShallow("symbolRotate"),m=h.getShallow("symbolOffset"),S=h.getShallow("symbolKeepAspect");if(nt(d)||nt(p)||nt(g)||nt(m)){var y=r.getRawValue(f),b=r.getDataParams(f);nt(d)&&(d=d(y,b)),nt(p)&&(p=p(y,b)),nt(g)&&(g=g(y,b)),nt(m)&&(m=m(y,b))}var x=h.getModel("itemStyle").getItemStyle(),_=nn(l,"color");x.fill||(x.fill=_),c.setItemVisual(f,{symbol:d,symbolSize:p,symbolRotate:g,symbolOffset:m,symbolKeepAspect:S,style:x})}),v.updateData(c),this.group.add(v.group),c.eachItemGraphicEl(function(f){f.traverse(function(h){et(h).dataModel=r})}),this.markKeep(v),v.group.silent=r.get("silent")||t.get("silent")},e.type="markPoint",e}(An);function gg(a,e,t){var r;a?r=H(a&&a.dimensions,function(s){var l=e.getData().getDimensionInfo(e.getData().mapDimension(s))||{};return U(U({},l),{name:s,ordinalMeta:null})}):r=[{name:"value",type:"float"}];var n=new St(r,t),i=H(t.get("data"),tt(Oe,e));a&&(i=At(i,tt(ze,a)));var o=Rs(!!a,r);return n.initData(i,null,o),n}var yg=dg;function mg(a){a.registerComponentModel(vg),a.registerComponentView(yg),a.registerPreprocessor(function(e){wn(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var Sg=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,r,n){return new e(t,r,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}(Qt),bg=Sg,aa=xt(),_g=function(a,e,t,r){var n=a.getData(),i;if(W(r))i=r;else{var o=r.type;if(o==="min"||o==="max"||o==="average"||o==="median"||r.xAxis!=null||r.yAxis!=null){var s=void 0,l=void 0;if(r.yAxis!=null||r.xAxis!=null)s=e.getAxis(r.yAxis!=null?"y":"x"),l=Et(r.yAxis,r.xAxis);else{var u=Ns(r,n,e,a);s=u.valueAxis;var v=wu(n,u.valueDataDim);l=In(n,v,o)}var c=s.dim==="x"?0:1,f=1-c,h=ke(r),d={coord:[]};h.type=null,h.coord=[],h.coord[f]=-1/0,d.coord[f]=1/0;var p=t.get("precision");p>=0&&zt(l)&&(l=+l.toFixed(Math.min(p,20))),h.coord[c]=d.coord[c]=l,i=[h,d,{type:o,valueIndex:r.valueIndex,value:l}]}else i=[]}var g=[Oe(a,i[0]),Oe(a,i[1]),U({},i[2])];return g[2].type=g[2].type||null,re(g[2],g[0]),re(g[2],g[1]),g};function pa(a){return!isNaN(a)&&!isFinite(a)}function Ji(a,e,t,r){var n=1-a,i=r.dimensions[a];return pa(e[n])&&pa(t[n])&&e[a]===t[a]&&r.getAxis(i).containData(e[a])}function xg(a,e){if(a.type==="cartesian2d"){var t=e[0].coord,r=e[1].coord;if(t&&r&&(Ji(1,t,r,a)||Ji(0,t,r,a)))return!0}return ze(a,e[0])&&ze(a,e[1])}function cr(a,e,t,r,n){var i=r.coordinateSystem,o=a.getItemModel(e),s,l=O(o.get("x"),n.getWidth()),u=O(o.get("y"),n.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(r.getMarkerPosition)s=r.getMarkerPosition(a.getValues(a.dimensions,e));else{var v=i.dimensions,c=a.get(v[0],e),f=a.get(v[1],e);s=i.dataToPoint([c,f])}if(Aa(i,"cartesian2d")){var h=i.getAxis("x"),d=i.getAxis("y"),v=i.dimensions;pa(a.get(v[0],e))?s[0]=h.toGlobalCoord(h.getExtent()[t?0:1]):pa(a.get(v[1],e))&&(s[1]=d.toGlobalCoord(d.getExtent()[t?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}a.setItemLayout(e,s)}var wg=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,r,n){r.eachSeries(function(i){var o=Qt.getMarkerModelFromSeries(i,"markLine");if(o){var s=o.getData(),l=aa(o).from,u=aa(o).to;l.each(function(v){cr(l,v,!0,i,n),cr(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,r,n,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,v=u.get(s)||u.set(s,new gn);this.group.add(v.group);var c=Ig(o,t,r),f=c.from,h=c.to,d=c.line;aa(r).from=f,aa(r).to=h,r.setData(d);var p=r.get("symbol"),g=r.get("symbolSize"),m=r.get("symbolRotate"),S=r.get("symbolOffset");W(p)||(p=[p,p]),W(g)||(g=[g,g]),W(m)||(m=[m,m]),W(S)||(S=[S,S]),c.from.each(function(b){y(f,b,!0),y(h,b,!1)}),d.each(function(b){var x=d.getItemModel(b).getModel("lineStyle").getLineStyle();d.setItemLayout(b,[f.getItemLayout(b),h.getItemLayout(b)]),x.stroke==null&&(x.stroke=f.getItemVisual(b,"style").fill),d.setItemVisual(b,{fromSymbolKeepAspect:f.getItemVisual(b,"symbolKeepAspect"),fromSymbolOffset:f.getItemVisual(b,"symbolOffset"),fromSymbolRotate:f.getItemVisual(b,"symbolRotate"),fromSymbolSize:f.getItemVisual(b,"symbolSize"),fromSymbol:f.getItemVisual(b,"symbol"),toSymbolKeepAspect:h.getItemVisual(b,"symbolKeepAspect"),toSymbolOffset:h.getItemVisual(b,"symbolOffset"),toSymbolRotate:h.getItemVisual(b,"symbolRotate"),toSymbolSize:h.getItemVisual(b,"symbolSize"),toSymbol:h.getItemVisual(b,"symbol"),style:x})}),v.updateData(d),c.line.eachItemGraphicEl(function(b){et(b).dataModel=r,b.traverse(function(x){et(x).dataModel=r})});function y(b,x,_){var w=b.getItemModel(x);cr(b,x,_,t,i);var I=w.getModel("itemStyle").getItemStyle();I.fill==null&&(I.fill=nn(l,"color")),b.setItemVisual(x,{symbolKeepAspect:w.get("symbolKeepAspect"),symbolOffset:Ht(w.get("symbolOffset",!0),S[_?0:1]),symbolRotate:Ht(w.get("symbolRotate",!0),m[_?0:1]),symbolSize:Ht(w.get("symbolSize"),g[_?0:1]),symbol:Ht(w.get("symbol",!0),p[_?0:1]),style:I})}this.markKeep(v),v.group.silent=r.get("silent")||t.get("silent")},e.type="markLine",e}(An);function Ig(a,e,t){var r;a?r=H(a&&a.dimensions,function(u){var v=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return U(U({},v),{name:u,ordinalMeta:null})}):r=[{name:"value",type:"float"}];var n=new St(r,t),i=new St(r,t),o=new St([],t),s=H(t.get("data"),tt(_g,e,a,t));a&&(s=At(s,tt(xg,a)));var l=Rs(!!a,r);return n.initData(H(s,function(u){return u[0]}),null,l),i.initData(H(s,function(u){return u[1]}),null,l),o.initData(H(s,function(u){return u[2]})),o.hasItemOption=!0,{from:n,to:i,line:o}}var Ag=wg;function Lg(a){a.registerComponentModel(bg),a.registerComponentView(Ag),a.registerPreprocessor(function(e){wn(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var Dg=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,r,n){return new e(t,r,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}(Qt),Tg=Dg,ra=xt(),Cg=function(a,e,t,r){var n=Oe(a,r[0]),i=Oe(a,r[1]),o=n.coord,s=i.coord;o[0]=Et(o[0],-1/0),o[1]=Et(o[1],-1/0),s[0]=Et(s[0],1/0),s[1]=Et(s[1],1/0);var l=zo([{},n,i]);return l.coord=[n.coord,i.coord],l.x0=n.x,l.y0=n.y,l.x1=i.x,l.y1=i.y,l};function da(a){return!isNaN(a)&&!isFinite(a)}function Qi(a,e,t,r){var n=1-a;return da(e[n])&&da(t[n])}function Mg(a,e){var t=e.coord[0],r=e.coord[1],n={coord:t,x:e.x0,y:e.y0},i={coord:r,x:e.x1,y:e.y1};return Aa(a,"cartesian2d")?t&&r&&(Qi(1,t,r)||Qi(0,t,r))?!0:hg(a,n,i):ze(a,n)||ze(a,i)}function ji(a,e,t,r,n){var i=r.coordinateSystem,o=a.getItemModel(e),s,l=O(o.get(t[0]),n.getWidth()),u=O(o.get(t[1]),n.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(r.getMarkerPosition)s=r.getMarkerPosition(a.getValues(t,e));else{var v=a.get(t[0],e),c=a.get(t[1],e),f=[v,c];i.clampData&&i.clampData(f,f),s=i.dataToPoint(f,!0)}if(Aa(i,"cartesian2d")){var h=i.getAxis("x"),d=i.getAxis("y"),v=a.get(t[0],e),c=a.get(t[1],e);da(v)?s[0]=h.toGlobalCoord(h.getExtent()[t[0]==="x0"?0:1]):da(c)&&(s[1]=d.toGlobalCoord(d.getExtent()[t[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var to=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],Pg=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,r,n){r.eachSeries(function(i){var o=Qt.getMarkerModelFromSeries(i,"markArea");if(o){var s=o.getData();s.each(function(l){var u=H(to,function(c){return ji(s,l,c,i,n)});s.setItemLayout(l,u);var v=s.getItemGraphicEl(l);v.setShape("points",u)})}},this)},e.prototype.renderSeries=function(t,r,n,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,v=u.get(s)||u.set(s,{group:new at});this.group.add(v.group),this.markKeep(v);var c=Eg(o,t,r);r.setData(c),c.each(function(f){var h=H(to,function(I){return ji(c,f,I,t,i)}),d=o.getAxis("x").scale,p=o.getAxis("y").scale,g=d.getExtent(),m=p.getExtent(),S=[d.parse(c.get("x0",f)),d.parse(c.get("x1",f))],y=[p.parse(c.get("y0",f)),p.parse(c.get("y1",f))];wr(S),wr(y);var b=!(g[0]>S[1]||g[1]<S[0]||m[0]>y[1]||m[1]<y[0]),x=!b;c.setItemLayout(f,{points:h,allClipped:x});var _=c.getItemModel(f).getModel("itemStyle").getItemStyle(),w=nn(l,"color");_.fill||(_.fill=w,yt(_.fill)&&(_.fill=mr(_.fill,.4))),_.stroke||(_.stroke=w),c.setItemVisual(f,"style",_)}),c.diff(ra(v).data).add(function(f){var h=c.getItemLayout(f);if(!h.allClipped){var d=new Ee({shape:{points:h.points}});c.setItemGraphicEl(f,d),v.group.add(d)}}).update(function(f,h){var d=ra(v).data.getItemGraphicEl(h),p=c.getItemLayout(f);p.allClipped?d&&v.group.remove(d):(d?it(d,{shape:{points:p.points}},r,f):d=new Ee({shape:{points:p.points}}),c.setItemGraphicEl(f,d),v.group.add(d))}).remove(function(f){var h=ra(v).data.getItemGraphicEl(f);v.group.remove(h)}).execute(),c.eachItemGraphicEl(function(f,h){var d=c.getItemModel(h),p=c.getItemVisual(h,"style");f.useStyle(c.getItemVisual(h,"style")),ie(f,Ot(d),{labelFetcher:r,labelDataIndex:h,defaultText:c.getName(h)||"",inheritColor:yt(p.fill)?mr(p.fill,1):"#000"}),Tt(f,d),lt(f,null,null,d.get(["emphasis","disabled"])),et(f).dataModel=r}),ra(v).data=c,v.group.silent=r.get("silent")||t.get("silent")},e.type="markArea",e}(An);function Eg(a,e,t){var r,n,i=["x0","y0","x1","y1"];if(a){var o=H(a&&a.dimensions,function(u){var v=e.getData(),c=v.getDimensionInfo(v.mapDimension(u))||{};return U(U({},c),{name:u,ordinalMeta:null})});n=H(i,function(u,v){return{name:u,type:o[v%2].type}}),r=new St(n,t)}else n=[{name:"value",type:"float"}],r=new St(n,t);var s=H(t.get("data"),tt(Cg,e,a,t));a&&(s=At(s,tt(Mg,a)));var l=a?function(u,v,c,f){var h=u.coord[Math.floor(f/2)][f%2];return sa(h,n[f])}:function(u,v,c,f){return sa(u.value,n[f])};return r.initData(s,null,l),r.hasItemOption=!0,r}var Ng=Pg;function Rg(a){a.registerComponentModel(Tg),a.registerComponentView(Ng),a.registerPreprocessor(function(e){wn(e.series,"markArea")&&(e.markArea=e.markArea||{})})}var eo={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},kg=function(){function a(e){var t=this._condVal=yt(e)?new RegExp(e):Lu(e)?e:null;if(t==null){var r="";j(r)}}return a.prototype.evaluate=function(e){var t=typeof e;return yt(t)?this._condVal.test(e):zt(t)?this._condVal.test(e+""):!1},a}(),Vg=function(){function a(){}return a.prototype.evaluate=function(){return this.value},a}(),Bg=function(){function a(){}return a.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(!e[t].evaluate())return!1;return!0},a}(),Gg=function(){function a(){}return a.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(e[t].evaluate())return!0;return!1},a}(),Og=function(){function a(){}return a.prototype.evaluate=function(){return!this.child.evaluate()},a}(),zg=function(){function a(){}return a.prototype.evaluate=function(){for(var e=!!this.valueParser,t=this.getValue,r=t(this.valueGetterParam),n=e?this.valueParser(r):null,i=0;i<this.subCondList.length;i++)if(!this.subCondList[i].evaluate(e?n:r))return!1;return!0},a}();function Ln(a,e){if(a===!0||a===!1){var t=new Vg;return t.value=a,t}var r="";return ks(a)||j(r),a.and?ao("and",a,e):a.or?ao("or",a,e):a.not?Fg(a,e):Hg(a,e)}function ao(a,e,t){var r=e[a],n="";W(r)||j(n),r.length||j(n);var i=a==="and"?new Bg:new Gg;return i.children=H(r,function(o){return Ln(o,t)}),i.children.length||j(n),i}function Fg(a,e){var t=a.not,r="";ks(t)||j(r);var n=new Og;return n.child=Ln(t,e),n.child||j(r),n}function Hg(a,e){for(var t="",r=e.prepareGetValue(a),n=[],i=zr(a),o=a.parser,s=o?Zo(o):null,l=0;l<i.length;l++){var u=i[l];if(!(u==="parser"||e.valueGetterAttrMap.get(u))){var v=Lt(eo,u)?eo[u]:u,c=a[u],f=s?s(c):c,h=Iu(v,f)||v==="reg"&&new kg(f);h||j(t),n.push(h)}}n.length||j(t);var d=new zg;return d.valueGetterParam=r,d.valueParser=s,d.getValue=e.getValue,d.subCondList=n,d}function ks(a){return en(a)&&!Au(a)}var Wg=function(){function a(e,t){this._cond=Ln(e,t)}return a.prototype.evaluate=function(){return this._cond.evaluate()},a}();function Ug(a,e){return new Wg(a,e)}var $g={type:"echarts:filter",transform:function(a){for(var e=a.upstream,t,r=Ug(a.config,{valueGetterAttrMap:ne({dimension:!0}),prepareGetValue:function(s){var l="",u=s.dimension;Lt(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),r.evaluate()&&n.push(t);return{data:n}}},Zg={type:"echarts:sort",transform:function(a){var e=a.upstream,t=a.config,r="",n=kt(t);n.length||j(r);var i=[];N(n,function(v){var c=v.dimension,f=v.order,h=v.parser,d=v.incomparable;if(c==null&&j(r),f!=="asc"&&f!=="desc"&&j(r),d&&d!=="min"&&d!=="max"){var p="";j(p)}if(f!=="asc"&&f!=="desc"){var g="";j(g)}var m=e.getDimensionInfo(c);m||j(r);var S=h?Zo(h):null;h&&!S&&j(r),i.push({dimIdx:m.index,parser:S,comparator:new Du(f,d)})});var o=e.sourceFormat;o!==Go&&o!==Tu&&j(r);for(var s=[],l=0,u=e.count();l<u;l++)s.push(e.getRawDataItem(l));return s.sort(function(v,c){for(var f=0;f<i.length;f++){var h=i[f],d=e.retrieveValueFromItem(v,h.dimIdx),p=e.retrieveValueFromItem(c,h.dimIdx);h.parser&&(d=h.parser(d),p=h.parser(p));var g=h.comparator.evaluate(d,p);if(g!==0)return g}return 0}),{data:s}}};function Xg(a){a.registerTransform($g),a.registerTransform(Zg)}var Yg=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type="dataset",t}return e.prototype.init=function(t,r,n){a.prototype.init.call(this,t,r,n),this._sourceManager=new Cu(this),Yn(this)},e.prototype.mergeOption=function(t,r){a.prototype.mergeOption.call(this,t,r),Yn(this)},e.prototype.optionUpdated=function(){this._sourceManager.dirty()},e.prototype.getSourceManager=function(){return this._sourceManager},e.type="dataset",e.defaultOption={seriesLayoutBy:Mu},e}(La),qg=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type="dataset",t}return e.type="dataset",e}(Da);function Kg(a){a.registerComponentModel(Yg),a.registerComponentView(qg)}function ro(a,e,t){var r=Ir.createCanvas(),n=e.getWidth(),i=e.getHeight(),o=r.style;return o&&(o.position="absolute",o.left="0",o.top="0",o.width=n+"px",o.height=i+"px",r.setAttribute("data-zr-dom-id",a)),r.width=n*t,r.height=i*t,r}var Jg=function(a){Pu(e,a);function e(t,r,n){var i=a.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||Yo,typeof t=="string"?o=ro(t,r,n):en(t)&&(o=t,t=o.id),i.id=t,i.dom=o;var s=o.style;return s&&(Xo(o),o.onselectstart=function(){return!1},s.padding="0",s.margin="0",s.borderWidth="0"),i.painter=r,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=ro("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),t!==1&&this.ctxBack.scale(t,t)},e.prototype.createRepaintRects=function(t,r,n,i){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var o=[],s=this.maxRepaintRectCount,l=!1,u=new ht(0,0,0,0);function v(S){if(!(!S.isFinite()||S.isZero()))if(o.length===0){var y=new ht(0,0,0,0);y.copy(S),o.push(y)}else{for(var b=!1,x=1/0,_=0,w=0;w<o.length;++w){var I=o[w];if(I.intersect(S)){var L=new ht(0,0,0,0);L.copy(I),L.union(S),o[w]=L,b=!0;break}else if(l){u.copy(S),u.union(I);var A=S.width*S.height,D=I.width*I.height,C=u.width*u.height,P=C-A-D;P<x&&(x=P,_=w)}}if(l&&(o[_].union(S),b=!0),!b){var y=new ht(0,0,0,0);y.copy(S),o.push(y)}l||(l=o.length>=s)}}for(var c=this.__startIndex;c<this.__endIndex;++c){var f=t[c];if(f){var h=f.shouldBePainted(n,i,!0,!0),d=f.__isRendered&&(f.__dirty&Ar||!h)?f.getPrevPaintRect():null;d&&v(d);var p=h&&(f.__dirty&Ar||!f.__isRendered)?f.getPaintRect():null;p&&v(p)}}for(var c=this.__prevStartIndex;c<this.__prevEndIndex;++c){var f=r[c],h=f.shouldBePainted(n,i,!0,!0);if(f&&(!h||!f.__zr)&&f.__isRendered){var d=f.getPrevPaintRect();d&&v(d)}}var g;do{g=!1;for(var c=0;c<o.length;){if(o[c].isZero()){o.splice(c,1);continue}for(var m=c+1;m<o.length;)o[c].intersect(o[m])?(g=!0,o[c].union(o[m]),o.splice(m,1)):m++;c++}}while(g);return this._paintRects=o,o},e.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},e.prototype.resize=function(t,r){var n=this.dpr,i=this.dom,o=i.style,s=this.domBack;o&&(o.width=t+"px",o.height=r+"px"),i.width=t*n,i.height=r*n,s&&(s.width=t*n,s.height=r*n,n!==1&&this.ctxBack.scale(n,n))},e.prototype.clear=function(t,r,n){var i=this.dom,o=this.ctx,s=i.width,l=i.height;r=r||this.clearColor;var u=this.motionBlur&&!t,v=this.lastFrameAlpha,c=this.dpr,f=this;u&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(i,0,0,s/c,l/c));var h=this.domBack;function d(p,g,m,S){if(o.clearRect(p,g,m,S),r&&r!=="transparent"){var y=void 0;Nu(r)?(y=r.__canvasGradient||Ru(o,r,{x:0,y:0,width:m,height:S}),r.__canvasGradient=y):ku(r)&&(r.scaleX=r.scaleX||c,r.scaleY=r.scaleY||c,y=Vu(o,r,{dirty:function(){f.setUnpainted(),f.__painter.refresh()}})),o.save(),o.fillStyle=y||r,o.fillRect(p,g,m,S),o.restore()}u&&(o.save(),o.globalAlpha=v,o.drawImage(h,p,g,m,S),o.restore())}!n||u?d(0,0,s,l):n.length&&N(n,function(p){d(p.x*c,p.y*c,p.width*c,p.height*c)})},e}(Eu),fr=Jg,no=1e5,jt=314159,na=.01,Qg=.001;function jg(a){return a?a.__builtin__?!0:!(typeof a.resize!="function"||typeof a.refresh!="function"):!1}function ty(a,e){var t=document.createElement("div");return t.style.cssText=["position:relative","width:"+a+"px","height:"+e+"px","padding:0","margin:0","border-width:0"].join(";")+";",t}var ey=function(){function a(e,t,r,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=r=U({},r||{}),this.dpr=r.devicePixelRatio||Yo,this._singleCanvas=i,this.root=e;var o=e.style;o&&(Xo(e),e.innerHTML=""),this.storage=t;var s=this._zlevelList;this._prevDisplayList=[];var l=this._layers;if(i){var v=e,c=v.width,f=v.height;r.width!=null&&(c=r.width),r.height!=null&&(f=r.height),this.dpr=r.devicePixelRatio||1,v.width=c*this.dpr,v.height=f*this.dpr,this._width=c,this._height=f;var h=new fr(v,this,this.dpr);h.__builtin__=!0,h.initContext(),l[jt]=h,h.zlevel=jt,s.push(jt),this._domRoot=e}else{this._width=Xe(e,0,r),this._height=Xe(e,1,r);var u=this._domRoot=ty(this._width,this._height);e.appendChild(u)}}return a.prototype.getType=function(){return"canvas"},a.prototype.isSingleCanvas=function(){return this._singleCanvas},a.prototype.getViewportRoot=function(){return this._domRoot},a.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},a.prototype.refresh=function(e){var t=this.storage.getDisplayList(!0),r=this._prevDisplayList,n=this._zlevelList;this._redrawId=Math.random(),this._paintList(t,r,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},a.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},a.prototype._paintHoverList=function(e){var t=e.length,r=this._hoverlayer;if(r&&r.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&&(r||(r=this._hoverlayer=this.getLayer(no)),i||(i=r.ctx,i.save()),Ze(i,s,n,o===t-1))}i&&i.restore()}},a.prototype.getHoverLayer=function(){return this.getLayer(no)},a.prototype.paintOne=function(e,t){Bu(e,t)},a.prototype._paintList=function(e,t,r,n){if(this._redrawId===n){r=r||!1,this._updateLayerStatus(e);var i=this._doPaintList(e,t,r),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;Gu(function(){l._paintList(e,t,r,n)})}}},a.prototype._compositeManually=function(){var e=this.getLayer(jt).ctx,t=this._domRoot.width,r=this._domRoot.height;e.clearRect(0,0,t,r),this.eachBuiltinLayer(function(n){n.virtual&&e.drawImage(n.dom,0,0,t,r)})},a.prototype._doPaintList=function(e,t,r){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||r)&&i.push(u)}for(var v=!0,c=!1,f=function(p){var g=i[p],m=g.ctx,S=o&&g.createRepaintRects(e,t,h._width,h._height),y=r?g.__startIndex:g.__drawIndex,b=!r&&g.incremental&&Date.now,x=b&&Date.now(),_=g.zlevel===h._zlevelList[0]?h._backgroundColor:null;if(g.__startIndex===g.__endIndex)g.clear(!1,_,S);else if(y===g.__startIndex){var w=e[y];(!w.incremental||!w.notClear||r)&&g.clear(!1,_,S)}y===-1&&(console.error("For some unknown reason. drawIndex is -1"),y=g.__startIndex);var I,L=function(P){var T={inHover:!1,allClipped:!1,prevEl:null,viewWidth:n._width,viewHeight:n._height};for(I=y;I<g.__endIndex;I++){var M=e[I];if(M.__inHover&&(c=!0),n._doPaintEl(M,g,o,P,T,I===g.__endIndex-1),b){var E=Date.now()-x;if(E>15)break}}T.prevElClipPaths&&m.restore()};if(S)if(S.length===0)I=g.__endIndex;else for(var A=h.dpr,D=0;D<S.length;++D){var C=S[D];m.save(),m.beginPath(),m.rect(C.x*A,C.y*A,C.width*A,C.height*A),m.clip(),L(C),m.restore()}else m.save(),L(),m.restore();g.__drawIndex=I,g.__drawIndex<g.__endIndex&&(v=!1)},h=this,d=0;d<i.length;d++)f(d);return $o.wxa&&N(this._layers,function(p){p&&p.ctx&&p.ctx.draw&&p.ctx.draw()}),{finished:v,needsRefreshHover:c}},a.prototype._doPaintEl=function(e,t,r,n,i,o){var s=t.ctx;if(r){var l=e.getPaintRect();(!n||l&&l.intersect(n))&&(Ze(s,e,i,o),e.setPrevPaintRect(l))}else Ze(s,e,i,o)},a.prototype.getLayer=function(e,t){this._singleCanvas&&!this._needsManuallyCompositing&&(e=jt);var r=this._layers[e];return r||(r=new fr("zr_"+e,this,this.dpr),r.zlevel=e,r.__builtin__=!0,this._layerConfig[e]?re(r,this._layerConfig[e],!0):this._layerConfig[e-na]&&re(r,this._layerConfig[e-na],!0),t&&(r.virtual=t),this.insertLayer(e,r),r.initContext()),r},a.prototype.insertLayer=function(e,t){var r=this._layers,n=this._zlevelList,i=n.length,o=this._domRoot,s=null,l=-1;if(!r[e]&&!!jg(t)){if(i>0&&e>n[0]){for(l=0;l<i-1&&!(n[l]<e&&n[l+1]>e);l++);s=r[n[l]]}if(n.splice(l+1,0,e),r[e]=t,!t.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(t.dom,u.nextSibling):o.appendChild(t.dom)}else o.firstChild?o.insertBefore(t.dom,o.firstChild):o.appendChild(t.dom);t.__painter=this}},a.prototype.eachLayer=function(e,t){for(var r=this._zlevelList,n=0;n<r.length;n++){var i=r[n];e.call(t,this._layers[i],i)}},a.prototype.eachBuiltinLayer=function(e,t){for(var r=this._zlevelList,n=0;n<r.length;n++){var i=r[n],o=this._layers[i];o.__builtin__&&e.call(t,o,i)}},a.prototype.eachOtherLayer=function(e,t){for(var r=this._zlevelList,n=0;n<r.length;n++){var i=r[n],o=this._layers[i];o.__builtin__||e.call(t,o,i)}},a.prototype.getLayers=function(){return this._layers},a.prototype._updateLayerStatus=function(e){this.eachBuiltinLayer(function(c,f){c.__dirty=c.__used=!1});function t(c){i&&(i.__endIndex!==c&&(i.__dirty=!0),i.__endIndex=c)}if(this._singleCanvas)for(var r=1;r<e.length;r++){var n=e[r];if(n.zlevel!==e[r-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+Qg,this._needsManuallyCompositing),v.incremental=!0,o=1):v=this.getLayer(u+(o>0?na:0),this._needsManuallyCompositing),v.__builtin__||Ou("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&Ar&&!n.__inHover&&(v.__dirty=!0,v.incremental&&v.__drawIndex<0&&(v.__drawIndex=l))}t(l),this.eachBuiltinLayer(function(c,f){!c.__used&&c.getElementCount()>0&&(c.__dirty=!0,c.__startIndex=c.__endIndex=c.__drawIndex=0),c.__dirty&&c.__drawIndex<0&&(c.__drawIndex=c.__startIndex)})},a.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},a.prototype._clearLayer=function(e){e.clear()},a.prototype.setBackgroundColor=function(e){this._backgroundColor=e,N(this._layers,function(t){t.setUnpainted()})},a.prototype.configLayer=function(e,t){if(t){var r=this._layerConfig;r[e]?re(r[e],t,!0):r[e]=t;for(var n=0;n<this._zlevelList.length;n++){var i=this._zlevelList[n];if(i===e||i===e+na){var o=this._layers[i];re(o,r[e],!0)}}}},a.prototype.delLayer=function(e){var t=this._layers,r=this._zlevelList,n=t[e];!n||(n.dom.parentNode.removeChild(n.dom),delete t[e],r.splice(_t(r,e),1))},a.prototype.resize=function(e,t){if(this._domRoot.style){var r=this._domRoot;r.style.display="none";var n=this._opts,i=this.root;if(e!=null&&(n.width=e),t!=null&&(n.height=t),e=Xe(i,0,n),t=Xe(i,1,n),r.style.display="",this._width!==e||t!==this._height){r.style.width=e+"px",r.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(jt).resize(e,t)}return this},a.prototype.clearLayer=function(e){var t=this._layers[e];t&&t.clear()},a.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},a.prototype.getRenderedCanvas=function(e){if(e=e||{},this._singleCanvas&&!this._compositeManually)return this._layers[jt].dom;var t=new fr("image",this,e.pixelRatio||this.dpr);t.initContext(),t.clear(!1,e.backgroundColor||this._backgroundColor);var r=t.ctx;if(e.pixelRatio<=this.dpr){this.refresh();var n=t.dom.width,i=t.dom.height;this.eachLayer(function(c){c.__builtin__?r.drawImage(c.dom,0,0,n,i):c.renderToCanvas&&(r.save(),c.renderToCanvas(r),r.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];Ze(r,v,o,l===u-1)}return t.dom},a.prototype.getWidth=function(){return this._width},a.prototype.getHeight=function(){return this._height},a}(),ay=ey;function ry(a){a.registerPainter("canvas",ay)}var Mt=zu.CMD;function de(a,e){return Math.abs(a-e)<1e-5}function Br(a){var e=a.data,t=a.len(),r=[],n,i=0,o=0,s=0,l=0;function u(P,T){n&&n.length>2&&r.push(n),n=[P,T]}function v(P,T,M,E){de(P,M)&&de(T,E)||n.push(P,T,M,E,M,E)}function c(P,T,M,E,R,k){var V=Math.abs(T-P),G=Math.tan(V/4)*4/3,z=T<P?-1:1,X=Math.cos(P),Y=Math.sin(P),J=Math.cos(T),ot=Math.sin(T),Ct=X*R+M,Z=Y*k+E,F=J*R+M,K=ot*k+E,q=R*G*z,Q=k*G*z;n.push(Ct-q*Y,Z+Q*X,F+q*ot,K-Q*J,F,K)}for(var f,h,d,p,g=0;g<t;){var m=e[g++],S=g===1;switch(S&&(i=e[g],o=e[g+1],s=i,l=o,(m===Mt.L||m===Mt.C||m===Mt.Q)&&(n=[s,l])),m){case Mt.M:i=s=e[g++],o=l=e[g++],u(s,l);break;case Mt.L:f=e[g++],h=e[g++],v(i,o,f,h),i=f,o=h;break;case Mt.C:n.push(e[g++],e[g++],e[g++],e[g++],i=e[g++],o=e[g++]);break;case Mt.Q:f=e[g++],h=e[g++],d=e[g++],p=e[g++],n.push(i+2/3*(f-i),o+2/3*(h-o),d+2/3*(f-d),p+2/3*(h-p),d,p),i=d,o=p;break;case Mt.A:var y=e[g++],b=e[g++],x=e[g++],_=e[g++],w=e[g++],I=e[g++]+w;g+=1;var L=!e[g++];f=Math.cos(w)*x+y,h=Math.sin(w)*_+b,S?(s=f,l=h,u(s,l)):v(i,o,f,h),i=Math.cos(I)*x+y,o=Math.sin(I)*_+b;for(var A=(L?-1:1)*Math.PI/2,D=w;L?D>I:D<I;D+=A){var C=L?Math.max(D+A,I):Math.min(D+A,I);c(D,C,y,b,x,_)}break;case Mt.R:s=i=e[g++],l=o=e[g++],f=s+e[g++],h=l+e[g++],u(f,l),v(f,l,f,h),v(f,h,s,h),v(s,h,s,l),v(s,l,f,l);break;case Mt.Z:n&&v(i,o,s,l),i=s,o=l;break}}return n&&n.length>2&&r.push(n),r}function Gr(a,e,t,r,n,i,o,s,l,u){if(de(a,t)&&de(e,r)&&de(n,o)&&de(i,s)){l.push(o,s);return}var v=2/u,c=v*v,f=o-a,h=s-e,d=Math.sqrt(f*f+h*h);f/=d,h/=d;var p=t-a,g=r-e,m=n-o,S=i-s,y=p*p+g*g,b=m*m+S*S;if(y<c&&b<c){l.push(o,s);return}var x=f*p+h*g,_=-f*m-h*S,w=y-x*x,I=b-_*_;if(w<c&&x>=0&&I<c&&_>=0){l.push(o,s);return}var L=[],A=[];la(a,t,n,o,.5,L),la(e,r,i,s,.5,A),Gr(L[0],A[0],L[1],A[1],L[2],A[2],L[3],A[3],l,u),Gr(L[4],A[4],L[5],A[5],L[6],A[6],L[7],A[7],l,u)}function ny(a,e){var t=Br(a),r=[];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++],c=i[u++],f=i[u++],h=i[u++],d=i[u++],p=i[u++];Gr(s,l,v,c,f,h,d,p,o,e),s=d,l=p}r.push(o)}return r}function Vs(a,e,t){var r=a[e],n=a[1-e],i=Math.abs(r/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,c=t-v;if(c>0)for(var u=0;u<c;u++)l[u%o]+=1;return l}function io(a,e,t){for(var r=a.r0,n=a.r,i=a.startAngle,o=a.endAngle,s=Math.abs(o-i),l=s*n,u=n-r,v=l>Math.abs(u),c=Vs([l,u],v?0:1,e),f=(v?s:u)/c.length,h=0;h<c.length;h++)for(var d=(v?u:s)/c[h],p=0;p<c[h];p++){var g={};v?(g.startAngle=i+f*h,g.endAngle=i+f*(h+1),g.r0=r+d*p,g.r=r+d*(p+1)):(g.startAngle=i+d*p,g.endAngle=i+d*(p+1),g.r0=r+f*h,g.r=r+f*(h+1)),g.clockwise=a.clockwise,g.cx=a.cx,g.cy=a.cy,t.push(g)}}function iy(a,e,t){for(var r=a.width,n=a.height,i=r>n,o=Vs([r,n],i?0:1,e),s=i?"width":"height",l=i?"height":"width",u=i?"x":"y",v=i?"y":"x",c=a[s]/o.length,f=0;f<o.length;f++)for(var h=a[l]/o[f],d=0;d<o[f];d++){var p={};p[u]=f*c,p[v]=d*h,p[s]=c,p[l]=h,p.x+=a.x,p.y+=a.y,t.push(p)}}function oo(a,e,t,r){return a*r-t*e}function oy(a,e,t,r,n,i,o,s){var l=t-a,u=r-e,v=o-n,c=s-i,f=oo(v,c,l,u);if(Math.abs(f)<1e-6)return null;var h=a-n,d=e-i,p=oo(h,d,v,c)/f;return p<0||p>1?null:new Ut(p*l+a,p*u+e)}function sy(a,e,t){var r=new Ut;Ut.sub(r,t,e),r.normalize();var n=new Ut;Ut.sub(n,a,e);var i=n.dot(r);return i}function fe(a,e){var t=a[a.length-1];t&&t[0]===e[0]&&t[1]===e[1]||a.push(e)}function ly(a,e,t){for(var r=a.length,n=[],i=0;i<r;i++){var o=a[i],s=a[(i+1)%r],l=oy(o[0],o[1],s[0],s[1],e.x,e.y,t.x,t.y);l&&n.push({projPt:sy(l,e,t),pt:l,idx:i})}if(n.length<2)return[{points:a},{points:a}];n.sort(function(g,m){return g.projPt-m.projPt});var u=n[0],v=n[n.length-1];if(v.idx<u.idx){var c=u;u=v,v=c}for(var f=[u.pt.x,u.pt.y],h=[v.pt.x,v.pt.y],d=[f],p=[h],i=u.idx+1;i<=v.idx;i++)fe(d,a[i].slice());fe(d,h),fe(d,f);for(var i=v.idx+1;i<=u.idx+r;i++)fe(p,a[i%r].slice());return fe(p,f),fe(p,h),[{points:d},{points:p}]}function so(a){var e=a.points,t=[],r=[];ba(e,t,r);var n=new ht(t[0],t[1],r[0]-t[0],r[1]-t[1]),i=n.width,o=n.height,s=n.x,l=n.y,u=new Ut,v=new Ut;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),ly(e,u,v)}function ga(a,e,t,r){if(t===1)r.push(e);else{var n=Math.floor(t/2),i=a(e);ga(a,i[0],n,r),ga(a,i[1],t-n,r)}return r}function uy(a,e){for(var t=[],r=0;r<e;r++)t.push(on(a));return t}function vy(a,e){e.setStyle(a.style),e.z=a.z,e.z2=a.z2,e.zlevel=a.zlevel}function cy(a){for(var e=[],t=0;t<a.length;)e.push([a[t++],a[t++]]);return e}function fy(a,e){var t=[],r=a.shape,n;switch(a.type){case"rect":iy(r,e,t),n=qt;break;case"sector":io(r,e,t),n=Re;break;case"circle":io({r0:0,r:r.r,startAngle:0,endAngle:Math.PI*2,cx:r.cx,cy:r.cy},e,t),n=Re;break;default:var i=a.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=H(ny(a.getUpdatedPathProxy(),o),function(m){return cy(m)}),l=s.length;if(l===0)ga(so,{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,c=H(s,function(m){var S=[],y=[];ba(m,S,y);var b=(y[1]-S[1])*(y[0]-S[0]);return v+=b,{poly:m,area:b}});c.sort(function(m,S){return S.area-m.area});for(var f=e,u=0;u<l;u++){var h=c[u];if(f<=0)break;var d=u===l-1?f:Math.ceil(h.area/v*e);d<0||(ga(so,{points:h.poly},d,t),f-=d)}}n=Ee;break}if(!n)return uy(a,e);for(var p=[],u=0;u<t.length;u++){var g=new n;g.setShape(t[u]),vy(a,g),p.push(g)}return p}function hy(a,e){var t=a.length,r=e.length;if(t===r)return[a,e];for(var n=[],i=[],o=t<r?a:e,s=Math.min(t,r),l=Math.abs(r-t)/6,u=(s-2)/6,v=Math.ceil(l/u)+1,c=[o[0],o[1]],f=l,h=2;h<s;){var d=o[h-2],p=o[h-1],g=o[h++],m=o[h++],S=o[h++],y=o[h++],b=o[h++],x=o[h++];if(f<=0){c.push(g,m,S,y,b,x);continue}for(var _=Math.min(f,v-1)+1,w=1;w<=_;w++){var I=w/_;la(d,g,S,b,I,n),la(p,m,y,x,I,i),d=n[3],p=i[3],c.push(n[1],i[1],n[2],i[2],d,p),g=n[5],m=i[5],S=n[6],y=i[6]}f-=_-1}return o===a?[c,e]:[a,c]}function lo(a,e){for(var t=a.length,r=a[t-2],n=a[t-1],i=[],o=0;o<e.length;)i[o++]=r,i[o++]=n;return i}function py(a,e){for(var t,r,n,i=[],o=[],s=0;s<Math.max(a.length,e.length);s++){var l=a[s],u=e[s],v=void 0,c=void 0;l?u?(t=hy(l,u),v=t[0],c=t[1],r=v,n=c):(c=lo(n||l,l),v=l):(v=lo(r||u,u),c=u),i.push(v),o.push(c)}return[i,o]}function uo(a){for(var e=0,t=0,r=0,n=a.length,i=0,o=n-2;i<n;o=i,i+=2){var s=a[o],l=a[o+1],u=a[i],v=a[i+1],c=s*v-u*l;e+=c,t+=(s+u)*c,r+=(l+v)*c}return e===0?[a[0]||0,a[1]||0]:[t/e/3,r/e/3,e]}function dy(a,e,t,r){for(var n=(a.length-2)/6,i=1/0,o=0,s=a.length,l=s-2,u=0;u<n;u++){for(var v=u*6,c=0,f=0;f<s;f+=2){var h=f===0?v:(v+f-2)%l+2,d=a[h]-t[0],p=a[h+1]-t[1],g=e[f]-r[0],m=e[f+1]-r[1],S=g-d,y=m-p;c+=S*S+y*y}c<i&&(i=c,o=u)}return o}function gy(a){for(var e=[],t=a.length,r=0;r<t;r+=2)e[r]=a[t-r-2],e[r+1]=a[t-r-1];return e}function yy(a,e,t,r){for(var n=[],i,o=0;o<a.length;o++){var s=a[o],l=e[o],u=uo(s),v=uo(l);i==null&&(i=u[2]<0!=v[2]<0);var c=[],f=[],h=0,d=1/0,p=[],g=s.length;i&&(s=gy(s));for(var m=dy(s,l,u,v)*6,S=g-2,y=0;y<S;y+=2){var b=(m+y)%S+2;c[y+2]=s[b]-u[0],c[y+3]=s[b+1]-u[1]}if(c[0]=s[m]-u[0],c[1]=s[m+1]-u[1],t>0)for(var x=r/t,_=-r/2;_<=r/2;_+=x){for(var w=Math.sin(_),I=Math.cos(_),L=0,y=0;y<s.length;y+=2){var A=c[y],D=c[y+1],C=l[y]-v[0],P=l[y+1]-v[1],T=C*I-P*w,M=C*w+P*I;p[y]=T,p[y+1]=M;var E=T-A,R=M-D;L+=E*E+R*R}if(L<d){d=L,h=_;for(var k=0;k<p.length;k++)f[k]=p[k]}}else for(var V=0;V<g;V+=2)f[V]=l[V]-v[0],f[V+1]=l[V+1]-v[1];n.push({from:c,to:f,fromCp:u,toCp:v,rotation:-h})}return n}function ya(a){return a.__isCombineMorphing}var Bs="__mOriginal_";function ma(a,e,t){var r=Bs+e,n=a[r]||a[e];a[r]||(a[r]=a[e]);var i=t.replace,o=t.after,s=t.before;a[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(a,e){var t=Bs+e;a[t]&&(a[e]=a[t],a[t]=null)}function vo(a,e){for(var t=0;t<a.length;t++)for(var r=a[t],n=0;n<r.length;){var i=r[n],o=r[n+1];r[n++]=e[0]*i+e[2]*o+e[4],r[n++]=e[1]*i+e[3]*o+e[5]}}function Gs(a,e){var t=a.getUpdatedPathProxy(),r=e.getUpdatedPathProxy(),n=py(Br(t),Br(r)),i=n[0],o=n[1],s=a.getComputedTransform(),l=e.getComputedTransform();function u(){this.transform=null}s&&vo(i,s),l&&vo(o,l),ma(e,"updateTransform",{replace:u}),e.transform=null;var v=yy(i,o,10,Math.PI),c=[];ma(e,"buildPath",{replace:function(f){for(var h=e.__morphT,d=1-h,p=[],g=0;g<v.length;g++){var m=v[g],S=m.from,y=m.to,b=m.rotation*h,x=m.fromCp,_=m.toCp,w=Math.sin(b),I=Math.cos(b);Fu(p,x,_,h);for(var L=0;L<S.length;L+=2){var A=S[L],D=S[L+1],C=y[L],P=y[L+1],T=A*d+C*h,M=D*d+P*h;c[L]=T*I-M*w+p[0],c[L+1]=T*w+M*I+p[1]}var E=c[0],R=c[1];f.moveTo(E,R);for(var L=2;L<S.length;){var C=c[L++],P=c[L++],k=c[L++],V=c[L++],G=c[L++],z=c[L++];E===C&&R===P&&k===G&&V===z?f.lineTo(G,z):f.bezierCurveTo(C,P,k,V,G,z),E=G,R=z}}}})}function Dn(a,e,t){if(!a||!e)return e;var r=t.done,n=t.during;Gs(a,e),e.__morphT=0;function i(){Ce(e,"buildPath"),Ce(e,"updateTransform"),e.__morphT=-1,e.createPathProxy(),e.dirtyShape()}return e.animateTo({__morphT:1},pt({during:function(o){e.dirtyShape(),n&&n(o)},done:function(){i(),r&&r()}},t)),e}function my(a,e,t,r,n,i){var o=16;a=n===t?0:Math.round(32767*(a-t)/(n-t)),e=i===r?0:Math.round(32767*(e-r)/(i-r));for(var s=0,l,u=(1<<o)/2;u>0;u/=2){var v=0,c=0;(a&u)>0&&(v=1),(e&u)>0&&(c=1),s+=u*u*(3*v^c),c===0&&(v===1&&(a=u-1-a,e=u-1-e),l=a,a=e,e=l)}return s}function Sa(a){var e=1/0,t=1/0,r=-1/0,n=-1/0,i=H(a,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),v=l.x+l.width/2+(u?u[4]:0),c=l.y+l.height/2+(u?u[5]:0);return e=Math.min(v,e),t=Math.min(c,t),r=Math.max(v,r),n=Math.max(c,n),[v,c]}),o=H(i,function(s,l){return{cp:s,z:my(s[0],s[1],e,t,r,n),path:a[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function Os(a){return fy(a.path,a.count)}function Or(){return{fromIndividuals:[],toIndividuals:[],count:0}}function Sy(a,e,t){var r=[];function n(x){for(var _=0;_<x.length;_++){var w=x[_];ya(w)?n(w.childrenRef()):w instanceof dt&&r.push(w)}}n(a);var i=r.length;if(!i)return Or();var o=t.dividePath||Os,s=o({path:e,count:i});if(s.length!==i)return console.error("Invalid morphing: unmatched splitted path"),Or();r=Sa(r),s=Sa(s);for(var l=t.done,u=t.during,v=t.individualDelay,c=new So,f=0;f<i;f++){var h=r[f],d=s[f];d.parent=e,d.copyTransform(c),v||Gs(h,d)}e.__isCombineMorphing=!0,e.childrenRef=function(){return s};function p(x){for(var _=0;_<s.length;_++)s[_].addSelfToZr(x)}ma(e,"addSelfToZr",{after:function(x){p(x)}}),ma(e,"removeSelfFromZr",{after:function(x){for(var _=0;_<s.length;_++)s[_].removeSelfFromZr(x)}});function g(){e.__isCombineMorphing=!1,e.__morphT=-1,e.childrenRef=null,Ce(e,"addSelfToZr"),Ce(e,"removeSelfFromZr")}var m=s.length;if(v)for(var S=m,y=function(){S--,S===0&&(g(),l&&l())},f=0;f<m;f++){var b=v?pt({delay:(t.delay||0)+v(f,m,r[f],s[f]),done:y},t):t;Dn(r[f],s[f],b)}else e.__morphT=0,e.animateTo({__morphT:1},pt({during:function(x){for(var _=0;_<m;_++){var w=s[_];w.__morphT=e.__morphT,w.dirtyShape()}u&&u(x)},done:function(){g();for(var x=0;x<a.length;x++)Ce(a[x],"updateTransform");l&&l()}},t));return e.__zr&&p(e.__zr),{fromIndividuals:r,toIndividuals:s,count:m}}function by(a,e,t){var r=e.length,n=[],i=t.dividePath||Os;function o(h){for(var d=0;d<h.length;d++){var p=h[d];ya(p)?o(p.childrenRef()):p instanceof dt&&n.push(p)}}if(ya(a)){o(a.childrenRef());var s=n.length;if(s<r)for(var l=0,u=s;u<r;u++)n.push(on(n[l++%s]));n.length=r}else{n=i({path:a,count:r});for(var v=a.getComputedTransform(),u=0;u<n.length;u++)n[u].setLocalTransform(v);if(n.length!==r)return console.error("Invalid morphing: unmatched splitted path"),Or()}n=Sa(n),e=Sa(e);for(var c=t.individualDelay,u=0;u<r;u++){var f=c?pt({delay:(t.delay||0)+c(u,r,n[u],e[u])},t):t;Dn(n[u],e[u],f)}return{fromIndividuals:n,toIndividuals:e,count:e.length}}function co(a){return W(a[0])}function fo(a,e){for(var t=[],r=a.length,n=0;n<r;n++)t.push({one:a[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%r].many.push(e[n][o])}for(var s=0,n=r-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 _y={clone:function(a){for(var e=[],t=1-Math.pow(1-a.path.style.opacity,1/a.count),r=0;r<a.count;r++){var n=on(a.path);n.setStyle("opacity",t),e.push(n)}return e},split:null};function hr(a,e,t,r,n,i){if(!a.length||!e.length)return;var o=sn("update",r,n);if(!(o&&o.duration>0))return;var s=r.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,v;co(a)&&(u=a,v=e),co(e)&&(u=e,v=a);function c(m,S,y,b,x){var _=m.many,w=m.one;if(_.length===1&&!x){var I=S?_[0]:w,L=S?w:_[0];if(ya(I))c({many:[I],one:L},!0,y,b,!0);else{var A=s?pt({delay:s(y,b)},l):l;Dn(I,L,A),i(I,L,I,L,A)}}else for(var D=pt({dividePath:_y[t],individualDelay:s&&function(R,k,V,G){return s(R+y,b)}},l),C=S?Sy(_,w,D):by(w,_,D),P=C.fromIndividuals,T=C.toIndividuals,M=P.length,E=0;E<M;E++){var A=s?pt({delay:s(E,M)},l):l;i(P[E],T[E],S?_[E]:m.one,S?m.one:_[E],A)}}for(var f=u?u===a:a.length>e.length,h=u?fo(v,u):fo(f?e:a,[f?a:e]),d=0,p=0;p<h.length;p++)d+=h[p].many.length;for(var g=0,p=0;p<h.length;p++)c(h[p],f,g,d),g+=h[p].many.length}function ae(a){if(!a)return[];if(W(a)){for(var e=[],t=0;t<a.length;t++)e.push(ae(a[t]));return e}var r=[];return a.traverse(function(n){n instanceof dt&&!n.disableMorphing&&!n.invisible&&!n.ignore&&r.push(n)}),r}var zs=1e4,xy=xt();function wy(a){for(var e=a.dimensions,t=0;t<e.length;t++){var r=a.getDimensionInfo(e[t]);if(r&&r.otherDims.itemGroupId===0)return e[t]}}function ho(a){var e=[];return N(a,function(t){var r=t.data;if(!(r.count()>zs))for(var n=r.getIndices(),i=wy(r),o=0;o<n.length;o++)e.push({data:r,dim:t.dim||i,divide:t.divide,dataIndex:o})}),e}function pr(a,e,t){a.traverse(function(r){r instanceof dt&&Dt(r,{style:{opacity:0}},e,{dataIndex:t,isFrom:!0})})}function dr(a){if(a.parent){var e=a.getComputedTransform();a.setLocalTransform(e),a.parent.remove(a)}}function he(a){a.stopAnimation(),a.isGroup&&a.traverse(function(e){e.stopAnimation()})}function Iy(a,e,t){var r=sn("update",t,e);r&&a.traverse(function(n){if(n instanceof Ur){var i=Hu(n);i&&n.animateFrom({style:i},r)}})}function Ay(a,e){var t=a.length;if(t!==e.length)return!1;for(var r=0;r<t;r++){var n=a[r],i=e[r];if(n.data.getId(n.dataIndex)!==i.data.getId(i.dataIndex))return!1}return!0}function Fs(a,e,t){var r=ho(a),n=ho(e);function i(m,S,y,b,x){(y||m)&&S.animateFrom({style:y&&y!==m?U(U({},y.style),m.style):m.style},x)}function o(m){for(var S=0;S<m.length;S++)if(m[S].dim)return m[S].dim}var s=o(r),l=o(n),u=!1;function v(m,S){return function(y){var b=y.data,x=y.dataIndex;if(S)return b.getId(x);var _=b.hostModel&&b.hostModel.get("dataGroupId"),w=m?s||l:l||s,I=w&&b.getDimensionInfo(w),L=I&&I.ordinalMeta;if(I){var A=b.get(I.name,x);return L&&L.categories[A]||A+""}var D=b.getRawDataItem(x);return D&&D.groupId?D.groupId+"":_||b.getId(x)}}var c=Ay(r,n),f={};if(!c)for(var h=0;h<n.length;h++){var d=n[h],p=d.data.getItemGraphicEl(d.dataIndex);p&&(f[p.id]=!0)}function g(m,S){var y=r[S],b=n[m],x=b.data.hostModel,_=y.data.getItemGraphicEl(y.dataIndex),w=b.data.getItemGraphicEl(b.dataIndex);if(_===w){w&&Iy(w,b.dataIndex,x);return}_&&f[_.id]||w&&(he(w),_?(he(_),dr(_),u=!0,hr(ae(_),ae(w),b.divide,x,m,i)):pr(w,x,m))}new ge(r,n,v(!0,c),v(!1,c),null,"multiple").update(g).updateManyToOne(function(m,S){var y=n[m],b=y.data,x=b.hostModel,_=b.getItemGraphicEl(y.dataIndex),w=At(H(S,function(I){return r[I].data.getItemGraphicEl(r[I].dataIndex)}),function(I){return I&&I!==_&&!f[I.id]});_&&(he(_),w.length?(N(w,function(I){he(I),dr(I)}),u=!0,hr(ae(w),ae(_),y.divide,x,m,i)):pr(_,x,y.dataIndex))}).updateOneToMany(function(m,S){var y=r[S],b=y.data.getItemGraphicEl(y.dataIndex);if(!(b&&f[b.id])){var x=At(H(m,function(w){return n[w].data.getItemGraphicEl(n[w].dataIndex)}),function(w){return w&&w!==b}),_=n[m[0]].data.hostModel;x.length&&(N(x,function(w){return he(w)}),b?(he(b),dr(b),u=!0,hr(ae(b),ae(x),y.divide,_,m[0],i)):N(x,function(w){return pr(w,_,m[0])}))}}).updateManyToMany(function(m,S){new ge(S,m,function(y){return r[y].data.getId(r[y].dataIndex)},function(y){return n[y].data.getId(n[y].dataIndex)}).update(function(y,b){g(m[y],S[b])}).execute()}).execute(),u&&N(e,function(m){var S=m.data,y=S.hostModel,b=y&&t.getViewOfSeriesModel(y),x=sn("update",y,0);b&&y.isAnimationEnabled()&&x&&x.duration>0&&b.group.traverse(function(_){_ instanceof dt&&!_.animators.length&&_.animateFrom({style:{opacity:0}},x)})})}function po(a){var e=a.getModel("universalTransition").get("seriesKey");return e||a.id}function go(a){return W(a)?a.sort().join(","):a}function Ft(a){if(a.hostModel)return a.hostModel.getModel("universalTransition").get("divideShape")}function Ly(a,e){var t=ne(),r=ne(),n=ne();return N(a.oldSeries,function(i,o){var s=a.oldData[o],l=po(i),u=go(l);r.set(u,s),W(l)&&N(l,function(v){n.set(v,{data:s,key:u})})}),N(e.updatedSeries,function(i){if(i.isUniversalTransitionEnabled()&&i.isAnimationEnabled()){var o=i.getData(),s=po(i),l=go(s),u=r.get(l);if(u)t.set(l,{oldSeries:[{divide:Ft(u),data:u}],newSeries:[{divide:Ft(o),data:o}]});else if(W(s)){var v=[];N(s,function(h){var d=r.get(h);d&&v.push({divide:Ft(d),data:d})}),v.length&&t.set(l,{oldSeries:v,newSeries:[{data:o,divide:Ft(o)}]})}else{var c=n.get(s);if(c){var f=t.get(c.key);f||(f={oldSeries:[{data:c.data,divide:Ft(c.data)}],newSeries:[]},t.set(c.key,f)),f.newSeries.push({data:o,divide:Ft(o)})}}}}),t}function yo(a,e){for(var t=0;t<a.length;t++){var r=e.seriesIndex!=null&&e.seriesIndex===a[t].seriesIndex||e.seriesId!=null&&e.seriesId===a[t].id;if(r)return t}}function Dy(a,e,t,r){var n=[],i=[];N(kt(a.from),function(o){var s=yo(e.oldSeries,o);s>=0&&n.push({data:e.oldData[s],divide:Ft(e.oldData[s]),dim:o.dimension})}),N(kt(a.to),function(o){var s=yo(t.updatedSeries,o);if(s>=0){var l=t.updatedSeries[s].getData();i.push({data:l,divide:Ft(l),dim:o.dimension})}}),n.length>0&&i.length>0&&Fs(n,i,r)}function Ty(a){a.registerUpdateLifecycle("series:beforeupdate",function(e,t,r){N(kt(r.seriesTransition),function(n){N(kt(n.to),function(i){for(var o=r.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][Ra]=!0)})})}),a.registerUpdateLifecycle("series:transition",function(e,t,r){var n=xy(t);if(n.oldSeries&&r.updatedSeries&&r.optionChanged){var i=r.seriesTransition;if(i)N(kt(i),function(f){Dy(f,n,r,t)});else{var o=Ly(n,r);N(o.keys(),function(f){var h=o.get(f);Fs(h.oldSeries,h.newSeries,t)})}N(r.updatedSeries,function(f){f[Ra]&&(f[Ra]=!1)})}for(var s=e.getSeries(),l=n.oldSeries=[],u=n.oldData=[],v=0;v<s.length;v++){var c=s[v].getData();c.count()<zs&&(l.push(s[v]),u.push(c))}})}$([ry]);$([Wu]);$([Uu,$u,Zu,Xu,Yu,qu,tc,Vc,cf,bf,Pf,Uf,yh,Ph,Kh,rp,_p,Pp,Ku,Op,Qp,Dd]);$(Ju);$(Qu);$(ju);$(Ud);$(Bo);$(tv);$(ev);$(av);$(rv);$(Uo);$(lg);$(nv);$(iv);$(mg);$(Lg);$(Rg);$(ov);$(sv);$(lv);$(uv);$(vv);$(cv);$(fv);$(hv);$(Xg);$(Kg);$(Ty);$(wv);var Cy="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJIAAACACAYAAADgZTAeAAAAAXNSR0IArs4c6QAACSdJREFUeF7tnW125jQMhTMrgVkJsJJhVgJdCbMTmJXATuDctu5JQ17rSrJsJVX+tOckkW350YcVJ++nrY47a+DXbdt+2LbtKXqQn6IbKPnLNPDztm1/vrb+ezRMBdKyeQ5vGBABpnaEwlQghc/nkgZ+3Lbt75OW/9m27XNEjwqkCK3mkIn86I8HMP2ybRugGnYUSMNUmU4QvBJA2oe31klANBSmAind/A/t0D7hPgoGTN9GJeEF0tB5SykMXglh7uwYBlOBlHLuxU7B0/wlXvVywaPEe3+7e0VXIJGzkeyyf1+TZcD0/TVEHbsIgL68eiP8Lx0Ic1+lix6dL5Csmlt339lqDCGqQYX/G0DaXpqT8AJJq+r11/dynhG9M8FUII1Q/VwZCGvRhzoJL5Cip2S8fCZ5HtUqcibkTuJRIIkqSnnBLJjoMFcgpeSE6tRv27Zh2R59IIlHFbx7FEiShnKen+WR2ujFOlOBlBOUXq96jz2iRiOGuAIpSvUxcmeFs7Ped0NcgRQz4RFSjxvVItqQZCJXOn00UyBJqlt/vrcdZHbvHm6MK5BmT4WuvRX5kNTD09pSgSSpbd35Rzsc1/XopeVTr1QgrZ6W8/ajn6d5R/2/nQIFklelY+/PlA/1RgavhBD3lngXSGNB8EgDRFiZMXuHPO2MuvddOaBAGqVWn5yMSTUzordyQIHEqCv2mpVFRu/I3hLvAsmrSt/9GYqMvhG8PDh+KpC8arTdf5Wkmhnd83O4lSBBmcgN8LUMHO1FvrMX+pgB1TXrNPBtNkiA5KdJ+2jWqfUDtjwDJMCDhLI8zY0BiwQJ4KBCe5W6yI2nOX5oESDdKZGMn4GbtDASJACEEPboPfObqKyGcaKBr6NAumpltqgYo4HPI0DKut1hjIpKiqSB550AXpCyb3eQlFDn/Rp4ft4mgdS+aLEvGLamca5WZP6JuKqEd1tJzkBq8Mx4+e6qSrx7v9v3Jfd/99+cxKd03r0EcATpyk+i7z65I8cHCLAxrUUUQOL6OGkD6WqbqkYq9aPJCvlEMkCqpfvHQunhu2keNQCkWnl5NHite0MgggoAEr4QX6uvawFh6S39rSOLcIA04wtglr7VPeM0IH5NxNtUeSSvBvPfT33fyDsMgHSHfcNePdz1/ikQtRypQLonRiHL/EeqquX/PSHCqMJWaGcqA0hVjLwfTFMhaqENf2sryH1gmg7RHqTaHnsPkMKX+b0cqZ2rEHd9mKRtQWEjPDZcnilM1eGCl3mjfWg7jrKACp/34Q3gR49dW0E8PZJcIZJw7FGqZ3EeLcff6/qttRHdk0BCG7XZbYSmY2Us9Ua90LYfdu1XioXAK325NyqQvFOY4/4ldaPj0JnQNvsHVHJMzzV6Me2hrKQOBiTIqD1LkibXnA/drKYZEgtS7aLUaHXOtVOf7ktDYkGqrSaSJuefT+ON2GQb1xVI80GRWmSdgCRnyHm2M1VLGqLuYUKWPg45G0WBNGxupwpaXoC0LP9xTxUlp3LSbSxFAdIKUtWS8oCUzhtpku0CKQdIKb2RBqQqSuYAKcXjEE+yXSWA9SCleRxSIK2HwdODVAVIa7KN+6qW5MHAfy9bqvG3ZJCg6VyBZFDwoFtSeyNtsl21pEFUGMRoDN4g3n+LpoMFkl/fFglpl/z7wWhAqlqSBQP/PSkLkJ5ku2pJfii0Ei7hjbQ5UoGkxcB/fdoCpMcjVWjzg6GRcBlvpPVIlWxrMPBfexlvpAVpxadvsIGrveXbfkzZP0X5JaR+HHKmPs2qbQVIZx+5wDja7+Pih5ZnHGhv5mvr6XZASkrWgDT7w+6ZcoTZe9bTV7I9yfZHBmn22C9RO7IWJD+yVc5+zqiJFFLUmXJe0+HZL0lmssqZIGUK6TSEGpBmv7at6Rs9YOOFBZKgOM1kzQQpm1XOXLFeLtHW1JFmV7WzLX9nFmMzhXTagbMeyWOR8C64X3Nks8qZILFzotFn+LVspz0gwcKQqGuObFZp8cj4Woi2iJnqCyOaCWNBsiab8EZPBpDYfmnG6rnWAhIec7QKPNt2ttyQ7ffzL0gyh7Ug1x48akoHWZWpWWxgDPhJc+hNc2TLDem+R4K0B0JTzMyWHzVlakDCGOCRtCH9cg9rm3JYkDQe5Uy2BqRs+VEbj0YHzRg040Y7t8+RNEqEQo5eRZNjsXDTbnfQhRoomjFoFym3B0nj1s+UwSo0s2vXgNSMwZKkX2pDmya0aZVxpghWRtZEG/piFxzHMWgARDu3BUlTjOuBwITHrIm2BqTjykujP7RzyZUbk4+wYQlK6CXKjGVmViKb5x2NgfXGLUpkDu8P082RIEkQMEBmViIL0pkxsWERE5VZBy6QGAUyqw3GMhk5gxZhajGMIUDomXFqwltmHbhAYqyJTRCZPImVpSbBeQNjUD1vwoT21sWstTQXSIwCmBCJTjCysibcDEi9xQbr0S65cmMAkLyIZsnOKFPKtZyOxXw745l7RqD58emsOnB5pJEgMXlS1mTTCxImgfFql0y4GY8kVbW1oUgKb1mTTanfUvkD5xlDuiVIzMC1iSEzIRkTbqbfjGEycrIakzm0MctWRnn7DjAytV7OnPgobhwV4pnxM95N0fX4SyUIpOTYks8wXi5jsjkKJHb1mtErmz2SBJJmxbbvhOTeLYBGm93IXFHSK8aS0ZjMIEkrFWsIkuRmzBEkkDS5IuOVMxpTGEga5WnzpGyuXQJJShOOkyCVAm4FkhSCrCAxFmn1dhEhjumvFiRJZkavbPZIUoKpVZ4mT8qUI0grrahc0WqoEcbUlSmB0HPnVuW1Dl3JtUsgWaGX5GYL72aPFAmStHLJ5NqlvlpBwsT0vL7XWKd5pp5HkqzFO9HS5EAJWfIkyXt6dNEzVo/caRChoR5I0RPNyM+ycpHKFdClJQxJxprJmMw5kmSFEOyxGAYkyMcE4e/KQ1q9om+WMMTqAEl36qPnkRgrtFoi7mOUmKXCK61erUbFGKtHx9Pg64HEWKFnkCxIFksfrUCpGNna0y7XWZA8yfxoXZzKGwGSdZAsSBnyJBYkbZ5UIO2wtHoMFiRPHjbKGleDlMGYzMk2ciTmQ1EYJJbp2uOOIGm9M3QAryQdbdEhXbfs/H9/quTL/XRR5AAAAABJRU5ErkJggg==",My="/assets/pig.1954f6a8.png",Py="/assets/lbx.1a174c2d.png",Ey="/assets/jt.477e4b93.png";const Hs=document.createElement("img");Hs.style.height="8px";Hs.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6+R8AAAAAXNSR0IArs4c6QAAAOlJREFUKFPFkN9qwjAUh09OkzRN0lrbOllhIOxd9h678a0HwkbFWmtsq17I2pE6iuKNbIOdqx/nD+fjI8nL6xxsISPQnrpzRgJte507JP2MtB0ZjvrOfTUchcns0RSLJYADfjhNapMVlHtciEA11WrrqbFGpM6+Xu9+9+k+sPPW8CmePD9t1m/vVsIoTCe78iPnrnKFF+jKLDeejnwHGbWo/4AXPczSMl9kvb1omtRlVnCmXK60bIy1F2tE/BN7DgB8fku8zLdeBxF+lPZIFk8GcXiockOpYExIcWzK2pUjiQTxuN82P7L3BSnVXLvzcNTUAAAAAElFTkSuQmCC";const Ws=document.createElement("img");Ws.style.height="8px";Ws.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAIAAAAmKNuZAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyNpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ4IDc5LjE2NDAzNiwgMjAxOS8wOC8xMy0wMTowNjo1NyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIDIxLjAgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkFDQ0Q2RjYyQTdDRDExRUI4ODUxRDIxRjkzMEExNzg2IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkFDQ0Q2RjYzQTdDRDExRUI4ODUxRDIxRjkzMEExNzg2Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QUNDRDZGNjBBN0NEMTFFQjg4NTFEMjFGOTMwQTE3ODYiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QUNDRDZGNjFBN0NEMTFFQjg4NTFEMjFGOTMwQTE3ODYiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz6FboimAAAASklEQVR42mIUnL9XtHsDAzXA69IARjWtXJYX7+FCfyQEKeEyMVAVDG7jWCB+RhaihAsybjQqRqNiNCpGo2I0KoZZVDBSt9oGCDAAhYNrvRu3DWEAAAAASUVORK5CYII=";const mo="image://https://www.makeapie.cn/asset/get/s/data-1619318279159-o6ZbTGoO0.png",Ny=qs({setup(){const a=yv(),e=le(null),t=le(!1),{setOptions:r,getInstance:n}=pv(e),i=le(),o=le(),s=le([]);let l=!1,u=null;const{rootEmitter:v}=dv(),c=le([]);function f(){t.value?h():(s.value.length>=1&&s.value.pop(),s.value.length===0&&d())}function h(){a.setAddressId(null),v.emit("map:back"),t.value=!1,o.value=We(i.value),p()}function d(){return se(this,null,function*(){const b=[{value:1,label:"\u7A3B\u6E14\u7EFC\u5408\u79CD\u517B",color:"rgb(30,54,80 , 0.8)",type:"map",data:[{value:[105.198605,29.280154]}]},{value:2,label:"\u4F18\u54C1\u67D1\u6854\u79CD\u690D",color:"rgb(54,89,114,0.8)",type:"map",data:[{value:[105.383917,29.387026]},{value:[105.194187,29.364692]}]},{value:3,label:"\u9AD8\u7CB1\u4EA7\u4E1A",color:"rgba(147, 235, 248, 0.2)",type:"map",data:[{value:[105.116049,29.388207]}]},{value:4,label:"\u6CB9\u8336\u4EA7\u4E1A",color:"rgb(172,220,243 , 0.4)",type:"map",data:[{value:[105.385775,29.334638]}]},{value:5,label:"\u751F\u732A\u4EA7\u4E1A\u5206\u5E03\u70B9",icon:`image://${My}`,type:"dot",data:[{map:"",name:"\u732A",value:[105.292327,29.401826]},{map:"",name:"\u732A",value:[105.261267,29.234182]},{map:"",name:"\u732A",value:[105.289485,29.302531]},{map:"",name:"\u732A",value:[105.190754,29.340528]}]},{value:6,label:"\u8089\u7F8A\u4EA7\u4E1A\u5206\u5E03\u70B9",icon:`image://${Cy}`,type:"dot",data:[{map:"",name:"\u7F8A",value:[105.195498,29.420684]},{map:"",name:"\u7F8A",value:[105.103861,29.351481]},{map:"",name:"\u7F8A",value:[105.368813,29.303716]}]}],x=yield gv();b.forEach(A=>{const D=x.find(C=>C.value==A.value);A=Object.assign(A,D)});const _=b.reduce((A,D)=>{var C;return(C=D.data)==null||C.forEach(P=>{A.push({type:"nylx-key",name:D.label,value:P.value,key:D.key})}),A},[]),w=b.filter(A=>A.type==="dot").map(A=>{var D;return{type:"scatter",name:A.label,coordinateSystem:"geo",tooltip:{trigger:"item",show:!0},symbol:A.icon,symbolSize:[30,30],symbolOffset:[0,0],z:9999,data:(D=A.data)==null?void 0:D.map(C=>Pa(Ma({},C),{key:A.key}))}}),I=yield(yield En(()=>import("./nylx.1d1276f1.js"),[])).default,L=b.filter(A=>A.type==="map").map(A=>Object.assign(A,{name:A.label}));qn("lcxz",I),u={legend:{right:60,bottom:40,align:"right",orient:"vertical",itemWidth:18,itemHeight:18,selectedMode:!1,textStyle:{color:"#fff"},inactiveBorderColor:"rgba(0,0,0,0)",data:b.filter(A=>A.type==="dot").map(A=>({name:A.label,icon:A.icon}))},visualMap:{right:60,bottom:100,selectedMode:!1,orient:"vertical",pieces:b.filter(A=>A.type==="map"),color:"#fff",textStyle:{color:"#fff"},visibility:"off"},backgroundColor:"transparent",stateAnimation:{duration:100},geo:{show:!0,map:"lcxz",roam:!1,zoom:1,label:{emphasis:{show:!1}},itemStyle:{normal:{borderColor:"rgba(147, 235, 248, 1)",borderWidth:1,areaColor:{type:"radial",x:.5,y:.5,r:.8,colorStops:[{offset:0,color:"rgba(147, 235, 248, 0)"},{offset:1,color:"rgba(147, 235, 248, .2)"}],globalCoord:!1},shadowColor:"rgba(128, 217, 248, 1)",shadowOffsetX:-2,shadowOffsetY:2,shadowBlur:10},emphasis:{areaColor:"#389BB7",borderWidth:0}}},series:[...w,{type:"map",zoom:1,roam:!1,map:"lcxz",name:"nylx-key",showLegendSymbol:!1,select:{disabled:!0},legend:{show:!1},label:{show:!1,color:"#fff",normal:{show:!1}},itemStyle:{borderColor:"#fff",borderWidth:.1,emphasis:{label:{show:!1},areaColor:"rgba(128, 217, 248, 0.2)",borderWidth:0}},data:L},{type:"scatter",name:"nylx-key1",zoom:1,roam:!1,coordinateSystem:"geo",stateAnimation:{duration:300,easing:"bounceOut"},label:{show:!0,align:"center",formatter:function(A){var D=A.name,C=`{tline|${D}}`;return C},color:"#fff",rich:{fline:{padding:[0,25],color:"#fff",textShadowColor:"#030615",textShadowOffsetX:1,textShadowOffsetY:1,fontSize:14,fontWeight:400},tline:{padding:[0,27],color:"#ABF8FF",fontSize:12}}},itemStyle:{color:"#00FFF6"},symbol:mo,symbolSize:[100,34],symbolOffset:[0,-26],z:999,data:_}]},r(u)})}function p(){const b=[];c.value.map(x=>{b.push(Pa(Ma({},x),{value:[x.address_lng,x.address_lat],datas:x.areas,img:"image://https://www.makeapie.cn/asset/get/s/data-1619059442567-s5l7-f8Eu9.png"}))}),qn("lcxz",o.value),u={backgroundColor:"transparent",stateAnimation:{duration:100},geo:{map:"lcxz",aspectScale:.75,layoutCenter:["50%","50.5%"],layoutSize:"100%",silent:!0,roam:!1,z:0,label:{color:"#fff",show:!1},itemStyle:{areaColor:"rgba(0, 15, 40, 0.0)",shadowColor:"rgba(0, 0, 0, 1)",shadowBlur:0,shadowOffsetX:0,shadowOffsetY:5,borderColor:"#fff",borderWidth:.1},emphasis:{itemStyle:{areaColor:"#2AB8FF",borderWidth:1,color:"green"},label:{show:!1}}},series:[{type:"map",zoom:1.1,roam:!1,map:"lcxz",select:{disabled:!0},label:{show:!1,color:"#fff",normal:{show:t.value,textStyle:{color:"#fff",fontSize:t.value?16:null}}},itemStyle:{borderColor:"rgba(147, 235, 248, 1)",borderWidth:1,areaColor:"rgb(30,54,80 , 0.8)"},emphasis:{label:{show:!0,color:"#fff"},itemStyle:{areaColor:"rgb(30,54,80 , 0.8)",borderColor:"rgba(147, 235, 248, 1)",borderWidth:1,shadowColor:"rgba(0, 255, 255, 1)",shadowBlur:10,shadowOffsetX:0,shadowOffsetY:1}}},{tooltip:{show:!1},type:"effectScatter",coordinateSystem:"geo",rippleEffect:{scale:10,brushType:"stroke"},showEffectOn:"render",symbol:"circle",zlevel:1,symbolSize:[10,5],itemStyle:{color:x=>{var _=[{type:"linear",x:1,y:0,x2:0,y2:0,colorStops:[{offset:0,color:"#64fbc5"},{offset:1,color:"#018ace"}],global:!1},{type:"linear",x:1,y:0,x2:0,y2:0,colorStops:[{offset:0,color:"#61c0f1 "},{offset:1,color:"#6f2eb6"}],global:!1}];return _[x.dataIndex%_.length]}},data:b},{type:"scatter",coordinateSystem:"geo",tooltip:{trigger:"item",show:!0},symbol:(x,_)=>b[_.dataIndex].img,symbolSize:[21,30],symbolOffset:[0,-20],z:9999,data:b},{type:"scatter",coordinateSystem:"geo",label:{show:!0,align:"center",formatter:function(x){var _=x.name,w=`{tline|${_}}`;return w},color:"#fff",rich:{fline:{padding:[0,25],color:"#fff",textShadowColor:"#030615",textShadowOffsetX:1,textShadowOffsetY:1,fontSize:14,fontWeight:400},tline:{padding:[0,27],color:"#ABF8FF",fontSize:12}}},itemStyle:{color:"#00FFF6"},symbol:mo,symbolSize:[100,34],symbolOffset:[0,-46],z:999,data:[]}]},r(u)}function g(){return se(this,null,function*(){var b;try{const x=yield Kn({parent:a.getAddresId,type:1,per_page:100,industry:(b=s.value[0])==null?void 0:b.value});c.value=x!=null?x:[]}finally{p()}})}function m(){return se(this,null,function*(){const b=yield Kn({type:2}),x=yield(yield En(()=>import("./lcxz1.2c9ba3a3.js"),[])).default;x.features.reduce((_,w)=>{const I=b.find(L=>L.name==w.properties.name);return I&&_.push(Object.assign(w,{properties:I})),_},[]),i.value=x,o.value=We(i.value),g()})}let S=null;const y=["nylx-key","nylx-key1","\u8089\u7F8A\u4EA7\u4E1A\u5206\u5E03\u70B9","\u751F\u732A\u4EA7\u4E1A\u5206\u5E03\u70B9"];return Ks(()=>se(this,null,function*(){var b,x;yield d(),(b=n())==null||b.on("mousemove",_=>{var w;y.includes(_.seriesName)||S==_.name&&_.seriesType=="scatter"||_.seriesType=="scatter"&&(S=_.name,u.series[3].data=[_.data],(w=n())==null||w.setOption({series:u.series},!1))}),(x=n())==null||x.on("click",_=>se(this,null,function*(){var w;if(!l){if(y.includes(_.seriesName)){l=!0,s.value.push({type:"nylx",value:_.data.key}),yield m(),l=!1;return}if((_.seriesType=="effectScatter"||_.seriesType=="scatter")&&v.emit("base:click",_.data),_.seriesType=="map"){const I=i.value.features.filter(L=>L.properties.name==_.name);a.setAddressId((w=I[0].properties)==null?void 0:w.id),v.emit("map:click",We(I[0].properties)),I&&(t.value=!0,o.value=We({type:"FeatureCollection",features:I}))}}}))})),Js(()=>a.getAddresId,()=>{g()}),{chartRef:e,isBack:t,onBack:h,historyMap:s,historyBack:f}}}),Ry={class:"relative h-full overflow-hidden"},ky=Me("div",{class:"absolute left-0 w-full top-0 h-full flex items-center justify-center"},[Me("img",{class:"opacity-30 w-600px h-600px map1",src:Py,alt:"",srcset:""})],-1),Vy=Me("div",{class:"absolute left-0 w-full top-0 h-full flex items-center justify-center"},[Me("img",{class:"opacity-30 w-600px h-600px map",src:Ey,alt:"",srcset:""})],-1),By={ref:"chartRef",class:"w-full h-full z-99 absolute"};function Gy(a,e,t,r,n,i){return Nn(),Rn("div",Ry,[a.historyMap.length?(Nn(),Rn("div",{key:0,onClick:e[0]||(e[0]=(...o)=>a.historyBack&&a.historyBack(...o)),class:"absolute left-25px top-25px z-999 text-white border rounded-2px px-30px py-6px text-12px cursor-pointer"},"\u8FD4\u56DE")):js("",!0),ky,Vy,Me("div",By,null,512)])}var $y=Qs(Ny,[["render",Gy]]);export{$y as default};
|