game/nginx/admin/assets/index-BjIcYfBF.js
2026-04-20 16:07:22 +08:00

9 lines
409 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

var t=(t,e,n)=>new Promise((a,i)=>{var o=t=>{try{l(n.next(t))}catch(e){i(e)}},r=t=>{try{l(n.throw(t))}catch(e){i(e)}},l=t=>t.done?a(t.value):Promise.resolve(t.value).then(o,r);l((n=n.apply(t,e)).next())});import{d as e,r as n,k as a,o as i,c1 as o,G as r,b as l,e as s,g as u,w as d,N as c,f as h,h as p,i as f,v as g,E as v,j as y,b2 as m,ai as x,p as _,b5 as b,K as w,I as S,J as I,ep as M,P as C,q as T,T as D,aV as L,n as A}from"./index-BoIUJTA2.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-l0sNRNKZ.js";import{f as P}from"./product-qKpGgPBm.js";import{$ as k,a as E,a0 as N,a1 as z,a2 as R,a3 as O,a4 as V,a5 as B,a6 as G,a7 as W,a8 as F,a9 as j,aa as Y,ab as U,ac as X,ad as H,ae as Z,af as q,ag as $,ah as K,o as Q,ai as J,u as tt,aj as et,ak as nt,G as at,al as it,am as ot,an as rt,ao as lt,ap as st,aq as ut,ar as dt,as as ct,at as ht,au as pt,av as ft,B as gt,aw as vt,ax as yt,ay as mt,az as xt,aA as _t,aB as bt,aC as wt,aD as St,aE as It,aF as Mt,aG as Ct,aH as Tt,aI as Dt,aJ as Lt,aK as At,aL as Pt,aM as kt,aN as Et,aO as Nt,aP as zt,aQ as Rt,aR as Ot,aS as Vt,aT as Bt,P as Gt,g as Wt,aU as Ft,aV as jt,aW as Yt,aX as Ut,aY as Xt,aZ as Ht,a_ as Zt,a$ as qt,b0 as $t,b1 as Kt,b2 as Qt,b3 as Jt,b4 as te,b5 as ee,b6 as ne,b7 as ae,b8 as ie,e as oe,b9 as re,ba as le,bb as se,bc as ue,bd as de,be as ce,bf as he,bg as pe,bh as fe,bi as ge,bj as ve,bk as ye,bl as me,bm as xe,bn as _e,bo as be,bp as we,bq as Se,br as Ie,bs as Me,bt as Ce,bu as Te,bv as De,bw as Le,bx as Ae,by as Pe,bz as ke,bA as Ee,bB as Ne,bC as ze,bD as Re,bE as Oe,bF as Ve,bG as Be,bH as Ge,S as We,bI as Fe,c as je,bJ as Ye,bK as Ue,bL as Xe,bM as He,bN as Ze,L as qe,bO as $e,bP as Ke,Z as Qe,bQ as Je,bR as tn,bS as en,d as nn,bT as an,bU as on,bV as rn,bW as ln,bX as sn,bY as un,bZ as dn,b_ as cn,b$ as hn,c0 as pn,c1 as fn,c2 as gn,c3 as vn,c4 as yn,c5 as mn,c6 as xn,c7 as _n,c8 as bn,c9 as wn,ca as Sn,cb as In,cc as Mn,cd as Cn,ce as Tn,cf as Dn,cg as Ln,v as An,ch as Pn,ci as kn,cj as En,ck as Nn,cl as zn,cm as Rn,cn as On,co as Vn,cp as Bn,cq as Gn,cr as Wn,cs as Fn,ct as jn,cu as Yn,cv as Un,cw as Xn,cx as Hn,cy as Zn,cz as qn,cA as $n,cB as Kn,cC as Qn,cD as Jn,cE as ta,C as ea,cF as na,cG as aa,cH as ia,cI as oa,cJ as ra,cK as la,cL as sa,cM as ua,cN as da,cO as ca,cP as ha,cQ as pa,cR as fa,cS as ga,cT as va,cU as ya,cV as ma,cW as xa,cX as _a,cY as ba,cZ as wa,q as Sa,m as Ia,b as Ma,c_ as Ca,c$ as Ta,d0 as Da,d1 as La,d2 as Aa,d3 as Pa,d4 as ka,d5 as Ea,d6 as Na,r as za,d7 as Ra,f as Oa,d8 as Va,d9 as Ba,da as Ga,db as Wa,dc as Fa,dd as ja,de as Ya,df as Ua,dg as Xa,dh as Ha,di as Za,dj as qa,dk as $a,dl as Ka,dm as Qa,dn as Ja,dp as ti,dq as ei,dr as ni,ds as ai,dt as ii,du as oi,dv as ri,dw as li,dx as si,dy as ui,dz as di,dA as ci,dB as hi,dC as pi,dD as fi,dE as gi,dF as vi,dG as yi,dH as mi,dI as xi,dJ as _i,j as bi,dK as wi,dL as Si,dM as Ii,dN as Mi,dO as Ci,dP as Ti,dQ as Di,dR as Li,dS as Ai,dT as Pi,dU as ki,dV as Ei,dW as Ni,dX as zi,dY as Ri,dZ as Oi,d_ as Vi,d$ as Bi,e0 as Gi,e1 as Wi,e2 as Fi,e3 as ji,e4 as Yi,e5 as Ui,e6 as Xi,e7 as Hi,e8 as Zi,e9 as qi,ea as $i,eb as Ki,ec as Qi,ed as Ji,ee as to,ef as eo,eg as no,eh as ao,ei as io,ej as oo,ek as ro,el as lo,em as so,en as uo,eo as co,ep as ho,eq as po,er as fo,es as go,et as vo,eu as yo,ev as mo,ew as xo,ex as _o,ey as bo,ez as wo,eA as So,eB as Io,eC as Mo,eD as Co,eE as To,eF as Do,eG as Lo,eH as Ao,eI as Po,eJ as ko,eK as Eo,eL as No,eM as zo,eN as Ro,eO as Oo,eP as Vo,eQ as Bo,eR as Go,eS as Wo,eT as Fo,Y as jo,x as Yo,w as Uo,y as Xo,z as Ho,D as Zo,F as qo,H as $o,M as Ko,W as Qo,U as Jo,K as tr,V as er,J as nr,Q as ar,T as ir,N as or,O as rr,eU as lr,eV as sr,X as ur,eW as dr,eX as cr,eY as hr,_ as pr}from"./installCanvasRenderer-D-xUkWdX.js";import{E as fr,a as gr}from"./index-BjuMygln.js";import{E as vr}from"./index-ZsMdSUVI.js";import{E as yr}from"./index-C1haaLtB.js";import{E as mr}from"./index-BaD29Izp.js";import{a as xr,E as _r}from"./index-BcfO0-fK.js";import{E as br,a as wr}from"./index-D2gD5Tn5.js";import{E as Sr}from"./index-C_S0YbqD.js";import{a as Ir,b as Mr}from"./index-DqTthkO7.js";import{E as Cr}from"./index-CjpBlozU.js";import{E as Tr}from"./index-BjQJlHTd.js";import{E as Dr}from"./index-C_sVHlWz.js";import{E as Lr}from"./index-CXD7B41Z.js";import{E as Ar}from"./index-Dy3gZN7-.js";import{E as Pr}from"./index-BneqRonp.js";import{E as kr}from"./index-B18-crhn.js";import{_ as Er}from"./_plugin-vue_export-helper-BCo6x5W8.js";import"./index-Cp4NEpJ7.js";import"./index-BMeOzN3u.js";import"./index-COyGylbk.js";import"./index-Bq8lawOo.js";import"./_initCloneObject-DRmC-q3t.js";import"./isArrayLikeObject-CFQi-X2M.js";import"./raf-DsHSIRfX.js";import"./_baseIteratee-CtIat01j.js";import"./castArray-nM8ho4U3.js";import"./debounce-DQl5eUwG.js";import"./index-D8nVJoNy.js";import"./index-CXORCV4U.js";import"./_baseClone-Ct7RL6h5.js";import"./token-DWNpOE8r.js";import"./index-BnK4BbY2.js";import"./use-dialog-FwJ-QdmW.js";import"./refs-Cw5r5QN8.js";import"./index-1OHUSGeP.js";function Nr(t){if(t){for(var e=[],n=0;n<t.length;n++)e.push(t[n].slice());return e}}function zr(t,e){var n=t.label,a=e&&e.getTextGuideLine();return{dataIndex:t.dataIndex,dataType:t.dataType,seriesIndex:t.seriesModel.seriesIndex,text:t.label.style.text,rect:t.hostRect,labelRect:t.rect,align:n.style.align,verticalAlign:n.style.verticalAlign,labelLinePoints:Nr(a&&a.shape.points)}}var Rr=["align","verticalAlign","width","height","fontSize"],Or=new N,Vr=k(),Br=k();function Gr(t,e,n){for(var a=0;a<n.length;a++){var i=n[a];null!=e[i]&&(t[i]=e[i])}}var Wr=["x","y","rotation"],Fr=function(){function t(){this._labelList=[],this._chartViewList=[]}return t.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},t.prototype._addLabel=function(t,e,n,a,i){var o=a.style,r=a.__hostTarget.textConfig||{},l=a.getComputedTransform(),s=a.getBoundingRect().plain();E.applyTransform(s,s,l),l?Or.setLocalTransform(l):(Or.x=Or.y=Or.rotation=Or.originX=Or.originY=0,Or.scaleX=Or.scaleY=1),Or.rotation=z(Or.rotation);var u,d=a.__hostTarget;if(d){u=d.getBoundingRect().plain();var c=d.getComputedTransform();E.applyTransform(u,u,c)}var h=u&&d.getTextGuideLine();this._labelList.push({label:a,labelLine:h,seriesModel:n,dataIndex:t,dataType:e,layoutOptionOrCb:i,layoutOption:null,rect:s,hostRect:u,priority:u?u.width*u.height:0,defaultAttr:{ignore:a.ignore,labelGuideIgnore:h&&h.ignore,x:Or.x,y:Or.y,scaleX:Or.scaleX,scaleY:Or.scaleY,rotation:Or.rotation,style:{x:o.x,y:o.y,align:o.align,verticalAlign:o.verticalAlign,width:o.width,height:o.height,fontSize:o.fontSize},cursor:a.cursor,attachedPos:r.position,attachedRot:r.rotation}})},t.prototype.addLabelsOfSeries=function(t){var e=this;this._chartViewList.push(t);var n=t.__model,a=n.get("labelLayout");(R(a)||O(a).length)&&t.group.traverse(function(t){if(t.ignore)return!0;var i=t.getTextContent(),o=V(t);i&&!i.disableLabelLayout&&e._addLabel(o.dataIndex,o.dataType,n,i,a)})},t.prototype.updateLayoutConfig=function(t){var e=t.getWidth(),n=t.getHeight();function a(t,e){return function(){Z(t,e)}}for(var i=0;i<this._labelList.length;i++){var o=this._labelList[i],r=o.label,l=r.__hostTarget,s=o.defaultAttr,u=void 0;u=(u=R(o.layoutOptionOrCb)?o.layoutOptionOrCb(zr(o,l)):o.layoutOptionOrCb)||{},o.layoutOption=u;var d=Math.PI/180;l&&l.setTextConfig({local:!1,position:null!=u.x||null!=u.y?null:s.attachedPos,rotation:null!=u.rotate?u.rotate*d:s.attachedRot,offset:[u.dx||0,u.dy||0]});var c=!1;if(null!=u.x?(r.x=B(u.x,e),r.setStyle("x",0),c=!0):(r.x=s.x,r.setStyle("x",s.style.x)),null!=u.y?(r.y=B(u.y,n),r.setStyle("y",0),c=!0):(r.y=s.y,r.setStyle("y",s.style.y)),u.labelLinePoints){var h=l.getTextGuideLine();h&&(h.setShape({points:u.labelLinePoints}),c=!1)}Vr(r).needsUpdateLabelLine=c,r.rotation=null!=u.rotate?u.rotate*d:s.rotation,r.scaleX=s.scaleX,r.scaleY=s.scaleY;for(var p=0;p<Rr.length;p++){var f=Rr[p];r.setStyle(f,null!=u[f]?u[f]:s.style[f])}if(u.draggable){if(r.draggable=!0,r.cursor="move",l){var g=o.seriesModel;if(null!=o.dataIndex)g=o.seriesModel.getData(o.dataType).getItemModel(o.dataIndex);r.on("drag",a(l,g.getModel("labelLine")))}}else r.off("drag"),r.cursor=s.cursor}},t.prototype.layout=function(t){var e=t.getWidth(),n=t.getHeight(),a=[];G(this._labelList,function(t){t.defaultAttr.ignore||a.push(W({},t))});var i=F(a,function(t){return"shiftX"===t.layoutOption.moveOverlap}),o=F(a,function(t){return"shiftY"===t.layoutOption.moveOverlap});j(i,0,0,e),j(o,1,0,n);var r=F(a,function(t){return t.layoutOption.hideOverlap});Y(r),U(r)},t.prototype.processLabelsOverall=function(){var t=this;G(this._chartViewList,function(e){var n=e.__model,a=e.ignoreLabelLineUpdate,i=n.isAnimationEnabled();e.group.traverse(function(e){if(e.ignore&&!e.forceLabelAnimation)return!0;var o=!a,r=e.getTextContent();!o&&r&&(o=Vr(r).needsUpdateLabelLine),o&&t._updateLabelLine(e,n),i&&t._animateLabels(e,n)})})},t.prototype._updateLabelLine=function(t,e){var n=t.getTextContent(),a=V(t),i=a.dataIndex;if(n&&null!=i){var o=e.getData(a.dataType),r=o.getItemModel(i),l={},s=o.getItemVisual(i,"style");if(s){var u=o.getVisual("drawType");l.stroke=s[u]}var d=r.getModel("labelLine");X(t,H(r),l),Z(t,d)}},t.prototype._animateLabels=function(t,e){var n=t.getTextContent(),a=t.getTextGuideLine();if(n&&(t.forceLabelAnimation||!n.ignore&&!n.invisible&&!t.disableLabelAnimation&&!q(t))){var i=(p=Vr(n)).oldLayout,o=V(t),r=o.dataIndex,l={x:n.x,y:n.y,rotation:n.rotation},s=e.getData(o.dataType);if(i){n.attr(i);var u=t.prevStates;u&&(J(u,"select")>=0&&n.attr(p.oldLayoutSelect),J(u,"emphasis")>=0&&n.attr(p.oldLayoutEmphasis)),tt(n,l,e,r)}else if(n.attr(l),!$(n).valueAnimation){var d=K(n.style.opacity,1);n.style.opacity=0,Q(n,{style:{opacity:d}},e,r)}if(p.oldLayout=l,n.states.select){var c=p.oldLayoutSelect={};Gr(c,l,Wr),Gr(c,n.states.select,Wr)}if(n.states.emphasis){var h=p.oldLayoutEmphasis={};Gr(h,l,Wr),Gr(h,n.states.emphasis,Wr)}et(n,r,s,e,e)}if(a&&!a.ignore&&!a.invisible){i=(p=Br(a)).oldLayout;var p,f={points:a.shape.points};i?(a.attr({shape:i}),tt(a,{shape:f},e)):(a.setShape(f),a.style.strokePercent=0,Q(a,{style:{strokePercent:1}},e)),p.oldLayout=f}},t}(),jr=k();function Yr(t,e){var n=t.isExpand?t.children:[],a=t.parentNode.children,i=t.hierNode.i?a[t.hierNode.i-1]:null;if(n.length){!function(t){var e=t.children,n=e.length,a=0,i=0;for(;--n>=0;){var o=e[n];o.hierNode.prelim+=a,o.hierNode.modifier+=a,i+=o.hierNode.change,a+=o.hierNode.shift+i}}(t);var o=(n[0].hierNode.prelim+n[n.length-1].hierNode.prelim)/2;i?(t.hierNode.prelim=i.hierNode.prelim+e(t,i),t.hierNode.modifier=t.hierNode.prelim-o):t.hierNode.prelim=o}else i&&(t.hierNode.prelim=i.hierNode.prelim+e(t,i));t.parentNode.hierNode.defaultAncestor=function(t,e,n,a){if(e){for(var i=t,o=t,r=o.parentNode.children[0],l=e,s=i.hierNode.modifier,u=o.hierNode.modifier,d=r.hierNode.modifier,c=l.hierNode.modifier;l=Zr(l),o=qr(o),l&&o;){i=Zr(i),r=qr(r),i.hierNode.ancestor=t;var h=l.hierNode.prelim+c-o.hierNode.prelim-u+a(l,o);h>0&&(Kr($r(l,t,n),t,h),u+=h,s+=h),c+=l.hierNode.modifier,u+=o.hierNode.modifier,s+=i.hierNode.modifier,d+=r.hierNode.modifier}l&&!Zr(i)&&(i.hierNode.thread=l,i.hierNode.modifier+=c-s),o&&!qr(r)&&(r.hierNode.thread=o,r.hierNode.modifier+=u-d,n=t)}return n}(t,i,t.parentNode.hierNode.defaultAncestor||a[0],e)}function Ur(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function Xr(t){return arguments.length?t:Qr}function Hr(t,e){return t-=Math.PI/2,{x:e*Math.cos(t),y:e*Math.sin(t)}}function Zr(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function qr(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function $r(t,e,n){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:n}function Kr(t,e,n){var a=n/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=a,e.hierNode.shift+=n,e.hierNode.modifier+=n,e.hierNode.prelim+=n,t.hierNode.change+=a}function Qr(t,e){return t.parentNode===e.parentNode?1:2}var Jr=function(){return function(){this.parentPoint=[],this.childPoints=[]}}(),tl=function(t){function e(e){return t.call(this,e)||this}return nt(e,t),e.prototype.getDefaultStyle=function(){return{stroke:ut.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new Jr},e.prototype.buildPath=function(t,e){var n=e.childPoints,a=n.length,i=e.parentPoint,o=n[0],r=n[a-1];if(1===a)return t.moveTo(i[0],i[1]),void t.lineTo(o[0],o[1]);var l=e.orient,s="TB"===l||"BT"===l?0:1,u=1-s,d=B(e.forkPosition,1),c=[];c[s]=i[s],c[u]=i[u]+(r[u]-i[u])*d,t.moveTo(i[0],i[1]),t.lineTo(c[0],c[1]),t.moveTo(o[0],o[1]),c[s]=o[s],t.lineTo(c[0],c[1]),c[s]=r[s],t.lineTo(c[0],c[1]),t.lineTo(r[0],r[1]);for(var h=1;h<a-1;h++){var p=n[h];t.moveTo(p[0],p[1]),c[s]=p[s],t.lineTo(c[0],c[1])}},e}(xt),el=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._mainGroup=new at,n}return nt(e,t),e.prototype.init=function(t,e){this._controller=new it(e.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},e.prototype.render=function(t,e,n){var a=t.getData(),i=t.layoutInfo,o=this._mainGroup;"radial"===t.get("layout")?(o.x=i.x+i.width/2,o.y=i.y+i.height/2):(o.x=i.x,o.y=i.y),this._updateViewCoordSys(t,n),this._updateController(t,null,e,n);var r=this._data;a.diff(r).add(function(e){nl(a,e)&&al(a,e,null,o,t)}).update(function(e,n){var i=r.getItemGraphicEl(n);nl(a,e)?al(a,e,i,o,t):i&&rl(r,n,i,o,t)}).remove(function(e){var n=r.getItemGraphicEl(e);n&&rl(r,e,n,o,t)}).execute(),this._nodeScaleRatio=t.get("nodeScaleRatio"),this._updateNodeAndLinkScale(t),!0===t.get("expandAndCollapse")&&a.eachItemGraphicEl(function(e,a){e.off("click").on("click",function(){n.dispatchAction({type:"treeExpandAndCollapse",seriesId:t.id,dataIndex:a})})}),this._data=a},e.prototype._updateViewCoordSys=function(t,e){var n=t.getData(),a=[];n.each(function(t){var e=n.getItemLayout(t);!e||isNaN(e.x)||isNaN(e.y)||a.push([+e.x,+e.y])});var i=[],o=[];ot(a,i,o);var r=this._min,l=this._max;o[0]-i[0]===0&&(i[0]=r?r[0]:i[0]-1,o[0]=l?l[0]:o[0]+1),o[1]-i[1]===0&&(i[1]=r?r[1]:i[1]-1,o[1]=l?l[1]:o[1]+1);var s=t.coordinateSystem=new rt(null,{api:e,ecModel:t.ecModel});s.zoomLimit=t.get("scaleLimit"),s.setBoundingRect(i[0],i[1],o[0]-i[0],o[1]-i[1]),s.setCenter(t.get("center")),s.setZoom(t.get("zoom")),this.group.attr({x:s.x,y:s.y,scaleX:s.scaleX,scaleY:s.scaleY}),this._min=i,this._max=o},e.prototype._updateController=function(t,e,n,a){var i=this;lt(t,a,this.group,this._controller,this._controllerHost,e),this._controller.on("zoom",function(e){i._updateNodeAndLinkScale(t)})},e.prototype._updateNodeAndLinkScale=function(t){var e=t.getData(),n=this._getNodeGlobalScale(t);e.eachItemGraphicEl(function(t,e){t.setSymbolScale(n)})},e.prototype._getNodeGlobalScale=function(t){var e=t.coordinateSystem;if("view"!==e.type)return 1;var n=this._nodeScaleRatio,a=e.scaleX||1;return((e.getZoom()-1)*n+1)/a},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}(st);function nl(t,e){var n=t.getItemLayout(e);return n&&!isNaN(n.x)&&!isNaN(n.y)}function al(t,e,n,a,i){var o=!n,r=t.tree.getNodeByDataIndex(e),l=r.getModel(),s=r.getVisual("style").fill,u=!1===r.isExpand&&0!==r.children.length?s:ut.color.neutral00,d=t.tree.root,c=r.parentNode===d?r:r.parentNode||r,h=t.getItemGraphicEl(c.dataIndex),p=c.getLayout(),f=h?{x:h.__oldX,y:h.__oldY,rawX:h.__radialOldRawX,rawY:h.__radialOldRawY}:p,g=r.getLayout();o?((n=new dt(t,e,null,{symbolInnerColor:u,useNameLabel:!0})).x=f.x,n.y=f.y):n.updateData(t,e,null,{symbolInnerColor:u,useNameLabel:!0}),n.__radialOldRawX=n.__radialRawX,n.__radialOldRawY=n.__radialRawY,n.__radialRawX=g.rawX,n.__radialRawY=g.rawY,a.add(n),t.setItemGraphicEl(e,n),n.__oldX=n.x,n.__oldY=n.y,tt(n,{x:g.x,y:g.y},i);var v=n.getSymbolPath();if("radial"===i.get("layout")){var y=d.children[0],m=y.getLayout(),x=y.children.length,_=void 0,b=void 0;if(g.x===m.x&&!0===r.isExpand&&y.children.length){var w={x:(y.children[0].getLayout().x+y.children[x-1].getLayout().x)/2,y:(y.children[0].getLayout().y+y.children[x-1].getLayout().y)/2};(_=Math.atan2(w.y-m.y,w.x-m.x))<0&&(_=2*Math.PI+_),(b=w.x<m.x)&&(_-=Math.PI)}else(_=Math.atan2(g.y-m.y,g.x-m.x))<0&&(_=2*Math.PI+_),0===r.children.length||0!==r.children.length&&!1===r.isExpand?(b=g.x<m.x)&&(_-=Math.PI):(b=g.x>m.x)||(_-=Math.PI);var S=b?"left":"right",I=l.getModel("label"),M=I.get("rotate"),C=M*(Math.PI/180),T=v.getTextContent();T&&(v.setTextConfig({position:I.get("position")||S,rotation:null==M?-_:C,origin:"center"}),T.setStyle("verticalAlign","middle"))}var D=l.get(["emphasis","focus"]),L="relative"===D?ct(r.getAncestorsIndices(),r.getDescendantIndices()):"ancestor"===D?r.getAncestorsIndices():"descendant"===D?r.getDescendantIndices():null;L&&(V(n).focus=L),function(t,e,n,a,i,o,r,l){var s=e.getModel(),u=t.get("edgeShape"),d=t.get("layout"),c=t.getOrient(),h=t.get(["lineStyle","curveness"]),p=t.get("edgeForkPosition"),f=s.getModel("lineStyle").getLineStyle(),g=a.__edge;if("curve"===u)e.parentNode&&e.parentNode!==n&&(g||(g=a.__edge=new gt({shape:ll(d,c,h,i,i)})),tt(g,{shape:ll(d,c,h,o,r)},t));else if("polyline"===u&&"orthogonal"===d&&e!==n&&e.children&&0!==e.children.length&&!0===e.isExpand){for(var v=e.children,y=[],m=0;m<v.length;m++){var x=v[m].getLayout();y.push([x.x,x.y])}g||(g=a.__edge=new tl({shape:{parentPoint:[r.x,r.y],childPoints:[[r.x,r.y]],orient:c,forkPosition:p}})),tt(g,{shape:{parentPoint:[r.x,r.y],childPoints:y}},t)}g&&("polyline"!==u||e.isExpand)&&(g.useStyle(vt({strokeNoScale:!0,fill:null},f)),yt(g,s,"lineStyle"),mt(g),l.add(g))}(i,r,d,n,f,p,g,a),n.__edge&&(n.onHoverStateChange=function(e){if("blur"!==e){var a=r.parentNode&&t.getItemGraphicEl(r.parentNode.dataIndex);a&&a.hoverState===ht||pt(n.__edge,e)}})}function il(t,e,n,a,i){var o=ol(e.tree.root,t),r=o.source,l=o.sourceLayout,s=e.getItemGraphicEl(t.dataIndex);if(s){var u=e.getItemGraphicEl(r.dataIndex).__edge,d=s.__edge||(!1===r.isExpand||1===r.children.length?u:void 0),c=a.get("edgeShape"),h=a.get("layout"),p=a.get("orient"),f=a.get(["lineStyle","curveness"]);d&&("curve"===c?ft(d,{shape:ll(h,p,f,l,l),style:{opacity:0}},a,{cb:function(){n.remove(d)},removeOpt:i}):"polyline"===c&&"orthogonal"===a.get("layout")&&ft(d,{shape:{parentPoint:[l.x,l.y],childPoints:[[l.x,l.y]]},style:{opacity:0}},a,{cb:function(){n.remove(d)},removeOpt:i}))}}function ol(t,e){for(var n,a=e.parentNode===t?e:e.parentNode||e;null==(n=a.getLayout());)a=a.parentNode===t?a:a.parentNode||a;return{source:a,sourceLayout:n}}function rl(t,e,n,a,i){var o=t.tree.getNodeByDataIndex(e),r=ol(t.tree.root,o).sourceLayout,l={duration:i.get("animationDurationUpdate"),easing:i.get("animationEasingUpdate")};ft(n,{x:r.x+1,y:r.y+1},i,{cb:function(){a.remove(n),t.setItemGraphicEl(e,null)},removeOpt:l}),n.fadeOut(null,t.hostModel,{fadeLabel:!0,animation:l}),o.children.forEach(function(e){il(e,t,a,i,l)}),il(o,t,a,i,l)}function ll(t,e,n,a,i){var o,r,l,s,u,d,c,h;if("radial"===t){u=a.rawX,c=a.rawY,d=i.rawX,h=i.rawY;var p=Hr(u,c),f=Hr(u,c+(h-c)*n),g=Hr(d,h+(c-h)*n),v=Hr(d,h);return{x1:p.x||0,y1:p.y||0,x2:v.x||0,y2:v.y||0,cpx1:f.x||0,cpy1:f.y||0,cpx2:g.x||0,cpy2:g.y||0}}return u=a.x,c=a.y,d=i.x,h=i.y,"LR"!==e&&"RL"!==e||(o=u+(d-u)*n,r=c,l=d+(u-d)*n,s=h),"TB"!==e&&"BT"!==e||(o=u,r=c+(h-c)*n,l=d,s=h+(c-h)*n),{x1:u,y1:c,x2:d,y2:h,cpx1:o,cpy1:r,cpx2:l,cpy2:s}}var sl=k();function ul(t){var e=t.mainData,n=t.datas;n||(n={main:e},t.datasAttr={main:"data"}),t.datas=t.mainData=null,gl(e,n,t),G(n,function(n){G(e.TRANSFERABLE_METHODS,function(e){n.wrapMethod(e,_t(dl,t))})}),e.wrapMethod("cloneShallow",_t(hl,t)),G(e.CHANGABLE_METHODS,function(n){e.wrapMethod(n,_t(cl,t))}),bt(n[e.dataType]===e)}function dl(t,e){if(sl(a=this).mainData===a){var n=wt({},sl(this).datas);n[this.dataType]=e,gl(e,n,t)}else vl(e,this.dataType,sl(this).mainData,t);var a;return e}function cl(t,e){return t.struct&&t.struct.update(),e}function hl(t,e){return G(sl(e).datas,function(n,a){n!==e&&vl(n.cloneShallow(),a,e,t)}),e}function pl(t){var e=sl(this).mainData;return null==t||null==e?e:sl(e).datas[t]}function fl(){var t=sl(this).mainData;return null==t?[{data:t}]:St(O(sl(t).datas),function(e){return{type:e,data:sl(t).datas[e]}})}function gl(t,e,n){sl(t).datas={},G(e,function(e,a){vl(e,a,t,n)})}function vl(t,e,n,a){sl(n).datas[e]=t,sl(t).mainData=n,t.dataType=e,a.struct&&(t[a.structAttr]=a.struct,a.struct[a.datasAttr[e]]=t),t.getLinkedData=pl,t.getLinkedDataAll=fl}var yl=function(){function t(t,e){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=t||"",this.hostTree=e}return t.prototype.isRemoved=function(){return this.dataIndex<0},t.prototype.eachNode=function(t,e,n){R(t)&&(n=e,e=t,t=null),Dt(t=t||{})&&(t={order:t});var a,i=t.order||"preorder",o=this[t.attr||"children"];"preorder"===i&&(a=e.call(n,this));for(var r=0;!a&&r<o.length;r++)o[r].eachNode(t,e,n);"postorder"===i&&e.call(n,this)},t.prototype.updateDepthAndHeight=function(t){var e=0;this.depth=t;for(var n=0;n<this.children.length;n++){var a=this.children[n];a.updateDepthAndHeight(t+1),a.height>e&&(e=a.height)}this.height=e+1},t.prototype.getNodeById=function(t){if(this.getId()===t)return this;for(var e=0,n=this.children,a=n.length;e<a;e++){var i=n[e].getNodeById(t);if(i)return i}},t.prototype.contains=function(t){if(t===this)return!0;for(var e=0,n=this.children,a=n.length;e<a;e++){var i=n[e].contains(t);if(i)return i}},t.prototype.getAncestors=function(t){for(var e=[],n=t?this:this.parentNode;n;)e.push(n),n=n.parentNode;return e.reverse(),e},t.prototype.getAncestorsIndices=function(){for(var t=[],e=this;e;)t.push(e.dataIndex),e=e.parentNode;return t.reverse(),t},t.prototype.getDescendantIndices=function(){var t=[];return this.eachNode(function(e){t.push(e.dataIndex)}),t},t.prototype.getValue=function(t){var e=this.hostTree.data;return e.getStore().get(e.getDimensionIndex(t||"value"),this.dataIndex)},t.prototype.setLayout=function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},t.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},t.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostTree.data.getItemModel(this.dataIndex).getModel(t)},t.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},t.prototype.setVisual=function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},t.prototype.getVisual=function(t){return this.hostTree.data.getItemVisual(this.dataIndex,t)},t.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},t.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},t.prototype.getChildIndex=function(){if(this.parentNode){for(var t=this.parentNode.children,e=0;e<t.length;++e)if(t[e]===this)return e;return-1}return-1},t.prototype.isAncestorOf=function(t){for(var e=t.parentNode;e;){if(e===this)return!0;e=e.parentNode}return!1},t.prototype.isDescendantOf=function(t){return t!==this&&t.isAncestorOf(this)},t}(),ml=function(){function t(t){this.type="tree",this._nodes=[],this.hostModel=t}return t.prototype.eachNode=function(t,e,n){this.root.eachNode(t,e,n)},t.prototype.getNodeByDataIndex=function(t){var e=this.data.getRawIndex(t);return this._nodes[e]},t.prototype.getNodeById=function(t){return this.root.getNodeById(t)},t.prototype.update=function(){for(var t=this.data,e=this._nodes,n=0,a=e.length;n<a;n++)e[n].dataIndex=-1;for(n=0,a=t.count();n<a;n++)e[t.getRawIndex(n)].dataIndex=n},t.prototype.clearLayouts=function(){this.data.clearItemLayouts()},t.createTree=function(e,n,a){var i=new t(n),o=[],r=1;!function t(e,n){var a=e.value;r=Math.max(r,It(a)?a.length:1),o.push(e);var l=new yl(Mt(e.name,""),i);n?function(t,e){var n=e.children;if(t.parentNode===e)return;n.push(t),t.parentNode=e}(l,n):i.root=l,i._nodes.push(l);var s=e.children;if(s)for(var u=0;u<s.length;u++)t(s[u],l)}(e),i.root.updateDepthAndHeight(0);var l=Ct(o,{coordDimensions:["value"],dimensionsCount:r}).dimensions,s=new Tt(l,n);return s.initData(o),a&&a(s),ul({mainData:s,struct:i,structAttr:"tree"}),i.update(),i},t}();function xl(t,e,n){if(t&&J(e,t.type)>=0){var a=n.getData().tree.root,i=t.targetNode;if(Dt(i)&&(i=a.getNodeById(i)),i&&a.contains(i))return{node:i};var o=t.targetNodeId;if(null!=o&&(i=a.getNodeById(o)))return{node:i}}}function _l(t){for(var e=[];t;)(t=t.parentNode)&&e.push(t);return e.reverse()}function bl(t,e){var n=_l(t);return J(n,e)>=0}function wl(t,e){for(var n=[];t;){var a=t.dataIndex;n.push({name:t.name,dataIndex:a,value:e.getRawValue(a)}),t=t.parentNode}return n.reverse(),n}var Sl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.hasSymbolVisual=!0,e.ignoreStyleOnData=!0,e}return nt(e,t),e.prototype.getInitialData=function(t){var e={name:t.name,children:t.data},n=t.leaves||{},a=new Lt(n,this,this.ecModel),i=ml.createTree(e,this,function(t){t.wrapMethod("getItemModel",function(t,e){var n=i.getNodeByDataIndex(e);return n&&n.children.length&&n.isExpand||(t.parentModel=a),t})});var o=0;i.eachNode("preorder",function(t){t.depth>o&&(o=t.depth)});var r=t.expandAndCollapse&&t.initialTreeDepth>=0?t.initialTreeDepth:o;return i.root.eachNode("preorder",function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=r}),i.data},e.prototype.getOrient=function(){var t=this.get("orient");return"horizontal"===t?t="LR":"vertical"===t&&(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,e,n){for(var a=this.getData().tree,i=a.root.children[0],o=a.getNodeByDataIndex(t),r=o.getValue(),l=o.name;o&&o!==i;)l=o.parentNode.name+"."+l,o=o.parentNode;return At("nameValue",{name:l,value:r,noValue:isNaN(r)||null==r})},e.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments),a=this.getData().tree.getNodeByDataIndex(e);return n.treeAncestors=wl(a,this),n.collapsed=!a.isExpand,n},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystemUsage:"box",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,roamTrigger:"global",nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:ut.color.borderTint,width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(Pt);function Il(t,e){for(var n,a=[t];n=a.pop();)if(e(n),n.isExpand){var i=n.children;if(i.length)for(var o=i.length-1;o>=0;o--)a.push(i[o])}}function Ml(t,e){t.eachSeriesByType("tree",function(t){!function(t,e){var n=kt(t,e).refContainer,a=Et(t.getBoxLayoutParams(),n);t.layoutInfo=a;var i=t.get("layout"),o=0,r=0,l=null;"radial"===i?(o=2*Math.PI,r=Math.min(a.height,a.width)/2,l=Xr(function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth})):(o=a.width,r=a.height,l=Xr());var s=t.getData().tree.root,u=s.children[0];if(u){!function(t){var e=t;e.hierNode={defaultAncestor:null,ancestor:e,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var n,a,i=[e];n=i.pop();)if(a=n.children,n.isExpand&&a.length)for(var o=a.length-1;o>=0;o--){var r=a[o];r.hierNode={defaultAncestor:null,ancestor:r,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},i.push(r)}}(s),function(t,e,n){for(var a,i=[t],o=[];a=i.pop();)if(o.push(a),a.isExpand){var r=a.children;if(r.length)for(var l=0;l<r.length;l++)i.push(r[l])}for(;a=o.pop();)e(a,n)}(u,Yr,l),s.hierNode.modifier=-u.hierNode.prelim,Il(u,Ur);var d=u,c=u,h=u;Il(u,function(t){var e=t.getLayout().x;e<d.getLayout().x&&(d=t),e>c.getLayout().x&&(c=t),t.depth>h.depth&&(h=t)});var p=d===c?1:l(d,c)/2,f=p-d.getLayout().x,g=0,v=0,y=0,m=0;if("radial"===i)g=o/(c.getLayout().x+p+f),v=r/(h.depth-1||1),Il(u,function(t){y=(t.getLayout().x+f)*g,m=(t.depth-1)*v;var e=Hr(y,m);t.setLayout({x:e.x,y:e.y,rawX:y,rawY:m},!0)});else{var x=t.getOrient();"RL"===x||"LR"===x?(v=r/(c.getLayout().x+p+f),g=o/(h.depth-1||1),Il(u,function(t){m=(t.getLayout().x+f)*v,y="LR"===x?(t.depth-1)*g:o-(t.depth-1)*g,t.setLayout({x:y,y:m},!0)})):"TB"!==x&&"BT"!==x||(g=o/(c.getLayout().x+p+f),v=r/(h.depth-1||1),Il(u,function(t){y=(t.getLayout().x+f)*g,m="TB"===x?(t.depth-1)*v:r-(t.depth-1)*v,t.setLayout({x:y,y:m},!0)}))}}}(t,e)})}function Cl(t){t.eachSeriesByType("tree",function(t){var e=t.getData();e.tree.eachNode(function(t){var n=t.getModel().getModel("itemStyle").getItemStyle(),a=e.ensureUniqueItemVisual(t.dataIndex,"style");wt(a,n)})})}var Tl=["treemapZoomToNode","treemapRender","treemapMove"];function Dl(t){var e=t.getData().tree,n={};e.eachNode(function(e){for(var a=e;a&&a.depth>1;)a=a.parentNode;var i=Rt(t.ecModel,a.name||a.dataIndex+"",n);e.setVisual("decal",i)})}var Ll=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.preventUsingHoverLayer=!0,n}return nt(e,t),e.prototype.getInitialData=function(t,e){var n={name:t.name,children:t.data};Al(n);var a=t.levels||[],i=this.designatedVisualItemStyle={},o=new Lt({itemStyle:i},this,e);a=t.levels=function(t,e){var n,a,i=Vt(e.get("color")),o=Vt(e.get(["aria","decal","decals"]));if(!i)return;t=t||[],G(t,function(t){var e=new Lt(t),i=e.get("color"),o=e.get("decal");(e.get(["itemStyle","color"])||i&&"none"!==i)&&(n=!0),(e.get(["itemStyle","decal"])||o&&"none"!==o)&&(a=!0)});var r=t[0]||(t[0]={});n||(r.color=i.slice());!a&&o&&(r.decal=o.slice());return t}(a,e);var r=St(a||[],function(t){return new Lt(t,o,e)},this),l=ml.createTree(n,this,function(t){t.wrapMethod("getItemModel",function(t,e){var n=l.getNodeByDataIndex(e),a=n?r[n.depth]:null;return t.parentModel=a||o,t})});return l.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,e,n){var a=this.getData(),i=this.getRawValue(t),o=a.getName(t);return At("nameValue",{name:o,value:i})},e.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments),a=this.getData().tree.getNodeByDataIndex(e);return n.treeAncestors=wl(a,this),n.treePathInfo=n.treeAncestors,n},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},wt(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=Ot(),this._idIndexMapCount=0);var n=e.get(t);return null==n&&e.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 e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)},e.prototype.enableAriaDecal=function(){Dl(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,coordinateSystemUsage:"box",left:ut.size.l,top:ut.size.xxxl,right:ut.size.l,bottom:ut.size.xxxl,sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.1024,scaleLimit:{max:5,min:.2},roam:!0,roamTrigger:"global",nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",bottom:ut.size.m,emptyItemWidth:25,itemStyle:{color:ut.color.backgroundShade,textStyle:{color:ut.color.secondary}},emphasis:{itemStyle:{color:ut.color.background}}},label:{show:!0,distance:0,padding:5,position:"inside",color:ut.color.neutral00,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:ut.color.neutral00,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}(Pt);function Al(t){var e=0;G(t.children,function(t){Al(t);var n=t.value;It(n)&&(n=n[0]),e+=n});var n=t.value;It(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=e),n<0&&(n=0),It(t.value)?t.value[0]=n:t.value=n}var Pl=function(){function t(t){this.group=new at,t.add(this.group)}return t.prototype.render=function(t,e,n,a){var i=t.getModel("breadcrumb"),o=this.group;if(o.removeAll(),i.get("show")&&n){var r=i.getModel("itemStyle"),l=i.getModel("emphasis"),s=r.getModel("textStyle"),u=l.getModel(["itemStyle","textStyle"]),d=kt(t,e).refContainer,c={left:i.get("left"),right:i.get("right"),top:i.get("top"),bottom:i.get("bottom")},h={emptyItemWidth:i.get("emptyItemWidth"),totalWidth:0,renderList:[]},p=Et(c,d);this._prepare(n,h,s),this._renderContent(t,h,p,r,l,s,u,a),Bt(o,c,d)}},t.prototype._prepare=function(t,e,n){for(var a=t;a;a=a.parentNode){var i=Mt(a.getModel().get("name"),""),o=n.getTextRect(i),r=Math.max(o.width+16,e.emptyItemWidth);e.totalWidth+=r+8,e.renderList.push({node:a,text:i,width:r})}},t.prototype._renderContent=function(t,e,n,a,i,o,r,l){for(var s=0,u=e.emptyItemWidth,d=t.get(["breadcrumb","height"]),c=e.totalWidth,h=e.renderList,p=i.getModel("itemStyle").getItemStyle(),f=h.length-1;f>=0;f--){var g=h[f],v=g.node,y=g.width,m=g.text;c>n.width&&(c-=y-u,y=u,m=null);var x=new Gt({shape:{points:kl(s,0,y,d,f===h.length-1,0===f)},style:vt(a.getItemStyle(),{lineJoin:"bevel"}),textContent:new Wt({style:jt(o,{text:m})}),textConfig:{position:"inside"},z2:1e4*Ft,onclick:_t(l,v)});x.disableLabelAnimation=!0,x.getTextContent().ensureState("emphasis").style=jt(r,{text:m}),x.ensureState("emphasis").style=p,Yt(x,i.get("focus"),i.get("blurScope"),i.get("disabled")),this.group.add(x),El(x,t,v),s+=y+8}},t.prototype.remove=function(){this.group.removeAll()},t}();function kl(t,e,n,a,i,o){var r=[[i?t:t-5,e],[t+n,e],[t+n,e+a],[i?t:t-5,e+a]];return!o&&r.splice(2,0,[t+n+5,e+a/2]),!i&&r.push([t,e+a/2]),r}function El(t,e,n){V(t).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:n&&n.dataIndex,name:n&&n.name},treePathInfo:n&&wl(n,e)}}var Nl=function(){function t(){this._storage=[],this._elExistsMap={}}return t.prototype.add=function(t,e,n,a,i){return!this._elExistsMap[t.id]&&(this._elExistsMap[t.id]=!0,this._storage.push({el:t,target:e,duration:n,delay:a,easing:i}),!0)},t.prototype.finished=function(t){return this._finishedCallback=t,this},t.prototype.start=function(){for(var t=this,e=this._storage.length,n=function(){--e<=0&&(t._storage.length=0,t._elExistsMap={},t._finishedCallback&&t._finishedCallback())},a=0,i=this._storage.length;a<i;a++){var o=this._storage[a];o.el.animateTo(o.target,{duration:o.duration,delay:o.delay,easing:o.easing,setToFinal:!0,done:n,aborted:n})}return this},t}();var zl=at,Rl=oe,Ol="label",Vl="upperLabel",Bl=10*Ft,Gl=2*Ft,Wl=3*Ft,Fl=te([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),jl=function(t){var e=Fl(t);return e.stroke=e.fill=e.lineWidth=null,e},Yl=k(),Ul=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._state="ready",n._storage={nodeGroup:[],background:[],content:[]},n}return nt(e,t),e.prototype.render=function(t,e,n,a){var i=e.findComponents({mainType:"series",subType:"treemap",query:a});if(!(J(i,t)<0)){this.seriesModel=t,this.api=n,this.ecModel=e;var o=xl(a,["treemapZoomToNode","treemapRootToNode"],t),r=a&&a.type,l=t.layoutInfo,s=!this._oldTree,u=this._storage,d="treemapRootToNode"===r&&o&&u?{rootNodeGroup:u.nodeGroup[o.node.getRawIndex()],direction:a.direction}:null,c=this._giveContainerGroup(l),h=t.get("animation"),p=this._doRender(c,t,d);!h||s||r&&"treemapZoomToNode"!==r&&"treemapRootToNode"!==r?p.renderFinally():this._doAnimation(c,p,t,d),this._resetController(n),this._renderBreadcrumb(t,n,o)}},e.prototype._giveContainerGroup=function(t){var e=this._containerGroup;return e||(e=this._containerGroup=new zl,this._initEvents(e),this.group.add(e)),e.x=t.x,e.y=t.y,e},e.prototype._doRender=function(t,e,n){var a=e.getData().tree,i=this._oldTree,o={nodeGroup:[],background:[],content:[]},r={nodeGroup:[],background:[],content:[]},l=this._storage,s=[];function u(t,a,i,u){return function(t,e,n,a,i,o,r,l,s,u){if(!r)return;var d=r.getLayout(),c=t.getData(),h=r.getModel();if(c.setItemGraphicEl(r.dataIndex,null),!d||!d.isInView)return;var p=d.width,f=d.height,g=d.borderWidth,v=d.invisible,y=r.getRawIndex(),m=l&&l.getRawIndex(),x=r.viewChildren,_=d.upperHeight,b=x&&x.length,w=h.getModel("itemStyle"),S=h.getModel(["emphasis","itemStyle"]),I=h.getModel(["blur","itemStyle"]),M=h.getModel(["select","itemStyle"]),C=w.get("borderRadius")||0,T=F("nodeGroup",zl);if(!T)return;if(s.add(T),T.x=d.x||0,T.y=d.y||0,T.markRedraw(),Yl(T).nodeWidth=p,Yl(T).nodeHeight=f,d.isAboveViewRoot)return T;var D=F("background",Rl,u,Gl);D&&R(T,D,b&&d.upperLabelHeight);var L=h.getModel("emphasis"),A=L.get("focus"),P=L.get("blurScope"),k=L.get("disabled"),E="ancestor"===A?r.getAncestorsIndices():"descendant"===A?r.getDescendantIndices():A;if(b)Kt(T)&&Qt(T,!1),D&&(Qt(D,!k),c.setItemGraphicEl(r.dataIndex,D),Jt(D,E,P));else{var N=F("content",Rl,u,Wl);N&&O(T,N),D.disableMorphing=!0,D&&Kt(D)&&Qt(D,!1),Qt(T,!k),c.setItemGraphicEl(r.dataIndex,T);var z=h.getShallow("cursor");z&&N.attr("cursor",z),Jt(T,E,P)}return T;function R(e,n,a){var i=V(n);if(i.dataIndex=r.dataIndex,i.seriesIndex=t.seriesIndex,n.setShape({x:0,y:0,width:p,height:f,r:C}),v)B(n);else{n.invisible=!1;var o=r.getVisual("style"),l=o.stroke,s=jl(w);s.fill=l;var u=Fl(S);u.fill=S.get("borderColor");var d=Fl(I);d.fill=I.get("borderColor");var c=Fl(M);if(c.fill=M.get("borderColor"),a){var h=p-2*g;G(n,l,o.opacity,{x:g,y:0,width:h,height:_})}else n.removeTextContent();n.setStyle(s),n.ensureState("emphasis").style=u,n.ensureState("blur").style=d,n.ensureState("select").style=c,mt(n)}e.add(n)}function O(e,n){var a=V(n);a.dataIndex=r.dataIndex,a.seriesIndex=t.seriesIndex;var i=Math.max(p-2*g,0),o=Math.max(f-2*g,0);if(n.culling=!0,n.setShape({x:g,y:g,width:i,height:o,r:C}),v)B(n);else{n.invisible=!1;var l=r.getVisual("style"),s=l.fill,u=jl(w);u.fill=s,u.decal=l.decal;var d=Fl(S),c=Fl(I),h=Fl(M);G(n,s,l.opacity,null),n.setStyle(u),n.ensureState("emphasis").style=d,n.ensureState("blur").style=c,n.ensureState("select").style=h,mt(n)}e.add(n)}function B(t){!t.invisible&&o.push(t)}function G(e,n,a,i){var o=h.getModel(i?Vl:Ol),l=Mt(h.get("name"),null),s=o.getShallow("show");ee(e,ne(h,i?Vl:Ol),{defaultText:s?l:null,inheritColor:n,defaultOpacity:a,labelFetcher:t,labelDataIndex:r.dataIndex});var u=e.getTextContent();if(u){var c=u.style,p=ae(c.padding||0);i&&(e.setTextConfig({layoutRect:i}),u.disableLabelLayout=!0),u.beforeUpdate=function(){var t=Math.max((i?i.width:e.shape.width)-p[1]-p[3],0),n=Math.max((i?i.height:e.shape.height)-p[0]-p[2],0);c.width===t&&c.height===n||u.setStyle({width:t,height:n})},c.truncateMinChar=2,c.lineOverflow="truncate",W(c,i,d);var f=u.getState("emphasis");W(f?f.style:null,i,d)}}function W(e,n,a){var i=e?e.text:null;if(!n&&a.isLeafRoot&&null!=i){var o=t.get("drillDownIcon",!0);e.text=o?o+" "+i:i}}function F(t,a,o,r){var l=null!=m&&n[t][m],s=i[t];return l?(n[t][m]=null,j(s,l)):v||((l=new a)instanceof ie&&(l.z2=function(t,e){return t*Bl+e}(o,r)),Y(s,l)),e[t][y]=l}function j(t,e){var n=t[y]={};e instanceof zl?(n.oldX=e.x,n.oldY=e.y):n.oldShape=wt({},e.shape)}function Y(t,e){var n=t[y]={},o=r.parentNode,l=e instanceof at;if(o&&(!a||"drillDown"===a.direction)){var s=0,u=0,d=i.background[o.getRawIndex()];!a&&d&&d.oldShape&&(s=d.oldShape.width,u=d.oldShape.height),l?(n.oldX=0,n.oldY=u):n.oldShape={x:s,y:u,width:0,height:0}}n.fadein=!l}}(e,r,l,n,o,s,t,a,i,u)}!function t(e,n,a,i,o){i?(n=e,G(e,function(t,e){!t.isRemoved()&&l(e,e)})):new Ut(n,e,r,r).add(l).update(l).remove(_t(l,null)).execute();function r(t){return t.getId()}function l(r,l){var s=null!=r?e[r]:null,d=null!=l?n[l]:null,c=u(s,d,a,o);c&&t(s&&s.viewChildren||[],d&&d.viewChildren||[],c,i,o+1)}}(a.root?[a.root]:[],i&&i.root?[i.root]:[],t,a===i||!i,0);var d,c,h=(c={nodeGroup:[],background:[],content:[]},(d=l)&&G(d,function(t,e){var n=c[e];G(t,function(t){t&&(n.push(t),Yl(t).willDelete=!0)})}),c);if(this._oldTree=a,this._storage=r,this._controllerHost){var p=this.seriesModel.layoutInfo,f=a.root.getLayout();f.width===p.width&&f.height===p.height&&(this._controllerHost.zoom=1)}return{lastsForAnimation:o,willDeleteEls:h,renderFinally:function(){G(h,function(t){G(t,function(t){t.parent&&t.parent.remove(t)})}),G(s,function(t){t.invisible=!0,t.dirty()})}}},e.prototype._doAnimation=function(t,e,n,a){var i=n.get("animationDurationUpdate"),o=n.get("animationEasing"),r=(R(i)?0:i)||0,l=(R(o)?null:o)||"cubicOut",s=new Nl;G(e.willDeleteEls,function(t,e){G(t,function(t,n){if(!t.invisible){var i,o=t.parent,u=Yl(o);if(a&&"drillDown"===a.direction)i=o===a.rootNodeGroup?{shape:{x:0,y:0,width:u.nodeWidth,height:u.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var d=0,c=0;u.willDelete||(d=u.nodeWidth/2,c=u.nodeHeight/2),i="nodeGroup"===e?{x:d,y:c,style:{opacity:0}}:{shape:{x:d,y:c,width:0,height:0},style:{opacity:0}}}i&&s.add(t,i,r,0,l)}})}),G(this._storage,function(t,n){G(t,function(t,a){var i=e.lastsForAnimation[n][a],o={};i&&(t instanceof at?null!=i.oldX&&(o.x=t.x,o.y=t.y,t.x=i.oldX,t.y=i.oldY):(i.oldShape&&(o.shape=wt({},t.shape),t.setShape(i.oldShape)),i.fadein?(t.setStyle("opacity",0),o.style={opacity:1}):1!==t.style.opacity&&(o.style={opacity:1})),s.add(t,o,r,0,l))})},this),this._state="animating",s.finished(Xt(function(){this._state="ready",e.renderFinally()},this)).start()},e.prototype._resetController=function(t){var e=this,n=this._controller,a=this._controllerHost;a||(this._controllerHost={target:this.group},a=this._controllerHost);var i=this.seriesModel;n||((n=this._controller=new it(t.getZr())).on("pan",Xt(this._onPan,this)),n.on("zoom",Xt(this._onZoom,this))),n.enable(i.get("roam"),{api:t,zInfo:{component:i},triggerInfo:{roamTrigger:i.get("roamTrigger"),isInSelf:function(t,n,a){var i=e._containerGroup;return!!i&&i.getBoundingRect().contain(n-i.x,a-i.y)}}}),a.zoomLimit=i.get("scaleLimit"),a.zoom=i.get("zoom")},e.prototype._clearController=function(){var t=this._controller;this._controllerHost=null,t&&(t.dispose(),t=null)},e.prototype._onPan=function(t){if("animating"!==this._state&&(Math.abs(t.dx)>3||Math.abs(t.dy)>3)){var e=this.seriesModel.getData().tree.root;if(!e)return;var n=e.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 e=t.originX,n=t.originY,a=t.scale;if("animating"!==this._state){var i=this.seriesModel.getData().tree.root;if(!i)return;var o=i.getLayout();if(!o)return;var r,l=new E(o.x,o.y,o.width,o.height),s=this._controllerHost;r=s.zoomLimit;var u=s.zoom=s.zoom||1;if(u*=a,r){var d=r.min||0,c=r.max||1/0;u=Math.max(Math.min(c,u),d)}var h=u/s.zoom;s.zoom=u;var p=this.seriesModel.layoutInfo;e-=p.x,n-=p.y;var f=Zt();Ht(f,f,[-e,-n]),qt(f,f,[h,h]),Ht(f,f,[e,n]),l.applyTransform(f),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:l.x,y:l.y,width:l.width,height:l.height}})}},e.prototype._initEvents=function(t){var e=this;t.on("click",function(t){if("ready"===e._state){var n=e.seriesModel.get("nodeClick",!0);if(n){var a=e.findTarget(t.offsetX,t.offsetY);if(a){var i=a.node;if(i.getLayout().isLeafRoot)e._rootToNode(a);else if("zoomToNode"===n)e._zoomToNode(a);else if("link"===n){var o=i.hostTree.data.getItemModel(i.dataIndex),r=o.get("link",!0),l=o.get("target",!0)||"blank";r&&$t(r,l)}}}}},this)},e.prototype._renderBreadcrumb=function(t,e,n){var a=this;n||(n=null!=t.get("leafDepth",!0)?{node:t.getViewRoot()}:this.findTarget(e.getWidth()/2,e.getHeight()/2))||(n={node:t.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new Pl(this.group))).render(t,e,n.node,function(e){"animating"!==a._state&&(bl(t.getViewRoot(),e)?a._rootToNode({node:e}):a._zoomToNode({node:e}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage={nodeGroup:[],background:[],content:[]},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,e){var n;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},function(a){var i=this._storage.background[a.getRawIndex()];if(i){var o=i.transformCoordToLocal(t,e),r=i.shape;if(!(r.x<=o[0]&&o[0]<=r.x+r.width&&r.y<=o[1]&&o[1]<=r.y+r.height))return!1;n={node:a,offsetX:o[0],offsetY:o[1]}}},this),n},e.type="treemap",e}(st);var Xl=k();const Hl={seriesType:"treemap",reset:function(t){var e=t.getData().tree.root;e.isRemoved()||Zl(e,{},t.getViewRoot().getAncestors(),t)}};function Zl(t,e,n,a){var i=t.getModel(),o=t.getLayout(),r=t.hostTree.data;if(o&&!o.invisible&&o.isInView){var l,s=i.getModel("itemStyle"),u=function(t,e,n){var a=wt({},e),i=n.designatedVisualItemStyle;return G(["color","colorAlpha","colorSaturation"],function(n){i[n]=e[n];var o=t.get(n);i[n]=null,null!=o&&(a[n]=o)}),a}(s,e,a),d=r.ensureUniqueItemVisual(t.dataIndex,"style"),c=s.get("borderColor"),h=s.get("borderColorSaturation");null!=h&&(c=function(t,e){return null!=e?re(e,null,null,t):null}(h,l=ql(u))),d.stroke=c;var p=t.viewChildren;if(p&&p.length){var f=function(t,e,n,a,i,o){if(!o||!o.length)return;var r=Kl(e,"color")||null!=i.color&&"none"!==i.color&&(Kl(e,"colorAlpha")||Kl(e,"colorSaturation"));if(!r)return;var l=e.get("visualMin"),s=e.get("visualMax"),u=n.dataExtent.slice();null!=l&&l<u[0]&&(u[0]=l),null!=s&&s>u[1]&&(u[1]=s);var d=e.get("colorMappingBy"),c={type:r.name,dataExtent:u,visual:r.range};"color"!==c.type||"index"!==d&&"id"!==d?c.mappingMethod="linear":(c.mappingMethod="category",c.loop=!0);var h=new se(c);return Xl(h).drColorMappingBy=d,h}(0,i,o,0,u,p);G(p,function(t,e){if(t.depth>=n.length||t===n[t.depth]){var o=function(t,e,n,a,i,o){var r=wt({},e);if(i){var l=i.type,s="color"===l&&Xl(i).drColorMappingBy,u="index"===s?a:"id"===s?o.mapIdToIndex(n.getId()):n.getValue(t.get("visualDimension"));r[l]=i.mapValueToVisual(u)}return r}(i,u,t,e,f,a);Zl(t,o,n,a)}})}else l=ql(u),d.fill=l}}function ql(t){var e=$l(t,"color");if(e){var n=$l(t,"colorAlpha"),a=$l(t,"colorSaturation");return a&&(e=re(e,null,null,a)),n&&(e=le(e,n)),e}}function $l(t,e){var n=t[e];if(null!=n&&"none"!==n)return n}function Kl(t,e){var n=t.get(e);return It(n)&&n.length?{name:e,range:n}:null}var Ql=Math.max,Jl=Math.min,ts=ue,es=G,ns=["itemStyle","borderWidth"],as=["itemStyle","gapWidth"],is=["upperLabel","show"],os=["upperLabel","height"];const rs={seriesType:"treemap",reset:function(t,e,n,a){var i=t.option,o=kt(t,n).refContainer,r=Et(t.getBoxLayoutParams(),o),l=i.size||[],s=B(ts(r.width,l[0]),o.width),u=B(ts(r.height,l[1]),o.height),d=a&&a.type,c=xl(a,["treemapZoomToNode","treemapRootToNode"],t),h="treemapRender"===d||"treemapMove"===d?a.rootRect:null,p=t.getViewRoot(),f=_l(p);if("treemapMove"!==d){var g="treemapZoomToNode"===d?function(t,e,n,a,i){var o,r=(e||{}).node,l=[a,i];if(!r||r===n)return l;var s=a*i,u=s*t.option.zoomToNodeRatio;for(;o=r.parentNode;){for(var d=0,c=o.children,h=0,p=c.length;h<p;h++)d+=c[h].getValue();var f=r.getValue();if(0===f)return l;u*=d/f;var g=o.getModel(),v=g.get(ns);(u+=4*v*v+(3*v+Math.max(v,cs(g)))*Math.pow(u,.5))>de&&(u=de),r=o}u<s&&(u=s);var y=Math.pow(u/s,.5);return[a*y,i*y]}(t,c,p,s,u):h?[h.width,h.height]:[s,u],v=i.sort;v&&"asc"!==v&&"desc"!==v&&(v="desc");var y={squareRatio:i.squareRatio,sort:v,leafDepth:i.leafDepth};p.hostTree.clearLayouts();var m={x:0,y:0,width:g[0],height:g[1],area:g[0]*g[1]};p.setLayout(m),ls(p,y,!1,0),m=p.getLayout(),es(f,function(t,e){var n=(f[e+1]||p).getValue();t.setLayout(wt({dataExtent:[n,n],borderWidth:0,upperHeight:0},m))})}var x=t.getData().tree.root;x.setLayout(function(t,e,n){if(e)return{x:e.x,y:e.y};var a={x:0,y:0};if(!n)return a;var i=n.node,o=i.getLayout();if(!o)return a;var r=[o.width/2,o.height/2],l=i;for(;l;){var s=l.getLayout();r[0]+=s.x,r[1]+=s.y,l=l.parentNode}return{x:t.width/2-r[0],y:t.height/2-r[1]}}(r,h,c),!0),t.setLayoutInfo(r),ds(x,new E(-r.x,-r.y,n.getWidth(),n.getHeight()),f,p,0)}};function ls(t,e,n,a){var i,o;if(!t.isRemoved()){var r=t.getLayout();i=r.width,o=r.height;var l=t.getModel(),s=l.get(ns),u=l.get(as)/2,d=cs(l),c=Math.max(s,d),h=s-u,p=c-u;t.setLayout({borderWidth:s,upperHeight:c,upperLabelHeight:d},!0);var f=(i=Ql(i-2*h,0))*(o=Ql(o-h-p,0)),g=function(t,e,n,a,i,o){var r=t.children||[],l=a.sort;"asc"!==l&&"desc"!==l&&(l=null);var s=null!=a.leafDepth&&a.leafDepth<=o;if(i&&!s)return t.viewChildren=[];r=F(r,function(t){return!t.isRemoved()}),function(t,e){e&&t.sort(function(t,n){var a="asc"===e?t.getValue()-n.getValue():n.getValue()-t.getValue();return 0===a?"asc"===e?t.dataIndex-n.dataIndex:n.dataIndex-t.dataIndex:a})}(r,l);var u=function(t,e,n){for(var a=0,i=0,o=e.length;i<o;i++)a+=e[i].getValue();var r,l=t.get("visualDimension");e&&e.length?"value"===l&&n?(r=[e[e.length-1].getValue(),e[0].getValue()],"asc"===n&&r.reverse()):(r=[1/0,-1/0],es(e,function(t){var e=t.getValue(l);e<r[0]&&(r[0]=e),e>r[1]&&(r[1]=e)})):r=[NaN,NaN];return{sum:a,dataExtent:r}}(e,r,l);if(0===u.sum)return t.viewChildren=[];if(u.sum=function(t,e,n,a,i){if(!a)return n;for(var o=t.get("visibleMin"),r=i.length,l=r,s=r-1;s>=0;s--){var u=i["asc"===a?r-s-1:s].getValue();u/n*e<o&&(l=s,n-=u)}return"asc"===a?i.splice(0,r-l):i.splice(l,r-l),n}(e,n,u.sum,l,r),0===u.sum)return t.viewChildren=[];for(var d=0,c=r.length;d<c;d++){var h=r[d].getValue()/u.sum*n;r[d].setLayout({area:h})}s&&(r.length&&t.setLayout({isLeafRoot:!0},!0),r.length=0);return t.viewChildren=r,t.setLayout({dataExtent:u.dataExtent},!0),r}(t,l,f,e,n,a);if(g.length){var v={x:h,y:p,width:i,height:o},y=Jl(i,o),m=1/0,x=[];x.area=0;for(var _=0,b=g.length;_<b;){var w=g[_];x.push(w),x.area+=w.getLayout().area;var S=ss(x,y,e.squareRatio);S<=m?(_++,m=S):(x.area-=x.pop().getLayout().area,us(x,y,v,u,!1),y=Jl(v.width,v.height),x.length=x.area=0,m=1/0)}if(x.length&&us(x,y,v,u,!0),!n){var I=l.get("childrenVisibleMin");null!=I&&f<I&&(n=!0)}for(_=0,b=g.length;_<b;_++)ls(g[_],e,n,a+1)}}}function ss(t,e,n){for(var a=0,i=1/0,o=0,r=void 0,l=t.length;o<l;o++)(r=t[o].getLayout().area)&&(r<i&&(i=r),r>a&&(a=r));var s=t.area*t.area,u=e*e*n;return s?Ql(u*a/s,s/(u*i)):1/0}function us(t,e,n,a,i){var o=e===n.width?0:1,r=1-o,l=["x","y"],s=["width","height"],u=n[l[o]],d=e?t.area/e:0;(i||d>n[s[r]])&&(d=n[s[r]]);for(var c=0,h=t.length;c<h;c++){var p=t[c],f={},g=d?p.getLayout().area/d:0,v=f[s[r]]=Ql(d-2*a,0),y=n[l[o]]+n[s[o]]-u,m=c===h-1||y<g?y:g,x=f[s[o]]=Ql(m-2*a,0);f[l[r]]=n[l[r]]+Jl(a,v/2),f[l[o]]=u+Jl(a,x/2),u+=m,p.setLayout(f,!0)}n[l[r]]+=d,n[s[r]]-=d}function ds(t,e,n,a,i){var o=t.getLayout(),r=n[i],l=r&&r===t;if(!(r&&!l||i===n.length&&t!==a)){t.setLayout({isInView:!0,invisible:!l&&!e.intersect(o),isAboveViewRoot:l},!0);var s=new E(e.x-o.x,e.y-o.y,e.width,e.height);es(t.viewChildren||[],function(t){ds(t,s,n,a,i+1)})}}function cs(t){return t.get(is)?t.get(os):0}function hs(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.eachSeriesByType("graph",function(t){var n=t.getCategoriesData(),a=t.getGraph().data,i=n.mapArray(n.getName);a.filterSelf(function(t){var n=a.getItemModel(t).getShallow("category");if(null!=n){ce(n)&&(n=i[n]);for(var o=0;o<e.length;o++)if(!e[o].isSelected(n))return!1}return!0})})}function ps(t){var e={};t.eachSeriesByType("graph",function(t){var n=t.getCategoriesData(),a=t.getData(),i={};n.each(function(a){var o=n.getName(a);i["ec-"+o]=a;var r=n.getItemModel(a),l=r.getModel("itemStyle").getItemStyle();l.fill||(l.fill=t.getColorFromPalette(o,e)),n.setItemVisual(a,"style",l);for(var s=["symbol","symbolSize","symbolKeepAspect"],u=0;u<s.length;u++){var d=r.getShallow(s[u],!0);null!=d&&n.setItemVisual(a,s[u],d)}}),n.count()&&a.each(function(t){var e=a.getItemModel(t).getShallow("category");if(null!=e){Dt(e)&&(e=i["ec-"+e]);var o=n.getItemVisual(e,"style"),r=a.ensureUniqueItemVisual(t,"style");wt(r,o);for(var l=["symbol","symbolSize","symbolKeepAspect"],s=0;s<l.length;s++)a.setItemVisual(t,l[s],n.getItemVisual(e,l[s]))}})})}function fs(t){return t instanceof Array||(t=[t,t]),t}function gs(t){t.eachSeriesByType("graph",function(t){var e=t.getGraph(),n=t.getEdgeData(),a=fs(t.get("edgeSymbol")),i=fs(t.get("edgeSymbolSize"));n.setVisual("fromSymbol",a&&a[0]),n.setVisual("toSymbol",a&&a[1]),n.setVisual("fromSymbolSize",i&&i[0]),n.setVisual("toSymbolSize",i&&i[1]),n.setVisual("style",t.getModel("lineStyle").getLineStyle()),n.each(function(t){var a=n.getItemModel(t),i=e.getEdgeByIndex(t),o=fs(a.getShallow("symbol",!0)),r=fs(a.getShallow("symbolSize",!0)),l=a.getModel("lineStyle").getLineStyle(),s=n.ensureUniqueItemVisual(t,"style");switch(wt(s,l),s.stroke){case"source":var u=i.node1.getVisual("style");s.stroke=u&&u.fill;break;case"target":u=i.node2.getVisual("style");s.stroke=u&&u.fill}o[0]&&i.setVisual("fromSymbol",o[0]),o[1]&&i.setVisual("toSymbol",o[1]),r[0]&&i.setVisual("fromSymbolSize",r[0]),r[1]&&i.setVisual("toSymbolSize",r[1])})})}var vs="--\x3e",ys=function(t){return t.get("autoCurveness")||null},ms=function(t,e){var n=ys(t),a=20,i=[];if(ce(n))a=n;else if(It(n))return void(t.__curvenessList=n);e>a&&(a=e);var o=a%2?a+2:a+3;i=[];for(var r=0;r<o;r++)i.push((r%2?r+1:r)/10*(r%2?-1:1));t.__curvenessList=i},xs=function(t,e,n){var a=[t.id,t.dataIndex].join("."),i=[e.id,e.dataIndex].join(".");return[n.uid,a,i].join(vs)},_s=function(t){var e=t.split(vs);return[e[0],e[2],e[1]].join(vs)},bs=function(t,e){var n=e.__edgeMap;return n[t]?n[t].length:0};function ws(t,e,n,a){var i=ys(e),o=It(i);if(!i)return null;var r=function(t,e){var n=xs(t.node1,t.node2,e);return e.__edgeMap[n]}(t,e);if(!r)return null;for(var l=-1,s=0;s<r.length;s++)if(r[s]===n){l=s;break}var u=function(t,e){return bs(xs(t.node1,t.node2,e),e)+bs(xs(t.node2,t.node1,e),e)}(t,e);ms(e,u),t.lineStyle=t.lineStyle||{};var d=xs(t.node1,t.node2,e),c=e.__curvenessList,h=o||u%2?0:1;if(r.isForward)return c[h+l];var p=_s(d),f=bs(p,e),g=c[l+f+h];return a?o?i&&0===i[0]?(f+h)%2?g:-g:((f%2?0:1)+h)%2?g:-g:(f+h)%2?g:-g:c[l+f+h]}function Ss(t){var e=t.coordinateSystem;if(!e||"view"===e.type){var n=t.getGraph();n.eachNode(function(t){var e=t.getModel();t.setLayout([+e.get("x"),+e.get("y")])}),Is(n,t)}}function Is(t,e){t.eachEdge(function(t,n){var a=he(t.getModel().get(["lineStyle","curveness"]),-ws(t,e,n,!0),0),i=pe(t.node1.getLayout()),o=pe(t.node2.getLayout()),r=[i,o];+a&&r.push([(i[0]+o[0])/2-(i[1]-o[1])*a,(i[1]+o[1])/2-(o[0]-i[0])*a]),t.setLayout(r)})}function Ms(t,e){t.eachSeriesByType("graph",function(t){var e=t.get("layout"),n=t.coordinateSystem;if(n&&"view"!==n.type){var a=t.getData(),i=[];G(n.dimensions,function(t){i=i.concat(a.mapDimensionsAll(t))});for(var o=0;o<a.count();o++){for(var r=[],l=!1,s=0;s<i.length;s++){var u=a.get(i[s],o);isNaN(u)||(l=!0),r.push(u)}l?a.setItemLayout(o,n.dataToPoint(r)):a.setItemLayout(o,[NaN,NaN])}Is(a.graph,t)}else e&&"none"!==e||Ss(t)})}function Cs(t){var e=t.coordinateSystem;if("view"!==e.type)return 1;var n=t.option.nodeScaleRatio,a=e.scaleX;return((e.getZoom()-1)*n+1)/a}function Ts(t){var e=t.getVisual("symbolSize");return e instanceof Array&&(e=(e[0]+e[1])/2),+e}var Ds=Math.PI,Ls=[];function As(t,e,n,a){var i=t.coordinateSystem;if(!i||"view"===i.type){var o=i.getBoundingRect(),r=t.getData(),l=r.graph,s=o.width/2+o.x,u=o.height/2+o.y,d=Math.min(o.width,o.height)/2,c=r.count();if(r.setLayout({cx:s,cy:u}),c){if(n){var h=i.pointToData(a),p=h[0],f=h[1],g=[p-s,f-u];fe(g,g),ge(g,g,d),n.setLayout([s+g[0],u+g[1]],!0),ks(n,t.get(["circular","rotateLabel"]),s,u)}Ps[e](t,l,r,d,s,u,c),l.eachEdge(function(e,n){var a,i=he(e.getModel().get(["lineStyle","curveness"]),ws(e,t,n),0),o=pe(e.node1.getLayout()),r=pe(e.node2.getLayout()),l=(o[0]+r[0])/2,d=(o[1]+r[1])/2;+i&&(a=[s*(i*=3)+l*(1-i),u*i+d*(1-i)]),e.setLayout([o,r,a])})}}}var Ps={value:function(t,e,n,a,i,o,r){var l=0,s=n.getSum("value"),u=2*Math.PI/(s||r);e.eachNode(function(t){var e=t.getValue("value"),n=u*(s?e:1)/2;l+=n,t.setLayout([a*Math.cos(l)+i,a*Math.sin(l)+o]),l+=n})},symbolSize:function(t,e,n,a,i,o,r){var l=0;Ls.length=r;var s=Cs(t);e.eachNode(function(t){var e=Ts(t);isNaN(e)&&(e=2),e<0&&(e=0),e*=s;var n=Math.asin(e/2/a);isNaN(n)&&(n=Ds/2),Ls[t.dataIndex]=n,l+=2*n});var u=(2*Ds-l)/r/2,d=0;e.eachNode(function(t){var e=u+Ls[t.dataIndex];d+=e,(!t.getLayout()||!t.getLayout().fixed)&&t.setLayout([a*Math.cos(d)+i,a*Math.sin(d)+o]),d+=e})}};function ks(t,e,n,a){var i=t.getGraphicEl();if(i){var o=t.getModel().get(["label","rotate"])||0,r=i.getSymbolPath();if(e){var l=t.getLayout(),s=Math.atan2(l[1]-a,l[0]-n);s<0&&(s=2*Math.PI+s);var u=l[0]<n;u&&(s-=Math.PI);var d=u?"left":"right";r.setTextConfig({rotation:-s,position:d,origin:"center"});var c=r.ensureState("emphasis");wt(c.textConfig||(c.textConfig={}),{position:d})}else r.setTextConfig({rotation:o*=Math.PI/180})}}function Es(t){t.eachSeriesByType("graph",function(t){"circular"===t.get("layout")&&As(t,"symbolSize")})}var Ns=xe;function zs(t){t.eachSeriesByType("graph",function(t){var e=t.coordinateSystem;if(!e||"view"===e.type)if("force"===t.get("layout")){var n=t.preservedPoints||{},a=t.getGraph(),i=a.data,o=a.edgeData,r=t.getModel("force"),l=r.get("initLayout");t.preservedPoints?i.each(function(t){var e=i.getId(t);i.setItemLayout(t,n[e]||[NaN,NaN])}):l&&"none"!==l?"circular"===l&&As(t,"value"):Ss(t);var s=i.getDataExtent("value"),u=o.getDataExtent("value"),d=r.get("repulsion"),c=r.get("edgeLength"),h=It(d)?d:[d,d],p=It(c)?c:[c,c];p=[p[1],p[0]];var f=i.mapArray("value",function(t,e){var n=i.getItemLayout(e),a=we(t,s,h);return isNaN(a)&&(a=(h[0]+h[1])/2),{w:a,rep:a,fixed:i.getItemModel(e).get("fixed"),p:!n||isNaN(n[0])||isNaN(n[1])?null:n}}),g=o.mapArray("value",function(e,n){var i=a.getEdgeByIndex(n),o=we(e,u,p);isNaN(o)&&(o=(p[0]+p[1])/2);var r=i.getModel(),l=he(i.getModel().get(["lineStyle","curveness"]),-ws(i,t,n,!0),0);return{n1:f[i.node1.dataIndex],n2:f[i.node2.dataIndex],d:o,curveness:l,ignoreForceLayout:r.get("ignoreForceLayout")}}),v=e.getBoundingRect(),y=function(t,e,n){for(var a=t,i=e,o=n.rect,r=o.width,l=o.height,s=[o.x+r/2,o.y+l/2],u=null==n.gravity?.1:n.gravity,d=0;d<a.length;d++){var c=a[d];c.p||(c.p=ve(r*(Math.random()-.5)+s[0],l*(Math.random()-.5)+s[1])),c.pp=pe(c.p),c.edges=null}var h,p,f=null==n.friction?.6:n.friction,g=f;return{warmUp:function(){g=.8*f},setFixed:function(t){a[t].fixed=!0},setUnfixed:function(t){a[t].fixed=!1},beforeStep:function(t){h=t},afterStep:function(t){p=t},step:function(t){h&&h(a,i);for(var e=[],n=a.length,o=0;o<i.length;o++){var r=i[o];if(!r.ignoreForceLayout){var l=r.n1,d=r.n2;ye(e,d.p,l.p);var c=me(e)-r.d,f=d.w/(l.w+d.w);isNaN(f)&&(f=0),fe(e,e),!l.fixed&&Ns(l.p,l.p,e,f*c*g),!d.fixed&&Ns(d.p,d.p,e,-(1-f)*c*g)}}for(o=0;o<n;o++)(x=a[o]).fixed||(ye(e,s,x.p),Ns(x.p,x.p,e,u*g));for(o=0;o<n;o++){l=a[o];for(var v=o+1;v<n;v++){d=a[v],ye(e,d.p,l.p),0===(c=me(e))&&(_e(e,Math.random()-.5,Math.random()-.5),c=1);var y=(l.rep+d.rep)/c/c;!l.fixed&&Ns(l.pp,l.pp,e,y),!d.fixed&&Ns(d.pp,d.pp,e,-y)}}var m=[];for(o=0;o<n;o++){var x;(x=a[o]).fixed||(ye(m,x.p,x.pp),Ns(x.p,x.p,m,g),be(x.pp,x.p))}var _=(g*=.992)<.01;p&&p(a,i,_),t&&t(_)}}}(f,g,{rect:v,gravity:r.get("gravity"),friction:r.get("friction")});y.beforeStep(function(t,e){for(var n=0,i=t.length;n<i;n++)t[n].fixed&&be(t[n].p,a.getNodeByIndex(n).getLayout())}),y.afterStep(function(t,e,o){for(var r=0,l=t.length;r<l;r++)t[r].fixed||a.getNodeByIndex(r).setLayout(t[r].p),n[i.getId(r)]=t[r].p;for(r=0,l=e.length;r<l;r++){var s=e[r],u=a.getEdgeByIndex(r),d=s.n1.p,c=s.n2.p,h=u.getLayout();(h=h?h.slice():[])[0]=h[0]||[],h[1]=h[1]||[],be(h[0],d),be(h[1],c),+s.curveness&&(h[2]=[(d[0]+c[0])/2-(d[1]-c[1])*s.curveness,(d[1]+c[1])/2-(c[0]-d[0])*s.curveness]),u.setLayout(h)}}),t.forceLayout=y,t.preservedPoints=n,y.step()}else t.forceLayout=null})}function Rs(t,e){var n=[];return t.eachSeriesByType("graph",function(a){Se({targetModel:a,coordSysType:"view",coordSysProvider:function(){var i=a.getData(),o=i.mapArray(function(t){var e=i.getItemModel(t);return[+e.get("x"),+e.get("y")]}),r=[],l=[];ot(o,r,l),l[0]-r[0]===0&&(l[0]+=1,r[0]-=1);l[1]-r[1]===0&&(l[1]+=1,r[1]-=1);var s=(l[0]-r[0])/(l[1]-r[1]),u=function(t,e,n){var a=kt(t,e),i=wt(t.getBoxLayoutParams(),{aspect:n}),o=Et(i,a.refContainer);return Ie(t,o,n)}(a,e,s);isNaN(s)&&(r=[u.x,u.y],l=[u.x+u.width,u.y+u.height]);var d=l[0]-r[0],c=l[1]-r[1],h=new rt(null,{api:e,ecModel:t});return h.zoomLimit=a.get("scaleLimit"),h.setBoundingRect(r[0],r[1],d,c),h.setViewRect(u.x,u.y,u.width,u.height),h.setCenter(a.get("center")),h.setZoom(a.get("zoom")),n.push(h),h},isDefaultDataCoordSys:!0})}),n}var Os=[],Vs=[],Bs=[],Gs=Ce,Ws=Te,Fs=Math.abs;function js(t,e,n){for(var a,i=t[0],o=t[1],r=t[2],l=1/0,s=n*n,u=.1,d=.1;d<=.9;d+=.1){Os[0]=Gs(i[0],o[0],r[0],d),Os[1]=Gs(i[1],o[1],r[1],d),(p=Fs(Ws(Os,e)-s))<l&&(l=p,a=d)}for(var c=0;c<32;c++){var h=a+u;Vs[0]=Gs(i[0],o[0],r[0],a),Vs[1]=Gs(i[1],o[1],r[1],a),Bs[0]=Gs(i[0],o[0],r[0],h),Bs[1]=Gs(i[1],o[1],r[1],h);var p=Ws(Vs,e)-s;if(Fs(p)<.01)break;var f=Ws(Bs,e)-s;u/=2,p<0?f>=0?a+=u:a-=u:f>=0?a-=u:a+=u}return a}function Ys(t,e){var n=[],a=Me,i=[[],[],[]],o=[[],[]],r=[];e/=2,t.eachEdge(function(t,l){var s=t.getLayout(),u=t.getVisual("fromSymbol"),d=t.getVisual("toSymbol");s.__original||(s.__original=[pe(s[0]),pe(s[1])],s[2]&&s.__original.push(pe(s[2])));var c=s.__original;if(null!=s[2]){if(be(i[0],c[0]),be(i[1],c[2]),be(i[2],c[1]),u&&"none"!==u){var h=Ts(t.node1),p=js(i,c[0],h*e);a(i[0][0],i[1][0],i[2][0],p,n),i[0][0]=n[3],i[1][0]=n[4],a(i[0][1],i[1][1],i[2][1],p,n),i[0][1]=n[3],i[1][1]=n[4]}if(d&&"none"!==d){h=Ts(t.node2),p=js(i,c[1],h*e);a(i[0][0],i[1][0],i[2][0],p,n),i[1][0]=n[1],i[2][0]=n[2],a(i[0][1],i[1][1],i[2][1],p,n),i[1][1]=n[1],i[2][1]=n[2]}be(s[0],i[0]),be(s[1],i[2]),be(s[2],i[1])}else{if(be(o[0],c[0]),be(o[1],c[1]),ye(r,o[1],o[0]),fe(r,r),u&&"none"!==u){h=Ts(t.node1);xe(o[0],o[0],r,h*e)}if(d&&"none"!==d){h=Ts(t.node2);xe(o[1],o[1],r,-h*e)}be(s[0],o[0]),be(s[1],o[1])}})}var Us=k();function Xs(t,e){t&&(Us(t).bridge=e)}function Hs(t){return"view"===t.type}var Zs=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return nt(e,t),e.prototype.init=function(t,e){var n=new De,a=new Le,i=this.group,o=new at;this._controller=new it(e.getZr()),this._controllerHost={target:o},o.add(n.group),o.add(a.group),i.add(o),this._symbolDraw=n,this._lineDraw=a,this._mainGroup=o,this._firstRender=!0},e.prototype.render=function(t,e,n){var a=this,i=t.coordinateSystem,o=!1;this._model=t,this._api=n,this._active=!0;var r=this._getThumbnailInfo();r&&r.bridge.reset(n);var l=this._symbolDraw,s=this._lineDraw;if(Hs(i)){var u={x:i.x,y:i.y,scaleX:i.scaleX,scaleY:i.scaleY};this._firstRender?this._mainGroup.attr(u):tt(this._mainGroup,u,t)}Ys(t.getGraph(),Cs(t));var d=t.getData();l.updateData(d);var c=t.getEdgeData();s.updateData(c),this._updateNodeAndLinkScale(),this._updateController(null,t,n),clearTimeout(this._layoutTimeout);var h=t.forceLayout,p=t.get(["force","layoutAnimation"]);h&&(o=!0,this._startForceLayoutIteration(h,n,p));var f=t.get("layout");d.graph.eachNode(function(e){var i=e.dataIndex,o=e.getGraphicEl(),r=e.getModel();if(o){o.off("drag").off("dragend");var l=r.get("draggable");l&&o.on("drag",function(r){switch(f){case"force":h.warmUp(),!a._layouting&&a._startForceLayoutIteration(h,n,p),h.setFixed(i),d.setItemLayout(i,[o.x,o.y]);break;case"circular":d.setItemLayout(i,[o.x,o.y]),e.setLayout({fixed:!0},!0),As(t,"symbolSize",e,[r.offsetX,r.offsetY]),a.updateLayout(t);break;default:d.setItemLayout(i,[o.x,o.y]),Is(t.getGraph(),t),a.updateLayout(t)}}).on("dragend",function(){h&&h.setUnfixed(i)}),o.setDraggable(l,!!r.get("cursor")),"adjacency"===r.get(["emphasis","focus"])&&(V(o).focus=e.getAdjacentDataIndices())}}),d.graph.eachEdge(function(t){var e=t.getGraphicEl(),n=t.getModel().get(["emphasis","focus"]);e&&"adjacency"===n&&(V(e).focus={edge:[t.dataIndex],node:[t.node1.dataIndex,t.node2.dataIndex]})});var g="circular"===t.get("layout")&&t.get(["circular","rotateLabel"]),v=d.getLayout("cx"),y=d.getLayout("cy");d.graph.eachNode(function(t){ks(t,g,v,y)}),this._firstRender=!1,o||this._renderThumbnail(t,n,this._symbolDraw,this._lineDraw)},e.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(t,e,n){var a=this,i=!1;!function o(){t.step(function(t){a.updateLayout(a._model),!t&&i||(i=!0,a._renderThumbnail(a._model,e,a._symbolDraw,a._lineDraw)),(a._layouting=!t)&&(n?a._layoutTimeout=setTimeout(o,16):o())})}()},e.prototype._updateController=function(t,e,n){var a=this._controller,i=this._controllerHost,o=e.coordinateSystem;Hs(o)?(a.enable(e.get("roam"),{api:n,zInfo:{component:e},triggerInfo:{roamTrigger:e.get("roamTrigger"),isInSelf:function(t,e,n){return o.containPoint([e,n])},isInClip:function(e,n,a){return!t||t.contain(n,a)}}}),i.zoomLimit=e.get("scaleLimit"),i.zoom=o.getZoom(),a.off("pan").off("zoom").on("pan",function(t){n.dispatchAction({seriesId:e.id,type:"graphRoam",dx:t.dx,dy:t.dy})}).on("zoom",function(t){n.dispatchAction({seriesId:e.id,type:"graphRoam",zoom:t.scale,originX:t.originX,originY:t.originY})})):a.disable()},e.prototype.updateViewOnPan=function(t,e,n){this._active&&(Ae(this._controllerHost,n.dx,n.dy),this._updateThumbnailWindow())},e.prototype.updateViewOnZoom=function(t,e,n){this._active&&(Pe(this._controllerHost,n.zoom,n.originX,n.originY),this._updateNodeAndLinkScale(),Ys(t.getGraph(),Cs(t)),this._lineDraw.updateLayout(),e.updateLabelLayout(),this._updateThumbnailWindow())},e.prototype._updateNodeAndLinkScale=function(){var t=this._model,e=t.getData(),n=Cs(t);e.eachItemGraphicEl(function(t,e){t&&t.setSymbolScale(n)})},e.prototype.updateLayout=function(t){this._active&&(Ys(t.getGraph(),Cs(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout())},e.prototype.remove=function(){this._active=!1,clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove(),this._controller&&this._controller.disable()},e.prototype._getThumbnailInfo=function(){var t=this._model,e=t.coordinateSystem;if("view"===e.type){var n=function(t){if(t)return Us(t).bridge}(t);if(n)return{bridge:n,coordSys:e}}},e.prototype._updateThumbnailWindow=function(){var t=this._getThumbnailInfo();t&&t.bridge.updateWindow(t.coordSys.transform,this._api)},e.prototype._renderThumbnail=function(t,e,n,a){var i=this._getThumbnailInfo();if(i){var o=new at,r=n.group.children(),l=a.group.children(),s=new at,u=new at;o.add(u),o.add(s);for(var d=0;d<r.length;d++){var c=(m=r[d]).children()[0],h=m.x,p=m.y,f=ke(c.shape),g=wt(f,{width:c.scaleX,height:c.scaleY,x:h-c.scaleX/2,y:p-c.scaleY/2}),v=ke(c.style),y=new c.constructor({shape:g,style:v,z2:151});u.add(y)}for(d=0;d<l.length;d++){var m,x=(m=l[d]).children()[0],_=(v=ke(x.style),g=ke(x.shape),new Ee({style:v,shape:g,z2:151}));s.add(_)}i.bridge.renderContent({api:e,roamType:t.get("roam"),viewportRect:null,group:o,targetTrans:i.coordSys.transform})}},e.type="graph",e}(st);function qs(t){return"_EC_"+t}var $s=function(){function t(t){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=t||!1}return t.prototype.isDirected=function(){return this._directed},t.prototype.addNode=function(t,e){t=null==t?""+e:""+t;var n=this._nodesMap;if(!n[qs(t)]){var a=new Ks(t,e);return a.hostGraph=this,this.nodes.push(a),n[qs(t)]=a,a}},t.prototype.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},t.prototype.getNodeById=function(t){return this._nodesMap[qs(t)]},t.prototype.addEdge=function(t,e,n){var a=this._nodesMap,i=this._edgesMap;if(ce(t)&&(t=this.nodes[t]),ce(e)&&(e=this.nodes[e]),t instanceof Ks||(t=a[qs(t)]),e instanceof Ks||(e=a[qs(e)]),t&&e){var o=t.id+"-"+e.id,r=new Qs(t,e,n);return r.hostGraph=this,this._directed&&(t.outEdges.push(r),e.inEdges.push(r)),t.edges.push(r),t!==e&&e.edges.push(r),this.edges.push(r),i[o]=r,r}},t.prototype.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},t.prototype.getEdge=function(t,e){t instanceof Ks&&(t=t.id),e instanceof Ks&&(e=e.id);var n=this._edgesMap;return this._directed?n[t+"-"+e]:n[t+"-"+e]||n[e+"-"+t]},t.prototype.eachNode=function(t,e){for(var n=this.nodes,a=n.length,i=0;i<a;i++)n[i].dataIndex>=0&&t.call(e,n[i],i)},t.prototype.eachEdge=function(t,e){for(var n=this.edges,a=n.length,i=0;i<a;i++)n[i].dataIndex>=0&&n[i].node1.dataIndex>=0&&n[i].node2.dataIndex>=0&&t.call(e,n[i],i)},t.prototype.breadthFirstTraverse=function(t,e,n,a){if(e instanceof Ks||(e=this._nodesMap[qs(e)]),e){for(var i="out"===n?"outEdges":"in"===n?"inEdges":"edges",o=0;o<this.nodes.length;o++)this.nodes[o].__visited=!1;if(!t.call(a,e,null))for(var r=[e];r.length;){var l=r.shift(),s=l[i];for(o=0;o<s.length;o++){var u=s[o],d=u.node1===l?u.node2:u.node1;if(!d.__visited){if(t.call(a,d,l))return;r.push(d),d.__visited=!0}}}}},t.prototype.update=function(){for(var t=this.data,e=this.edgeData,n=this.nodes,a=this.edges,i=0,o=n.length;i<o;i++)n[i].dataIndex=-1;for(i=0,o=t.count();i<o;i++)n[t.getRawIndex(i)].dataIndex=i;e.filterSelf(function(t){var n=a[e.getRawIndex(t)];return n.node1.dataIndex>=0&&n.node2.dataIndex>=0});for(i=0,o=a.length;i<o;i++)a[i].dataIndex=-1;for(i=0,o=e.count();i<o;i++)a[e.getRawIndex(i)].dataIndex=i},t.prototype.clone=function(){for(var e=new t(this._directed),n=this.nodes,a=this.edges,i=0;i<n.length;i++)e.addNode(n[i].id,n[i].dataIndex);for(i=0;i<a.length;i++){var o=a[i];e.addEdge(o.node1.id,o.node2.id,o.dataIndex)}return e},t}(),Ks=function(){function t(t,e){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=null==t?"":t,this.dataIndex=null==e?-1:e}return t.prototype.degree=function(){return this.edges.length},t.prototype.inDegree=function(){return this.inEdges.length},t.prototype.outDegree=function(){return this.outEdges.length},t.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostGraph.data.getItemModel(this.dataIndex).getModel(t)},t.prototype.getAdjacentDataIndices=function(){for(var t={edge:[],node:[]},e=0;e<this.edges.length;e++){var n=this.edges[e];n.dataIndex<0||(t.edge.push(n.dataIndex),t.node.push(n.node1.dataIndex,n.node2.dataIndex))}return t},t.prototype.getTrajectoryDataIndices=function(){for(var t=Ot(),e=Ot(),n=0,a=this.edges.length;n<a;n++){var i=this.edges[n];if(!(i.dataIndex<0)){t.set(i.dataIndex,!0);for(var o=[i.node1],r=[i.node2],l=0;l<o.length;){var s=o[l];l++,e.set(s.dataIndex,!0);for(var u=s.inEdges,d=0,c=u.length,h=void 0,p=void 0;d<c;d++)(p=(h=u[d]).dataIndex)>=0&&!t.hasKey(p)&&(t.set(p,!0),o.push(h.node1))}for(l=0;l<r.length;){var f=r[l];l++,e.set(f.dataIndex,!0);for(var g=f.outEdges,v=(d=0,g.length),y=void 0,m=void 0;d<v;d++)(m=(y=g[d]).dataIndex)>=0&&!t.hasKey(m)&&(t.set(m,!0),r.push(y.node2))}}}return{edge:t.keys(),node:e.keys()}},t}(),Qs=function(){function t(t,e,n){this.dataIndex=-1,this.node1=t,this.node2=e,this.dataIndex=null==n?-1:n}return t.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(t)},t.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},t.prototype.getTrajectoryDataIndices=function(){var t=Ot(),e=Ot();t.set(this.dataIndex,!0);for(var n=[this.node1],a=[this.node2],i=0;i<n.length;){var o=n[i];i++,e.set(o.dataIndex,!0);for(var r=0,l=o.inEdges.length,s=void 0,u=void 0;r<l;r++)(u=(s=o.inEdges[r]).dataIndex)>=0&&!t.hasKey(u)&&(t.set(u,!0),n.push(s.node1))}for(i=0;i<a.length;){var d=a[i];i++,e.set(d.dataIndex,!0);r=0,l=d.outEdges.length;for(var c=void 0,h=void 0;r<l;r++)(h=(c=d.outEdges[r]).dataIndex)>=0&&!t.hasKey(h)&&(t.set(h,!0),a.push(c.node2))}return{edge:t.keys(),node:e.keys()}},t}();function Js(t,e){return{getValue:function(n){var a=this[t][e];return a.getStore().get(a.getDimensionIndex(n||"value"),this.dataIndex)},setVisual:function(n,a){this.dataIndex>=0&&this[t][e].setItemVisual(this.dataIndex,n,a)},getVisual:function(n){return this[t][e].getItemVisual(this.dataIndex,n)},setLayout:function(n,a){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,n,a)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}}function tu(t,e,n,a,i){for(var o=new $s(a),r=0;r<t.length;r++)o.addNode(ue(t[r].id,t[r].name,r),r);var l=[],s=[],u=0;for(r=0;r<e.length;r++){var d=e[r],c=d.source,h=d.target;o.addEdge(c,h,u)&&(s.push(d),l.push(ue(Mt(d.id,null),c+" > "+h)),u++)}var p,f=n.get("coordinateSystem");if("cartesian2d"===f||"polar"===f||"matrix"===f)p=ze(t,n);else{var g=Re.get(f),v=g&&g.dimensions||[];J(v,"value")<0&&v.concat(["value"]);var y=Ct(t,{coordDimensions:v,encodeDefine:n.getEncode()}).dimensions;(p=new Tt(y,n)).initData(t)}var m=new Tt(["value"],n);return m.initData(s,l),i&&i(p,m),ul({mainData:p,struct:o,structAttr:"graph",datas:{node:p,edge:m},datasAttr:{node:"data",edge:"edgeData"}}),o.update(),o}Ne(Ks,Js("hostGraph","data")),Ne(Qs,Js("hostGraph","edgeData"));var eu=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n}return nt(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments);var n=this;function a(){return n._categoriesData}this.legendVisualProvider=new Oe(a,a),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(e){t.prototype.mergeDefaultAndTheme.apply(this,arguments),Ve(e,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,e){var n,a=t.edges||t.links||[],i=t.data||t.nodes||[],o=this;if(i&&a){ys(n=this)&&(n.__curvenessList=[],n.__edgeMap={},ms(n));var r=tu(i,a,this,!0,function(t,e){t.wrapMethod("getItemModel",function(t){var e=o._categoriesModels[t.getShallow("category")];return e&&(e.parentModel=t.parentModel,t.parentModel=e),t});var n=Lt.prototype.getModel;function a(t,e){var a=n.call(this,t,e);return a.resolveParentPath=i,a}function i(t){if(t&&("label"===t[0]||"label"===t[1])){var e=t.slice();return"label"===t[0]?e[0]="edgeLabel":"label"===t[1]&&(e[1]="edgeLabel"),e}return t}e.wrapMethod("getItemModel",function(t){return t.resolveParentPath=i,t.getModel=a,t})});return G(r.edges,function(t){!function(t,e,n,a){if(ys(n)){var i=xs(t,e,n),o=n.__edgeMap,r=o[_s(i)];o[i]&&!r?o[i].isForward=!0:r&&o[i]&&(r.isForward=!0,o[i].isForward=!1),o[i]=o[i]||[],o[i].push(a)}}(t.node1,t.node2,this,t.dataIndex)},this),r.data}},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,e,n){if("edge"===n){var a=this.getData(),i=this.getDataParams(t,n),o=a.graph.getEdgeByIndex(t),r=a.getName(o.node1.dataIndex),l=a.getName(o.node2.dataIndex),s=[];return null!=r&&s.push(r),null!=l&&s.push(l),At("nameValue",{name:s.join(" > "),value:i.value,noValue:null==i.value})}return Be({series:this,dataIndex:t,multipleSeries:e})},e.prototype._updateCategoriesData=function(){var t=St(this.option.categories||[],function(t){return null!=t.value?t:wt({value:0},t)}),e=new Tt(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray(function(t){return e.getItemModel(t)})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return t.prototype.isAnimationEnabled.call(this)&&!("force"===this.get("layout")&&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:ut.color.neutral50,width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:ut.color.primary}}},e}(Pt);var nu=function(t){function e(e,n,a){var i=t.call(this)||this;V(i).dataType="node",i.z2=2;var o=new Wt;return i.setTextContent(o),i.updateData(e,n,a,!0),i}return nt(e,t),e.prototype.updateData=function(t,e,n,a){var i=this,o=t.graph.getNodeByIndex(e),r=t.hostModel,l=o.getModel(),s=l.getModel("emphasis"),u=t.getItemLayout(e),d=wt(Ge(l.getModel("itemStyle"),u,!0),u),c=this;if(isNaN(d.startAngle))c.setShape(d);else{a?c.setShape(d):tt(c,{shape:d},r,e);var h=wt(Ge(l.getModel("itemStyle"),u,!0),u);i.setShape(h),i.useStyle(t.getItemVisual(e,"style")),yt(i,l),this._updateLabel(r,l,o),t.setItemGraphicEl(e,c),yt(c,l,"itemStyle");var p=s.get("focus");Yt(this,"adjacency"===p?o.getAdjacentDataIndices():p,s.get("blurScope"),s.get("disabled"))}},e.prototype._updateLabel=function(t,e,n){var a=this.getTextContent(),i=n.getLayout(),o=(i.startAngle+i.endAngle)/2,r=Math.cos(o),l=Math.sin(o),s=e.getModel("label");a.ignore=!s.get("show");var u=ne(e),d=n.getVisual("style");ee(a,u,{labelFetcher:{getFormattedLabel:function(n,a,i,o,r,l){return t.getFormattedLabel(n,a,"node",o,he(r,u.normal&&u.normal.get("formatter"),e.get("name")),l)}},labelDataIndex:n.dataIndex,defaultText:n.dataIndex+"",inheritColor:d.fill,defaultOpacity:d.opacity,defaultOutsidePosition:"startArc"});var c,h=s.get("position")||"outside",p=s.get("distance")||0;c="outside"===h?i.r+p:(i.r+i.r0)/2,this.textConfig={inside:"outside"!==h};var f="outside"!==h?s.get("align")||"center":r>0?"left":"right",g="outside"!==h?s.get("verticalAlign")||"middle":l>0?"top":"bottom";a.attr({x:r*c+i.cx,y:l*c+i.cy,rotation:0,style:{align:f,verticalAlign:g}})},e}(We),au=function(t){function e(e,n,a,i){var o=t.call(this)||this;return V(o).dataType="edge",o.updateData(e,n,a,i,!0),o}return nt(e,t),e.prototype.buildPath=function(t,e){t.moveTo(e.s1[0],e.s1[1]);var n=.7,a=e.clockwise;t.arc(e.cx,e.cy,e.r,e.sStartAngle,e.sEndAngle,!a),t.bezierCurveTo((e.cx-e.s2[0])*n+e.s2[0],(e.cy-e.s2[1])*n+e.s2[1],(e.cx-e.t1[0])*n+e.t1[0],(e.cy-e.t1[1])*n+e.t1[1],e.t1[0],e.t1[1]),t.arc(e.cx,e.cy,e.r,e.tStartAngle,e.tEndAngle,!a),t.bezierCurveTo((e.cx-e.t2[0])*n+e.t2[0],(e.cy-e.t2[1])*n+e.t2[1],(e.cx-e.s1[0])*n+e.s1[0],(e.cy-e.s1[1])*n+e.s1[1],e.s1[0],e.s1[1]),t.closePath()},e.prototype.updateData=function(t,e,n,a,i){var o=t.hostModel,r=e.graph.getEdgeByIndex(n),l=r.getLayout(),s=r.node1.getModel(),u=e.getItemModel(r.dataIndex),d=u.getModel("lineStyle"),c=u.getModel("emphasis"),h=c.get("focus"),p=wt(Ge(s.getModel("itemStyle"),l,!0),l),f=this;isNaN(p.sStartAngle)||isNaN(p.tStartAngle)?f.setShape(p):(i?(f.setShape(p),iu(f,r,t,d)):(Fe(f),iu(f,r,t,d),tt(f,{shape:p},o,n)),Yt(this,"adjacency"===h?r.getAdjacentDataIndices():h,c.get("blurScope"),c.get("disabled")),yt(f,u,"lineStyle"),e.setItemGraphicEl(r.dataIndex,f))},e}(xt);function iu(t,e,n,a){var i=e.node1,o=e.node2,r=t.style;switch(t.setStyle(a.getLineStyle()),a.get("color")){case"source":r.fill=n.getItemVisual(i.dataIndex,"style").fill,r.decal=i.getVisual("style").decal;break;case"target":r.fill=n.getItemVisual(o.dataIndex,"style").fill,r.decal=o.getVisual("style").decal;break;case"gradient":var l=n.getItemVisual(i.dataIndex,"style").fill,s=n.getItemVisual(o.dataIndex,"style").fill;if(Dt(l)&&Dt(s)){var u=t.shape,d=(u.s1[0]+u.s2[0])/2,c=(u.s1[1]+u.s2[1])/2,h=(u.t1[0]+u.t2[0])/2,p=(u.t1[1]+u.t2[1])/2;r.fill=new je(d,c,h,p,[{offset:0,color:l},{offset:1,color:s}],!0)}}}var ou=Math.PI/180,ru=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return nt(e,t),e.prototype.init=function(t,e){},e.prototype.render=function(t,e,n){var a=t.getData(),i=this._data,o=this.group,r=-t.get("startAngle")*ou;if(a.diff(i).add(function(t){if(a.getItemLayout(t)){var e=new nu(a,t,r);V(e).dataIndex=t,o.add(e)}}).update(function(e,n){var l=i.getItemGraphicEl(n);a.getItemLayout(e)?(l?l.updateData(a,e,r):l=new nu(a,e,r),o.add(l)):l&&Ye(l,t,n)}).remove(function(e){var n=i.getItemGraphicEl(e);n&&Ye(n,t,e)}).execute(),!i){var l=t.get("center");this.group.scaleX=.01,this.group.scaleY=.01,this.group.originX=B(l[0],n.getWidth()),this.group.originY=B(l[1],n.getHeight()),Q(this.group,{scaleX:1,scaleY:1},t)}this._data=a,this.renderEdges(t,r)},e.prototype.renderEdges=function(t,e){var n=t.getData(),a=t.getEdgeData(),i=this._edgeData,o=this.group;a.diff(i).add(function(t){var i=new au(n,a,t,e);V(i).dataIndex=t,o.add(i)}).update(function(t,r){var l=i.getItemGraphicEl(r);l.updateData(n,a,t,e),o.add(l)}).remove(function(e){var n=i.getItemGraphicEl(e);n&&Ye(n,t,e)}).execute(),this._edgeData=a},e.prototype.dispose=function(){},e.type="chord",e}(st),lu=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return nt(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.fillDataTextStyle(e.edges||e.links),this.legendVisualProvider=new Oe(Xt(this.getData,this),Xt(this.getRawData,this))},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(e.edges||e.links)},e.prototype.getInitialData=function(t,e){var n=t.edges||t.links||[],a=t.data||t.nodes||[];if(a&&n)return tu(a,n,this,!0,function(t,e){var n=Lt.prototype.getModel;function a(t,e){var a=n.call(this,t,e);return a.resolveParentPath=i,a}function i(t){if(t&&("label"===t[0]||"label"===t[1])){var e=t.slice();return"label"===t[0]?e[0]="edgeLabel":"label"===t[1]&&(e[1]="edgeLabel"),e}return t}e.wrapMethod("getItemModel",function(t){return t.resolveParentPath=i,t.getModel=a,t})}).data},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,e,n){var a=this.getDataParams(t,n);if("edge"===n){var i=this.getData(),o=i.graph.getEdgeByIndex(t),r=i.getName(o.node1.dataIndex),l=i.getName(o.node2.dataIndex),s=[];return null!=r&&s.push(r),null!=l&&s.push(l),At("nameValue",{name:s.join(" > "),value:a.value,noValue:null==a.value})}return At("nameValue",{name:a.name,value:a.value,noValue:null==a.value})},e.prototype.getDataParams=function(e,n){var a=t.prototype.getDataParams.call(this,e,n);if("node"===n){var i=this.getData(),o=this.getGraph().getNodeByIndex(e);if(null==a.name&&(a.name=i.getName(e)),null==a.value){var r=o.getLayout().value;a.value=r}}return a},e.type="series.chord",e.defaultOption={z:2,coordinateSystem:"none",legendHoverLink:!0,colorBy:"data",left:0,top:0,right:0,bottom:0,width:null,height:null,center:["50%","50%"],radius:["70%","80%"],clockwise:!0,startAngle:90,endAngle:"auto",minAngle:0,padAngle:3,itemStyle:{borderRadius:[0,0,5,5]},lineStyle:{width:0,color:"source",opacity:.2},label:{show:!0,position:"outside",distance:5},emphasis:{focus:"adjacency",lineStyle:{opacity:.5}}},e}(Pt),su=Math.PI/180;function uu(t,e){t.eachSeriesByType("chord",function(t){!function(t,e){var n=t.getData(),a=n.graph,i=t.getEdgeData();if(!i.count())return;var o=Ue(t,e),r=o.cx,l=o.cy,s=o.r,u=o.r0,d=Math.max((t.get("padAngle")||0)*su,0),c=Math.max((t.get("minAngle")||0)*su,0),h=-t.get("startAngle")*su,p=h+2*Math.PI,f=t.get("clockwise"),g=f?1:-1,v=[h,p];Xe(v,!f);var y=v[0],m=v[1]-y,x=0===n.getSum("value")&&0===i.getSum("value"),_=[],b=0;a.eachEdge(function(t){var e=x?1:t.getValue("value");x&&(e>0||c)&&(b+=2);var n=t.node1.dataIndex,a=t.node2.dataIndex;_[n]=(_[n]||0)+e,_[a]=(_[a]||0)+e});var w=0;if(a.eachNode(function(t){var e=t.getValue("value");isNaN(e)||(_[t.dataIndex]=Math.max(e,_[t.dataIndex]||0)),!x&&(_[t.dataIndex]>0||c)&&b++,w+=_[t.dataIndex]||0}),0===b||0===w)return;d*b>=Math.abs(m)&&(d=Math.max(0,(Math.abs(m)-c*b)/b));(d+c)*b>=Math.abs(m)&&(c=(Math.abs(m)-d*b)/b);var S=(m-d*b*g)/w,I=0,M=0,C=0;a.eachNode(function(t){var e=_[t.dataIndex]||0,n=S*(w?e:1)*g;Math.abs(n)<c?I+=c-Math.abs(n):(M+=Math.abs(n)-c,C+=Math.abs(n)),t.setLayout({angle:n,value:e})});var T=!1;if(I>M){var D=I/M;a.eachNode(function(t){var e=t.getLayout().angle;Math.abs(e)>=c?t.setLayout({angle:e*D,ratio:D},!0):t.setLayout({angle:c,ratio:0===c?1:e/c},!0)})}else a.eachNode(function(t){if(!T){var e=t.getLayout().angle;e-Math.min(e/C,1)*I<c&&(T=!0)}});var L=I;a.eachNode(function(t){if(!(L<=0)){var e=t.getLayout().angle;if(e>c&&c>0){var n=T?1:Math.min(e/C,1),a=e-c,i=Math.min(a,Math.min(L,I*n));L-=i,t.setLayout({angle:e-i,ratio:(e-i)/e},!0)}else c>0&&t.setLayout({angle:c,ratio:0===e?1:c/e},!0)}});var A=y,P=[];a.eachNode(function(t){var e=Math.max(t.getLayout().angle,c);t.setLayout({cx:r,cy:l,r0:u,r:s,startAngle:A,endAngle:A+e*g,clockwise:f},!0),P[t.dataIndex]=A,A+=(e+d)*g}),a.eachEdge(function(t){var e=x?1:t.getValue("value"),n=S*(w?e:1)*g,a=t.node1.dataIndex,i=P[a]||0,o=i+Math.abs((t.node1.getLayout().ratio||1)*n)*g,s=[r+u*Math.cos(i),l+u*Math.sin(i)],d=[r+u*Math.cos(o),l+u*Math.sin(o)],c=t.node2.dataIndex,h=P[c]||0,p=h+Math.abs((t.node2.getLayout().ratio||1)*n)*g,v=[r+u*Math.cos(h),l+u*Math.sin(h)],y=[r+u*Math.cos(p),l+u*Math.sin(p)];t.setLayout({s1:s,s2:d,sStartAngle:i,sEndAngle:o,t1:v,t2:y,tStartAngle:h,tEndAngle:p,cx:r,cy:l,r:u,value:e,clockwise:f}),P[a]=o,P[c]=p})}(t,e)})}var du=function(){return function(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}}(),cu=function(t){function e(e){var n=t.call(this,e)||this;return n.type="pointer",n}return nt(e,t),e.prototype.getDefaultShape=function(){return new du},e.prototype.buildPath=function(t,e){var n=Math.cos,a=Math.sin,i=e.r,o=e.width,r=e.angle,l=e.x-n(r)*o*(o>=i/3?1:2),s=e.y-a(r)*o*(o>=i/3?1:2);r=e.angle-Math.PI/2,t.moveTo(l,s),t.lineTo(e.x+n(r)*o,e.y+a(r)*o),t.lineTo(e.x+n(e.angle)*i,e.y+a(e.angle)*i),t.lineTo(e.x-n(r)*o,e.y-a(r)*o),t.lineTo(l,s)},e}(xt);function hu(t,e){var n=null==t?"":t+"";return e&&(Dt(e)?n=e.replace("{value}",n):R(e)&&(n=e(t))),n}var pu=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return nt(e,t),e.prototype.render=function(t,e,n){this.group.removeAll();var a=t.get(["axisLine","lineStyle","color"]),i=function(t,e){var n=t.get("center"),a=e.getWidth(),i=e.getHeight(),o=Math.min(a,i);return{cx:B(n[0],e.getWidth()),cy:B(n[1],e.getHeight()),r:B(t.get("radius"),o/2)}}(t,n);this._renderMain(t,e,n,a,i),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,e,n,a,i){var o=this.group,r=t.get("clockwise"),l=-t.get("startAngle")/180*Math.PI,s=-t.get("endAngle")/180*Math.PI,u=t.getModel("axisLine"),d=u.get("roundCap")?Ze:We,c=u.get("show"),h=u.getModel("lineStyle"),p=h.get("width"),f=[l,s];Xe(f,!r);for(var g=(s=f[1])-(l=f[0]),v=l,y=[],m=0;c&&m<a.length;m++){var x=new d({shape:{startAngle:v,endAngle:s=l+g*Math.min(Math.max(a[m][0],0),1),cx:i.cx,cy:i.cy,clockwise:r,r0:i.r-p,r:i.r},silent:!0});x.setStyle({fill:a[m][1]}),x.setStyle(h.getLineStyle(["color","width"])),y.push(x),v=s}y.reverse(),G(y,function(t){return o.add(t)});var _=function(t){if(t<=0)return a[0][1];var e;for(e=0;e<a.length;e++)if(a[e][0]>=t&&(0===e?0:a[e-1][0])<t)return a[e][1];return a[e-1][1]};this._renderTicks(t,e,n,_,i,l,s,r,p),this._renderTitleAndDetail(t,e,n,_,i),this._renderAnchor(t,i),this._renderPointer(t,e,n,_,i,l,s,r,p)},e.prototype._renderTicks=function(t,e,n,a,i,o,r,l,s){for(var u,d,c=this.group,h=i.cx,p=i.cy,f=i.r,g=+t.get("min"),v=+t.get("max"),y=t.getModel("splitLine"),m=t.getModel("axisTick"),x=t.getModel("axisLabel"),_=t.get("splitNumber"),b=m.get("splitNumber"),w=B(y.get("length"),f),S=B(m.get("length"),f),I=o,M=(r-o)/_,C=M/b,T=y.getModel("lineStyle").getLineStyle(),D=m.getModel("lineStyle").getLineStyle(),L=y.get("distance"),A=0;A<=_;A++){if(u=Math.cos(I),d=Math.sin(I),y.get("show")){var P=new qe({shape:{x1:u*(f-(k=L?L+s:s))+h,y1:d*(f-k)+p,x2:u*(f-w-k)+h,y2:d*(f-w-k)+p},style:T,silent:!0});"auto"===T.stroke&&P.setStyle({stroke:a(A/_)}),c.add(P)}if(x.get("show")){var k=x.get("distance")+L,E=hu($e(A/_*(v-g)+g),x.get("formatter")),N=a(A/_),z=u*(f-w-k)+h,R=d*(f-w-k)+p,O=x.get("rotate"),V=0;"radial"===O?(V=-I+2*Math.PI)>Math.PI/2&&(V+=Math.PI):"tangential"===O?V=-I-Math.PI/2:ce(O)&&(V=O*Math.PI/180),0===V?c.add(new Wt({style:jt(x,{text:E,x:z,y:R,verticalAlign:d<-.8?"top":d>.8?"bottom":"middle",align:u<-.4?"left":u>.4?"right":"center"},{inheritColor:N}),silent:!0})):c.add(new Wt({style:jt(x,{text:E,x:z,y:R,verticalAlign:"middle",align:"center"},{inheritColor:N}),silent:!0,originX:z,originY:R,rotation:V}))}if(m.get("show")&&A!==_){k=(k=m.get("distance"))?k+s:s;for(var G=0;G<=b;G++){u=Math.cos(I),d=Math.sin(I);var W=new qe({shape:{x1:u*(f-k)+h,y1:d*(f-k)+p,x2:u*(f-S-k)+h,y2:d*(f-S-k)+p},silent:!0,style:D});"auto"===D.stroke&&W.setStyle({stroke:a((A+G/b)/_)}),c.add(W),I+=C}I-=C}else I+=M}},e.prototype._renderPointer=function(t,e,n,a,i,o,r,l,s){var u=this.group,d=this._data,c=this._progressEls,h=[],p=t.get(["pointer","show"]),f=t.getModel("progress"),g=f.get("show"),v=t.getData(),y=v.mapDimension("value"),m=+t.get("min"),x=+t.get("max"),_=[m,x],b=[o,r];function w(e,n){var a,o=v.getItemModel(e).getModel("pointer"),r=B(o.get("width"),i.r),l=B(o.get("length"),i.r),s=t.get(["pointer","icon"]),u=o.get("offsetCenter"),d=B(u[0],i.r),c=B(u[1],i.r),h=o.get("keepAspect");return(a=s?Je(s,d-r/2,c-l,r,l,null,h):new cu({shape:{angle:-Math.PI/2,width:r,r:l,x:d,y:c}})).rotation=-(n+Math.PI/2),a.x=i.cx,a.y=i.cy,a}function S(t,e){var n=f.get("roundCap")?Ze:We,a=f.get("overlap"),r=a?f.get("width"):s/v.count(),u=a?i.r-r:i.r-(t+1)*r,d=a?i.r:i.r-t*r,c=new n({shape:{startAngle:o,endAngle:e,cx:i.cx,cy:i.cy,clockwise:l,r0:u,r:d}});return a&&(c.z2=we(v.get(y,t),[m,x],[100,0],!0)),c}(g||p)&&(v.diff(d).add(function(e){var n=v.get(y,e);if(p){var a=w(e,o);Q(a,{rotation:-((isNaN(+n)?b[0]:we(n,_,b,!0))+Math.PI/2)},t),u.add(a),v.setItemGraphicEl(e,a)}if(g){var i=S(e,o),r=f.get("clip");Q(i,{shape:{endAngle:we(n,_,b,r)}},t),u.add(i),Ke(t.seriesIndex,v.dataType,e,i),h[e]=i}}).update(function(e,n){var a=v.get(y,e);if(p){var i=d.getItemGraphicEl(n),r=i?i.rotation:o,l=w(e,r);l.rotation=r,tt(l,{rotation:-((isNaN(+a)?b[0]:we(a,_,b,!0))+Math.PI/2)},t),u.add(l),v.setItemGraphicEl(e,l)}if(g){var s=c[n],m=S(e,s?s.shape.endAngle:o),x=f.get("clip");tt(m,{shape:{endAngle:we(a,_,b,x)}},t),u.add(m),Ke(t.seriesIndex,v.dataType,e,m),h[e]=m}}).execute(),v.each(function(t){var e=v.getItemModel(t),n=e.getModel("emphasis"),i=n.get("focus"),o=n.get("blurScope"),r=n.get("disabled");if(p){var l=v.getItemGraphicEl(t),s=v.getItemVisual(t,"style"),u=s.fill;if(l instanceof Qe){var d=l.style;l.useStyle(wt({image:d.image,x:d.x,y:d.y,width:d.width,height:d.height},s))}else l.useStyle(s),"pointer"!==l.type&&l.setColor(u);l.setStyle(e.getModel(["pointer","itemStyle"]).getItemStyle()),"auto"===l.style.fill&&l.setStyle("fill",a(we(v.get(y,t),_,[0,1],!0))),l.z2EmphasisLift=0,yt(l,e),Yt(l,i,o,r)}if(g){var c=h[t];c.useStyle(v.getItemVisual(t,"style")),c.setStyle(e.getModel(["progress","itemStyle"]).getItemStyle()),c.z2EmphasisLift=0,yt(c,e),Yt(c,i,o,r)}}),this._progressEls=h)},e.prototype._renderAnchor=function(t,e){var n=t.getModel("anchor");if(n.get("show")){var a=n.get("size"),i=n.get("icon"),o=n.get("offsetCenter"),r=n.get("keepAspect"),l=Je(i,e.cx-a/2+B(o[0],e.r),e.cy-a/2+B(o[1],e.r),a,a,null,r);l.z2=n.get("showAbove")?1:0,l.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(l)}},e.prototype._renderTitleAndDetail=function(t,e,n,a,i){var o=this,r=t.getData(),l=r.mapDimension("value"),s=+t.get("min"),u=+t.get("max"),d=new at,c=[],h=[],p=t.isAnimationEnabled(),f=t.get(["pointer","showAbove"]);r.diff(this._data).add(function(t){c[t]=new Wt({silent:!0}),h[t]=new Wt({silent:!0})}).update(function(t,e){c[t]=o._titleEls[e],h[t]=o._detailEls[e]}).execute(),r.each(function(e){var n=r.getItemModel(e),o=r.get(l,e),g=new at,v=a(we(o,[s,u],[0,1],!0)),y=n.getModel("title");if(y.get("show")){var m=y.get("offsetCenter"),x=i.cx+B(m[0],i.r),_=i.cy+B(m[1],i.r);(D=c[e]).attr({z2:f?0:2,style:jt(y,{x:x,y:_,text:r.getName(e),align:"center",verticalAlign:"middle"},{inheritColor:v})}),g.add(D)}var b=n.getModel("detail");if(b.get("show")){var w=b.get("offsetCenter"),S=i.cx+B(w[0],i.r),I=i.cy+B(w[1],i.r),M=B(b.get("width"),i.r),C=B(b.get("height"),i.r),T=t.get(["progress","show"])?r.getItemVisual(e,"style").fill:v,D=h[e],L=b.get("formatter");D.attr({z2:f?0:2,style:jt(b,{x:S,y:I,text:hu(o,L),width:isNaN(M)?null:M,height:isNaN(C)?null:C,align:"center",verticalAlign:"middle"},{inheritColor:T})}),tn(D,{normal:b},o,function(t){return hu(t,L)}),p&&et(D,e,r,t,{getFormattedLabel:function(t,e,n,a,i,r){return hu(r?r.interpolatedValue:o,L)}}),g.add(D)}d.add(g)}),this.group.add(d),this._titleEls=c,this._detailEls=h},e.type="gauge",e}(st),fu=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.visualStyleAccessPath="itemStyle",n}return nt(e,t),e.prototype.getInitialData=function(t,e){return en(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,ut.color.neutral10]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:ut.color.axisTick,width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:ut.color.axisTickMinor,width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:ut.color.axisLabel,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:ut.color.neutral00,borderWidth:0,borderColor:ut.color.theme[0]}},title:{show:!0,offsetCenter:[0,"20%"],color:ut.color.secondary,fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:ut.color.transparent,borderWidth:0,borderColor:ut.color.neutral40,width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:ut.color.primary,fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(Pt);var gu=["itemStyle","opacity"],vu=function(t){function e(e,n){var a=t.call(this)||this,i=a,o=new nn,r=new Wt;return i.setTextContent(r),a.setTextGuideLine(o),a.updateData(e,n,!0),a}return nt(e,t),e.prototype.updateData=function(t,e,n){var a=this,i=t.hostModel,o=t.getItemModel(e),r=t.getItemLayout(e),l=o.getModel("emphasis"),s=o.get(gu);s=null==s?1:s,n||Fe(a),a.useStyle(t.getItemVisual(e,"style")),a.style.lineJoin="round",n?(a.setShape({points:r.points}),a.style.opacity=0,Q(a,{style:{opacity:s}},i,e)):tt(a,{style:{opacity:s},shape:{points:r.points}},i,e),yt(a,o),this._updateLabel(t,e),Yt(this,l.get("focus"),l.get("blurScope"),l.get("disabled"))},e.prototype._updateLabel=function(t,e){var n=this,a=this.getTextGuideLine(),i=n.getTextContent(),o=t.hostModel,r=t.getItemModel(e),l=t.getItemLayout(e).label,s=t.getItemVisual(e,"style"),u=s.fill;ee(i,ne(r),{labelFetcher:t.hostModel,labelDataIndex:e,defaultOpacity:s.opacity,defaultText:t.getName(e)},{normal:{align:l.textAlign,verticalAlign:l.verticalAlign}});var d="inherit"===r.getModel("label").get("color")?u:null;n.setTextConfig({local:!0,inside:!!l.inside,insideStroke:d,outsideFill:d});var c=l.linePoints;a.setShape({points:c}),n.textGuideLineConfig={anchor:c?new an(c[0][0],c[0][1]):null},tt(i,{style:{x:l.x,y:l.y}},o,e),i.attr({rotation:l.rotation,originX:l.x,originY:l.y,z2:10}),X(n,H(r),{stroke:u})},e}(Gt),yu=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.ignoreLabelLineUpdate=!0,n}return nt(e,t),e.prototype.render=function(t,e,n){var a=t.getData(),i=this._data,o=this.group;a.diff(i).add(function(t){var e=new vu(a,t);a.setItemGraphicEl(t,e),o.add(e)}).update(function(t,e){var n=i.getItemGraphicEl(e);n.updateData(a,t),o.add(n),a.setItemGraphicEl(t,n)}).remove(function(e){var n=i.getItemGraphicEl(e);Ye(n,t,e)}).execute(),this._data=a},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(st),mu=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return nt(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new Oe(Xt(this.getData,this),Xt(this.getRawData,this)),this._defaultLabelLine(e)},e.prototype.getInitialData=function(t,e){return en(this,{coordDimensions:["value"],encodeDefaulter:_t(on,this)})},e.prototype._defaultLabelLine=function(t){Ve(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.prototype.getDataParams=function(e){var n=this.getData(),a=t.prototype.getDataParams.call(this,e),i=n.mapDimension("value"),o=n.getSum(i);return a.percent=o?+(n.get(i,e)/o*100).toFixed(2):0,a.$vars.push("percent"),a},e.type="series.funnel",e.defaultOption={coordinateSystemUsage:"box",z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:65,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:ut.color.neutral00,borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:ut.color.primary}}},e}(Pt);function xu(t,e){t.eachSeriesByType("funnel",function(t){var n=t.getData(),a=n.mapDimension("value"),i=t.get("sort"),o=kt(t,e),r=Et(t.getBoxLayoutParams(),o.refContainer),l=t.get("orient"),s=r.width,u=r.height,d=function(t,e){for(var n=t.mapDimension("value"),a=t.mapArray(n,function(t){return t}),i=[],o="ascending"===e,r=0,l=t.count();r<l;r++)i[r]=r;return R(e)?i.sort(e):"none"!==e&&i.sort(function(t,e){return o?a[t]-a[e]:a[e]-a[t]}),i}(n,i),c=r.x,h=r.y,p="horizontal"===l?[B(t.get("minSize"),u),B(t.get("maxSize"),u)]:[B(t.get("minSize"),s),B(t.get("maxSize"),s)],f=n.getDataExtent(a),g=t.get("min"),v=t.get("max");null==g&&(g=Math.min(f[0],0)),null==v&&(v=f[1]);var y=t.get("funnelAlign"),m=t.get("gap"),x=(("horizontal"===l?s:u)-m*(n.count()-1))/n.count(),_=function(t,e){if("horizontal"===l){var i=n.get(a,t)||0,o=we(i,[g,v],p,!0),r=void 0;switch(y){case"top":r=h;break;case"center":r=h+(u-o)/2;break;case"bottom":r=h+(u-o)}return[[e,r],[e,r+o]]}var d,f=n.get(a,t)||0,m=we(f,[g,v],p,!0);switch(y){case"left":d=c;break;case"center":d=c+(s-m)/2;break;case"right":d=c+s-m}return[[d,e],[d+m,e]]};"ascending"===i&&(x=-x,m=-m,"horizontal"===l?c+=s:h+=u,d=d.reverse());for(var b=0;b<d.length;b++){var w=d[b],S=d[b+1],I=n.getItemModel(w);if("horizontal"===l){var M=I.get(["itemStyle","width"]);null==M?M=x:(M=B(M,s),"ascending"===i&&(M=-M));var C=_(w,c),T=_(S,c+M);c+=M+m,n.setItemLayout(w,{points:C.concat(T.slice().reverse())})}else{var D=I.get(["itemStyle","height"]);null==D?D=x:(D=B(D,u),"ascending"===i&&(D=-D));C=_(w,h),T=_(S,h+D);h+=D+m,n.setItemLayout(w,{points:C.concat(T.slice().reverse())})}}!function(t){var e=t.hostModel.get("orient");t.each(function(n){var a,i,o,r,l=t.getItemModel(n),s=l.getModel("label").get("position"),u=l.getModel("labelLine"),d=t.getItemLayout(n),c=d.points,h="inner"===s||"inside"===s||"center"===s||"insideLeft"===s||"insideRight"===s;if(h)"insideLeft"===s?(i=(c[0][0]+c[3][0])/2+5,o=(c[0][1]+c[3][1])/2,a="left"):"insideRight"===s?(i=(c[1][0]+c[2][0])/2-5,o=(c[1][1]+c[2][1])/2,a="right"):(i=(c[0][0]+c[1][0]+c[2][0]+c[3][0])/4,o=(c[0][1]+c[1][1]+c[2][1]+c[3][1])/4,a="center"),r=[[i,o],[i,o]];else{var p=void 0,f=void 0,g=void 0,v=void 0,y=u.get("length");"left"===s?(p=(c[3][0]+c[0][0])/2,f=(c[3][1]+c[0][1])/2,i=(g=p-y)-5,a="right"):"right"===s?(p=(c[1][0]+c[2][0])/2,f=(c[1][1]+c[2][1])/2,i=(g=p+y)+5,a="left"):"top"===s?(p=(c[3][0]+c[0][0])/2,o=(v=(f=(c[3][1]+c[0][1])/2)-y)-5,a="center"):"bottom"===s?(p=(c[1][0]+c[2][0])/2,o=(v=(f=(c[1][1]+c[2][1])/2)+y)+5,a="center"):"rightTop"===s?(p="horizontal"===e?c[3][0]:c[1][0],f="horizontal"===e?c[3][1]:c[1][1],"horizontal"===e?(o=(v=f-y)-5,a="center"):(i=(g=p+y)+5,a="top")):"rightBottom"===s?(p=c[2][0],f=c[2][1],"horizontal"===e?(o=(v=f+y)+5,a="center"):(i=(g=p+y)+5,a="bottom")):"leftTop"===s?(p=c[0][0],f="horizontal"===e?c[0][1]:c[1][1],"horizontal"===e?(o=(v=f-y)-5,a="center"):(i=(g=p-y)-5,a="right")):"leftBottom"===s?(p="horizontal"===e?c[1][0]:c[3][0],f="horizontal"===e?c[1][1]:c[2][1],"horizontal"===e?(o=(v=f+y)+5,a="center"):(i=(g=p-y)-5,a="right")):(p=(c[1][0]+c[2][0])/2,f=(c[1][1]+c[2][1])/2,"horizontal"===e?(o=(v=f+y)+5,a="center"):(i=(g=p+y)+5,a="left")),"horizontal"===e?i=g=p:o=v=f,r=[[p,f],[g,v]]}d.label={linePoints:r,x:i,y:o,verticalAlign:"middle",textAlign:a,inside:h}})}(n)})}var _u=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._dataGroup=new at,n._initialized=!1,n}return nt(e,t),e.prototype.init=function(){this.group.add(this._dataGroup)},e.prototype.render=function(t,e,n,a){this._progressiveEls=null;var i=this._dataGroup,o=t.getData(),r=this._data,l=t.coordinateSystem,s=l.dimensions,u=Su(t);if(o.diff(r).add(function(t){Iu(wu(o,i,t,s,l),o,t,u)}).update(function(e,n){var a=r.getItemGraphicEl(n),i=bu(o,e,s,l);o.setItemGraphicEl(e,a),tt(a,{shape:{points:i}},t,e),Fe(a),Iu(a,o,e,u)}).remove(function(t){var e=r.getItemGraphicEl(t);i.remove(e)}).execute(),!this._initialized){this._initialized=!0;var d=function(t,e,n){var a=t.model,i=t.getRect(),o=new oe({shape:{x:i.x,y:i.y,width:i.width,height:i.height}}),r="horizontal"===a.get("layout")?"width":"height";return o.setShape(r,0),Q(o,{shape:{width:i.width,height:i.height}},e,n),o}(l,t,function(){setTimeout(function(){i.removeClipPath()})});i.setClipPath(d)}this._data=o},e.prototype.incrementalPrepareRender=function(t,e,n){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},e.prototype.incrementalRender=function(t,e,n){for(var a=e.getData(),i=e.coordinateSystem,o=i.dimensions,r=Su(e),l=this._progressiveEls=[],s=t.start;s<t.end;s++){var u=wu(a,this._dataGroup,s,o,i);u.incremental=!0,Iu(u,a,s,r),l.push(u)}},e.prototype.remove=function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null},e.type="parallel",e}(st);function bu(t,e,n,a){for(var i=[],o=0;o<n.length;o++){var r=n[o],l=t.get(t.mapDimension(r),e);Mu(l,a.getAxis(r).type)||i.push(a.dataToPoint(l,r))}return i}function wu(t,e,n,a,i){var o=bu(t,n,a,i),r=new nn({shape:{points:o},z2:10});return e.add(r),t.setItemGraphicEl(n,r),r}function Su(t){var e=t.get("smooth",!0);return!0===e&&(e=.3),e=rn(e),ln(e)&&(e=0),{smooth:e}}function Iu(t,e,n,a){t.useStyle(e.getItemVisual(n,"style")),t.style.fill=null,t.setShape("smooth",a.smooth);var i=e.getItemModel(n),o=i.getModel("emphasis");yt(t,i,"lineStyle"),Yt(t,o.get("focus"),o.get("blurScope"),o.get("disabled"))}function Mu(t,e){return"category"===e?null==t:null==t||isNaN(t)}var Cu=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.visualStyleAccessPath="lineStyle",n.visualDrawType="stroke",n}return nt(e,t),e.prototype.getInitialData=function(t,e){return ze(null,this,{useEncodeDefaulter:Xt(Tu,null,this)})},e.prototype.getRawIndicesByActiveState=function(t){var e=this.coordinateSystem,n=this.getData(),a=[];return e.eachActiveState(n,function(e,i){t===e&&a.push(n.getRawIndex(i))}),a},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}(Pt);function Tu(t){var e=t.ecModel.getComponent("parallel",t.get("parallelIndex"));if(e){var n={};return G(e.dimensions,function(t){var e=+t.replace("dim","");n[t]=e}),n}}var Du=["lineStyle","opacity"],Lu={seriesType:"parallel",reset:function(t,e){var n=t.coordinateSystem,a={normal:t.get(["lineStyle","opacity"]),active:t.get("activeOpacity"),inactive:t.get("inactiveOpacity")};return{progress:function(t,e){n.eachActiveState(e,function(t,n){var i=a[t];if("normal"===t&&e.hasItemOption){var o=e.getItemModel(n).get(Du,!0);null!=o&&(i=o)}e.ensureUniqueItemVisual(n,"style").opacity=i},t.start,t.end)}}}};function Au(t){!function(t){if(t.parallel)return;var e=!1;G(t.series,function(t){t&&"parallel"===t.type&&(e=!0)}),e&&(t.parallel=[{}])}(t),function(t){var e=Vt(t.parallelAxis);G(e,function(e){if(sn(e)){var n=e.parallelIndex||0,a=Vt(t.parallel)[n];a&&a.parallelAxisDefault&&un(e,a.parallelAxisDefault,!1)}})}(t)}var Pu=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return nt(e,t),e.prototype.render=function(t,e,n){this._model=t,this._api=n,this._handlers||(this._handlers={},G(ku,function(t,e){n.getZr().on(e,this._handlers[e]=Xt(t,this))},this)),dn(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},e.prototype.dispose=function(t,e){cn(this,"_throttledDispatchExpand"),G(this._handlers,function(t,n){e.getZr().off(n,t)}),this._handlers=null},e.prototype._throttledDispatchExpand=function(t){this._dispatchExpand(t)},e.prototype._dispatchExpand=function(t){t&&this._api.dispatchAction(wt({type:"parallelAxisExpand"},t))},e.type="parallel",e}(hn),ku={mousedown:function(t){Eu(this,"click")&&(this._mouseDownPoint=[t.offsetX,t.offsetY])},mouseup:function(t){var e=this._mouseDownPoint;if(Eu(this,"click")&&e){var n=[t.offsetX,t.offsetY];if(Math.pow(e[0]-n[0],2)+Math.pow(e[1]-n[1],2)>5)return;var a=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);"none"!==a.behavior&&this._dispatchExpand({axisExpandWindow:a.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!this._mouseDownPoint&&Eu(this,"mousemove")){var e=this._model,n=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),a=n.behavior;"jump"===a&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===a?null:{axisExpandWindow:n.axisExpandWindow,animation:"jump"===a?null:{duration:0}})}}};function Eu(t,e){var n=t._model;return n.get("axisExpandable")&&n.get("axisExpandTriggerOn")===e}var Nu=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return nt(e,t),e.prototype.init=function(){t.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(t){var e=this.option;t&&un(e,t,!0),this._initDimensions()},e.prototype.contains=function(t,e){var n=t.get("parallelIndex");return null!=n&&e.getComponent("parallel",n)===this},e.prototype.setAxisExpand=function(t){G(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(e){t.hasOwnProperty(e)&&(this.option[e]=t[e])},this)},e.prototype._initDimensions=function(){var t=this.dimensions=[],e=this.parallelAxisIndex=[],n=F(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(t){return(t.get("parallelIndex")||0)===this.componentIndex},this);G(n,function(n){t.push("dim"+n.get("dim")),e.push(n.componentIndex)})},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e}(pn),zu=function(t){function e(e,n,a,i,o){var r=t.call(this,e,n,a)||this;return r.type=i||"value",r.axisIndex=o,r}return nt(e,t),e.prototype.isHorizontal=function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")},e}(fn),Ru=G,Ou=Math.min,Vu=Math.max,Bu=Math.floor,Gu=Math.ceil,Wu=$e,Fu=Math.PI,ju=function(){function t(t,e,n){this.type="parallel",this._axesMap=Ot(),this._axesLayout={},this.dimensions=t.dimensions,this._model=t,this._init(t,e,n)}return t.prototype._init=function(t,e,n){var a=t.dimensions,i=t.parallelAxisIndex;Ru(a,function(t,n){var a=i[n],o=e.getComponent("parallelAxis",a),r=this._axesMap.set(t,new zu(t,gn(o),[0,0],o.get("type"),a)),l="category"===r.type;r.onBand=l&&o.get("boundaryGap"),r.inverse=o.get("inverse"),o.axis=r,r.model=o,r.coordinateSystem=o.coordinateSystem=this},this)},t.prototype.update=function(t,e){this._updateAxesFromSeries(this._model,t)},t.prototype.containPoint=function(t){var e=this._makeLayoutInfo(),n=e.axisBase,a=e.layoutBase,i=e.pixelDimIndex,o=t[1-i],r=t[i];return o>=n&&o<=n+e.axisLength&&r>=a&&r<=a+e.layoutLength},t.prototype.getModel=function(){return this._model},t.prototype._updateAxesFromSeries=function(t,e){e.eachSeries(function(n){if(t.contains(n,e)){var a=n.getData();Ru(this.dimensions,function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(a,a.mapDimension(t)),vn(e.scale,e.model)},this)}},this)},t.prototype.resize=function(t,e){var n=kt(t,e).refContainer;this._rect=Et(t.getBoxLayoutParams(),n),this._layoutAxes()},t.prototype.getRect=function(){return this._rect},t.prototype._makeLayoutInfo=function(){var t,e=this._model,n=this._rect,a=["x","y"],i=["width","height"],o=e.get("layout"),r="horizontal"===o?0:1,l=n[i[r]],s=[0,l],u=this.dimensions.length,d=Yu(e.get("axisExpandWidth"),s),c=Yu(e.get("axisExpandCount")||0,[0,u]),h=e.get("axisExpandable")&&u>3&&u>c&&c>1&&d>0&&l>0,p=e.get("axisExpandWindow");p?(t=Yu(p[1]-p[0],s),p[1]=p[0]+t):(t=Yu(d*(c-1),s),(p=[d*(e.get("axisExpandCenter")||Bu(u/2))-t/2])[1]=p[0]+t);var f=(l-t)/(u-c);f<3&&(f=0);var g=[Bu(Wu(p[0]/d,1))+1,Gu(Wu(p[1]/d,1))-1],v=f/d*p[0];return{layout:o,pixelDimIndex:r,layoutBase:n[a[r]],layoutLength:l,axisBase:n[a[1-r]],axisLength:n[i[1-r]],axisExpandable:h,axisExpandWidth:d,axisCollapseWidth:f,axisExpandWindow:p,axisCount:u,winInnerIndices:g,axisExpandWindow0Pos:v}},t.prototype._layoutAxes=function(){var t=this._rect,e=this._axesMap,n=this.dimensions,a=this._makeLayoutInfo(),i=a.layout;e.each(function(t){var e=[0,a.axisLength],n=t.inverse?1:0;t.setExtent(e[n],e[1-n])}),Ru(n,function(e,n){var o=(a.axisExpandable?Xu:Uu)(n,a),r={horizontal:{x:o.position,y:a.axisLength},vertical:{x:0,y:o.position}},l={horizontal:Fu/2,vertical:0},s=[r[i].x+t.x,r[i].y+t.y],u=l[i],d=Zt();yn(d,d,u),Ht(d,d,s),this._axesLayout[e]={position:s,rotation:u,transform:d,axisNameAvailableWidth:o.axisNameAvailableWidth,axisLabelShow:o.axisLabelShow,nameTruncateMaxWidth:o.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},t.prototype.getAxis=function(t){return this._axesMap.get(t)},t.prototype.dataToPoint=function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},t.prototype.eachActiveState=function(t,e,n,a){null==n&&(n=0),null==a&&(a=t.count());var i=this._axesMap,o=this.dimensions,r=[],l=[];G(o,function(e){r.push(t.mapDimension(e)),l.push(i.get(e).model)});for(var s=this.hasAxisBrushed(),u=n;u<a;u++){var d=void 0;if(s){d="active";for(var c=t.getValues(r,u),h=0,p=o.length;h<p;h++){if("inactive"===l[h].getActiveState(c[h])){d="inactive";break}}}else d="normal";e(d,u)}},t.prototype.hasAxisBrushed=function(){for(var t=this.dimensions,e=this._axesMap,n=!1,a=0,i=t.length;a<i;a++)"normal"!==e.get(t[a]).model.getActiveState()&&(n=!0);return n},t.prototype.axisCoordToPoint=function(t,e){var n=this._axesLayout[e];return mn([t,0],n.transform)},t.prototype.getAxisLayout=function(t){return ke(this._axesLayout[t])},t.prototype.getSlidedAxisExpandWindow=function(t){var e=this._makeLayoutInfo(),n=e.pixelDimIndex,a=e.axisExpandWindow.slice(),i=a[1]-a[0],o=[0,e.axisExpandWidth*(e.axisCount-1)];if(!this.containPoint(t))return{behavior:"none",axisExpandWindow:a};var r,l=t[n]-e.layoutBase-e.axisExpandWindow0Pos,s="slide",u=e.axisCollapseWidth,d=this._model.get("axisExpandSlideTriggerArea"),c=null!=d[0];if(u)c&&u&&l<i*d[0]?(s="jump",r=l-i*d[2]):c&&u&&l>i*(1-d[0])?(s="jump",r=l-i*(1-d[2])):(r=l-i*d[1])>=0&&(r=l-i*(1-d[1]))<=0&&(r=0),(r*=e.axisExpandWidth/u)?xn(r,a,o,"all"):s="none";else{var h=a[1]-a[0];(a=[Vu(0,o[1]*l/h-h/2)])[1]=Ou(o[1],a[0]+h),a[0]=a[1]-h}return{axisExpandWindow:a,behavior:s}},t}();function Yu(t,e){return Ou(Vu(t,e[0]),e[1])}function Uu(t,e){var n=e.layoutLength/(e.axisCount-1);return{position:n*t,axisNameAvailableWidth:n,axisLabelShow:!0}}function Xu(t,e){var n,a,i=e.layoutLength,o=e.axisExpandWidth,r=e.axisCount,l=e.axisCollapseWidth,s=e.winInnerIndices,u=l,d=!1;return t<s[0]?(n=t*l,a=l):t<=s[1]?(n=e.axisExpandWindow0Pos+t*o-e.axisExpandWindow[0],u=o,d=!0):(n=i-(r-1-t)*l,a=l),{position:n,axisNameAvailableWidth:u,axisLabelShow:d,nameTruncateMaxWidth:a}}var Hu={create:function(t,e){var n=[];return t.eachComponent("parallel",function(a,i){var o=new ju(a,t,e);o.name="parallel_"+i,o.resize(a,e),a.coordinateSystem=o,o.model=a,n.push(o)}),t.eachSeries(function(t){if("parallel"===t.get("coordinateSystem")){var e=t.getReferringComponents("parallel",_n).models[0];t.coordinateSystem=e.coordinateSystem}}),n}},Zu=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.activeIntervals=[],n}return nt(e,t),e.prototype.getAreaSelectStyle=function(){return te([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},e.prototype.setActiveIntervals=function(t){var e=this.activeIntervals=ke(t);if(e)for(var n=e.length-1;n>=0;n--)bn(e[n])},e.prototype.getActiveState=function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t||isNaN(+t))return"inactive";if(1===e.length){var n=e[0];if(n[0]<=t&&t<=n[1])return"active"}else for(var a=0,i=e.length;a<i;a++)if(e[a][0]<=t&&t<=e[a][1])return"active";return"inactive"},e}(pn);Ne(Zu,wn);var qu=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return nt(e,t),e.prototype.init=function(e,n){t.prototype.init.apply(this,arguments),(this._brushController=new Sn(n.getZr())).on("brush",Xt(this._onBrush,this))},e.prototype.render=function(t,e,n,a){if(!function(t,e,n){return n&&"axisAreaSelect"===n.type&&e.findComponents({mainType:"parallelAxis",query:n})[0]===t}(t,e,a)){this.axisModel=t,this.api=n,this.group.removeAll();var i=this._axisGroup;if(this._axisGroup=new at,this.group.add(this._axisGroup),t.get("show")){var o=function(t,e){return e.getComponent("parallel",t.get("parallelIndex"))}(t,e),r=o.coordinateSystem,l=t.getAreaSelectStyle(),s=l.width,u=t.axis.dim,d=r.getAxisLayout(u),c=wt({strokeContainThreshold:s},d),h=new In(t,n,c);h.build(),this._axisGroup.add(h.group),this._refreshBrushController(c,l,t,o,s,n),Mn(i,this._axisGroup,t)}}},e.prototype._refreshBrushController=function(t,e,n,a,i,o){var r=n.axis.getExtent(),l=r[1]-r[0],s=Math.min(30,.1*Math.abs(l)),u=E.create({x:r[0],y:-i/2,width:l,height:i});u.x-=s,u.width+=2*s,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,x:t.position[0],y:t.position[1]}).setPanels([{panelId:"pl",clipPath:Dn(u),isTargetByCursor:Tn(u,o,a),getLinearBrushOtherExtent:Cn(u,0)}]).enableBrush({brushType:"lineX",brushStyle:e,removeOnClick:!0}).updateCovers(function(t){var e=t.axis;return St(t.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(t[0],!0),e.dataToCoord(t[1],!0)]}})}(n))},e.prototype._onBrush=function(t){var e=t.areas,n=this.axisModel,a=n.axis,i=St(e,function(t){return[a.coordToData(t.range[0],!0),a.coordToData(t.range[1],!0)]});(!n.option.realtime===t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:n.id,intervals:i})},e.prototype.dispose=function(){this._brushController.dispose()},e.type="parallelAxis",e}(hn);var $u={type:"axisAreaSelect",event:"axisAreaSelected"};var Ku={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function Qu(t){t.registerComponentView(Pu),t.registerComponentModel(Nu),t.registerCoordinateSystem("parallel",Hu),t.registerPreprocessor(Au),t.registerComponentModel(Zu),t.registerComponentView(qu),Ln(t,"parallel",Zu,Ku),function(t){t.registerAction($u,function(t,e){e.eachComponent({mainType:"parallelAxis",query:t},function(e){e.axis.model.setActiveIntervals(t.intervals)})}),t.registerAction("parallelAxisExpand",function(t,e){e.eachComponent({mainType:"parallel",query:t},function(e){e.setAxisExpand(t)})})}(t)}var Ju=function(){return function(){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}}(),td=function(t){function e(e){return t.call(this,e)||this}return nt(e,t),e.prototype.getDefaultShape=function(){return new Ju},e.prototype.buildPath=function(t,e){var n=e.extent;t.moveTo(e.x1,e.y1),t.bezierCurveTo(e.cpx1,e.cpy1,e.cpx2,e.cpy2,e.x2,e.y2),"vertical"===e.orient?(t.lineTo(e.x2+n,e.y2),t.bezierCurveTo(e.cpx2+n,e.cpy2,e.cpx1+n,e.cpy1,e.x1+n,e.y1)):(t.lineTo(e.x2,e.y2+n),t.bezierCurveTo(e.cpx2,e.cpy2+n,e.cpx1,e.cpy1+n,e.x1,e.y1+n)),t.closePath()},e.prototype.highlight=function(){Pn(this)},e.prototype.downplay=function(){kn(this)},e}(xt),ed=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._mainGroup=new at,n._focusAdjacencyDisabled=!1,n}return nt(e,t),e.prototype.init=function(t,e){this._controller=new it(e.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},e.prototype.render=function(t,e,n){var a=this,i=t.getGraph(),o=this._mainGroup,r=t.layoutInfo,l=r.width,s=r.height,u=t.getData(),d=t.getData("edge"),c=t.get("orient");this._model=t,o.removeAll(),o.x=r.x,o.y=r.y,this._updateViewCoordSys(t,n),lt(t,n,o,this._controller,this._controllerHost,null),i.eachEdge(function(e){var n=new td,a=V(n);a.dataIndex=e.dataIndex,a.seriesIndex=t.seriesIndex,a.dataType="edge";var i,r,u,h,p,f,g,v,y=e.getModel(),m=y.getModel("lineStyle"),x=m.get("curveness"),_=e.node1.getLayout(),b=e.node1.getModel(),w=b.get("localX"),S=b.get("localY"),I=e.node2.getLayout(),M=e.node2.getModel(),C=M.get("localX"),T=M.get("localY"),D=e.getLayout();n.shape.extent=Math.max(1,D.dy),n.shape.orient=c,"vertical"===c?(i=(null!=w?w*l:_.x)+D.sy,r=(null!=S?S*s:_.y)+_.dy,u=(null!=C?C*l:I.x)+D.ty,p=i,f=r*(1-x)+(h=null!=T?T*s:I.y)*x,g=u,v=r*x+h*(1-x)):(i=(null!=w?w*l:_.x)+_.dx,r=(null!=S?S*s:_.y)+D.sy,p=i*(1-x)+(u=null!=C?C*l:I.x)*x,f=r,g=i*x+u*(1-x),v=h=(null!=T?T*s:I.y)+D.ty),n.setShape({x1:i,y1:r,x2:u,y2:h,cpx1:p,cpy1:f,cpx2:g,cpy2:v}),n.useStyle(m.getItemStyle()),nd(n.style,c,e);var L=""+y.get("value"),A=ne(y,"edgeLabel");ee(n,A,{labelFetcher:{getFormattedLabel:function(e,n,a,i,o,r){return t.getFormattedLabel(e,n,"edge",i,he(o,A.normal&&A.normal.get("formatter"),L),r)}},labelDataIndex:e.dataIndex,defaultText:L}),n.setTextConfig({position:"inside"});var P=y.getModel("emphasis");yt(n,y,"lineStyle",function(t){var n=t.getItemStyle();return nd(n,c,e),n}),o.add(n),d.setItemGraphicEl(e.dataIndex,n);var k=P.get("focus");Yt(n,"adjacency"===k?e.getAdjacentDataIndices():"trajectory"===k?e.getTrajectoryDataIndices():k,P.get("blurScope"),P.get("disabled"))}),i.eachNode(function(e){var n=e.getLayout(),a=e.getModel(),i=a.get("localX"),r=a.get("localY"),d=a.getModel("emphasis"),c=a.get(["itemStyle","borderRadius"])||0,h=new oe({shape:{x:null!=i?i*l:n.x,y:null!=r?r*s:n.y,width:n.dx,height:n.dy,r:c},style:a.getModel("itemStyle").getItemStyle(),z2:10});ee(h,ne(a),{labelFetcher:{getFormattedLabel:function(e,n){return t.getFormattedLabel(e,n,"node")}},labelDataIndex:e.dataIndex,defaultText:e.id}),h.disableLabelAnimation=!0,h.setStyle("fill",e.getVisual("color")),h.setStyle("decal",e.getVisual("style").decal),yt(h,a),o.add(h),u.setItemGraphicEl(e.dataIndex,h),V(h).dataType="node";var p=d.get("focus");Yt(h,"adjacency"===p?e.getAdjacentDataIndices():"trajectory"===p?e.getTrajectoryDataIndices():p,d.get("blurScope"),d.get("disabled"))}),u.eachItemGraphicEl(function(e,i){u.getItemModel(i).get("draggable")&&(e.drift=function(e,o){a._focusAdjacencyDisabled=!0,this.shape.x+=e,this.shape.y+=o,this.dirty(),n.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:u.getRawIndex(i),localX:this.shape.x/l,localY:this.shape.y/s})},e.ondragend=function(){a._focusAdjacencyDisabled=!1},e.draggable=!0,e.cursor="move")}),!this._data&&t.isAnimationEnabled()&&o.setClipPath(function(t,e,n){var a=new oe({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return Q(a,{shape:{width:t.width+20}},e,n),a}(o.getBoundingRect(),t,function(){o.removeClipPath()})),this._data=t.getData()},e.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._updateViewCoordSys=function(t,e){var n=t.layoutInfo,a=n.width,i=n.height,o=t.coordinateSystem=new rt(null,{api:e,ecModel:t.ecModel});o.zoomLimit=t.get("scaleLimit"),o.setBoundingRect(0,0,a,i),o.setCenter(t.get("center")),o.setZoom(t.get("zoom")),this._controllerHost.target.attr({x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY})},e.type="sankey",e}(st);function nd(t,e,n){switch(t.fill){case"source":t.fill=n.node1.getVisual("color"),t.decal=n.node1.getVisual("style").decal;break;case"target":t.fill=n.node2.getVisual("color"),t.decal=n.node2.getVisual("style").decal;break;case"gradient":var a=n.node1.getVisual("color"),i=n.node2.getVisual("color");Dt(a)&&Dt(i)&&(t.fill=new je(0,0,+("horizontal"===e),+("vertical"===e),[{color:a,offset:0},{color:i,offset:1}]))}}var ad=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return nt(e,t),e.prototype.getInitialData=function(t,e){var n=t.edges||t.links||[],a=t.data||t.nodes||[],i=t.levels||[];this.levelModels=[];for(var o=this.levelModels,r=0;r<i.length;r++)null!=i[r].depth&&i[r].depth>=0&&(o[i[r].depth]=new Lt(i[r],this,e));return tu(a,n,this,!0,function(t,e){t.wrapMethod("getItemModel",function(t,e){var n=t.parentModel,a=n.getData().getItemLayout(e);if(a){var i=a.depth,o=n.levelModels[i];o&&(t.parentModel=o)}return t}),e.wrapMethod("getItemModel",function(t,e){var n=t.parentModel,a=n.getGraph().getEdgeByIndex(e).node1.getLayout();if(a){var i=a.depth,o=n.levelModels[i];o&&(t.parentModel=o)}return t})}).data},e.prototype.setNodePosition=function(t,e){var n=(this.option.data||this.option.nodes)[t];n.localX=e[0],n.localY=e[1]},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,e,n){function a(t){return isNaN(t)||null==t}if("edge"===n){var i=this.getDataParams(t,n),o=i.data,r=i.value,l=o.source+" -- "+o.target;return At("nameValue",{name:l,value:r,noValue:a(r)})}var s=this.getGraph().getNodeByIndex(t).getLayout().value,u=this.getDataParams(t,n).data.name;return At("nameValue",{name:null!=u?u+"":null,value:s,noValue:a(s)})},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(e,n){var a=t.prototype.getDataParams.call(this,e,n);if(null==a.value&&"node"===n){var i=this.getGraph().getNodeByIndex(e).getLayout().value;a.value=i}return a},e.type="series.sankey",e.layoutMode="box",e.defaultOption={z:2,coordinateSystemUsage:"box",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,roam:!1,roamTrigger:"global",center:null,zoom:1,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:ut.color.neutral50,opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:ut.color.primary}},animationEasing:"linear",animationDuration:1e3},e}(Pt);function id(t,e){t.eachSeriesByType("sankey",function(t){var n=t.get("nodeWidth"),a=t.get("nodeGap"),i=kt(t,e).refContainer,o=Et(t.getBoxLayoutParams(),i);t.layoutInfo=o;var r=o.width,l=o.height,s=t.getGraph(),u=s.nodes,d=s.edges;!function(t){G(t,function(t){var e=fd(t.outEdges,pd),n=fd(t.inEdges,pd),a=t.getValue()||0,i=Math.max(e,n,a);t.setLayout({value:i},!0)})}(u),function(t,e,n,a,i,o,r,l,s){(function(t,e,n,a,i,o,r){for(var l=[],s=[],u=[],d=[],c=0,h=0;h<e.length;h++)l[h]=1;for(h=0;h<t.length;h++)s[h]=t[h].inEdges.length,0===s[h]&&u.push(t[h]);var p=-1;for(;u.length;){for(var f=0;f<u.length;f++){var g=u[f],v=g.hostGraph.data.getRawDataItem(g.dataIndex),y=null!=v.depth&&v.depth>=0;y&&v.depth>p&&(p=v.depth),g.setLayout({depth:y?v.depth:c},!0),"vertical"===o?g.setLayout({dy:n},!0):g.setLayout({dx:n},!0);for(var m=0;m<g.outEdges.length;m++){var x=g.outEdges[m];l[e.indexOf(x)]=0;var _=x.node2;0===--s[t.indexOf(_)]&&d.indexOf(_)<0&&d.push(_)}}++c,u=d,d=[]}for(h=0;h<l.length;h++)if(1===l[h])throw new Error("Sankey is a DAG, the original data has cycle!");var b=p>c-1?p:c-1;r&&"left"!==r&&function(t,e,n,a){if("right"===e){for(var i=[],o=t,r=0;o.length;){for(var l=0;l<o.length;l++){var s=o[l];s.setLayout({skNodeHeight:r},!0);for(var u=0;u<s.inEdges.length;u++){var d=s.inEdges[u];i.indexOf(d.node1)<0&&i.push(d.node1)}}o=i,i=[],++r}G(t,function(t){od(t)||t.setLayout({depth:Math.max(0,a-t.getLayout().skNodeHeight)},!0)})}else"justify"===e&&function(t,e){G(t,function(t){od(t)||t.outEdges.length||t.setLayout({depth:e},!0)})}(t,a)}(t,r,0,b);var w="vertical"===o?(i-n)/b:(a-n)/b;!function(t,e,n){G(t,function(t){var a=t.getLayout().depth*e;"vertical"===n?t.setLayout({y:a},!0):t.setLayout({x:a},!0)})}(t,w,o)})(t,e,n,i,o,l,s),function(t,e,n,a,i,o,r){var l=function(t,e){var n=[],a="vertical"===e?"y":"x",i=En(t,function(t){return t.getLayout()[a]});return i.keys.sort(function(t,e){return t-e}),G(i.keys,function(t){n.push(i.buckets.get(t))}),n}(t,r);(function(t,e,n,a,i,o){var r=1/0;G(t,function(t){var e=t.length,l=0;G(t,function(t){l+=t.getLayout().value});var s="vertical"===o?(a-(e-1)*i)/l:(n-(e-1)*i)/l;s<r&&(r=s)}),G(t,function(t){G(t,function(t,e){var n=t.getLayout().value*r;"vertical"===o?(t.setLayout({x:e},!0),t.setLayout({dx:n},!0)):(t.setLayout({y:e},!0),t.setLayout({dy:n},!0))})}),G(e,function(t){var e=+t.getValue()*r;t.setLayout({dy:e},!0)})})(l,e,n,a,i,r),rd(l,i,n,a,r);for(var s=1;o>0;o--)ld(l,s*=.99,r),rd(l,i,n,a,r),gd(l,s,r),rd(l,i,n,a,r)}(t,e,o,i,a,r,l),function(t,e){var n="vertical"===e?"x":"y";G(t,function(t){t.outEdges.sort(function(t,e){return t.node2.getLayout()[n]-e.node2.getLayout()[n]}),t.inEdges.sort(function(t,e){return t.node1.getLayout()[n]-e.node1.getLayout()[n]})}),G(t,function(t){var e=0,n=0;G(t.outEdges,function(t){t.setLayout({sy:e},!0),e+=t.getLayout().dy}),G(t.inEdges,function(t){t.setLayout({ty:n},!0),n+=t.getLayout().dy})})}(t,l)}(u,d,n,a,r,l,0!==F(u,function(t){return 0===t.getLayout().value}).length?0:t.get("layoutIterations"),t.get("orient"),t.get("nodeAlign"))})}function od(t){var e=t.hostGraph.data.getRawDataItem(t.dataIndex);return null!=e.depth&&e.depth>=0}function rd(t,e,n,a,i){var o="vertical"===i?"x":"y";G(t,function(t){var r,l,s;t.sort(function(t,e){return t.getLayout()[o]-e.getLayout()[o]});for(var u=0,d=t.length,c="vertical"===i?"dx":"dy",h=0;h<d;h++)(s=u-(l=t[h]).getLayout()[o])>0&&(r=l.getLayout()[o]+s,"vertical"===i?l.setLayout({x:r},!0):l.setLayout({y:r},!0)),u=l.getLayout()[o]+l.getLayout()[c]+e;if((s=u-e-("vertical"===i?a:n))>0){r=l.getLayout()[o]-s,"vertical"===i?l.setLayout({x:r},!0):l.setLayout({y:r},!0),u=r;for(h=d-2;h>=0;--h)(s=(l=t[h]).getLayout()[o]+l.getLayout()[c]+e-u)>0&&(r=l.getLayout()[o]-s,"vertical"===i?l.setLayout({x:r},!0):l.setLayout({y:r},!0)),u=l.getLayout()[o]}})}function ld(t,e,n){G(t.slice().reverse(),function(t){G(t,function(t){if(t.outEdges.length){var a=fd(t.outEdges,sd,n)/fd(t.outEdges,pd);if(isNaN(a)){var i=t.outEdges.length;a=i?fd(t.outEdges,ud,n)/i:0}if("vertical"===n){var o=t.getLayout().x+(a-hd(t,n))*e;t.setLayout({x:o},!0)}else{var r=t.getLayout().y+(a-hd(t,n))*e;t.setLayout({y:r},!0)}}})})}function sd(t,e){return hd(t.node2,e)*t.getValue()}function ud(t,e){return hd(t.node2,e)}function dd(t,e){return hd(t.node1,e)*t.getValue()}function cd(t,e){return hd(t.node1,e)}function hd(t,e){return"vertical"===e?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function pd(t){return t.getValue()}function fd(t,e,n){for(var a=0,i=t.length,o=-1;++o<i;){var r=+e(t[o],n);isNaN(r)||(a+=r)}return a}function gd(t,e,n){G(t,function(t){G(t,function(t){if(t.inEdges.length){var a=fd(t.inEdges,dd,n)/fd(t.inEdges,pd);if(isNaN(a)){var i=t.inEdges.length;a=i?fd(t.inEdges,cd,n)/i:0}if("vertical"===n){var o=t.getLayout().x+(a-hd(t,n))*e;t.setLayout({x:o},!0)}else{var r=t.getLayout().y+(a-hd(t,n))*e;t.setLayout({y:r},!0)}}})})}function vd(t){t.eachSeriesByType("sankey",function(t){var e=t.getGraph(),n=e.nodes,a=e.edges;if(n.length){var i=1/0,o=-1/0;G(n,function(t){var e=t.getLayout().value;e<i&&(i=e),e>o&&(o=e)}),G(n,function(e){var n=new se({type:"color",mappingMethod:"linear",dataExtent:[i,o],visual:t.get("color")}).mapValueToVisual(e.getLayout().value),a=e.getModel().get(["itemStyle","color"]);null!=a?(e.setVisual("color",a),e.setVisual("style",{fill:a})):(e.setVisual("color",n),e.setVisual("style",{fill:n}))})}a.length&&G(a,function(t){var e=t.getModel().get("lineStyle");t.setVisual("style",e)})})}var yd=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],n.visualDrawType="stroke",n}return nt(e,t),e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:ut.color.neutral00,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:ut.color.shadow}},animationDuration:800},e}(Pt);Ne(yd,Nn,!0);var md=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return nt(e,t),e.prototype.render=function(t,e,n){var a=t.getData(),i=this.group,o=this._data;this._data||i.removeAll();var r="horizontal"===t.get("layout")?1:0;a.diff(o).add(function(t){if(a.hasValue(t)){var e=bd(a.getItemLayout(t),a,t,r,!0);a.setItemGraphicEl(t,e),i.add(e)}}).update(function(t,e){var n=o.getItemGraphicEl(e);if(a.hasValue(t)){var l=a.getItemLayout(t);n?(Fe(n),wd(l,n,a,t)):n=bd(l,a,t,r),i.add(n),a.setItemGraphicEl(t,n)}else i.remove(n)}).remove(function(t){var e=o.getItemGraphicEl(t);e&&i.remove(e)}).execute(),this._data=a},e.prototype.remove=function(t){var e=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl(function(t){t&&e.remove(t)})},e.type="boxplot",e}(st),xd=function(){return function(){}}(),_d=function(t){function e(e){var n=t.call(this,e)||this;return n.type="boxplotBoxPath",n}return nt(e,t),e.prototype.getDefaultShape=function(){return new xd},e.prototype.buildPath=function(t,e){var n=e.points,a=0;for(t.moveTo(n[a][0],n[a][1]),a++;a<4;a++)t.lineTo(n[a][0],n[a][1]);for(t.closePath();a<n.length;a++)t.moveTo(n[a][0],n[a][1]),a++,t.lineTo(n[a][0],n[a][1])},e}(xt);function bd(t,e,n,a,i){var o=t.ends,r=new _d({shape:{points:i?Sd(o,a,t):o}});return wd(t,r,e,n,i),r}function wd(t,e,n,a,i){var o=n.hostModel;(0,zn[i?"initProps":"updateProps"])(e,{shape:{points:t.ends}},o,a),e.useStyle(n.getItemVisual(a,"style")),e.style.strokeNoScale=!0,e.z2=100;var r=n.getItemModel(a),l=r.getModel("emphasis");yt(e,r),Yt(e,l.get("focus"),l.get("blurScope"),l.get("disabled"))}function Sd(t,e,n){return St(t,function(t){return(t=t.slice())[e]=n.initBaseline,t})}var Id=G;function Md(t){var e=function(t){var e=[],n=[];return t.eachSeriesByType("boxplot",function(t){var a=t.getBaseAxis(),i=J(n,a);i<0&&(i=n.length,n[i]=a,e[i]={axis:a,seriesModels:[]}),e[i].seriesModels.push(t)}),e}(t);Id(e,function(t){var e=t.seriesModels;e.length&&(!function(t){var e,n=t.axis,a=t.seriesModels,i=a.length,o=t.boxWidthList=[],r=t.boxOffsetList=[],l=[];if("category"===n.type)e=n.getBandWidth();else{var s=0;Id(a,function(t){s=Math.max(s,t.getData().count())});var u=n.getExtent();e=Math.abs(u[1]-u[0])/s}Id(a,function(t){var n=t.get("boxWidth");It(n)||(n=[n,n]),l.push([B(n[0],e)||0,B(n[1],e)||0])});var d=.8*e-2,c=d/i*.3,h=(d-c*(i-1))/i,p=h/2-d/2;Id(a,function(t,e){r.push(p),p+=c+h,o.push(Math.min(Math.max(h,l[e][0]),l[e][1]))})}(t),Id(e,function(e,n){!function(t,e,n){var a=t.coordinateSystem,i=t.getData(),o=n/2,r="horizontal"===t.get("layout")?0:1,l=1-r,s=["x","y"],u=i.mapDimension(s[r]),d=i.mapDimensionsAll(s[l]);if(null==u||d.length<5)return;for(var c=0;c<i.count();c++){var h=i.get(u,c),p=x(h,d[2],c),f=x(h,d[0],c),g=x(h,d[1],c),v=x(h,d[3],c),y=x(h,d[4],c),m=[];_(m,g,!1),_(m,v,!0),m.push(f,g,y,v),b(m,f),b(m,y),b(m,p),i.setItemLayout(c,{initBaseline:p[l],ends:m})}function x(t,n,o){var s,u=i.get(n,o),d=[];return d[r]=t,d[l]=u,isNaN(t)||isNaN(u)?s=[NaN,NaN]:(s=a.dataToPoint(d))[r]+=e,s}function _(t,e,n){var a=e.slice(),i=e.slice();a[r]+=o,i[r]-=o,n?t.push(a,i):t.push(i,a)}function b(t,e){var n=e.slice(),a=e.slice();n[r]-=o,a[r]+=o,t.push(n,a)}}(e,t.boxOffsetList[n],t.boxWidthList[n])}))})}var Cd={type:"echarts:boxplot",transform:function(t){var e=t.upstream;if(e.sourceFormat!==On){Vn("")}var n=function(t,e){for(var n=[],a=[],i=(e=e||{}).boundIQR,o="none"===i||0===i,r=0;r<t.length;r++){var l=bn(t[r].slice()),s=Rn(l,.25),u=Rn(l,.5),d=Rn(l,.75),c=l[0],h=l[l.length-1],p=(null==i?1.5:i)*(d-s),f=o?c:Math.max(c,s-p),g=o?h:Math.min(h,d+p),v=e.itemNameFormatter,y=R(v)?v({value:r}):Dt(v)?v.replace("{value}",r+""):r+"";n.push([y,f,s,u,d,g]);for(var m=0;m<l.length;m++){var x=l[m];if(x<f||x>g){var _=[y,x];a.push(_)}}}return{boxData:n,outliers:a}}(e.getRawData(),t.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:n.boxData},{data:n.outliers}]}};function Td(t,e){var n=e.rippleEffectColor||e.color;t.eachChild(function(t){t.attr({z:e.z,zlevel:e.zlevel,style:{stroke:"stroke"===e.brushType?n:null,fill:"fill"===e.brushType?n:null}})})}var Dd=function(t){function e(e,n){var a=t.call(this)||this,i=new dt(e,n),o=new at;return a.add(i),a.add(o),a.updateData(e,n),a}return nt(e,t),e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var e=t.symbolType,n=t.color,a=t.rippleNumber,i=this.childAt(1),o=0;o<a;o++){var r=Je(e,-1,-1,2,2,n);r.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var l=-o/a*t.period+t.effectOffset;r.animate("",!0).when(t.period,{scaleX:t.rippleScale/2,scaleY:t.rippleScale/2}).delay(l).start(),r.animateStyle(!0).when(t.period,{opacity:0}).delay(l).start(),i.add(r)}Td(i,t)},e.prototype.updateEffectAnimation=function(t){for(var e=this._effectCfg,n=this.childAt(1),a=["symbolType","period","rippleScale","rippleNumber"],i=0;i<a.length;i++){var o=a[i];if(e[o]!==t[o])return this.stopEffectAnimation(),void this.startEffectAnimation(t)}Td(n,t)},e.prototype.highlight=function(){Pn(this)},e.prototype.downplay=function(){kn(this)},e.prototype.getSymbolType=function(){var t=this.childAt(0);return t&&t.getSymbolType()},e.prototype.updateData=function(t,e){var n=this,a=t.hostModel;this.childAt(0).updateData(t,e);var i=this.childAt(1),o=t.getItemModel(e),r=t.getItemVisual(e,"symbol"),l=Bn(t.getItemVisual(e,"symbolSize")),s=t.getItemVisual(e,"style"),u=s&&s.fill,d=o.getModel("emphasis");i.setScale(l),i.traverse(function(t){t.setStyle("fill",u)});var c=Gn(t.getItemVisual(e,"symbolOffset"),l);c&&(i.x=c[0],i.y=c[1]);var h=t.getItemVisual(e,"symbolRotate");i.rotation=(h||0)*Math.PI/180||0;var p={};p.showEffectOn=a.get("showEffectOn"),p.rippleScale=o.get(["rippleEffect","scale"]),p.brushType=o.get(["rippleEffect","brushType"]),p.period=1e3*o.get(["rippleEffect","period"]),p.effectOffset=e/t.count(),p.z=a.getShallow("z")||0,p.zlevel=a.getShallow("zlevel")||0,p.symbolType=r,p.color=u,p.rippleEffectColor=o.get(["rippleEffect","color"]),p.rippleNumber=o.get(["rippleEffect","number"]),"render"===p.showEffectOn?(this._effectCfg?this.updateEffectAnimation(p):this.startEffectAnimation(p),this._effectCfg=p):(this._effectCfg=null,this.stopEffectAnimation(),this.onHoverStateChange=function(t){"emphasis"===t?"render"!==p.showEffectOn&&n.startEffectAnimation(p):"normal"===t&&"render"!==p.showEffectOn&&n.stopEffectAnimation()}),this._effectCfg=p,Yt(this,d.get("focus"),d.get("blurScope"),d.get("disabled"))},e.prototype.fadeOut=function(t){t&&t()},e}(at),Ld=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return nt(e,t),e.prototype.init=function(){this._symbolDraw=new De(Dd)},e.prototype.render=function(t,e,n){var a=t.getData(),i=this._symbolDraw;i.updateData(a,{clipShape:this._getClipShape(t)}),this.group.add(i.group)},e.prototype._getClipShape=function(t){var e=t.coordinateSystem,n=e&&e.getArea&&e.getArea();return t.get("clip",!0)?n:null},e.prototype.updateTransform=function(t,e,n){var a=t.getData();this.group.dirty();var i=Wn("").reset(t,e,n);i.progress&&i.progress({start:0,end:a.count(),count:a.count()},a),this._symbolDraw.updateLayout()},e.prototype._updateGroupTransform=function(t){var e=t.coordinateSystem;e&&e.getRoamTransform&&(this.group.transform=Fn(e.getRoamTransform()),this.group.decomposeTransform())},e.prototype.remove=function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0)},e.type="effectScatter",e}(st),Ad=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n}return nt(e,t),e.prototype.getInitialData=function(t,e){return ze(null,this,{useEncodeDefaulter:!0})},e.prototype.brushSelector=function(t,e,n){return n.point(e.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}(Pt);var Pd=function(t){function e(e,n,a){var i=t.call(this)||this;return i.add(i.createLine(e,n,a)),i._updateEffectSymbol(e,n),i}return nt(e,t),e.prototype.createLine=function(t,e,n){return new jn(t,e,n)},e.prototype._updateEffectSymbol=function(t,e){var n=t.getItemModel(e).getModel("effect"),a=n.get("symbolSize"),i=n.get("symbol");It(a)||(a=[a,a]);var o=t.getItemVisual(e,"style"),r=n.get("color")||o&&o.stroke,l=this.childAt(1);this._symbolType!==i&&(this.remove(l),(l=Je(i,-.5,-.5,1,1,r)).z2=100,l.culling=!0,this.add(l)),l&&(l.setStyle("shadowColor",r),l.setStyle(n.getItemStyle(["color"])),l.scaleX=a[0],l.scaleY=a[1],l.setColor(r),this._symbolType=i,this._symbolScale=a,this._updateEffectAnimation(t,n,e))},e.prototype._updateEffectAnimation=function(t,e,n){var a=this.childAt(1);if(a){var i=t.getItemLayout(n),o=1e3*e.get("period"),r=e.get("loop"),l=e.get("roundTrip"),s=e.get("constantSpeed"),u=ue(e.get("delay"),function(e){return e/t.count()*o/3});if(a.ignore=!0,this._updateAnimationPoints(a,i),s>0&&(o=this._getLineLength(a)/s*1e3),o!==this._period||r!==this._loop||l!==this._roundTrip){a.stopAnimation();var d=void 0;d=R(u)?u(n):u,a.__t>0&&(d=-o*a.__t),this._animateSymbol(a,o,d,r,l)}this._period=o,this._loop=r,this._roundTrip=l}},e.prototype._animateSymbol=function(t,e,n,a,i){if(e>0){t.__t=0;var o=this,r=t.animate("",a).when(i?2*e:e,{__t:i?2:1}).delay(n).during(function(){o._updateSymbolPosition(t)});a||r.done(function(){o.remove(t)}),r.start()}},e.prototype._getLineLength=function(t){return Yn(t.__p1,t.__cp1)+Yn(t.__cp1,t.__p2)},e.prototype._updateAnimationPoints=function(t,e){t.__p1=e[0],t.__p2=e[1],t.__cp1=e[2]||[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]},e.prototype.updateData=function(t,e,n){this.childAt(0).updateData(t,e,n),this._updateEffectSymbol(t,e)},e.prototype._updateSymbolPosition=function(t){var e=t.__p1,n=t.__p2,a=t.__cp1,i=t.__t<1?t.__t:2-t.__t,o=[t.x,t.y],r=o.slice(),l=Ce,s=Un;o[0]=l(e[0],a[0],n[0],i),o[1]=l(e[1],a[1],n[1],i);var u=t.__t<1?s(e[0],a[0],n[0],i):s(n[0],a[0],e[0],1-i),d=t.__t<1?s(e[1],a[1],n[1],i):s(n[1],a[1],e[1],1-i);t.rotation=-Math.atan2(d,u)-Math.PI/2,"line"!==this._symbolType&&"rect"!==this._symbolType&&"roundRect"!==this._symbolType||(void 0!==t.__lastT&&t.__lastT<t.__t?(t.scaleY=1.05*Yn(r,o),1===i&&(o[0]=r[0]+(o[0]-r[0])/2,o[1]=r[1]+(o[1]-r[1])/2)):1===t.__lastT?t.scaleY=2*Yn(e,o):t.scaleY=this._symbolScale[1]),t.__lastT=t.__t,t.ignore=!1,t.x=o[0],t.y=o[1]},e.prototype.updateLayout=function(t,e){this.childAt(0).updateLayout(t,e);var n=t.getItemModel(e).getModel("effect");this._updateEffectAnimation(t,n,e)},e}(at),kd=function(t){function e(e,n,a){var i=t.call(this)||this;return i._createPolyline(e,n,a),i}return nt(e,t),e.prototype._createPolyline=function(t,e,n){var a=t.getItemLayout(e),i=new nn({shape:{points:a}});this.add(i),this._updateCommonStl(t,e,n)},e.prototype.updateData=function(t,e,n){var a=t.hostModel,i=this.childAt(0),o={shape:{points:t.getItemLayout(e)}};tt(i,o,a,e),this._updateCommonStl(t,e,n)},e.prototype._updateCommonStl=function(t,e,n){var a=this.childAt(0),i=t.getItemModel(e),o=n&&n.emphasisLineStyle,r=n&&n.focus,l=n&&n.blurScope,s=n&&n.emphasisDisabled;if(!n||t.hasItemOption){var u=i.getModel("emphasis");o=u.getModel("lineStyle").getLineStyle(),s=u.get("disabled"),r=u.get("focus"),l=u.get("blurScope")}a.useStyle(t.getItemVisual(e,"style")),a.style.fill=null,a.style.strokeNoScale=!0,a.ensureState("emphasis").style=o,Yt(this,r,l,s)},e.prototype.updateLayout=function(t,e){this.childAt(0).setShape("points",t.getItemLayout(e))},e}(at),Ed=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._lastFrame=0,e._lastFramePercent=0,e}return nt(e,t),e.prototype.createLine=function(t,e,n){return new kd(t,e,n)},e.prototype._updateAnimationPoints=function(t,e){this._points=e;for(var n=[0],a=0,i=1;i<e.length;i++){var o=e[i-1],r=e[i];a+=Yn(o,r),n.push(a)}if(0!==a){for(i=0;i<n.length;i++)n[i]/=a;this._offsets=n,this._length=a}else this._length=0},e.prototype._getLineLength=function(){return this._length},e.prototype._updateSymbolPosition=function(t){var e=t.__t<1?t.__t:2-t.__t,n=this._points,a=this._offsets,i=n.length;if(a){var o,r=this._lastFrame;if(e<this._lastFramePercent){for(o=Math.min(r+1,i-1);o>=0&&!(a[o]<=e);o--);o=Math.min(o,i-2)}else{for(o=r;o<i&&!(a[o]>e);o++);o=Math.min(o-1,i-2)}var l=(e-a[o])/(a[o+1]-a[o]),s=n[o],u=n[o+1];t.x=s[0]*(1-l)+l*u[0],t.y=s[1]*(1-l)+l*u[1];var d=t.__t<1?u[0]-s[0]:s[0]-u[0],c=t.__t<1?u[1]-s[1]:s[1]-u[1];t.rotation=-Math.atan2(c,d)-Math.PI/2,this._lastFrame=o,this._lastFramePercent=e,t.ignore=!1}},e}(Pd),Nd=function(){return function(){this.polyline=!1,this.curveness=0,this.segs=[]}}(),zd=function(t){function e(e){var n=t.call(this,e)||this;return n._off=0,n.hoverDataIdx=-1,n}return nt(e,t),e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:ut.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new Nd},e.prototype.buildPath=function(t,e){var n,a=e.segs,i=e.curveness;if(e.polyline)for(n=this._off;n<a.length;){var o=a[n++];if(o>0){t.moveTo(a[n++],a[n++]);for(var r=1;r<o;r++)t.lineTo(a[n++],a[n++])}}else for(n=this._off;n<a.length;){var l=a[n++],s=a[n++],u=a[n++],d=a[n++];if(t.moveTo(l,s),i>0){var c=(l+u)/2-(s-d)*i,h=(s+d)/2-(u-l)*i;t.quadraticCurveTo(c,h,u,d)}else t.lineTo(u,d)}this.incremental&&(this._off=n,this.notClear=!0)},e.prototype.findDataIndex=function(t,e){var n=this.shape,a=n.segs,i=n.curveness,o=this.style.lineWidth;if(n.polyline)for(var r=0,l=0;l<a.length;){var s=a[l++];if(s>0)for(var u=a[l++],d=a[l++],c=1;c<s;c++){var h=a[l++],p=a[l++];if(Xn(u,d,h,p,o,t,e))return r}r++}else for(r=0,l=0;l<a.length;){u=a[l++],d=a[l++],h=a[l++],p=a[l++];if(i>0){if(Hn(u,d,(u+h)/2-(d-p)*i,(d+p)/2-(h-u)*i,h,p,o,t,e))return r}else if(Xn(u,d,h,p,o,t,e))return r;r++}return-1},e.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),a=this.getBoundingRect();return t=n[0],e=n[1],a.contain(t,e)?(this.hoverDataIdx=this.findDataIndex(t,e))>=0:(this.hoverDataIdx=-1,!1)},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var e=this.shape.segs,n=1/0,a=1/0,i=-1/0,o=-1/0,r=0;r<e.length;){var l=e[r++],s=e[r++];n=Math.min(l,n),i=Math.max(l,i),a=Math.min(s,a),o=Math.max(s,o)}t=this._rect=new E(n,a,i,o)}return t},e}(xt),Rd=function(){function t(){this.group=new at}return t.prototype.updateData=function(t){this._clear();var e=this._create();e.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(e,t)},t.prototype.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clear()},t.prototype.incrementalUpdate=function(t,e){var n=this._newAdded[0],a=e.getLayout("linesPoints"),i=n&&n.shape.segs;if(i&&i.length<2e4){var o=i.length,r=new Float32Array(o+a.length);r.set(i),r.set(a,o),n.setShape({segs:r})}else{this._newAdded=[];var l=this._create();l.incremental=!0,l.setShape({segs:a}),this._setCommon(l,e),l.__startIndex=t.start}},t.prototype.remove=function(){this._clear()},t.prototype.eachRendered=function(t){this._newAdded[0]&&t(this._newAdded[0])},t.prototype._create=function(){var t=new zd({cursor:"default",ignoreCoarsePointer:!0});return this._newAdded.push(t),this.group.add(t),t},t.prototype._setCommon=function(t,e,n){var a=e.hostModel;t.setShape({polyline:a.get("polyline"),curveness:a.get(["lineStyle","curveness"])}),t.useStyle(a.getModel("lineStyle").getLineStyle()),t.style.strokeNoScale=!0;var i=e.getVisual("style");i&&i.stroke&&t.setStyle("stroke",i.stroke),t.setStyle("fill",null);var o=V(t);o.seriesIndex=a.seriesIndex,t.on("mousemove",function(e){o.dataIndex=null;var n=t.hoverDataIdx;n>0&&(o.dataIndex=n+t.__startIndex)})},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}(),Od={seriesType:"lines",plan:Zn(),reset:function(t){var e=t.coordinateSystem;if(e){var n=t.get("polyline"),a=t.pipelineContext.large;return{progress:function(i,o){var r=[];if(a){var l=void 0,s=i.end-i.start;if(n){for(var u=0,d=i.start;d<i.end;d++)u+=t.getLineCoordsCount(d);l=new Float32Array(s+2*u)}else l=new Float32Array(4*s);var c=0,h=[];for(d=i.start;d<i.end;d++){var p=t.getLineCoords(d,r);n&&(l[c++]=p);for(var f=0;f<p;f++)h=e.dataToPoint(r[f],!1,h),l[c++]=h[0],l[c++]=h[1]}o.setLayout("linesPoints",l)}else for(d=i.start;d<i.end;d++){var g=o.getItemModel(d),v=(p=t.getLineCoords(d,r),[]);if(n)for(var y=0;y<p;y++)v.push(e.dataToPoint(r[y]));else{v[0]=e.dataToPoint(r[0]),v[1]=e.dataToPoint(r[1]);var m=g.get(["lineStyle","curveness"]);+m&&(v[2]=[(v[0][0]+v[1][0])/2-(v[0][1]-v[1][1])*m,(v[0][1]+v[1][1])/2-(v[1][0]-v[0][0])*m])}o.setItemLayout(d,v)}}}}}},Vd=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return nt(e,t),e.prototype.render=function(t,e,n){var a=t.getData(),i=this._updateLineDraw(a,t),o=t.get("zlevel"),r=t.get(["effect","trailLength"]),l=n.getZr(),s="svg"===l.painter.getType();s||l.painter.getLayer(o).clear(!0),null==this._lastZlevel||s||l.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(t)&&r>0&&(s||l.configLayer(o,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(r/10+.9,1),0)})),i.updateData(a);var u=t.get("clip",!0)&&qn(t.coordinateSystem,!1,t);u?this.group.setClipPath(u):this.group.removeClipPath(),this._lastZlevel=o,this._finished=!0},e.prototype.incrementalPrepareRender=function(t,e,n){var a=t.getData();this._updateLineDraw(a,t).incrementalPrepareUpdate(a),this._clearLayer(n),this._finished=!1},e.prototype.incrementalRender=function(t,e,n){this._lineDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},e.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},e.prototype.updateTransform=function(t,e,n){var a=t.getData(),i=t.pipelineContext;if(!this._finished||i.large||i.progressiveRender)return{update:!0};var o=Od.reset(t,e,n);o.progress&&o.progress({start:0,end:a.count(),count:a.count()},a),this._lineDraw.updateLayout(),this._clearLayer(n)},e.prototype._updateLineDraw=function(t,e){var n=this._lineDraw,a=this._showEffect(e),i=!!e.get("polyline"),o=e.pipelineContext.large;return n&&a===this._hasEffet&&i===this._isPolyline&&o===this._isLargeDraw||(n&&n.remove(),n=this._lineDraw=o?new Rd:new Le(i?a?Ed:kd:a?Pd:jn),this._hasEffet=a,this._isPolyline=i,this._isLargeDraw=o),this.group.add(n.group),n},e.prototype._showEffect=function(t){return!!t.get(["effect","show"])},e.prototype._clearLayer=function(t){var e=t.getZr();"svg"===e.painter.getType()||null==this._lastZlevel||e.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(t,e){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(e)},e.prototype.dispose=function(t,e){this.remove(t,e)},e.type="lines",e}(st),Bd="undefined"==typeof Uint32Array?Array:Uint32Array,Gd="undefined"==typeof Float64Array?Array:Float64Array;function Wd(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(t.data=St(e,function(t){var e={coords:[t[0].coord,t[1].coord]};return t[0].name&&(e.fromName=t[0].name),t[1].name&&(e.toName=t[1].name),$n([e,t[0],t[1]])}))}var Fd=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.visualStyleAccessPath="lineStyle",n.visualDrawType="stroke",n}return nt(e,t),e.prototype.init=function(e){e.data=e.data||[],Wd(e);var n=this._processFlatCoordsArray(e.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(e.data=new Float32Array(n.count)),t.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(e){if(Wd(e),e.data){var n=this._processFlatCoordsArray(e.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(e.data=new Float32Array(n.count))}t.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(t){var e=this._processFlatCoordsArray(t.data);e.flatCoords&&(this._flatCoords?(this._flatCoords=ct(this._flatCoords,e.flatCoords),this._flatCoordsOffset=ct(this._flatCoordsOffset,e.flatCoordsOffset)):(this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset),t.data=new Float32Array(e.count)),this.getRawData().appendData(t.data)},e.prototype._getCoordsFromItemModel=function(t){var e=this.getData().getItemModel(t);return e.option instanceof Array?e.option:e.getShallow("coords")},e.prototype.getLineCoordsCount=function(t){return this._flatCoordsOffset?this._flatCoordsOffset[2*t+1]:this._getCoordsFromItemModel(t).length},e.prototype.getLineCoords=function(t,e){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[2*t],a=this._flatCoordsOffset[2*t+1],i=0;i<a;i++)e[i]=e[i]||[],e[i][0]=this._flatCoords[n+2*i],e[i][1]=this._flatCoords[n+2*i+1];return a}var o=this._getCoordsFromItemModel(t);for(i=0;i<o.length;i++)e[i]=e[i]||[],e[i][0]=o[i][0],e[i][1]=o[i][1];return o.length},e.prototype._processFlatCoordsArray=function(t){var e=0;if(this._flatCoords&&(e=this._flatCoords.length),ce(t[0])){for(var n=t.length,a=new Bd(n),i=new Gd(n),o=0,r=0,l=0,s=0;s<n;){l++;var u=t[s++];a[r++]=o+e,a[r++]=u;for(var d=0;d<u;d++){var c=t[s++],h=t[s++];i[o++]=c,i[o++]=h}}return{flatCoordsOffset:new Uint32Array(a.buffer,0,r),flatCoords:i,count:l}}return{flatCoordsOffset:null,flatCoords:null,count:t.length}},e.prototype.getInitialData=function(t,e){var n=new Tt(["value"],this);return n.hasItemOption=!1,n.initData(t.data,[],function(t,e,a,i){if(t instanceof Array)return NaN;n.hasItemOption=!0;var o=t.value;return null!=o?o instanceof Array?o[i]:o:void 0}),n},e.prototype.formatTooltip=function(t,e,n){var a=this.getData().getItemModel(t),i=a.get("name");if(i)return i;var o=a.get("fromName"),r=a.get("toName"),l=[];return null!=o&&l.push(o),null!=r&&l.push(r),At("nameValue",{name:l.join(" > ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?2e4:this.get("progressiveThreshold"):t},e.prototype.getZLevelKey=function(){var t=this.getModel("effect"),e=t.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:t.get("show")&&e>0?e+"":""},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}(Pt);function jd(t){return t instanceof Array||(t=[t,t]),t}var Yd={seriesType:"lines",reset:function(t){var e=jd(t.get("symbol")),n=jd(t.get("symbolSize")),a=t.getData();return a.setVisual("fromSymbol",e&&e[0]),a.setVisual("toSymbol",e&&e[1]),a.setVisual("fromSymbolSize",n&&n[0]),a.setVisual("toSymbolSize",n&&n[1]),{dataEach:a.hasItemOption?function(t,e){var n=t.getItemModel(e),a=jd(n.getShallow("symbol",!0)),i=jd(n.getShallow("symbolSize",!0));a[0]&&t.setItemVisual(e,"fromSymbol",a[0]),a[1]&&t.setItemVisual(e,"toSymbol",a[1]),i[0]&&t.setItemVisual(e,"fromSymbolSize",i[0]),i[1]&&t.setItemVisual(e,"toSymbolSize",i[1])}:null}}};var Ud=function(){function t(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var t=Kn.createCanvas();this.canvas=t}return t.prototype.update=function(t,e,n,a,i,o){var r=this._getBrush(),l=this._getGradient(i,"inRange"),s=this._getGradient(i,"outOfRange"),u=this.pointSize+this.blurSize,d=this.canvas,c=d.getContext("2d"),h=t.length;d.width=e,d.height=n;for(var p=0;p<h;++p){var f=t[p],g=f[0],v=f[1],y=a(f[2]);c.globalAlpha=y,c.drawImage(r,g-u,v-u)}if(!d.width||!d.height)return d;for(var m=c.getImageData(0,0,d.width,d.height),x=m.data,_=0,b=x.length,w=this.minOpacity,S=this.maxOpacity-w;_<b;){y=x[_+3]/256;var I=4*Math.floor(255*y);if(y>0){var M=o(y)?l:s;y>0&&(y=y*S+w),x[_++]=M[I],x[_++]=M[I+1],x[_++]=M[I+2],x[_++]=M[I+3]*y*256}else _+=4}return c.putImageData(m,0,0),d},t.prototype._getBrush=function(){var t=this._brushCanvas||(this._brushCanvas=Kn.createCanvas()),e=this.pointSize+this.blurSize,n=2*e;t.width=n,t.height=n;var a=t.getContext("2d");return a.clearRect(0,0,n,n),a.shadowOffsetX=n,a.shadowBlur=this.blurSize,a.shadowColor=ut.color.neutral99,a.beginPath(),a.arc(-e,e,this.pointSize,0,2*Math.PI,!0),a.closePath(),a.fill(),t},t.prototype._getGradient=function(t,e){for(var n=this._gradientPixels,a=n[e]||(n[e]=new Uint8ClampedArray(1024)),i=[0,0,0,0],o=0,r=0;r<256;r++)t[e](r/255,!0,i),a[o++]=i[0],a[o++]=i[1],a[o++]=i[2],a[o++]=i[3];return a},t}();function Xd(t){var e=t.dimensions;return"lng"===e[0]&&"lat"===e[1]}var Hd=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return nt(e,t),e.prototype.render=function(t,e,n){var a;e.eachComponent("visualMap",function(e){e.eachTargetSeries(function(n){n===t&&(a=e)})}),this._progressiveEls=null,this.group.removeAll();var i=t.coordinateSystem;"cartesian2d"===i.type||"calendar"===i.type||"matrix"===i.type?this._renderOnGridLike(t,n,0,t.getData().count()):Xd(i)&&this._renderOnGeo(i,t,a,n)},e.prototype.incrementalPrepareRender=function(t,e,n){this.group.removeAll()},e.prototype.incrementalRender=function(t,e,n,a){var i=e.coordinateSystem;i&&(Xd(i)?this.render(e,n,a):(this._progressiveEls=[],this._renderOnGridLike(e,a,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){Qn(this._progressiveEls||this.group,t)},e.prototype._renderOnGridLike=function(t,e,n,a,i){var o,r,l,s,u=t.coordinateSystem,d=Jn(u,"cartesian2d"),c=Jn(u,"matrix");if(d){var h=u.getAxis("x"),p=u.getAxis("y");o=h.getBandWidth()+.5,r=p.getBandWidth()+.5,l=h.scale.getExtent(),s=p.scale.getExtent()}for(var f=this.group,g=t.getData(),v=t.getModel(["emphasis","itemStyle"]).getItemStyle(),y=t.getModel(["blur","itemStyle"]).getItemStyle(),m=t.getModel(["select","itemStyle"]).getItemStyle(),x=t.get(["itemStyle","borderRadius"]),_=ne(t),b=t.getModel("emphasis"),w=b.get("focus"),S=b.get("blurScope"),I=b.get("disabled"),M=d||c?[g.mapDimension("x"),g.mapDimension("y"),g.mapDimension("value")]:[g.mapDimension("time"),g.mapDimension("value")],C=n;C<a;C++){var T=void 0,D=g.getItemVisual(C,"style");if(d){var L=g.get(M[0],C),A=g.get(M[1],C);if(isNaN(g.get(M[2],C))||isNaN(L)||isNaN(A)||L<l[0]||L>l[1]||A<s[0]||A>s[1])continue;var P=u.dataToPoint([L,A]);T=new oe({shape:{x:P[0]-o/2,y:P[1]-r/2,width:o,height:r},style:D})}else if(c){var k=u.dataToLayout([g.get(M[0],C),g.get(M[1],C)]).rect;if(ln(k.x))continue;T=new oe({z2:1,shape:k,style:D})}else{if(isNaN(g.get(M[1],C)))continue;var E=u.dataToLayout([g.get(M[0],C)]);k=E.contentRect||E.rect;if(ln(k.x)||ln(k.y))continue;T=new oe({z2:1,shape:k,style:D})}if(g.hasItemOption){var N=g.getItemModel(C),z=N.getModel("emphasis");v=z.getModel("itemStyle").getItemStyle(),y=N.getModel(["blur","itemStyle"]).getItemStyle(),m=N.getModel(["select","itemStyle"]).getItemStyle(),x=N.get(["itemStyle","borderRadius"]),w=z.get("focus"),S=z.get("blurScope"),I=z.get("disabled"),_=ne(N)}T.shape.r=x;var R=t.getRawValue(C),O="-";R&&null!=R[2]&&(O=R[2]+""),ee(T,_,{labelFetcher:t,labelDataIndex:C,defaultOpacity:D.opacity,defaultText:O}),T.ensureState("emphasis").style=v,T.ensureState("blur").style=y,T.ensureState("select").style=m,Yt(T,w,S,I),T.incremental=i,i&&(T.states.emphasis.hoverLayer=!0),f.add(T),g.setItemGraphicEl(C,T),this._progressiveEls&&this._progressiveEls.push(T)}},e.prototype._renderOnGeo=function(t,e,n,a){var i=n.targetVisuals.inRange,o=n.targetVisuals.outOfRange,r=e.getData(),l=this._hmLayer||this._hmLayer||new Ud;l.blurSize=e.get("blurSize"),l.pointSize=e.get("pointSize"),l.minOpacity=e.get("minOpacity"),l.maxOpacity=e.get("maxOpacity");var s=t.getViewRect().clone(),u=t.getRoamTransform();s.applyTransform(u);var d=Math.max(s.x,0),c=Math.max(s.y,0),h=Math.min(s.width+s.x,a.getWidth()),p=Math.min(s.height+s.y,a.getHeight()),f=h-d,g=p-c,v=[r.mapDimension("lng"),r.mapDimension("lat"),r.mapDimension("value")],y=r.mapArray(v,function(e,n,a){var i=t.dataToPoint([e,n]);return i[0]-=d,i[1]-=c,i.push(a),i}),m=n.getExtent(),x="visualMap.continuous"===n.type?function(t,e){var n=t[1]-t[0];return e=[(e[0]-t[0])/n,(e[1]-t[0])/n],function(t){return t>=e[0]&&t<=e[1]}}(m,n.option.range):function(t,e,n){var a=t[1]-t[0],i=(e=St(e,function(e){return{interval:[(e.interval[0]-t[0])/a,(e.interval[1]-t[0])/a]}})).length,o=0;return function(t){var a;for(a=o;a<i;a++)if((r=e[a].interval)[0]<=t&&t<=r[1]){o=a;break}if(a===i)for(a=o-1;a>=0;a--){var r;if((r=e[a].interval)[0]<=t&&t<=r[1]){o=a;break}}return a>=0&&a<i&&n[a]}}(m,n.getPieceList(),n.option.selected);l.update(y,f,g,i.color.getNormalizer(),{inRange:i.color.getColorMapper(),outOfRange:o.color.getColorMapper()},x);var _=new Qe({style:{width:f,height:g,x:d,y:c,image:l.canvas},silent:!0});this.group.add(_)},e.type="heatmap",e}(st),Zd=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return nt(e,t),e.prototype.getInitialData=function(t,e){return ze(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var t=Re.get(this.get("coordinateSystem"));if(t&&t.dimensions)return"lng"===t.dimensions[0]&&"lat"===t.dimensions[1]},e.type="series.heatmap",e.dependencies=["grid","geo","calendar","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:ut.color.primary}}},e}(Pt);var qd=["itemStyle","borderWidth"],$d=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],Kd=new ea,Qd=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return nt(e,t),e.prototype.render=function(t,e,n){var a=this.group,i=t.getData(),o=this._data,r=t.coordinateSystem,l=r.getBaseAxis().isHorizontal(),s=r.master.getRect(),u={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:t,coordSys:r,coordSysExtent:[[s.x,s.x+s.width],[s.y,s.y+s.height]],isHorizontal:l,valueDim:$d[+l],categoryDim:$d[1-+l]};i.diff(o).add(function(t){if(i.hasValue(t)){var e=rc(i,t),n=Jd(i,t,e,u),o=uc(i,u,n);i.setItemGraphicEl(t,o),a.add(o),fc(o,u,n)}}).update(function(t,e){var n=o.getItemGraphicEl(e);if(i.hasValue(t)){var r=rc(i,t),l=Jd(i,t,r,u),s=cc(i,l);n&&s!==n.__pictorialShapeStr&&(a.remove(n),i.setItemGraphicEl(t,null),n=null),n?function(t,e,n){var a=n.animationModel,i=n.dataIndex,o=t.__pictorialBundle;tt(o,{x:n.bundlePosition[0],y:n.bundlePosition[1]},a,i),n.symbolRepeat?nc(t,e,n,!0):ac(t,e,n,!0);ic(t,n,!0),oc(t,e,n,!0)}(n,u,l):n=uc(i,u,l,!0),i.setItemGraphicEl(t,n),n.__pictorialSymbolMeta=l,a.add(n),fc(n,u,l)}else a.remove(n)}).remove(function(t){var e=o.getItemGraphicEl(t);e&&dc(o,t,e.__pictorialSymbolMeta.animationModel,e)}).execute();var d=t.get("clip",!0)?qn(t.coordinateSystem,!1,t):null;return d?a.setClipPath(d):a.removeClipPath(),this._data=i,this.group},e.prototype.remove=function(t,e){var n=this.group,a=this._data;t.get("animation")?a&&a.eachItemGraphicEl(function(e){dc(a,V(e).dataIndex,t,e)}):n.removeAll()},e.type="pictorialBar",e}(st);function Jd(t,e,n,a){var i=t.getItemLayout(e),o=n.get("symbolRepeat"),r=n.get("symbolClip"),l=n.get("symbolPosition")||"start",s=(n.get("symbolRotate")||0)*Math.PI/180||0,u=n.get("symbolPatternSize")||2,d=n.isAnimationEnabled(),c={dataIndex:e,layout:i,itemModel:n,symbolType:t.getItemVisual(e,"symbol")||"circle",style:t.getItemVisual(e,"style"),symbolClip:r,symbolRepeat:o,symbolRepeatDirection:n.get("symbolRepeatDirection"),symbolPatternSize:u,rotation:s,animationModel:d?n:null,hoverScale:d&&n.get(["emphasis","scale"]),z2:n.getShallow("z",!0)||0};!function(t,e,n,a,i){var o,r=a.valueDim,l=t.get("symbolBoundingData"),s=a.coordSys.getOtherAxis(a.coordSys.getBaseAxis()),u=s.toGlobalCoord(s.dataToCoord(0)),d=1-+(n[r.wh]<=0);if(It(l)){var c=[tc(s,l[0])-u,tc(s,l[1])-u];c[1]<c[0]&&c.reverse(),o=c[d]}else o=null!=l?tc(s,l)-u:e?a.coordSysExtent[r.index][d]-u:n[r.wh];i.boundingLength=o,e&&(i.repeatCutLength=n[r.wh]);var h="x"===r.xy,p=s.inverse;i.pxSign=h&&!p||!h&&p?o>=0?1:-1:o>0?1:-1}(n,o,i,a,c),function(t,e,n,a,i,o,r,l,s,u){var d,c=s.valueDim,h=s.categoryDim,p=Math.abs(n[h.wh]),f=t.getItemVisual(e,"symbolSize");d=It(f)?f.slice():null==f?["100%","100%"]:[f,f];d[h.index]=B(d[h.index],p),d[c.index]=B(d[c.index],a?p:Math.abs(o)),u.symbolSize=d;var g=u.symbolScale=[d[0]/l,d[1]/l];g[c.index]*=(s.isHorizontal?-1:1)*r}(t,e,i,o,0,c.boundingLength,c.pxSign,u,a,c),function(t,e,n,a,i){var o=t.get(qd)||0;o&&(Kd.attr({scaleX:e[0],scaleY:e[1],rotation:n}),Kd.updateTransform(),o/=Kd.getLineScale(),o*=e[a.valueDim.index]);i.valueLineWidth=o||0}(n,c.symbolScale,s,a,c);var h=c.symbolSize,p=Gn(n.get("symbolOffset"),h);return function(t,e,n,a,i,o,r,l,s,u,d,c){var h=d.categoryDim,p=d.valueDim,f=c.pxSign,g=Math.max(e[p.index]+l,0),v=g;if(a){var y=Math.abs(s),m=ue(t.get("symbolMargin"),"15%")+"",x=!1;m.lastIndexOf("!")===m.length-1&&(x=!0,m=m.slice(0,m.length-1));var _=B(m,e[p.index]),b=Math.max(g+2*_,0),w=x?0:2*_,S=na(a),I=S?a:gc((y+w)/b);b=g+2*(_=(y-I*g)/2/(x?I:Math.max(I-1,1))),w=x?0:2*_,S||"fixed"===a||(I=u?gc((Math.abs(u)+w)/b):0),v=I*b-w,c.repeatTimes=I,c.symbolMargin=_}var M=f*(v/2),C=c.pathPosition=[];C[h.index]=n[h.wh]/2,C[p.index]="start"===r?M:"end"===r?s-M:s/2,o&&(C[0]+=o[0],C[1]+=o[1]);var T=c.bundlePosition=[];T[h.index]=n[h.xy],T[p.index]=n[p.xy];var D=c.barRectShape=wt({},n);D[p.wh]=f*Math.max(Math.abs(n[p.wh]),Math.abs(C[p.index]+M)),D[h.wh]=n[h.wh];var L=c.clipShape={};L[h.xy]=-n[h.xy],L[h.wh]=d.ecSize[h.wh],L[p.xy]=0,L[p.wh]=n[p.wh]}(n,h,i,o,0,p,l,c.valueLineWidth,c.boundingLength,c.repeatCutLength,a,c),c}function tc(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function ec(t){var e=t.symbolPatternSize,n=Je(t.symbolType,-e/2,-e/2,e,e);return n.attr({culling:!0}),"image"!==n.type&&n.setStyle({strokeNoScale:!0}),n}function nc(t,e,n,a){var i=t.__pictorialBundle,o=n.symbolSize,r=n.valueLineWidth,l=n.pathPosition,s=e.valueDim,u=n.repeatTimes||0,d=0,c=o[e.valueDim.index]+r+2*n.symbolMargin;for(hc(t,function(t){t.__pictorialAnimationIndex=d,t.__pictorialRepeatTimes=u,d<u?pc(t,null,f(d),n,a):pc(t,null,{scaleX:0,scaleY:0},n,a,function(){i.remove(t)}),d++});d<u;d++){var h=ec(n);h.__pictorialAnimationIndex=d,h.__pictorialRepeatTimes=u,i.add(h);var p=f(d);pc(h,{x:p.x,y:p.y,scaleX:0,scaleY:0},{scaleX:p.scaleX,scaleY:p.scaleY,rotation:p.rotation},n,a)}function f(t){var e=l.slice(),a=n.pxSign,i=t;return("start"===n.symbolRepeatDirection?a>0:a<0)&&(i=u-1-t),e[s.index]=c*(i-u/2+.5)+l[s.index],{x:e[0],y:e[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation}}}function ac(t,e,n,a){var i=t.__pictorialBundle,o=t.__pictorialMainPath;o?pc(o,null,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation},n,a):(o=t.__pictorialMainPath=ec(n),i.add(o),pc(o,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:0,scaleY:0,rotation:n.rotation},{scaleX:n.symbolScale[0],scaleY:n.symbolScale[1]},n,a))}function ic(t,e,n){var a=wt({},e.barRectShape),i=t.__pictorialBarRect;i?pc(i,null,{shape:a},e,n):((i=t.__pictorialBarRect=new oe({z2:2,shape:a,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}})).disableMorphing=!0,t.add(i))}function oc(t,e,n,a){if(n.symbolClip){var i=t.__pictorialClipPath,o=wt({},n.clipShape),r=e.valueDim,l=n.animationModel,s=n.dataIndex;if(i)tt(i,{shape:o},l,s);else{o[r.wh]=0,i=new oe({shape:o}),t.__pictorialBundle.setClipPath(i),t.__pictorialClipPath=i;var u={};u[r.wh]=n.clipShape[r.wh],zn[a?"updateProps":"initProps"](i,{shape:u},l,s)}}}function rc(t,e){var n=t.getItemModel(e);return n.getAnimationDelayParams=lc,n.isAnimationEnabled=sc,n}function lc(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function sc(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function uc(t,e,n,a){var i=new at,o=new at;return i.add(o),i.__pictorialBundle=o,o.x=n.bundlePosition[0],o.y=n.bundlePosition[1],n.symbolRepeat?nc(i,e,n):ac(i,0,n),ic(i,n,a),oc(i,e,n,a),i.__pictorialShapeStr=cc(t,n),i.__pictorialSymbolMeta=n,i}function dc(t,e,n,a){var i=a.__pictorialBarRect;i&&i.removeTextContent();var o=[];hc(a,function(t){o.push(t)}),a.__pictorialMainPath&&o.push(a.__pictorialMainPath),a.__pictorialClipPath&&(n=null),G(o,function(t){ft(t,{scaleX:0,scaleY:0},n,e,function(){a.parent&&a.parent.remove(a)})}),t.setItemGraphicEl(e,null)}function cc(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function hc(t,e,n){G(t.__pictorialBundle.children(),function(a){a!==t.__pictorialBarRect&&e.call(n,a)})}function pc(t,e,n,a,i,o){e&&t.attr(e),a.symbolClip&&!i?n&&t.attr(n):n&&zn[i?"updateProps":"initProps"](t,n,a.animationModel,a.dataIndex,o)}function fc(t,e,n){var a=n.dataIndex,i=n.itemModel,o=i.getModel("emphasis"),r=o.getModel("itemStyle").getItemStyle(),l=i.getModel(["blur","itemStyle"]).getItemStyle(),s=i.getModel(["select","itemStyle"]).getItemStyle(),u=i.getShallow("cursor"),d=o.get("focus"),c=o.get("blurScope"),h=o.get("scale");hc(t,function(t){if(t instanceof Qe){var e=t.style;t.useStyle(wt({image:e.image,x:e.x,y:e.y,width:e.width,height:e.height},n.style))}else t.useStyle(n.style);var a=t.ensureState("emphasis");a.style=r,h&&(a.scaleX=1.1*t.scaleX,a.scaleY=1.1*t.scaleY),t.ensureState("blur").style=l,t.ensureState("select").style=s,u&&(t.cursor=u),t.z2=n.z2});var p=e.valueDim.posDesc[+(n.boundingLength>0)],f=t.__pictorialBarRect;f.ignoreClip=!0,ee(f,ne(i),{labelFetcher:e.seriesModel,labelDataIndex:a,defaultText:ta(e.seriesModel.getData(),a),inheritColor:n.style.fill,defaultOpacity:n.style.opacity,defaultOutsidePosition:p}),Yt(t,d,c,o.get("disabled"))}function gc(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}var vc=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n.defaultSymbol="roundRect",n}return nt(e,t),e.prototype.getInitialData=function(e){return e.stack=null,t.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=aa(ia.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:ut.color.primary}}}),e}(ia);var yc=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._layers=[],n}return nt(e,t),e.prototype.render=function(t,e,n){var a=t.getData(),i=this,o=this.group,r=t.getLayerSeries(),l=a.getLayout("layoutInfo"),s=l.rect,u=l.boundaryGap;function d(t){return t.name}o.x=0,o.y=s.y+u[0];var c=new Ut(this._layersSeries||[],r,d,d),h=[];function p(e,n,l){var s=i._layers;if("remove"!==e){for(var u,d,c=[],p=[],f=r[n].indices,g=0;g<f.length;g++){var v=a.getItemLayout(f[g]),y=v.x,m=v.y0,x=v.y;c.push(y,m),p.push(y,m+x),u=a.getItemVisual(f[g],"style")}var _=a.getItemLayout(f[0]),b=t.getModel("label").get("margin"),w=t.getModel("emphasis");if("add"===e){var S=h[n]=new at;d=new la({shape:{points:c,stackedOnPoints:p,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),S.add(d),o.add(S),t.isAnimationEnabled()&&d.setClipPath(function(t,e,n){var a=new oe({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return Q(a,{shape:{x:t.x-50,width:t.width+100,height:t.height+20}},e,n),a}(d.getBoundingRect(),t,function(){d.removeClipPath()}))}else{S=s[l];d=S.childAt(0),o.add(S),h[n]=S,tt(d,{shape:{points:c,stackedOnPoints:p}},t),Fe(d)}ee(d,ne(t),{labelDataIndex:f[g-1],defaultText:a.getName(f[g-1]),inheritColor:u.fill},{normal:{verticalAlign:"middle"}}),d.setTextConfig({position:null,local:!0});var I=d.getTextContent();I&&(I.x=_.x-b,I.y=_.y0+_.y/2),d.useStyle(u),a.setItemGraphicEl(n,d),yt(d,t),Yt(d,w.get("focus"),w.get("blurScope"),w.get("disabled"))}else o.remove(s[n])}c.add(Xt(p,this,"add")).update(Xt(p,this,"update")).remove(Xt(p,this,"remove")).execute(),this._layersSeries=r,this._layers=h},e.type="themeRiver",e}(st);var mc=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return nt(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new Oe(Xt(this.getData,this),Xt(this.getRawData,this))},e.prototype.fixData=function(t){var e=t.length,n={},a=En(t,function(t){return n.hasOwnProperty(t[0]+"")||(n[t[0]+""]=-1),t[2]}),i=[];a.buckets.each(function(t,e){i.push({name:e,dataList:t})});for(var o=i.length,r=0;r<o;++r){for(var l=i[r].name,s=0;s<i[r].dataList.length;++s){var u=i[r].dataList[s][0]+"";n[u]=r}for(var u in n)n.hasOwnProperty(u)&&n[u]!==r&&(n[u]=r,t[e]=[u,0,l],e++)}return t},e.prototype.getInitialData=function(t,e){for(var n=this.getReferringComponents("singleAxis",_n).models[0].get("type"),a=F(t.data,function(t){return void 0!==t[2]}),i=this.fixData(a||[]),o=[],r=this.nameMap=Ot(),l=0,s=0;s<i.length;++s)o.push(i[s][2]),r.get(i[s][2])||(r.set(i[s][2],l),l++);var u=Ct(i,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:sa(n)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}).dimensions,d=new Tt(u,this);return d.initData(i),d},e.prototype.getLayerSeries=function(){for(var t=this.getData(),e=t.count(),n=[],a=0;a<e;++a)n[a]=a;var i=t.mapDimension("single"),o=En(n,function(e){return t.get("name",e)}),r=[];return o.buckets.each(function(e,n){e.sort(function(e,n){return t.get(i,e)-t.get(i,n)}),r.push({name:n,indices:e})}),r},e.prototype.getAxisTooltipData=function(t,e,n){It(t)||(t=t?[t]:[]);for(var a,i=this.getData(),o=this.getLayerSeries(),r=[],l=o.length,s=0;s<l;++s){for(var u=Number.MAX_VALUE,d=-1,c=o[s].indices.length,h=0;h<c;++h){var p=i.get(t[0],o[s].indices[h]),f=Math.abs(p-e);f<=u&&(a=p,u=f,d=o[s].indices[h])}r.push(d)}return{dataIndices:r,nestestValue:a}},e.prototype.formatTooltip=function(t,e,n){var a=this.getData(),i=a.getName(t),o=a.get(a.mapDimension("value"),t);return At("nameValue",{name:i,value:o})},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}(Pt);function xc(t,e){t.eachSeriesByType("themeRiver",function(t){var e=t.getData(),n=t.coordinateSystem,a={},i=n.getRect();a.rect=i;var o=t.get("boundaryGap"),r=n.getAxis();(a.boundaryGap=o,"horizontal"===r.orient)?(o[0]=B(o[0],i.height),o[1]=B(o[1],i.height),_c(e,t,i.height-o[0]-o[1])):(o[0]=B(o[0],i.width),o[1]=B(o[1],i.width),_c(e,t,i.width-o[0]-o[1]));e.setLayout("layoutInfo",a)})}function _c(t,e,n){if(t.count())for(var a,i=e.coordinateSystem,o=e.getLayerSeries(),r=t.mapDimension("single"),l=t.mapDimension("value"),s=St(o,function(e){return St(e.indices,function(e){var n=i.dataToPoint(t.get(r,e));return n[1]=t.get(l,e),n})}),u=function(t){for(var e=t.length,n=t[0].length,a=[],i=[],o=0,r=0;r<n;++r){for(var l=0,s=0;s<e;++s)l+=t[s][r][1];l>o&&(o=l),a.push(l)}for(var u=0;u<n;++u)i[u]=(o-a[u])/2;o=0;for(var d=0;d<n;++d){var c=a[d]+i[d];c>o&&(o=c)}return{y0:i,max:o}}(s),d=u.y0,c=n/u.max,h=o.length,p=o[0].indices.length,f=0;f<p;++f){a=d[f]*c,t.setItemLayout(o[0].indices[f],{layerIndex:0,x:s[0][f][0],y0:a,y:s[0][f][1]*c});for(var g=1;g<h;++g)a+=s[g-1][f][1]*c,t.setItemLayout(o[g].indices[f],{layerIndex:g,x:s[g][f][0],y0:a,y:s[g][f][1]*c})}}var bc=function(t){function e(e,n,a,i){var o=t.call(this)||this;o.z2=2,o.textConfig={inside:!0},V(o).seriesIndex=n.seriesIndex;var r=new Wt({z2:4,silent:e.getModel().get(["label","silent"])});return o.setTextContent(r),o.updateData(!0,e,n,a,i),o}return nt(e,t),e.prototype.updateData=function(t,e,n,a,i){this.node=e,e.piece=this,n=n||this._seriesModel,a=a||this._ecModel;var o=this;V(o).dataIndex=e.dataIndex;var r=e.getModel(),l=r.getModel("emphasis"),s=e.getLayout(),u=wt({},s);u.label=null;var d=e.getVisual("style");d.lineJoin="bevel";var c=e.getVisual("decal");c&&(d.decal=ua(c,i));var h=Ge(r.getModel("itemStyle"),u,!0);wt(u,h),G(da,function(t){var e=o.ensureState(t),n=r.getModel([t,"itemStyle"]);e.style=n.getItemStyle();var a=Ge(n,u);a&&(e.shape=a)}),t?(o.setShape(u),o.shape.r=s.r0,Q(o,{shape:{r:s.r}},n,e.dataIndex)):(tt(o,{shape:u},n),Fe(o)),o.useStyle(d),this._updateLabel(n);var p=r.getShallow("cursor");p&&o.attr("cursor",p),this._seriesModel=n||this._seriesModel,this._ecModel=a||this._ecModel;var f=l.get("focus"),g="relative"===f?ct(e.getAncestorsIndices(),e.getDescendantIndices()):"ancestor"===f?e.getAncestorsIndices():"descendant"===f?e.getDescendantIndices():f;Yt(this,g,l.get("blurScope"),l.get("disabled"))},e.prototype._updateLabel=function(t){var e=this,n=this.node.getModel(),a=n.getModel("label"),i=this.node.getLayout(),o=i.endAngle-i.startAngle,r=(i.startAngle+i.endAngle)/2,l=Math.cos(r),s=Math.sin(r),u=this,d=u.getTextContent(),c=this.node.dataIndex,h=a.get("minAngle")/180*Math.PI,p=a.get("show")&&!(null!=h&&Math.abs(o)<h);function f(t,e){var n=t.get(e);return null==n?a.get(e):n}d.ignore=!p,G(ha,function(a){var h="normal"===a?n.getModel("label"):n.getModel([a,"label"]),p="normal"===a,g=p?d:d.ensureState(a),v=t.getFormattedLabel(c,a);p&&(v=v||e.node.name),g.style=jt(h,{},null,"normal"!==a,!0),v&&(g.style.text=v);var y=h.get("show");null==y||p||(g.ignore=!y);var m,x=f(h,"position"),_=p?u:u.states[a],b=_.style.fill;_.textConfig={outsideFill:"inherit"===h.get("color")?b:null,inside:"outside"!==x};var w=f(h,"distance")||0,S=f(h,"align"),I=f(h,"rotate"),M=.5*Math.PI,C=1.5*Math.PI,T=z("tangential"===I?Math.PI/2-r:r),D=T>M&&!ca(T-M)&&T<C;"outside"===x?(m=i.r+w,S=D?"right":"left"):S&&"center"!==S?"left"===S?(m=i.r0+w,S=D?"right":"left"):"right"===S&&(m=i.r-w,S=D?"left":"right"):(m=o===2*Math.PI&&0===i.r0?0:(i.r+i.r0)/2,S="center"),g.style.align=S,g.style.verticalAlign=f(h,"verticalAlign")||"middle",g.x=m*l+i.cx,g.y=m*s+i.cy;var L=0;"radial"===I?L=z(-r)+(D?Math.PI:0):"tangential"===I?L=z(Math.PI/2-r)+(D?Math.PI:0):ce(I)&&(L=I*Math.PI/180),g.rotation=z(L)}),d.dirtyStyle()},e}(We),wc="sunburstRootToNode",Sc="sunburstHighlight";var Ic=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return nt(e,t),e.prototype.render=function(t,e,n,a){var i=this;this.seriesModel=t,this.api=n,this.ecModel=e;var o=t.getData(),r=o.tree.root,l=t.getViewRoot(),s=this.group,u=t.get("renderLabelForZeroData"),d=[];l.eachNode(function(t){d.push(t)});var c,h,p=this._oldChildren||[];!function(a,i){if(0===a.length&&0===i.length)return;function l(t){return t.getId()}function d(l,d){!function(a,i){u||!a||a.getValue()||(a=null);if(a!==r&&i!==r)if(i&&i.piece)a?(i.piece.updateData(!1,a,t,e,n),o.setItemGraphicEl(a.dataIndex,i.piece)):function(t){if(!t)return;t.piece&&(s.remove(t.piece),t.piece=null)}(i);else if(a){var l=new bc(a,t,e,n);s.add(l),o.setItemGraphicEl(a.dataIndex,l)}}(null==l?null:a[l],null==d?null:i[d])}new Ut(i,a,l,l).add(d).update(d).remove(_t(d,null)).execute()}(d,p),c=r,(h=l).depth>0?(i.virtualPiece?i.virtualPiece.updateData(!1,c,t,e,n):(i.virtualPiece=new bc(c,t,e,n),s.add(i.virtualPiece)),h.piece.off("click"),i.virtualPiece.on("click",function(t){i._rootToNode(h.parentNode)})):i.virtualPiece&&(s.remove(i.virtualPiece),i.virtualPiece=null),this._initEvents(),this._oldChildren=d},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",function(e){var n=!1;t.seriesModel.getViewRoot().eachNode(function(a){if(!n&&a.piece&&a.piece===e.target){var i=a.getModel().get("nodeClick");if("rootToNode"===i)t._rootToNode(a);else if("link"===i){var o=a.getModel(),r=o.get("link");if(r){var l=o.get("target",!0)||"_blank";$t(r,l)}}n=!0}})})},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:wc,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,e){var n=e.getData().getItemLayout(0);if(n){var a=t[0]-n.cx,i=t[1]-n.cy,o=Math.sqrt(a*a+i*i);return o<=n.r&&o>=n.r0}},e.type="sunburst",e}(st),Mc=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.ignoreStyleOnData=!0,n}return nt(e,t),e.prototype.getInitialData=function(t,e){var n={name:t.name,children:t.data};Cc(n);var a=this._levelModels=St(t.levels||[],function(t){return new Lt(t,this,e)},this),i=ml.createTree(n,this,function(t){t.wrapMethod("getItemModel",function(t,e){var n=i.getNodeByDataIndex(e),o=a[n.depth];return o&&(t.parentModel=o),t})});return i.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments),a=this.getData().tree.getNodeByDataIndex(e);return n.treePathInfo=wl(a,this),n},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 e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)},e.prototype.enableAriaDecal=function(){Dl(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}(Pt);function Cc(t){var e=0;G(t.children,function(t){Cc(t);var n=t.value;It(n)&&(n=n[0]),e+=n});var n=t.value;It(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=e),n<0&&(n=0),It(t.value)?t.value[0]=n:t.value=n}var Tc=Math.PI/180;function Dc(t,e,n){e.eachSeriesByType(t,function(t){var e=t.get("center"),a=t.get("radius");It(a)||(a=[0,a]),It(e)||(e=[e,e]);var i=n.getWidth(),o=n.getHeight(),r=Math.min(i,o),l=B(e[0],i),s=B(e[1],o),u=B(a[0],r/2),d=B(a[1],r/2),c=-t.get("startAngle")*Tc,h=t.get("minAngle")*Tc,p=t.getData().tree.root,f=t.getViewRoot(),g=f.depth,v=t.get("sort");null!=v&&Lc(f,v);var y=0;G(f.children,function(t){!isNaN(t.getValue())&&y++});var m=f.getValue(),x=Math.PI/(m||y)*2,_=f.depth>0,b=f.height-(_?-1:1),w=(d-u)/(b||1),S=t.get("clockwise"),I=t.get("stillShowZeroSum"),M=S?1:-1,C=function(e,n){if(e){var a=n;if(e!==p){var i=e.getValue(),o=0===m&&I?x:i*x;o<h&&(o=h),a=n+M*o;var d=e.depth-g-(_?-1:1),c=u+w*d,f=u+w*(d+1),v=t.getLevelModel(e);if(v){var y=v.get("r0",!0),b=v.get("r",!0),T=v.get("radius",!0);null!=T&&(y=T[0],b=T[1]),null!=y&&(c=B(y,r/2)),null!=b&&(f=B(b,r/2))}e.setLayout({angle:o,startAngle:n,endAngle:a,clockwise:S,cx:l,cy:s,r0:c,r:f})}if(e.children&&e.children.length){var D=0;G(e.children,function(t){D+=C(t,n+D)})}return a-n}};if(_){var T=u,D=u+w,L=2*Math.PI;p.setLayout({angle:L,startAngle:c,endAngle:c+L,clockwise:S,cx:l,cy:s,r0:T,r:D})}C(f,c)})}function Lc(t,e){var n=t.children||[];t.children=function(t,e){if(R(e)){var n=St(t,function(t,e){var n=t.getValue();return{params:{depth:t.depth,height:t.height,dataIndex:t.dataIndex,getValue:function(){return n}},index:e}});return n.sort(function(t,n){return e(t.params,n.params)}),St(n,function(e){return t[e.index]})}var a="asc"===e;return t.sort(function(t,e){var n=(t.getValue()-e.getValue())*(a?1:-1);return 0===n?(t.dataIndex-e.dataIndex)*(a?-1:1):n})}(n,e),n.length&&G(t.children,function(t){Lc(t,e)})}function Ac(t){var e={};t.eachSeriesByType("sunburst",function(t){var n=t.getData(),a=n.tree;a.eachNode(function(i){var o=i.getModel().getModel("itemStyle").getItemStyle();o.fill||(o.fill=function(t,n,a){if(0===t.depth)return ut.color.neutral50;for(var i=t;i&&i.depth>1;)i=i.parentNode;var o=n.getColorFromPalette(i.name||i.dataIndex+"",e);return t.depth>1&&Dt(o)&&(o=pa(o,(t.depth-1)/(a-1)*.5)),o}(i,t,a.root.height));var r=n.ensureUniqueItemVisual(i.dataIndex,"style");wt(r,o)})})}var Pc={color:"fill",borderColor:"stroke"},kc={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},Ec=k(),Nc=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return nt(e,t),e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(t,e){return ze(null,this)},e.prototype.getDataParams=function(e,n,a){var i=t.prototype.getDataParams.call(this,e,n);return a&&(i.info=Ec(a).info),i},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(Pt);function zc(t,e){return e=e||[0,0],St(["x","y"],function(n,a){var i=this.getAxis(n),o=e[a],r=t[a]/2;return"category"===i.type?i.getBandWidth():Math.abs(i.dataToCoord(o-r)-i.dataToCoord(o+r))},this)}function Rc(t,e){return e=e||[0,0],St([0,1],function(n){var a=e[n],i=t[n]/2,o=[],r=[];return o[n]=a-i,r[n]=a+i,o[1-n]=r[1-n]=e[1-n],Math.abs(this.dataToPoint(o)[n]-this.dataToPoint(r)[n])},this)}function Oc(t,e){var n=this.getAxis(),a=e instanceof Array?e[0]:e,i=(t instanceof Array?t[0]:t)/2;return"category"===n.type?n.getBandWidth():Math.abs(n.dataToCoord(a-i)-n.dataToCoord(a+i))}function Vc(t,e){return e=e||[0,0],St(["Radius","Angle"],function(n,a){var i=this["get"+n+"Axis"](),o=e[a],r=t[a]/2,l="category"===i.type?i.getBandWidth():Math.abs(i.dataToCoord(o-r)-i.dataToCoord(o+r));return"Angle"===n&&(l=l*Math.PI/180),l},this)}function Bc(t,e,n,a){return t&&(t.legacy||!1!==t.legacy&&!n&&!a&&"tspan"!==e&&("text"===e||fa(t,"text")))}function Gc(t,e,n){var a,i,o,r=t;if("text"===e)o=r;else{o={},fa(r,"text")&&(o.text=r.text),fa(r,"rich")&&(o.rich=r.rich),fa(r,"textFill")&&(o.fill=r.textFill),fa(r,"textStroke")&&(o.stroke=r.textStroke),fa(r,"fontFamily")&&(o.fontFamily=r.fontFamily),fa(r,"fontSize")&&(o.fontSize=r.fontSize),fa(r,"fontStyle")&&(o.fontStyle=r.fontStyle),fa(r,"fontWeight")&&(o.fontWeight=r.fontWeight),i={type:"text",style:o,silent:!0},a={};var l=fa(r,"textPosition");n?a.position=l?r.textPosition:"inside":l&&(a.position=r.textPosition),fa(r,"textPosition")&&(a.position=r.textPosition),fa(r,"textOffset")&&(a.offset=r.textOffset),fa(r,"textRotation")&&(a.rotation=r.textRotation),fa(r,"textDistance")&&(a.distance=r.textDistance)}return Wc(o,t),G(o.rich,function(t){Wc(t,t)}),{textConfig:a,textContent:i}}function Wc(t,e){e&&(e.font=e.textFont||e.font,fa(e,"textStrokeWidth")&&(t.lineWidth=e.textStrokeWidth),fa(e,"textAlign")&&(t.align=e.textAlign),fa(e,"textVerticalAlign")&&(t.verticalAlign=e.textVerticalAlign),fa(e,"textLineHeight")&&(t.lineHeight=e.textLineHeight),fa(e,"textWidth")&&(t.width=e.textWidth),fa(e,"textHeight")&&(t.height=e.textHeight),fa(e,"textBackgroundColor")&&(t.backgroundColor=e.textBackgroundColor),fa(e,"textPadding")&&(t.padding=e.textPadding),fa(e,"textBorderColor")&&(t.borderColor=e.textBorderColor),fa(e,"textBorderWidth")&&(t.borderWidth=e.textBorderWidth),fa(e,"textBorderRadius")&&(t.borderRadius=e.textBorderRadius),fa(e,"textBoxShadowColor")&&(t.shadowColor=e.textBoxShadowColor),fa(e,"textBoxShadowBlur")&&(t.shadowBlur=e.textBoxShadowBlur),fa(e,"textBoxShadowOffsetX")&&(t.shadowOffsetX=e.textBoxShadowOffsetX),fa(e,"textBoxShadowOffsetY")&&(t.shadowOffsetY=e.textBoxShadowOffsetY))}function Fc(t,e,n){var a=t;a.textPosition=a.textPosition||n.position||"inside",null!=n.offset&&(a.textOffset=n.offset),null!=n.rotation&&(a.textRotation=n.rotation),null!=n.distance&&(a.textDistance=n.distance);var i=a.textPosition.indexOf("inside")>=0,o=t.fill||ut.color.neutral99;jc(a,e);var r=null==a.textFill;return i?r&&(a.textFill=n.insideFill||ut.color.neutral00,!a.textStroke&&n.insideStroke&&(a.textStroke=n.insideStroke),!a.textStroke&&(a.textStroke=o),null==a.textStrokeWidth&&(a.textStrokeWidth=2)):(r&&(a.textFill=t.fill||n.outsideFill||ut.color.neutral00),!a.textStroke&&n.outsideStroke&&(a.textStroke=n.outsideStroke)),a.text=e.text,a.rich=e.rich,G(e.rich,function(t){jc(t,t)}),a}function jc(t,e){e&&(fa(e,"fill")&&(t.textFill=e.fill),fa(e,"stroke")&&(t.textStroke=e.fill),fa(e,"lineWidth")&&(t.textStrokeWidth=e.lineWidth),fa(e,"font")&&(t.font=e.font),fa(e,"fontStyle")&&(t.fontStyle=e.fontStyle),fa(e,"fontWeight")&&(t.fontWeight=e.fontWeight),fa(e,"fontSize")&&(t.fontSize=e.fontSize),fa(e,"fontFamily")&&(t.fontFamily=e.fontFamily),fa(e,"align")&&(t.textAlign=e.align),fa(e,"verticalAlign")&&(t.textVerticalAlign=e.verticalAlign),fa(e,"lineHeight")&&(t.textLineHeight=e.lineHeight),fa(e,"width")&&(t.textWidth=e.width),fa(e,"height")&&(t.textHeight=e.height),fa(e,"backgroundColor")&&(t.textBackgroundColor=e.backgroundColor),fa(e,"padding")&&(t.textPadding=e.padding),fa(e,"borderColor")&&(t.textBorderColor=e.borderColor),fa(e,"borderWidth")&&(t.textBorderWidth=e.borderWidth),fa(e,"borderRadius")&&(t.textBorderRadius=e.borderRadius),fa(e,"shadowColor")&&(t.textBoxShadowColor=e.shadowColor),fa(e,"shadowBlur")&&(t.textBoxShadowBlur=e.shadowBlur),fa(e,"shadowOffsetX")&&(t.textBoxShadowOffsetX=e.shadowOffsetX),fa(e,"shadowOffsetY")&&(t.textBoxShadowOffsetY=e.shadowOffsetY),fa(e,"textShadowColor")&&(t.textShadowColor=e.textShadowColor),fa(e,"textShadowBlur")&&(t.textShadowBlur=e.textShadowBlur),fa(e,"textShadowOffsetX")&&(t.textShadowOffsetX=e.textShadowOffsetX),fa(e,"textShadowOffsetY")&&(t.textShadowOffsetY=e.textShadowOffsetY))}var Yc={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},Uc=O(Yc);xa(va,function(t,e){return t[e]=1,t},{}),va.join(", ");var Xc=["","style","shape","extra"],Hc=k();function Zc(t,e,n,a,i){var o=t+"Animation",r=ga(t,a,i)||{},l=Hc(e).userDuring;return r.duration>0&&(r.during=l?Xt(eh,{el:e,userDuring:l}):null,r.setToFinal=!0,r.scope=t),wt(r,n[o]),r}function qc(t,e,n,a){var i=(a=a||{}).dataIndex,o=a.isInit,r=a.clearStyle,l=n.isAnimationEnabled(),s=Hc(t),u=e.style;s.userDuring=e.during;var d={},c={};if(function(t,e,n){for(var a=0;a<Uc.length;a++){var i=Uc[a],o=Yc[i],r=e[i];r&&(n[o[0]]=r[0],n[o[1]]=r[1])}for(a=0;a<va.length;a++){var l=va[a];null!=e[l]&&(n[l]=e[l])}}(0,e,c),"compound"===t.type)for(var h=t.shape.paths,p=e.shape.paths,f=0;f<p.length;f++){ah("shape",p[f],h[f])}else ah("shape",e,c),ah("extra",e,c);if(!o&&l&&(function(t,e,n){for(var a=e.transition,i=Qc(a)?va:Vt(a||[]),o=0;o<i.length;o++){var r=i[o];if("style"!==r&&"shape"!==r&&"extra"!==r){var l=t[r];n[r]=l}}}(t,e,d),nh("shape",t,e,d),nh("extra",t,e,d),function(t,e,n,a){if(!n)return;var i,o=t.style;if(o){var r=n.transition,l=e.transition;if(r&&!Qc(r)){var s=Vt(r);!i&&(i=a.style={});for(var u=0;u<s.length;u++){var d=o[f=s[u]];i[f]=d}}else if(t.getAnimationStyleProps&&(Qc(l)||Qc(r)||J(l,"style")>=0)){var c=t.getAnimationStyleProps(),h=c?c.style:null;if(h){!i&&(i=a.style={});var p=O(n);for(u=0;u<p.length;u++){var f;if(h[f=p[u]]){d=o[f];i[f]=d}}}}}}(t,e,u,d)),c.style=u,function(t,e,n){var a=e.style;if(!t.isGroup&&a){if(n){t.useStyle({});for(var i=t.animators,o=0;o<i.length;o++){var r=i[o];"style"===r.targetName&&r.changeTarget(t.style)}}t.setStyle(a)}e&&(e.style=null,e&&t.attr(e),e.style=a)}(t,c,r),function(t,e){fa(e,"silent")&&(t.silent=e.silent),fa(e,"ignore")&&(t.ignore=e.ignore),t instanceof ie&&fa(e,"invisible")&&(t.invisible=e.invisible);t instanceof xt&&fa(e,"autoBatch")&&(t.autoBatch=e.autoBatch)}(t,e),l)if(o){var g={};G(Xc,function(t){var n=t?e[t]:e;n&&n.enterFrom&&(t&&(g[t]=g[t]||{}),wt(t?g[t]:g,n.enterFrom))});var v=Zc("enter",t,e,n,i);v.duration>0&&t.animateFrom(g,v)}else!function(t,e,n,a,i){if(i){var o=Zc("update",t,e,a,n);o.duration>0&&t.animateFrom(i,o)}}(t,e,i||0,n,d);$c(t,e),u?t.dirty():t.markRedraw()}function $c(t,e){for(var n=Hc(t).leaveToProps,a=0;a<Xc.length;a++){var i=Xc[a],o=i?e[i]:e;o&&o.leaveTo&&(n||(n=Hc(t).leaveToProps={}),i&&(n[i]=n[i]||{}),wt(i?n[i]:n,o.leaveTo))}}function Kc(t,e,n,a){if(t){var i=t.parent,o=Hc(t).leaveToProps;if(o){var r=Zc("update",t,e,n,0);r.done=function(){i&&i.remove(t)},t.animateTo(o,r)}else i&&i.remove(t)}}function Qc(t){return"all"===t}var Jc={},th={setTransform:function(t,e){return Jc.el[t]=e,this},getTransform:function(t){return Jc.el[t]},setShape:function(t,e){var n=Jc.el;return(n.shape||(n.shape={}))[t]=e,n.dirtyShape&&n.dirtyShape(),this},getShape:function(t){var e=Jc.el.shape;if(e)return e[t]},setStyle:function(t,e){var n=Jc.el,a=n.style;return a&&(a[t]=e,n.dirtyStyle&&n.dirtyStyle()),this},getStyle:function(t){var e=Jc.el.style;if(e)return e[t]},setExtra:function(t,e){return(Jc.el.extra||(Jc.el.extra={}))[t]=e,this},getExtra:function(t){var e=Jc.el.extra;if(e)return e[t]}};function eh(){var t=this,e=t.el;if(e){var n=Hc(e).userDuring,a=t.userDuring;n===a?(Jc.el=e,a(th)):t.el=t.userDuring=null}}function nh(t,e,n,a){var i=n[t];if(i){var o,r=e[t];if(r){var l=n.transition,s=i.transition;if(s)if(!o&&(o=a[t]={}),Qc(s))wt(o,r);else for(var u=Vt(s),d=0;d<u.length;d++){var c=r[p=u[d]];o[p]=c}else if(Qc(l)||J(l,t)>=0){!o&&(o=a[t]={});var h=O(r);for(d=0;d<h.length;d++){var p;c=r[p=h[d]];ih(i[p],c)&&(o[p]=c)}}}}}function ah(t,e,n){var a=e[t];if(a)for(var i=n[t]={},o=O(a),r=0;r<o.length;r++){var l=o[r];i[l]=ya(a[l])}}function ih(t,e){return ma(t)?t!==e:null!=t&&isFinite(t)}var oh=k(),rh=["percent","easing","shape","style","extra"];function lh(t){t.stopAnimation("keyframe"),t.attr(oh(t))}function sh(t,e,n){if(n.isAnimationEnabled()&&e)if(It(e))G(e,function(e){sh(t,e,n)});else{var a=e.keyframes,i=e.duration;if(n&&null==i){var o=ga("enter",n,0);i=o&&o.duration}if(a&&i){var r=oh(t);G(Xc,function(n){var o;n&&!t[n]||(a.sort(function(t,e){return t.percent-e.percent}),G(a,function(a){var l=t.animators,s=n?a[n]:a;if(s){var u=O(s);if(n||(u=F(u,function(t){return J(rh,t)<0})),u.length){o||((o=t.animate(n,e.loop,!0)).scope="keyframe");for(var d=0;d<l.length;d++)l[d]!==o&&l[d].targetName===o.targetName&&l[d].stopTracks(u);n&&(r[n]=r[n]||{});var c=n?r[n]:r;G(u,function(e){c[e]=((n?t[n]:t)||{})[e]}),o.whenWithKeys(i*a.percent,s,u,a.easing)}}}),o&&o.delay(e.delay||0).duration(i).start(e.easing))})}}}var uh="emphasis",dh="normal",ch="blur",hh="select",ph=[dh,uh,ch,hh],fh={normal:["itemStyle"],emphasis:[uh,"itemStyle"],blur:[ch,"itemStyle"],select:[hh,"itemStyle"]},gh={normal:["label"],emphasis:[uh,"label"],blur:[ch,"label"],select:[hh,"label"]},vh=["x","y"],yh={normal:{},emphasis:{},blur:{},select:{}},mh={cartesian2d:function(t){var e=t.master.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(e){return t.dataToPoint(e)},size:Xt(zc,t)}}},geo:function(t){var e=t.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:t.getZoom()},api:{coord:function(e){return t.dataToPoint(e)},size:Xt(Rc,t)}}},single:function(t){var e=t.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(e){return t.dataToPoint(e)},size:Xt(Oc,t)}}},polar:function(t){var e=t.getRadiusAxis(),n=t.getAngleAxis(),a=e.getExtent();return a[0]>a[1]&&a.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:a[1],r0:a[0]},api:{coord:function(a){var i=e.dataToRadius(a[0]),o=n.dataToAngle(a[1]),r=t.coordToPoint([i,o]);return r.push(i,o*Math.PI/180),r},size:Xt(Vc,t)}}},calendar:function(t){var e=t.getRect(),n=t.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:t.getCellWidth(),cellHeight:t.getCellHeight(),rangeInfo:{start:n.start,end:n.end,weeks:n.weeks,dayCount:n.allDay}},api:{coord:function(e,n){return t.dataToPoint(e,n)},layout:function(e,n){return t.dataToLayout(e,n)}}}},matrix:function(t){var e=t.getRect();return{coordSys:{type:"matrix",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(e,n){return t.dataToPoint(e,n)},layout:function(e,n){return t.dataToLayout(e,n)}}}}};function xh(t){return t instanceof xt}function _h(t){return t instanceof ie}var bh=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return nt(e,t),e.prototype.render=function(t,e,n,a){this._progressiveEls=null;var i=this._data,o=t.getData(),r=this.group,l=Ch(t,o,e,n);i||r.removeAll(),o.diff(i).add(function(e){Dh(n,null,e,l(e,a),t,r,o)}).remove(function(e){var n=i.getItemGraphicEl(e);n&&Kc(n,Ec(n).option,t)}).update(function(e,s){var u=i.getItemGraphicEl(s);Dh(n,u,e,l(e,a),t,r,o)}).execute();var s=t.get("clip",!0)?qn(t.coordinateSystem,!1,t):null;s?r.setClipPath(s):r.removeClipPath(),this._data=o},e.prototype.incrementalPrepareRender=function(t,e,n){this.group.removeAll(),this._data=null},e.prototype.incrementalRender=function(t,e,n,a,i){var o=e.getData(),r=Ch(e,o,n,a),l=this._progressiveEls=[];function s(t){t.isGroup||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}for(var u=t.start;u<t.end;u++){var d=Dh(null,null,u,r(u,i),e,this.group,o);d&&(d.traverse(s),l.push(d))}},e.prototype.eachRendered=function(t){Qn(this._progressiveEls||this.group,t)},e.prototype.filterForExposedEvent=function(t,e,n,a){var i=e.element;if(null==i||n.name===i)return!0;for(;(n=n.__hostTarget||n.parent)&&n!==this.group;)if(n.name===i)return!0;return!1},e.type="custom",e}(st);function wh(t){var e,n=t.type;if("path"===n){var a=null!=(o=t.shape).width&&null!=o.height?{x:o.x||0,y:o.y||0,width:o.width,height:o.height}:null,i=Vh(o);e=Sa(i,null,a,o.layout||"center"),Ec(e).customPathData=i}else if("image"===n)e=new Qe({}),Ec(e).customImagePath=t.style.image;else if("text"===n)e=new Wt({});else if("group"===n)e=new at;else if("compoundPath"===n){var o;if(!(o=t.shape)||!o.paths)Vn("");var r=St(o.paths,function(t){if("path"===t.type)return Sa(t.shape.pathData,t,null);var e=Ia(t.type);if(!e){Vn("")}return new e});e=new Ma({shape:{paths:r}})}else{var l=Ia(n);if(!l)Vn("");e=new l}return Ec(e).customGraphicType=n,e.name=t.name,e.z2EmphasisLift=1,e.z2SelectLift=1,e}function Sh(t,e,n,a,i,o,r){lh(e);var l=i&&i.normal.cfg;l&&e.setTextConfig(l),a&&null==a.transition&&(a.transition=vh);var s=a&&a.style;if(s){if("text"===e.type){var u=s;fa(u,"textFill")&&(u.fill=u.textFill),fa(u,"textStroke")&&(u.stroke=u.textStroke)}var d=void 0,c=xh(e)?s.decal:null;t&&c&&(c.dirty=!0,d=ua(c,t)),s.__decalPattern=d}_h(e)&&(s&&(d=s.__decalPattern)&&(s.decal=d));qc(e,a,o,{dataIndex:n,isInit:r,clearStyle:!0}),sh(e,a.keyframeAnimation,o)}function Ih(t,e,n,a,i){var o=e.isGroup?null:e,r=i&&i[t].cfg;if(o){var l=o.ensureState(t);if(!1===a){var s=o.getState(t);s&&(s.style=null)}else l.style=a||null;r&&(l.textConfig=r),mt(o)}}function Mh(t,e,n){var a=n===dh,i=a?e:kh(e,n),o=i?i.z2:null;null!=o&&((a?t:t.ensureState(n)).z2=o||0)}function Ch(t,e,n,a){var i=t.get("renderItem");if("string"==typeof i){var o=Ca(i);o&&(i=o)}var r=t.coordinateSystem,l={};r&&(l=r.prepareCustoms?r.prepareCustoms(r):mh[r.type](r));for(var s,u,d=vt({getWidth:a.getWidth,getHeight:a.getHeight,getZr:a.getZr,getDevicePixelRatio:a.getDevicePixelRatio,value:function(t,n){return null==n&&(n=s),e.getStore().get(e.getDimensionIndex(t||0),n)},style:function(n,a){null==a&&(a=s);var i=e.getItemVisual(a,"style"),o=i&&i.fill,r=i&&i.opacity,l=x(a,dh).getItemStyle();null!=o&&(l.fill=o),null!=r&&(l.opacity=r);var u={inheritColor:Dt(o)?o:ut.color.neutral99},d=_(a,dh),c=jt(d,null,u,!1,!0);c.text=d.getShallow("show")?K(t.getFormattedLabel(a,dh),ta(e,a)):null;var h=_a(d,u,!1);return w(n,l),l=Fc(l,c,h),n&&b(l,n),l.legacy=!0,l},ordinalRawValue:function(t,n){null==n&&(n=s),t=t||0;var a=e.getDimensionInfo(t);if(!a){var i=e.getDimensionIndex(t);return i>=0?e.getStore().get(i,n):void 0}var o=e.get(a.name,n),r=a&&a.ordinalMeta;return r?r.categories[o]:o},styleEmphasis:function(n,a){null==a&&(a=s);var i=x(a,uh).getItemStyle(),o=_(a,uh),r=jt(o,null,null,!0,!0);r.text=o.getShallow("show")?he(t.getFormattedLabel(a,uh),t.getFormattedLabel(a,dh),ta(e,a)):null;var l=_a(o,null,!0);return w(n,i),i=Fc(i,r,l),n&&b(i,n),i.legacy=!0,i},visual:function(t,n){if(null==n&&(n=s),fa(Pc,t)){var a=e.getItemVisual(n,"style");return a?a[Pc[t]]:null}if(fa(kc,t))return e.getItemVisual(n,t)},barLayout:function(t){if("cartesian2d"===r.type){var e=r.getBaseAxis();return ba(vt({axis:e},t))}},currentSeriesIndices:function(){return n.getCurrentSeriesIndices()},font:function(t){return wa(t,n)}},l.api||{}),c={context:{},seriesId:t.id,seriesName:t.name,seriesIndex:t.seriesIndex,coordSys:l.coordSys,dataInsideLength:e.count(),encode:Th(t.getData()),itemPayload:t.get("itemPayload")||{}},h={},p={},f={},g={},v=0;v<ph.length;v++){var y=ph[v];f[y]=t.getModel(fh[y]),g[y]=t.getModel(gh[y])}function m(t){return t===s?u||(u=e.getItemModel(t)):e.getItemModel(t)}function x(t,n){return e.hasItemOption?t===s?h[n]||(h[n]=m(t).getModel(fh[n])):m(t).getModel(fh[n]):f[n]}function _(t,n){return e.hasItemOption?t===s?p[n]||(p[n]=m(t).getModel(gh[n])):m(t).getModel(gh[n]):g[n]}return function(t,n){return s=t,u=null,h={},p={},i&&i(vt({dataIndexInside:t,dataIndex:e.getRawIndex(t),actionType:n?n.type:null},c),d)};function b(t,e){for(var n in e)fa(e,n)&&(t[n]=e[n])}function w(t,e){t&&(t.textFill&&(e.textFill=t.textFill),t.textPosition&&(e.textPosition=t.textPosition))}}function Th(t){var e={};return G(t.dimensions,function(n){var a=t.getDimensionInfo(n);if(!a.isExtraCoord){var i=a.coordDim;(e[i]=e[i]||[])[a.coordDimIndex]=t.getDimensionIndex(n)}}),e}function Dh(t,e,n,a,i,o,r){if(a){var l=Lh(t,e,n,a,i,o);return l&&r.setItemGraphicEl(n,l),l&&Yt(l,a.focus,a.blurScope,a.emphasisDisabled),l}o.remove(e)}function Lh(t,e,n,a,i,o){var r=-1,l=e;e&&Ah(e,a,i)&&(r=J(o.childrenRef(),e),e=null);var s,u,d=!e,c=e;c?c.clearStates():(c=wh(a),l&&(s=l,(u=c).copyTransform(s),_h(u)&&_h(s)&&(u.setStyle(s.style),u.z=s.z,u.z2=s.z2,u.zlevel=s.zlevel,u.invisible=s.invisible,u.ignore=s.ignore,xh(u)&&xh(s)&&u.setShape(s.shape)))),!1===a.morph?c.disableMorphing=!0:c.disableMorphing&&(c.disableMorphing=!1),a.tooltipDisabled&&(c.tooltipDisabled=!0),yh.normal.cfg=yh.normal.conOpt=yh.emphasis.cfg=yh.emphasis.conOpt=yh.blur.cfg=yh.blur.conOpt=yh.select.cfg=yh.select.conOpt=null,yh.isLegacy=!1,function(t,e,n,a,i,o){if(t.isGroup||"compoundPath"===t.type)return;Ph(n,null,o),Ph(n,uh,o);var r=o.normal.conOpt,l=o.emphasis.conOpt,s=o.blur.conOpt,u=o.select.conOpt;if(null!=r||null!=l||null!=u||null!=s){var d=t.getTextContent();if(!1===r)d&&t.removeTextContent();else{r=o.normal.conOpt=r||{type:"text"},d?d.clearStates():(d=wh(r),t.setTextContent(d)),Sh(null,d,e,r,null,a,i);for(var c=r&&r.style,h=0;h<ph.length;h++){var p=ph[h];if(p!==dh){var f=o[p].conOpt;Ih(p,d,0,Eh(r,f,p),null)}}c?d.dirty():d.markRedraw()}}}(c,n,a,i,d,yh),function(t,e,n,a,i){var o=n.clipPath;if(!1===o)t&&t.getClipPath()&&t.removeClipPath();else if(o){var r=t.getClipPath();r&&Ah(r,o,a)&&(r=null),r||(r=wh(o),t.setClipPath(r)),Sh(null,r,e,o,null,a,i)}}(c,n,a,i,d),Sh(t,c,n,a,yh,i,d),fa(a,"info")&&(Ec(c).info=a.info);for(var h=0;h<ph.length;h++){var p=ph[h];if(p!==dh){var f=kh(a,p);Ih(p,c,0,Eh(a,f,p),yh)}}return function(t,e,n){if(!t.isGroup){var a=t,i=n.currentZ,o=n.currentZLevel;a.z=i,a.zlevel=o;var r=e.z2;null!=r&&(a.z2=r||0);for(var l=0;l<ph.length;l++)Mh(a,e,ph[l])}}(c,a,i),"group"===a.type&&function(t,e,n,a,i){var o=a.children,r=o?o.length:0,l=a.$mergeChildren,s="byName"===l||a.diffChildrenByName,u=!1===l;if(!r&&!s&&!u)return;if(s)return d={api:t,oldChildren:e.children()||[],newChildren:o||[],dataIndex:n,seriesModel:i,group:e},void new Ut(d.oldChildren,d.newChildren,zh,zh,d).add(Rh).update(Rh).remove(Oh).execute();var d;u&&e.removeAll();for(var c=0;c<r;c++){var h=o[c],p=e.childAt(c);h?(null==h.ignore&&(h.ignore=!1),Lh(t,p,n,h,i,e)):p.ignore=!0}for(var f=e.childCount()-1;f>=c;f--){var g=e.childAt(f);Nh(e,g,i)}}(t,c,n,a,i),r>=0?o.replaceAt(c,r):o.add(c),c}function Ah(t,e,n){var a,i=Ec(t),o=e.type,r=e.shape,l=e.style;return n.isUniversalTransitionEnabled()||null!=o&&o!==i.customGraphicType||"path"===o&&((a=r)&&(fa(a,"pathData")||fa(a,"d")))&&Vh(r)!==i.customPathData||"image"===o&&fa(l,"image")&&l.image!==i.customImagePath}function Ph(t,e,n){var a=e?kh(t,e):t,i=e?Eh(t,a,uh):t.style,o=t.type,r=a?a.textConfig:null,l=t.textContent,s=l?e?kh(l,e):l:null;if(i&&(n.isLegacy||Bc(i,o,!!r,!!s))){n.isLegacy=!0;var u=Gc(i,o,!e);!r&&u.textConfig&&(r=u.textConfig),!s&&u.textContent&&(s=u.textContent)}if(!e&&s){var d=s;!d.type&&(d.type="text")}var c=e?n[e]:n.normal;c.cfg=r,c.conOpt=s}function kh(t,e){return e?t?t[e]:null:t}function Eh(t,e,n){var a=e&&e.style;return null==a&&n===uh&&t&&(a=t.styleEmphasis),a}function Nh(t,e,n){e&&Kc(e,Ec(t).option,n)}function zh(t,e){var n=t&&t.name;return null!=n?n:"e\0\0"+e}function Rh(t,e){var n=this.context,a=null!=t?n.newChildren[t]:null,i=null!=e?n.oldChildren[e]:null;Lh(n.api,i,n.dataIndex,a,n.seriesModel,n.group)}function Oh(t){var e=this.context,n=e.oldChildren[t];n&&Kc(n,Ec(n).option,e.seriesModel)}function Vh(t){return t&&(t.pathData||t.d)}var Bh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return nt(e,t),e.prototype.makeElOption=function(t,e,n,a,i){var o=n.axis;"angle"===o.dim&&(this.animationThreshold=Math.PI/18);var r=o.polar,l=r.getOtherAxis(o).getExtent(),s=o.dataToCoord(e),u=a.get("type");if(u&&"none"!==u){var d=Ta(a),c=Gh[u](o,r,s,l);c.style=d,t.graphicKey=c.type,t.pointer=c}var h=function(t,e,n,a,i){var o=e.axis,r=o.dataToCoord(t),l=a.getAngleAxis().getExtent()[0];l=l/180*Math.PI;var s,u,d,c=a.getRadiusAxis().getExtent();if("radius"===o.dim){var h=Zt();yn(h,h,l),Ht(h,h,[a.cx,a.cy]),s=mn([r,-i],h);var p=e.getModel("axisLabel").get("rotate")||0,f=In.innerTextLayout(l,p*Math.PI/180,-1);u=f.textAlign,d=f.textVerticalAlign}else{var g=c[1];s=a.coordToPoint([g+i,r]);var v=a.cx,y=a.cy;u=Math.abs(s[0]-v)/g<.3?"center":s[0]>v?"left":"right",d=Math.abs(s[1]-y)/g<.3?"middle":s[1]>y?"top":"bottom"}return{position:s,align:u,verticalAlign:d}}(e,n,0,r,a.get(["label","margin"]));Da(t,n,a,i,h)},e}(La);var Gh={line:function(t,e,n,a){return"angle"===t.dim?{type:"Line",shape:Pa(e.coordToPoint([a[0],n]),e.coordToPoint([a[1],n]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:n}}},shadow:function(t,e,n,a){var i=Math.max(1,t.getBandWidth()),o=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:Aa(e.cx,e.cy,a[0],a[1],(-n-i/2)*o,(i/2-n)*o)}:{type:"Sector",shape:Aa(e.cx,e.cy,n-i/2,n+i/2,0,2*Math.PI)}}},Wh=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return nt(e,t),e.prototype.findAxisModel=function(t){var e;return this.ecModel.eachComponent(t,function(t){t.getCoordSysModel()===this&&(e=t)},this),e},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e}(pn),Fh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return nt(e,t),e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",_n).models[0]},e.type="polarAxis",e}(pn);Ne(Fh,wn);var jh=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return nt(e,t),e.type="angleAxis",e}(Fh),Yh=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return nt(e,t),e.type="radiusAxis",e}(Fh),Uh=function(t){function e(e,n){return t.call(this,"radius",e,n)||this}return nt(e,t),e.prototype.pointToData=function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},e}(fn);Uh.prototype.dataToRadius=fn.prototype.dataToCoord,Uh.prototype.radiusToData=fn.prototype.coordToData;var Xh=k(),Hh=function(t){function e(e,n){return t.call(this,"angle",e,n||[0,360])||this}return nt(e,t),e.prototype.pointToData=function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},e.prototype.calculateCategoryInterval=function(){var t=this,e=t.getLabelModel(),n=t.scale,a=n.getExtent(),i=n.count();if(a[1]-a[0]<1)return 0;var o=a[0],r=t.dataToCoord(o+1)-t.dataToCoord(o),l=Math.abs(r),s=ka(null==o?"":o+"",e.getFont(),"center","top"),u=Math.max(s.height,7)/l;isNaN(u)&&(u=1/0);var d=Math.max(0,Math.floor(u)),c=Xh(t.model),h=c.lastAutoInterval,p=c.lastTickCount;return null!=h&&null!=p&&Math.abs(h-d)<=1&&Math.abs(p-i)<=1&&h>d?d=h:(c.lastTickCount=i,c.lastAutoInterval=d),d},e}(fn);Hh.prototype.dataToAngle=fn.prototype.dataToCoord,Hh.prototype.angleToData=fn.prototype.coordToData;var Zh=["radius","angle"],qh=function(){function t(t){this.dimensions=Zh,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new Uh,this._angleAxis=new Hh,this.axisPointerEnabled=!0,this.name=t||"",this._radiusAxis.polar=this._angleAxis.polar=this}return t.prototype.containPoint=function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},t.prototype.containData=function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},t.prototype.getAxis=function(t){return this["_"+t+"Axis"]},t.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},t.prototype.getAxesByScale=function(t){var e=[],n=this._angleAxis,a=this._radiusAxis;return n.scale.type===t&&e.push(n),a.scale.type===t&&e.push(a),e},t.prototype.getAngleAxis=function(){return this._angleAxis},t.prototype.getRadiusAxis=function(){return this._radiusAxis},t.prototype.getOtherAxis=function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},t.prototype.getTooltipAxes=function(t){var e=null!=t&&"auto"!==t?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},t.prototype.dataToPoint=function(t,e,n){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)],n)},t.prototype.pointToData=function(t,e,n){n=n||[];var a=this.pointToCoord(t);return n[0]=this._radiusAxis.radiusToData(a[0],e),n[1]=this._angleAxis.angleToData(a[1],e),n},t.prototype.pointToCoord=function(t){var e=t[0]-this.cx,n=t[1]-this.cy,a=this.getAngleAxis(),i=a.getExtent(),o=Math.min(i[0],i[1]),r=Math.max(i[0],i[1]);a.inverse?o=r-360:r=o+360;var l=Math.sqrt(e*e+n*n);e/=l,n/=l;for(var s=Math.atan2(-n,e)/Math.PI*180,u=s<o?1:-1;s<o||s>r;)s+=360*u;return[l,s]},t.prototype.coordToPoint=function(t,e){e=e||[];var n=t[0],a=t[1]/180*Math.PI;return e[0]=Math.cos(a)*n+this.cx,e[1]=-Math.sin(a)*n+this.cy,e},t.prototype.getArea=function(){var t=this.getAngleAxis(),e=this.getRadiusAxis().getExtent().slice();e[0]>e[1]&&e.reverse();var n=t.getExtent(),a=Math.PI/180,i=1e-4;return{cx:this.cx,cy:this.cy,r0:e[0],r:e[1],startAngle:-n[0]*a,endAngle:-n[1]*a,clockwise:t.inverse,contain:function(t,e){var n=t-this.cx,a=e-this.cy,o=n*n+a*a,r=this.r,l=this.r0;return r!==l&&o-i<=r*r&&o+i>=l*l},x:this.cx-e[1],y:this.cy-e[1],width:2*e[1],height:2*e[1]}},t.prototype.convertToPixel=function(t,e,n){return $h(e)===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(t,e,n){return $h(e)===this?this.pointToData(n):null},t}();function $h(t){var e=t.seriesModel,n=t.polarModel;return n&&n.coordinateSystem||e&&e.coordinateSystem}function Kh(t,e){var n=this,a=n.getAngleAxis(),i=n.getRadiusAxis();if(a.scale.setExtent(1/0,-1/0),i.scale.setExtent(1/0,-1/0),t.eachSeries(function(t){if(t.coordinateSystem===n){var e=t.getData();G(Ea(e,"radius"),function(t){i.scale.unionExtentFromData(e,t)}),G(Ea(e,"angle"),function(t){a.scale.unionExtentFromData(e,t)})}}),vn(a.scale,a.model),vn(i.scale,i.model),"category"===a.type&&!a.onBand){var o=a.getExtent(),r=360/a.scale.count();a.inverse?o[1]+=r:o[1]-=r,a.setExtent(o[0],o[1])}}function Qh(t,e){var n;if(t.type=e.get("type"),t.scale=gn(e),t.onBand=e.get("boundaryGap")&&"category"===t.type,t.inverse=e.get("inverse"),function(t){return"angleAxis"===t.mainType}(e)){t.inverse=t.inverse!==e.get("clockwise");var a=e.get("startAngle"),i=null!==(n=e.get("endAngle"))&&void 0!==n?n:a+(t.inverse?-360:360);t.setExtent(a,i)}e.axis=t,t.model=e}var Jh={dimensions:Zh,create:function(t,e){var n=[];return t.eachComponent("polar",function(t,a){var i=new qh(a+"");i.update=Kh;var o=i.getRadiusAxis(),r=i.getAngleAxis(),l=t.findAxisModel("radiusAxis"),s=t.findAxisModel("angleAxis");Qh(o,l),Qh(r,s),function(t,e,n){var a=e.get("center"),i=kt(e,n).refContainer;t.cx=B(a[0],i.width)+i.x,t.cy=B(a[1],i.height)+i.y;var o=t.getRadiusAxis(),r=Math.min(i.width,i.height)/2,l=e.get("radius");null==l?l=[0,"100%"]:It(l)||(l=[0,l]);var s=[B(l[0],r),B(l[1],r)];o.inverse?o.setExtent(s[1],s[0]):o.setExtent(s[0],s[1])}(i,t,e),n.push(i),t.coordinateSystem=i,i.model=t}),t.eachSeries(function(t){if("polar"===t.get("coordinateSystem")){var e=t.getReferringComponents("polar",_n).models[0];t.coordinateSystem=e.coordinateSystem}}),n}},tp=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function ep(t,e,n){e[1]>e[0]&&(e=e.slice().reverse());var a=t.coordToPoint([e[0],n]),i=t.coordToPoint([e[1],n]);return{x1:a[0],y1:a[1],x2:i[0],y2:i[1]}}function np(t){return t.getRadiusAxis().inverse?0:1}function ap(t){var e=t[0],n=t[t.length-1];e&&n&&Math.abs(Math.abs(e.coord-n.coord)-360)<1e-4&&t.pop()}var ip=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.axisPointerClass="PolarAxisPointer",n}return nt(e,t),e.prototype.render=function(t,e){if(this.group.removeAll(),t.get("show")){var n=t.axis,a=n.polar,i=a.getRadiusAxis().getExtent(),o=n.getTicksCoords({breakTicks:"none"}),r=n.getMinorTicksCoords(),l=St(n.getViewLabels(),function(t){t=ke(t);var e=n.scale,a="ordinal"===e.type?e.getRawOrdinalNumber(t.tickValue):t.tickValue;return t.coord=n.dataToCoord(a),t});ap(l),ap(o),G(tp,function(e){!t.get([e,"show"])||n.scale.isBlank()&&"axisLine"!==e||op[e](this.group,t,a,o,r,i,l)},this)}},e.type="angleAxis",e}(Na),op={axisLine:function(t,e,n,a,i,o){var r,l=e.getModel(["axisLine","lineStyle"]),s=n.getAngleAxis(),u=Math.PI/180,d=s.getExtent(),c=np(n),h=c?0:1,p=360===Math.abs(d[1]-d[0])?"Circle":"Arc";(r=0===o[h]?new zn[p]({shape:{cx:n.cx,cy:n.cy,r:o[c],startAngle:-d[0]*u,endAngle:-d[1]*u,clockwise:s.inverse},style:l.getLineStyle(),z2:1,silent:!0}):new Oa({shape:{cx:n.cx,cy:n.cy,r:o[c],r0:o[h]},style:l.getLineStyle(),z2:1,silent:!0})).style.fill=null,t.add(r)},axisTick:function(t,e,n,a,i,o){var r=e.getModel("axisTick"),l=(r.get("inside")?-1:1)*r.get("length"),s=o[np(n)],u=St(a,function(t){return new qe({shape:ep(n,[s,s+l],t.coord)})});t.add(za(u,{style:vt(r.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(t,e,n,a,i,o){if(i.length){for(var r=e.getModel("axisTick"),l=e.getModel("minorTick"),s=(r.get("inside")?-1:1)*l.get("length"),u=o[np(n)],d=[],c=0;c<i.length;c++)for(var h=0;h<i[c].length;h++)d.push(new qe({shape:ep(n,[u,u+s],i[c][h].coord)}));t.add(za(d,{style:vt(l.getModel("lineStyle").getLineStyle(),vt(r.getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])}))}))}},axisLabel:function(t,e,n,a,i,o,r){var l=e.getCategories(!0),s=e.getModel("axisLabel"),u=s.get("margin"),d=e.get("triggerEvent");G(r,function(a,i){var r=s,c=a.tickValue,h=o[np(n)],p=n.coordToPoint([h+u,a.coord]),f=n.cx,g=n.cy,v=Math.abs(p[0]-f)/h<.3?"center":p[0]>f?"left":"right",y=Math.abs(p[1]-g)/h<.3?"middle":p[1]>g?"top":"bottom";if(l&&l[c]){var m=l[c];sn(m)&&m.textStyle&&(r=new Lt(m.textStyle,s,s.ecModel))}var x=new Wt({silent:In.isLabelSilent(e),style:jt(r,{x:p[0],y:p[1],fill:r.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:a.formattedLabel,align:v,verticalAlign:y})});if(t.add(x),Ra({el:x,componentModel:e,itemName:a.formattedLabel,formatterParamsExtra:{isTruncated:function(){return x.isTruncated},value:a.rawLabel,tickIndex:i}}),d){var _=In.makeAxisEventDataBase(e);_.targetType="axisLabel",_.value=a.rawLabel,V(x).eventData=_}},this)},splitLine:function(t,e,n,a,i,o){var r=e.getModel("splitLine").getModel("lineStyle"),l=r.get("color"),s=0;l=l instanceof Array?l:[l];for(var u=[],d=0;d<a.length;d++){var c=s++%l.length;u[c]=u[c]||[],u[c].push(new qe({shape:ep(n,o,a[d].coord)}))}for(d=0;d<u.length;d++)t.add(za(u[d],{style:vt({stroke:l[d%l.length]},r.getLineStyle()),silent:!0,z:e.get("z")}))},minorSplitLine:function(t,e,n,a,i,o){if(i.length){for(var r=e.getModel("minorSplitLine").getModel("lineStyle"),l=[],s=0;s<i.length;s++)for(var u=0;u<i[s].length;u++)l.push(new qe({shape:ep(n,o,i[s][u].coord)}));t.add(za(l,{style:r.getLineStyle(),silent:!0,z:e.get("z")}))}},splitArea:function(t,e,n,a,i,o){if(a.length){var r=e.getModel("splitArea").getModel("areaStyle"),l=r.get("color"),s=0;l=l instanceof Array?l:[l];for(var u=[],d=Math.PI/180,c=-a[0].coord*d,h=Math.min(o[0],o[1]),p=Math.max(o[0],o[1]),f=e.get("clockwise"),g=1,v=a.length;g<=v;g++){var y=g===v?a[0].coord:a[g].coord,m=s++%l.length;u[m]=u[m]||[],u[m].push(new We({shape:{cx:n.cx,cy:n.cy,r0:h,r:p,startAngle:c,endAngle:-y*d,clockwise:f},silent:!0})),c=-y*d}for(g=0;g<u.length;g++)t.add(za(u[g],{style:vt({fill:l[g%l.length]},r.getAreaStyle()),silent:!0}))}}},rp=["splitLine","splitArea","minorSplitLine"],lp=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.axisPointerClass="PolarAxisPointer",n}return nt(e,t),e.prototype.render=function(t,e,n){if(this.group.removeAll(),t.get("show")){var a=this._axisGroup,i=this._axisGroup=new at;this.group.add(i);var o=t.axis,r=o.polar,l=r.getAngleAxis(),s=o.getTicksCoords(),u=o.getMinorTicksCoords(),d=l.getExtent()[0],c=o.getExtent(),h=function(t,e,n){return{position:[t.cx,t.cy],rotation:n/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:e.getModel("axisLabel").get("rotate"),z2:1}}(r,t,d),p=new In(t,n,h);p.build(),i.add(p.group),Mn(a,i,t),G(rp,function(e){t.get([e,"show"])&&!o.scale.isBlank()&&sp[e](this.group,t,r,d,c,s,u)},this)}},e.type="radiusAxis",e}(Na),sp={splitLine:function(t,e,n,a,i,o){var r=e.getModel("splitLine").getModel("lineStyle"),l=r.get("color"),s=0,u=n.getAngleAxis(),d=Math.PI/180,c=u.getExtent(),h=360===Math.abs(c[1]-c[0])?"Circle":"Arc";l=l instanceof Array?l:[l];for(var p=[],f=0;f<o.length;f++){var g=s++%l.length;p[g]=p[g]||[],p[g].push(new zn[h]({shape:{cx:n.cx,cy:n.cy,r:Math.max(o[f].coord,0),startAngle:-c[0]*d,endAngle:-c[1]*d,clockwise:u.inverse}}))}for(f=0;f<p.length;f++)t.add(za(p[f],{style:vt({stroke:l[f%l.length],fill:null},r.getLineStyle()),silent:!0}))},minorSplitLine:function(t,e,n,a,i,o,r){if(r.length){for(var l=e.getModel("minorSplitLine").getModel("lineStyle"),s=[],u=0;u<r.length;u++)for(var d=0;d<r[u].length;d++)s.push(new ea({shape:{cx:n.cx,cy:n.cy,r:r[u][d].coord}}));t.add(za(s,{style:vt({fill:null},l.getLineStyle()),silent:!0}))}},splitArea:function(t,e,n,a,i,o){if(o.length){var r=e.getModel("splitArea").getModel("areaStyle"),l=r.get("color"),s=0;l=l instanceof Array?l:[l];for(var u=[],d=o[0].coord,c=1;c<o.length;c++){var h=s++%l.length;u[h]=u[h]||[],u[h].push(new We({shape:{cx:n.cx,cy:n.cy,r0:d,r:o[c].coord,startAngle:0,endAngle:2*Math.PI},silent:!0})),d=o[c].coord}for(c=0;c<u.length;c++)t.add(za(u[c],{style:vt({fill:l[c%l.length]},r.getAreaStyle()),silent:!0}))}}};function up(t){return t.get("stack")||"__ec_stack_"+t.seriesIndex}function dp(t,e){return e.dim+t.model.componentIndex}function cp(t,e,n){var a={},i=function(t){var e={};G(t,function(t,n){var a=t.getData(),i=t.coordinateSystem,o=i.getBaseAxis(),r=dp(i,o),l=o.getExtent(),s="category"===o.type?o.getBandWidth():Math.abs(l[1]-l[0])/a.count(),u=e[r]||{bandWidth:s,remainedWidth:s,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},d=u.stacks;e[r]=u;var c=up(t);d[c]||u.autoWidthCount++,d[c]=d[c]||{width:0,maxWidth:0};var h=B(t.get("barWidth"),s),p=B(t.get("barMaxWidth"),s),f=t.get("barGap"),g=t.get("barCategoryGap");h&&!d[c].width&&(h=Math.min(u.remainedWidth,h),d[c].width=h,u.remainedWidth-=h),p&&(d[c].maxWidth=p),null!=f&&(u.gap=f),null!=g&&(u.categoryGap=g)});var n={};return G(e,function(t,e){n[e]={};var a=t.stacks,i=t.bandWidth,o=B(t.categoryGap,i),r=B(t.gap,1),l=t.remainedWidth,s=t.autoWidthCount,u=(l-o)/(s+(s-1)*r);u=Math.max(u,0),G(a,function(t,e){var n=t.maxWidth;n&&n<u&&(n=Math.min(n,l),t.width&&(n=Math.min(n,t.width)),l-=n,t.width=n,s--)}),u=(l-o)/(s+(s-1)*r),u=Math.max(u,0);var d,c=0;G(a,function(t,e){t.width||(t.width=u),d=t,c+=t.width*(1+r)}),d&&(c-=d.width*r);var h=-c/2;G(a,function(t,a){n[e][a]=n[e][a]||{offset:h,width:t.width},h+=t.width*(1+r)})}),n}(F(e.getSeriesByType(t),function(t){return!e.isSeriesFiltered(t)&&t.coordinateSystem&&"polar"===t.coordinateSystem.type}));e.eachSeriesByType(t,function(t){if("polar"===t.coordinateSystem.type){var e=t.getData(),n=t.coordinateSystem,o=n.getBaseAxis(),r=dp(n,o),l=up(t),s=i[r][l],u=s.offset,d=s.width,c=n.getOtherAxis(o),h=t.coordinateSystem.cx,p=t.coordinateSystem.cy,f=t.get("barMinHeight")||0,g=t.get("barMinAngle")||0;a[l]=a[l]||[];for(var v=e.mapDimension(c.dim),y=e.mapDimension(o.dim),m=Va(e,v),x="radius"!==o.dim||!t.get("roundCap",!0),_=c.model.get("startValue"),b=c.dataToCoord(_||0),w=0,S=e.count();w<S;w++){var I=e.get(v,w),M=e.get(y,w),C=I>=0?"p":"n",T=b;m&&(a[l][M]||(a[l][M]={p:b,n:b}),T=a[l][M][C]);var D=void 0,L=void 0,A=void 0,P=void 0;if("radius"===c.dim){var k=c.dataToCoord(I)-b,E=o.dataToCoord(M);Math.abs(k)<f&&(k=(k<0?-1:1)*f),D=T,L=T+k,P=(A=E-u)-d,m&&(a[l][M][C]=L)}else{var N=c.dataToCoord(I,x)-b,z=o.dataToCoord(M);Math.abs(N)<g&&(N=(N<0?-1:1)*g),L=(D=z+u)+d,A=T,P=T+N,m&&(a[l][M][C]=P)}e.setItemLayout(w,{cx:h,cy:p,r0:D,r:L,startAngle:-A*Math.PI/180,endAngle:-P*Math.PI/180,clockwise:A>=P})}}})}var hp={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},pp={splitNumber:5},fp=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return nt(e,t),e.type="polar",e}(hn);function gp(t,e){e=e||{};var n=t.coordinateSystem,a=t.axis,i={},o=a.position,r=a.orient,l=n.getRect(),s=[l.x,l.x+l.width,l.y,l.y+l.height],u={horizontal:{top:s[2],bottom:s[3]},vertical:{left:s[0],right:s[1]}};i.position=["vertical"===r?u.vertical[o]:s[0],"horizontal"===r?u.horizontal[o]:s[3]];i.rotation=Math.PI/2*{horizontal:0,vertical:1}[r];i.labelDirection=i.tickDirection=i.nameDirection={top:-1,bottom:1,right:1,left:-1}[o],t.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),ue(e.labelInside,t.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var d=t.get(["axisLabel","rotate"]);return i.labelRotate="top"===o?-d:d,i.z2=1,i}var vp=["splitArea","splitLine","breakArea"],yp=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.axisPointerClass="SingleAxisPointer",n}return nt(e,t),e.prototype.render=function(e,n,a,i){var o=this.group;o.removeAll();var r=this._axisGroup;this._axisGroup=new at;var l=gp(e),s=new In(e,a,l);s.build(),o.add(this._axisGroup),o.add(s.group),G(vp,function(t){e.get([t,"show"])&&mp[t](this,this.group,this._axisGroup,e,a)},this),Mn(r,this._axisGroup,e),t.prototype.render.call(this,e,n,a,i)},e.prototype.remove=function(){Ga(this)},e.type="singleAxis",e}(Na),mp={splitLine:function(t,e,n,a,i){var o=a.axis;if(!o.scale.isBlank()){var r=a.getModel("splitLine"),l=r.getModel("lineStyle"),s=l.get("color");s=s instanceof Array?s:[s];for(var u=l.get("width"),d=a.coordinateSystem.getRect(),c=o.isHorizontal(),h=[],p=0,f=o.getTicksCoords({tickModel:r,breakTicks:"none",pruneByBreak:"preserve_extent_bound"}),g=[],v=[],y=0;y<f.length;++y){var m=o.toGlobalCoord(f[y].coord);c?(g[0]=m,g[1]=d.y,v[0]=m,v[1]=d.y+d.height):(g[0]=d.x,g[1]=m,v[0]=d.x+d.width,v[1]=m);var x=new qe({shape:{x1:g[0],y1:g[1],x2:v[0],y2:v[1]},silent:!0});ja(x.shape,u);var _=p++%s.length;h[_]=h[_]||[],h[_].push(x)}var b=l.getLineStyle(["color"]);for(y=0;y<h.length;++y)e.add(za(h[y],{style:vt({stroke:s[y%s.length]},b),silent:!0}))}},splitArea:function(t,e,n,a,i){Fa(t,n,a,a)},breakArea:function(t,e,n,a,i){var o=Wa(),r=a.axis.scale;o&&"ordinal"!==r.type&&o.rectCoordBuildBreakAxis(e,t,a,a.coordinateSystem.getRect(),i)}},xp=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return nt(e,t),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}},jitter:0,jitterOverlap:!0,jitterMargin:2},e}(pn);Ne(xp,wn.prototype);var _p=function(t){function e(e,n,a,i,o){var r=t.call(this,e,n,a)||this;return r.type=i||"value",r.position=o||"bottom",r}return nt(e,t),e.prototype.isHorizontal=function(){var t=this.position;return"top"===t||"bottom"===t},e.prototype.pointToData=function(t,e){return this.coordinateSystem.pointToData(t)[0]},e}(fn),bp=["single"],wp=function(){function t(t,e,n){this.type="single",this.dimension="single",this.dimensions=bp,this.axisPointerEnabled=!0,this.model=t,this._init(t,e,n)}return t.prototype._init=function(t,e,n){var a=this.dimension,i=new _p(a,gn(t),[0,0],t.get("type"),t.get("position")),o="category"===i.type;i.onBand=o&&t.get("boundaryGap"),i.inverse=t.get("inverse"),i.orient=t.get("orient"),t.axis=i,i.model=t,i.coordinateSystem=this,this._axis=i},t.prototype.update=function(t,e){t.eachSeries(function(t){if(t.coordinateSystem===this){var e=t.getData();G(e.mapDimensionsAll(this.dimension),function(t){this._axis.scale.unionExtentFromData(e,t)},this),vn(this._axis.scale,this._axis.model)}},this)},t.prototype.resize=function(t,e){var n=kt(t,e).refContainer;this._rect=Et(t.getBoxLayoutParams(),n),this._adjustAxis()},t.prototype.getRect=function(){return this._rect},t.prototype._adjustAxis=function(){var t=this._rect,e=this._axis,n=e.isHorizontal(),a=n?[0,t.width]:[0,t.height],i=e.inverse?1:0;e.setExtent(a[i],a[1-i]),this._updateAxisTransform(e,n?t.x:t.y)},t.prototype._updateAxisTransform=function(t,e){var n=t.getExtent(),a=n[0]+n[1],i=t.isHorizontal();t.toGlobalCoord=i?function(t){return t+e}:function(t){return a-t+e},t.toLocalCoord=i?function(t){return t-e}:function(t){return a-t+e}},t.prototype.getAxis=function(){return this._axis},t.prototype.getBaseAxis=function(){return this._axis},t.prototype.getAxes=function(){return[this._axis]},t.prototype.getTooltipAxes=function(){return{baseAxes:[this.getAxis()],otherAxes:[]}},t.prototype.containPoint=function(t){var e=this.getRect(),n=this.getAxis();return"horizontal"===n.orient?n.contain(n.toLocalCoord(t[0]))&&t[1]>=e.y&&t[1]<=e.y+e.height:n.contain(n.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},t.prototype.pointToData=function(t,e,n){n=n||[];var a=this.getAxis();return n[0]=a.coordToData(a.toLocalCoord(t["horizontal"===a.orient?0:1])),n},t.prototype.dataToPoint=function(t,e,n){var a=this.getAxis(),i=this.getRect();n=n||[];var o="horizontal"===a.orient?0:1;return t instanceof Array&&(t=t[0]),n[o]=a.toGlobalCoord(a.dataToCoord(+t)),n[1-o]=0===o?i.y+i.height/2:i.x+i.width/2,n},t.prototype.convertToPixel=function(t,e,n){return Sp(e)===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(t,e,n){return Sp(e)===this?this.pointToData(n):null},t}();function Sp(t){var e=t.seriesModel,n=t.singleAxisModel;return n&&n.coordinateSystem||e&&e.coordinateSystem}var Ip={create:function(t,e){var n=[];return t.eachComponent("singleAxis",function(a,i){var o=new wp(a,t,e);o.name="single_"+i,o.resize(a,e),a.coordinateSystem=o,n.push(o)}),t.eachSeries(function(t){if("singleAxis"===t.get("coordinateSystem")){var e=t.getReferringComponents("singleAxis",_n).models[0];t.coordinateSystem=e&&e.coordinateSystem}}),n},dimensions:bp},Mp=["x","y"],Cp=["width","height"],Tp=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return nt(e,t),e.prototype.makeElOption=function(t,e,n,a,i){var o=n.axis,r=o.coordinateSystem,l=Ap(r,1-Lp(o)),s=r.dataToPoint(e)[0],u=a.get("type");if(u&&"none"!==u){var d=Ta(a),c=Dp[u](o,s,l);c.style=d,t.graphicKey=c.type,t.pointer=c}var h=gp(n);Ya(e,t,h,n,a,i)},e.prototype.getHandleTransform=function(t,e,n){var a=gp(e,{labelInside:!1});a.labelMargin=n.get(["handle","margin"]);var i=Ua(e.axis,t,a);return{x:i[0],y:i[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,e,n,a){var i=n.axis,o=i.coordinateSystem,r=Lp(i),l=Ap(o,r),s=[t.x,t.y];s[r]+=e[r],s[r]=Math.min(l[1],s[r]),s[r]=Math.max(l[0],s[r]);var u=Ap(o,1-r),d=(u[1]+u[0])/2,c=[d,d];return c[r]=s[r],{x:s[0],y:s[1],rotation:t.rotation,cursorPoint:c,tooltipOption:{verticalAlign:"middle"}}},e}(La),Dp={line:function(t,e,n){return{type:"Line",subPixelOptimize:!0,shape:Pa([e,n[0]],[e,n[1]],Lp(t))}},shadow:function(t,e,n){var a=t.getBandWidth(),i=n[1]-n[0];return{type:"Rect",shape:Xa([e-a/2,n[0]],[a,i],Lp(t))}}};function Lp(t){return t.isHorizontal()?0:1}function Ap(t,e){var n=t.getRect();return[n[Mp[e]],n[Mp[e]]+n[Cp[e]]]}var Pp=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return nt(e,t),e.type="single",e}(hn);var kp=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return nt(e,t),e.prototype.init=function(e,n,a){var i=Ha(e);t.prototype.init.apply(this,arguments),Ep(e,i)},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),Ep(this.option,e)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.layoutMode="box",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:ut.color.axisLine,width:1,type:"solid"}},itemStyle:{color:ut.color.neutral00,borderWidth:1,borderColor:ut.color.neutral10},dayLabel:{show:!0,firstDay:0,position:"start",margin:ut.size.s,color:ut.color.secondary},monthLabel:{show:!0,position:"start",margin:ut.size.s,align:"center",formatter:null,color:ut.color.secondary},yearLabel:{show:!0,position:null,margin:ut.size.xl,formatter:null,color:ut.color.quaternary,fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e}(pn);function Ep(t,e){var n,a=t.cellSize;1===(n=It(a)?a:t.cellSize=[a,a]).length&&(n[1]=n[0]);var i=St([0,1],function(t){return Za(e,t)&&(n[t]="auto"),null!=n[t]&&"auto"!==n[t]});qa(t,e,{type:"box",ignoreSize:i})}var Np=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return nt(e,t),e.prototype.render=function(t,e,n){var a=this.group;a.removeAll();var i=t.coordinateSystem,o=i.getRangeInfo(),r=i.getOrient(),l=e.getLocaleModel();this._renderDayRect(t,o,a),this._renderLines(t,o,r,a),this._renderYearText(t,o,r,a),this._renderMonthText(t,l,r,a),this._renderWeekText(t,l,o,r,a)},e.prototype._renderDayRect=function(t,e,n){for(var a=t.coordinateSystem,i=t.getModel("itemStyle").getItemStyle(),o=a.getCellWidth(),r=a.getCellHeight(),l=e.start.time;l<=e.end.time;l=a.getNextNDay(l,1).time){var s=a.dataToCalendarLayout([l],!1).tl,u=new oe({shape:{x:s[0],y:s[1],width:o,height:r},cursor:"default",style:i});n.add(u)}},e.prototype._renderLines=function(t,e,n,a){var i=this,o=t.coordinateSystem,r=t.getModel(["splitLine","lineStyle"]).getLineStyle(),l=t.get(["splitLine","show"]),s=r.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=e.start,d=0;u.time<=e.end.time;d++){h(u.formatedDate),0===d&&(u=o.getDateInfo(e.start.y+"-"+e.start.m));var c=u.date;c.setMonth(c.getMonth()+1),u=o.getDateInfo(c)}function h(e){i._firstDayOfMonth.push(o.getDateInfo(e)),i._firstDayPoints.push(o.dataToCalendarLayout([e],!1).tl);var s=i._getLinePointsOfOneWeek(t,e,n);i._tlpoints.push(s[0]),i._blpoints.push(s[s.length-1]),l&&i._drawSplitline(s,r,a)}h(o.getNextNDay(e.end.time,1).formatedDate),l&&this._drawSplitline(i._getEdgesPoints(i._tlpoints,s,n),r,a),l&&this._drawSplitline(i._getEdgesPoints(i._blpoints,s,n),r,a)},e.prototype._getEdgesPoints=function(t,e,n){var a=[t[0].slice(),t[t.length-1].slice()],i="horizontal"===n?0:1;return a[0][i]=a[0][i]-e/2,a[1][i]=a[1][i]+e/2,a},e.prototype._drawSplitline=function(t,e,n){var a=new nn({z2:20,shape:{points:t},style:e});n.add(a)},e.prototype._getLinePointsOfOneWeek=function(t,e,n){for(var a=t.coordinateSystem,i=a.getDateInfo(e),o=[],r=0;r<7;r++){var l=a.getNextNDay(i.time,r),s=a.dataToCalendarLayout([l.time],!1);o[2*l.day]=s.tl,o[2*l.day+1]=s["horizontal"===n?"bl":"tr"]}return o},e.prototype._formatterLabel=function(t,e){return Dt(t)&&t?$a(t,e):R(t)?t(e):e.nameMap},e.prototype._yearTextPositionControl=function(t,e,n,a,i){var o=e[0],r=e[1],l=["center","bottom"];"bottom"===a?(r+=i,l=["center","top"]):"left"===a?o-=i:"right"===a?(o+=i,l=["center","top"]):r-=i;var s=0;return"left"!==a&&"right"!==a||(s=Math.PI/2),{rotation:s,x:o,y:r,style:{align:l[0],verticalAlign:l[1]}}},e.prototype._renderYearText=function(t,e,n,a){var i=t.getModel("yearLabel");if(i.get("show")){var o=i.get("margin"),r=i.get("position");r||(r="horizontal"!==n?"top":"left");var l=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],s=(l[0][0]+l[1][0])/2,u=(l[0][1]+l[1][1])/2,d="horizontal"===n?0:1,c={top:[s,l[d][1]],bottom:[s,l[1-d][1]],left:[l[1-d][0],u],right:[l[d][0],u]},h=e.start.y;+e.end.y>+e.start.y&&(h=h+"-"+e.end.y);var p=i.get("formatter"),f={start:e.start.y,end:e.end.y,nameMap:h},g=this._formatterLabel(p,f),v=new Wt({z2:30,style:jt(i,{text:g}),silent:i.get("silent")});v.attr(this._yearTextPositionControl(v,c[r],n,r,o)),a.add(v)}},e.prototype._monthTextPositionControl=function(t,e,n,a,i){var o="left",r="top",l=t[0],s=t[1];return"horizontal"===n?(s+=i,e&&(o="center"),"start"===a&&(r="bottom")):(l+=i,e&&(r="middle"),"start"===a&&(o="right")),{x:l,y:s,align:o,verticalAlign:r}},e.prototype._renderMonthText=function(t,e,n,a){var i=t.getModel("monthLabel");if(i.get("show")){var o=i.get("nameMap"),r=i.get("margin"),l=i.get("position"),s=i.get("align"),u=[this._tlpoints,this._blpoints];o&&!Dt(o)||(o&&(e=Ka(o)||e),o=e.get(["time","monthAbbr"])||[]);var d="start"===l?0:1,c="horizontal"===n?0:1;r="start"===l?-r:r;for(var h="center"===s,p=i.get("silent"),f=0;f<u[d].length-1;f++){var g=u[d][f].slice(),v=this._firstDayOfMonth[f];if(h){var y=this._firstDayPoints[f];g[c]=(y[c]+u[0][f+1][c])/2}var m=i.get("formatter"),x=o[+v.m-1],_={yyyy:v.y,yy:(v.y+"").slice(2),MM:v.m,M:+v.m,nameMap:x},b=this._formatterLabel(m,_),w=new Wt({z2:30,style:wt(jt(i,{text:b}),this._monthTextPositionControl(g,h,n,l,r)),silent:p});a.add(w)}}},e.prototype._weekTextPositionControl=function(t,e,n,a,i){var o="center",r="middle",l=t[0],s=t[1],u="start"===n;return"horizontal"===e?(l=l+a+(u?1:-1)*i[0]/2,o=u?"right":"left"):(s=s+a+(u?1:-1)*i[1]/2,r=u?"bottom":"top"),{x:l,y:s,align:o,verticalAlign:r}},e.prototype._renderWeekText=function(t,e,n,a,i){var o=t.getModel("dayLabel");if(o.get("show")){var r=t.coordinateSystem,l=o.get("position"),s=o.get("nameMap"),u=o.get("margin"),d=r.getFirstDayOfWeek();if(!s||Dt(s))s&&(e=Ka(s)||e),s=e.get(["time","dayOfWeekShort"])||St(e.get(["time","dayOfWeekAbbr"]),function(t){return t[0]});var c=r.getNextNDay(n.end.time,7-n.lweek).time,h=[r.getCellWidth(),r.getCellHeight()];u=B(u,Math.min(h[1],h[0])),"start"===l&&(c=r.getNextNDay(n.start.time,-(7+n.fweek)).time,u=-u);for(var p=o.get("silent"),f=0;f<7;f++){var g,v=r.getNextNDay(c,f),y=r.dataToCalendarLayout([v.time],!1).center;g=Math.abs((f+d)%7);var m=new Wt({z2:30,style:wt(jt(o,{text:s[g]}),this._weekTextPositionControl(y,a,l,u,h)),silent:p});i.add(m)}}},e.type="calendar",e}(hn),zp=864e5,Rp=function(){function t(e,n,a){this.type="calendar",this.dimensions=t.dimensions,this.getDimensionsInfo=t.getDimensionsInfo,this._model=e,this._update(n,a)}return t.getDimensionsInfo=function(){return[{name:"time",type:"time"},"value"]},t.prototype.getRangeInfo=function(){return this._rangeInfo},t.prototype.getModel=function(){return this._model},t.prototype.getRect=function(){return this._rect},t.prototype.getCellWidth=function(){return this._sw},t.prototype.getCellHeight=function(){return this._sh},t.prototype.getOrient=function(){return this._orient},t.prototype.getFirstDayOfWeek=function(){return this._firstDayOfWeek},t.prototype.getDateInfo=function(t){var e=(t=Qa(t)).getFullYear(),n=t.getMonth()+1,a=n<10?"0"+n:""+n,i=t.getDate(),o=i<10?"0"+i:""+i,r=t.getDay();return{y:e+"",m:a,d:o,day:r=Math.abs((r+7-this.getFirstDayOfWeek())%7),time:t.getTime(),formatedDate:e+"-"+a+"-"+o,date:t}},t.prototype.getNextNDay=function(t,e){return 0===(e=e||0)||(t=new Date(this.getDateInfo(t).time)).setDate(t.getDate()+e),this.getDateInfo(t)},t.prototype._update=function(t,e){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var n=this._rangeInfo.weeks||1,a=["width","height"],i=this._model.getCellSize().slice(),o=this._model.getBoxLayoutParams(),r="horizontal"===this._orient?[n,7]:[7,n];G([0,1],function(t){u(i,t)&&(o[a[t]]=i[t]*r[t])});var l={width:e.getWidth(),height:e.getHeight()},s=this._rect=Et(o,l);function u(t,e){return null!=t[e]&&"auto"!==t[e]}G([0,1],function(t){u(i,t)||(i[t]=s[a[t]]/r[t])}),this._sw=i[0],this._sh=i[1]},t.prototype.dataToPoint=function(t,e,n){n=n||[],It(t)&&(t=t[0]),null==e&&(e=!0);var a=this.getDateInfo(t),i=this._rangeInfo,o=a.formatedDate;if(e&&!(a.time>=i.start.time&&a.time<i.end.time+zp))return n[0]=n[1]=NaN,n;var r=a.day,l=this._getRangeInfo([i.start.time,o]).nthWeek;return"vertical"===this._orient?(n[0]=this._rect.x+r*this._sw+this._sw/2,n[1]=this._rect.y+l*this._sh+this._sh/2):(n[0]=this._rect.x+l*this._sw+this._sw/2,n[1]=this._rect.y+r*this._sh+this._sh/2),n},t.prototype.pointToData=function(t){var e=this.pointToDate(t);return e&&e.time},t.prototype.dataToLayout=function(t,e,n){var a=(n=n||{}).rect=n.rect||{},i=n.contentRect=n.contentRect||{},o=this.dataToPoint(t,e);return a.x=o[0]-this._sw/2,a.y=o[1]-this._sh/2,a.width=this._sw,a.height=this._sh,E.copy(i,a),Ja(i,this._lineWidth/2,!0,!0),n},t.prototype.dataToCalendarLayout=function(t,e){var n=this.dataToPoint(t,e);return{center:n,tl:[n[0]-this._sw/2,n[1]-this._sh/2],tr:[n[0]+this._sw/2,n[1]-this._sh/2],br:[n[0]+this._sw/2,n[1]+this._sh/2],bl:[n[0]-this._sw/2,n[1]+this._sh/2]}},t.prototype.pointToDate=function(t){var e=Math.floor((t[0]-this._rect.x)/this._sw)+1,n=Math.floor((t[1]-this._rect.y)/this._sh)+1,a=this._rangeInfo.range;return"vertical"===this._orient?this._getDateByWeeksAndDay(n,e-1,a):this._getDateByWeeksAndDay(e,n-1,a)},t.prototype.convertToPixel=function(t,e,n){var a=Op(e);return a===this?a.dataToPoint(n):null},t.prototype.convertToLayout=function(t,e,n){var a=Op(e);return a===this?a.dataToLayout(n):null},t.prototype.convertFromPixel=function(t,e,n){var a=Op(e);return a===this?a.pointToData(n):null},t.prototype.containPoint=function(t){return!1},t.prototype._initRangeOption=function(){var t,e=this._model.get("range");if(It(e)&&1===e.length&&(e=e[0]),It(e))t=e;else{var n=e.toString();if(/^\d{4}$/.test(n)&&(t=[n+"-01-01",n+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(n)){var a=this.getDateInfo(n),i=a.date;i.setMonth(i.getMonth()+1);var o=this.getNextNDay(i,-1);t=[a.formatedDate,o.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(n)&&(t=[n,n])}if(!t)return e;var r=this._getRangeInfo(t);return r.start.time>r.end.time&&t.reverse(),t},t.prototype._getRangeInfo=function(t){var e,n=[this.getDateInfo(t[0]),this.getDateInfo(t[1])];n[0].time>n[1].time&&(e=!0,n.reverse());var a=Math.floor(n[1].time/zp)-Math.floor(n[0].time/zp)+1,i=new Date(n[0].time),o=i.getDate(),r=n[1].date.getDate();i.setDate(o+a-1);var l=i.getDate();if(l!==r)for(var s=i.getTime()-n[1].time>0?1:-1;(l=i.getDate())!==r&&(i.getTime()-n[1].time)*s>0;)a-=s,i.setDate(l-s);var u=Math.floor((a+n[0].day+6)/7),d=e?1-u:u-1;return e&&n.reverse(),{range:[n[0].formatedDate,n[1].formatedDate],start:n[0],end:n[1],allDay:a,weeks:u,nthWeek:d,fweek:n[0].day,lweek:n[1].day}},t.prototype._getDateByWeeksAndDay=function(t,e,n){var a=this._getRangeInfo(n);if(t>a.weeks||0===t&&e<a.fweek||t===a.weeks&&e>a.lweek)return null;var i=7*(t-1)-a.fweek+e,o=new Date(a.start.time);return o.setDate(+a.start.d+i),this.getDateInfo(o)},t.create=function(e,n){var a=[];return e.eachComponent("calendar",function(i){var o=new t(i,e,n);a.push(o),i.coordinateSystem=o}),e.eachComponent(function(t,e){Se({targetModel:e,coordSysType:"calendar",coordSysProvider:ti})}),a},t.dimensions=["time","value"],t}();function Op(t){var e=t.calendarModel,n=t.seriesModel;return e?e.coordinateSystem:n?n.coordinateSystem:null}var Vp=1,Bp=2,Gp=3,Wp={none:0,all:1,body:2,corner:3};function Fp(t,e,n){var a=e[ei[n]].getCell(t);return!a&&ce(t)&&t<0&&(a=e[ei[1-n]].getUnitLayoutInfo(n,Math.round(t))),a}function jp(t){var e=t||[];return e[0]=e[0]||[],e[1]=e[1]||[],e[0][0]=e[0][1]=e[1][0]=e[1][1]=NaN,e}function Yp(t,e,n,a,i){Up(t[0],e,i,n,a,0),Up(t[1],e,i,n,a,1)}function Up(t,e,n,a,i,o){t[0]=1/0,t[1]=-1/0;var r=a[o],l=It(r)?r:[r],s=l.length,u=!!n;if(s>=1?(Xp(t,e,l,u,i,o,0),s>1&&Xp(t,e,l,u,i,o,s-1)):t[0]=t[1]=NaN,u){var d=-i[ei[1-o]].getLocatorCount(o),c=i[ei[o]].getLocatorCount(o)-1;n===Wp.body?d=ai(0,d):n===Wp.corner&&(c=ii(-1,c)),c<d&&(d=c=NaN),ln(t[0])&&(t[0]=d),ln(t[1])&&(t[1]=c),t[0]=ai(ii(t[0],c),d),t[1]=ai(ii(t[1],c),d)}}function Xp(t,e,n,a,i,o,r){var l=Fp(n[r],i,o);if(l){var s,u=l.id[ei[o]],d=u,c=!(s=l)||s.type!==Bp&&s.type!==Gp?null:s;c&&(d+=c.span[ei[o]]-1),t[0]=ii(t[0],u,d),t[1]=ai(t[1],u,d)}else t[0]=t[1]=NaN}function Hp(t,e){return ln(t[e][0])||ln(t[e][1])}function Zp(t,e,n,a){e=e||qp;for(var i=0;i<a;i++)e[i]=!1;for(;;){var o=!1;for(i=0;i<a;i++){var r=n[i];!e[i]&&r.cellMergeOwner&&$p(t,r.locatorRange)&&(e[i]=!0,o=!0)}if(!o)break}}var qp=[];function $p(t,e){return!(!Kp(t[0],e[0])||!Kp(t[1],e[1]))&&(t[0][0]=ii(t[0][0],e[0][0]),t[0][1]=ai(t[0][1],e[0][1]),t[1][0]=ii(t[1][0],e[1][0]),t[1][1]=ai(t[1][1],e[1][1]),!0)}function Kp(t,e){return t[1]>=e[0]&&t[0]<=e[1]}function Qp(t,e){t.id.set(e[0][0],e[1][0]),t.span.set(e[0][1]-t.id.x+1,e[1][1]-t.id.y+1)}function Jp(t,e,n,a){var i=Fp(e[a][0],n,a),o=Fp(e[a][1],n,a);t[ei[a]]=t[ni[a]]=NaN,i&&o&&(t[ei[a]]=i.xy,t[ni[a]]=o.xy+o.wh-i.xy)}function tf(t,e,n,a){return t[ei[e]]=n,t[ei[1-e]]=a,t}var ef=function(){function t(t,e){this._cells=[],this._levels=[],this.dim=t,this.dimIdx="x"===t?0:1,this._model=e,this._uniqueValueGen=function(t){var e=t.toUpperCase(),n=new RegExp("^"+e+"([0-9]+)$"),a=0;function i(t){var e;null!=t&&(e=t.match(n))&&(a=ai(a,+e[1]+1))}function o(){return""+e+a++}function r(t,e){for(var n=Ot(),a=0;a<t.length;a++){var i=t[a];null!=i&&null==n.get(i)||(t[a]=i=o(),e[a].option=vt({value:i},e[a].option)),n.set(i,!0)}}return{calcDupBase:i,ensureValueUnique:r}}(t);var n=e.get("data",!0);null==n||It(n)||(n=[]),n?this._initByDimModelData(n):this._initBySeriesData()}return t.prototype._initByDimModelData=function(t){var e=this,n=e._cells,a=e._levels,i=[],o=0;return e._leavesCount=function t(n,r,l){var s=0;if(!n)return s;return G(n,function(n,u){var d;Dt(n)?d={value:n}:sn(n)?(d=n,null==n.value||Dt(n.value)||(d={value:null})):d={value:null};var c={type:Gp,ordinal:NaN,level:l,firstLeafLocator:r,id:new an,span:tf(new an,e.dimIdx,1,1),option:d,xy:NaN,wh:NaN,dim:e,rect:{x:NaN,y:NaN,width:NaN,height:NaN}};o++,(i[r]||(i[r]=[])).push(c),a[l]||(a[l]={type:Vp,xy:NaN,wh:NaN,option:null,id:new an,dim:e});var h=t(d.children,r,l+1),p=Math.max(1,h);c.span[ei[e.dimIdx]]=p,s+=p,r+=p}),s}(t,0,0),void function(){var t=[];for(;n.length<o;)for(var a=0;a<i.length;a++){var r=i[a].pop();if(r){r.ordinal=t.length;var l=r.option.value;t.push(l),n.push(r),e._uniqueValueGen.calcDupBase(l)}}e._uniqueValueGen.ensureValueUnique(t,n);var s=e._ordinalMeta=new oi({categories:t,needCollect:!1,deduplication:!1});e._scale=new ri({ordinalMeta:s});for(var u=0;u<e._leavesCount;u++){var d=e._cells[u];d.type=Bp,d.span[ei[1-e.dimIdx]]=e._levels.length-d.level}e._initCellsId(),e._initLevelIdOptions()}()},t.prototype._initBySeriesData=function(){var t=this;t._leavesCount=0,t._levels=[{type:Vp,xy:NaN,wh:NaN,option:null,id:new an,dim:t}],t._initLevelIdOptions();var e=t._ordinalMeta=new oi({needCollect:!0,deduplication:!0,onCollect:function(e,n){var a=t._cells[n]={type:Bp,ordinal:n,level:0,firstLeafLocator:n,id:new an,span:tf(new an,t.dimIdx,1,1),option:{value:e+""},xy:NaN,wh:NaN,dim:t,rect:{x:NaN,y:NaN,width:NaN,height:NaN}};t._leavesCount++,t._setCellId(a)}});t._scale=new ri({ordinalMeta:e})},t.prototype._setCellId=function(t){var e=this._levels.length,n=this.dimIdx;tf(t.id,n,t.firstLeafLocator,t.level-e)},t.prototype._initCellsId=function(){var t=this._levels.length,e=this.dimIdx;G(this._cells,function(n){tf(n.id,e,n.firstLeafLocator,n.level-t)})},t.prototype._initLevelIdOptions=function(){var t=this._levels.length,e=this.dimIdx,n=this._model.get("levels",!0);n=It(n)?n:[],G(this._levels,function(a,i){tf(a.id,e,0,i-t),a.option=n[i]})},t.prototype.shouldShow=function(){return!!this._model.getShallow("show",!0)},t.prototype.resetLayoutIterator=function(t,e,n,a){if(t=t||new li,e===this.dimIdx){var i=this._leavesCount,o=null!=n?Math.max(0,n):0;a=null!=a?Math.min(a,i):i,t.reset(this._cells,o,o+a)}else{i=this._levels.length,o=null!=n?Math.max(0,n+i):0;a=null!=a?Math.min(a,i):i,t.reset(this._levels,o,o+a)}return t},t.prototype.resetCellIterator=function(t){return(t||new li).reset(this._cells,0)},t.prototype.resetLevelIterator=function(t){return(t||new li).reset(this._levels,0)},t.prototype.getLayout=function(t,e,n){var a=this.getUnitLayoutInfo(e,n);t[ei[e]]=a?a.xy:NaN,t[ni[e]]=a?a.wh:NaN},t.prototype.getUnitLayoutInfo=function(t,e){return t===this.dimIdx?e<this._leavesCount?this._cells[e]:void 0:this._levels[e+this._levels.length]},t.prototype.getCell=function(t){var e=this._scale.parse(t);return ln(e)?void 0:this._cells[e]},t.prototype.getLocatorCount=function(t){return t===this.dimIdx?this._leavesCount:this._levels.length},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t}();var nf=function(){function t(t,e,n){this._model=e,this._dims=n,this._kind=t,this._cellMergeOwnerList=[]}return t.prototype._ensureCellMap=function(){var t=this,e=t._cellMap;return e||(e=t._cellMap=Ot(),function(){var e=[],a=t._model.getShallow("data");a&&!It(a)&&(a=null);G(a,function(n,a){if(sn(n)&&It(n.coord)){var i=jp([]);if(Yp(i,null,n.coord,t._dims,n.coordClamp?Wp[t._kind]:Wp.none),!Hp(i,0)&&!Hp(i,1)){var o=n&&n.mergeCells,r={id:new an,span:new an,locatorRange:i,option:n,cellMergeOwner:o};Qp(r,i),e.push(r)}}});for(var i=[],o=0;o<e.length;o++){var r=e[o];if(r.cellMergeOwner){var l=r.locatorRange;Zp(l,i,e,o);for(var s=0;s<o;s++)i[s]&&(e[s].cellMergeOwner=!1);if(l[0][0]!==r.id.x||l[1][0]!==r.id.y){r.cellMergeOwner=!1;var u=wt({},r.option);u.coord=null;var d={id:new an,span:new an,locatorRange:l,option:u,cellMergeOwner:!0};Qp(d,l),e.push(d)}}}G(e,function(e){var a=n(e.id.x,e.id.y);if(e.cellMergeOwner&&(a.cellMergeOwner=!0,a.span=e.span,a.locatorRange=e.locatorRange,a.spanRect={x:NaN,y:NaN,width:NaN,height:NaN},t._cellMergeOwnerList.push(a)),e.cellMergeOwner||e.option)for(var i=0;i<e.span.y;i++)for(var o=0;o<e.span.x;o++){var r=n(e.id.x+o,e.id.y+i);r.option=e.option,e.cellMergeOwner&&(r.inSpanOf=a)}})}()),e;function n(t,n){var a=of(t,n),i=e.get(a);return i||(i=e.set(a,{id:new an(t,n),option:null,inSpanOf:null,span:null,spanRect:null,locatorRange:null,cellMergeOwner:!1})),i}},t.prototype.getCell=function(t){return this._ensureCellMap().get(of(t[0],t[1]))},t.prototype.travelExistingCells=function(t){this._ensureCellMap().each(t)},t.prototype.expandRangeByCellMerge=function(t){if(!Hp(t,0)&&!Hp(t,1)&&t[0][0]===t[0][1]&&t[1][0]===t[1][1]){af[0]=t[0][0],af[1]=t[1][0];var e=this.getCell(af),n=e&&e.inSpanOf;if(n)return a=t,i=n.locatorRange,a[0][0]=i[0][0],a[0][1]=i[0][1],a[1][0]=i[1][0],void(a[1][1]=i[1][1])}var a,i,o=this._cellMergeOwnerList;Zp(t,null,o,o.length)},t}(),af=[];function of(t,e){return t+"|"+e}var rf={show:!0,color:ut.color.secondary,overflow:"break",lineOverflow:"truncate",padding:[2,3,2,3],distance:0};function lf(t){return{color:"none",borderWidth:1,borderColor:t?"none":ut.color.borderTint}}var sf={show:!0,label:rf,itemStyle:lf(!1),silent:void 0,dividerLineStyle:{width:1,color:ut.color.border}},uf={z:-50,left:"10%",top:"10%",right:"10%",bottom:"10%",x:sf,y:sf,body:{label:rf,itemStyle:lf(!1),silent:void 0},corner:{label:rf,itemStyle:lf(!0),silent:void 0},backgroundStyle:{color:"none",borderColor:ut.color.axisLine,borderWidth:1}},df=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return nt(e,t),e.prototype.optionUpdated=function(){var t=this._dimModels={x:new cf(this.get("x",!0)||{}),y:new cf(this.get("y",!0)||{})};t.x.option.type=t.y.option.type="category";var e={x:t.x.dim=new ef("x",t.x),y:t.y.dim=new ef("y",t.y)};this._body=new nf("body",new Lt(this.getShallow("body")),e),this._corner=new nf("corner",new Lt(this.getShallow("corner")),e)},e.prototype.getDimensionModel=function(t){return this._dimModels[t]},e.prototype.getBody=function(){return this._body},e.prototype.getCorner=function(){return this._corner},e.type="matrix",e.layoutMode="box",e.defaultOption=uf,e}(pn),cf=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return nt(e,t),e.prototype.getOrdinalMeta=function(){return this.dim.getOrdinalMeta()},e}(Lt),hf=Math.round,pf={normal:25,special:100},ff={normal:50,special:125},gf=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return nt(e,t),e.prototype.render=function(t,e){this.group.removeAll();var n=this.group,a=t.coordinateSystem.getRect(),i=t.getDimensionModel("x"),o=t.getDimensionModel("y"),r=i.dim,l=o.dim;!function(t,e,n){function a(a){var i=e.getDimensionModel(ei[a]),o=i.dim;if(o.shouldShow())for(var r=i.getModel("itemStyle"),l=i.getModel("label"),s=e.getShallow("tooltip",!0),u=[],d=o.resetCellIterator();d.next();){var c=d.item,h={};E.copy(h,c.rect),_e(u,c.id.x,c.id.y),vf(u,e,t,n,c.option,r,l,i,h,c.option.value,ff,s)}}a(0),a(1)}(n,t,e),function(t,e,n,a,i){o("body",e.getBody(),n,a),n.shouldShow()&&a.shouldShow()&&o("corner",e.getCorner(),a,n);function o(n,a,o,r){var l=new Lt(e.getShallow(n,!0)),s=l.getModel("itemStyle"),u=l.getModel("label"),d=new li,c=new li,h=[],p=e.getShallow("tooltip",!0);for(r.resetLayoutIterator(c,1);c.next();)for(o.resetLayoutIterator(d,0);d.next();){var f=d.item,g=c.item;_e(h,f.id.x,g.id.y);var v=a.getCell(h);if(!v||!v.inSpanOf||v.inSpanOf===v){var y={};v&&v.span?E.copy(y,v.spanRect):(f.dim.getLayout(y,0,h[0]),g.dim.getLayout(y,1,h[1]));var m=v?v.option:null;vf(h,e,t,i,m,s,u,l,y,m?m.value:null,pf,p)}}}}(n,t,r,l,e);var s=t.getShallow("borderZ2",!0),u=K(s,99),d=u-1,c=t.getModel("backgroundStyle").getItemStyle(["borderWidth"]);c.lineWidth=0;var h=t.getModel("backgroundStyle").getItemStyle(["color","decal","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]);h.fill="none";var p=bf(a.clone(),c,0),f=bf(a.clone(),h,u);p.silent=!0,f.silent=!0,n.add(p),n.add(f);var g=r.getUnitLayoutInfo(0,0),v=l.getUnitLayoutInfo(1,0);g&&v&&(r.shouldShow()&&n.add(wf({x1:a.x,y1:v.xy,x2:a.x+a.width,y2:v.xy},i.getModel("dividerLineStyle").getLineStyle(),d)),l.shouldShow()&&n.add(wf({x1:g.xy,y1:a.y,x2:g.xy,y2:a.y+a.height},o.getModel("dividerLineStyle").getLineStyle(),d)))},e.type="matrix",e}(hn);function vf(t,e,n,a,i,o,r,l,s,u,d,c){var h;mf.option=i?i.itemStyle:null,mf.parentModel=o,yf.option=i,yf.parentModel=l;var p=K(yf.getShallow("z2"),i&&i.itemStyle?d.special:d.normal),f=c&&c.show,g=bf(s,mf.getItemStyle(),p);n.add(g);var v,y=yf.get("cursor");if(null!=y&&g.attr("cursor",y),null!=u){var m=u+"";if(xf.option=i?i.label:null,xf.parentModel=r,xf.ecModel=a,ee(g,{normal:xf},{defaultText:m,autoOverflowArea:!0,layoutRect:ke(g.shape)}),v=g.getTextContent()){v.z2=p+1;var x=v.style;if(x&&x.overflow&&"none"!==x.overflow&&x.lineOverflow){var _={};E.copy(_,s),Ja(_,((null===(h=g.style)||void 0===h?void 0:h.lineWidth)||0)/2,!0,!0),g.updateInnerText(),v.getLocalTransform(_f),ui(_f,_f),E.applyTransform(_,_,_f),v.setClipPath(new oe({shape:_}))}}Ra({el:g,componentModel:e,itemName:m,itemTooltipOption:c,formatterParamsExtra:{xyLocator:t.slice()}})}if(v){var b=xf.get("silent");null==b&&(b=!f),v.silent=b,v.ignoreHostSilent=!0}var w=yf.get("silent");null==w&&(w=!g.style||"none"===g.style.fill||!g.style.fill),g.silent=w,di(yf),di(mf),di(xf)}var yf=new Lt,mf=new Lt,xf=new Lt,_f=[];function bf(t,e,n){var a=e.lineWidth;if(a){var i=t.x+t.width,o=t.y+t.height;t.x=si(t.x,a,!0),t.y=si(t.y,a,!0),t.width=si(i,a,!0)-t.x,t.height=si(o,a,!0)-t.y}return new oe({shape:t,style:e,z2:n})}function wf(t,e,n){var a=e.lineWidth;return a&&(hf(2*t.x1)===hf(2*t.x2)&&(t.x1=t.x2=si(t.x1,a,!0)),hf(2*t.y1)===hf(2*t.y2)&&(t.y1=t.y2=si(t.y1,a,!0))),new qe({shape:t,style:e,silent:!0,z2:n})}var Sf=function(){function t(e,n,a){this.dimensions=t.dimensions,this.type="matrix",this._model=e;var i=this._dimModels={x:e.getDimensionModel("x"),y:e.getDimensionModel("y")};this._dims={x:i.x.dim,y:i.y.dim},this._resize(e,a)}return t.getDimensionsInfo=function(){return[{name:"x",type:"ordinal"},{name:"y",type:"ordinal"},{name:"value"}]},t.create=function(e,n){var a=[];return e.eachComponent("matrix",function(i){var o=new t(i,e,n);a.push(o),i.coordinateSystem=o}),e.eachComponent(function(t,e){Se({targetModel:e,coordSysType:"matrix",coordSysProvider:ti})}),a},t.prototype.getRect=function(){return this._rect},t.prototype._resize=function(t,e){var n=this._dims,a=this._dimModels,i=this._rect=Et(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});Tf(a,n,i,0),Tf(a,n,i,1),Df(0,n),Df(1,n),Lf(this._model.getBody(),n),Lf(this._model.getCorner(),n)},t.prototype.dataToPoint=function(t,e,n){return n=n||[],this.dataToLayout(t,e,If),n[0]=If.rect.x+If.rect.width/2,n[1]=If.rect.y+If.rect.height/2,n},t.prototype.dataToLayout=function(t,e,n){var a=this._dims,i=(n=n||{}).rect=n.rect||{};i.x=i.y=i.width=i.height=NaN;var o=n.matrixXYLocatorRange=jp(n.matrixXYLocatorRange);return It(t)?(Yp(o,null,t,a,K(e&&e.clamp,Wp.none)),e&&e.ignoreMergeCells||(e&&e.clamp===Wp.corner||this._model.getBody().expandRangeByCellMerge(o),e&&e.clamp===Wp.body||this._model.getCorner().expandRangeByCellMerge(o)),Jp(i,o,a,0),Jp(i,o,a,1),n):n},t.prototype.pointToData=function(t,e,n){var a=this._dims;return zf(Nf,0,a,t,e&&e.clamp),zf(Nf,1,a,t,e&&e.clamp),(n=n||[])[0]=n[1]=NaN,Nf.y===Ef.inCorner&&Nf.x===Ef.inBody?Rf(Nf,n,0,a):Nf.x===Ef.inCorner&&Nf.y===Ef.inBody?Rf(Nf,n,1,a):(Of(Nf,n,0,a),Of(Nf,n,1,a)),n},t.prototype.convertToPixel=function(t,e,n,a){var i=kf(e);return i===this?i.dataToPoint(n,a):void 0},t.prototype.convertToLayout=function(t,e,n,a){var i=kf(e);return i===this?i.dataToLayout(n,a):void 0},t.prototype.convertFromPixel=function(t,e,n,a){var i=kf(e);return i===this?i.pointToData(n,a):void 0},t.prototype.containPoint=function(t){return this._rect.contain(t[0],t[1])},t.dimensions=["x","y","value"],t}(),If={rect:{x:NaN,y:NaN,width:NaN,height:NaN}},Mf=new li,Cf=new li;function Tf(t,e,n,a){for(var i=1-a,o=e[ei[a]],r=e[ei[i]],l=r.shouldShow(),s=o.resetCellIterator();s.next();)s.item.wh=s.item.xy=NaN;for(var u=r.resetLayoutIterator(null,a);u.next();)u.item.wh=u.item.xy=NaN;for(var d=n[ni[a]],c=o.getLocatorCount(a)+r.getLocatorCount(a),h=new Lt,p=r.resetLevelIterator();p.next();)h.option=p.item.option,h.parentModel=t[ei[i]],v(p.item,l?h.get("levelSize"):0);for(var f=new Lt,g=o.resetCellIterator();g.next();)g.item.type===Bp&&(f.option=g.item.option,f.parentModel=void 0,v(g.item,f.get("size")));function v(t,e){var i=function(t,e,n){var a=ci(t,n[ni[e]]);return Pf(a,n[ni[e]])}(e,a,n);ln(i)||(t.wh=Pf(i,d),d=Pf(d-t.wh),c--)}var y=c?d/c:0,m=!c&&d>=1,x=n[ei[a]],_=o.getLocatorCount(a)-1,b=new li;for(r.resetLayoutIterator(b,a);b.next();)w(b.item);for(o.resetLayoutIterator(b,a);b.next();)w(b.item);function w(t){ln(t.wh)&&(t.wh=y),t.xy=x,t.id[ei[a]]!==_||m||(t.wh=n[ei[a]]+n[ni[a]]-t.xy),x+=t.wh}}function Df(t,e){for(var n=e[ei[t]].resetCellIterator();n.next();){var a=n.item;Af(a.rect,t,a.id,a.span,e),Af(a.rect,1-t,a.id,a.span,e),a.type===Gp&&(a.xy=a.rect[ei[t]],a.wh=a.rect[ni[t]])}}function Lf(t,e){t.travelExistingCells(function(t){var n=t.span;if(n){var a=t.spanRect,i=t.id;Af(a,0,i,n,e),Af(a,1,i,n,e)}})}function Af(t,e,n,a,i){t[ni[e]]=0;var o=n[ei[e]]<0?i[ei[1-e]]:i[ei[e]],r=o.getUnitLayoutInfo(e,n[ei[e]]);if(t[ei[e]]=r.xy,t[ni[e]]=r.wh,a[ei[e]]>1){var l=o.getUnitLayoutInfo(e,n[ei[e]]+a[ei[e]]-1);t[ni[e]]=l.xy+l.wh-r.xy}}function Pf(t,e){return Math.max(Math.min(t,K(e,1/0)),0)}function kf(t){var e=t.matrixModel,n=t.seriesModel;return e?e.coordinateSystem:n?n.coordinateSystem:null}var Ef={inBody:1,inCorner:2,outside:3},Nf={x:null,y:null,point:[]};function zf(t,e,n,a,i){var o=n[ei[e]],r=n[ei[1-e]],l=o.getUnitLayoutInfo(e,o.getLocatorCount(e)-1),s=o.getUnitLayoutInfo(e,0),u=r.getUnitLayoutInfo(e,-r.getLocatorCount(e)),d=r.shouldShow()?r.getUnitLayoutInfo(e,-1):null,c=t.point[e]=a[e];if(s||d)if(i!==Wp.body)if(i!==Wp.corner){var h=s?s.xy:d?d.xy+d.wh:NaN,p=u?u.xy:h,f=l?l.xy+l.wh:h;if(c<p){if(!i)return void(t[ei[e]]=Ef.outside);c=p}else if(c>f){if(!i)return void(t[ei[e]]=Ef.outside);c=f}t.point[e]=c,t[ei[e]]=h<=c&&c<=f?Ef.inBody:p<=c&&c<=h?Ef.inCorner:Ef.outside}else d?(t[ei[e]]=Ef.inCorner,c=ii(d.xy+d.wh,ai(u.xy,c)),t.point[e]=c):t[ei[e]]=Ef.outside;else s?(t[ei[e]]=Ef.inBody,c=ii(l.xy+l.wh,ai(s.xy,c)),t.point[e]=c):t[ei[e]]=Ef.outside;else t[ei[e]]=Ef.outside}function Rf(t,e,n,a){var i=1-n;if(t[ei[n]]!==Ef.outside)for(a[ei[n]].resetCellIterator(Cf);Cf.next();){var o=Cf.item;if(Bf(t.point[n],o.rect,n)&&Bf(t.point[i],o.rect,i))return e[n]=o.ordinal,void(e[i]=o.id[ei[i]])}}function Of(t,e,n,a){if(t[ei[n]]!==Ef.outside)for((t[ei[n]]===Ef.inCorner?a[ei[1-n]]:a[ei[n]]).resetLayoutIterator(Mf,n);Mf.next();)if(Vf(t.point[n],Mf.item))return void(e[n]=Mf.item.id[ei[n]])}function Vf(t,e){return e.xy<=t&&t<=e.xy+e.wh}function Bf(t,e,n){return e[ei[n]]<=t&&t<=e[ei[n]]+e[ni[n]]}function Gf(t,e){var n;return G(e,function(e){null!=t[e]&&"auto"!==t[e]&&(n=!0)}),n}var Wf=["transition","enterFrom","leaveTo"],Ff=Wf.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function jf(t,e,n){if(n&&(!t[n]&&e[n]&&(t[n]={}),t=t[n],e=e[n]),t&&e)for(var a=n?Wf:Ff,i=0;i<a.length;i++){var o=a[i];null==t[o]&&null!=e[o]&&(t[o]=e[o])}}var Yf=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.preventAutoZ=!0,n}return nt(e,t),e.prototype.mergeOption=function(e,n){var a=this.option.elements;this.option.elements=null,t.prototype.mergeOption.call(this,e,n),this.option.elements=a},e.prototype.optionUpdated=function(t,e){var n=this.option,a=(e?n:t).elements,i=n.elements=e?[]:n.elements,o=[];this._flatten(a,o,null);var r=hi(i,o,"normalMerge"),l=this._elOptionsToUpdate=[];G(r,function(t,e){var n=t.newOption;n&&(l.push(n),function(t,e){var n=t.existing;if(e.id=t.keyInfo.id,!e.type&&n&&(e.type=n.type),null==e.parentId){var a=e.parentOption;a?e.parentId=a.id:n&&(e.parentId=n.parentId)}e.parentOption=null}(t,n),function(t,e,n){var a=wt({},n),i=t[e],o=n.$action||"merge";"merge"===o?i?(un(i,a,!0),qa(i,a,{ignoreSize:!0}),pi(n,i),jf(n,i),jf(n,i,"shape"),jf(n,i,"style"),jf(n,i,"extra"),n.clipPath=i.clipPath):t[e]=a:"replace"===o?t[e]=a:"remove"===o&&i&&(t[e]=null)}(i,e,n),function(t,e){if(t&&(t.hv=e.hv=[Gf(e,["left","right"]),Gf(e,["top","bottom"])],"group"===t.type)){var n=t,a=e;null==n.width&&(n.width=a.width=0),null==n.height&&(n.height=a.height=0)}}(i[e],n))},this),n.elements=F(i,function(t){return t&&delete t.$action,null!=t})},e.prototype._flatten=function(t,e,n){G(t,function(t){if(t){n&&(t.parentOption=n),e.push(t);var a=t.children;a&&a.length&&this._flatten(a,e,t),delete t.children}},this)},e.prototype.useElOptionsToUpdate=function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t},e.type="graphic",e.defaultOption={elements:[]},e}(pn),Uf={path:null,compoundPath:null,group:at,image:Qe,text:Wt},Xf=k(),Hf=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return nt(e,t),e.prototype.init=function(){this._elMap=Ot()},e.prototype.render=function(t,e,n){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,n)},e.prototype._updateElements=function(t){var e=t.useElOptionsToUpdate();if(e){var n=this._elMap,a=this.group,i=t.get("z"),o=t.get("zlevel");G(e,function(e){var r=Mt(e.id,null),l=null!=r?n.get(r):null,s=Mt(e.parentId,null),u=null!=s?n.get(s):a,d=e.type,c=e.style;"text"===d&&c&&e.hv&&e.hv[1]&&(c.textVerticalAlign=c.textBaseline=c.verticalAlign=c.align=null);var h=e.textContent,p=e.textConfig;if(c&&Bc(c,d,!!p,!!h)){var f=Gc(c,d,!0);!p&&f.textConfig&&(p=e.textConfig=f.textConfig),!h&&f.textContent&&(h=f.textContent)}var g=function(t){return t=wt({},t),G(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(fi),function(e){delete t[e]}),t}(e),v=e.$action||"merge",y="merge"===v,m="replace"===v;if(y){var x=l;(C=!l)?x=qf(r,u,e.type,n):(x&&(Xf(x).isNew=!1),lh(x)),x&&(qc(x,g,t,{isInit:C}),Kf(x,e,i,o))}else if(m){$f(l,e,n,t);var _=qf(r,u,e.type,n);_&&(qc(_,g,t,{isInit:!0}),Kf(_,e,i,o))}else"remove"===v&&($c(l,e),$f(l,e,n,t));var b=n.get(r);if(b&&h)if(y){var w=b.getTextContent();w?w.attr(h):b.setTextContent(new Wt(h))}else m&&b.setTextContent(new Wt(h));if(b){var S=e.clipPath;if(S){var I=S.type,M=void 0,C=!1;if(y){var T=b.getClipPath();M=(C=!T||Xf(T).type!==I)?Zf(I):T}else m&&(C=!0,M=Zf(I));b.setClipPath(M),qc(M,S,t,{isInit:C}),sh(M,S.keyframeAnimation,t)}var D=Xf(b);b.setTextConfig(p),D.option=e,function(t,e,n){var a=V(t).eventData;t.silent||t.ignore||a||(a=V(t).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:t.name});a&&(a.info=n.info)}(b,t,e),Ra({el:b,componentModel:t,itemName:b.name,itemTooltipOption:e.tooltip}),sh(b,e.keyframeAnimation,t)}})}},e.prototype._relocate=function(t,e){for(var n=t.option.elements,a=this.group,i=this._elMap,o=e.getWidth(),r=e.getHeight(),l=["x","y"],s=0;s<n.length;s++){var u=n[s];if((f=null!=(p=Mt(u.id,null))?i.get(p):null)&&f.isGroup){var d=(g=f.parent)===a,c=Xf(f),h=Xf(g);c.width=B(c.option.width,d?o:h.width)||0,c.height=B(c.option.height,d?r:h.height)||0}}for(s=n.length-1;s>=0;s--){var p,f;u=n[s];if(f=null!=(p=Mt(u.id,null))?i.get(p):null){var g=f.parent,v=(h=Xf(g),g===a?{width:o,height:r}:{width:h.width,height:h.height}),y={},m=Bt(f,u,v,null,{hv:u.hv,boundingMode:u.bounding},y);if(!Xf(f).isNew&&m){for(var x=u.transition,_={},b=0;b<l.length;b++){var w=l[b],S=y[w];x&&(Qc(x)||J(x,w)>=0)?_[w]=S:f[w]=S}tt(f,_,t,0)}else f.attr(y)}}},e.prototype._clear=function(){var t=this,e=this._elMap;e.each(function(n){$f(n,Xf(n).option,e,t._lastGraphicModel)}),this._elMap=Ot()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(hn);function Zf(t){var e=new(fa(Uf,t)?Uf[t]:Ia(t))({});return Xf(e).type=t,e}function qf(t,e,n,a){var i=Zf(n);return e.add(i),a.set(t,i),Xf(i).id=t,Xf(i).isNew=!0,i}function $f(t,e,n,a){t&&t.parent&&("group"===t.type&&t.traverse(function(t){$f(t,e,n,a)}),Kc(t,e,a),n.removeKey(Xf(t).id))}function Kf(t,e,n,a){t.isGroup||G([["cursor",ie.prototype.cursor],["zlevel",a||0],["z",n||0],["z2",0]],function(n){var a=n[0];fa(e,a)?t[a]=K(e[a],n[1]):null==t[a]&&(t[a]=n[1])}),G(O(e),function(n){if(0===n.indexOf("on")){var a=e[n];t[n]=R(a)?a:null}}),fa(e,"draggable")&&(t.draggable=e.draggable),null!=e.name&&(t.name=e.name),null!=e.id&&(t.id=e.id)}var Qf=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.layoutMode="box",n}return nt(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n),this._initData()},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(t){null==t&&(t=this.option.currentIndex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(t>=e&&(t=e-1),t<0&&(t=0)),this.option.currentIndex=t},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(t){this.option.autoPlay=!!t},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var t,e=this.option,n=e.data||[],a=e.axisType,i=this._names=[];"category"===a?(t=[],G(n,function(e,n){var a,o=Mt(gi(e),"");sn(e)?(a=ke(e)).value=n:a=n,t.push(a),i.push(o)})):t=n;var o={category:"ordinal",time:"time",value:"number"}[a]||"number";(this._data=new Tt([{name:"value",type:o}],this)).initData(t,i)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if("category"===this.get("axisType"))return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:ut.size.m,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:ut.color.secondary},data:[]},e}(pn),Jf=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return nt(e,t),e.type="timeline.slider",e.defaultOption=aa(Qf.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:ut.color.border,borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:ut.color.accent10},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:ut.color.tertiary},itemStyle:{color:ut.color.accent20,borderWidth:0},checkpointStyle:{symbol:"circle",symbolSize:15,color:ut.color.accent50,borderColor:ut.color.accent50,borderWidth:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"rgba(0, 0, 0, 0)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10.6699C11.5 9.90014 12.3333 9.41887 13 9.80371L20.5 14.1338C21.1667 14.5187 21.1667 15.4813 20.5 15.8662L13 20.1963C12.3333 20.5811 11.5 20.0999 11.5 19.3301V10.6699Z",stopIcon:"path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10C12.3284 10 13 10.6716 13 11.5V18.5C13 19.3284 12.3284 20 11.5 20C10.6716 20 10 19.3284 10 18.5V11.5C10 10.6716 10.6716 10 11.5 10ZM18.5 10C19.3284 10 20 10.6716 20 11.5V18.5C20 19.3284 19.3284 20 18.5 20C17.6716 20 17 19.3284 17 18.5V11.5C17 10.6716 17.6716 10 18.5 10Z",nextIcon:"path://M0.838834 18.7383C0.253048 18.1525 0.253048 17.2028 0.838834 16.617L7.55635 9.89949L0.838834 3.18198C0.253048 2.59619 0.253048 1.64645 0.838834 1.06066C1.42462 0.474874 2.37437 0.474874 2.96015 1.06066L10.7383 8.83883L10.8412 8.95277C11.2897 9.50267 11.2897 10.2963 10.8412 10.8462L10.7383 10.9602L2.96015 18.7383C2.37437 19.3241 1.42462 19.3241 0.838834 18.7383Z",prevIcon:"path://M10.9602 1.06066C11.5459 1.64645 11.5459 2.59619 10.9602 3.18198L4.24264 9.89949L10.9602 16.617C11.5459 17.2028 11.5459 18.1525 10.9602 18.7383C10.3744 19.3241 9.42462 19.3241 8.83883 18.7383L1.06066 10.9602L0.957771 10.8462C0.509245 10.2963 0.509245 9.50267 0.957771 8.95277L1.06066 8.83883L8.83883 1.06066C9.42462 0.474874 10.3744 0.474874 10.9602 1.06066Z",prevBtnSize:18,nextBtnSize:18,color:ut.color.accent50,borderColor:ut.color.accent50,borderWidth:0},emphasis:{label:{show:!0,color:ut.color.accent60},itemStyle:{color:ut.color.accent60,borderColor:ut.color.accent60},controlStyle:{color:ut.color.accent70,borderColor:ut.color.accent70}},progress:{lineStyle:{color:ut.color.accent30},itemStyle:{color:ut.color.accent40}},data:[]}),e}(Qf);Ne(Jf,vi.prototype);var tg=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return nt(e,t),e.type="timeline",e}(hn),eg=function(t){function e(e,n,a,i){var o=t.call(this,e,n,a)||this;return o.type=i||"value",o}return nt(e,t),e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return"horizontal"===this.model.get("orient")},e}(fn),ng=Math.PI,ag=k(),ig=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return nt(e,t),e.prototype.init=function(t,e){this.api=e},e.prototype.render=function(t,e,n){if(this.model=t,this.api=n,this.ecModel=e,this.group.removeAll(),t.get("show",!0)){var a=this._layout(t,n),i=this._createGroup("_mainGroup"),o=this._createGroup("_labelGroup"),r=this._axis=this._createAxis(a,t);t.formatTooltip=function(t){var e=r.scale.getLabel({value:t});return At("nameValue",{noName:!0,value:e})},G(["AxisLine","AxisTick","Control","CurrentPointer"],function(e){this["_render"+e](a,i,r,t)},this),this._renderAxisLabel(a,o,r,t),this._position(a,t)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(t,e){var n,a,i,o,r=t.get(["label","position"]),l=t.get("orient"),s=function(t,e){return Et(t.getBoxLayoutParams(),kt(t,e).refContainer,t.get("padding"))}(t,e),u={horizontal:"center",vertical:(n=null==r||"auto"===r?"horizontal"===l?s.y+s.height/2<e.getHeight()/2?"-":"+":s.x+s.width/2<e.getWidth()/2?"+":"-":Dt(r)?{horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[l][r]:r)>=0||"+"===n?"left":"right"},d={horizontal:n>=0||"+"===n?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:ng/2},h="vertical"===l?s.height:s.width,p=t.getModel("controlStyle"),f=p.get("show",!0),g=f?p.get("itemSize"):0,v=f?p.get("itemGap"):0,y=g+v,m=t.get(["label","rotate"])||0;m=m*ng/180;var x=p.get("position",!0),_=f&&p.get("showPlayBtn",!0),b=f&&p.get("showPrevBtn",!0),w=f&&p.get("showNextBtn",!0),S=0,I=h;"left"===x||"bottom"===x?(_&&(a=[0,0],S+=y),b&&(i=[S,0],S+=y),w&&(o=[I-g,0],I-=y)):(_&&(a=[I-g,0],I-=y),b&&(i=[0,0],S+=y),w&&(o=[I-g,0],I-=y));var M=[S,I];return t.get("inverse")&&M.reverse(),{viewRect:s,mainLength:h,orient:l,rotation:c[l],labelRotation:m,labelPosOpt:n,labelAlign:t.get(["label","align"])||u[l],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||d[l],playPosition:a,prevBtnPosition:i,nextBtnPosition:o,axisExtent:M,controlSize:g,controlGap:v}},e.prototype._position=function(t,e){var n=this._mainGroup,a=this._labelGroup,i=t.viewRect;if("vertical"===t.orient){var o=Zt(),r=i.x,l=i.y+i.height;Ht(o,o,[-r,-l]),yn(o,o,-ng/2),Ht(o,o,[r,l]),(i=i.clone()).applyTransform(o)}var s=v(i),u=v(n.getBoundingRect()),d=v(a.getBoundingRect()),c=[n.x,n.y],h=[a.x,a.y];h[0]=c[0]=s[0][0];var p,f=t.labelPosOpt;null==f||Dt(f)?(y(c,u,s,1,p="+"===f?0:1),y(h,d,s,1,1-p)):(y(c,u,s,1,p=f>=0?0:1),h[1]=c[1]+f);function g(t){t.originX=s[0][0]-t.x,t.originY=s[1][0]-t.y}function v(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function y(t,e,n,a,i){t[a]+=n[a][i]-e[a][i]}n.setPosition(c),a.setPosition(h),n.rotation=a.rotation=t.rotation,g(n),g(a)},e.prototype._createAxis=function(t,e){var n=e.getData(),a=e.get("axisType"),i=function(t,e){if(e=e||t.get("type"),e)switch(e){case"category":return new ri({ordinalMeta:t.getCategories(),extent:[1/0,-1/0]});case"time":return new _i({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new xi}}(e,a);i.getTicks=function(){return n.mapArray(["value"],function(t){return{value:t}})};var o=n.getDataExtent("value");i.setExtent(o[0],o[1]),i.calcNiceTicks();var r=new eg("value",i,t.axisExtent,a);return r.model=e,r},e.prototype._createGroup=function(t){var e=this[t]=new at;return this.group.add(e),e},e.prototype._renderAxisLine=function(t,e,n,a){var i=n.getExtent();if(a.get(["lineStyle","show"])){var o=new qe({shape:{x1:i[0],y1:0,x2:i[1],y2:0},style:wt({lineCap:"round"},a.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});e.add(o);var r=this._progressLine=new qe({shape:{x1:i[0],x2:this._currentPointer?this._currentPointer.x:i[0],y1:0,y2:0},style:vt({lineCap:"round",lineWidth:o.style.lineWidth},a.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});e.add(r)}},e.prototype._renderAxisTick=function(t,e,n,a){var i=this,o=a.getData(),r=n.scale.getTicks();this._tickSymbols=[],G(r,function(t){var r=n.dataToCoord(t.value),l=o.getItemModel(t.value),s=l.getModel("itemStyle"),u=l.getModel(["emphasis","itemStyle"]),d=l.getModel(["progress","itemStyle"]),c={x:r,y:0,onclick:Xt(i._changeTimeline,i,t.value)},h=og(l,s,e,c);h.ensureState("emphasis").style=u.getItemStyle(),h.ensureState("progress").style=d.getItemStyle(),yi(h);var p=V(h);l.get("tooltip")?(p.dataIndex=t.value,p.dataModel=a):p.dataIndex=p.dataModel=null,i._tickSymbols.push(h)})},e.prototype._renderAxisLabel=function(t,e,n,a){var i=this;if(n.getLabelModel().get("show")){var o=a.getData(),r=n.getViewLabels();this._tickLabels=[],G(r,function(a){var r=a.tickValue,l=o.getItemModel(r),s=l.getModel("label"),u=l.getModel(["emphasis","label"]),d=l.getModel(["progress","label"]),c=n.dataToCoord(a.tickValue),h=new Wt({x:c,y:0,rotation:t.labelRotation-t.rotation,onclick:Xt(i._changeTimeline,i,r),silent:!1,style:jt(s,{text:a.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});h.ensureState("emphasis").style=jt(u),h.ensureState("progress").style=jt(d),e.add(h),yi(h),ag(h).dataIndex=r,i._tickLabels.push(h)})}},e.prototype._renderControl=function(t,e,n,a){var i=t.controlSize,o=t.rotation,r=a.getModel("controlStyle").getItemStyle(),l=a.getModel(["emphasis","controlStyle"]).getItemStyle(),s=a.getPlayState(),u=a.get("inverse",!0);function d(t,n,s,u){if(t){var d=mi(K(a.get(["controlStyle",n+"BtnSize"]),i),i),c=function(t,e,n,a){var i=a.style,o=bi(t.get(["controlStyle",e]),a||{},new E(n[0],n[1],n[2],n[3]));i&&o.setStyle(i);return o}(a,n+"Icon",[0,-d/2,d,d],{x:t[0],y:t[1],originX:i/2,originY:0,rotation:u?-o:0,rectHover:!0,style:r,onclick:s});c.ensureState("emphasis").style=l,e.add(c),yi(c)}}d(t.nextBtnPosition,"next",Xt(this._changeTimeline,this,u?"-":"+")),d(t.prevBtnPosition,"prev",Xt(this._changeTimeline,this,u?"+":"-")),d(t.playPosition,s?"stop":"play",Xt(this._handlePlayClick,this,!s),!0)},e.prototype._renderCurrentPointer=function(t,e,n,a){var i=a.getData(),o=a.getCurrentIndex(),r=i.getItemModel(o).getModel("checkpointStyle"),l=this,s={onCreate:function(t){t.draggable=!0,t.drift=Xt(l._handlePointerDrag,l),t.ondragend=Xt(l._handlePointerDragend,l),rg(t,l._progressLine,o,n,a,!0)},onUpdate:function(t){rg(t,l._progressLine,o,n,a)}};this._currentPointer=og(r,r,this._mainGroup,{},this._currentPointer,s)},e.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},e.prototype._handlePointerDrag=function(t,e,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,e){var n=this._toAxisCoord(t)[0],a=this._axis,i=bn(a.getExtent().slice());n>i[1]&&(n=i[1]),n<i[0]&&(n=i[0]),this._currentPointer.x=n,this._currentPointer.markRedraw();var o=this._progressLine;o&&(o.shape.x2=n,o.dirty());var r=this._findNearestTick(n),l=this.model;(e||r!==l.getCurrentIndex()&&l.get("realtime"))&&this._changeTimeline(r)},e.prototype._doPlayStop=function(){var t=this;this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(function(){var e=t.model;t._changeTimeline(e.getCurrentIndex()+(e.get("rewind",!0)?-1:1))},this.model.get("playInterval")))},e.prototype._toAxisCoord=function(t){var e=this._mainGroup.getLocalTransform();return mn(t,e,!0)},e.prototype._findNearestTick=function(t){var e,n=this.model.getData(),a=1/0,i=this._axis;return n.each(["value"],function(n,o){var r=i.dataToCoord(n),l=Math.abs(r-t);l<a&&(a=l,e=o)}),e},e.prototype._clearTimer=function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},e.prototype._changeTimeline=function(t){var e=this.model.getCurrentIndex();"+"===t?t=e+1:"-"===t&&(t=e-1),this.api.dispatchAction({type:"timelineChange",currentIndex:t,from:this.uid})},e.prototype._updateTicksStatus=function(){var t=this.model.getCurrentIndex(),e=this._tickSymbols,n=this._tickLabels;if(e)for(var a=0;a<e.length;a++)e&&e[a]&&e[a].toggleState("progress",a<t);if(n)for(a=0;a<n.length;a++)n&&n[a]&&n[a].toggleState("progress",ag(n[a]).dataIndex<=t)},e.type="timeline.slider",e}(tg);function og(t,e,n,a,i,o){var r=e.get("color");if(i)i.setColor(r),n.add(i),o&&o.onUpdate(i);else{var l=t.get("symbol");(i=Je(l,-1,-1,2,2,r)).setStyle("strokeNoScale",!0),n.add(i),o&&o.onCreate(i)}var s=e.getItemStyle(["color"]);i.setStyle(s),a=un({rectHover:!0,z2:100},a,!0);var u=Bn(t.get("symbolSize"));a.scaleX=u[0]/2,a.scaleY=u[1]/2;var d=Gn(t.get("symbolOffset"),u);d&&(a.x=(a.x||0)+d[0],a.y=(a.y||0)+d[1]);var c=t.get("symbolRotate");return a.rotation=(c||0)*Math.PI/180||0,i.attr(a),i.updateTransform(),i}function rg(t,e,n,a,i,o){if(!t.dragging){var r=i.getModel("checkpointStyle"),l=a.dataToCoord(i.getData().get("value",n));if(o||!r.get("animation",!0))t.attr({x:l,y:0}),e&&e.attr({shape:{x2:l}});else{var s={duration:r.get("animationDuration",!0),easing:r.get("animationEasing",!0)};t.stopAnimation(null,!0),t.animateTo({x:l,y:0},s),e&&e.animateTo({shape:{x2:l}},s)}}}function lg(t){var e=t&&t.timeline;It(e)||(e=e?[e]:[]),G(e,function(t){t&&function(t){var e=t.type,n={number:"value",time:"time"};n[e]&&(t.axisType=n[e],delete t.type);if(sg(t),ug(t,"controlPosition")){var a=t.controlStyle||(t.controlStyle={});ug(a,"position")||(a.position=t.controlPosition),"none"!==a.position||ug(a,"show")||(a.show=!1,delete a.position),delete t.controlPosition}G(t.data||[],function(t){sn(t)&&!It(t)&&(!ug(t,"value")&&ug(t,"name")&&(t.value=t.name),sg(t))})}(t)})}function sg(t){var e=t.itemStyle||(t.itemStyle={}),n=e.emphasis||(e.emphasis={}),a=t.label||t.label||{},i=a.normal||(a.normal={}),o={normal:1,emphasis:1};G(a,function(t,e){o[e]||ug(i,e)||(i[e]=t)}),n.label&&!ug(a,"emphasis")&&(a.emphasis=n.label,delete n.label)}function ug(t,e){return t.hasOwnProperty(e)}var dg=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return nt(e,t),e.prototype.createMarkerModelFromSeries=function(t,n,a){return new e(t,n,a)},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}(wi),cg=k(),hg=function(t,e,n,a){var i=a[0],o=a[1];if(i&&o){var r=Mi(t,i),l=Mi(t,o),s=r.coord,u=l.coord;s[0]=ue(s[0],-1/0),s[1]=ue(s[1],-1/0),u[0]=ue(u[0],1/0),u[1]=ue(u[1],1/0);var d=$n([{},r,l]);return d.coord=[r.coord,l.coord],d.x0=r.x,d.y0=r.y,d.x1=l.x,d.y1=l.y,d}};function pg(t){return!isNaN(t)&&!isFinite(t)}function fg(t,e,n,a){var i=1-t;return pg(e[i])&&pg(n[i])}function gg(t,e){var n=e.coord[0],a=e.coord[1],i={coord:n,x:e.x0,y:e.y0},o={coord:a,x:e.x1,y:e.y1};return Jn(t,"cartesian2d")?!(!n||!a||!fg(1,n,a)&&!fg(0,n,a))||Ci(t,i,o):Ti(t,i)||Ti(t,o)}function vg(t,e,n,a,i){var o,r=a.coordinateSystem,l=t.getItemModel(e),s=B(l.get(n[0]),i.getWidth()),u=B(l.get(n[1]),i.getHeight());if(isNaN(s)||isNaN(u)){if(a.getMarkerPosition){var d=t.getValues(["x0","y0"],e),c=t.getValues(["x1","y1"],e),h=r.clampData(d),p=r.clampData(c),f=[];"x0"===n[0]?f[0]=h[0]>p[0]?c[0]:d[0]:f[0]=h[0]>p[0]?d[0]:c[0],"y0"===n[1]?f[1]=h[1]>p[1]?c[1]:d[1]:f[1]=h[1]>p[1]?d[1]:c[1],o=a.getMarkerPosition(f,n,!0)}else{var g=[m=t.get(n[0],e),x=t.get(n[1],e)];r.clampData&&r.clampData(g,g),o=r.dataToPoint(g,!0)}if(Jn(r,"cartesian2d")){var v=r.getAxis("x"),y=r.getAxis("y"),m=t.get(n[0],e),x=t.get(n[1],e);pg(m)?o[0]=v.toGlobalCoord(v.getExtent()["x0"===n[0]?0:1]):pg(x)&&(o[1]=y.toGlobalCoord(y.getExtent()["y0"===n[1]?0:1]))}isNaN(s)||(o[0]=s),isNaN(u)||(o[1]=u)}else o=[s,u];return o}var yg=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],mg=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return nt(e,t),e.prototype.updateTransform=function(t,e,n){e.eachSeries(function(t){var e=wi.getMarkerModelFromSeries(t,"markArea");if(e){var a=e.getData();a.each(function(e){var i=St(yg,function(i){return vg(a,e,i,t,n)});a.setItemLayout(e,i),a.getItemGraphicEl(e).setShape("points",i)})}},this)},e.prototype.renderSeries=function(t,e,n,a){var i=t.coordinateSystem,o=t.id,r=t.getData(),l=this.markerGroupMap,s=l.get(o)||l.set(o,{group:new at});this.group.add(s.group),this.markKeep(s);var u=function(t,e,n){var a,i,o=["x0","y0","x1","y1"];if(t){var r=St(t&&t.dimensions,function(t){var n=e.getData(),a=n.getDimensionInfo(n.mapDimension(t))||{};return wt(wt({},a),{name:t,ordinalMeta:null})});i=St(o,function(t,e){return{name:t,type:r[e%2].type}}),a=new Tt(i,n)}else a=new Tt(i=[{name:"value",type:"float"}],n);var l=St(n.get("data"),_t(hg,e,t,n));t&&(l=F(l,_t(gg,t)));var s=t?function(t,e,n,a){var o=t.coord[Math.floor(a/2)][a%2];return Di(o,i[a])}:function(t,e,n,a){return Di(t.value,i[a])};return a.initData(l,null,s),a.hasItemOption=!0,a}(i,t,e);e.setData(u),u.each(function(e){var n=St(yg,function(n){return vg(u,e,n,t,a)}),o=i.getAxis("x").scale,l=i.getAxis("y").scale,s=o.getExtent(),d=l.getExtent(),c=[o.parse(u.get("x0",e)),o.parse(u.get("x1",e))],h=[l.parse(u.get("y0",e)),l.parse(u.get("y1",e))];bn(c),bn(h);var p=!!(s[0]>c[1]||s[1]<c[0]||d[0]>h[1]||d[1]<h[0]);u.setItemLayout(e,{points:n,allClipped:p});var f=u.getItemModel(e),g=f.getModel("itemStyle").getItemStyle(),v=f.get("z2"),y=Si(r,"color");g.fill||(g.fill=y,Dt(g.fill)&&(g.fill=le(g.fill,.4))),g.stroke||(g.stroke=y),u.setItemVisual(e,"style",g),u.setItemVisual(e,"z2",K(v,0))}),u.diff(cg(s).data).add(function(t){var e=u.getItemLayout(t),n=u.getItemVisual(t,"z2");if(!e.allClipped){var a=new Gt({z2:K(n,0),shape:{points:e.points}});u.setItemGraphicEl(t,a),s.group.add(a)}}).update(function(t,n){var a=cg(s).data.getItemGraphicEl(n),i=u.getItemLayout(t),o=u.getItemVisual(t,"z2");i.allClipped?a&&s.group.remove(a):(a?tt(a,{z2:K(o,0),shape:{points:i.points}},e,t):a=new Gt({shape:{points:i.points}}),u.setItemGraphicEl(t,a),s.group.add(a))}).remove(function(t){var e=cg(s).data.getItemGraphicEl(t);s.group.remove(e)}).execute(),u.eachItemGraphicEl(function(t,n){var a=u.getItemModel(n),i=u.getItemVisual(n,"style");t.useStyle(u.getItemVisual(n,"style")),ee(t,ne(a),{labelFetcher:e,labelDataIndex:n,defaultText:u.getName(n)||"",inheritColor:Dt(i.fill)?le(i.fill,1):ut.color.neutral99}),yt(t,a),Yt(t,null,null,a.get(["emphasis","disabled"])),V(t).dataModel=e}),cg(s).data=u,s.group.silent=e.get("silent")||t.get("silent")},e.type="markArea",e}(Ii);var xg=function(){function t(t){this._thumbnailModel=t}return t.prototype.reset=function(t){this._renderVersion=t.getMainProcessVersion()},t.prototype.renderContent=function(t){var e=t.api.getViewOfComponentModel(this._thumbnailModel);e&&(t.group.silent=!0,e.renderContent({group:t.group,targetTrans:t.targetTrans,z2Range:Ai(t.group),roamType:t.roamType,viewportRect:t.viewportRect,renderVersion:this._renderVersion}))},t.prototype.updateWindow=function(t,e){var n=e.getViewOfComponentModel(this._thumbnailModel);n&&n.updateWindow({targetTrans:t,renderVersion:this._renderVersion})},t}(),_g=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.preventAutoZ=!0,n}return nt(e,t),e.prototype.optionUpdated=function(t,e){this._updateBridge()},e.prototype._updateBridge=function(){var t=this._birdge=this._birdge||new xg(this);(this._target=null,this.ecModel.eachSeries(function(t){Xs(t,null)}),this.shouldShow())&&Xs(this.getTarget().baseMapProvider,t)},e.prototype.shouldShow=function(){return this.getShallow("show",!0)},e.prototype.getBridge=function(){return this._birdge},e.prototype.getTarget=function(){if(this._target)return this._target;var t=this.getReferringComponents("series",{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];return t?"graph"!==t.subType&&(t=null):t=this.ecModel.queryComponents({mainType:"series",subType:"graph"})[0],this._target={baseMapProvider:t},this._target},e.type="thumbnail",e.layoutMode="box",e.dependencies=["series","geo"],e.defaultOption={show:!0,right:1,bottom:1,height:"25%",width:"25%",itemStyle:{borderColor:ut.color.border,borderWidth:2},windowStyle:{borderWidth:1,color:ut.color.neutral30,borderColor:ut.color.neutral40,opacity:.3},z:10},e}(pn),bg=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return nt(e,t),e.prototype.render=function(t,e,n){if(this._api=n,this._model=t,this._coordSys||(this._coordSys=new rt),this._isEnabled()){this._renderVersion=n.getMainProcessVersion();var a=this.group;a.removeAll();var i=t.getModel("itemStyle"),o=i.getItemStyle();null==o.fill&&(o.fill=e.get("backgroundColor")||ut.color.neutral00);var r=kt(t,n).refContainer,l=Et(Pi(t,!0),r),s=o.lineWidth||0,u=this._contentRect=Ja(l.clone(),s/2,!0,!0),d=new at;a.add(d),d.setClipPath(new oe({shape:u.plain()}));var c=this._targetGroup=new at;d.add(c);var h=l.plain();h.r=i.getShallow("borderRadius",!0),a.add(this._bgRect=new oe({style:o,shape:h,silent:!1,cursor:"grab"}));var p=t.getModel("windowStyle"),f=p.getShallow("borderRadius",!0);d.add(this._windowRect=new oe({shape:{x:0,y:0,width:0,height:0,r:f},style:p.getItemStyle(),silent:!1,cursor:"grab"})),this._dealRenderContent(),this._dealUpdateWindow(),Sg(t,this)}else this._clear()},e.prototype.renderContent=function(t){this._bridgeRendered=t,this._isEnabled()&&(this._dealRenderContent(),this._dealUpdateWindow(),Sg(this._model,this))},e.prototype._dealRenderContent=function(){var t=this._bridgeRendered;if(t&&t.renderVersion===this._renderVersion){var e=this._targetGroup,n=this._coordSys,a=this._contentRect;if(e.removeAll(),t){var i=t.group,o=i.getBoundingRect();e.add(i),this._bgRect.z2=t.z2Range.min-10,n.setBoundingRect(o.x,o.y,o.width,o.height);var r=Et({left:"center",top:"center",aspect:o.width/o.height},a);n.setViewRect(r.x,r.y,r.width,r.height),i.attr(n.getTransformInfo().raw),this._windowRect.z2=t.z2Range.max+10,this._resetRoamController(t.roamType)}}},e.prototype.updateWindow=function(t){var e=this._bridgeRendered;e&&e.renderVersion===t.renderVersion&&(e.targetTrans=t.targetTrans),this._isEnabled()&&this._dealUpdateWindow()},e.prototype._dealUpdateWindow=function(){var t=this._bridgeRendered;if(t&&t.renderVersion===this._renderVersion){var e=ui([],t.targetTrans),n=ki([],this._coordSys.transform,e);this._transThisToTarget=ui([],n);var a=t.viewportRect;(a=a?a.clone():new E(0,0,this._api.getWidth(),this._api.getHeight())).applyTransform(n);var i=this._windowRect,o=i.shape.r;i.setShape(vt({r:o},a))}},e.prototype._resetRoamController=function(t){var e=this,n=this._api,a=this._roamController;a||(a=this._roamController=new it(n.getZr())),t&&this._isEnabled()?(a.enable(t,{api:n,zInfo:{component:this._model},triggerInfo:{roamTrigger:null,isInSelf:function(t,n,a){return e._contentRect.contain(n,a)}}}),a.off("pan").off("zoom").on("pan",Xt(this._onPan,this)).on("zoom",Xt(this._onZoom,this))):a.disable()},e.prototype._onPan=function(t){var e=this._transThisToTarget;if(this._isEnabled()&&e){var n=Ei([],[t.oldX,t.oldY],e),a=Ei([],[t.oldX-t.dx,t.oldY-t.dy],e);this._api.dispatchAction(wg(this._model.getTarget().baseMapProvider,{dx:a[0]-n[0],dy:a[1]-n[1]}))}},e.prototype._onZoom=function(t){var e=this._transThisToTarget;if(this._isEnabled()&&e){var n=Ei([],[t.originX,t.originY],e);this._api.dispatchAction(wg(this._model.getTarget().baseMapProvider,{zoom:1/t.scale,originX:n[0],originY:n[1]}))}},e.prototype._isEnabled=function(){var t=this._model;return!(!t||!t.shouldShow())&&!!t.getTarget().baseMapProvider},e.prototype._clear=function(){this.group.removeAll(),this._bridgeRendered=null,this._roamController&&this._roamController.disable()},e.prototype.remove=function(){this._clear()},e.prototype.dispose=function(){this._clear()},e.type="thumbnail",e}(hn);function wg(t,e){var n={type:"series"===t.mainType?t.subType+"Roam":t.mainType+"Roam"};return n[t.mainType+"Id"]=t.id,wt(n,e),n}function Sg(t,e){var n=Ni(t);zi(e.group,n.z,n.zlevel)}var Ig={label:{enabled:!0},decal:{show:!1}},Mg=k(),Cg={};function Tg(t,e){var n=t.getModel("aria");if(n.get("enabled")){var a=ke(Ig);un(a.label,t.getLocaleModel().get("aria"),!1),un(n.option,a,!1),function(){if(n.getModel("decal").get("show")){var e=Ot();t.eachSeries(function(t){if(!t.isColorBySeries()){var n=e.get(t.type);n||(n={},e.set(t.type,n)),Mg(t).scope=n}}),t.eachRawSeries(function(e){if(!t.isSeriesFiltered(e))if(R(e.enableAriaDecal))e.enableAriaDecal();else{var n=e.getData();if(e.isColorBySeries()){var a=Rt(e.ecModel,e.name,Cg,t.getSeriesCount()),i=n.getVisual("decal");n.setVisual("decal",u(i,a))}else{var o=e.getRawData(),r={},l=Mg(e).scope;n.each(function(t){var e=n.getRawIndex(t);r[e]=t});var s=o.count();o.each(function(t){var a=r[t],i=o.getName(t)||t+"",d=Rt(e.ecModel,i,l,s),c=n.getItemVisual(a,"decal");n.setItemVisual(a,"decal",u(c,d))})}}function u(t,e){var n=t?wt(wt({},e),t):e;return n.dirty=!0,n}})}}(),function(){var a=e.getZr().dom;if(!a)return;var o=t.getLocaleModel().get("aria"),r=n.getModel("label");if(r.option=vt(r.option,o),!r.get("enabled"))return;if(a.setAttribute("role","img"),r.get("description"))return void a.setAttribute("aria-label",r.get("description"));var l,s=t.getSeriesCount(),u=r.get(["data","maxCount"])||10,d=r.get(["series","maxCount"])||10,c=Math.min(s,d);if(s<1)return;var h=function(){var e=t.get("title");e&&e.length&&(e=e[0]);return e&&e.text}();l=h?i(r.get(["general","withTitle"]),{title:h}):r.get(["general","withoutTitle"]);var p=[];l+=i(s>1?r.get(["series","multiple","prefix"]):r.get(["series","single","prefix"]),{seriesCount:s}),t.eachSeries(function(e,n){if(n<c){var a=void 0,o=e.get("name")?"withName":"withoutName";a=i(a=s>1?r.get(["series","multiple",o]):r.get(["series","single",o]),{seriesId:e.seriesIndex,seriesName:e.get("name"),seriesType:(_=e.subType,b=t.getLocaleModel().get(["series","typeNames"]),b[_]||b.chart)});var l=e.getData();if(l.count()>u)a+=i(r.get(["data","partialData"]),{displayCnt:u});else a+=r.get(["data","allData"]);for(var d=r.get(["data","separator","middle"]),h=r.get(["data","separator","end"]),f=r.get(["data","excludeDimensionId"]),g=[],v=0;v<l.count();v++)if(v<u){var y=l.getName(v),m=f?F(l.getValues(v),function(t,e){return-1===J(f,e)}):l.getValues(v),x=r.get(["data",y?"withName":"withoutName"]);g.push(i(x,{name:y,value:m.join(d)}))}a+=g.join(d)+h,p.push(a)}var _,b});var f=r.getModel(["series","multiple","separator"]),g=f.get("middle"),v=f.get("end");l+=p.join(g)+v,a.setAttribute("aria-label",l)}()}function i(t,e){if(!Dt(t))return t;var n=t;return G(e,function(t,e){n=n.replace(new RegExp("\\{\\s*"+e+"\\s*\\}","g"),t)}),n}}function Dg(t){if(t&&t.aria){var e=t.aria;null!=e.show&&(e.enabled=e.show),e.label=e.label||{},G(["description","general","series","data"],function(t){null!=e[t]&&(e.label[t]=e[t])})}}var Lg={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},Ag=function(){function t(t){if(null==(this._condVal=Dt(t)?new RegExp(t):Vi(t)?t:null)){Vn("")}}return t.prototype.evaluate=function(t){var e=typeof t;return Dt(e)?this._condVal.test(t):!!ce(e)&&this._condVal.test(t+"")},t}(),Pg=function(){function t(){}return t.prototype.evaluate=function(){return this.value},t}(),kg=function(){function t(){}return t.prototype.evaluate=function(){for(var t=this.children,e=0;e<t.length;e++)if(!t[e].evaluate())return!1;return!0},t}(),Eg=function(){function t(){}return t.prototype.evaluate=function(){for(var t=this.children,e=0;e<t.length;e++)if(t[e].evaluate())return!0;return!1},t}(),Ng=function(){function t(){}return t.prototype.evaluate=function(){return!this.child.evaluate()},t}(),zg=function(){function t(){}return t.prototype.evaluate=function(){for(var t=!!this.valueParser,e=(0,this.getValue)(this.valueGetterParam),n=t?this.valueParser(e):null,a=0;a<this.subCondList.length;a++)if(!this.subCondList[a].evaluate(t?n:e))return!1;return!0},t}();function Rg(t,e){if(!0===t||!1===t){var n=new Pg;return n.value=t,n}return Vg(t)||Vn(""),t.and?Og("and",t,e):t.or?Og("or",t,e):t.not?function(t,e){var n=t.not,a="";Vg(n)||Vn(a);var i=new Ng;i.child=Rg(n,e),i.child||Vn(a);return i}(t,e):function(t,e){for(var n="",a=e.prepareGetValue(t),i=[],o=O(t),r=t.parser,l=r?Ri(r):null,s=0;s<o.length;s++){var u=o[s];if("parser"!==u&&!e.valueGetterAttrMap.get(u)){var d=fa(Lg,u)?Lg[u]:u,c=t[u],h=l?l(c):c,p=Oi(d,h)||"reg"===d&&new Ag(h);p||Vn(n),i.push(p)}}i.length||Vn(n);var f=new zg;return f.valueGetterParam=a,f.valueParser=l,f.getValue=e.getValue,f.subCondList=i,f}(t,e)}function Og(t,e,n){var a=e[t];It(a)||Vn(""),a.length||Vn("");var i="and"===t?new kg:new Eg;return i.children=St(a,function(t){return Rg(t,n)}),i.children.length||Vn(""),i}function Vg(t){return sn(t)&&!ma(t)}var Bg=function(){function t(t,e){this._cond=Rg(t,e)}return t.prototype.evaluate=function(){return this._cond.evaluate()},t}();var Gg={type:"echarts:filter",transform:function(t){for(var e,n,a,i=t.upstream,o=(n=t.config,a={valueGetterAttrMap:Ot({dimension:!0}),prepareGetValue:function(t){var e=t.dimension;fa(t,"dimension")||Vn("");var n=i.getDimensionInfo(e);return n||Vn(""),{dimIdx:n.index}},getValue:function(t){return i.retrieveValueFromItem(e,t.dimIdx)}},new Bg(n,a)),r=[],l=0,s=i.count();l<s;l++)e=i.getRawDataItem(l),o.evaluate()&&r.push(e);return{data:r}}},Wg={type:"echarts:sort",transform:function(t){var e=t.upstream,n=t.config,a="",i=Vt(n);i.length||Vn(a);var o=[];G(i,function(t){var n=t.dimension,i=t.order,r=t.parser,l=t.incomparable;if(null==n&&Vn(a),"asc"!==i&&"desc"!==i&&Vn(a),l&&"min"!==l&&"max"!==l){Vn("")}if("asc"!==i&&"desc"!==i){Vn("")}var s=e.getDimensionInfo(n);s||Vn(a);var u=r?Ri(r):null;r&&!u&&Vn(a),o.push({dimIdx:s.index,parser:u,comparator:new Bi(i,l)})});var r=e.sourceFormat;r!==On&&r!==Gi&&Vn(a);for(var l=[],s=0,u=e.count();s<u;s++)l.push(e.getRawDataItem(s));return l.sort(function(t,n){for(var a=0;a<o.length;a++){var i=o[a],r=e.retrieveValueFromItem(t,i.dimIdx),l=e.retrieveValueFromItem(n,i.dimIdx);i.parser&&(r=i.parser(r),l=i.parser(l));var s=i.comparator.evaluate(r,l);if(0!==s)return s}return 0}),{data:l}}};var Fg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dataset",e}return nt(e,t),e.prototype.init=function(e,n,a){t.prototype.init.call(this,e,n,a),this._sourceManager=new Wi(this),Fi(this)},e.prototype.mergeOption=function(e,n){t.prototype.mergeOption.call(this,e,n),Fi(this)},e.prototype.optionUpdated=function(){this._sourceManager.dirty()},e.prototype.getSourceManager=function(){return this._sourceManager},e.type="dataset",e.defaultOption={seriesLayoutBy:ji},e}(pn),jg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dataset",e}return nt(e,t),e.type="dataset",e}(hn);var Yg=Math.sin,Ug=Math.cos,Xg=Math.PI,Hg=2*Math.PI,Zg=180/Xg,qg=function(){function t(){}return t.prototype.reset=function(t){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,t||4)},t.prototype.moveTo=function(t,e){this._add("M",t,e)},t.prototype.lineTo=function(t,e){this._add("L",t,e)},t.prototype.bezierCurveTo=function(t,e,n,a,i,o){this._add("C",t,e,n,a,i,o)},t.prototype.quadraticCurveTo=function(t,e,n,a){this._add("Q",t,e,n,a)},t.prototype.arc=function(t,e,n,a,i,o){this.ellipse(t,e,n,n,0,a,i,o)},t.prototype.ellipse=function(t,e,n,a,i,o,r,l){var s=r-o,u=!l,d=Math.abs(s),c=Yi(d-Hg)||(u?s>=Hg:-s>=Hg),h=s>0?s%Hg:s%Hg+Hg,p=!1;p=!!c||!Yi(d)&&h>=Xg==!!u;var f=t+n*Ug(o),g=e+a*Yg(o);this._start&&this._add("M",f,g);var v=Math.round(i*Zg);if(c){var y=1/this._p,m=(u?1:-1)*(Hg-y);this._add("A",n,a,v,1,+u,t+n*Ug(o+m),e+a*Yg(o+m)),y>.01&&this._add("A",n,a,v,0,+u,f,g)}else{var x=t+n*Ug(r),_=e+a*Yg(r);this._add("A",n,a,v,+p,+u,x,_)}},t.prototype.rect=function(t,e,n,a){this._add("M",t,e),this._add("l",n,0),this._add("l",0,a),this._add("l",-n,0),this._add("Z")},t.prototype.closePath=function(){this._d.length>0&&this._add("Z")},t.prototype._add=function(t,e,n,a,i,o,r,l,s){for(var u=[],d=this._p,c=1;c<arguments.length;c++){var h=arguments[c];if(isNaN(h))return void(this._invalid=!0);u.push(Math.round(h*d)/d)}this._d.push(t+u.join(" ")),this._start="Z"===t},t.prototype.generateStr=function(){this._str=this._invalid?"":this._d.join(""),this._d=[]},t.prototype.getStr=function(){return this._str},t}(),$g="none",Kg=Math.round;var Qg=["lineCap","miterLimit","lineJoin"],Jg=St(Qg,function(t){return"stroke-"+t.toLowerCase()});function tv(t,e,n,a){var i=null==e.opacity?1:e.opacity;if(n instanceof Qe)t("opacity",i);else{if(function(t){var e=t.fill;return null!=e&&e!==$g}(e)){var o=Ui(e.fill);t("fill",o.color);var r=null!=e.fillOpacity?e.fillOpacity*o.opacity*i:o.opacity*i;r<1&&t("fill-opacity",r)}else t("fill",$g);if(function(t){var e=t.stroke;return null!=e&&e!==$g}(e)){var l=Ui(e.stroke);t("stroke",l.color);var s=e.strokeNoScale?n.getLineScale():1,u=s?(e.lineWidth||0)/s:0,d=null!=e.strokeOpacity?e.strokeOpacity*l.opacity*i:l.opacity*i,c=e.strokeFirst;if(1!==u&&t("stroke-width",u),c&&t("paint-order",c?"stroke":"fill"),d<1&&t("stroke-opacity",d),e.lineDash){var h=Xi(n),p=h[0],f=h[1];p&&(f=Kg(f||0),t("stroke-dasharray",p.join(",")),(f||a)&&t("stroke-dashoffset",f))}for(var g=0;g<Qg.length;g++){var v=Qg[g];if(e[v]!==Hi[v]){var y=e[v]||Hi[v];y&&t(Jg[g],y)}}}}}var ev="http://www.w3.org/2000/svg",nv="http://www.w3.org/1999/xlink",av="ecmeta_";function iv(t){return document.createElementNS(ev,t)}function ov(t,e,n,a,i){return{tag:t,attrs:n||{},children:a,text:i,key:e}}function rv(t,e){var n=(e=e||{}).newline?"\n":"";return function t(e){var a=e.children,i=e.tag,o=e.attrs,r=e.text;return function(t,e){var n=[];if(e)for(var a in e){var i=e[a],o=a;!1!==i&&(!0!==i&&null!=i&&(o+='="'+i+'"'),n.push(o))}return"<"+t+" "+n.join(" ")+">"}(i,o)+("style"!==i?Zi(r):r||"")+(a?""+n+St(a,function(e){return t(e)}).join(n)+n:"")+("</"+i+">")}(t)}function lv(t){return{zrId:t,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function sv(t,e,n,a){return ov("svg","root",{width:t,height:e,xmlns:ev,"xmlns:xlink":nv,version:"1.1",baseProfile:"full",viewBox:!!a&&"0 0 "+t+" "+e},n)}var uv=0;function dv(){return uv++}var cv={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},hv="transform-origin";function pv(t,e,n){var a=wt({},t.shape);wt(a,e),t.buildPath(n,a);var i=new qg;return i.reset(Qi(t)),n.rebuildPath(i,1),i.generateStr(),i.getStr()}function fv(t,e){var n=e.originX,a=e.originY;(n||a)&&(t[hv]=n+"px "+a+"px")}var gv={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function vv(t,e){var n=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[n]=t,n}function yv(t){return Dt(t)?cv[t]?"cubic-bezier("+cv[t]+")":qi(t)?t:"":""}function mv(t,e,n,a){var i=t.animators,o=i.length,r=[];if(t instanceof Ma){var l=function(t,e,n){var a,i,o=t.shape.paths,r={};if(G(o,function(t){var e=lv(n.zrId);e.animation=!0,mv(t,{},e,!0);var o=e.cssAnims,l=e.cssNodes,s=O(o),u=s.length;if(u){var d=o[i=s[u-1]];for(var c in d){var h=d[c];r[c]=r[c]||{d:""},r[c].d+=h.d||""}for(var p in l){var f=l[p].animation;f.indexOf(i)>=0&&(a=f)}}}),a){e.d=!1;var l=vv(r,n);return a.replace(i,l)}}(t,e,n);if(l)r.push(l);else if(!o)return}else if(!o)return;for(var s={},u=0;u<o;u++){var d=i[u],c=[d.getMaxTime()/1e3+"s"],h=yv(d.getClip().easing),p=d.getDelay();h?c.push(h):c.push("linear"),p&&c.push(p/1e3+"s"),d.getLoop()&&c.push("infinite");var f=c.join(" ");s[f]=s[f]||[f,[]],s[f][1].push(d)}function g(i){var o,r=i[1],l=r.length,s={},u={},d={},c="animation-timing-function";function h(t,e,n){for(var a=t.getTracks(),i=t.getMaxTime(),o=0;o<a.length;o++){var r=a[o];if(r.needsAnimate()){var l=r.keyframes,s=r.propName;if(n&&(s=n(s)),s)for(var u=0;u<l.length;u++){var d=l[u],h=Math.round(d.time/i*100)+"%",p=yv(d.easing),f=d.rawValue;(Dt(f)||ce(f))&&(e[h]=e[h]||{},e[h][s]=d.rawValue,p&&(e[h][c]=p))}}}}for(var p=0;p<l;p++){(S=(w=r[p]).targetName)?"shape"===S&&h(w,u):!a&&h(w,s)}for(var f in s){var g={};$i(g,t),wt(g,s[f]);var v=Ki(g),y=s[f][c];d[f]=v?{transform:v}:{},fv(d[f],g),y&&(d[f][c]=y)}var m=!0;for(var f in u){d[f]=d[f]||{};var x=!o;y=u[f][c];x&&(o=new Ji);var _=o.len();o.reset(),d[f].d=pv(t,u[f],o);var b=o.len();if(!x&&_!==b){m=!1;break}y&&(d[f][c]=y)}if(!m)for(var f in d)delete d[f].d;if(!a)for(p=0;p<l;p++){var w,S;"style"===(S=(w=r[p]).targetName)&&h(w,d,function(t){return gv[t]})}var I,M=O(d),C=!0;for(p=1;p<M.length;p++){var T=M[p-1],D=M[p];if(d[T][hv]!==d[D][hv]){C=!1;break}I=d[T][hv]}if(C&&I){for(var f in d)d[f][hv]&&delete d[f][hv];e[hv]=I}if(F(M,function(t){return O(d[t]).length>0}).length)return vv(d,n)+" "+i[0]+" both"}for(var v in s){(l=g(s[v]))&&r.push(l)}if(r.length){var y=n.zrId+"-cls-"+dv();n.cssNodes["."+y]={animation:r.join(",")},e.class=y}}function xv(t,e,n,a){var i=JSON.stringify(t),o=n.cssStyleCache[i];o||(o=n.zrId+"-cls-"+dv(),n.cssStyleCache[i]=o,n.cssNodes["."+o+":hover"]=t),e.class=e.class?e.class+" "+o:o}var _v=Math.round;function bv(t){return t&&Dt(t.src)}function wv(t){return t&&R(t.toDataURL)}function Sv(t,e,n,a){tv(function(i,o){var r="fill"===i||"stroke"===i;r&&yo(o)?Nv(e,t,i,a):r&&mo(o)?zv(n,t,i,a):t[i]=o,r&&a.ssr&&"none"===o&&(t["pointer-events"]="visible")},e,n,!1),function(t,e,n){var a=t.style;if(_o(a)){var i=bo(t),o=n.shadowCache,r=o[i];if(!r){var l=t.getGlobalScale(),s=l[0],u=l[1];if(!s||!u)return;var d=a.shadowOffsetX||0,c=a.shadowOffsetY||0,h=a.shadowBlur,p=Ui(a.shadowColor),f=p.opacity,g=p.color,v=h/2/s+" "+h/2/u;r=n.zrId+"-s"+n.shadowIdx++,n.defs[r]=ov("filter",r,{id:r,x:"-100%",y:"-100%",width:"300%",height:"300%"},[ov("feDropShadow","",{dx:d/s,dy:c/u,stdDeviation:v,"flood-color":g,"flood-opacity":f})]),o[i]=r}e.filter=no(r)}}(n,t,a)}function Iv(t,e){var n=xo(e);n&&(n.each(function(e,n){null!=e&&(t[(av+n).toLowerCase()]=e+"")}),e.isSilent()&&(t[av+"silent"]="true"))}function Mv(t){return Yi(t[0]-1)&&Yi(t[1])&&Yi(t[2])&&Yi(t[3]-1)}function Cv(t,e,n){if(e&&(!function(t){return Yi(t[4])&&Yi(t[5])}(e)||!Mv(e))){var a=1e4;t.transform=Mv(e)?"translate("+_v(e[4]*a)/a+" "+_v(e[5]*a)/a+")":vo(e)}}function Tv(t,e,n){for(var a=t.points,i=[],o=0;o<a.length;o++)i.push(_v(a[o][0]*n)/n),i.push(_v(a[o][1]*n)/n);e.points=i.join(" ")}function Dv(t){return!t.smooth}var Lv,Av,Pv={circle:[(Lv=["cx","cy","r"],Av=St(Lv,function(t){return"string"==typeof t?[t,t]:t}),function(t,e,n){for(var a=0;a<Av.length;a++){var i=Av[a],o=t[i[0]];null!=o&&(e[i[1]]=_v(o*n)/n)}})],polyline:[Tv,Dv],polygon:[Tv,Dv]};function kv(t,e){var n=t.style,a=t.shape,i=Pv[t.type],o={},r=e.animation,l="path",s=t.style.strokePercent,u=e.compress&&Qi(t)||4;if(!i||e.willUpdate||i[1]&&!i[1](a)||r&&function(t){for(var e=t.animators,n=0;n<e.length;n++)if("shape"===e[n].targetName)return!0;return!1}(t)||s<1){var d=!t.path||t.shapeChanged();t.path||t.createPathProxy();var c=t.path;d&&(c.beginPath(),t.buildPath(c,t.shape),t.pathUpdated());var h=c.getVersion(),p=t,f=p.__svgPathBuilder;p.__svgPathVersion===h&&f&&s===p.__svgPathStrokePercent||(f||(f=p.__svgPathBuilder=new qg),f.reset(u),c.rebuildPath(f,s),f.generateStr(),p.__svgPathVersion=h,p.__svgPathStrokePercent=s),o.d=f.getStr()}else{l=t.type;var g=Math.pow(10,u);i[0](a,o,g)}return Cv(o,t.transform),Sv(o,n,t,e),Iv(o,t),e.animation&&mv(t,o,e),e.emphasis&&function(t,e,n){if(!t.ignore)if(t.isSilent())xv(u={"pointer-events":"none"},e,n);else{var a=t.states.emphasis&&t.states.emphasis.style?t.states.emphasis.style:{},i=a.fill;if(!i){var o=t.style&&t.style.fill,r=t.states.select&&t.states.select.style&&t.states.select.style.fill,l=t.currentStates.indexOf("select")>=0&&r||o;l&&(i=to(l))}var s=a.lineWidth;s&&(s/=!a.strokeNoScale&&t.transform?t.transform[0]:1);var u={cursor:"pointer"};i&&(u.fill=i),a.stroke&&(u.stroke=a.stroke),s&&(u["stroke-width"]=s),xv(u,e,n)}}(t,o,e),ov(l,t.id+"",o)}function Ev(t,e){return t instanceof xt?kv(t,e):t instanceof Qe?function(t,e){var n=t.style,a=n.image;if(a&&!Dt(a)&&(bv(a)?a=a.src:wv(a)&&(a=a.toDataURL())),a){var i=n.x||0,o=n.y||0,r={href:a,width:n.width,height:n.height};return i&&(r.x=i),o&&(r.y=o),Cv(r,t.transform),Sv(r,n,t,e),Iv(r,t),e.animation&&mv(t,r,e),ov("image",t.id+"",r)}}(t,e):t instanceof eo?function(t,e){var n=t.style,a=n.text;if(null!=a&&(a+=""),a&&!isNaN(n.x)&&!isNaN(n.y)){var i=n.font||ao,o=n.x||0,r=io(n.y||0,oo(i),n.textBaseline),l={"dominant-baseline":"central","text-anchor":ro[n.textAlign]||n.textAlign};if(lo(n)){var s="",u=n.fontStyle,d=so(n.fontSize);if(!parseFloat(d))return;var c=n.fontFamily||uo,h=n.fontWeight;s+="font-size:"+d+";font-family:"+c+";",u&&"normal"!==u&&(s+="font-style:"+u+";"),h&&"normal"!==h&&(s+="font-weight:"+h+";"),l.style=s}else l.style="font: "+i;return a.match(/\s/)&&(l["xml:space"]="preserve"),o&&(l.x=o),r&&(l.y=r),Cv(l,t.transform),Sv(l,n,t,e),Iv(l,t),e.animation&&mv(t,l,e),ov("text",t.id+"",l,void 0,a)}}(t,e):void 0}function Nv(t,e,n,a){var i,o=t[n],r={gradientUnits:o.global?"userSpaceOnUse":"objectBoundingBox"};if(co(o))i="linearGradient",r.x1=o.x,r.y1=o.y,r.x2=o.x2,r.y2=o.y2;else{if(!ho(o))return;i="radialGradient",r.cx=K(o.x,.5),r.cy=K(o.y,.5),r.r=K(o.r,.5)}for(var l=o.colorStops,s=[],u=0,d=l.length;u<d;++u){var c=100*po(l[u].offset)+"%",h=l[u].color,p=Ui(h),f=p.color,g=p.opacity,v={offset:c};v["stop-color"]=f,g<1&&(v["stop-opacity"]=g),s.push(ov("stop",u+"",v))}var y=rv(ov(i,"",r,s)),m=a.gradientCache,x=m[y];x||(x=a.zrId+"-g"+a.gradientIdx++,m[y]=x,r.id=x,a.defs[x]=ov(i,x,r,s)),e[n]=no(x)}function zv(t,e,n,a){var i,o=t.style[n],r=t.getBoundingRect(),l={},s=o.repeat,u="no-repeat"===s,d="repeat-x"===s,c="repeat-y"===s;if(fo(o)){var h=o.imageWidth,p=o.imageHeight,f=void 0,g=o.image;if(Dt(g)?f=g:bv(g)?f=g.src:wv(g)&&(f=g.toDataURL()),"undefined"==typeof Image){var v="Image width/height must been given explictly in svg-ssr renderer.";bt(h,v),bt(p,v)}else if(null==h||null==p){var y=function(t,e){if(t){var n=t.elm,a=h||e.width,i=p||e.height;"pattern"===t.tag&&(d?(i=1,a/=r.width):c&&(a=1,i/=r.height)),t.attrs.width=a,t.attrs.height=i,n&&(n.setAttribute("width",a),n.setAttribute("height",i))}},m=go(f,null,t,function(t){u||y(w,t),y(i,t)});m&&m.width&&m.height&&(h=h||m.width,p=p||m.height)}i=ov("image","img",{href:f,width:h,height:p}),l.width=h,l.height=p}else o.svgElement&&(i=ke(o.svgElement),l.width=o.svgWidth,l.height=o.svgHeight);if(i){var x,_;u?x=_=1:d?(_=1,x=l.width/r.width):c?(x=1,_=l.height/r.height):l.patternUnits="userSpaceOnUse",null==x||isNaN(x)||(l.width=x),null==_||isNaN(_)||(l.height=_);var b=Ki(o);b&&(l.patternTransform=b);var w=ov("pattern","",l,[i]),S=rv(w),I=a.patternCache,M=I[S];M||(M=a.zrId+"-p"+a.patternIdx++,I[S]=M,l.id=M,w=a.defs[M]=ov("pattern",M,l,[i])),e[n]=no(M)}}function Rv(t,e,n){var a=n.clipPathCache,i=n.defs,o=a[t.id];if(!o){var r={id:o=n.zrId+"-c"+n.clipPathIdx++};a[t.id]=o,i[o]=ov("clipPath",o,r,[kv(t,n)])}e["clip-path"]=no(o)}function Ov(t){return document.createTextNode(t)}function Vv(t,e,n){t.insertBefore(e,n)}function Bv(t,e){t.removeChild(e)}function Gv(t,e){t.appendChild(e)}function Wv(t){return t.parentNode}function Fv(t){return t.nextSibling}function jv(t,e){t.textContent=e}var Yv=ov("","");function Uv(t){return void 0===t}function Xv(t){return void 0!==t}function Hv(t,e,n){for(var a={},i=e;i<=n;++i){var o=t[i].key;void 0!==o&&(a[o]=i)}return a}function Zv(t,e){var n=t.key===e.key;return t.tag===e.tag&&n}function qv(t){var e,n=t.children,a=t.tag;if(Xv(a)){var i=t.elm=iv(a);if(Qv(Yv,t),It(n))for(e=0;e<n.length;++e){var o=n[e];null!=o&&Gv(i,qv(o))}else Xv(t.text)&&!sn(t.text)&&Gv(i,Ov(t.text))}else t.elm=Ov(t.text);return t.elm}function $v(t,e,n,a,i){for(;a<=i;++a){var o=n[a];null!=o&&Vv(t,qv(o),e)}}function Kv(t,e,n,a){for(;n<=a;++n){var i=e[n];if(null!=i)if(Xv(i.tag))Bv(Wv(i.elm),i.elm);else Bv(t,i.elm)}}function Qv(t,e){var n,a=e.elm,i=t&&t.attrs||{},o=e.attrs||{};if(i!==o){for(n in o){var r=o[n];i[n]!==r&&(!0===r?a.setAttribute(n,""):!1===r?a.removeAttribute(n):"style"===n?a.style.cssText=r:120!==n.charCodeAt(0)?a.setAttribute(n,r):"xmlns:xlink"===n||"xmlns"===n?a.setAttributeNS("http://www.w3.org/2000/xmlns/",n,r):58===n.charCodeAt(3)?a.setAttributeNS("http://www.w3.org/XML/1998/namespace",n,r):58===n.charCodeAt(5)?a.setAttributeNS(nv,n,r):a.setAttribute(n,r))}for(n in i)n in o||a.removeAttribute(n)}}function Jv(t,e){var n=e.elm=t.elm,a=t.children,i=e.children;t!==e&&(Qv(t,e),Uv(e.text)?Xv(a)&&Xv(i)?a!==i&&function(t,e,n){for(var a,i,o,r=0,l=0,s=e.length-1,u=e[0],d=e[s],c=n.length-1,h=n[0],p=n[c];r<=s&&l<=c;)null==u?u=e[++r]:null==d?d=e[--s]:null==h?h=n[++l]:null==p?p=n[--c]:Zv(u,h)?(Jv(u,h),u=e[++r],h=n[++l]):Zv(d,p)?(Jv(d,p),d=e[--s],p=n[--c]):Zv(u,p)?(Jv(u,p),Vv(t,u.elm,Fv(d.elm)),u=e[++r],p=n[--c]):Zv(d,h)?(Jv(d,h),Vv(t,d.elm,u.elm),d=e[--s],h=n[++l]):(Uv(a)&&(a=Hv(e,r,s)),Uv(i=a[h.key])||(o=e[i]).tag!==h.tag?Vv(t,qv(h),u.elm):(Jv(o,h),e[i]=void 0,Vv(t,o.elm,u.elm)),h=n[++l]);(r<=s||l<=c)&&(r>s?$v(t,null==n[c+1]?null:n[c+1].elm,n,l,c):Kv(t,e,r,s))}(n,a,i):Xv(i)?(Xv(t.text)&&jv(n,""),$v(n,null,i,0,i.length-1)):Xv(a)?Kv(n,a,0,a.length-1):Xv(t.text)&&jv(n,""):t.text!==e.text&&(Xv(a)&&Kv(n,a,0,a.length-1),jv(n,e.text)))}var ty=0,ey=function(){function t(t,e,n){if(this.type="svg",this.refreshHover=function(){},this.configLayer=function(){},this.storage=e,this._opts=n=wt({},n),this.root=t,this._id="zr"+ty++,this._oldVNode=sv(n.width,n.height),t&&!n.ssr){var a=this._viewport=document.createElement("div");a.style.cssText="position:relative;overflow:hidden";var i=this._svgDom=this._oldVNode.elm=iv("svg");Qv(null,this._oldVNode),a.appendChild(i),t.appendChild(a)}this.resize(n.width,n.height)}return t.prototype.getType=function(){return this.type},t.prototype.getViewportRoot=function(){return this._viewport},t.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},t.prototype.getSvgDom=function(){return this._svgDom},t.prototype.refresh=function(){if(this.root){var t=this.renderToVNode({willUpdate:!0});t.attrs.style="position:absolute;left:0;top:0;user-select:none",function(t,e){if(Zv(t,e))Jv(t,e);else{var n=t.elm,a=Wv(n);qv(e),null!==a&&(Vv(a,e.elm,Fv(n)),Kv(a,[t],0,0))}}(this._oldVNode,t),this._oldVNode=t}},t.prototype.renderOneToVNode=function(t){return Ev(t,lv(this._id))},t.prototype.renderToVNode=function(t){t=t||{};var e=this.storage.getDisplayList(!0),n=this._width,a=this._height,i=lv(this._id);i.animation=t.animation,i.willUpdate=t.willUpdate,i.compress=t.compress,i.emphasis=t.emphasis,i.ssr=this._opts.ssr;var o=[],r=this._bgVNode=function(t,e,n,a){var i;if(n&&"none"!==n)if(i=ov("rect","bg",{width:t,height:e,x:"0",y:"0"}),yo(n))Nv({fill:n},i.attrs,"fill",a);else if(mo(n))zv({style:{fill:n},dirty:zt,getBoundingRect:function(){return{width:t,height:e}}},i.attrs,"fill",a);else{var o=Ui(n),r=o.color,l=o.opacity;i.attrs.fill=r,l<1&&(i.attrs["fill-opacity"]=l)}return i}(n,a,this._backgroundColor,i);r&&o.push(r);var l=t.compress?null:this._mainVNode=ov("g","main",{},[]);this._paintList(e,i,l?l.children:o),l&&o.push(l);var s=St(O(i.defs),function(t){return i.defs[t]});if(s.length&&o.push(ov("defs","defs",{},s)),t.animation){var u=function(t,e,n){var a=(n=n||{}).newline?"\n":"",i=" {"+a,o=a+"}",r=St(O(t),function(e){return e+i+St(O(t[e]),function(n){return n+":"+t[e][n]+";"}).join(a)+o}).join(a),l=St(O(e),function(t){return"@keyframes "+t+i+St(O(e[t]),function(n){return n+i+St(O(e[t][n]),function(a){var i=e[t][n][a];return"d"===a&&(i='path("'+i+'")'),a+":"+i+";"}).join(a)+o}).join(a)+o}).join(a);return r||l?["<![CDATA[",r,l,"]]>"].join(a):""}(i.cssNodes,i.cssAnims,{newline:!0});if(u){var d=ov("style","stl",{},[],u);o.push(d)}}return sv(n,a,o,t.useViewBox)},t.prototype.renderToString=function(t){return t=t||{},rv(this.renderToVNode({animation:K(t.cssAnimation,!0),emphasis:K(t.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:K(t.useViewBox,!0)}),{newline:!0})},t.prototype.setBackgroundColor=function(t){this._backgroundColor=t},t.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},t.prototype._paintList=function(t,e,n){for(var a,i,o=t.length,r=[],l=0,s=0,u=0;u<o;u++){var d=t[u];if(!d.invisible){var c=d.__clipPaths,h=c&&c.length||0,p=i&&i.length||0,f=void 0;for(f=Math.max(h-1,p-1);f>=0&&(!c||!i||c[f]!==i[f]);f--);for(var g=p-1;g>f;g--)a=r[--l-1];for(var v=f+1;v<h;v++){var y={};Rv(c[v],y,e);var m=ov("g","clip-g-"+s++,y,[]);(a?a.children:n).push(m),r[l++]=m,a=m}i=c;var x=Ev(d,e);x&&(a?a.children:n).push(x)}}},t.prototype.resize=function(t,e){var n=this._opts,a=this.root,i=this._viewport;if(null!=t&&(n.width=t),null!=e&&(n.height=e),a&&i&&(i.style.display="none",t=wo(a,0,n),e=wo(a,1,n),i.style.display=""),this._width!==t||this._height!==e){if(this._width=t,this._height=e,i){var o=i.style;o.width=t+"px",o.height=e+"px"}if(mo(this._backgroundColor))this.refresh();else{var r=this._svgDom;r&&(r.setAttribute("width",t),r.setAttribute("height",e));var l=this._bgVNode&&this._bgVNode.elm;l&&(l.setAttribute("width",t),l.setAttribute("height",e))}}},t.prototype.getWidth=function(){return this._width},t.prototype.getHeight=function(){return this._height},t.prototype.dispose=function(){this.root&&(this.root.innerHTML=""),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},t.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},t.prototype.toDataURL=function(t){var e=this.renderToString(),n="data:image/svg+xml;";return t?(e=So(e))&&n+"base64,"+e:n+"charset=UTF-8,"+encodeURIComponent(e)},t}();var ny=Ji.CMD;function ay(t,e){return Math.abs(t-e)<1e-5}function iy(t){var e,n,a,i,o,r=t.data,l=t.len(),s=[],u=0,d=0,c=0,h=0;function p(t,n){e&&e.length>2&&s.push(e),e=[t,n]}function f(t,n,a,i){ay(t,a)&&ay(n,i)||e.push(t,n,a,i,a,i)}function g(t,n,a,i,o,r){var l=Math.abs(n-t),s=4*Math.tan(l/4)/3,u=n<t?-1:1,d=Math.cos(t),c=Math.sin(t),h=Math.cos(n),p=Math.sin(n),f=d*o+a,g=c*r+i,v=h*o+a,y=p*r+i,m=o*s*u,x=r*s*u;e.push(f-m*c,g+x*d,v+m*p,y-x*h,v,y)}for(var v=0;v<l;){var y=r[v++],m=1===v;switch(m&&(c=u=r[v],h=d=r[v+1],y!==ny.L&&y!==ny.C&&y!==ny.Q||(e=[c,h])),y){case ny.M:u=c=r[v++],d=h=r[v++],p(c,h);break;case ny.L:f(u,d,n=r[v++],a=r[v++]),u=n,d=a;break;case ny.C:e.push(r[v++],r[v++],r[v++],r[v++],u=r[v++],d=r[v++]);break;case ny.Q:n=r[v++],a=r[v++],i=r[v++],o=r[v++],e.push(u+2/3*(n-u),d+2/3*(a-d),i+2/3*(n-i),o+2/3*(a-o),i,o),u=i,d=o;break;case ny.A:var x=r[v++],_=r[v++],b=r[v++],w=r[v++],S=r[v++],I=r[v++]+S;v+=1;var M=!r[v++];n=Math.cos(S)*b+x,a=Math.sin(S)*w+_,m?p(c=n,h=a):f(u,d,n,a),u=Math.cos(I)*b+x,d=Math.sin(I)*w+_;for(var C=(M?-1:1)*Math.PI/2,T=S;M?T>I:T<I;T+=C){g(T,M?Math.max(T+C,I):Math.min(T+C,I),x,_,b,w)}break;case ny.R:c=u=r[v++],h=d=r[v++],n=c+r[v++],a=h+r[v++],p(n,h),f(n,h,n,a),f(n,a,c,a),f(c,a,c,h),f(c,h,n,h);break;case ny.Z:e&&f(u,d,c,h),u=c,d=h}}return e&&e.length>2&&s.push(e),s}function oy(t,e,n,a,i,o,r,l,s,u){if(ay(t,n)&&ay(e,a)&&ay(i,r)&&ay(o,l))s.push(r,l);else{var d=2/u,c=d*d,h=r-t,p=l-e,f=Math.sqrt(h*h+p*p);h/=f,p/=f;var g=n-t,v=a-e,y=i-r,m=o-l,x=g*g+v*v,_=y*y+m*m;if(x<c&&_<c)s.push(r,l);else{var b=h*g+p*v,w=-h*y-p*m;if(x-b*b<c&&b>=0&&_-w*w<c&&w>=0)s.push(r,l);else{var S=[],I=[];Io(t,n,i,r,.5,S),Io(e,a,o,l,.5,I),oy(S[0],I[0],S[1],I[1],S[2],I[2],S[3],I[3],s,u),oy(S[4],I[4],S[5],I[5],S[6],I[6],S[7],I[7],s,u)}}}}function ry(t,e,n){var a=t[e],i=t[1-e],o=Math.abs(a/i),r=Math.ceil(Math.sqrt(o*n)),l=Math.floor(n/r);0===l&&(l=1,r=n);for(var s=[],u=0;u<r;u++)s.push(l);var d=n-r*l;if(d>0)for(u=0;u<d;u++)s[u%r]+=1;return s}function ly(t,e,n){for(var a=t.r0,i=t.r,o=t.startAngle,r=t.endAngle,l=Math.abs(r-o),s=l*i,u=i-a,d=s>Math.abs(u),c=ry([s,u],d?0:1,e),h=(d?l:u)/c.length,p=0;p<c.length;p++)for(var f=(d?u:l)/c[p],g=0;g<c[p];g++){var v={};d?(v.startAngle=o+h*p,v.endAngle=o+h*(p+1),v.r0=a+f*g,v.r=a+f*(g+1)):(v.startAngle=o+f*g,v.endAngle=o+f*(g+1),v.r0=a+h*p,v.r=a+h*(p+1)),v.clockwise=t.clockwise,v.cx=t.cx,v.cy=t.cy,n.push(v)}}function sy(t,e,n,a){return t*a-n*e}function uy(t,e,n,a,i,o,r,l){var s=n-t,u=a-e,d=r-i,c=l-o,h=sy(d,c,s,u);if(Math.abs(h)<1e-6)return null;var p=sy(t-i,e-o,d,c)/h;return p<0||p>1?null:new an(p*s+t,p*u+e)}function dy(t,e,n){var a=new an;an.sub(a,n,e),a.normalize();var i=new an;return an.sub(i,t,e),i.dot(a)}function cy(t,e){var n=t[t.length-1];n&&n[0]===e[0]&&n[1]===e[1]||t.push(e)}function hy(t){var e=t.points,n=[],a=[];ot(e,n,a);var i=new E(n[0],n[1],a[0]-n[0],a[1]-n[1]),o=i.width,r=i.height,l=i.x,s=i.y,u=new an,d=new an;return o>r?(u.x=d.x=l+o/2,u.y=s,d.y=s+r):(u.y=d.y=s+r/2,u.x=l,d.x=l+o),function(t,e,n){for(var a=t.length,i=[],o=0;o<a;o++){var r=t[o],l=t[(o+1)%a],s=uy(r[0],r[1],l[0],l[1],e.x,e.y,n.x,n.y);s&&i.push({projPt:dy(s,e,n),pt:s,idx:o})}if(i.length<2)return[{points:t},{points:t}];i.sort(function(t,e){return t.projPt-e.projPt});var u=i[0],d=i[i.length-1];if(d.idx<u.idx){var c=u;u=d,d=c}var h=[u.pt.x,u.pt.y],p=[d.pt.x,d.pt.y],f=[h],g=[p];for(o=u.idx+1;o<=d.idx;o++)cy(f,t[o].slice());for(cy(f,p),cy(f,h),o=d.idx+1;o<=u.idx+a;o++)cy(g,t[o%a].slice());return cy(g,h),cy(g,p),[{points:f},{points:g}]}(e,u,d)}function py(t,e,n,a){if(1===n)a.push(e);else{var i=Math.floor(n/2),o=t(e);py(t,o[0],i,a),py(t,o[1],n-i,a)}return a}function fy(t,e){e.setStyle(t.style),e.z=t.z,e.z2=t.z2,e.zlevel=t.zlevel}function gy(t,e){var n,a=[],i=t.shape;switch(t.type){case"rect":!function(t,e,n){for(var a=t.width,i=t.height,o=a>i,r=ry([a,i],o?0:1,e),l=o?"width":"height",s=o?"height":"width",u=o?"x":"y",d=o?"y":"x",c=t[l]/r.length,h=0;h<r.length;h++)for(var p=t[s]/r[h],f=0;f<r[h];f++){var g={};g[u]=h*c,g[d]=f*p,g[l]=c,g[s]=p,g.x+=t.x,g.y+=t.y,n.push(g)}}(i,e,a),n=oe;break;case"sector":ly(i,e,a),n=We;break;case"circle":ly({r0:0,r:i.r,startAngle:0,endAngle:2*Math.PI,cx:i.cx,cy:i.cy},e,a),n=We;break;default:var o=t.getComputedTransform(),r=o?Math.sqrt(Math.max(o[0]*o[0]+o[1]*o[1],o[2]*o[2]+o[3]*o[3])):1,l=St(function(t,e){var n=iy(t),a=[];e=e||1;for(var i=0;i<n.length;i++){var o=n[i],r=[],l=o[0],s=o[1];r.push(l,s);for(var u=2;u<o.length;){var d=o[u++],c=o[u++],h=o[u++],p=o[u++],f=o[u++],g=o[u++];oy(l,s,d,c,h,p,f,g,r,e),l=f,s=g}a.push(r)}return a}(t.getUpdatedPathProxy(),r),function(t){return function(t){for(var e=[],n=0;n<t.length;)e.push([t[n++],t[n++]]);return e}(t)}),s=l.length;if(0===s)py(hy,{points:l[0]},e,a);else if(s===e)for(var u=0;u<s;u++)a.push({points:l[u]});else{var d=0,c=St(l,function(t){var e=[],n=[];ot(t,e,n);var a=(n[1]-e[1])*(n[0]-e[0]);return d+=a,{poly:t,area:a}});c.sort(function(t,e){return e.area-t.area});var h=e;for(u=0;u<s;u++){var p=c[u];if(h<=0)break;var f=u===s-1?h:Math.ceil(p.area/d*e);f<0||(py(hy,{points:p.poly},f,a),h-=f)}}n=Gt}if(!n)return function(t,e){for(var n=[],a=0;a<e;a++)n.push(Mo(t));return n}(t,e);var g=[];for(u=0;u<a.length;u++){var v=new n;v.setShape(a[u]),fy(t,v),g.push(v)}return g}function vy(t,e){var n=t.length,a=e.length;if(n===a)return[t,e];for(var i=[],o=[],r=n<a?t:e,l=Math.min(n,a),s=Math.abs(a-n)/6,u=(l-2)/6,d=Math.ceil(s/u)+1,c=[r[0],r[1]],h=s,p=2;p<l;){var f=r[p-2],g=r[p-1],v=r[p++],y=r[p++],m=r[p++],x=r[p++],_=r[p++],b=r[p++];if(h<=0)c.push(v,y,m,x,_,b);else{for(var w=Math.min(h,d-1)+1,S=1;S<=w;S++){var I=S/w;Io(f,v,m,_,I,i),Io(g,y,x,b,I,o),f=i[3],g=o[3],c.push(i[1],o[1],i[2],o[2],f,g),v=i[5],y=o[5],m=i[6],x=o[6]}h-=w-1}}return r===t?[c,e]:[t,c]}function yy(t,e){for(var n=t.length,a=t[n-2],i=t[n-1],o=[],r=0;r<e.length;)o[r++]=a,o[r++]=i;return o}function my(t){for(var e=0,n=0,a=0,i=t.length,o=0,r=i-2;o<i;r=o,o+=2){var l=t[r],s=t[r+1],u=t[o],d=t[o+1],c=l*d-u*s;e+=c,n+=(l+u)*c,a+=(s+d)*c}return 0===e?[t[0]||0,t[1]||0]:[n/e/3,a/e/3,e]}function xy(t,e,n,a){for(var i=(t.length-2)/6,o=1/0,r=0,l=t.length,s=l-2,u=0;u<i;u++){for(var d=6*u,c=0,h=0;h<l;h+=2){var p=0===h?d:(d+h-2)%s+2,f=t[p]-n[0],g=t[p+1]-n[1],v=e[h]-a[0]-f,y=e[h+1]-a[1]-g;c+=v*v+y*y}c<o&&(o=c,r=u)}return r}function _y(t){for(var e=[],n=t.length,a=0;a<n;a+=2)e[a]=t[n-a-2],e[a+1]=t[n-a-1];return e}function by(t){return t.__isCombineMorphing}var wy="__mOriginal_";function Sy(t,e,n){var a=wy+e,i=t[a]||t[e];t[a]||(t[a]=t[e]);var o=n.replace,r=n.after,l=n.before;t[e]=function(){var t,e=arguments;return l&&l.apply(this,e),t=o?o.apply(this,e):i.apply(this,e),r&&r.apply(this,e),t}}function Iy(t,e){var n=wy+e;t[n]&&(t[e]=t[n],t[n]=null)}function My(t,e){for(var n=0;n<t.length;n++)for(var a=t[n],i=0;i<a.length;){var o=a[i],r=a[i+1];a[i++]=e[0]*o+e[2]*r+e[4],a[i++]=e[1]*o+e[3]*r+e[5]}}function Cy(t,e){var n=t.getUpdatedPathProxy(),a=e.getUpdatedPathProxy(),i=function(t,e){for(var n,a,i,o=[],r=[],l=0;l<Math.max(t.length,e.length);l++){var s=t[l],u=e[l],d=void 0,c=void 0;s?u?(a=d=(n=vy(s,u))[0],i=c=n[1]):(c=yy(i||s,s),d=s):(d=yy(a||u,u),c=u),o.push(d),r.push(c)}return[o,r]}(iy(n),iy(a)),o=i[0],r=i[1],l=t.getComputedTransform(),s=e.getComputedTransform();l&&My(o,l),s&&My(r,s),Sy(e,"updateTransform",{replace:function(){this.transform=null}}),e.transform=null;var u=function(t,e,n,a){for(var i,o=[],r=0;r<t.length;r++){var l=t[r],s=e[r],u=my(l),d=my(s);null==i&&(i=u[2]<0!=d[2]<0);var c=[],h=[],p=0,f=1/0,g=[],v=l.length;i&&(l=_y(l));for(var y=6*xy(l,s,u,d),m=v-2,x=0;x<m;x+=2){var _=(y+x)%m+2;c[x+2]=l[_]-u[0],c[x+3]=l[_+1]-u[1]}c[0]=l[y]-u[0],c[1]=l[y+1]-u[1];for(var b=a/n,w=-a/2;w<=a/2;w+=b){var S=Math.sin(w),I=Math.cos(w),M=0;for(x=0;x<l.length;x+=2){var C=c[x],T=c[x+1],D=s[x]-d[0],L=s[x+1]-d[1],A=D*I-L*S,P=D*S+L*I;g[x]=A,g[x+1]=P;var k=A-C,E=P-T;M+=k*k+E*E}if(M<f){f=M,p=w;for(var N=0;N<g.length;N++)h[N]=g[N]}}o.push({from:c,to:h,fromCp:u,toCp:d,rotation:-p})}return o}(o,r,10,Math.PI),d=[];Sy(e,"buildPath",{replace:function(t){for(var n=e.__morphT,a=1-n,i=[],o=0;o<u.length;o++){var r=u[o],l=r.from,s=r.to,c=r.rotation*n,h=r.fromCp,p=r.toCp,f=Math.sin(c),g=Math.cos(c);Co(i,h,p,n);for(var v=0;v<l.length;v+=2){var y=l[v],m=l[v+1],x=y*a+(S=s[v])*n,_=m*a+(I=s[v+1])*n;d[v]=x*g-_*f+i[0],d[v+1]=x*f+_*g+i[1]}var b=d[0],w=d[1];t.moveTo(b,w);for(v=2;v<l.length;){var S=d[v++],I=d[v++],M=d[v++],C=d[v++],T=d[v++],D=d[v++];b===S&&w===I&&M===T&&C===D?t.lineTo(T,D):t.bezierCurveTo(S,I,M,C,T,D),b=T,w=D}}}})}function Ty(t,e,n){if(!t||!e)return e;var a=n.done,i=n.during;return Cy(t,e),e.__morphT=0,e.animateTo({__morphT:1},vt({during:function(t){e.dirtyShape(),i&&i(t)},done:function(){Iy(e,"buildPath"),Iy(e,"updateTransform"),e.__morphT=-1,e.createPathProxy(),e.dirtyShape(),a&&a()}},n)),e}function Dy(t,e,n,a,i,o){t=i===n?0:Math.round(32767*(t-n)/(i-n)),e=o===a?0:Math.round(32767*(e-a)/(o-a));for(var r,l=0,s=32768;s>0;s/=2){var u=0,d=0;(t&s)>0&&(u=1),(e&s)>0&&(d=1),l+=s*s*(3*u^d),0===d&&(1===u&&(t=s-1-t,e=s-1-e),r=t,t=e,e=r)}return l}function Ly(t){var e=1/0,n=1/0,a=-1/0,i=-1/0,o=St(t,function(t){var o=t.getBoundingRect(),r=t.getComputedTransform(),l=o.x+o.width/2+(r?r[4]:0),s=o.y+o.height/2+(r?r[5]:0);return e=Math.min(l,e),n=Math.min(s,n),a=Math.max(l,a),i=Math.max(s,i),[l,s]});return St(o,function(o,r){return{cp:o,z:Dy(o[0],o[1],e,n,a,i),path:t[r]}}).sort(function(t,e){return t.z-e.z}).map(function(t){return t.path})}function Ay(t){return gy(t.path,t.count)}function Py(t){return It(t[0])}function ky(t,e){for(var n=[],a=t.length,i=0;i<a;i++)n.push({one:t[i],many:[]});for(i=0;i<e.length;i++){var o=e[i].length,r=void 0;for(r=0;r<o;r++)n[r%a].many.push(e[i][r])}var l=0;for(i=a-1;i>=0;i--)if(!n[i].many.length){var s=n[l].many;if(s.length<=1){if(!l)return n;l=0}o=s.length;var u=Math.ceil(o/2);n[i].many=s.slice(u,o),n[l].many=s.slice(0,u),l++}return n}var Ey={clone:function(t){for(var e=[],n=1-Math.pow(1-t.path.style.opacity,1/t.count),a=0;a<t.count;a++){var i=Mo(t.path);i.setStyle("opacity",n),e.push(i)}return e},split:null};function Ny(t,e,n,a,i,o){if(t.length&&e.length){var r=ga("update",a,i);if(r&&r.duration>0){var l,s,u=a.getModel("universalTransition").get("delay"),d=Object.assign({setToFinal:!0},r);Py(t)&&(l=t,s=e),Py(e)&&(l=e,s=t);for(var c=l?l===t:t.length>e.length,h=l?ky(s,l):ky(c?e:t,[c?t:e]),p=0,f=0;f<h.length;f++)p+=h[f].many.length;var g=0;for(f=0;f<h.length;f++)v(h[f],c,g,p),g+=h[f].many.length}}function v(t,e,a,i,r){var l=t.many,s=t.one;if(1!==l.length||r)for(var c=vt({dividePath:Ey[n],individualDelay:u&&function(t,e,n,o){return u(t+a,i)}},d),h=e?function(t,e,n){var a=[];!function t(e){for(var n=0;n<e.length;n++){var i=e[n];by(i)?t(i.childrenRef()):i instanceof xt&&a.push(i)}}(t);var i=a.length;if(!i)return{fromIndividuals:[],toIndividuals:[],count:0};var o=(n.dividePath||Ay)({path:e,count:i});if(o.length!==i)return{fromIndividuals:[],toIndividuals:[],count:0};a=Ly(a),o=Ly(o);for(var r=n.done,l=n.during,s=n.individualDelay,u=new N,d=0;d<i;d++){var c=a[d],h=o[d];h.parent=e,h.copyTransform(u),s||Cy(c,h)}function p(t){for(var e=0;e<o.length;e++)o[e].addSelfToZr(t)}function f(){e.__isCombineMorphing=!1,e.__morphT=-1,e.childrenRef=null,Iy(e,"addSelfToZr"),Iy(e,"removeSelfFromZr")}e.__isCombineMorphing=!0,e.childrenRef=function(){return o},Sy(e,"addSelfToZr",{after:function(t){p(t)}}),Sy(e,"removeSelfFromZr",{after:function(t){for(var e=0;e<o.length;e++)o[e].removeSelfFromZr(t)}});var g=o.length;if(s){var v=g,y=function(){0===--v&&(f(),r&&r())};for(d=0;d<g;d++){var m=s?vt({delay:(n.delay||0)+s(d,g,a[d],o[d]),done:y},n):n;Ty(a[d],o[d],m)}}else e.__morphT=0,e.animateTo({__morphT:1},vt({during:function(t){for(var n=0;n<g;n++){var a=o[n];a.__morphT=e.__morphT,a.dirtyShape()}l&&l(t)},done:function(){f();for(var e=0;e<t.length;e++)Iy(t[e],"updateTransform");r&&r()}},n));return e.__zr&&p(e.__zr),{fromIndividuals:a,toIndividuals:o,count:g}}(l,s,c):function(t,e,n){var a=e.length,i=[],o=n.dividePath||Ay;if(by(t)){!function t(e){for(var n=0;n<e.length;n++){var a=e[n];by(a)?t(a.childrenRef()):a instanceof xt&&i.push(a)}}(t.childrenRef());var r=i.length;if(r<a)for(var l=0,s=r;s<a;s++)i.push(Mo(i[l++%r]));i.length=a}else{i=o({path:t,count:a});var u=t.getComputedTransform();for(s=0;s<i.length;s++)i[s].setLocalTransform(u);if(i.length!==a)return{fromIndividuals:[],toIndividuals:[],count:0}}i=Ly(i),e=Ly(e);var d=n.individualDelay;for(s=0;s<a;s++){var c=d?vt({delay:(n.delay||0)+d(s,a,i[s],e[s])},n):n;Ty(i[s],e[s],c)}return{fromIndividuals:i,toIndividuals:e,count:e.length}}(s,l,c),p=h.fromIndividuals,f=h.toIndividuals,g=p.length,y=0;y<g;y++){m=u?vt({delay:u(y,g)},d):d;o(p[y],f[y],e?l[y]:t.one,e?t.one:l[y],m)}else{var m,x=e?l[0]:s,_=e?s:l[0];if(by(x))v({many:[x],one:_},!0,a,i,!0);else Ty(x,_,m=u?vt({delay:u(a,i)},d):d),o(x,_,x,_,m)}}}function zy(t){if(!t)return[];if(It(t)){for(var e=[],n=0;n<t.length;n++)e.push(zy(t[n]));return e}var a=[];return t.traverse(function(t){t instanceof xt&&!t.disableMorphing&&!t.invisible&&!t.ignore&&a.push(t)}),a}var Ry=k();function Oy(t,e,n,a){var i=function(t,e){for(var n=t.dimensions,a=0;a<n.length;a++){var i=t.getDimensionInfo(n[a]);if(i&&0===i.otherDims[e])return n[a]}}(t,a?"itemChildGroupId":"itemGroupId");if(i){var o=function(t,e,n){var a=t.getDimensionInfo(n),i=a&&a.ordinalMeta;if(a){var o=t.get(a.name,e);return i&&i.categories[o]||o+""}}(t,e,i);return o}var r=t.getRawDataItem(e),l=a?"childGroupId":"groupId";return r&&r[l]?r[l]+"":a?void 0:n||t.getId(e)}function Vy(t){var e=[];return G(t,function(t){var n=t.data,a=t.dataGroupId;if(!(n.count()>1e4))for(var i=n.getIndices(),o=0;o<i.length;o++)e.push({data:n,groupId:Oy(n,o,a,!1),childGroupId:Oy(n,o,a,!0),divide:t.divide,dataIndex:o})}),e}function By(t,e,n){t.traverse(function(t){t instanceof xt&&Q(t,{style:{opacity:0}},e,{dataIndex:n,isFrom:!0})})}function Gy(t){if(t.parent){var e=t.getComputedTransform();t.setLocalTransform(e),t.parent.remove(t)}}function Wy(t){t.stopAnimation(),t.isGroup&&t.traverse(function(t){t.stopAnimation()})}function Fy(t,e,n){var a=Vy(t),i=Vy(e);function o(t,e,n,a,i){(n||t)&&e.animateFrom({style:n&&n!==t?wt(wt({},n.style),t.style):t.style},i)}var r=!1,l=0,s=Ot(),u=Ot();a.forEach(function(t){t.groupId&&s.set(t.groupId,!0),t.childGroupId&&u.set(t.childGroupId,!0)});for(var d=0;d<i.length;d++){var c=i[d].groupId;if(u.get(c)){l=1;break}var h=i[d].childGroupId;if(h&&s.get(h)){l=2;break}}function p(t,e){return function(n){var a=n.data,i=n.dataIndex;return e?a.getId(i):t?1===l?n.childGroupId:n.groupId:2===l?n.childGroupId:n.groupId}}var f=function(t,e){var n=t.length;if(n!==e.length)return!1;for(var a=0;a<n;a++){var i=t[a],o=e[a];if(i.data.getId(i.dataIndex)!==o.data.getId(o.dataIndex))return!1}return!0}(a,i),g={};if(!f)for(d=0;d<i.length;d++){var v=i[d],y=v.data.getItemGraphicEl(v.dataIndex);y&&(g[y.id]=!0)}function m(t,e){var n=a[e],l=i[t],s=l.data.hostModel,u=n.data.getItemGraphicEl(n.dataIndex),d=l.data.getItemGraphicEl(l.dataIndex);u!==d?u&&g[u.id]||d&&(Wy(d),u?(Wy(u),Gy(u),r=!0,Ny(zy(u),zy(d),l.divide,s,t,o)):By(d,s,t)):d&&function(t,e,n){var a=ga("update",n,e);a&&t.traverse(function(t){if(t instanceof ie){var e=Do(t);e&&t.animateFrom({style:e},a)}})}(d,l.dataIndex,s)}new Ut(a,i,p(!0,f),p(!1,f),null,"multiple").update(m).updateManyToOne(function(t,e){var n=i[t],l=n.data,s=l.hostModel,u=l.getItemGraphicEl(n.dataIndex),d=F(St(e,function(t){return a[t].data.getItemGraphicEl(a[t].dataIndex)}),function(t){return t&&t!==u&&!g[t.id]});u&&(Wy(u),d.length?(G(d,function(t){Wy(t),Gy(t)}),r=!0,Ny(zy(d),zy(u),n.divide,s,t,o)):By(u,s,n.dataIndex))}).updateOneToMany(function(t,e){var n=a[e],l=n.data.getItemGraphicEl(n.dataIndex);if(!l||!g[l.id]){var s=F(St(t,function(t){return i[t].data.getItemGraphicEl(i[t].dataIndex)}),function(t){return t&&t!==l}),u=i[t[0]].data.hostModel;s.length&&(G(s,function(t){return Wy(t)}),l?(Wy(l),Gy(l),r=!0,Ny(zy(l),zy(s),n.divide,u,t[0],o)):G(s,function(e){return By(e,u,t[0])}))}}).updateManyToMany(function(t,e){new Ut(e,t,function(t){return a[t].data.getId(a[t].dataIndex)},function(t){return i[t].data.getId(i[t].dataIndex)}).update(function(n,a){m(t[n],e[a])}).execute()}).execute(),r&&G(e,function(t){var e=t.data.hostModel,a=e&&n.getViewOfSeriesModel(e),i=ga("update",e,0);a&&e.isAnimationEnabled()&&i&&i.duration>0&&a.group.traverse(function(t){t instanceof xt&&!t.animators.length&&t.animateFrom({style:{opacity:0}},i)})})}function jy(t){var e=t.getModel("universalTransition").get("seriesKey");return e||t.id}function Yy(t){return It(t)?t.sort().join(","):t}function Uy(t){if(t.hostModel)return t.hostModel.getModel("universalTransition").get("divideShape")}function Xy(t,e){for(var n=0;n<t.length;n++){if(null!=e.seriesIndex&&e.seriesIndex===t[n].seriesIndex||null!=e.seriesId&&e.seriesId===t[n].id)return n}}var Hy=function(){function t(){this.breaks=[],this._elapsedExtent=[1/0,-1/0]}return t.prototype.setBreaks=function(t){this.breaks=t.breaks},t.prototype.update=function(t){!function(t,e){var n=0,a={tpAbs:{span:0,val:0},tpPrct:{span:0,val:0}},i=function(){return{has:!1,span:NaN,inExtFrac:NaN,val:NaN}},o={S:{tpAbs:i(),tpPrct:i()},E:{tpAbs:i(),tpPrct:i()}};G(t.breaks,function(t){var i=t.gapParsed;"tpPrct"===i.type&&(n+=i.val);var r=Jy(t,e);if(r){var l=r.vmin!==t.vmin,s=r.vmax!==t.vmax,u=r.vmax-r.vmin;if(l&&s);else if(l||s){var d=l?"S":"E";o[d][i.type].has=!0,o[d][i.type].span=u,o[d][i.type].inExtFrac=u/(t.vmax-t.vmin),o[d][i.type].val=i.val}else a[i.type].span+=u,a[i.type].val+=i.val}});var r=n*(e[1]-e[0]+0+(a.tpAbs.val-a.tpAbs.span)+(o.S.tpAbs.has?(o.S.tpAbs.val-o.S.tpAbs.span)*o.S.tpAbs.inExtFrac:0)+(o.E.tpAbs.has?(o.E.tpAbs.val-o.E.tpAbs.span)*o.E.tpAbs.inExtFrac:0)-a.tpPrct.span-(o.S.tpPrct.has?o.S.tpPrct.span*o.S.tpPrct.inExtFrac:0)-(o.E.tpPrct.has?o.E.tpPrct.span*o.E.tpPrct.inExtFrac:0))/(1-a.tpPrct.val-(o.S.tpPrct.has?o.S.tpPrct.val*o.S.tpPrct.inExtFrac:0)-(o.E.tpPrct.has?o.E.tpPrct.val*o.E.tpPrct.inExtFrac:0));G(t.breaks,function(t){var e=t.gapParsed;"tpPrct"===e.type&&(t.gapReal=0!==n?Math.max(r,0)*e.val/n:0),"tpAbs"===e.type&&(t.gapReal=e.val),null==t.gapReal&&(t.gapReal=0)})}(this,t);var e=this._elapsedExtent;e[0]=this.elapse(t[0]),e[1]=this.elapse(t[1])},t.prototype.hasBreaks=function(){return!!this.breaks.length},t.prototype.calcNiceTickMultiple=function(t,e){for(var n=0;n<this.breaks.length;n++){var a=this.breaks[n];if(a.vmin<t&&t<a.vmax)return e(t,a.vmax)}return 0},t.prototype.getExtentSpan=function(){return this._elapsedExtent[1]-this._elapsedExtent[0]},t.prototype.normalize=function(t){var e=this._elapsedExtent[1]-this._elapsedExtent[0];return 0===e?.5:(this.elapse(t)-this._elapsedExtent[0])/e},t.prototype.scale=function(t){return this.unelapse(t*(this._elapsedExtent[1]-this._elapsedExtent[0])+this._elapsedExtent[0])},t.prototype.elapse=function(t){for(var e=qy,n=$y,a=!0,i=0;i<this.breaks.length;i++){var o=this.breaks[i];if(t<=o.vmax){t>o.vmin?e+=o.vmin-n+(t-o.vmin)/(o.vmax-o.vmin)*o.gapReal:e+=t-n,n=o.vmax,a=!1;break}e+=o.vmin-n+o.gapReal,n=o.vmax}return a&&(e+=t-n),e},t.prototype.unelapse=function(t){for(var e=qy,n=$y,a=!0,i=0,o=0;o<this.breaks.length;o++){var r=this.breaks[o],l=e+r.vmin-n,s=l+r.gapReal;if(t<=s){i=t>l?r.vmin+(t-l)/(s-l)*(r.vmax-r.vmin):n+t-e,n=r.vmax,a=!1;break}e=s,n=r.vmax}return a&&(i=n+t-e),i},t}();function Zy(){return new Hy}var qy=0,$y=0;function Ky(t,e,n,a,i,o){"no"!==t&&G(n,function(n){var r=Jy(n,o);if(r)for(var l=e.length-1;l>=0;l--){var s=e[l],u=a(s),d=3*i/4;u>r.vmin-d&&u<r.vmax+d&&("preserve_extent_bound"!==t||u!==o[0]&&u!==o[1])&&e.splice(l,1)}})}function Qy(t,e,n,a){G(e,function(e){var i=Jy(e,n);i&&(t.push({value:i.vmin,break:{type:"vmin",parsedBreak:i},time:a?a(i):void 0}),t.push({value:i.vmax,break:{type:"vmax",parsedBreak:i},time:a?a(i):void 0}))}),e.length&&t.sort(function(t,e){return t.value-e.value})}function Jy(t,e){var n=Math.max(t.vmin,e[0]),a=Math.min(t.vmax,e[1]);return n<a||n===a&&n>e[0]&&n<e[1]?{vmin:n,vmax:a,breakOption:t.breakOption,gapParsed:t.gapParsed,gapReal:t.gapReal}:null}function tm(t,e,n){var a=[];if(!t)return{breaks:a};G(t,function(t){if(t&&null!=t.start&&null!=t.end&&!t.isExpanded){var i={breakOption:ke(t),vmin:e(t.start),vmax:e(t.end),gapParsed:{type:"tpAbs",val:0},gapReal:null};if(null!=t.gap){var o=!1;if(Dt(t.gap)){var r=Po(t.gap);if(r.match(/%$/)){var l=parseFloat(r)/100;(function(t){return t>=0&&t<.99999})(l)||(l=0),i.gapParsed.type="tpPrct",i.gapParsed.val=l,o=!0}}if(!o){var s=e(t.gap);(!isFinite(s)||s<0)&&(s=0),i.gapParsed.type="tpAbs",i.gapParsed.val=s}}if(i.vmin===i.vmax&&(i.gapParsed.type="tpAbs",i.gapParsed.val=0),n&&n.noNegative&&G(["vmin","vmax"],function(t){i[t]<0&&(i[t]=0)}),i.vmin>i.vmax){var u=i.vmax;i.vmax=i.vmin,i.vmin=u}a.push(i)}}),a.sort(function(t,e){return t.vmin-e.vmin});var i=-1/0;return G(a,function(t,e){i>t.vmin&&(a[e]=null),i=t.vmax}),{breaks:a.filter(function(t){return!!t})}}function em(t,e){return nm(e)===nm(t)}function nm(t){return t.start+"_\0_"+t.end}function am(t,e,n){var a=[];G(t,function(t,n){var i=e(t);i&&"vmin"===i.type&&a.push([n])}),G(t,function(n,i){var o=e(n);if(o&&"vmax"===o.type){var r=Ao(a,function(n){return em(e(t[n[0]]).parsedBreak.breakOption,o.parsedBreak.breakOption)});r&&r.push(i)}});var i=[];return G(a,function(e){2===e.length&&i.push(n?e:[t[e[0]],t[e[1]]])}),i}function im(t,e,n,a){var i,o;if(t.break){var r=t.break.parsedBreak,l=Ao(n,function(e){return em(e.breakOption,t.break.parsedBreak.breakOption)}),s=a(Math.pow(e,r.vmin),l.vmin),u=a(Math.pow(e,r.vmax),l.vmax),d={type:r.gapParsed.type,val:"tpAbs"===r.gapParsed.type?$e(Math.pow(e,r.vmin+r.gapParsed.val))-s:r.gapParsed.val};i={type:t.break.type,parsedBreak:{breakOption:r.breakOption,vmin:s,vmax:u,gapParsed:d,gapReal:r.gapReal}},o=l[t.break.type]}return{brkRoundingCriterion:o,vBreak:i}}function om(t,e,n){var a={noNegative:!0},i=tm(t,n,a),o=tm(t,n,a),r=Math.log(e);return o.breaks=St(o.breaks,function(t){var e=Math.log(t.vmin)/r;return{vmin:e,vmax:Math.log(t.vmax)/r,gapParsed:{type:t.gapParsed.type,val:"tpAbs"===t.gapParsed.type?Math.log(t.vmin+t.gapParsed.val)/r-e:t.gapParsed.val},gapReal:t.gapReal,breakOption:t.breakOption}}),{parsedOriginal:i,parsedLogged:o}}var rm={vmin:"start",vmax:"end"};function lm(t,e){return e&&((t=t||{}).break={type:rm[e.type],start:e.parsedBreak.vmin,end:e.parsedBreak.vmax}),t}var sm=k();function um(t,e,n,a,i){var o=n.axis;if(!o.scale.isBlank()&&Eo()){var r=Eo().retrieveAxisBreakPairs(o.scale.getTicks({breakTicks:"only_break"}),function(t){return t.break},!1);if(r.length){var l=n.getModel("breakArea"),s=l.get("zigzagAmplitude"),u=l.get("zigzagMinSpan"),d=l.get("zigzagMaxSpan");u=Math.max(2,u||0),d=Math.max(u,d||0);var c=l.get("expandOnClick"),h=l.get("zigzagZ"),p=l.getModel("itemStyle").getItemStyle(),f=p.stroke,g=p.lineWidth,v=p.lineDash,y=p.fill,m=new at({ignoreModelZ:!0}),x=o.isHorizontal(),_=sm(e).visualList||(sm(e).visualList=[]);G(_,function(t){return t.shouldRemove=!0});for(var b=function(t){var e=r[t][0].break.parsedBreak,l=[];l[0]=o.toGlobalCoord(o.dataToCoord(e.vmin,!0)),l[1]=o.toGlobalCoord(o.dataToCoord(e.vmax,!0)),l[1]<l[0]&&l.reverse();var b=function(t,e){var n=Ao(t,function(t){return Eo().identifyAxisBreak(t.parsedBreak.breakOption,e.breakOption)});return n||t.push(n={zigzagRandomList:[],parsedBreak:e,shouldRemove:!1}),n}(_,e);b.shouldRemove=!1;var w=new at;!function(t,e,n,i,o,r){var l={stroke:f,lineWidth:g,lineDash:v,fill:"none"},c=o?0:1,m=1-c,x=a[ei[m]]+a[ni[m]];function _(t){var e=[],n=[];e[c]=n[c]=t,e[m]=a[ei[m]],n[m]=x;var i={x1:e[0],y1:e[1],x2:n[0],y2:n[1]};return Bo(i,i,{lineWidth:1}),e[0]=i.x1,e[1]=i.y1,e[c]}n=_(n),i=_(i);for(var b=[],w=[],S=!0,I=a[ei[m]],M=0;;M++){var C=I===a[ei[m]],T=I>=x;T&&(I=x);var D=[],L=[];D[c]=n,L[c]=i,C||T||(D[c]+=S?-s:s,L[c]-=S?s:-s),D[m]=I,L[m]=I,b.push(D),w.push(L);var A=void 0;if(M<t.length?A=t[M]:(A=Math.random(),t.push(A)),I+=A*(d-u)+u,S=!S,T)break}var P=Eo().serializeAxisBreakIdentifier(r.breakOption);if(e.add(new nn({anid:"break_a_"+P,shape:{points:b},style:l,z:h})),0!==r.gapReal){e.add(new nn({anid:"break_b_"+P,shape:{points:w},style:l,z:h}));var k=w.slice();k.reverse();var E=b.concat(k);e.add(new Gt({anid:"break_c_"+P,shape:{points:E},style:{fill:y,opacity:p.opacity},z:h}))}}(b.zigzagRandomList,w,l[0],l[1],x,e),c&&w.on("click",function(){var t={type:No,breaks:[{start:e.breakOption.start,end:e.breakOption.end}]};t[o.dim+"AxisIndex"]=n.componentIndex,i.dispatchAction(t)}),w.silent=!c,m.add(w)},w=0;w<r.length;w++)b(w);t.add(m),function(t){for(var e=t.length-1;e>=0;e--)t[e].shouldRemove&&t.splice(e,1)}(_)}}}function dm(t,e,n,a){var i=t.axis,o=n.transform;bt(a.style);var r=i.getExtent();i.inverse&&(r=r.slice()).reverse();var l=Eo().retrieveAxisBreakPairs(i.scale.getTicks({breakTicks:"only_break"}),function(t){return t.break},!1),s=St(l,function(t){var e=t[0].break.parsedBreak,n=[i.dataToCoord(e.vmin,!0),i.dataToCoord(e.vmax,!0)];return n[0]>n[1]&&n.reverse(),{coordPair:n,brkId:Eo().serializeAxisBreakIdentifier(e.breakOption)}});s.sort(function(t,e){return t.coordPair[0]-e.coordPair[0]});for(var u=r[0],d=null,c=0;c<s.length;c++){var h=s[c],p=Math.max(h.coordPair[0],r[0]),f=Math.min(h.coordPair[1],r[1]);u<=p&&g(u,p,d,h),u=f,d=h}function g(t,n,i,r){function l(t,e){o&&(Ei(t,t,o),Ei(e,e,o))}function s(t,e){var n={x1:t[0],y1:t[1],x2:e[0],y2:e[1]};Bo(n,n,a.style),t[0]=n.x1,t[1]=n.y1,e[0]=n.x2,e[1]=n.y2}var u=[t,0],d=[n,0],c=[t,5],h=[n,5];l(u,c),s(u,c),l(d,h),s(d,h),s(u,d);var p=new qe(wt({shape:{x1:u[0],y1:u[1],x2:d[0],y2:d[1]}},a));e.add(p),p.anid="breakLine_"+(i?i.brkId:"\0")+"_\0_"+(r?r.brkId:"\0")}u<=r[1]&&g(u,r[1],d,null)}function cm(t,e,n){if(!Ao(n,function(t){return!t})){var a=new an;if(Oo(n[0],n[1],a,{direction:-(t?e+Math.PI:e),touchThreshold:0,bidirectional:!1})){var i=Zt();yn(i,i,-e);var o=St(n,function(t){return t.transform?ki(Zt(),i,t.transform):i}),r=.5;if(g(0)||g(1)){var l=St(n,function(t,e){var n=t.localRect.clone();return n.applyTransform(o[e]),n}),s=new an;s.copy(n[0].label).add(n[1].label).scale(.5),s.transform(i);var u=a.clone().transform(i),d=(l[0].x+l[1].x+(u.x>=0?l[0].width:l[1].width)+u.x)/2-s.x,c=Math.min(d,d-u.x),h=Math.max(d,d-u.x);r=(d-(h<0?h:c>0?c:0))/u.x}var p=new an,f=new an;an.scale(p,a,-r),an.scale(f,a,1-r),Vo(n[0],p),Vo(n[1],f)}}function g(t){var e=n[0].localRect,a=new an(e[ni[t]]*o[0][0],e[ni[t]]*o[0][1]);return Math.abs(a.y)<1e-5}}function hm(t,e){var n={breaks:[]};return G(e.breaks,function(a){if(a){var i=Ao(t.get("breaks",!0),function(t){return Eo().identifyAxisBreak(t,a)});if(i){var o=e.type,r={isExpanded:!!i.isExpanded};i.isExpanded=o===No||o!==zo&&(o===Ro?!i.isExpanded:i.isExpanded),n.breaks.push({start:i.start,end:i.end,isExpanded:!!i.isExpanded,old:r})}}}),n}function pm(t,e){G(t,function(t){if(!t.model.get(["axisLabel","inside"])){var n=function(t){var e,n,a=t.model,i=t.scale;if(!a.get(["axisLabel","show"])||i.isBlank())return;var o=i.getExtent();n=i instanceof ri?i.count():(e=i.getTicks()).length;var r,l=t.getLabelModel(),s=Fo(t),u=1;n>40&&(u=Math.ceil(n/40));for(var d=0;d<n;d+=u){var c=s(e?e[d]:{value:o[0]+d},d),h=p(l.getTextRect(c),l.get("rotate")||0);r?r.union(h):r=h}return r;function p(t,e){var n=e*Math.PI/180,a=t.width,i=t.height,o=a*Math.abs(Math.cos(n))+Math.abs(i*Math.sin(n)),r=a*Math.abs(Math.sin(n))+Math.abs(i*Math.cos(n));return new E(t.x,t.y,o,r)}}(t);if(n){var a=t.isHorizontal()?"height":"width",i=t.model.get(["axisLabel","margin"]);e[a]-=n[a]+i,"top"===t.position?e.y+=n.height+i:"left"===t.position&&(e.x+=n.width+i)}}})}
/**!
* Sortable 1.15.7
* @author RubaXa <trash@rubaxa.org>
* @author owenm <owen23355@gmail.com>
* @license MIT
*/
function fm(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var a=n.call(t,e);if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function gm(){return gm=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var a in n)({}).hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},gm.apply(null,arguments)}function vm(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,a)}return n}function ym(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?vm(Object(n),!0).forEach(function(e){fm(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):vm(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function mm(t){return(mm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}An([jo]),An([function(t){t.registerPainter("svg",ey)}]),An([Yo,Uo,Xo,Ho,Zo,qo,function(t){t.registerChartView(el),t.registerSeriesModel(Sl),t.registerLayout(Ml),t.registerVisual(Cl),function(t){t.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(t,e){e.eachComponent({mainType:"series",subType:"tree",query:t},function(e){var n=t.dataIndex,a=e.getData().tree.getNodeByDataIndex(n);a.isExpand=!a.isExpand})}),t.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(t,e,n){e.eachComponent({mainType:"series",subType:"tree",query:t},function(e){var n=e.coordinateSystem,a=Nt(n,t,e.get("scaleLimit"));e.setCenter(a.center),e.setZoom(a.zoom)})})}(t)},function(t){t.registerSeriesModel(Ll),t.registerChartView(Ul),t.registerVisual(Hl),t.registerLayout(rs),function(t){for(var e=0;e<Tl.length;e++)t.registerAction({type:Tl[e],update:"updateView"},zt);t.registerAction({type:"treemapRootToNode",update:"updateView"},function(t,e){e.eachComponent({mainType:"series",subType:"treemap",query:t},function(e,n){var a=xl(t,["treemapZoomToNode","treemapRootToNode"],e);if(a){var i=e.getViewRoot();i&&(t.direction=bl(i,a.node)?"rollUp":"drillDown"),e.resetViewRoot(a.node)}})})}(t)},function(t){t.registerChartView(Zs),t.registerSeriesModel(eu),t.registerProcessor(hs),t.registerVisual(ps),t.registerVisual(gs),t.registerLayout(Ms),t.registerLayout(t.PRIORITY.VISUAL.POST_CHART_LAYOUT,Es),t.registerLayout(zs),t.registerCoordinateSystem("graphView",{dimensions:rt.dimensions,create:Rs}),t.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},zt),t.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},zt),t.registerAction({type:"graphRoam",event:"graphRoam",update:"none"},function(t,e,n){e.eachComponent({mainType:"series",query:t},function(e){var a=n.getViewOfSeriesModel(e);a&&(null!=t.dx&&null!=t.dy&&a.updateViewOnPan(e,n,t),null!=t.zoom&&null!=t.originX&&null!=t.originY&&a.updateViewOnZoom(e,n,t));var i=e.coordinateSystem,o=Nt(i,t,e.get("scaleLimit"));e.setCenter&&e.setCenter(o.center),e.setZoom&&e.setZoom(o.zoom)})})},function(t){t.registerChartView(ru),t.registerSeriesModel(lu),t.registerLayout(t.PRIORITY.VISUAL.POST_CHART_LAYOUT,uu),t.registerProcessor(He("chord"))},function(t){t.registerChartView(pu),t.registerSeriesModel(fu)},function(t){t.registerChartView(yu),t.registerSeriesModel(mu),t.registerLayout(xu),t.registerProcessor(He("funnel"))},function(t){An(Qu),t.registerChartView(_u),t.registerSeriesModel(Cu),t.registerVisual(t.PRIORITY.VISUAL.BRUSH,Lu)},function(t){t.registerChartView(ed),t.registerSeriesModel(ad),t.registerLayout(id),t.registerVisual(vd),t.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(t,e){e.eachComponent({mainType:"series",subType:"sankey",query:t},function(e){e.setNodePosition(t.dataIndex,[t.localX,t.localY])})}),t.registerAction({type:"sankeyRoam",event:"sankeyRoam",update:"none"},function(t,e,n){e.eachComponent({mainType:"series",subType:"sankey",query:t},function(e){var n=e.coordinateSystem,a=Nt(n,t,e.get("scaleLimit"));e.setCenter(a.center),e.setZoom(a.zoom)})})},function(t){t.registerSeriesModel(yd),t.registerChartView(md),t.registerLayout(Md),t.registerTransform(Cd)},$o,function(t){t.registerChartView(Ld),t.registerSeriesModel(Ad),t.registerLayout(Wn("effectScatter"))},function(t){t.registerChartView(Vd),t.registerSeriesModel(Fd),t.registerLayout(Od),t.registerVisual(Yd)},function(t){t.registerChartView(Hd),t.registerSeriesModel(Zd)},function(t){t.registerChartView(Qd),t.registerSeriesModel(vc),t.registerLayout(t.PRIORITY.VISUAL.LAYOUT,_t(oa,"pictorialBar")),t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,ra("pictorialBar"))},function(t){t.registerChartView(yc),t.registerSeriesModel(mc),t.registerLayout(xc),t.registerProcessor(He("themeRiver"))},function(t){t.registerChartView(Ic),t.registerSeriesModel(Mc),t.registerLayout(_t(Dc,"sunburst")),t.registerProcessor(_t(He,"sunburst")),t.registerVisual(Ac),function(t){t.registerAction({type:wc,update:"updateView"},function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},function(e,n){var a=xl(t,[wc],e);if(a){var i=e.getViewRoot();i&&(t.direction=bl(i,a.node)?"rollUp":"drillDown"),e.resetViewRoot(a.node)}})}),t.registerAction({type:Sc,update:"none"},function(t,e,n){t=wt({},t),e.eachComponent({mainType:"series",subType:"sunburst",query:t},function(e){var n=xl(t,[Sc],e);n&&(t.dataIndex=n.node.dataIndex)}),n.dispatchAction(wt(t,{type:"highlight"}))}),t.registerAction({type:"sunburstUnhighlight",update:"updateView"},function(t,e,n){t=wt({},t),n.dispatchAction(wt(t,{type:"downplay"}))})}(t)},function(t){t.registerChartView(bh),t.registerSeriesModel(Nc)}]),An(Ko),An(function(t){An(Ba),Na.registerAxisPointerClass("PolarAxisPointer",Bh),t.registerCoordinateSystem("polar",Jh),t.registerComponentModel(Wh),t.registerComponentView(fp),Ln(t,"angle",jh,hp),Ln(t,"radius",Yh,pp),t.registerComponentView(ip),t.registerComponentView(lp),t.registerLayout(_t(cp,"bar"))}),An(Qo),An(function(t){An(Ba),Na.registerAxisPointerClass("SingleAxisPointer",Tp),t.registerComponentView(Pp),t.registerComponentView(yp),t.registerComponentModel(xp),Ln(t,"single",xp,xp.defaultOption),t.registerCoordinateSystem("single",Ip)}),An(Qu),An(function(t){t.registerComponentModel(kp),t.registerComponentView(Np),t.registerCoordinateSystem("calendar",Rp)}),An(function(t){t.registerComponentModel(df),t.registerComponentView(gf),t.registerCoordinateSystem("matrix",Sf)}),An(function(t){t.registerComponentModel(Yf),t.registerComponentView(Hf),t.registerPreprocessor(function(t){var e=t.graphic;It(e)?e[0]&&e[0].elements?t.graphic=[t.graphic[0]]:t.graphic=[{elements:e}]:e&&!e.elements&&(t.graphic=[{elements:[e]}])})}),An(Jo),An(tr),An(Ba),An(er),An(nr),An(function(t){t.registerComponentModel(Jf),t.registerComponentView(ig),t.registerSubTypeDefaulter("timeline",function(){return"slider"}),function(t){t.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(t,e,n){var a=e.getComponent("timeline");return a&&null!=t.currentIndex&&(a.setCurrentIndex(t.currentIndex),!a.get("loop",!0)&&a.isIndexMax()&&a.getPlayState()&&(a.setPlayState(!1),n.dispatchAction({type:"timelinePlayChange",playState:!1,from:t.from}))),e.resetOption("timeline",{replaceMerge:a.get("replaceMerge",!0)}),vt({currentIndex:a.option.currentIndex},t)}),t.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(t,e){var n=e.getComponent("timeline");n&&null!=t.playState&&n.setPlayState(t.playState)})}(t),t.registerPreprocessor(lg)}),An(ar),An(ir),An(function(t){t.registerComponentModel(dg),t.registerComponentView(mg),t.registerPreprocessor(function(t){Li(t.series,"markArea")&&(t.markArea=t.markArea||{})})}),An(or),An(rr),An(lr),An(sr),An(ur),An(dr),An(cr),An(function(t){t.registerComponentModel(_g),t.registerComponentView(bg)}),An(function(t){t.registerPreprocessor(Dg),t.registerVisual(t.PRIORITY.VISUAL.ARIA,Tg)}),An(function(t){t.registerTransform(Gg),t.registerTransform(Wg)}),An(function(t){t.registerComponentModel(Fg),t.registerComponentView(jg)}),An(function(t){t.registerUpdateLifecycle("series:beforeupdate",function(t,e,n){G(Vt(n.seriesTransition),function(t){G(Vt(t.to),function(t){for(var e=n.updatedSeries,a=0;a<e.length;a++)(null!=t.seriesIndex&&t.seriesIndex===e[a].seriesIndex||null!=t.seriesId&&t.seriesId===e[a].id)&&(e[a][To]=!0)})})}),t.registerUpdateLifecycle("series:transition",function(t,e,n){var a=Ry(e);if(a.oldSeries&&n.updatedSeries&&n.optionChanged){var i=n.seriesTransition;if(i)G(Vt(i),function(t){!function(t,e,n,a){var i=[],o=[];G(Vt(t.from),function(t){var n=Xy(e.oldSeries,t);n>=0&&i.push({dataGroupId:e.oldDataGroupIds[n],data:e.oldData[n],divide:Uy(e.oldData[n]),groupIdDim:t.dimension})}),G(Vt(t.to),function(t){var a=Xy(n.updatedSeries,t);if(a>=0){var i=n.updatedSeries[a].getData();o.push({dataGroupId:e.oldDataGroupIds[a],data:i,divide:Uy(i),groupIdDim:t.dimension})}}),i.length>0&&o.length>0&&Fy(i,o,a)}(t,a,n,e)});else{var o=function(t,e){var n=Ot(),a=Ot(),i=Ot();return G(t.oldSeries,function(e,n){var o=t.oldDataGroupIds[n],r=t.oldData[n],l=jy(e),s=Yy(l);a.set(s,{dataGroupId:o,data:r}),It(l)&&G(l,function(t){i.set(t,{key:s,dataGroupId:o,data:r})})}),G(e.updatedSeries,function(t){if(t.isUniversalTransitionEnabled()&&t.isAnimationEnabled()){var e=t.get("dataGroupId"),o=t.getData(),r=jy(t),l=Yy(r),s=a.get(l);if(s)n.set(l,{oldSeries:[{dataGroupId:s.dataGroupId,divide:Uy(s.data),data:s.data}],newSeries:[{dataGroupId:e,divide:Uy(o),data:o}]});else if(It(r)){var u=[];G(r,function(t){var e=a.get(t);e.data&&u.push({dataGroupId:e.dataGroupId,divide:Uy(e.data),data:e.data})}),u.length&&n.set(l,{oldSeries:u,newSeries:[{dataGroupId:e,data:o,divide:Uy(o)}]})}else{var d=i.get(r);if(d){var c=n.get(d.key);c||(c={oldSeries:[{dataGroupId:d.dataGroupId,data:d.data,divide:Uy(d.data)}],newSeries:[]},n.set(d.key,c)),c.newSeries.push({dataGroupId:e,data:o,divide:Uy(o)})}}}}),n}(a,n);G(o.keys(),function(t){var n=o.get(t);Fy(n.oldSeries,n.newSeries,e)})}G(n.updatedSeries,function(t){t[To]&&(t[To]=!1)})}for(var r=t.getSeries(),l=a.oldSeries=[],s=a.oldDataGroupIds=[],u=a.oldData=[],d=0;d<r.length;d++){var c=r[d].getData();c.count()<1e4&&(l.push(r[d]),s.push(r[d].get("dataGroupId")),u.push(c))}})}),An(function(t){t.registerUpdateLifecycle("series:beforeupdate",function(t,e,n){var a=jr(e).labelManager;a||(a=jr(e).labelManager=new Fr),a.clearLabels()}),t.registerUpdateLifecycle("series:layoutlabels",function(t,e,n){var a=jr(e).labelManager;n.updatedSeries.forEach(function(t){a.addLabelsOfSeries(e.getViewOfSeriesModel(t))}),a.updateLayoutConfig(e),a.layout(e),a.processLabelsOverall()})}),An(function(t){Go(t),Lo({createScaleBreakContext:Zy,pruneTicksByBreak:Ky,addBreaksToTicks:Qy,parseAxisBreakOption:tm,identifyAxisBreak:em,serializeAxisBreakIdentifier:nm,retrieveAxisBreakPairs:am,getTicksLogTransformBreak:im,logarithmicParseBreaksFromOption:om,makeAxisLabelFormatterParamBreak:lm}),ko({adjustBreakLabelPair:cm,buildAxisBreakLine:dm,rectCoordBuildBreakAxis:um,updateModelAxisBreak:hm})}),An(function(){Wo(pm)}),An(hr);function xm(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var _m=xm(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),bm=xm(/Edge/i),wm=xm(/firefox/i),Sm=xm(/safari/i)&&!xm(/chrome/i)&&!xm(/android/i),Im=xm(/iP(ad|od|hone)/i),Mm=xm(/chrome/i)&&xm(/android/i),Cm={capture:!1,passive:!1};function Tm(t,e,n){t.addEventListener(e,n,!_m&&Cm)}function Dm(t,e,n){t.removeEventListener(e,n,!_m&&Cm)}function Lm(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(n){return!1}return!1}}function Am(t){return t.host&&t!==document&&t.host.nodeType&&t.host!==t?t.host:t.parentNode}function Pm(t,e,n,a){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&Lm(t,e):Lm(t,e))||a&&t===n)return t;if(t===n)break}while(t=Am(t))}return null}var km,Em=/\s+/g;function Nm(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var a=(" "+t.className+" ").replace(Em," ").replace(" "+e+" "," ");t.className=(a+(n?" "+e:"")).replace(Em," ")}}function zm(t,e,n){var a=t&&t.style;if(a){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in a||-1!==e.indexOf("webkit")||(e="-webkit-"+e),a[e]=n+("string"==typeof n?"":"px")}}function Rm(t,e){var n="";if("string"==typeof t)n=t;else do{var a=zm(t,"transform");a&&"none"!==a&&(n=a+" "+n)}while(!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function Om(t,e,n){if(t){var a=t.getElementsByTagName(e),i=0,o=a.length;if(n)for(;i<o;i++)n(a[i],i);return a}return[]}function Vm(){var t=document.scrollingElement;return t||document.documentElement}function Bm(t,e,n,a,i){if(t.getBoundingClientRect||t===window){var o,r,l,s,u,d,c;if(t!==window&&t.parentNode&&t!==Vm()?(r=(o=t.getBoundingClientRect()).top,l=o.left,s=o.bottom,u=o.right,d=o.height,c=o.width):(r=0,l=0,s=window.innerHeight,u=window.innerWidth,d=window.innerHeight,c=window.innerWidth),(e||n)&&t!==window&&(i=i||t.parentNode,!_m))do{if(i&&i.getBoundingClientRect&&("none"!==zm(i,"transform")||n&&"static"!==zm(i,"position"))){var h=i.getBoundingClientRect();r-=h.top+parseInt(zm(i,"border-top-width")),l-=h.left+parseInt(zm(i,"border-left-width")),s=r+o.height,u=l+o.width;break}}while(i=i.parentNode);if(a&&t!==window){var p=Rm(i||t),f=p&&p.a,g=p&&p.d;p&&(s=(r/=g)+(d/=g),u=(l/=f)+(c/=f))}return{top:r,left:l,bottom:s,right:u,width:c,height:d}}}function Gm(t,e,n){for(var a=Um(t,!0),i=Bm(t)[e];a;){if(!(i>=Bm(a)[n]))return a;if(a===Vm())break;a=Um(a,!1)}return!1}function Wm(t,e,n,a){for(var i=0,o=0,r=t.children;o<r.length;){if("none"!==r[o].style.display&&r[o]!==qx.ghost&&(a||r[o]!==qx.dragged)&&Pm(r[o],n.draggable,t,!1)){if(i===e)return r[o];i++}o++}return null}function Fm(t,e){for(var n=t.lastElementChild;n&&(n===qx.ghost||"none"===zm(n,"display")||e&&!Lm(n,e));)n=n.previousElementSibling;return n||null}function jm(t,e){var n=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||t===qx.clone||e&&!Lm(t,e)||n++;return n}function Ym(t){var e=0,n=0,a=Vm();if(t)do{var i=Rm(t),o=i.a,r=i.d;e+=t.scrollLeft*o,n+=t.scrollTop*r}while(t!==a&&(t=t.parentNode));return[e,n]}function Um(t,e){if(!t||!t.getBoundingClientRect)return Vm();var n=t,a=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=zm(n);if(n.clientWidth<n.scrollWidth&&("auto"==i.overflowX||"scroll"==i.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==i.overflowY||"scroll"==i.overflowY)){if(!n.getBoundingClientRect||n===document.body)return Vm();if(a||e)return n;a=!0}}}while(n=n.parentNode);return Vm()}function Xm(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}function Hm(t,e){return function(){if(!km){var n=arguments;1===n.length?t.call(this,n[0]):t.apply(this,n),km=setTimeout(function(){km=void 0},e)}}}function Zm(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function qm(t){var e=window.Polymer,n=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):n?n(t).clone(!0)[0]:t.cloneNode(!0)}function $m(t,e,n){var a={};return Array.from(t.children).forEach(function(i){var o,r,l,s;if(Pm(i,e.draggable,t,!1)&&!i.animated&&i!==n){var u=Bm(i);a.left=Math.min(null!==(o=a.left)&&void 0!==o?o:1/0,u.left),a.top=Math.min(null!==(r=a.top)&&void 0!==r?r:1/0,u.top),a.right=Math.max(null!==(l=a.right)&&void 0!==l?l:-1/0,u.right),a.bottom=Math.max(null!==(s=a.bottom)&&void 0!==s?s:-1/0,u.bottom)}}),a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}var Km="Sortable"+(new Date).getTime();function Qm(){var t,e=[];return{captureAnimationState:function(){(e=[],this.options.animation)&&[].slice.call(this.el.children).forEach(function(t){if("none"!==zm(t,"display")&&t!==qx.ghost){e.push({target:t,rect:Bm(t)});var n=ym({},e[e.length-1].rect);if(t.thisAnimationDuration){var a=Rm(t,!0);a&&(n.top-=a.f,n.left-=a.e)}t.fromRect=n}})},addAnimationState:function(t){e.push(t)},removeAnimationState:function(t){e.splice(function(t,e){for(var n in t)if(t.hasOwnProperty(n))for(var a in e)if(e.hasOwnProperty(a)&&e[a]===t[n][a])return Number(n);return-1}(e,{target:t}),1)},animateAll:function(n){var a=this;if(!this.options.animation)return clearTimeout(t),void("function"==typeof n&&n());var i=!1,o=0;e.forEach(function(t){var e=0,n=t.target,r=n.fromRect,l=Bm(n),s=n.prevFromRect,u=n.prevToRect,d=t.rect,c=Rm(n,!0);c&&(l.top-=c.f,l.left-=c.e),n.toRect=l,n.thisAnimationDuration&&Xm(s,l)&&!Xm(r,l)&&(d.top-l.top)/(d.left-l.left)===(r.top-l.top)/(r.left-l.left)&&(e=function(t,e,n,a){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))*a.animation}(d,s,u,a.options)),Xm(l,r)||(n.prevFromRect=r,n.prevToRect=l,e||(e=a.options.animation),a.animate(n,d,l,e)),e&&(i=!0,o=Math.max(o,e),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout(function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null},e),n.thisAnimationDuration=e)}),clearTimeout(t),i?t=setTimeout(function(){"function"==typeof n&&n()},o):"function"==typeof n&&n(),e=[]},animate:function(t,e,n,a){if(a){zm(t,"transition",""),zm(t,"transform","");var i=Rm(this.el),o=i&&i.a,r=i&&i.d,l=(e.left-n.left)/(o||1),s=(e.top-n.top)/(r||1);t.animatingX=!!l,t.animatingY=!!s,zm(t,"transform","translate3d("+l+"px,"+s+"px,0)"),this.forRepaintDummy=function(t){return t.offsetWidth}(t),zm(t,"transition","transform "+a+"ms"+(this.options.easing?" "+this.options.easing:"")),zm(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout(function(){zm(t,"transition",""),zm(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1},a)}}}}var Jm=[],tx={initializeByDefault:!0},ex={mount:function(t){for(var e in tx)tx.hasOwnProperty(e)&&!(e in t)&&(t[e]=tx[e]);Jm.forEach(function(e){if(e.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),Jm.push(t)},pluginEvent:function(t,e,n){var a=this;this.eventCanceled=!1,n.cancel=function(){a.eventCanceled=!0};var i=t+"Global";Jm.forEach(function(a){e[a.pluginName]&&(e[a.pluginName][i]&&e[a.pluginName][i](ym({sortable:e},n)),e.options[a.pluginName]&&e[a.pluginName][t]&&e[a.pluginName][t](ym({sortable:e},n)))})},initializePlugins:function(t,e,n,a){for(var i in Jm.forEach(function(a){var i=a.pluginName;if(t.options[i]||a.initializeByDefault){var o=new a(t,e,t.options);o.sortable=t,o.options=t.options,t[i]=o,gm(n,o.defaults)}}),t.options)if(t.options.hasOwnProperty(i)){var o=this.modifyOption(t,i,t.options[i]);void 0!==o&&(t.options[i]=o)}},getEventProperties:function(t,e){var n={};return Jm.forEach(function(a){"function"==typeof a.eventProperties&&gm(n,a.eventProperties.call(e[a.pluginName],t))}),n},modifyOption:function(t,e,n){var a;return Jm.forEach(function(i){t[i.pluginName]&&i.optionListeners&&"function"==typeof i.optionListeners[e]&&(a=i.optionListeners[e].call(t[i.pluginName],n))}),a}};var nx=["evt"],ax=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=n.evt,i=function(t,e){if(null==t)return{};var n,a,i=function(t,e){if(null==t)return{};var n={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(-1!==e.indexOf(a))continue;n[a]=t[a]}return n}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(a=0;a<o.length;a++)n=o[a],-1===e.indexOf(n)&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}(n,nx);ex.pluginEvent.bind(qx)(t,e,ym({dragEl:ox,parentEl:rx,ghostEl:lx,rootEl:sx,nextEl:ux,lastDownEl:dx,cloneEl:cx,cloneHidden:hx,dragStarted:Mx,putSortable:mx,activeSortable:qx.active,originalEvent:a,oldIndex:px,oldDraggableIndex:gx,newIndex:fx,newDraggableIndex:vx,hideGhostForTarget:Ux,unhideGhostForTarget:Xx,cloneNowHidden:function(){hx=!0},cloneNowShown:function(){hx=!1},dispatchSortableEvent:function(t){ix({sortable:e,name:t,originalEvent:a})}},i))};function ix(t){!function(t){var e=t.sortable,n=t.rootEl,a=t.name,i=t.targetEl,o=t.cloneEl,r=t.toEl,l=t.fromEl,s=t.oldIndex,u=t.newIndex,d=t.oldDraggableIndex,c=t.newDraggableIndex,h=t.originalEvent,p=t.putSortable,f=t.extraEventProperties;if(e=e||n&&n[Km]){var g,v=e.options,y="on"+a.charAt(0).toUpperCase()+a.substr(1);!window.CustomEvent||_m||bm?(g=document.createEvent("Event")).initEvent(a,!0,!0):g=new CustomEvent(a,{bubbles:!0,cancelable:!0}),g.to=r||n,g.from=l||n,g.item=i||n,g.clone=o,g.oldIndex=s,g.newIndex=u,g.oldDraggableIndex=d,g.newDraggableIndex=c,g.originalEvent=h,g.pullMode=p?p.lastPutMode:void 0;var m=ym(ym({},f),ex.getEventProperties(a,e));for(var x in m)g[x]=m[x];n&&n.dispatchEvent(g),v[y]&&v[y].call(e,g)}}(ym({putSortable:mx,cloneEl:cx,targetEl:ox,rootEl:sx,oldIndex:px,oldDraggableIndex:gx,newIndex:fx,newDraggableIndex:vx},t))}var ox,rx,lx,sx,ux,dx,cx,hx,px,fx,gx,vx,yx,mx,xx,_x,bx,wx,Sx,Ix,Mx,Cx,Tx,Dx,Lx,Ax=!1,Px=!1,kx=[],Ex=!1,Nx=!1,zx=[],Rx=!1,Ox=[],Vx="undefined"!=typeof document,Bx=Im,Gx=bm||_m?"cssFloat":"float",Wx=Vx&&!Mm&&!Im&&"draggable"in document.createElement("div"),Fx=function(){if(Vx){if(_m)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),jx=function(t,e){var n=zm(t),a=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=Wm(t,0,e),o=Wm(t,1,e),r=i&&zm(i),l=o&&zm(o),s=r&&parseInt(r.marginLeft)+parseInt(r.marginRight)+Bm(i).width,u=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+Bm(o).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&r.float&&"none"!==r.float){var d="left"===r.float?"left":"right";return!o||"both"!==l.clear&&l.clear!==d?"horizontal":"vertical"}return i&&("block"===r.display||"flex"===r.display||"table"===r.display||"grid"===r.display||s>=a&&"none"===n[Gx]||o&&"none"===n[Gx]&&s+u>a)?"vertical":"horizontal"},Yx=function(t){function e(t,n){return function(a,i,o,r){var l=a.options.group.name&&i.options.group.name&&a.options.group.name===i.options.group.name;if(null==t&&(n||l))return!0;if(null==t||!1===t)return!1;if(n&&"clone"===t)return t;if("function"==typeof t)return e(t(a,i,o,r),n)(a,i,o,r);var s=(n?a:i).options.group.name;return!0===t||"string"==typeof t&&t===s||t.join&&t.indexOf(s)>-1}}var n={},a=t.group;a&&"object"==mm(a)||(a={name:a}),n.name=a.name,n.checkPull=e(a.pull,!0),n.checkPut=e(a.put),n.revertClone=a.revertClone,t.group=n},Ux=function(){!Fx&&lx&&zm(lx,"display","none")},Xx=function(){!Fx&&lx&&zm(lx,"display","")};Vx&&!Mm&&document.addEventListener("click",function(t){if(Px)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),Px=!1,!1},!0);var Hx=function(t){if(ox){t=t.touches?t.touches[0]:t;var e=(i=t.clientX,o=t.clientY,kx.some(function(t){var e=t[Km].options.emptyInsertThreshold;if(e&&!Fm(t)){var n=Bm(t),a=i>=n.left-e&&i<=n.right+e,l=o>=n.top-e&&o<=n.bottom+e;return a&&l?r=t:void 0}}),r);if(e){var n={};for(var a in t)t.hasOwnProperty(a)&&(n[a]=t[a]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[Km]._onDragOver(n)}}var i,o,r},Zx=function(t){ox&&ox.parentNode[Km]._isOutsideThisEl(t.target)};function qx(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=gm({},e),t[Km]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return jx(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==qx.supportPointer&&"PointerEvent"in window&&(!Sm||Im),emptyInsertThreshold:5};for(var a in ex.initializePlugins(this,t,n),n)!(a in e)&&(e[a]=n[a]);for(var i in Yx(e),this)"_"===i.charAt(0)&&"function"==typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!e.forceFallback&&Wx,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?Tm(t,"pointerdown",this._onTapStart):(Tm(t,"mousedown",this._onTapStart),Tm(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(Tm(t,"dragover",this),Tm(t,"dragenter",this)),kx.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),gm(this,Qm())}function $x(t,e,n,a,i,o,r,l){var s,u,d=t[Km],c=d.options.onMove;return!window.CustomEvent||_m||bm?(s=document.createEvent("Event")).initEvent("move",!0,!0):s=new CustomEvent("move",{bubbles:!0,cancelable:!0}),s.to=e,s.from=t,s.dragged=n,s.draggedRect=a,s.related=i||e,s.relatedRect=o||Bm(e),s.willInsertAfter=l,s.originalEvent=r,t.dispatchEvent(s),c&&(u=c.call(d,s,r)),u}function Kx(t){t.draggable=!1}function Qx(){Rx=!1}function Jx(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,a=0;n--;)a+=e.charCodeAt(n);return a.toString(36)}function t_(t){return setTimeout(t,0)}function e_(t){return clearTimeout(t)}qx.prototype={constructor:qx,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(Cx=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,ox):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,a=this.options,i=a.preventOnFilter,o=t.type,r=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,l=(r||t).target,s=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,u=a.filter;if(function(t){Ox.length=0;var e=t.getElementsByTagName("input"),n=e.length;for(;n--;){var a=e[n];a.checked&&Ox.push(a)}}(n),!ox&&!(/mousedown|pointerdown/.test(o)&&0!==t.button||a.disabled)&&!s.isContentEditable&&(this.nativeDraggable||!Sm||!l||"SELECT"!==l.tagName.toUpperCase())&&!((l=Pm(l,a.draggable,n,!1))&&l.animated||dx===l)){if(px=jm(l),gx=jm(l,a.draggable),"function"==typeof u){if(u.call(this,t,l,this))return ix({sortable:e,rootEl:s,name:"filter",targetEl:l,toEl:n,fromEl:n}),ax("filter",e,{evt:t}),void(i&&t.preventDefault())}else if(u&&(u=u.split(",").some(function(a){if(a=Pm(s,a.trim(),n,!1))return ix({sortable:e,rootEl:a,name:"filter",targetEl:l,fromEl:n,toEl:n}),ax("filter",e,{evt:t}),!0})))return void(i&&t.preventDefault());a.handle&&!Pm(s,a.handle,n,!1)||this._prepareDragStart(t,r,l)}}},_prepareDragStart:function(t,e,n){var a,i=this,o=i.el,r=i.options,l=o.ownerDocument;if(n&&!ox&&n.parentNode===o){var s=Bm(n);if(sx=o,rx=(ox=n).parentNode,ux=ox.nextSibling,dx=n,yx=r.group,qx.dragged=ox,xx={target:ox,clientX:(e||t).clientX,clientY:(e||t).clientY},Sx=xx.clientX-s.left,Ix=xx.clientY-s.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,ox.style["will-change"]="all",a=function(){ax("delayEnded",i,{evt:t}),qx.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!wm&&i.nativeDraggable&&(ox.draggable=!0),i._triggerDragStart(t,e),ix({sortable:i,name:"choose",originalEvent:t}),Nm(ox,r.chosenClass,!0))},r.ignore.split(",").forEach(function(t){Om(ox,t.trim(),Kx)}),Tm(l,"dragover",Hx),Tm(l,"mousemove",Hx),Tm(l,"touchmove",Hx),r.supportPointer?(Tm(l,"pointerup",i._onDrop),!this.nativeDraggable&&Tm(l,"pointercancel",i._onDrop)):(Tm(l,"mouseup",i._onDrop),Tm(l,"touchend",i._onDrop),Tm(l,"touchcancel",i._onDrop)),wm&&this.nativeDraggable&&(this.options.touchStartThreshold=4,ox.draggable=!0),ax("delayStart",this,{evt:t}),!r.delay||r.delayOnTouchOnly&&!e||this.nativeDraggable&&(bm||_m))a();else{if(qx.eventCanceled)return void this._onDrop();r.supportPointer?(Tm(l,"pointerup",i._disableDelayedDrag),Tm(l,"pointercancel",i._disableDelayedDrag)):(Tm(l,"mouseup",i._disableDelayedDrag),Tm(l,"touchend",i._disableDelayedDrag),Tm(l,"touchcancel",i._disableDelayedDrag)),Tm(l,"mousemove",i._delayedDragTouchMoveHandler),Tm(l,"touchmove",i._delayedDragTouchMoveHandler),r.supportPointer&&Tm(l,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(a,r.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){ox&&Kx(ox),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;Dm(t,"mouseup",this._disableDelayedDrag),Dm(t,"touchend",this._disableDelayedDrag),Dm(t,"touchcancel",this._disableDelayedDrag),Dm(t,"pointerup",this._disableDelayedDrag),Dm(t,"pointercancel",this._disableDelayedDrag),Dm(t,"mousemove",this._delayedDragTouchMoveHandler),Dm(t,"touchmove",this._delayedDragTouchMoveHandler),Dm(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?Tm(document,"pointermove",this._onTouchMove):Tm(document,e?"touchmove":"mousemove",this._onTouchMove):(Tm(ox,"dragend",this),Tm(sx,"dragstart",this._onDragStart));try{document.selection?t_(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(n){}},_dragStarted:function(t,e){if(Ax=!1,sx&&ox){ax("dragStarted",this,{evt:e}),this.nativeDraggable&&Tm(document,"dragover",Zx);var n=this.options;!t&&Nm(ox,n.dragClass,!1),Nm(ox,n.ghostClass,!0),qx.active=this,t&&this._appendGhost(),ix({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(_x){this._lastX=_x.clientX,this._lastY=_x.clientY,Ux();for(var t=document.elementFromPoint(_x.clientX,_x.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(_x.clientX,_x.clientY))!==e;)e=t;if(ox.parentNode[Km]._isOutsideThisEl(t),e)do{if(e[Km]){if(e[Km]._onDragOver({clientX:_x.clientX,clientY:_x.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}t=e}while(e=Am(e));Xx()}},_onTouchMove:function(t){if(xx){var e=this.options,n=e.fallbackTolerance,a=e.fallbackOffset,i=t.touches?t.touches[0]:t,o=lx&&Rm(lx,!0),r=lx&&o&&o.a,l=lx&&o&&o.d,s=Bx&&Lx&&Ym(Lx),u=(i.clientX-xx.clientX+a.x)/(r||1)+(s?s[0]-zx[0]:0)/(r||1),d=(i.clientY-xx.clientY+a.y)/(l||1)+(s?s[1]-zx[1]:0)/(l||1);if(!qx.active&&!Ax){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}if(lx){o?(o.e+=u-(bx||0),o.f+=d-(wx||0)):o={a:1,b:0,c:0,d:1,e:u,f:d};var c="matrix(".concat(o.a,",").concat(o.b,",").concat(o.c,",").concat(o.d,",").concat(o.e,",").concat(o.f,")");zm(lx,"webkitTransform",c),zm(lx,"mozTransform",c),zm(lx,"msTransform",c),zm(lx,"transform",c),bx=u,wx=d,_x=i}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!lx){var t=this.options.fallbackOnBody?document.body:sx,e=Bm(ox,!0,Bx,!0,t),n=this.options;if(Bx){for(Lx=t;"static"===zm(Lx,"position")&&"none"===zm(Lx,"transform")&&Lx!==document;)Lx=Lx.parentNode;Lx!==document.body&&Lx!==document.documentElement?(Lx===document&&(Lx=Vm()),e.top+=Lx.scrollTop,e.left+=Lx.scrollLeft):Lx=Vm(),zx=Ym(Lx)}Nm(lx=ox.cloneNode(!0),n.ghostClass,!1),Nm(lx,n.fallbackClass,!0),Nm(lx,n.dragClass,!0),zm(lx,"transition",""),zm(lx,"transform",""),zm(lx,"box-sizing","border-box"),zm(lx,"margin",0),zm(lx,"top",e.top),zm(lx,"left",e.left),zm(lx,"width",e.width),zm(lx,"height",e.height),zm(lx,"opacity","0.8"),zm(lx,"position",Bx?"absolute":"fixed"),zm(lx,"zIndex","100000"),zm(lx,"pointerEvents","none"),qx.ghost=lx,t.appendChild(lx),zm(lx,"transform-origin",Sx/parseInt(lx.style.width)*100+"% "+Ix/parseInt(lx.style.height)*100+"%")}},_onDragStart:function(t,e){var n=this,a=t.dataTransfer,i=n.options;ax("dragStart",this,{evt:t}),qx.eventCanceled?this._onDrop():(ax("setupClone",this),qx.eventCanceled||((cx=qm(ox)).removeAttribute("id"),cx.draggable=!1,cx.style["will-change"]="",this._hideClone(),Nm(cx,this.options.chosenClass,!1),qx.clone=cx),n.cloneId=t_(function(){ax("clone",n),qx.eventCanceled||(n.options.removeCloneOnHide||sx.insertBefore(cx,ox),n._hideClone(),ix({sortable:n,name:"clone"}))}),!e&&Nm(ox,i.dragClass,!0),e?(Px=!0,n._loopId=setInterval(n._emulateDragOver,50)):(Dm(document,"mouseup",n._onDrop),Dm(document,"touchend",n._onDrop),Dm(document,"touchcancel",n._onDrop),a&&(a.effectAllowed="move",i.setData&&i.setData.call(n,a,ox)),Tm(document,"drop",n),zm(ox,"transform","translateZ(0)")),Ax=!0,n._dragStartId=t_(n._dragStarted.bind(n,e,t)),Tm(document,"selectstart",n),Mx=!0,window.getSelection().removeAllRanges(),Sm&&zm(document.body,"user-select","none"))},_onDragOver:function(t){var e,n,a,i,o=this.el,r=t.target,l=this.options,s=l.group,u=qx.active,d=yx===s,c=l.sort,h=mx||u,p=this,f=!1;if(!Rx){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),r=Pm(r,l.draggable,o,!0),L("dragOver"),qx.eventCanceled)return f;if(ox.contains(t.target)||r.animated&&r.animatingX&&r.animatingY||p._ignoreWhileAnimating===r)return P(!1);if(Px=!1,u&&!l.disabled&&(d?c||(a=rx!==sx):mx===this||(this.lastPutMode=yx.checkPull(this,u,ox,t))&&s.checkPut(this,u,ox,t))){if(i="vertical"===this._getDirection(t,r),e=Bm(ox),L("dragOverValid"),qx.eventCanceled)return f;if(a)return rx=sx,A(),this._hideClone(),L("revert"),qx.eventCanceled||(ux?sx.insertBefore(ox,ux):sx.appendChild(ox)),P(!0);var g=Fm(o,l.draggable);if(!g||function(t,e,n){var a=Bm(Fm(n.el,n.options.draggable)),i=$m(n.el,n.options,lx),o=10;return e?t.clientX>i.right+o||t.clientY>a.bottom&&t.clientX>a.left:t.clientY>i.bottom+o||t.clientX>a.right&&t.clientY>a.top}(t,i,this)&&!g.animated){if(g===ox)return P(!1);if(g&&o===t.target&&(r=g),r&&(n=Bm(r)),!1!==$x(sx,o,ox,e,r,n,t,!!r))return A(),g&&g.nextSibling?o.insertBefore(ox,g.nextSibling):o.appendChild(ox),rx=o,k(),P(!0)}else if(g&&function(t,e,n){var a=Bm(Wm(n.el,0,n.options,!0)),i=$m(n.el,n.options,lx),o=10;return e?t.clientX<i.left-o||t.clientY<a.top&&t.clientX<a.right:t.clientY<i.top-o||t.clientY<a.bottom&&t.clientX<a.left}(t,i,this)){var v=Wm(o,0,l,!0);if(v===ox)return P(!1);if(n=Bm(r=v),!1!==$x(sx,o,ox,e,r,n,t,!1))return A(),o.insertBefore(ox,v),rx=o,k(),P(!0)}else if(r.parentNode===o){n=Bm(r);var y,m,x,_=ox.parentNode!==o,b=!function(t,e,n){var a=n?t.left:t.top,i=n?t.right:t.bottom,o=n?t.width:t.height,r=n?e.left:e.top,l=n?e.right:e.bottom,s=n?e.width:e.height;return a===r||i===l||a+o/2===r+s/2}(ox.animated&&ox.toRect||e,r.animated&&r.toRect||n,i),w=i?"top":"left",S=Gm(r,"top","top")||Gm(ox,"top","top"),I=S?S.scrollTop:void 0;if(Cx!==r&&(m=n[w],Ex=!1,Nx=!b&&l.invertSwap||_),y=function(t,e,n,a,i,o,r,l){var s=a?t.clientY:t.clientX,u=a?n.height:n.width,d=a?n.top:n.left,c=a?n.bottom:n.right,h=!1;if(!r)if(l&&Dx<u*i){if(!Ex&&(1===Tx?s>d+u*o/2:s<c-u*o/2)&&(Ex=!0),Ex)h=!0;else if(1===Tx?s<d+Dx:s>c-Dx)return-Tx}else if(s>d+u*(1-i)/2&&s<c-u*(1-i)/2)return function(t){return jm(ox)<jm(t)?1:-1}(e);if((h=h||r)&&(s<d+u*o/2||s>c-u*o/2))return s>d+u/2?1:-1;return 0}(t,r,n,i,b?1:l.swapThreshold,null==l.invertedSwapThreshold?l.swapThreshold:l.invertedSwapThreshold,Nx,Cx===r),0!==y){var M=jm(ox);do{M-=y,x=rx.children[M]}while(x&&("none"===zm(x,"display")||x===lx))}if(0===y||x===r)return P(!1);Cx=r,Tx=y;var C=r.nextElementSibling,T=!1,D=$x(sx,o,ox,e,r,n,t,T=1===y);if(!1!==D)return 1!==D&&-1!==D||(T=1===D),Rx=!0,setTimeout(Qx,30),A(),T&&!C?o.appendChild(ox):r.parentNode.insertBefore(ox,T?C:r),S&&Zm(S,0,I-S.scrollTop),rx=ox.parentNode,void 0===m||Nx||(Dx=Math.abs(m-Bm(r)[w])),k(),P(!0)}if(o.contains(ox))return P(!1)}return!1}function L(l,s){ax(l,p,ym({evt:t,isOwner:d,axis:i?"vertical":"horizontal",revert:a,dragRect:e,targetRect:n,canSort:c,fromSortable:h,target:r,completed:P,onMove:function(n,a){return $x(sx,o,ox,e,n,Bm(n),t,a)},changed:k},s))}function A(){L("dragOverAnimationCapture"),p.captureAnimationState(),p!==h&&h.captureAnimationState()}function P(e){return L("dragOverCompleted",{insertion:e}),e&&(d?u._hideClone():u._showClone(p),p!==h&&(Nm(ox,mx?mx.options.ghostClass:u.options.ghostClass,!1),Nm(ox,l.ghostClass,!0)),mx!==p&&p!==qx.active?mx=p:p===qx.active&&mx&&(mx=null),h===p&&(p._ignoreWhileAnimating=r),p.animateAll(function(){L("dragOverAnimationComplete"),p._ignoreWhileAnimating=null}),p!==h&&(h.animateAll(),h._ignoreWhileAnimating=null)),(r===ox&&!ox.animated||r===o&&!r.animated)&&(Cx=null),l.dragoverBubble||t.rootEl||r===document||(ox.parentNode[Km]._isOutsideThisEl(t.target),!e&&Hx(t)),!l.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),f=!0}function k(){fx=jm(ox),vx=jm(ox,l.draggable),ix({sortable:p,name:"change",toEl:o,newIndex:fx,newDraggableIndex:vx,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){Dm(document,"mousemove",this._onTouchMove),Dm(document,"touchmove",this._onTouchMove),Dm(document,"pointermove",this._onTouchMove),Dm(document,"dragover",Hx),Dm(document,"mousemove",Hx),Dm(document,"touchmove",Hx)},_offUpEvents:function(){var t=this.el.ownerDocument;Dm(t,"mouseup",this._onDrop),Dm(t,"touchend",this._onDrop),Dm(t,"pointerup",this._onDrop),Dm(t,"pointercancel",this._onDrop),Dm(t,"touchcancel",this._onDrop),Dm(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;fx=jm(ox),vx=jm(ox,n.draggable),ax("drop",this,{evt:t}),rx=ox&&ox.parentNode,fx=jm(ox),vx=jm(ox,n.draggable),qx.eventCanceled||(Ax=!1,Nx=!1,Ex=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),e_(this.cloneId),e_(this._dragStartId),this.nativeDraggable&&(Dm(document,"drop",this),Dm(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Sm&&zm(document.body,"user-select",""),zm(ox,"transform",""),t&&(Mx&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),lx&&lx.parentNode&&lx.parentNode.removeChild(lx),(sx===rx||mx&&"clone"!==mx.lastPutMode)&&cx&&cx.parentNode&&cx.parentNode.removeChild(cx),ox&&(this.nativeDraggable&&Dm(ox,"dragend",this),Kx(ox),ox.style["will-change"]="",Mx&&!Ax&&Nm(ox,mx?mx.options.ghostClass:this.options.ghostClass,!1),Nm(ox,this.options.chosenClass,!1),ix({sortable:this,name:"unchoose",toEl:rx,newIndex:null,newDraggableIndex:null,originalEvent:t}),sx!==rx?(fx>=0&&(ix({rootEl:rx,name:"add",toEl:rx,fromEl:sx,originalEvent:t}),ix({sortable:this,name:"remove",toEl:rx,originalEvent:t}),ix({rootEl:rx,name:"sort",toEl:rx,fromEl:sx,originalEvent:t}),ix({sortable:this,name:"sort",toEl:rx,originalEvent:t})),mx&&mx.save()):fx!==px&&fx>=0&&(ix({sortable:this,name:"update",toEl:rx,originalEvent:t}),ix({sortable:this,name:"sort",toEl:rx,originalEvent:t})),qx.active&&(null!=fx&&-1!==fx||(fx=px,vx=gx),ix({sortable:this,name:"end",toEl:rx,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){ax("nulling",this),sx=ox=rx=lx=ux=cx=dx=hx=xx=_x=Mx=fx=vx=px=gx=Cx=Tx=mx=yx=qx.dragged=qx.ghost=qx.clone=qx.active=null;var t=this.el;Ox.forEach(function(e){t.contains(e)&&(e.checked=!0)}),Ox.length=bx=wx=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":ox&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move");t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],n=this.el.children,a=0,i=n.length,o=this.options;a<i;a++)Pm(t=n[a],o.draggable,this.el,!1)&&e.push(t.getAttribute(o.dataIdAttr)||Jx(t));return e},sort:function(t,e){var n={},a=this.el;this.toArray().forEach(function(t,e){var i=a.children[e];Pm(i,this.options.draggable,a,!1)&&(n[t]=i)},this),e&&this.captureAnimationState(),t.forEach(function(t){n[t]&&(a.removeChild(n[t]),a.appendChild(n[t]))}),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return Pm(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var n=this.options;if(void 0===e)return n[t];var a=ex.modifyOption(this,t,e);n[t]=void 0!==a?a:e,"group"===t&&Yx(n)},destroy:function(){ax("destroy",this);var t=this.el;t[Km]=null,Dm(t,"mousedown",this._onTapStart),Dm(t,"touchstart",this._onTapStart),Dm(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(Dm(t,"dragover",this),Dm(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),kx.splice(kx.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!hx){if(ax("hideClone",this),qx.eventCanceled)return;zm(cx,"display","none"),this.options.removeCloneOnHide&&cx.parentNode&&cx.parentNode.removeChild(cx),hx=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if(hx){if(ax("showClone",this),qx.eventCanceled)return;ox.parentNode!=sx||this.options.group.revertClone?ux?sx.insertBefore(cx,ux):sx.appendChild(cx):sx.insertBefore(cx,ox),this.options.group.revertClone&&this.animate(ox,cx),zm(cx,"display",""),hx=!1}}else this._hideClone()}},Vx&&Tm(document,"touchmove",function(t){(qx.active||Ax)&&t.cancelable&&t.preventDefault()}),qx.utils={on:Tm,off:Dm,css:zm,find:Om,is:function(t,e){return!!Pm(t,e,t,!1)},extend:function(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},throttle:Hm,closest:Pm,toggleClass:Nm,clone:qm,index:jm,nextTick:t_,cancelNextTick:e_,detectDirection:jx,getChild:Wm,expando:Km},qx.get=function(t){return t[Km]},qx.mount=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e[0].constructor===Array&&(e=e[0]),e.forEach(function(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));t.utils&&(qx.utils=ym(ym({},qx.utils),t.utils)),ex.mount(t)})},qx.create=function(t,e){return new qx(t,e)},qx.version="1.15.7";var n_,a_,i_,o_,r_,l_,s_=[],u_=!1;function d_(){s_.forEach(function(t){clearInterval(t.pid)}),s_=[]}function c_(){clearInterval(l_)}var h_=Hm(function(t,e,n,a){if(e.scroll){var i,o=(t.touches?t.touches[0]:t).clientX,r=(t.touches?t.touches[0]:t).clientY,l=e.scrollSensitivity,s=e.scrollSpeed,u=Vm(),d=!1;a_!==n&&(a_=n,d_(),n_=e.scroll,i=e.scrollFn,!0===n_&&(n_=Um(n,!0)));var c=0,h=n_;do{var p=h,f=Bm(p),g=f.top,v=f.bottom,y=f.left,m=f.right,x=f.width,_=f.height,b=void 0,w=void 0,S=p.scrollWidth,I=p.scrollHeight,M=zm(p),C=p.scrollLeft,T=p.scrollTop;p===u?(b=x<S&&("auto"===M.overflowX||"scroll"===M.overflowX||"visible"===M.overflowX),w=_<I&&("auto"===M.overflowY||"scroll"===M.overflowY||"visible"===M.overflowY)):(b=x<S&&("auto"===M.overflowX||"scroll"===M.overflowX),w=_<I&&("auto"===M.overflowY||"scroll"===M.overflowY));var D=b&&(Math.abs(m-o)<=l&&C+x<S)-(Math.abs(y-o)<=l&&!!C),L=w&&(Math.abs(v-r)<=l&&T+_<I)-(Math.abs(g-r)<=l&&!!T);if(!s_[c])for(var A=0;A<=c;A++)s_[A]||(s_[A]={});s_[c].vx==D&&s_[c].vy==L&&s_[c].el===p||(s_[c].el=p,s_[c].vx=D,s_[c].vy=L,clearInterval(s_[c].pid),0==D&&0==L||(d=!0,s_[c].pid=setInterval(function(){a&&0===this.layer&&qx.active._onTouchMove(r_);var e=s_[this.layer].vy?s_[this.layer].vy*s:0,n=s_[this.layer].vx?s_[this.layer].vx*s:0;"function"==typeof i&&"continue"!==i.call(qx.dragged.parentNode[Km],n,e,t,r_,s_[this.layer].el)||Zm(s_[this.layer].el,n,e)}.bind({layer:c}),24))),c++}while(e.bubbleScroll&&h!==u&&(h=Um(h,!1)));u_=d}},30),p_=function(t){var e=t.originalEvent,n=t.putSortable,a=t.dragEl,i=t.activeSortable,o=t.dispatchSortableEvent,r=t.hideGhostForTarget,l=t.unhideGhostForTarget;if(e){var s=n||i;r();var u=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,d=document.elementFromPoint(u.clientX,u.clientY);l(),s&&!s.el.contains(d)&&(o("spill"),this.onSpill({dragEl:a,putSortable:n}))}};function f_(){}function g_(){}f_.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,n=t.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var a=Wm(this.sortable.el,this.startIndex,this.options);a?this.sortable.el.insertBefore(e,a):this.sortable.el.appendChild(e),this.sortable.animateAll(),n&&n.animateAll()},drop:p_},gm(f_,{pluginName:"revertOnSpill"}),g_.prototype={onSpill:function(t){var e=t.dragEl,n=t.putSortable||this.sortable;n.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),n.animateAll()},drop:p_},gm(g_,{pluginName:"removeOnSpill"}),qx.mount(new function(){function t(){for(var t in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){var e=t.originalEvent;this.sortable.nativeDraggable?Tm(document,"dragover",this._handleAutoScroll):this.options.supportPointer?Tm(document,"pointermove",this._handleFallbackAutoScroll):e.touches?Tm(document,"touchmove",this._handleFallbackAutoScroll):Tm(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?Dm(document,"dragover",this._handleAutoScroll):(Dm(document,"pointermove",this._handleFallbackAutoScroll),Dm(document,"touchmove",this._handleFallbackAutoScroll),Dm(document,"mousemove",this._handleFallbackAutoScroll)),c_(),d_(),clearTimeout(km),km=void 0},nulling:function(){r_=a_=n_=u_=l_=i_=o_=null,s_.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var n=this,a=(t.touches?t.touches[0]:t).clientX,i=(t.touches?t.touches[0]:t).clientY,o=document.elementFromPoint(a,i);if(r_=t,e||this.options.forceAutoScrollFallback||bm||_m||Sm){h_(t,this.options,o,e);var r=Um(o,!0);!u_||l_&&a===i_&&i===o_||(l_&&c_(),l_=setInterval(function(){var o=Um(document.elementFromPoint(a,i),!0);o!==r&&(r=o,d_()),h_(t,n.options,o,e)},10),i_=a,o_=i)}else{if(!this.options.bubbleScroll||Um(o,!0)===Vm())return void d_();h_(t,this.options,Um(o,!1),!1)}}},gm(t,{pluginName:"scroll",initializeByDefault:!0})}),qx.mount(g_,f_);const v_={class:"livestream-page p-4"},y_={class:"flex justify-between items-center"},m_={key:0},x_={class:"m-0"},__={key:0,class:"text-xs text-gray-500"},b_={key:1,class:"text-gray-400 text-xs"},w_={class:"flex items-center gap-2"},S_={class:"text-xs font-mono"},I_={class:"mt-4 flex justify-end"},M_={class:"mb-4"},C_={key:1,class:"text-gray-400"},T_={key:0},D_={class:"ml-1 text-gray-500"},L_={key:1,class:"text-gray-400 text-xs"},A_={class:"flex justify-between items-center"},P_={class:"truncate",style:{"max-width":"280px"}},k_={class:"ml-2 text-gray-400 text-xs"},E_={class:"text-xs text-gray-400 mt-1"},N_={class:"flex gap-6 items-start"},z_={class:"flex-1 min-w-0"},R_={class:"mb-4 flex gap-4 items-center flex-wrap"},O_={class:"mt-4 flex justify-between items-center"},V_={class:"text-sm text-gray-500"},B_={key:0,class:"w-72 shrink-0 bg-gray-50 p-4 rounded-lg border border-gray-200 sticky top-0"},G_={class:"text-base font-bold text-gray-800 mb-4 flex items-center gap-2"},W_={class:"space-y-3"},F_={class:"bg-white p-3 rounded shadow-sm border border-gray-100"},j_={class:"text-xl font-bold text-gray-800"},Y_={key:0,class:"text-xs text-gray-400 mt-1"},U_={class:"bg-white p-3 rounded shadow-sm border border-gray-100"},X_={class:"text-xl font-bold text-blue-600"},H_={class:"text-xs text-gray-400 mt-1"},Z_={class:"bg-white p-3 rounded shadow-sm border border-gray-100"},q_={key:0,class:"text-xl font-bold text-red-500"},$_={key:1,class:"text-xl font-bold text-gray-400"},K_={class:"bg-white p-3 rounded shadow-sm border border-gray-100"},Q_={class:"text-xl font-bold text-orange-500"},J_={class:"bg-white p-3 rounded shadow-sm border border-gray-100"},tb={class:"p-4"},eb={class:"mb-4 flex gap-4 items-center"},nb={class:"grid grid-cols-2 gap-4 mb-6"},ab={class:"text-2xl font-bold"},ib={class:"text-xs text-gray-500 mt-1"},ob={class:"text-2xl font-bold text-red-500"},rb={class:"text-xs text-gray-500 mt-1"},lb={class:"text-2xl font-bold text-orange-500"},sb={class:"text-xs text-gray-500 mt-1"},ub={class:"mt-8"},db={class:"p-4"},cb={class:"grid grid-cols-2 gap-4 mb-6"},hb={class:"text-lg font-bold"},pb={key:0,class:"space-y-4"},fb={class:"flex items-center gap-2"},gb={key:1,class:"text-center py-8 text-gray-400"},vb=Er(e({__name:"index",setup(e){const k=n(!1),E=n(!1),N=n([]),z=a({page:1,pageSize:20,total:0}),R=n(!1),O=n(null),V=a({name:"",streamer_name:"",streamer_contact:"",channel_id:null,douyin_product_id:"",ticket_price:0,status:1}),B=n(!1),G=n([]),W=n(null),F=n(!1),j=n(!1),Y=n(null),U=n();let X=null;const H=a({name:"",image:"",level:1,weight:1,quantity:-1,product_id:null,cost_price:0,reward_type:"",reward_quantity:1}),Z=n([]),q=n([]),$=n(!1),K=n([]),Q=n(!1),J=n(0),tt=n(null),et=n(null),nt=n(""),at=n(""),it=a({page:1,pageSize:50}),ot=n(null),rt=n(!1),lt=n(!1),st=n({total_revenue:0,total_refund:0,total_cost:0,net_profit:0,order_count:0,refund_count:0,profit_margin:0,daily:[]}),ut=n(null),dt=n();let ct=null;const ht=n(!1),pt=n(!1),ft=n(!1),gt=n(null),vt=n({has_seed:!1,seed_version:0,algo:"",seed_hash_hex:""});function yt(t){const e=Z.value.find(e=>e.id===t);if(e){if(H.name=e.name,e.images_json)try{const t=JSON.parse(e.images_json);Array.isArray(t)&&t.length>0&&(H.image=t[0])}catch(n){H.image=e.images_json}H.cost_price=(e.price||0)/100}}function mt(t){if(null==t)return void(V.channel_id=null);const e=q.value.find(e=>e.id===t);e&&!V.streamer_name&&(V.streamer_name=e.name)}function xt(){return t(this,null,function*(){k.value=!0;try{const t=yield o.get({url:"/admin/livestream/activities",params:{page:z.page,page_size:z.pageSize}});N.value=t.list||[],z.total=t.total||0}catch(t){}finally{k.value=!1}})}function _t(){O.value=null,Object.assign(V,{name:"",streamer_name:"",streamer_contact:"",channel_id:null,douyin_product_id:"",order_reward_type:"",order_reward_quantity:1,ticket_price:0,status:1}),R.value=!0}function bt(){return t(this,null,function*(){if(V.name){E.value=!0;try{const t={name:V.name,streamer_name:V.streamer_name,streamer_contact:V.streamer_contact,douyin_product_id:V.douyin_product_id,ticket_price:Math.round(100*Number(V.ticket_price)),status:V.status};if(null!==V.channel_id&&void 0!==V.channel_id&&(t.channel_id=V.channel_id),O.value)yield o.put({url:`/admin/livestream/activities/${O.value}`,data:t}),D.success("更新成功");else{const e=yield o.post({url:"/admin/livestream/activities",data:t});D.success(`创建成功,访问码: ${e.access_code}`)}R.value=!1,xt()}catch(t){D.error((null==t?void 0:t.message)||"操作失败")}finally{E.value=!1}}else D.warning("请输入活动名称")})}function wt(){return t(this,null,function*(){if(W.value){j.value=!0;try{const t=yield o.get({url:`/admin/livestream/activities/${W.value}/prizes`});G.value=t||[],A(()=>{St()})}catch(t){}finally{j.value=!1}}})}function St(){if(!U.value)return;X&&X.destroy();const e=U.value.$el.querySelector(".el-table__body-wrapper tbody");e&&(X=new qx(e,{handle:".drag-handle",animation:150,ghostClass:"sortable-ghost",onEnd:e=>t(this,null,function*(){const{oldIndex:n,newIndex:a}=e;if(n===a)return;const i=G.value.splice(n,1)[0];G.value.splice(a,0,i),yield function(){return t(this,null,function*(){if(W.value)try{const t=G.value.map(t=>t.id);yield o.put({url:`/admin/livestream/activities/${W.value}/prizes/sort`,data:{prize_ids:t}}),D.success("排序已保存")}catch(t){D.error((null==t?void 0:t.message)||"保存排序失败"),yield wt()}})}()})}))}function It(){Y.value=null,Object.assign(H,{name:"",image:"",level:1,weight:1,quantity:-1,product_id:null,cost_price:0,reward_type:"",reward_quantity:1}),F.value=!0}function Mt(){return t(this,null,function*(){if(H.name)try{const t={name:H.name,image:H.image,level:H.level,weight:H.weight,quantity:H.quantity,product_id:H.product_id||0,cost_price:Math.round(100*Number(H.cost_price)),reward_type:H.reward_type||"",reward_quantity:H.reward_quantity||1};Y.value?(yield o.put({url:`/admin/livestream/prizes/${Y.value}`,data:t}),D.success("编辑成功")):(yield o.post({url:`/admin/livestream/activities/${W.value}/prizes`,data:[t]}),D.success("添加成功")),F.value=!1,Y.value=null,wt()}catch(t){D.error((null==t?void 0:t.message)||(Y.value?"编辑失败":"添加失败"))}else D.warning("请输入或选择奖品")})}function Ct(){return t(this,null,function*(){if(ot.value){Q.value=!0;try{const t={page:it.page,page_size:it.pageSize};et.value&&2===et.value.length&&(t.start_time=et.value[0],t.end_time=et.value[1]),nt.value&&(t.keyword=nt.value),at.value&&(t.exclude_user_ids=at.value);const e=yield o.get({url:`/admin/livestream/activities/${ot.value}/draw_logs`,params:t});K.value=e.list||[],J.value=e.total||0,tt.value=e.stats||null}catch(t){}finally{Q.value=!1}}})}function Tt(){et.value=null,nt.value="",at.value="",it.page=1,Ct()}function Dt(){return t(this,null,function*(){if(gt.value){pt.value=!0;try{const t=yield o.get({url:`/admin/livestream/activities/${gt.value}/commitment/summary`});vt.value={has_seed:t.has_seed||!1,seed_version:t.seed_version||0,algo:t.algo||"",seed_hash_hex:t.seed_hash_hex||""}}catch(t){D.error("获取承诺状态失败")}finally{pt.value=!1}}})}function Lt(){return t(this,null,function*(){if(!gt.value)return;const t=vt.value.has_seed?"重新生成将覆盖现有承诺。确定要重新生成吗?":"确定生成承诺吗?";try{yield L.confirm(t,"确认",{type:"warning"})}catch(e){return}ft.value=!0;try{const t=yield o.post({url:`/admin/livestream/activities/${gt.value}/commitment/generate`});D.success(`承诺生成成功,版本: ${t.seed_version}`),yield Dt()}catch(e){D.error((null==e?void 0:e.message)||"生成承诺失败")}finally{ft.value=!1}})}function At(){vt.value.seed_hash_hex?(navigator.clipboard.writeText(vt.value.seed_hash_hex),D.success("Seed Hash 已复制到剪贴板")):D.warning("没有可复制的 Seed Hash")}function Pt(){return t(this,null,function*(){if(W.value){lt.value=!0;try{const t={};ut.value&&2===ut.value.length&&(t.start_time=ut.value[0],t.end_time=ut.value[1]);const e=yield o.get({url:`/admin/livestream/activities/${W.value}/stats`,params:t});st.value={total_revenue:e.total_revenue,total_refund:e.total_refund,total_cost:e.total_cost,net_profit:e.net_profit,order_count:e.order_count,refund_count:e.refund_count,profit_margin:e.profit_margin,daily:(e.daily||[]).sort((t,e)=>e.date.localeCompare(t.date))},A(()=>{!function(){if(!dt.value)return;ct&&ct.dispose();ct=pr(dt.value),st.value.total_cost,st.value.net_profit,st.value.total_refund;const t={title:{text:"盈亏概览",left:"center"},tooltip:{trigger:"axis",axisPointer:{type:"shadow"},formatter:t=>{const e=t[0];return`${e.name}: ${e.value}`}},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:[{type:"category",data:["总营收","总退款","总成本","净利润"],axisTick:{alignWithLabel:!0}}],yAxis:[{type:"value"}],series:[{name:"金额",type:"bar",barWidth:"60%",data:[{value:st.value.total_revenue/100,itemStyle:{color:"#409EFF"}},{value:st.value.total_refund/100,itemStyle:{color:"#F56C6C"}},{value:st.value.total_cost/100,itemStyle:{color:"#E6A23C"}},{value:st.value.net_profit/100,itemStyle:{color:st.value.net_profit>=0?"#67C23A":"#909399"}}]}]};ct.setOption(t)}()})}catch(t){}finally{lt.value=!1}}})}function kt(){ut.value=null,Pt()}return i(()=>{xt(),function(){t(this,null,function*(){try{const t=yield P({page:1,page_size:2e3});Z.value=t.list.map(t=>({id:t.id,name:t.name,price:t.price,images_json:t.images_json}))}catch(t){}})}(),function(){t(this,null,function*(){try{const t=yield o.get({url:"/admin/channels",params:{page:1,page_size:200}});q.value=(t.list||[]).map(t=>({id:t.id,name:t.name,code:t.code}))}catch(t){}})}()}),(e,n)=>{const a=x,i=v,P=gr,X=vr,ct=fr,Et=yr,Nt=mr,zt=w,Rt=_r,Ot=wr,Vt=br,Bt=Sr,Gt=Mr,Wt=Ir,Ft=xr,jt=Cr,Yt=Tr,Ut=Lr,Xt=Dr,Ht=Ar,Zt=Pr,qt=r("DataAnalysis"),$t=r("e-divider"),Kt=kr,Qt=m;return s(),l("div",v_,[u(Nt,{shadow:"never"},{header:d(()=>[h("div",y_,[n[33]||(n[33]=h("span",{class:"font-bold"},"直播间活动管理",-1)),u(i,{type:"primary",onClick:_t},{default:d(()=>[u(a,{class:"mr-1"},{default:d(()=>[u(_(b))]),_:1}),n[32]||(n[32]=y(" 创建活动 ",-1))]),_:1})])]),default:d(()=>[c((s(),p(ct,{data:N.value,border:"",style:{width:"100%"}},{default:d(()=>[u(P,{prop:"id",label:"ID",width:"80"}),u(P,{prop:"name",label:"活动名称","min-width":"150"}),u(P,{prop:"streamer_name",label:"主播名称",width:"120"}),u(P,{label:"渠道主播",width:"180"},{default:d(({row:t})=>[t.channel_id?(s(),l("div",m_,[h("p",x_,g(t.channel_name||t.streamer_name||"-"),1),t.channel_code?(s(),l("p",__,g(t.channel_code),1)):f("",!0)])):(s(),l("span",b_,"未关联"))]),_:1}),u(P,{prop:"access_code",label:"访问码",width:"180"},{default:d(({row:t})=>{var e;return[h("div",w_,[h("span",S_,g(null==(e=t.access_code)?void 0:e.slice(0,8))+"...",1),u(i,{link:"",type:"primary",size:"small",onClick:e=>function(t){const e=`${window.location.origin}/?code=${t.access_code}`;navigator.clipboard.writeText(e),D.success("链接已复制")}(t)},{default:d(()=>[...n[34]||(n[34]=[y(" 复制链接 ",-1)])]),_:1},8,["onClick"])])]}),_:1}),u(P,{label:"门票价格",width:"100"},{default:d(({row:t})=>[y(g((t.ticket_price/100).toFixed(2)),1)]),_:1}),u(P,{prop:"status",label:"状态",width:"100"},{default:d(({row:t})=>[u(X,{type:1===t.status?"success":"info",size:"small"},{default:d(()=>[y(g(1===t.status?"进行中":"已结束"),1)]),_:2},1032,["type"])]),_:1}),u(P,{prop:"created_at",label:"创建时间",width:"170"}),u(P,{label:"操作",width:"280",fixed:"right"},{default:d(({row:e})=>[u(i,{link:"",type:"primary",size:"small",onClick:n=>function(e){return t(this,null,function*(){W.value=e.id,B.value=!0,F.value=!1,Y.value=null,yield wt(),A(()=>{St()})})}(e)},{default:d(()=>[...n[35]||(n[35]=[y("奖品",-1)])]),_:1},8,["onClick"]),u(i,{link:"",type:"primary",size:"small",onClick:t=>function(t){var e;O.value=t.id,Object.assign(V,{name:t.name,streamer_name:t.streamer_name,streamer_contact:t.streamer_contact,channel_id:null!=(e=t.channel_id)?e:null,douyin_product_id:t.douyin_product_id,ticket_price:t.ticket_price?t.ticket_price/100:0,status:t.status}),R.value=!0}(e)},{default:d(()=>[...n[36]||(n[36]=[y("编辑",-1)])]),_:1},8,["onClick"]),u(i,{link:"",type:"primary",size:"small",onClick:t=>function(t){ot.value=t.id,et.value=null,nt.value="",it.page=1,$.value=!0,Ct()}(e)},{default:d(()=>[...n[37]||(n[37]=[y("记录",-1)])]),_:1},8,["onClick"]),u(i,{link:"",type:"primary",size:"small",onClick:t=>function(t){W.value=t.id,ut.value=null,rt.value=!0,Pt()}(e)},{default:d(()=>[...n[38]||(n[38]=[y("盈亏",-1)])]),_:1},8,["onClick"]),u(i,{link:"",type:"warning",size:"small",onClick:n=>function(e){return t(this,null,function*(){gt.value=e.id,ht.value=!0,yield Dt()})}(e)},{default:d(()=>[...n[39]||(n[39]=[y("承诺",-1)])]),_:1},8,["onClick"]),u(i,{link:"",type:"danger",size:"small",onClick:n=>function(e){return t(this,null,function*(){try{yield L.confirm("确定删除该活动?","提示",{type:"warning"}),yield o.del({url:`/admin/livestream/activities/${e.id}`}),D.success("删除成功"),xt()}catch(t){}})}(e)},{default:d(()=>[...n[40]||(n[40]=[y("删除",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1},8,["data"])),[[Qt,k.value]]),h("div",I_,[u(Et,{"current-page":z.page,"onUpdate:currentPage":n[0]||(n[0]=t=>z.page=t),"page-size":z.pageSize,"onUpdate:pageSize":n[1]||(n[1]=t=>z.pageSize=t),total:z.total,"page-sizes":[10,20,50],layout:"total, sizes, prev, pager, next",onSizeChange:xt,onCurrentChange:xt},null,8,["current-page","page-size","total"])])]),_:1}),u(jt,{modelValue:R.value,"onUpdate:modelValue":n[11]||(n[11]=t=>R.value=t),title:O.value?"编辑活动":"创建活动",width:"500px"},{footer:d(()=>[u(i,{onClick:n[10]||(n[10]=t=>R.value=!1)},{default:d(()=>[...n[45]||(n[45]=[y("取消",-1)])]),_:1}),u(i,{type:"primary",onClick:bt,loading:E.value},{default:d(()=>[...n[46]||(n[46]=[y("确定",-1)])]),_:1},8,["loading"])]),default:d(()=>[u(Ft,{model:V,"label-width":"120px"},{default:d(()=>[u(Rt,{label:"活动名称",required:""},{default:d(()=>[u(zt,{modelValue:V.name,"onUpdate:modelValue":n[2]||(n[2]=t=>V.name=t),placeholder:"请输入活动名称"},null,8,["modelValue"])]),_:1}),u(Rt,{label:"主播名称"},{default:d(()=>[u(zt,{modelValue:V.streamer_name,"onUpdate:modelValue":n[3]||(n[3]=t=>V.streamer_name=t),placeholder:"请输入主播名称"},null,8,["modelValue"])]),_:1}),u(Rt,{label:"主播联系方式"},{default:d(()=>[u(zt,{modelValue:V.streamer_contact,"onUpdate:modelValue":n[4]||(n[4]=t=>V.streamer_contact=t),placeholder:"微信/手机号"},null,8,["modelValue"])]),_:1}),u(Rt,{label:"渠道主播"},{default:d(()=>[u(Vt,{modelValue:V.channel_id,"onUpdate:modelValue":n[5]||(n[5]=t=>V.channel_id=t),placeholder:"选择渠道",clearable:"",style:{width:"100%"},onChange:mt,onClear:n[6]||(n[6]=()=>V.channel_id=null)},{default:d(()=>[(s(!0),l(S,null,I(q.value,t=>(s(),p(Ot,{key:t.id,label:`${t.name} (${t.code})`,value:t.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),n[41]||(n[41]=h("div",{class:"text-xs text-gray-500 mt-1"},"关联已有渠道主播,方便后续统计",-1))]),_:1}),u(Rt,{label:"抖店商品ID"},{default:d(()=>[u(zt,{modelValue:V.douyin_product_id,"onUpdate:modelValue":n[7]||(n[7]=t=>V.douyin_product_id=t),placeholder:"关联的抖店商品ID"},null,8,["modelValue"]),n[42]||(n[42]=h("div",{class:"text-xs text-gray-500 mt-1"},"下单奖励请在「抖店商品奖励」页面配置",-1))]),_:1}),u(Rt,{label:"门票价格(元)"},{default:d(()=>[u(Bt,{modelValue:V.ticket_price,"onUpdate:modelValue":n[8]||(n[8]=t=>V.ticket_price=t),min:0,precision:2,step:1,style:{width:"100%"}},null,8,["modelValue"])]),_:1}),O.value?(s(),p(Rt,{key:0,label:"状态"},{default:d(()=>[u(Wt,{modelValue:V.status,"onUpdate:modelValue":n[9]||(n[9]=t=>V.status=t)},{default:d(()=>[u(Gt,{value:1},{default:d(()=>[...n[43]||(n[43]=[y("进行中",-1)])]),_:1}),u(Gt,{value:2},{default:d(()=>[...n[44]||(n[44]=[y("已结束",-1)])]),_:1})]),_:1},8,["modelValue"])]),_:1})):f("",!0)]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),u(jt,{modelValue:B.value,"onUpdate:modelValue":n[12]||(n[12]=t=>B.value=t),title:"奖品管理",width:"900px"},{default:d(()=>[h("div",M_,[u(i,{type:"primary",size:"small",onClick:It},{default:d(()=>[...n[47]||(n[47]=[y("添加奖品",-1)])]),_:1})]),c((s(),p(ct,{data:G.value,border:"",ref_key:"prizeTableRef",ref:U,"row-key":"id"},{default:d(()=>[u(P,{label:"拖动",width:"60",align:"center"},{default:d(()=>[u(a,{class:"drag-handle cursor-move text-gray-400 hover:text-blue-500"},{default:d(()=>[u(_(M))]),_:1})]),_:1}),u(P,{label:"图片",width:"70"},{default:d(({row:t})=>[t.image?(s(),p(Yt,{key:0,src:t.image,"preview-src-list":[t.image],fit:"cover",style:{width:"50px",height:"50px","border-radius":"4px"}},null,8,["src","preview-src-list"])):(s(),l("span",C_,"-"))]),_:1}),u(P,{prop:"name",label:"奖品名称","min-width":"150"}),u(P,{prop:"level",label:"等级",width:"80"}),u(P,{prop:"cost_price",label:"成本(分)",width:"90"}),u(P,{prop:"weight",label:"权重",width:"80"}),u(P,{label:"库存",width:"100"},{default:d(({row:t})=>[y(g(-1===t.remaining?"无限":t.remaining)+" / "+g(-1===t.quantity?"无限":t.quantity),1)]),_:1}),u(P,{label:"奖励配置",width:"180"},{default:d(({row:t})=>[t.reward_type?(s(),l("div",T_,[u(X,{type:"flip_card"===t.reward_type?"success":"warning",size:"small"},{default:d(()=>{return[y(g((e=t.reward_type,{flip_card:"翻牌资格",minesweeper:"扫雷资格"}[e]||e)),1)];var e}),_:2},1032,["type"]),h("span",D_,"× "+g(t.reward_quantity),1)])):(s(),l("span",L_,"无奖励"))]),_:1}),u(P,{label:"操作",width:"140"},{default:d(({row:e})=>[u(i,{link:"",type:"primary",size:"small",onClick:t=>function(t){Y.value=t.id,Object.assign(H,{name:t.name,image:t.image,level:t.level,weight:t.weight,quantity:t.quantity,product_id:t.product_id||null,cost_price:t.cost_price/100,reward_type:t.reward_type||"",reward_quantity:t.reward_quantity||1}),F.value=!0}(e)},{default:d(()=>[...n[48]||(n[48]=[y("编辑",-1)])]),_:1},8,["onClick"]),u(i,{link:"",type:"danger",size:"small",onClick:n=>function(e){return t(this,null,function*(){try{yield L.confirm("确定删除该奖品?","提示",{type:"warning"}),yield o.del({url:`/admin/livestream/prizes/${e.id}`}),D.success("删除成功"),wt()}catch(t){}})}(e)},{default:d(()=>[...n[49]||(n[49]=[y("删除",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1},8,["data"])),[[Qt,j.value]])]),_:1},8,["modelValue"]),u(jt,{modelValue:F.value,"onUpdate:modelValue":n[21]||(n[21]=t=>F.value=t),title:Y.value?"编辑奖品":"添加奖品",width:"700px","close-on-click-modal":!1},{footer:d(()=>[u(i,{onClick:n[20]||(n[20]=t=>F.value=!1)},{default:d(()=>[...n[53]||(n[53]=[y("取消",-1)])]),_:1}),u(i,{type:"primary",onClick:Mt},{default:d(()=>[...n[54]||(n[54]=[y("保存",-1)])]),_:1})]),default:d(()=>[u(Ft,{model:H,"label-width":"90px"},{default:d(()=>[u(Rt,{label:"选择商品"},{default:d(()=>[u(Vt,{modelValue:H.product_id,"onUpdate:modelValue":n[13]||(n[13]=t=>H.product_id=t),filterable:"",placeholder:"搜索商品",style:{width:"100%"},onChange:yt},{default:d(()=>[(s(!0),l(S,null,I(Z.value,t=>(s(),p(Ot,{key:t.id,value:t.id,label:t.name},{default:d(()=>[h("div",A_,[h("span",P_,g(t.name),1),h("span",k_,"¥"+g((Number(t.price||0)/100).toFixed(2)),1)])]),_:2},1032,["value","label"]))),128))]),_:1},8,["modelValue"])]),_:1}),u(Xt,{gutter:16},{default:d(()=>[u(Ut,{span:12},{default:d(()=>[u(Rt,{label:"等级"},{default:d(()=>[u(Vt,{modelValue:H.level,"onUpdate:modelValue":n[14]||(n[14]=t=>H.level=t),style:{width:"100%"}},{default:d(()=>[u(Ot,{value:1,label:"1等奖"}),u(Ot,{value:2,label:"2等奖"}),u(Ot,{value:3,label:"3等奖"}),u(Ot,{value:4,label:"4等奖"}),u(Ot,{value:5,label:"5等奖"}),u(Ot,{value:6,label:"参与奖"})]),_:1},8,["modelValue"])]),_:1})]),_:1}),u(Ut,{span:12},{default:d(()=>[u(Rt,{label:"成本(元)"},{default:d(()=>[u(Bt,{modelValue:H.cost_price,"onUpdate:modelValue":n[15]||(n[15]=t=>H.cost_price=t),min:0,precision:2,step:1,style:{width:"100%"}},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),u(Xt,{gutter:16},{default:d(()=>[u(Ut,{span:12},{default:d(()=>[u(Rt,{label:"权重"},{default:d(()=>[u(Bt,{modelValue:H.weight,"onUpdate:modelValue":n[16]||(n[16]=t=>H.weight=t),min:1,style:{width:"100%"}},null,8,["modelValue"])]),_:1})]),_:1}),u(Ut,{span:12},{default:d(()=>[u(Rt,{label:"库存"},{default:d(()=>[u(Bt,{modelValue:H.quantity,"onUpdate:modelValue":n[17]||(n[17]=t=>H.quantity=t),min:-1,style:{width:"100%"}},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),u(Ht,{"content-position":"left"},{default:d(()=>[...n[50]||(n[50]=[y("奖励配置",-1)])]),_:1}),u(Xt,{gutter:16},{default:d(()=>[u(Ut,{span:12},{default:d(()=>[u(Rt,{label:"奖励类型"},{default:d(()=>[u(Vt,{modelValue:H.reward_type,"onUpdate:modelValue":n[18]||(n[18]=t=>H.reward_type=t),placeholder:"选择奖励类型(可选)",clearable:"",style:{width:"100%"}},{default:d(()=>[u(Ot,{label:"无奖励",value:""}),u(Ot,{label:"翻牌游戏资格",value:"flip_card"}),u(Ot,{label:"扫雷游戏资格",value:"minesweeper"})]),_:1},8,["modelValue"]),n[51]||(n[51]=h("div",{class:"text-xs text-gray-400 mt-1"}," 用户中奖后将自动发放对应的游戏资格 ",-1))]),_:1})]),_:1}),u(Ut,{span:12},{default:d(()=>[H.reward_type?(s(),p(Rt,{key:0,label:"发放数量"},{default:d(()=>[u(Bt,{modelValue:H.reward_quantity,"onUpdate:modelValue":n[19]||(n[19]=t=>H.reward_quantity=t),min:1,max:100,placeholder:"1-100",style:{width:"100%"}},null,8,["modelValue"]),h("div",E_," 用户将获得 "+g(H.reward_quantity||1)+" 次游戏资格 ",1)]),_:1})):f("",!0)]),_:1})]),_:1}),n[52]||(n[52]=h("div",{class:"text-xs text-gray-400"},"提示:库存设置为 -1 表示无限",-1))]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),u(jt,{modelValue:$.value,"onUpdate:modelValue":n[27]||(n[27]=t=>$.value=t),title:"中奖记录",width:"1200px"},{default:d(()=>[h("div",N_,[h("div",z_,[h("div",R_,[u(Zt,{modelValue:et.value,"onUpdate:modelValue":n[22]||(n[22]=t=>et.value=t),type:"datetimerange","range-separator":"至","start-placeholder":"开始时间","end-placeholder":"结束时间",format:"YYYY-MM-DD HH:mm:ss","value-format":"YYYY-MM-DD HH:mm:ss",style:{width:"380px"},"default-time":[new Date(2e3,1,1,0,0,0),new Date(2e3,1,1,23,59,59)],onChange:Ct},null,8,["modelValue","default-time"]),u(zt,{modelValue:at.value,"onUpdate:modelValue":n[23]||(n[23]=t=>at.value=t),placeholder:"排除用户ID (逗号分隔)",style:{width:"200px"},clearable:"",onKeyup:C(Ct,["enter"]),onClear:Ct},null,8,["modelValue"]),u(zt,{modelValue:nt.value,"onUpdate:modelValue":n[24]||(n[24]=t=>nt.value=t),placeholder:"搜索昵称/订单号/奖品名称",style:{width:"240px"},clearable:"",onKeyup:C(Ct,["enter"]),onClear:Ct},null,8,["modelValue"]),u(i,{type:"primary",onClick:Ct},{default:d(()=>[...n[55]||(n[55]=[y("查询",-1)])]),_:1}),u(i,{onClick:Tt},{default:d(()=>[...n[56]||(n[56]=[y("重置",-1)])]),_:1})]),c((s(),p(ct,{data:K.value,border:"","max-height":"600"},{default:d(()=>[u(P,{prop:"id",label:"ID",width:"80"}),u(P,{prop:"shop_order_id",label:"订单ID",width:"180"}),u(P,{prop:"user_nickname",label:"中奖昵称",width:"120"}),u(P,{prop:"prize_name",label:"奖品名称"}),u(P,{prop:"level",label:"等级",width:"80"},{default:d(({row:t})=>[u(X,{type:t.level<=2?"danger":t.level<=4?"warning":"info",size:"small"},{default:d(()=>[y(g(t.level)+"等奖 ",1)]),_:2},1032,["type"])]),_:1}),u(P,{prop:"created_at",label:"中奖时间",width:"170"})]),_:1},8,["data"])),[[Qt,Q.value]]),h("div",O_,[h("span",V_,"共 "+g(J.value)+" 条记录",1),u(Et,{"current-page":it.page,"onUpdate:currentPage":n[25]||(n[25]=t=>it.page=t),"page-size":it.pageSize,"onUpdate:pageSize":n[26]||(n[26]=t=>it.pageSize=t),total:J.value,"page-sizes":[20,50,100],layout:"sizes, prev, pager, next",onSizeChange:Ct,onCurrentChange:Ct},null,8,["current-page","page-size","total"])])]),tt.value&&tt.value.order_count>0?(s(),l("div",B_,[h("div",G_,[u(a,null,{default:d(()=>[u(qt)]),_:1}),n[57]||(n[57]=y(" 统计概览 ",-1))]),h("div",W_,[h("div",F_,[n[58]||(n[58]=h("div",{class:"text-xs text-gray-500 mb-1"},"筛选用户数",-1)),h("div",j_,g(tt.value.user_count),1),nt.value?(s(),l("div",Y_,"关键词: "+g(nt.value),1)):f("",!0)]),h("div",U_,[n[59]||(n[59]=h("div",{class:"text-xs text-gray-500 mb-1"},"总投入 (营收)",-1)),h("div",X_,"¥"+g((tt.value.total_revenue/100).toFixed(2)),1),h("div",H_,"订单数: "+g(tt.value.order_count),1)]),h("div",Z_,[n[60]||(n[60]=h("div",{class:"text-xs text-gray-500 mb-1"},"总退款",-1)),tt.value.total_refund>0?(s(),l("div",q_,"-¥"+g((tt.value.total_refund/100).toFixed(2)),1)):(s(),l("div",$_,"¥0.00"))]),h("div",K_,[n[61]||(n[61]=h("div",{class:"text-xs text-gray-500 mb-1"},"奖品成本",-1)),h("div",Q_,"-¥"+g((tt.value.total_cost/100).toFixed(2)),1)]),u($t,{class:"my-2"}),h("div",J_,[n[62]||(n[62]=h("div",{class:"text-xs text-gray-500 mb-1"},"净盈亏",-1)),h("div",{class:T(["text-2xl font-bold",tt.value.net_profit>0?"text-red-600":tt.value.net_profit<0?"text-green-600":"text-gray-500"])},g(tt.value.net_profit>0?"+":"")+"¥"+g((tt.value.net_profit/100).toFixed(2)),3),n[63]||(n[63]=h("div",{class:"text-xs text-gray-400 mt-1 text-right"},"平台视角",-1))])])])):f("",!0)])]),_:1},8,["modelValue"]),u(Kt,{modelValue:rt.value,"onUpdate:modelValue":n[29]||(n[29]=t=>rt.value=t),title:"活动盈亏统计",size:"50%"},{default:d(()=>[c((s(),l("div",tb,[h("div",eb,[u(Zt,{modelValue:ut.value,"onUpdate:modelValue":n[28]||(n[28]=t=>ut.value=t),type:"daterange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期",format:"YYYY-MM-DD","value-format":"YYYY-MM-DD",style:{width:"280px"}},null,8,["modelValue"]),u(i,{type:"primary",onClick:Pt},{default:d(()=>[...n[64]||(n[64]=[y("查询",-1)])]),_:1}),u(i,{onClick:kt},{default:d(()=>[...n[65]||(n[65]=[y("重置",-1)])]),_:1})]),h("div",nb,[u(Nt,{shadow:"hover",class:"bg-blue-50"},{header:d(()=>[...n[66]||(n[66]=[h("div",{class:"text-sm font-bold text-blue-600"},"总营收 (已支付)",-1)])]),default:d(()=>[h("div",ab,"¥"+g((st.value.total_revenue/100).toFixed(2)),1),h("div",ib,"订单数: "+g(st.value.order_count),1)]),_:1}),u(Nt,{shadow:"hover",class:"bg-red-50"},{header:d(()=>[...n[67]||(n[67]=[h("div",{class:"text-sm font-bold text-red-600"},"总退款",-1)])]),default:d(()=>[h("div",ob,"-¥"+g((st.value.total_refund/100).toFixed(2)),1),h("div",rb,"退款单数: "+g(st.value.refund_count),1)]),_:1}),u(Nt,{shadow:"hover",class:"bg-orange-50"},{header:d(()=>[...n[68]||(n[68]=[h("div",{class:"text-sm font-bold text-orange-600"},"总成本 (奖品)",-1)])]),default:d(()=>[h("div",lb,"-¥"+g((st.value.total_cost/100).toFixed(2)),1),n[69]||(n[69]=h("div",{class:"text-xs text-gray-500 mt-1"},"基于奖品设定成本",-1))]),_:1}),u(Nt,{shadow:"hover",class:"bg-green-50"},{header:d(()=>[...n[70]||(n[70]=[h("div",{class:"text-sm font-bold text-green-600"},"净利润",-1)])]),default:d(()=>[h("div",{class:T(["text-2xl font-bold",st.value.net_profit>0?"text-red-500":st.value.net_profit<0?"text-green-600":"text-gray-500"])}," ¥"+g((st.value.net_profit/100).toFixed(2)),3),h("div",sb,"利润率: "+g(st.value.profit_margin.toFixed(2))+"%",1)]),_:1})]),h("div",{ref_key:"chartRef",ref:dt,style:{width:"100%",height:"350px"}},null,512),h("div",ub,[n[71]||(n[71]=h("div",{class:"flex items-center gap-2 mb-4"},[h("div",{class:"w-1 h-4 bg-primary rounded-full"}),h("span",{class:"font-bold"},"每日明细")],-1)),u(ct,{data:st.value.daily||[],border:"",style:{width:"100%"},size:"small"},{default:d(()=>[u(P,{prop:"date",label:"日期",width:"120",sortable:""}),u(P,{prop:"order_count",label:"订单数",width:"80",align:"center"}),u(P,{prop:"refund_count",label:"退款单数",width:"80",align:"center"}),u(P,{label:"营收",align:"right"},{default:d(({row:t})=>[y(" ¥"+g((t.total_revenue/100).toFixed(2)),1)]),_:1}),u(P,{label:"退款",align:"right"},{default:d(({row:t})=>[h("span",{class:T(t.total_refund>0?"text-red-500":"")}," -¥"+g((t.total_refund/100).toFixed(2)),3)]),_:1}),u(P,{label:"成本",align:"right"},{default:d(({row:t})=>[y(" -¥"+g((t.total_cost/100).toFixed(2)),1)]),_:1}),u(P,{label:"净利润",align:"right"},{default:d(({row:t})=>[h("span",{class:T(t.net_profit>0?"text-red-500 font-bold":t.net_profit<0?"text-green-600 font-bold":"text-gray-500")}," ¥"+g((t.net_profit/100).toFixed(2)),3)]),_:1}),u(P,{label:"利润率",width:"90",align:"center"},{default:d(({row:t})=>[y(g(t.profit_margin.toFixed(2))+"% ",1)]),_:1})]),_:1},8,["data"])])])),[[Qt,lt.value]])]),_:1},8,["modelValue"]),u(jt,{modelValue:ht.value,"onUpdate:modelValue":n[31]||(n[31]=t=>ht.value=t),title:"承诺管理",width:"600px"},{footer:d(()=>[u(i,{onClick:n[30]||(n[30]=t=>ht.value=!1)},{default:d(()=>[...n[79]||(n[79]=[y("关闭",-1)])]),_:1}),u(i,{type:"warning",onClick:Lt,loading:ft.value},{default:d(()=>[y(g(vt.value.has_seed?"重新生成承诺":"生成承诺"),1)]),_:1},8,["loading"])]),default:d(()=>[c((s(),l("div",db,[h("div",cb,[u(Nt,{shadow:"hover",class:"bg-blue-50"},{header:d(()=>[...n[72]||(n[72]=[h("div",{class:"text-sm font-bold text-blue-600"},"承诺状态",-1)])]),default:d(()=>[h("div",{class:T(["text-lg font-bold",vt.value.has_seed?"text-green-600":"text-gray-400"])},g(vt.value.has_seed?"已生成":"未生成"),3)]),_:1}),u(Nt,{shadow:"hover",class:"bg-purple-50"},{header:d(()=>[...n[73]||(n[73]=[h("div",{class:"text-sm font-bold text-purple-600"},"版本号",-1)])]),default:d(()=>[h("div",hb,"v"+g(vt.value.seed_version||0),1)]),_:1})]),vt.value.has_seed?(s(),l("div",pb,[h("div",null,[n[74]||(n[74]=h("div",{class:"text-sm font-bold text-gray-600 mb-2"},"算法",-1)),u(X,{type:"info"},{default:d(()=>[y(g(vt.value.algo||"commit-v1"),1)]),_:1})]),h("div",null,[n[76]||(n[76]=h("div",{class:"text-sm font-bold text-gray-600 mb-2"},"Seed Hash公开承诺",-1)),h("div",fb,[u(zt,{"model-value":vt.value.seed_hash_hex,readonly:"",class:"font-mono text-xs"},null,8,["model-value"]),u(i,{type:"primary",onClick:At},{default:d(()=>[...n[75]||(n[75]=[y(" 复制 ",-1)])]),_:1})]),n[77]||(n[77]=h("div",{class:"text-xs text-gray-400 mt-1"},"此哈希值可公开,用户可用于验证抽奖结果的公平性",-1))])])):(s(),l("div",gb,[...n[78]||(n[78]=[h("p",{class:"text-lg mb-2"},"该活动尚未生成承诺",-1),h("p",{class:"text-sm"},"生成承诺后,用户抽奖将获得可验证凭证",-1)])]))])),[[Qt,pt.value]])]),_:1},8,["modelValue"])])}}}),[["__scopeId","data-v-315e954c"]]);export{vb as default};