月球大数据地理空间分析展示平台-【中台】
WX
2023-07-19 e815dad728f0aba7b2bb2b2087dad4c36e68652f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
(()=>{var uT={};(function(rt,za){za(rt.echarts={})})(uT,function(rt){"use strict";var za;typeof window<"u"?za=window.__DEV__:typeof global<"u"&&(za=global.__DEV__),typeof za>"u"&&(za=!0);var z=za,hT=2311,Lp=function(){return hT++},Wn={};typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?Wn={browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:typeof document>"u"&&typeof self<"u"?Wn={browser:{},os:{},node:!1,worker:!0,canvasSupported:!0,domSupported:!1}:typeof navigator>"u"?Wn={browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0,domSupported:!1}:Wn=fT(navigator.userAgent);var at=Wn;function fT(t){var e={},r={},a=t.match(/Firefox\/([\d.]+)/),i=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),n=t.match(/Edge\/([\d.]+)/),o=/micromessenger/i.test(t);return a&&(r.firefox=!0,r.version=a[1]),i&&(r.ie=!0,r.version=i[1]),n&&(r.edge=!0,r.version=n[1]),o&&(r.weChat=!0),{browser:r,os:e,node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:typeof SVGRect<"u",touchEventsSupported:"ontouchstart"in window&&!r.ie&&!r.edge,pointerEventsSupported:"onpointerdown"in window&&(r.edge||r.ie&&r.version>=11),domSupported:typeof document<"u"}}var Pp={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},Ep={"[object Int8Array]":1,"[object Uint8Array]":1,"[object Uint8ClampedArray]":1,"[object Int16Array]":1,"[object Uint16Array]":1,"[object Int32Array]":1,"[object Uint32Array]":1,"[object Float32Array]":1,"[object Float64Array]":1},Un=Object.prototype.toString,$n=Array.prototype,cT=$n.forEach,vT=$n.filter,Zn=$n.slice,dT=$n.map,gT=$n.reduce,Oh={};function Rp(t,e){t==="createCanvas"&&(Hs=null),Oh[t]=e}function Y(t){if(t==null||typeof t!="object")return t;var e=t,r=Un.call(t);if(r==="[object Array]"){if(!zi(t)){e=[];for(var a=0,i=t.length;a<i;a++)e[a]=Y(t[a])}}else if(Ep[r]){if(!zi(t)){var n=t.constructor;if(t.constructor.from)e=n.from(t);else{e=new n(t.length);for(var a=0,i=t.length;a<i;a++)e[a]=Y(t[a])}}}else if(!Pp[r]&&!zi(t)&&!Ni(t)){e={};for(var o in t)t.hasOwnProperty(o)&&(e[o]=Y(t[o]))}return e}function J(t,e,r){if(!Q(e)||!Q(t))return r?Y(e):t;for(var a in e)if(e.hasOwnProperty(a)){var i=t[a],n=e[a];Q(n)&&Q(i)&&!P(n)&&!P(i)&&!Ni(n)&&!Ni(i)&&!zh(n)&&!zh(i)&&!zi(n)&&!zi(i)?J(i,n,r):(r||!(a in t))&&(t[a]=Y(e[a],!0))}return t}function Yn(t,e){for(var r=t[0],a=1,i=t.length;a<i;a++)r=J(r,t[a],e);return r}function Z(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t}function U(t,e,r){for(var a in e)e.hasOwnProperty(a)&&(r?e[a]!=null:t[a]==null)&&(t[a]=e[a]);return t}var Ri=function(){return Oh.createCanvas()};Oh.createCanvas=function(){return document.createElement("canvas")};var Hs;function kp(){return Hs||(Hs=Ri().getContext("2d")),Hs}function ut(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var r=0,a=t.length;r<a;r++)if(t[r]===e)return r}return-1}function yt(t,e){var r=t.prototype;function a(){}a.prototype=e.prototype,t.prototype=new a;for(var i in r)r.hasOwnProperty(i)&&(t.prototype[i]=r[i]);t.prototype.constructor=t,t.superClass=e}function pt(t,e,r){t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,U(t,e,r)}function Pr(t){if(!!t)return typeof t=="string"?!1:typeof t.length=="number"}function T(t,e,r){if(!!(t&&e))if(t.forEach&&t.forEach===cT)t.forEach(e,r);else if(t.length===+t.length)for(var a=0,i=t.length;a<i;a++)e.call(r,t[a],a,t);else for(var n in t)t.hasOwnProperty(n)&&e.call(r,t[n],n,t)}function E(t,e,r){if(!!(t&&e)){if(t.map&&t.map===dT)return t.map(e,r);for(var a=[],i=0,n=t.length;i<n;i++)a.push(e.call(r,t[i],i,t));return a}}function ki(t,e,r,a){if(!!(t&&e)){if(t.reduce&&t.reduce===gT)return t.reduce(e,r,a);for(var i=0,n=t.length;i<n;i++)r=e.call(a,r,t[i],i,t);return r}}function Ht(t,e,r){if(!!(t&&e)){if(t.filter&&t.filter===vT)return t.filter(e,r);for(var a=[],i=0,n=t.length;i<n;i++)e.call(r,t[i],i,t)&&a.push(t[i]);return a}}function Np(t,e,r){if(!!(t&&e)){for(var a=0,i=t.length;a<i;a++)if(e.call(r,t[a],a,t))return t[a]}}function X(t,e){var r=Zn.call(arguments,2);return function(){return t.apply(e,r.concat(Zn.call(arguments)))}}function K(t){var e=Zn.call(arguments,1);return function(){return t.apply(this,e.concat(Zn.call(arguments)))}}function P(t){return Un.call(t)==="[object Array]"}function $t(t){return typeof t=="function"}function _t(t){return Un.call(t)==="[object String]"}function Q(t){var e=typeof t;return e==="function"||!!t&&e==="object"}function zh(t){return!!Pp[Un.call(t)]}function Ke(t){return!!Ep[Un.call(t)]}function Ni(t){return typeof t=="object"&&typeof t.nodeType=="number"&&typeof t.ownerDocument=="object"}function Xn(t){return t!==t}function Et(t){for(var e=0,r=arguments.length;e<r;e++)if(arguments[e]!=null)return arguments[e]}function Nt(t,e){return t??e}function Ba(t,e,r){return t??e??r}function Oi(){return Function.call.apply(Zn,arguments)}function Bh(t){if(typeof t=="number")return[t,t,t,t];var e=t.length;return e===2?[t[0],t[1],t[0],t[1]]:e===3?[t[0],t[1],t[2],t[1]]:t}function ot(t,e){if(!t)throw new Error(e)}function Ne(t){return t==null?null:typeof t.trim=="function"?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var Op="__ec_primitive__";function Vh(t){t[Op]=!0}function zi(t){return t[Op]}function Fs(t){var e=P(t);this.data={};var r=this;t instanceof Fs?t.each(a):t&&T(t,a);function a(i,n){e?r.set(i,n):r.set(n,i)}}Fs.prototype={constructor:Fs,get:function(t){return this.data.hasOwnProperty(t)?this.data[t]:null},set:function(t,e){return this.data[t]=e},each:function(t,e){e!==void 0&&(t=X(t,e));for(var r in this.data)this.data.hasOwnProperty(r)&&t(this.data[r],r)},removeKey:function(t){delete this.data[t]}};function j(t){return new Fs(t)}function Gh(t,e){for(var r=new t.constructor(t.length+e.length),a=0;a<t.length;a++)r[a]=t[a];var i=t.length;for(a=0;a<e.length;a++)r[a+i]=e[a];return r}function Kt(){}var pT=(Object.freeze||Object)({$override:Rp,clone:Y,merge:J,mergeAll:Yn,extend:Z,defaults:U,createCanvas:Ri,getContext:kp,indexOf:ut,inherits:yt,mixin:pt,isArrayLike:Pr,each:T,map:E,reduce:ki,filter:Ht,find:Np,bind:X,curry:K,isArray:P,isFunction:$t,isString:_t,isObject:Q,isBuiltInObject:zh,isTypedArray:Ke,isDom:Ni,eqNaN:Xn,retrieve:Et,retrieve2:Nt,retrieve3:Ba,slice:Oi,normalizeCssArray:Bh,assert:ot,trim:Ne,setAsPrimitive:Vh,isPrimitive:zi,createHashMap:j,concatArray:Gh,noop:Kt}),zp=typeof Float32Array>"u"?Array:Float32Array;function jr(t,e){var r=new zp(2);return t==null&&(t=0),e==null&&(e=0),r[0]=t,r[1]=e,r}function Jt(t,e){return t[0]=e[0],t[1]=e[1],t}function Qe(t){var e=new zp(2);return e[0]=t[0],e[1]=t[1],e}function Bp(t,e,r){return t[0]=e,t[1]=r,t}function Hh(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t}function qn(t,e,r,a){return t[0]=e[0]+r[0]*a,t[1]=e[1]+r[1]*a,t}function Er(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t}function Kn(t){return Math.sqrt(Fh(t))}var mT=Kn;function Fh(t){return t[0]*t[0]+t[1]*t[1]}var yT=Fh;function _T(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t}function xT(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t}function wT(t,e){return t[0]*e[0]+t[1]*e[1]}function Ws(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t}function Bi(t,e){var r=Kn(e);return r===0?(t[0]=0,t[1]=0):(t[0]=e[0]/r,t[1]=e[1]/r),t}function Qn(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var Rr=Qn;function Vp(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}var ta=Vp;function bT(t,e){return t[0]=-e[0],t[1]=-e[1],t}function Gp(t,e,r,a){return t[0]=e[0]+a*(r[0]-e[0]),t[1]=e[1]+a*(r[1]-e[1]),t}function xt(t,e,r){var a=e[0],i=e[1];return t[0]=r[0]*a+r[2]*i+r[4],t[1]=r[1]*a+r[3]*i+r[5],t}function kr(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t}function Nr(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t}var ST=(Object.freeze||Object)({create:jr,copy:Jt,clone:Qe,set:Bp,add:Hh,scaleAndAdd:qn,sub:Er,len:Kn,length:mT,lenSquare:Fh,lengthSquare:yT,mul:_T,div:xT,dot:wT,scale:Ws,normalize:Bi,distance:Qn,dist:Rr,distanceSquare:Vp,distSquare:ta,negate:bT,lerp:Gp,applyTransform:xt,min:kr,max:Nr});function Us(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this)}Us.prototype={constructor:Us,_dragStart:function(t){for(var e=t.target;e&&!e.draggable;)e=e.parent;e&&(this._draggingTarget=e,e.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.dispatchToElement(Vi(e,t),"dragstart",t.event))},_drag:function(t){var e=this._draggingTarget;if(e){var r=t.offsetX,a=t.offsetY,i=r-this._x,n=a-this._y;this._x=r,this._y=a,e.drift(i,n,t),this.dispatchToElement(Vi(e,t),"drag",t.event);var o=this.findHover(r,a,e).target,s=this._dropTarget;this._dropTarget=o,e!==o&&(s&&o!==s&&this.dispatchToElement(Vi(s,t),"dragleave",t.event),o&&o!==s&&this.dispatchToElement(Vi(o,t),"dragenter",t.event))}},_dragEnd:function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.dispatchToElement(Vi(e,t),"dragend",t.event),this._dropTarget&&this.dispatchToElement(Vi(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null}};function Vi(t,e){return{target:t,topTarget:e&&e.topTarget}}var Hp=Array.prototype.slice,Zt=function(t){this._$handlers={},this._$eventProcessor=t};Zt.prototype={constructor:Zt,one:function(t,e,r,a){return Fp(this,t,e,r,a,!0)},on:function(t,e,r,a){return Fp(this,t,e,r,a,!1)},isSilent:function(t){var e=this._$handlers;return!e[t]||!e[t].length},off:function(t,e){var r=this._$handlers;if(!t)return this._$handlers={},this;if(e){if(r[t]){for(var a=[],i=0,n=r[t].length;i<n;i++)r[t][i].h!==e&&a.push(r[t][i]);r[t]=a}r[t]&&r[t].length===0&&delete r[t]}else delete r[t];return this},trigger:function(t){var e=this._$handlers[t],r=this._$eventProcessor;if(e){var a=arguments,i=a.length;i>3&&(a=Hp.call(a,1));for(var n=e.length,o=0;o<n;){var s=e[o];if(r&&r.filter&&s.query!=null&&!r.filter(t,s.query)){o++;continue}switch(i){case 1:s.h.call(s.ctx);break;case 2:s.h.call(s.ctx,a[1]);break;case 3:s.h.call(s.ctx,a[1],a[2]);break;default:s.h.apply(s.ctx,a);break}s.one?(e.splice(o,1),n--):o++}}return r&&r.afterTrigger&&r.afterTrigger(t),this},triggerWithContext:function(t){var e=this._$handlers[t],r=this._$eventProcessor;if(e){var a=arguments,i=a.length;i>4&&(a=Hp.call(a,1,a.length-1));for(var n=a[a.length-1],o=e.length,s=0;s<o;){var l=e[s];if(r&&r.filter&&l.query!=null&&!r.filter(t,l.query)){s++;continue}switch(i){case 1:l.h.call(n);break;case 2:l.h.call(n,a[1]);break;case 3:l.h.call(n,a[1],a[2]);break;default:l.h.apply(n,a);break}l.one?(e.splice(s,1),o--):s++}}return r&&r.afterTrigger&&r.afterTrigger(t),this}};function AT(t,e){var r=t._$eventProcessor;return e!=null&&r&&r.normalizeQuery&&(e=r.normalizeQuery(e)),e}function Fp(t,e,r,a,i,n){var o=t._$handlers;if(typeof r=="function"&&(i=a,a=r,r=null),!a||!e)return t;r=AT(t,r),o[e]||(o[e]=[]);for(var s=0;s<o[e].length;s++)if(o[e][s].h===a)return t;var l={h:a,one:n,query:r,ctx:i||t,callAtLast:a.zrEventfulCallAtLast},u=o[e].length-1,h=o[e][u];return h&&h.callAtLast?o[e].splice(u,0,l):o[e].push(l),t}var TT=Math.log(2);function Wh(t,e,r,a,i,n){var o=a+"-"+i,s=t.length;if(n.hasOwnProperty(o))return n[o];if(e===1){var l=Math.round(Math.log((1<<s)-1&~i)/TT);return t[r][l]}for(var u=a|1<<r,h=r+1;a&1<<h;)h++;for(var f=0,c=0,v=0;c<s;c++){var d=1<<c;d&i||(f+=(v%2?-1:1)*t[r][c]*Wh(t,e-1,h,u,i|d,n),v++)}return n[o]=f,f}function Wp(t,e){var r=[[t[0],t[1],1,0,0,0,-e[0]*t[0],-e[0]*t[1]],[0,0,0,t[0],t[1],1,-e[1]*t[0],-e[1]*t[1]],[t[2],t[3],1,0,0,0,-e[2]*t[2],-e[2]*t[3]],[0,0,0,t[2],t[3],1,-e[3]*t[2],-e[3]*t[3]],[t[4],t[5],1,0,0,0,-e[4]*t[4],-e[4]*t[5]],[0,0,0,t[4],t[5],1,-e[5]*t[4],-e[5]*t[5]],[t[6],t[7],1,0,0,0,-e[6]*t[6],-e[6]*t[7]],[0,0,0,t[6],t[7],1,-e[7]*t[6],-e[7]*t[7]]],a={},i=Wh(r,8,0,0,0,a);if(i!==0){for(var n=[],o=0;o<8;o++)for(var s=0;s<8;s++)n[s]==null&&(n[s]=0),n[s]+=((o+s)%2?-1:1)*Wh(r,7,o===0?1:0,1<<o,1<<s,a)/i*e[o];return function(l,u,h){var f=u*n[6]+h*n[7]+1;l[0]=(u*n[0]+h*n[1]+n[2])/f,l[1]=(u*n[3]+h*n[4]+n[5])/f}}}var Up="___zrEVENTSAVED",Uh=[];function CT(t,e,r,a,i){return $h(Uh,e,a,i,!0)&&$h(t,r,Uh[0],Uh[1])}function $h(t,e,r,a,i){if(e.getBoundingClientRect&&at.domSupported&&!$p(e)){var n=e[Up]||(e[Up]={}),o=DT(e,n),s=IT(o,n,i);if(s)return s(t,r,a),!0}return!1}function DT(t,e){var r=e.markers;if(r)return r;r=e.markers=[];for(var a=["left","right"],i=["top","bottom"],n=0;n<4;n++){var o=document.createElement("div"),s=o.style,l=n%2,u=(n>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",a[l]+":0",i[u]+":0",a[1-l]+":auto",i[1-u]+":auto",""].join("!important;"),t.appendChild(o),r.push(o)}return r}function IT(t,e,r){for(var a=r?"invTrans":"trans",i=e[a],n=e.srcCoords,o=!0,s=[],l=[],u=0;u<4;u++){var h=t[u].getBoundingClientRect(),f=2*u,c=h.left,v=h.top;s.push(c,v),o=o&&n&&c===n[f]&&v===n[f+1],l.push(t[u].offsetLeft,t[u].offsetTop)}return o&&i?i:(e.srcCoords=s,e[a]=r?Wp(l,s):Wp(s,l))}function $p(t){return t.nodeName.toUpperCase()==="CANVAS"}var Zh=typeof window<"u"&&!!window.addEventListener,MT=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Yh=[];function Xh(t,e,r,a){return r=r||{},a||!at.canvasSupported?Zp(t,e,r):at.browser.firefox&&e.layerX!=null&&e.layerX!==e.offsetX?(r.zrX=e.layerX,r.zrY=e.layerY):e.offsetX!=null?(r.zrX=e.offsetX,r.zrY=e.offsetY):Zp(t,e,r),r}function Zp(t,e,r){if(at.domSupported&&t.getBoundingClientRect){var a=e.clientX,i=e.clientY;if($p(t)){var n=t.getBoundingClientRect();r.zrX=a-n.left,r.zrY=i-n.top;return}else if($h(Yh,t,a,i)){r.zrX=Yh[0],r.zrY=Yh[1];return}}r.zrX=r.zrY=0}function qh(t){return t||window.event}function fr(t,e,r){if(e=qh(e),e.zrX!=null)return e;var a=e.type,i=a&&a.indexOf("touch")>=0;if(!i)Xh(t,e,e,r),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;else{var n=a!=="touchend"?e.targetTouches[0]:e.changedTouches[0];n&&Xh(t,n,e,r)}var o=e.button;return e.which==null&&o!==void 0&&MT.test(e.type)&&(e.which=o&1?1:o&2?3:o&4?2:0),e}function Kh(t,e,r,a){Zh?t.addEventListener(e,r,a):t.attachEvent("on"+e,r)}function LT(t,e,r,a){Zh?t.removeEventListener(e,r,a):t.detachEvent("on"+e,r)}var Va=Zh?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0};function Yp(t){return t.which===2||t.which===3}var Qh=function(){this._track=[]};Qh.prototype={constructor:Qh,recognize:function(t,e,r){return this._doTrack(t,e,r),this._recognize(t)},clear:function(){return this._track.length=0,this},_doTrack:function(t,e,r){var a=t.touches;if(!!a){for(var i={points:[],touches:[],target:e,event:t},n=0,o=a.length;n<o;n++){var s=a[n],l=Xh(r,s,{});i.points.push([l.zrX,l.zrY]),i.touches.push(s)}this._track.push(i)}},_recognize:function(t){for(var e in Jh)if(Jh.hasOwnProperty(e)){var r=Jh[e](this._track,t);if(r)return r}}};function Xp(t){var e=t[1][0]-t[0][0],r=t[1][1]-t[0][1];return Math.sqrt(e*e+r*r)}function PT(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}var Jh={pinch:function(t,e){var r=t.length;if(!!r){var a=(t[r-1]||{}).points,i=(t[r-2]||{}).points||a;if(i&&i.length>1&&a&&a.length>1){var n=Xp(a)/Xp(i);!isFinite(n)&&(n=1),e.pinchScale=n;var o=PT(a);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:t[0].target,event:e}}}}},qp="silent";function ET(t,e,r){return{type:t,event:r,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:r.zrX,offsetY:r.zrY,gestureEvent:r.gestureEvent,pinchX:r.pinchX,pinchY:r.pinchY,pinchScale:r.pinchScale,wheelDelta:r.zrDelta,zrByTouch:r.zrByTouch,which:r.which,stop:RT}}function RT(){Va(this.event)}function Kp(){}Kp.prototype.dispose=function(){};var kT=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Gi=function(t,e,r,a){Zt.call(this),this.storage=t,this.painter=e,this.painterRoot=a,r=r||new Kp,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,Us.call(this),this.setHandlerProxy(r)};Gi.prototype={constructor:Gi,setHandlerProxy:function(t){this.proxy&&this.proxy.dispose(),t&&(T(kT,function(e){t.on&&t.on(e,this[e],this)},this),t.handler=this),this.proxy=t},mousemove:function(t){var e=t.zrX,r=t.zrY,a=Qp(this,e,r),i=this._hovered,n=i.target;n&&!n.__zr&&(i=this.findHover(i.x,i.y),n=i.target);var o=this._hovered=a?{x:e,y:r}:this.findHover(e,r),s=o.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),n&&s!==n&&this.dispatchToElement(i,"mouseout",t),this.dispatchToElement(o,"mousemove",t),s&&s!==n&&this.dispatchToElement(o,"mouseover",t)},mouseout:function(t){var e=t.zrEventControl,r=t.zrIsToLocalDOM;e!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",t),e!=="no_globalout"&&!r&&this.trigger("globalout",{type:"globalout",event:t})},resize:function(t){this._hovered={}},dispatch:function(t,e){var r=this[t];r&&r.call(this,e)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},dispatchToElement:function(t,e,r){t=t||{};var a=t.target;if(!(a&&a.silent)){for(var i="on"+e,n=ET(e,t,r);a&&(a[i]&&(n.cancelBubble=a[i].call(a,n)),a.trigger(e,n),a=a.parent,!n.cancelBubble););n.cancelBubble||(this.trigger(e,n),this.painter&&this.painter.eachOtherLayer(function(o){typeof o[i]=="function"&&o[i].call(o,n),o.trigger&&o.trigger(e,n)}))}},findHover:function(t,e,r){for(var a=this.storage.getDisplayList(),i={x:t,y:e},n=a.length-1;n>=0;n--){var o;if(a[n]!==r&&!a[n].ignore&&(o=NT(a[n],t,e))&&(!i.topTarget&&(i.topTarget=a[n]),o!==qp)){i.target=a[n];break}}return i},processGesture:function(t,e){this._gestureMgr||(this._gestureMgr=new Qh);var r=this._gestureMgr;e==="start"&&r.clear();var a=r.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if(e==="end"&&r.clear(),a){var i=a.type;t.gestureEvent=i,this.dispatchToElement({target:a.target},i,a.event)}}},T(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){Gi.prototype[t]=function(e){var r=e.zrX,a=e.zrY,i=Qp(this,r,a),n,o;if((t!=="mouseup"||!i)&&(n=this.findHover(r,a),o=n.target),t==="mousedown")this._downEl=o,this._downPoint=[e.zrX,e.zrY],this._upEl=o;else if(t==="mouseup")this._upEl=o;else if(t==="click"){if(this._downEl!==this._upEl||!this._downPoint||Rr(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,t,e)}});function NT(t,e,r){if(t[t.rectHover?"rectContain":"contain"](e,r)){for(var a=t,i;a;){if(a.clipPath&&!a.clipPath.contain(e,r))return!1;a.silent&&(i=!0),a=a.parent}return i?qp:!0}return!1}function Qp(t,e,r){var a=t.painter;return e<0||e>a.getWidth()||r<0||r>a.getHeight()}pt(Gi,Zt),pt(Gi,Us);var OT=typeof Float32Array>"u"?Array:Float32Array;function ce(){var t=new OT(6);return Hi(t),t}function Hi(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function Jn(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function ea(t,e,r){var a=e[0]*r[0]+e[2]*r[1],i=e[1]*r[0]+e[3]*r[1],n=e[0]*r[2]+e[2]*r[3],o=e[1]*r[2]+e[3]*r[3],s=e[0]*r[4]+e[2]*r[5]+e[4],l=e[1]*r[4]+e[3]*r[5]+e[5];return t[0]=a,t[1]=i,t[2]=n,t[3]=o,t[4]=s,t[5]=l,t}function Je(t,e,r){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+r[0],t[5]=e[5]+r[1],t}function Or(t,e,r){var a=e[0],i=e[2],n=e[4],o=e[1],s=e[3],l=e[5],u=Math.sin(r),h=Math.cos(r);return t[0]=a*h+o*u,t[1]=-a*u+o*h,t[2]=i*h+s*u,t[3]=-i*u+h*s,t[4]=h*n+u*l,t[5]=h*l-u*n,t}function jn(t,e,r){var a=r[0],i=r[1];return t[0]=e[0]*a,t[1]=e[1]*i,t[2]=e[2]*a,t[3]=e[3]*i,t[4]=e[4]*a,t[5]=e[5]*i,t}function $s(t,e){var r=e[0],a=e[2],i=e[4],n=e[1],o=e[3],s=e[5],l=r*o-n*a;return l?(l=1/l,t[0]=o*l,t[1]=-n*l,t[2]=-a*l,t[3]=r*l,t[4]=(a*s-o*i)*l,t[5]=(n*i-r*s)*l,t):null}function Jp(t){var e=ce();return Jn(e,t),e}var zT=(Object.freeze||Object)({create:ce,identity:Hi,copy:Jn,mul:ea,translate:Je,rotate:Or,scale:jn,invert:$s,clone:Jp}),jh=Hi,jp=5e-5;function Ga(t){return t>jp||t<-jp}var je=function(t){t=t||{},t.position||(this.position=[0,0]),t.rotation==null&&(this.rotation=0),t.scale||(this.scale=[1,1]),this.origin=this.origin||null},tr=je.prototype;tr.transform=null,tr.needLocalTransform=function(){return Ga(this.rotation)||Ga(this.position[0])||Ga(this.position[1])||Ga(this.scale[0]-1)||Ga(this.scale[1]-1)};var Ha=[];tr.updateTransform=function(){var t=this.parent,e=t&&t.transform,r=this.needLocalTransform(),a=this.transform;if(!(r||e)){a&&jh(a);return}a=a||ce(),r?this.getLocalTransform(a):jh(a),e&&(r?ea(a,t.transform,a):Jn(a,t.transform)),this.transform=a;var i=this.globalScaleRatio;if(i!=null&&i!==1){this.getGlobalScale(Ha);var n=Ha[0]<0?-1:1,o=Ha[1]<0?-1:1,s=((Ha[0]-n)*i+n)/Ha[0]||0,l=((Ha[1]-o)*i+o)/Ha[1]||0;a[0]*=s,a[1]*=s,a[2]*=l,a[3]*=l}this.invTransform=this.invTransform||ce(),$s(this.invTransform,a)},tr.getLocalTransform=function(t){return je.getLocalTransform(this,t)},tr.setTransform=function(t){var e=this.transform,r=t.dpr||1;e?t.setTransform(r*e[0],r*e[1],r*e[2],r*e[3],r*e[4],r*e[5]):t.setTransform(r,0,0,r,0,0)},tr.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var Fi=[],tf=ce();tr.setLocalTransform=function(t){if(!!t){var e=t[0]*t[0]+t[1]*t[1],r=t[2]*t[2]+t[3]*t[3],a=this.position,i=this.scale;Ga(e-1)&&(e=Math.sqrt(e)),Ga(r-1)&&(r=Math.sqrt(r)),t[0]<0&&(e=-e),t[3]<0&&(r=-r),a[0]=t[4],a[1]=t[5],i[0]=e,i[1]=r,this.rotation=Math.atan2(-t[1]/r,t[0]/e)}},tr.decomposeTransform=function(){if(!!this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(ea(Fi,t.invTransform,e),e=Fi);var r=this.origin;r&&(r[0]||r[1])&&(tf[4]=r[0],tf[5]=r[1],ea(Fi,e,tf),Fi[4]-=r[0],Fi[5]-=r[1],e=Fi),this.setLocalTransform(e)}},tr.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},tr.transformCoordToLocal=function(t,e){var r=[t,e],a=this.invTransform;return a&&xt(r,r,a),r},tr.transformCoordToGlobal=function(t,e){var r=[t,e],a=this.transform;return a&&xt(r,r,a),r},je.getLocalTransform=function(t,e){e=e||[],jh(e);var r=t.origin,a=t.scale||[1,1],i=t.rotation||0,n=t.position||[0,0];return r&&(e[4]-=r[0],e[5]-=r[1]),jn(e,e,a),i&&Or(e,e,i),r&&(e[4]+=r[0],e[5]+=r[1]),e[4]+=n[0],e[5]+=n[1],e};var Zs={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return .5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return t===0?0:Math.pow(1024,t-1)},exponentialOut:function(t){return t===1?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return t===0?0:t===1?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(-Math.pow(2,-10*(t-1))+2)},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,r=.1,a=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=a/4):e=a*Math.asin(1/r)/(2*Math.PI),-(r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/a)))},elasticOut:function(t){var e,r=.1,a=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=a/4):e=a*Math.asin(1/r)/(2*Math.PI),r*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/a)+1)},elasticInOut:function(t){var e,r=.1,a=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=a/4):e=a*Math.asin(1/r)/(2*Math.PI),(t*=2)<1?-.5*(r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/a)):r*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/a)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?.5*(t*t*((e+1)*t-e)):.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-Zs.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?Zs.bounceIn(t*2)*.5:Zs.bounceOut(t*2-1)*.5+.5}};function ef(t){this._target=t.target,this._life=t.life||1e3,this._delay=t.delay||0,this._initialized=!1,this.loop=t.loop==null?!1:t.loop,this.gap=t.gap||0,this.easing=t.easing||"Linear",this.onframe=t.onframe,this.ondestroy=t.ondestroy,this.onrestart=t.onrestart,this._pausedTime=0,this._paused=!1}ef.prototype={constructor:ef,step:function(t,e){if(this._initialized||(this._startTime=t+this._delay,this._initialized=!0),this._paused){this._pausedTime+=e;return}var r=(t-this._startTime-this._pausedTime)/this._life;if(!(r<0)){r=Math.min(r,1);var a=this.easing,i=typeof a=="string"?Zs[a]:a,n=typeof i=="function"?i(r):r;return this.fire("frame",n),r===1?this.loop?(this.restart(t),"restart"):(this._needsRemove=!0,"destroy"):null}},restart:function(t){var e=(t-this._startTime-this._pausedTime)%this._life;this._startTime=t-e+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(t,e){t="on"+t,this[t]&&this[t](this._target,e)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var tm=function(){this.head=null,this.tail=null,this._len=0},to=tm.prototype;to.insert=function(t){var e=new em(t);return this.insertEntry(e),e},to.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},to.remove=function(t){var e=t.prev,r=t.next;e?e.next=r:this.head=r,r?r.prev=e:this.tail=e,t.next=t.prev=null,this._len--},to.len=function(){return this._len},to.clear=function(){this.head=this.tail=null,this._len=0};var em=function(t){this.value=t,this.next,this.prev},rf=function(t){this._list=new tm,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null},af=rf.prototype;af.put=function(t,e){var r=this._list,a=this._map,i=null;if(a[t]==null){var n=r.len(),o=this._lastRemovedEntry;if(n>=this._maxSize&&n>0){var s=r.head;r.remove(s),delete a[s.key],i=s.value,this._lastRemovedEntry=s}o?o.value=e:o=new em(e),o.key=t,r.insertEntry(o),a[t]=o}return i},af.get=function(t){var e=this._map[t],r=this._list;if(e!=null)return e!==r.tail&&(r.remove(e),r.insertEntry(e)),e.value},af.clear=function(){this._list.clear(),this._map={}};var rm={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function er(t){return t=Math.round(t),t<0?0:t>255?255:t}function BT(t){return t=Math.round(t),t<0?0:t>360?360:t}function eo(t){return t<0?0:t>1?1:t}function nf(t){return t.length&&t.charAt(t.length-1)==="%"?er(parseFloat(t)/100*255):er(parseInt(t,10))}function Wi(t){return t.length&&t.charAt(t.length-1)==="%"?eo(parseFloat(t)/100):eo(parseFloat(t))}function of(t,e,r){return r<0?r+=1:r>1&&(r-=1),r*6<1?t+(e-t)*r*6:r*2<1?e:r*3<2?t+(e-t)*(2/3-r)*6:t}function ra(t,e,r){return t+(e-t)*r}function rr(t,e,r,a,i){return t[0]=e,t[1]=r,t[2]=a,t[3]=i,t}function sf(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var am=new rf(20),Ys=null;function Ui(t,e){Ys&&sf(Ys,e),Ys=am.put(t,Ys||e.slice())}function be(t,e){if(!!t){e=e||[];var r=am.get(t);if(r)return sf(e,r);t=t+"";var a=t.replace(/ /g,"").toLowerCase();if(a in rm)return sf(e,rm[a]),Ui(t,e),e;if(a.charAt(0)==="#"){if(a.length===4){var i=parseInt(a.substr(1),16);if(!(i>=0&&i<=4095)){rr(e,0,0,0,1);return}return rr(e,(i&3840)>>4|(i&3840)>>8,i&240|(i&240)>>4,i&15|(i&15)<<4,1),Ui(t,e),e}else if(a.length===7){var i=parseInt(a.substr(1),16);if(!(i>=0&&i<=16777215)){rr(e,0,0,0,1);return}return rr(e,(i&16711680)>>16,(i&65280)>>8,i&255,1),Ui(t,e),e}return}var n=a.indexOf("("),o=a.indexOf(")");if(n!==-1&&o+1===a.length){var s=a.substr(0,n),l=a.substr(n+1,o-(n+1)).split(","),u=1;switch(s){case"rgba":if(l.length!==4){rr(e,0,0,0,1);return}u=Wi(l.pop());case"rgb":if(l.length!==3){rr(e,0,0,0,1);return}return rr(e,nf(l[0]),nf(l[1]),nf(l[2]),u),Ui(t,e),e;case"hsla":if(l.length!==4){rr(e,0,0,0,1);return}return l[3]=Wi(l[3]),lf(l,e),Ui(t,e),e;case"hsl":if(l.length!==3){rr(e,0,0,0,1);return}return lf(l,e),Ui(t,e),e;default:return}}rr(e,0,0,0,1)}}function lf(t,e){var r=(parseFloat(t[0])%360+360)%360/360,a=Wi(t[1]),i=Wi(t[2]),n=i<=.5?i*(a+1):i+a-i*a,o=i*2-n;return e=e||[],rr(e,er(of(o,n,r+1/3)*255),er(of(o,n,r)*255),er(of(o,n,r-1/3)*255),1),t.length===4&&(e[3]=t[3]),e}function VT(t){if(!!t){var e=t[0]/255,r=t[1]/255,a=t[2]/255,i=Math.min(e,r,a),n=Math.max(e,r,a),o=n-i,s=(n+i)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(n+i):u=o/(2-n-i);var h=((n-e)/6+o/2)/o,f=((n-r)/6+o/2)/o,c=((n-a)/6+o/2)/o;e===n?l=c-f:r===n?l=1/3+h-c:a===n&&(l=2/3+f-h),l<0&&(l+=1),l>1&&(l-=1)}var v=[l*360,u,s];return t[3]!=null&&v.push(t[3]),v}}function im(t,e){var r=be(t);if(r){for(var a=0;a<3;a++)e<0?r[a]=r[a]*(1-e)|0:r[a]=(255-r[a])*e+r[a]|0,r[a]>255?r[a]=255:t[a]<0&&(r[a]=0);return zr(r,r.length===4?"rgba":"rgb")}}function uf(t){var e=be(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function ro(t,e,r){if(!(!(e&&e.length)||!(t>=0&&t<=1))){r=r||[];var a=t*(e.length-1),i=Math.floor(a),n=Math.ceil(a),o=e[i],s=e[n],l=a-i;return r[0]=er(ra(o[0],s[0],l)),r[1]=er(ra(o[1],s[1],l)),r[2]=er(ra(o[2],s[2],l)),r[3]=eo(ra(o[3],s[3],l)),r}}var GT=ro;function nm(t,e,r){if(!(!(e&&e.length)||!(t>=0&&t<=1))){var a=t*(e.length-1),i=Math.floor(a),n=Math.ceil(a),o=be(e[i]),s=be(e[n]),l=a-i,u=zr([er(ra(o[0],s[0],l)),er(ra(o[1],s[1],l)),er(ra(o[2],s[2],l)),eo(ra(o[3],s[3],l))],"rgba");return r?{color:u,leftIndex:i,rightIndex:n,value:a}:u}}var HT=nm;function $i(t,e,r,a){if(t=be(t),t)return t=VT(t),e!=null&&(t[0]=BT(e)),r!=null&&(t[1]=Wi(r)),a!=null&&(t[2]=Wi(a)),zr(lf(t),"rgba")}function Xs(t,e){if(t=be(t),t&&e!=null)return t[3]=eo(e),zr(t,"rgba")}function zr(t,e){if(!(!t||!t.length)){var r=t[0]+","+t[1]+","+t[2];return(e==="rgba"||e==="hsva"||e==="hsla")&&(r+=","+t[3]),e+"("+r+")"}}var FT=(Object.freeze||Object)({parse:be,lift:im,toHex:uf,fastLerp:ro,fastMapToColor:GT,lerp:nm,mapToColor:HT,modifyHSL:$i,modifyAlpha:Xs,stringify:zr}),hf=Array.prototype.slice;function WT(t,e){return t[e]}function UT(t,e,r){t[e]=r}function ff(t,e,r){return(e-t)*r+t}function om(t,e,r){return r>.5?e:t}function sm(t,e,r,a,i){var n=t.length;if(i===1)for(var o=0;o<n;o++)a[o]=ff(t[o],e[o],r);else for(var s=n&&t[0].length,o=0;o<n;o++)for(var l=0;l<s;l++)a[o][l]=ff(t[o][l],e[o][l],r)}function lm(t,e,r){var a=t.length,i=e.length;if(a!==i){var n=a>i;if(n)t.length=i;else for(var o=a;o<i;o++)t.push(r===1?e[o]:hf.call(e[o]))}for(var s=t[0]&&t[0].length,o=0;o<t.length;o++)if(r===1)isNaN(t[o])&&(t[o]=e[o]);else for(var l=0;l<s;l++)isNaN(t[o][l])&&(t[o][l]=e[o][l])}function $T(t,e,r){if(t===e)return!0;var a=t.length;if(a!==e.length)return!1;if(r===1){for(var i=0;i<a;i++)if(t[i]!==e[i])return!1}else for(var n=t[0].length,i=0;i<a;i++)for(var o=0;o<n;o++)if(t[i][o]!==e[i][o])return!1;return!0}function um(t,e,r,a,i,n,o,s,l){var u=t.length;if(l===1)for(var h=0;h<u;h++)s[h]=cf(t[h],e[h],r[h],a[h],i,n,o);else for(var f=t[0].length,h=0;h<u;h++)for(var c=0;c<f;c++)s[h][c]=cf(t[h][c],e[h][c],r[h][c],a[h][c],i,n,o)}function cf(t,e,r,a,i,n,o){var s=(r-t)*.5,l=(a-e)*.5;return(2*(e-r)+s+l)*o+(-3*(e-r)-2*s-l)*n+s*i+e}function ZT(t){if(Pr(t)){var e=t.length;if(Pr(t[0])){for(var r=[],a=0;a<e;a++)r.push(hf.call(t[a]));return r}return hf.call(t)}return t}function hm(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}function YT(t){var e=t[t.length-1].value;return Pr(e&&e[0])?2:1}function XT(t,e,r,a,i,n){var o=t._getter,s=t._setter,l=e==="spline",u=a.length;if(!!u){var h=a[0].value,f=Pr(h),c=!1,v=!1,d=f?YT(a):0,g;a.sort(function(W,F){return W.time-F.time}),g=a[u-1].time;for(var p=[],m=[],y=a[0].value,_=!0,x=0;x<u;x++){p.push(a[x].time/g);var w=a[x].value;if(f&&$T(w,y,d)||!f&&w===y||(_=!1),y=w,typeof w=="string"){var S=be(w);S?(w=S,c=!0):v=!0}m.push(w)}if(!(!n&&_)){for(var b=m[u-1],x=0;x<u-1;x++)f?lm(m[x],b,d):isNaN(m[x])&&!isNaN(b)&&!v&&!c&&(m[x]=b);f&&lm(o(t._target,i),b,d);var A=0,C=0,D,I,L,M,B,k;if(c)var O=[0,0,0,0];var V=function(W,F){var N;if(F<0)N=0;else if(F<C){for(D=Math.min(A+1,u-1),N=D;N>=0&&!(p[N]<=F);N--);N=Math.min(N,u-2)}else{for(N=A;N<u&&!(p[N]>F);N++);N=Math.min(N-1,u-2)}A=N,C=F;var $=p[N+1]-p[N];if($!==0)if(I=(F-p[N])/$,l)if(M=m[N],L=m[N===0?N:N-1],B=m[N>u-2?u-1:N+1],k=m[N>u-3?u-1:N+2],f)um(L,M,B,k,I,I*I,I*I*I,o(W,i),d);else{var et;if(c)et=um(L,M,B,k,I,I*I,I*I*I,O,1),et=hm(O);else{if(v)return om(M,B,I);et=cf(L,M,B,k,I,I*I,I*I*I)}s(W,i,et)}else if(f)sm(m[N],m[N+1],I,o(W,i),d);else{var et;if(c)sm(m[N],m[N+1],I,O,1),et=hm(O);else{if(v)return om(m[N],m[N+1],I);et=ff(m[N],m[N+1],I)}s(W,i,et)}},H=new ef({target:t._target,life:g,loop:t._loop,delay:t._delay,onframe:V,ondestroy:r});return e&&e!=="spline"&&(H.easing=e),H}}}var vf=function(t,e,r,a){this._tracks={},this._target=t,this._loop=e||!1,this._getter=r||WT,this._setter=a||UT,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};vf.prototype={when:function(t,e){var r=this._tracks;for(var a in e)if(!!e.hasOwnProperty(a)){if(!r[a]){r[a]=[];var i=this._getter(this._target,a);if(i==null)continue;t!==0&&r[a].push({time:0,value:ZT(i)})}r[a].push({time:t,value:e[a]})}return this},during:function(t){return this._onframeList.push(t),this},pause:function(){for(var t=0;t<this._clipList.length;t++)this._clipList[t].pause();this._paused=!0},resume:function(){for(var t=0;t<this._clipList.length;t++)this._clipList[t].resume();this._paused=!1},isPaused:function(){return!!this._paused},_doneCallback:function(){this._tracks={},this._clipList.length=0;for(var t=this._doneList,e=t.length,r=0;r<e;r++)t[r].call(this)},start:function(t,e){var r=this,a=0,i=function(){a--,a||r._doneCallback()},n;for(var o in this._tracks)if(!!this._tracks.hasOwnProperty(o)){var s=XT(this,t,i,this._tracks[o],o,e);s&&(this._clipList.push(s),a++,this.animation&&this.animation.addClip(s),n=s)}if(n){var l=n.onframe;n.onframe=function(u,h){l(u,h);for(var f=0;f<r._onframeList.length;f++)r._onframeList[f](u,h)}}return a||this._doneCallback(),this},stop:function(t){for(var e=this._clipList,r=this.animation,a=0;a<e.length;a++){var i=e[a];t&&i.onframe(this._target,1),r&&r.removeClip(i)}e.length=0},delay:function(t){return this._delay=t,this},done:function(t){return t&&this._doneList.push(t),this},getClips:function(){return this._clipList}};var fm=1;typeof window<"u"&&(fm=Math.max(window.devicePixelRatio||1,1));var qT=0,qs=fm,cm=function(){};qT===1&&(cm=console.error);var aa=cm,Ks=function(){this.animators=[]};Ks.prototype={constructor:Ks,animate:function(t,e){var r,a=!1,i=this,n=this.__zr;if(t){var o=t.split("."),s=i;a=o[0]==="shape";for(var l=0,u=o.length;l<u;l++)!s||(s=s[o[l]]);s&&(r=s)}else r=i;if(!r){aa('Property "'+t+'" is not existed in element '+i.id);return}var h=i.animators,f=new vf(r,e);return f.during(function(c){i.dirty(a)}).done(function(){h.splice(ut(h,f),1)}),h.push(f),n&&n.animation.addAnimator(f),f},stopAnimation:function(t){for(var e=this.animators,r=e.length,a=0;a<r;a++)e[a].stop(t);return e.length=0,this},animateTo:function(t,e,r,a,i,n){vm(this,t,e,r,a,i,n)},animateFrom:function(t,e,r,a,i,n){vm(this,t,e,r,a,i,n,!0)}};function vm(t,e,r,a,i,n,o,s){_t(a)?(n=i,i=a,a=0):$t(i)?(n=i,i="linear",a=0):$t(a)?(n=a,a=0):$t(r)?(n=r,r=500):r||(r=500),t.stopAnimation(),dm(t,"",t,e,r,a,s);var l=t.animators.slice(),u=l.length;function h(){u--,u||n&&n()}u||n&&n();for(var f=0;f<l.length;f++)l[f].done(h).start(i,o)}function dm(t,e,r,a,i,n,o){var s={},l=0;for(var u in a)!a.hasOwnProperty(u)||(r[u]!=null?Q(a[u])&&!Pr(a[u])?dm(t,e?e+"."+u:u,r[u],a[u],i,n,o):(o?(s[u]=r[u],gm(t,e,u,a[u])):s[u]=a[u],l++):a[u]!=null&&!o&&gm(t,e,u,a[u]));l>0&&t.animate(e,!1).when(i??500,s).delay(n||0)}function gm(t,e,r,a){if(!e)t.attr(r,a);else{var i={};i[e]={},i[e][r]=a,t.attr(i)}}var Br=function(t){je.call(this,t),Zt.call(this,t),Ks.call(this,t),this.id=t.id||Lp()};Br.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,isGroup:!1,drift:function(t,e){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0;break}var r=this.transform;r||(r=this.transform=[1,0,0,1,0,0]),r[4]+=t,r[5]+=e,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(t,e){},attrKV:function(t,e){if(t==="position"||t==="scale"||t==="origin"){if(e){var r=this[t];r||(r=this[t]=[]),r[0]=e[0],r[1]=e[1]}}else this[t]=e},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(t,e){if(typeof t=="string")this.attrKV(t,e);else if(Q(t))for(var r in t)t.hasOwnProperty(r)&&this.attrKV(r,t[r]);return this.dirty(!1),this},setClipPath:function(t){var e=this.__zr;e&&t.addSelfToZr(e),this.clipPath&&this.clipPath!==t&&this.removeClipPath(),this.clipPath=t,t.__zr=e,t.__clipTarget=this,this.dirty(!1)},removeClipPath:function(){var t=this.clipPath;t&&(t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(t){this.__zr=t;var e=this.animators;if(e)for(var r=0;r<e.length;r++)t.animation.addAnimator(e[r]);this.clipPath&&this.clipPath.addSelfToZr(t)},removeSelfFromZr:function(t){this.__zr=null;var e=this.animators;if(e)for(var r=0;r<e.length;r++)t.animation.removeAnimator(e[r]);this.clipPath&&this.clipPath.removeSelfFromZr(t)}},pt(Br,Ks),pt(Br,je),pt(Br,Zt);var Qs=xt,Js=Math.min,js=Math.max;function it(t,e,r,a){r<0&&(t=t+r,r=-r),a<0&&(e=e+a,a=-a),this.x=t,this.y=e,this.width=r,this.height=a}it.prototype={constructor:it,union:function(t){var e=Js(t.x,this.x),r=Js(t.y,this.y);this.width=js(t.x+t.width,this.x+this.width)-e,this.height=js(t.y+t.height,this.y+this.height)-r,this.x=e,this.y=r},applyTransform:function(){var t=[],e=[],r=[],a=[];return function(i){if(!!i){t[0]=r[0]=this.x,t[1]=a[1]=this.y,e[0]=a[0]=this.x+this.width,e[1]=r[1]=this.y+this.height,Qs(t,t,i),Qs(e,e,i),Qs(r,r,i),Qs(a,a,i),this.x=Js(t[0],e[0],r[0],a[0]),this.y=Js(t[1],e[1],r[1],a[1]);var n=js(t[0],e[0],r[0],a[0]),o=js(t[1],e[1],r[1],a[1]);this.width=n-this.x,this.height=o-this.y}}}(),calculateTransform:function(t){var e=this,r=t.width/e.width,a=t.height/e.height,i=ce();return Je(i,i,[-e.x,-e.y]),jn(i,i,[r,a]),Je(i,i,[t.x,t.y]),i},intersect:function(t){if(!t)return!1;t instanceof it||(t=it.create(t));var e=this,r=e.x,a=e.x+e.width,i=e.y,n=e.y+e.height,o=t.x,s=t.x+t.width,l=t.y,u=t.y+t.height;return!(a<o||s<r||n<l||u<i)},contain:function(t,e){var r=this;return t>=r.x&&t<=r.x+r.width&&e>=r.y&&e<=r.y+r.height},clone:function(){return new it(this.x,this.y,this.width,this.height)},copy:function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},it.create=function(t){return new it(t.x,t.y,t.width,t.height)};var G=function(t){t=t||{},Br.call(this,t);for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};G.prototype={constructor:G,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(t){return this._children[t]},childOfName:function(t){for(var e=this._children,r=0;r<e.length;r++)if(e[r].name===t)return e[r]},childCount:function(){return this._children.length},add:function(t){return t&&t!==this&&t.parent!==this&&(this._children.push(t),this._doAdd(t)),this},addBefore:function(t,e){if(t&&t!==this&&t.parent!==this&&e&&e.parent===this){var r=this._children,a=r.indexOf(e);a>=0&&(r.splice(a,0,t),this._doAdd(t))}return this},_doAdd:function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__storage,r=this.__zr;e&&e!==t.__storage&&(e.addToStorage(t),t instanceof G&&t.addChildrenToStorage(e)),r&&r.refresh()},remove:function(t){var e=this.__zr,r=this.__storage,a=this._children,i=ut(a,t);return i<0?this:(a.splice(i,1),t.parent=null,r&&(r.delFromStorage(t),t instanceof G&&t.delChildrenFromStorage(r)),e&&e.refresh(),this)},removeAll:function(){var t=this._children,e=this.__storage,r,a;for(a=0;a<t.length;a++)r=t[a],e&&(e.delFromStorage(r),r instanceof G&&r.delChildrenFromStorage(e)),r.parent=null;return t.length=0,this},eachChild:function(t,e){for(var r=this._children,a=0;a<r.length;a++){var i=r[a];t.call(e,i,a)}return this},traverse:function(t,e){for(var r=0;r<this._children.length;r++){var a=this._children[r];t.call(e,a),a.type==="group"&&a.traverse(t,e)}return this},addChildrenToStorage:function(t){for(var e=0;e<this._children.length;e++){var r=this._children[e];t.addToStorage(r),r instanceof G&&r.addChildrenToStorage(t)}},delChildrenFromStorage:function(t){for(var e=0;e<this._children.length;e++){var r=this._children[e];t.delFromStorage(r),r instanceof G&&r.delChildrenFromStorage(t)}},dirty:function(){return this.__dirty=!0,this.__zr&&this.__zr.refresh(),this},getBoundingRect:function(t){for(var e=null,r=new it(0,0,0,0),a=t||this._children,i=[],n=0;n<a.length;n++){var o=a[n];if(!(o.ignore||o.invisible)){var s=o.getBoundingRect(),l=o.getLocalTransform(i);l?(r.copy(s),r.applyTransform(l),e=e||r.clone(),e.union(r)):(e=e||s.clone(),e.union(s))}}return e||r}},yt(G,Br);var pm=32,ao=7;function KT(t){for(var e=0;t>=pm;)e|=t&1,t>>=1;return t+e}function mm(t,e,r,a){var i=e+1;if(i===r)return 1;if(a(t[i++],t[e])<0){for(;i<r&&a(t[i],t[i-1])<0;)i++;QT(t,e,i)}else for(;i<r&&a(t[i],t[i-1])>=0;)i++;return i-e}function QT(t,e,r){for(r--;e<r;){var a=t[e];t[e++]=t[r],t[r--]=a}}function ym(t,e,r,a,i){for(a===e&&a++;a<r;a++){for(var n=t[a],o=e,s=a,l;o<s;)l=o+s>>>1,i(n,t[l])<0?s=l:o=l+1;var u=a-o;switch(u){case 3:t[o+3]=t[o+2];case 2:t[o+2]=t[o+1];case 1:t[o+1]=t[o];break;default:for(;u>0;)t[o+u]=t[o+u-1],u--}t[o]=n}}function df(t,e,r,a,i,n){var o=0,s=0,l=1;if(n(t,e[r+i])>0){for(s=a-i;l<s&&n(t,e[r+i+l])>0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}else{for(s=i+1;l<s&&n(t,e[r+i-l])<=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=i-l,l=i-u}for(o++;o<l;){var h=o+(l-o>>>1);n(t,e[r+h])>0?o=h+1:l=h}return l}function gf(t,e,r,a,i,n){var o=0,s=0,l=1;if(n(t,e[r+i])<0){for(s=i+1;l<s&&n(t,e[r+i-l])<0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=i-l,l=i-u}else{for(s=a-i;l<s&&n(t,e[r+i+l])>=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}for(o++;o<l;){var h=o+(l-o>>>1);n(t,e[r+h])<0?l=h:o=h+1}return l}function JT(t,e){var r=ao,a,i,n=0,o=[];a=[],i=[];function s(v,d){a[n]=v,i[n]=d,n+=1}function l(){for(;n>1;){var v=n-2;if(v>=1&&i[v-1]<=i[v]+i[v+1]||v>=2&&i[v-2]<=i[v]+i[v-1])i[v-1]<i[v+1]&&v--;else if(i[v]>i[v+1])break;h(v)}}function u(){for(;n>1;){var v=n-2;v>0&&i[v-1]<i[v+1]&&v--,h(v)}}function h(v){var d=a[v],g=i[v],p=a[v+1],m=i[v+1];i[v]=g+m,v===n-3&&(a[v+1]=a[v+2],i[v+1]=i[v+2]),n--;var y=gf(t[p],t,d,g,0,e);d+=y,g-=y,g!==0&&(m=df(t[d+g-1],t,p,m,m-1,e),m!==0&&(g<=m?f(d,g,p,m):c(d,g,p,m)))}function f(v,d,g,p){var m=0;for(m=0;m<d;m++)o[m]=t[v+m];var y=0,_=g,x=v;if(t[x++]=t[_++],--p===0){for(m=0;m<d;m++)t[x+m]=o[y+m];return}if(d===1){for(m=0;m<p;m++)t[x+m]=t[_+m];t[x+p]=o[y];return}for(var w=r,S,b,A;;){S=0,b=0,A=!1;do if(e(t[_],o[y])<0){if(t[x++]=t[_++],b++,S=0,--p===0){A=!0;break}}else if(t[x++]=o[y++],S++,b=0,--d===1){A=!0;break}while((S|b)<w);if(A)break;do{if(S=gf(t[_],o,y,d,0,e),S!==0){for(m=0;m<S;m++)t[x+m]=o[y+m];if(x+=S,y+=S,d-=S,d<=1){A=!0;break}}if(t[x++]=t[_++],--p===0){A=!0;break}if(b=df(o[y],t,_,p,0,e),b!==0){for(m=0;m<b;m++)t[x+m]=t[_+m];if(x+=b,_+=b,p-=b,p===0){A=!0;break}}if(t[x++]=o[y++],--d===1){A=!0;break}w--}while(S>=ao||b>=ao);if(A)break;w<0&&(w=0),w+=2}if(r=w,r<1&&(r=1),d===1){for(m=0;m<p;m++)t[x+m]=t[_+m];t[x+p]=o[y]}else{if(d===0)throw new Error;for(m=0;m<d;m++)t[x+m]=o[y+m]}}function c(v,d,g,p){var m=0;for(m=0;m<p;m++)o[m]=t[g+m];var y=v+d-1,_=p-1,x=g+p-1,w=0,S=0;if(t[x--]=t[y--],--d===0){for(w=x-(p-1),m=0;m<p;m++)t[w+m]=o[m];return}if(p===1){for(x-=d,y-=d,S=x+1,w=y+1,m=d-1;m>=0;m--)t[S+m]=t[w+m];t[x]=o[_];return}for(var b=r;;){var A=0,C=0,D=!1;do if(e(o[_],t[y])<0){if(t[x--]=t[y--],A++,C=0,--d===0){D=!0;break}}else if(t[x--]=o[_--],C++,A=0,--p===1){D=!0;break}while((A|C)<b);if(D)break;do{if(A=d-gf(o[_],t,v,d,d-1,e),A!==0){for(x-=A,y-=A,d-=A,S=x+1,w=y+1,m=A-1;m>=0;m--)t[S+m]=t[w+m];if(d===0){D=!0;break}}if(t[x--]=o[_--],--p===1){D=!0;break}if(C=p-df(t[y],o,0,p,p-1,e),C!==0){for(x-=C,_-=C,p-=C,S=x+1,w=_+1,m=0;m<C;m++)t[S+m]=o[w+m];if(p<=1){D=!0;break}}if(t[x--]=t[y--],--d===0){D=!0;break}b--}while(A>=ao||C>=ao);if(D)break;b<0&&(b=0),b+=2}if(r=b,r<1&&(r=1),p===1){for(x-=d,y-=d,S=x+1,w=y+1,m=d-1;m>=0;m--)t[S+m]=t[w+m];t[x]=o[_]}else{if(p===0)throw new Error;for(w=x-(p-1),m=0;m<p;m++)t[w+m]=o[m]}}this.mergeRuns=l,this.forceMergeRuns=u,this.pushRun=s}function tl(t,e,r,a){r||(r=0),a||(a=t.length);var i=a-r;if(!(i<2)){var n=0;if(i<pm){n=mm(t,r,a,e),ym(t,r,a,r+n,e);return}var o=new JT(t,e),s=KT(i);do{if(n=mm(t,r,a,e),n<s){var l=i;l>s&&(l=s),ym(t,r,r+l,r+n,e),n=l}o.pushRun(r,n),o.mergeRuns(),i-=n,r+=n}while(i!==0);o.forceMergeRuns()}}function _m(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var pf=function(){this._roots=[],this._displayList=[],this._displayListLen=0};pf.prototype={constructor:pf,traverse:function(t,e){for(var r=0;r<this._roots.length;r++)this._roots[r].traverse(t,e)},getDisplayList:function(t,e){return e=e||!1,t&&this.updateDisplayList(e),this._displayList},updateDisplayList:function(t){this._displayListLen=0;for(var e=this._roots,r=this._displayList,a=0,i=e.length;a<i;a++)this._updateAndAddDisplayable(e[a],null,t);r.length=this._displayListLen,at.canvasSupported&&tl(r,_m)},_updateAndAddDisplayable:function(t,e,r){if(!(t.ignore&&!r)){t.beforeUpdate(),t.__dirty&&t.update(),t.afterUpdate();var a=t.clipPath;if(a){e?e=e.slice():e=[];for(var i=a,n=t;i;)i.parent=n,i.updateTransform(),e.push(i),n=i,i=i.clipPath}if(t.isGroup){for(var o=t._children,s=0;s<o.length;s++){var l=o[s];t.__dirty&&(l.__dirty=!0),this._updateAndAddDisplayable(l,e,r)}t.__dirty=!1}else t.__clipPaths=e,this._displayList[this._displayListLen++]=t}},addRoot:function(t){t.__storage!==this&&(t instanceof G&&t.addChildrenToStorage(this),this.addToStorage(t),this._roots.push(t))},delRoot:function(t){if(t==null){for(var e=0;e<this._roots.length;e++){var r=this._roots[e];r instanceof G&&r.delChildrenFromStorage(this)}this._roots=[],this._displayList=[],this._displayListLen=0;return}if(t instanceof Array){for(var e=0,a=t.length;e<a;e++)this.delRoot(t[e]);return}var i=ut(this._roots,t);i>=0&&(this.delFromStorage(t),this._roots.splice(i,1),t instanceof G&&t.delChildrenFromStorage(this))},addToStorage:function(t){return t&&(t.__storage=this,t.dirty(!1)),this},delFromStorage:function(t){return t&&(t.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:_m};var jT={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1},mf=function(t,e,r){return jT.hasOwnProperty(e)?r*=t.dpr:r},ia={NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},yf=9,el=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],na=function(t){this.extendFrom(t,!1)};function tC(t,e,r){var a=e.x==null?0:e.x,i=e.x2==null?1:e.x2,n=e.y==null?0:e.y,o=e.y2==null?0:e.y2;e.global||(a=a*r.width+r.x,i=i*r.width+r.x,n=n*r.height+r.y,o=o*r.height+r.y),a=isNaN(a)?0:a,i=isNaN(i)?1:i,n=isNaN(n)?0:n,o=isNaN(o)?0:o;var s=t.createLinearGradient(a,n,i,o);return s}function eC(t,e,r){var a=r.width,i=r.height,n=Math.min(a,i),o=e.x==null?.5:e.x,s=e.y==null?.5:e.y,l=e.r==null?.5:e.r;e.global||(o=o*a+r.x,s=s*i+r.y,l=l*n);var u=t.createRadialGradient(o,s,0,o,s,l);return u}na.prototype={constructor:na,fill:"#000",stroke:null,opacity:1,fillOpacity:null,strokeOpacity:null,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,text:null,font:null,textFont:null,fontStyle:null,fontWeight:null,fontSize:null,fontFamily:null,textTag:null,textFill:"#000",textStroke:null,textWidth:null,textHeight:null,textStrokeWidth:0,textLineHeight:null,textPosition:"inside",textRect:null,textOffset:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowColor:"transparent",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,textBoxShadowColor:"transparent",textBoxShadowBlur:0,textBoxShadowOffsetX:0,textBoxShadowOffsetY:0,transformText:!1,textRotation:0,textOrigin:null,textBackgroundColor:null,textBorderColor:null,textBorderWidth:0,textBorderRadius:0,textPadding:null,rich:null,truncate:null,blend:null,bind:function(t,e,r){var a=this,i=r&&r.style,n=!i||t.__attrCachedBy!==ia.STYLE_BIND;t.__attrCachedBy=ia.STYLE_BIND;for(var o=0;o<el.length;o++){var s=el[o],l=s[0];(n||a[l]!==i[l])&&(t[l]=mf(t,l,a[l]||s[1]))}if((n||a.fill!==i.fill)&&(t.fillStyle=a.fill),(n||a.stroke!==i.stroke)&&(t.strokeStyle=a.stroke),(n||a.opacity!==i.opacity)&&(t.globalAlpha=a.opacity==null?1:a.opacity),(n||a.blend!==i.blend)&&(t.globalCompositeOperation=a.blend||"source-over"),this.hasStroke()){var u=a.lineWidth;t.lineWidth=u/(this.strokeNoScale&&e&&e.getLineScale?e.getLineScale():1)}},hasFill:function(){var t=this.fill;return t!=null&&t!=="none"},hasStroke:function(){var t=this.stroke;return t!=null&&t!=="none"&&this.lineWidth>0},extendFrom:function(t,e){if(t)for(var r in t)t.hasOwnProperty(r)&&(e===!0||(e===!1?!this.hasOwnProperty(r):t[r]!=null))&&(this[r]=t[r])},set:function(t,e){typeof t=="string"?this[t]=e:this.extendFrom(t,!0)},clone:function(){var t=new this.constructor;return t.extendFrom(this,!0),t},getGradient:function(t,e,r){for(var a=e.type==="radial"?eC:tC,i=a(t,e,r),n=e.colorStops,o=0;o<n.length;o++)i.addColorStop(n[o].offset,n[o].color);return i}};for(var _f=na.prototype,xf=0;xf<el.length;xf++){var wf=el[xf];wf[0]in _f||(_f[wf[0]]=wf[1])}na.getGradient=_f.getGradient;var bf=function(t,e){this.image=t,this.repeat=e,this.type="pattern"};bf.prototype.getCanvasPattern=function(t){return t.createPattern(this.image,this.repeat||"repeat")};function rC(){return!1}function xm(t,e,r){var a=Ri(),i=e.getWidth(),n=e.getHeight(),o=a.style;return o&&(o.position="absolute",o.left=0,o.top=0,o.width=i+"px",o.height=n+"px",a.setAttribute("data-zr-dom-id",t)),a.width=i*r,a.height=n*r,a}var io=function(t,e,r){var a;r=r||qs,typeof t=="string"?a=xm(t,e,r):Q(t)&&(a=t,t=a.id),this.id=t,this.dom=a;var i=a.style;i&&(a.onselectstart=rC,i["-webkit-user-select"]="none",i["user-select"]="none",i["-webkit-touch-callout"]="none",i["-webkit-tap-highlight-color"]="rgba(0,0,0,0)",i.padding=0,i.margin=0,i["border-width"]=0),this.domBack=null,this.ctxBack=null,this.painter=e,this.config=null,this.clearColor=0,this.motionBlur=!1,this.lastFrameAlpha=.7,this.dpr=r};io.prototype={constructor:io,__dirty:!0,__used:!1,__drawIndex:0,__startIndex:0,__endIndex:0,incremental:!1,getElementCount:function(){return this.__endIndex-this.__startIndex},initContext:function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},createBackBuffer:function(){var t=this.dpr;this.domBack=xm("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),t!==1&&this.ctxBack.scale(t,t)},resize:function(t,e){var r=this.dpr,a=this.dom,i=a.style,n=this.domBack;i&&(i.width=t+"px",i.height=e+"px"),a.width=t*r,a.height=e*r,n&&(n.width=t*r,n.height=e*r,r!==1&&this.ctxBack.scale(r,r))},clear:function(t,o){var r=this.dom,a=this.ctx,i=r.width,n=r.height,o=o||this.clearColor,s=this.motionBlur&&!t,l=this.lastFrameAlpha,u=this.dpr;if(s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(r,0,0,i/u,n/u)),a.clearRect(0,0,i,n),o&&o!=="transparent"){var h;o.colorStops?(h=o.__canvasGradient||na.getGradient(a,o,{x:0,y:0,width:i,height:n}),o.__canvasGradient=h):o.image&&(h=bf.prototype.getCanvasPattern.call(o,a)),a.save(),a.fillStyle=h||o,a.fillRect(0,0,i,n),a.restore()}if(s){var f=this.domBack;a.save(),a.globalAlpha=l,a.drawImage(f,0,0,i,n),a.restore()}}};var Sf=typeof window<"u"&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){setTimeout(t,16)},Af=new rf(50);function aC(t){if(typeof t=="string"){var e=Af.get(t);return e&&e.image}else return t}function wm(t,e,r,a,i){if(t)if(typeof t=="string"){if(e&&e.__zrImageSrc===t||!r)return e;var n=Af.get(t),o={hostEl:r,cb:a,cbPayload:i};return n?(e=n.image,!rl(e)&&n.pending.push(o)):(e=new Image,e.onload=e.onerror=iC,Af.put(t,e.__cachedImgObj={image:e,pending:[o]}),e.src=e.__zrImageSrc=t),e}else return t;else return e}function iC(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e<t.pending.length;e++){var r=t.pending[e],a=r.cb;a&&a(this,r.cbPayload),r.hostEl.dirty()}t.pending.length=0}function rl(t){return t&&t.width&&t.height}var al={},Tf=0,nC=5e3,Cf=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,il="12px sans-serif",Df={};function oC(t,e){Df[t]=e}function Oe(t,e){e=e||il;var r=t+":"+e;if(al[r])return al[r];for(var a=(t+"").split(`
`),i=0,n=0,o=a.length;n<o;n++)i=Math.max(hC(a[n],e).width,i);return Tf>nC&&(Tf=0,al={}),Tf++,al[r]=i,i}function cr(t,e,r,a,i,n,o,s){return o?lC(t,e,r,a,i,n,o,s):sC(t,e,r,a,i,n,s)}function sC(t,e,r,a,i,n,o){var s=Lf(t,e,i,n,o),l=Oe(t,e);i&&(l+=i[1]+i[3]);var u=s.outerHeight,h=no(0,l,r),f=Zi(0,u,a),c=new it(h,f,l,u);return c.lineHeight=s.lineHeight,c}function lC(t,e,r,a,i,n,o,s){var l=Pf(t,{rich:o,truncate:s,font:e,textAlign:r,textPadding:i,textLineHeight:n}),u=l.outerWidth,h=l.outerHeight,f=no(0,u,r),c=Zi(0,h,a);return new it(f,c,u,h)}function no(t,e,r){return r==="right"?t-=e:r==="center"&&(t-=e/2),t}function Zi(t,e,r){return r==="middle"?t-=e/2:r==="bottom"&&(t-=e),t}function If(t,e,r){var a=e.textPosition,i=e.textDistance,n=r.x,o=r.y;i=i||0;var s=r.height,l=r.width,u=s/2,h="left",f="top";switch(a){case"left":n-=i,o+=u,h="right",f="middle";break;case"right":n+=i+l,o+=u,f="middle";break;case"top":n+=l/2,o-=i,h="center",f="bottom";break;case"bottom":n+=l/2,o+=s+i,h="center";break;case"inside":n+=l/2,o+=u,h="center",f="middle";break;case"insideLeft":n+=i,o+=u,f="middle";break;case"insideRight":n+=l-i,o+=u,h="right",f="middle";break;case"insideTop":n+=l/2,o+=i,h="center";break;case"insideBottom":n+=l/2,o+=s-i,h="center",f="bottom";break;case"insideTopLeft":n+=i,o+=i;break;case"insideTopRight":n+=l-i,o+=i,h="right";break;case"insideBottomLeft":n+=i,o+=s-i,f="bottom";break;case"insideBottomRight":n+=l-i,o+=s-i,h="right",f="bottom";break}return t=t||{},t.x=n,t.y=o,t.textAlign=h,t.textVerticalAlign=f,t}function Mf(t,e,r,a,i){if(!e)return"";var n=(t+"").split(`
`);i=bm(e,r,a,i);for(var o=0,s=n.length;o<s;o++)n[o]=Sm(n[o],i);return n.join(`
`)}function bm(t,e,i,a){a=Z({},a),a.font=e;var i=Nt(i,"...");a.maxIterations=Nt(a.maxIterations,2);var n=a.minChar=Nt(a.minChar,0);a.cnCharWidth=Oe("\u56FD",e);var o=a.ascCharWidth=Oe("a",e);a.placeholder=Nt(a.placeholder,"");for(var s=t=Math.max(0,t-1),l=0;l<n&&s>=o;l++)s-=o;var u=Oe(i,e);return u>s&&(i="",u=0),s=t-u,a.ellipsis=i,a.ellipsisWidth=u,a.contentWidth=s,a.containerWidth=t,a}function Sm(t,e){var r=e.containerWidth,a=e.font,i=e.contentWidth;if(!r)return"";var n=Oe(t,a);if(n<=r)return t;for(var o=0;;o++){if(n<=i||o>=e.maxIterations){t+=e.ellipsis;break}var s=o===0?uC(t,i,e.ascCharWidth,e.cnCharWidth):n>0?Math.floor(t.length*i/n):0;t=t.substr(0,s),n=Oe(t,a)}return t===""&&(t=e.placeholder),t}function uC(t,e,r,a){for(var i=0,n=0,o=t.length;n<o&&i<e;n++){var s=t.charCodeAt(n);i+=0<=s&&s<=127?r:a}return n}function Am(t){return Oe("\u56FD",t)}function hC(t,e){return Df.measureText(t,e)}Df.measureText=function(t,e){var r=kp();return r.font=e||il,r.measureText(t)};function Lf(t,e,r,a,i){t!=null&&(t+="");var n=Nt(a,Am(e)),o=t?t.split(`
`):[],s=o.length*n,l=s,u=!0;if(r&&(l+=r[0]+r[2]),t&&i){u=!1;var h=i.outerHeight,f=i.outerWidth;if(h!=null&&l>h)t="",o=[];else if(f!=null)for(var c=bm(f-(r?r[1]+r[3]:0),e,i.ellipsis,{minChar:i.minChar,placeholder:i.placeholder}),v=0,d=o.length;v<d;v++)o[v]=Sm(o[v],c)}return{lines:o,height:s,outerHeight:l,lineHeight:n,canCacheByTextString:u}}function Pf(t,e){var r={lines:[],width:0,height:0};if(t!=null&&(t+=""),!t)return r;for(var a=Cf.lastIndex=0,i;(i=Cf.exec(t))!=null;){var n=i.index;n>a&&Ef(r,t.substring(a,n)),Ef(r,i[2],i[1]),a=Cf.lastIndex}a<t.length&&Ef(r,t.substring(a,t.length));var o=r.lines,s=0,l=0,u=[],h=e.textPadding,f=e.truncate,c=f&&f.outerWidth,v=f&&f.outerHeight;h&&(c!=null&&(c-=h[1]+h[3]),v!=null&&(v-=h[0]+h[2]));for(var d=0;d<o.length;d++){for(var g=o[d],p=0,m=0,y=0;y<g.tokens.length;y++){var _=g.tokens[y],x=_.styleName&&e.rich[_.styleName]||{},w=_.textPadding=x.textPadding,S=_.font=x.font||e.font,b=_.textHeight=Nt(x.textHeight,Am(S));if(w&&(b+=w[0]+w[2]),_.height=b,_.lineHeight=Ba(x.textLineHeight,e.textLineHeight,b),_.textAlign=x&&x.textAlign||e.textAlign,_.textVerticalAlign=x&&x.textVerticalAlign||"middle",v!=null&&s+_.lineHeight>v)return{lines:[],width:0,height:0};_.textWidth=Oe(_.text,S);var A=x.textWidth,C=A==null||A==="auto";if(typeof A=="string"&&A.charAt(A.length-1)==="%")_.percentWidth=A,u.push(_),A=0;else{if(C){A=_.textWidth;var D=x.textBackgroundColor,I=D&&D.image;I&&(I=aC(I),rl(I)&&(A=Math.max(A,I.width*b/I.height)))}var L=w?w[1]+w[3]:0;A+=L;var M=c!=null?c-m:null;M!=null&&M<A&&(!C||M<L?(_.text="",_.textWidth=A=0):(_.text=Mf(_.text,M-L,S,f.ellipsis,{minChar:f.minChar}),_.textWidth=Oe(_.text,S),A=_.textWidth+L))}m+=_.width=A,x&&(p=Math.max(p,_.lineHeight))}g.width=m,g.lineHeight=p,s+=p,l=Math.max(l,m)}r.outerWidth=r.width=Nt(e.textWidth,l),r.outerHeight=r.height=Nt(e.textHeight,s),h&&(r.outerWidth+=h[1]+h[3],r.outerHeight+=h[0]+h[2]);for(var d=0;d<u.length;d++){var _=u[d],B=_.percentWidth;_.width=parseInt(B,10)/100*l}return r}function Ef(t,e,r){for(var a=e==="",i=e.split(`
`),n=t.lines,o=0;o<i.length;o++){var s=i[o],l={styleName:r,text:s,isLineHolder:!s&&!a};if(o)n.push({tokens:[l]});else{var u=(n[n.length-1]||(n[0]={tokens:[]})).tokens,h=u.length;h===1&&u[0].isLineHolder?u[0]=l:(s||!h||a)&&u.push(l)}}}function Tm(t){var e=(t.fontSize||t.fontFamily)&&[t.fontStyle,t.fontWeight,(t.fontSize||12)+"px",t.fontFamily||"sans-serif"].join(" ");return e&&Ne(e)||t.textFont||t.font}function Cm(t,e){var r=e.x,a=e.y,i=e.width,n=e.height,o=e.r,s,l,u,h;i<0&&(r=r+i,i=-i),n<0&&(a=a+n,n=-n),typeof o=="number"?s=l=u=h=o:o instanceof Array?o.length===1?s=l=u=h=o[0]:o.length===2?(s=u=o[0],l=h=o[1]):o.length===3?(s=o[0],l=h=o[1],u=o[2]):(s=o[0],l=o[1],u=o[2],h=o[3]):s=l=u=h=0;var f;s+l>i&&(f=s+l,s*=i/f,l*=i/f),u+h>i&&(f=u+h,u*=i/f,h*=i/f),l+u>n&&(f=l+u,l*=n/f,u*=n/f),s+h>n&&(f=s+h,s*=n/f,h*=n/f),t.moveTo(r+s,a),t.lineTo(r+i-l,a),l!==0&&t.arc(r+i-l,a+l,l,-Math.PI/2,0),t.lineTo(r+i,a+n-u),u!==0&&t.arc(r+i-u,a+n-u,u,0,Math.PI/2),t.lineTo(r+h,a+n),h!==0&&t.arc(r+h,a+n-h,h,Math.PI/2,Math.PI),t.lineTo(r,a+s),s!==0&&t.arc(r+s,a+s,s,Math.PI,Math.PI*1.5)}var Rf=il,fC={left:1,right:1,center:1},cC={top:1,bottom:1,middle:1},Dm=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]],Im={},Mm={};function oo(t){return Lm(t),T(t.rich,Lm),t}function Lm(t){if(t){t.font=Tm(t);var e=t.textAlign;e==="middle"&&(e="center"),t.textAlign=e==null||fC[e]?e:"left";var r=t.textVerticalAlign||t.textBaseline;r==="center"&&(r="middle"),t.textVerticalAlign=r==null||cC[r]?r:"top";var a=t.textPadding;a&&(t.textPadding=Bh(t.textPadding))}}function Pm(t,e,r,a,i,n){a.rich?dC(t,e,r,a,i,n):vC(t,e,r,a,i,n)}function vC(t,e,r,a,i,n){"use strict";var o=Nf(a),s,l=!1,u=e.__attrCachedBy===ia.PLAIN_TEXT;n!==yf?(n&&(s=n.style,l=!o&&u&&s),e.__attrCachedBy=o?ia.NONE:ia.PLAIN_TEXT):u&&(e.__attrCachedBy=ia.NONE);var h=a.font||Rf;(!l||h!==(s.font||Rf))&&(e.font=h);var f=t.__computedFont;t.__styleFont!==h&&(t.__styleFont=h,f=t.__computedFont=e.font);var c=a.textPadding,v=a.textLineHeight,d=t.__textCotentBlock;(!d||t.__dirtyText)&&(d=t.__textCotentBlock=Lf(r,f,c,v,a.truncate));var g=d.outerHeight,p=d.lines,m=d.lineHeight,y=zf(Mm,t,a,i),_=y.baseX,x=y.baseY,w=y.textAlign||"left",S=y.textVerticalAlign;Em(e,a,i,_,x);var b=Zi(x,g,S),A=_,C=b;if(o||c){var D=Oe(r,f),I=D;c&&(I+=c[1]+c[3]);var L=no(_,I,w);o&&Of(t,e,a,L,b,I,g),c&&(A=km(_,w,c),C+=c[0])}e.textAlign=w,e.textBaseline="middle",e.globalAlpha=a.opacity||1;for(var M=0;M<Dm.length;M++){var B=Dm[M],k=B[0],O=B[1],V=a[k];(!l||V!==s[k])&&(e[O]=mf(e,O,V||B[2]))}C+=m/2;var H=a.textStrokeWidth,W=l?s.textStrokeWidth:null,F=!l||H!==W,N=!l||F||a.textStroke!==s.textStroke,$=Bf(a.textStroke,H),et=Rm(a.textFill);if($&&(F&&(e.lineWidth=H),N&&(e.strokeStyle=$)),et&&(!l||a.textFill!==s.textFill)&&(e.fillStyle=et),p.length===1)$&&e.strokeText(p[0],A,C),et&&e.fillText(p[0],A,C);else for(var M=0;M<p.length;M++)$&&e.strokeText(p[M],A,C),et&&e.fillText(p[M],A,C),C+=m}function dC(t,e,r,a,i,n){n!==yf&&(e.__attrCachedBy=ia.NONE);var o=t.__textCotentBlock;(!o||t.__dirtyText)&&(o=t.__textCotentBlock=Pf(r,a)),gC(t,e,o,a,i)}function gC(t,e,r,a,i){var n=r.width,o=r.outerWidth,s=r.outerHeight,l=a.textPadding,u=zf(Mm,t,a,i),h=u.baseX,f=u.baseY,c=u.textAlign,v=u.textVerticalAlign;Em(e,a,i,h,f);var d=no(h,o,c),g=Zi(f,s,v),p=d,m=g;l&&(p+=l[3],m+=l[0]);var y=p+n;Nf(a)&&Of(t,e,a,d,g,o,s);for(var _=0;_<r.lines.length;_++){for(var x=r.lines[_],w=x.tokens,S=w.length,b=x.lineHeight,A=x.width,C=0,D=p,I=y,L=S-1,M;C<S&&(M=w[C],!M.textAlign||M.textAlign==="left");)kf(t,e,M,a,b,m,D,"left"),A-=M.width,D+=M.width,C++;for(;L>=0&&(M=w[L],M.textAlign==="right");)kf(t,e,M,a,b,m,I,"right"),A-=M.width,I-=M.width,L--;for(D+=(n-(D-p)-(y-I)-A)/2;C<=L;)M=w[C],kf(t,e,M,a,b,m,D+M.width/2,"center"),D+=M.width,C++;m+=b}}function Em(t,e,r,a,i){if(r&&e.textRotation){var n=e.textOrigin;n==="center"?(a=r.width/2+r.x,i=r.height/2+r.y):n&&(a=n[0]+r.x,i=n[1]+r.y),t.translate(a,i),t.rotate(-e.textRotation),t.translate(-a,-i)}}function kf(t,e,r,a,i,n,o,s){var l=a.rich[r.styleName]||{};l.text=r.text;var u=r.textVerticalAlign,h=n+i/2;u==="top"?h=n+r.height/2:u==="bottom"&&(h=n+i-r.height/2),!r.isLineHolder&&Nf(l)&&Of(t,e,l,s==="right"?o-r.width:s==="center"?o-r.width/2:o,h-r.height/2,r.width,r.height);var f=r.textPadding;f&&(o=km(o,s,f),h-=r.height/2-f[2]-r.textHeight/2),jt(e,"shadowBlur",Ba(l.textShadowBlur,a.textShadowBlur,0)),jt(e,"shadowColor",l.textShadowColor||a.textShadowColor||"transparent"),jt(e,"shadowOffsetX",Ba(l.textShadowOffsetX,a.textShadowOffsetX,0)),jt(e,"shadowOffsetY",Ba(l.textShadowOffsetY,a.textShadowOffsetY,0)),jt(e,"textAlign",s),jt(e,"textBaseline","middle"),jt(e,"font",r.font||Rf);var c=Bf(l.textStroke||a.textStroke,d),v=Rm(l.textFill||a.textFill),d=Nt(l.textStrokeWidth,a.textStrokeWidth);c&&(jt(e,"lineWidth",d),jt(e,"strokeStyle",c),e.strokeText(r.text,o,h)),v&&(jt(e,"fillStyle",v),e.fillText(r.text,o,h))}function Nf(t){return!!(t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor)}function Of(t,e,r,a,i,n,o){var s=r.textBackgroundColor,l=r.textBorderWidth,u=r.textBorderColor,h=_t(s);if(jt(e,"shadowBlur",r.textBoxShadowBlur||0),jt(e,"shadowColor",r.textBoxShadowColor||"transparent"),jt(e,"shadowOffsetX",r.textBoxShadowOffsetX||0),jt(e,"shadowOffsetY",r.textBoxShadowOffsetY||0),h||l&&u){e.beginPath();var f=r.textBorderRadius;f?Cm(e,{x:a,y:i,width:n,height:o,r:f}):e.rect(a,i,n,o),e.closePath()}if(h)if(jt(e,"fillStyle",s),r.fillOpacity!=null){var c=e.globalAlpha;e.globalAlpha=r.fillOpacity*r.opacity,e.fill(),e.globalAlpha=c}else e.fill();else if(Q(s)){var v=s.image;v=wm(v,null,t,pC,s),v&&rl(v)&&e.drawImage(v,a,i,n,o)}if(l&&u)if(jt(e,"lineWidth",l),jt(e,"strokeStyle",u),r.strokeOpacity!=null){var c=e.globalAlpha;e.globalAlpha=r.strokeOpacity*r.opacity,e.stroke(),e.globalAlpha=c}else e.stroke()}function pC(t,e){e.image=t}function zf(t,e,r,a){var i=r.x||0,n=r.y||0,o=r.textAlign,s=r.textVerticalAlign;if(a){var l=r.textPosition;if(l instanceof Array)i=a.x+Vf(l[0],a.width),n=a.y+Vf(l[1],a.height);else{var u=e&&e.calculateTextPosition?e.calculateTextPosition(Im,r,a):If(Im,r,a);i=u.x,n=u.y,o=o||u.textAlign,s=s||u.textVerticalAlign}var h=r.textOffset;h&&(i+=h[0],n+=h[1])}return t=t||{},t.baseX=i,t.baseY=n,t.textAlign=o,t.textVerticalAlign=s,t}function jt(t,e,r){return t[e]=mf(t,e,r),t[e]}function Bf(t,e){return t==null||e<=0||t==="transparent"||t==="none"?null:t.image||t.colorStops?"#000":t}function Rm(t){return t==null||t==="none"?null:t.image||t.colorStops?"#000":t}function Vf(t,e){return typeof t=="string"?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function km(t,e,r){return e==="right"?t-r[1]:e==="center"?t+r[3]/2-r[1]/2:t+r[3]}function Gf(t,e){return t!=null&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)}var Hf=new it,nl=function(){};nl.prototype={constructor:nl,drawRectText:function(t,e){var r=this.style;e=r.textRect||e,this.__dirty&&oo(r,!0);var a=r.text;if(a!=null&&(a+=""),!!Gf(a,r)){t.save();var i=this.transform;r.transformText?this.setTransform(t):i&&(Hf.copy(e),Hf.applyTransform(i),e=Hf),Pm(this,t,a,r,e,yf),t.restore()}}};function ve(t){t=t||{},Br.call(this,t);for(var e in t)t.hasOwnProperty(e)&&e!=="style"&&(this[e]=t[e]);this.style=new na(t.style,this),this._rect=null,this.__clipPaths=null}ve.prototype={constructor:ve,type:"displayable",__dirty:!0,invisible:!1,z:0,z2:0,zlevel:0,draggable:!1,dragging:!1,silent:!1,culling:!1,cursor:"pointer",rectHover:!1,progressive:!1,incremental:!1,globalScaleRatio:1,beforeBrush:function(t){},afterBrush:function(t){},brush:function(t,e){},getBoundingRect:function(){},contain:function(t,e){return this.rectContain(t,e)},traverse:function(t,e){t.call(e,this)},rectContain:function(t,e){var r=this.transformCoordToLocal(t,e),a=this.getBoundingRect();return a.contain(r[0],r[1])},dirty:function(){this.__dirty=this.__dirtyText=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(t){return this.animate("style",t)},attrKV:function(t,e){t!=="style"?Br.prototype.attrKV.call(this,t,e):this.style.set(e)},setStyle:function(t,e){return this.style.set(t,e),this.dirty(!1),this},useStyle:function(t){return this.style=new na(t,this),this.dirty(!1),this},calculateTextPosition:null},yt(ve,Br),pt(ve,nl);function Qt(t){ve.call(this,t)}Qt.prototype={constructor:Qt,type:"image",brush:function(t,e){var r=this.style,a=r.image;r.bind(t,this,e);var i=this._image=wm(a,this._image,this,this.onload);if(!(!i||!rl(i))){var n=r.x||0,o=r.y||0,s=r.width,l=r.height,u=i.width/i.height;if(s==null&&l!=null?s=l*u:l==null&&s!=null?l=s/u:s==null&&l==null&&(s=i.width,l=i.height),this.setTransform(t),r.sWidth&&r.sHeight){var h=r.sx||0,f=r.sy||0;t.drawImage(i,h,f,r.sWidth,r.sHeight,n,o,s,l)}else if(r.sx&&r.sy){var h=r.sx,f=r.sy,c=s-h,v=l-f;t.drawImage(i,h,f,c,v,n,o,s,l)}else t.drawImage(i,n,o,s,l);r.text!=null&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))}},getBoundingRect:function(){var t=this.style;return this._rect||(this._rect=new it(t.x||0,t.y||0,t.width||0,t.height||0)),this._rect}},yt(Qt,ve);var Nm=1e5,Fa=314159,ol=.01,mC=.001;function sl(t){return parseInt(t,10)}function yC(t){return t?t.__builtin__?!0:!(typeof t.resize!="function"||typeof t.refresh!="function"):!1}var Ff=new it(0,0,0,0),Wf=new it(0,0,0,0);function _C(t,e,r){return Ff.copy(t.getBoundingRect()),t.transform&&Ff.applyTransform(t.transform),Wf.width=e,Wf.height=r,!Ff.intersect(Wf)}function xC(t,e){if(t===e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var r=0;r<t.length;r++)if(t[r]!==e[r])return!0;return!1}function wC(t,e){for(var r=0;r<t.length;r++){var a=t[r];a.setTransform(e),e.beginPath(),a.buildPath(e,a.shape),e.clip(),a.restoreTransform(e)}}function bC(t,e){var r=document.createElement("div");return r.style.cssText=["position:relative","width:"+t+"px","height:"+e+"px","padding:0","margin:0","border-width:0"].join(";")+";",r}var Uf=function(t,e,r){this.type="canvas";var a=!t.nodeName||t.nodeName.toUpperCase()==="CANVAS";this._opts=r=Z({},r||{}),this.dpr=r.devicePixelRatio||qs,this._singleCanvas=a,this.root=t;var i=t.style;i&&(i["-webkit-tap-highlight-color"]="transparent",i["-webkit-user-select"]=i["user-select"]=i["-webkit-touch-callout"]="none",t.innerHTML=""),this.storage=e;var n=this._zlevelList=[],o=this._layers={};if(this._layerConfig={},this._needsManuallyCompositing=!1,a){var l=t.width,u=t.height;r.width!=null&&(l=r.width),r.height!=null&&(u=r.height),this.dpr=r.devicePixelRatio||1,t.width=l*this.dpr,t.height=u*this.dpr,this._width=l,this._height=u;var h=new io(t,this,this.dpr);h.__builtin__=!0,h.initContext(),o[Fa]=h,h.zlevel=Fa,n.push(Fa),this._domRoot=t}else{this._width=this._getSize(0),this._height=this._getSize(1);var s=this._domRoot=bC(this._width,this._height);t.appendChild(s)}this._hoverlayer=null,this._hoverElements=[]};Uf.prototype={constructor:Uf,getType:function(){return"canvas"},isSingleCanvas:function(){return this._singleCanvas},getViewportRoot:function(){return this._domRoot},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(t){var e=this.storage.getDisplayList(!0),r=this._zlevelList;this._redrawId=Math.random(),this._paintList(e,t,this._redrawId);for(var a=0;a<r.length;a++){var i=r[a],n=this._layers[i];if(!n.__builtin__&&n.refresh){var o=a===0?this._backgroundColor:null;n.refresh(o)}}return this.refreshHover(),this},addHover:function(t,e){if(!t.__hoverMir){var r=new t.constructor({style:t.style,shape:t.shape,z:t.z,z2:t.z2,silent:t.silent});return r.__from=t,t.__hoverMir=r,e&&r.setStyle(e),this._hoverElements.push(r),r}},removeHover:function(t){var e=t.__hoverMir,r=this._hoverElements,a=ut(r,e);a>=0&&r.splice(a,1),t.__hoverMir=null},clearHover:function(t){for(var e=this._hoverElements,r=0;r<e.length;r++){var a=e[r].__from;a&&(a.__hoverMir=null)}e.length=0},refreshHover:function(){var t=this._hoverElements,e=t.length,r=this._hoverlayer;if(r&&r.clear(),!!e){tl(t,this.storage.displayableSortFunc),r||(r=this._hoverlayer=this.getLayer(Nm));var a={};r.ctx.save();for(var i=0;i<e;){var n=t[i],o=n.__from;if(!(o&&o.__zr)){t.splice(i,1),o.__hoverMir=null,e--;continue}i++,o.invisible||(n.transform=o.transform,n.invTransform=o.invTransform,n.__clipPaths=o.__clipPaths,this._doPaintEl(n,r,!0,a))}r.ctx.restore()}},getHoverLayer:function(){return this.getLayer(Nm)},_paintList:function(t,e,r){if(this._redrawId===r){e=e||!1,this._updateLayerStatus(t);var a=this._doPaintList(t,e);if(this._needsManuallyCompositing&&this._compositeManually(),!a){var i=this;Sf(function(){i._paintList(t,e,r)})}}},_compositeManually:function(){var t=this.getLayer(Fa).ctx,e=this._domRoot.width,r=this._domRoot.height;t.clearRect(0,0,e,r),this.eachBuiltinLayer(function(a){a.virtual&&t.drawImage(a.dom,0,0,e,r)})},_doPaintList:function(t,e){for(var r=[],a=0;a<this._zlevelList.length;a++){var i=this._zlevelList[a],n=this._layers[i];n.__builtin__&&n!==this._hoverlayer&&(n.__dirty||e)&&r.push(n)}for(var o=!0,s=0;s<r.length;s++){var n=r[s],l=n.ctx,u={};l.save();var h=e?n.__startIndex:n.__drawIndex,f=!e&&n.incremental&&Date.now,c=f&&Date.now(),v=n.zlevel===this._zlevelList[0]?this._backgroundColor:null;if(n.__startIndex===n.__endIndex)n.clear(!1,v);else if(h===n.__startIndex){var d=t[h];(!d.incremental||!d.notClear||e)&&n.clear(!1,v)}h===-1&&(console.error("For some unknown reason. drawIndex is -1"),h=n.__startIndex);for(var g=h;g<n.__endIndex;g++){var p=t[g];if(this._doPaintEl(p,n,e,u),p.__dirty=p.__dirtyText=!1,f){var m=Date.now()-c;if(m>15)break}}n.__drawIndex=g,n.__drawIndex<n.__endIndex&&(o=!1),u.prevElClipPaths&&l.restore(),l.restore()}return at.wxa&&T(this._layers,function(y){y&&y.ctx&&y.ctx.draw&&y.ctx.draw()}),o},_doPaintEl:function(t,e,r,a){var i=e.ctx,n=t.transform;if((e.__dirty||r)&&!t.invisible&&t.style.opacity!==0&&!(n&&!n[0]&&!n[3])&&!(t.culling&&_C(t,this._width,this._height))){var o=t.__clipPaths,s=a.prevElClipPaths;(!s||xC(o,s))&&(s&&(i.restore(),a.prevElClipPaths=null,a.prevEl=null),o&&(i.save(),wC(o,i),a.prevElClipPaths=o)),t.beforeBrush&&t.beforeBrush(i),t.brush(i,a.prevEl||null),a.prevEl=t,t.afterBrush&&t.afterBrush(i)}},getLayer:function(t,e){this._singleCanvas&&!this._needsManuallyCompositing&&(t=Fa);var r=this._layers[t];return r||(r=new io("zr_"+t,this,this.dpr),r.zlevel=t,r.__builtin__=!0,this._layerConfig[t]?J(r,this._layerConfig[t],!0):this._layerConfig[t-ol]&&J(r,this._layerConfig[t-ol],!0),e&&(r.virtual=e),this.insertLayer(t,r),r.initContext()),r},insertLayer:function(t,e){var r=this._layers,a=this._zlevelList,i=a.length,n=null,o=-1,s=this._domRoot;if(r[t]){aa("ZLevel "+t+" has been used already");return}if(!yC(e)){aa("Layer of zlevel "+t+" is not valid");return}if(i>0&&t>a[0]){for(o=0;o<i-1&&!(a[o]<t&&a[o+1]>t);o++);n=r[a[o]]}if(a.splice(o+1,0,t),r[t]=e,!e.virtual)if(n){var l=n.dom;l.nextSibling?s.insertBefore(e.dom,l.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom)},eachLayer:function(t,e){var r=this._zlevelList,a,i;for(i=0;i<r.length;i++)a=r[i],t.call(e,this._layers[a],a)},eachBuiltinLayer:function(t,e){var r=this._zlevelList,a,i,n;for(n=0;n<r.length;n++)i=r[n],a=this._layers[i],a.__builtin__&&t.call(e,a,i)},eachOtherLayer:function(t,e){var r=this._zlevelList,a,i,n;for(n=0;n<r.length;n++)i=r[n],a=this._layers[i],a.__builtin__||t.call(e,a,i)},getLayers:function(){return this._layers},_updateLayerStatus:function(t){this.eachBuiltinLayer(function(u,h){u.__dirty=u.__used=!1});function e(u){i&&(i.__endIndex!==u&&(i.__dirty=!0),i.__endIndex=u)}if(this._singleCanvas)for(var r=1;r<t.length;r++){var a=t[r];if(a.zlevel!==t[r-1].zlevel||a.incremental){this._needsManuallyCompositing=!0;break}}for(var i=null,n=0,o,r=0;r<t.length;r++){var a=t[r],s=a.zlevel,l;o!==s&&(o=s,n=0),a.incremental?(l=this.getLayer(s+mC,this._needsManuallyCompositing),l.incremental=!0,n=1):l=this.getLayer(s+(n>0?ol:0),this._needsManuallyCompositing),l.__builtin__||aa("ZLevel "+s+" has been used by unkown layer "+l.id),l!==i&&(l.__used=!0,l.__startIndex!==r&&(l.__dirty=!0),l.__startIndex=r,l.incremental?l.__drawIndex=-1:l.__drawIndex=r,e(r),i=l),a.__dirty&&(l.__dirty=!0,l.incremental&&l.__drawIndex<0&&(l.__drawIndex=r))}e(r),this.eachBuiltinLayer(function(u,h){!u.__used&&u.getElementCount()>0&&(u.__dirty=!0,u.__startIndex=u.__endIndex=u.__drawIndex=0),u.__dirty&&u.__drawIndex<0&&(u.__drawIndex=u.__startIndex)})},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(t){t.clear()},setBackgroundColor:function(t){this._backgroundColor=t},configLayer:function(t,e){if(e){var r=this._layerConfig;r[t]?J(r[t],e,!0):r[t]=e;for(var a=0;a<this._zlevelList.length;a++){var i=this._zlevelList[a];if(i===t||i===t+ol){var n=this._layers[i];J(n,r[t],!0)}}}},delLayer:function(t){var e=this._layers,r=this._zlevelList,a=e[t];!a||(a.dom.parentNode.removeChild(a.dom),delete e[t],r.splice(ut(r,t),1))},resize:function(t,e){if(this._domRoot.style){var r=this._domRoot;r.style.display="none";var a=this._opts;if(t!=null&&(a.width=t),e!=null&&(a.height=e),t=this._getSize(0),e=this._getSize(1),r.style.display="",this._width!==t||e!==this._height){r.style.width=t+"px",r.style.height=e+"px";for(var i in this._layers)this._layers.hasOwnProperty(i)&&this._layers[i].resize(t,e);T(this._progressiveLayers,function(n){n.resize(t,e)}),this.refresh(!0)}this._width=t,this._height=e}else{if(t==null||e==null)return;this._width=t,this._height=e,this.getLayer(Fa).resize(t,e)}return this},clearLayer:function(t){var e=this._layers[t];e&&e.clear()},dispose:function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},getRenderedCanvas:function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._layers[Fa].dom;var e=new io("image",this,t.pixelRatio||this.dpr);if(e.initContext(),e.clear(!1,t.backgroundColor||this._backgroundColor),t.pixelRatio<=this.dpr){this.refresh();var r=e.dom.width,a=e.dom.height,i=e.ctx;this.eachLayer(function(u){u.__builtin__?i.drawImage(u.dom,0,0,r,a):u.renderToCanvas&&(e.ctx.save(),u.renderToCanvas(e.ctx),e.ctx.restore())})}else for(var n={},o=this.storage.getDisplayList(!0),s=0;s<o.length;s++){var l=o[s];this._doPaintEl(l,e,!0,n)}return e.dom},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,r=["width","height"][t],a=["clientWidth","clientHeight"][t],i=["paddingLeft","paddingTop"][t],n=["paddingRight","paddingBottom"][t];if(e[r]!=null&&e[r]!=="auto")return parseFloat(e[r]);var o=this.root,s=document.defaultView.getComputedStyle(o);return(o[a]||sl(s[r])||sl(o.style[r]))-(sl(s[i])||0)-(sl(s[n])||0)|0},pathToImage:function(t,e){e=e||this.dpr;var r=document.createElement("canvas"),a=r.getContext("2d"),i=t.getBoundingRect(),n=t.style,o=n.shadowBlur*e,s=n.shadowOffsetX*e,l=n.shadowOffsetY*e,u=n.hasStroke()?n.lineWidth:0,h=Math.max(u/2,-s+o),f=Math.max(u/2,s+o),c=Math.max(u/2,-l+o),v=Math.max(u/2,l+o),d=i.width+h+f,g=i.height+c+v;r.width=d*e,r.height=g*e,a.scale(e,e),a.clearRect(0,0,d,g),a.dpr=e;var p={position:t.position,rotation:t.rotation,scale:t.scale};t.position=[h-i.x,c-i.y],t.rotation=0,t.scale=[1,1],t.updateTransform(),t&&t.brush(a);var m=Qt,y=new m({style:{x:0,y:0,image:r}});return p.position!=null&&(y.position=t.position=p.position),p.rotation!=null&&(y.rotation=t.rotation=p.rotation),p.scale!=null&&(y.scale=t.scale=p.scale),y}};var ll=function(t){t=t||{},this.stage=t.stage||{},this.onframe=t.onframe||function(){},this._clips=[],this._running=!1,this._time,this._pausedTime,this._pauseStart,this._paused=!1,Zt.call(this)};ll.prototype={constructor:ll,addClip:function(t){this._clips.push(t)},addAnimator:function(t){t.animation=this;for(var e=t.getClips(),r=0;r<e.length;r++)this.addClip(e[r])},removeClip:function(t){var e=ut(this._clips,t);e>=0&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),r=0;r<e.length;r++)this.removeClip(e[r]);t.animation=null},_update:function(){for(var t=new Date().getTime()-this._pausedTime,e=t-this._time,r=this._clips,a=r.length,i=[],n=[],o=0;o<a;o++){var s=r[o],l=s.step(t,e);l&&(i.push(l),n.push(s))}for(var o=0;o<a;)r[o]._needsRemove?(r[o]=r[a-1],r.pop(),a--):o++;a=i.length;for(var o=0;o<a;o++)n[o].fire(i[o]);this._time=t,this.onframe(e),this.trigger("frame",e),this.stage.update&&this.stage.update()},_startLoop:function(){var t=this;this._running=!0;function e(){t._running&&(Sf(e),!t._paused&&t._update())}Sf(e)},start:function(){this._time=new Date().getTime(),this._pausedTime=0,this._startLoop()},stop:function(){this._running=!1},pause:function(){this._paused||(this._pauseStart=new Date().getTime(),this._paused=!0)},resume:function(){this._paused&&(this._pausedTime+=new Date().getTime()-this._pauseStart,this._paused=!1)},clear:function(){this._clips=[]},isFinished:function(){return!this._clips.length},animate:function(t,e){e=e||{};var r=new vf(t,e.loop,e.getter,e.setter);return this.addAnimator(r),r}},pt(ll,Zt);var SC=300,$f=at.domSupported,Zf=function(){var t=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],r={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},a=E(t,function(i){var n=i.replace("mouse","pointer");return r.hasOwnProperty(n)?n:i});return{mouse:t,touch:e,pointer:a}}(),Om={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]};function zm(t){return t==="mousewheel"&&at.browser.firefox?"DOMMouseScroll":t}function Yf(t){var e=t.pointerType;return e==="pen"||e==="touch"}function AC(t){t.touching=!0,t.touchTimer!=null&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout(function(){t.touching=!1,t.touchTimer=null},700)}function Xf(t){t&&(t.zrByTouch=!0)}function TC(t,e){return fr(t.dom,new Vm(t,e),!0)}function Bm(t,e){for(var r=e,a=!1;r&&r.nodeType!==9&&!(a=r.domBelongToZr||r!==e&&r===t.painterRoot);)r=r.parentNode;return a}function Vm(t,e){this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY}var qf=Vm.prototype;qf.stopPropagation=qf.stopImmediatePropagation=qf.preventDefault=Kt;var ar={mousedown:function(t){t=fr(this.dom,t),this._mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=fr(this.dom,t);var e=this._mayPointerCapture;e&&(t.zrX!==e[0]||t.zrY!==e[1])&&Jf(this,!0),this.trigger("mousemove",t)},mouseup:function(t){t=fr(this.dom,t),Jf(this,!1),this.trigger("mouseup",t)},mouseout:function(t){t=fr(this.dom,t),this._pointerCapturing&&(t.zrEventControl="no_globalout");var e=t.toElement||t.relatedTarget;t.zrIsToLocalDOM=Bm(this,e),this.trigger("mouseout",t)},touchstart:function(t){t=fr(this.dom,t),Xf(t),this._lastTouchMoment=new Date,this.handler.processGesture(t,"start"),ar.mousemove.call(this,t),ar.mousedown.call(this,t)},touchmove:function(t){t=fr(this.dom,t),Xf(t),this.handler.processGesture(t,"change"),ar.mousemove.call(this,t)},touchend:function(t){t=fr(this.dom,t),Xf(t),this.handler.processGesture(t,"end"),ar.mouseup.call(this,t),+new Date-this._lastTouchMoment<SC&&ar.click.call(this,t)},pointerdown:function(t){ar.mousedown.call(this,t)},pointermove:function(t){Yf(t)||ar.mousemove.call(this,t)},pointerup:function(t){ar.mouseup.call(this,t)},pointerout:function(t){Yf(t)||ar.mouseout.call(this,t)}};T(["click","mousewheel","dblclick","contextmenu"],function(t){ar[t]=function(e){e=fr(this.dom,e),this.trigger(t,e)}});var Kf={pointermove:function(t){Yf(t)||Kf.mousemove.call(this,t)},pointerup:function(t){Kf.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this._pointerCapturing;Jf(this,!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}};function CC(t,e){var r=e.domHandlers;at.pointerEventsSupported?T(Zf.pointer,function(a){ul(e,a,function(i){r[a].call(t,i)})}):(at.touchEventsSupported&&T(Zf.touch,function(a){ul(e,a,function(i){r[a].call(t,i),AC(e)})}),T(Zf.mouse,function(a){ul(e,a,function(i){i=qh(i),e.touching||r[a].call(t,i)})}))}function DC(t,e){at.pointerEventsSupported?T(Om.pointer,r):at.touchEventsSupported||T(Om.mouse,r);function r(a){function i(n){n=qh(n),Bm(t,n.target)||(n=TC(t,n),e.domHandlers[a].call(t,n))}ul(e,a,i,{capture:!0})}}function ul(t,e,r,a){t.mounted[e]=r,t.listenerOpts[e]=a,Kh(t.domTarget,zm(e),r,a)}function Qf(t){var e=t.mounted;for(var r in e)e.hasOwnProperty(r)&&LT(t.domTarget,zm(r),e[r],t.listenerOpts[r]);t.mounted={}}function Jf(t,e){if(t._mayPointerCapture=null,$f&&t._pointerCapturing^e){t._pointerCapturing=e;var r=t._globalHandlerScope;e?DC(t,r):Qf(r)}}function Gm(t,e){this.domTarget=t,this.domHandlers=e,this.mounted={},this.listenerOpts={},this.touchTimer=null,this.touching=!1}function jf(t,e){Zt.call(this),this.dom=t,this.painterRoot=e,this._localHandlerScope=new Gm(t,ar),$f&&(this._globalHandlerScope=new Gm(document,Kf)),this._pointerCapturing=!1,this._mayPointerCapture=null,CC(this,this._localHandlerScope)}var Hm=jf.prototype;Hm.dispose=function(){Qf(this._localHandlerScope),$f&&Qf(this._globalHandlerScope)},Hm.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},pt(jf,Zt);/*!
* ZRender, a high performance 2d drawing library.
*
* Copyright (c) 2013, Baidu Inc.
* All rights reserved.
*
* LICENSE
* https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
*/var IC=!at.canvasSupported,hl={canvas:Uf},Wa={},tc="4.3.1";function ec(t,e){var r=new ac(Lp(),t,e);return Wa[r.id]=r,r}function MC(t){if(t)t.dispose();else{for(var e in Wa)Wa.hasOwnProperty(e)&&Wa[e].dispose();Wa={}}return this}function LC(t){return Wa[t]}function rc(t,e){hl[t]=e}function PC(t){delete Wa[t]}var ac=function(t,e,r){r=r||{},this.dom=e,this.id=t;var a=this,i=new pf,n=r.renderer;if(IC){if(!hl.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");n="vml"}else(!n||!hl[n])&&(n="canvas");var o=new hl[n](e,i,r,t);this.storage=i,this.painter=o;var s=!at.node&&!at.worker?new jf(o.getViewportRoot(),o.root):null;this.handler=new Gi(i,o,s,o.root),this.animation=new ll({stage:{update:X(this.flush,this)}}),this.animation.start(),this._needsRefresh;var l=i.delFromStorage,u=i.addToStorage;i.delFromStorage=function(h){l.call(i,h),h&&h.removeSelfFromZr(a)},i.addToStorage=function(h){u.call(i,h),h.addSelfToZr(a)}};ac.prototype={constructor:ac,getId:function(){return this.id},add:function(t){this.storage.addRoot(t),this._needsRefresh=!0},remove:function(t){this.storage.delRoot(t),this._needsRefresh=!0},configLayer:function(t,e){this.painter.configLayer&&this.painter.configLayer(t,e),this._needsRefresh=!0},setBackgroundColor:function(t){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this._needsRefresh=!0},refreshImmediately:function(){this._needsRefresh=this._needsRefreshHover=!1,this.painter.refresh(),this._needsRefresh=this._needsRefreshHover=!1},refresh:function(){this._needsRefresh=!0},flush:function(){var t;this._needsRefresh&&(t=!0,this.refreshImmediately()),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately()),t&&this.trigger("rendered")},addHover:function(t,e){if(this.painter.addHover){var r=this.painter.addHover(t,e);return this.refreshHover(),r}},removeHover:function(t){this.painter.removeHover&&(this.painter.removeHover(t),this.refreshHover())},clearHover:function(){this.painter.clearHover&&(this.painter.clearHover(),this.refreshHover())},refreshHover:function(){this._needsRefreshHover=!0},refreshHoverImmediately:function(){this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.refreshHover()},resize:function(t){t=t||{},this.painter.resize(t.width,t.height),this.handler.resize()},clearAnimation:function(){this.animation.clear()},getWidth:function(){return this.painter.getWidth()},getHeight:function(){return this.painter.getHeight()},pathToImage:function(t,e){return this.painter.pathToImage(t,e)},setCursorStyle:function(t){this.handler.setCursorStyle(t)},findHover:function(t,e){return this.handler.findHover(t,e)},on:function(t,e,r){this.handler.on(t,e,r)},off:function(t,e){this.handler.off(t,e)},trigger:function(t,e){this.handler.trigger(t,e)},clear:function(){this.storage.delRoot(),this.painter.clear()},dispose:function(){this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,PC(this.id)}};var EC=(Object.freeze||Object)({version:tc,init:ec,dispose:MC,getInstance:LC,registerPainter:rc}),Yi=T,Xi=Q,RC=P,Fm="series\0";function te(t){return t instanceof Array?t:t==null?[]:[t]}function Ua(t,e,r){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var a=0,i=r.length;a<i;a++){var n=r[a];!t.emphasis[e].hasOwnProperty(n)&&t[e].hasOwnProperty(n)&&(t.emphasis[e][n]=t[e][n])}}}var Wm=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"];function so(t){return Xi(t)&&!RC(t)&&!(t instanceof Date)?t.value:t}function kC(t){return Xi(t)&&!(t instanceof Array)}function ic(t,e){e=(e||[]).slice();var r=E(t||[],function(a,i){return{exist:a}});return Yi(e,function(a,i){if(!!Xi(a)){for(var n=0;n<r.length;n++)if(!r[n].option&&a.id!=null&&r[n].exist.id===a.id+""){r[n].option=a,e[i]=null;return}for(var n=0;n<r.length;n++){var o=r[n].exist;if(!r[n].option&&(o.id==null||a.id==null)&&a.name!=null&&!fl(a)&&!fl(o)&&o.name===a.name+""){r[n].option=a,e[i]=null;return}}}}),Yi(e,function(a,i){if(!!Xi(a)){for(var n=0;n<r.length;n++){var o=r[n].exist;if(!r[n].option&&!fl(o)&&a.id==null){r[n].option=a;break}}n>=r.length&&r.push({option:a})}}),r}function Um(t){var e=j();Yi(t,function(r,a){var i=r.exist;i&&e.set(i.id,r)}),Yi(t,function(r,a){var i=r.option;ot(!i||i.id==null||!e.get(i.id)||e.get(i.id)===r,"id duplicates: "+(i&&i.id)),i&&i.id!=null&&e.set(i.id,r),!r.keyInfo&&(r.keyInfo={})}),Yi(t,function(r,a){var i=r.exist,n=r.option,o=r.keyInfo;if(!!Xi(n)){if(o.name=n.name!=null?n.name+"":i?i.name:Fm+a,i)o.id=i.id;else if(n.id!=null)o.id=n.id+"";else{var s=0;do o.id="\0"+o.name+"\0"+s++;while(e.get(o.id))}e.set(o.id,r)}})}function nc(t){var e=t.name;return!!(e&&e.indexOf(Fm))}function fl(t){return Xi(t)&&t.id&&(t.id+"").indexOf("\0_ec_\0")===0}function NC(t,e){var r={},a={};return i(t||[],r),i(e||[],a,r),[n(r),n(a)];function i(o,s,l){for(var u=0,h=o.length;u<h;u++)for(var f=o[u].seriesId,c=te(o[u].dataIndex),v=l&&l[f],d=0,g=c.length;d<g;d++){var p=c[d];v&&v[p]?v[p]=null:(s[f]||(s[f]={}))[p]=1}}function n(o,s){var l=[];for(var u in o)if(o.hasOwnProperty(u)&&o[u]!=null)if(s)l.push(+u);else{var h=n(o[u],!0);h.length&&l.push({seriesId:u,dataIndex:h})}return l}}function cl(t,e){if(e.dataIndexInside!=null)return e.dataIndexInside;if(e.dataIndex!=null)return P(e.dataIndex)?E(e.dataIndex,function(r){return t.indexOfRawIndex(r)}):t.indexOfRawIndex(e.dataIndex);if(e.name!=null)return P(e.name)?E(e.name,function(r){return t.indexOfName(r)}):t.indexOfName(e.name)}function de(){var t="__\0ec_inner_"+OC+++"_"+Math.random().toFixed(5);return function(e){return e[t]||(e[t]={})}}var OC=0;function vl(t,e,r){if(_t(e)){var a={};a[e+"Index"]=0,e=a}var i=r&&r.defaultMainType;i&&!oc(e,i+"Index")&&!oc(e,i+"Id")&&!oc(e,i+"Name")&&(e[i+"Index"]=0);var n={};return Yi(e,function(l,s){var l=e[s];if(s==="dataIndex"||s==="dataIndexInside"){n[s]=l;return}var u=s.match(/^(\w+)(Index|Id|Name)$/)||[],h=u[1],f=(u[2]||"").toLowerCase();if(!(!h||!f||l==null||f==="index"&&l==="none"||r&&r.includeMainTypes&&ut(r.includeMainTypes,h)<0)){var c={mainType:h};(f!=="index"||l!=="all")&&(c[f]=l);var v=t.queryComponents(c);n[h+"Models"]=v,n[h+"Model"]=v[0]}}),n}function oc(t,e){return t&&t.hasOwnProperty(e)}function $m(t,e,r){t.setAttribute?t.setAttribute(e,r):t[e]=r}function zC(t,e){return t.getAttribute?t.getAttribute(e):t[e]}function Zm(t){return t==="auto"?at.domSupported?"html":"richText":t||"html"}function sc(t,e){var r=j(),a=[];return T(t,function(i){var n=e(i);(r.get(n)||(a.push(n),r.set(n,[]))).push(i)}),{keys:a,buckets:r}}var BC=".",$a="___EC__COMPONENT__CONTAINER___";function oa(t){var e={main:"",sub:""};return t&&(t=t.split(BC),e.main=t[0]||"",e.sub=t[1]||""),e}function VC(t){ot(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}function lo(t,e){t.$constructor=t,t.extend=function(r){z&&T(e,function(n){r[n]||console.warn("Method `"+n+"` should be implemented"+(r.type?" in "+r.type:"")+".")});var a=this,i=function(){r.$constructor?r.$constructor.apply(this,arguments):a.apply(this,arguments)};return Z(i.prototype,r),i.extend=this.extend,i.superCall=HC,i.superApply=FC,yt(i,this),i.superClass=a,i}}var GC=0;function dl(t){var e=["__\0is_clz",GC++,Math.random().toFixed(3)].join("_");t.prototype[e]=!0,z&&ot(!t.isInstance,'The method "is" can not be defined.'),t.isInstance=function(r){return!!(r&&r[e])}}function HC(t,e){var r=Oi(arguments,2);return this.superClass.prototype[e].apply(t,r)}function FC(t,e,r){return this.superClass.prototype[e].apply(t,r)}function gl(t,e){e=e||{};var r={};t.registerClass=function(n,o){if(o){if(VC(o),o=oa(o),!o.sub)z&&r[o.main]&&console.warn(o.main+" exists."),r[o.main]=n;else if(o.sub!==$a){var s=a(o);s[o.sub]=n}}return n},t.getClass=function(n,o,s){var l=r[n];if(l&&l[$a]&&(l=o?l[o]:null),s&&!l)throw new Error(o?"Component "+n+"."+(o||"")+" not exists. Load it first.":n+".type should be specified.");return l},t.getClassesByMainType=function(n){n=oa(n);var o=[],s=r[n.main];return s&&s[$a]?T(s,function(l,u){u!==$a&&o.push(l)}):o.push(s),o},t.hasClass=function(n){return n=oa(n),!!r[n.main]},t.getAllClassMainTypes=function(){var n=[];return T(r,function(o,s){n.push(s)}),n},t.hasSubTypes=function(n){n=oa(n);var o=r[n.main];return o&&o[$a]},t.parseClassType=oa;function a(n){var o=r[n.main];return(!o||!o[$a])&&(o=r[n.main]={},o[$a]=!0),o}if(e.registerWhenExtend){var i=t.extend;i&&(t.extend=function(n){var o=i.call(this,n);return t.registerClass(o,n.type)})}return t}var qi=function(t){for(var e=0;e<t.length;e++)t[e][1]||(t[e][1]=t[e][0]);return function(r,a,i){for(var n={},o=0;o<t.length;o++){var s=t[o][1];if(!(a&&ut(a,s)>=0||i&&ut(i,s)<0)){var l=r.getShallow(s);l!=null&&(n[t[o][0]]=l)}}return n}},WC=qi([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),UC={getLineStyle:function(t){var e=WC(this,t);return e.lineDash=this.getLineDash(e.lineWidth),e},getLineDash:function(t){t==null&&(t=1);var e=this.get("type"),r=Math.max(t,2),a=t*4;return e==="solid"||e==null?!1:e==="dashed"?[a,a]:[r,r]}},$C=qi([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),ZC={getAreaStyle:function(t,e){return $C(this,t,e)}},pl=Math.pow,sa=Math.sqrt,ml=1e-8,Ym=1e-4,Xm=sa(3),yl=1/3,vr=jr(),ze=jr(),Ki=jr();function la(t){return t>-ml&&t<ml}function qm(t){return t>ml||t<-ml}function he(t,e,r,a,i){var n=1-i;return n*n*(n*t+3*i*e)+i*i*(i*a+3*n*r)}function Km(t,e,r,a,i){var n=1-i;return 3*(((e-t)*n+2*(r-e)*i)*n+(a-r)*i*i)}function YC(t,e,r,a,i,n){var o=a+3*(e-r)-t,s=3*(r-e*2+t),l=3*(e-t),u=t-i,h=s*s-3*o*l,f=s*l-9*o*u,c=l*l-3*s*u,v=0;if(la(h)&&la(f))if(la(s))n[0]=0;else{var d=-l/s;d>=0&&d<=1&&(n[v++]=d)}else{var g=f*f-4*h*c;if(la(g)){var p=f/h,d=-s/o+p,m=-p/2;d>=0&&d<=1&&(n[v++]=d),m>=0&&m<=1&&(n[v++]=m)}else if(g>0){var y=sa(g),_=h*s+1.5*o*(-f+y),x=h*s+1.5*o*(-f-y);_<0?_=-pl(-_,yl):_=pl(_,yl),x<0?x=-pl(-x,yl):x=pl(x,yl);var d=(-s-(_+x))/(3*o);d>=0&&d<=1&&(n[v++]=d)}else{var w=(2*h*s-3*o*f)/(2*sa(h*h*h)),S=Math.acos(w)/3,b=sa(h),A=Math.cos(S),d=(-s-2*b*A)/(3*o),m=(-s+b*(A+Xm*Math.sin(S)))/(3*o),C=(-s+b*(A-Xm*Math.sin(S)))/(3*o);d>=0&&d<=1&&(n[v++]=d),m>=0&&m<=1&&(n[v++]=m),C>=0&&C<=1&&(n[v++]=C)}}return v}function Qm(t,e,r,a,i){var n=6*r-12*e+6*t,o=9*e+3*a-3*t-9*r,s=3*e-3*t,l=0;if(la(o)){if(qm(n)){var u=-s/n;u>=0&&u<=1&&(i[l++]=u)}}else{var h=n*n-4*o*s;if(la(h))i[0]=-n/(2*o);else if(h>0){var f=sa(h),u=(-n+f)/(2*o),c=(-n-f)/(2*o);u>=0&&u<=1&&(i[l++]=u),c>=0&&c<=1&&(i[l++]=c)}}return l}function Jm(t,e,r,a,i,n){var o=(e-t)*i+t,s=(r-e)*i+e,l=(a-r)*i+r,u=(s-o)*i+o,h=(l-s)*i+s,f=(h-u)*i+u;n[0]=t,n[1]=o,n[2]=u,n[3]=f,n[4]=f,n[5]=h,n[6]=l,n[7]=a}function XC(t,e,r,a,i,n,o,s,l,u,h){var f,c=.005,v=1/0,d,g,p,m;vr[0]=l,vr[1]=u;for(var y=0;y<1;y+=.05)ze[0]=he(t,r,i,o,y),ze[1]=he(e,a,n,s,y),p=ta(vr,ze),p<v&&(f=y,v=p);v=1/0;for(var _=0;_<32&&!(c<Ym);_++)d=f-c,g=f+c,ze[0]=he(t,r,i,o,d),ze[1]=he(e,a,n,s,d),p=ta(ze,vr),d>=0&&p<v?(f=d,v=p):(Ki[0]=he(t,r,i,o,g),Ki[1]=he(e,a,n,s,g),m=ta(Ki,vr),g<=1&&m<v?(f=g,v=m):c*=.5);return h&&(h[0]=he(t,r,i,o,f),h[1]=he(e,a,n,s,f)),sa(v)}function ne(t,e,r,a){var i=1-a;return i*(i*t+2*a*e)+a*a*r}function lc(t,e,r,a){return 2*((1-a)*(e-t)+a*(r-e))}function qC(t,e,r,a,i){var n=t-2*e+r,o=2*(e-t),s=t-a,l=0;if(la(n)){if(qm(o)){var u=-s/o;u>=0&&u<=1&&(i[l++]=u)}}else{var h=o*o-4*n*s;if(la(h)){var u=-o/(2*n);u>=0&&u<=1&&(i[l++]=u)}else if(h>0){var f=sa(h),u=(-o+f)/(2*n),c=(-o-f)/(2*n);u>=0&&u<=1&&(i[l++]=u),c>=0&&c<=1&&(i[l++]=c)}}return l}function jm(t,e,r){var a=t+r-2*e;return a===0?.5:(t-e)/a}function uc(t,e,r,a,i){var n=(e-t)*a+t,o=(r-e)*a+e,s=(o-n)*a+n;i[0]=t,i[1]=n,i[2]=s,i[3]=s,i[4]=o,i[5]=r}function KC(t,e,r,a,i,n,o,s,l){var u,h=.005,f=1/0;vr[0]=o,vr[1]=s;for(var c=0;c<1;c+=.05){ze[0]=ne(t,r,i,c),ze[1]=ne(e,a,n,c);var v=ta(vr,ze);v<f&&(u=c,f=v)}f=1/0;for(var d=0;d<32&&!(h<Ym);d++){var g=u-h,p=u+h;ze[0]=ne(t,r,i,g),ze[1]=ne(e,a,n,g);var v=ta(ze,vr);if(g>=0&&v<f)u=g,f=v;else{Ki[0]=ne(t,r,i,p),Ki[1]=ne(e,a,n,p);var m=ta(Ki,vr);p<=1&&m<f?(u=p,f=m):h*=.5}}return l&&(l[0]=ne(t,r,i,u),l[1]=ne(e,a,n,u)),sa(f)}var ge=Math.min,pe=Math.max,hc=Math.sin,fc=Math.cos,Za=Math.PI*2,_l=jr(),xl=jr(),wl=jr();function uo(t,e,r){if(t.length!==0){var a=t[0],i=a[0],n=a[0],o=a[1],s=a[1],l;for(l=1;l<t.length;l++)a=t[l],i=ge(i,a[0]),n=pe(n,a[0]),o=ge(o,a[1]),s=pe(s,a[1]);e[0]=i,e[1]=o,r[0]=n,r[1]=s}}function t0(t,e,r,a,i,n){i[0]=ge(t,r),i[1]=ge(e,a),n[0]=pe(t,r),n[1]=pe(e,a)}var e0=[],r0=[];function QC(t,e,r,a,i,n,o,s,l,u){var h=Qm,f=he,c,v=h(t,r,i,o,e0);for(l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0,c=0;c<v;c++){var d=f(t,r,i,o,e0[c]);l[0]=ge(d,l[0]),u[0]=pe(d,u[0])}for(v=h(e,a,n,s,r0),c=0;c<v;c++){var g=f(e,a,n,s,r0[c]);l[1]=ge(g,l[1]),u[1]=pe(g,u[1])}l[0]=ge(t,l[0]),u[0]=pe(t,u[0]),l[0]=ge(o,l[0]),u[0]=pe(o,u[0]),l[1]=ge(e,l[1]),u[1]=pe(e,u[1]),l[1]=ge(s,l[1]),u[1]=pe(s,u[1])}function JC(t,e,r,a,i,n,o,s){var l=jm,u=ne,h=pe(ge(l(t,r,i),1),0),f=pe(ge(l(e,a,n),1),0),c=u(t,r,i,h),v=u(e,a,n,f);o[0]=ge(t,i,c),o[1]=ge(e,n,v),s[0]=pe(t,i,c),s[1]=pe(e,n,v)}function jC(t,e,r,a,i,n,o,s,l){var u=kr,h=Nr,f=Math.abs(i-n);if(f%Za<1e-4&&f>1e-4){s[0]=t-r,s[1]=e-a,l[0]=t+r,l[1]=e+a;return}if(_l[0]=fc(i)*r+t,_l[1]=hc(i)*a+e,xl[0]=fc(n)*r+t,xl[1]=hc(n)*a+e,u(s,_l,xl),h(l,_l,xl),i=i%Za,i<0&&(i=i+Za),n=n%Za,n<0&&(n=n+Za),i>n&&!o?n+=Za:i<n&&o&&(i+=Za),o){var c=n;n=i,i=c}for(var v=0;v<n;v+=Math.PI/2)v>i&&(wl[0]=fc(v)*r+t,wl[1]=hc(v)*a+e,u(s,wl,s),h(l,wl,l))}var kt={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},dr=[],ua=[],gr=[],pr=[],a0=Math.min,i0=Math.max,ho=Math.cos,fo=Math.sin,bl=Math.sqrt,Qi=Math.abs,cc=typeof Float32Array<"u",me=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};me.prototype={constructor:me,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(t,e,r){r=r||0,this._ux=Qi(r/qs/t)||0,this._uy=Qi(r/qs/e)||0},getContext:function(){return this._ctx},beginPath:function(t){return this._ctx=t,t&&t.beginPath(),t&&(this.dpr=t.dpr),this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this},moveTo:function(t,e){return this.addData(kt.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},lineTo:function(t,e){var r=Qi(t-this._xi)>this._ux||Qi(e-this._yi)>this._uy||this._len<5;return this.addData(kt.L,t,e),this._ctx&&r&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),r&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,r,a,i,n){return this.addData(kt.C,t,e,r,a,i,n),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,r,a,i,n):this._ctx.bezierCurveTo(t,e,r,a,i,n)),this._xi=i,this._yi=n,this},quadraticCurveTo:function(t,e,r,a){return this.addData(kt.Q,t,e,r,a),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,r,a):this._ctx.quadraticCurveTo(t,e,r,a)),this._xi=r,this._yi=a,this},arc:function(t,e,r,a,i,n){return this.addData(kt.A,t,e,r,r,a,i-a,0,n?0:1),this._ctx&&this._ctx.arc(t,e,r,a,i,n),this._xi=ho(i)*r+t,this._yi=fo(i)*r+e,this},arcTo:function(t,e,r,a,i){return this._ctx&&this._ctx.arcTo(t,e,r,a,i),this},rect:function(t,e,r,a){return this._ctx&&this._ctx.rect(t,e,r,a),this.addData(kt.R,t,e,r,a),this},closePath:function(){this.addData(kt.Z);var t=this._ctx,e=this._x0,r=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,r),t.closePath()),this._xi=e,this._yi=r,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t,this._dashIdx=0;for(var e=0,r=0;r<t.length;r++)e+=t[r];this._dashSum=e}return this},setLineDashOffset:function(t){return this._dashOffset=t,this},len:function(){return this._len},setData:function(t){var e=t.length;!(this.data&&this.data.length===e)&&cc&&(this.data=new Float32Array(e));for(var r=0;r<e;r++)this.data[r]=t[r];this._len=e},appendPath:function(t){t instanceof Array||(t=[t]);for(var e=t.length,r=0,a=this._len,i=0;i<e;i++)r+=t[i].len();cc&&this.data instanceof Float32Array&&(this.data=new Float32Array(a+r));for(var i=0;i<e;i++)for(var n=t[i].data,o=0;o<n.length;o++)this.data[a++]=n[o];this._len=a},addData:function(t){if(!!this._saveData){var e=this.data;this._len+arguments.length>e.length&&(this._expandData(),e=this.data);for(var r=0;r<arguments.length;r++)e[this._len++]=arguments[r];this._prevCmd=t}},_expandData:function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e<this._len;e++)t[e]=this.data[e];this.data=t}},_needsDash:function(){return this._lineDash},_dashedLineTo:function(t,e){var r=this._dashSum,a=this._dashOffset,i=this._lineDash,n=this._ctx,o=this._xi,s=this._yi,l=t-o,u=e-s,h=bl(l*l+u*u),f=o,c=s,v,d=i.length,g;for(l/=h,u/=h,a<0&&(a=r+a),a%=r,f-=a*l,c-=a*u;l>0&&f<=t||l<0&&f>=t||l===0&&(u>0&&c<=e||u<0&&c>=e);)g=this._dashIdx,v=i[g],f+=l*v,c+=u*v,this._dashIdx=(g+1)%d,!(l>0&&f<o||l<0&&f>o||u>0&&c<s||u<0&&c>s)&&n[g%2?"moveTo":"lineTo"](l>=0?a0(f,t):i0(f,t),u>=0?a0(c,e):i0(c,e));l=f-t,u=c-e,this._dashOffset=-bl(l*l+u*u)},_dashedBezierTo:function(t,e,r,a,i,n){var o=this._dashSum,s=this._dashOffset,l=this._lineDash,u=this._ctx,h=this._xi,f=this._yi,c,v,d,g=he,p=0,m=this._dashIdx,y=l.length,_,x,w=0;for(s<0&&(s=o+s),s%=o,c=0;c<1;c+=.1)v=g(h,t,r,i,c+.1)-g(h,t,r,i,c),d=g(f,e,a,n,c+.1)-g(f,e,a,n,c),p+=bl(v*v+d*d);for(;m<y&&(w+=l[m],!(w>s));m++);for(c=(w-s)/p;c<=1;)_=g(h,t,r,i,c),x=g(f,e,a,n,c),m%2?u.moveTo(_,x):u.lineTo(_,x),c+=l[m]/p,m=(m+1)%y;m%2!==0&&u.lineTo(i,n),v=i-_,d=n-x,this._dashOffset=-bl(v*v+d*d)},_dashedQuadraticTo:function(t,e,r,a){var i=r,n=a;r=(r+2*t)/3,a=(a+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,r,a,i,n)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,cc&&(this.data=new Float32Array(t)))},getBoundingRect:function(){dr[0]=dr[1]=gr[0]=gr[1]=Number.MAX_VALUE,ua[0]=ua[1]=pr[0]=pr[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,r=0,a=0,i=0,n=0;n<t.length;){var o=t[n++];switch(n===1&&(e=t[n],r=t[n+1],a=e,i=r),o){case kt.M:a=t[n++],i=t[n++],e=a,r=i,gr[0]=a,gr[1]=i,pr[0]=a,pr[1]=i;break;case kt.L:t0(e,r,t[n],t[n+1],gr,pr),e=t[n++],r=t[n++];break;case kt.C:QC(e,r,t[n++],t[n++],t[n++],t[n++],t[n],t[n+1],gr,pr),e=t[n++],r=t[n++];break;case kt.Q:JC(e,r,t[n++],t[n++],t[n],t[n+1],gr,pr),e=t[n++],r=t[n++];break;case kt.A:var s=t[n++],l=t[n++],u=t[n++],h=t[n++],f=t[n++],c=t[n++]+f;n+=1;var v=1-t[n++];n===1&&(a=ho(f)*u+s,i=fo(f)*h+l),jC(s,l,u,h,f,c,v,gr,pr),e=ho(c)*u+s,r=fo(c)*h+l;break;case kt.R:a=e=t[n++],i=r=t[n++];var d=t[n++],g=t[n++];t0(a,i,a+d,i+g,gr,pr);break;case kt.Z:e=a,r=i;break}kr(dr,dr,gr),Nr(ua,ua,pr)}return n===0&&(dr[0]=dr[1]=ua[0]=ua[1]=0),new it(dr[0],dr[1],ua[0]-dr[0],ua[1]-dr[1])},rebuildPath:function(t){for(var e=this.data,r,a,i,n,o,s,l=this._ux,u=this._uy,h=this._len,f=0;f<h;){var c=e[f++];switch(f===1&&(i=e[f],n=e[f+1],r=i,a=n),c){case kt.M:r=i=e[f++],a=n=e[f++],t.moveTo(i,n);break;case kt.L:o=e[f++],s=e[f++],(Qi(o-i)>l||Qi(s-n)>u||f===h-1)&&(t.lineTo(o,s),i=o,n=s);break;case kt.C:t.bezierCurveTo(e[f++],e[f++],e[f++],e[f++],e[f++],e[f++]),i=e[f-2],n=e[f-1];break;case kt.Q:t.quadraticCurveTo(e[f++],e[f++],e[f++],e[f++]),i=e[f-2],n=e[f-1];break;case kt.A:var v=e[f++],d=e[f++],g=e[f++],p=e[f++],m=e[f++],y=e[f++],_=e[f++],x=e[f++],w=g>p?g:p,S=g>p?1:g/p,b=g>p?p/g:1,A=Math.abs(g-p)>.001,C=m+y;A?(t.translate(v,d),t.rotate(_),t.scale(S,b),t.arc(0,0,w,m,C,1-x),t.scale(1/S,1/b),t.rotate(-_),t.translate(-v,-d)):t.arc(v,d,w,m,C,1-x),f===1&&(r=ho(m)*g+v,a=fo(m)*p+d),i=ho(C)*g+v,n=fo(C)*p+d;break;case kt.R:r=i=e[f],a=n=e[f+1],t.rect(e[f++],e[f++],e[f++],e[f++]);break;case kt.Z:t.closePath(),i=r,n=a}}}},me.CMD=kt;function ha(t,e,r,a,i,n,o){if(i===0)return!1;var s=i,l=0,u=t;if(o>e+s&&o>a+s||o<e-s&&o<a-s||n>t+s&&n>r+s||n<t-s&&n<r-s)return!1;if(t!==r)l=(e-a)/(t-r),u=(t*a-r*e)/(t-r);else return Math.abs(n-t)<=s/2;var h=l*n-o+u,f=h*h/(l*l+1);return f<=s/2*s/2}function tD(t,e,r,a,i,n,o,s,l,u,h){if(l===0)return!1;var f=l;if(h>e+f&&h>a+f&&h>n+f&&h>s+f||h<e-f&&h<a-f&&h<n-f&&h<s-f||u>t+f&&u>r+f&&u>i+f&&u>o+f||u<t-f&&u<r-f&&u<i-f&&u<o-f)return!1;var c=XC(t,e,r,a,i,n,o,s,u,h,null);return c<=f/2}function n0(t,e,r,a,i,n,o,s,l){if(o===0)return!1;var u=o;if(l>e+u&&l>a+u&&l>n+u||l<e-u&&l<a-u&&l<n-u||s>t+u&&s>r+u&&s>i+u||s<t-u&&s<r-u&&s<i-u)return!1;var h=KC(t,e,r,a,i,n,s,l,null);return h<=u/2}var o0=Math.PI*2;function fa(t){return t%=o0,t<0&&(t+=o0),t}var co=Math.PI*2;function eD(t,e,r,a,i,n,o,s,l){if(o===0)return!1;var u=o;s-=t,l-=e;var h=Math.sqrt(s*s+l*l);if(h-u>r||h+u<r)return!1;if(Math.abs(a-i)%co<1e-4)return!0;if(n){var f=a;a=fa(i),i=fa(f)}else a=fa(a),i=fa(i);a>i&&(i+=co);var c=Math.atan2(l,s);return c<0&&(c+=co),c>=a&&c<=i||c+co>=a&&c+co<=i}function Vr(t,e,r,a,i,n){if(n>e&&n>a||n<e&&n<a||a===e)return 0;var o=a<e?1:-1,s=(n-e)/(a-e);(s===1||s===0)&&(o=a<e?.5:-.5);var l=s*(r-t)+t;return l===i?1/0:l>i?o:0}var ca=me.CMD,Ji=Math.PI*2,rD=1e-4;function aD(t,e){return Math.abs(t-e)<rD}var fe=[-1,-1,-1],Be=[-1,-1];function iD(){var t=Be[0];Be[0]=Be[1],Be[1]=t}function nD(t,e,r,a,i,n,o,s,l,u){if(u>e&&u>a&&u>n&&u>s||u<e&&u<a&&u<n&&u<s)return 0;var h=YC(e,a,n,s,u,fe);if(h===0)return 0;for(var f=0,c=-1,v,d,g=0;g<h;g++){var p=fe[g],m=p===0||p===1?.5:1,y=he(t,r,i,o,p);y<l||(c<0&&(c=Qm(e,a,n,s,Be),Be[1]<Be[0]&&c>1&&iD(),v=he(e,a,n,s,Be[0]),c>1&&(d=he(e,a,n,s,Be[1]))),c===2?p<Be[0]?f+=v<e?m:-m:p<Be[1]?f+=d<v?m:-m:f+=s<d?m:-m:p<Be[0]?f+=v<e?m:-m:f+=s<v?m:-m)}return f}function oD(t,e,r,a,i,n,o,s){if(s>e&&s>a&&s>n||s<e&&s<a&&s<n)return 0;var l=qC(e,a,n,s,fe);if(l===0)return 0;var u=jm(e,a,n);if(u>=0&&u<=1){for(var h=0,f=ne(e,a,n,u),c=0;c<l;c++){var v=fe[c]===0||fe[c]===1?.5:1,d=ne(t,r,i,fe[c]);d<o||(fe[c]<u?h+=f<e?v:-v:h+=n<f?v:-v)}return h}else{var v=fe[0]===0||fe[0]===1?.5:1,d=ne(t,r,i,fe[0]);return d<o?0:n<e?v:-v}}function sD(t,e,r,a,i,n,o,s){if(s-=e,s>r||s<-r)return 0;var l=Math.sqrt(r*r-s*s);fe[0]=-l,fe[1]=l;var u=Math.abs(a-i);if(u<1e-4)return 0;if(u%Ji<1e-4){a=0,i=Ji;var h=n?1:-1;return o>=fe[0]+t&&o<=fe[1]+t?h:0}if(n){var l=a;a=fa(i),i=fa(l)}else a=fa(a),i=fa(i);a>i&&(i+=Ji);for(var f=0,c=0;c<2;c++){var v=fe[c];if(v+t>o){var d=Math.atan2(s,v),h=n?1:-1;d<0&&(d=Ji+d),(d>=a&&d<=i||d+Ji>=a&&d+Ji<=i)&&(d>Math.PI/2&&d<Math.PI*1.5&&(h=-h),f+=h)}}return f}function s0(t,e,r,a,i){for(var n=0,o=0,s=0,l=0,u=0,h=0;h<t.length;){var f=t[h++];switch(f===ca.M&&h>1&&(r||(n+=Vr(o,s,l,u,a,i))),h===1&&(o=t[h],s=t[h+1],l=o,u=s),f){case ca.M:l=t[h++],u=t[h++],o=l,s=u;break;case ca.L:if(r){if(ha(o,s,t[h],t[h+1],e,a,i))return!0}else n+=Vr(o,s,t[h],t[h+1],a,i)||0;o=t[h++],s=t[h++];break;case ca.C:if(r){if(tD(o,s,t[h++],t[h++],t[h++],t[h++],t[h],t[h+1],e,a,i))return!0}else n+=nD(o,s,t[h++],t[h++],t[h++],t[h++],t[h],t[h+1],a,i)||0;o=t[h++],s=t[h++];break;case ca.Q:if(r){if(n0(o,s,t[h++],t[h++],t[h],t[h+1],e,a,i))return!0}else n+=oD(o,s,t[h++],t[h++],t[h],t[h+1],a,i)||0;o=t[h++],s=t[h++];break;case ca.A:var c=t[h++],v=t[h++],d=t[h++],g=t[h++],p=t[h++],m=t[h++];h+=1;var y=1-t[h++],S=Math.cos(p)*d+c,b=Math.sin(p)*g+v;h>1?n+=Vr(o,s,S,b,a,i):(l=S,u=b);var _=(a-c)*g/d+c;if(r){if(eD(c,v,g,p,p+m,y,e,_,i))return!0}else n+=sD(c,v,g,p,p+m,y,_,i);o=Math.cos(p+m)*d+c,s=Math.sin(p+m)*g+v;break;case ca.R:l=o=t[h++],u=s=t[h++];var x=t[h++],w=t[h++],S=l+x,b=u+w;if(r){if(ha(l,u,S,u,e,a,i)||ha(S,u,S,b,e,a,i)||ha(S,b,l,b,e,a,i)||ha(l,b,l,u,e,a,i))return!0}else n+=Vr(S,u,S,b,a,i),n+=Vr(l,b,l,u,a,i);break;case ca.Z:if(r){if(ha(o,s,l,u,e,a,i))return!0}else n+=Vr(o,s,l,u,a,i);o=l,s=u;break}}return!r&&!aD(s,u)&&(n+=Vr(o,s,l,u,a,i)||0),n!==0}function lD(t,e,r){return s0(t,0,!1,e,r)}function uD(t,e,r,a){return s0(t,e,!0,r,a)}var l0=bf.prototype.getCanvasPattern,vc=Math.abs,hD=new me(!0);function st(t){ve.call(this,t),this.path=null}st.prototype={constructor:st,type:"path",__dirtyPath:!0,strokeContainThreshold:5,segmentIgnoreThreshold:0,subPixelOptimize:!1,brush:function(t,e){var r=this.style,a=this.path||hD,i=r.hasStroke(),n=r.hasFill(),o=r.fill,s=r.stroke,l=n&&!!o.colorStops,u=i&&!!s.colorStops,h=n&&!!o.image,f=i&&!!s.image;if(r.bind(t,this,e),this.setTransform(t),this.__dirty){var c;l&&(c=c||this.getBoundingRect(),this._fillGradient=r.getGradient(t,o,c)),u&&(c=c||this.getBoundingRect(),this._strokeGradient=r.getGradient(t,s,c))}l?t.fillStyle=this._fillGradient:h&&(t.fillStyle=l0.call(o,t)),u?t.strokeStyle=this._strokeGradient:f&&(t.strokeStyle=l0.call(s,t));var v=r.lineDash,d=r.lineDashOffset,g=!!t.setLineDash,p=this.getGlobalScale();if(a.setScale(p[0],p[1],this.segmentIgnoreThreshold),this.__dirtyPath||v&&!g&&i?(a.beginPath(t),v&&!g&&(a.setLineDash(v),a.setLineDashOffset(d)),this.buildPath(a,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(t.beginPath(),this.path.rebuildPath(t)),n)if(r.fillOpacity!=null){var m=t.globalAlpha;t.globalAlpha=r.fillOpacity*r.opacity,a.fill(t),t.globalAlpha=m}else a.fill(t);if(v&&g&&(t.setLineDash(v),t.lineDashOffset=d),i)if(r.strokeOpacity!=null){var m=t.globalAlpha;t.globalAlpha=r.strokeOpacity*r.opacity,a.stroke(t),t.globalAlpha=m}else a.stroke(t);v&&g&&t.setLineDash([]),r.text!=null&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))},buildPath:function(t,e,r){},createPathProxy:function(){this.path=new me},getBoundingRect:function(){var t=this._rect,e=this.style,r=!t;if(r){var a=this.path;a||(a=this.path=new me),this.__dirtyPath&&(a.beginPath(),this.buildPath(a,this.shape,!1)),t=a.getBoundingRect()}if(this._rect=t,e.hasStroke()){var i=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||r){i.copy(t);var n=e.lineWidth,o=e.strokeNoScale?this.getLineScale():1;e.hasFill()||(n=Math.max(n,this.strokeContainThreshold||4)),o>1e-10&&(i.width+=n/o,i.height+=n/o,i.x-=n/o/2,i.y-=n/o/2)}return i}return t},contain:function(t,e){var r=this.transformCoordToLocal(t,e),a=this.getBoundingRect(),i=this.style;if(t=r[0],e=r[1],a.contain(t,e)){var n=this.path.data;if(i.hasStroke()){var o=i.lineWidth,s=i.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(i.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),uD(n,o/s,t,e)))return!0}if(i.hasFill())return lD(n,t,e)}return!1},dirty:function(t){t==null&&(t=!0),t&&(this.__dirtyPath=t,this._rect=null),this.__dirty=this.__dirtyText=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(t){return this.animate("shape",t)},attrKV:function(t,e){t==="shape"?(this.setShape(e),this.__dirtyPath=!0,this._rect=null):ve.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var r=this.shape;if(r){if(Q(t))for(var a in t)t.hasOwnProperty(a)&&(r[a]=t[a]);else r[t]=e;this.dirty(!0)}return this},getLineScale:function(){var t=this.transform;return t&&vc(t[0]-1)>1e-10&&vc(t[3]-1)>1e-10?Math.sqrt(vc(t[0]*t[3]-t[2]*t[1])):1}},st.extend=function(t){var e=function(a){st.call(this,a),t.style&&this.style.extendFrom(t.style,!1);var i=t.shape;if(i){this.shape=this.shape||{};var n=this.shape;for(var o in i)!n.hasOwnProperty(o)&&i.hasOwnProperty(o)&&(n[o]=i[o])}t.init&&t.init.call(this,a)};yt(e,st);for(var r in t)r!=="style"&&r!=="shape"&&(e.prototype[r]=t[r]);return e},yt(st,ve);var ji=me.CMD,fD=[[],[],[]],u0=Math.sqrt,cD=Math.atan2,vD=function(t,e){var r=t.data,a,i,n,o,s,l,u=ji.M,h=ji.C,f=ji.L,c=ji.R,v=ji.A,d=ji.Q;for(n=0,o=0;n<r.length;){switch(a=r[n++],o=n,i=0,a){case u:i=1;break;case f:i=1;break;case h:i=3;break;case d:i=2;break;case v:var g=e[4],p=e[5],m=u0(e[0]*e[0]+e[1]*e[1]),y=u0(e[2]*e[2]+e[3]*e[3]),_=cD(-e[1]/y,e[0]/m);r[n]*=m,r[n++]+=g,r[n]*=y,r[n++]+=p,r[n++]*=m,r[n++]*=y,r[n++]+=_,r[n++]+=_,n+=2,o=n;break;case c:l[0]=r[n++],l[1]=r[n++],xt(l,l,e),r[o++]=l[0],r[o++]=l[1],l[0]+=r[n++],l[1]+=r[n++],xt(l,l,e),r[o++]=l[0],r[o++]=l[1]}for(s=0;s<i;s++){var l=fD[s];l[0]=r[n++],l[1]=r[n++],xt(l,l,e),r[o++]=l[0],r[o++]=l[1]}}},dc=Math.sqrt,Sl=Math.sin,Al=Math.cos,Tl=Math.PI,h0=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])},gc=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(h0(t)*h0(e))},f0=function(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(gc(t,e))};function c0(t,e,r,a,i,n,o,s,l,u,h){var f=l*(Tl/180),c=Al(f)*(t-r)/2+Sl(f)*(e-a)/2,v=-1*Sl(f)*(t-r)/2+Al(f)*(e-a)/2,d=c*c/(o*o)+v*v/(s*s);d>1&&(o*=dc(d),s*=dc(d));var g=(i===n?-1:1)*dc((o*o*(s*s)-o*o*(v*v)-s*s*(c*c))/(o*o*(v*v)+s*s*(c*c)))||0,p=g*o*v/s,m=g*-s*c/o,y=(t+r)/2+Al(f)*p-Sl(f)*m,_=(e+a)/2+Sl(f)*p+Al(f)*m,x=f0([1,0],[(c-p)/o,(v-m)/s]),w=[(c-p)/o,(v-m)/s],S=[(-1*c-p)/o,(-1*v-m)/s],b=f0(w,S);gc(w,S)<=-1&&(b=Tl),gc(w,S)>=1&&(b=0),n===0&&b>0&&(b=b-2*Tl),n===1&&b<0&&(b=b+2*Tl),h.addData(u,y,_,o,s,x,b,f,n)}var dD=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,gD=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function pD(t){if(!t)return new me;for(var e=0,r=0,a=e,i=r,n,o=new me,s=me.CMD,l=t.match(dD),u=0;u<l.length;u++){for(var h=l[u],f=h.charAt(0),c,v=h.match(gD)||[],d=v.length,g=0;g<d;g++)v[g]=parseFloat(v[g]);for(var p=0;p<d;){var m,y,_,x,w,S,b,A=e,C=r;switch(f){case"l":e+=v[p++],r+=v[p++],c=s.L,o.addData(c,e,r);break;case"L":e=v[p++],r=v[p++],c=s.L,o.addData(c,e,r);break;case"m":e+=v[p++],r+=v[p++],c=s.M,o.addData(c,e,r),a=e,i=r,f="l";break;case"M":e=v[p++],r=v[p++],c=s.M,o.addData(c,e,r),a=e,i=r,f="L";break;case"h":e+=v[p++],c=s.L,o.addData(c,e,r);break;case"H":e=v[p++],c=s.L,o.addData(c,e,r);break;case"v":r+=v[p++],c=s.L,o.addData(c,e,r);break;case"V":r=v[p++],c=s.L,o.addData(c,e,r);break;case"C":c=s.C,o.addData(c,v[p++],v[p++],v[p++],v[p++],v[p++],v[p++]),e=v[p-2],r=v[p-1];break;case"c":c=s.C,o.addData(c,v[p++]+e,v[p++]+r,v[p++]+e,v[p++]+r,v[p++]+e,v[p++]+r),e+=v[p-2],r+=v[p-1];break;case"S":m=e,y=r;var D=o.len(),I=o.data;n===s.C&&(m+=e-I[D-4],y+=r-I[D-3]),c=s.C,A=v[p++],C=v[p++],e=v[p++],r=v[p++],o.addData(c,m,y,A,C,e,r);break;case"s":m=e,y=r;var D=o.len(),I=o.data;n===s.C&&(m+=e-I[D-4],y+=r-I[D-3]),c=s.C,A=e+v[p++],C=r+v[p++],e+=v[p++],r+=v[p++],o.addData(c,m,y,A,C,e,r);break;case"Q":A=v[p++],C=v[p++],e=v[p++],r=v[p++],c=s.Q,o.addData(c,A,C,e,r);break;case"q":A=v[p++]+e,C=v[p++]+r,e+=v[p++],r+=v[p++],c=s.Q,o.addData(c,A,C,e,r);break;case"T":m=e,y=r;var D=o.len(),I=o.data;n===s.Q&&(m+=e-I[D-4],y+=r-I[D-3]),e=v[p++],r=v[p++],c=s.Q,o.addData(c,m,y,e,r);break;case"t":m=e,y=r;var D=o.len(),I=o.data;n===s.Q&&(m+=e-I[D-4],y+=r-I[D-3]),e+=v[p++],r+=v[p++],c=s.Q,o.addData(c,m,y,e,r);break;case"A":_=v[p++],x=v[p++],w=v[p++],S=v[p++],b=v[p++],A=e,C=r,e=v[p++],r=v[p++],c=s.A,c0(A,C,e,r,S,b,_,x,w,c,o);break;case"a":_=v[p++],x=v[p++],w=v[p++],S=v[p++],b=v[p++],A=e,C=r,e+=v[p++],r+=v[p++],c=s.A,c0(A,C,e,r,S,b,_,x,w,c,o);break}}(f==="z"||f==="Z")&&(c=s.Z,o.addData(c),e=a,r=i),n=c}return o.toStatic(),o}function v0(t,e){var r=pD(t);return e=e||{},e.buildPath=function(a){if(a.setData){a.setData(r.data);var i=a.getContext();i&&a.rebuildPath(i)}else{var i=a;r.rebuildPath(i)}},e.applyTransform=function(a){vD(r,a),this.dirty(!0)},e}function d0(t,e){return new st(v0(t,e))}function mD(t,e){return st.extend(v0(t,e))}function yD(t,e){for(var r=[],a=t.length,i=0;i<a;i++){var n=t[i];n.path||n.createPathProxy(),n.__dirtyPath&&n.buildPath(n.path,n.shape,!0),r.push(n.path)}var o=new st(e);return o.createPathProxy(),o.buildPath=function(s){s.appendPath(r);var l=s.getContext();l&&s.rebuildPath(l)},o}var nt=function(t){ve.call(this,t)};nt.prototype={constructor:nt,type:"text",brush:function(t,e){var r=this.style;this.__dirty&&oo(r,!0),r.fill=r.stroke=r.shadowBlur=r.shadowColor=r.shadowOffsetX=r.shadowOffsetY=null;var a=r.text;if(a!=null&&(a+=""),!Gf(a,r)){t.__attrCachedBy=ia.NONE;return}this.setTransform(t),Pm(this,t,a,r,null,e),this.restoreTransform(t)},getBoundingRect:function(){var t=this.style;if(this.__dirty&&oo(t,!0),!this._rect){var e=t.text;e!=null?e+="":e="";var r=cr(t.text+"",t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich);if(r.x+=t.x||0,r.y+=t.y||0,Bf(t.textStroke,t.textStrokeWidth)){var a=t.textStrokeWidth;r.x-=a/2,r.y-=a/2,r.width+=a,r.height+=a}this._rect=r}return this._rect}},yt(nt,ve);var mr=st.extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(t,e,r){r&&t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,Math.PI*2,!0)}}),va=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]],pc=function(t){return at.browser.ie&&at.browser.version>=11?function(){var e=this.__clipPaths,r=this.style,a;if(e)for(var i=0;i<e.length;i++){var n=e[i],o=n&&n.shape,s=n&&n.type;if(o&&(s==="sector"&&o.startAngle===o.endAngle||s==="rect"&&(!o.width||!o.height))){for(var l=0;l<va.length;l++)va[l][2]=r[va[l][0]],r[va[l][0]]=va[l][1];a=!0;break}}if(t.apply(this,arguments),a)for(var l=0;l<va.length;l++)r[va[l][0]]=va[l][2]}:t},ir=st.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:Math.PI*2,clockwise:!0},brush:pc(st.prototype.brush),buildPath:function(t,e){var r=e.cx,a=e.cy,i=Math.max(e.r0||0,0),n=Math.max(e.r,0),o=e.startAngle,s=e.endAngle,l=e.clockwise,u=Math.cos(o),h=Math.sin(o);t.moveTo(u*i+r,h*i+a),t.lineTo(u*n+r,h*n+a),t.arc(r,a,n,o,s,!l),t.lineTo(Math.cos(s)*i+r,Math.sin(s)*i+a),i!==0&&t.arc(r,a,i,s,o,l),t.closePath()}}),Cl=st.extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(t,e){var r=e.cx,a=e.cy,i=Math.PI*2;t.moveTo(r+e.r,a),t.arc(r,a,e.r,0,i,!1),t.moveTo(r+e.r0,a),t.arc(r,a,e.r0,0,i,!0)}});function g0(t,e,r,a,i,n,o){var s=(r-t)*.5,l=(a-e)*.5;return(2*(e-r)+s+l)*o+(-3*(e-r)-2*s-l)*n+s*i+e}var _D=function(t,e){for(var r=t.length,a=[],i=0,n=1;n<r;n++)i+=Qn(t[n-1],t[n]);var o=i/2;o=o<r?r:o;for(var n=0;n<o;n++){var s=n/(o-1)*(e?r:r-1),l=Math.floor(s),u=s-l,h,f=t[l%r],c,v;e?(h=t[(l-1+r)%r],c=t[(l+1)%r],v=t[(l+2)%r]):(h=t[l===0?l:l-1],c=t[l>r-2?r-1:l+1],v=t[l>r-3?r-1:l+2]);var d=u*u,g=u*d;a.push([g0(h[0],f[0],c[0],v[0],u,d,g),g0(h[1],f[1],c[1],v[1],u,d,g)])}return a},xD=function(t,e,r,a){var i=[],n=[],o=[],s=[],l,u,h,f;if(a){h=[1/0,1/0],f=[-1/0,-1/0];for(var c=0,v=t.length;c<v;c++)kr(h,h,t[c]),Nr(f,f,t[c]);kr(h,h,a[0]),Nr(f,f,a[1])}for(var c=0,v=t.length;c<v;c++){var d=t[c];if(r)l=t[c?c-1:v-1],u=t[(c+1)%v];else if(c===0||c===v-1){i.push(Qe(t[c]));continue}else l=t[c-1],u=t[c+1];Er(n,u,l),Ws(n,n,e);var g=Qn(d,l),p=Qn(d,u),m=g+p;m!==0&&(g/=m,p/=m),Ws(o,n,-g),Ws(s,n,p);var y=Hh([],d,o),_=Hh([],d,s);a&&(Nr(y,y,h),kr(y,y,f),Nr(_,_,h),kr(_,_,f)),i.push(y),i.push(_)}return r&&i.push(i.shift()),i};function p0(t,e,r){var a=e.points,i=e.smooth;if(a&&a.length>=2){if(i&&i!=="spline"){var n=xD(a,i,r,e.smoothConstraint);t.moveTo(a[0][0],a[0][1]);for(var o=a.length,s=0;s<(r?o:o-1);s++){var l=n[s*2],u=n[s*2+1],h=a[(s+1)%o];t.bezierCurveTo(l[0],l[1],u[0],u[1],h[0],h[1])}}else{i==="spline"&&(a=_D(a,r)),t.moveTo(a[0][0],a[0][1]);for(var s=1,f=a.length;s<f;s++)t.lineTo(a[s][0],a[s][1])}r&&t.closePath()}}var Se=st.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,e){p0(t,e,!0)}}),Ve=st.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){p0(t,e,!1)}}),tn=Math.round;function m0(t,e,r){if(!!e){var a=e.x1,i=e.x2,n=e.y1,o=e.y2;t.x1=a,t.x2=i,t.y1=n,t.y2=o;var s=r&&r.lineWidth;!s||(tn(a*2)===tn(i*2)&&(t.x1=t.x2=Ya(a,s,!0)),tn(n*2)===tn(o*2)&&(t.y1=t.y2=Ya(n,s,!0)))}}function y0(t,e,r){if(!!e){var a=e.x,i=e.y,n=e.width,o=e.height;t.x=a,t.y=i,t.width=n,t.height=o;var s=r&&r.lineWidth;!s||(t.x=Ya(a,s,!0),t.y=Ya(i,s,!0),t.width=Math.max(Ya(a+n,s,!1)-t.x,n===0?0:1),t.height=Math.max(Ya(i+o,s,!1)-t.y,o===0?0:1))}}function Ya(t,e,r){if(!e)return t;var a=tn(t*2);return(a+tn(e))%2===0?a/2:(a+(r?1:-1))/2}var Xa={},ft=st.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(t,e){var r,a,i,n;this.subPixelOptimize?(y0(Xa,e,this.style),r=Xa.x,a=Xa.y,i=Xa.width,n=Xa.height,Xa.r=e.r,e=Xa):(r=e.x,a=e.y,i=e.width,n=e.height),e.r?Cm(t,e):t.rect(r,a,i,n),t.closePath()}}),vo={},ee=st.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var r,a,i,n;this.subPixelOptimize?(m0(vo,e,this.style),r=vo.x1,a=vo.y1,i=vo.x2,n=vo.y2):(r=e.x1,a=e.y1,i=e.x2,n=e.y2);var o=e.percent;o!==0&&(t.moveTo(r,a),o<1&&(i=r*(1-o)+i*o,n=a*(1-o)+n*o),t.lineTo(i,n))},pointAt:function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]}}),ye=[];function _0(t,e,r){var a=t.cpx2,i=t.cpy2;return a===null||i===null?[(r?Km:he)(t.x1,t.cpx1,t.cpx2,t.x2,e),(r?Km:he)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(r?lc:ne)(t.x1,t.cpx1,t.x2,e),(r?lc:ne)(t.y1,t.cpy1,t.y2,e)]}var Dl=st.extend({type:"bezier-curve",shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var r=e.x1,a=e.y1,i=e.x2,n=e.y2,o=e.cpx1,s=e.cpy1,l=e.cpx2,u=e.cpy2,h=e.percent;h!==0&&(t.moveTo(r,a),l==null||u==null?(h<1&&(uc(r,o,i,h,ye),o=ye[1],i=ye[2],uc(a,s,n,h,ye),s=ye[1],n=ye[2]),t.quadraticCurveTo(o,s,i,n)):(h<1&&(Jm(r,o,l,i,h,ye),o=ye[1],l=ye[2],i=ye[3],Jm(a,s,u,n,h,ye),s=ye[1],u=ye[2],n=ye[3]),t.bezierCurveTo(o,s,l,u,i,n)))},pointAt:function(t){return _0(this.shape,t,!1)},tangentAt:function(t){var e=_0(this.shape,t,!0);return Bi(e,e)}}),mc=st.extend({type:"arc",shape:{cx:0,cy:0,r:0,startAngle:0,endAngle:Math.PI*2,clockwise:!0},style:{stroke:"#000",fill:null},buildPath:function(t,e){var r=e.cx,a=e.cy,i=Math.max(e.r,0),n=e.startAngle,o=e.endAngle,s=e.clockwise,l=Math.cos(n),u=Math.sin(n);t.moveTo(l*i+r,u*i+a),t.arc(r,a,i,n,o,!s)}}),x0=st.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var t=this.__dirtyPath,e=this.shape.paths,r=0;r<e.length;r++)t=t||e[r].__dirtyPath;this.__dirtyPath=t,this.__dirty=this.__dirty||t},beforeBrush:function(){this._updatePathDirty();for(var t=this.shape.paths||[],e=this.getGlobalScale(),r=0;r<t.length;r++)t[r].path||t[r].createPathProxy(),t[r].path.setScale(e[0],e[1],t[r].segmentIgnoreThreshold)},buildPath:function(t,e){for(var r=e.paths||[],a=0;a<r.length;a++)r[a].buildPath(t,r[a].shape,!0)},afterBrush:function(){for(var t=this.shape.paths||[],e=0;e<t.length;e++)t[e].__dirtyPath=!1},getBoundingRect:function(){return this._updatePathDirty(),st.prototype.getBoundingRect.call(this)}}),yr=function(t){this.colorStops=t||[]};yr.prototype={constructor:yr,addColorStop:function(t,e){this.colorStops.push({offset:t,color:e})}};var qa=function(t,e,r,a,i,n){this.x=t??0,this.y=e??0,this.x2=r??1,this.y2=a??0,this.type="linear",this.global=n||!1,yr.call(this,i)};qa.prototype={constructor:qa},yt(qa,yr);var Il=function(t,e,r,a,i){this.x=t??.5,this.y=e??.5,this.r=r??.5,this.type="radial",this.global=i||!1,yr.call(this,a)};Il.prototype={constructor:Il},yt(Il,yr);function Ae(t){ve.call(this,t),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}Ae.prototype.incremental=!0,Ae.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},Ae.prototype.addDisplayable=function(t,e){e?this._temporaryDisplayables.push(t):this._displayables.push(t),this.dirty()},Ae.prototype.addDisplayables=function(t,e){e=e||!1;for(var r=0;r<t.length;r++)this.addDisplayable(t[r],e)},Ae.prototype.eachPendingDisplayable=function(t){for(var e=this._cursor;e<this._displayables.length;e++)t&&t(this._displayables[e]);for(var e=0;e<this._temporaryDisplayables.length;e++)t&&t(this._temporaryDisplayables[e])},Ae.prototype.update=function(){this.updateTransform();for(var t=this._cursor;t<this._displayables.length;t++){var e=this._displayables[t];e.parent=this,e.update(),e.parent=null}for(var t=0;t<this._temporaryDisplayables.length;t++){var e=this._temporaryDisplayables[t];e.parent=this,e.update(),e.parent=null}},Ae.prototype.brush=function(t,e){for(var r=this._cursor;r<this._displayables.length;r++){var a=this._displayables[r];a.beforeBrush&&a.beforeBrush(t),a.brush(t,r===this._cursor?null:this._displayables[r-1]),a.afterBrush&&a.afterBrush(t)}this._cursor=r;for(var r=0;r<this._temporaryDisplayables.length;r++){var a=this._temporaryDisplayables[r];a.beforeBrush&&a.beforeBrush(t),a.brush(t,r===0?null:this._temporaryDisplayables[r-1]),a.afterBrush&&a.afterBrush(t)}this._temporaryDisplayables=[],this.notClear=!0};var wD=[];Ae.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new it(1/0,1/0,-1/0,-1/0),e=0;e<this._displayables.length;e++){var r=this._displayables[e],a=r.getBoundingRect().clone();r.needLocalTransform()&&a.applyTransform(r.getLocalTransform(wD)),t.union(a)}this._rect=t}return this._rect},Ae.prototype.contain=function(t,e){var r=this.transformCoordToLocal(t,e),a=this.getBoundingRect();if(a.contain(r[0],r[1]))for(var i=0;i<this._displayables.length;i++){var n=this._displayables[i];if(n.contain(t,e))return!0}return!1},yt(Ae,ve);var Ml=Math.max,Ll=Math.min,Pl={},go=1,w0={color:"textFill",textBorderColor:"textStroke",textBorderWidth:"textStrokeWidth"},b0="emphasis",S0="normal",A0=1,T0={},yc={};function Ge(t){return st.extend(t)}function bD(t,e){return mD(t,e)}function _r(t,e){yc[t]=e}function _c(t){if(yc.hasOwnProperty(t))return yc[t]}function po(t,e,r,a){var i=d0(t,e);return r&&(a==="center"&&(r=D0(r,i.getBoundingRect())),I0(i,r)),i}function C0(t,e,r){var a=new Qt({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(i){if(r==="center"){var n={width:i.width,height:i.height};a.setStyle(D0(e,n))}}});return a}function D0(t,e){var r=e.width/e.height,a=t.height*r,i;a<=t.width?i=t.height:(a=t.width,i=a/r);var n=t.x+t.width/2,o=t.y+t.height/2;return{x:n-a/2,y:o-i/2,width:a,height:i}}var He=yD;function I0(t,e){if(!!t.applyTransform){var r=t.getBoundingRect(),a=r.calculateTransform(e);t.applyTransform(a)}}function SD(t){return m0(t.shape,t.shape,t.style),t}function AD(t){return y0(t.shape,t.shape,t.style),t}var El=Ya;function M0(t){return t!=null&&t!=="none"}var L0=j(),P0=0;function TD(t){if(typeof t!="string")return t;var e=L0.get(t);return e||(e=im(t,-.1),P0<1e4&&(L0.set(t,e),P0++)),e}function CD(t){if(!!t.__hoverStlDirty){t.__hoverStlDirty=!1;var e=t.__hoverStl;if(!e){t.__cachedNormalStl=t.__cachedNormalZ2=null;return}var r=t.__cachedNormalStl={};t.__cachedNormalZ2=t.z2;var a=t.style;for(var i in e)e[i]!=null&&(r[i]=a[i]);r.fill=a.fill,r.stroke=a.stroke}}function xc(t){var e=t.__hoverStl;if(!(!e||t.__highlighted)){var r=t.__zr,a=t.useHoverLayer&&r&&r.painter.type==="canvas";if(t.__highlighted=a?"layer":"plain",!(t.isGroup||!r&&t.useHoverLayer)){var i=t,n=t.style;a&&(i=r.addHover(t),n=i.style),Nl(n),a||CD(i),n.extendFrom(e),E0(n,e,"fill"),E0(n,e,"stroke"),_o(n),a||(t.dirty(!1),t.z2+=go)}}}function E0(t,e,r){!M0(e[r])&&M0(t[r])&&(t[r]=TD(t[r]))}function wc(t){var e=t.__highlighted;if(!!e&&(t.__highlighted=!1,!t.isGroup))if(e==="layer")t.__zr&&t.__zr.removeHover(t);else{var r=t.style,a=t.__cachedNormalStl;a&&(Nl(r),t.setStyle(a),_o(r));var i=t.__cachedNormalZ2;i!=null&&t.z2-i===go&&(t.z2=i)}}function mo(t,e,r){var a=S0,i=S0,n;t.__highlighted&&(a=b0,n=!0),e(t,r),t.__highlighted&&(i=b0,n=!0),t.isGroup&&t.traverse(function(o){!o.isGroup&&e(o,r)}),n&&t.__highDownOnUpdate&&t.__highDownOnUpdate(a,i)}function yo(t,e){e=t.__hoverStl=e!==!1&&(t.hoverStyle||e||{}),t.__hoverStlDirty=!0,t.__highlighted&&(t.__cachedNormalStl=null,wc(t),xc(t))}function DD(t){!R0(this,t)&&!this.__highByOuter&&mo(this,xc)}function ID(t){!R0(this,t)&&!this.__highByOuter&&mo(this,wc)}function MD(t){this.__highByOuter|=1<<(t||0),mo(this,xc)}function LD(t){!(this.__highByOuter&=~(1<<(t||0)))&&mo(this,wc)}function R0(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function St(t,e){Ka(t,!0),mo(t,yo,e)}function Ka(t,e){var r=e===!1;if(t.__highDownSilentOnTouch=t.highDownSilentOnTouch,t.__highDownOnUpdate=t.highDownOnUpdate,!r||t.__highDownDispatcher){var a=r?"off":"on";t[a]("mouseover",DD)[a]("mouseout",ID),t[a]("emphasis",MD)[a]("normal",LD),t.__highByOuter=t.__highByOuter||0,t.__highDownDispatcher=!r}}function Rl(t){return!!(t&&t.__highDownDispatcher)}function k0(t){var e=T0[t];return e==null&&A0<=32&&(e=T0[t]=A0++),e}function Te(t,e,r,a,i,n,o){i=i||Pl;var s=i.labelFetcher,l=i.labelDataIndex,u=i.labelDimIndex,h=i.labelProp,f=r.getShallow("show"),c=a.getShallow("show"),v;(f||c)&&(s&&(v=s.getFormattedLabel(l,"normal",null,u,h)),v==null&&(v=$t(i.defaultText)?i.defaultText(l,i):i.defaultText));var d=f?v:null,g=c?Nt(s?s.getFormattedLabel(l,"emphasis",null,u,h):null,v):null;(d!=null||g!=null)&&(Rt(t,r,n,i),Rt(e,a,o,i,!0)),t.text=d,e.text=g}function bc(t,e,r){var a=t.style;e&&(Nl(a),t.setStyle(e),_o(a)),a=t.__hoverStl,r&&a&&(Nl(a),Z(a,r),_o(a))}function Rt(t,e,r,a,i){return N0(t,e,a,i),r&&Z(t,r),t}function PD(t,e,r){var a={isRectText:!0},i;r===!1?i=!0:a.autoColor=r,N0(t,e,a,i)}function N0(t,e,r,a){if(r=r||Pl,r.isRectText){var i;r.getTextPosition?i=r.getTextPosition(e,a):(i=e.getShallow("position")||(a?null:"inside"),i==="outside"&&(i="top")),t.textPosition=i,t.textOffset=e.getShallow("offset");var n=e.getShallow("rotate");n!=null&&(n*=Math.PI/180),t.textRotation=n,t.textDistance=Nt(e.getShallow("distance"),a?null:5)}var o=e.ecModel,s=o&&o.option.textStyle,l=ED(e),u;if(l){u={};for(var h in l)if(l.hasOwnProperty(h)){var f=e.getModel(["rich",h]);O0(u[h]={},f,s,r,a)}}return t.rich=u,O0(t,e,s,r,a,!0),r.forceRich&&!r.textStyle&&(r.textStyle={}),t}function ED(t){for(var e;t&&t!==t.ecModel;){var r=(t.option||Pl).rich;if(r){e=e||{};for(var a in r)r.hasOwnProperty(a)&&(e[a]=1)}t=t.parentModel}return e}function O0(t,e,r,a,i,n){r=!i&&r||Pl,t.textFill=kl(e.getShallow("color"),a)||r.color,t.textStroke=kl(e.getShallow("textBorderColor"),a)||r.textBorderColor,t.textStrokeWidth=Nt(e.getShallow("textBorderWidth"),r.textBorderWidth),i||(n&&(t.insideRollbackOpt=a,_o(t)),t.textFill==null&&(t.textFill=a.autoColor)),t.fontStyle=e.getShallow("fontStyle")||r.fontStyle,t.fontWeight=e.getShallow("fontWeight")||r.fontWeight,t.fontSize=e.getShallow("fontSize")||r.fontSize,t.fontFamily=e.getShallow("fontFamily")||r.fontFamily,t.textAlign=e.getShallow("align"),t.textVerticalAlign=e.getShallow("verticalAlign")||e.getShallow("baseline"),t.textLineHeight=e.getShallow("lineHeight"),t.textWidth=e.getShallow("width"),t.textHeight=e.getShallow("height"),t.textTag=e.getShallow("tag"),(!n||!a.disableBox)&&(t.textBackgroundColor=kl(e.getShallow("backgroundColor"),a),t.textPadding=e.getShallow("padding"),t.textBorderColor=kl(e.getShallow("borderColor"),a),t.textBorderWidth=e.getShallow("borderWidth"),t.textBorderRadius=e.getShallow("borderRadius"),t.textBoxShadowColor=e.getShallow("shadowColor"),t.textBoxShadowBlur=e.getShallow("shadowBlur"),t.textBoxShadowOffsetX=e.getShallow("shadowOffsetX"),t.textBoxShadowOffsetY=e.getShallow("shadowOffsetY")),t.textShadowColor=e.getShallow("textShadowColor")||r.textShadowColor,t.textShadowBlur=e.getShallow("textShadowBlur")||r.textShadowBlur,t.textShadowOffsetX=e.getShallow("textShadowOffsetX")||r.textShadowOffsetX,t.textShadowOffsetY=e.getShallow("textShadowOffsetY")||r.textShadowOffsetY}function kl(t,e){return t!=="auto"?t:e&&e.autoColor?e.autoColor:null}function _o(t){var e=t.textPosition,r=t.insideRollbackOpt,a;if(r&&t.textFill==null){var i=r.autoColor,n=r.isRectText,o=r.useInsideStyle,s=o!==!1&&(o===!0||n&&e&&typeof e=="string"&&e.indexOf("inside")>=0),l=!s&&i!=null;(s||l)&&(a={textFill:t.textFill,textStroke:t.textStroke,textStrokeWidth:t.textStrokeWidth}),s&&(t.textFill="#fff",t.textStroke==null&&(t.textStroke=i,t.textStrokeWidth==null&&(t.textStrokeWidth=2))),l&&(t.textFill=i)}t.insideRollback=a}function Nl(t){var e=t.insideRollback;e&&(t.textFill=e.textFill,t.textStroke=e.textStroke,t.textStrokeWidth=e.textStrokeWidth,t.insideRollback=null)}function Sc(t,e){var r=e&&e.getModel("textStyle");return Ne([t.fontStyle||r&&r.getShallow("fontStyle")||"",t.fontWeight||r&&r.getShallow("fontWeight")||"",(t.fontSize||r&&r.getShallow("fontSize")||12)+"px",t.fontFamily||r&&r.getShallow("fontFamily")||"sans-serif"].join(" "))}function z0(t,e,r,a,i,n){typeof i=="function"&&(n=i,i=null);var o=a&&a.isAnimationEnabled();if(o){var s=t?"Update":"",l=a.getShallow("animationDuration"+s),u=a.getShallow("animationEasing"+s),h=a.getShallow("animationDelay"+s);typeof h=="function"&&(h=h(i,a.getAnimationDelayParams?a.getAnimationDelayParams(e,i):null)),typeof l=="function"&&(l=l(i)),l>0?e.animateTo(r,l,h||0,u,n,!!n):(e.stopAnimation(),e.attr(r),n&&n())}else e.stopAnimation(),e.attr(r),n&&n()}function tt(t,e,r,a,i){z0(!0,t,e,r,a,i)}function oe(t,e,r,a,i){z0(!1,t,e,r,a,i)}function Qa(t,e){for(var r=Hi([]);t&&t!==e;)ea(r,t.getLocalTransform(),r),t=t.parent;return r}function xr(t,e,r){return e&&!Pr(e)&&(e=je.getLocalTransform(e)),r&&(e=$s([],e)),xt([],t,e)}function Ac(t,e,r){var a=e[4]===0||e[5]===0||e[0]===0?1:Math.abs(2*e[4]/e[0]),i=e[4]===0||e[5]===0||e[2]===0?1:Math.abs(2*e[4]/e[2]),n=[t==="left"?-a:t==="right"?a:0,t==="top"?-i:t==="bottom"?i:0];return n=xr(n,e,r),Math.abs(n[0])>Math.abs(n[1])?n[0]>0?"right":"left":n[1]>0?"bottom":"top"}function Ol(t,e,r,a){if(!t||!e)return;function i(s){var l={};return s.traverse(function(u){!u.isGroup&&u.anid&&(l[u.anid]=u)}),l}function n(s){var l={position:Qe(s.position),rotation:s.rotation};return s.shape&&(l.shape=Z({},s.shape)),l}var o=i(t);e.traverse(function(s){if(!s.isGroup&&s.anid){var l=o[s.anid];if(l){var u=n(s);s.attr(n(l)),tt(s,u,r,s.dataIndex)}}})}function B0(t,e){return E(t,function(r){var a=r[0];a=Ml(a,e.x),a=Ll(a,e.x+e.width);var i=r[1];return i=Ml(i,e.y),i=Ll(i,e.y+e.height),[a,i]})}function RD(t,e){var r=Ml(t.x,e.x),a=Ll(t.x+t.width,e.x+e.width),i=Ml(t.y,e.y),n=Ll(t.y+t.height,e.y+e.height);if(a>=r&&n>=i)return{x:r,y:i,width:a-r,height:n-i}}function xo(t,e,r){e=Z({rectHover:!0},e);var a=e.style={strokeNoScale:!0};if(r=r||{x:-1,y:-1,width:2,height:2},t)return t.indexOf("image://")===0?(a.image=t.slice(8),U(a,r),new Qt(e)):po(t.replace("path://",""),e,r,"center")}function wo(t,e,r,a,i){for(var n=0,o=i[i.length-1];n<i.length;n++){var s=i[n];if(V0(t,e,r,a,s[0],s[1],o[0],o[1]))return!0;o=s}}function V0(t,e,r,a,i,n,o,s){var l=r-t,u=a-e,h=o-i,f=s-n,c=Tc(h,f,l,u);if(kD(c))return!1;var v=t-i,d=e-n,g=Tc(v,d,l,u)/c;if(g<0||g>1)return!1;var p=Tc(v,d,h,f)/c;return!(p<0||p>1)}function Tc(t,e,r,a){return t*a-r*e}function kD(t){return t<=1e-6&&t>=-1e-6}_r("circle",mr),_r("sector",ir),_r("ring",Cl),_r("polygon",Se),_r("polyline",Ve),_r("rect",ft),_r("line",ee),_r("bezierCurve",Dl),_r("arc",mc);var Gr=(Object.freeze||Object)({Z2_EMPHASIS_LIFT:go,CACHED_LABEL_STYLE_PROPERTIES:w0,extendShape:Ge,extendPath:bD,registerShape:_r,getShapeClass:_c,makePath:po,makeImage:C0,mergePath:He,resizePath:I0,subPixelOptimizeLine:SD,subPixelOptimizeRect:AD,subPixelOptimize:El,setElementHoverStyle:yo,setHoverStyle:St,setAsHighDownDispatcher:Ka,isHighDownDispatcher:Rl,getHighlightDigit:k0,setLabelStyle:Te,modifyLabelStyle:bc,setTextStyle:Rt,setText:PD,getFont:Sc,updateProps:tt,initProps:oe,getTransform:Qa,applyTransform:xr,transformDirection:Ac,groupTransition:Ol,clipPointsByRect:B0,clipRectByRect:RD,createIcon:xo,linePolygonIntersect:wo,lineLineIntersect:V0,Group:G,Image:Qt,Text:nt,Circle:mr,Sector:ir,Ring:Cl,Polygon:Se,Polyline:Ve,Rect:ft,Line:ee,BezierCurve:Dl,Arc:mc,IncrementalDisplayable:Ae,CompoundPath:x0,LinearGradient:qa,RadialGradient:Il,BoundingRect:it}),ND=["textStyle","color"],OD={getTextColor:function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(ND):null)},getFont:function(){return Sc({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},getTextRect:function(t){return cr(t,this.getFont(),this.getShallow("align"),this.getShallow("verticalAlign")||this.getShallow("baseline"),this.getShallow("padding"),this.getShallow("lineHeight"),this.getShallow("rich"),this.getShallow("truncateText"))}},zD=qi([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]),BD={getItemStyle:function(t,e){var r=zD(this,t,e),a=this.getBorderLineDash();return a&&(r.lineDash=a),r},getBorderLineDash:function(){var t=this.get("borderType");return t==="solid"||t==null?null:t==="dashed"?[5,5]:[1,1]}},zl=pt,G0=de();function ht(t,e,r){this.parentModel=e,this.ecModel=r,this.option=t}ht.prototype={constructor:ht,init:null,mergeOption:function(t){J(this.option,t,!0)},get:function(t,e){return t==null?this.option:H0(this.option,this.parsePath(t),!e&&Cc(this,t))},getShallow:function(t,e){var r=this.option,a=r==null?r:r[t],i=!e&&Cc(this,t);return a==null&&i&&(a=i.getShallow(t)),a},getModel:function(t,e){var r=t==null?this.option:H0(this.option,t=this.parsePath(t)),a;return e=e||(a=Cc(this,t))&&a.getModel(t),new ht(r,e,this.ecModel)},isEmpty:function(){return this.option==null},restoreData:function(){},clone:function(){var t=this.constructor;return new t(Y(this.option))},setReadOnly:function(t){},parsePath:function(t){return typeof t=="string"&&(t=t.split(".")),t},customizeGetParent:function(t){G0(this).getParent=t},isAnimationEnabled:function(){if(!at.node){if(this.option.animation!=null)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}}};function H0(t,e,r){for(var a=0;a<e.length&&!(!!e[a]&&(t=t&&typeof t=="object"?t[e[a]]:null,t==null));a++);return t==null&&r&&(t=r.get(e)),t}function Cc(t,e){var r=G0(t).getParent;return r?r.call(t,e):t.parentModel}lo(ht),dl(ht),zl(ht,UC),zl(ht,ZC),zl(ht,OD),zl(ht,BD);var VD=0;function bo(t){return[t||"",VD++,Math.random().toFixed(5)].join("_")}function GD(t){var e={};return t.registerSubTypeDefaulter=function(r,a){r=oa(r),e[r.main]=a},t.determineSubType=function(r,a){var i=a.type;if(!i){var n=oa(r).main;t.hasSubTypes(r)&&e[n]&&(i=e[n](a))}return i},t}function HD(t,e){t.topologicalTravel=function(n,o,s,l){if(!n.length)return;var u=r(o),h=u.graph,f=u.noEntryList,c={};for(T(n,function(y){c[y]=!0});f.length;){var v=f.pop(),d=h[v],g=!!c[v];g&&(s.call(l,v,d.originalDeps.slice()),delete c[v]),T(d.successor,g?m:p)}T(c,function(){throw new Error("Circle dependency may exists")});function p(y){h[y].entryCount--,h[y].entryCount===0&&f.push(y)}function m(y){c[y]=!0,p(y)}};function r(n){var o={},s=[];return T(n,function(l){var u=a(o,l),h=u.originalDeps=e(l),f=i(h,n);u.entryCount=f.length,u.entryCount===0&&s.push(l),T(f,function(c){ut(u.predecessor,c)<0&&u.predecessor.push(c);var v=a(o,c);ut(v.successor,c)<0&&v.successor.push(l)})}),{graph:o,noEntryList:s}}function a(n,o){return n[o]||(n[o]={predecessor:[],successor:[]}),n[o]}function i(n,o){var s=[];return T(n,function(l){ut(o,l)>=0&&s.push(l)}),s}}var F0=1e-4;function FD(t){return t.replace(/^\s+|\s+$/g,"")}function At(t,e,r,a){var i=e[1]-e[0],n=r[1]-r[0];if(i===0)return n===0?r[0]:(r[0]+r[1])/2;if(a)if(i>0){if(t<=e[0])return r[0];if(t>=e[1])return r[1]}else{if(t>=e[0])return r[0];if(t<=e[1])return r[1]}else{if(t===e[0])return r[0];if(t===e[1])return r[1]}return(t-e[0])/i*n+r[0]}function R(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%";break}return typeof t=="string"?FD(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):t==null?NaN:+t}function Ft(t,e,r){return e==null&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),r?t:+t}function Ja(t){return t.sort(function(e,r){return e-r}),t}function W0(t){if(t=+t,isNaN(t))return 0;for(var e=1,r=0;Math.round(t*e)/e!==t;)e*=10,r++;return r}function Bl(t){var e=t.toString(),r=e.indexOf("e");if(r>0){var a=+e.slice(r+1);return a<0?-a:0}else{var i=e.indexOf(".");return i<0?0:e.length-1-i}}function Dc(t,e){var r=Math.log,a=Math.LN10,i=Math.floor(r(t[1]-t[0])/a),n=Math.round(r(Math.abs(e[1]-e[0]))/a),o=Math.min(Math.max(-i+n,0),20);return isFinite(o)?o:20}function U0(t,e,r){if(!t[e])return 0;var a=ki(t,function(d,g){return d+(isNaN(g)?0:g)},0);if(a===0)return 0;for(var i=Math.pow(10,r),n=E(t,function(d){return(isNaN(d)?0:d)/a*i*100}),o=i*100,s=E(n,function(d){return Math.floor(d)}),l=ki(s,function(d,g){return d+g},0),u=E(n,function(d,g){return d-s[g]});l<o;){for(var h=Number.NEGATIVE_INFINITY,f=null,c=0,v=u.length;c<v;++c)u[c]>h&&(h=u[c],f=c);++s[f],u[f]=0,++l}return s[e]/i}var Ic=9007199254740991;function Mc(t){var e=Math.PI*2;return(t%e+e)%e}function So(t){return t>-F0&&t<F0}var WD=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function Ao(t){if(t instanceof Date)return t;if(typeof t=="string"){var e=WD.exec(t);if(!e)return new Date(NaN);if(e[8]){var r=+e[4]||0;return e[8].toUpperCase()!=="Z"&&(r-=e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,r,+(e[5]||0),+e[6]||0,+e[7]||0))}else return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,+e[7]||0)}else if(t==null)return new Date(NaN);return new Date(Math.round(t))}function $0(t){return Math.pow(10,Lc(t))}function Lc(t){if(t===0)return 0;var e=Math.floor(Math.log(t)/Math.LN10);return t/Math.pow(10,e)>=10&&e++,e}function Pc(t,e){var r=Lc(t),a=Math.pow(10,r),i=t/a,n;return e?i<1.5?n=1:i<2.5?n=2:i<4?n=3:i<7?n=5:n=10:i<1?n=1:i<2?n=2:i<3?n=3:i<5?n=5:n=10,t=n*a,r>=-20?+t.toFixed(r<0?-r:0):t}function UD(t,e){var r=(t.length-1)*e+1,a=Math.floor(r),i=+t[a-1],n=r-a;return n?i+n*(t[a]-i):i}function Ec(t){t.sort(function(l,u){return s(l,u,0)?-1:1});for(var e=-1/0,r=1,a=0;a<t.length;){for(var i=t[a].interval,n=t[a].close,o=0;o<2;o++)i[o]<=e&&(i[o]=e,n[o]=o?1:1-r),e=i[o],r=n[o];i[0]===i[1]&&n[0]*n[1]!==1?t.splice(a,1):a++}return t;function s(l,u,h){return l.interval[h]<u.interval[h]||l.interval[h]===u.interval[h]&&(l.close[h]-u.close[h]===(h?-1:1)||!h&&s(l,u,1))}}function Z0(t){return t-parseFloat(t)>=0}var $D=(Object.freeze||Object)({linearMap:At,parsePercent:R,round:Ft,asc:Ja,getPrecision:W0,getPrecisionSafe:Bl,getPixelPrecision:Dc,getPercentWithPrecision:U0,MAX_SAFE_INTEGER:Ic,remRadian:Mc,isRadianAroundZero:So,parseDate:Ao,quantity:$0,quantityExponent:Lc,nice:Pc,quantile:UD,reformIntervals:Ec,isNumeric:Z0});function da(t){return isNaN(t)?"-":(t=(t+"").split("."),t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:""))}function Y0(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,function(r,a){return a.toUpperCase()}),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}var ja=Bh,ZD=/([&<>"'])/g,YD={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Tt(t){return t==null?"":(t+"").replace(ZD,function(e,r){return YD[r]})}var X0=["a","b","c","d","e","f","g"],Rc=function(t,e){return"{"+t+(e??"")+"}"};function kc(t,e,r){P(e)||(e=[e]);var a=e.length;if(!a)return"";for(var i=e[0].$vars||[],n=0;n<i.length;n++){var o=X0[n];t=t.replace(Rc(o),Rc(o,0))}for(var s=0;s<a;s++)for(var l=0;l<i.length;l++){var u=e[s][i[l]];t=t.replace(Rc(X0[l],s),r?Tt(u):u)}return t}function q0(t,e,r){return T(e,function(a,i){t=t.replace("{"+i+"}",r?Tt(a):a)}),t}function Vl(t,i){t=_t(t)?{color:t,extraCssText:i}:t||{};var r=t.color,a=t.type,i=t.extraCssText,n=t.renderMode||"html",o=t.markerId||"X";return r?n==="html"?a==="subItem"?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+Tt(r)+";"+(i||"")+'"></span>':'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:'+Tt(r)+";"+(i||"")+'"></span>':{renderMode:n,content:"{marker"+o+"|}  ",style:{color:r}}:""}function en(t,e){return t+="","0000".substr(0,e-t.length)+t}function Nc(t,e,r){(t==="week"||t==="month"||t==="quarter"||t==="half-year"||t==="year")&&(t=`MM-dd
yyyy`);var a=Ao(e),i=r?"UTC":"",n=a["get"+i+"FullYear"](),o=a["get"+i+"Month"]()+1,s=a["get"+i+"Date"](),l=a["get"+i+"Hours"](),u=a["get"+i+"Minutes"](),h=a["get"+i+"Seconds"](),f=a["get"+i+"Milliseconds"]();return t=t.replace("MM",en(o,2)).replace("M",o).replace("yyyy",n).replace("yy",n%100).replace("dd",en(s,2)).replace("d",s).replace("hh",en(l,2)).replace("h",l).replace("mm",en(u,2)).replace("m",u).replace("ss",en(h,2)).replace("s",h).replace("SSS",en(f,3)),t}function Gl(t){return t&&t.charAt(0).toUpperCase()+t.substr(1)}var K0=Mf;function XD(t){return cr(t.text,t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich,t.truncate)}function qD(t,e,r,a,i,n,o,s){return cr(t,e,r,a,i,s,n,o)}function To(t,e){if(e==="_blank"||e==="blank"){var r=window.open();r.opener=null,r.location=t}else window.open(t,e)}var KD=(Object.freeze||Object)({addCommas:da,toCamelCase:Y0,normalizeCssArray:ja,encodeHTML:Tt,formatTpl:kc,formatTplSimple:q0,getTooltipMarker:Vl,formatTime:Nc,capitalFirst:Gl,truncateText:K0,getTextBoundingRect:XD,getTextRect:qD,windowOpen:To}),Hl=T,Q0=["left","right","top","bottom","width","height"],ti=[["width","left","right"],["height","top","bottom"]];function Oc(t,e,r,a,i){var n=0,o=0;a==null&&(a=1/0),i==null&&(i=1/0);var s=0;e.eachChild(function(l,u){var h=l.position,f=l.getBoundingRect(),c=e.childAt(u+1),v=c&&c.getBoundingRect(),d,g;if(t==="horizontal"){var p=f.width+(v?-v.x+f.x:0);d=n+p,d>a||l.newline?(n=0,d=p,o+=s+r,s=f.height):s=Math.max(s,f.height)}else{var m=f.height+(v?-v.y+f.y:0);g=o+m,g>i||l.newline?(n+=s+r,o=0,g=m,s=f.width):s=Math.max(s,f.width)}l.newline||(h[0]=n,h[1]=o,t==="horizontal"?n=d+r:o=g+r)})}var ei=Oc,KB=K(Oc,"vertical"),QB=K(Oc,"horizontal");function QD(t,e,r){var a=e.width,i=e.height,n=R(t.x,a),o=R(t.y,i),s=R(t.x2,a),l=R(t.y2,i);return(isNaN(n)||isNaN(parseFloat(t.x)))&&(n=0),(isNaN(s)||isNaN(parseFloat(t.x2)))&&(s=a),(isNaN(o)||isNaN(parseFloat(t.y)))&&(o=0),(isNaN(l)||isNaN(parseFloat(t.y2)))&&(l=i),r=ja(r||0),{width:Math.max(s-n-r[1]-r[3],0),height:Math.max(l-o-r[0]-r[2],0)}}function Ot(t,e,r){r=ja(r||0);var a=e.width,i=e.height,n=R(t.left,a),o=R(t.top,i),s=R(t.right,a),l=R(t.bottom,i),u=R(t.width,a),h=R(t.height,i),f=r[2]+r[0],c=r[1]+r[3],v=t.aspect;switch(isNaN(u)&&(u=a-s-c-n),isNaN(h)&&(h=i-l-f-o),v!=null&&(isNaN(u)&&isNaN(h)&&(v>a/i?u=a*.8:h=i*.8),isNaN(u)&&(u=v*h),isNaN(h)&&(h=u/v)),isNaN(n)&&(n=a-s-u-c),isNaN(o)&&(o=i-l-h-f),t.left||t.right){case"center":n=a/2-u/2-r[3];break;case"right":n=a-u-c;break}switch(t.top||t.bottom){case"middle":case"center":o=i/2-h/2-r[0];break;case"bottom":o=i-h-f;break}n=n||0,o=o||0,isNaN(u)&&(u=a-c-n-(s||0)),isNaN(h)&&(h=i-f-o-(l||0));var d=new it(n+r[3],o+r[0],u,h);return d.margin=r,d}function Fl(t,e,r,a,i){var n=!i||!i.hv||i.hv[0],o=!i||!i.hv||i.hv[1],s=i&&i.boundingMode||"all";if(!(!n&&!o)){var l;if(s==="raw")l=t.type==="group"?new it(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(l=t.getBoundingRect(),t.needLocalTransform()){var u=t.getLocalTransform();l=l.clone(),l.applyTransform(u)}e=Ot(U({width:l.width,height:l.height},e),r,a);var h=t.position,f=n?e.x-l.x:0,c=o?e.y-l.y:0;t.attr("position",s==="raw"?[f,c]:[h[0]+f,h[1]+c])}}function JD(t,e){return t[ti[e][0]]!=null||t[ti[e][1]]!=null&&t[ti[e][2]]!=null}function ga(t,e,r){!Q(r)&&(r={});var a=r.ignoreSize;!P(a)&&(a=[a,a]);var i=o(ti[0],0),n=o(ti[1],1);u(ti[0],t,i),u(ti[1],t,n);function o(h,f){var c={},v=0,d={},g=0,p=2;if(Hl(h,function(_){d[_]=t[_]}),Hl(h,function(_){s(e,_)&&(c[_]=d[_]=e[_]),l(c,_)&&v++,l(d,_)&&g++}),a[f])return l(e,h[1])?d[h[2]]=null:l(e,h[2])&&(d[h[1]]=null),d;if(g===p||!v)return d;if(v>=p)return c;for(var m=0;m<h.length;m++){var y=h[m];if(!s(c,y)&&s(t,y)){c[y]=t[y];break}}return c}function s(h,f){return h.hasOwnProperty(f)}function l(h,f){return h[f]!=null&&h[f]!=="auto"}function u(h,f,c){Hl(h,function(v){f[v]=c[v]})}}function rn(t){return J0({},t)}function J0(t,e){return e&&t&&Hl(Q0,function(r){e.hasOwnProperty(r)&&(t[r]=e[r])}),t}var jD={getBoxLayoutParams:function(){return{left:this.get("left"),top:this.get("top"),right:this.get("right"),bottom:this.get("bottom"),width:this.get("width"),height:this.get("height")}}},tI=de(),ct=ht.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(t,e,r,a){ht.call(this,t,e,r,a),this.uid=bo("ec_cpt_model")},init:function(t,e,r,a){this.mergeDefaultAndTheme(t,r)},mergeDefaultAndTheme:function(t,e){var r=this.layoutMode,a=r?rn(t):{},i=e.getTheme();J(t,i.get(this.mainType)),J(t,this.getDefaultOption()),r&&ga(t,a,r)},mergeOption:function(t,e){J(this.option,t,!0);var r=this.layoutMode;r&&ga(this.option,t,r)},optionUpdated:function(t,e){},getDefaultOption:function(){var t=tI(this);if(!t.defaultOption){for(var e=[],r=this.constructor;r;){var a=r.prototype.defaultOption;a&&e.push(a),r=r.superClass}for(var i={},n=e.length-1;n>=0;n--)i=J(i,e[n],!0);t.defaultOption=i}return t.defaultOption},getReferringComponents:function(t){return this.ecModel.queryComponents({mainType:t,index:this.get(t+"Index",!0),id:this.get(t+"Id",!0)})}});gl(ct,{registerWhenExtend:!0}),GD(ct),HD(ct,eI);function eI(t){var e=[];return T(ct.getClassesByMainType(t),function(r){e=e.concat(r.prototype.dependencies||[])}),e=E(e,function(r){return oa(r).main}),t!=="dataset"&&ut(e,"dataset")<=0&&e.unshift("dataset"),e}pt(ct,jD);var j0="";typeof navigator<"u"&&(j0=navigator.platform||"");var rI={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:j0.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,animation:"auto",animationDuration:1e3,animationDurationUpdate:300,animationEasing:"exponentialOut",animationEasingUpdate:"cubicOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},zc=de();function aI(t,e){for(var r=t.length,a=0;a<r;a++)if(t[a].length>e)return t[a];return t[r-1]}var Bc={clearColorPalette:function(){zc(this).colorIdx=0,zc(this).colorNameMap={}},getColorFromPalette:function(t,e,r){e=e||this;var a=zc(e),i=a.colorIdx||0,n=a.colorNameMap=a.colorNameMap||{};if(n.hasOwnProperty(t))return n[t];var o=te(this.get("color",!0)),s=this.get("colorLayer",!0),l=r==null||!s?o:aI(s,r);if(l=l||o,!(!l||!l.length)){var u=l[i];return t&&(n[t]=u),a.colorIdx=(i+1)%l.length,u}}},ri="original",Co="arrayRows",Do="objectRows",Io="keyedColumns",ty="unknown",Mo="typedArray",ey="column",Vc="row";function nr(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===Io?{}:[]),this.sourceFormat=t.sourceFormat||ty,this.seriesLayoutBy=t.seriesLayoutBy||ey,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&j(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}nr.seriesDataToSource=function(t){return new nr({data:t,sourceFormat:Ke(t)?Mo:ri,fromDataset:!1})},dl(nr);var se={Must:1,Might:2,Not:3},an=de();function iI(t){var e=t.option.source,r=ty;if(Ke(e))r=Mo;else if(P(e)){e.length===0&&(r=Co);for(var a=0,i=e.length;a<i;a++){var n=e[a];if(n!=null){if(P(n)){r=Co;break}else if(Q(n)){r=Do;break}}}}else if(Q(e)){for(var o in e)if(e.hasOwnProperty(o)&&Pr(e[o])){r=Io;break}}else if(e!=null)throw new Error("Invalid data");an(t).sourceFormat=r}function nI(t){return an(t).source}function oI(t){an(t).datasetMap=j()}function ry(t){var e=t.option,r=e.data,a=Ke(r)?Mo:ri,i=!1,n=e.seriesLayoutBy,o=e.sourceHeader,s=e.dimensions,l=Hc(t);if(l){var u=l.option;r=u.source,a=an(l).sourceFormat,i=!0,n=n||u.seriesLayoutBy,o==null&&(o=u.sourceHeader),s=s||u.dimensions}var h=sI(r,a,n,o,s);an(t).source=new nr({data:r,fromDataset:i,seriesLayoutBy:n,sourceFormat:a,dimensionsDefine:h.dimensionsDefine,startIndex:h.startIndex,dimensionsDetectCount:h.dimensionsDetectCount,encodeDefine:e.encode})}function sI(t,e,r,a,i){if(!t)return{dimensionsDefine:ay(i)};var n,o;if(e===Co)a==="auto"||a==null?iy(function(l){l!=null&&l!=="-"&&(_t(l)?o==null&&(o=1):o=0)},r,t,10):o=a?1:0,!i&&o===1&&(i=[],iy(function(l,u){i[u]=l??""},r,t)),n=i?i.length:r===Vc?t.length:t[0]?t[0].length:null;else if(e===Do)i||(i=lI(t));else if(e===Io)i||(i=[],T(t,function(l,u){i.push(u)}));else if(e===ri){var s=so(t[0]);n=P(s)&&s.length||1}else e===Mo&&z&&ot(!!i,"dimensions must be given if data is TypedArray.");return{startIndex:o,dimensionsDefine:ay(i),dimensionsDetectCount:n}}function ay(t){if(!!t){var e=j();return E(t,function(r,a){if(r=Z({},Q(r)?r:{name:r}),r.name==null)return r;r.name+="",r.displayName==null&&(r.displayName=r.name);var i=e.get(r.name);return i?r.name+="-"+i.count++:e.set(r.name,{count:1}),r})}}function iy(t,e,r,a){if(a==null&&(a=1/0),e===Vc)for(var i=0;i<r.length&&i<a;i++)t(r[i]?r[i][0]:null,i);else for(var n=r[0]||[],i=0;i<n.length&&i<a;i++)t(n[i],i)}function lI(t){for(var e=0,r;e<t.length&&!(r=t[e++]););if(r){var a=[];return T(r,function(i,n){a.push(n)}),a}}function ny(t,e,r){var a={},i=Hc(e);if(!i||!t)return a;var n=[],o=[],s=e.ecModel,l=an(s).datasetMap,u=i.uid+"_"+r.seriesLayoutBy,h,f;t=t.slice(),T(t,function(g,p){!Q(g)&&(t[p]={name:g}),g.type==="ordinal"&&h==null&&(h=p,f=d(t[p])),a[g.name]=[]});var c=l.get(u)||l.set(u,{categoryWayDim:f,valueWayDim:0});T(t,function(g,p){var m=g.name,y=d(g);if(h==null){var _=c.valueWayDim;v(a[m],_,y),v(o,_,y),c.valueWayDim+=y}else if(h===p)v(a[m],0,y),v(n,0,y);else{var _=c.categoryWayDim;v(a[m],_,y),v(o,_,y),c.categoryWayDim+=y}});function v(g,p,m){for(var y=0;y<m;y++)g.push(p+y)}function d(g){var p=g.dimsDef;return p?p.length:1}return n.length&&(a.itemName=n),o.length&&(a.seriesName=o),a}function Gc(t,e,r){var a={},i=Hc(t);if(!i)return a;var n=e.sourceFormat,o=e.dimensionsDefine,s;(n===Do||n===Io)&&T(o,function(h,f){(Q(h)?h.name:h)==="name"&&(s=f)});var l=function(){for(var h={},f={},c=[],v=0,d=Math.min(5,r);v<d;v++){var g=oy(e.data,n,e.seriesLayoutBy,o,e.startIndex,v);c.push(g);var p=g===se.Not;if(p&&h.v==null&&v!==s&&(h.v=v),(h.n==null||h.n===h.v||!p&&c[h.n]===se.Not)&&(h.n=v),m(h)&&c[h.n]!==se.Not)return h;p||(g===se.Might&&f.v==null&&v!==s&&(f.v=v),(f.n==null||f.n===f.v)&&(f.n=v))}function m(y){return y.v!=null&&y.n!=null}return m(h)?h:m(f)?f:null}();if(l){a.value=l.v;var u=s??l.n;a.itemName=[u],a.seriesName=[u]}return a}function Hc(t){var e=t.option,r=e.data;if(!r)return t.ecModel.getComponent("dataset",e.datasetIndex||0)}function uI(t,e){return oy(t.data,t.sourceFormat,t.seriesLayoutBy,t.dimensionsDefine,t.startIndex,e)}function oy(t,e,r,a,i,n){var o,s=5;if(Ke(t))return se.Not;var l,u;if(a){var h=a[n];Q(h)?(l=h.name,u=h.type):_t(h)&&(l=h)}if(u!=null)return u==="ordinal"?se.Must:se.Not;if(e===Co)if(r===Vc){for(var f=t[n],c=0;c<(f||[]).length&&c<s;c++)if((o=p(f[i+c]))!=null)return o}else for(var c=0;c<t.length&&c<s;c++){var v=t[i+c];if(v&&(o=p(v[n]))!=null)return o}else if(e===Do){if(!l)return se.Not;for(var c=0;c<t.length&&c<s;c++){var d=t[c];if(d&&(o=p(d[l]))!=null)return o}}else if(e===Io){if(!l)return se.Not;var f=t[l];if(!f||Ke(f))return se.Not;for(var c=0;c<f.length&&c<s;c++)if((o=p(f[c]))!=null)return o}else if(e===ri)for(var c=0;c<t.length&&c<s;c++){var d=t[c],g=so(d);if(!P(g))return se.Not;if((o=p(g[n]))!=null)return o}function p(m){var y=_t(m);if(m!=null&&isFinite(m)&&m!=="")return y?se.Might:se.Not;if(y&&m!=="-")return se.Must}return se.Not}var Fc="\0_ec_inner",Wc=ht.extend({init:function(t,e,r,a){r=r||{},this.option=null,this._theme=new ht(r),this._optionManager=a},setOption:function(t,e){ot(!(Fc in t),"please use chart.getOption()"),this._optionManager.setOption(t,e),this.resetOption(null)},resetOption:function(t){var e=!1,r=this._optionManager;if(!t||t==="recreate"){var a=r.mountOption(t==="recreate");!this.option||t==="recreate"?cI.call(this,a):(this.restoreData(),this.mergeOption(a)),e=!0}if((t==="timeline"||t==="media")&&this.restoreData(),!t||t==="recreate"||t==="timeline"){var i=r.getTimelineOption(this);i&&(this.mergeOption(i),e=!0)}if(!t||t==="recreate"||t==="media"){var n=r.getMediaOption(this,this._api);n.length&&T(n,function(o){this.mergeOption(o,e=!0)},this)}return e},mergeOption:function(t){var e=this.option,r=this._componentsMap,a=[];oI(this),T(t,function(n,o){n!=null&&(ct.hasClass(o)?o&&a.push(o):e[o]=e[o]==null?Y(n):J(e[o],n,!0))}),ct.topologicalTravel(a,ct.getAllClassMainTypes(),i,this);function i(n,o){var s=te(t[n]),l=ic(r.get(n),s);Um(l),T(l,function(h,f){var c=h.option;Q(c)&&(h.keyInfo.mainType=n,h.keyInfo.subType=dI(n,c,h.exist))});var u=vI(r,o);e[n]=[],r.set(n,[]),T(l,function(h,f){var c=h.exist,v=h.option;if(ot(Q(v)||c,"Empty component definition"),!v)c.mergeOption({},this),c.optionUpdated({},!1);else{var d=ct.getClass(n,h.keyInfo.subType,!0);if(c&&c.constructor===d)c.name=h.keyInfo.name,c.mergeOption(v,this),c.optionUpdated(v,!1);else{var g=Z({dependentModels:u,componentIndex:f},h.keyInfo);c=new d(v,this,this,g),Z(c,g),c.init(v,this,this,g),c.optionUpdated(null,!0)}}r.get(n)[f]=c,e[n][f]=c.option},this),n==="series"&&Uc(this,r.get("series"))}this._seriesIndicesMap=j(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var t=Y(this.option);return T(t,function(e,r){if(ct.hasClass(r)){for(var e=te(e),a=e.length-1;a>=0;a--)fl(e[a])&&e.splice(a,1);t[r]=e}}),delete t[Fc],t},getTheme:function(){return this._theme},getComponent:function(t,e){var r=this._componentsMap.get(t);if(r)return r[e||0]},queryComponents:function(t){var e=t.mainType;if(!e)return[];var r=t.index,a=t.id,i=t.name,n=this._componentsMap.get(e);if(!n||!n.length)return[];var o;if(r!=null)P(r)||(r=[r]),o=Ht(E(r,function(u){return n[u]}),function(u){return!!u});else if(a!=null){var s=P(a);o=Ht(n,function(u){return s&&ut(a,u.id)>=0||!s&&u.id===a})}else if(i!=null){var l=P(i);o=Ht(n,function(u){return l&&ut(i,u.name)>=0||!l&&u.name===i})}else o=n.slice();return sy(o,t)},findComponents:function(t){var e=t.query,r=t.mainType,a=n(e),i=a?this.queryComponents(a):this._componentsMap.get(r);return o(sy(i,t));function n(s){var l=r+"Index",u=r+"Id",h=r+"Name";return s&&(s[l]!=null||s[u]!=null||s[h]!=null)?{mainType:r,index:s[l],id:s[u],name:s[h]}:null}function o(s){return t.filter?Ht(s,t.filter):s}},eachComponent:function(t,e,r){var a=this._componentsMap;if(typeof t=="function")r=e,e=t,a.each(function(n,o){T(n,function(s,l){e.call(r,o,s,l)})});else if(_t(t))T(a.get(t),e,r);else if(Q(t)){var i=this.findComponents(t);T(i,e,r)}},getSeriesByName:function(t){var e=this._componentsMap.get("series");return Ht(e,function(r){return r.name===t})},getSeriesByIndex:function(t){return this._componentsMap.get("series")[t]},getSeriesByType:function(t){var e=this._componentsMap.get("series");return Ht(e,function(r){return r.subType===t})},getSeries:function(){return this._componentsMap.get("series").slice()},getSeriesCount:function(){return this._componentsMap.get("series").length},eachSeries:function(t,e){Wl(this),T(this._seriesIndices,function(r){var a=this._componentsMap.get("series")[r];t.call(e,a,r)},this)},eachRawSeries:function(t,e){T(this._componentsMap.get("series"),t,e)},eachSeriesByType:function(t,e,r){Wl(this),T(this._seriesIndices,function(a){var i=this._componentsMap.get("series")[a];i.subType===t&&e.call(r,i,a)},this)},eachRawSeriesByType:function(t,e,r){return T(this.getSeriesByType(t),e,r)},isSeriesFiltered:function(t){return Wl(this),this._seriesIndicesMap.get(t.componentIndex)==null},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(t,e){Wl(this);var r=Ht(this._componentsMap.get("series"),t,e);Uc(this,r)},restoreData:function(t){var e=this._componentsMap;Uc(this,e.get("series"));var r=[];e.each(function(a,i){r.push(i)}),ct.topologicalTravel(r,ct.getAllClassMainTypes(),function(a,i){T(e.get(a),function(n){(a!=="series"||!hI(n,t))&&n.restoreData()})})}});function hI(t,e){if(e){var r=e.seiresIndex,a=e.seriesId,i=e.seriesName;return r!=null&&t.componentIndex!==r||a!=null&&t.id!==a||i!=null&&t.name!==i}}function fI(t,e){var r=t.color&&!t.colorLayer;T(e,function(a,i){i==="colorLayer"&&r||ct.hasClass(i)||(typeof a=="object"?t[i]=t[i]?J(t[i],a,!1):Y(a):t[i]==null&&(t[i]=a))})}function cI(t){t=t,this.option={},this.option[Fc]=1,this._componentsMap=j({series:[]}),this._seriesIndices,this._seriesIndicesMap,fI(t,this._theme.option),J(t,rI,!1),this.mergeOption(t)}function vI(t,e){P(e)||(e=e?[e]:[]);var r={};return T(e,function(a){r[a]=(t.get(a)||[]).slice()}),r}function dI(t,e,r){var a=e.type?e.type:r?r.subType:ct.determineSubType(t,e);return a}function Uc(t,e){t._seriesIndicesMap=j(t._seriesIndices=E(e,function(r){return r.componentIndex})||[])}function sy(t,e){return e.hasOwnProperty("subType")?Ht(t,function(r){return r.subType===e.subType}):t}function Wl(t){if(z&&!t._seriesIndices)throw new Error("Option should contains series.")}pt(Wc,Bc);var gI=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"];function ly(t){T(gI,function(e){this[e]=X(t[e],t)},this)}var $c={};function re(){this._coordinateSystems=[]}re.prototype={constructor:re,create:function(t,e){var r=[];T($c,function(a,i){var n=a.create(t,e);r=r.concat(n||[])}),this._coordinateSystems=r},update:function(t,e){T(this._coordinateSystems,function(r){r.update&&r.update(t,e)})},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},re.register=function(t,e){$c[t]=e},re.get=function(t){return $c[t]};var Ul=T,ai=Y,$l=E,uy=J,pI=/^(min|max)?(.+)$/;function Zc(t){this._api=t,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}Zc.prototype={constructor:Zc,setOption:function(t,e){t&&T(te(t.series),function(i){i&&i.data&&Ke(i.data)&&Vh(i.data)}),t=ai(t);var r=this._optionBackup,a=mI.call(this,t,e,!r);this._newBaseOption=a.baseOption,r?(wI(r.baseOption,a.baseOption),a.timelineOptions.length&&(r.timelineOptions=a.timelineOptions),a.mediaList.length&&(r.mediaList=a.mediaList),a.mediaDefault&&(r.mediaDefault=a.mediaDefault)):this._optionBackup=a},mountOption:function(t){var e=this._optionBackup;return this._timelineOptions=$l(e.timelineOptions,ai),this._mediaList=$l(e.mediaList,ai),this._mediaDefault=ai(e.mediaDefault),this._currentMediaIndices=[],ai(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,r=this._timelineOptions;if(r.length){var a=t.getComponent("timeline");a&&(e=ai(r[a.getCurrentIndex()],!0))}return e},getMediaOption:function(t){var e=this._api.getWidth(),r=this._api.getHeight(),a=this._mediaList,i=this._mediaDefault,n=[],o=[];if(!a.length&&!i)return o;for(var s=0,l=a.length;s<l;s++)yI(a[s].query,e,r)&&n.push(s);return!n.length&&i&&(n=[-1]),n.length&&!xI(n,this._currentMediaIndices)&&(o=$l(n,function(u){return ai(u===-1?i.option:a[u].option)})),this._currentMediaIndices=n,o}};function mI(t,e,r){var a=[],i=[],n,o,s=t.timeline;if(t.baseOption&&(o=t.baseOption),(s||t.options)&&(o=o||{},a=(t.options||[]).slice()),t.media){o=o||{};var l=t.media;Ul(l,function(u){u&&u.option&&(u.query?i.push(u):n||(n=u))})}return o||(o=t),o.timeline||(o.timeline=s),Ul([o].concat(a).concat(E(i,function(u){return u.option})),function(u){Ul(e,function(h){h(u,r)})}),{baseOption:o,timelineOptions:a,mediaDefault:n,mediaList:i}}function yI(t,e,r){var a={width:e,height:r,aspectratio:e/r},i=!0;return T(t,function(n,o){var s=o.match(pI);if(!(!s||!s[1]||!s[2])){var l=s[1],u=s[2].toLowerCase();_I(a[u],n,l)||(i=!1)}}),i}function _I(t,e,r){return r==="min"?t>=e:r==="max"?t<=e:t===e}function xI(t,e){return t.join(",")===e.join(",")}function wI(t,e){e=e||{},Ul(e,function(r,a){if(r!=null){var i=t[a];if(!ct.hasClass(a))t[a]=uy(i,r,!0);else{r=te(r),i=te(i);var n=ic(i,r);t[a]=$l(n,function(o){return o.option&&o.exist?uy(o.exist,o.option,!0):o.exist||o.option})}}})}var or=T,Lo=Q,hy=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Yc(t){var e=t&&t.itemStyle;if(!!e)for(var r=0,a=hy.length;r<a;r++){var i=hy[r],n=e.normal,o=e.emphasis;n&&n[i]&&(t[i]=t[i]||{},t[i].normal?J(t[i].normal,n[i]):t[i].normal=n[i],n[i]=null),o&&o[i]&&(t[i]=t[i]||{},t[i].emphasis?J(t[i].emphasis,o[i]):t[i].emphasis=o[i],o[i]=null)}}function le(t,e,r){if(t&&t[e]&&(t[e].normal||t[e].emphasis)){var a=t[e].normal,i=t[e].emphasis;a&&(r?(t[e].normal=t[e].emphasis=null,U(t[e],a)):t[e]=a),i&&(t.emphasis=t.emphasis||{},t.emphasis[e]=i)}}function Po(t){le(t,"itemStyle"),le(t,"lineStyle"),le(t,"areaStyle"),le(t,"label"),le(t,"labelLine"),le(t,"upperLabel"),le(t,"edgeLabel")}function zt(t,e){var r=Lo(t)&&t[e],a=Lo(r)&&r.textStyle;if(a)for(var i=0,n=Wm.length;i<n;i++){var e=Wm[i];a.hasOwnProperty(e)&&(r[e]=a[e])}}function Fe(t){t&&(Po(t),zt(t,"label"),t.emphasis&&zt(t.emphasis,"label"))}function bI(t){if(!!Lo(t)){Yc(t),Po(t),zt(t,"label"),zt(t,"upperLabel"),zt(t,"edgeLabel"),t.emphasis&&(zt(t.emphasis,"label"),zt(t.emphasis,"upperLabel"),zt(t.emphasis,"edgeLabel"));var n=t.markPoint;n&&(Yc(n),Fe(n));var s=t.markLine;s&&(Yc(s),Fe(s));var e=t.markArea;e&&Fe(e);var r=t.data;if(t.type==="graph"){r=r||t.nodes;var a=t.links||t.edges;if(a&&!Ke(a))for(var i=0;i<a.length;i++)Fe(a[i]);T(t.categories,function(u){Po(u)})}if(r&&!Ke(r))for(var i=0;i<r.length;i++)Fe(r[i]);var n=t.markPoint;if(n&&n.data)for(var o=n.data,i=0;i<o.length;i++)Fe(o[i]);var s=t.markLine;if(s&&s.data)for(var l=s.data,i=0;i<l.length;i++)P(l[i])?(Fe(l[i][0]),Fe(l[i][1])):Fe(l[i]);t.type==="gauge"?(zt(t,"axisLabel"),zt(t,"title"),zt(t,"detail")):t.type==="treemap"?(le(t.breadcrumb,"itemStyle"),T(t.levels,function(u){Po(u)})):t.type==="tree"&&Po(t.leaves)}}function Hr(t){return P(t)?t:t?[t]:[]}function fy(t){return(P(t)?t[0]:t)||{}}var SI=function(t,e){or(Hr(t.series),function(a){Lo(a)&&bI(a)});var r=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&r.push("valueAxis","categoryAxis","logAxis","timeAxis"),or(r,function(a){or(Hr(t[a]),function(i){i&&(zt(i,"axisLabel"),zt(i.axisPointer,"label"))})}),or(Hr(t.parallel),function(a){var i=a&&a.parallelAxisDefault;zt(i,"axisLabel"),zt(i&&i.axisPointer,"label")}),or(Hr(t.calendar),function(a){le(a,"itemStyle"),zt(a,"dayLabel"),zt(a,"monthLabel"),zt(a,"yearLabel")}),or(Hr(t.radar),function(a){zt(a,"name")}),or(Hr(t.geo),function(a){Lo(a)&&(Fe(a),or(Hr(a.regions),function(i){Fe(i)}))}),or(Hr(t.timeline),function(a){Fe(a),le(a,"label"),le(a,"itemStyle"),le(a,"controlStyle",!0);var i=a.data;P(i)&&T(i,function(n){Q(n)&&(le(n,"label"),le(n,"itemStyle"))})}),or(Hr(t.toolbox),function(a){le(a,"iconStyle"),or(a.feature,function(i){le(i,"iconStyle")})}),zt(fy(t.axisPointer),"label"),zt(fy(t.tooltip).axisPointer,"label")};function AI(t,e){e=e.split(",");for(var r=t,a=0;a<e.length&&(r=r&&r[e[a]],r!=null);a++);return r}function TI(t,e,r,a){e=e.split(",");for(var i=t,n,o=0;o<e.length-1;o++)n=e[o],i[n]==null&&(i[n]={}),i=i[n];(a||i[e[o]]==null)&&(i[e[o]]=r)}function cy(t){T(CI,function(e){e[0]in t&&!(e[1]in t)&&(t[e[1]]=t[e[0]])})}var CI=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],DI=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],vy=function(t,e){SI(t,e),t.series=te(t.series),T(t.series,function(r){if(!!Q(r)){var a=r.type;if(a==="line")r.clipOverflow!=null&&(r.clip=r.clipOverflow);else if(a==="pie"||a==="gauge")r.clockWise!=null&&(r.clockwise=r.clockWise);else if(a==="gauge"){var i=AI(r,"pointer.color");i!=null&&TI(r,"itemStyle.color",i)}cy(r)}}),t.dataRange&&(t.visualMap=t.dataRange),T(DI,function(r){var a=t[r];a&&(P(a)||(a=[a]),T(a,function(i){cy(i)}))})},II=function(t){var e=j();t.eachSeries(function(r){var a=r.get("stack");if(a){var i=e.get(a)||e.set(a,[]),n=r.getData(),o={stackResultDimension:n.getCalculationInfo("stackResultDimension"),stackedOverDimension:n.getCalculationInfo("stackedOverDimension"),stackedDimension:n.getCalculationInfo("stackedDimension"),stackedByDimension:n.getCalculationInfo("stackedByDimension"),isStackedByIndex:n.getCalculationInfo("isStackedByIndex"),data:n,seriesModel:r};if(!o.stackedDimension||!(o.isStackedByIndex||o.stackedByDimension))return;i.length&&n.setCalculationInfo("stackedOnSeries",i[i.length-1].seriesModel),i.push(o)}}),e.each(MI)};function MI(t){T(t,function(e,r){var a=[],i=[NaN,NaN],n=[e.stackResultDimension,e.stackedOverDimension],o=e.data,s=e.isStackedByIndex,l=o.map(n,function(u,h,f){var c=o.get(e.stackedDimension,f);if(isNaN(c))return i;var v,d;s?d=o.getRawIndex(f):v=o.get(e.stackedByDimension,f);for(var g=NaN,p=r-1;p>=0;p--){var m=t[p];if(s||(d=m.data.rawIndexOf(m.stackedByDimension,v)),d>=0){var y=m.data.getByRawIndex(m.stackResultDimension,d);if(c>=0&&y>0||c<=0&&y<0){c+=y,g=y;break}}}return a[0]=c,a[1]=g,a});o.hostModel.setData(l),e.data=l})}function dy(t,e){nr.isInstance(t)||(t=nr.seriesDataToSource(t)),this._source=t;var r=this._data=t.data,a=t.sourceFormat;if(a===Mo){if(z&&e==null)throw new Error("Typed array data must specify dimension size");this._offset=0,this._dimSize=e,this._data=r}var i=LI[a===Co?a+"_"+t.seriesLayoutBy:a];z&&ot(i,"Invalide sourceFormat: "+a),Z(this,i)}var Xc=dy.prototype;Xc.pure=!1,Xc.persistent=!0,Xc.getSource=function(){return this._source};var LI={arrayRows_column:{pure:!0,count:function(){return Math.max(0,this._data.length-this._source.startIndex)},getItem:function(t){return this._data[t+this._source.startIndex]},appendData:qc},arrayRows_row:{pure:!0,count:function(){var t=this._data[0];return t?Math.max(0,t.length-this._source.startIndex):0},getItem:function(t){t+=this._source.startIndex;for(var e=[],r=this._data,a=0;a<r.length;a++){var i=r[a];e.push(i?i[t]:null)}return e},appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},objectRows:{pure:!0,count:gy,getItem:py,appendData:qc},keyedColumns:{pure:!0,count:function(){var t=this._source.dimensionsDefine[0].name,e=this._data[t];return e?e.length:0},getItem:function(t){for(var e=[],r=this._source.dimensionsDefine,a=0;a<r.length;a++){var i=this._data[r[a].name];e.push(i?i[t]:null)}return e},appendData:function(t){var e=this._data;T(t,function(r,a){for(var i=e[a]||(e[a]=[]),n=0;n<(r||[]).length;n++)i.push(r[n])})}},original:{count:gy,getItem:py,appendData:qc},typedArray:{persistent:!1,pure:!0,count:function(){return this._data?this._data.length/this._dimSize:0},getItem:function(t,e){t=t-this._offset,e=e||[];for(var r=this._dimSize*t,a=0;a<this._dimSize;a++)e[a]=this._data[r+a];return e},appendData:function(t){z&&ot(Ke(t),"Added data must be TypedArray if data in initialization is TypedArray"),this._data=t},clean:function(){this._offset+=this.count(),this._data=null}}};function gy(){return this._data.length}function py(t){return this._data[t]}function qc(t){for(var e=0;e<t.length;e++)this._data.push(t[e])}var PI={arrayRows:Kc,objectRows:function(t,e,r,a){return r!=null?t[a]:t},keyedColumns:Kc,original:function(t,e,r,a){var i=so(t);return r==null||!(i instanceof Array)?i:i[r]},typedArray:Kc};function Kc(t,e,r,a){return r!=null?t[r]:t}var my={arrayRows:yy,objectRows:function(t,e,r,a){return Qc(t[e],this._dimensionInfos[e])},keyedColumns:yy,original:function(t,e,r,a){var i=t&&(t.value==null?t:t.value);return!this._rawData.pure&&kC(t)&&(this.hasItemOption=!0),Qc(i instanceof Array?i[a]:i,this._dimensionInfos[e])},typedArray:function(t,e,r,a){return t[a]}};function yy(t,e,r,a){return Qc(t[a],this._dimensionInfos[e])}function Qc(t,e){var r=e&&e.type;if(r==="ordinal"){var a=e&&e.ordinalMeta;return a?a.parseAndCollect(t):t}return r==="time"&&typeof t!="number"&&t!=null&&t!=="-"&&(t=+Ao(t)),t==null||t===""?NaN:+t}function ii(t,e,r){if(!!t){var a=t.getRawDataItem(e);if(a!=null){var i=t.getProvider().getSource().sourceFormat,n,o,s=t.getDimensionInfo(r);return s&&(n=s.name,o=s.index),PI[i](a,e,o,n)}}}function _y(t,e,r){if(!!t){var a=t.getProvider().getSource().sourceFormat;if(!(a!==ri&&a!==Do)){var i=t.getRawDataItem(e);if(a===ri&&!Q(i)&&(i=null),i)return i[r]}}}var EI=/\{@(.+?)\}/g,Jc={getDataParams:function(t,e){var r=this.getData(e),a=this.getRawValue(t,e),i=r.getRawIndex(t),n=r.getName(t),o=r.getRawDataItem(t),s=r.getItemVisual(t,"color"),l=r.getItemVisual(t,"borderColor"),u=this.ecModel.getComponent("tooltip"),h=u&&u.get("renderMode"),f=Zm(h),c=this.mainType,v=c==="series",d=r.userOutput;return{componentType:c,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:v?this.subType:null,seriesIndex:this.seriesIndex,seriesId:v?this.id:null,seriesName:v?this.name:null,name:n,dataIndex:i,data:o,dataType:e,value:a,color:s,borderColor:l,dimensionNames:d?d.dimensionNames:null,encode:d?d.encode:null,marker:Vl({color:s,renderMode:f}),$vars:["seriesName","name","value"]}},getFormattedLabel:function(t,e,r,a,i){e=e||"normal";var n=this.getData(r),o=n.getItemModel(t),s=this.getDataParams(t,r);a!=null&&s.value instanceof Array&&(s.value=s.value[a]);var l=o.get(e==="normal"?[i||"label","formatter"]:[e,i||"label","formatter"]);if(typeof l=="function")return s.status=e,s.dimensionIndex=a,l(s);if(typeof l=="string"){var u=kc(l,s);return u.replace(EI,function(h,f){var c=f.length;return f.charAt(0)==="["&&f.charAt(c-1)==="]"&&(f=+f.slice(1,c-1)),ii(n,t,f)})}},getRawValue:function(t,e){return ii(this.getData(e),t)},formatTooltip:function(){}};function Eo(t){return new xy(t)}function xy(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0,this.context}var pa=xy.prototype;pa.perform=function(t){var e=this._upstream,r=t&&t.skip;if(this._dirty&&e){var a=this.context;a.data=a.outputData=e.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var i;this._plan&&!r&&(i=this._plan(this.context));var n=u(this._modBy),o=this._modDataCount||0,s=u(t&&t.modBy),l=t&&t.modDataCount||0;(n!==s||o!==l)&&(i="reset");function u(m){return!(m>=1)&&(m=1),m}var h;(this._dirty||i==="reset")&&(this._dirty=!1,h=RI(this,r)),this._modBy=s,this._modDataCount=l;var f=t&&t.step;if(e?(z&&ot(e._outputDueEnd!=null),this._dueEnd=e._outputDueEnd):(z&&ot(!this._progress||this._count),this._dueEnd=this._count?this._count(this.context):1/0),this._progress){var c=this._dueIndex,v=Math.min(f!=null?this._dueIndex+f:1/0,this._dueEnd);if(!r&&(h||c<v)){var d=this._progress;if(P(d))for(var g=0;g<d.length;g++)by(this,d[g],c,v,s,l);else by(this,d,c,v,s,l)}this._dueIndex=v;var p=this._settedOutputEnd!=null?this._settedOutputEnd:v;z&&ot(p>=this._outputDueEnd),this._outputDueEnd=p}else this._dueIndex=this._outputDueEnd=this._settedOutputEnd!=null?this._settedOutputEnd:this._dueEnd;return this.unfinished()};var wy=function(){var t,e,r,a,i,n={reset:function(l,u,h,f){e=l,t=u,r=h,a=f,i=Math.ceil(a/r),n.next=r>1&&a>0?s:o}};return n;function o(){return e<t?e++:null}function s(){var l=e%i*r+Math.ceil(e/i),u=e>=t?null:l<a?l:e;return e++,u}}();pa.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)};function by(t,e,r,a,i,n){wy.reset(r,a,i,n),t._callingProgress=e,t._callingProgress({start:r,end:a,count:a-r,next:wy.next},t.context)}function RI(t,e){t._dueIndex=t._outputDueEnd=t._dueEnd=0,t._settedOutputEnd=null;var r,a;!e&&t._reset&&(r=t._reset(t.context),r&&r.progress&&(a=r.forceFirstProgress,r=r.progress),P(r)&&!r.length&&(r=null)),t._progress=r,t._modBy=t._modDataCount=null;var i=t._downstream;return i&&i.dirty(),a}pa.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},pa.pipe=function(t){z&&ot(t&&!t._disposed&&t!==this),(this._downstream!==t||this._dirty)&&(this._downstream=t,t._upstream=this,t.dirty())},pa.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},pa.getUpstream=function(){return this._upstream},pa.getDownstream=function(){return this._downstream},pa.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t};var Ro=de(),Dt=ct.extend({type:"series.__base__",seriesIndex:0,coordinateSystem:null,defaultOption:null,legendVisualProvider:null,visualColorAccessPath:"itemStyle.color",visualBorderColorAccessPath:"itemStyle.borderColor",layoutMode:null,init:function(t,e,r,a){this.seriesIndex=this.componentIndex,this.dataTask=Eo({count:NI,reset:OI}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,r),ry(this);var i=this.getInitialData(t,r);Ay(i,this),this.dataTask.context.data=i,z&&ot(i,"getInitialData returned invalid data."),Ro(this).dataBeforeProcessed=i,Sy(this)},mergeDefaultAndTheme:function(t,e){var r=this.layoutMode,a=r?rn(t):{},i=this.subType;ct.hasClass(i)&&(i+="Series"),J(t,e.getTheme().get(this.subType)),J(t,this.getDefaultOption()),Ua(t,"label",["show"]),this.fillDataTextStyle(t.data),r&&ga(t,a,r)},mergeOption:function(t,e){t=J(this.option,t,!0),this.fillDataTextStyle(t.data);var r=this.layoutMode;r&&ga(this.option,t,r),ry(this);var a=this.getInitialData(t,e);Ay(a,this),this.dataTask.dirty(),this.dataTask.context.data=a,Ro(this).dataBeforeProcessed=a,Sy(this)},fillDataTextStyle:function(t){if(t&&!Ke(t))for(var e=["show"],r=0;r<t.length;r++)t[r]&&t[r].label&&Ua(t[r],"label",e)},getInitialData:function(){},appendData:function(t){var e=this.getRawData();e.appendData(t.data)},getData:function(t){var e=jc(this);if(e){var r=e.context.data;return t==null?r:r.getLinkedData(t)}else return Ro(this).data},setData:function(t){var e=jc(this);if(e){var r=e.context;r.data!==t&&e.modifyOutputEnd&&e.setOutputEnd(t.count()),r.outputData=t,e!==this.dataTask&&(r.data=t)}Ro(this).data=t},getSource:function(){return nI(this)},getRawData:function(){return Ro(this).dataBeforeProcessed},getBaseAxis:function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},formatTooltip:function(t,e,r,a){var i=this;a=a||"html";var n=a==="html"?"<br/>":`
`,o=a==="richText",s={},l=0;function u(C){var D=ki(C,function(k,O,V){var H=f.getDimensionInfo(V);return k|=H&&H.tooltip!==!1&&H.displayName!=null},0),I=[];c.length?T(c,function(k){L(ii(f,t,k),k)}):T(C,L);function L(k,O){var V=f.getDimensionInfo(O);if(!(!V||V.otherDims.tooltip===!1)){var H=V.type,W="sub"+i.seriesIndex+"at"+l,F=Vl({color:p,type:"subItem",renderMode:a,markerId:W}),N=typeof F=="string"?F:F.content,$=(D?N+Tt(V.displayName||"-")+": ":"")+Tt(H==="ordinal"?k+"":H==="time"?e?"":Nc("yyyy/MM/dd hh:mm:ss",k):da(k));$&&I.push($),o&&(s[W]=p,++l)}}var M=D?o?`
`:"<br/>":"",B=M+I.join(M||", ");return{renderMode:a,content:B,style:s}}function h(C){return{renderMode:a,content:Tt(da(C)),style:s}}var f=this.getData(),c=f.mapDimension("defaultedTooltip",!0),v=c.length,d=this.getRawValue(t),g=P(d),p=f.getItemVisual(t,"color");Q(p)&&p.colorStops&&(p=(p.colorStops[0]||{}).color),p=p||"transparent";var m=v>1||g&&!v?u(d):h(v?ii(f,t,c[0]):g?d[0]:d),y=m.content,_=i.seriesIndex+"at"+l,x=Vl({color:p,type:"item",renderMode:a,markerId:_});s[_]=p,++l;var w=f.getName(t),S=this.name;nc(this)||(S=""),S=S?Tt(S)+(e?": ":n):"";var b=typeof x=="string"?x:x.content,A=e?b+S+y:S+b+(w?Tt(w)+": "+y:y);return{html:A,markers:s}},isAnimationEnabled:function(){if(at.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){this.dataTask.dirty()},getColorFromPalette:function(t,e,r){var a=this.ecModel,i=Bc.getColorFromPalette.call(this,t,e,r);return i||(i=a.getColorFromPalette(t,e,r)),i},coordDimToDataDim:function(t){return this.getRawData().mapDimension(t,!0)},getProgressive:function(){return this.get("progressive")},getProgressiveThreshold:function(){return this.get("progressiveThreshold")},getAxisTooltipData:null,getTooltipPosition:null,pipeTask:null,preventIncremental:null,pipelineContext:null});pt(Dt,Jc),pt(Dt,Bc);function Sy(t){var e=t.name;nc(t)||(t.name=kI(t)||e)}function kI(t){var e=t.getRawData(),r=e.mapDimension("seriesName",!0),a=[];return T(r,function(i){var n=e.getDimensionInfo(i);n.displayName&&a.push(n.displayName)}),a.join(" ")}function NI(t){return t.model.getRawData().count()}function OI(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),zI}function zI(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function Ay(t,e){T(t.CHANGABLE_METHODS,function(r){t.wrapMethod(r,K(BI,e))})}function BI(t){var e=jc(t);e&&e.setOutputEnd(this.count())}function jc(t){var e=(t.ecModel||{}).scheduler,r=e&&e.getPipeline(t.uid);if(r){var a=r.currentTask;if(a){var i=a.agentStubMap;i&&(a=i.get(t.uid))}return a}}var wr=function(){this.group=new G,this.uid=bo("viewComponent")};wr.prototype={constructor:wr,init:function(t,e){},render:function(t,e,r,a){},dispose:function(){},filterForExposedEvent:null};var tv=wr.prototype;tv.updateView=tv.updateLayout=tv.updateVisual=function(t,e,r,a){},lo(wr),gl(wr,{registerWhenExtend:!0});var nn=function(){var t=de();return function(e){var r=t(e),a=e.pipelineContext,i=r.large,n=r.progressiveRender,o=r.large=a&&a.large,s=r.progressiveRender=a&&a.progressiveRender;return!!(i^o||n^s)&&"reset"}},Ty=de(),VI=nn();function Yt(){this.group=new G,this.uid=bo("viewChart"),this.renderTask=Eo({plan:GI,reset:HI}),this.renderTask.context={view:this}}Yt.prototype={type:"chart",init:function(t,e){},render:function(t,e,r,a){},highlight:function(t,e,r,a){Cy(t.getData(),a,"emphasis")},downplay:function(t,e,r,a){Cy(t.getData(),a,"normal")},remove:function(t,e){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};var ev=Yt.prototype;ev.updateView=ev.updateLayout=ev.updateVisual=function(t,e,r,a){this.render(t,e,r,a)};function rv(t,e,r){if(t&&(t.trigger(e,r),t.isGroup&&!Rl(t)))for(var a=0,i=t.childCount();a<i;a++)rv(t.childAt(a),e,r)}function Cy(t,e,r){var a=cl(t,e),i=e&&e.highlightKey!=null?k0(e.highlightKey):null;a!=null?T(te(a),function(n){rv(t.getItemGraphicEl(n),r,i)}):t.eachItemGraphicEl(function(n){rv(n,r,i)})}lo(Yt,["dispose"]),gl(Yt,{registerWhenExtend:!0}),Yt.markUpdateMethod=function(t,e){Ty(t).updateMethod=e};function GI(t){return VI(t.model)}function HI(t){var e=t.model,r=t.ecModel,a=t.api,i=t.payload,n=e.pipelineContext.progressiveRender,o=t.view,s=i&&Ty(i).updateMethod,l=n?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](e,r,a,i),FI[l]}var FI={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},Zl="\0__throttleOriginMethod",Dy="\0__throttleRate",Iy="\0__throttleType";function Yl(t,e,r){var a,i=0,n=0,o=null,s,l,u,h;e=e||0;function f(){n=new Date().getTime(),o=null,t.apply(l,u||[])}var c=function(){a=new Date().getTime(),l=this,u=arguments;var v=h||e,d=h||r;h=null,s=a-(d?i:n)-v,clearTimeout(o),d?o=setTimeout(f,v):s>=0?f():o=setTimeout(f,-s),i=a};return c.clear=function(){o&&(clearTimeout(o),o=null)},c.debounceNextCall=function(v){h=v},c}function ko(t,e,r,a){var i=t[e];if(!!i){var n=i[Zl]||i,o=i[Iy],s=i[Dy];if(s!==r||o!==a){if(r==null||!a)return t[e]=n;i=t[e]=Yl(n,r,a==="debounce"),i[Zl]=n,i[Iy]=a,i[Dy]=r}return i}}function My(t,e){var r=t[e];r&&r[Zl]&&(t[e]=r[Zl])}var WI={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var r=t.getData(),a=(t.visualColorAccessPath||"itemStyle.color").split("."),i=t.get(a),n=$t(i)&&!(i instanceof yr)?i:null;(!i||n)&&(i=t.getColorFromPalette(t.name,null,e.getSeriesCount())),r.setVisual("color",i);var o=(t.visualBorderColorAccessPath||"itemStyle.borderColor").split("."),s=t.get(o);if(r.setVisual("borderColor",s),!e.isSeriesFiltered(t)){n&&r.each(function(u){r.setItemVisual(u,"color",n(t.getDataParams(u)))});var l=function(u,h){var f=u.getItemModel(h),c=f.get(a,!0),v=f.get(o,!0);c!=null&&u.setItemVisual(h,"color",c),v!=null&&u.setItemVisual(h,"borderColor",v)};return{dataEach:r.hasItemOption?l:null}}}},Fr={legend:{selector:{all:"\u5168\u9009",inverse:"\u53CD\u9009"}},toolbox:{brush:{title:{rect:"\u77E9\u5F62\u9009\u62E9",polygon:"\u5708\u9009",lineX:"\u6A2A\u5411\u9009\u62E9",lineY:"\u7EB5\u5411\u9009\u62E9",keep:"\u4FDD\u6301\u9009\u62E9",clear:"\u6E05\u9664\u9009\u62E9"}},dataView:{title:"\u6570\u636E\u89C6\u56FE",lang:["\u6570\u636E\u89C6\u56FE","\u5173\u95ED","\u5237\u65B0"]},dataZoom:{title:{zoom:"\u533A\u57DF\u7F29\u653E",back:"\u533A\u57DF\u7F29\u653E\u8FD8\u539F"}},magicType:{title:{line:"\u5207\u6362\u4E3A\u6298\u7EBF\u56FE",bar:"\u5207\u6362\u4E3A\u67F1\u72B6\u56FE",stack:"\u5207\u6362\u4E3A\u5806\u53E0",tiled:"\u5207\u6362\u4E3A\u5E73\u94FA"}},restore:{title:"\u8FD8\u539F"},saveAsImage:{title:"\u4FDD\u5B58\u4E3A\u56FE\u7247",lang:["\u53F3\u952E\u53E6\u5B58\u4E3A\u56FE\u7247"]}},series:{typeNames:{pie:"\u997C\u56FE",bar:"\u67F1\u72B6\u56FE",line:"\u6298\u7EBF\u56FE",scatter:"\u6563\u70B9\u56FE",effectScatter:"\u6D9F\u6F2A\u6563\u70B9\u56FE",radar:"\u96F7\u8FBE\u56FE",tree:"\u6811\u56FE",treemap:"\u77E9\u5F62\u6811\u56FE",boxplot:"\u7BB1\u578B\u56FE",candlestick:"K\u7EBF\u56FE",k:"K\u7EBF\u56FE",heatmap:"\u70ED\u529B\u56FE",map:"\u5730\u56FE",parallel:"\u5E73\u884C\u5750\u6807\u56FE",lines:"\u7EBF\u56FE",graph:"\u5173\u7CFB\u56FE",sankey:"\u6851\u57FA\u56FE",funnel:"\u6F0F\u6597\u56FE",gauge:"\u4EEA\u8868\u76D8\u56FE",pictorialBar:"\u8C61\u5F62\u67F1\u56FE",themeRiver:"\u4E3B\u9898\u6CB3\u6D41\u56FE",sunburst:"\u65ED\u65E5\u56FE"}},aria:{general:{withTitle:"\u8FD9\u662F\u4E00\u4E2A\u5173\u4E8E\u201C{title}\u201D\u7684\u56FE\u8868\u3002",withoutTitle:"\u8FD9\u662F\u4E00\u4E2A\u56FE\u8868\uFF0C"},series:{single:{prefix:"",withName:"\u56FE\u8868\u7C7B\u578B\u662F{seriesType}\uFF0C\u8868\u793A{seriesName}\u3002",withoutName:"\u56FE\u8868\u7C7B\u578B\u662F{seriesType}\u3002"},multiple:{prefix:"\u5B83\u7531{seriesCount}\u4E2A\u56FE\u8868\u7CFB\u5217\u7EC4\u6210\u3002",withName:"\u7B2C{seriesId}\u4E2A\u7CFB\u5217\u662F\u4E00\u4E2A\u8868\u793A{seriesName}\u7684{seriesType}\uFF0C",withoutName:"\u7B2C{seriesId}\u4E2A\u7CFB\u5217\u662F\u4E00\u4E2A{seriesType}\uFF0C",separator:{middle:"\uFF1B",end:"\u3002"}}},data:{allData:"\u5176\u6570\u636E\u662F\u2014\u2014",partialData:"\u5176\u4E2D\uFF0C\u524D{displayCnt}\u9879\u662F\u2014\u2014",withName:"{name}\u7684\u6570\u636E\u662F{value}",withoutName:"{value}",separator:{middle:"\uFF0C",end:""}}}},UI=function(t,e){var r=e.getModel("aria");if(r.get("show")){if(r.get("description")){t.setAttribute("aria-label",r.get("description"));return}}else return;var a=0;e.eachSeries(function(g,p){++a},this);var i=r.get("data.maxCount")||10,n=r.get("series.maxCount")||10,o=Math.min(a,n),s;if(a<1)return;var l=v();l?s=f(c("general.withTitle"),{title:l}):s=c("general.withoutTitle");var u=[],h=a>1?"series.multiple.prefix":"series.single.prefix";s+=f(c(h),{seriesCount:a}),e.eachSeries(function(g,p){if(p<o){var m,y=g.get("name"),_="series."+(a>1?"multiple":"single")+".";m=c(y?_+"withName":_+"withoutName"),m=f(m,{seriesId:g.seriesIndex,seriesName:g.get("name"),seriesType:d(g.subType)});var x=g.getData();window.data=x,x.count()>i?m+=f(c("data.partialData"),{displayCnt:i}):m+=c("data.allData");for(var w=[],S=0;S<x.count();S++)if(S<i){var b=x.getName(S),A=ii(x,S);w.push(f(c(b?"data.withName":"data.withoutName"),{name:b,value:A}))}m+=w.join(c("data.separator.middle"))+c("data.separator.end"),u.push(m)}}),s+=u.join(c("series.multiple.separator.middle"))+c("series.multiple.separator.end"),t.setAttribute("aria-label",s);function f(g,p){if(typeof g!="string")return g;var m=g;return T(p,function(y,_){m=m.replace(new RegExp("\\{\\s*"+_+"\\s*\\}","g"),y)}),m}function c(g){var p=r.get(g);if(p==null){for(var m=g.split("."),y=Fr.aria,_=0;_<m.length;++_)y=y[m[_]];return y}else return p}function v(){var g=e.getModel("title").option;return g&&g.length&&(g=g[0]),g&&g.text}function d(g){return Fr.series.typeNames[g]||"\u81EA\u5B9A\u4E49\u56FE"}},Xl=Math.PI,$I=function(t,e){e=e||{},U(e,{text:"loading",textColor:"#000",fontSize:"12px",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#c23531",spinnerRadius:10,lineWidth:5,zlevel:0});var r=new G,a=new ft({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});r.add(a);var i=e.fontSize+" sans-serif",n=new ft({style:{fill:"none",text:e.text,font:i,textPosition:"right",textDistance:10,textFill:e.textColor},zlevel:e.zlevel,z:10001});if(r.add(n),e.showSpinner){var o=new mc({shape:{startAngle:-Xl/2,endAngle:-Xl/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001});o.animateShape(!0).when(1e3,{endAngle:Xl*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:Xl*3/2}).delay(300).start("circularInOut"),r.add(o)}return r.resize=function(){var s=Oe(e.text,i),l=e.showSpinner?e.spinnerRadius:0,u=(t.getWidth()-l*2-(e.showSpinner&&s?10:0)-s)/2-(e.showSpinner?0:s/2),h=t.getHeight()/2;e.showSpinner&&o.setShape({cx:u,cy:h}),n.setShape({x:u-l,y:h-l,width:l*2,height:l*2}),a.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},r.resize(),r};function ql(t,e,i,n){this.ecInstance=t,this.api=e,this.unfinished;var i=this._dataProcessorHandlers=i.slice(),n=this._visualHandlers=n.slice();this._allHandlers=i.concat(n),this._stageTaskMap=j()}var We=ql.prototype;We.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(r){var a=r.overallTask;a&&a.dirty()})},We.getPerformArgs=function(t,e){if(!!t.__pipeline){var r=this._pipelineMap.get(t.__pipeline.id),a=r.context,i=!e&&r.progressiveEnabled&&(!a||a.progressiveRender)&&t.__idxInPipeline>r.blockIndex,n=i?r.step:null,o=a&&a.modDataCount,s=o!=null?Math.ceil(o/n):null;return{step:n,modBy:s,modDataCount:o}}},We.getPipeline=function(t){return this._pipelineMap.get(t)},We.updateStreamModes=function(t,e){var r=this._pipelineMap.get(t.uid),a=t.getData(),i=a.count(),n=r.progressiveEnabled&&e.incrementalPrepareRender&&i>=r.threshold,o=t.get("large")&&i>=t.get("largeThreshold"),s=t.get("progressiveChunkMode")==="mod"?i:null;t.pipelineContext=r.context={progressiveRender:n,modDataCount:s,large:o}},We.restorePipelines=function(t){var e=this,r=e._pipelineMap=j();t.eachSeries(function(a){var i=a.getProgressive(),n=a.uid;r.set(n,{id:n,head:null,tail:null,threshold:a.getProgressiveThreshold(),progressiveEnabled:i&&!(a.preventIncremental&&a.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),Kl(e,a,a.dataTask)})},We.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.ecInstance.getModel(),r=this.api;T(this._allHandlers,function(a){var i=t.get(a.uid)||t.set(a.uid,[]);a.reset&&ZI(this,a,i,e,r),a.overallReset&&YI(this,a,i,e,r)},this)},We.prepareView=function(t,e,r,a){var i=t.renderTask,n=i.context;n.model=e,n.ecModel=r,n.api=a,i.__block=!t.incrementalPrepareRender,Kl(this,e,i)},We.performDataProcessorTasks=function(t,e){Ly(this,this._dataProcessorHandlers,t,e,{block:!0})},We.performVisualTasks=function(t,e,r){Ly(this,this._visualHandlers,t,e,r)};function Ly(t,e,r,a,i){i=i||{};var n;T(e,function(s,l){if(!(i.visualType&&i.visualType!==s.visualType)){var u=t._stageTaskMap.get(s.uid),h=u.seriesTaskMap,f=u.overallTask;if(f){var c,v=f.agentStubMap;v.each(function(g){o(i,g)&&(g.dirty(),c=!0)}),c&&f.dirty(),Py(f,a);var d=t.getPerformArgs(f,i.block);v.each(function(g){g.perform(d)}),n|=f.perform(d)}else h&&h.each(function(g,p){o(i,g)&&g.dirty();var m=t.getPerformArgs(g,i.block);m.skip=!s.performRawSeries&&r.isSeriesFiltered(g.context.model),Py(g,a),n|=g.perform(m)})}});function o(s,l){return s.setDirty&&(!s.dirtyMap||s.dirtyMap.get(l.__pipeline.id))}t.unfinished|=n}We.performSeriesTasks=function(t){var e;t.eachSeries(function(r){e|=r.dataTask.perform()}),this.unfinished|=e},We.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})};var Py=We.updatePayload=function(t,e){e!=="remain"&&(t.context.payload=e)};function ZI(t,e,r,a,i){var n=r.seriesTaskMap||(r.seriesTaskMap=j()),o=e.seriesType,s=e.getTargetSeries;e.createOnAllSeries?a.eachRawSeries(l):o?a.eachRawSeriesByType(o,l):s&&s(a,i).each(l);function l(h){var f=h.uid,c=n.get(f)||n.set(f,Eo({plan:JI,reset:jI,count:eM}));c.context={model:h,ecModel:a,api:i,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:t},Kl(t,h,c)}var u=t._pipelineMap;n.each(function(h,f){u.get(f)||(h.dispose(),n.removeKey(f))})}function YI(t,e,r,a,i){var n=r.overallTask=r.overallTask||Eo({reset:XI});n.context={ecModel:a,api:i,overallReset:e.overallReset,scheduler:t};var o=n.agentStubMap=n.agentStubMap||j(),s=e.seriesType,l=e.getTargetSeries,u=!0,h=e.modifyOutputEnd;s?a.eachRawSeriesByType(s,f):l?l(a,i).each(f):(u=!1,T(a.getSeries(),f));function f(v){var d=v.uid,g=o.get(d);g||(g=o.set(d,Eo({reset:qI,onDirty:QI})),n.dirty()),g.context={model:v,overallProgress:u,modifyOutputEnd:h},g.agent=n,g.__block=u,Kl(t,v,g)}var c=t._pipelineMap;o.each(function(v,d){c.get(d)||(v.dispose(),n.dirty(),o.removeKey(d))})}function XI(t){t.overallReset(t.ecModel,t.api,t.payload)}function qI(t,e){return t.overallProgress&&KI}function KI(){this.agent.dirty(),this.getDownstream().dirty()}function QI(){this.agent&&this.agent.dirty()}function JI(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function jI(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=te(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?E(e,function(r,a){return Ey(a)}):tM}var tM=Ey(0);function Ey(t){return function(e,r){var a=r.data,i=r.resetDefines[t];if(i&&i.dataEach)for(var n=e.start;n<e.end;n++)i.dataEach(a,n);else i&&i.progress&&i.progress(e,a)}}function eM(t){return t.data.count()}function Kl(t,e,r){var a=e.uid,i=t._pipelineMap.get(a);!i.head&&(i.head=r),i.tail&&i.tail.pipe(r),i.tail=r,r.__idxInPipeline=i.count++,r.__pipeline=i}ql.wrapStageHandler=function(t,e){return $t(t)&&(t={overallReset:t,seriesType:rM(t)}),t.uid=bo("stageHandler"),e&&(t.visualType=e),t};function rM(t){Ql=null;try{t(No,Ry)}catch{}return Ql}var No={},Ry={},Ql;ky(No,Wc),ky(Ry,ly),No.eachSeriesByType=No.eachRawSeriesByType=function(t){Ql=t},No.eachComponent=function(t){t.mainType==="series"&&t.subType&&(Ql=t.subType)};function ky(t,e){for(var r in e.prototype)t[r]=Kt}var Ny=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],aM={color:Ny,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],Ny]},ae="#eee",Jl=function(){return{axisLine:{lineStyle:{color:ae}},axisTick:{lineStyle:{color:ae}},axisLabel:{textStyle:{color:ae}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:ae}}}},av=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],Oy={color:av,backgroundColor:"#333",tooltip:{axisPointer:{lineStyle:{color:ae},crossStyle:{color:ae},label:{color:"#000"}}},legend:{textStyle:{color:ae}},textStyle:{color:ae},title:{textStyle:{color:ae}},toolbox:{iconStyle:{normal:{borderColor:ae}}},dataZoom:{textStyle:{color:ae}},visualMap:{textStyle:{color:ae}},timeline:{lineStyle:{color:ae},itemStyle:{normal:{color:av[1]}},label:{normal:{textStyle:{color:ae}}},controlStyle:{normal:{color:ae,borderColor:ae}}},timeAxis:Jl(),logAxis:Jl(),valueAxis:Jl(),categoryAxis:Jl(),line:{symbol:"circle"},graph:{color:av},gauge:{title:{textStyle:{color:ae}}},candlestick:{itemStyle:{normal:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}}};Oy.categoryAxis.splitLine.show=!1,ct.extend({type:"dataset",defaultOption:{seriesLayoutBy:ey,sourceHeader:null,dimensions:null,source:null},optionUpdated:function(){iI(this)}}),wr.extend({type:"dataset"});var iM=st.extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(t,e){var r=.5522848,a=e.cx,i=e.cy,n=e.rx,o=e.ry,s=n*r,l=o*r;t.moveTo(a-n,i),t.bezierCurveTo(a-n,i-l,a-s,i-o,a,i-o),t.bezierCurveTo(a+s,i-o,a+n,i-l,a+n,i),t.bezierCurveTo(a+n,i+l,a+s,i+o,a,i+o),t.bezierCurveTo(a-s,i+o,a-n,i+l,a-n,i),t.closePath()}}),ma=/[\s,]+/;function zy(t){if(_t(t)){var e=new DOMParser;t=e.parseFromString(t,"text/xml")}for(t.nodeType===9&&(t=t.firstChild);t.nodeName.toLowerCase()!=="svg"||t.nodeType!==1;)t=t.nextSibling;return t}function jl(){this._defs={},this._root=null,this._isDefine=!1,this._isText=!1}jl.prototype.parse=function(t,e){e=e||{};var r=zy(t);if(!r)throw new Error("Illegal svg");var a=new G;this._root=a;var i=r.getAttribute("viewBox")||"",n=parseFloat(r.getAttribute("width")||e.width),o=parseFloat(r.getAttribute("height")||e.height);isNaN(n)&&(n=null),isNaN(o)&&(o=null),Ce(r,a,null,!0);for(var s=r.firstChild;s;)this._parseNode(s,a),s=s.nextSibling;var l,u;if(i){var h=Ne(i).split(ma);h.length>=4&&(l={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(l&&n!=null&&o!=null&&(u=Hy(l,n,o),!e.ignoreViewBox)){var f=a;a=new G,a.add(f),f.scale=u.scale.slice(),f.position=u.position.slice()}return!e.ignoreRootClip&&n!=null&&o!=null&&a.setClipPath(new ft({shape:{x:0,y:0,width:n,height:o}})),{root:a,width:n,height:o,viewBoxRect:l,viewBoxTransform:u}},jl.prototype._parseNode=function(t,e){var r=t.nodeName.toLowerCase();r==="defs"?this._isDefine=!0:r==="text"&&(this._isText=!0);var a;if(this._isDefine){var i=oM[r];if(i){var n=i.call(this,t),o=t.getAttribute("id");o&&(this._defs[o]=n)}}else{var i=nM[r];i&&(a=i.call(this,t,e),e.add(a))}for(var s=t.firstChild;s;)s.nodeType===1&&this._parseNode(s,a),s.nodeType===3&&this._isText&&this._parseText(s,a),s=s.nextSibling;r==="defs"?this._isDefine=!1:r==="text"&&(this._isText=!1)},jl.prototype._parseText=function(t,e){if(t.nodeType===1){var r=t.getAttribute("dx")||0,a=t.getAttribute("dy")||0;this._textX+=parseFloat(r),this._textY+=parseFloat(a)}var i=new nt({style:{text:t.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});Ue(e,i),Ce(t,i,this._defs);var n=i.style.fontSize;n&&n<9&&(i.style.fontSize=9,i.scale=i.scale||[1,1],i.scale[0]*=n/9,i.scale[1]*=n/9);var o=i.getBoundingRect();return this._textX+=o.width,e.add(i),i};var nM={g:function(t,e){var r=new G;return Ue(e,r),Ce(t,r,this._defs),r},rect:function(t,e){var r=new ft;return Ue(e,r),Ce(t,r,this._defs),r.setShape({x:parseFloat(t.getAttribute("x")||0),y:parseFloat(t.getAttribute("y")||0),width:parseFloat(t.getAttribute("width")||0),height:parseFloat(t.getAttribute("height")||0)}),r},circle:function(t,e){var r=new mr;return Ue(e,r),Ce(t,r,this._defs),r.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),r:parseFloat(t.getAttribute("r")||0)}),r},line:function(t,e){var r=new ee;return Ue(e,r),Ce(t,r,this._defs),r.setShape({x1:parseFloat(t.getAttribute("x1")||0),y1:parseFloat(t.getAttribute("y1")||0),x2:parseFloat(t.getAttribute("x2")||0),y2:parseFloat(t.getAttribute("y2")||0)}),r},ellipse:function(t,e){var r=new iM;return Ue(e,r),Ce(t,r,this._defs),r.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),rx:parseFloat(t.getAttribute("rx")||0),ry:parseFloat(t.getAttribute("ry")||0)}),r},polygon:function(t,e){var r=t.getAttribute("points");r&&(r=By(r));var a=new Se({shape:{points:r||[]}});return Ue(e,a),Ce(t,a,this._defs),a},polyline:function(t,e){var r=new st;Ue(e,r),Ce(t,r,this._defs);var a=t.getAttribute("points");a&&(a=By(a));var i=new Ve({shape:{points:a||[]}});return i},image:function(t,e){var r=new Qt;return Ue(e,r),Ce(t,r,this._defs),r.setStyle({image:t.getAttribute("xlink:href"),x:t.getAttribute("x"),y:t.getAttribute("y"),width:t.getAttribute("width"),height:t.getAttribute("height")}),r},text:function(t,e){var r=t.getAttribute("x")||0,a=t.getAttribute("y")||0,i=t.getAttribute("dx")||0,n=t.getAttribute("dy")||0;this._textX=parseFloat(r)+parseFloat(i),this._textY=parseFloat(a)+parseFloat(n);var o=new G;return Ue(e,o),Ce(t,o,this._defs),o},tspan:function(t,e){var r=t.getAttribute("x"),a=t.getAttribute("y");r!=null&&(this._textX=parseFloat(r)),a!=null&&(this._textY=parseFloat(a));var i=t.getAttribute("dx")||0,n=t.getAttribute("dy")||0,o=new G;return Ue(e,o),Ce(t,o,this._defs),this._textX+=i,this._textY+=n,o},path:function(t,e){var r=t.getAttribute("d")||"",a=d0(r);return Ue(e,a),Ce(t,a,this._defs),a}},oM={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||0,10),r=parseInt(t.getAttribute("y1")||0,10),a=parseInt(t.getAttribute("x2")||10,10),i=parseInt(t.getAttribute("y2")||0,10),n=new qa(e,r,a,i);return sM(t,n),n},radialgradient:function(t){}};function sM(t,e){for(var r=t.firstChild;r;){if(r.nodeType===1){var a=r.getAttribute("offset");a.indexOf("%")>0?a=parseInt(a,10)/100:a?a=parseFloat(a):a=0;var i=r.getAttribute("stop-color")||"#000000";e.addColorStop(a,i)}r=r.nextSibling}}function Ue(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),U(e.__inheritedStyle,t.__inheritedStyle))}function By(t){for(var e=Ne(t).split(ma),r=[],a=0;a<e.length;a+=2){var i=parseFloat(e[a]),n=parseFloat(e[a+1]);r.push([i,n])}return r}var on={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-align":"textAlign","alignment-baseline":"textBaseline"};function Ce(t,e,r,a){var i=e.__inheritedStyle||{},n=e.type==="text";if(t.nodeType===1&&(hM(t,e),Z(i,fM(t)),!a)){for(var o in on)if(on.hasOwnProperty(o)){var s=t.getAttribute(o);s!=null&&(i[on[o]]=s)}}var l=n?"textFill":"fill",u=n?"textStroke":"stroke";e.style=e.style||new na;var h=e.style;i.fill!=null&&h.set(l,Vy(i.fill,r)),i.stroke!=null&&h.set(u,Vy(i.stroke,r)),T(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(f){var c=f==="lineWidth"&&n?"textStrokeWidth":f;i[f]!=null&&h.set(c,parseFloat(i[f]))}),(!i.textBaseline||i.textBaseline==="auto")&&(i.textBaseline="alphabetic"),i.textBaseline==="alphabetic"&&(i.textBaseline="bottom"),i.textAlign==="start"&&(i.textAlign="left"),i.textAlign==="end"&&(i.textAlign="right"),T(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],function(f){i[f]!=null&&h.set(f,i[f])}),i.lineDash&&(e.style.lineDash=Ne(i.lineDash).split(ma)),h[u]&&h[u]!=="none"&&(e[u]=!0),e.__inheritedStyle=i}var lM=/url\(\s*#(.*?)\)/;function Vy(t,e){var r=e&&t&&t.match(lM);if(r){var a=Ne(r[1]),i=e[a];return i}return t}var uM=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g;function hM(t,e){var r=t.getAttribute("transform");if(r){r=r.replace(/,/g," ");var a=null,i=[];r.replace(uM,function(l,u,h){i.push(u,h)});for(var n=i.length-1;n>0;n-=2){var o=i[n],s=i[n-1];switch(a=a||ce(),s){case"translate":o=Ne(o).split(ma),Je(a,a,[parseFloat(o[0]),parseFloat(o[1]||0)]);break;case"scale":o=Ne(o).split(ma),jn(a,a,[parseFloat(o[0]),parseFloat(o[1]||o[0])]);break;case"rotate":o=Ne(o).split(ma),Or(a,a,parseFloat(o[0]));break;case"skew":o=Ne(o).split(ma),console.warn("Skew transform is not supported yet");break;case"matrix":var o=Ne(o).split(ma);a[0]=parseFloat(o[0]),a[1]=parseFloat(o[1]),a[2]=parseFloat(o[2]),a[3]=parseFloat(o[3]),a[4]=parseFloat(o[4]),a[5]=parseFloat(o[5]);break}}e.setLocalTransform(a)}}var Gy=/([^\s:;]+)\s*:\s*([^:;]+)/g;function fM(t){var e=t.getAttribute("style"),r={};if(!e)return r;var a={};Gy.lastIndex=0;for(var i;(i=Gy.exec(e))!=null;)a[i[1]]=i[2];for(var n in on)on.hasOwnProperty(n)&&a[n]!=null&&(r[on[n]]=a[n]);return r}function Hy(t,e,r){var a=e/t.width,i=r/t.height,n=Math.min(a,i),o=[n,n],s=[-(t.x+t.width/2)*n+e/2,-(t.y+t.height/2)*n+r/2];return{scale:o,position:s}}function cM(t,e){var r=new jl;return r.parse(t,e)}var Fy=j(),tu={registerMap:function(t,e,r){var a;return P(e)?a=e:e.svg?a=[{type:"svg",source:e.svg,specialAreas:e.specialAreas}]:(e.geoJson&&!e.features&&(r=e.specialAreas,e=e.geoJson),a=[{type:"geoJSON",source:e,specialAreas:r}]),T(a,function(i){var n=i.type;n==="geoJson"&&(n=i.type="geoJSON");var o=vM[n];z&&ot(o,"Illegal map type: "+n),o(i)}),Fy.set(t,a)},retrieveMap:function(t){return Fy.get(t)}},vM={geoJSON:function(t){var e=t.source;t.geoJSON=_t(e)?typeof JSON<"u"&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")():e},svg:function(t){t.svgXML=zy(t.source)}},sn=ot,Wt=T,dM=$t,Oo=Q,iv=ct.parseClassType,Wy="4.8.0",nv={zrender:"4.3.1"},gM=1,Uy=1e3,pM=800,mM=900,yM=5e3,$y=1e3,_M=1100,Zy=2e3,Yy=3e3,xM=3500,wM=4e3,bM=5e3,br={PROCESSOR:{FILTER:Uy,SERIES_FILTER:pM,STATISTIC:yM},VISUAL:{LAYOUT:$y,PROGRESSIVE_LAYOUT:_M,GLOBAL:Zy,CHART:Yy,POST_CHART_LAYOUT:xM,COMPONENT:wM,BRUSH:bM}},$e="__flagInMainProcess",ya="__optionUpdated",Xy=/^[a-zA-Z0-9_]+$/;function ln(t,e){return function(r,a,i){if(!e&&this._disposed){De(this.id);return}r=r&&r.toLowerCase(),Zt.prototype[t].call(this,r,a,i)}}function zo(){Zt.call(this)}zo.prototype.on=ln("on",!0),zo.prototype.off=ln("off",!0),zo.prototype.one=ln("one",!0),pt(zo,Zt);function Bo(t,n,r){r=r||{},typeof n=="string"&&(n=i_[n]),this.id,this.group,this._dom=t;var a="canvas";z&&(a=(typeof window>"u"?global:window).__ECHARTS__DEFAULT__RENDERER__||a);var i=this._zr=ec(t,{renderer:r.renderer||a,devicePixelRatio:r.devicePixelRatio,width:r.width,height:r.height});this._throttledZrFlush=Yl(X(i.flush,i),17);var n=Y(n);n&&vy(n,!0),this._theme=n,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new re;var o=this._api=IM(this);function s(l,u){return l.__prio-u.__prio}tl(nu,s),tl(hv,s),this._scheduler=new ql(this,o,hv,nu),Zt.call(this,this._ecEventProcessor=new uv),this._messageCenter=new zo,this._initEvents(),this.resize=X(this.resize,this),this._pendingActions=[],i.animation.on("frame",this._onframe,this),SM(i,this),Vh(this)}var dt=Bo.prototype;dt._onframe=function(){if(!this._disposed){var t=this._scheduler;if(this[ya]){var e=this[ya].silent;this[$e]=!0,Vo(this),_a.update.call(this),this[$e]=!1,this[ya]=!1,eu.call(this,e),ru.call(this,e)}else if(t.unfinished){var r=gM,a=this._model,i=this._api;t.unfinished=!1;do{var n=+new Date;t.performSeriesTasks(a),t.performDataProcessorTasks(a),Qy(this,a),t.performVisualTasks(a),sv(this,this._model,i,"remain"),r-=+new Date-n}while(r>0&&t.unfinished);t.unfinished||this._zr.flush()}}},dt.getDom=function(){return this._dom},dt.getZr=function(){return this._zr},dt.setOption=function(t,e,r){if(z&&sn(!this[$e],"`setOption` should not be called during main process."),this._disposed){De(this.id);return}var a;if(Oo(e)&&(r=e.lazyUpdate,a=e.silent,e=e.notMerge),this[$e]=!0,!this._model||e){var i=new Zc(this._api),n=this._theme,o=this._model=new Wc;o.scheduler=this._scheduler,o.init(null,null,n,i)}this._model.setOption(t,r_),r?(this[ya]={silent:a},this[$e]=!1):(Vo(this),_a.update.call(this),this._zr.flush(),this[ya]=!1,this[$e]=!1,eu.call(this,a),ru.call(this,a))},dt.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},dt.getModel=function(){return this._model},dt.getOption=function(){return this._model&&this._model.getOption()},dt.getWidth=function(){return this._zr.getWidth()},dt.getHeight=function(){return this._zr.getHeight()},dt.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},dt.getRenderedCanvas=function(t){if(!!at.canvasSupported){t=t||{},t.pixelRatio=t.pixelRatio||1,t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor");var e=this._zr;return e.painter.getRenderedCanvas(t)}},dt.getSvgDataURL=function(){if(!!at.svgSupported){var t=this._zr,e=t.storage.getDisplayList();return T(e,function(r){r.stopAnimation(!0)}),t.painter.toDataURL()}},dt.getDataURL=function(t){if(this._disposed){De(this.id);return}t=t||{};var e=t.excludeComponents,r=this._model,a=[],i=this;Wt(e,function(o){r.eachComponent({mainType:o},function(s){var l=i._componentsMap[s.__viewId];l.group.ignore||(a.push(l),l.group.ignore=!0)})});var n=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return Wt(a,function(o){o.group.ignore=!1}),n},dt.getConnectedDataURL=function(t){if(this._disposed){De(this.id);return}if(!!at.canvasSupported){var e=t.type==="svg",r=this.group,a=Math.min,i=Math.max,n=1/0;if(ou[r]){var o=n,s=n,l=-n,u=-n,h=[],f=t&&t.pixelRatio||1;T(ni,function(m,y){if(m.group===r){var _=e?m.getZr().painter.getSvgDom().innerHTML:m.getRenderedCanvas(Y(t)),x=m.getDom().getBoundingClientRect();o=a(x.left,o),s=a(x.top,s),l=i(x.right,l),u=i(x.bottom,u),h.push({dom:_,left:x.left,top:x.top})}}),o*=f,s*=f,l*=f,u*=f;var c=l-o,v=u-s,d=Ri(),g=ec(d,{renderer:e?"svg":"canvas"});if(g.resize({width:c,height:v}),e){var p="";return Wt(h,function(m){var y=m.left-o,_=m.top-s;p+='<g transform="translate('+y+","+_+')">'+m.dom+"</g>"}),g.painter.getSvgRoot().innerHTML=p,t.connectedBackgroundColor&&g.painter.setBackgroundColor(t.connectedBackgroundColor),g.refreshImmediately(),g.painter.toDataURL()}else return t.connectedBackgroundColor&&g.add(new ft({shape:{x:0,y:0,width:c,height:v},style:{fill:t.connectedBackgroundColor}})),Wt(h,function(m){var y=new Qt({style:{x:m.left*f-o,y:m.top*f-s,image:m.dom}});g.add(y)}),g.refreshImmediately(),d.toDataURL("image/"+(t&&t.type||"png"))}else return this.getDataURL(t)}},dt.convertToPixel=K(qy,"convertToPixel"),dt.convertFromPixel=K(qy,"convertFromPixel");function qy(t,e,r){if(this._disposed){De(this.id);return}var a=this._model,i=this._coordSysMgr.getCoordinateSystems(),n;e=vl(a,e);for(var o=0;o<i.length;o++){var s=i[o];if(s[t]&&(n=s[t](a,e,r))!=null)return n}z&&console.warn("No coordinate system that supports "+t+" found by the given finder.")}dt.containPixel=function(t,e){if(this._disposed){De(this.id);return}var r=this._model,a;return t=vl(r,t),T(t,function(i,n){n.indexOf("Models")>=0&&T(i,function(o){var s=o.coordinateSystem;if(s&&s.containPoint)a|=!!s.containPoint(e);else if(n==="seriesModels"){var l=this._chartsMap[o.__viewId];l&&l.containPoint?a|=l.containPoint(e,o):z&&console.warn(n+": "+(l?"The found component do not support containPoint.":"No view mapping to the found component."))}else z&&console.warn(n+": containPoint is not supported")},this)},this),!!a},dt.getVisual=function(t,e){var r=this._model;t=vl(r,t,{defaultMainType:"series"});var a=t.seriesModel;z&&(a||console.warn("There is no specified seires model"));var i=a.getData(),n=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?i.indexOfRawIndex(t.dataIndex):null;return n!=null?i.getItemVisual(n,e):i.getVisual(e)},dt.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},dt.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]};var _a={prepareAndUpdate:function(t){Vo(this),_a.update.call(this,t)},update:function(t){var e=this._model,r=this._api,a=this._zr,i=this._coordSysMgr,n=this._scheduler;if(!!e){n.restoreData(e,t),n.performSeriesTasks(e),i.create(e,r),n.performDataProcessorTasks(e,t),Qy(this,e),i.update(e,r),ov(e),n.performVisualTasks(e,t),t_(this,e,r,t);var o=e.get("backgroundColor")||"transparent";if(at.canvasSupported)a.setBackgroundColor(o);else{var s=be(o);o=zr(s,"rgb"),s[3]===0&&(o="transparent")}lv(e,r)}},updateTransform:function(t){var e=this._model,r=this,a=this._api;if(!!e){var i=[];e.eachComponent(function(o,s){var l=r.getViewOfComponentModel(s);if(l&&l.__alive)if(l.updateTransform){var u=l.updateTransform(s,e,a,t);u&&u.update&&i.push(l)}else i.push(l)});var n=j();e.eachSeries(function(o){var s=r._chartsMap[o.__viewId];if(s.updateTransform){var l=s.updateTransform(o,e,a,t);l&&l.update&&n.set(o.uid,1)}else n.set(o.uid,1)}),ov(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0,dirtyMap:n}),sv(r,e,a,t,n),lv(e,this._api)}},updateView:function(t){var e=this._model;!e||(Yt.markUpdateMethod(t,"updateView"),ov(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0}),t_(this,this._model,this._api,t),lv(e,this._api))},updateVisual:function(t){_a.update.call(this,t)},updateLayout:function(t){_a.update.call(this,t)}};function Vo(t){var e=t._model,r=t._scheduler;r.restorePipelines(e),r.prepareStageTasks(),jy(t,"component",e,r),jy(t,"chart",e,r),r.plan()}function Ky(t,e,r,a,i){var n=t._model;if(!a){Wt(t._componentsViews.concat(t._chartsViews),u);return}var o={};o[a+"Id"]=r[a+"Id"],o[a+"Index"]=r[a+"Index"],o[a+"Name"]=r[a+"Name"];var s={mainType:a,query:o};i&&(s.subType=i);var l=r.excludeSeriesId;l!=null&&(l=j(te(l))),n&&n.eachComponent(s,function(h){(!l||l.get(h.id)==null)&&u(t[a==="series"?"_chartsMap":"_componentsMap"][h.__viewId])},t);function u(h){h&&h.__alive&&h[e]&&h[e](h.__model,n,t._api,r)}}dt.resize=function(t){if(z&&sn(!this[$e],"`resize` should not be called during main process."),this._disposed){De(this.id);return}this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!e){var r=e.resetOption("media"),a=t&&t.silent;this[$e]=!0,r&&Vo(this),_a.update.call(this),this[$e]=!1,eu.call(this,a),ru.call(this,a)}};function Qy(t,e){var r=t._chartsMap,a=t._scheduler;e.eachSeries(function(i){a.updateStreamModes(i,r[i.__viewId])})}dt.showLoading=function(t,e){if(this._disposed){De(this.id);return}if(Oo(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),!fv[t]){z&&console.warn("Loading effects "+t+" not exists.");return}var r=fv[t](this._api,e),a=this._zr;this._loadingFX=r,a.add(r)},dt.hideLoading=function(){if(this._disposed){De(this.id);return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},dt.makeActionFromEvent=function(t){var e=Z({},t);return e.type=iu[t.type],e},dt.dispatchAction=function(t,e){if(this._disposed){De(this.id);return}if(Oo(e)||(e={silent:!!e}),!!au[t.type]&&!!this._model){if(this[$e]){this._pendingActions.push(t);return}Jy.call(this,t,e.silent),e.flush?this._zr.flush(!0):e.flush!==!1&&at.browser.weChat&&this._throttledZrFlush(),eu.call(this,e.silent),ru.call(this,e.silent)}};function Jy(t,e){var r=t.type,a=t.escapeConnect,i=au[r],n=i.actionInfo,o=(n.update||"update").split(":"),s=o.pop();o=o[0]!=null&&iv(o[0]),this[$e]=!0;var l=[t],u=!1;t.batch&&(u=!0,l=E(t.batch,function(v){return v=U(Z({},v),t),v.batch=null,v}));var h=[],f,c=r==="highlight"||r==="downplay";Wt(l,function(v){f=i.action(v,this._model,this._api),f=f||Z({},v),f.type=n.event||f.type,h.push(f),c?Ky(this,s,v,"series"):o&&Ky(this,s,v,o.main,o.sub)},this),s!=="none"&&!c&&!o&&(this[ya]?(Vo(this),_a.update.call(this,t),this[ya]=!1):_a[s].call(this,t)),u?f={type:n.event||r,escapeConnect:a,batch:h}:f=h[0],this[$e]=!1,!e&&this._messageCenter.trigger(f.type,f)}function eu(t){for(var e=this._pendingActions;e.length;){var r=e.shift();Jy.call(this,r,t)}}function ru(t){!t&&this.trigger("updated")}function SM(t,e){t.on("rendered",function(){e.trigger("rendered"),t.animation.isFinished()&&!e[ya]&&!e._scheduler.unfinished&&!e._pendingActions.length&&e.trigger("finished")})}dt.appendData=function(t){if(this._disposed){De(this.id);return}var e=t.seriesIndex,r=this.getModel(),a=r.getSeriesByIndex(e);z&&sn(t.data&&a),a.appendData(t),this._scheduler.unfinished=!0},dt.on=ln("on",!1),dt.off=ln("off",!1),dt.one=ln("one",!1);function jy(t,e,r,a){for(var i=e==="component",n=i?t._componentsViews:t._chartsViews,o=i?t._componentsMap:t._chartsMap,s=t._zr,l=t._api,u=0;u<n.length;u++)n[u].__alive=!1;i?r.eachComponent(function(c,v){c!=="series"&&h(v)}):r.eachSeries(h);function h(c){var v="_ec_"+c.id+"_"+c.type,d=o[v];if(!d){var g=iv(c.type),p=i?wr.getClass(g.main,g.sub):Yt.getClass(g.sub);z&&sn(p,g.sub+" does not exist."),d=new p,d.init(r,l),o[v]=d,n.push(d),s.add(d.group)}c.__viewId=d.__id=v,d.__alive=!0,d.__model=c,d.group.__ecComponentInfo={mainType:c.mainType,index:c.componentIndex},!i&&a.prepareView(d,c,r,l)}for(var u=0;u<n.length;){var f=n[u];f.__alive?u++:(!i&&f.renderTask.dispose(),s.remove(f.group),f.dispose(r,l),n.splice(u,1),delete o[f.__id],f.__id=f.group.__ecComponentInfo=null)}}function ov(t){t.clearColorPalette(),t.eachSeries(function(e){e.clearColorPalette()})}function t_(t,e,r,a){AM(t,e,r,a),Wt(t._chartsViews,function(i){i.__alive=!1}),sv(t,e,r,a),Wt(t._chartsViews,function(i){i.__alive||i.remove(e,r)})}function AM(t,e,r,a,i){Wt(i||t._componentsViews,function(n){var o=n.__model;n.render(o,e,r,a),e_(o,n)})}function sv(t,e,r,a,i){var n=t._scheduler,o;e.eachSeries(function(s){var l=t._chartsMap[s.__viewId];l.__alive=!0;var u=l.renderTask;n.updatePayload(u,a),i&&i.get(s.uid)&&u.dirty(),o|=u.perform(n.getPerformArgs(u)),l.group.silent=!!s.get("silent"),e_(s,l),DM(s,l)}),n.unfinished|=o,CM(t,e),UI(t._zr.dom,e)}function lv(t,e){Wt(a_,function(r){r(t,e)})}var TM=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];dt._initEvents=function(){Wt(TM,function(t){var e=function(r){var a=this.getModel(),i=r.target,n,o=t==="globalout";if(o)n={};else if(i&&i.dataIndex!=null){var s=i.dataModel||a.getSeriesByIndex(i.seriesIndex);n=s&&s.getDataParams(i.dataIndex,i.dataType,i)||{}}else i&&i.eventData&&(n=Z({},i.eventData));if(n){var l=n.componentType,u=n.componentIndex;(l==="markLine"||l==="markPoint"||l==="markArea")&&(l="series",u=n.seriesIndex);var h=l&&u!=null&&a.getComponent(l,u),f=h&&this[h.mainType==="series"?"_chartsMap":"_componentsMap"][h.__viewId];z&&!o&&!(h&&f)&&console.warn("model or view can not be found by params"),n.event=r,n.type=t,this._ecEventProcessor.eventInfo={targetEl:i,packedEvent:n,model:h,view:f},this.trigger(t,n)}};e.zrEventfulCallAtLast=!0,this._zr.on(t,e,this)},this),Wt(iu,function(t,e){this._messageCenter.on(e,function(r){this.trigger(e,r)},this)},this)},dt.isDisposed=function(){return this._disposed},dt.clear=function(){if(this._disposed){De(this.id);return}this.setOption({series:[]},!0)},dt.dispose=function(){if(this._disposed){De(this.id);return}this._disposed=!0,$m(this.getDom(),cv,"");var t=this._api,e=this._model;Wt(this._componentsViews,function(r){r.dispose(e,t)}),Wt(this._chartsViews,function(r){r.dispose(e,t)}),this._zr.dispose(),delete ni[this.id]},pt(Bo,Zt);function De(t){z&&console.warn("Instance "+t+" has been disposed")}function CM(t,e){var r=t._zr,a=r.storage,i=0;a.traverse(function(n){i++}),i>e.get("hoverLayerThreshold")&&!at.node&&e.eachSeries(function(n){if(!n.preventUsingHoverLayer){var o=t._chartsMap[n.__viewId];o.__alive&&o.group.traverse(function(s){s.useHoverLayer=!0})}})}function DM(t,e){var r=t.get("blendMode")||null;z&&!at.canvasSupported&&r&&r!=="source-over"&&console.warn("Only canvas support blendMode"),e.group.traverse(function(a){a.isGroup||a.style.blend!==r&&a.setStyle("blend",r),a.eachPendingDisplayable&&a.eachPendingDisplayable(function(i){i.setStyle("blend",r)})})}function e_(t,e){var r=t.get("z"),a=t.get("zlevel");e.group.traverse(function(i){i.type!=="group"&&(r!=null&&(i.z=r),a!=null&&(i.zlevel=a))})}function IM(t){var e=t._coordSysMgr;return Z(new ly(t),{getCoordinateSystems:X(e.getCoordinateSystems,e),getComponentByElement:function(r){for(;r;){var a=r.__ecComponentInfo;if(a!=null)return t._model.getComponent(a.mainType,a.index);r=r.parent}}})}function uv(){this.eventInfo}uv.prototype={constructor:uv,normalizeQuery:function(t){var e={},r={},a={};if(_t(t)){var i=iv(t);e.mainType=i.main||null,e.subType=i.sub||null}else{var n=["Index","Name","Id"],o={name:1,dataIndex:1,dataType:1};T(t,function(s,l){for(var u=!1,h=0;h<n.length;h++){var f=n[h],c=l.lastIndexOf(f);if(c>0&&c===l.length-f.length){var v=l.slice(0,c);v!=="data"&&(e.mainType=v,e[f.toLowerCase()]=s,u=!0)}}o.hasOwnProperty(l)&&(r[l]=s,u=!0),u||(a[l]=s)})}return{cptQuery:e,dataQuery:r,otherQuery:a}},filter:function(t,e,r){var a=this.eventInfo;if(!a)return!0;var i=a.targetEl,n=a.packedEvent,o=a.model,s=a.view;if(!o||!s)return!0;var l=e.cptQuery,u=e.dataQuery;return h(l,o,"mainType")&&h(l,o,"subType")&&h(l,o,"index","componentIndex")&&h(l,o,"name")&&h(l,o,"id")&&h(u,n,"name")&&h(u,n,"dataIndex")&&h(u,n,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,i,n));function h(f,c,v,d){return f[v]==null||c[d||v]===f[v]}},afterTrigger:function(){this.eventInfo=null}};var au={},iu={},hv=[],r_=[],a_=[],nu=[],i_={},fv={},ni={},ou={},MM=new Date-0,LM=new Date-0,cv="_echarts_instance_";function PM(t){var e=0,r=1,a=2,i="__connectUpdateStatus";function n(o,s){for(var l=0;l<o.length;l++){var u=o[l];u[i]=s}}Wt(iu,function(o,s){t._messageCenter.on(s,function(l){if(ou[t.group]&&t[i]!==e){if(l&&l.escapeConnect)return;var u=t.makeActionFromEvent(l),h=[];Wt(ni,function(f){f!==t&&f.group===t.group&&h.push(f)}),n(h,e),Wt(h,function(f){f[i]!==r&&f.dispatchAction(u)}),n(h,a)}})})}function EM(t,e,r){if(z){if(tc.replace(".","")-0<nv.zrender.replace(".","")-0)throw new Error("zrender/src "+tc+" is too old for ECharts "+Wy+". Current version need ZRender "+nv.zrender+"+");if(!t)throw new Error("Initialize failed: invalid dom.")}var a=vv(t);if(a)return z&&console.warn("There is a chart instance already initialized on the dom."),a;z&&Ni(t)&&t.nodeName.toUpperCase()!=="CANVAS"&&(!t.clientWidth&&(!r||r.width==null)||!t.clientHeight&&(!r||r.height==null))&&console.warn("Can't get DOM width or height. Please check dom.clientWidth and dom.clientHeight. They should not be 0.For example, you may need to call this in the callback of window.onload.");var i=new Bo(t,e,r);return i.id="ec_"+MM++,ni[i.id]=i,$m(t,cv,i.id),PM(i),i}function RM(t){if(P(t)){var e=t;t=null,Wt(e,function(r){r.group!=null&&(t=r.group)}),t=t||"g_"+LM++,Wt(e,function(r){r.group=t})}return ou[t]=!0,t}function n_(t){ou[t]=!1}var kM=n_;function NM(t){typeof t=="string"?t=ni[t]:t instanceof Bo||(t=vv(t)),t instanceof Bo&&!t.isDisposed()&&t.dispose()}function vv(t){return ni[zC(t,cv)]}function OM(t){return ni[t]}function dv(t,e){i_[t]=e}function ie(t){r_.push(t)}function Ie(t,e){pv(hv,t,e,Uy)}function zM(t){a_.push(t)}function lt(t,e,r){typeof e=="function"&&(r=e,e="");var a=Oo(t)?t.type:[t,t={event:e}][0];t.event=(t.event||a).toLowerCase(),e=t.event,sn(Xy.test(a)&&Xy.test(e)),au[a]||(au[a]={action:r,actionInfo:t}),iu[e]=a}function gv(t,e){re.register(t,e)}function BM(t){var e=re.get(t);if(e)return e.getDimensionsInfo?e.getDimensionsInfo():e.dimensions.slice()}function It(t,e){pv(nu,t,e,$y,"layout")}function bt(t,e){pv(nu,t,e,Yy,"visual")}function pv(t,e,r,a,i){if((dM(e)||Oo(e))&&(r=e,e=a),z){if(isNaN(e)||e==null)throw new Error("Illegal priority");Wt(t,function(o){sn(o.__raw!==r)})}var n=ql.wrapStageHandler(r,i);return n.__prio=e,n.__raw=r,t.push(n),n}function o_(t,e){fv[t]=e}function Me(t){return ct.extend(t)}function Xt(t){return wr.extend(t)}function su(t){return Dt.extend(t)}function _e(t){return Yt.extend(t)}function VM(t){Rp("createCanvas",t)}function GM(t,e,r){tu.registerMap(t,e,r)}function HM(t){var e=tu.retrieveMap(t);return e&&e[0]&&{geoJson:e[0].geoJSON,specialAreas:e[0].specialAreas}}bt(Zy,WI),ie(vy),Ie(mM,II),o_("default",$I),lt({type:"highlight",event:"highlight",update:"highlight"},Kt),lt({type:"downplay",event:"downplay",update:"downplay"},Kt),dv("light",aM),dv("dark",Oy);var FM={};function s_(t){return t}function Wr(t,e,r,a,i){this._old=t,this._new=e,this._oldKeyGetter=r||s_,this._newKeyGetter=a||s_,this.context=i}Wr.prototype={constructor:Wr,add:function(t){return this._add=t,this},update:function(t){return this._update=t,this},remove:function(t){return this._remove=t,this},execute:function(){var t=this._old,e=this._new,r={},a={},i=[],n=[],o;for(l_(t,r,i,"_oldKeyGetter",this),l_(e,a,n,"_newKeyGetter",this),o=0;o<t.length;o++){var s=i[o],l=a[s];if(l!=null){var u=l.length;u?(u===1&&(a[s]=null),l=l.shift()):a[s]=null,this._update&&this._update(l,o)}else this._remove&&this._remove(o)}for(var o=0;o<n.length;o++){var s=n[o];if(a.hasOwnProperty(s)){var l=a[s];if(l==null)continue;if(!l.length)this._add&&this._add(l);else for(var h=0,u=l.length;h<u;h++)this._add&&this._add(l[h])}}}};function l_(t,e,r,a,i){for(var n=0;n<t.length;n++){var o="_ec_"+i[a](t[n],n),s=e[o];s==null?(r.push(o),e[o]=n):(s.length||(e[o]=s=[s]),s.push(n))}}var mv=j(["tooltip","label","itemName","itemId","seriesName"]);function WM(t){var e={},r=e.encode={},a=j(),i=[],n=[],o=e.userOutput={dimensionNames:t.dimensions.slice(),encode:{}};T(t.dimensions,function(f){var c=t.getDimensionInfo(f),v=c.coordDim;if(v){z&&ot(mv.get(v)==null);var d=c.coordDimIndex;yv(r,v)[d]=f,c.isExtraCoord||(a.set(v,1),UM(c.type)&&(i[0]=f),yv(o.encode,v)[d]=c.index),c.defaultTooltip&&n.push(f)}mv.each(function(g,p){var m=yv(r,p),y=c.otherDims[p];y!=null&&y!==!1&&(m[y]=c.name)})});var s=[],l={};a.each(function(f,c){var v=r[c];l[c]=v[0],s=s.concat(v)}),e.dataDimsOnCoord=s,e.encodeFirstDimNotExtra=l;var u=r.label;u&&u.length&&(i=u.slice());var h=r.tooltip;return h&&h.length?n=h.slice():n.length||(n=i.slice()),r.defaultedLabel=i,r.defaultedTooltip=n,e}function yv(t,e){return t.hasOwnProperty(e)||(t[e]=[]),t[e]}function lu(t){return t==="category"?"ordinal":t==="time"?"time":"float"}function UM(t){return!(t==="ordinal"||t==="time")}function Go(t){t!=null&&Z(this,t),this.otherDims={}}var uu=Q,Ho="undefined",u_=-1,$M="e\0\0",ZM={float:typeof Float64Array===Ho?Array:Float64Array,int:typeof Int32Array===Ho?Array:Int32Array,ordinal:Array,number:Array,time:Array},YM=typeof Uint32Array===Ho?Array:Uint32Array,XM=typeof Int32Array===Ho?Array:Int32Array,qM=typeof Uint16Array===Ho?Array:Uint16Array;function hu(t){return t._rawCount>65535?YM:qM}function KM(t){var e=t.constructor;return e===Array?t.slice():new e(t)}var QM=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_rawData","_chunkSize","_chunkCount","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx"],JM=["_extent","_approximateExtent","_rawExtent"];function h_(t,e){T(QM.concat(e.__wrappedMethods||[]),function(r){e.hasOwnProperty(r)&&(t[r]=e[r])}),t.__wrappedMethods=e.__wrappedMethods,T(JM,function(r){t[r]=Y(e[r])}),t._calculationInfo=Z(e._calculationInfo)}var qt=function(t,e){t=t||["x","y"];for(var r={},a=[],i={},n=0;n<t.length;n++){var o=t[n];_t(o)?o=new Go({name:o}):o instanceof Go||(o=new Go(o));var s=o.name;o.type=o.type||"float",o.coordDim||(o.coordDim=s,o.coordDimIndex=0),o.otherDims=o.otherDims||{},a.push(s),r[s]=o,o.index=n,o.createInvertedIndices&&(i[s]=[])}this.dimensions=a,this._dimensionInfos=r,this.hostModel=e,this.dataType,this._indices=null,this._count=0,this._rawCount=0,this._storage={},this._nameList=[],this._idList=[],this._optionModels=[],this._visual={},this._layout={},this._itemVisuals=[],this.hasItemVisual={},this._itemLayouts=[],this._graphicEls=[],this._chunkSize=1e5,this._chunkCount=0,this._rawData,this._rawExtent={},this._extent={},this._approximateExtent={},this._dimensionsSummary=WM(this),this._invertedIndicesMap=i,this._calculationInfo={},this.userOutput=this._dimensionsSummary.userOutput},q=qt.prototype;q.type="list",q.hasItemOption=!0,q.getDimension=function(t){return(typeof t=="number"||!isNaN(t)&&!this._dimensionInfos.hasOwnProperty(t))&&(t=this.dimensions[t]),t},q.getDimensionInfo=function(t){return this._dimensionInfos[this.getDimension(t)]},q.getDimensionsOnCoord=function(){return this._dimensionsSummary.dataDimsOnCoord.slice()},q.mapDimension=function(t,e){var r=this._dimensionsSummary;if(e==null)return r.encodeFirstDimNotExtra[t];var a=r.encode[t];return e===!0?(a||[]).slice():a&&a[e]},q.initData=function(t,e,r){var a=nr.isInstance(t)||Pr(t);if(a&&(t=new dy(t,this.dimensions.length)),z&&!a&&(typeof t.getItem!="function"||typeof t.count!="function"))throw new Error("Inavlid data provider.");this._rawData=t,this._storage={},this._indices=null,this._nameList=e||[],this._idList=[],this._nameRepeatCount={},r||(this.hasItemOption=!1),this.defaultDimValueGetter=my[this._rawData.getSource().sourceFormat],this._dimValueGetter=r=r||this.defaultDimValueGetter,this._dimValueGetterArrayRows=my.arrayRows,this._rawExtent={},this._initDataFromProvider(0,t.count()),t.pure&&(this.hasItemOption=!1)},q.getProvider=function(){return this._rawData},q.appendData=function(t){z&&ot(!this._indices,"appendData can only be called on raw data.");var e=this._rawData,r=this.count();e.appendData(t);var a=e.count();e.persistent||(a+=r),this._initDataFromProvider(r,a)},q.appendValues=function(t,e){for(var r=this._chunkSize,a=this._storage,i=this.dimensions,n=i.length,o=this._rawExtent,s=this.count(),l=s+Math.max(t.length,e?e.length:0),u=this._chunkCount,h=0;h<n;h++){var f=i[h];o[f]||(o[f]=cu()),a[f]||(a[f]=[]),f_(a,this._dimensionInfos[f],r,u,l),this._chunkCount=a[f].length}for(var c=new Array(n),v=s;v<l;v++){for(var d=v-s,g=Math.floor(v/r),p=v%r,m=0;m<n;m++){var f=i[m],y=this._dimValueGetterArrayRows(t[d]||c,f,d,m);a[f][g][p]=y;var _=o[f];y<_[0]&&(_[0]=y),y>_[1]&&(_[1]=y)}e&&(this._nameList[v]=e[d])}this._rawCount=this._count=l,this._extent={},c_(this)},q._initDataFromProvider=function(t,e){if(!(t>=e)){for(var r=this._chunkSize,a=this._rawData,i=this._storage,n=this.dimensions,o=n.length,s=this._dimensionInfos,l=this._nameList,u=this._idList,h=this._rawExtent,f=this._nameRepeatCount={},c,v=this._chunkCount,d=0;d<o;d++){var g=n[d];h[g]||(h[g]=cu());var p=s[g];p.otherDims.itemName===0&&(c=this._nameDimIdx=d),p.otherDims.itemId===0&&(this._idDimIdx=d),i[g]||(i[g]=[]),f_(i,p,r,v,e),this._chunkCount=i[g].length}for(var m=new Array(o),y=t;y<e;y++){m=a.getItem(y,m);for(var _=Math.floor(y/r),x=y%r,w=0;w<o;w++){var g=n[w],S=i[g][_],b=this._dimValueGetter(m,g,y,w);S[x]=b;var A=h[g];b<A[0]&&(A[0]=b),b>A[1]&&(A[1]=b)}if(!a.pure){var C=l[y];if(m&&C==null){if(m.name!=null)l[y]=C=m.name;else if(c!=null){var D=n[c],I=i[D][_];if(I){C=I[x];var L=s[D].ordinalMeta;L&&L.categories.length&&(C=L.categories[C])}}}var M=m==null?null:m.id;M==null&&C!=null&&(f[C]=f[C]||0,M=C,f[C]>0&&(M+="__ec__"+f[C]),f[C]++),M!=null&&(u[y]=M)}}!a.persistent&&a.clean&&a.clean(),this._rawCount=this._count=e,this._extent={},c_(this)}};function f_(t,e,r,a,i){var n=ZM[e.type],o=a-1,s=e.name,l=t[s][o];if(l&&l.length<r){for(var u=new n(Math.min(i-o*r,r)),h=0;h<l.length;h++)u[h]=l[h];t[s][o]=u}for(var f=a*r;f<i;f+=r)t[s].push(new n(Math.min(i-f,r)))}function c_(t){var e=t._invertedIndicesMap;T(e,function(r,a){var i=t._dimensionInfos[a],n=i.ordinalMeta;if(n){r=e[a]=new XM(n.categories.length);for(var o=0;o<r.length;o++)r[o]=u_;for(var o=0;o<t._count;o++)r[t.get(a,o)]=o}})}function v_(t,e,r){var a;if(e!=null){var i=t._chunkSize,n=Math.floor(r/i),o=r%i,s=t.dimensions[e],l=t._storage[s][n];if(l){a=l[o];var u=t._dimensionInfos[s].ordinalMeta;u&&u.categories.length&&(a=u.categories[a])}}return a}q.count=function(){return this._count},q.getIndices=function(){var t,e=this._indices;if(e){var r=e.constructor,a=this._count;if(r===Array){t=new r(a);for(var i=0;i<a;i++)t[i]=e[i]}else t=new r(e.buffer,0,a)}else for(var r=hu(this),t=new r(this.count()),i=0;i<t.length;i++)t[i]=i;return t},q.get=function(t,e){if(!(e>=0&&e<this._count))return NaN;var r=this._storage;if(!r[t])return NaN;e=this.getRawIndex(e);var a=Math.floor(e/this._chunkSize),i=e%this._chunkSize,n=r[t][a],o=n[i];return o},q.getByRawIndex=function(t,e){if(!(e>=0&&e<this._rawCount))return NaN;var r=this._storage[t];if(!r)return NaN;var a=Math.floor(e/this._chunkSize),i=e%this._chunkSize,n=r[a];return n[i]},q._getFast=function(t,e){var r=Math.floor(e/this._chunkSize),a=e%this._chunkSize,i=this._storage[t][r];return i[a]},q.getValues=function(t,e){var r=[];P(t)||(e=t,t=this.dimensions);for(var a=0,i=t.length;a<i;a++)r.push(this.get(t[a],e));return r},q.hasValue=function(t){for(var e=this._dimensionsSummary.dataDimsOnCoord,r=0,a=e.length;r<a;r++)if(isNaN(this.get(e[r],t)))return!1;return!0},q.getDataExtent=function(t){t=this.getDimension(t);var e=this._storage[t],r=cu();if(!e)return r;var a=this.count(),i=!this._indices,n;if(i)return this._rawExtent[t].slice();if(n=this._extent[t],n)return n.slice();n=r;for(var o=n[0],s=n[1],l=0;l<a;l++){var u=this._getFast(t,this.getRawIndex(l));u<o&&(o=u),u>s&&(s=u)}return n=[o,s],this._extent[t]=n,n},q.getApproximateExtent=function(t){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t)},q.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},q.getCalculationInfo=function(t){return this._calculationInfo[t]},q.setCalculationInfo=function(t,e){uu(t)?Z(this._calculationInfo,t):this._calculationInfo[t]=e},q.getSum=function(t){var e=this._storage[t],r=0;if(e)for(var a=0,i=this.count();a<i;a++){var n=this.get(t,a);isNaN(n)||(r+=n)}return r},q.getMedian=function(t){var e=[];this.each(t,function(i,n){isNaN(i)||e.push(i)});var r=[].concat(e).sort(function(i,n){return i-n}),a=this.count();return a===0?0:a%2===1?r[(a-1)/2]:(r[a/2]+r[a/2-1])/2},q.rawIndexOf=function(t,e){var r=t&&this._invertedIndicesMap[t];if(z&&!r)throw new Error("Do not supported yet");var a=r[e];return a==null||isNaN(a)?u_:a},q.indexOfName=function(t){for(var e=0,r=this.count();e<r;e++)if(this.getName(e)===t)return e;return-1},q.indexOfRawIndex=function(t){if(t>=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,r=e[t];if(r!=null&&r<this._count&&r===t)return t;for(var a=0,i=this._count-1;a<=i;){var n=(a+i)/2|0;if(e[n]<t)a=n+1;else if(e[n]>t)i=n-1;else return n}return-1},q.indicesOfNearest=function(t,e,r){var a=this._storage,i=a[t],n=[];if(!i)return n;r==null&&(r=1/0);for(var o=1/0,s=-1,l=0,u=0,h=this.count();u<h;u++){var f=e-this.get(t,u),c=Math.abs(f);c<=r&&((c<o||c===o&&f>=0&&s<0)&&(o=c,s=f,l=0),f===s&&(n[l++]=u))}return n.length=l,n},q.getRawIndex=Fo;function Fo(t){return t}function Wo(t){return t<this._count&&t>=0?this._indices[t]:-1}q.getRawDataItem=function(t){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(t));for(var e=[],r=0;r<this.dimensions.length;r++){var a=this.dimensions[r];e.push(this.get(a,t))}return e},q.getName=function(t){var e=this.getRawIndex(t);return this._nameList[e]||v_(this,this._nameDimIdx,e)||""},q.getId=function(t){return _v(this,this.getRawIndex(t))};function _v(t,e){var r=t._idList[e];return r==null&&(r=v_(t,t._idDimIdx,e)),r==null&&(r=$M+e),r}function xv(t){return P(t)||(t=[t]),t}function fu(t,e){for(var r=0;r<e.length;r++)t._dimensionInfos[e[r]]||console.error("Unkown dimension "+e[r])}q.each=function(t,e,r,a){"use strict";if(!!this._count){typeof t=="function"&&(a=r,r=e,e=t,t=[]),r=r||a||this,t=E(xv(t),this.getDimension,this),z&&fu(this,t);for(var i=t.length,n=0;n<this.count();n++)switch(i){case 0:e.call(r,n);break;case 1:e.call(r,this.get(t[0],n),n);break;case 2:e.call(r,this.get(t[0],n),this.get(t[1],n),n);break;default:for(var o=0,s=[];o<i;o++)s[o]=this.get(t[o],n);s[o]=n,e.apply(r,s)}}},q.filterSelf=function(t,e,r,a){"use strict";if(!!this._count){typeof t=="function"&&(a=r,r=e,e=t,t=[]),r=r||a||this,t=E(xv(t),this.getDimension,this),z&&fu(this,t);for(var i=this.count(),n=hu(this),o=new n(i),s=[],l=t.length,u=0,h=t[0],f=0;f<i;f++){var c,v=this.getRawIndex(f);if(l===0)c=e.call(r,f);else if(l===1){var d=this._getFast(h,v);c=e.call(r,d,f)}else{for(var g=0;g<l;g++)s[g]=this._getFast(h,v);s[g]=f,c=e.apply(r,s)}c&&(o[u++]=v)}return u<i&&(this._indices=o),this._count=u,this._extent={},this.getRawIndex=this._indices?Wo:Fo,this}},q.selectRange=function(t){"use strict";if(!!this._count){var e=[];for(var r in t)t.hasOwnProperty(r)&&e.push(r);z&&fu(this,e);var a=e.length;if(!!a){var i=this.count(),n=hu(this),o=new n(i),s=0,l=e[0],u=t[l][0],h=t[l][1],f=!1;if(!this._indices){var c=0;if(a===1){for(var v=this._storage[e[0]],d=0;d<this._chunkCount;d++)for(var g=v[d],p=Math.min(this._count-d*this._chunkSize,this._chunkSize),m=0;m<p;m++){var y=g[m];(y>=u&&y<=h||isNaN(y))&&(o[s++]=c),c++}f=!0}else if(a===2){for(var v=this._storage[l],_=this._storage[e[1]],x=t[e[1]][0],w=t[e[1]][1],d=0;d<this._chunkCount;d++)for(var g=v[d],S=_[d],p=Math.min(this._count-d*this._chunkSize,this._chunkSize),m=0;m<p;m++){var y=g[m],b=S[m];(y>=u&&y<=h||isNaN(y))&&(b>=x&&b<=w||isNaN(b))&&(o[s++]=c),c++}f=!0}}if(!f)if(a===1)for(var m=0;m<i;m++){var A=this.getRawIndex(m),y=this._getFast(l,A);(y>=u&&y<=h||isNaN(y))&&(o[s++]=A)}else for(var m=0;m<i;m++){for(var C=!0,A=this.getRawIndex(m),d=0;d<a;d++){var D=e[d],y=this._getFast(r,A);(y<t[D][0]||y>t[D][1])&&(C=!1)}C&&(o[s++]=this.getRawIndex(m))}return s<i&&(this._indices=o),this._count=s,this._extent={},this.getRawIndex=this._indices?Wo:Fo,this}}},q.mapArray=function(t,e,r,a){"use strict";typeof t=="function"&&(a=r,r=e,e=t,t=[]),r=r||a||this;var i=[];return this.each(t,function(){i.push(e&&e.apply(this,arguments))},r),i};function d_(t,e){var r=t.dimensions,a=new qt(E(r,t.getDimensionInfo,t),t.hostModel);h_(a,t);for(var i=a._storage={},n=t._storage,o=0;o<r.length;o++){var s=r[o];n[s]&&(ut(e,s)>=0?(i[s]=jM(n[s]),a._rawExtent[s]=cu(),a._extent[s]=null):i[s]=n[s])}return a}function jM(t){for(var e=new Array(t.length),r=0;r<t.length;r++)e[r]=KM(t[r]);return e}function cu(){return[1/0,-1/0]}q.map=function(t,e,r,a){"use strict";r=r||a||this,t=E(xv(t),this.getDimension,this),z&&fu(this,t);var i=d_(this,t);i._indices=this._indices,i.getRawIndex=i._indices?Wo:Fo;for(var n=i._storage,o=[],s=this._chunkSize,l=t.length,u=this.count(),h=[],f=i._rawExtent,c=0;c<u;c++){for(var v=0;v<l;v++)h[v]=this.get(t[v],c);h[l]=c;var d=e&&e.apply(r,h);if(d!=null){typeof d!="object"&&(o[0]=d,d=o);for(var g=this.getRawIndex(c),p=Math.floor(g/s),m=g%s,y=0;y<d.length;y++){var _=t[y],x=d[y],w=f[_],S=n[_];S&&(S[p][m]=x),x<w[0]&&(w[0]=x),x>w[1]&&(w[1]=x)}}}return i},q.downSample=function(t,e,r,a){for(var i=d_(this,[t]),n=i._storage,o=[],s=Math.floor(1/e),l=n[t],u=this.count(),h=this._chunkSize,f=i._rawExtent[t],c=new(hu(this))(u),v=0,d=0;d<u;d+=s){s>u-d&&(s=u-d,o.length=s);for(var g=0;g<s;g++){var p=this.getRawIndex(d+g),m=Math.floor(p/h),y=p%h;o[g]=l[m][y]}var _=r(o),x=this.getRawIndex(Math.min(d+a(o,_)||0,u-1)),w=Math.floor(x/h),S=x%h;l[w][S]=_,_<f[0]&&(f[0]=_),_>f[1]&&(f[1]=_),c[v++]=x}return i._count=v,i._indices=c,i.getRawIndex=Wo,i},q.getItemModel=function(t){var e=this.hostModel;return new ht(this.getRawDataItem(t),e,e&&e.ecModel)},q.diff=function(t){var e=this;return new Wr(t?t.getIndices():[],this.getIndices(),function(r){return _v(t,r)},function(r){return _v(e,r)})},q.getVisual=function(t){var e=this._visual;return e&&e[t]},q.setVisual=function(t,e){if(uu(t)){for(var r in t)t.hasOwnProperty(r)&&this.setVisual(r,t[r]);return}this._visual=this._visual||{},this._visual[t]=e},q.setLayout=function(t,e){if(uu(t)){for(var r in t)t.hasOwnProperty(r)&&this.setLayout(r,t[r]);return}this._layout[t]=e},q.getLayout=function(t){return this._layout[t]},q.getItemLayout=function(t){return this._itemLayouts[t]},q.setItemLayout=function(t,e,r){this._itemLayouts[t]=r?Z(this._itemLayouts[t]||{},e):e},q.clearItemLayouts=function(){this._itemLayouts.length=0},q.getItemVisual=function(t,e,r){var a=this._itemVisuals[t],i=a&&a[e];return i==null&&!r?this.getVisual(e):i},q.setItemVisual=function(t,e,r){var a=this._itemVisuals[t]||{},i=this.hasItemVisual;if(this._itemVisuals[t]=a,uu(e)){for(var n in e)e.hasOwnProperty(n)&&(a[n]=e[n],i[n]=!0);return}a[e]=r,i[e]=!0},q.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};var t2=function(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType};q.setItemGraphicEl=function(t,e){var r=this.hostModel;e&&(e.dataIndex=t,e.dataType=this.dataType,e.seriesIndex=r&&r.seriesIndex,e.type==="group"&&e.traverse(t2,e)),this._graphicEls[t]=e},q.getItemGraphicEl=function(t){return this._graphicEls[t]},q.eachItemGraphicEl=function(t,e){T(this._graphicEls,function(r,a){r&&t&&t.call(e,r,a)})},q.cloneShallow=function(t){if(!t){var e=E(this.dimensions,this.getDimensionInfo,this);t=new qt(e,this.hostModel)}if(t._storage=this._storage,h_(t,this),this._indices){var r=this._indices.constructor;t._indices=new r(this._indices)}else t._indices=null;return t.getRawIndex=t._indices?Wo:Fo,t},q.wrapMethod=function(t,e){var r=this[t];typeof r=="function"&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var a=r.apply(this,arguments);return e.apply(this,[a].concat(Oi(arguments)))})},q.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],q.CHANGABLE_METHODS=["filterSelf","selectRange"];function g_(t,e,r){nr.isInstance(e)||(e=nr.seriesDataToSource(e)),r=r||{},t=(t||[]).slice();for(var a=(r.dimsDef||[]).slice(),i=j(),n=j(),o=[],s=e2(e,t,a,r.dimCount),l=0;l<s;l++){var u=a[l]=Z({},Q(a[l])?a[l]:{name:a[l]}),h=u.name,f=o[l]=new Go;h!=null&&i.get(h)==null&&(f.name=f.displayName=h,i.set(h,l)),u.type!=null&&(f.type=u.type),u.displayName!=null&&(f.displayName=u.displayName)}var c=r.encodeDef;!c&&r.encodeDefaulter&&(c=r.encodeDefaulter(e,s)),c=j(c),c.each(function(w,S){if(w=te(w).slice(),w.length===1&&!_t(w[0])&&w[0]<0){c.set(S,!1);return}var b=c.set(S,[]);T(w,function(A,C){_t(A)&&(A=i.get(A)),A!=null&&A<s&&(b[C]=A,d(o[A],S,C))})});var v=0;T(t,function(A,S){var b,A,C,D;if(_t(A))b=A,A={};else{b=A.name;var I=A.ordinalMeta;A.ordinalMeta=null,A=Y(A),A.ordinalMeta=I,C=A.dimsDef,D=A.otherDims,A.name=A.coordDim=A.coordDimIndex=A.dimsDef=A.otherDims=null}var L=c.get(b);if(L!==!1){var L=te(L);if(!L.length)for(var M=0;M<(C&&C.length||1);M++){for(;v<o.length&&o[v].coordDim!=null;)v++;v<o.length&&L.push(v++)}T(L,function(B,k){var O=o[B];if(d(U(O,A),b,k),O.name==null&&C){var V=C[k];!Q(V)&&(V={name:V}),O.name=O.displayName=V.name,O.defaultTooltip=V.defaultTooltip}D&&U(O.otherDims,D)})}});function d(w,S,b){mv.get(S)!=null?w.otherDims[S]=b:(w.coordDim=S,w.coordDimIndex=b,n.set(S,!0))}var g=r.generateCoord,p=r.generateCoordCount,m=p!=null;p=g?p||1:0;for(var y=g||"value",_=0;_<s;_++){var f=o[_]=o[_]||new Go,x=f.coordDim;x==null&&(f.coordDim=p_(y,n,m),f.coordDimIndex=0,(!g||p<=0)&&(f.isExtraCoord=!0),p--),f.name==null&&(f.name=p_(f.coordDim,i)),f.type==null&&(uI(e,_,f.name)===se.Must||f.isExtraCoord&&(f.otherDims.itemName!=null||f.otherDims.seriesName!=null))&&(f.type="ordinal")}return o}function e2(t,e,r,a){var i=Math.max(t.dimensionsDetectCount||1,e.length,r.length,a||0);return T(e,function(n){var o=n.dimsDef;o&&(i=Math.max(i,o.length))}),i}function p_(t,e,r){if(r||e.get(t)!=null){for(var a=0;e.get(t+a)!=null;)a++;t+=a}return e.set(t,!0),t}var un=function(t,e){return e=e||{},g_(e.coordDimensions||[],t,{dimsDef:e.dimensionsDefine||t.dimensionsDefine,encodeDef:e.encodeDefine||t.encodeDefine,dimCount:e.dimensionsCount,encodeDefaulter:e.encodeDefaulter,generateCoord:e.generateCoord,generateCoordCount:e.generateCoordCount})};function r2(t){this.coordSysName=t,this.coordSysDims=[],this.axisMap=j(),this.categoryAxisMap=j(),this.firstCategoryDimIndex=null}function a2(t){var e=t.get("coordinateSystem"),r=new r2(e),a=i2[e];if(a)return a(t,r,r.axisMap,r.categoryAxisMap),r}var i2={cartesian2d:function(t,e,r,a){var i=t.getReferringComponents("xAxis")[0],n=t.getReferringComponents("yAxis")[0];if(z){if(!i)throw new Error('xAxis "'+Et(t.get("xAxisIndex"),t.get("xAxisId"),0)+'" not found');if(!n)throw new Error('yAxis "'+Et(t.get("xAxisIndex"),t.get("yAxisId"),0)+'" not found')}e.coordSysDims=["x","y"],r.set("x",i),r.set("y",n),hn(i)&&(a.set("x",i),e.firstCategoryDimIndex=0),hn(n)&&(a.set("y",n),e.firstCategoryDimIndex==null&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,r,a){var i=t.getReferringComponents("singleAxis")[0];if(z&&!i)throw new Error("singleAxis should be specified.");e.coordSysDims=["single"],r.set("single",i),hn(i)&&(a.set("single",i),e.firstCategoryDimIndex=0)},polar:function(t,e,r,a){var i=t.getReferringComponents("polar")[0],n=i.findAxisModel("radiusAxis"),o=i.findAxisModel("angleAxis");if(z){if(!o)throw new Error("angleAxis option not found");if(!n)throw new Error("radiusAxis option not found")}e.coordSysDims=["radius","angle"],r.set("radius",n),r.set("angle",o),hn(n)&&(a.set("radius",n),e.firstCategoryDimIndex=0),hn(o)&&(a.set("angle",o),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},geo:function(t,e,r,a){e.coordSysDims=["lng","lat"]},parallel:function(t,e,r,a){var i=t.ecModel,n=i.getComponent("parallel",t.get("parallelIndex")),o=e.coordSysDims=n.dimensions.slice();T(n.parallelAxisIndex,function(s,l){var u=i.getComponent("parallelAxis",s),h=o[l];r.set(h,u),hn(u)&&e.firstCategoryDimIndex==null&&(a.set(h,u),e.firstCategoryDimIndex=l)})}};function hn(t){return t.get("type")==="category"}function m_(t,e,r){r=r||{};var a=r.byIndex,i=r.stackedCoordDimension,n=!!(t&&t.get("stack")),o,s,l,u;if(T(e,function(v,d){_t(v)&&(e[d]=v={name:v}),n&&!v.isExtraCoord&&(!a&&!o&&v.ordinalMeta&&(o=v),!s&&v.type!=="ordinal"&&v.type!=="time"&&(!i||i===v.coordDim)&&(s=v))}),s&&!a&&!o&&(a=!0),s){l="__\0ecstackresult",u="__\0ecstackedover",o&&(o.createInvertedIndices=!0);var h=s.coordDim,f=s.type,c=0;T(e,function(v){v.coordDim===h&&c++}),e.push({name:l,coordDim:h,coordDimIndex:c,type:f,isExtraCoord:!0,isCalculationCoord:!0}),c++,e.push({name:u,coordDim:u,coordDimIndex:c,type:f,isExtraCoord:!0,isCalculationCoord:!0})}return{stackedDimension:s&&s.name,stackedByDimension:o&&o.name,isStackedByIndex:a,stackedOverDimension:u,stackResultDimension:l}}function Ur(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function Uo(t,e){return Ur(t,e)?t.getCalculationInfo("stackResultDimension"):e}function $r(t,e,r){r=r||{},nr.isInstance(t)||(t=nr.seriesDataToSource(t));var a=e.get("coordinateSystem"),i=re.get(a),n=a2(e),o;n&&(o=E(n.coordSysDims,function(v){var d={name:v},g=n.axisMap.get(v);if(g){var p=g.get("type");d.type=lu(p)}return d})),o||(o=i&&(i.getDimensionsInfo?i.getDimensionsInfo():i.dimensions.slice())||["x","y"]);var s=un(t,{coordDimensions:o,generateCoord:r.generateCoord,encodeDefaulter:r.useEncodeDefaulter?K(ny,o,e):null}),l,u;n&&T(s,function(v,d){var g=v.coordDim,p=n.categoryAxisMap.get(g);p&&(l==null&&(l=d),v.ordinalMeta=p.getOrdinalMeta()),v.otherDims.itemName!=null&&(u=!0)}),!u&&l!=null&&(s[l].otherDims.itemName=0);var h=m_(e,s),f=new qt(s,e);f.setCalculationInfo(h);var c=l!=null&&n2(t)?function(v,d,g,p){return p===l?g:this.defaultDimValueGetter(v,d,g,p)}:null;return f.hasItemOption=!1,f.initData(t,null,c),f}function n2(t){if(t.sourceFormat===ri){var e=o2(t.data||[]);return e!=null&&!P(so(e))}}function o2(t){for(var e=0;e<t.length&&t[e]==null;)e++;return t[e]}function Bt(t){this._setting=t||{},this._extent=[1/0,-1/0],this._interval=0,this.init&&this.init.apply(this,arguments)}Bt.prototype.parse=function(t){return t},Bt.prototype.getSetting=function(t){return this._setting[t]},Bt.prototype.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},Bt.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},Bt.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},Bt.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])},Bt.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},Bt.prototype.getExtent=function(){return this._extent.slice()},Bt.prototype.setExtent=function(t,e){var r=this._extent;isNaN(t)||(r[0]=t),isNaN(e)||(r[1]=e)},Bt.prototype.isBlank=function(){return this._isBlank},Bt.prototype.setBlank=function(t){this._isBlank=t},Bt.prototype.getLabel=null,lo(Bt),gl(Bt,{registerWhenExtend:!0});function $o(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this._map}$o.createByAxisModel=function(t){var e=t.option,r=e.data,a=r&&E(r,s2);return new $o({categories:a,needCollect:!a,deduplication:e.dedplication!==!1})};var y_=$o.prototype;y_.getOrdinal=function(t){return __(this).get(t)},y_.parseAndCollect=function(t){var e,r=this._needCollect;if(typeof t!="string"&&!r)return t;if(r&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var a=__(this);return e=a.get(t),e==null&&(r?(e=this.categories.length,this.categories[e]=t,a.set(t,e)):e=NaN),e};function __(t){return t._map||(t._map=j(t.categories))}function s2(t){return Q(t)&&t.value!=null?t.value:t+""}var wv=Bt.prototype,bv=Bt.extend({type:"ordinal",init:function(t,e){(!t||P(t))&&(t=new $o({categories:t})),this._ordinalMeta=t,this._extent=e||[0,t.categories.length-1]},parse:function(t){return typeof t=="string"?this._ordinalMeta.getOrdinal(t):Math.round(t)},contain:function(t){return t=this.parse(t),wv.contain.call(this,t)&&this._ordinalMeta.categories[t]!=null},normalize:function(t){return wv.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(wv.scale.call(this,t))},getTicks:function(){for(var t=[],e=this._extent,r=e[0];r<=e[1];)t.push(r),r++;return t},getLabel:function(t){if(!this.isBlank())return this._ordinalMeta.categories[t]},count:function(){return this._extent[1]-this._extent[0]+1},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},getOrdinalMeta:function(){return this._ordinalMeta},niceTicks:Kt,niceExtent:Kt});bv.create=function(){return new bv};var x_=Ft;function l2(t,e,r,a){var i={},n=t[1]-t[0],o=i.interval=Pc(n/e,!0);r!=null&&o<r&&(o=i.interval=r),a!=null&&o>a&&(o=i.interval=a);var s=i.intervalPrecision=w_(o),l=i.niceTickExtent=[x_(Math.ceil(t[0]/o)*o,s),x_(Math.floor(t[1]/o)*o,s)];return S_(l,t),i}function w_(t){return Bl(t)+2}function b_(t,e,r){t[e]=Math.max(Math.min(t[e],r[1]),r[0])}function S_(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),b_(t,0,e),b_(t,1,e),t[0]>t[1]&&(t[0]=t[1])}var fn=Ft,Sr=Bt.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(t,e){var r=this._extent;isNaN(t)||(r[0]=parseFloat(t)),isNaN(e)||(r[1]=parseFloat(e))},unionExtent:function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1]),Sr.prototype.setExtent.call(this,e[0],e[1])},getInterval:function(){return this._interval},setInterval:function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=w_(t)},getTicks:function(t){var e=this._interval,r=this._extent,a=this._niceExtent,i=this._intervalPrecision,n=[];if(!e)return n;var o=1e4;r[0]<a[0]&&(t?n.push(fn(a[0]-e,i)):n.push(r[0]));for(var s=a[0];s<=a[1]&&(n.push(s),s=fn(s+e,i),s!==n[n.length-1]);)if(n.length>o)return[];var l=n.length?n[n.length-1]:a[1];return r[1]>l&&(t?n.push(fn(l+e,i)):n.push(r[1])),n},getMinorTicks:function(t){for(var e=this.getTicks(!0),r=[],a=this.getExtent(),i=1;i<e.length;i++){for(var n=e[i],o=e[i-1],s=0,l=[],u=n-o,h=u/t;s<t-1;){var f=Ft(o+(s+1)*h);f>a[0]&&f<a[1]&&l.push(f),s++}r.push(l)}return r},getLabel:function(t,e){if(t==null)return"";var r=e&&e.precision;return r==null?r=Bl(t)||0:r==="auto"&&(r=this._intervalPrecision),t=fn(t,r,!0),da(t)},niceTicks:function(t,e,r){t=t||5;var a=this._extent,i=a[1]-a[0];if(!!isFinite(i)){i<0&&(i=-i,a.reverse());var n=l2(a,t,e,r);this._intervalPrecision=n.intervalPrecision,this._interval=n.interval,this._niceExtent=n.niceTickExtent}},niceExtent:function(t){var e=this._extent;if(e[0]===e[1])if(e[0]!==0){var r=e[0];t.fixMax||(e[1]+=r/2),e[0]-=r/2}else e[1]=1;var a=e[1]-e[0];isFinite(a)||(e[0]=0,e[1]=1),this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var i=this._interval;t.fixMin||(e[0]=fn(Math.floor(e[0]/i)*i)),t.fixMax||(e[1]=fn(Math.ceil(e[1]/i)*i))}});Sr.create=function(){return new Sr};var Sv="__ec_stack_",A_=.5,Av=typeof Float32Array<"u"?Float32Array:Array;function Tv(t){return t.get("stack")||Sv+t.seriesIndex}function Cv(t){return t.dim+t.index}function u2(t){var e=[],r=t.axis,a="axis0";if(r.type==="category"){for(var i=r.getBandWidth(),n=0;n<t.count;n++)e.push(U({bandWidth:i,axisKey:a,stackId:Sv+n},t));for(var o=C_(e),s=[],n=0;n<t.count;n++){var l=o[a][Sv+n];l.offsetCenter=l.offset+l.width/2,s.push(l)}return s}}function T_(t,e){var r=[];return e.eachSeriesByType(t,function(a){M_(a)&&!L_(a)&&r.push(a)}),r}function h2(t){var e={};T(t,function(l){var u=l.coordinateSystem,h=u.getBaseAxis();if(!(h.type!=="time"&&h.type!=="value"))for(var f=l.getData(),c=h.dim+"_"+h.index,v=f.mapDimension(h.dim),d=0,g=f.count();d<g;++d){var p=f.get(v,d);e[c]?e[c].push(p):e[c]=[p]}});var r=[];for(var a in e)if(e.hasOwnProperty(a)){var i=e[a];if(i){i.sort(function(l,u){return l-u});for(var n=null,o=1;o<i.length;++o){var s=i[o]-i[o-1];s>0&&(n=n===null?s:Math.min(n,s))}r[a]=n}}return r}function Dv(t){var e=h2(t),r=[];return T(t,function(a){var i=a.coordinateSystem,n=i.getBaseAxis(),o=n.getExtent(),s;if(n.type==="category")s=n.getBandWidth();else if(n.type==="value"||n.type==="time"){var l=n.dim+"_"+n.index,u=e[l],h=Math.abs(o[1]-o[0]),f=n.scale.getExtent(),c=Math.abs(f[1]-f[0]);s=u?h/c*u:h}else{var v=a.getData();s=Math.abs(o[1]-o[0])/v.count()}var d=R(a.get("barWidth"),s),g=R(a.get("barMaxWidth"),s),p=R(a.get("barMinWidth")||1,s),m=a.get("barGap"),y=a.get("barCategoryGap");r.push({bandWidth:s,barWidth:d,barMaxWidth:g,barMinWidth:p,barGap:m,barCategoryGap:y,axisKey:Cv(n),stackId:Tv(a)})}),C_(r)}function C_(t){var e={};T(t,function(a,i){var n=a.axisKey,o=a.bandWidth,s=e[n]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},l=s.stacks;e[n]=s;var u=a.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var h=a.barWidth;h&&!l[u].width&&(l[u].width=h,h=Math.min(s.remainedWidth,h),s.remainedWidth-=h);var f=a.barMaxWidth;f&&(l[u].maxWidth=f);var c=a.barMinWidth;c&&(l[u].minWidth=c);var v=a.barGap;v!=null&&(s.gap=v);var d=a.barCategoryGap;d!=null&&(s.categoryGap=d)});var r={};return T(e,function(a,i){r[i]={};var n=a.stacks,o=a.bandWidth,s=R(a.categoryGap,o),l=R(a.gap,1),u=a.remainedWidth,h=a.autoWidthCount,f=(u-s)/(h+(h-1)*l);f=Math.max(f,0),T(n,function(g){var p=g.maxWidth,m=g.minWidth;if(g.width){var y=g.width;p&&(y=Math.min(y,p)),m&&(y=Math.max(y,m)),g.width=y,u-=y+l*y,h--}else{var y=f;p&&p<y&&(y=Math.min(p,u)),m&&m>y&&(y=m),y!==f&&(g.width=y,u-=y+l*y,h--)}}),f=(u-s)/(h+(h-1)*l),f=Math.max(f,0);var c=0,v;T(n,function(g,p){g.width||(g.width=f),v=g,c+=g.width*(1+l)}),v&&(c-=v.width*l);var d=-c/2;T(n,function(g,p){r[i][p]=r[i][p]||{bandWidth:o,offset:d,width:g.width},d+=g.width*(1+l)})}),r}function D_(t,e,r){if(t&&e){var a=t[Cv(e)];return a!=null&&r!=null&&(a=a[Tv(r)]),a}}function I_(t,e){var r=T_(t,e),a=Dv(r),i={};T(r,function(n){var o=n.getData(),s=n.coordinateSystem,l=s.getBaseAxis(),u=Tv(n),h=a[Cv(l)][u],f=h.offset,c=h.width,v=s.getOtherAxis(l),d=n.get("barMinHeight")||0;i[u]=i[u]||[],o.setLayout({bandWidth:h.bandWidth,offset:f,size:c});for(var g=o.mapDimension(v.dim),p=o.mapDimension(l.dim),m=Ur(o,g),y=v.isHorizontal(),_=P_(l,v,m),x=0,w=o.count();x<w;x++){var S=o.get(g,x),b=o.get(p,x),A=S>=0?"p":"n",C=_;m&&(i[u][b]||(i[u][b]={p:_,n:_}),C=i[u][b][A]);var D,I,L,M;if(y){var B=s.dataToPoint([S,b]);D=C,I=B[1]+f,L=B[0]-_,M=c,Math.abs(L)<d&&(L=(L<0?-1:1)*d),isNaN(L)||m&&(i[u][b][A]+=L)}else{var B=s.dataToPoint([b,S]);D=B[0]+f,I=C,L=c,M=B[1]-_,Math.abs(M)<d&&(M=(M<=0?-1:1)*d),isNaN(M)||m&&(i[u][b][A]+=M)}o.setItemLayout(x,{x:D,y:I,width:L,height:M})}},this)}var f2={seriesType:"bar",plan:nn(),reset:function(t){if(!M_(t)||!L_(t))return;var e=t.getData(),r=t.coordinateSystem,a=r.grid.getRect(),i=r.getBaseAxis(),n=r.getOtherAxis(i),o=e.mapDimension(n.dim),s=e.mapDimension(i.dim),l=n.isHorizontal(),u=l?0:1,h=D_(Dv([t]),i,t).width;return h>A_||(h=A_),{progress:f};function f(c,v){for(var d=c.count,g=new Av(d*2),p=new Av(d*2),m=new Av(d),y,_=[],x=[],w=0,S=0;(y=c.next())!=null;)x[u]=v.get(o,y),x[1-u]=v.get(s,y),_=r.dataToPoint(x,null,_),p[w]=l?a.x+a.width:_[0],g[w++]=_[0],p[w]=l?_[1]:a.y+a.height,g[w++]=_[1],m[S++]=y;v.setLayout({largePoints:g,largeDataIndices:m,largeBackgroundPoints:p,barWidth:h,valueAxisStart:P_(i,n,!1),backgroundStart:l?a.x:a.y,valueAxisHorizontal:l})}}};function M_(t){return t.coordinateSystem&&t.coordinateSystem.type==="cartesian2d"}function L_(t){return t.pipelineContext&&t.pipelineContext.large}function P_(t,e,r){return e.toGlobalCoord(e.dataToCoord(e.type==="log"?1:0))}var c2=Sr.prototype,E_=Math.ceil,R_=Math.floor,cn=1e3,vn=cn*60,Zo=vn*60,Mt=Zo*24,v2=function(t,e,r,a){for(;r<a;){var i=r+a>>>1;t[i][1]<e?r=i+1:a=i}return r},Iv=Sr.extend({type:"time",getLabel:function(t){var e=this._stepLvl,r=new Date(t);return Nc(e[0],r,this.getSetting("useUTC"))},niceExtent:function(t){var e=this._extent;if(e[0]===e[1]&&(e[0]-=Mt,e[1]+=Mt),e[1]===-1/0&&e[0]===1/0){var r=new Date;e[1]=+new Date(r.getFullYear(),r.getMonth(),r.getDate()),e[0]=e[1]-Mt}this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var a=this._interval;t.fixMin||(e[0]=Ft(R_(e[0]/a)*a)),t.fixMax||(e[1]=Ft(E_(e[1]/a)*a))},niceTicks:function(t,e,r){t=t||10;var a=this._extent,i=a[1]-a[0],n=i/t;e!=null&&n<e&&(n=e),r!=null&&n>r&&(n=r);var o=Mv.length,s=v2(Mv,n,0,o),l=Mv[Math.min(s,o-1)],u=l[1];if(l[0]==="year"){var h=i/u,f=Pc(h/t,!0);u*=f}var c=this.getSetting("useUTC")?0:new Date(+a[0]||+a[1]).getTimezoneOffset()*60*1e3,v=[Math.round(E_((a[0]-c)/u)*u+c),Math.round(R_((a[1]-c)/u)*u+c)];S_(v,a),this._stepLvl=l,this._interval=u,this._niceExtent=v},parse:function(t){return+Ao(t)}});T(["contain","normalize"],function(t){Iv.prototype[t]=function(e){return c2[t].call(this,this.parse(e))}});var Mv=[["hh:mm:ss",cn],["hh:mm:ss",cn*5],["hh:mm:ss",cn*10],["hh:mm:ss",cn*15],["hh:mm:ss",cn*30],[`hh:mm
MM-dd`,vn],[`hh:mm
MM-dd`,vn*5],[`hh:mm
MM-dd`,vn*10],[`hh:mm
MM-dd`,vn*15],[`hh:mm
MM-dd`,vn*30],[`hh:mm
MM-dd`,Zo],[`hh:mm
MM-dd`,Zo*2],[`hh:mm
MM-dd`,Zo*6],[`hh:mm
MM-dd`,Zo*12],[`MM-dd
yyyy`,Mt],[`MM-dd
yyyy`,Mt*2],[`MM-dd
yyyy`,Mt*3],[`MM-dd
yyyy`,Mt*4],[`MM-dd
yyyy`,Mt*5],[`MM-dd
yyyy`,Mt*6],["week",Mt*7],[`MM-dd
yyyy`,Mt*10],["week",Mt*14],["week",Mt*21],["month",Mt*31],["week",Mt*42],["month",Mt*62],["week",Mt*70],["quarter",Mt*95],["month",Mt*31*4],["month",Mt*31*5],["half-year",Mt*380/2],["month",Mt*31*8],["month",Mt*31*10],["year",Mt*380]];Iv.create=function(t){return new Iv({useUTC:t.ecModel.get("useUTC")})};var vu=Bt.prototype,Yo=Sr.prototype,d2=Bl,g2=Ft,p2=Math.floor,m2=Math.ceil,du=Math.pow,Ar=Math.log,gu=Bt.extend({type:"log",base:10,$constructor:function(){Bt.apply(this,arguments),this._originalScale=new Sr},getTicks:function(t){var e=this._originalScale,r=this._extent,a=e.getExtent();return E(Yo.getTicks.call(this,t),function(i){var n=Ft(du(this.base,i));return n=i===r[0]&&e.__fixMin?pu(n,a[0]):n,n=i===r[1]&&e.__fixMax?pu(n,a[1]):n,n},this)},getMinorTicks:Yo.getMinorTicks,getLabel:Yo.getLabel,scale:function(t){return t=vu.scale.call(this,t),du(this.base,t)},setExtent:function(t,e){var r=this.base;t=Ar(t)/Ar(r),e=Ar(e)/Ar(r),Yo.setExtent.call(this,t,e)},getExtent:function(){var t=this.base,e=vu.getExtent.call(this);e[0]=du(t,e[0]),e[1]=du(t,e[1]);var r=this._originalScale,a=r.getExtent();return r.__fixMin&&(e[0]=pu(e[0],a[0])),r.__fixMax&&(e[1]=pu(e[1],a[1])),e},unionExtent:function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=Ar(t[0])/Ar(e),t[1]=Ar(t[1])/Ar(e),vu.unionExtent.call(this,t)},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},niceTicks:function(t){t=t||10;var e=this._extent,r=e[1]-e[0];if(!(r===1/0||r<=0)){var a=$0(r),i=t/r*a;for(i<=.5&&(a*=10);!isNaN(a)&&Math.abs(a)<1&&Math.abs(a)>0;)a*=10;var n=[Ft(m2(e[0]/a)*a),Ft(p2(e[1]/a)*a)];this._interval=a,this._niceExtent=n}},niceExtent:function(t){Yo.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin,e.__fixMax=t.fixMax}});T(["contain","normalize"],function(t){gu.prototype[t]=function(e){return e=Ar(e)/Ar(this.base),vu[t].call(this,e)}}),gu.create=function(){return new gu};function pu(t,e){return g2(t,d2(e))}function k_(t,e){var r=t.type,a=e.getMin(),i=e.getMax(),n=t.getExtent(),o,s,l;r==="ordinal"?o=e.getCategories().length:(s=e.get("boundaryGap"),P(s)||(s=[s||0,s||0]),typeof s[0]=="boolean"&&(z&&console.warn('Boolean type for boundaryGap is only allowed for ordinal axis. Please use string in percentage instead, e.g., "20%". Currently, boundaryGap is set to be 0.'),s=[0,0]),s[0]=R(s[0],1),s[1]=R(s[1],1),l=n[1]-n[0]||Math.abs(n[0])),a==="dataMin"?a=n[0]:typeof a=="function"&&(a=a({min:n[0],max:n[1]})),i==="dataMax"?i=n[1]:typeof i=="function"&&(i=i({min:n[0],max:n[1]}));var u=a!=null,h=i!=null;a==null&&(a=r==="ordinal"?o?0:NaN:n[0]-s[0]*l),i==null&&(i=r==="ordinal"?o?o-1:NaN:n[1]+s[1]*l),(a==null||!isFinite(a))&&(a=NaN),(i==null||!isFinite(i))&&(i=NaN),t.setBlank(Xn(a)||Xn(i)||r==="ordinal"&&!t.getOrdinalMeta().categories.length),e.getNeedCrossZero()&&(a>0&&i>0&&!u&&(a=0),a<0&&i<0&&!h&&(i=0));var f=e.ecModel;if(f&&r==="time"){var c=T_("bar",f),v;if(T(c,function(p){v|=p.getBaseAxis()===e.axis}),v){var d=Dv(c),g=y2(a,i,e,d);a=g.min,i=g.max}}return{extent:[a,i],fixMin:u,fixMax:h}}function y2(t,e,r,a){var i=r.axis.getExtent(),n=i[1]-i[0],o=D_(a,r.axis);if(o===void 0)return{min:t,max:e};var s=1/0;T(o,function(v){s=Math.min(v.offset,s)});var l=-1/0;T(o,function(v){l=Math.max(v.offset+v.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,h=e-t,f=1-(s+l)/n,c=h/f-h;return e+=c*(l/u),t-=c*(s/u),{min:t,max:e}}function xa(t,e){var r=k_(t,e),a=r.extent,i=e.get("splitNumber");t.type==="log"&&(t.base=e.get("logBase"));var n=t.type;t.setExtent(a[0],a[1]),t.niceExtent({splitNumber:i,fixMin:r.fixMin,fixMax:r.fixMax,minInterval:n==="interval"||n==="time"?e.get("minInterval"):null,maxInterval:n==="interval"||n==="time"?e.get("maxInterval"):null});var o=e.get("interval");o!=null&&t.setInterval&&t.setInterval(o)}function dn(t,e){if(e=e||t.get("type"),e)switch(e){case"category":return new bv(t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),[1/0,-1/0]);case"value":return new Sr;default:return(Bt.getClass(e)||Sr).create(t)}}function _2(t){var e=t.scale.getExtent(),r=e[0],a=e[1];return!(r>0&&a>0||r<0&&a<0)}function Xo(t){var e=t.getLabelModel().get("formatter"),r=t.type==="category"?t.scale.getExtent()[0]:null;return typeof e=="string"?(e=function(a){return function(i){return i=t.scale.getLabel(i),a.replace("{value}",i??"")}}(e),e):typeof e=="function"?function(a,i){return r!=null&&(i=a-r),e(Lv(t,a),i)}:function(a){return t.scale.getLabel(a)}}function Lv(t,e){return t.type==="category"?t.scale.getLabel(e):e}function x2(t){var e=t.model,r=t.scale;if(!(!e.get("axisLabel.show")||r.isBlank())){var a=t.type==="category",i,n,o=r.getExtent();a?n=r.count():(i=r.getTicks(),n=i.length);var s=t.getLabelModel(),l=Xo(t),u,h=1;n>40&&(h=Math.ceil(n/40));for(var f=0;f<n;f+=h){var c=i?i[f]:o[0]+f,v=l(c),d=s.getTextRect(v),g=w2(d,s.get("rotate")||0);u?u.union(g):u=g}return u}}function w2(t,e){var r=e*Math.PI/180,a=t.plain(),i=a.width,n=a.height,o=i*Math.cos(r)+n*Math.sin(r),s=i*Math.sin(r)+n*Math.cos(r),l=new it(a.x,a.y,o,s);return l}function Pv(t){var e=t.get("interval");return e??"auto"}function N_(t){return t.type==="category"&&Pv(t.getLabelModel())===0}var oi={getMin:function(t){var e=this.option,r=!t&&e.rangeStart!=null?e.rangeStart:e.min;return this.axis&&r!=null&&r!=="dataMin"&&typeof r!="function"&&!Xn(r)&&(r=this.axis.scale.parse(r)),r},getMax:function(t){var e=this.option,r=!t&&e.rangeEnd!=null?e.rangeEnd:e.max;return this.axis&&r!=null&&r!=="dataMax"&&typeof r!="function"&&!Xn(r)&&(r=this.axis.scale.parse(r)),r},getNeedCrossZero:function(){var t=this.option;return t.rangeStart!=null||t.rangeEnd!=null?!1:!t.scale},getCoordSysModel:Kt,setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},b2=Ge({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var r=e.cx,a=e.cy,i=e.width/2,n=e.height/2;t.moveTo(r,a-n),t.lineTo(r+i,a+n),t.lineTo(r-i,a+n),t.closePath()}}),S2=Ge({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var r=e.cx,a=e.cy,i=e.width/2,n=e.height/2;t.moveTo(r,a-n),t.lineTo(r+i,a),t.lineTo(r,a+n),t.lineTo(r-i,a),t.closePath()}}),A2=Ge({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var r=e.x,a=e.y,i=e.width/5*3,n=Math.max(i,e.height),o=i/2,s=o*o/(n-o),l=a-n+o+s,u=Math.asin(s/o),h=Math.cos(u)*o,f=Math.sin(u),c=Math.cos(u),v=o*.6,d=o*.7;t.moveTo(r-h,l+s),t.arc(r,l,o,Math.PI-u,Math.PI*2+u),t.bezierCurveTo(r+h-f*v,l+s+c*v,r,a-d,r,a),t.bezierCurveTo(r,a-d,r-h+f*v,l+s+c*v,r-h,l+s),t.closePath()}}),T2=Ge({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var r=e.height,a=e.width,i=e.x,n=e.y,o=a/3*2;t.moveTo(i,n),t.lineTo(i+o,n+r),t.lineTo(i,n+r/4*3),t.lineTo(i-o,n+r),t.lineTo(i,n),t.closePath()}}),C2={line:ee,rect:ft,roundRect:ft,square:ft,circle:mr,diamond:S2,pin:A2,arrow:T2,triangle:b2},D2={line:function(t,e,r,a,i){i.x1=t,i.y1=e+a/2,i.x2=t+r,i.y2=e+a/2},rect:function(t,e,r,a,i){i.x=t,i.y=e,i.width=r,i.height=a},roundRect:function(t,e,r,a,i){i.x=t,i.y=e,i.width=r,i.height=a,i.r=Math.min(r,a)/4},square:function(t,e,r,a,i){var n=Math.min(r,a);i.x=t,i.y=e,i.width=n,i.height=n},circle:function(t,e,r,a,i){i.cx=t+r/2,i.cy=e+a/2,i.r=Math.min(r,a)/2},diamond:function(t,e,r,a,i){i.cx=t+r/2,i.cy=e+a/2,i.width=r,i.height=a},pin:function(t,e,r,a,i){i.x=t+r/2,i.y=e+a/2,i.width=r,i.height=a},arrow:function(t,e,r,a,i){i.x=t+r/2,i.y=e+a/2,i.width=r,i.height=a},triangle:function(t,e,r,a,i){i.cx=t+r/2,i.cy=e+a/2,i.width=r,i.height=a}},Ev={};T(C2,function(t,e){Ev[e]=new t});var I2=Ge({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(t,e,r){var a=If(t,e,r),i=this.shape;return i&&i.symbolType==="pin"&&e.textPosition==="inside"&&(a.y=r.y+r.height*.4),a},buildPath:function(t,e,r){var a=e.symbolType;if(a!=="none"){var i=Ev[a];i||(a="rect",i=Ev[a]),D2[a](e.x,e.y,e.width,e.height,i.shape),i.buildPath(t,i.shape,r)}}});function M2(t,e){if(this.type!=="image"){var r=this.style,a=this.shape;a&&a.symbolType==="line"?r.stroke=t:this.__isEmptyBrush?(r.stroke=t,r.fill=e||"#fff"):(r.fill&&(r.fill=t),r.stroke&&(r.stroke=t)),this.dirty(!1)}}function Le(t,e,r,a,i,n,o){var s=t.indexOf("empty")===0;s&&(t=t.substr(5,1).toLowerCase()+t.substr(6));var l;return t.indexOf("image://")===0?l=C0(t.slice(8),new it(e,r,a,i),o?"center":"cover"):t.indexOf("path://")===0?l=po(t.slice(7),{},new it(e,r,a,i),o?"center":"cover"):l=new I2({shape:{symbolType:t,x:e,y:r,width:a,height:i}}),l.__isEmptyBrush=s,l.setColor=M2,l.setColor(n),l}function L2(t){return $r(t.getSource(),t)}var P2={isDimensionStacked:Ur,enableDataStack:m_,getStackedDimension:Uo};function E2(t,e){var r=e;ht.isInstance(e)||(r=new ht(e),pt(r,oi));var a=dn(r);return a.setExtent(t[0],t[1]),xa(a,r),a}function R2(t){pt(t,oi)}var k2=(Object.freeze||Object)({createList:L2,getLayoutRect:Ot,dataStack:P2,createScale:E2,mixinAxisModelCommonMethods:R2,completeDimensions:g_,createDimensions:un,createSymbol:Le}),N2=1e-8;function O_(t,e){return Math.abs(t-e)<N2}function si(t,e,r){var a=0,i=t[0];if(!i)return!1;for(var n=1;n<t.length;n++){var o=t[n];a+=Vr(i[0],i[1],o[0],o[1],e,r),i=o}var s=t[0];return(!O_(i[0],s[0])||!O_(i[1],s[1]))&&(a+=Vr(i[0],i[1],s[0],s[1],e,r)),a!==0}function qo(t,e,r){if(this.name=t,this.geometries=e,r)r=[r[0],r[1]];else{var a=this.getBoundingRect();r=[a.x+a.width/2,a.y+a.height/2]}this.center=r}qo.prototype={constructor:qo,properties:null,getBoundingRect:function(){var t=this._rect;if(t)return t;for(var e=Number.MAX_VALUE,r=[e,e],a=[-e,-e],i=[],n=[],o=this.geometries,s=0;s<o.length;s++)if(o[s].type==="polygon"){var l=o[s].exterior;uo(l,i,n),kr(r,r,i),Nr(a,a,n)}return s===0&&(r[0]=r[1]=a[0]=a[1]=0),this._rect=new it(r[0],r[1],a[0]-r[0],a[1]-r[1])},contain:function(t){var e=this.getBoundingRect(),r=this.geometries;if(!e.contain(t[0],t[1]))return!1;t:for(var a=0,i=r.length;a<i;a++)if(r[a].type==="polygon"){var n=r[a].exterior,o=r[a].interiors;if(si(n,t[0],t[1])){for(var s=0;s<(o?o.length:0);s++)if(si(o[s]))continue t;return!0}}return!1},transformTo:function(t,e,r,a){var i=this.getBoundingRect(),n=i.width/i.height;r?a||(a=r/n):r=n*a;for(var o=new it(t,e,r,a),s=i.calculateTransform(o),l=this.geometries,u=0;u<l.length;u++)if(l[u].type==="polygon"){for(var h=l[u].exterior,f=l[u].interiors,c=0;c<h.length;c++)xt(h[c],h[c],s);for(var v=0;v<(f?f.length:0);v++)for(var c=0;c<f[v].length;c++)xt(f[v][c],f[v][c],s)}i=this._rect,i.copy(o),this.center=[i.x+i.width/2,i.y+i.height/2]},cloneShallow:function(t){t==null&&(t=this.name);var e=new qo(t,this.geometries,this.center);return e._rect=this._rect,e.transformTo=null,e}};function O2(t){if(!t.UTF8Encoding)return t;var e=t.UTF8Scale;e==null&&(e=1024);for(var r=t.features,a=0;a<r.length;a++)for(var i=r[a],n=i.geometry,o=n.coordinates,s=n.encodeOffsets,l=0;l<o.length;l++){var u=o[l];if(n.type==="Polygon")o[l]=z_(u,s[l],e);else if(n.type==="MultiPolygon")for(var h=0;h<u.length;h++){var f=u[h];u[h]=z_(f,s[l][h],e)}}return t.UTF8Encoding=!1,t}function z_(t,e,r){for(var a=[],i=e[0],n=e[1],o=0;o<t.length;o+=2){var s=t.charCodeAt(o)-64,l=t.charCodeAt(o+1)-64;s=s>>1^-(s&1),l=l>>1^-(l&1),s+=i,l+=n,i=s,n=l,a.push([s/r,l/r])}return a}var Rv=function(t,e){return O2(t),E(Ht(t.features,function(r){return r.geometry&&r.properties&&r.geometry.coordinates.length>0}),function(r){var a=r.properties,i=r.geometry,n=i.coordinates,o=[];i.type==="Polygon"&&o.push({type:"polygon",exterior:n[0],interiors:n.slice(1)}),i.type==="MultiPolygon"&&T(n,function(l){l[0]&&o.push({type:"polygon",exterior:l[0],interiors:l.slice(1)})});var s=new qo(a[e||"name"],o,a.cp);return s.properties=a,s})},Ko=de();function z2(t){return t.type==="category"?V2(t):H2(t)}function B2(t,e){return t.type==="category"?G2(t,e):{ticks:t.scale.getTicks()}}function V2(t){var e=t.getLabelModel(),r=B_(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:r.labelCategoryInterval}:r}function B_(t,e){var r=V_(t,"labels"),a=Pv(e),i=G_(r,a);if(i)return i;var n,o;return $t(a)?n=W_(t,a):(o=a==="auto"?F2(t):a,n=F_(t,o)),H_(r,a,{labels:n,labelCategoryInterval:o})}function G2(t,e){var r=V_(t,"ticks"),a=Pv(e),i=G_(r,a);if(i)return i;var n,o;if((!e.get("show")||t.scale.isBlank())&&(n=[]),$t(a))n=W_(t,a,!0);else if(a==="auto"){var s=B_(t,t.getLabelModel());o=s.labelCategoryInterval,n=E(s.labels,function(l){return l.tickValue})}else o=a,n=F_(t,o,!0);return H_(r,a,{ticks:n,tickCategoryInterval:o})}function H2(t){var e=t.scale.getTicks(),r=Xo(t);return{labels:E(e,function(a,i){return{formattedLabel:r(a,i),rawLabel:t.scale.getLabel(a),tickValue:a}})}}function V_(t,e){return Ko(t)[e]||(Ko(t)[e]=[])}function G_(t,e){for(var r=0;r<t.length;r++)if(t[r].key===e)return t[r].value}function H_(t,e,r){return t.push({key:e,value:r}),r}function F2(t){var e=Ko(t).autoInterval;return e??(Ko(t).autoInterval=t.calculateCategoryInterval())}function W2(t){var e=U2(t),r=Xo(t),a=(e.axisRotate-e.labelRotate)/180*Math.PI,i=t.scale,n=i.getExtent(),o=i.count();if(n[1]-n[0]<1)return 0;var s=1;o>40&&(s=Math.max(1,Math.floor(o/40)));for(var l=n[0],u=t.dataToCoord(l+1)-t.dataToCoord(l),h=Math.abs(u*Math.cos(a)),f=Math.abs(u*Math.sin(a)),c=0,v=0;l<=n[1];l+=s){var d=0,g=0,p=cr(r(l),e.font,"center","top");d=p.width*1.3,g=p.height*1.3,c=Math.max(c,d,7),v=Math.max(v,g,7)}var m=c/h,y=v/f;isNaN(m)&&(m=1/0),isNaN(y)&&(y=1/0);var _=Math.max(0,Math.floor(Math.min(m,y))),x=Ko(t.model),w=t.getExtent(),S=x.lastAutoInterval,b=x.lastTickCount;return S!=null&&b!=null&&Math.abs(S-_)<=1&&Math.abs(b-o)<=1&&S>_&&x.axisExtend0===w[0]&&x.axisExtend1===w[1]?_=S:(x.lastTickCount=o,x.lastAutoInterval=_,x.axisExtend0=w[0],x.axisExtend1=w[1]),_}function U2(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function F_(t,e,r){var a=Xo(t),i=t.scale,n=i.getExtent(),o=t.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=n[0],h=i.count();u!==0&&l>1&&h/l>2&&(u=Math.round(Math.ceil(u/l)*l));var f=N_(t),c=o.get("showMinLabel")||f,v=o.get("showMaxLabel")||f;c&&u!==n[0]&&g(n[0]);for(var d=u;d<=n[1];d+=l)g(d);v&&d-l!==n[1]&&g(n[1]);function g(p){s.push(r?p:{formattedLabel:a(p),rawLabel:i.getLabel(p),tickValue:p})}return s}function W_(t,e,r){var a=t.scale,i=Xo(t),n=[];return T(a.getTicks(),function(o){var s=a.getLabel(o);e(o,s)&&n.push(r?o:{formattedLabel:i(o),rawLabel:s,tickValue:o})}),n}var U_=[0,1],Vt=function(t,e,r){this.dim=t,this.scale=e,this._extent=r||[0,0],this.inverse=!1,this.onBand=!1};Vt.prototype={constructor:Vt,contain:function(t){var e=this._extent,r=Math.min(e[0],e[1]),a=Math.max(e[0],e[1]);return t>=r&&t<=a},containData:function(t){return this.scale.contain(t)},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(t){return Dc(t||this.scale.getExtent(),this._extent)},setExtent:function(t,e){var r=this._extent;r[0]=t,r[1]=e},dataToCoord:function(t,e){var r=this._extent,a=this.scale;return t=a.normalize(t),this.onBand&&a.type==="ordinal"&&(r=r.slice(),$_(r,a.count())),At(t,U_,r,e)},coordToData:function(t,e){var r=this._extent,a=this.scale;this.onBand&&a.type==="ordinal"&&(r=r.slice(),$_(r,a.count()));var i=At(t,r,U_,e);return this.scale.scale(i)},pointToData:function(t,e){},getTicksCoords:function(t){t=t||{};var e=t.tickModel||this.getTickModel(),r=B2(this,e),a=r.ticks,i=E(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this),n=e.get("alignWithLabel");return $2(this,i,n,t.clamp),i},getMinorTicksCoords:function(){if(this.scale.type==="ordinal")return[];var t=this.model.getModel("minorTick"),e=t.get("splitNumber");e>0&&e<100||(e=5);var r=this.scale.getMinorTicks(e),a=E(r,function(i){return E(i,function(n){return{coord:this.dataToCoord(n),tickValue:n}},this)},this);return a},getViewLabels:function(){return z2(this).labels},getLabelModel:function(){return this.model.getModel("axisLabel")},getTickModel:function(){return this.model.getModel("axisTick")},getBandWidth:function(){var t=this._extent,e=this.scale.getExtent(),r=e[1]-e[0]+(this.onBand?1:0);r===0&&(r=1);var a=Math.abs(t[1]-t[0]);return Math.abs(a)/r},isHorizontal:null,getRotate:null,calculateCategoryInterval:function(){return W2(this)}};function $_(t,e){var r=t[1]-t[0],a=e,i=r/a/2;t[0]+=i,t[1]-=i}function $2(t,e,r,a){var i=e.length;if(!t.onBand||r||!i)return;var n=t.getExtent(),o,s;if(i===1)e[0].coord=n[0],o=e[1]={coord:n[0]};else{var l=e[i-1].tickValue-e[0].tickValue,u=(e[i-1].coord-e[0].coord)/l;T(e,function(v){v.coord-=u/2});var h=t.scale.getExtent();s=1+h[1]-e[i-1].tickValue,o={coord:e[i-1].coord+u*s},e.push(o)}var f=n[0]>n[1];c(e[0].coord,n[0])&&(a?e[0].coord=n[0]:e.shift()),a&&c(n[0],e[0].coord)&&e.unshift({coord:n[0]}),c(n[1],o.coord)&&(a?o.coord=n[1]:e.pop()),a&&c(o.coord,n[1])&&e.push({coord:n[1]});function c(v,d){return v=Ft(v),d=Ft(d),f?v>d:v<d}}var Z2=Rv,Z_={};T(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],function(t){Z_[t]=pT[t]});var Y_={};T(["extendShape","extendPath","makePath","makeImage","mergePath","resizePath","createIcon","setHoverStyle","setLabelStyle","setTextStyle","setText","getFont","updateProps","initProps","getTransform","clipPointsByRect","clipRectByRect","registerShape","getShapeClass","Group","Image","Text","Circle","Sector","Ring","Polygon","Polyline","Rect","Line","BezierCurve","Arc","IncrementalDisplayable","CompoundPath","LinearGradient","RadialGradient","BoundingRect"],function(t){Y_[t]=Gr[t]}),Dt.extend({type:"series.line",dependencies:["grid","polar"],getInitialData:function(t,e){if(z){var r=t.coordinateSystem;if(r!=="polar"&&r!=="cartesian2d")throw new Error("Line not support coordinateSystem besides cartesian and polar")}return $r(this.getSource(),this,{useEncodeDefaulter:!0})},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,clip:!0,label:{position:"top"},lineStyle:{width:2,type:"solid"},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0}});function mu(t,e){var r=t.mapDimension("defaultedLabel",!0),a=r.length;if(a===1)return ii(t,e,r[0]);if(a){for(var i=[],n=0;n<r.length;n++){var o=ii(t,e,r[n]);i.push(o)}return i.join(" ")}}function wa(t,e,r){G.call(this),this.updateData(t,e,r)}var sr=wa.prototype,Y2=wa.getSymbolSize=function(t,e){var r=t.getItemVisual(e,"symbolSize");return r instanceof Array?r.slice():[+r,+r]};function kv(t){return[t[0]/2,t[1]/2]}function X2(t,e){this.parent.drift(t,e)}sr._createSymbol=function(t,e,r,a,i){this.removeAll();var n=e.getItemVisual(r,"color"),o=Le(t,-1,-1,2,2,n,i);o.attr({z2:100,culling:!0,scale:kv(a)}),o.drift=X2,this._symbolType=t,this.add(o)},sr.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(t)},sr.getSymbolPath=function(){return this.childAt(0)},sr.getScale=function(){return this.childAt(0).scale},sr.highlight=function(){this.childAt(0).trigger("emphasis")},sr.downplay=function(){this.childAt(0).trigger("normal")},sr.setZ=function(t,e){var r=this.childAt(0);r.zlevel=t,r.z=e},sr.setDraggable=function(t){var e=this.childAt(0);e.draggable=t,e.cursor=t?"move":e.cursor},sr.updateData=function(t,e,r){this.silent=!1;var a=t.getItemVisual(e,"symbol")||"circle",i=t.hostModel,n=Y2(t,e),o=a!==this._symbolType;if(o){var s=t.getItemVisual(e,"symbolKeepAspect");this._createSymbol(a,t,e,n,s)}else{var l=this.childAt(0);l.silent=!1,tt(l,{scale:kv(n)},i,e)}if(this._updateCommon(t,e,n,r),o){var l=this.childAt(0),u=r&&r.fadeIn,h={scale:l.scale.slice()};u&&(h.style={opacity:l.style.opacity}),l.scale=[0,0],u&&(l.style.opacity=0),oe(l,h,i,e)}this._seriesModel=i};var q2=["itemStyle"],K2=["emphasis","itemStyle"],Q2=["label"],J2=["emphasis","label"];sr._updateCommon=function(t,e,r,a){var i=this.childAt(0),n=t.hostModel,o=t.getItemVisual(e,"color");i.type!=="image"?i.useStyle({strokeNoScale:!0}):i.setStyle({opacity:null,shadowBlur:null,shadowOffsetX:null,shadowOffsetY:null,shadowColor:null});var s=a&&a.itemStyle,l=a&&a.hoverItemStyle,u=a&&a.symbolOffset,h=a&&a.labelModel,f=a&&a.hoverLabelModel,c=a&&a.hoverAnimation,v=a&&a.cursorStyle;if(!a||t.hasItemOption){var d=a&&a.itemModel?a.itemModel:t.getItemModel(e);s=d.getModel(q2).getItemStyle(["color"]),l=d.getModel(K2).getItemStyle(),u=d.getShallow("symbolOffset"),h=d.getModel(Q2),f=d.getModel(J2),c=d.getShallow("hoverAnimation"),v=d.getShallow("cursor")}else l=Z({},l);var g=i.style,p=t.getItemVisual(e,"symbolRotate");i.attr("rotation",(p||0)*Math.PI/180||0),u&&i.attr("position",[R(u[0],r[0]),R(u[1],r[1])]),v&&i.attr("cursor",v),i.setColor(o,a&&a.symbolInnerColor),i.setStyle(s);var m=t.getItemVisual(e,"opacity");m!=null&&(g.opacity=m);var y=t.getItemVisual(e,"liftZ"),_=i.__z2Origin;y!=null?_==null&&(i.__z2Origin=i.z2,i.z2+=y):_!=null&&(i.z2=_,i.__z2Origin=null);var x=a&&a.useNameLabel;Te(g,l,h,f,{labelFetcher:n,labelDataIndex:e,defaultText:w,isRectText:!0,autoColor:o});function w(S,b){return x?t.getName(S):mu(t,S)}i.__symbolOriginalScale=kv(r),i.hoverStyle=l,i.highDownOnUpdate=c&&n.isAnimationEnabled()?j2:null,St(i)};function j2(t,e){if(!(this.incremental||this.useHoverLayer))if(e==="emphasis"){var r=this.__symbolOriginalScale,a=r[1]/r[0],i={scale:[Math.max(r[0]*1.1,r[0]+3),Math.max(r[1]*1.1,r[1]+3*a)]};this.animateTo(i,400,"elasticOut")}else e==="normal"&&this.animateTo({scale:this.__symbolOriginalScale},400,"elasticOut")}sr.fadeOut=function(t,e){var r=this.childAt(0);this.silent=r.silent=!0,!(e&&e.keepLabel)&&(r.style.text=null),tt(r,{style:{opacity:0},scale:[0,0]},this._seriesModel,this.dataIndex,t)},yt(wa,G);function gn(t){this.group=new G,this._symbolCtor=t||wa}var pn=gn.prototype;function Nv(t,e,r,a){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(a.isIgnore&&a.isIgnore(r))&&!(a.clipShape&&!a.clipShape.contain(e[0],e[1]))&&t.getItemVisual(r,"symbol")!=="none"}pn.updateData=function(t,e){e=X_(e);var r=this.group,a=t.hostModel,i=this._data,n=this._symbolCtor,o=q_(t);i||r.removeAll(),t.diff(i).add(function(s){var l=t.getItemLayout(s);if(Nv(t,l,s,e)){var u=new n(t,s,o);u.attr("position",l),t.setItemGraphicEl(s,u),r.add(u)}}).update(function(s,l){var u=i.getItemGraphicEl(l),h=t.getItemLayout(s);if(!Nv(t,h,s,e)){r.remove(u);return}u?(u.updateData(t,s,o),tt(u,{position:h},a)):(u=new n(t,s),u.attr("position",h)),r.add(u),t.setItemGraphicEl(s,u)}).remove(function(s){var l=i.getItemGraphicEl(s);l&&l.fadeOut(function(){r.remove(l)})}).execute(),this._data=t},pn.isPersistent=function(){return!0},pn.updateLayout=function(){var t=this._data;t&&t.eachItemGraphicEl(function(e,r){var a=t.getItemLayout(r);e.attr("position",a)})},pn.incrementalPrepareUpdate=function(t){this._seriesScope=q_(t),this._data=null,this.group.removeAll()},pn.incrementalUpdate=function(t,e,r){r=X_(r);function a(s){s.isGroup||(s.incremental=s.useHoverLayer=!0)}for(var i=t.start;i<t.end;i++){var n=e.getItemLayout(i);if(Nv(e,n,i,r)){var o=new this._symbolCtor(e,i,this._seriesScope);o.traverse(a),o.attr("position",n),this.group.add(o),e.setItemGraphicEl(i,o)}}};function X_(t){return t!=null&&!Q(t)&&(t={isIgnore:t}),t||{}}pn.remove=function(t){var e=this.group,r=this._data;r&&t?r.eachItemGraphicEl(function(a){a.fadeOut(function(){e.remove(a)})}):e.removeAll()};function q_(t){var e=t.hostModel;return{itemStyle:e.getModel("itemStyle").getItemStyle(["color"]),hoverItemStyle:e.getModel("emphasis.itemStyle").getItemStyle(),symbolRotate:e.get("symbolRotate"),symbolOffset:e.get("symbolOffset"),hoverAnimation:e.get("hoverAnimation"),labelModel:e.getModel("label"),hoverLabelModel:e.getModel("emphasis.label"),cursorStyle:e.get("cursor")}}function Ov(t,e,r){var a=t.getBaseAxis(),i=t.getOtherAxis(a),n=tL(i,r),o=a.dim,s=i.dim,l=e.mapDimension(s),u=e.mapDimension(o),h=s==="x"||s==="radius"?1:0,f=E(t.dimensions,function(d){return e.mapDimension(d)}),c,v=e.getCalculationInfo("stackResultDimension");return(c|=Ur(e,f[0]))&&(f[0]=v),(c|=Ur(e,f[1]))&&(f[1]=v),{dataDimsForPoint:f,valueStart:n,valueAxisDim:s,baseAxisDim:o,stacked:!!c,valueDim:l,baseDim:u,baseDataOffset:h,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function tL(t,e){var r=0,a=t.scale.getExtent();return e==="start"?r=a[0]:e==="end"?r=a[1]:a[0]>0?r=a[0]:a[1]<0&&(r=a[1]),r}function zv(t,e,r,a){var i=NaN;t.stacked&&(i=r.get(r.getCalculationInfo("stackedOverDimension"),a)),isNaN(i)&&(i=t.valueStart);var n=t.baseDataOffset,o=[];return o[n]=r.get(t.baseDim,a),o[1-n]=i,e.dataToPoint(o)}function eL(t,e){var r=[];return e.diff(t).add(function(a){r.push({cmd:"+",idx:a})}).update(function(a,i){r.push({cmd:"=",idx:i,idx1:a})}).remove(function(a){r.push({cmd:"-",idx:a})}).execute(),r}var rL=function(t,e,r,a,i,n,o,s){for(var l=eL(t,e),u=[],h=[],f=[],c=[],v=[],d=[],g=[],p=Ov(i,e,o),m=Ov(n,t,s),y=0;y<l.length;y++){var _=l[y],x=!0;switch(_.cmd){case"=":var w=t.getItemLayout(_.idx),S=e.getItemLayout(_.idx1);(isNaN(w[0])||isNaN(w[1]))&&(w=S.slice()),u.push(w),h.push(S),f.push(r[_.idx]),c.push(a[_.idx1]),g.push(e.getRawIndex(_.idx1));break;case"+":var b=_.idx;u.push(i.dataToPoint([e.get(p.dataDimsForPoint[0],b),e.get(p.dataDimsForPoint[1],b)])),h.push(e.getItemLayout(b).slice()),f.push(zv(p,i,e,b)),c.push(a[b]),g.push(e.getRawIndex(b));break;case"-":var b=_.idx,A=t.getRawIndex(b);A!==b?(u.push(t.getItemLayout(b)),h.push(n.dataToPoint([t.get(m.dataDimsForPoint[0],b),t.get(m.dataDimsForPoint[1],b)])),f.push(r[b]),c.push(zv(m,n,t,b)),g.push(A)):x=!1}x&&(v.push(_),d.push(d.length))}d.sort(function(B,k){return g[B]-g[k]});for(var C=[],D=[],I=[],L=[],M=[],y=0;y<d.length;y++){var b=d[y];C[y]=u[b],D[y]=h[b],I[y]=f[b],L[y]=c[b],M[y]=v[b]}return{current:C,next:D,stackedOnCurrent:I,stackedOnNext:L,status:M}},K_=kr,Q_=Nr,J_=qn,yu=Jt,Bv=[],Ze=[],Ye=[];function Zr(t){return isNaN(t[0])||isNaN(t[1])}function Vv(t,e,r,a,i,n,o,s,l,u,h){return u==="none"||!u?iL.apply(this,arguments):aL.apply(this,arguments)}function aL(t,e,r,a,i,n,o,s,l,u,h){for(var f=0,c=r,v=0;v<a;v++){var d=e[c];if(c>=i||c<0)break;if(Zr(d)){if(h){c+=n;continue}break}if(c===r)t[n>0?"moveTo":"lineTo"](d[0],d[1]);else if(l>0){var g=e[f],p=u==="y"?1:0,m=(d[p]-g[p])*l;yu(Ze,g),Ze[p]=g[p]+m,yu(Ye,d),Ye[p]=d[p]-m,t.bezierCurveTo(Ze[0],Ze[1],Ye[0],Ye[1],d[0],d[1])}else t.lineTo(d[0],d[1]);f=c,c+=n}return v}function iL(t,e,r,a,i,n,o,s,l,u,h){for(var f=0,c=r,v=0;v<a;v++){var d=e[c];if(c>=i||c<0)break;if(Zr(d)){if(h){c+=n;continue}break}if(c===r)t[n>0?"moveTo":"lineTo"](d[0],d[1]),yu(Ze,d);else if(l>0){var g=c+n,y=e[g];if(h)for(;y&&Zr(e[g]);)g+=n,y=e[g];var p=.5,m=e[f],y=e[g];if(!y||Zr(y))yu(Ye,d);else{Zr(y)&&!h&&(y=d),Er(Bv,y,m);var _,x;if(u==="x"||u==="y"){var w=u==="x"?0:1;_=Math.abs(d[w]-m[w]),x=Math.abs(d[w]-y[w])}else _=Rr(d,m),x=Rr(d,y);p=x/(x+_),J_(Ye,d,Bv,-l*(1-p))}K_(Ze,Ze,s),Q_(Ze,Ze,o),K_(Ye,Ye,s),Q_(Ye,Ye,o),t.bezierCurveTo(Ze[0],Ze[1],Ye[0],Ye[1],d[0],d[1]),J_(Ze,d,Bv,l*p)}else t.lineTo(d[0],d[1]);f=c,c+=n}return v}function Gv(t,e){var r=[1/0,1/0],a=[-1/0,-1/0];if(e)for(var i=0;i<t.length;i++){var n=t[i];n[0]<r[0]&&(r[0]=n[0]),n[1]<r[1]&&(r[1]=n[1]),n[0]>a[0]&&(a[0]=n[0]),n[1]>a[1]&&(a[1]=n[1])}return{min:e?r:a,max:e?a:r}}var nL=st.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},brush:pc(st.prototype.brush),buildPath:function(t,e){var r=e.points,a=0,i=r.length,n=Gv(r,e.smoothConstraint);if(e.connectNulls){for(;i>0&&Zr(r[i-1]);i--);for(;a<i&&Zr(r[a]);a++);}for(;a<i;)a+=Vv(t,r,a,i,i,1,n.min,n.max,e.smooth,e.smoothMonotone,e.connectNulls)+1}}),j_=st.extend({type:"ec-polygon",shape:{points:[],stackedOnPoints:[],smooth:0,stackedOnSmooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},brush:pc(st.prototype.brush),buildPath:function(t,e){var r=e.points,a=e.stackedOnPoints,i=0,n=r.length,o=e.smoothMonotone,s=Gv(r,e.smoothConstraint),l=Gv(a,e.smoothConstraint);if(e.connectNulls){for(;n>0&&Zr(r[n-1]);n--);for(;i<n&&Zr(r[i]);i++);}for(;i<n;){var u=Vv(t,r,i,n,n,1,s.min,s.max,e.smooth,o,e.connectNulls);Vv(t,a,i+u-1,u,n,-1,l.min,l.max,e.stackedOnSmooth,o,e.connectNulls),i+=u+1,t.closePath()}}});function t1(t,e,r){var a=t.getArea(),i=t.getBaseAxis().isHorizontal(),n=a.x,o=a.y,s=a.width,l=a.height,u=r.get("lineStyle.width")||2;n-=u/2,o-=u/2,s+=u,l+=u,n=Math.floor(n),s=Math.round(s);var h=new ft({shape:{x:n,y:o,width:s,height:l}});return e&&(h.shape[i?"width":"height"]=0,oe(h,{shape:{width:s,height:l}},r)),h}function e1(t,e,r){var a=t.getArea(),i=new ir({shape:{cx:Ft(t.cx,1),cy:Ft(t.cy,1),r0:Ft(a.r0,1),r:Ft(a.r,1),startAngle:a.startAngle,endAngle:a.endAngle,clockwise:a.clockwise}});return e&&(i.shape.endAngle=a.startAngle,oe(i,{shape:{endAngle:a.endAngle}},r)),i}function _u(t,e,r){if(t){if(t.type==="polar")return e1(t,e,r);if(t.type==="cartesian2d")return t1(t,e,r)}else return null;return null}function r1(t,e){if(t.length===e.length){for(var r=0;r<t.length;r++){var a=t[r],i=e[r];if(a[0]!==i[0]||a[1]!==i[1])return}return!0}}function a1(t,e){var r=[],a=[],i=[],n=[];return uo(t,r,a),uo(e,i,n),Math.max(Math.abs(r[0]-i[0]),Math.abs(r[1]-i[1]),Math.abs(a[0]-n[0]),Math.abs(a[1]-n[1]))}function i1(t){return typeof t=="number"?t:t?.5:0}function oL(t,e,r){if(!r.valueDim)return[];for(var a=[],i=0,n=e.count();i<n;i++)a.push(zv(r,t,e,i));return a}function ba(t,e,r){for(var a=e.getBaseAxis(),i=a.dim==="x"||a.dim==="radius"?0:1,n=[],o=0;o<t.length-1;o++){var s=t[o+1],l=t[o];n.push(l);var u=[];switch(r){case"end":u[i]=s[i],u[1-i]=l[1-i],n.push(u);break;case"middle":var h=(l[i]+s[i])/2,f=[];u[i]=f[i]=h,u[1-i]=l[1-i],f[1-i]=s[1-i],n.push(u),n.push(f);break;default:u[i]=l[i],u[1-i]=s[1-i],n.push(u)}}return t[o]&&n.push(t[o]),n}function sL(t,e){var r=t.getVisual("visualMeta");if(!(!r||!r.length||!t.count())){if(e.type!=="cartesian2d"){z&&console.warn("Visual map on line style is only supported on cartesian2d.");return}for(var a,i,n=r.length-1;n>=0;n--){var o=r[n].dimension,s=t.dimensions[o],l=t.getDimensionInfo(s);if(a=l&&l.coordDim,a==="x"||a==="y"){i=r[n];break}}if(!i){z&&console.warn("Visual map on line style only support x or y dimension.");return}var u=e.getAxis(a),h=E(i.stops,function(y){return{coord:u.toGlobalCoord(u.dataToCoord(y.value)),color:y.color}}),f=h.length,c=i.outerColors.slice();f&&h[0].coord>h[f-1].coord&&(h.reverse(),c.reverse());var v=10,d=h[0].coord-v,g=h[f-1].coord+v,p=g-d;if(p<.001)return"transparent";T(h,function(y){y.offset=(y.coord-d)/p}),h.push({offset:f?h[f-1].offset:.5,color:c[1]||"transparent"}),h.unshift({offset:f?h[0].offset:.5,color:c[0]||"transparent"});var m=new qa(0,0,0,0,h,!0);return m[a]=d,m[a+"2"]=g,m}}function lL(t,e,r){var a=t.get("showAllSymbol"),i=a==="auto";if(!(a&&!i)){var n=r.getAxesByScale("ordinal")[0];if(!!n&&!(i&&uL(n,e))){var o=e.mapDimension(n.dim),s={};return T(n.getViewLabels(),function(l){s[l.tickValue]=1}),function(l){return!s.hasOwnProperty(e.get(o,l))}}}}function uL(t,e){var r=t.getExtent(),a=Math.abs(r[1]-r[0])/t.scale.count();isNaN(a)&&(a=0);for(var i=e.count(),n=Math.max(1,Math.round(i/5)),o=0;o<i;o+=n)if(wa.getSymbolSize(e,o)[t.isHorizontal()?1:0]*1.5>a)return!1;return!0}function n1(t,e,r){if(t.type==="cartesian2d"){var a=t.getBaseAxis().isHorizontal(),i=t1(t,e,r);if(!r.get("clip",!0)){var n=i.shape,o=Math.max(n.width,n.height);a?(n.y-=o,n.height+=o*2):(n.x-=o,n.width+=o*2)}return i}else return e1(t,e,r)}Yt.extend({type:"line",init:function(){var t=new G,e=new gn;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},render:function(t,e,r){var a=t.coordinateSystem,i=this.group,n=t.getData(),o=t.getModel("lineStyle"),s=t.getModel("areaStyle"),l=n.mapArray(n.getItemLayout),u=a.type==="polar",h=this._coordSys,f=this._symbolDraw,c=this._polyline,v=this._polygon,d=this._lineGroup,g=t.get("animation"),p=!s.isEmpty(),m=s.get("origin"),y=Ov(a,n,m),_=oL(a,n,y),x=t.get("showSymbol"),w=x&&!u&&lL(t,n,a),S=this._data;S&&S.eachItemGraphicEl(function(M,B){M.__temp&&(i.remove(M),S.setItemGraphicEl(B,null))}),x||f.remove(),i.add(d);var b=!u&&t.get("step"),A;a&&a.getArea&&t.get("clip",!0)&&(A=a.getArea(),A.width!=null?(A.x-=.1,A.y-=.1,A.width+=.2,A.height+=.2):A.r0&&(A.r0-=.5,A.r1+=.5)),this._clipShapeForSymbol=A,c&&h.type===a.type&&b===this._step?(p&&!v?v=this._newPolygon(l,_,a,g):v&&!p&&(d.remove(v),v=this._polygon=null),d.setClipPath(n1(a,!1,t)),x&&f.updateData(n,{isIgnore:w,clipShape:A}),n.eachItemGraphicEl(function(M){M.stopAnimation(!0)}),(!r1(this._stackedOnPoints,_)||!r1(this._points,l))&&(g?this._updateAnimation(n,_,a,r,b,m):(b&&(l=ba(l,a,b),_=ba(_,a,b)),c.setShape({points:l}),v&&v.setShape({points:l,stackedOnPoints:_})))):(x&&f.updateData(n,{isIgnore:w,clipShape:A}),b&&(l=ba(l,a,b),_=ba(_,a,b)),c=this._newPolyline(l,a,g),p&&(v=this._newPolygon(l,_,a,g)),d.setClipPath(n1(a,!0,t)));var C=sL(n,a)||n.getVisual("color");c.useStyle(U(o.getLineStyle(),{fill:"none",stroke:C,lineJoin:"bevel"}));var D=t.get("smooth");if(D=i1(t.get("smooth")),c.setShape({smooth:D,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")}),v){var I=n.getCalculationInfo("stackedOnSeries"),L=0;v.useStyle(U(s.getAreaStyle(),{fill:C,opacity:.7,lineJoin:"bevel"})),I&&(L=i1(I.get("smooth"))),v.setShape({smooth:D,stackedOnSmooth:L,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")})}this._data=n,this._coordSys=a,this._stackedOnPoints=_,this._points=l,this._step=b,this._valueOrigin=m},dispose:function(){},highlight:function(t,e,r,a){var i=t.getData(),n=cl(i,a);if(!(n instanceof Array)&&n!=null&&n>=0){var o=i.getItemGraphicEl(n);if(!o){var s=i.getItemLayout(n);if(!s||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(s[0],s[1]))return;o=new wa(i,n),o.position=s,o.setZ(t.get("zlevel"),t.get("z")),o.ignore=isNaN(s[0])||isNaN(s[1]),o.__temp=!0,i.setItemGraphicEl(n,o),o.stopSymbolAnimation(!0),this.group.add(o)}o.highlight()}else Yt.prototype.highlight.call(this,t,e,r,a)},downplay:function(t,e,r,a){var i=t.getData(),n=cl(i,a);if(n!=null&&n>=0){var o=i.getItemGraphicEl(n);o&&(o.__temp?(i.setItemGraphicEl(n,null),this.group.remove(o)):o.downplay())}else Yt.prototype.downplay.call(this,t,e,r,a)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new nL({shape:{points:t},silent:!0,z2:10}),this._lineGroup.add(e),this._polyline=e,e},_newPolygon:function(t,e){var r=this._polygon;return r&&this._lineGroup.remove(r),r=new j_({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(r),this._polygon=r,r},_updateAnimation:function(t,e,r,a,i,n){var o=this._polyline,s=this._polygon,l=t.hostModel,u=rL(this._data,t,this._stackedOnPoints,e,this._coordSys,r,this._valueOrigin,n),h=u.current,f=u.stackedOnCurrent,c=u.next,v=u.stackedOnNext;if(i&&(h=ba(u.current,r,i),f=ba(u.stackedOnCurrent,r,i),c=ba(u.next,r,i),v=ba(u.stackedOnNext,r,i)),a1(h,c)>3e3||s&&a1(f,v)>3e3){o.setShape({points:c}),s&&s.setShape({points:c,stackedOnPoints:v});return}o.shape.__points=u.current,o.shape.points=h,tt(o,{shape:{points:c}},l),s&&(s.setShape({points:h,stackedOnPoints:f}),tt(s,{shape:{points:c,stackedOnPoints:v}},l));for(var d=[],g=u.status,p=0;p<g.length;p++){var m=g[p].cmd;if(m==="="){var y=t.getItemGraphicEl(g[p].idx1);y&&d.push({el:y,ptIdx:p})}}o.animators&&o.animators.length&&o.animators[0].during(function(){for(var _=0;_<d.length;_++){var x=d[_].el;x.attr("position",o.shape.__points[d[_].ptIdx])}})},remove:function(t){var e=this.group,r=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),r&&r.eachItemGraphicEl(function(a,i){a.__temp&&(e.remove(a),r.setItemGraphicEl(i,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._data=null}});var li=function(t,e,r){return{seriesType:t,performRawSeries:!0,reset:function(a,i,n){var o=a.getData(),s=a.get("symbol"),l=a.get("symbolSize"),u=a.get("symbolKeepAspect"),h=a.get("symbolRotate"),f=$t(s),c=$t(l),v=$t(h),d=f||c||v,g=!f&&s?s:e,p=c?null:l;if(o.setVisual({legendSymbol:r||g,symbol:g,symbolSize:p,symbolKeepAspect:u,symbolRotate:h}),i.isSeriesFiltered(a))return;function m(y,_){if(d){var x=a.getRawValue(_),w=a.getDataParams(_);f&&y.setItemVisual(_,"symbol",s(x,w)),c&&y.setItemVisual(_,"symbolSize",l(x,w)),v&&y.setItemVisual(_,"symbolRotate",h(x,w))}if(y.hasItemOption){var S=y.getItemModel(_),b=S.getShallow("symbol",!0),A=S.getShallow("symbolSize",!0),C=S.getShallow("symbolRotate",!0),D=S.getShallow("symbolKeepAspect",!0);b!=null&&y.setItemVisual(_,"symbol",b),A!=null&&y.setItemVisual(_,"symbolSize",A),C!=null&&y.setItemVisual(_,"symbolRotate",C),D!=null&&y.setItemVisual(_,"symbolKeepAspect",D)}}return{dataEach:o.hasItemOption||d?m:null}}}},Qo=function(t){return{seriesType:t,plan:nn(),reset:function(e){var r=e.getData(),a=e.coordinateSystem,i=e.pipelineContext,n=i.large;if(!a)return;var o=E(a.dimensions,function(h){return r.mapDimension(h)}).slice(0,2),s=o.length,l=r.getCalculationInfo("stackResultDimension");Ur(r,o[0])&&(o[0]=l),Ur(r,o[1])&&(o[1]=l);function u(h,f){for(var c=h.end-h.start,v=n&&new Float32Array(c*s),d=h.start,g=0,p=[],m=[];d<h.end;d++){var y;if(s===1){var _=f.get(o[0],d);y=!isNaN(_)&&a.dataToPoint(_,null,m)}else{var _=p[0]=f.get(o[0],d),x=p[1]=f.get(o[1],d);y=!isNaN(_)&&!isNaN(x)&&a.dataToPoint(p,null,m)}n?(v[g++]=y?y[0]:NaN,v[g++]=y?y[1]:NaN):f.setItemLayout(d,y&&y.slice()||[NaN,NaN])}n&&f.setLayout("symbolPoints",v)}return s&&{progress:u}}}},hL={average:function(t){for(var e=0,r=0,a=0;a<t.length;a++)isNaN(t[a])||(e+=t[a],r++);return r===0?NaN:e/r},sum:function(t){for(var e=0,r=0;r<t.length;r++)e+=t[r]||0;return e},max:function(t){for(var e=-1/0,r=0;r<t.length;r++)t[r]>e&&(e=t[r]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,r=0;r<t.length;r++)t[r]<e&&(e=t[r]);return isFinite(e)?e:NaN},nearest:function(t){return t[0]}},fL=function(t,e){return Math.round(t.length/2)},cL=function(t){return{seriesType:t,modifyOutputEnd:!0,reset:function(e,r,a){var i=e.getData(),n=e.get("sampling"),o=e.coordinateSystem;if(o.type==="cartesian2d"&&n){var s=o.getBaseAxis(),l=o.getOtherAxis(s),u=s.getExtent(),h=u[1]-u[0],f=Math.round(i.count()/h);if(f>1){var c;typeof n=="string"?c=hL[n]:typeof n=="function"&&(c=n),c&&e.setData(i.downSample(i.mapDimension(l.dim),1/f,c,fL))}}}}};function vL(t){return this._axes[t]}var xu=function(t){this._axes={},this._dimList=[],this.name=t||""};xu.prototype={constructor:xu,type:"cartesian",getAxis:function(t){return this._axes[t]},getAxes:function(){return E(this._dimList,vL,this)},getAxesByScale:function(t){return t=t.toLowerCase(),Ht(this.getAxes(),function(e){return e.scale.type===t})},addAxis:function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},dataToCoord:function(t){return this._dataCoordConvert(t,"dataToCoord")},coordToData:function(t){return this._dataCoordConvert(t,"coordToData")},_dataCoordConvert:function(t,e){for(var r=this._dimList,a=t instanceof Array?[]:{},i=0;i<r.length;i++){var n=r[i],o=this._axes[n];a[n]=o[e](t[n])}return a}};function Jo(t){xu.call(this,t)}Jo.prototype={constructor:Jo,type:"cartesian2d",dimensions:["x","y"],getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},containPoint:function(t){var e=this.getAxis("x"),r=this.getAxis("y");return e.contain(e.toLocalCoord(t[0]))&&r.contain(r.toLocalCoord(t[1]))},containData:function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},dataToPoint:function(t,e,r){var a=this.getAxis("x"),i=this.getAxis("y");return r=r||[],r[0]=a.toGlobalCoord(a.dataToCoord(t[0])),r[1]=i.toGlobalCoord(i.dataToCoord(t[1])),r},clampData:function(t,e){var r=this.getAxis("x").scale,a=this.getAxis("y").scale,i=r.getExtent(),n=a.getExtent(),o=r.parse(t[0]),s=a.parse(t[1]);return e=e||[],e[0]=Math.min(Math.max(Math.min(i[0],i[1]),o),Math.max(i[0],i[1])),e[1]=Math.min(Math.max(Math.min(n[0],n[1]),s),Math.max(n[0],n[1])),e},pointToData:function(t,e){var r=this.getAxis("x"),a=this.getAxis("y");return e=e||[],e[0]=r.coordToData(r.toLocalCoord(t[0])),e[1]=a.coordToData(a.toLocalCoord(t[1])),e},getOtherAxis:function(t){return this.getAxis(t.dim==="x"?"y":"x")},getArea:function(){var t=this.getAxis("x").getGlobalExtent(),e=this.getAxis("y").getGlobalExtent(),r=Math.min(t[0],t[1]),a=Math.min(e[0],e[1]),i=Math.max(t[0],t[1])-r,n=Math.max(e[0],e[1])-a,o=new it(r,a,i,n);return o}},yt(Jo,xu);var wu=function(t,e,r,a,i){Vt.call(this,t,e,r),this.type=a||"value",this.position=i||"bottom"};wu.prototype={constructor:wu,index:0,getAxesOnZeroOf:null,model:null,isHorizontal:function(){var t=this.position;return t==="top"||t==="bottom"},getGlobalExtent:function(t){var e=this.getExtent();return e[0]=this.toGlobalCoord(e[0]),e[1]=this.toGlobalCoord(e[1]),t&&e[0]>e[1]&&e.reverse(),e},getOtherAxis:function(){this.grid.getOtherAxis()},pointToData:function(t,e){return this.coordToData(this.toLocalCoord(t[this.dim==="x"?0:1]),e)},toLocalCoord:null,toGlobalCoord:null},yt(wu,Vt);var o1={show:!0,zlevel:0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#333",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},Sa={};Sa.categoryAxis=J({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},o1),Sa.valueAxis=J({boundaryGap:[0,0],splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#eee",width:1}}},o1),Sa.timeAxis=U({scale:!0,min:"dataMin",max:"dataMax"},Sa.valueAxis),Sa.logAxis=U({scale:!0,logBase:10},Sa.valueAxis);var dL=["value","category","time","log"],mn=function(t,e,r,a){T(dL,function(i){e.extend({type:t+"Axis."+i,mergeDefaultAndTheme:function(n,o){var s=this.layoutMode,l=s?rn(n):{},u=o.getTheme();J(n,u.get(i+"Axis")),J(n,this.getDefaultOption()),n.type=r(t,n),s&&ga(n,l,s)},optionUpdated:function(){var n=this.option;n.type==="category"&&(this.__ordinalMeta=$o.createByAxisModel(this))},getCategories:function(n){var o=this.option;if(o.type==="category")return n?o.data:this.__ordinalMeta.categories},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:Yn([{},Sa[i+"Axis"],a],!0)})}),ct.registerSubTypeDefaulter(t+"Axis",K(r,t))},yn=ct.extend({type:"cartesian2dAxis",axis:null,init:function(){yn.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){yn.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){yn.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});function s1(t,e){return e.type||(e.data?"category":"value")}J(yn.prototype,oi);var l1={offset:0};mn("x",yn,s1,l1),mn("y",yn,s1,l1),ct.extend({type:"grid",dependencies:["xAxis","yAxis"],layoutMode:"box",coordinateSystem:null,defaultOption:{show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:60,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"}});function Hv(t,e,r){return t.getCoordSysModel()===e}function _n(t,e,r){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,r),this.model=t}var ue=_n.prototype;ue.type="grid",ue.axisPointerEnabled=!0,ue.getRect=function(){return this._rect},ue.update=function(t,e){var r=this._axesMap;this._updateScale(t,this.model),T(r.x,function(i){xa(i.scale,i.model)}),T(r.y,function(i){xa(i.scale,i.model)});var a={};T(r.x,function(i){u1(r,"y",i,a)}),T(r.y,function(i){u1(r,"x",i,a)}),this.resize(this.model,e)};function u1(t,e,r,a){r.getAxesOnZeroOf=function(){return n?[n]:[]};var i=t[e],n,o=r.model,s=o.get("axisLine.onZero"),l=o.get("axisLine.onZeroAxisIndex");if(!s)return;if(l!=null)h1(i[l])&&(n=i[l]);else for(var u in i)if(i.hasOwnProperty(u)&&h1(i[u])&&!a[h(i[u])]){n=i[u];break}n&&(a[h(n)]=!0);function h(f){return f.dim+"_"+f.index}}function h1(t){return t&&t.type!=="category"&&t.type!=="time"&&_2(t)}ue.resize=function(t,e,r){var a=Ot(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=a;var i=this._axesList;n(),!r&&t.get("containLabel")&&(T(i,function(o){if(!o.model.get("axisLabel.inside")){var s=x2(o);if(s){var l=o.isHorizontal()?"height":"width",u=o.model.get("axisLabel.margin");a[l]-=s[l]+u,o.position==="top"?a.y+=s.height+u:o.position==="left"&&(a.x+=s.width+u)}}}),n());function n(){T(i,function(o){var s=o.isHorizontal(),l=s?[0,a.width]:[0,a.height],u=o.inverse?1:0;o.setExtent(l[u],l[1-u]),gL(o,s?a.x:a.y)})}},ue.getAxis=function(t,e){var r=this._axesMap[t];if(r!=null){if(e==null){for(var a in r)if(r.hasOwnProperty(a))return r[a]}return r[e]}},ue.getAxes=function(){return this._axesList.slice()},ue.getCartesian=function(t,e){if(t!=null&&e!=null){var r="x"+t+"y"+e;return this._coordsMap[r]}Q(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var a=0,i=this._coordsList;a<i.length;a++)if(i[a].getAxis("x").index===t||i[a].getAxis("y").index===e)return i[a]},ue.getCartesians=function(){return this._coordsList.slice()},ue.convertToPixel=function(t,e,r){var a=this._findConvertTarget(t,e);return a.cartesian?a.cartesian.dataToPoint(r):a.axis?a.axis.toGlobalCoord(a.axis.dataToCoord(r)):null},ue.convertFromPixel=function(t,e,r){var a=this._findConvertTarget(t,e);return a.cartesian?a.cartesian.pointToData(r):a.axis?a.axis.coordToData(a.axis.toLocalCoord(r)):null},ue._findConvertTarget=function(t,e){var r=e.seriesModel,a=e.xAxisModel||r&&r.getReferringComponents("xAxis")[0],i=e.yAxisModel||r&&r.getReferringComponents("yAxis")[0],n=e.gridModel,o=this._coordsList,s,l;if(r)s=r.coordinateSystem,ut(o,s)<0&&(s=null);else if(a&&i)s=this.getCartesian(a.componentIndex,i.componentIndex);else if(a)l=this.getAxis("x",a.componentIndex);else if(i)l=this.getAxis("y",i.componentIndex);else if(n){var u=n.coordinateSystem;u===this&&(s=this._coordsList[0])}return{cartesian:s,axis:l}},ue.containPoint=function(t){var e=this._coordsList[0];if(e)return e.containPoint(t)},ue._initCartesian=function(t,e,r){var a={left:!1,right:!1,top:!1,bottom:!1},i={x:{},y:{}},n={x:0,y:0};if(e.eachComponent("xAxis",o("x"),this),e.eachComponent("yAxis",o("y"),this),!n.x||!n.y){this._axesMap={},this._axesList=[];return}this._axesMap=i,T(i.x,function(s,l){T(i.y,function(u,h){var f="x"+l+"y"+h,c=new Jo(f);c.grid=this,c.model=t,this._coordsMap[f]=c,this._coordsList.push(c),c.addAxis(s),c.addAxis(u)},this)},this);function o(s){return function(l,u){if(!!Hv(l,t,e)){var h=l.get("position");s==="x"?h!=="top"&&h!=="bottom"&&(h=a.bottom?"top":"bottom"):h!=="left"&&h!=="right"&&(h=a.left?"right":"left"),a[h]=!0;var f=new wu(s,dn(l),[0,0],l.get("type"),h),c=f.type==="category";f.onBand=c&&l.get("boundaryGap"),f.inverse=l.get("inverse"),l.axis=f,f.model=l,f.grid=this,f.index=u,this._axesList.push(f),i[s][u]=f,n[s]++}}}},ue._updateScale=function(t,e){T(this._axesList,function(a){a.scale.setExtent(1/0,-1/0)}),t.eachSeries(function(a){if(c1(a)){var i=f1(a,t),n=i[0],o=i[1];if(!Hv(n,e,t)||!Hv(o,e,t))return;var s=this.getCartesian(n.componentIndex,o.componentIndex),l=a.getData(),u=s.getAxis("x"),h=s.getAxis("y");l.type==="list"&&(r(l,u,a),r(l,h,a))}},this);function r(a,i,n){T(a.mapDimension(i.dim,!0),function(o){i.scale.unionExtentFromData(a,Uo(a,o))})}},ue.getTooltipAxes=function(t){var e=[],r=[];return T(this.getCartesians(),function(a){var i=t!=null&&t!=="auto"?a.getAxis(t):a.getBaseAxis(),n=a.getOtherAxis(i);ut(e,i)<0&&e.push(i),ut(r,n)<0&&r.push(n)}),{baseAxes:e,otherAxes:r}};function gL(t,e){var r=t.getExtent(),a=r[0]+r[1];t.toGlobalCoord=t.dim==="x"?function(i){return i+e}:function(i){return a-i+e},t.toLocalCoord=t.dim==="x"?function(i){return i-e}:function(i){return a-i+e}}var pL=["xAxis","yAxis"];function f1(t,e){return E(pL,function(r){var a=t.getReferringComponents(r)[0];if(z&&!a)throw new Error(r+' "'+Et(t.get(r+"Index"),t.get(r+"Id"),0)+'" not found');return a})}function c1(t){return t.get("coordinateSystem")==="cartesian2d"}_n.create=function(t,e){var r=[];return t.eachComponent("grid",function(a,i){var n=new _n(a,t,e);n.name="grid_"+i,n.resize(a,e,!0),a.coordinateSystem=n,r.push(n)}),t.eachSeries(function(a){if(!!c1(a)){var i=f1(a,t),n=i[0],o=i[1],s=n.getCoordSysModel();if(z){if(!s)throw new Error('Grid "'+Et(n.get("gridIndex"),n.get("gridId"),0)+'" not found');if(n.getCoordSysModel()!==o.getCoordSysModel())throw new Error("xAxis and yAxis must use the same grid")}var l=s.coordinateSystem;a.coordinateSystem=l.getCartesian(n.componentIndex,o.componentIndex)}}),r},_n.dimensions=_n.prototype.dimensions=Jo.prototype.dimensions,re.register("cartesian2d",_n);var Aa=Math.PI,xe=function(t,e){this.opt=e,this.axisModel=t,U(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0}),this.group=new G;var r=new G({position:e.position.slice(),rotation:e.rotation});r.updateTransform(),this._transform=r.transform,this._dumbGroup=r};xe.prototype={constructor:xe,hasBuilder:function(t){return!!v1[t]},add:function(t){v1[t].call(this)},getGroup:function(){return this.group}};var v1={axisLine:function(){var t=this.opt,e=this.axisModel;if(!!e.get("axisLine.show")){var r=this.axisModel.axis.getExtent(),a=this._transform,i=[r[0],0],n=[r[1],0];a&&(xt(i,i,a),xt(n,n,a));var o=Z({lineCap:"round"},e.getModel("axisLine.lineStyle").getLineStyle());this.group.add(new ee({anid:"line",subPixelOptimize:!0,shape:{x1:i[0],y1:i[1],x2:n[0],y2:n[1]},style:o,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1}));var s=e.get("axisLine.symbol"),l=e.get("axisLine.symbolSize"),u=e.get("axisLine.symbolOffset")||0;if(typeof u=="number"&&(u=[u,u]),s!=null){typeof s=="string"&&(s=[s,s]),(typeof l=="string"||typeof l=="number")&&(l=[l,l]);var h=l[0],f=l[1];T([{rotate:t.rotation+Math.PI/2,offset:u[0],r:0},{rotate:t.rotation-Math.PI/2,offset:u[1],r:Math.sqrt((i[0]-n[0])*(i[0]-n[0])+(i[1]-n[1])*(i[1]-n[1]))}],function(c,v){if(s[v]!=="none"&&s[v]!=null){var d=Le(s[v],-h/2,-f/2,h,f,o.stroke,!0),g=c.r+c.offset,p=[i[0]+g*Math.cos(t.rotation),i[1]-g*Math.sin(t.rotation)];d.attr({rotation:c.rotate,position:p,silent:!0,z2:11}),this.group.add(d)}},this)}}},axisTickLabel:function(){var t=this.axisModel,e=this.opt,r=_L(this,t,e),a=wL(this,t,e);yL(t,a,r),xL(this,t,e)},axisName:function(){var t=this.opt,e=this.axisModel,r=Et(t.axisName,e.get("name"));if(!!r){var a=e.get("nameLocation"),i=t.nameDirection,n=e.getModel("nameTextStyle"),o=e.get("nameGap")||0,s=this.axisModel.axis.getExtent(),l=s[0]>s[1]?-1:1,u=[a==="start"?s[0]-l*o:a==="end"?s[1]+l*o:(s[0]+s[1])/2,y1(a)?t.labelOffset+i*o:0],h,f=e.get("nameRotate");f!=null&&(f=f*Aa/180);var c;y1(a)?h=g1(t.rotation,f??t.rotation,i):(h=mL(t,a,f||0,s),c=t.axisNameAvailableWidth,c!=null&&(c=Math.abs(c/Math.sin(h.rotation)),!isFinite(c)&&(c=null)));var v=n.getFont(),d=e.get("nameTruncate",!0)||{},g=d.ellipsis,p=Et(t.nameTruncateMaxWidth,d.maxWidth,c),m=g!=null&&p!=null?K0(r,p,v,g,{minChar:2,placeholder:d.placeholder}):r,y=e.get("tooltip",!0),_=e.mainType,x={componentType:_,name:r,$vars:["name"]};x[_+"Index"]=e.componentIndex;var w=new nt({anid:"name",__fullText:r,__truncatedText:m,position:u,rotation:h.rotation,silent:p1(e),z2:1,tooltip:y&&y.show?Z({content:r,formatter:function(){return r},formatterParams:x},y):null});Rt(w.style,n,{text:m,textFont:v,textFill:n.getTextColor()||e.get("axisLine.lineStyle.color"),textAlign:n.get("align")||h.textAlign,textVerticalAlign:n.get("verticalAlign")||h.textVerticalAlign}),e.get("triggerEvent")&&(w.eventData=d1(e),w.eventData.targetType="axisName",w.eventData.name=r),this._dumbGroup.add(w),w.updateTransform(),this.group.add(w),w.decomposeTransform()}}},d1=xe.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},g1=xe.innerTextLayout=function(t,e,r){var a=Mc(e-t),i,n;return So(a)?(n=r>0?"top":"bottom",i="center"):So(a-Aa)?(n=r>0?"bottom":"top",i="center"):(n="middle",a>0&&a<Aa?i=r>0?"right":"left":i=r>0?"left":"right"),{rotation:a,textAlign:i,textVerticalAlign:n}};function mL(t,e,r,a){var i=Mc(r-t.rotation),n,o,s=a[0]>a[1],l=e==="start"&&!s||e!=="start"&&s;return So(i-Aa/2)?(o=l?"bottom":"top",n="center"):So(i-Aa*1.5)?(o=l?"top":"bottom",n="center"):(o="middle",i<Aa*1.5&&i>Aa/2?n=l?"left":"right":n=l?"right":"left"),{rotation:i,textAlign:n,textVerticalAlign:o}}var p1=xe.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)};function yL(t,e,r){if(!N_(t.axis)){var a=t.get("axisLabel.showMinLabel"),i=t.get("axisLabel.showMaxLabel");e=e||[],r=r||[];var n=e[0],o=e[1],s=e[e.length-1],l=e[e.length-2],u=r[0],h=r[1],f=r[r.length-1],c=r[r.length-2];a===!1?(Xe(n),Xe(u)):m1(n,o)&&(a?(Xe(o),Xe(h)):(Xe(n),Xe(u))),i===!1?(Xe(s),Xe(f)):m1(l,s)&&(i?(Xe(l),Xe(c)):(Xe(s),Xe(f)))}}function Xe(t){t&&(t.ignore=!0)}function m1(t,e,r){var a=t&&t.getBoundingRect().clone(),i=e&&e.getBoundingRect().clone();if(!(!a||!i)){var n=Hi([]);return Or(n,n,-t.rotation),a.applyTransform(ea([],n,t.getLocalTransform())),i.applyTransform(ea([],n,e.getLocalTransform())),a.intersect(i)}}function y1(t){return t==="middle"||t==="center"}function _1(t,e,r,a,i){for(var n=[],o=[],s=[],l=0;l<t.length;l++){var u=t[l].coord;o[0]=u,o[1]=0,s[0]=u,s[1]=r,e&&(xt(o,o,e),xt(s,s,e));var h=new ee({anid:i+"_"+t[l].tickValue,subPixelOptimize:!0,shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:a,z2:2,silent:!0});n.push(h)}return n}function _L(t,e,r){var a=e.axis,i=e.getModel("axisTick");if(!(!i.get("show")||a.scale.isBlank())){for(var n=i.getModel("lineStyle"),o=r.tickDirection*i.get("length"),s=a.getTicksCoords(),l=_1(s,t._transform,o,U(n.getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")}),"ticks"),u=0;u<l.length;u++)t.group.add(l[u]);return l}}function xL(t,e,r){var a=e.axis,i=e.getModel("minorTick");if(!(!i.get("show")||a.scale.isBlank())){var n=a.getMinorTicksCoords();if(!!n.length)for(var o=i.getModel("lineStyle"),s=r.tickDirection*i.get("length"),l=U(o.getLineStyle(),U(e.getModel("axisTick").getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")})),u=0;u<n.length;u++)for(var h=_1(n[u],t._transform,s,l,"minorticks_"+u),f=0;f<h.length;f++)t.group.add(h[f])}}function wL(t,e,r){var a=e.axis,i=Et(r.axisLabelShow,e.get("axisLabel.show"));if(!(!i||a.scale.isBlank())){var n=e.getModel("axisLabel"),o=n.get("margin"),s=a.getViewLabels(),l=(Et(r.labelRotate,n.get("rotate"))||0)*Aa/180,u=g1(r.rotation,l,r.labelDirection),h=e.getCategories&&e.getCategories(!0),f=[],c=p1(e),v=e.get("triggerEvent");return T(s,function(d,g){var p=d.tickValue,m=d.formattedLabel,y=d.rawLabel,_=n;h&&h[p]&&h[p].textStyle&&(_=new ht(h[p].textStyle,n,e.ecModel));var x=_.getTextColor()||e.get("axisLine.lineStyle.color"),w=a.dataToCoord(p),S=[w,r.labelOffset+r.labelDirection*o],b=new nt({anid:"label_"+p,position:S,rotation:u.rotation,silent:c,z2:10});Rt(b.style,_,{text:m,textAlign:_.getShallow("align",!0)||u.textAlign,textVerticalAlign:_.getShallow("verticalAlign",!0)||_.getShallow("baseline",!0)||u.textVerticalAlign,textFill:typeof x=="function"?x(a.type==="category"?y:a.type==="value"?p+"":p,g):x}),v&&(b.eventData=d1(e),b.eventData.targetType="axisLabel",b.eventData.value=y),t._dumbGroup.add(b),b.updateTransform(),f.push(b),t.group.add(b),b.decomposeTransform()}),f}}var xn=T,Fv=K;function bL(t,e){var r={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return SL(r,t,e),r.seriesInvolved&&TL(r,t),r}function SL(t,e,r){var a=e.getComponent("tooltip"),i=e.getComponent("axisPointer"),n=i.get("link",!0)||[],o=[];xn(r.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var l=jo(s.model),u=t.coordSysAxesInfo[l]={};t.coordSysMap[l]=s;var h=s.model,f=h.getModel("tooltip",a);if(xn(s.getAxes(),Fv(g,!1,null)),s.getTooltipAxes&&a&&f.get("show")){var c=f.get("trigger")==="axis",v=f.get("axisPointer.type")==="cross",d=s.getTooltipAxes(f.get("axisPointer.axis"));(c||v)&&xn(d.baseAxes,Fv(g,v?"cross":!0,c)),v&&xn(d.otherAxes,Fv(g,"cross",!1))}function g(p,m,y){var _=y.model.getModel("axisPointer",i),x=_.get("show");if(!(!x||x==="auto"&&!p&&!$v(_))){m==null&&(m=_.get("triggerTooltip")),_=p?AL(y,f,i,e,p,m):_;var w=_.get("snap"),S=jo(y.model),b=m||w||y.type==="category",A=t.axesInfo[S]={key:S,axis:y,coordSys:s,axisPointerModel:_,triggerTooltip:m,involveSeries:b,snap:w,useHandle:$v(_),seriesModels:[]};u[S]=A,t.seriesInvolved|=b;var C=CL(n,y);if(C!=null){var D=o[C]||(o[C]={axesInfo:{}});D.axesInfo[S]=A,D.mapper=n[C].mapper,A.linkGroup=D}}}})}function AL(t,e,r,a,i,n){var o=e.getModel("axisPointer"),s={};xn(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],function(f){s[f]=Y(o.get(f))}),s.snap=t.type!=="category"&&!!n,o.get("type")==="cross"&&(s.type="line");var l=s.label||(s.label={});if(l.show==null&&(l.show=!1),i==="cross"){var u=o.get("label.show");if(l.show=u??!0,!n){var h=s.lineStyle=o.get("crossStyle");h&&U(l,h.textStyle)}}return t.model.getModel("axisPointer",new ht(s,r,a))}function TL(t,e){e.eachSeries(function(r){var a=r.coordinateSystem,i=r.get("tooltip.trigger",!0),n=r.get("tooltip.show",!0);!a||i==="none"||i===!1||i==="item"||n===!1||r.get("axisPointer.show",!0)===!1||xn(t.coordSysAxesInfo[jo(a.model)],function(o){var s=o.axis;a.getAxis(s.dim)===s&&(o.seriesModels.push(r),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=r.getData().count())})},this)}function CL(t,e){for(var r=e.model,a=e.dim,i=0;i<t.length;i++){var n=t[i]||{};if(Wv(n[a+"AxisId"],r.id)||Wv(n[a+"AxisIndex"],r.componentIndex)||Wv(n[a+"AxisName"],r.name))return i}}function Wv(t,e){return t==="all"||P(t)&&ut(t,e)>=0||t===e}function DL(t){var e=Uv(t);if(!!e){var r=e.axisPointerModel,a=e.axis.scale,i=r.option,n=r.get("status"),o=r.get("value");o!=null&&(o=a.parse(o));var s=$v(r);n==null&&(i.status=s?"show":"hide");var l=a.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o<l[0]&&(o=l[0]),i.value=o,s&&(i.status=e.axis.scale.isBlank()?"hide":"show")}}function Uv(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[jo(t)]}function IL(t){var e=Uv(t);return e&&e.axisPointerModel}function $v(t){return!!t.get("handle.show")}function jo(t){return t.type+"||"+t.id}var Pe=Xt({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(t,e,r,a){this.axisPointerClass&&DL(t),Pe.superApply(this,"render",arguments),x1(this,t,e,r,a,!0)},updateAxisPointer:function(t,e,r,a,i){x1(this,t,e,r,a,!1)},remove:function(t,e){var r=this._axisPointer;r&&r.remove(e),Pe.superApply(this,"remove",arguments)},dispose:function(t,e){w1(this,e),Pe.superApply(this,"dispose",arguments)}});function x1(t,e,r,a,i,n){var o=Pe.getAxisPointerClass(t.axisPointerClass);if(!!o){var s=IL(e);s?(t._axisPointer||(t._axisPointer=new o)).render(e,s,a,n):w1(t,a)}}function w1(t,e,r){var a=t._axisPointer;a&&a.dispose(e,r),t._axisPointer=null}var Zv=[];Pe.registerAxisPointerClass=function(t,e){if(z&&Zv[t])throw new Error("axisPointer "+t+" exists");Zv[t]=e},Pe.getAxisPointerClass=function(t){return t&&Zv[t]};function Yv(t,e,r){r=r||{};var a=t.coordinateSystem,i=e.axis,n={},o=i.getAxesOnZeroOf()[0],s=i.position,l=o?"onZero":s,u=i.dim,h=a.getRect(),f=[h.x,h.x+h.width,h.y,h.y+h.height],c={left:0,right:1,top:0,bottom:1,onZero:2},v=e.get("offset")||0,d=u==="x"?[f[2]-v,f[3]+v]:[f[0]-v,f[1]+v];if(o){var g=o.toGlobalCoord(o.dataToCoord(0));d[c.onZero]=Math.max(Math.min(g,d[1]),d[0])}n.position=[u==="y"?d[c[l]]:f[0],u==="x"?d[c[l]]:f[3]],n.rotation=Math.PI/2*(u==="x"?0:1);var p={top:-1,bottom:1,left:-1,right:1};n.labelDirection=n.tickDirection=n.nameDirection=p[s],n.labelOffset=o?d[c[s]]-d[c.onZero]:0,e.get("axisTick.inside")&&(n.tickDirection=-n.tickDirection),Et(r.labelInside,e.get("axisLabel.inside"))&&(n.labelDirection=-n.labelDirection);var m=e.get("axisLabel.rotate");return n.labelRotate=l==="top"?-m:m,n.z2=1,n}function b1(t,e,r,a){var i=r.axis;if(!i.scale.isBlank()){var n=r.getModel("splitArea"),o=n.getModel("areaStyle"),s=o.get("color"),l=a.coordinateSystem.getRect(),u=i.getTicksCoords({tickModel:n,clamp:!0});if(!!u.length){var h=s.length,f=t.__splitAreaColors,c=j(),v=0;if(f)for(var d=0;d<u.length;d++){var g=f.get(u[d].tickValue);if(g!=null){v=(g+(h-1)*d)%h;break}}var p=i.toGlobalCoord(u[0].coord),m=o.getAreaStyle();s=P(s)?s:[s];for(var d=1;d<u.length;d++){var y=i.toGlobalCoord(u[d].coord),_,x,w,S;i.isHorizontal()?(_=p,x=l.y,w=y-_,S=l.height,p=_+w):(_=l.x,x=p,w=l.width,S=y-x,p=x+S);var b=u[d-1].tickValue;b!=null&&c.set(b,v),e.add(new ft({anid:b!=null?"area_"+b:null,shape:{x:_,y:x,width:w,height:S},style:U({fill:s[v]},m),silent:!0})),v=(v+1)%h}t.__splitAreaColors=c}}}function S1(t){t.__splitAreaColors=null}var ML=["axisLine","axisTickLabel","axisName"],LL=["splitArea","splitLine","minorSplitLine"],Xv=Pe.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(t,e,r,a){this.group.removeAll();var i=this._axisGroup;if(this._axisGroup=new G,this.group.add(this._axisGroup),!!t.get("show")){var n=t.getCoordSysModel(),o=Yv(n,t),s=new xe(t,o);T(ML,s.add,s),this._axisGroup.add(s.getGroup()),T(LL,function(l){t.get(l+".show")&&this["_"+l](t,n)},this),Ol(i,this._axisGroup,t),Xv.superCall(this,"render",t,e,r,a)}},remove:function(){S1(this)},_splitLine:function(t,e){var r=t.axis;if(!r.scale.isBlank()){var a=t.getModel("splitLine"),i=a.getModel("lineStyle"),n=i.get("color");n=P(n)?n:[n];for(var o=e.coordinateSystem.getRect(),s=r.isHorizontal(),l=0,u=r.getTicksCoords({tickModel:a}),h=[],f=[],c=i.getLineStyle(),v=0;v<u.length;v++){var d=r.toGlobalCoord(u[v].coord);s?(h[0]=d,h[1]=o.y,f[0]=d,f[1]=o.y+o.height):(h[0]=o.x,h[1]=d,f[0]=o.x+o.width,f[1]=d);var g=l++%n.length,p=u[v].tickValue;this._axisGroup.add(new ee({anid:p!=null?"line_"+u[v].tickValue:null,subPixelOptimize:!0,shape:{x1:h[0],y1:h[1],x2:f[0],y2:f[1]},style:U({stroke:n[g]},c),silent:!0}))}}},_minorSplitLine:function(t,e){var r=t.axis,a=t.getModel("minorSplitLine"),i=a.getModel("lineStyle"),n=e.coordinateSystem.getRect(),o=r.isHorizontal(),s=r.getMinorTicksCoords();if(!!s.length)for(var l=[],u=[],h=i.getLineStyle(),f=0;f<s.length;f++)for(var c=0;c<s[f].length;c++){var v=r.toGlobalCoord(s[f][c].coord);o?(l[0]=v,l[1]=n.y,u[0]=v,u[1]=n.y+n.height):(l[0]=n.x,l[1]=v,u[0]=n.x+n.width,u[1]=v),this._axisGroup.add(new ee({anid:"minor_line_"+s[f][c].tickValue,subPixelOptimize:!0,shape:{x1:l[0],y1:l[1],x2:u[0],y2:u[1]},style:h,silent:!0}))}},_splitArea:function(t,e){b1(this,this._axisGroup,t,e)}});Xv.extend({type:"xAxis"}),Xv.extend({type:"yAxis"}),Xt({type:"grid",render:function(t,e){this.group.removeAll(),t.get("show")&&this.group.add(new ft({shape:t.coordinateSystem.getRect(),style:U({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))}}),ie(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})}),bt(li("line","circle","line")),It(Qo("line")),Ie(br.PROCESSOR.STATISTIC,cL("line"));var A1=Dt.extend({type:"series.__base_bar__",getInitialData:function(t,e){return $r(this.getSource(),this,{useEncodeDefaulter:!0})},getMarkerPosition:function(t){var e=this.coordinateSystem;if(e){var r=e.dataToPoint(e.clampData(t)),a=this.getData(),i=a.getLayout("offset"),n=a.getLayout("size"),o=e.getBaseAxis().isHorizontal()?0:1;return r[o]+=i+n/2,r}return[NaN,NaN]},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",itemStyle:{},emphasis:{}}});A1.extend({type:"series.bar",dependencies:["grid","polar"],brushSelector:"rect",getProgressive:function(){return this.get("large")?this.get("progressive"):!1},getProgressiveThreshold:function(){var t=this.get("progressiveThreshold"),e=this.get("largeThreshold");return e>t&&(t=e),t},defaultOption:{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1}}});function T1(t,e,r,a,i,n,o){var s=r.getModel("label"),l=r.getModel("emphasis.label");Te(t,e,s,l,{labelFetcher:i,labelDataIndex:n,defaultText:mu(i.getData(),n),isRectText:!0,autoColor:a}),C1(t),C1(e)}function C1(t,e){t.textPosition==="outside"&&(t.textPosition=e)}var PL=qi([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),EL={getBarItemStyle:function(t){var e=PL(this,t);if(this.getBorderLineDash){var r=this.getBorderLineDash();r&&(e.lineDash=r)}return e}},RL=Ge({type:"sausage",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:Math.PI*2,clockwise:!0},buildPath:function(t,e){var r=e.cx,a=e.cy,i=Math.max(e.r0||0,0),n=Math.max(e.r,0),o=(n-i)*.5,s=i+o,l=e.startAngle,u=e.endAngle,h=e.clockwise,f=Math.cos(l),c=Math.sin(l),v=Math.cos(u),d=Math.sin(u),g=h?u-l<Math.PI*2:l-u<Math.PI*2;g&&(t.moveTo(f*i+r,c*i+a),t.arc(f*s+r,c*s+a,o,-Math.PI+l,l,!h)),t.arc(r,a,n,l,u,!h),t.moveTo(v*n+r,d*n+a),t.arc(v*s+r,d*s+a,o,u-Math.PI*2,u-Math.PI,!h),i!==0&&(t.arc(r,a,i,u,l,h),t.moveTo(f*i+r,d*i+a)),t.closePath()}}),kL=["itemStyle","barBorderWidth"],bu=[0,0];Z(ht.prototype,EL);function NL(t,e){var r=t.getArea&&t.getArea();if(t.type==="cartesian2d"){var a=t.getBaseAxis();if(a.type!=="category"||!a.onBand){var i=e.getLayout("bandWidth");a.isHorizontal()?(r.x-=i,r.width+=i*2):(r.y-=i,r.height+=i*2)}}return r}_e({type:"bar",render:function(t,e,r){this._updateDrawMode(t);var a=t.get("coordinateSystem");return a==="cartesian2d"||a==="polar"?this._isLargeDraw?this._renderLarge(t,e,r):this._renderNormal(t,e,r):z&&console.warn("Only cartesian2d and polar supported for bar."),this.group},incrementalPrepareRender:function(t,e,r){this._clear(),this._updateDrawMode(t)},incrementalRender:function(t,e,r,a){this._incrementalRenderLarge(t,e)},_updateDrawMode:function(t){var e=t.pipelineContext.large;(this._isLargeDraw==null||e^this._isLargeDraw)&&(this._isLargeDraw=e,this._clear())},_renderNormal:function(t,e,r){var a=this.group,i=t.getData(),n=this._data,o=t.coordinateSystem,s=o.getBaseAxis(),l;o.type==="cartesian2d"?l=s.isHorizontal():o.type==="polar"&&(l=s.dim==="angle");var u=t.isAnimationEnabled()?t:null,h=t.get("clip",!0),f=NL(o,i);a.removeClipPath();var c=t.get("roundCap",!0),v=t.get("showBackground",!0),d=t.getModel("backgroundStyle"),g=d.get("barBorderRadius")||0,p=[],m=this._backgroundEls||[];i.diff(n).add(function(x){var w=i.getItemModel(x),S=Su[o.type](i,x,w);if(v){var b=Su[o.type](i,x),A=GL(o,l,b);A.useStyle(d.getBarItemStyle()),o.type==="cartesian2d"&&A.setShape("r",g),p[x]=A}if(!!i.hasValue(x)){if(h){var C=M1[o.type](f,S);if(C){a.remove(D);return}}var D=L1[o.type](x,S,l,u,!1,c);i.setItemGraphicEl(x,D),a.add(D),R1(D,i,x,w,S,t,l,o.type==="polar")}}).update(function(x,w){var S=i.getItemModel(x),b=Su[o.type](i,x,S);if(v){var A=m[w];A.useStyle(d.getBarItemStyle()),o.type==="cartesian2d"&&A.setShape("r",g),p[x]=A;var C=Su[o.type](i,x),D=z1(l,C,o);tt(A,{shape:D},u,x)}var I=n.getItemGraphicEl(w);if(!i.hasValue(x)){a.remove(I);return}if(h){var L=M1[o.type](f,b);if(L){a.remove(I);return}}I?tt(I,{shape:b},u,x):I=L1[o.type](x,b,l,u,!0,c),i.setItemGraphicEl(x,I),a.add(I),R1(I,i,x,S,b,t,l,o.type==="polar")}).remove(function(x){var w=n.getItemGraphicEl(x);o.type==="cartesian2d"?w&&P1(x,u,w):w&&E1(x,u,w)}).execute();var y=this._backgroundGroup||(this._backgroundGroup=new G);y.removeAll();for(var _=0;_<p.length;++_)y.add(p[_]);a.add(y),this._backgroundEls=p,this._data=i},_renderLarge:function(t,e,r){this._clear(),N1(t,this.group);var a=t.get("clip",!0)?_u(t.coordinateSystem,!1,t):null;a?this.group.setClipPath(a):this.group.removeClipPath()},_incrementalRenderLarge:function(t,e){this._removeBackground(),N1(e,this.group,!0)},dispose:Kt,remove:function(t){this._clear(t)},_clear:function(t){var e=this.group,r=this._data;t&&t.get("animation")&&r&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],r.eachItemGraphicEl(function(a){a.type==="sector"?E1(a.dataIndex,t,a):P1(a.dataIndex,t,a)})):e.removeAll(),this._data=null},_removeBackground:function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null}});var D1=Math.max,I1=Math.min,M1={cartesian2d:function(t,e){var r=e.width<0?-1:1,a=e.height<0?-1:1;r<0&&(e.x+=e.width,e.width=-e.width),a<0&&(e.y+=e.height,e.height=-e.height);var i=D1(e.x,t.x),n=I1(e.x+e.width,t.x+t.width),o=D1(e.y,t.y),s=I1(e.y+e.height,t.y+t.height);e.x=i,e.y=o,e.width=n-i,e.height=s-o;var l=e.width<0||e.height<0;return r<0&&(e.x+=e.width,e.width=-e.width),a<0&&(e.y+=e.height,e.height=-e.height),l},polar:function(t){return!1}},L1={cartesian2d:function(t,e,r,a,i){var n=new ft({shape:Z({},e),z2:1});if(n.name="item",a){var o=n.shape,s=r?"height":"width",l={};o[s]=0,l[s]=e[s],Gr[i?"updateProps":"initProps"](n,{shape:l},a,t)}return n},polar:function(t,e,r,a,i,n){var o=e.startAngle<e.endAngle,s=!r&&n?RL:ir,l=new s({shape:U({clockwise:o},e),z2:1});if(l.name="item",a){var u=l.shape,h=r?"r":"endAngle",f={};u[h]=r?0:e.startAngle,f[h]=e[h],Gr[i?"updateProps":"initProps"](l,{shape:f},a,t)}return l}};function P1(t,e,r){r.style.text=null,tt(r,{shape:{width:0}},e,t,function(){r.parent&&r.parent.remove(r)})}function E1(t,e,r){r.style.text=null,tt(r,{shape:{r:r.shape.r0}},e,t,function(){r.parent&&r.parent.remove(r)})}var Su={cartesian2d:function(t,e,r){var a=t.getItemLayout(e),i=r?OL(r,a):0,n=a.width>0?1:-1,o=a.height>0?1:-1;return{x:a.x+n*i/2,y:a.y+o*i/2,width:a.width-n*i,height:a.height-o*i}},polar:function(t,e,r){var a=t.getItemLayout(e);return{cx:a.cx,cy:a.cy,r0:a.r0,r:a.r,startAngle:a.startAngle,endAngle:a.endAngle}}};function qv(t){return t.startAngle!=null&&t.endAngle!=null&&t.startAngle===t.endAngle}function R1(t,e,r,a,i,n,o,s){var l=e.getItemVisual(r,"color"),u=e.getItemVisual(r,"opacity"),h=e.getVisual("borderColor"),f=a.getModel("itemStyle"),c=a.getModel("emphasis.itemStyle").getBarItemStyle();s||t.setShape("r",f.get("barBorderRadius")||0),t.useStyle(U({stroke:qv(i)?"none":h,fill:qv(i)?"none":l,opacity:u},f.getBarItemStyle()));var v=a.getShallow("cursor");v&&t.attr("cursor",v);var d=o?i.height>0?"bottom":"top":i.width>0?"left":"right";s||T1(t.style,c,a,l,n,r,d),qv(i)&&(c.fill=c.stroke="none"),St(t,c)}function OL(t,e){var r=t.get(kL)||0,a=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),i=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(r,a,i)}var k1=st.extend({type:"largeBar",shape:{points:[]},buildPath:function(t,e){for(var r=e.points,a=this.__startPoint,i=this.__baseDimIdx,n=0;n<r.length;n+=2)a[i]=r[n+i],t.moveTo(a[0],a[1]),t.lineTo(r[n],r[n+1])}});function N1(t,e,r){var a=t.getData(),i=[],n=a.getLayout("valueAxisHorizontal")?1:0;i[1-n]=a.getLayout("valueAxisStart");var o=a.getLayout("largeDataIndices"),s=a.getLayout("barWidth"),l=t.getModel("backgroundStyle"),u=t.get("showBackground",!0);if(u){var h=a.getLayout("largeBackgroundPoints"),f=[];f[1-n]=a.getLayout("backgroundStart");var c=new k1({shape:{points:h},incremental:!!r,__startPoint:f,__baseDimIdx:n,__largeDataIndices:o,__barWidth:s,silent:!0,z2:0});VL(c,l,a),e.add(c)}var v=new k1({shape:{points:a.getLayout("largePoints")},incremental:!!r,__startPoint:i,__baseDimIdx:n,__largeDataIndices:o,__barWidth:s});e.add(v),BL(v,t,a),v.seriesIndex=t.seriesIndex,t.get("silent")||(v.on("mousedown",O1),v.on("mousemove",O1))}var O1=Yl(function(t){var e=this,r=zL(e,t.offsetX,t.offsetY);e.dataIndex=r>=0?r:null},30,!1);function zL(t,e,r){var a=t.__baseDimIdx,i=1-a,n=t.shape.points,o=t.__largeDataIndices,s=Math.abs(t.__barWidth/2),l=t.__startPoint[i];bu[0]=e,bu[1]=r;for(var u=bu[a],h=bu[1-a],f=u-s,c=u+s,v=0,d=n.length/2;v<d;v++){var g=v*2,p=n[g+a],m=n[g+i];if(p>=f&&p<=c&&(l<=m?h>=l&&h<=m:h>=m&&h<=l))return o[v]}return-1}function BL(t,e,r){var a=r.getVisual("borderColor")||r.getVisual("color"),i=e.getModel("itemStyle").getItemStyle(["color","borderColor"]);t.useStyle(i),t.style.fill=null,t.style.stroke=a,t.style.lineWidth=r.getLayout("barWidth")}function VL(t,e,r){var a=e.get("borderColor")||e.get("color"),i=e.getItemStyle(["color","borderColor"]);t.useStyle(i),t.style.fill=null,t.style.stroke=a,t.style.lineWidth=r.getLayout("barWidth")}function z1(t,e,r){var a,i=r.type==="polar";return i?a=r.getArea():a=r.grid.getRect(),i?{cx:a.cx,cy:a.cy,r0:t?a.r0:e.r0,r:t?a.r:e.r,startAngle:t?e.startAngle:0,endAngle:t?e.endAngle:Math.PI*2}:{x:t?e.x:a.x,y:t?a.y:e.y,width:t?e.width:a.width,height:t?a.height:e.height}}function GL(t,e,r){var a=t.type==="polar"?ir:ft;return new a({shape:z1(e,r,t),silent:!0,z2:0})}It(br.VISUAL.LAYOUT,K(I_,"bar")),It(br.VISUAL.PROGRESSIVE_LAYOUT,f2),bt({seriesType:"bar",reset:function(t){t.getData().setVisual("legendSymbol","roundRect")}});var wn=function(t,e,r){e=P(e)&&{coordDimensions:e}||Z({},e);var a=t.getSource(),i=un(a,e),n=new qt(i,t);return n.initData(a,r),n},Kv={updateSelectedMap:function(t){this._targetList=P(t)?t.slice():[],this._selectTargetMap=ki(t||[],function(e,r){return e.set(r.name,r),e},j())},select:function(t,e){var r=e!=null?this._targetList[e]:this._selectTargetMap.get(t),a=this.get("selectedMode");a==="single"&&this._selectTargetMap.each(function(i){i.selected=!1}),r&&(r.selected=!0)},unSelect:function(t,e){var r=e!=null?this._targetList[e]:this._selectTargetMap.get(t);r&&(r.selected=!1)},toggleSelected:function(t,e){var r=e!=null?this._targetList[e]:this._selectTargetMap.get(t);if(r!=null)return this[r.selected?"unSelect":"select"](t,e),r.selected},isSelected:function(t,e){var r=e!=null?this._targetList[e]:this._selectTargetMap.get(t);return r&&r.selected}};function ts(t,e){this.getAllNames=function(){var r=e();return r.mapArray(r.getName)},this.containName=function(r){var a=e();return a.indexOfName(r)>=0},this.indexOfName=function(r){var a=t();return a.indexOfName(r)},this.getItemVisual=function(r,a){var i=t();return i.getItemVisual(r,a)}}var Au=su({type:"series.pie",init:function(t){Au.superApply(this,"init",arguments),this.legendVisualProvider=new ts(X(this.getData,this),X(this.getRawData,this)),this.updateSelectedMap(this._createSelectableList()),this._defaultLabelLine(t)},mergeOption:function(t){Au.superCall(this,"mergeOption",t),this.updateSelectedMap(this._createSelectableList())},getInitialData:function(t,e){return wn(this,{coordDimensions:["value"],encodeDefaulter:K(Gc,this)})},_createSelectableList:function(){for(var t=this.getRawData(),e=t.mapDimension("value"),r=[],a=0,i=t.count();a<i;a++)r.push({name:t.getName(a),value:t.get(e,a),selected:_y(t,a,"selected")});return r},getDataParams:function(t){var e=this.getData(),r=Au.superCall(this,"getDataParams",t),a=[];return e.each(e.mapDimension("value"),function(i){a.push(i)}),r.percent=U0(a,t,e.hostModel.get("percentPrecision")),r.$vars.push("percent"),r},_defaultLabelLine:function(t){Ua(t,"labelLine",["show"]);var e=t.labelLine,r=t.emphasis.labelLine;e.show=e.show&&t.label.show,r.show=r.show&&t.emphasis.label.show},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,hoverOffset:10,avoidLabelOverlap:!0,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:!1,show:!0,position:"outer",alignTo:"none",margin:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1},animationType:"expansion",animationTypeUpdate:"transition",animationEasing:"cubicOut"}});pt(Au,Kv);function HL(t,e,r,a){var i=e.getData(),n=this.dataIndex,o=i.getName(n),s=e.get("selectedOffset");a.dispatchAction({type:"pieToggleSelect",from:t,name:o,seriesId:e.id}),i.each(function(l){B1(i.getItemGraphicEl(l),i.getItemLayout(l),e.isSelected(i.getName(l)),s,r)})}function B1(t,e,r,a,i){var n=(e.startAngle+e.endAngle)/2,o=Math.cos(n),s=Math.sin(n),l=r?a:0,u=[o*l,s*l];i?t.animate().when(200,{position:u}).start("bounceOut"):t.attr("position",u)}function Qv(t,e){G.call(this);var r=new ir({z2:2}),a=new Ve,i=new nt;this.add(r),this.add(a),this.add(i),this.updateData(t,e,!0)}var V1=Qv.prototype;V1.updateData=function(t,e,r){var a=this.childAt(0),i=this.childAt(1),n=this.childAt(2),o=t.hostModel,s=t.getItemModel(e),l=t.getItemLayout(e),u=Z({},l);u.label=null;var h=o.getShallow("animationTypeUpdate");if(r){a.setShape(u);var f=o.getShallow("animationType");f==="scale"?(a.shape.r=l.r0,oe(a,{shape:{r:l.r}},o,e)):(a.shape.endAngle=l.startAngle,tt(a,{shape:{endAngle:l.endAngle}},o,e))}else h==="expansion"?a.setShape(u):tt(a,{shape:u},o,e);var c=t.getItemVisual(e,"color");a.useStyle(U({lineJoin:"bevel",fill:c},s.getModel("itemStyle").getItemStyle())),a.hoverStyle=s.getModel("emphasis.itemStyle").getItemStyle();var v=s.getShallow("cursor");v&&a.attr("cursor",v),B1(this,t.getItemLayout(e),o.isSelected(t.getName(e)),o.get("selectedOffset"),o.get("animation"));var d=!r&&h==="transition";this._updateLabel(t,e,d),this.highDownOnUpdate=o.get("silent")?null:function(g,p){var m=o.isAnimationEnabled()&&s.get("hoverAnimation");p==="emphasis"?(i.ignore=i.hoverIgnore,n.ignore=n.hoverIgnore,m&&(a.stopAnimation(!0),a.animateTo({shape:{r:l.r+o.get("hoverOffset")}},300,"elasticOut"))):(i.ignore=i.normalIgnore,n.ignore=n.normalIgnore,m&&(a.stopAnimation(!0),a.animateTo({shape:{r:l.r}},300,"elasticOut")))},St(this)},V1._updateLabel=function(t,e,r){var a=this.childAt(1),i=this.childAt(2),n=t.hostModel,o=t.getItemModel(e),s=t.getItemLayout(e),l=s.label,g=t.getItemVisual(e,"color");if(!l||isNaN(l.x)||isNaN(l.y)){i.ignore=i.normalIgnore=i.hoverIgnore=a.ignore=a.normalIgnore=a.hoverIgnore=!0;return}var u={points:l.linePoints||[[l.x,l.y],[l.x,l.y],[l.x,l.y]]},h={x:l.x,y:l.y};r?(tt(a,{shape:u},n,e),tt(i,{style:h},n,e)):(a.attr({shape:u}),i.attr({style:h})),i.attr({rotation:l.rotation,origin:[l.x,l.y],z2:10});var f=o.getModel("label"),c=o.getModel("emphasis.label"),v=o.getModel("labelLine"),d=o.getModel("emphasis.labelLine"),g=t.getItemVisual(e,"color");Te(i.style,i.hoverStyle={},f,c,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:l.text,autoColor:g,useInsideStyle:!!l.inside},{textAlign:l.textAlign,textVerticalAlign:l.verticalAlign,opacity:t.getItemVisual(e,"opacity")}),i.ignore=i.normalIgnore=!f.get("show"),i.hoverIgnore=!c.get("show"),a.ignore=a.normalIgnore=!v.get("show"),a.hoverIgnore=!d.get("show"),a.setStyle({stroke:g,opacity:t.getItemVisual(e,"opacity")}),a.setStyle(v.getModel("lineStyle").getLineStyle()),a.hoverStyle=d.getModel("lineStyle").getLineStyle();var p=v.get("smooth");p&&p===!0&&(p=.4),a.setShape({smooth:p})},yt(Qv,G);var JB=Yt.extend({type:"pie",init:function(){var t=new G;this._sectorGroup=t},render:function(t,e,r,a){if(!(a&&a.from===this.uid)){var i=t.getData(),n=this._data,o=this.group,s=e.get("animation"),l=!n,u=t.get("animationType"),h=t.get("animationTypeUpdate"),f=K(HL,this.uid,t,s,r),c=t.get("selectedMode");if(i.diff(n).add(function(m){var y=new Qv(i,m);l&&u!=="scale"&&y.eachChild(function(_){_.stopAnimation(!0)}),c&&y.on("click",f),i.setItemGraphicEl(m,y),o.add(y)}).update(function(m,y){var _=n.getItemGraphicEl(y);!l&&h!=="transition"&&_.eachChild(function(x){x.stopAnimation(!0)}),_.updateData(i,m),_.off("click"),c&&_.on("click",f),o.add(_),i.setItemGraphicEl(m,_)}).remove(function(m){var y=n.getItemGraphicEl(m);o.remove(y)}).execute(),s&&i.count()>0&&(l?u!=="scale":h!=="transition")){for(var v=i.getItemLayout(0),d=1;isNaN(v.startAngle)&&d<i.count();++d)v=i.getItemLayout(d);var g=Math.max(r.getWidth(),r.getHeight())/2,p=X(o.removeClipPath,o);o.setClipPath(this._createClipPath(v.cx,v.cy,g,v.startAngle,v.clockwise,p,t,l))}else o.removeClipPath();this._data=i}},dispose:function(){},_createClipPath:function(t,e,r,a,i,n,o,s){var l=new ir({shape:{cx:t,cy:e,r0:0,r,startAngle:a,endAngle:a,clockwise:i}}),u=s?oe:tt;return u(l,{shape:{endAngle:a+(i?1:-1)*Math.PI*2}},o,n),l},containPoint:function(t,e){var r=e.getData(),a=r.getItemLayout(0);if(a){var i=t[0]-a.cx,n=t[1]-a.cy,o=Math.sqrt(i*i+n*n);return o<=a.r&&o>=a.r0}}}),G1=function(t,e){T(e,function(r){r.update="updateView",lt(r,function(a,i){var n={};return i.eachComponent({mainType:"series",subType:t,query:a},function(o){o[r.method]&&o[r.method](a.name,a.dataIndex);var s=o.getData();s.each(function(l){var u=s.getName(l);n[u]=o.isSelected(u)||!1})}),{name:a.name,selected:n,seriesId:a.seriesId}})})},Tu=function(t){return{getTargetSeries:function(e){var r={},a=j();return e.eachSeriesByType(t,function(i){i.__paletteScope=r,a.set(i.uid,i)}),a},reset:function(e,r){var a=e.getRawData(),i={},n=e.getData();n.each(function(o){var s=n.getRawIndex(o);i[s]=o}),a.each(function(o){var s=i[o],l=s!=null&&n.getItemVisual(s,"color",!0),u=s!=null&&n.getItemVisual(s,"borderColor",!0),h;if((!l||!u)&&(h=a.getItemModel(o)),!l){var f=h.get("itemStyle.color")||e.getColorFromPalette(a.getName(o)||o+"",e.__paletteScope,a.count());s!=null&&n.setItemVisual(s,"color",f)}if(!u){var c=h.get("itemStyle.borderColor");s!=null&&n.setItemVisual(s,"borderColor",c)}})}}},FL=Math.PI/180;function H1(t,e,r,a,i,n,o,s,l,u){t.sort(function(x,w){return x.y-w.y});function h(x,w,S,b){for(var A=x;A<w&&!(t[A].y+S>l+o);A++)if(t[A].y+=S,A>x&&A+1<w&&t[A+1].y>t[A].y+t[A].height){f(A,S/2);return}f(w-1,S/2)}function f(x,w){for(var S=x;S>=0&&!(t[S].y-w<l||(t[S].y-=w,S>0&&t[S].y>t[S-1].y+t[S-1].height));S--);}function c(x,w,S,b,A,C){for(var D=(C>0,w?Number.MAX_VALUE:0),I=0,L=x.length;I<L;I++)if(x[I].labelAlignTo==="none"){var M=Math.abs(x[I].y-b),B=x[I].len,k=x[I].len2,O=M<A+B?Math.sqrt((A+B+k)*(A+B+k)-M*M):Math.abs(x[I].x-S);w&&O>=D&&(O=D-10),!w&&O<=D&&(O=D+10),x[I].x=S+O*C,D=O}}for(var v=0,d,g=t.length,p=[],m=[],y=0;y<g;y++){if(t[y].position==="outer"&&t[y].labelAlignTo==="labelLine"){var _=t[y].x-u;t[y].linePoints[1][0]+=_,t[y].x=u}d=t[y].y-v,d<0&&h(y,g,-d,i),v=t[y].y+t[y].height}o-v<0&&f(g-1,v-o);for(var y=0;y<g;y++)t[y].y>=r?m.push(t[y]):p.push(t[y]);c(p,!1,e,r,a,i),c(m,!0,e,r,a,i)}function WL(t,e,r,a,i,n,o,s){for(var l=[],u=[],h=Number.MAX_VALUE,f=-Number.MAX_VALUE,c=0;c<t.length;c++)F1(t[c])||(t[c].x<e?(h=Math.min(h,t[c].x),l.push(t[c])):(f=Math.max(f,t[c].x),u.push(t[c])));H1(u,e,r,a,1,i,n,o,s,f),H1(l,e,r,a,-1,i,n,o,s,h);for(var c=0;c<t.length;c++){var v=t[c];if(!F1(v)){var d=v.linePoints;if(d){var g=v.labelAlignTo==="edge",p=v.textRect.width,m;g?v.x<e?m=d[2][0]-v.labelDistance-o-v.labelMargin:m=o+i-v.labelMargin-d[2][0]-v.labelDistance:v.x<e?m=v.x-o-v.bleedMargin:m=o+i-v.x-v.bleedMargin,m<v.textRect.width&&(v.text=Mf(v.text,m,v.font),v.labelAlignTo==="edge"&&(p=Oe(v.text,v.font)));var y=d[1][0]-d[2][0];g?v.x<e?d[2][0]=o+v.labelMargin+p+v.labelDistance:d[2][0]=o+i-v.labelMargin-p-v.labelDistance:(v.x<e?d[2][0]=v.x+v.labelDistance:d[2][0]=v.x-v.labelDistance,d[1][0]=d[2][0]+y),d[1][1]=d[2][1]=v.y}}}}function F1(t){return t.position==="center"}var UL=function(t,e,r,a,i,n){var o=t.getData(),s=[],l,u,h=!1,f=(t.get("minShowLabelAngle")||0)*FL;o.each(function(c){var v=o.getItemLayout(c),d=o.getItemModel(c),g=d.getModel("label"),p=g.get("position")||d.get("emphasis.label.position"),m=g.get("distanceToLabelLine"),y=g.get("alignTo"),_=R(g.get("margin"),r),x=g.get("bleedMargin"),w=g.getFont(),S=d.getModel("labelLine"),b=S.get("length");b=R(b,r);var A=S.get("length2");if(A=R(A,r),!(v.angle<f)){var C=(v.startAngle+v.endAngle)/2,D=Math.cos(C),I=Math.sin(C),L,M,B,k;l=v.cx,u=v.cy;var O=t.getFormattedLabel(c,"normal")||o.getName(c),V=cr(O,w,k,"top"),H=p==="inside"||p==="inner";if(p==="center")L=v.cx,M=v.cy,k="center";else{var W=(H?(v.r+v.r0)/2*D:v.r*D)+l,F=(H?(v.r+v.r0)/2*I:v.r*I)+u;if(L=W+D*3,M=F+I*3,!H){var N=W+D*(b+e-v.r),$=F+I*(b+e-v.r),et=N+(D<0?-1:1)*A,vt=$;y==="edge"?L=D<0?i+_:i+r-_:L=et+(D<0?-m:m),M=vt,B=[[W,F],[N,$],[et,vt]]}k=H?"center":y==="edge"?D>0?"right":"left":D>0?"left":"right"}var wt,Ut=g.get("rotate");typeof Ut=="number"?wt=Ut*(Math.PI/180):wt=Ut?D<0?-C+Math.PI:-C:0,h=!!wt,v.label={x:L,y:M,position:p,height:V.height,len:b,len2:A,linePoints:B,textAlign:k,verticalAlign:"middle",rotation:wt,inside:H,labelDistance:m,labelAlignTo:y,labelMargin:_,bleedMargin:x,textRect:V,text:O,font:w},H||s.push(v.label)}}),!h&&t.get("avoidLabelOverlap")&&WL(s,l,u,e,r,a,i,n)},Cu=Math.PI*2,W1=Math.PI/180;function $L(t,e){return Ot(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}var ZL=function(t,e,r,a){e.eachSeriesByType(t,function(i){var n=i.getData(),o=n.mapDimension("value"),s=$L(i,r),l=i.get("center"),u=i.get("radius");P(u)||(u=[0,u]),P(l)||(l=[l,l]);var h=R(s.width,r.getWidth()),f=R(s.height,r.getHeight()),c=Math.min(h,f),v=R(l[0],h)+s.x,d=R(l[1],f)+s.y,g=R(u[0],c/2),p=R(u[1],c/2),m=-i.get("startAngle")*W1,y=i.get("minAngle")*W1,_=0;n.each(o,function(k){!isNaN(k)&&_++});var x=n.getSum(o),w=Math.PI/(x||_)*2,S=i.get("clockwise"),b=i.get("roseType"),A=i.get("stillShowZeroSum"),C=n.getDataExtent(o);C[0]=0;var D=Cu,I=0,L=m,M=S?1:-1;if(n.each(o,function(k,O){var V;if(isNaN(k)){n.setItemLayout(O,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:S,cx:v,cy:d,r0:g,r:b?NaN:p,viewRect:s});return}b!=="area"?V=x===0&&A?w:k*w:V=Cu/_,V<y?(V=y,D-=y):I+=k;var H=L+M*V;n.setItemLayout(O,{angle:V,startAngle:L,endAngle:H,clockwise:S,cx:v,cy:d,r0:g,r:b?At(k,C,[g,p]):p,viewRect:s}),L=H}),D<Cu&&_)if(D<=.001){var B=Cu/_;n.each(o,function(k,O){if(!isNaN(k)){var V=n.getItemLayout(O);V.angle=B,V.startAngle=m+M*O*B,V.endAngle=m+M*(O+1)*B}})}else w=D/I,L=m,n.each(o,function(k,O){if(!isNaN(k)){var V=n.getItemLayout(O),H=V.angle===y?y:k*w;V.startAngle=L,V.endAngle=L+M*H,L+=M*H}});UL(i,p,s.width,s.height,s.x,s.y)})},es=function(t){return{seriesType:t,reset:function(e,r){var a=r.findComponents({mainType:"legend"});if(!(!a||!a.length)){var i=e.getData();i.filterSelf(function(n){for(var o=i.getName(n),s=0;s<a.length;s++)if(!a[s].isSelected(o))return!1;return!0})}}}};G1("pie",[{type:"pieToggleSelect",event:"pieselectchanged",method:"toggleSelected"},{type:"pieSelect",event:"pieselected",method:"select"},{type:"pieUnSelect",event:"pieunselected",method:"unSelect"}]),bt(Tu("pie")),It(K(ZL,"pie")),Ie(es("pie")),Dt.extend({type:"series.scatter",dependencies:["grid","polar","geo","singleAxis","calendar"],getInitialData:function(t,e){return $r(this.getSource(),this,{useEncodeDefaulter:!0})},brushSelector:"point",getProgressive:function(){var t=this.option.progressive;return t??(this.option.large?5e3:this.get("progressive"))},getProgressiveThreshold:function(){var t=this.option.progressiveThreshold;return t??(this.option.large?1e4:this.get("progressiveThreshold"))},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},clip:!0}});var Jv=4,jv=Ge({shape:{points:null},symbolProxy:null,softClipShape:null,buildPath:function(t,e){var r=e.points,a=e.size,i=this.symbolProxy,n=i.shape,o=t.getContext?t.getContext():t,s=o&&a[0]<Jv;if(!s)for(var l=0;l<r.length;){var u=r[l++],h=r[l++];isNaN(u)||isNaN(h)||this.softClipShape&&!this.softClipShape.contain(u,h)||(n.x=u-a[0]/2,n.y=h-a[1]/2,n.width=a[0],n.height=a[1],i.buildPath(t,n,!0))}},afterBrush:function(t){var e=this.shape,r=e.points,a=e.size,i=a[0]<Jv;if(!!i){this.setTransform(t);for(var n=0;n<r.length;){var o=r[n++],s=r[n++];isNaN(o)||isNaN(s)||this.softClipShape&&!this.softClipShape.contain(o,s)||t.fillRect(o-a[0]/2,s-a[1]/2,a[0],a[1])}this.restoreTransform(t)}},findDataIndex:function(t,e){for(var r=this.shape,a=r.points,i=r.size,n=Math.max(i[0],4),o=Math.max(i[1],4),s=a.length/2-1;s>=0;s--){var l=s*2,u=a[l]-n/2,h=a[l+1]-o/2;if(t>=u&&e>=h&&t<=u+n&&e<=h+o)return s}return-1}});function U1(){this.group=new G}var Ta=U1.prototype;Ta.isPersistent=function(){return!this._incremental},Ta.updateData=function(t,e){this.group.removeAll();var r=new jv({rectHover:!0,cursor:"default"});r.setShape({points:t.getLayout("symbolPoints")}),this._setCommon(r,t,!1,e),this.group.add(r),this._incremental=null},Ta.updateLayout=function(t){if(!this._incremental){var e=t.getLayout("symbolPoints");this.group.eachChild(function(r){if(r.startIndex!=null){var a=(r.endIndex-r.startIndex)*2,i=r.startIndex*4*2;e=new Float32Array(e.buffer,i,a)}r.setShape("points",e)})}},Ta.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>2e6?(this._incremental||(this._incremental=new Ae({silent:!0})),this.group.add(this._incremental)):this._incremental=null},Ta.incrementalUpdate=function(t,e,r){var a;this._incremental?(a=new jv,this._incremental.addDisplayable(a,!0)):(a=new jv({rectHover:!0,cursor:"default",startIndex:t.start,endIndex:t.end}),a.incremental=!0,this.group.add(a)),a.setShape({points:e.getLayout("symbolPoints")}),this._setCommon(a,e,!!this._incremental,r)},Ta._setCommon=function(t,e,r,a){var i=e.hostModel;a=a||{};var n=e.getVisual("symbolSize");t.setShape("size",n instanceof Array?n:[n,n]),t.softClipShape=a.clipShape||null,t.symbolProxy=Le(e.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var o=t.shape.size[0]<Jv;t.useStyle(i.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var s=e.getVisual("color");s&&t.setColor(s),r||(t.seriesIndex=i.seriesIndex,t.on("mousemove",function(l){t.dataIndex=null;var u=t.findDataIndex(l.offsetX,l.offsetY);u>=0&&(t.dataIndex=u+(t.startIndex||0))}))},Ta.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},Ta._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()},_e({type:"scatter",render:function(t,e,r){var a=t.getData(),i=this._updateSymbolDraw(a,t);i.updateData(a,{clipShape:this._getClipShape(t)}),this._finished=!0},incrementalPrepareRender:function(t,e,r){var a=t.getData(),i=this._updateSymbolDraw(a,t);i.incrementalPrepareUpdate(a),this._finished=!1},incrementalRender:function(t,e,r){this._symbolDraw.incrementalUpdate(t,e.getData(),{clipShape:this._getClipShape(e)}),this._finished=t.end===e.getData().count()},updateTransform:function(t,e,r){var a=t.getData();if(this.group.dirty(),!this._finished||a.count()>1e4||!this._symbolDraw.isPersistent())return{update:!0};var i=Qo().reset(t);i.progress&&i.progress({start:0,end:a.count()},a),this._symbolDraw.updateLayout(a)},_getClipShape:function(t){var e=t.coordinateSystem,r=e&&e.getArea&&e.getArea();return t.get("clip",!0)?r:null},_updateSymbolDraw:function(t,e){var r=this._symbolDraw,a=e.pipelineContext,i=a.large;return(!r||i!==this._isLargeDraw)&&(r&&r.remove(),r=this._symbolDraw=i?new U1:new gn,this._isLargeDraw=i,this.group.removeAll()),this.group.add(r.group),r},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},dispose:function(){}}),bt(li("scatter","circle")),It(Qo("scatter"));function $1(t,e,r){Vt.call(this,t,e,r),this.type="value",this.angle=0,this.name="",this.model}yt($1,Vt);function Tr(t,e,r){this._model=t,this.dimensions=[],this._indicatorAxes=E(t.getIndicatorModels(),function(a,i){var n="indicator_"+i,o=new $1(n,a.get("axisType")==="log"?new gu:new Sr);return o.name=a.get("name"),o.model=a,a.axis=o,this.dimensions.push(n),o},this),this.resize(t,r),this.cx,this.cy,this.r,this.r0,this.startAngle}Tr.prototype.getIndicatorAxes=function(){return this._indicatorAxes},Tr.prototype.dataToPoint=function(t,e){var r=this._indicatorAxes[e];return this.coordToPoint(r.dataToCoord(t),e)},Tr.prototype.coordToPoint=function(t,e){var r=this._indicatorAxes[e],a=r.angle,i=this.cx+t*Math.cos(a),n=this.cy-t*Math.sin(a);return[i,n]},Tr.prototype.pointToData=function(t){var e=t[0]-this.cx,r=t[1]-this.cy,a=Math.sqrt(e*e+r*r);e/=a,r/=a;for(var i=Math.atan2(-r,e),n=1/0,o,s=-1,l=0;l<this._indicatorAxes.length;l++){var u=this._indicatorAxes[l],h=Math.abs(i-u.angle);h<n&&(o=u,s=l,n=h)}return[s,+(o&&o.coordToData(a))]},Tr.prototype.resize=function(t,e){var r=t.get("center"),a=e.getWidth(),i=e.getHeight(),n=Math.min(a,i)/2;this.cx=R(r[0],a),this.cy=R(r[1],i),this.startAngle=t.get("startAngle")*Math.PI/180;var o=t.get("radius");(typeof o=="string"||typeof o=="number")&&(o=[0,o]),this.r0=R(o[0],n),this.r=R(o[1],n),T(this._indicatorAxes,function(s,l){s.setExtent(this.r0,this.r);var u=this.startAngle+l*Math.PI*2/this._indicatorAxes.length;u=Math.atan2(Math.sin(u),Math.cos(u)),s.angle=u},this)},Tr.prototype.update=function(t,e){var r=this._indicatorAxes,a=this._model;T(r,function(o){o.scale.setExtent(1/0,-1/0)}),t.eachSeriesByType("radar",function(o,s){if(!(o.get("coordinateSystem")!=="radar"||t.getComponent("radar",o.get("radarIndex"))!==a)){var l=o.getData();T(r,function(u){u.scale.unionExtentFromData(l,l.mapDimension(u.dim))})}},this);var i=a.get("splitNumber");function n(o){var s=Math.pow(10,Math.floor(Math.log(o)/Math.LN10)),l=o/s;return l===2?l=5:l*=2,l*s}T(r,function(o,s){var l=k_(o.scale,o.model).extent;xa(o.scale,o.model);var u=o.model,h=o.scale,f=u.getMin(),c=u.getMax(),v=h.getInterval();if(f!=null&&c!=null)h.setExtent(+f,+c),h.setInterval((c-f)/i);else if(f!=null){var d;do d=f+v*i,h.setExtent(+f,d),h.setInterval(v),v=n(v);while(d<l[1]&&isFinite(d)&&isFinite(l[1]))}else if(c!=null){var g;do g=c-v*i,h.setExtent(g,+c),h.setInterval(v),v=n(v);while(g>l[0]&&isFinite(g)&&isFinite(l[0]))}else{var p=h.getTicks().length-1;p>i&&(v=n(v));var d=Math.ceil(l[1]/v)*v,g=Ft(d-v*i);h.setExtent(g,d),h.setInterval(v)}})},Tr.dimensions=[],Tr.create=function(t,e){var r=[];return t.eachComponent("radar",function(a){var i=new Tr(a,t,e);r.push(i),a.coordinateSystem=i}),t.eachSeriesByType("radar",function(a){a.get("coordinateSystem")==="radar"&&(a.coordinateSystem=r[a.get("radarIndex")||0])}),r},re.register("radar",Tr);var rs=Sa.valueAxis;function Du(t,e){return U({show:e},t)}var jB=Me({type:"radar",optionUpdated:function(){var t=this.get("boundaryGap"),e=this.get("splitNumber"),r=this.get("scale"),a=this.get("axisLine"),i=this.get("axisTick"),n=this.get("axisType"),o=this.get("axisLabel"),s=this.get("name"),l=this.get("name.show"),u=this.get("name.formatter"),h=this.get("nameGap"),f=this.get("triggerEvent"),c=E(this.get("indicator")||[],function(v){v.max!=null&&v.max>0&&!v.min?v.min=0:v.min!=null&&v.min<0&&!v.max&&(v.max=0);var d=s;if(v.color!=null&&(d=U({color:v.color},s)),v=J(Y(v),{boundaryGap:t,splitNumber:e,scale:r,axisLine:a,axisTick:i,axisType:n,axisLabel:o,name:v.text,nameLocation:"end",nameGap:h,nameTextStyle:d,triggerEvent:f},!1),l||(v.name=""),typeof u=="string"){var g=v.name;v.name=u.replace("{value}",g??"")}else typeof u=="function"&&(v.name=u(v.name,v));var p=Z(new ht(v,null,this.ecModel),oi);return p.mainType="radar",p.componentIndex=this.componentIndex,p},this);this.getIndicatorModels=function(){return c}},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"75%",startAngle:90,name:{show:!0},boundaryGap:[0,0],splitNumber:5,nameGap:15,scale:!1,shape:"polygon",axisLine:J({lineStyle:{color:"#bbb"}},rs.axisLine),axisLabel:Du(rs.axisLabel,!1),axisTick:Du(rs.axisTick,!1),axisType:"interval",splitLine:Du(rs.splitLine,!0),splitArea:Du(rs.splitArea,!0),indicator:[]}}),YL=["axisLine","axisTickLabel","axisName"];Xt({type:"radar",render:function(t,e,r){var a=this.group;a.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},_buildAxes:function(t){var e=t.coordinateSystem,r=e.getIndicatorAxes(),a=E(r,function(i){var n=new xe(i.model,{position:[e.cx,e.cy],rotation:i.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return n});T(a,function(i){T(YL,i.add,i),this.group.add(i.getGroup())},this)},_buildSplitLineAndArea:function(t){var e=t.coordinateSystem,r=e.getIndicatorAxes();if(!r.length)return;var a=t.get("shape"),i=t.getModel("splitLine"),n=t.getModel("splitArea"),o=i.getModel("lineStyle"),s=n.getModel("areaStyle"),l=i.get("show"),u=n.get("show"),h=o.get("color"),f=s.get("color");h=P(h)?h:[h],f=P(f)?f:[f];var c=[],v=[];function d(I,L,M){var B=M%L.length;return I[B]=I[B]||[],B}if(a==="circle")for(var g=r[0].getTicksCoords(),p=e.cx,m=e.cy,y=0;y<g.length;y++){if(l){var _=d(c,h,y);c[_].push(new mr({shape:{cx:p,cy:m,r:g[y].coord}}))}if(u&&y<g.length-1){var _=d(v,f,y);v[_].push(new Cl({shape:{cx:p,cy:m,r0:g[y].coord,r:g[y+1].coord}}))}}else for(var x,w=E(r,function(I,L){var M=I.getTicksCoords();return x=x==null?M.length-1:Math.min(M.length-1,x),E(M,function(B){return e.coordToPoint(B.coord,L)})}),S=[],y=0;y<=x;y++){for(var b=[],A=0;A<r.length;A++)b.push(w[A][y]);if(b[0]?b.push(b[0].slice()):z&&console.error("Can't draw value axis "+y),l){var _=d(c,h,y);c[_].push(new Ve({shape:{points:b}}))}if(u&&S){var _=d(v,f,y-1);v[_].push(new Se({shape:{points:b.concat(S)}}))}S=b.slice().reverse()}var C=o.getLineStyle(),D=s.getAreaStyle();T(v,function(I,L){this.group.add(He(I,{style:U({stroke:"none",fill:f[L%f.length]},D),silent:!0}))},this),T(c,function(I,L){this.group.add(He(I,{style:U({fill:"none",stroke:h[L%h.length]},C),silent:!0}))},this)}});var XL=Dt.extend({type:"series.radar",dependencies:["radar"],init:function(t){XL.superApply(this,"init",arguments),this.legendVisualProvider=new ts(X(this.getData,this),X(this.getRawData,this))},getInitialData:function(t,e){return wn(this,{generateCoord:"indicator_",generateCoordCount:1/0})},formatTooltip:function(t){var e=this.getData(),r=this.coordinateSystem,a=r.getIndicatorAxes(),i=this.getData().getName(t);return Tt(i===""?this.name:i)+"<br/>"+E(a,function(n,o){var s=e.get(e.mapDimension(n.dim),t);return Tt(n.name+" : "+s)}).join("<br />")},getTooltipPosition:function(t){if(t!=null){for(var e=this.getData(),r=this.coordinateSystem,a=e.getValues(E(r.dimensions,function(s){return e.mapDimension(s)}),t,!0),i=0,n=a.length;i<n;i++)if(!isNaN(a[i])){var o=r.getIndicatorAxes();return r.coordToPoint(o[i].dataToCoord(a[i]),i)}}},defaultOption:{zlevel:0,z:2,coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid"},label:{position:"top"},symbol:"emptyCircle",symbolSize:4}});function qL(t){return P(t)||(t=[+t,+t]),t}_e({type:"radar",render:function(t,e,r){var a=t.coordinateSystem,i=this.group,n=t.getData(),o=this._data;function s(h,f){var c=h.getItemVisual(f,"symbol")||"circle",v=h.getItemVisual(f,"color");if(c!=="none"){var d=qL(h.getItemVisual(f,"symbolSize")),g=Le(c,-1,-1,2,2,v);return g.attr({style:{strokeNoScale:!0},z2:100,scale:[d[0]/2,d[1]/2]}),g}}function l(h,f,c,v,d,g){c.removeAll();for(var p=0;p<f.length-1;p++){var m=s(v,d);m&&(m.__dimIdx=p,h[p]?(m.attr("position",h[p]),Gr[g?"initProps":"updateProps"](m,{position:f[p]},t,d)):m.attr("position",f[p]),c.add(m))}}function u(h){return E(h,function(f){return[a.cx,a.cy]})}n.diff(o).add(function(h){var f=n.getItemLayout(h);if(!!f){var c=new Se,v=new Ve,d={shape:{points:f}};c.shape.points=u(f),v.shape.points=u(f),oe(c,d,t,h),oe(v,d,t,h);var g=new G,p=new G;g.add(v),g.add(c),g.add(p),l(v.shape.points,f,p,n,h,!0),n.setItemGraphicEl(h,g)}}).update(function(h,f){var c=o.getItemGraphicEl(f),v=c.childAt(0),d=c.childAt(1),g=c.childAt(2),p={shape:{points:n.getItemLayout(h)}};!p.shape.points||(l(v.shape.points,p.shape.points,g,n,h,!1),tt(v,p,t),tt(d,p,t),n.setItemGraphicEl(h,c))}).remove(function(h){i.remove(o.getItemGraphicEl(h))}).execute(),n.eachItemGraphicEl(function(h,f){var c=n.getItemModel(f),v=h.childAt(0),d=h.childAt(1),g=h.childAt(2),p=n.getItemVisual(f,"color");i.add(h),v.useStyle(U(c.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:p})),v.hoverStyle=c.getModel("emphasis.lineStyle").getLineStyle();var m=c.getModel("areaStyle"),y=c.getModel("emphasis.areaStyle"),_=m.isEmpty()&&m.parentModel.isEmpty(),x=y.isEmpty()&&y.parentModel.isEmpty();x=x&&_,d.ignore=_,d.useStyle(U(m.getAreaStyle(),{fill:p,opacity:.7})),d.hoverStyle=y.getAreaStyle();var w=c.getModel("itemStyle").getItemStyle(["color"]),S=c.getModel("emphasis.itemStyle").getItemStyle(),b=c.getModel("label"),A=c.getModel("emphasis.label");g.eachChild(function(C){C.setStyle(w),C.hoverStyle=Y(S);var D=n.get(n.dimensions[C.__dimIdx],f);(D==null||isNaN(D))&&(D=""),Te(C.style,C.hoverStyle,b,A,{labelFetcher:n.hostModel,labelDataIndex:f,labelDimIndex:C.__dimIdx,defaultText:D,autoColor:p,isRectText:!0})}),h.highDownOnUpdate=function(C,D){d.attr("ignore",D==="emphasis"?x:_)},St(h)}),this._data=n},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}});var KL=function(t){t.eachSeriesByType("radar",function(e){var r=e.getData(),a=[],i=e.coordinateSystem;if(!!i){var n=i.getIndicatorAxes();T(n,function(o,s){r.each(r.mapDimension(n[s].dim),function(l,u){a[u]=a[u]||[];var h=i.dataToPoint(l,s);a[u][s]=Z1(h)?h:Y1(i)})}),r.each(function(o){var s=Np(a[o],function(l){return Z1(l)})||Y1(i);a[o].push(s.slice()),r.setItemLayout(o,a[o])})}})};function Z1(t){return!isNaN(t[0])&&!isNaN(t[1])}function Y1(t){return[t.cx,t.cy]}var QL=function(t){var e=t.polar;if(e){P(e)||(e=[e]);var r=[];T(e,function(a,i){a.indicator?(a.type&&!a.shape&&(a.shape=a.type),t.radar=t.radar||[],P(t.radar)||(t.radar=[t.radar]),t.radar.push(a)):r.push(a)}),t.polar=r}T(t.series,function(a){a&&a.type==="radar"&&a.polarIndex&&(a.radarIndex=a.polarIndex)})};bt(Tu("radar")),bt(li("radar","circle")),It(KL),Ie(es("radar")),ie(QL);for(var td=[126,25],ui=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]],hi=0;hi<ui.length;hi++)for(var bn=0;bn<ui[hi].length;bn++)ui[hi][bn][0]/=10.5,ui[hi][bn][1]/=-10.5/.75,ui[hi][bn][0]+=td[0],ui[hi][bn][1]+=td[1];var JL=function(t,e){t==="china"&&e.push(new qo("\u5357\u6D77\u8BF8\u5C9B",E(ui,function(r){return{type:"polygon",exterior:r}}),td))},jL={\u5357\u6D77\u8BF8\u5C9B:[32,80],\u5E7F\u4E1C:[0,-10],\u9999\u6E2F:[10,5],\u6FB3\u95E8:[-10,10],\u5929\u6D25:[5,5]},tP=function(t,e){if(t==="china"){var r=jL[e.name];if(r){var a=e.center;a[0]+=r[0]/10.5,a[1]+=-r[1]/(10.5/.75)}}},eP={Russia:[100,60],"United States":[-99,38],"United States of America":[-99,38]},rP=function(t,e){if(t==="world"){var r=eP[e.name];if(r){var a=e.center;a[0]=r[0],a[1]=r[1]}}},aP=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]],iP=function(t,e){t==="china"&&e.name==="\u53F0\u6E7E"&&e.geometries.push({type:"polygon",exterior:aP[0]})},X1=de(),nP={load:function(t,e,r){var a=X1(e).parsed;if(a)return a;var i=e.specialAreas||{},n=e.geoJSON,o;try{o=n?Rv(n,r):[]}catch(s){throw new Error(`Invalid geoJson format
`+s.message)}return JL(t,o),T(o,function(s){var l=s.name;tP(t,s),rP(t,s),iP(t,s);var u=i[l];u&&s.transformTo(u.left,u.top,u.width,u.height)}),X1(e).parsed={regions:o,boundingRect:oP(o)}}};function oP(t){for(var e,r=0;r<t.length;r++){var a=t[r].getBoundingRect();e=e||a.clone(),e.union(a)}return e}var Sn=de(),sP={load:function(t,e){var r=Sn(e).originRoot;if(r)return{root:r,boundingRect:Sn(e).boundingRect};var a=q1(e);return Sn(e).originRoot=a.root,Sn(e).boundingRect=a.boundingRect,a},makeGraphic:function(t,e,r){var a=Sn(e),i=a.rootMap||(a.rootMap=j()),n=i.get(r);if(n)return n;var o=a.originRoot,s=a.boundingRect;return a.originRootHostKey?n=q1(e,s).root:(a.originRootHostKey=r,n=o),i.set(r,n)},removeGraphic:function(t,e,r){var a=Sn(e),i=a.rootMap;i&&i.removeKey(r),r===a.originRootHostKey&&(a.originRootHostKey=null)}};function q1(t,e){var r=t.svgXML,a,i;try{a=r&&cM(r,{ignoreViewBox:!0,ignoreRootClip:!0})||{},i=a.root,ot(i!=null)}catch(h){throw new Error(`Invalid svg format
`+h.message)}var n=a.width,o=a.height,s=a.viewBoxRect;if(e||(e=n==null||o==null?i.getBoundingRect():new it(0,0,0,0),n!=null&&(e.width=n),o!=null&&(e.height=o)),s){var l=Hy(s,e.width,e.height),u=i;i=new G,i.add(u),u.scale=l.scale,u.position=l.position}return i.setClipPath(new ft({shape:e.plain()})),{root:i,boundingRect:e}}var K1={geoJSON:nP,svg:sP},as={load:function(t,e,r){var a=[],i=j(),n=j(),o,s=J1(t);return T(s,function(l){var u=K1[l.type].load(t,l,r);T(u.regions,function(f){var c=f.name;e&&e.hasOwnProperty(c)&&(f=f.cloneShallow(c=e[c])),a.push(f),i.set(c,f),n.set(c,f.center)});var h=u.boundingRect;h&&(o?o.union(h):o=h.clone())}),{regions:a,regionsMap:i,nameCoordMap:n,boundingRect:o||new it(0,0,0,0)}},makeGraphic:Q1("makeGraphic"),removeGraphic:Q1("removeGraphic")};function Q1(t){return function(e,r){var a=J1(e),i=[];return T(a,function(n){var o=K1[n.type][t];o&&i.push(o(e,n,r))}),i}}function lP(t){z&&console.error("Map "+t+" not exists. The GeoJSON of the map must be provided.")}function J1(t){var e=tu.retrieveMap(t)||[];return z&&(e.length||lP(t)),e}var uP=Dt.extend({type:"series.map",dependencies:["geo"],layoutMode:"box",needsDrawMap:!1,seriesGroup:[],getInitialData:function(t){for(var e=wn(this,{coordDimensions:["value"],encodeDefaulter:K(Gc,this)}),r=e.mapDimension("value"),a=j(),i=[],n=[],o=0,s=e.count();o<s;o++){var l=e.getName(o);a.set(l,!0),i.push({name:l,value:e.get(r,o),selected:_y(e,o,"selected")})}var u=as.load(this.getMapType(),this.option.nameMap,this.option.nameProperty);return T(u.regions,function(h){var f=h.name;a.get(f)||(i.push({name:f}),n.push(f))}),this.updateSelectedMap(i),e.appendValues([],n),e},getHostGeoModel:function(){var t=this.option.geoIndex;return t!=null?this.dependentModels.geo[t]:null},getMapType:function(){return(this.getHostGeoModel()||this).option.map},getRawValue:function(t){var e=this.getData();return e.get(e.mapDimension("value"),t)},getRegionModel:function(t){var e=this.getData();return e.getItemModel(e.indexOfName(t))},formatTooltip:function(t){for(var e=this.getData(),r=da(this.getRawValue(t)),a=e.getName(t),i=this.seriesGroup,n=[],o=0;o<i.length;o++){var s=i[o].originalData.indexOfName(a),l=e.mapDimension("value");isNaN(i[o].originalData.get(l,s))||n.push(Tt(i[o].name))}return n.join(", ")+"<br />"+Tt(a+" : "+r)},getTooltipPosition:function(t){if(t!=null){var e=this.getData().getName(t),r=this.coordinateSystem,a=r.getRegion(e);return a&&r.dataToPoint(a.center)}},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},defaultOption:{zlevel:0,z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:.75,showLegendSymbol:!0,dataRangeHoverLink:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},nameProperty:"name"}});pt(uP,Kv);var j1="\0_ec_interaction_mutex";function hP(t,e,r){var a=ed(t);a[e]=r}function fP(t,e,r){var a=ed(t),i=a[e];i===r&&(a[e]=null)}function tx(t,e){return!!ed(t)[e]}function ed(t){return t[j1]||(t[j1]={})}lt({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},function(){});function An(t){this.pointerChecker,this._zr=t,this._opt={};var e=X,r=e(cP,this),a=e(vP,this),i=e(dP,this),n=e(gP,this),o=e(pP,this);Zt.call(this),this.setPointerChecker=function(s){this.pointerChecker=s},this.enable=function(s,l){this.disable(),this._opt=U(Y(l)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),s==null&&(s=!0),(s===!0||s==="move"||s==="pan")&&(t.on("mousedown",r),t.on("mousemove",a),t.on("mouseup",i)),(s===!0||s==="scale"||s==="zoom")&&(t.on("mousewheel",n),t.on("pinch",o))},this.disable=function(){t.off("mousedown",r),t.off("mousemove",a),t.off("mouseup",i),t.off("mousewheel",n),t.off("pinch",o)},this.dispose=this.disable,this.isDragging=function(){return this._dragging},this.isPinching=function(){return this._pinching}}pt(An,Zt);function cP(t){if(!(Yp(t)||t.target&&t.target.draggable)){var e=t.offsetX,r=t.offsetY;this.pointerChecker&&this.pointerChecker(t,e,r)&&(this._x=e,this._y=r,this._dragging=!0)}}function vP(t){if(!(!this._dragging||!Iu("moveOnMouseMove",t,this._opt)||t.gestureEvent==="pinch"||tx(this._zr,"globalPan"))){var e=t.offsetX,r=t.offsetY,a=this._x,i=this._y,n=e-a,o=r-i;this._x=e,this._y=r,this._opt.preventDefaultMouseMove&&Va(t.event),ex(this,"pan","moveOnMouseMove",t,{dx:n,dy:o,oldX:a,oldY:i,newX:e,newY:r})}}function dP(t){Yp(t)||(this._dragging=!1)}function gP(t){var e=Iu("zoomOnMouseWheel",t,this._opt),r=Iu("moveOnMouseWheel",t,this._opt),a=t.wheelDelta,i=Math.abs(a),n=t.offsetX,o=t.offsetY;if(!(a===0||!e&&!r)){if(e){var s=i>3?1.4:i>1?1.2:1.1,l=a>0?s:1/s;rd(this,"zoom","zoomOnMouseWheel",t,{scale:l,originX:n,originY:o})}if(r){var u=Math.abs(a),h=(a>0?1:-1)*(u>3?.4:u>1?.15:.05);rd(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:h,originX:n,originY:o})}}}function pP(t){if(!tx(this._zr,"globalPan")){var e=t.pinchScale>1?1.1:1/1.1;rd(this,"zoom",null,t,{scale:e,originX:t.pinchX,originY:t.pinchY})}}function rd(t,e,r,a,i){t.pointerChecker&&t.pointerChecker(a,i.originX,i.originY)&&(Va(a.event),ex(t,e,r,a,i))}function ex(t,e,r,a,i){i.isAvailableBehavior=X(Iu,null,r,a),t.trigger(e,i)}function Iu(t,e,r){var a=r[t];return!t||a&&(!_t(a)||e.event[a+"Key"])}function ad(t,e,r){var a=t.target,i=a.position;i[0]+=e,i[1]+=r,a.dirty()}function id(t,e,r,a){var i=t.target,n=t.zoomLimit,o=i.position,s=i.scale,l=t.zoom=t.zoom||1;if(l*=e,n){var u=n.min||0,h=n.max||1/0;l=Math.max(Math.min(h,l),u)}var f=l/t.zoom;t.zoom=l,o[0]-=(r-o[0])*(f-1),o[1]-=(a-o[1])*(f-1),s[0]*=f,s[1]*=f,i.dirty()}var mP={axisPointer:1,tooltip:1,brush:1};function Mu(t,e,r){var a=e.getComponentByElement(t.topTarget),i=a&&a.coordinateSystem;return a&&a!==r&&!mP[a.mainType]&&i&&i.model!==r}function rx(t){var e=t.getItemStyle(),r=t.get("areaColor");return r!=null&&(e.fill=r),e}function yP(t,e,r,a,i){r.off("click"),r.off("mousedown"),e.get("selectedMode")&&(r.on("mousedown",function(){t._mouseDownFlag=!0}),r.on("click",function(n){if(!!t._mouseDownFlag){t._mouseDownFlag=!1;for(var o=n.target;!o.__regions;)o=o.parent;if(!!o){var s={type:(e.mainType==="geo"?"geo":"map")+"ToggleSelect",batch:E(o.__regions,function(l){return{name:l.name,from:i.uid}})};s[e.mainType+"Id"]=e.id,a.dispatchAction(s),ax(e,r)}}}))}function ax(t,e){e.eachChild(function(r){T(r.__regions,function(a){r.trigger(t.isSelected(a.name)?"emphasis":"normal")})})}function Lu(t,e){var r=new G;this.uid=bo("ec_map_draw"),this._controller=new An(t.getZr()),this._controllerHost={target:e?r:null},this.group=r,this._updateGroup=e,this._mouseDownFlag,this._mapName,this._initialized,r.add(this._regionsGroup=new G),r.add(this._backgroundGroup=new G)}Lu.prototype={constructor:Lu,draw:function(t,e,r,a,i){var n=t.mainType==="geo",o=t.getData&&t.getData();n&&e.eachComponent({mainType:"series",subType:"map"},function(S){!o&&S.getHostGeoModel()===t&&(o=S.getData())});var s=t.coordinateSystem;this._updateBackground(s);var l=this._regionsGroup,u=this.group,h=s.getTransformInfo(),f=!l.childAt(0)||i,c;if(f)u.transform=h.roamTransform,u.decomposeTransform(),u.dirty();else{var v=new je;v.transform=h.roamTransform,v.decomposeTransform();var d={scale:v.scale,position:v.position};c=v.scale,tt(u,d,t)}var g=h.rawScale,p=h.rawPosition;l.removeAll();var m=["itemStyle"],y=["emphasis","itemStyle"],_=["label"],x=["emphasis","label"],w=j();T(s.regions,function(S){var b=w.get(S.name)||w.set(S.name,new G),A=new x0({segmentIgnoreThreshold:1,shape:{paths:[]}});b.add(A);var C=t.getRegionModel(S.name)||t,D=C.getModel(m),I=C.getModel(y),L=rx(D),M=rx(I),B=C.getModel(_),k=C.getModel(x),O;if(o){O=o.indexOfName(S.name);var V=o.getItemVisual(O,"color",!0);V&&(L.fill=V)}var H=function(qe){return[qe[0]*g[0]+p[0],qe[1]*g[1]+p[1]]};T(S.geometries,function(qe){if(qe.type==="polygon"){for(var Gs=[],Ei=0;Ei<qe.exterior.length;++Ei)Gs.push(H(qe.exterior[Ei]));A.shape.paths.push(new Se({segmentIgnoreThreshold:1,shape:{points:Gs}}));for(var Ei=0;Ei<(qe.interiors?qe.interiors.length:0);++Ei){for(var lT=qe.interiors[Ei],Gs=[],Mp=0;Mp<lT.length;++Mp)Gs.push(H(lT[Mp]));A.shape.paths.push(new Se({segmentIgnoreThreshold:1,shape:{points:Gs}}))}}}),A.setStyle(L),A.style.strokeNoScale=!0,A.culling=!0;var W=B.get("show"),F=k.get("show"),N=o&&isNaN(o.get(o.mapDimension("value"),O)),$=o&&o.getItemLayout(O);if(n||N&&(W||F)||$&&$.showLabel){var et=n?S.name:O,vt;(!o||O>=0)&&(vt=t);var wt=new nt({position:H(S.center.slice()),scale:[1/u.scale[0],1/u.scale[1]],z2:10,silent:!0});if(Te(wt.style,wt.hoverStyle={},B,k,{labelFetcher:vt,labelDataIndex:et,defaultText:S.name,useInsideStyle:!1},{textAlign:"center",textVerticalAlign:"middle"}),!f){var Ut=[1/c[0],1/c[1]];tt(wt,{scale:Ut},t)}b.add(wt)}if(o)o.setItemGraphicEl(O,b);else{var C=t.getRegionModel(S.name);A.eventData={componentType:"geo",componentIndex:t.componentIndex,geoIndex:t.componentIndex,name:S.name,region:C&&C.option||{}}}var Vs=b.__regions||(b.__regions=[]);Vs.push(S),b.highDownSilentOnTouch=!!t.get("selectedMode"),St(b,M),l.add(b)}),this._updateController(t,e,r),yP(this,t,l,r,a),ax(t,l)},remove:function(){this._regionsGroup.removeAll(),this._backgroundGroup.removeAll(),this._controller.dispose(),this._mapName&&as.removeGraphic(this._mapName,this.uid),this._mapName=null,this._controllerHost={}},_updateBackground:function(t){var e=t.map;this._mapName!==e&&T(as.makeGraphic(e,this.uid),function(r){this._backgroundGroup.add(r)},this),this._mapName=e},_updateController:function(t,e,r){var a=t.coordinateSystem,i=this._controller,n=this._controllerHost;n.zoomLimit=t.get("scaleLimit"),n.zoom=a.getZoom(),i.enable(t.get("roam")||!1);var o=t.mainType;function s(){var l={type:"geoRoam",componentType:o};return l[o+"Id"]=t.id,l}i.off("pan").on("pan",function(l){this._mouseDownFlag=!1,ad(n,l.dx,l.dy),r.dispatchAction(Z(s(),{dx:l.dx,dy:l.dy}))},this),i.off("zoom").on("zoom",function(l){if(this._mouseDownFlag=!1,id(n,l.scale,l.originX,l.originY),r.dispatchAction(Z(s(),{zoom:l.scale,originX:l.originX,originY:l.originY})),this._updateGroup){var u=this.group.scale;this._regionsGroup.traverse(function(h){h.type==="text"&&h.attr("scale",[1/u[0],1/u[1]])})}},this),i.setPointerChecker(function(l,u,h){return a.getViewRectAfterRoam().contain(u,h)&&!Mu(l,r,t)})}};var nd="__seriesMapHighDown",ix="__seriesMapCallKey";_e({type:"map",render:function(t,e,r,a){if(!(a&&a.type==="mapToggleSelect"&&a.from===this.uid)){var i=this.group;if(i.removeAll(),!t.getHostGeoModel()){if(a&&a.type==="geoRoam"&&a.componentType==="series"&&a.seriesId===t.id){var n=this._mapDraw;n&&i.add(n.group)}else if(t.needsDrawMap){var n=this._mapDraw||new Lu(r,!0);i.add(n.group),n.draw(t,e,r,this,a),this._mapDraw=n}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;t.get("showLegendSymbol")&&e.getComponent("legend")&&this._renderSymbols(t,e,r)}}},remove:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},dispose:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},_renderSymbols:function(t,e,r){var a=t.originalData,i=this.group;a.each(a.mapDimension("value"),function(n,o){if(!isNaN(n)){var s=a.getItemLayout(o);if(!(!s||!s.point)){var l=s.point,u=s.offset,h=new mr({style:{fill:t.getData().getVisual("color")},shape:{cx:l[0]+u*9,cy:l[1],r:3},silent:!0,z2:8+(u?0:go+1)});if(!u){var f=t.mainSeries.getData(),c=a.getName(o),v=f.indexOfName(c),d=a.getItemModel(o),g=d.getModel("label"),p=d.getModel("emphasis.label"),m=f.getItemGraphicEl(v),y=Nt(t.getFormattedLabel(v,"normal"),c),_=Nt(t.getFormattedLabel(v,"emphasis"),y),x=m[nd],w=Math.random();if(!x){x=m[nd]={};var S=K(nx,!0),b=K(nx,!1);m.on("mouseover",S).on("mouseout",b).on("emphasis",S).on("normal",b)}m[ix]=w,Z(x,{recordVersion:w,circle:h,labelModel:g,hoverLabelModel:p,emphasisText:_,normalText:y}),ox(x,!1)}i.add(h)}}})}});function nx(t){var e=this[nd];e&&e.recordVersion===this[ix]&&ox(e,t)}function ox(t,e){var r=t.circle,a=t.labelModel,i=t.hoverLabelModel,n=t.emphasisText,o=t.normalText;e?(r.style.extendFrom(Rt({},i,{text:i.get("show")?n:null},{isRectText:!0,useInsideStyle:!1},!0)),r.__mapOriginalZ2=r.z2,r.z2+=go):(Rt(r.style,a,{text:a.get("show")?o:null,textPosition:a.getShallow("position")||"bottom"},{isRectText:!0,useInsideStyle:!1}),r.dirty(!1),r.__mapOriginalZ2!=null&&(r.z2=r.__mapOriginalZ2,r.__mapOriginalZ2=null))}function od(t,e,r){var a=t.getZoom(),i=t.getCenter(),n=e.zoom,o=t.dataToPoint(i);if(e.dx!=null&&e.dy!=null){o[0]-=e.dx,o[1]-=e.dy;var i=t.pointToData(o);t.setCenter(i)}if(n!=null){if(r){var s=r.min||0,l=r.max||1/0;n=Math.max(Math.min(a*n,l),s)/a}t.scale[0]*=n,t.scale[1]*=n;var u=t.position,h=(e.originX-u[0])*(n-1),f=(e.originY-u[1])*(n-1);u[0]-=h,u[1]-=f,t.updateTransform();var i=t.pointToData(o);t.setCenter(i),t.setZoom(n*a)}return{center:t.getCenter(),zoom:t.getZoom()}}lt({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(t,e){var r=t.componentType||"series";e.eachComponent({mainType:r,query:t},function(a){var i=a.coordinateSystem;if(i.type==="geo"){var n=od(i,t,a.get("scaleLimit"));a.setCenter&&a.setCenter(n.center),a.setZoom&&a.setZoom(n.zoom),r==="series"&&T(a.seriesGroup,function(o){o.setCenter(n.center),o.setZoom(n.zoom)})}})});var sx=xt;function sd(){je.call(this)}pt(sd,je);function Ca(t){this.name=t,this.zoomLimit,je.call(this),this._roamTransformable=new sd,this._rawTransformable=new sd,this._center,this._zoom}Ca.prototype={constructor:Ca,type:"view",dimensions:["x","y"],setBoundingRect:function(t,e,r,a){return this._rect=new it(t,e,r,a),this._rect},getBoundingRect:function(){return this._rect},setViewRect:function(t,e,r,a){this.transformTo(t,e,r,a),this._viewRect=new it(t,e,r,a)},transformTo:function(t,e,r,a){var i=this.getBoundingRect(),n=this._rawTransformable;n.transform=i.calculateTransform(new it(t,e,r,a)),n.decomposeTransform(),this._updateTransform()},setCenter:function(t){!t||(this._center=t,this._updateCenterAndZoom())},setZoom:function(t){t=t||1;var e=this.zoomLimit;e&&(e.max!=null&&(t=Math.min(e.max,t)),e.min!=null&&(t=Math.max(e.min,t))),this._zoom=t,this._updateCenterAndZoom()},getDefaultCenter:function(){var t=this.getBoundingRect(),e=t.x+t.width/2,r=t.y+t.height/2;return[e,r]},getCenter:function(){return this._center||this.getDefaultCenter()},getZoom:function(){return this._zoom||1},getRoamTransform:function(){return this._roamTransformable.getLocalTransform()},_updateCenterAndZoom:function(){var t=this._rawTransformable.getLocalTransform(),e=this._roamTransformable,r=this.getDefaultCenter(),a=this.getCenter(),i=this.getZoom();a=xt([],a,t),r=xt([],r,t),e.origin=a,e.position=[r[0]-a[0],r[1]-a[1]],e.scale=[i,i],this._updateTransform()},_updateTransform:function(){var t=this._roamTransformable,e=this._rawTransformable;e.parent=t,t.updateTransform(),e.updateTransform(),Jn(this.transform||(this.transform=[]),e.transform||ce()),this._rawTransform=e.getLocalTransform(),this.invTransform=this.invTransform||[],$s(this.invTransform,this.transform),this.decomposeTransform()},getTransformInfo:function(){var t=this._roamTransformable.transform,e=this._rawTransformable;return{roamTransform:t?Oi(t):ce(),rawScale:Oi(e.scale),rawPosition:Oi(e.position)}},getViewRect:function(){return this._viewRect},getViewRectAfterRoam:function(){var t=this.getBoundingRect().clone();return t.applyTransform(this.transform),t},dataToPoint:function(t,e,r){var a=e?this._rawTransform:this.transform;return r=r||[],a?sx(r,t,a):Jt(r,t)},pointToData:function(t){var e=this.invTransform;return e?sx([],t,e):[t[0],t[1]]},convertToPixel:K(lx,"dataToPoint"),convertFromPixel:K(lx,"pointToData"),containPoint:function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])}},pt(Ca,je);function lx(t,e,r,a){var i=r.seriesModel,n=i?i.coordinateSystem:null;return n===this?n[t](a):null}function Tn(t,e,r,a){Ca.call(this,t),this.map=e;var i=as.load(e,r);this._nameCoordMap=i.nameCoordMap,this._regionsMap=i.regionsMap,this._invertLongitute=a??!0,this.regions=i.regions,this._rect=i.boundingRect}Tn.prototype={constructor:Tn,type:"geo",dimensions:["lng","lat"],containCoord:function(t){for(var e=this.regions,r=0;r<e.length;r++)if(e[r].contain(t))return!0;return!1},transformTo:function(t,e,r,a){var i=this.getBoundingRect(),n=this._invertLongitute;i=i.clone(),n&&(i.y=-i.y-i.height);var o=this._rawTransformable;if(o.transform=i.calculateTransform(new it(t,e,r,a)),o.decomposeTransform(),n){var s=o.scale;s[1]=-s[1]}o.updateTransform(),this._updateTransform()},getRegion:function(t){return this._regionsMap.get(t)},getRegionByCoord:function(t){for(var e=this.regions,r=0;r<e.length;r++)if(e[r].contain(t))return e[r]},addGeoCoord:function(t,e){this._nameCoordMap.set(t,e)},getGeoCoord:function(t){return this._nameCoordMap.get(t)},getBoundingRect:function(){return this._rect},dataToPoint:function(t,e,r){if(typeof t=="string"&&(t=this.getGeoCoord(t)),t)return Ca.prototype.dataToPoint.call(this,t,e,r)},convertToPixel:K(ux,"dataToPoint"),convertFromPixel:K(ux,"pointToData")},pt(Tn,Ca);function ux(t,e,r,a){var i=r.geoModel,n=r.seriesModel,o=i?i.coordinateSystem:n?n.coordinateSystem||(n.getReferringComponents("geo")[0]||{}).coordinateSystem:null;return o===this?o[t](a):null}function hx(t,e){var r=t.get("boundingCoords");if(r!=null){var a=r[0],i=r[1];isNaN(a[0])||isNaN(a[1])||isNaN(i[0])||isNaN(i[1])?z&&console.error("Invalid boundingCoords"):this.setBoundingRect(a[0],a[1],i[0]-a[0],i[1]-a[1])}var n=this.getBoundingRect(),o,s=t.get("layoutCenter"),l=t.get("layoutSize"),u=e.getWidth(),h=e.getHeight(),f=n.width/n.height*this.aspectScale,c=!1;s&&l&&(s=[R(s[0],u),R(s[1],h)],l=R(l,Math.min(u,h)),!isNaN(s[0])&&!isNaN(s[1])&&!isNaN(l)?c=!0:z&&console.warn("Given layoutCenter or layoutSize data are invalid. Use left/top/width/height instead."));var v;if(c){var v={};f>1?(v.width=l,v.height=l/f):(v.height=l,v.width=l*f),v.y=s[1]-v.height/2,v.x=s[0]-v.width/2}else o=t.getBoxLayoutParams(),o.aspect=f,v=Ot(o,{width:u,height:h});this.setViewRect(v.x,v.y,v.width,v.height),this.setCenter(t.get("center")),this.setZoom(t.get("zoom"))}function fx(t,e){T(e.get("geoCoord"),function(r,a){t.addGeoCoord(a,r)})}var cx={dimensions:Tn.prototype.dimensions,create:function(t,e){var r=[];t.eachComponent("geo",function(i,n){var o=i.get("map"),s=i.get("aspectScale"),l=!0,u=tu.retrieveMap(o);u&&u[0]&&u[0].type==="svg"?(s==null&&(s=1),l=!1):s==null&&(s=.75);var h=new Tn(o+n,o,i.get("nameMap"),l);h.aspectScale=s,h.zoomLimit=i.get("scaleLimit"),r.push(h),fx(h,i),i.coordinateSystem=h,h.model=i,h.resize=hx,h.resize(i,e)}),t.eachSeries(function(i){var n=i.get("coordinateSystem");if(n==="geo"){var o=i.get("geoIndex")||0;i.coordinateSystem=r[o]}});var a={};return t.eachSeriesByType("map",function(i){if(!i.getHostGeoModel()){var n=i.getMapType();a[n]=a[n]||[],a[n].push(i)}}),T(a,function(i,n){var o=E(i,function(l){return l.get("nameMap")}),s=new Tn(n,n,Yn(o));s.zoomLimit=Et.apply(null,E(i,function(l){return l.get("scaleLimit")})),r.push(s),s.resize=hx,s.aspectScale=i[0].get("aspectScale"),s.resize(i[0],e),T(i,function(l){l.coordinateSystem=s,fx(s,l)})}),r},getFilledRegions:function(t,e,r){for(var a=(t||[]).slice(),i=j(),n=0;n<a.length;n++)i.set(a[n].name,a[n]);var o=as.load(e,r);return T(o.regions,function(s){var l=s.name;!i.get(l)&&a.push({name:l})}),a}};gv("geo",cx);var _P=function(t){var e={};t.eachSeriesByType("map",function(r){var a=r.getMapType();if(!(r.getHostGeoModel()||e[a])){var i={};T(r.seriesGroup,function(o){var s=o.coordinateSystem,l=o.originalData;o.get("showLegendSymbol")&&t.getComponent("legend")&&l.each(l.mapDimension("value"),function(u,h){var f=l.getName(h),c=s.getRegion(f);if(!(!c||isNaN(u))){var v=i[f]||0,d=s.dataToPoint(c.center);i[f]=v+1,l.setItemLayout(h,{point:d,offset:v})}})});var n=r.getData();n.each(function(o){var s=n.getName(o),l=n.getItemLayout(o)||{};l.showLabel=!i[s],n.setItemLayout(o,l)}),e[a]=!0}})},xP=function(t){t.eachSeriesByType("map",function(e){var r=e.get("color"),a=e.getModel("itemStyle"),i=a.get("areaColor"),n=a.get("color")||r[e.seriesIndex%r.length];e.getData().setVisual({areaColor:i,color:n})})};function wP(t,e){var r={};return T(t,function(a){a.each(a.mapDimension("value"),function(i,n){var o="ec-"+a.getName(n);r[o]=r[o]||[],isNaN(i)||r[o].push(i)})}),t[0].map(t[0].mapDimension("value"),function(a,i){for(var n="ec-"+t[0].getName(i),o=0,s=1/0,l=-1/0,u=r[n].length,h=0;h<u;h++)s=Math.min(s,r[n][h]),l=Math.max(l,r[n][h]),o+=r[n][h];var f;return e==="min"?f=s:e==="max"?f=l:e==="average"?f=o/u:f=o,u===0?NaN:f})}var bP=function(t){var e={};t.eachSeriesByType("map",function(r){var a=r.getHostGeoModel(),i=a?"o"+a.id:"i"+r.getMapType();(e[i]=e[i]||[]).push(r)}),T(e,function(r,a){for(var i=wP(E(r,function(o){return o.getData()}),r[0].get("mapValueCalculation")),n=0;n<r.length;n++)r[n].originalData=r[n].getData();for(var n=0;n<r.length;n++)r[n].seriesGroup=r,r[n].needsDrawMap=n===0&&!r[n].getHostGeoModel(),r[n].setData(i.cloneShallow()),r[n].mainSeries=r[0]})},SP=function(t){var e=[];T(t.series,function(r){r&&r.type==="map"&&(e.push(r),r.map=r.map||r.mapType,U(r,r.mapLocation))})};It(_P),bt(xP),Ie(br.PROCESSOR.STATISTIC,bP),ie(SP),G1("map",[{type:"mapToggleSelect",event:"mapselectchanged",method:"toggleSelected"},{type:"mapSelect",event:"mapselected",method:"select"},{type:"mapUnSelect",event:"mapunselected",method:"unSelect"}]);var is=T,ns="\0__link_datas",Pu="\0__link_mainData";function vx(t){var e=t.mainData,r=t.datas;r||(r={main:e},t.datasAttr={main:"data"}),t.datas=t.mainData=null,dx(e,r,t),is(r,function(a){is(e.TRANSFERABLE_METHODS,function(i){a.wrapMethod(i,K(AP,t))})}),e.wrapMethod("cloneShallow",K(CP,t)),is(e.CHANGABLE_METHODS,function(a){e.wrapMethod(a,K(TP,t))}),ot(r[e.dataType]===e)}function AP(t,e){if(IP(this)){var r=Z({},this[ns]);r[this.dataType]=e,dx(e,r,t)}else ld(e,this.dataType,this[Pu],t);return e}function TP(t,e){return t.struct&&t.struct.update(this),e}function CP(t,e){return is(e[ns],function(r,a){r!==e&&ld(r.cloneShallow(),a,e,t)}),e}function DP(t){var e=this[Pu];return t==null||e==null?e:e[ns][t]}function IP(t){return t[Pu]===t}function dx(t,e,r){t[ns]={},is(e,function(a,i){ld(a,i,t,r)})}function ld(t,e,r,a){r[ns][e]=t,t[Pu]=r,t.dataType=e,a.struct&&(t[a.structAttr]=a.struct,a.struct[a.datasAttr[e]]=t),t.getLinkedData=DP}var ud=function(t,e){this.name=t||"",this.depth=0,this.height=0,this.parentNode=null,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.hostTree=e};ud.prototype={constructor:ud,isRemoved:function(){return this.dataIndex<0},eachNode:function(t,e,r){typeof t=="function"&&(r=e,e=t,t=null),t=t||{},_t(t)&&(t={order:t});var a=t.order||"preorder",i=this[t.attr||"children"],n;a==="preorder"&&(n=e.call(r,this));for(var o=0;!n&&o<i.length;o++)i[o].eachNode(t,e,r);a==="postorder"&&e.call(r,this)},updateDepthAndHeight:function(t){var e=0;this.depth=t;for(var r=0;r<this.children.length;r++){var a=this.children[r];a.updateDepthAndHeight(t+1),a.height>e&&(e=a.height)}this.height=e+1},getNodeById:function(t){if(this.getId()===t)return this;for(var e=0,r=this.children,a=r.length;e<a;e++){var i=r[e].getNodeById(t);if(i)return i}},contains:function(t){if(t===this)return!0;for(var e=0,r=this.children,a=r.length;e<a;e++){var i=r[e].contains(t);if(i)return i}},getAncestors:function(t){for(var e=[],r=t?this:this.parentNode;r;)e.push(r),r=r.parentNode;return e.reverse(),e},getValue:function(t){var e=this.hostTree.data;return e.get(e.getDimension(t||"value"),this.dataIndex)},setLayout:function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},getLayout:function(){return this.hostTree.data.getItemLayout(this.dataIndex)},getModel:function(t){if(!(this.dataIndex<0)){var e=this.hostTree,r=e.data.getItemModel(this.dataIndex),a=this.getLevelModel();return a?r.getModel(t,a.getModel(t)):r.getModel(t)}},getLevelModel:function(){return(this.hostTree.levelModels||[])[this.depth]},setVisual:function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},getVisual:function(t,e){return this.hostTree.data.getItemVisual(this.dataIndex,t,e)},getRawIndex:function(){return this.hostTree.data.getRawIndex(this.dataIndex)},getId:function(){return this.hostTree.data.getId(this.dataIndex)},isAncestorOf:function(t){for(var e=t.parentNode;e;){if(e===this)return!0;e=e.parentNode}return!1},isDescendantOf:function(t){return t!==this&&t.isAncestorOf(this)}};function fi(t,e){this.root,this.data,this._nodes=[],this.hostModel=t,this.levelModels=E(e||[],function(r){return new ht(r,t,t.ecModel)})}fi.prototype={constructor:fi,type:"tree",eachNode:function(t,e,r){this.root.eachNode(t,e,r)},getNodeByDataIndex:function(t){var e=this.data.getRawIndex(t);return this._nodes[e]},getNodeByName:function(t){return this.root.getNodeByName(t)},update:function(){for(var t=this.data,e=this._nodes,r=0,a=e.length;r<a;r++)e[r].dataIndex=-1;for(var r=0,a=t.count();r<a;r++)e[t.getRawIndex(r)].dataIndex=r},clearLayouts:function(){this.data.clearItemLayouts()}},fi.createTree=function(t,e,r,a){var i=new fi(e,r&&r.levels),n=[],o=1;s(t);function s(h,f){var c=h.value;o=Math.max(o,P(c)?c.length:1),n.push(h);var v=new ud(h.name,i);f?MP(v,f):i.root=v,i._nodes.push(v);var d=h.children;if(d)for(var g=0;g<d.length;g++)s(d[g],v)}i.root.updateDepthAndHeight(0);var l=un(n,{coordDimensions:["value"],dimensionsCount:o}),u=new qt(l,e);return u.initData(n),a&&a(u),vx({mainData:u,struct:i,structAttr:"tree"}),i.update(),i};function MP(t,e){var r=e.children;t.parentNode!==e&&(r.push(t),t.parentNode=e)}Dt.extend({type:"series.tree",layoutInfo:null,layoutMode:"box",getInitialData:function(t){var e={name:t.name,children:t.data},r=t.leaves||{},a=new ht(r,this,this.ecModel),i=fi.createTree(e,this,{},n);function n(u){u.wrapMethod("getItemModel",function(h,f){var c=i.getNodeByDataIndex(f);return(!c.children.length||!c.isExpand)&&(h.parentModel=a),h})}var o=0;i.eachNode("preorder",function(u){u.depth>o&&(o=u.depth)});var s=t.expandAndCollapse,l=s&&t.initialTreeDepth>=0?t.initialTreeDepth:o;return i.root.eachNode("preorder",function(u){var h=u.hostTree.data.getRawDataItem(u.dataIndex);u.isExpand=h&&h.collapsed!=null?!h.collapsed:u.depth<=l}),i.data},getOrient:function(){var t=this.get("orient");return t==="horizontal"?t="LR":t==="vertical"&&(t="TB"),t},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},formatTooltip:function(t){for(var e=this.getData().tree,r=e.root.children[0],a=e.getNodeByDataIndex(t),i=a.getValue(),n=a.name;a&&a!==r;)n=a.parentNode.name+"."+n,a=a.parentNode;return Tt(n+(isNaN(i)||i==null?"":" : "+i))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderColor:"#c23531",borderWidth:1.5},label:{show:!0,color:"#555"},leaves:{label:{show:!0}},animationEasing:"linear",animationDuration:700,animationDurationUpdate:1e3}});function LP(t){t.hierNode={defaultAncestor:null,ancestor:t,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var e=[t],r,a;r=e.pop();)if(a=r.children,r.isExpand&&a.length)for(var i=a.length,n=i-1;n>=0;n--){var o=a[n];o.hierNode={defaultAncestor:null,ancestor:o,prelim:0,modifier:0,change:0,shift:0,i:n,thread:null},e.push(o)}}function PP(t,e){var r=t.isExpand?t.children:[],a=t.parentNode.children,i=t.hierNode.i?a[t.hierNode.i-1]:null;if(r.length){kP(t);var n=(r[0].hierNode.prelim+r[r.length-1].hierNode.prelim)/2;i?(t.hierNode.prelim=i.hierNode.prelim+e(t,i),t.hierNode.modifier=t.hierNode.prelim-n):t.hierNode.prelim=n}else i&&(t.hierNode.prelim=i.hierNode.prelim+e(t,i));t.parentNode.hierNode.defaultAncestor=NP(t,i,t.parentNode.hierNode.defaultAncestor||a[0],e)}function EP(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function gx(t){return arguments.length?t:BP}function os(t,e){var r={};return t-=Math.PI/2,r.x=e*Math.cos(t),r.y=e*Math.sin(t),r}function RP(t,e){return Ot(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function kP(t){for(var e=t.children,r=e.length,a=0,i=0;--r>=0;){var n=e[r];n.hierNode.prelim+=a,n.hierNode.modifier+=a,i+=n.hierNode.change,a+=n.hierNode.shift+i}}function NP(t,e,r,a){if(e){for(var i=t,n=t,o=n.parentNode.children[0],s=e,l=i.hierNode.modifier,u=n.hierNode.modifier,h=o.hierNode.modifier,f=s.hierNode.modifier;s=hd(s),n=fd(n),s&&n;){i=hd(i),o=fd(o),i.hierNode.ancestor=t;var c=s.hierNode.prelim+f-n.hierNode.prelim-u+a(s,n);c>0&&(zP(OP(s,t,r),t,c),u+=c,l+=c),f+=s.hierNode.modifier,u+=n.hierNode.modifier,l+=i.hierNode.modifier,h+=o.hierNode.modifier}s&&!hd(i)&&(i.hierNode.thread=s,i.hierNode.modifier+=f-l),n&&!fd(o)&&(o.hierNode.thread=n,o.hierNode.modifier+=u-h,r=t)}return r}function hd(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function fd(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function OP(t,e,r){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:r}function zP(t,e,r){var a=r/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=a,e.hierNode.shift+=r,e.hierNode.modifier+=r,e.hierNode.prelim+=r,t.hierNode.change+=a}function BP(t,e){return t.parentNode===e.parentNode?1:2}var VP=Ge({shape:{parentPoint:[],childPoints:[],orient:"",forkPosition:""},style:{stroke:"#000",fill:null},buildPath:function(t,e){var r=e.childPoints,a=r.length,i=e.parentPoint,n=r[0],o=r[a-1];if(a===1){t.moveTo(i[0],i[1]),t.lineTo(n[0],n[1]);return}var s=e.orient,l=s==="TB"||s==="BT"?0:1,u=1-l,h=R(e.forkPosition,1),f=[];f[l]=i[l],f[u]=i[u]+(o[u]-i[u])*h,t.moveTo(i[0],i[1]),t.lineTo(f[0],f[1]),t.moveTo(n[0],n[1]),f[l]=n[l],t.lineTo(f[0],f[1]),f[l]=o[l],t.lineTo(f[0],f[1]),t.lineTo(o[0],o[1]);for(var c=1;c<a-1;c++){var v=r[c];t.moveTo(v[0],v[1]),f[l]=v[l],t.lineTo(f[0],f[1])}}});_e({type:"tree",init:function(t,e){this._oldTree,this._mainGroup=new G,this._controller=new An(e.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},render:function(t,e,r,a){var i=t.getData(),n=t.layoutInfo,o=this._mainGroup,s=t.get("layout");s==="radial"?o.attr("position",[n.x+n.width/2,n.y+n.height/2]):o.attr("position",[n.x,n.y]),this._updateViewCoordSys(t,n,s),this._updateController(t,e,r);var l=this._data,u={expandAndCollapse:t.get("expandAndCollapse"),layout:s,edgeShape:t.get("edgeShape"),edgeForkPosition:t.get("edgeForkPosition"),orient:t.getOrient(),curvature:t.get("lineStyle.curveness"),symbolRotate:t.get("symbolRotate"),symbolOffset:t.get("symbolOffset"),hoverAnimation:t.get("hoverAnimation"),useNameLabel:!0,fadeIn:!0};i.diff(l).add(function(h){px(i,h)&&yx(i,h,null,o,t,u)}).update(function(h,f){var c=l.getItemGraphicEl(f);if(!px(i,h)){c&&_x(l,f,c,o,t,u);return}yx(i,h,c,o,t,u)}).remove(function(h){var f=l.getItemGraphicEl(h);f&&_x(l,h,f,o,t,u)}).execute(),this._nodeScaleRatio=t.get("nodeScaleRatio"),this._updateNodeAndLinkScale(t),u.expandAndCollapse===!0&&i.eachItemGraphicEl(function(h,f){h.off("click").on("click",function(){r.dispatchAction({type:"treeExpandAndCollapse",seriesId:t.id,dataIndex:f})})}),this._data=i},_updateViewCoordSys:function(t){var e=t.getData(),r=[];e.each(function(l){var u=e.getItemLayout(l);u&&!isNaN(u.x)&&!isNaN(u.y)&&r.push([+u.x,+u.y])});var a=[],i=[];uo(r,a,i);var n=this._min,o=this._max;i[0]-a[0]===0&&(a[0]=n?n[0]:a[0]-1,i[0]=o?o[0]:i[0]+1),i[1]-a[1]===0&&(a[1]=n?n[1]:a[1]-1,i[1]=o?o[1]:i[1]+1);var s=t.coordinateSystem=new Ca;s.zoomLimit=t.get("scaleLimit"),s.setBoundingRect(a[0],a[1],i[0]-a[0],i[1]-a[1]),s.setCenter(t.get("center")),s.setZoom(t.get("zoom")),this.group.attr({position:s.position,scale:s.scale}),this._viewCoordSys=s,this._min=a,this._max=i},_updateController:function(t,e,r){var a=this._controller,i=this._controllerHost,n=this.group;a.setPointerChecker(function(o,s,l){var u=n.getBoundingRect();return u.applyTransform(n.transform),u.contain(s,l)&&!Mu(o,r,t)}),a.enable(t.get("roam")),i.zoomLimit=t.get("scaleLimit"),i.zoom=t.coordinateSystem.getZoom(),a.off("pan").off("zoom").on("pan",function(o){ad(i,o.dx,o.dy),r.dispatchAction({seriesId:t.id,type:"treeRoam",dx:o.dx,dy:o.dy})},this).on("zoom",function(o){id(i,o.scale,o.originX,o.originY),r.dispatchAction({seriesId:t.id,type:"treeRoam",zoom:o.scale,originX:o.originX,originY:o.originY}),this._updateNodeAndLinkScale(t)},this)},_updateNodeAndLinkScale:function(t){var e=t.getData(),r=this._getNodeGlobalScale(t),a=[r,r];e.eachItemGraphicEl(function(i,n){i.attr("scale",a)})},_getNodeGlobalScale:function(t){var e=t.coordinateSystem;if(e.type!=="view")return 1;var r=this._nodeScaleRatio,a=e.scale,i=a&&a[0]||1,n=e.getZoom(),o=(n-1)*r+1;return o/i},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={}},remove:function(){this._mainGroup.removeAll(),this._data=null}});function px(t,e){var r=t.getItemLayout(e);return r&&!isNaN(r.x)&&!isNaN(r.y)&&t.getItemVisual(e,"symbol")!=="none"}function mx(t,e,r){return r.itemModel=e,r.itemStyle=e.getModel("itemStyle").getItemStyle(),r.hoverItemStyle=e.getModel("emphasis.itemStyle").getItemStyle(),r.lineStyle=e.getModel("lineStyle").getLineStyle(),r.labelModel=e.getModel("label"),r.hoverLabelModel=e.getModel("emphasis.label"),t.isExpand===!1&&t.children.length!==0?r.symbolInnerColor=r.itemStyle.fill:r.symbolInnerColor="#fff",r}function yx(t,e,r,a,i,u){var o=!r,s=t.tree.getNodeByDataIndex(e),l=s.getModel(),u=mx(s,l,u),h=t.tree.root,f=s.parentNode===h?s:s.parentNode||s,c=t.getItemGraphicEl(f.dataIndex),v=f.getLayout(),d=c?{x:c.position[0],y:c.position[1],rawX:c.__radialOldRawX,rawY:c.__radialOldRawY}:v,g=s.getLayout();o?(r=new wa(t,e,u),r.attr("position",[d.x,d.y])):r.updateData(t,e,u),r.__radialOldRawX=r.__radialRawX,r.__radialOldRawY=r.__radialRawY,r.__radialRawX=g.rawX,r.__radialRawY=g.rawY,a.add(r),t.setItemGraphicEl(e,r),tt(r,{position:[g.x,g.y]},i);var p=r.getSymbolPath();if(u.layout==="radial"){var m=h.children[0],y=m.getLayout(),_=m.children.length,x,w;if(g.x===y.x&&s.isExpand===!0){var S={};S.x=(m.children[0].getLayout().x+m.children[_-1].getLayout().x)/2,S.y=(m.children[0].getLayout().y+m.children[_-1].getLayout().y)/2,x=Math.atan2(S.y-y.y,S.x-y.x),x<0&&(x=Math.PI*2+x),w=S.x<y.x,w&&(x=x-Math.PI)}else x=Math.atan2(g.y-y.y,g.x-y.x),x<0&&(x=Math.PI*2+x),s.children.length===0||s.children.length!==0&&s.isExpand===!1?(w=g.x<y.x,w&&(x=x-Math.PI)):(w=g.x>y.x,w||(x=x-Math.PI));var b=w?"left":"right",A=u.labelModel.get("rotate"),C=A*(Math.PI/180);p.setStyle({textPosition:u.labelModel.get("position")||b,textRotation:A==null?-x:C,textOrigin:"center",verticalAlign:"middle"})}GP(i,s,h,r,d,v,g,a,u)}function GP(t,e,r,a,i,n,o,s,l){var u=l.edgeShape,h=a.__edge;if(u==="curve")e.parentNode&&e.parentNode!==r&&(h||(h=a.__edge=new Dl({shape:cd(l,i,i),style:U({opacity:0,strokeNoScale:!0},l.lineStyle)})),tt(h,{shape:cd(l,n,o),style:{opacity:1}},t));else if(u==="polyline"){if(l.layout==="orthogonal"){if(e!==r&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var f=e.children,c=[],v=0;v<f.length;v++){var d=f[v].getLayout();c.push([d.x,d.y])}h||(h=a.__edge=new VP({shape:{parentPoint:[o.x,o.y],childPoints:[[o.x,o.y]],orient:l.orient,forkPosition:l.edgeForkPosition},style:U({opacity:0,strokeNoScale:!0},l.lineStyle)})),tt(h,{shape:{parentPoint:[o.x,o.y],childPoints:c},style:{opacity:1}},t)}}else if(z)throw new Error("The polyline edgeShape can only be used in orthogonal layout")}s.add(h)}function _x(t,e,r,a,i,u){for(var o=t.tree.getNodeByDataIndex(e),s=t.tree.root,l=o.getModel(),u=mx(o,l,u),h=o.parentNode===s?o:o.parentNode||o,g=u.edgeShape,f;f=h.getLayout(),f==null;)h=h.parentNode===s?h:h.parentNode||h;tt(r,{position:[f.x+1,f.y+1]},i,function(){a.remove(r),t.setItemGraphicEl(e,null)}),r.fadeOut(null,{keepLabel:!0});var c=t.getItemGraphicEl(h.dataIndex),v=c.__edge,d=r.__edge||(h.isExpand===!1||h.children.length===1?v:void 0),g=u.edgeShape;d&&(g==="curve"?tt(d,{shape:cd(u,f,f),style:{opacity:0}},i,function(){a.remove(d)}):g==="polyline"&&u.layout==="orthogonal"&&tt(d,{shape:{parentPoint:[f.x,f.y],childPoints:[[f.x,f.y]]},style:{opacity:0}},i,function(){a.remove(d)}))}function cd(t,e,r){var a,i,n,o,s=t.orient,l,u,h,f;if(t.layout==="radial"){l=e.rawX,h=e.rawY,u=r.rawX,f=r.rawY;var c=os(l,h),v=os(l,h+(f-h)*t.curvature),d=os(u,f+(h-f)*t.curvature),g=os(u,f);return{x1:c.x,y1:c.y,x2:g.x,y2:g.y,cpx1:v.x,cpy1:v.y,cpx2:d.x,cpy2:d.y}}else l=e.x,h=e.y,u=r.x,f=r.y,(s==="LR"||s==="RL")&&(a=l+(u-l)*t.curvature,i=h,n=u+(l-u)*t.curvature,o=f),(s==="TB"||s==="BT")&&(a=l,i=h+(f-h)*t.curvature,n=u,o=f+(h-f)*t.curvature);return{x1:l,y1:h,x2:u,y2:f,cpx1:a,cpy1:i,cpx2:n,cpy2:o}}lt({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(t,e){e.eachComponent({mainType:"series",subType:"tree",query:t},function(r){var a=t.dataIndex,i=r.getData().tree,n=i.getNodeByDataIndex(a);n.isExpand=!n.isExpand})}),lt({type:"treeRoam",event:"treeRoam",update:"none"},function(t,e){e.eachComponent({mainType:"series",subType:"tree",query:t},function(r){var a=r.coordinateSystem,i=od(a,t);r.setCenter&&r.setCenter(i.center),r.setZoom&&r.setZoom(i.zoom)})});function HP(t,e,r){for(var a=[t],i=[],n;n=a.pop();)if(i.push(n),n.isExpand){var o=n.children;if(o.length)for(var s=0;s<o.length;s++)a.push(o[s])}for(;n=i.pop();)e(n,r)}function ss(t,e){for(var r=[t],a;a=r.pop();)if(e(a),a.isExpand){var i=a.children;if(i.length)for(var n=i.length-1;n>=0;n--)r.push(i[n])}}var FP=function(t,e){t.eachSeriesByType("tree",function(r){WP(r,e)})};function WP(t,e){var r=RP(t,e);t.layoutInfo=r;var a=t.get("layout"),i=0,n=0,o=null;a==="radial"?(i=2*Math.PI,n=Math.min(r.height,r.width)/2,o=gx(function(_,x){return(_.parentNode===x.parentNode?1:2)/_.depth})):(i=r.width,n=r.height,o=gx());var s=t.getData().tree.root,l=s.children[0];if(l){LP(s),HP(l,PP,o),s.hierNode.modifier=-l.hierNode.prelim,ss(l,EP);var u=l,h=l,f=l;ss(l,function(_){var x=_.getLayout().x;x<u.getLayout().x&&(u=_),x>h.getLayout().x&&(h=_),_.depth>f.depth&&(f=_)});var c=u===h?1:o(u,h)/2,v=c-u.getLayout().x,d=0,g=0,p=0,m=0;if(a==="radial")d=i/(h.getLayout().x+c+v),g=n/(f.depth-1||1),ss(l,function(_){p=(_.getLayout().x+v)*d,m=(_.depth-1)*g;var x=os(p,m);_.setLayout({x:x.x,y:x.y,rawX:p,rawY:m},!0)});else{var y=t.getOrient();y==="RL"||y==="LR"?(g=n/(h.getLayout().x+c+v),d=i/(f.depth-1||1),ss(l,function(_){m=(_.getLayout().x+v)*g,p=y==="LR"?(_.depth-1)*d:i-(_.depth-1)*d,_.setLayout({x:p,y:m},!0)})):(y==="TB"||y==="BT")&&(d=i/(h.getLayout().x+c+v),g=n/(f.depth-1||1),ss(l,function(_){p=(_.getLayout().x+v)*d,m=y==="TB"?(_.depth-1)*g:n-(_.depth-1)*g,_.setLayout({x:p,y:m},!0)}))}}}bt(li("tree","circle")),It(FP);function ls(t,e,r){if(t&&ut(e,t.type)>=0){var a=r.getData().tree.root,i=t.targetNode;if(typeof i=="string"&&(i=a.getNodeById(i)),i&&a.contains(i))return{node:i};var n=t.targetNodeId;if(n!=null&&(i=a.getNodeById(n)))return{node:i}}}function xx(t){for(var e=[];t;)t=t.parentNode,t&&e.push(t);return e.reverse()}function vd(t,e){var r=xx(t);return ut(r,e)>=0}function dd(t,e){for(var r=[];t;){var a=t.dataIndex;r.push({name:t.name,dataIndex:a,value:e.getRawValue(a)}),t=t.parentNode}return r.reverse(),r}Dt.extend({type:"series.treemap",layoutMode:"box",dependencies:["grid","polar"],preventUsingHoverLayer:!0,_viewRoot:null,defaultOption:{progressive:0,left:"center",top:"middle",right:null,bottom:null,width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"\u25B6",zoomToNodeRatio:.32*.32,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",borderColor:"rgba(255,255,255,0.7)",borderWidth:1,shadowColor:"rgba(150,150,150,1)",shadowBlur:3,shadowOffsetX:0,shadowOffsetY:0,textStyle:{color:"#fff"}},emphasis:{textStyle:{}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",ellipsis:!0},upperLabel:{show:!1,position:[0,"50%"],height:20,color:"#fff",ellipsis:!0,verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],color:"#fff",ellipsis:!0,verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},getInitialData:function(t,e){var r={name:t.name,children:t.data};bx(r);var a=t.levels||[];a=t.levels=UP(a,e);var i=E(a||[],function(s){return new ht(s,this,e)},this),n=fi.createTree(r,this,null,o);function o(s){s.wrapMethod("getItemModel",function(l,u){var h=n.getNodeByDataIndex(u),f=i[h.depth];return f&&(l.parentModel=f),l})}return n.data},optionUpdated:function(){this.resetViewRoot()},formatTooltip:function(t){var e=this.getData(),r=this.getRawValue(t),a=P(r)?da(r[0]):da(r),i=e.getName(t);return Tt(i+": "+a)},getDataParams:function(t){var e=Dt.prototype.getDataParams.apply(this,arguments),r=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=dd(r,this),e},setLayoutInfo:function(t){this.layoutInfo=this.layoutInfo||{},Z(this.layoutInfo,t)},mapIdToIndex:function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=j(),this._idIndexMapCount=0);var r=e.get(t);return r==null&&e.set(t,r=this._idIndexMapCount++),r},getViewRoot:function(){return this._viewRoot},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)}});function bx(t){var e=0;T(t.children,function(a){bx(a);var i=a.value;P(i)&&(i=i[0]),e+=i});var r=t.value;P(r)&&(r=r[0]),(r==null||isNaN(r))&&(r=e),r<0&&(r=0),P(t.value)?t.value[0]=r:t.value=r}function UP(t,e){var r=e.get("color");if(!!r){t=t||[];var a;if(T(t,function(n){var o=new ht(n),s=o.get("color");(o.get("itemStyle.color")||s&&s!=="none")&&(a=!0)}),!a){var i=t[0]||(t[0]={});i.color=r.slice()}return t}}var $P=8,Sx=8,gd=5;function pd(t){this.group=new G,t.add(this.group)}pd.prototype={constructor:pd,render:function(t,e,r,a){var i=t.getModel("breadcrumb"),n=this.group;if(n.removeAll(),!(!i.get("show")||!r)){var o=i.getModel("itemStyle"),s=o.getModel("textStyle"),l={pos:{left:i.get("left"),right:i.get("right"),top:i.get("top"),bottom:i.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:i.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(r,l,s),this._renderContent(t,l,o,s,a),Fl(n,l.pos,l.box)}},_prepare:function(t,e,r){for(var a=t;a;a=a.parentNode){var i=a.getModel().get("name"),n=r.getTextRect(i),o=Math.max(n.width+$P*2,e.emptyItemWidth);e.totalWidth+=o+Sx,e.renderList.push({node:a,text:i,width:o})}},_renderContent:function(t,e,r,a,i){for(var n=0,o=e.emptyItemWidth,s=t.get("breadcrumb.height"),l=QD(e.pos,e.box),u=e.totalWidth,h=e.renderList,f=h.length-1;f>=0;f--){var c=h[f],v=c.node,d=c.width,g=c.text;u>l.width&&(u-=d-o,d=o,g=null);var p=new Se({shape:{points:ZP(n,0,d,s,f===h.length-1,f===0)},style:U(r.getItemStyle(),{lineJoin:"bevel",text:g,textFill:a.getTextColor(),textFont:a.getFont()}),z:10,onclick:K(i,v)});this.group.add(p),YP(p,t,v),n+=d+Sx}},remove:function(){this.group.removeAll()}};function ZP(t,e,r,a,i,n){var o=[[i?t:t-gd,e],[t+r,e],[t+r,e+a],[i?t:t-gd,e+a]];return!n&&o.splice(2,0,[t+r+gd,e+a/2]),!i&&o.push([t,e+a/2]),o}function YP(t,e,r){t.eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.componentIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:r&&r.dataIndex,name:r&&r.name},treePathInfo:r&&dd(r,e)}}function XP(){var t=[],e={},r;return{add:function(a,i,n,o,s){return _t(o)&&(s=o,o=0),e[a.id]?!1:(e[a.id]=1,t.push({el:a,target:i,time:n,delay:o,easing:s}),!0)},done:function(a){return r=a,this},start:function(){for(var a=t.length,i=0,n=t.length;i<n;i++){var o=t[i];o.el.animateTo(o.target,o.time,o.delay,o.easing,s)}return this;function s(){a--,a||(t.length=0,e={},r&&r())}}}}var Eu=X,Ax=G,Tx=ft,Cr=T,Cx=3,qP=["label"],KP=["emphasis","label"],QP=["upperLabel"],JP=["emphasis","upperLabel"],jP=10,tE=1,eE=2,md=qi([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),Dx=function(t){var e=md(t);return e.stroke=e.fill=e.lineWidth=null,e};_e({type:"treemap",init:function(t,e){this._containerGroup,this._storage=us(),this._oldTree,this._breadcrumb,this._controller,this._state="ready"},render:function(t,e,r,a){var i=e.findComponents({mainType:"series",subType:"treemap",query:a});if(!(ut(i,t)<0)){this.seriesModel=t,this.api=r,this.ecModel=e;var n=["treemapZoomToNode","treemapRootToNode"],o=ls(a,n,t),s=a&&a.type,l=t.layoutInfo,u=!this._oldTree,h=this._storage,f=s==="treemapRootToNode"&&o&&h?{rootNodeGroup:h.nodeGroup[o.node.getRawIndex()],direction:a.direction}:null,c=this._giveContainerGroup(l),v=this._doRender(c,t,f);!u&&(!s||s==="treemapZoomToNode"||s==="treemapRootToNode")?this._doAnimation(c,v,t,f):v.renderFinally(),this._resetController(r),this._renderBreadcrumb(t,r,o)}},_giveContainerGroup:function(t){var e=this._containerGroup;return e||(e=this._containerGroup=new Ax,this._initEvents(e),this.group.add(e)),e.attr("position",[t.x,t.y]),e},_doRender:function(t,e,r){var a=e.getData().tree,i=this._oldTree,n=us(),o=us(),s=this._storage,l=[],u=K(rE,e,o,s,r,n,l);f(a.root?[a.root]:[],i&&i.root?[i.root]:[],t,a===i||!i,0);var h=c(s);return this._oldTree=a,this._storage=o,{lastsForAnimation:n,willDeleteEls:h,renderFinally:v};function f(d,g,p,m,y){m?(g=d,Cr(d,function(w,S){!w.isRemoved()&&x(S,S)})):new Wr(g,d,_,_).add(x).update(x).remove(K(x,null)).execute();function _(w){return w.getId()}function x(w,S){var b=w!=null?d[w]:null,A=S!=null?g[S]:null,C=u(b,A,p,y);C&&f(b&&b.viewChildren||[],A&&A.viewChildren||[],C,m,y+1)}}function c(d){var g=us();return d&&Cr(d,function(p,m){var y=g[m];Cr(p,function(_){_&&(y.push(_),_.__tmWillDelete=1)})}),g}function v(){Cr(h,function(d){Cr(d,function(g){g.parent&&g.parent.remove(g)})}),Cr(l,function(d){d.invisible=!0,d.dirty()})}},_doAnimation:function(t,e,r,a){if(!!r.get("animation")){var i=r.get("animationDurationUpdate"),n=r.get("animationEasing"),o=XP();Cr(e.willDeleteEls,function(s,l){Cr(s,function(u,h){if(!u.invisible){var f=u.parent,c;if(a&&a.direction==="drillDown")c=f===a.rootNodeGroup?{shape:{x:0,y:0,width:f.__tmNodeWidth,height:f.__tmNodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var v=0,d=0;f.__tmWillDelete||(v=f.__tmNodeWidth/2,d=f.__tmNodeHeight/2),c=l==="nodeGroup"?{position:[v,d],style:{opacity:0}}:{shape:{x:v,y:d,width:0,height:0},style:{opacity:0}}}c&&o.add(u,c,i,n)}})}),Cr(this._storage,function(s,l){Cr(s,function(u,h){var f=e.lastsForAnimation[l][h],c={};!f||(l==="nodeGroup"?f.old&&(c.position=u.position.slice(),u.attr("position",f.old)):(f.old&&(c.shape=Z({},u.shape),u.setShape(f.old)),f.fadein?(u.setStyle("opacity",0),c.style={opacity:1}):u.style.opacity!==1&&(c.style={opacity:1})),o.add(u,c,i,n))})},this),this._state="animating",o.done(Eu(function(){this._state="ready",e.renderFinally()},this)).start()}},_resetController:function(t){var e=this._controller;e||(e=this._controller=new An(t.getZr()),e.enable(this.seriesModel.get("roam")),e.on("pan",Eu(this._onPan,this)),e.on("zoom",Eu(this._onZoom,this)));var r=new it(0,0,t.getWidth(),t.getHeight());e.setPointerChecker(function(a,i,n){return r.contain(i,n)})},_clearController:function(){var t=this._controller;t&&(t.dispose(),t=null)},_onPan:function(t){if(this._state!=="animating"&&(Math.abs(t.dx)>Cx||Math.abs(t.dy)>Cx)){var e=this.seriesModel.getData().tree.root;if(!e)return;var r=e.getLayout();if(!r)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:r.x+t.dx,y:r.y+t.dy,width:r.width,height:r.height}})}},_onZoom:function(t){var e=t.originX,r=t.originY;if(this._state!=="animating"){var a=this.seriesModel.getData().tree.root;if(!a)return;var i=a.getLayout();if(!i)return;var n=new it(i.x,i.y,i.width,i.height),o=this.seriesModel.layoutInfo;e-=o.x,r-=o.y;var s=ce();Je(s,s,[-e,-r]),jn(s,s,[t.scale,t.scale]),Je(s,s,[e,r]),n.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x,y:n.y,width:n.width,height:n.height}})}},_initEvents:function(t){t.on("click",function(e){if(this._state==="ready"){var r=this.seriesModel.get("nodeClick",!0);if(!!r){var a=this.findTarget(e.offsetX,e.offsetY);if(!!a){var i=a.node;if(i.getLayout().isLeafRoot)this._rootToNode(a);else if(r==="zoomToNode")this._zoomToNode(a);else if(r==="link"){var n=i.hostTree.data.getItemModel(i.dataIndex),o=n.get("link",!0),s=n.get("target",!0)||"blank";o&&To(o,s)}}}}},this)},_renderBreadcrumb:function(t,e,r){r||(r=t.get("leafDepth",!0)!=null?{node:t.getViewRoot()}:this.findTarget(e.getWidth()/2,e.getHeight()/2),r||(r={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new pd(this.group))).render(t,e,r.node,Eu(a,this));function a(i){this._state!=="animating"&&(vd(t.getViewRoot(),i)?this._rootToNode({node:i}):this._zoomToNode({node:i}))}},remove:function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=us(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},dispose:function(){this._clearController()},_zoomToNode:function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},_rootToNode:function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},findTarget:function(t,e){var r,a=this.seriesModel.getViewRoot();return a.eachNode({attr:"viewChildren",order:"preorder"},function(i){var n=this._storage.background[i.getRawIndex()];if(n){var o=n.transformCoordToLocal(t,e),s=n.shape;if(s.x<=o[0]&&o[0]<=s.x+s.width&&s.y<=o[1]&&o[1]<=s.y+s.height)r={node:i,offsetX:o[0],offsetY:o[1]};else return!1}},this),r}});function us(){return{nodeGroup:[],background:[],content:[]}}function rE(t,e,r,a,i,n,o,s,l,u){if(!o)return;var h=o.getLayout(),f=t.getData();if(f.setItemGraphicEl(o.dataIndex,null),!h||!h.isInView)return;var c=h.width,v=h.height,d=h.borderWidth,g=h.invisible,p=o.getRawIndex(),m=s&&s.getRawIndex(),y=o.viewChildren,_=h.upperHeight,x=y&&y.length,w=o.getModel("itemStyle"),S=o.getModel("emphasis.itemStyle"),b=O("nodeGroup",Ax);if(!b)return;if(l.add(b),b.attr("position",[h.x||0,h.y||0]),b.__tmNodeWidth=c,b.__tmNodeHeight=v,h.isAboveViewRoot)return b;var A=o.getModel(),C=O("background",Tx,u,tE);if(C&&I(b,C,x&&h.upperLabelHeight),x)Rl(b)&&Ka(b,!1),C&&(Ka(C,!0),f.setItemGraphicEl(o.dataIndex,C));else{var D=O("content",Tx,u,eE);D&&L(b,D),C&&Rl(C)&&Ka(C,!1),Ka(b,!0),f.setItemGraphicEl(o.dataIndex,b)}return b;function I(W,F,N){if(F.dataIndex=o.dataIndex,F.seriesIndex=t.seriesIndex,F.setShape({x:0,y:0,width:c,height:v}),g)M(F);else{F.invisible=!1;var $=o.getVisual("borderColor",!0),et=S.get("borderColor"),vt=Dx(w);vt.fill=$;var wt=md(S);if(wt.fill=et,N){var Ut=c-2*d;B(vt,wt,$,Ut,_,{x:d,y:0,width:Ut,height:_})}else vt.text=wt.text=null;F.setStyle(vt),yo(F,wt)}W.add(F)}function L(W,F){F.dataIndex=o.dataIndex,F.seriesIndex=t.seriesIndex;var N=Math.max(c-2*d,0),$=Math.max(v-2*d,0);if(F.culling=!0,F.setShape({x:d,y:d,width:N,height:$}),g)M(F);else{F.invisible=!1;var et=o.getVisual("color",!0),vt=Dx(w);vt.fill=et;var wt=md(S);B(vt,wt,et,N,$),F.setStyle(vt),yo(F,wt)}W.add(F)}function M(W){!W.invisible&&n.push(W)}function B(W,F,N,$,et,vt){var wt=A.get("name"),Ut=A.getModel(vt?QP:qP),Vs=A.getModel(vt?JP:KP),qe=Ut.getShallow("show");Te(W,F,Ut,Vs,{defaultText:qe?wt:null,autoColor:N,isRectText:!0,labelFetcher:t,labelDataIndex:o.dataIndex,labelProp:vt?"upperLabel":"label"}),k(W,vt,h),k(F,vt,h),vt&&(W.textRect=Y(vt)),W.truncate=qe&&Ut.get("ellipsis")?{outerWidth:$,outerHeight:et,minChar:2}:null}function k(W,F,N){var $=W.text;if(!F&&N.isLeafRoot&&$!=null){var et=t.get("drillDownIcon",!0);W.text=et?et+" "+$:$}}function O(W,F,N,$){var et=m!=null&&r[W][m],vt=i[W];return et?(r[W][m]=null,V(vt,et,W)):g||(et=new F({z:aE(N,$)}),et.__tmDepth=N,et.__tmStorageName=W,H(vt,et,W)),e[W][p]=et}function V(W,F,N){var $=W[p]={};$.old=N==="nodeGroup"?F.position.slice():Z({},F.shape)}function H(W,F,N){var $=W[p]={},et=o.parentNode;if(et&&(!a||a.direction==="drillDown")){var vt=0,wt=0,Ut=i.background[et.getRawIndex()];!a&&Ut&&Ut.old&&(vt=Ut.old.width,wt=Ut.old.height),$.old=N==="nodeGroup"?[0,wt]:{x:vt,y:wt,width:0,height:0}}$.fadein=N!=="nodeGroup"}}function aE(t,e){var r=t*jP+e;return(r-1)/r}for(var iE=function(){},Ix=["treemapZoomToNode","treemapRender","treemapMove"],yd=0;yd<Ix.length;yd++)lt({type:Ix[yd],update:"updateView"},iE);lt({type:"treemapRootToNode",update:"updateView"},function(t,e){e.eachComponent({mainType:"series",subType:"treemap",query:t},r);function r(a,i){var n=["treemapZoomToNode","treemapRootToNode"],o=ls(t,n,a);if(o){var s=a.getViewRoot();s&&(t.direction=vd(s,o.node)?"rollUp":"drillDown"),a.resetViewRoot(o.node)}}});var hs=T,Mx=Q,Ru=-1,mt=function(t){var e=t.mappingMethod,r=t.type,a=this.option=Y(t);this.type=r,this.mappingMethod=e,this._normalizeData=sE[e];var i=fs[r];this.applyVisual=i.applyVisual,this.getColorMapper=i.getColorMapper,this._doMap=i._doMap[e],e==="piecewise"?(_d(a),nE(a)):e==="category"?a.categories?oE(a):_d(a,!0):(ot(e!=="linear"||a.dataExtent),_d(a))};mt.prototype={constructor:mt,mapValueToVisual:function(t){var e=this._normalizeData(t);return this._doMap(e,t)},getNormalizer:function(){return X(this._normalizeData,this)}};var fs=mt.visualHandlers={color:{applyVisual:Nu("color"),getColorMapper:function(){var t=this.option;return X(t.mappingMethod==="category"?function(e,r){return!r&&(e=this._normalizeData(e)),Ou.call(this,e)}:function(e,r,a){var i=!!a;return!r&&(e=this._normalizeData(e)),a=ro(e,t.parsedVisual,a),i?a:zr(a,"rgba")},this)},_doMap:{linear:function(t){return zr(ro(t,this.option.parsedVisual),"rgba")},category:Ou,piecewise:function(t,e){var r=wd.call(this,e);return r==null&&(r=zr(ro(t,this.option.parsedVisual),"rgba")),r},fixed:ci}},colorHue:ku(function(t,e){return $i(t,e)}),colorSaturation:ku(function(t,e){return $i(t,null,e)}),colorLightness:ku(function(t,e){return $i(t,null,null,e)}),colorAlpha:ku(function(t,e){return Xs(t,e)}),opacity:{applyVisual:Nu("opacity"),_doMap:xd([0,1])},liftZ:{applyVisual:Nu("liftZ"),_doMap:{linear:ci,category:ci,piecewise:ci,fixed:ci}},symbol:{applyVisual:function(t,e,r){var a=this.mapValueToVisual(t);if(_t(a))r("symbol",a);else if(Mx(a))for(var i in a)a.hasOwnProperty(i)&&r(i,a[i])},_doMap:{linear:Lx,category:Ou,piecewise:function(t,e){var r=wd.call(this,e);return r==null&&(r=Lx.call(this,t)),r},fixed:ci}},symbolSize:{applyVisual:Nu("symbolSize"),_doMap:xd([0,1])}};function nE(t){var e=t.pieceList;t.hasSpecialVisual=!1,T(e,function(r,a){r.originIndex=a,r.visual!=null&&(t.hasSpecialVisual=!0)})}function oE(t){var e=t.categories,r=t.visual,a=t.categoryMap={};if(hs(e,function(o,s){a[o]=s}),!P(r)){var i=[];Q(r)?hs(r,function(o,s){var l=a[s];i[l??Ru]=o}):i[Ru]=r,r=Px(t,i)}for(var n=e.length-1;n>=0;n--)r[n]==null&&(delete a[e[n]],e.pop())}function _d(t,e){var r=t.visual,a=[];Q(r)?hs(r,function(n){a.push(n)}):r!=null&&a.push(r);var i={color:1,symbol:1};!e&&a.length===1&&!i.hasOwnProperty(t.type)&&(a[1]=a[0]),Px(t,a)}function ku(t){return{applyVisual:function(e,r,a){e=this.mapValueToVisual(e),a("color",t(r("color"),e))},_doMap:xd([0,1])}}function Lx(t){var e=this.option.visual;return e[Math.round(At(t,[0,1],[0,e.length-1],!0))]||{}}function Nu(t){return function(e,r,a){a(t,this.mapValueToVisual(e))}}function Ou(t){var e=this.option.visual;return e[this.option.loop&&t!==Ru?t%e.length:t]}function ci(){return this.option.visual[0]}function xd(t){return{linear:function(e){return At(e,t,this.option.visual,!0)},category:Ou,piecewise:function(e,r){var a=wd.call(this,r);return a==null&&(a=At(e,t,this.option.visual,!0)),a},fixed:ci}}function wd(t){var e=this.option,r=e.pieceList;if(e.hasSpecialVisual){var a=mt.findPieceIndex(t,r),i=r[a];if(i&&i.visual)return i.visual[this.type]}}function Px(t,e){return t.visual=e,t.type==="color"&&(t.parsedVisual=E(e,function(r){return be(r)})),e}var sE={linear:function(t){return At(t,this.option.dataExtent,[0,1],!0)},piecewise:function(t){var e=this.option.pieceList,r=mt.findPieceIndex(t,e,!0);if(r!=null)return At(r,[0,e.length-1],[0,1],!0)},category:function(t){var e=this.option.categories?this.option.categoryMap[t]:t;return e??Ru},fixed:Kt};mt.listVisualTypes=function(){var t=[];return T(fs,function(e,r){t.push(r)}),t},mt.addVisualHandler=function(t,e){fs[t]=e},mt.isValidType=function(t){return fs.hasOwnProperty(t)},mt.eachVisual=function(t,e,r){Q(t)?T(t,e,r):e.call(r,t)},mt.mapVisual=function(t,e,r){var a,i=P(t)?[]:Q(t)?{}:(a=!0,null);return mt.eachVisual(t,function(n,o){var s=e.call(r,n,o);a?i=s:i[o]=s}),i},mt.retrieveVisuals=function(t){var e={},r;return t&&hs(fs,function(a,i){t.hasOwnProperty(i)&&(e[i]=t[i],r=!0)}),r?e:null},mt.prepareVisualTypes=function(t){if(Mx(t)){var e=[];hs(t,function(r,a){e.push(a)}),t=e}else if(P(t))t=t.slice();else return[];return t.sort(function(r,a){return a==="color"&&r!=="color"&&r.indexOf("color")===0?1:-1}),t},mt.dependsOn=function(t,e){return e==="color"?!!(t&&t.indexOf(e)===0):t===e},mt.findPieceIndex=function(t,e,r){for(var a,i=1/0,n=0,o=e.length;n<o;n++){var s=e[n].value;if(s!=null){if(s===t||typeof s=="string"&&s===t+"")return n;r&&f(s,n)}}for(var n=0,o=e.length;n<o;n++){var l=e[n],u=l.interval,h=l.close;if(u){if(u[0]===-1/0){if(zu(h[1],t,u[1]))return n}else if(u[1]===1/0){if(zu(h[0],u[0],t))return n}else if(zu(h[0],u[0],t)&&zu(h[1],t,u[1]))return n;r&&f(u[0],n),r&&f(u[1],n)}}if(r)return t===1/0?e.length-1:t===-1/0?0:a;function f(c,v){var d=Math.abs(c-t);d<i&&(i=d,a=v)}};function zu(t,e,r){return t?e<=r:e<r}var lE=P,bd="itemStyle",uE={seriesType:"treemap",reset:function(t,e,r,a){var i=t.getData().tree,n=i.root,o=t.getModel(bd);if(!n.isRemoved()){var s=E(i.levelModels,function(l){return l?l.get(bd):null});Ex(n,{},s,o,t.getViewRoot().getAncestors(),t)}}};function Ex(t,e,r,a,i,n){var o=t.getModel(),s=t.getLayout();if(!(!s||s.invisible||!s.isInView)){var l=t.getModel(bd),u=r[t.depth],h=hE(l,e,u,a),f=l.get("borderColor"),c=l.get("borderColorSaturation"),v;c!=null&&(v=Rx(h,t),f=fE(c,v)),t.setVisual("borderColor",f);var d=t.viewChildren;if(!d||!d.length)v=Rx(h,t),t.setVisual("color",v);else{var g=cE(t,o,s,l,h,d);T(d,function(p,m){if(p.depth>=i.length||p===i[p.depth]){var y=vE(o,h,p,m,g,n);Ex(p,y,r,a,i,n)}})}}}function hE(t,e,r,a){var i=Z({},e);return T(["color","colorAlpha","colorSaturation"],function(n){var o=t.get(n,!0);o==null&&r&&(o=r[n]),o==null&&(o=e[n]),o==null&&(o=a.get(n)),o!=null&&(i[n]=o)}),i}function Rx(t){var e=Sd(t,"color");if(e){var r=Sd(t,"colorAlpha"),a=Sd(t,"colorSaturation");return a&&(e=$i(e,null,null,a)),r&&(e=Xs(e,r)),e}}function fE(t,e){return e!=null?$i(e,null,null,t):null}function Sd(t,e){var r=t[e];if(r!=null&&r!=="none")return r}function cE(t,e,r,a,i,n){if(!(!n||!n.length)){var o=Ad(e,"color")||i.color!=null&&i.color!=="none"&&(Ad(e,"colorAlpha")||Ad(e,"colorSaturation"));if(!!o){var s=e.get("visualMin"),l=e.get("visualMax"),u=r.dataExtent.slice();s!=null&&s<u[0]&&(u[0]=s),l!=null&&l>u[1]&&(u[1]=l);var h=e.get("colorMappingBy"),f={type:o.name,dataExtent:u,visual:o.range};f.type==="color"&&(h==="index"||h==="id")?(f.mappingMethod="category",f.loop=!0):f.mappingMethod="linear";var c=new mt(f);return c.__drColorMappingBy=h,c}}}function Ad(t,e){var r=t.get(e);return lE(r)&&r.length?{name:e,range:r}:null}function vE(t,e,r,a,i,n){var o=Z({},e);if(i){var s=i.type,l=s==="color"&&i.__drColorMappingBy,u=l==="index"?a:l==="id"?n.mapIdToIndex(r.getId()):r.getValue(t.get("visualDimension"));o[s]=i.mapValueToVisual(u)}return o}var cs=Math.max,Bu=Math.min,kx=Et,Td=T,Nx=["itemStyle","borderWidth"],dE=["itemStyle","gapWidth"],gE=["upperLabel","show"],pE=["upperLabel","height"],mE={seriesType:"treemap",reset:function(t,e,r,a){var i=r.getWidth(),n=r.getHeight(),o=t.option,s=Ot(t.getBoxLayoutParams(),{width:r.getWidth(),height:r.getHeight()}),l=o.size||[],u=R(kx(s.width,l[0]),i),h=R(kx(s.height,l[1]),n),f=a&&a.type,c=["treemapZoomToNode","treemapRootToNode"],v=ls(a,c,t),d=f==="treemapRender"||f==="treemapMove"?a.rootRect:null,g=t.getViewRoot(),p=xx(g);if(f!=="treemapMove"){var m=f==="treemapZoomToNode"?SE(t,v,g,u,h):d?[d.width,d.height]:[u,h],y=o.sort;y&&y!=="asc"&&y!=="desc"&&(y="desc");var _={squareRatio:o.squareRatio,sort:y,leafDepth:o.leafDepth};g.hostTree.clearLayouts();var x={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};g.setLayout(x),Ox(g,_,!1,0);var x=g.getLayout();Td(p,function(S,b){var A=(p[b+1]||g).getValue();S.setLayout(Z({dataExtent:[A,A],borderWidth:0,upperHeight:0},x))})}var w=t.getData().tree.root;w.setLayout(AE(s,d,v),!0),t.setLayoutInfo(s),Bx(w,new it(-s.x,-s.y,i,n),p,g,0)}};function Ox(t,e,r,a){var i,n;if(!t.isRemoved()){var o=t.getLayout();i=o.width,n=o.height;var v=t.getModel(),s=v.get(Nx),l=v.get(dE)/2,u=Vx(v),h=Math.max(s,u),f=s-l,c=h-l,v=t.getModel();t.setLayout({borderWidth:s,upperHeight:h,upperLabelHeight:u},!0),i=cs(i-2*f,0),n=cs(n-f-c,0);var d=i*n,g=yE(t,v,d,e,r,a);if(!!g.length){var p={x:f,y:c,width:i,height:n},m=Bu(i,n),y=1/0,_=[];_.area=0;for(var x=0,w=g.length;x<w;){var S=g[x];_.push(S),_.area+=S.getLayout().area;var b=bE(_,m,e.squareRatio);b<=y?(x++,y=b):(_.area-=_.pop().getLayout().area,zx(_,m,p,l,!1),m=Bu(p.width,p.height),_.length=_.area=0,y=1/0)}if(_.length&&zx(_,m,p,l,!0),!r){var A=v.get("childrenVisibleMin");A!=null&&d<A&&(r=!0)}for(var x=0,w=g.length;x<w;x++)Ox(g[x],e,r,a+1)}}}function yE(t,e,r,a,i,n){var o=t.children||[],s=a.sort;s!=="asc"&&s!=="desc"&&(s=null);var l=a.leafDepth!=null&&a.leafDepth<=n;if(i&&!l)return t.viewChildren=[];o=Ht(o,function(v){return!v.isRemoved()}),xE(o,s);var u=wE(e,o,s);if(u.sum===0)return t.viewChildren=[];if(u.sum=_E(e,r,u.sum,s,o),u.sum===0)return t.viewChildren=[];for(var h=0,f=o.length;h<f;h++){var c=o[h].getValue()/u.sum*r;o[h].setLayout({area:c})}return l&&(o.length&&t.setLayout({isLeafRoot:!0},!0),o.length=0),t.viewChildren=o,t.setLayout({dataExtent:u.dataExtent},!0),o}function _E(t,e,r,a,i){if(!a)return r;for(var n=t.get("visibleMin"),o=i.length,s=o,l=o-1;l>=0;l--){var u=i[a==="asc"?o-l-1:l].getValue();u/r*e<n&&(s=l,r-=u)}return a==="asc"?i.splice(0,o-s):i.splice(s,o-s),r}function xE(t,e){return e&&t.sort(function(r,a){var i=e==="asc"?r.getValue()-a.getValue():a.getValue()-r.getValue();return i===0?e==="asc"?r.dataIndex-a.dataIndex:a.dataIndex-r.dataIndex:i}),t}function wE(t,e,r){for(var a=0,i=0,n=e.length;i<n;i++)a+=e[i].getValue();var o=t.get("visualDimension"),s;if(!e||!e.length)s=[NaN,NaN];else if(o==="value"&&r)s=[e[e.length-1].getValue(),e[0].getValue()],r==="asc"&&s.reverse();else{var s=[1/0,-1/0];Td(e,function(u){var h=u.getValue(o);h<s[0]&&(s[0]=h),h>s[1]&&(s[1]=h)})}return{sum:a,dataExtent:s}}function bE(t,e,r){for(var a=0,i=1/0,n=0,o,s=t.length;n<s;n++)o=t[n].getLayout().area,o&&(o<i&&(i=o),o>a&&(a=o));var l=t.area*t.area,u=e*e*r;return l?cs(u*a/l,l/(u*i)):1/0}function zx(t,e,r,a,i){var n=e===r.width?0:1,o=1-n,s=["x","y"],l=["width","height"],u=r[s[n]],h=e?t.area/e:0;(i||h>r[l[o]])&&(h=r[l[o]]);for(var f=0,c=t.length;f<c;f++){var v=t[f],d={},g=h?v.getLayout().area/h:0,p=d[l[o]]=cs(h-2*a,0),m=r[s[n]]+r[l[n]]-u,y=f===c-1||m<g?m:g,_=d[l[n]]=cs(y-2*a,0);d[s[o]]=r[s[o]]+Bu(a,p/2),d[s[n]]=u+Bu(a,_/2),u+=y,v.setLayout(d,!0)}r[s[o]]+=h,r[l[o]]-=h}function SE(t,e,r,a,i){var n=(e||{}).node,o=[a,i];if(!n||n===r)return o;for(var s,l=a*i,u=l*t.option.zoomToNodeRatio;s=n.parentNode;){for(var h=0,f=s.children,c=0,v=f.length;c<v;c++)h+=f[c].getValue();var d=n.getValue();if(d===0)return o;u*=h/d;var g=s.getModel(),p=g.get(Nx),m=Math.max(p,Vx(g,p));u+=4*p*p+(3*p+m)*Math.pow(u,.5),u>Ic&&(u=Ic),n=s}u<l&&(u=l);var y=Math.pow(u/l,.5);return[a*y,i*y]}function AE(t,e,r){if(e)return{x:e.x,y:e.y};var a={x:0,y:0};if(!r)return a;var i=r.node,n=i.getLayout();if(!n)return a;for(var o=[n.width/2,n.height/2],s=i;s;){var l=s.getLayout();o[0]+=l.x,o[1]+=l.y,s=s.parentNode}return{x:t.width/2-o[0],y:t.height/2-o[1]}}function Bx(t,e,r,a,i){var n=t.getLayout(),o=r[i],s=o&&o===t;if(!(o&&!s||i===r.length&&t!==a)){t.setLayout({isInView:!0,invisible:!s&&!e.intersect(n),isAboveViewRoot:s},!0);var l=new it(e.x-n.x,e.y-n.y,e.width,e.height);Td(t.viewChildren||[],function(u){Bx(u,l,r,a,i+1)})}}function Vx(t){return t.get(gE)?t.get(pE):0}bt(uE),It(mE);function Cn(t){return"_EC_"+t}var vs=function(t){this._directed=t||!1,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this.data,this.edgeData},Ee=vs.prototype;Ee.type="graph",Ee.isDirected=function(){return this._directed},Ee.addNode=function(t,e){t=t==null?""+e:""+t;var r=this._nodesMap;if(r[Cn(t)]){z&&console.error("Graph nodes have duplicate name or id");return}var a=new lr(t,e);return a.hostGraph=this,this.nodes.push(a),r[Cn(t)]=a,a},Ee.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},Ee.getNodeById=function(t){return this._nodesMap[Cn(t)]},Ee.addEdge=function(t,e,r){var a=this._nodesMap,i=this._edgesMap;if(typeof t=="number"&&(t=this.nodes[t]),typeof e=="number"&&(e=this.nodes[e]),lr.isInstance(t)||(t=a[Cn(t)]),lr.isInstance(e)||(e=a[Cn(e)]),!(!t||!e)){var n=t.id+"-"+e.id;if(!i[n]){var o=new ds(t,e,r);return o.hostGraph=this,this._directed&&(t.outEdges.push(o),e.inEdges.push(o)),t.edges.push(o),t!==e&&e.edges.push(o),this.edges.push(o),i[n]=o,o}}},Ee.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},Ee.getEdge=function(t,e){lr.isInstance(t)&&(t=t.id),lr.isInstance(e)&&(e=e.id);var r=this._edgesMap;return this._directed?r[t+"-"+e]:r[t+"-"+e]||r[e+"-"+t]},Ee.eachNode=function(t,e){for(var r=this.nodes,a=r.length,i=0;i<a;i++)r[i].dataIndex>=0&&t.call(e,r[i],i)},Ee.eachEdge=function(t,e){for(var r=this.edges,a=r.length,i=0;i<a;i++)r[i].dataIndex>=0&&r[i].node1.dataIndex>=0&&r[i].node2.dataIndex>=0&&t.call(e,r[i],i)},Ee.breadthFirstTraverse=function(t,e,r,a){if(lr.isInstance(e)||(e=this._nodesMap[Cn(e)]),!!e){for(var i=r==="out"?"outEdges":r==="in"?"inEdges":"edges",n=0;n<this.nodes.length;n++)this.nodes[n].__visited=!1;if(!t.call(a,e,null))for(var o=[e];o.length;)for(var s=o.shift(),l=s[i],n=0;n<l.length;n++){var u=l[n],h=u.node1===s?u.node2:u.node1;if(!h.__visited){if(t.call(a,h,s))return;o.push(h),h.__visited=!0}}}},Ee.update=function(){for(var t=this.data,e=this.edgeData,r=this.nodes,a=this.edges,i=0,n=r.length;i<n;i++)r[i].dataIndex=-1;for(var i=0,n=t.count();i<n;i++)r[t.getRawIndex(i)].dataIndex=i;e.filterSelf(function(o){var s=a[e.getRawIndex(o)];return s.node1.dataIndex>=0&&s.node2.dataIndex>=0});for(var i=0,n=a.length;i<n;i++)a[i].dataIndex=-1;for(var i=0,n=e.count();i<n;i++)a[e.getRawIndex(i)].dataIndex=i},Ee.clone=function(){for(var t=new vs(this._directed),e=this.nodes,r=this.edges,a=0;a<e.length;a++)t.addNode(e[a].id,e[a].dataIndex);for(var a=0;a<r.length;a++){var i=r[a];t.addEdge(i.node1.id,i.node2.id,i.dataIndex)}return t};function lr(t,e){this.id=t??"",this.inEdges=[],this.outEdges=[],this.edges=[],this.hostGraph,this.dataIndex=e??-1}lr.prototype={constructor:lr,degree:function(){return this.edges.length},inDegree:function(){return this.inEdges.length},outDegree:function(){return this.outEdges.length},getModel:function(t){if(!(this.dataIndex<0)){var e=this.hostGraph,r=e.data.getItemModel(this.dataIndex);return r.getModel(t)}}};function ds(t,e,r){this.node1=t,this.node2=e,this.dataIndex=r??-1}ds.prototype.getModel=function(t){if(!(this.dataIndex<0)){var e=this.hostGraph,r=e.edgeData.getItemModel(this.dataIndex);return r.getModel(t)}};var Gx=function(t,e){return{getValue:function(r){var a=this[t][e];return a.get(a.getDimension(r||"value"),this.dataIndex)},setVisual:function(r,a){this.dataIndex>=0&&this[t][e].setItemVisual(this.dataIndex,r,a)},getVisual:function(r,a){return this[t][e].getItemVisual(this.dataIndex,r,a)},setLayout:function(r,a){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,r,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)}}};pt(lr,Gx("hostGraph","data")),pt(ds,Gx("hostGraph","edgeData")),vs.Node=lr,vs.Edge=ds,dl(lr),dl(ds);var Hx=function(t,e,r,a,i){for(var n=new vs(a),o=0;o<t.length;o++)n.addNode(Et(t[o].id,t[o].name,o),o);for(var s=[],l=[],u=0,o=0;o<e.length;o++){var h=e[o],f=h.source,c=h.target;n.addEdge(f,c,u)&&(l.push(h),s.push(Et(h.id,f+" > "+c)),u++)}var v=r.get("coordinateSystem"),d;if(v==="cartesian2d"||v==="polar")d=$r(t,r);else{var g=re.get(v),p=g&&g.type!=="view"?g.dimensions||[]:[];ut(p,"value")<0&&p.concat(["value"]);var m=un(t,{coordDimensions:p});d=new qt(m,r),d.initData(t)}var y=new qt(["value"],r);return y.initData(l,s),i&&i(d,y),vx({mainData:d,struct:n,structAttr:"graph",datas:{node:d,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),n.update(),n},gs=su({type:"series.graph",init:function(t){gs.superApply(this,"init",arguments);var e=this;function r(){return e._categoriesData}this.legendVisualProvider=new ts(r,r),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeOption:function(t){gs.superApply(this,"mergeOption",arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeDefaultAndTheme:function(t){gs.superApply(this,"mergeDefaultAndTheme",arguments),Ua(t,["edgeLabel"],["show"])},getInitialData:function(t,e){var r=t.edges||t.links||[],a=t.data||t.nodes||[],i=this;if(a&&r)return Hx(a,r,this,!0,n).data;function n(o,s){o.wrapMethod("getItemModel",function(v){var d=i._categoriesModels,g=v.getShallow("category"),p=d[g];return p&&(p.parentModel=v.parentModel,v.parentModel=p),v});var l=i.getModel("edgeLabel"),u=new ht({label:l.option},l.parentModel,e),h=i.getModel("emphasis.edgeLabel"),f=new ht({emphasis:{label:h.option}},h.parentModel,e);s.wrapMethod("getItemModel",function(v){return v.customizeGetParent(c),v});function c(v){return v=this.parsePath(v),v&&v[0]==="label"?u:v&&v[0]==="emphasis"&&v[1]==="label"?f:this.parentModel}}},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},getCategoriesData:function(){return this._categoriesData},formatTooltip:function(t,e,r){if(r==="edge"){var a=this.getData(),i=this.getDataParams(t,r),n=a.graph.getEdgeByIndex(t),o=a.getName(n.node1.dataIndex),s=a.getName(n.node2.dataIndex),l=[];return o!=null&&l.push(o),s!=null&&l.push(s),l=Tt(l.join(" > ")),i.value&&(l+=" : "+Tt(i.value)),l}else return gs.superApply(this,"formatTooltip",arguments)},_updateCategoriesData:function(){var t=E(this.option.categories||[],function(r){return r.value!=null?r:Z({value:0},r)}),e=new qt(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray(function(r){return e.getItemModel(r,!0)})},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},isAnimationEnabled:function(){return gs.superCall(this,"isAnimationEnabled")&&!(this.get("layout")==="force"&&this.get("force.layoutAnimation"))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",legendHoverLink:!0,hoverAnimation:!0,layout:null,focusNodeAdjacency:!1,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,curveness:0,opacity:.5},emphasis:{label:{show:!0}}}}),Fx=ee.prototype,Cd=Dl.prototype;function Dd(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}var TE=Ge({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildPath:function(t,e){this[Dd(e)?"_buildPathLine":"_buildPathCurve"](t,e)},_buildPathLine:Fx.buildPath,_buildPathCurve:Cd.buildPath,pointAt:function(t){return this[Dd(this.shape)?"_pointAtLine":"_pointAtCurve"](t)},_pointAtLine:Fx.pointAt,_pointAtCurve:Cd.pointAt,tangentAt:function(t){var e=this.shape,r=Dd(e)?[e.x2-e.x1,e.y2-e.y1]:this._tangentAtCurve(t);return Bi(r,r)},_tangentAtCurve:Cd.tangentAt}),Id=["fromSymbol","toSymbol"];function Wx(t){return"_"+t+"Type"}function Ux(t,e,r){var a=e.getItemVisual(r,"color"),i=e.getItemVisual(r,t),n=e.getItemVisual(r,t+"Size");if(!(!i||i==="none")){P(n)||(n=[n,n]);var o=Le(i,-n[0]/2,-n[1]/2,n[0],n[1],a);return o.name=t,o}}function CE(t){var e=new TE({name:"line",subPixelOptimize:!0});return Md(e.shape,t),e}function Md(t,e){t.x1=e[0][0],t.y1=e[0][1],t.x2=e[1][0],t.y2=e[1][1],t.percent=1;var r=e[2];r?(t.cpx1=r[0],t.cpy1=r[1]):(t.cpx1=NaN,t.cpy1=NaN)}function DE(){var t=this,e=t.childOfName("fromSymbol"),r=t.childOfName("toSymbol"),a=t.childOfName("label");if(!(!e&&!r&&a.ignore)){for(var i=1,n=this.parent;n;)n.scale&&(i/=n.scale[0]),n=n.parent;var o=t.childOfName("line");if(!(!this.__dirty&&!o.__dirty)){var s=o.shape.percent,l=o.pointAt(0),u=o.pointAt(s),h=Er([],u,l);if(Bi(h,h),e){e.attr("position",l);var f=o.tangentAt(0);e.attr("rotation",Math.PI/2-Math.atan2(f[1],f[0])),e.attr("scale",[i*s,i*s])}if(r){r.attr("position",u);var f=o.tangentAt(1);r.attr("rotation",-Math.PI/2-Math.atan2(f[1],f[0])),r.attr("scale",[i*s,i*s])}if(!a.ignore){a.attr("position",u);var c,v,d,g,p=a.__labelDistance,m=p[0]*i,y=p[1]*i,_=s/2,f=o.tangentAt(_),x=[f[1],-f[0]],w=o.pointAt(_);x[1]>0&&(x[0]=-x[0],x[1]=-x[1]);var S=f[0]<0?-1:1;if(a.__position!=="start"&&a.__position!=="end"){var b=-Math.atan2(f[1],f[0]);u[0]<l[0]&&(b=Math.PI+b),a.attr("rotation",b)}var A;switch(a.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":A=-y,d="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":A=y,d="top";break;default:A=0,d="middle"}switch(a.__position){case"end":c=[h[0]*m+u[0],h[1]*y+u[1]],v=h[0]>.8?"left":h[0]<-.8?"right":"center",d=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";break;case"start":c=[-h[0]*m+l[0],-h[1]*y+l[1]],v=h[0]>.8?"right":h[0]<-.8?"left":"center",d=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":c=[m*S+l[0],l[1]+A],v=f[0]<0?"right":"left",g=[-m*S,-A];break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":c=[w[0],w[1]+A],v="center",g=[0,-A];break;case"insideEndTop":case"insideEnd":case"insideEndBottom":c=[-m*S+u[0],u[1]+A],v=f[0]>=0?"right":"left",g=[m*S,-A];break}a.attr({style:{textVerticalAlign:a.__verticalAlign||d,textAlign:a.__textAlign||v},position:c,scale:[i,i],origin:g})}}}}function ps(t,e,r){G.call(this),this._createLine(t,e,r)}var Da=ps.prototype;Da.beforeUpdate=DE,Da._createLine=function(t,e,r){var a=t.hostModel,i=t.getItemLayout(e),n=CE(i);n.shape.percent=0,oe(n,{shape:{percent:1}},a,e),this.add(n);var o=new nt({name:"label",lineLabelOriginalOpacity:1});this.add(o),T(Id,function(s){var l=Ux(s,t,e);this.add(l),this[Wx(s)]=t.getItemVisual(e,s)},this),this._updateCommonStl(t,e,r)},Da.updateData=function(t,e,r){var a=t.hostModel,i=this.childOfName("line"),n=t.getItemLayout(e),o={shape:{}};Md(o.shape,n),tt(i,o,a,e),T(Id,function(s){var l=t.getItemVisual(e,s),u=Wx(s);if(this[u]!==l){this.remove(this.childOfName(s));var h=Ux(s,t,e);this.add(h)}this[u]=l},this),this._updateCommonStl(t,e,r)},Da._updateCommonStl=function(t,e,r){var a=t.hostModel,i=this.childOfName("line"),n=r&&r.lineStyle,o=r&&r.hoverLineStyle,s=r&&r.labelModel,l=r&&r.hoverLabelModel;if(!r||t.hasItemOption){var u=t.getItemModel(e);n=u.getModel("lineStyle").getLineStyle(),o=u.getModel("emphasis.lineStyle").getLineStyle(),s=u.getModel("label"),l=u.getModel("emphasis.label")}var h=t.getItemVisual(e,"color"),f=Ba(t.getItemVisual(e,"opacity"),n.opacity,1);i.useStyle(U({strokeNoScale:!0,fill:"none",stroke:h,opacity:f},n)),i.hoverStyle=o,T(Id,function(S){var b=this.childOfName(S);b&&(b.setColor(h),b.setStyle({opacity:f}))},this);var c=s.getShallow("show"),v=l.getShallow("show"),d=this.childOfName("label"),g,p;if((c||v)&&(g=h||"#000",p=a.getFormattedLabel(e,"normal",t.dataType),p==null)){var m=a.getRawValue(e);p=m==null?t.getName(e):isFinite(m)?Ft(m):m}var y=c?p:null,_=v?Nt(a.getFormattedLabel(e,"emphasis",t.dataType),p):null,x=d.style;if(y!=null||_!=null){Rt(d.style,s,{text:y},{autoColor:g}),d.__textAlign=x.textAlign,d.__verticalAlign=x.textVerticalAlign,d.__position=s.get("position")||"middle";var w=s.get("distance");P(w)||(w=[w,w]),d.__labelDistance=w}_!=null?d.hoverStyle={text:_,textFill:l.getTextColor(!0),fontStyle:l.getShallow("fontStyle"),fontWeight:l.getShallow("fontWeight"),fontSize:l.getShallow("fontSize"),fontFamily:l.getShallow("fontFamily")}:d.hoverStyle={text:null},d.ignore=!c&&!v,St(this)},Da.highlight=function(){this.trigger("emphasis")},Da.downplay=function(){this.trigger("normal")},Da.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},Da.setLinePoints=function(t){var e=this.childOfName("line");Md(e.shape,t),e.dirty()},yt(ps,G);function Vu(t){this._ctor=t||ps,this.group=new G}var vi=Vu.prototype;vi.isPersistent=function(){return!0},vi.updateData=function(t){var e=this,r=e.group,a=e._lineData;e._lineData=t,a||r.removeAll();var i=$x(t);t.diff(a).add(function(n){IE(e,t,n,i)}).update(function(n,o){ME(e,a,t,o,n,i)}).remove(function(n){r.remove(a.getItemGraphicEl(n))}).execute()};function IE(t,e,r,a){var i=e.getItemLayout(r);if(!!Ld(i)){var n=new t._ctor(e,r,a);e.setItemGraphicEl(r,n),t.group.add(n)}}function ME(t,e,r,a,i,n){var o=e.getItemGraphicEl(a);if(!Ld(r.getItemLayout(i))){t.group.remove(o);return}o?o.updateData(r,i,n):o=new t._ctor(r,i,n),r.setItemGraphicEl(i,o),t.group.add(o)}vi.updateLayout=function(){var t=this._lineData;!t||t.eachItemGraphicEl(function(e,r){e.updateLayout(t,r)},this)},vi.incrementalPrepareUpdate=function(t){this._seriesScope=$x(t),this._lineData=null,this.group.removeAll()};function LE(t){return t.animators&&t.animators.length>0}vi.incrementalUpdate=function(t,e){function r(o){!o.isGroup&&!LE(o)&&(o.incremental=o.useHoverLayer=!0)}for(var a=t.start;a<t.end;a++){var i=e.getItemLayout(a);if(Ld(i)){var n=new this._ctor(e,a,this._seriesScope);n.traverse(r),this.group.add(n),e.setItemGraphicEl(a,n)}}};function $x(t){var e=t.hostModel;return{lineStyle:e.getModel("lineStyle").getLineStyle(),hoverLineStyle:e.getModel("emphasis.lineStyle").getLineStyle(),labelModel:e.getModel("label"),hoverLabelModel:e.getModel("emphasis.label")}}vi.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},vi._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};function Zx(t){return isNaN(t[0])||isNaN(t[1])}function Ld(t){return!Zx(t[0])&&!Zx(t[1])}function ms(t){var e=t.coordinateSystem;if(e.type!=="view")return 1;var r=t.option.nodeScaleRatio,a=e.scale,i=a&&a[0]||1,n=e.getZoom(),o=(n-1)*r+1;return o/i}function ys(t){var e=t.getVisual("symbolSize");return e instanceof Array&&(e=(e[0]+e[1])/2),+e}var Pd=[],Ed=[],Rd=[],Dn=ne,kd=ta,Yx=Math.abs;function Xx(t,e,r){for(var a=t[0],i=t[1],n=t[2],o=1/0,s,l=r*r,u=.1,h=.1;h<=.9;h+=.1){Pd[0]=Dn(a[0],i[0],n[0],h),Pd[1]=Dn(a[1],i[1],n[1],h);var f=Yx(kd(Pd,e)-l);f<o&&(o=f,s=h)}for(var c=0;c<32;c++){var v=s+u;Ed[0]=Dn(a[0],i[0],n[0],s),Ed[1]=Dn(a[1],i[1],n[1],s),Rd[0]=Dn(a[0],i[0],n[0],v),Rd[1]=Dn(a[1],i[1],n[1],v);var f=kd(Ed,e)-l;if(Yx(f)<.01)break;var d=kd(Rd,e)-l;u/=2,f<0?d>=0?s=s+u:s=s-u:d>=0?s=s-u:s=s+u}return s}var Nd=function(t,e){var r=[],a=uc,i=[[],[],[]],n=[[],[]],o=[];e/=2,t.eachEdge(function(s,l){var u=s.getLayout(),h=s.getVisual("fromSymbol"),f=s.getVisual("toSymbol");u.__original||(u.__original=[Qe(u[0]),Qe(u[1])],u[2]&&u.__original.push(Qe(u[2])));var c=u.__original;if(u[2]!=null){if(Jt(i[0],c[0]),Jt(i[1],c[2]),Jt(i[2],c[1]),h&&h!=="none"){var v=ys(s.node1),d=Xx(i,c[0],v*e);a(i[0][0],i[1][0],i[2][0],d,r),i[0][0]=r[3],i[1][0]=r[4],a(i[0][1],i[1][1],i[2][1],d,r),i[0][1]=r[3],i[1][1]=r[4]}if(f&&f!=="none"){var v=ys(s.node2),d=Xx(i,c[1],v*e);a(i[0][0],i[1][0],i[2][0],d,r),i[1][0]=r[1],i[2][0]=r[2],a(i[0][1],i[1][1],i[2][1],d,r),i[1][1]=r[1],i[2][1]=r[2]}Jt(u[0],i[0]),Jt(u[1],i[2]),Jt(u[2],i[1])}else{if(Jt(n[0],c[0]),Jt(n[1],c[1]),Er(o,n[1],n[0]),Bi(o,o),h&&h!=="none"){var v=ys(s.node1);qn(n[0],n[0],o,v*e)}if(f&&f!=="none"){var v=ys(s.node2);qn(n[1],n[1],o,-v*e)}Jt(u[0],n[0]),Jt(u[1],n[1])}})},In="__focusNodeAdjacency",Mn="__unfocusNodeAdjacency",di=["itemStyle","opacity"],Gu=["lineStyle","opacity"];function qx(t,e){var r=t.getVisual("opacity");return r??t.getModel().get(e)}function Hu(t,e,r){var a=t.getGraphicEl(),i=qx(t,e);r!=null&&(i==null&&(i=1),i*=r),a.downplay&&a.downplay(),a.traverse(function(n){if(!n.isGroup){var o=n.lineLabelOriginalOpacity;(o==null||r!=null)&&(o=i),n.setStyle("opacity",o)}})}function gi(t,e){var r=qx(t,e),a=t.getGraphicEl();a.traverse(function(i){!i.isGroup&&i.setStyle("opacity",r)}),a.highlight&&a.highlight()}_e({type:"graph",init:function(t,e){var r=new gn,a=new Vu,i=this.group;this._controller=new An(e.getZr()),this._controllerHost={target:i},i.add(r.group),i.add(a.group),this._symbolDraw=r,this._lineDraw=a,this._firstRender=!0},render:function(t,e,r){var a=this,i=t.coordinateSystem;this._model=t;var n=this._symbolDraw,o=this._lineDraw,s=this.group;if(i.type==="view"){var l={position:i.position,scale:i.scale};this._firstRender?s.attr(l):tt(s,l,t)}Nd(t.getGraph(),ms(t));var u=t.getData();n.updateData(u);var h=t.getEdgeData();o.updateData(h),this._updateNodeAndLinkScale(),this._updateController(t,e,r),clearTimeout(this._layoutTimeout);var f=t.forceLayout,c=t.get("force.layoutAnimation");f&&this._startForceLayoutIteration(f,c),u.eachItemGraphicEl(function(p,m){var y=u.getItemModel(m);p.off("drag").off("dragend");var _=y.get("draggable");_&&p.on("drag",function(){f&&(f.warmUp(),!this._layouting&&this._startForceLayoutIteration(f,c),f.setFixed(m),u.setItemLayout(m,p.position))},this).on("dragend",function(){f&&f.setUnfixed(m)},this),p.setDraggable(_&&f),p[In]&&p.off("mouseover",p[In]),p[Mn]&&p.off("mouseout",p[Mn]),y.get("focusNodeAdjacency")&&(p.on("mouseover",p[In]=function(){a._clearTimer(),r.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,dataIndex:p.dataIndex})}),p.on("mouseout",p[Mn]=function(){a._dispatchUnfocus(r)}))},this),u.graph.eachEdge(function(p){var m=p.getGraphicEl();m[In]&&m.off("mouseover",m[In]),m[Mn]&&m.off("mouseout",m[Mn]),p.getModel().get("focusNodeAdjacency")&&(m.on("mouseover",m[In]=function(){a._clearTimer(),r.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,edgeDataIndex:p.dataIndex})}),m.on("mouseout",m[Mn]=function(){a._dispatchUnfocus(r)}))});var v=t.get("layout")==="circular"&&t.get("circular.rotateLabel"),d=u.getLayout("cx"),g=u.getLayout("cy");u.eachItemGraphicEl(function(p,m){var y=u.getItemModel(m),_=y.get("label.rotate")||0,x=p.getSymbolPath();if(v){var w=u.getItemLayout(m),S=Math.atan2(w[1]-g,w[0]-d);S<0&&(S=Math.PI*2+S);var b=w[0]<d;b&&(S=S-Math.PI);var A=b?"left":"right";bc(x,{textRotation:-S,textPosition:A,textOrigin:"center"},{textPosition:A})}else bc(x,{textRotation:_*=Math.PI/180})}),this._firstRender=!1},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={},this._clearTimer()},_dispatchUnfocus:function(t,e){var r=this;this._clearTimer(),this._unfocusDelayTimer=setTimeout(function(){r._unfocusDelayTimer=null,t.dispatchAction({type:"unfocusNodeAdjacency",seriesId:r._model.id})},500)},_clearTimer:function(){this._unfocusDelayTimer&&(clearTimeout(this._unfocusDelayTimer),this._unfocusDelayTimer=null)},focusNodeAdjacency:function(t,e,r,a){var i=t.getData(),n=i.graph,o=a.dataIndex,s=a.edgeDataIndex,l=n.getNodeByIndex(o),u=n.getEdgeByIndex(s);!l&&!u||(n.eachNode(function(h){Hu(h,di,.1)}),n.eachEdge(function(h){Hu(h,Gu,.1)}),l&&(gi(l,di),T(l.edges,function(h){h.dataIndex<0||(gi(h,Gu),gi(h.node1,di),gi(h.node2,di))})),u&&(gi(u,Gu),gi(u.node1,di),gi(u.node2,di)))},unfocusNodeAdjacency:function(t,e,r,a){var i=t.getData().graph;i.eachNode(function(n){Hu(n,di)}),i.eachEdge(function(n){Hu(n,Gu)})},_startForceLayoutIteration:function(t,e){var r=this;(function a(){t.step(function(i){r.updateLayout(r._model),(r._layouting=!i)&&(e?r._layoutTimeout=setTimeout(a,16):a())})})()},_updateController:function(t,e,r){var a=this._controller,i=this._controllerHost,n=this.group;if(a.setPointerChecker(function(o,s,l){var u=n.getBoundingRect();return u.applyTransform(n.transform),u.contain(s,l)&&!Mu(o,r,t)}),t.coordinateSystem.type!=="view"){a.disable();return}a.enable(t.get("roam")),i.zoomLimit=t.get("scaleLimit"),i.zoom=t.coordinateSystem.getZoom(),a.off("pan").off("zoom").on("pan",function(o){ad(i,o.dx,o.dy),r.dispatchAction({seriesId:t.id,type:"graphRoam",dx:o.dx,dy:o.dy})}).on("zoom",function(o){id(i,o.scale,o.originX,o.originY),r.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:o.scale,originX:o.originX,originY:o.originY}),this._updateNodeAndLinkScale(),Nd(t.getGraph(),ms(t)),this._lineDraw.updateLayout()},this)},_updateNodeAndLinkScale:function(){var t=this._model,e=t.getData(),r=ms(t),a=[r,r];e.eachItemGraphicEl(function(i,n){i.attr("scale",a)})},updateLayout:function(t){Nd(t.getGraph(),ms(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()}}),lt({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},function(){}),lt({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},function(){});var PE={type:"graphRoam",event:"graphRoam",update:"none"};lt(PE,function(t,e){e.eachComponent({mainType:"series",query:t},function(r){var a=r.coordinateSystem,i=od(a,t);r.setCenter&&r.setCenter(i.center),r.setZoom&&r.setZoom(i.zoom)})});var EE=function(t){var e=t.findComponents({mainType:"legend"});!e||!e.length||t.eachSeriesByType("graph",function(r){var a=r.getCategoriesData(),i=r.getGraph(),n=i.data,o=a.mapArray(a.getName);n.filterSelf(function(s){var l=n.getItemModel(s),u=l.getShallow("category");if(u!=null){typeof u=="number"&&(u=o[u]);for(var h=0;h<e.length;h++)if(!e[h].isSelected(u))return!1}return!0})},this)},RE=function(t){var e={};t.eachSeriesByType("graph",function(r){var a=r.getCategoriesData(),i=r.getData(),n={};a.each(function(o){var s=a.getName(o);n["ec-"+s]=o;var l=a.getItemModel(o),u=l.get("itemStyle.color")||r.getColorFromPalette(s,e);a.setItemVisual(o,"color",u);for(var h=["opacity","symbol","symbolSize","symbolKeepAspect"],f=0;f<h.length;f++){var c=l.getShallow(h[f],!0);c!=null&&a.setItemVisual(o,h[f],c)}}),a.count()&&i.each(function(o){var s=i.getItemModel(o),l=s.getShallow("category");if(l!=null){typeof l=="string"&&(l=n["ec-"+l]);for(var u=["color","opacity","symbol","symbolSize","symbolKeepAspect"],h=0;h<u.length;h++)i.getItemVisual(o,u[h],!0)==null&&i.setItemVisual(o,u[h],a.getItemVisual(l,u[h]))}})})};function Fu(t){return t instanceof Array||(t=[t,t]),t}var kE=function(t){t.eachSeriesByType("graph",function(e){var r=e.getGraph(),a=e.getEdgeData(),i=Fu(e.get("edgeSymbol")),n=Fu(e.get("edgeSymbolSize")),o="lineStyle.color".split("."),s="lineStyle.opacity".split(".");a.setVisual("fromSymbol",i&&i[0]),a.setVisual("toSymbol",i&&i[1]),a.setVisual("fromSymbolSize",n&&n[0]),a.setVisual("toSymbolSize",n&&n[1]),a.setVisual("color",e.get(o)),a.setVisual("opacity",e.get(s)),a.each(function(l){var u=a.getItemModel(l),h=r.getEdgeByIndex(l),f=Fu(u.getShallow("symbol",!0)),c=Fu(u.getShallow("symbolSize",!0)),v=u.get(o),d=u.get(s);switch(v){case"source":v=h.node1.getVisual("color");break;case"target":v=h.node2.getVisual("color");break}f[0]&&h.setVisual("fromSymbol",f[0]),f[1]&&h.setVisual("toSymbol",f[1]),c[0]&&h.setVisual("fromSymbolSize",c[0]),c[1]&&h.setVisual("toSymbolSize",c[1]),h.setVisual("color",v),h.setVisual("opacity",d)})})};function Kx(t){var e=t.coordinateSystem;if(!(e&&e.type!=="view")){var r=t.getGraph();r.eachNode(function(a){var i=a.getModel();a.setLayout([+i.get("x"),+i.get("y")])}),Qx(r)}}function Qx(t){t.eachEdge(function(e){var r=e.getModel().get("lineStyle.curveness")||0,a=Qe(e.node1.getLayout()),i=Qe(e.node2.getLayout()),n=[a,i];+r&&n.push([(a[0]+i[0])/2-(a[1]-i[1])*r,(a[1]+i[1])/2-(i[0]-a[0])*r]),e.setLayout(n)})}var NE=function(t,e){t.eachSeriesByType("graph",function(r){var a=r.get("layout"),i=r.coordinateSystem;if(i&&i.type!=="view"){var n=r.getData(),o=[];T(i.dimensions,function(c){o=o.concat(n.mapDimension(c,!0))});for(var s=0;s<n.count();s++){for(var l=[],u=!1,h=0;h<o.length;h++){var f=n.get(o[h],s);isNaN(f)||(u=!0),l.push(f)}u?n.setItemLayout(s,i.dataToPoint(l)):n.setItemLayout(s,[NaN,NaN])}Qx(n.graph)}else(!a||a==="none")&&Kx(r)})},Jx=Math.PI,Od=[];function jx(t,e){var r=t.coordinateSystem;if(!(r&&r.type!=="view")){var a=r.getBoundingRect(),i=t.getData(),n=i.graph,o=a.width/2+a.x,s=a.height/2+a.y,l=Math.min(a.width,a.height)/2,u=i.count();i.setLayout({cx:o,cy:s}),u&&(OE[e](t,r,n,i,l,o,s,u),n.eachEdge(function(h){var f=h.getModel().get("lineStyle.curveness")||0,c=Qe(h.node1.getLayout()),v=Qe(h.node2.getLayout()),d,g=(c[0]+v[0])/2,p=(c[1]+v[1])/2;+f&&(f*=3,d=[o*f+g*(1-f),s*f+p*(1-f)]),h.setLayout([c,v,d])}))}}var OE={value:function(t,e,r,a,i,n,o,s){var l=0,u=a.getSum("value"),h=Math.PI*2/(u||s);r.eachNode(function(f){var c=f.getValue("value"),v=h*(u?c:1)/2;l+=v,f.setLayout([i*Math.cos(l)+n,i*Math.sin(l)+o]),l+=v})},symbolSize:function(t,e,r,a,i,n,o,s){var l=0;Od.length=s;var u=ms(t);r.eachNode(function(c){var v=ys(c);isNaN(v)&&(v=2),v<0&&(v=0),v*=u;var d=Math.asin(v/2/i);isNaN(d)&&(d=Jx/2),Od[c.dataIndex]=d,l+=d*2});var h=(2*Jx-l)/s/2,f=0;r.eachNode(function(c){var v=h+Od[c.dataIndex];f+=v,c.setLayout([i*Math.cos(f)+n,i*Math.sin(f)+o]),f+=v})}},zE=function(t){t.eachSeriesByType("graph",function(e){e.get("layout")==="circular"&&jx(e,"symbolSize")})},Ln=qn;function BE(t,e,r){for(var a=r.rect,i=a.width,n=a.height,o=[a.x+i/2,a.y+n/2],s=r.gravity==null?.1:r.gravity,l=0;l<t.length;l++){var u=t[l];u.p||(u.p=jr(i*(Math.random()-.5)+o[0],n*(Math.random()-.5)+o[1])),u.pp=Qe(u.p),u.edges=null}var h=r.friction==null?.6:r.friction,f=h;return{warmUp:function(){f=h*.8},setFixed:function(c){t[c].fixed=!0},setUnfixed:function(c){t[c].fixed=!1},step:function(c){for(var v=[],d=t.length,g=0;g<e.length;g++){var p=e[g];if(!p.ignoreForceLayout){var m=p.n1,y=p.n2;Er(v,y.p,m.p);var _=Kn(v)-p.d,x=y.w/(m.w+y.w);isNaN(x)&&(x=0),Bi(v,v),!m.fixed&&Ln(m.p,m.p,v,x*_*f),!y.fixed&&Ln(y.p,y.p,v,-(1-x)*_*f)}}for(var g=0;g<d;g++){var w=t[g];w.fixed||(Er(v,o,w.p),Ln(w.p,w.p,v,s*f))}for(var g=0;g<d;g++)for(var m=t[g],S=g+1;S<d;S++){var y=t[S];Er(v,y.p,m.p);var _=Kn(v);_===0&&(Bp(v,Math.random()-.5,Math.random()-.5),_=1);var b=(m.rep+y.rep)/_/_;!m.fixed&&Ln(m.pp,m.pp,v,b),!y.fixed&&Ln(y.pp,y.pp,v,-b)}for(var A=[],g=0;g<d;g++){var w=t[g];w.fixed||(Er(A,w.p,w.pp),Ln(w.p,w.p,A,f),Jt(w.pp,w.p))}f=f*.992,c&&c(t,e,f<.01)}}}var VE=function(t){t.eachSeriesByType("graph",function(e){var r=e.coordinateSystem;if(!(r&&r.type!=="view"))if(e.get("layout")==="force"){var a=e.preservedPoints||{},i=e.getGraph(),n=i.data,o=i.edgeData,s=e.getModel("force"),l=s.get("initLayout");e.preservedPoints?n.each(function(_){var x=n.getId(_);n.setItemLayout(_,a[x]||[NaN,NaN])}):!l||l==="none"?Kx(e):l==="circular"&&jx(e,"value");var u=n.getDataExtent("value"),h=o.getDataExtent("value"),f=s.get("repulsion"),c=s.get("edgeLength");P(f)||(f=[f,f]),P(c)||(c=[c,c]),c=[c[1],c[0]];var v=n.mapArray("value",function(_,x){var w=n.getItemLayout(x),S=At(_,u,f);return isNaN(S)&&(S=(f[0]+f[1])/2),{w:S,rep:S,fixed:n.getItemModel(x).get("fixed"),p:!w||isNaN(w[0])||isNaN(w[1])?null:w}}),d=o.mapArray("value",function(_,x){var w=i.getEdgeByIndex(x),S=At(_,h,c);isNaN(S)&&(S=(c[0]+c[1])/2);var b=w.getModel();return{n1:v[w.node1.dataIndex],n2:v[w.node2.dataIndex],d:S,curveness:b.get("lineStyle.curveness")||0,ignoreForceLayout:b.get("ignoreForceLayout")}}),r=e.coordinateSystem,g=r.getBoundingRect(),p=BE(v,d,{rect:g,gravity:s.get("gravity"),friction:s.get("friction")}),m=p.step;p.step=function(_){for(var x=0,w=v.length;x<w;x++)v[x].fixed&&Jt(v[x].p,i.getNodeByIndex(x).getLayout());m(function(S,b,A){for(var C=0,D=S.length;C<D;C++)S[C].fixed||i.getNodeByIndex(C).setLayout(S[C].p),a[n.getId(C)]=S[C].p;for(var C=0,D=b.length;C<D;C++){var I=b[C],L=i.getEdgeByIndex(C),M=I.n1.p,B=I.n2.p,k=L.getLayout();k=k?k.slice():[],k[0]=k[0]||[],k[1]=k[1]||[],Jt(k[0],M),Jt(k[1],B),+I.curveness&&(k[2]=[(M[0]+B[0])/2-(M[1]-B[1])*I.curveness,(M[1]+B[1])/2-(B[0]-M[0])*I.curveness]),L.setLayout(k)}_&&_(A)})},e.forceLayout=p,e.preservedPoints=a,p.step()}else e.forceLayout=null})};function GE(t,e,r){var a=t.getBoxLayoutParams();return a.aspect=r,Ot(a,{width:e.getWidth(),height:e.getHeight()})}var HE=function(t,e){var r=[];return t.eachSeriesByType("graph",function(a){var i=a.get("coordinateSystem");if(!i||i==="view"){var n=a.getData(),o=n.mapArray(function(p){var m=n.getItemModel(p);return[+m.get("x"),+m.get("y")]}),s=[],l=[];uo(o,s,l),l[0]-s[0]===0&&(l[0]+=1,s[0]-=1),l[1]-s[1]===0&&(l[1]+=1,s[1]-=1);var u=(l[0]-s[0])/(l[1]-s[1]),h=GE(a,e,u);isNaN(u)&&(s=[h.x,h.y],l=[h.x+h.width,h.y+h.height]);var f=l[0]-s[0],c=l[1]-s[1],v=h.width,d=h.height,g=a.coordinateSystem=new Ca;g.zoomLimit=a.get("scaleLimit"),g.setBoundingRect(s[0],s[1],f,c),g.setViewRect(h.x,h.y,v,d),g.setCenter(a.get("center")),g.setZoom(a.get("zoom")),r.push(g)}}),r};Ie(EE),bt(li("graph","circle",null)),bt(RE),bt(kE),It(NE),It(br.VISUAL.POST_CHART_LAYOUT,zE),It(VE),gv("graphView",{create:HE});var t5=Dt.extend({type:"series.gauge",getInitialData:function(t,e){return wn(this,["value"])},defaultOption:{zlevel:0,z:2,center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,lineStyle:{color:[[.2,"#91c7ae"],[.8,"#63869e"],[1,"#c23531"]],width:30}},splitLine:{show:!0,length:30,lineStyle:{color:"#eee",width:2,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:8,lineStyle:{color:"#eee",width:1,type:"solid"}},axisLabel:{show:!0,distance:5,color:"auto"},pointer:{show:!0,length:"80%",width:8},itemStyle:{color:"auto"},title:{show:!0,offsetCenter:[0,"-40%"],color:"#333",fontSize:15},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"auto",fontSize:30}}}),FE=st.extend({type:"echartsGaugePointer",shape:{angle:0,width:10,r:10,x:0,y:0},buildPath:function(t,e){var r=Math.cos,a=Math.sin,i=e.r,n=e.width,o=e.angle,s=e.x-r(o)*n*(n>=i/3?1:2),l=e.y-a(o)*n*(n>=i/3?1:2);o=e.angle-Math.PI/2,t.moveTo(s,l),t.lineTo(e.x+r(o)*n,e.y+a(o)*n),t.lineTo(e.x+r(e.angle)*i,e.y+a(e.angle)*i),t.lineTo(e.x-r(o)*n,e.y-a(o)*n),t.lineTo(s,l)}});function WE(t,e){var r=t.get("center"),a=e.getWidth(),i=e.getHeight(),n=Math.min(a,i),o=R(r[0],e.getWidth()),s=R(r[1],e.getHeight()),l=R(t.get("radius"),n/2);return{cx:o,cy:s,r:l}}function tw(t,e){return e&&(typeof e=="string"?t=e.replace("{value}",t??""):typeof e=="function"&&(t=e(t))),t}var UE=Math.PI*2,e5=Yt.extend({type:"gauge",render:function(t,e,r){this.group.removeAll();var a=t.get("axisLine.lineStyle.color"),i=WE(t,r);this._renderMain(t,e,r,a,i)},dispose:function(){},_renderMain:function(t,e,r,a,i){for(var n=this.group,o=t.getModel("axisLine"),s=o.getModel("lineStyle"),l=t.get("clockwise"),u=-t.get("startAngle")/180*Math.PI,h=-t.get("endAngle")/180*Math.PI,f=(h-u)%UE,c=u,v=s.get("width"),d=o.get("show"),g=0;d&&g<a.length;g++){var p=Math.min(Math.max(a[g][0],0),1),h=u+f*p,m=new ir({shape:{startAngle:c,endAngle:h,cx:i.cx,cy:i.cy,clockwise:l,r0:i.r-v,r:i.r},silent:!0});m.setStyle({fill:a[g][1]}),m.setStyle(s.getLineStyle(["color","borderWidth","borderColor"])),n.add(m),c=h}var y=function(x){if(x<=0)return a[0][1];for(var w=0;w<a.length;w++)if(a[w][0]>=x&&(w===0?0:a[w-1][0])<x)return a[w][1];return a[w-1][1]};if(!l){var _=u;u=h,h=_}this._renderTicks(t,e,r,y,i,u,h,l),this._renderPointer(t,e,r,y,i,u,h,l),this._renderTitle(t,e,r,y,i),this._renderDetail(t,e,r,y,i)},_renderTicks:function(t,e,r,a,i,n,o,s){for(var l=this.group,u=i.cx,h=i.cy,f=i.r,c=+t.get("min"),v=+t.get("max"),d=t.getModel("splitLine"),g=t.getModel("axisTick"),p=t.getModel("axisLabel"),m=t.get("splitNumber"),y=g.get("splitNumber"),_=R(d.get("length"),f),x=R(g.get("length"),f),w=n,S=(o-n)/m,b=S/y,A=d.getModel("lineStyle").getLineStyle(),C=g.getModel("lineStyle").getLineStyle(),D=0;D<=m;D++){var I=Math.cos(w),L=Math.sin(w);if(d.get("show")){var M=new ee({shape:{x1:I*f+u,y1:L*f+h,x2:I*(f-_)+u,y2:L*(f-_)+h},style:A,silent:!0});A.stroke==="auto"&&M.setStyle({stroke:a(D/m)}),l.add(M)}if(p.get("show")){var B=tw(Ft(D/m*(v-c)+c),p.get("formatter")),k=p.get("distance"),O=a(D/m);l.add(new nt({style:Rt({},p,{text:B,x:I*(f-_-k)+u,y:L*(f-_-k)+h,textVerticalAlign:L<-.4?"top":L>.4?"bottom":"middle",textAlign:I<-.4?"left":I>.4?"right":"center"},{autoColor:O}),silent:!0}))}if(g.get("show")&&D!==m){for(var V=0;V<=y;V++){var I=Math.cos(w),L=Math.sin(w),H=new ee({shape:{x1:I*f+u,y1:L*f+h,x2:I*(f-x)+u,y2:L*(f-x)+h},silent:!0,style:C});C.stroke==="auto"&&H.setStyle({stroke:a((D+V/y)/m)}),l.add(H),w+=b}w-=b}else w+=S}},_renderPointer:function(t,e,r,a,i,n,o,s){var l=this.group,u=this._data;if(!t.get("pointer.show")){u&&u.eachItemGraphicEl(function(d){l.remove(d)});return}var h=[+t.get("min"),+t.get("max")],f=[n,o],c=t.getData(),v=c.mapDimension("value");c.diff(u).add(function(d){var g=new FE({shape:{angle:n}});oe(g,{shape:{angle:At(c.get(v,d),h,f,!0)}},t),l.add(g),c.setItemGraphicEl(d,g)}).update(function(d,g){var p=u.getItemGraphicEl(g);tt(p,{shape:{angle:At(c.get(v,d),h,f,!0)}},t),l.add(p),c.setItemGraphicEl(d,p)}).remove(function(d){var g=u.getItemGraphicEl(d);l.remove(g)}).execute(),c.eachItemGraphicEl(function(d,g){var p=c.getItemModel(g),m=p.getModel("pointer");d.setShape({x:i.cx,y:i.cy,width:R(m.get("width"),i.r),r:R(m.get("length"),i.r)}),d.useStyle(p.getModel("itemStyle").getItemStyle()),d.style.fill==="auto"&&d.setStyle("fill",a(At(c.get(v,g),h,[0,1],!0))),St(d,p.getModel("emphasis.itemStyle").getItemStyle())}),this._data=c},_renderTitle:function(t,e,r,a,i){var n=t.getData(),o=n.mapDimension("value"),s=t.getModel("title");if(s.get("show")){var l=s.get("offsetCenter"),u=i.cx+R(l[0],i.r),h=i.cy+R(l[1],i.r),f=+t.get("min"),c=+t.get("max"),v=t.getData().get(o,0),d=a(At(v,[f,c],[0,1],!0));this.group.add(new nt({silent:!0,style:Rt({},s,{x:u,y:h,text:n.getName(0),textAlign:"center",textVerticalAlign:"middle"},{autoColor:d,forceRich:!0})}))}},_renderDetail:function(t,e,r,a,i){var n=t.getModel("detail"),o=+t.get("min"),s=+t.get("max");if(n.get("show")){var l=n.get("offsetCenter"),u=i.cx+R(l[0],i.r),h=i.cy+R(l[1],i.r),f=R(n.get("width"),i.r),c=R(n.get("height"),i.r),v=t.getData(),d=v.get(v.mapDimension("value"),0),g=a(At(d,[o,s],[0,1],!0));this.group.add(new nt({silent:!0,style:Rt({},n,{x:u,y:h,text:tw(d,n.get("formatter")),textWidth:isNaN(f)?null:f,textHeight:isNaN(c)?null:c,textAlign:"center",textVerticalAlign:"middle"},{autoColor:g,forceRich:!0})}))}}}),ew=su({type:"series.funnel",init:function(t){ew.superApply(this,"init",arguments),this.legendVisualProvider=new ts(X(this.getData,this),X(this.getRawData,this)),this._defaultLabelLine(t)},getInitialData:function(t,e){return wn(this,{coordDimensions:["value"],encodeDefaulter:K(Gc,this)})},_defaultLabelLine:function(t){Ua(t,"labelLine",["show"]);var e=t.labelLine,r=t.emphasis.labelLine;e.show=e.show&&t.label.show,r.show=r.show&&t.emphasis.label.show},getDataParams:function(t){var e=this.getData(),r=ew.superCall(this,"getDataParams",t),a=e.mapDimension("value"),i=e.getSum(a);return r.percent=i?+(e.get(a,t)/i*100).toFixed(2):0,r.$vars.push("percent"),r},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1,type:"solid"}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}}}});function zd(t,e){G.call(this);var r=new Se,a=new Ve,i=new nt;this.add(r),this.add(a),this.add(i),this.highDownOnUpdate=function(n,o){o==="emphasis"?(a.ignore=a.hoverIgnore,i.ignore=i.hoverIgnore):(a.ignore=a.normalIgnore,i.ignore=i.normalIgnore)},this.updateData(t,e,!0)}var rw=zd.prototype,$E=["itemStyle","opacity"];rw.updateData=function(t,e,r){var a=this.childAt(0),i=t.hostModel,n=t.getItemModel(e),o=t.getItemLayout(e),s=t.getItemModel(e).get($E);s=s??1,a.useStyle({}),r?(a.setShape({points:o.points}),a.setStyle({opacity:0}),oe(a,{style:{opacity:s}},i,e)):tt(a,{style:{opacity:s},shape:{points:o.points}},i,e);var l=n.getModel("itemStyle"),u=t.getItemVisual(e,"color");a.setStyle(U({lineJoin:"round",fill:u},l.getItemStyle(["opacity"]))),a.hoverStyle=l.getModel("emphasis").getItemStyle(),this._updateLabel(t,e),St(this)},rw._updateLabel=function(t,e){var r=this.childAt(1),a=this.childAt(2),i=t.hostModel,n=t.getItemModel(e),o=t.getItemLayout(e),s=o.label,c=t.getItemVisual(e,"color");tt(r,{shape:{points:s.linePoints||s.linePoints}},i,e),tt(a,{style:{x:s.x,y:s.y}},i,e),a.attr({rotation:s.rotation,origin:[s.x,s.y],z2:10});var l=n.getModel("label"),u=n.getModel("emphasis.label"),h=n.getModel("labelLine"),f=n.getModel("emphasis.labelLine"),c=t.getItemVisual(e,"color");Te(a.style,a.hoverStyle={},l,u,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:t.getName(e),autoColor:c,useInsideStyle:!!s.inside},{textAlign:s.textAlign,textVerticalAlign:s.verticalAlign}),a.ignore=a.normalIgnore=!l.get("show"),a.hoverIgnore=!u.get("show"),r.ignore=r.normalIgnore=!h.get("show"),r.hoverIgnore=!f.get("show"),r.setStyle({stroke:c}),r.setStyle(h.getModel("lineStyle").getLineStyle()),r.hoverStyle=f.getModel("lineStyle").getLineStyle()},yt(zd,G);var r5=Yt.extend({type:"funnel",render:function(t,e,r){var a=t.getData(),i=this._data,n=this.group;a.diff(i).add(function(o){var s=new zd(a,o);a.setItemGraphicEl(o,s),n.add(s)}).update(function(o,s){var l=i.getItemGraphicEl(s);l.updateData(a,o),n.add(l),a.setItemGraphicEl(o,l)}).remove(function(o){var s=i.getItemGraphicEl(o);n.remove(s)}).execute(),this._data=a},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}});function ZE(t,e){return Ot(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function YE(t,e){for(var r=t.mapDimension("value"),a=t.mapArray(r,function(l){return l}),i=[],n=e==="ascending",o=0,s=t.count();o<s;o++)i[o]=o;return typeof e=="function"?i.sort(e):e!=="none"&&i.sort(function(l,u){return n?a[l]-a[u]:a[u]-a[l]}),i}function XE(t){t.each(function(e){var r=t.getItemModel(e),a=r.getModel("label"),i=a.get("position"),n=r.getModel("labelLine"),o=t.getItemLayout(e),s=o.points,l=i==="inner"||i==="inside"||i==="center"||i==="insideLeft"||i==="insideRight",u,h,f,c;if(l)i==="insideLeft"?(h=(s[0][0]+s[3][0])/2+5,f=(s[0][1]+s[3][1])/2,u="left"):i==="insideRight"?(h=(s[1][0]+s[2][0])/2-5,f=(s[1][1]+s[2][1])/2,u="right"):(h=(s[0][0]+s[1][0]+s[2][0]+s[3][0])/4,f=(s[0][1]+s[1][1]+s[2][1]+s[3][1])/4,u="center"),c=[[h,f],[h,f]];else{var v,d,g,p=n.get("length");i==="left"?(v=(s[3][0]+s[0][0])/2,d=(s[3][1]+s[0][1])/2,g=v-p,h=g-5,u="right"):i==="right"?(v=(s[1][0]+s[2][0])/2,d=(s[1][1]+s[2][1])/2,g=v+p,h=g+5,u="left"):i==="rightTop"?(v=s[1][0],d=s[1][1],g=v+p,h=g+5,u="top"):i==="rightBottom"?(v=s[2][0],d=s[2][1],g=v+p,h=g+5,u="bottom"):i==="leftTop"?(v=s[0][0],d=s[1][1],g=v-p,h=g-5,u="right"):i==="leftBottom"?(v=s[3][0],d=s[2][1],g=v-p,h=g-5,u="right"):(v=(s[1][0]+s[2][0])/2,d=(s[1][1]+s[2][1])/2,g=v+p,h=g+5,u="left");var m=d;c=[[v,d],[g,m]],f=m}o.label={linePoints:c,x:h,y:f,verticalAlign:"middle",textAlign:u,inside:l}})}var qE=function(t,e,r){t.eachSeriesByType("funnel",function(a){var i=a.getData(),n=i.mapDimension("value"),o=a.get("sort"),s=ZE(a,e),l=YE(i,o),u=[R(a.get("minSize"),s.width),R(a.get("maxSize"),s.width)],h=i.getDataExtent(n),f=a.get("min"),c=a.get("max");f==null&&(f=Math.min(h[0],0)),c==null&&(c=h[1]);var v=a.get("funnelAlign"),d=a.get("gap"),g=(s.height-d*(i.count()-1))/i.count(),p=s.y,m=function(C,D){var I=i.get(n,C)||0,L=At(I,[f,c],u,!0),M;switch(v){case"left":M=s.x;break;case"center":M=s.x+(s.width-L)/2;break;case"right":M=s.x+s.width-L;break}return[[M,D],[M+L,D]]};o==="ascending"&&(g=-g,d=-d,p+=s.height,l=l.reverse());for(var y=0;y<l.length;y++){var _=l[y],x=l[y+1],w=i.getItemModel(_),S=w.get("itemStyle.height");S==null?S=g:(S=R(S,s.height),o==="ascending"&&(S=-S));var b=m(_,p),A=m(x,p+S);p+=S+d,i.setItemLayout(_,{points:b.concat(A.slice().reverse())})}XE(i)})};bt(Tu("funnel")),It(qE),Ie(es("funnel"));var KE=function(t){QE(t),JE(t)};function QE(t){if(!t.parallel){var e=!1;T(t.series,function(r){r&&r.type==="parallel"&&(e=!0)}),e&&(t.parallel=[{}])}}function JE(t){var e=te(t.parallelAxis);T(e,function(r){if(!!Q(r)){var a=r.parallelIndex||0,i=te(t.parallel)[a];i&&i.parallelAxisDefault&&J(r,i.parallelAxisDefault,!1)}})}var Wu=function(t,e,r,a,i){Vt.call(this,t,e,r),this.type=a||"value",this.axisIndex=i};Wu.prototype={constructor:Wu,model:null,isHorizontal:function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"}},yt(Wu,Vt);var pi=function(t,e,r,a,i,n){t=t||0;var o=r[1]-r[0];if(i!=null&&(i=Pn(i,[0,o])),n!=null&&(n=Math.max(n,i??0)),a==="all"){var s=Math.abs(e[1]-e[0]);s=Pn(s,[0,o]),i=n=Pn(s,[i,n]),a=0}e[0]=Pn(e[0],r),e[1]=Pn(e[1],r);var l=Bd(e,a);e[a]+=t;var u=i||0,h=r.slice();l.sign<0?h[0]+=u:h[1]-=u,e[a]=Pn(e[a],h);var f=Bd(e,a);i!=null&&(f.sign!==l.sign||f.span<i)&&(e[1-a]=e[a]+l.sign*i);var f=Bd(e,a);return n!=null&&f.span>n&&(e[1-a]=e[a]+f.sign*n),e};function Bd(t,e){var r=t[e]-t[1-e];return{span:Math.abs(r),sign:r>0?-1:r<0?1:e?-1:1}}function Pn(t,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,t))}var Vd=T,aw=Math.min,iw=Math.max,nw=Math.floor,jE=Math.ceil,ow=Ft,tR=Math.PI;function Gd(t,e,r){this._axesMap=j(),this._axesLayout={},this.dimensions=t.dimensions,this._rect,this._model=t,this._init(t,e,r)}Gd.prototype={type:"parallel",constructor:Gd,_init:function(t,e,r){var a=t.dimensions,i=t.parallelAxisIndex;Vd(a,function(n,o){var s=i[o],l=e.getComponent("parallelAxis",s),u=this._axesMap.set(n,new Wu(n,dn(l),[0,0],l.get("type"),s)),h=u.type==="category";u.onBand=h&&l.get("boundaryGap"),u.inverse=l.get("inverse"),l.axis=u,u.model=l,u.coordinateSystem=l.coordinateSystem=this},this)},update:function(t,e){this._updateAxesFromSeries(this._model,t)},containPoint:function(t){var e=this._makeLayoutInfo(),r=e.axisBase,a=e.layoutBase,i=e.pixelDimIndex,n=t[1-i],o=t[i];return n>=r&&n<=r+e.axisLength&&o>=a&&o<=a+e.layoutLength},getModel:function(){return this._model},_updateAxesFromSeries:function(t,e){e.eachSeries(function(r){if(!!t.contains(r,e)){var a=r.getData();Vd(this.dimensions,function(i){var n=this._axesMap.get(i);n.scale.unionExtentFromData(a,a.mapDimension(i)),xa(n.scale,n.model)},this)}},this)},resize:function(t,e){this._rect=Ot(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},getRect:function(){return this._rect},_makeLayoutInfo:function(){var t=this._model,e=this._rect,r=["x","y"],a=["width","height"],i=t.get("layout"),n=i==="horizontal"?0:1,o=e[a[n]],s=[0,o],l=this.dimensions.length,u=Uu(t.get("axisExpandWidth"),s),h=Uu(t.get("axisExpandCount")||0,[0,l]),f=t.get("axisExpandable")&&l>3&&l>h&&h>1&&u>0&&o>0,c=t.get("axisExpandWindow"),v;if(c)v=Uu(c[1]-c[0],s),c[1]=c[0]+v;else{v=Uu(u*(h-1),s);var d=t.get("axisExpandCenter")||nw(l/2);c=[u*d-v/2],c[1]=c[0]+v}var g=(o-v)/(l-h);g<3&&(g=0);var p=[nw(ow(c[0]/u,1))+1,jE(ow(c[1]/u,1))-1],m=g/u*c[0];return{layout:i,pixelDimIndex:n,layoutBase:e[r[n]],layoutLength:o,axisBase:e[r[1-n]],axisLength:e[a[1-n]],axisExpandable:f,axisExpandWidth:u,axisCollapseWidth:g,axisExpandWindow:c,axisCount:l,winInnerIndices:p,axisExpandWindow0Pos:m}},_layoutAxes:function(){var t=this._rect,e=this._axesMap,r=this.dimensions,a=this._makeLayoutInfo(),i=a.layout;e.each(function(n){var o=[0,a.axisLength],s=n.inverse?1:0;n.setExtent(o[s],o[1-s])}),Vd(r,function(n,o){var s=(a.axisExpandable?rR:eR)(o,a),l={horizontal:{x:s.position,y:a.axisLength},vertical:{x:0,y:s.position}},u={horizontal:tR/2,vertical:0},h=[l[i].x+t.x,l[i].y+t.y],f=u[i],c=ce();Or(c,c,f),Je(c,c,h),this._axesLayout[n]={position:h,rotation:f,transform:c,axisNameAvailableWidth:s.axisNameAvailableWidth,axisLabelShow:s.axisLabelShow,nameTruncateMaxWidth:s.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},getAxis:function(t){return this._axesMap.get(t)},dataToPoint:function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},eachActiveState:function(t,e,r,a){r==null&&(r=0),a==null&&(a=t.count());var i=this._axesMap,n=this.dimensions,o=[],s=[];T(n,function(g){o.push(t.mapDimension(g)),s.push(i.get(g).model)});for(var l=this.hasAxisBrushed(),u=r;u<a;u++){var h;if(!l)h="normal";else{h="active";for(var f=t.getValues(o,u),c=0,v=n.length;c<v;c++){var d=s[c].getActiveState(f[c]);if(d==="inactive"){h="inactive";break}}}e(h,u)}},hasAxisBrushed:function(){for(var t=this.dimensions,e=this._axesMap,r=!1,a=0,i=t.length;a<i;a++)e.get(t[a]).model.getActiveState()!=="normal"&&(r=!0);return r},axisCoordToPoint:function(t,e){var r=this._axesLayout[e];return xr([t,0],r.transform)},getAxisLayout:function(t){return Y(this._axesLayout[t])},getSlidedAxisExpandWindow:function(t){var e=this._makeLayoutInfo(),r=e.pixelDimIndex,a=e.axisExpandWindow.slice(),i=a[1]-a[0],n=[0,e.axisExpandWidth*(e.axisCount-1)];if(!this.containPoint(t))return{behavior:"none",axisExpandWindow:a};var o=t[r]-e.layoutBase-e.axisExpandWindow0Pos,s,l="slide",u=e.axisCollapseWidth,h=this._model.get("axisExpandSlideTriggerArea"),f=h[0]!=null;if(u)f&&u&&o<i*h[0]?(l="jump",s=o-i*h[2]):f&&u&&o>i*(1-h[0])?(l="jump",s=o-i*(1-h[2])):(s=o-i*h[1])>=0&&(s=o-i*(1-h[1]))<=0&&(s=0),s*=e.axisExpandWidth/u,s?pi(s,a,n,"all"):l="none";else{var i=a[1]-a[0],c=n[1]*o/i;a=[iw(0,c-i/2)],a[1]=aw(n[1],a[0]+i),a[0]=a[1]-i}return{axisExpandWindow:a,behavior:l}}};function Uu(t,e){return aw(iw(t,e[0]),e[1])}function eR(t,e){var r=e.layoutLength/(e.axisCount-1);return{position:r*t,axisNameAvailableWidth:r,axisLabelShow:!0}}function rR(t,e){var r=e.layoutLength,a=e.axisExpandWidth,i=e.axisCount,n=e.axisCollapseWidth,o=e.winInnerIndices,s,l=n,u=!1,h;return t<o[0]?(s=t*n,h=n):t<=o[1]?(s=e.axisExpandWindow0Pos+t*a-e.axisExpandWindow[0],l=a,u=!0):(s=r-(i-1-t)*n,h=n),{position:s,axisNameAvailableWidth:l,axisLabelShow:u,nameTruncateMaxWidth:h}}function aR(t,e){var r=[];return t.eachComponent("parallel",function(a,i){var n=new Gd(a,t,e);n.name="parallel_"+i,n.resize(a,e),a.coordinateSystem=n,n.model=a,r.push(n)}),t.eachSeries(function(a){if(a.get("coordinateSystem")==="parallel"){var i=t.queryComponents({mainType:"parallel",index:a.get("parallelIndex"),id:a.get("parallelId")})[0];a.coordinateSystem=i.coordinateSystem}}),r}re.register("parallel",{create:aR});var sw=ct.extend({type:"baseParallelAxis",axis:null,activeIntervals:[],getAreaSelectStyle:function(){return qi([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},setActiveIntervals:function(t){var e=this.activeIntervals=Y(t);if(e)for(var r=e.length-1;r>=0;r--)Ja(e[r])},getActiveState:function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(t==null||isNaN(t))return"inactive";if(e.length===1){var r=e[0];if(r[0]<=t&&t<=r[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"}}),iR={type:"value",dim:null,areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};J(sw.prototype,oi);function nR(t,e){return e.type||(e.data?"category":"value")}mn("parallel",sw,nR,iR),ct.extend({type:"parallel",dependencies:["parallelAxis"],coordinateSystem:null,dimensions:null,parallelAxisIndex:null,layoutMode:"box",defaultOption:{zlevel:0,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},init:function(){ct.prototype.init.apply(this,arguments),this.mergeOption({})},mergeOption:function(t){var e=this.option;t&&J(e,t,!0),this._initDimensions()},contains:function(t,e){var r=t.get("parallelIndex");return r!=null&&e.getComponent("parallel",r)===this},setAxisExpand:function(t){T(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(e){t.hasOwnProperty(e)&&(this.option[e]=t[e])},this)},_initDimensions:function(){var t=this.dimensions=[],e=this.parallelAxisIndex=[],r=Ht(this.dependentModels.parallelAxis,function(a){return(a.get("parallelIndex")||0)===this.componentIndex},this);T(r,function(a){t.push("dim"+a.get("dim")),e.push(a.componentIndex)})}});var oR={type:"axisAreaSelect",event:"axisAreaSelected"};lt(oR,function(t,e){e.eachComponent({mainType:"parallelAxis",query:t},function(r){r.axis.model.setActiveIntervals(t.intervals)})}),lt("parallelAxisExpand",function(t,e){e.eachComponent({mainType:"parallel",query:t},function(r){r.setAxisExpand(t)})});var Ia=K,Dr=T,sR=E,_s=Math.min,En=Math.max,lR=Math.pow,uR=1e4,hR=6,fR=6,lw="globalPan",cR={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},vR={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},uw={brushStyle:{lineWidth:2,stroke:"rgba(0,0,0,0.3)",fill:"rgba(0,0,0,0.1)"},transformable:!0,brushMode:"single",removeOnClick:!1},dR=0;function Rn(t){z&&ot(t),Zt.call(this),this._zr=t,this.group=new G,this._brushType,this._brushOption,this._panels,this._track=[],this._dragging,this._covers=[],this._creatingCover,this._creatingPanel,this._enableGlobalPan,z&&this._mounted,this._uid="brushController_"+dR++,this._handlers={},Dr(AR,function(e,r){this._handlers[r]=X(e,this)},this)}Rn.prototype={constructor:Rn,enableBrush:function(t){return z&&ot(this._mounted),this._brushType&&pR(this),t.brushType&&gR(this,t),this},setPanels:function(t){if(t&&t.length){var e=this._panels={};T(t,function(r){e[r.panelId]=Y(r)})}else this._panels=null;return this},mount:function(t){t=t||{},z&&(this._mounted=!0),this._enableGlobalPan=t.enableGlobalPan;var e=this.group;return this._zr.add(e),e.attr({position:t.position||[0,0],rotation:t.rotation||0,scale:t.scale||[1,1]}),this._transform=e.getLocalTransform(),this},eachCover:function(t,e){Dr(this._covers,t,e)},updateCovers:function(t){z&&ot(this._mounted),t=E(t,function(h){return J(Y(uw),h,!0)});var e="\0-brush-index-",r=this._covers,a=this._covers=[],i=this,n=this._creatingCover;return new Wr(r,t,s,o).add(l).update(l).remove(u).execute(),this;function o(h,f){return(h.id!=null?h.id:e+f)+"-"+h.brushType}function s(h,f){return o(h.__brushOption,f)}function l(h,f){var c=t[h];if(f!=null&&r[f]===n)a[h]=r[f];else{var v=a[h]=f!=null?(r[f].__brushOption=c,r[f]):fw(i,hw(i,c));Hd(i,v)}}function u(h){r[h]!==n&&i.group.remove(r[h])}},unmount:function(){if(!(z&&!this._mounted))return this.enableBrush(!1),Ud(this),this._zr.remove(this.group),z&&(this._mounted=!1),this},dispose:function(){this.unmount(),this.off()}},pt(Rn,Zt);function gR(t,e){var r=t._zr;t._enableGlobalPan||hP(r,lw,t._uid),mR(r,t._handlers),t._brushType=e.brushType,t._brushOption=J(Y(uw),e,!0)}function pR(t){var e=t._zr;fP(e,lw,t._uid),yR(e,t._handlers),t._brushType=t._brushOption=null}function mR(t,e){Dr(e,function(r,a){t.on(a,r)})}function yR(t,e){Dr(e,function(r,a){t.off(a,r)})}function hw(t,e){var r=$u[e.brushType].createCover(t,e);return r.__brushOption=e,vw(r,e),t.group.add(r),r}function fw(t,e){var r=Fd(e);return r.endCreating&&(r.endCreating(t,e),vw(e,e.__brushOption)),e}function cw(t,e){var r=e.__brushOption;Fd(e).updateCoverShape(t,e,r.range,r)}function vw(t,e){var r=e.z;r==null&&(r=uR),t.traverse(function(a){a.z=r,a.z2=r})}function Hd(t,e){Fd(e).updateCommon(t,e),cw(t,e)}function Fd(t){return $u[t.__brushOption.brushType]}function Wd(t,e,r){var a=t._panels;if(!a)return!0;var i,n=t._transform;return Dr(a,function(o){o.isTargetByCursor(e,r,n)&&(i=o)}),i}function dw(t,e){var r=t._panels;if(!r)return!0;var a=e.__brushOption.panelId;return a!=null?r[a]:!0}function Ud(t){var e=t._covers,r=e.length;return Dr(e,function(a){t.group.remove(a)},t),e.length=0,!!r}function mi(t,e){var r=sR(t._covers,function(a){var i=a.__brushOption,n=Y(i.range);return{brushType:i.brushType,panelId:i.panelId,range:n}});t.trigger("brush",r,{isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function _R(t){var e=t._track;if(!e.length)return!1;var r=e[e.length-1],a=e[0],i=r[0]-a[0],n=r[1]-a[1],o=lR(i*i+n*n,.5);return o>hR}function gw(t){var e=t.length-1;return e<0&&(e=0),[t[0],t[e]]}function pw(t,e,r,a){var i=new G;return i.add(new ft({name:"main",style:Zd(r),silent:!0,draggable:!0,cursor:"move",drift:Ia(t,e,i,"nswe"),ondragend:Ia(mi,e,{isEnd:!0})})),Dr(a,function(n){i.add(new ft({name:n,style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:Ia(t,e,i,n),ondragend:Ia(mi,e,{isEnd:!0})}))}),i}function mw(t,e,r,a){var i=a.brushStyle.lineWidth||0,n=En(i,fR),o=r[0][0],s=r[1][0],l=o-i/2,u=s-i/2,h=r[0][1],f=r[1][1],c=h-n+i/2,v=f-n+i/2,d=h-o,g=f-s,p=d+i,m=g+i;Yr(t,e,"main",o,s,d,g),a.transformable&&(Yr(t,e,"w",l,u,n,m),Yr(t,e,"e",c,u,n,m),Yr(t,e,"n",l,u,p,n),Yr(t,e,"s",l,v,p,n),Yr(t,e,"nw",l,u,n,n),Yr(t,e,"ne",c,u,n,n),Yr(t,e,"sw",l,v,n,n),Yr(t,e,"se",c,v,n,n))}function $d(t,e){var r=e.__brushOption,a=r.transformable,i=e.childAt(0);i.useStyle(Zd(r)),i.attr({silent:!a,cursor:a?"move":"default"}),Dr(["w","e","n","s","se","sw","ne","nw"],function(n){var o=e.childOfName(n),s=Yd(t,n);o&&o.attr({silent:!a,invisible:!a,cursor:a?vR[s]+"-resize":null})})}function Yr(t,e,r,a,i,n,o){var s=e.childOfName(r);s&&s.setShape(bR(Xd(t,e,[[a,i],[a+n,i+o]])))}function Zd(t){return U({strokeNoScale:!0},t.brushStyle)}function yw(t,e,r,a){var i=[_s(t,r),_s(e,a)],n=[En(t,r),En(e,a)];return[[i[0],n[0]],[i[1],n[1]]]}function xR(t){return Qa(t.group)}function Yd(t,e){if(e.length>1){e=e.split("");var r=[Yd(t,e[0]),Yd(t,e[1])];return(r[0]==="e"||r[0]==="w")&&r.reverse(),r.join("")}else{var a={w:"left",e:"right",n:"top",s:"bottom"},i={left:"w",right:"e",top:"n",bottom:"s"},r=Ac(a[e],xR(t));return i[r]}}function _w(t,e,r,a,i,n,o,s){var l=a.__brushOption,u=t(l.range),h=xw(r,n,o);Dr(i.split(""),function(f){var c=cR[f];u[c[0]][c[1]]+=h[c[0]]}),l.range=e(yw(u[0][0],u[1][0],u[0][1],u[1][1])),Hd(r,a),mi(r,{isEnd:!1})}function wR(t,e,r,a,i){var n=e.__brushOption.range,o=xw(t,r,a);Dr(n,function(s){s[0]+=o[0],s[1]+=o[1]}),Hd(t,e),mi(t,{isEnd:!1})}function xw(t,e,r){var a=t.group,i=a.transformCoordToLocal(e,r),n=a.transformCoordToLocal(0,0);return[i[0]-n[0],i[1]-n[1]]}function Xd(t,e,r){var a=dw(t,e);return a&&a!==!0?a.clipPath(r,t._transform):Y(r)}function bR(t){var e=_s(t[0][0],t[1][0]),r=_s(t[0][1],t[1][1]),a=En(t[0][0],t[1][0]),i=En(t[0][1],t[1][1]);return{x:e,y:r,width:a-e,height:i-r}}function SR(t,e,r){if(!(!t._brushType||TR(t,e))){var a=t._zr,i=t._covers,n=Wd(t,e,r);if(!t._dragging)for(var o=0;o<i.length;o++){var s=i[o].__brushOption;if(n&&(n===!0||s.panelId===n.panelId)&&$u[s.brushType].contain(i[o],r[0],r[1]))return}n&&a.setCursorStyle("crosshair")}}function qd(t){var e=t.event;e.preventDefault&&e.preventDefault()}function Kd(t,e,r){return t.childOfName("main").contain(e,r)}function ww(t,e,r,a){var i=t._creatingCover,n=t._creatingPanel,o=t._brushOption,s;if(t._track.push(r.slice()),_R(t)||i){if(n&&!i){o.brushMode==="single"&&Ud(t);var l=Y(o);l.brushType=bw(l.brushType,n),l.panelId=n===!0?null:n.panelId,i=t._creatingCover=hw(t,l),t._covers.push(i)}if(i){var u=$u[bw(t._brushType,n)],h=i.__brushOption;h.range=u.getCreatingRange(Xd(t,i,t._track)),a&&(fw(t,i),u.updateCommon(t,i)),cw(t,i),s={isEnd:a}}}else a&&o.brushMode==="single"&&o.removeOnClick&&Wd(t,e,r)&&Ud(t)&&(s={isEnd:a,removeOnClick:!0});return s}function bw(t,e){return t==="auto"?(z&&ot(e&&e.defaultBrushType,'MUST have defaultBrushType when brushType is "atuo"'),e.defaultBrushType):t}var AR={mousedown:function(t){if(this._dragging)Sw(this,t);else if(!t.target||!t.target.draggable){qd(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null;var r=this._creatingPanel=Wd(this,t,e);r&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=t.offsetX,r=t.offsetY,a=this.group.transformCoordToLocal(e,r);if(SR(this,t,a),this._dragging){qd(t);var i=ww(this,t,a,!1);i&&mi(this,i)}},mouseup:function(t){Sw(this,t)}};function Sw(t,e){if(t._dragging){qd(e);var r=e.offsetX,a=e.offsetY,i=t.group.transformCoordToLocal(r,a),n=ww(t,e,i,!0);t._dragging=!1,t._track=[],t._creatingCover=null,n&&mi(t,n)}}function TR(t,e,r){var a=t._zr;return e<0||e>a.getWidth()||r<0||r>a.getHeight()}var $u={lineX:Aw(0),lineY:Aw(1),rect:{createCover:function(t,e){return pw(Ia(_w,function(r){return r},function(r){return r}),t,e,["w","e","n","s","se","sw","ne","nw"])},getCreatingRange:function(t){var e=gw(t);return yw(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(t,e,r,a){mw(t,e,r,a)},updateCommon:$d,contain:Kd},polygon:{createCover:function(t,e){var r=new G;return r.add(new Ve({name:"main",style:Zd(e),silent:!0})),r},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new Se({name:"main",draggable:!0,drift:Ia(wR,t,e),ondragend:Ia(mi,t,{isEnd:!0})}))},updateCoverShape:function(t,e,r,a){e.childAt(0).setShape({points:Xd(t,e,r)})},updateCommon:$d,contain:Kd}};function Aw(t){return{createCover:function(e,r){return pw(Ia(_w,function(a){var i=[a,[0,100]];return t&&i.reverse(),i},function(a){return a[t]}),e,r,[["w","e"],["n","s"]][t])},getCreatingRange:function(e){var r=gw(e),a=_s(r[0][t],r[1][t]),i=En(r[0][t],r[1][t]);return[a,i]},updateCoverShape:function(e,r,a,i){var n,o=dw(e,r);if(o!==!0&&o.getLinearBrushOtherExtent)n=o.getLinearBrushOtherExtent(t,e._transform);else{var s=e._zr;n=[0,[s.getWidth(),s.getHeight()][1-t]]}var l=[a,n];t&&l.reverse(),mw(e,r,l,i)},updateCommon:$d,contain:Kd}}function Tw(t){return t=Qd(t),function(e,r){return B0(e,t)}}function Cw(t,e){return t=Qd(t),function(r){var a=e??r,i=a?t.width:t.height,n=a?t.x:t.y;return[n,n+(i||0)]}}function Dw(t,e,r){return t=Qd(t),function(a,i,n){return t.contain(i[0],i[1])&&!Mu(a,e,r)}}function Qd(t){return it.create(t)}var CR=["axisLine","axisTickLabel","axisName"],DR=Xt({type:"parallelAxis",init:function(t,e){DR.superApply(this,"init",arguments),(this._brushController=new Rn(e.getZr())).on("brush",X(this._onBrush,this))},render:function(t,e,r,a){if(!IR(t,e,a)){this.axisModel=t,this.api=r,this.group.removeAll();var i=this._axisGroup;if(this._axisGroup=new G,this.group.add(this._axisGroup),!!t.get("show")){var n=LR(t,e),o=n.coordinateSystem,s=t.getAreaSelectStyle(),l=s.width,u=t.axis.dim,h=o.getAxisLayout(u),f=Z({strokeContainThreshold:l},h),c=new xe(t,f);T(CR,c.add,c),this._axisGroup.add(c.getGroup()),this._refreshBrushController(f,s,t,n,l,r);var v=a&&a.animation===!1?null:t;Ol(i,this._axisGroup,v)}}},_refreshBrushController:function(t,e,r,a,i,n){var o=r.axis.getExtent(),s=o[1]-o[0],l=Math.min(30,Math.abs(s)*.1),u=it.create({x:o[0],y:-i/2,width:s,height:i});u.x-=l,u.width+=2*l,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,position:t.position}).setPanels([{panelId:"pl",clipPath:Tw(u),isTargetByCursor:Dw(u,n,a),getLinearBrushOtherExtent:Cw(u,0)}]).enableBrush({brushType:"lineX",brushStyle:e,removeOnClick:!0}).updateCovers(MR(r))},_onBrush:function(t,e){var r=this.axisModel,a=r.axis,i=E(t,function(n){return[a.coordToData(n.range[0],!0),a.coordToData(n.range[1],!0)]});(!r.option.realtime===e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:r.id,intervals:i})},dispose:function(){this._brushController.dispose()}});function IR(t,e,r){return r&&r.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:r})[0]===t}function MR(t){var e=t.axis;return E(t.activeIntervals,function(r){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(r[0],!0),e.dataToCoord(r[1],!0)]}})}function LR(t,e){return e.getComponent("parallel",t.get("parallelIndex"))}var PR=5;Xt({type:"parallel",render:function(t,e,r){this._model=t,this._api=r,this._handlers||(this._handlers={},T(ER,function(a,i){r.getZr().on(i,this._handlers[i]=X(a,this))},this)),ko(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},dispose:function(t,e){T(this._handlers,function(r,a){e.getZr().off(a,r)}),this._handlers=null},_throttledDispatchExpand:function(t){this._dispatchExpand(t)},_dispatchExpand:function(t){t&&this._api.dispatchAction(Z({type:"parallelAxisExpand"},t))}});var ER={mousedown:function(t){Jd(this,"click")&&(this._mouseDownPoint=[t.offsetX,t.offsetY])},mouseup:function(t){var e=this._mouseDownPoint;if(Jd(this,"click")&&e){var r=[t.offsetX,t.offsetY],a=Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2);if(a>PR)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);i.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!(this._mouseDownPoint||!Jd(this,"mousemove"))){var e=this._model,r=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),a=r.behavior;a==="jump"&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand(a==="none"?null:{axisExpandWindow:r.axisExpandWindow,animation:a==="jump"?null:!1})}}};function Jd(t,e){var r=t._model;return r.get("axisExpandable")&&r.get("axisExpandTriggerOn")===e}ie(KE),Dt.extend({type:"series.parallel",dependencies:["parallel"],visualColorAccessPath:"lineStyle.color",getInitialData:function(t,e){var r=this.getSource();return RR(r,this),$r(r,this)},getRawIndicesByActiveState:function(t){var e=this.coordinateSystem,r=this.getData(),a=[];return e.eachActiveState(r,function(i,n){t===i&&a.push(r.getRawIndex(n))}),a},defaultOption:{zlevel:0,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"}});function RR(t,e){if(!t.encodeDefine){var r=e.ecModel.getComponent("parallel",e.get("parallelIndex"));if(!!r){var a=t.encodeDefine=j();T(r.dimensions,function(i){var n=kR(i);a.set(i,n)})}}}function kR(t){return+t.replace("dim","")}var Iw=.3,a5=Yt.extend({type:"parallel",init:function(){this._dataGroup=new G,this.group.add(this._dataGroup),this._data,this._initialized},render:function(t,e,r,a){var i=this._dataGroup,n=t.getData(),o=this._data,s=t.coordinateSystem,l=s.dimensions,u=Pw(t);n.diff(o).add(h).update(f).remove(c).execute();function h(d){var g=Lw(n,i,d,l,s);jd(g,n,d,u)}function f(d,g){var p=o.getItemGraphicEl(g),m=Mw(n,d,l,s);n.setItemGraphicEl(d,p);var y=a&&a.animation===!1?null:t;tt(p,{shape:{points:m}},y,d),jd(p,n,d,u)}function c(d){var g=o.getItemGraphicEl(d);i.remove(g)}if(!this._initialized){this._initialized=!0;var v=NR(s,t,function(){setTimeout(function(){i.removeClipPath()})});i.setClipPath(v)}this._data=n},incrementalPrepareRender:function(t,e,r){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},incrementalRender:function(t,e,r){for(var a=e.getData(),i=e.coordinateSystem,n=i.dimensions,o=Pw(e),s=t.start;s<t.end;s++){var l=Lw(a,this._dataGroup,s,n,i);l.incremental=!0,jd(l,a,s,o)}},dispose:function(){},remove:function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null}});function NR(t,e,r){var a=t.model,i=t.getRect(),n=new ft({shape:{x:i.x,y:i.y,width:i.width,height:i.height}}),o=a.get("layout")==="horizontal"?"width":"height";return n.setShape(o,0),oe(n,{shape:{width:i.width,height:i.height}},e,r),n}function Mw(t,e,r,a){for(var i=[],n=0;n<r.length;n++){var o=r[n],s=t.get(t.mapDimension(o),e);OR(s,a.getAxis(o).type)||i.push(a.dataToPoint(s,o))}return i}function Lw(t,e,r,a,i){var n=Mw(t,r,a,i),o=new Ve({shape:{points:n},silent:!0,z2:10});return e.add(o),t.setItemGraphicEl(r,o),o}function Pw(t){var e=t.get("smooth",!0);return e===!0&&(e=Iw),{lineStyle:t.getModel("lineStyle").getLineStyle(),smooth:e??Iw}}function jd(t,e,r,a){var i=a.lineStyle;if(e.hasItemOption){var n=e.getItemModel(r).getModel("lineStyle");i=n.getLineStyle()}t.useStyle(i);var o=t.style;o.fill=null,o.stroke=e.getItemVisual(r,"color"),o.opacity=e.getItemVisual(r,"opacity"),a.smooth&&(t.shape.smooth=a.smooth)}function OR(t,e){return e==="category"?t==null:t==null||isNaN(t)}var zR=["lineStyle","normal","opacity"],BR={seriesType:"parallel",reset:function(t,e,r){var a=t.getModel("itemStyle"),i=t.getModel("lineStyle"),n=e.get("color"),o=i.get("color")||a.get("color")||n[t.seriesIndex%n.length],s=t.get("inactiveOpacity"),l=t.get("activeOpacity"),u=t.getModel("lineStyle").getLineStyle(),h=t.coordinateSystem,f=t.getData(),c={normal:u.opacity,active:l,inactive:s};f.setVisual("color",o);function v(d,g){h.eachActiveState(g,function(p,m){var y=c[p];if(p==="normal"&&g.hasItemOption){var _=g.getItemModel(m).get(zR,!0);_!=null&&(y=_)}g.setItemVisual(m,"opacity",y)},d.start,d.end)}return{progress:v}}};bt(BR);var Ew=Dt.extend({type:"series.sankey",layoutInfo:null,levelModels:null,getInitialData:function(t,e){for(var r=t.edges||t.links,a=t.data||t.nodes,i=t.levels,n=this.levelModels={},o=0;o<i.length;o++)if(i[o].depth!=null&&i[o].depth>=0)n[i[o].depth]=new ht(i[o],this,e);else if(z)throw new Error("levels[i].depth is mandatory and should be natural number");if(a&&r){var s=Hx(a,r,this,!0,l);return s.data}function l(u,h){u.wrapMethod("getItemModel",function(f,c){return f.customizeGetParent(function(v){var d=this.parentModel,g=d.getData().getItemLayout(c).depth,p=d.levelModels[g];return p||this.parentModel}),f}),h.wrapMethod("getItemModel",function(f,c){return f.customizeGetParent(function(v){var d=this.parentModel,g=d.getGraph().getEdgeByIndex(c),p=g.node1.getLayout().depth,m=d.levelModels[p];return m||this.parentModel}),f})}},setNodePosition:function(t,e){var r=this.option.data[t];r.localX=e[0],r.localY=e[1]},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},formatTooltip:function(t,e,r){if(r==="edge"){var a=this.getDataParams(t,r),i=a.data,n=i.source+" -- "+i.target;return a.value&&(n+=" : "+a.value),Tt(n)}else if(r==="node"){var o=this.getGraph().getNodeByIndex(t),s=o.getLayout().value,l=this.getDataParams(t,r).data.name;if(s)var n=l+" : "+s;return Tt(n)}return Ew.superCall(this,"formatTooltip",t,e)},optionUpdated:function(){var t=this.option;t.focusNodeAdjacency===!0&&(t.focusNodeAdjacency="allEdges")},getDataParams:function(t,e){var r=Ew.superCall(this,"getDataParams",t,e);if(r.value==null&&e==="node"){var a=this.getGraph().getNodeByIndex(t),i=a.getLayout().value;r.value=i}return r},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",layout:null,left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,focusNodeAdjacency:!1,layoutIterations:32,label:{show:!0,position:"right",color:"#000",fontSize:12},levels:[],nodeAlign:"justify",itemStyle:{borderWidth:1,borderColor:"#333"},lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},animationEasing:"linear",animationDuration:1e3}}),Rw=["itemStyle","opacity"],yi=["emphasis","itemStyle","opacity"],kw=["lineStyle","opacity"],Zu=["emphasis","lineStyle","opacity"];function Nw(t,e){return t.getVisual("opacity")||t.getModel().get(e)}function Yu(t,e,r){var a=t.getGraphicEl(),i=Nw(t,e);r!=null&&(i==null&&(i=1),i*=r),a.downplay&&a.downplay(),a.traverse(function(n){n.type!=="group"&&n.setStyle("opacity",i)})}function ur(t,e){var r=Nw(t,e),a=t.getGraphicEl();a.traverse(function(i){i.type!=="group"&&i.setStyle("opacity",r)}),a.highlight&&a.highlight()}var VR=Ge({shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,cpx2:0,cpy2:0,extent:0,orient:""},buildPath:function(t,e){var r=e.extent;t.moveTo(e.x1,e.y1),t.bezierCurveTo(e.cpx1,e.cpy1,e.cpx2,e.cpy2,e.x2,e.y2),e.orient==="vertical"?(t.lineTo(e.x2+r,e.y2),t.bezierCurveTo(e.cpx2+r,e.cpy2,e.cpx1+r,e.cpy1,e.x1+r,e.y1)):(t.lineTo(e.x2,e.y2+r),t.bezierCurveTo(e.cpx2,e.cpy2+r,e.cpx1,e.cpy1+r,e.x1,e.y1+r)),t.closePath()},highlight:function(){this.trigger("emphasis")},downplay:function(){this.trigger("normal")}});_e({type:"sankey",_model:null,_focusAdjacencyDisabled:!1,render:function(t,e,r){var a=this,i=t.getGraph(),n=this.group,o=t.layoutInfo,s=o.width,l=o.height,u=t.getData(),h=t.getData("edge"),f=t.get("orient");this._model=t,n.removeAll(),n.attr("position",[o.x,o.y]),i.eachEdge(function(c){var v=new VR;v.dataIndex=c.dataIndex,v.seriesIndex=t.seriesIndex,v.dataType="edge";var d=c.getModel("lineStyle"),g=d.get("curveness"),p=c.node1.getLayout(),m=c.node1.getModel(),y=m.get("localX"),_=m.get("localY"),x=c.node2.getLayout(),w=c.node2.getModel(),S=w.get("localX"),b=w.get("localY"),A=c.getLayout(),C,D,I,L,M,B,k,O;switch(v.shape.extent=Math.max(1,A.dy),v.shape.orient=f,f==="vertical"?(C=(y!=null?y*s:p.x)+A.sy,D=(_!=null?_*l:p.y)+p.dy,I=(S!=null?S*s:x.x)+A.ty,L=b!=null?b*l:x.y,M=C,B=D*(1-g)+L*g,k=I,O=D*g+L*(1-g)):(C=(y!=null?y*s:p.x)+p.dx,D=(_!=null?_*l:p.y)+A.sy,I=S!=null?S*s:x.x,L=(b!=null?b*l:x.y)+A.ty,M=C*(1-g)+I*g,B=D,k=C*g+I*(1-g),O=L),v.setShape({x1:C,y1:D,x2:I,y2:L,cpx1:M,cpy1:B,cpx2:k,cpy2:O}),v.setStyle(d.getItemStyle()),v.style.fill){case"source":v.style.fill=c.node1.getVisual("color");break;case"target":v.style.fill=c.node2.getVisual("color");break}St(v,c.getModel("emphasis.lineStyle").getItemStyle()),n.add(v),h.setItemGraphicEl(c.dataIndex,v)}),i.eachNode(function(c){var v=c.getLayout(),d=c.getModel(),g=d.get("localX"),p=d.get("localY"),m=d.getModel("label"),y=d.getModel("emphasis.label"),_=new ft({shape:{x:g!=null?g*s:v.x,y:p!=null?p*l:v.y,width:v.dx,height:v.dy},style:d.getModel("itemStyle").getItemStyle()}),x=c.getModel("emphasis.itemStyle").getItemStyle();Te(_.style,x,m,y,{labelFetcher:t,labelDataIndex:c.dataIndex,defaultText:c.id,isRectText:!0}),_.setStyle("fill",c.getVisual("color")),St(_,x),n.add(_),u.setItemGraphicEl(c.dataIndex,_),_.dataType="node"}),u.eachItemGraphicEl(function(c,v){var d=u.getItemModel(v);d.get("draggable")&&(c.drift=function(g,p){a._focusAdjacencyDisabled=!0,this.shape.x+=g,this.shape.y+=p,this.dirty(),r.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:u.getRawIndex(v),localX:this.shape.x/s,localY:this.shape.y/l})},c.ondragend=function(){a._focusAdjacencyDisabled=!1},c.draggable=!0,c.cursor="move"),c.highlight=function(){this.trigger("emphasis")},c.downplay=function(){this.trigger("normal")},c.focusNodeAdjHandler&&c.off("mouseover",c.focusNodeAdjHandler),c.unfocusNodeAdjHandler&&c.off("mouseout",c.unfocusNodeAdjHandler),d.get("focusNodeAdjacency")&&(c.on("mouseover",c.focusNodeAdjHandler=function(){a._focusAdjacencyDisabled||(a._clearTimer(),r.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,dataIndex:c.dataIndex}))}),c.on("mouseout",c.unfocusNodeAdjHandler=function(){a._focusAdjacencyDisabled||a._dispatchUnfocus(r)}))}),h.eachItemGraphicEl(function(c,v){var d=h.getItemModel(v);c.focusNodeAdjHandler&&c.off("mouseover",c.focusNodeAdjHandler),c.unfocusNodeAdjHandler&&c.off("mouseout",c.unfocusNodeAdjHandler),d.get("focusNodeAdjacency")&&(c.on("mouseover",c.focusNodeAdjHandler=function(){a._focusAdjacencyDisabled||(a._clearTimer(),r.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,edgeDataIndex:c.dataIndex}))}),c.on("mouseout",c.unfocusNodeAdjHandler=function(){a._focusAdjacencyDisabled||a._dispatchUnfocus(r)}))}),!this._data&&t.get("animation")&&n.setClipPath(GR(n.getBoundingRect(),t,function(){n.removeClipPath()})),this._data=t.getData()},dispose:function(){this._clearTimer()},_dispatchUnfocus:function(t){var e=this;this._clearTimer(),this._unfocusDelayTimer=setTimeout(function(){e._unfocusDelayTimer=null,t.dispatchAction({type:"unfocusNodeAdjacency",seriesId:e._model.id})},500)},_clearTimer:function(){this._unfocusDelayTimer&&(clearTimeout(this._unfocusDelayTimer),this._unfocusDelayTimer=null)},focusNodeAdjacency:function(t,e,r,a){var i=t.getData(),n=i.graph,o=a.dataIndex,s=i.getItemModel(o),l=a.edgeDataIndex;if(!(o==null&&l==null)){var u=n.getNodeByIndex(o),h=n.getEdgeByIndex(l);if(n.eachNode(function(c){Yu(c,Rw,.1)}),n.eachEdge(function(c){Yu(c,kw,.1)}),u){ur(u,yi);var f=s.get("focusNodeAdjacency");f==="outEdges"?T(u.outEdges,function(c){c.dataIndex<0||(ur(c,Zu),ur(c.node2,yi))}):f==="inEdges"?T(u.inEdges,function(c){c.dataIndex<0||(ur(c,Zu),ur(c.node1,yi))}):f==="allEdges"&&T(u.edges,function(c){c.dataIndex<0||(ur(c,Zu),c.node1!==u&&ur(c.node1,yi),c.node2!==u&&ur(c.node2,yi))})}h&&(ur(h,Zu),ur(h.node1,yi),ur(h.node2,yi))}},unfocusNodeAdjacency:function(t,e,r,a){var i=t.getGraph();i.eachNode(function(n){Yu(n,Rw)}),i.eachEdge(function(n){Yu(n,kw)})}});function GR(t,e,r){var a=new ft({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return oe(a,{shape:{width:t.width+20}},e,r),a}lt({type:"dragNode",event:"dragnode",update:"update"},function(t,e){e.eachComponent({mainType:"series",subType:"sankey",query:t},function(r){r.setNodePosition(t.dataIndex,[t.localX,t.localY])})});var HR=function(t,e,r){t.eachSeriesByType("sankey",function(a){var i=a.get("nodeWidth"),n=a.get("nodeGap"),o=FR(a,e);a.layoutInfo=o;var s=o.width,l=o.height,u=a.getGraph(),h=u.nodes,f=u.edges;UR(h);var c=Ht(h,function(p){return p.getLayout().value===0}),v=c.length!==0?0:a.get("layoutIterations"),d=a.get("orient"),g=a.get("nodeAlign");WR(h,f,i,n,s,l,v,d,g)})};function FR(t,e){return Ot(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function WR(t,e,r,a,i,n,o,s,l){$R(t,e,r,i,n,s,l),qR(t,e,n,i,a,o,s),ik(t,s)}function UR(t){T(t,function(e){var r=La(e.outEdges,Xu),a=La(e.inEdges,Xu),i=e.getValue()||0,n=Math.max(r,a,i);e.setLayout({value:n},!0)})}function $R(t,e,r,a,i,n,o){for(var s=[],l=[],u=[],h=[],f=0,A=0,c=0;c<e.length;c++)s[c]=1;for(c=0;c<t.length;c++)l[c]=t[c].inEdges.length,l[c]===0&&u.push(t[c]);for(var v=-1;u.length;){for(var d=0;d<u.length;d++){var g=u[d],p=g.hostGraph.data.getRawDataItem(g.dataIndex),m=p.depth!=null&&p.depth>=0;m&&p.depth>v&&(v=p.depth),g.setLayout({depth:m?p.depth:f},!0),n==="vertical"?g.setLayout({dy:r},!0):g.setLayout({dx:r},!0);for(var y=0;y<g.outEdges.length;y++){var _=g.outEdges[y],x=e.indexOf(_);s[x]=0;var w=_.node2,S=t.indexOf(w);--l[S]===0&&h.indexOf(w)<0&&h.push(w)}}++f,u=h,h=[]}for(c=0;c<s.length;c++)if(s[c]===1)throw new Error("Sankey is a DAG, the original data has cycle!");var b=v>f-1?v:f-1;o&&o!=="left"&&ZR(t,o,n,b);var A=n==="vertical"?(i-r)/b:(a-r)/b;XR(t,A,n)}function Ow(t){var e=t.hostGraph.data.getRawDataItem(t.dataIndex);return e.depth!=null&&e.depth>=0}function ZR(t,e,r,a){if(e==="right"){for(var i=[],n=t,o=0;n.length;){for(var s=0;s<n.length;s++){var l=n[s];l.setLayout({skNodeHeight:o},!0);for(var u=0;u<l.inEdges.length;u++){var h=l.inEdges[u];i.indexOf(h.node1)<0&&i.push(h.node1)}}n=i,i=[],++o}T(t,function(f){Ow(f)||f.setLayout({depth:Math.max(0,a-f.getLayout().skNodeHeight)},!0)})}else e==="justify"&&YR(t,a)}function YR(t,e){T(t,function(r){!Ow(r)&&!r.outEdges.length&&r.setLayout({depth:e},!0)})}function XR(t,e,r){T(t,function(a){var i=a.getLayout().depth*e;r==="vertical"?a.setLayout({y:i},!0):a.setLayout({x:i},!0)})}function qR(t,e,r,a,i,n,o){var s=KR(t,o);QR(s,e,r,a,i,o),tg(s,i,r,a,o);for(var l=1;n>0;n--)l*=.99,JR(s,l,o),tg(s,i,r,a,o),ak(s,l,o),tg(s,i,r,a,o)}function KR(t,e){var r=[],a=e==="vertical"?"y":"x",i=sc(t,function(n){return n.getLayout()[a]});return i.keys.sort(function(n,o){return n-o}),T(i.keys,function(n){r.push(i.buckets.get(n))}),r}function QR(t,e,r,a,i,n){var o=1/0;T(t,function(s){var l=s.length,u=0;T(s,function(f){u+=f.getLayout().value});var h=n==="vertical"?(a-(l-1)*i)/u:(r-(l-1)*i)/u;h<o&&(o=h)}),T(t,function(s){T(s,function(l,u){var h=l.getLayout().value*o;n==="vertical"?(l.setLayout({x:u},!0),l.setLayout({dx:h},!0)):(l.setLayout({y:u},!0),l.setLayout({dy:h},!0))})}),T(e,function(s){var l=+s.getValue()*o;s.setLayout({dy:l},!0)})}function tg(t,e,r,a,i){var n=i==="vertical"?"x":"y";T(t,function(o){o.sort(function(g,p){return g.getLayout()[n]-p.getLayout()[n]});for(var s,l,u,h=0,f=o.length,c=i==="vertical"?"dx":"dy",v=0;v<f;v++)l=o[v],u=h-l.getLayout()[n],u>0&&(s=l.getLayout()[n]+u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),h=l.getLayout()[n]+l.getLayout()[c]+e;var d=i==="vertical"?a:r;if(u=h-e-d,u>0)for(s=l.getLayout()[n]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),h=s,v=f-2;v>=0;--v)l=o[v],u=l.getLayout()[n]+l.getLayout()[c]+e-h,u>0&&(s=l.getLayout()[n]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),h=l.getLayout()[n]})}function JR(t,e,r){T(t.slice().reverse(),function(a){T(a,function(i){if(i.outEdges.length){var n=La(i.outEdges,jR,r)/La(i.outEdges,Xu,r);if(isNaN(n)){var o=i.outEdges.length;n=o?La(i.outEdges,tk,r)/o:0}if(r==="vertical"){var s=i.getLayout().x+(n-Ma(i,r))*e;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(n-Ma(i,r))*e;i.setLayout({y:l},!0)}}})})}function jR(t,e){return Ma(t.node2,e)*t.getValue()}function tk(t,e){return Ma(t.node2,e)}function ek(t,e){return Ma(t.node1,e)*t.getValue()}function rk(t,e){return Ma(t.node1,e)}function Ma(t,e){return e==="vertical"?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function Xu(t){return t.getValue()}function La(t,e,r){for(var a=0,i=t.length,n=-1;++n<i;){var o=+e.call(t,t[n],r);isNaN(o)||(a+=o)}return a}function ak(t,e,r){T(t,function(a){T(a,function(i){if(i.inEdges.length){var n=La(i.inEdges,ek,r)/La(i.inEdges,Xu,r);if(isNaN(n)){var o=i.inEdges.length;n=o?La(i.inEdges,rk,r)/o:0}if(r==="vertical"){var s=i.getLayout().x+(n-Ma(i,r))*e;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(n-Ma(i,r))*e;i.setLayout({y:l},!0)}}})})}function ik(t,e){var r=e==="vertical"?"x":"y";T(t,function(a){a.outEdges.sort(function(i,n){return i.node2.getLayout()[r]-n.node2.getLayout()[r]}),a.inEdges.sort(function(i,n){return i.node1.getLayout()[r]-n.node1.getLayout()[r]})}),T(t,function(a){var i=0,n=0;T(a.outEdges,function(o){o.setLayout({sy:i},!0),i+=o.getLayout().dy}),T(a.inEdges,function(o){o.setLayout({ty:n},!0),n+=o.getLayout().dy})})}var nk=function(t,e){t.eachSeriesByType("sankey",function(r){var a=r.getGraph(),i=a.nodes;if(i.length){var n=1/0,o=-1/0;T(i,function(s){var l=s.getLayout().value;l<n&&(n=l),l>o&&(o=l)}),T(i,function(s){var l=new mt({type:"color",mappingMethod:"linear",dataExtent:[n,o],visual:r.get("color")}),u=l.mapValueToVisual(s.getLayout().value),h=s.getModel().get("itemStyle.color");h!=null?s.setVisual("color",h):s.setVisual("color",u)})}})};It(HR),bt(nk);var zw={_baseAxisDim:null,getInitialData:function(t,e){var r,a=e.getComponent("xAxis",this.get("xAxisIndex")),i=e.getComponent("yAxis",this.get("yAxisIndex")),n=a.get("type"),o=i.get("type"),s;n==="category"?(t.layout="horizontal",r=a.getOrdinalMeta(),s=!0):o==="category"?(t.layout="vertical",r=i.getOrdinalMeta(),s=!0):t.layout=t.layout||"horizontal";var l=["x","y"],u=t.layout==="horizontal"?0:1,h=this._baseAxisDim=l[u],f=l[1-u],c=[a,i],v=c[u].get("type"),d=c[1-u].get("type"),g=t.data;if(g&&s){var p=[];T(g,function(_,x){var w;_.value&&P(_.value)?(w=_.value.slice(),_.value.unshift(x)):P(_)?(w=_.slice(),_.unshift(x)):w=_,p.push(w)}),t.data=p}var m=this.defaultValueDimensions,y=[{name:h,type:lu(v),ordinalMeta:r,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:f,type:lu(d),dimsDef:m.slice()}];return wn(this,{coordDimensions:y,dimensionsCount:m.length+1,encodeDefaulter:K(ny,y,this)})},getBaseAxis:function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis}},ok=Dt.extend({type:"series.boxplot",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:2,shadowOffsetY:2,shadowColor:"rgba(0,0,0,0.4)"}},animationEasing:"elasticOut",animationDuration:800}});pt(ok,zw,!0);var sk=["itemStyle"],lk=["emphasis","itemStyle"],i5=Yt.extend({type:"boxplot",render:function(t,e,r){var a=t.getData(),i=this.group,n=this._data;this._data||i.removeAll();var o=t.get("layout")==="horizontal"?1:0;a.diff(n).add(function(s){if(a.hasValue(s)){var l=a.getItemLayout(s),u=Bw(l,a,s,o,!0);a.setItemGraphicEl(s,u),i.add(u)}}).update(function(s,l){var u=n.getItemGraphicEl(l);if(!a.hasValue(s)){i.remove(u);return}var h=a.getItemLayout(s);u?Vw(h,u,a,s):u=Bw(h,a,s,o),i.add(u),a.setItemGraphicEl(s,u)}).remove(function(s){var l=n.getItemGraphicEl(s);l&&i.remove(l)}).execute(),this._data=a},remove:function(t){var e=this.group,r=this._data;this._data=null,r&&r.eachItemGraphicEl(function(a){a&&e.remove(a)})},dispose:Kt}),uk=st.extend({type:"boxplotBoxPath",shape:{},buildPath:function(t,e){var r=e.points,a=0;for(t.moveTo(r[a][0],r[a][1]),a++;a<4;a++)t.lineTo(r[a][0],r[a][1]);for(t.closePath();a<r.length;a++)t.moveTo(r[a][0],r[a][1]),a++,t.lineTo(r[a][0],r[a][1])}});function Bw(t,e,r,a,i){var n=t.ends,o=new uk({shape:{points:i?hk(n,a,t):n}});return Vw(t,o,e,r,i),o}function Vw(t,e,r,a,i){var n=r.hostModel,o=Gr[i?"initProps":"updateProps"];o(e,{shape:{points:t.ends}},n,a);var s=r.getItemModel(a),l=s.getModel(sk),u=r.getItemVisual(a,"color"),h=l.getItemStyle(["borderColor"]);h.stroke=u,h.strokeNoScale=!0,e.useStyle(h),e.z2=100;var f=s.getModel(lk).getItemStyle();St(e,f)}function hk(t,e,r){return E(t,function(a){return a=a.slice(),a[e]=r.initBaseline,a})}var Gw=["itemStyle","borderColor"],fk=function(t,e){var r=t.get("color");t.eachRawSeriesByType("boxplot",function(a){var i=r[a.seriesIndex%r.length],n=a.getData();n.setVisual({legendSymbol:"roundRect",color:a.get(Gw)||i}),t.isSeriesFiltered(a)||n.each(function(o){var s=n.getItemModel(o);n.setItemVisual(o,{color:s.get(Gw,!0)})})})},xs=T,ck=function(t){var e=vk(t);xs(e,function(r){var a=r.seriesModels;!a.length||(dk(r),xs(a,function(i,n){gk(i,r.boxOffsetList[n],r.boxWidthList[n])}))})};function vk(t){var e=[],r=[];return t.eachSeriesByType("boxplot",function(a){var i=a.getBaseAxis(),n=ut(r,i);n<0&&(n=r.length,r[n]=i,e[n]={axis:i,seriesModels:[]}),e[n].seriesModels.push(a)}),e}function dk(t){var e,r=t.axis,a=t.seriesModels,i=a.length,n=t.boxWidthList=[],o=t.boxOffsetList=[],s=[],l;if(r.type==="category")l=r.getBandWidth();else{var u=0;xs(a,function(d){u=Math.max(u,d.getData().count())}),e=r.getExtent(),Math.abs(e[1]-e[0])/u}xs(a,function(d){var g=d.get("boxWidth");P(g)||(g=[g,g]),s.push([R(g[0],l)||0,R(g[1],l)||0])});var h=l*.8-2,f=h/i*.3,c=(h-f*(i-1))/i,v=c/2-h/2;xs(a,function(d,g){o.push(v),v+=f+c,n.push(Math.min(Math.max(c,s[g][0]),s[g][1]))})}function gk(t,e,r){var a=t.coordinateSystem,i=t.getData(),n=r/2,o=t.get("layout")==="horizontal"?0:1,s=1-o,l=["x","y"],u=i.mapDimension(l[o]),h=i.mapDimension(l[s],!0);if(u==null||h.length<5)return;for(var f=0;f<i.count();f++){var c=i.get(u,f),v=_(c,h[2],f),d=_(c,h[0],f),g=_(c,h[1],f),p=_(c,h[3],f),m=_(c,h[4],f),y=[];x(y,g,0),x(y,p,1),y.push(d,g,m,p),w(y,d),w(y,m),w(y,v),i.setItemLayout(f,{initBaseline:v[s],ends:y})}function _(S,b,A){var C=i.get(b,A),D=[];D[o]=S,D[s]=C;var I;return isNaN(S)||isNaN(C)?I=[NaN,NaN]:(I=a.dataToPoint(D),I[o]+=e),I}function x(S,b,A){var C=b.slice(),D=b.slice();C[o]+=n,D[o]-=n,A?S.push(C,D):S.push(D,C)}function w(S,b){var A=b.slice(),C=b.slice();A[o]-=n,C[o]+=n,S.push(A,C)}}bt(fk),It(ck);var pk=Dt.extend({type:"series.candlestick",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,clip:!0,itemStyle:{color:"#c23531",color0:"#314656",borderWidth:1,borderColor:"#c23531",borderColor0:"#314656"},emphasis:{itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationUpdate:!1,animationEasing:"linear",animationDuration:300},getShadowDim:function(){return"open"},brushSelector:function(t,e,r){var a=e.getItemLayout(t);return a&&r.rect(a.brushRect)}});pt(pk,zw,!0);var Hw=["itemStyle"],mk=["emphasis","itemStyle"],Fw=["color","color0","borderColor","borderColor0"],n5=Yt.extend({type:"candlestick",render:function(t,e,r){this.group.removeClipPath(),this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},incrementalPrepareRender:function(t,e,r){this._clear(),this._updateDrawMode(t)},incrementalRender:function(t,e,r,a){this._isLargeDraw?this._incrementalRenderLarge(t,e):this._incrementalRenderNormal(t,e)},_updateDrawMode:function(t){var e=t.pipelineContext.large;(this._isLargeDraw==null||e^this._isLargeDraw)&&(this._isLargeDraw=e,this._clear())},_renderNormal:function(t){var e=t.getData(),r=this._data,a=this.group,i=e.getLayout("isSimpleBox"),n=t.get("clip",!0),o=t.coordinateSystem,s=o.getArea&&o.getArea();this._data||a.removeAll(),e.diff(r).add(function(l){if(e.hasValue(l)){var u,h=e.getItemLayout(l);if(n&&Ww(s,h))return;u=eg(h,l,!0),oe(u,{shape:{points:h.ends}},t,l),rg(u,e,l,i),a.add(u),e.setItemGraphicEl(l,u)}}).update(function(l,u){var h=r.getItemGraphicEl(u);if(!e.hasValue(l)){a.remove(h);return}var f=e.getItemLayout(l);if(n&&Ww(s,f)){a.remove(h);return}h?tt(h,{shape:{points:f.ends}},t,l):h=eg(f,l),rg(h,e,l,i),a.add(h),e.setItemGraphicEl(l,h)}).remove(function(l){var u=r.getItemGraphicEl(l);u&&a.remove(u)}).execute(),this._data=e},_renderLarge:function(t){this._clear(),$w(t,this.group);var e=t.get("clip",!0)?_u(t.coordinateSystem,!1,t):null;e?this.group.setClipPath(e):this.group.removeClipPath()},_incrementalRenderNormal:function(t,e){for(var r=e.getData(),a=r.getLayout("isSimpleBox"),i;(i=t.next())!=null;){var n,o=r.getItemLayout(i);n=eg(o,i),rg(n,r,i,a),n.incremental=!0,this.group.add(n)}},_incrementalRenderLarge:function(t,e){$w(e,this.group,!0)},remove:function(t){this._clear()},_clear:function(){this.group.removeAll(),this._data=null},dispose:Kt}),yk=st.extend({type:"normalCandlestickBox",shape:{},buildPath:function(t,e){var r=e.points;this.__simpleBox?(t.moveTo(r[4][0],r[4][1]),t.lineTo(r[6][0],r[6][1])):(t.moveTo(r[0][0],r[0][1]),t.lineTo(r[1][0],r[1][1]),t.lineTo(r[2][0],r[2][1]),t.lineTo(r[3][0],r[3][1]),t.closePath(),t.moveTo(r[4][0],r[4][1]),t.lineTo(r[5][0],r[5][1]),t.moveTo(r[6][0],r[6][1]),t.lineTo(r[7][0],r[7][1]))}});function eg(t,e,r){var a=t.ends;return new yk({shape:{points:r?_k(a,t):a},z2:100})}function Ww(t,e){for(var r=!0,a=0;a<e.ends.length;a++)if(t.contain(e.ends[a][0],e.ends[a][1])){r=!1;break}return r}function rg(t,e,r,a){var i=e.getItemModel(r),n=i.getModel(Hw),o=e.getItemVisual(r,"color"),s=e.getItemVisual(r,"borderColor")||o,l=n.getItemStyle(Fw);t.useStyle(l),t.style.strokeNoScale=!0,t.style.fill=o,t.style.stroke=s,t.__simpleBox=a;var u=i.getModel(mk).getItemStyle();St(t,u)}function _k(t,e){return E(t,function(r){return r=r.slice(),r[1]=e.initBaseline,r})}var Uw=st.extend({type:"largeCandlestickBox",shape:{},buildPath:function(t,e){for(var r=e.points,a=0;a<r.length;)if(this.__sign===r[a++]){var i=r[a++];t.moveTo(i,r[a++]),t.lineTo(i,r[a++])}else a+=3}});function $w(t,e,r){var a=t.getData(),i=a.getLayout("largePoints"),n=new Uw({shape:{points:i},__sign:1});e.add(n);var o=new Uw({shape:{points:i},__sign:-1});e.add(o),Zw(1,n,t,a),Zw(-1,o,t,a),r&&(n.incremental=!0,o.incremental=!0)}function Zw(t,e,r,a){var i=t>0?"P":"N",n=a.getVisual("borderColor"+i)||a.getVisual("color"+i),o=r.getModel(Hw).getItemStyle(Fw);e.useStyle(o),e.style.fill=null,e.style.stroke=n}var xk=function(t){!t||!P(t.series)||T(t.series,function(e){Q(e)&&e.type==="k"&&(e.type="candlestick")})},wk=["itemStyle","borderColor"],bk=["itemStyle","borderColor0"],Sk=["itemStyle","color"],Ak=["itemStyle","color0"],Tk={seriesType:"candlestick",plan:nn(),performRawSeries:!0,reset:function(t,e){var r=t.getData();if(r.setVisual({legendSymbol:"roundRect",colorP:n(1,t),colorN:n(-1,t),borderColorP:o(1,t),borderColorN:o(-1,t)}),e.isSeriesFiltered(t))return;var a=t.pipelineContext.large;return!a&&{progress:i};function i(s,l){for(var u;(u=s.next())!=null;){var h=l.getItemModel(u),f=l.getItemLayout(u).sign;l.setItemVisual(u,{color:n(f,h),borderColor:o(f,h)})}}function n(s,l){return l.get(s>0?Sk:Ak)}function o(s,l){return l.get(s>0?wk:bk)}}},Ck=typeof Float32Array<"u"?Float32Array:Array,Dk={seriesType:"candlestick",plan:nn(),reset:function(t){var e=t.coordinateSystem,r=t.getData(),a=Ik(t,r),i=0,n=1,o=["x","y"],s=r.mapDimension(o[i]),l=r.mapDimension(o[n],!0),u=l[0],h=l[1],f=l[2],c=l[3];if(r.setLayout({candleWidth:a,isSimpleBox:a<=1.3}),s==null||l.length<4)return;return{progress:t.pipelineContext.large?d:v};function v(g,p){for(var m;(m=g.next())!=null;){var y=p.get(s,m),_=p.get(u,m),x=p.get(h,m),w=p.get(f,m),S=p.get(c,m),b=Math.min(_,x),A=Math.max(_,x),C=B(b,y),D=B(A,y),I=B(w,y),L=B(S,y),M=[];k(M,D,0),k(M,C,1),M.push(V(L),V(D),V(I),V(C)),p.setItemLayout(m,{sign:Yw(p,m,_,x,h),initBaseline:_>x?D[n]:C[n],ends:M,brushRect:O(w,S,y)})}function B(H,W){var F=[];return F[i]=W,F[n]=H,isNaN(W)||isNaN(H)?[NaN,NaN]:e.dataToPoint(F)}function k(H,W,F){var N=W.slice(),$=W.slice();N[i]=El(N[i]+a/2,1,!1),$[i]=El($[i]-a/2,1,!0),F?H.push(N,$):H.push($,N)}function O(H,W,F){var N=B(H,F),$=B(W,F);return N[i]-=a/2,$[i]-=a/2,{x:N[0],y:N[1],width:n?a:$[0]-N[0],height:n?$[1]-N[1]:a}}function V(H){return H[i]=El(H[i],1),H}}function d(g,p){for(var m=new Ck(g.count*4),y=0,_,x=[],w=[],S;(S=g.next())!=null;){var b=p.get(s,S),A=p.get(u,S),C=p.get(h,S),D=p.get(f,S),I=p.get(c,S);if(isNaN(b)||isNaN(D)||isNaN(I)){m[y++]=NaN,y+=3;continue}m[y++]=Yw(p,S,A,C,h),x[i]=b,x[n]=D,_=e.dataToPoint(x,null,w),m[y++]=_?_[0]:NaN,m[y++]=_?_[1]:NaN,x[n]=I,_=e.dataToPoint(x,null,w),m[y++]=_?_[1]:NaN}p.setLayout("largePoints",m)}}};function Yw(t,e,r,a,i){var n;return r>a?n=-1:r<a?n=1:n=e>0?t.get(i,e-1)<=a?1:-1:1,n}function Ik(t,e){var r=t.getBaseAxis(),a,i=r.type==="category"?r.getBandWidth():(a=r.getExtent(),Math.abs(a[1]-a[0])/e.count()),n=R(Nt(t.get("barMaxWidth"),i),i),o=R(Nt(t.get("barMinWidth"),1),i),s=t.get("barWidth");return s!=null?R(s,i):Math.max(Math.min(i/2,n),o)}ie(xk),bt(Tk),It(Dk),Dt.extend({type:"series.effectScatter",dependencies:["grid","polar"],getInitialData:function(t,e){return $r(this.getSource(),this,{useEncodeDefaulter:!0})},brushSelector:"point",defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",rippleEffect:{period:4,scale:2.5,brushType:"fill"},symbolSize:10}});var Xw=3;function Mk(t){return P(t)||(t=[+t,+t]),t}function qw(t,e){var r=e.rippleEffectColor||e.color;t.eachChild(function(a){a.attr({z:e.z,zlevel:e.zlevel,style:{stroke:e.brushType==="stroke"?r:null,fill:e.brushType==="fill"?r:null}})})}function ag(t,e){G.call(this);var r=new wa(t,e),a=new G;this.add(r),this.add(a),a.beforeUpdate=function(){this.attr(r.getScale())},this.updateData(t,e)}var _i=ag.prototype;_i.stopEffectAnimation=function(){this.childAt(1).removeAll()},_i.startEffectAnimation=function(t){for(var e=t.symbolType,r=t.color,a=this.childAt(1),i=0;i<Xw;i++){var n=Le(e,-1,-1,2,2,r);n.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scale:[.5,.5]});var o=-i/Xw*t.period+t.effectOffset;n.animate("",!0).when(t.period,{scale:[t.rippleScale/2,t.rippleScale/2]}).delay(o).start(),n.animateStyle(!0).when(t.period,{opacity:0}).delay(o).start(),a.add(n)}qw(a,t)},_i.updateEffectAnimation=function(t){for(var e=this._effectCfg,r=this.childAt(1),a=["symbolType","period","rippleScale"],i=0;i<a.length;i++){var n=a[i];if(e[n]!==t[n]){this.stopEffectAnimation(),this.startEffectAnimation(t);return}}qw(r,t)},_i.highlight=function(){this.trigger("emphasis")},_i.downplay=function(){this.trigger("normal")},_i.updateData=function(t,e){var r=t.hostModel;this.childAt(0).updateData(t,e);var a=this.childAt(1),i=t.getItemModel(e),n=t.getItemVisual(e,"symbol"),o=Mk(t.getItemVisual(e,"symbolSize")),s=t.getItemVisual(e,"color");a.attr("scale",o),a.traverse(function(g){g.attr({fill:s})});var l=i.getShallow("symbolOffset");if(l){var u=a.position;u[0]=R(l[0],o[0]),u[1]=R(l[1],o[1])}var h=t.getItemVisual(e,"symbolRotate");a.rotation=(h||0)*Math.PI/180||0;var f={};if(f.showEffectOn=r.get("showEffectOn"),f.rippleScale=i.get("rippleEffect.scale"),f.brushType=i.get("rippleEffect.brushType"),f.period=i.get("rippleEffect.period")*1e3,f.effectOffset=e/t.count(),f.z=i.getShallow("z")||0,f.zlevel=i.getShallow("zlevel")||0,f.symbolType=n,f.color=s,f.rippleEffectColor=i.get("rippleEffect.color"),this.off("mouseover").off("mouseout").off("emphasis").off("normal"),f.showEffectOn==="render")this._effectCfg?this.updateEffectAnimation(f):this.startEffectAnimation(f),this._effectCfg=f;else{this._effectCfg=null,this.stopEffectAnimation();var c=this.childAt(0),v=function(){c.highlight(),f.showEffectOn!=="render"&&this.startEffectAnimation(f)},d=function(){c.downplay(),f.showEffectOn!=="render"&&this.stopEffectAnimation()};this.on("mouseover",v,this).on("mouseout",d,this).on("emphasis",v,this).on("normal",d,this)}this._effectCfg=f},_i.fadeOut=function(t){this.off("mouseover").off("mouseout").off("emphasis").off("normal"),t&&t()},yt(ag,G),_e({type:"effectScatter",init:function(){this._symbolDraw=new gn(ag)},render:function(t,e,r){var a=t.getData(),i=this._symbolDraw;i.updateData(a),this.group.add(i.group)},updateTransform:function(t,e,r){var a=t.getData();this.group.dirty();var i=Qo().reset(t);i.progress&&i.progress({start:0,end:a.count()},a),this._symbolDraw.updateLayout(a)},_updateGroupTransform:function(t){var e=t.coordinateSystem;e&&e.getRoamTransform&&(this.group.transform=Jp(e.getRoamTransform()),this.group.decomposeTransform())},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(e)},dispose:function(){}}),bt(li("effectScatter","circle")),It(Qo("effectScatter"));var Lk=typeof Uint32Array>"u"?Array:Uint32Array,Pk=typeof Float64Array>"u"?Array:Float64Array;function Kw(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(z&&console.warn("Lines data configuration has been changed to { coords:[[1,2],[2,3]] }"),t.data=E(e,function(r){var a=[r[0].coord,r[1].coord],i={coords:a};return r[0].name&&(i.fromName=r[0].name),r[1].name&&(i.toName=r[1].name),Yn([i,r[0],r[1]])}))}var Qw=Dt.extend({type:"series.lines",dependencies:["grid","polar"],visualColorAccessPath:"lineStyle.color",init:function(t){t.data=t.data||[],Kw(t);var e=this._processFlatCoordsArray(t.data);this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset,e.flatCoords&&(t.data=new Float32Array(e.count)),Qw.superApply(this,"init",arguments)},mergeOption:function(t){if(t.data=t.data||[],Kw(t),t.data){var e=this._processFlatCoordsArray(t.data);this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset,e.flatCoords&&(t.data=new Float32Array(e.count))}Qw.superApply(this,"mergeOption",arguments)},appendData:function(t){var e=this._processFlatCoordsArray(t.data);e.flatCoords&&(this._flatCoords?(this._flatCoords=Gh(this._flatCoords,e.flatCoords),this._flatCoordsOffset=Gh(this._flatCoordsOffset,e.flatCoordsOffset)):(this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset),t.data=new Float32Array(e.count)),this.getRawData().appendData(t.data)},_getCoordsFromItemModel:function(t){var e=this.getData().getItemModel(t),r=e.option instanceof Array?e.option:e.getShallow("coords");if(z&&!(r instanceof Array&&r.length>0&&r[0]instanceof Array))throw new Error("Invalid coords "+JSON.stringify(r)+". Lines must have 2d coords array in data item.");return r},getLineCoordsCount:function(t){return this._flatCoordsOffset?this._flatCoordsOffset[t*2+1]:this._getCoordsFromItemModel(t).length},getLineCoords:function(t,e){if(this._flatCoordsOffset){for(var r=this._flatCoordsOffset[t*2],a=this._flatCoordsOffset[t*2+1],i=0;i<a;i++)e[i]=e[i]||[],e[i][0]=this._flatCoords[r+i*2],e[i][1]=this._flatCoords[r+i*2+1];return a}else{for(var n=this._getCoordsFromItemModel(t),i=0;i<n.length;i++)e[i]=e[i]||[],e[i][0]=n[i][0],e[i][1]=n[i][1];return n.length}},_processFlatCoordsArray:function(t){var e=0;if(this._flatCoords&&(e=this._flatCoords.length),typeof t[0]=="number"){for(var r=t.length,a=new Lk(r),i=new Pk(r),n=0,o=0,s=0,l=0;l<r;){s++;var u=t[l++];a[o++]=n+e,a[o++]=u;for(var h=0;h<u;h++){var f=t[l++],c=t[l++];if(i[n++]=f,i[n++]=c,l>r&&z)throw new Error("Invalid data format.")}}return{flatCoordsOffset:new Uint32Array(a.buffer,0,o),flatCoords:i,count:s}}return{flatCoordsOffset:null,flatCoords:null,count:t.length}},getInitialData:function(t,e){if(z){var r=re.get(t.coordinateSystem);if(!r)throw new Error("Unkown coordinate system "+t.coordinateSystem)}var a=new qt(["value"],this);return a.hasItemOption=!1,a.initData(t.data,[],function(i,n,o,s){if(i instanceof Array)return NaN;a.hasItemOption=!0;var l=i.value;if(l!=null)return l instanceof Array?l[s]:l}),a},formatTooltip:function(t){var e=this.getData(),r=e.getItemModel(t),a=r.get("name");if(a)return a;var i=r.get("fromName"),n=r.get("toName"),o=[];return i!=null&&o.push(i),n!=null&&o.push(n),Tt(o.join(" > "))},preventIncremental:function(){return!!this.get("effect.show")},getProgressive:function(){var t=this.option.progressive;return t??(this.option.large?1e4:this.get("progressive"))},getProgressiveThreshold:function(){var t=this.option.progressiveThreshold;return t??(this.option.large?2e4:this.get("progressiveThreshold"))},defaultOption:{coordinateSystem:"geo",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!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}}});function ws(t,e,r){G.call(this),this.add(this.createLine(t,e,r)),this._updateEffectSymbol(t,e)}var Pa=ws.prototype;Pa.createLine=function(t,e,r){return new ps(t,e,r)},Pa._updateEffectSymbol=function(t,e){var r=t.getItemModel(e),a=r.getModel("effect"),i=a.get("symbolSize"),n=a.get("symbol");P(i)||(i=[i,i]);var o=a.get("color")||t.getItemVisual(e,"color"),s=this.childAt(1);this._symbolType!==n&&(this.remove(s),s=Le(n,-.5,-.5,1,1,o),s.z2=100,s.culling=!0,this.add(s)),s&&(s.setStyle("shadowColor",o),s.setStyle(a.getItemStyle(["color"])),s.attr("scale",i),s.setColor(o),s.attr("scale",i),this._symbolType=n,this._symbolScale=i,this._updateEffectAnimation(t,a,e))},Pa._updateEffectAnimation=function(t,e,r){var a=this.childAt(1);if(!!a){var i=this,n=t.getItemLayout(r),o=e.get("period")*1e3,s=e.get("loop"),l=e.get("constantSpeed"),u=Et(e.get("delay"),function(v){return v/t.count()*o/3}),h=typeof u=="function";if(a.ignore=!0,this.updateAnimationPoints(a,n),l>0&&(o=this.getLineLength(a)/l*1e3),o!==this._period||s!==this._loop){a.stopAnimation();var f=u;h&&(f=u(r)),a.__t>0&&(f=-o*a.__t),a.__t=0;var c=a.animate("",s).when(o,{__t:1}).delay(f).during(function(){i.updateSymbolPosition(a)});s||c.done(function(){i.remove(a)}),c.start()}this._period=o,this._loop=s}},Pa.getLineLength=function(t){return Rr(t.__p1,t.__cp1)+Rr(t.__cp1,t.__p2)},Pa.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]},Pa.updateData=function(t,e,r){this.childAt(0).updateData(t,e,r),this._updateEffectSymbol(t,e)},Pa.updateSymbolPosition=function(t){var e=t.__p1,r=t.__p2,a=t.__cp1,i=t.__t,n=t.position,o=[n[0],n[1]],s=ne,l=lc;n[0]=s(e[0],a[0],r[0],i),n[1]=s(e[1],a[1],r[1],i);var u=l(e[0],a[0],r[0],i),h=l(e[1],a[1],r[1],i);if(t.rotation=-Math.atan2(h,u)-Math.PI/2,this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")if(t.__lastT!==void 0&&t.__lastT<t.__t){var f=Rr(o,n)*1.05;t.attr("scale",[t.scale[0],f]),i===1&&(n[0]=o[0]+(n[0]-o[0])/2,n[1]=o[1]+(n[1]-o[1])/2)}else if(t.__lastT===1){var f=2*Rr(e,n);t.attr("scale",[t.scale[0],f])}else t.attr("scale",this._symbolScale);t.__lastT=t.__t,t.ignore=!1},Pa.updateLayout=function(t,e){this.childAt(0).updateLayout(t,e);var r=t.getItemModel(e).getModel("effect");this._updateEffectAnimation(t,r,e)},yt(ws,G);function qu(t,e,r){G.call(this),this._createPolyline(t,e,r)}var Ku=qu.prototype;Ku._createPolyline=function(t,e,r){var a=t.getItemLayout(e),i=new Ve({shape:{points:a}});this.add(i),this._updateCommonStl(t,e,r)},Ku.updateData=function(t,e,r){var a=t.hostModel,i=this.childAt(0),n={shape:{points:t.getItemLayout(e)}};tt(i,n,a,e),this._updateCommonStl(t,e,r)},Ku._updateCommonStl=function(t,e,r){var a=this.childAt(0),i=t.getItemModel(e),n=t.getItemVisual(e,"color"),o=r&&r.lineStyle,s=r&&r.hoverLineStyle;(!r||t.hasItemOption)&&(o=i.getModel("lineStyle").getLineStyle(),s=i.getModel("emphasis.lineStyle").getLineStyle()),a.useStyle(U({strokeNoScale:!0,fill:"none",stroke:n},o)),a.hoverStyle=s,St(this)},Ku.updateLayout=function(t,e){var r=this.childAt(0);r.setShape("points",t.getItemLayout(e))},yt(qu,G);function ig(t,e,r){ws.call(this,t,e,r),this._lastFrame=0,this._lastFramePercent=0}var Qu=ig.prototype;Qu.createLine=function(t,e,r){return new qu(t,e,r)},Qu.updateAnimationPoints=function(t,e){this._points=e;for(var r=[0],a=0,i=1;i<e.length;i++){var n=e[i-1],o=e[i];a+=Rr(n,o),r.push(a)}if(a!==0){for(var i=0;i<r.length;i++)r[i]/=a;this._offsets=r,this._length=a}},Qu.getLineLength=function(t){return this._length},Qu.updateSymbolPosition=function(t){var e=t.__t,r=this._points,a=this._offsets,i=r.length;if(!!a){var n=this._lastFrame,o;if(e<this._lastFramePercent){var s=Math.min(n+1,i-1);for(o=s;o>=0&&!(a[o]<=e);o--);o=Math.min(o,i-2)}else{for(var o=n;o<i&&!(a[o]>e);o++);o=Math.min(o-1,i-2)}Gp(t.position,r[o],r[o+1],(e-a[o])/(a[o+1]-a[o]));var l=r[o+1][0]-r[o][0],u=r[o+1][1]-r[o][1];t.rotation=-Math.atan2(u,l)-Math.PI/2,this._lastFrame=o,this._lastFramePercent=e,t.ignore=!1}},yt(ig,ws);var Jw=Ge({shape:{polyline:!1,curveness:0,segs:[]},buildPath:function(t,e){var r=e.segs,a=e.curveness;if(e.polyline)for(var i=0;i<r.length;){var n=r[i++];if(n>0){t.moveTo(r[i++],r[i++]);for(var o=1;o<n;o++)t.lineTo(r[i++],r[i++])}}else for(var i=0;i<r.length;){var s=r[i++],l=r[i++],u=r[i++],h=r[i++];if(t.moveTo(s,l),a>0){var f=(s+u)/2-(l-h)*a,c=(l+h)/2-(u-s)*a;t.quadraticCurveTo(f,c,u,h)}else t.lineTo(u,h)}},findDataIndex:function(t,e){var r=this.shape,a=r.segs,i=r.curveness;if(r.polyline)for(var n=0,o=0;o<a.length;){var s=a[o++];if(s>0)for(var l=a[o++],u=a[o++],h=1;h<s;h++){var f=a[o++],c=a[o++];if(ha(l,u,f,c))return n}n++}else for(var n=0,o=0;o<a.length;){var l=a[o++],u=a[o++],f=a[o++],c=a[o++];if(i>0){var v=(l+f)/2-(u-c)*i,d=(u+c)/2-(f-l)*i;if(n0(l,u,v,d,f,c))return n}else if(ha(l,u,f,c))return n;n++}return-1}});function jw(){this.group=new G}var xi=jw.prototype;xi.isPersistent=function(){return!this._incremental},xi.updateData=function(t){this.group.removeAll();var e=new Jw({rectHover:!0,cursor:"default"});e.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(e,t),this.group.add(e),this._incremental=null},xi.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>5e5?(this._incremental||(this._incremental=new Ae({silent:!0})),this.group.add(this._incremental)):this._incremental=null},xi.incrementalUpdate=function(t,e){var r=new Jw;r.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(r,e,!!this._incremental),this._incremental?this._incremental.addDisplayable(r,!0):(r.rectHover=!0,r.cursor="default",r.__startIndex=t.start,this.group.add(r))},xi.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},xi._setCommon=function(t,e,r){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("color");i&&t.setStyle("stroke",i),t.setStyle("fill"),r||(t.seriesIndex=a.seriesIndex,t.on("mousemove",function(n){t.dataIndex=null;var o=t.findDataIndex(n.offsetX,n.offsetY);o>0&&(t.dataIndex=o+t.__startIndex)}))},xi._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};var tb={seriesType:"lines",plan:nn(),reset:function(t){var e=t.coordinateSystem,r=t.get("polyline"),a=t.pipelineContext.large;function i(n,o){var s=[];if(a){var l,u=n.end-n.start;if(r){for(var h=0,f=n.start;f<n.end;f++)h+=t.getLineCoordsCount(f);l=new Float32Array(u+h*2)}else l=new Float32Array(u*4);for(var c=0,v=[],f=n.start;f<n.end;f++){var d=t.getLineCoords(f,s);r&&(l[c++]=d);for(var g=0;g<d;g++)v=e.dataToPoint(s[g],!1,v),l[c++]=v[0],l[c++]=v[1]}o.setLayout("linesPoints",l)}else for(var f=n.start;f<n.end;f++){var p=o.getItemModel(f),d=t.getLineCoords(f,s),m=[];if(r)for(var y=0;y<d;y++)m.push(e.dataToPoint(s[y]));else{m[0]=e.dataToPoint(s[0]),m[1]=e.dataToPoint(s[1]);var _=p.get("lineStyle.curveness");+_&&(m[2]=[(m[0][0]+m[1][0])/2-(m[0][1]-m[1][1])*_,(m[0][1]+m[1][1])/2-(m[1][0]-m[0][0])*_])}o.setItemLayout(f,m)}}return{progress:i}}};_e({type:"lines",init:function(){},render:function(t,e,r){var a=t.getData(),i=this._updateLineDraw(a,t),n=t.get("zlevel"),o=t.get("effect.trailLength"),s=r.getZr(),l=s.painter.getType()==="svg";if(l||s.painter.getLayer(n).clear(!0),this._lastZlevel!=null&&!l&&s.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(t)&&o){if(z){var u=!1;e.eachSeries(function(f){f!==t&&f.get("zlevel")===n&&(u=!0)}),u&&console.warn("Lines with trail effect should have an individual zlevel")}l||s.configLayer(n,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(o/10+.9,1),0)})}i.updateData(a);var h=t.get("clip",!0)&&_u(t.coordinateSystem,!1,t);h?this.group.setClipPath(h):this.group.removeClipPath(),this._lastZlevel=n,this._finished=!0},incrementalPrepareRender:function(t,e,r){var a=t.getData(),i=this._updateLineDraw(a,t);i.incrementalPrepareUpdate(a),this._clearLayer(r),this._finished=!1},incrementalRender:function(t,e,r){this._lineDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},updateTransform:function(t,e,r){var a=t.getData(),i=t.pipelineContext;if(!this._finished||i.large||i.progressiveRender)return{update:!0};var n=tb.reset(t);n.progress&&n.progress({start:0,end:a.count()},a),this._lineDraw.updateLayout(),this._clearLayer(r)},_updateLineDraw:function(t,e){var r=this._lineDraw,a=this._showEffect(e),i=!!e.get("polyline"),n=e.pipelineContext,o=n.large;return z&&a&&o&&console.warn("Large lines not support effect"),(!r||a!==this._hasEffet||i!==this._isPolyline||o!==this._isLargeDraw)&&(r&&r.remove(),r=this._lineDraw=o?new jw:new Vu(i?a?ig:qu:a?ws:ps),this._hasEffet=a,this._isPolyline=i,this._isLargeDraw=o,this.group.removeAll()),this.group.add(r.group),r},_showEffect:function(t){return!!t.get("effect.show")},_clearLayer:function(t){var e=t.getZr(),r=e.painter.getType()==="svg";!r&&this._lastZlevel!=null&&e.painter.getLayer(this._lastZlevel).clear(!0)},remove:function(t,e){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(e)},dispose:function(){}});function Ju(t){return t instanceof Array||(t=[t,t]),t}var eb="lineStyle.opacity".split("."),Ek={seriesType:"lines",reset:function(t,e,r){var a=Ju(t.get("symbol")),i=Ju(t.get("symbolSize")),n=t.getData();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("opacity",t.get(eb));function o(s,l){var u=s.getItemModel(l),h=Ju(u.getShallow("symbol",!0)),f=Ju(u.getShallow("symbolSize",!0)),c=u.get(eb);h[0]&&s.setItemVisual(l,"fromSymbol",h[0]),h[1]&&s.setItemVisual(l,"toSymbol",h[1]),f[0]&&s.setItemVisual(l,"fromSymbolSize",f[0]),f[1]&&s.setItemVisual(l,"toSymbolSize",f[1]),s.setItemVisual(l,"opacity",c)}return{dataEach:n.hasItemOption?o:null}}};It(tb),bt(Ek),Dt.extend({type:"series.heatmap",getInitialData:function(t,e){return $r(this.getSource(),this,{generateCoord:"value"})},preventIncremental:function(){var t=re.get(this.get("coordinateSystem"));if(t&&t.dimensions)return t.dimensions[0]==="lng"&&t.dimensions[1]==="lat"},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0}});var Rk=256;function rb(){var t=Ri();this.canvas=t,this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={}}rb.prototype={update:function(t,e,r,a,i,n){var o=this._getBrush(),s=this._getGradient(t,i,"inRange"),l=this._getGradient(t,i,"outOfRange"),u=this.pointSize+this.blurSize,h=this.canvas,f=h.getContext("2d"),c=t.length;h.width=e,h.height=r;for(var v=0;v<c;++v){var d=t[v],g=d[0],p=d[1],m=d[2],y=a(m);f.globalAlpha=y,f.drawImage(o,g-u,p-u)}if(!h.width||!h.height)return h;for(var _=f.getImageData(0,0,h.width,h.height),x=_.data,w=0,S=x.length,b=this.minOpacity,A=this.maxOpacity,C=A-b;w<S;){var y=x[w+3]/256,D=Math.floor(y*(Rk-1))*4;if(y>0){var I=n(y)?s:l;y>0&&(y=y*C+b),x[w++]=I[D],x[w++]=I[D+1],x[w++]=I[D+2],x[w++]=I[D+3]*y*256}else w+=4}return f.putImageData(_,0,0),h},_getBrush:function(){var t=this._brushCanvas||(this._brushCanvas=Ri()),e=this.pointSize+this.blurSize,r=e*2;t.width=r,t.height=r;var a=t.getContext("2d");return a.clearRect(0,0,r,r),a.shadowOffsetX=r,a.shadowBlur=this.blurSize,a.shadowColor="#000",a.beginPath(),a.arc(-e,e,this.pointSize,0,Math.PI*2,!0),a.closePath(),a.fill(),t},_getGradient:function(t,e,r){for(var a=this._gradientPixels,i=a[r]||(a[r]=new Uint8ClampedArray(256*4)),n=[0,0,0,0],o=0,s=0;s<256;s++)e[r](s/255,!0,n),i[o++]=n[0],i[o++]=n[1],i[o++]=n[2],i[o++]=n[3];return i}};function kk(t,e,r){var a=t[1]-t[0];e=E(e,function(o){return{interval:[(o.interval[0]-t[0])/a,(o.interval[1]-t[0])/a]}});var i=e.length,n=0;return function(o){for(var s=n;s<i;s++){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){n=s;break}}if(s===i)for(var s=n-1;s>=0;s--){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){n=s;break}}return s>=0&&s<i&&r[s]}}function Nk(t,e){var r=t[1]-t[0];return e=[(e[0]-t[0])/r,(e[1]-t[0])/r],function(a){return a>=e[0]&&a<=e[1]}}function Ok(t){var e=t.dimensions;return e[0]==="lng"&&e[1]==="lat"}_e({type:"heatmap",render:function(t,e,r){var a;if(e.eachComponent("visualMap",function(n){n.eachTargetSeries(function(o){o===t&&(a=n)})}),z&&!a)throw new Error("Heatmap must use with visualMap");this.group.removeAll(),this._incrementalDisplayable=null;var i=t.coordinateSystem;i.type==="cartesian2d"||i.type==="calendar"?this._renderOnCartesianAndCalendar(t,r,0,t.getData().count()):Ok(i)&&this._renderOnGeo(i,t,a,r)},incrementalPrepareRender:function(t,e,r){this.group.removeAll()},incrementalRender:function(t,e,r,a){var i=e.coordinateSystem;i&&this._renderOnCartesianAndCalendar(e,a,t.start,t.end,!0)},_renderOnCartesianAndCalendar:function(t,e,r,a,i){var n=t.coordinateSystem,o,s;if(n.type==="cartesian2d"){var l=n.getAxis("x"),u=n.getAxis("y");if(z){if(!(l.type==="category"&&u.type==="category"))throw new Error("Heatmap on cartesian must have two category axes");if(!(l.onBand&&u.onBand))throw new Error("Heatmap on cartesian must have two axes with boundaryGap true")}o=l.getBandWidth(),s=u.getBandWidth()}for(var h=this.group,f=t.getData(),c="itemStyle",v="emphasis.itemStyle",d="label",g="emphasis.label",p=t.getModel(c).getItemStyle(["color"]),m=t.getModel(v).getItemStyle(),y=t.getModel(d),_=t.getModel(g),x=n.type,w=x==="cartesian2d"?[f.mapDimension("x"),f.mapDimension("y"),f.mapDimension("value")]:[f.mapDimension("time"),f.mapDimension("value")],S=r;S<a;S++){var b;if(x==="cartesian2d"){if(isNaN(f.get(w[2],S)))continue;var A=n.dataToPoint([f.get(w[0],S),f.get(w[1],S)]);b=new ft({shape:{x:Math.floor(Math.round(A[0])-o/2),y:Math.floor(Math.round(A[1])-s/2),width:Math.ceil(o),height:Math.ceil(s)},style:{fill:f.getItemVisual(S,"color"),opacity:f.getItemVisual(S,"opacity")}})}else{if(isNaN(f.get(w[1],S)))continue;b=new ft({z2:1,shape:n.dataToRect([f.get(w[0],S)]).contentShape,style:{fill:f.getItemVisual(S,"color"),opacity:f.getItemVisual(S,"opacity")}})}var C=f.getItemModel(S);f.hasItemOption&&(p=C.getModel(c).getItemStyle(["color"]),m=C.getModel(v).getItemStyle(),y=C.getModel(d),_=C.getModel(g));var D=t.getRawValue(S),I="-";D&&D[2]!=null&&(I=D[2]),Te(p,m,y,_,{labelFetcher:t,labelDataIndex:S,defaultText:I,isRectText:!0}),b.setStyle(p),St(b,f.hasItemOption?m:Z({},m)),b.incremental=i,i&&(b.useHoverLayer=!0),h.add(b),f.setItemGraphicEl(S,b)}},_renderOnGeo:function(t,e,r,a){var i=r.targetVisuals.inRange,n=r.targetVisuals.outOfRange,o=e.getData(),s=this._hmLayer||this._hmLayer||new rb;s.blurSize=e.get("blurSize"),s.pointSize=e.get("pointSize"),s.minOpacity=e.get("minOpacity"),s.maxOpacity=e.get("maxOpacity");var l=t.getViewRect().clone(),u=t.getRoamTransform();l.applyTransform(u);var h=Math.max(l.x,0),f=Math.max(l.y,0),c=Math.min(l.width+l.x,a.getWidth()),v=Math.min(l.height+l.y,a.getHeight()),d=c-h,g=v-f,p=[o.mapDimension("lng"),o.mapDimension("lat"),o.mapDimension("value")],m=o.mapArray(p,function(w,S,b){var A=t.dataToPoint([w,S]);return A[0]-=h,A[1]-=f,A.push(b),A}),y=r.getExtent(),_=r.type==="visualMap.continuous"?Nk(y,r.option.range):kk(y,r.getPieceList(),r.option.selected);s.update(m,d,g,i.color.getNormalizer(),{inRange:i.color.getColorMapper(),outOfRange:n.color.getColorMapper()},_);var x=new Qt({style:{width:d,height:g,x:h,y:f,image:s.canvas},silent:!0});this.group.add(x)},dispose:function(){}});var zk=A1.extend({type:"series.pictorialBar",dependencies:["grid"],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%",progressive:0,hoverAnimation:!1},getInitialData:function(t){return t.stack=null,zk.superApply(this,"getInitialData",arguments)}}),Bk=["itemStyle","borderWidth"],ab=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],ng=new mr,o5=_e({type:"pictorialBar",render:function(t,e,r){var a=this.group,i=t.getData(),n=this._data,o=t.coordinateSystem,s=o.getBaseAxis(),l=!!s.isHorizontal(),u=o.grid.getRect(),h={ecSize:{width:r.getWidth(),height:r.getHeight()},seriesModel:t,coordSys:o,coordSysExtent:[[u.x,u.x+u.width],[u.y,u.y+u.height]],isHorizontal:l,valueDim:ab[+l],categoryDim:ab[1-l]};return i.diff(n).add(function(f){if(!!i.hasValue(f)){var c=hb(i,f),v=ib(i,f,c,h),d=fb(i,h,v);i.setItemGraphicEl(f,d),a.add(d),db(d,h,v)}}).update(function(f,c){var v=n.getItemGraphicEl(c);if(!i.hasValue(f)){a.remove(v);return}var d=hb(i,f),g=ib(i,f,d,h),p=vb(i,g);v&&p!==v.__pictorialShapeStr&&(a.remove(v),i.setItemGraphicEl(f,null),v=null),v?$k(v,h,g):v=fb(i,h,g,!0),i.setItemGraphicEl(f,v),v.__pictorialSymbolMeta=g,a.add(v),db(v,h,g)}).remove(function(f){var c=n.getItemGraphicEl(f);c&&cb(n,f,c.__pictorialSymbolMeta.animationModel,c)}).execute(),this._data=i,this.group},dispose:Kt,remove:function(t,e){var r=this.group,a=this._data;t.get("animation")?a&&a.eachItemGraphicEl(function(i){cb(a,i.dataIndex,t,i)}):r.removeAll()}});function ib(t,e,r,a){var i=t.getItemLayout(e),n=r.get("symbolRepeat"),o=r.get("symbolClip"),s=r.get("symbolPosition")||"start",l=r.get("symbolRotate"),u=(l||0)*Math.PI/180||0,h=r.get("symbolPatternSize")||2,f=r.isAnimationEnabled(),c={dataIndex:e,layout:i,itemModel:r,symbolType:t.getItemVisual(e,"symbol")||"circle",color:t.getItemVisual(e,"color"),symbolClip:o,symbolRepeat:n,symbolRepeatDirection:r.get("symbolRepeatDirection"),symbolPatternSize:h,rotation:u,animationModel:f?r:null,hoverAnimation:f&&r.get("hoverAnimation"),z2:r.getShallow("z",!0)||0};Vk(r,n,i,a,c),Gk(t,e,i,n,o,c.boundingLength,c.pxSign,h,a,c),Hk(r,c.symbolScale,u,a,c);var v=c.symbolSize,d=r.get("symbolOffset");return P(d)&&(d=[R(d[0],v[0]),R(d[1],v[1])]),Fk(r,v,i,n,o,d,s,c.valueLineWidth,c.boundingLength,c.repeatCutLength,a,c),c}function Vk(t,e,r,a,i){var n=a.valueDim,o=t.get("symbolBoundingData"),s=a.coordSys.getOtherAxis(a.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(r[n.wh]<=0),h;if(P(o)){var f=[og(s,o[0])-l,og(s,o[1])-l];f[1]<f[0]&&f.reverse(),h=f[u]}else o!=null?h=og(s,o)-l:e?h=a.coordSysExtent[n.index][u]-l:h=r[n.wh];i.boundingLength=h,e&&(i.repeatCutLength=r[n.wh]),i.pxSign=h>0?1:h<0?-1:0}function og(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function Gk(t,e,r,a,i,n,o,s,l,u){var h=l.valueDim,f=l.categoryDim,c=Math.abs(r[f.wh]),v=t.getItemVisual(e,"symbolSize");P(v)?v=v.slice():(v==null&&(v="100%"),v=[v,v]),v[f.index]=R(v[f.index],c),v[h.index]=R(v[h.index],a?c:Math.abs(n)),u.symbolSize=v;var d=u.symbolScale=[v[0]/s,v[1]/s];d[h.index]*=(l.isHorizontal?-1:1)*o}function Hk(t,e,r,a,i){var n=t.get(Bk)||0;n&&(ng.attr({scale:e.slice(),rotation:r}),ng.updateTransform(),n/=ng.getLineScale(),n*=e[a.valueDim.index]),i.valueLineWidth=n}function Fk(t,e,r,a,i,n,o,s,l,u,h,f){var c=h.categoryDim,v=h.valueDim,d=f.pxSign,g=Math.max(e[v.index]+s,0),p=g;if(a){var m=Math.abs(l),y=Et(t.get("symbolMargin"),"15%")+"",_=!1;y.lastIndexOf("!")===y.length-1&&(_=!0,y=y.slice(0,y.length-1)),y=R(y,e[v.index]);var x=Math.max(g+y*2,0),w=_?0:y*2,S=Z0(a),b=S?a:gb((m+w)/x),A=m-b*g;y=A/2/(_?b:b-1),x=g+y*2,w=_?0:y*2,!S&&a!=="fixed"&&(b=u?gb((Math.abs(u)+w)/x):0),p=b*x-w,f.repeatTimes=b,f.symbolMargin=y}var C=d*(p/2),D=f.pathPosition=[];D[c.index]=r[c.wh]/2,D[v.index]=o==="start"?C:o==="end"?l-C:l/2,n&&(D[0]+=n[0],D[1]+=n[1]);var I=f.bundlePosition=[];I[c.index]=r[c.xy],I[v.index]=r[v.xy];var L=f.barRectShape=Z({},r);L[v.wh]=d*Math.max(Math.abs(r[v.wh]),Math.abs(D[v.index]+C)),L[c.wh]=r[c.wh];var M=f.clipShape={};M[c.xy]=-r[c.xy],M[c.wh]=h.ecSize[c.wh],M[v.xy]=0,M[v.wh]=r[v.wh]}function nb(t){var e=t.symbolPatternSize,r=Le(t.symbolType,-e/2,-e/2,e,e,t.color);return r.attr({culling:!0}),r.type!=="image"&&r.setStyle({strokeNoScale:!0}),r}function ob(t,e,r,a){var i=t.__pictorialBundle,n=r.symbolSize,o=r.valueLineWidth,s=r.pathPosition,l=e.valueDim,u=r.repeatTimes||0,h=0,f=n[e.valueDim.index]+o+r.symbolMargin*2;for(bs(t,function(m){m.__pictorialAnimationIndex=h,m.__pictorialRepeatTimes=u,h<u?kn(m,null,d(h),r,a):kn(m,null,{scale:[0,0]},r,a,function(){i.remove(m)}),sg(m,r),h++});h<u;h++){var c=nb(r);c.__pictorialAnimationIndex=h,c.__pictorialRepeatTimes=u,i.add(c);var v=d(h);kn(c,{position:v.position,scale:[0,0]},{scale:v.scale,rotation:v.rotation},r,a),c.on("mouseover",g).on("mouseout",p),sg(c,r)}function d(m){var y=s.slice(),_=r.pxSign,x=m;return(r.symbolRepeatDirection==="start"?_>0:_<0)&&(x=u-1-m),y[l.index]=f*(x-u/2+.5)+s[l.index],{position:y,scale:r.symbolScale.slice(),rotation:r.rotation}}function g(){bs(t,function(m){m.trigger("emphasis")})}function p(){bs(t,function(m){m.trigger("normal")})}}function sb(t,e,r,a){var i=t.__pictorialBundle,n=t.__pictorialMainPath;n?kn(n,null,{position:r.pathPosition.slice(),scale:r.symbolScale.slice(),rotation:r.rotation},r,a):(n=t.__pictorialMainPath=nb(r),i.add(n),kn(n,{position:r.pathPosition.slice(),scale:[0,0],rotation:r.rotation},{scale:r.symbolScale.slice()},r,a),n.on("mouseover",o).on("mouseout",s)),sg(n,r);function o(){this.trigger("emphasis")}function s(){this.trigger("normal")}}function lb(t,e,r){var a=Z({},e.barRectShape),i=t.__pictorialBarRect;i?kn(i,null,{shape:a},e,r):(i=t.__pictorialBarRect=new ft({z2:2,shape:a,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),t.add(i))}function ub(t,e,r,a){if(r.symbolClip){var i=t.__pictorialClipPath,n=Z({},r.clipShape),o=e.valueDim,s=r.animationModel,l=r.dataIndex;if(i)tt(i,{shape:n},s,l);else{n[o.wh]=0,i=new ft({shape:n}),t.__pictorialBundle.setClipPath(i),t.__pictorialClipPath=i;var u={};u[o.wh]=r.clipShape[o.wh],Gr[a?"updateProps":"initProps"](i,{shape:u},s,l)}}}function hb(t,e){var r=t.getItemModel(e);return r.getAnimationDelayParams=Wk,r.isAnimationEnabled=Uk,r}function Wk(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function Uk(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function sg(t,e){t.off("emphasis").off("normal");var r=e.symbolScale.slice();e.hoverAnimation&&t.on("emphasis",function(){this.animateTo({scale:[r[0]*1.1,r[1]*1.1]},400,"elasticOut")}).on("normal",function(){this.animateTo({scale:r.slice()},400,"elasticOut")})}function fb(t,e,r,a){var i=new G,n=new G;return i.add(n),i.__pictorialBundle=n,n.attr("position",r.bundlePosition.slice()),r.symbolRepeat?ob(i,e,r):sb(i,e,r),lb(i,r,a),ub(i,e,r,a),i.__pictorialShapeStr=vb(t,r),i.__pictorialSymbolMeta=r,i}function $k(t,e,r){var a=r.animationModel,i=r.dataIndex,n=t.__pictorialBundle;tt(n,{position:r.bundlePosition.slice()},a,i),r.symbolRepeat?ob(t,e,r,!0):sb(t,e,r,!0),lb(t,r,!0),ub(t,e,r,!0)}function cb(t,e,r,a){var i=a.__pictorialBarRect;i&&(i.style.text=null);var n=[];bs(a,function(o){n.push(o)}),a.__pictorialMainPath&&n.push(a.__pictorialMainPath),a.__pictorialClipPath&&(r=null),T(n,function(o){tt(o,{scale:[0,0]},r,e,function(){a.parent&&a.parent.remove(a)})}),t.setItemGraphicEl(e,null)}function vb(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function bs(t,e,r){T(t.__pictorialBundle.children(),function(a){a!==t.__pictorialBarRect&&e.call(r,a)})}function kn(t,e,r,a,i,n){e&&t.attr(e),a.symbolClip&&!i?r&&t.attr(r):r&&Gr[i?"updateProps":"initProps"](t,r,a.animationModel,a.dataIndex,n)}function db(t,e,r){var a=r.color,i=r.dataIndex,n=r.itemModel,o=n.getModel("itemStyle").getItemStyle(["color"]),s=n.getModel("emphasis.itemStyle").getItemStyle(),l=n.getShallow("cursor");bs(t,function(c){c.setColor(a),c.setStyle(U({fill:a,opacity:r.opacity},o)),St(c,s),l&&(c.cursor=l),c.z2=r.z2});var u={},h=e.valueDim.posDesc[+(r.boundingLength>0)],f=t.__pictorialBarRect;T1(f.style,u,n,a,e.seriesModel,i,h),St(f,u)}function gb(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}It(K(I_,"pictorialBar")),bt(li("pictorialBar","roundRect"));var ju=function(t,e,r,a,i){Vt.call(this,t,e,r),this.type=a||"value",this.position=i||"bottom",this.orient=null};ju.prototype={constructor:ju,model:null,isHorizontal:function(){var t=this.position;return t==="top"||t==="bottom"},pointToData:function(t,e){return this.coordinateSystem.pointToData(t,e)[0]},toGlobalCoord:null,toLocalCoord:null},yt(ju,Vt);function th(t,e,r){this.dimension="single",this.dimensions=["single"],this._axis=null,this._rect,this._init(t,e,r),this.model=t}th.prototype={type:"singleAxis",axisPointerEnabled:!0,constructor:th,_init:function(t,e,r){var a=this.dimension,i=new ju(a,dn(t),[0,0],t.get("type"),t.get("position")),n=i.type==="category";i.onBand=n&&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},update:function(t,e){t.eachSeries(function(r){if(r.coordinateSystem===this){var a=r.getData();T(a.mapDimension(this.dimension,!0),function(i){this._axis.scale.unionExtentFromData(a,i)},this),xa(this._axis.scale,this._axis.model)}},this)},resize:function(t,e){this._rect=Ot({left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")},{width:e.getWidth(),height:e.getHeight()}),this._adjustAxis()},getRect:function(){return this._rect},_adjustAxis:function(){var t=this._rect,e=this._axis,r=e.isHorizontal(),a=r?[0,t.width]:[0,t.height],i=e.reverse?1:0;e.setExtent(a[i],a[1-i]),this._updateAxisTransform(e,r?t.x:t.y)},_updateAxisTransform:function(t,e){var r=t.getExtent(),a=r[0]+r[1],i=t.isHorizontal();t.toGlobalCoord=i?function(n){return n+e}:function(n){return a-n+e},t.toLocalCoord=i?function(n){return n-e}:function(n){return a-n+e}},getAxis:function(){return this._axis},getBaseAxis:function(){return this._axis},getAxes:function(){return[this._axis]},getTooltipAxes:function(){return{baseAxes:[this.getAxis()]}},containPoint:function(t){var e=this.getRect(),r=this.getAxis(),a=r.orient;return a==="horizontal"?r.contain(r.toLocalCoord(t[0]))&&t[1]>=e.y&&t[1]<=e.y+e.height:r.contain(r.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},pointToData:function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t[e.orient==="horizontal"?0:1]))]},dataToPoint:function(t){var e=this.getAxis(),r=this.getRect(),a=[],i=e.orient==="horizontal"?0:1;return t instanceof Array&&(t=t[0]),a[i]=e.toGlobalCoord(e.dataToCoord(+t)),a[1-i]=i===0?r.y+r.height/2:r.x+r.width/2,a}};function Zk(t,e){var r=[];return t.eachComponent("singleAxis",function(a,i){var n=new th(a,t,e);n.name="single_"+i,n.resize(a,e),a.coordinateSystem=n,r.push(n)}),t.eachSeries(function(a){if(a.get("coordinateSystem")==="singleAxis"){var i=t.queryComponents({mainType:"singleAxis",index:a.get("singleAxisIndex"),id:a.get("singleAxisId")})[0];a.coordinateSystem=i&&i.coordinateSystem}}),r}re.register("single",{create:Zk,dimensions:th.prototype.dimensions});function lg(t,e){e=e||{};var r=t.coordinateSystem,a=t.axis,i={},n=a.position,o=a.orient,s=r.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};i.position=[o==="vertical"?u.vertical[n]:l[0],o==="horizontal"?u.horizontal[n]:l[3]];var h={horizontal:0,vertical:1};i.rotation=Math.PI/2*h[o];var f={top:-1,bottom:1,right:1,left:-1};i.labelDirection=i.tickDirection=i.nameDirection=f[n],t.get("axisTick.inside")&&(i.tickDirection=-i.tickDirection),Et(e.labelInside,t.get("axisLabel.inside"))&&(i.labelDirection=-i.labelDirection);var c=e.rotate;return c==null&&(c=t.get("axisLabel.rotate")),i.labelRotation=n==="top"?-c:c,i.z2=1,i}var Yk=["axisLine","axisTickLabel","axisName"],Xk=["splitArea","splitLine"],qk=Pe.extend({type:"singleAxis",axisPointerClass:"SingleAxisPointer",render:function(t,e,r,a){var i=this.group;i.removeAll();var n=this._axisGroup;this._axisGroup=new G;var o=lg(t),s=new xe(t,o);T(Yk,s.add,s),i.add(this._axisGroup),i.add(s.getGroup()),T(Xk,function(l){t.get(l+".show")&&this["_"+l](t)},this),Ol(n,this._axisGroup,t),qk.superCall(this,"render",t,e,r,a)},remove:function(){S1(this)},_splitLine:function(t){var e=t.axis;if(!e.scale.isBlank()){var r=t.getModel("splitLine"),a=r.getModel("lineStyle"),i=a.get("width"),n=a.get("color");n=n instanceof Array?n:[n];for(var o=t.coordinateSystem.getRect(),s=e.isHorizontal(),l=[],u=0,h=e.getTicksCoords({tickModel:r}),f=[],c=[],v=0;v<h.length;++v){var d=e.toGlobalCoord(h[v].coord);s?(f[0]=d,f[1]=o.y,c[0]=d,c[1]=o.y+o.height):(f[0]=o.x,f[1]=d,c[0]=o.x+o.width,c[1]=d);var g=u++%n.length;l[g]=l[g]||[],l[g].push(new ee({subPixelOptimize:!0,shape:{x1:f[0],y1:f[1],x2:c[0],y2:c[1]},style:{lineWidth:i},silent:!0}))}for(var v=0;v<l.length;++v)this.group.add(He(l[v],{style:{stroke:n[v%n.length],lineDash:a.getLineDash(i),lineWidth:i},silent:!0}))}},_splitArea:function(t){b1(this,this._axisGroup,t,t)}}),pb=ct.extend({type:"singleAxis",layoutMode:"box",axis:null,coordinateSystem:null,getCoordSysModel:function(){return this}}),Kk={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}}};function Qk(t,e){return e.type||(e.data?"category":"value")}J(pb.prototype,oi),mn("single",pb,Qk,Kk);var mb=function(t,e){var r=[],a=t.seriesIndex,i;if(a==null||!(i=e.getSeriesByIndex(a)))return{point:[]};var n=i.getData(),o=cl(n,t);if(o==null||o<0||P(o))return{point:[]};var s=n.getItemGraphicEl(o),l=i.coordinateSystem;if(i.getTooltipPosition)r=i.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)r=l.dataToPoint(n.getValues(E(l.dimensions,function(h){return n.mapDimension(h)}),o,!0))||[];else if(s){var u=s.getBoundingRect().clone();u.applyTransform(s.transform),r=[u.x+u.width/2,u.y+u.height/2]}return{point:r,el:s}},Ir=T,yb=K,_b=de(),Jk=function(t,e,r){var a=t.currTrigger,i=[t.x,t.y],n=t,o=t.dispatchAction||X(r.dispatchAction,r),s=e.getComponent("axisPointer").coordSysAxesInfo;if(!!s){eh(i)&&(i=mb({seriesIndex:n.seriesIndex,dataIndex:n.dataIndex},e).point);var l=eh(i),u=n.axesInfo,h=s.axesInfo,f=a==="leave"||eh(i),c={},v={},d={list:[],map:{}},g={showPointer:yb(tN,v),showTooltip:yb(eN,d)};Ir(s.coordSysMap,function(m,y){var _=l||m.containPoint(i);Ir(s.coordSysAxesInfo[y],function(x,w){var S=x.axis,b=nN(u,x);if(!f&&_&&(!u||b)){var A=b&&b.value;A==null&&!l&&(A=S.pointToData(i)),A!=null&&xb(x,A,g,!1,c)}})});var p={};return Ir(h,function(m,y){var _=m.linkGroup;_&&!v[y]&&Ir(_.axesInfo,function(x,w){var S=v[w];if(x!==m&&S){var b=S.value;_.mapper&&(b=m.axis.scale.parse(_.mapper(b,wb(x),wb(m)))),p[m.key]=b}})}),Ir(p,function(m,y){xb(h[y],m,g,!0,c)}),rN(v,h,c),aN(d,i,t,o),iN(h,o,r),c}};function xb(t,e,r,a,i){var n=t.axis;if(!(n.scale.isBlank()||!n.containData(e))){if(!t.involveSeries){r.showPointer(t,e);return}var o=jk(e,t),s=o.payloadBatch,l=o.snapToValue;s[0]&&i.seriesIndex==null&&Z(i,s[0]),!a&&t.snap&&n.containData(l)&&l!=null&&(e=l),r.showPointer(t,e,s,i),r.showTooltip(t,o,l)}}function jk(t,e){var r=e.axis,a=r.dim,i=t,n=[],o=Number.MAX_VALUE,s=-1;return Ir(e.seriesModels,function(l,u){var h=l.getData().mapDimension(a,!0),f,c;if(l.getAxisTooltipData){var v=l.getAxisTooltipData(h,t,r);c=v.dataIndices,f=v.nestestValue}else{if(c=l.getData().indicesOfNearest(h[0],t,r.type==="category"?.5:null),!c.length)return;f=l.getData().get(h[0],c[0])}if(!(f==null||!isFinite(f))){var d=t-f,g=Math.abs(d);g<=o&&((g<o||d>=0&&s<0)&&(o=g,s=d,i=f,n.length=0),Ir(c,function(p){n.push({seriesIndex:l.seriesIndex,dataIndexInside:p,dataIndex:l.getData().getRawIndex(p)})}))}}),{payloadBatch:n,snapToValue:i}}function tN(t,e,r,a){t[e.key]={value:r,payloadBatch:a}}function eN(t,e,r,a){var i=r.payloadBatch,n=e.axis,o=n.model,s=e.axisPointerModel;if(!(!e.triggerTooltip||!i.length)){var l=e.coordSys.model,u=jo(l),h=t.map[u];h||(h=t.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(h)),h.dataByAxis.push({axisDim:n.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:a,valueLabelOpt:{precision:s.get("label.precision"),formatter:s.get("label.formatter")},seriesDataIndices:i.slice()})}}function rN(t,e,r){var a=r.axesInfo=[];Ir(e,function(i,n){var o=i.axisPointerModel.option,s=t[n];s?(!i.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!i.useHandle&&(o.status="hide"),o.status==="show"&&a.push({axisDim:i.axis.dim,axisIndex:i.axis.model.componentIndex,value:o.value})})}function aN(t,e,r,a){if(eh(e)||!t.list.length){a({type:"hideTip"});return}var i=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};a({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:r.tooltipOption,position:r.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:t.list})}function iN(t,e,r){var a=r.getZr(),i="axisPointerLastHighlights",n=_b(a)[i]||{},o=_b(a)[i]={};Ir(t,function(u,h){var f=u.axisPointerModel.option;f.status==="show"&&Ir(f.seriesDataIndices,function(c){var v=c.seriesIndex+" | "+c.dataIndex;o[v]=c})});var s=[],l=[];T(n,function(u,h){!o[h]&&l.push(u)}),T(o,function(u,h){!n[h]&&s.push(u)}),l.length&&r.dispatchAction({type:"downplay",escapeConnect:!0,batch:l}),s.length&&r.dispatchAction({type:"highlight",escapeConnect:!0,batch:s})}function nN(t,e){for(var r=0;r<(t||[]).length;r++){var a=t[r];if(e.axis.dim===a.axisDim&&e.axis.model.componentIndex===a.axisIndex)return a}}function wb(t){var e=t.axis.model,r={},a=r.axisDim=t.axis.dim;return r.axisIndex=r[a+"AxisIndex"]=e.componentIndex,r.axisName=r[a+"AxisName"]=e.name,r.axisId=r[a+"AxisId"]=e.id,r}function eh(t){return!t||t[0]==null||isNaN(t[0])||t[1]==null||isNaN(t[1])}var s5=Me({type:"axisPointer",coordSysAxesInfo:null,defaultOption:{show:"auto",triggerOn:null,zlevel:0,z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#aaa",width:1,type:"solid"},shadowStyle:{color:"rgba(150,150,150,0.3)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,shadowBlur:3,shadowColor:"#aaa"},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}}}),Xr=de(),oN=T;function bb(t,e,r){if(!at.node){var a=e.getZr();Xr(a).records||(Xr(a).records={}),sN(a,e);var i=Xr(a).records[t]||(Xr(a).records[t]={});i.handler=r}}function sN(t,e){if(Xr(t).initialized)return;Xr(t).initialized=!0,r("click",K(Sb,"click")),r("mousemove",K(Sb,"mousemove")),r("globalout",uN);function r(a,i){t.on(a,function(n){var o=hN(e);oN(Xr(t).records,function(s){s&&i(s,n,o.dispatchAction)}),lN(o.pendings,e)})}}function lN(t,e){var r=t.showTip.length,a=t.hideTip.length,i;r?i=t.showTip[r-1]:a&&(i=t.hideTip[a-1]),i&&(i.dispatchAction=null,e.dispatchAction(i))}function uN(t,e,r){t.handler("leave",null,r)}function Sb(t,e,r,a){e.handler(t,r,a)}function hN(t){var e={showTip:[],hideTip:[]},r=function(a){var i=e[a.type];i?i.push(a):(a.dispatchAction=r,t.dispatchAction(a))};return{dispatchAction:r,pendings:e}}function ug(t,e){if(!at.node){var r=e.getZr(),a=(Xr(r).records||{})[t];a&&(Xr(r).records[t]=null)}}var Ab=Xt({type:"axisPointer",render:function(t,e,r){var a=e.getComponent("tooltip"),i=t.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click";bb("axisPointer",r,function(n,o,s){i!=="none"&&(n==="leave"||i.indexOf(n)>=0)&&s({type:"updateAxisPointer",currTrigger:n,x:o&&o.offsetX,y:o&&o.offsetY})})},remove:function(t,e){ug(e.getZr(),"axisPointer"),Ab.superApply(this._model,"remove",arguments)},dispose:function(t,e){ug("axisPointer",e),Ab.superApply(this._model,"dispose",arguments)}}),wi=de(),Tb=Y,hg=X;function bi(){}bi.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(t,e,r,a){var i=e.get("value"),n=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=r,!(!a&&this._lastValue===i&&this._lastStatus===n)){this._lastValue=i,this._lastStatus=n;var o=this._group,s=this._handle;if(!n||n==="hide"){o&&o.hide(),s&&s.hide();return}o&&o.show(),s&&s.show();var l={};this.makeElOption(l,i,t,e,r);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(r),this._lastGraphicKey=u;var h=this._moveAnimation=this.determineAnimation(t,e);if(!o)o=this._group=new G,this.createPointerEl(o,l,t,e),this.createLabelEl(o,l,t,e),r.getZr().add(o);else{var f=K(Cb,e,h);this.updatePointerEl(o,l,f,e),this.updateLabelEl(o,l,f,e)}Mb(o,e,!0),this._renderHandle(i)}},remove:function(t){this.clear(t)},dispose:function(t){this.clear(t)},determineAnimation:function(t,e){var r=e.get("animation"),a=t.axis,i=a.type==="category",n=e.get("snap");if(!n&&!i)return!1;if(r==="auto"||r==null){var o=this.animationThreshold;if(i&&a.getBandWidth()>o)return!0;if(n){var s=Uv(t).seriesDataCount,l=a.getExtent();return Math.abs(l[0]-l[1])/s>o}return!1}return r===!0},makeElOption:function(t,e,r,a,i){},createPointerEl:function(t,e,r,a){var i=e.pointer;if(i){var n=wi(t).pointerEl=new Gr[i.type](Tb(e.pointer));t.add(n)}},createLabelEl:function(t,e,r,a){if(e.label){var i=wi(t).labelEl=new ft(Tb(e.label));t.add(i),Ib(i,a)}},updatePointerEl:function(t,e,r){var a=wi(t).pointerEl;a&&e.pointer&&(a.setStyle(e.pointer.style),r(a,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,r,a){var i=wi(t).labelEl;i&&(i.setStyle(e.label.style),r(i,{shape:e.label.shape,position:e.label.position}),Ib(i,a))},_renderHandle:function(t){if(!(this._dragging||!this.updateHandleTransform)){var e=this._axisPointerModel,r=this._api.getZr(),a=this._handle,i=e.getModel("handle"),n=e.get("status");if(!i.get("show")||!n||n==="hide"){a&&r.remove(a),this._handle=null;return}var o;this._handle||(o=!0,a=this._handle=xo(i.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){Va(u.event)},onmousedown:hg(this._onHandleDragMove,this,0,0),drift:hg(this._onHandleDragMove,this),ondragend:hg(this._onHandleDragEnd,this)}),r.add(a)),Mb(a,e,!1);var s=["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];a.setStyle(i.getItemStyle(null,s));var l=i.get("size");P(l)||(l=[l,l]),a.attr("scale",[l[0]/2,l[1]/2]),ko(this,"_doDispatchAxisPointer",i.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,o)}},_moveHandleToValue:function(t,e){Cb(this._axisPointerModel,!e&&this._moveAnimation,this._handle,fg(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var r=this._handle;if(!!r){this._dragging=!0;var a=this.updateHandleTransform(fg(r),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=a,r.stopAnimation(),r.attr(fg(a)),wi(r).lastProp=null,this._doDispatchAxisPointer()}},_doDispatchAxisPointer:function(){var t=this._handle;if(!!t){var e=this._payloadInfo,r=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:r.axis.dim,axisIndex:r.componentIndex}]})}},_onHandleDragEnd:function(t){this._dragging=!1;var e=this._handle;if(!!e){var r=this._axisPointerModel.get("value");this._moveHandleToValue(r),this._api.dispatchAction({type:"hideTip"})}},getHandleTransform:null,updateHandleTransform:null,clear:function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),r=this._group,a=this._handle;e&&r&&(this._lastGraphicKey=null,r&&e.remove(r),a&&e.remove(a),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(t,e,r){return r=r||0,{x:t[r],y:t[1-r],width:e[r],height:e[1-r]}}},bi.prototype.constructor=bi;function Cb(t,e,r,a){Db(wi(r).lastProp,a)||(wi(r).lastProp=a,e?tt(r,a,t):(r.stopAnimation(),r.attr(a)))}function Db(t,e){if(Q(t)&&Q(e)){var r=!0;return T(e,function(a,i){r=r&&Db(t[i],a)}),!!r}else return t===e}function Ib(t,e){t[e.get("label.show")?"show":"hide"]()}function fg(t){return{position:t.position.slice(),rotation:t.rotation||0}}function Mb(t,e,r){var a=e.get("z"),i=e.get("zlevel");t&&t.traverse(function(n){n.type!=="group"&&(a!=null&&(n.z=a),i!=null&&(n.zlevel=i),n.silent=r)})}lo(bi);function cg(t){var e=t.get("type"),r=t.getModel(e+"Style"),a;return e==="line"?(a=r.getLineStyle(),a.fill=null):e==="shadow"&&(a=r.getAreaStyle(),a.stroke=null),a}function Lb(t,e,r,a,i){var n=r.get("value"),o=Pb(n,e.axis,e.ecModel,r.get("seriesDataIndices"),{precision:r.get("label.precision"),formatter:r.get("label.formatter")}),s=r.getModel("label"),l=ja(s.get("padding")||0),u=s.getFont(),h=cr(o,u),f=i.position,c=h.width+l[1]+l[3],v=h.height+l[0]+l[2],d=i.align;d==="right"&&(f[0]-=c),d==="center"&&(f[0]-=c/2);var g=i.verticalAlign;g==="bottom"&&(f[1]-=v),g==="middle"&&(f[1]-=v/2),fN(f,c,v,a);var p=s.get("backgroundColor");(!p||p==="auto")&&(p=e.get("axisLine.lineStyle.color")),t.label={shape:{x:0,y:0,width:c,height:v,r:s.get("borderRadius")},position:f.slice(),style:{text:o,textFont:u,textFill:s.getTextColor(),textPosition:"inside",textPadding:l,fill:p,stroke:s.get("borderColor")||"transparent",lineWidth:s.get("borderWidth")||0,shadowBlur:s.get("shadowBlur"),shadowColor:s.get("shadowColor"),shadowOffsetX:s.get("shadowOffsetX"),shadowOffsetY:s.get("shadowOffsetY")},z2:10}}function fN(t,e,r,a){var i=a.getWidth(),n=a.getHeight();t[0]=Math.min(t[0]+e,i)-e,t[1]=Math.min(t[1]+r,n)-r,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}function Pb(t,e,r,a,i){t=e.scale.parse(t);var n=e.scale.getLabel(t,{precision:i.precision}),o=i.formatter;if(o){var s={value:Lv(e,t),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};T(a,function(l){var u=r.getSeriesByIndex(l.seriesIndex),h=l.dataIndexInside,f=u&&u.getDataParams(h);f&&s.seriesData.push(f)}),_t(o)?n=o.replace("{value}",n):$t(o)&&(n=o(s))}return n}function vg(t,e,r){var a=ce();return Or(a,a,r.rotation),Je(a,a,r.position),xr([t.dataToCoord(e),(r.labelOffset||0)+(r.labelDirection||1)*(r.labelMargin||0)],a)}function Eb(t,e,r,a,i,n){var o=xe.innerTextLayout(r.rotation,0,r.labelDirection);r.labelMargin=i.get("label.margin"),Lb(e,a,i,n,{position:vg(a.axis,t,r),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function dg(t,e,r){return r=r||0,{x1:t[r],y1:t[1-r],x2:e[r],y2:e[1-r]}}function Rb(t,e,r){return r=r||0,{x:t[r],y:t[1-r],width:e[r],height:e[1-r]}}function kb(t,e,r,a,i,n){return{cx:t,cy:e,r0:r,r:a,startAngle:i,endAngle:n,clockwise:!0}}var cN=bi.extend({makeElOption:function(t,e,r,a,i){var n=r.axis,o=n.grid,s=a.get("type"),l=Nb(o,n).getOtherAxis(n).getGlobalExtent(),u=n.toGlobalCoord(n.dataToCoord(e,!0));if(s&&s!=="none"){var h=cg(a),f=vN[s](n,u,l);f.style=h,t.graphicKey=f.type,t.pointer=f}var c=Yv(o.model,r);Eb(e,t,c,r,a,i)},getHandleTransform:function(t,e,r){var a=Yv(e.axis.grid.model,e,{labelInside:!1});return a.labelMargin=r.get("handle.margin"),{position:vg(e.axis,t,a),rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,r,a){var i=r.axis,n=i.grid,o=i.getGlobalExtent(!0),s=Nb(n,i).getOtherAxis(i).getGlobalExtent(),l=i.dim==="x"?0:1,u=t.position;u[l]+=e[l],u[l]=Math.min(o[1],u[l]),u[l]=Math.max(o[0],u[l]);var h=(s[1]+s[0])/2,f=[h,h];f[l]=u[l];var c=[{verticalAlign:"middle"},{align:"center"}];return{position:u,rotation:t.rotation,cursorPoint:f,tooltipOption:c[l]}}});function Nb(t,e){var r={};return r[e.dim+"AxisIndex"]=e.index,t.getCartesian(r)}var vN={line:function(t,e,r){var a=dg([e,r[0]],[e,r[1]],Ob(t));return{type:"Line",subPixelOptimize:!0,shape:a}},shadow:function(t,e,r){var a=Math.max(1,t.getBandWidth()),i=r[1]-r[0];return{type:"Rect",shape:Rb([e-a/2,r[0]],[a,i],Ob(t))}}};function Ob(t){return t.dim==="x"?0:1}Pe.registerAxisPointerClass("CartesianAxisPointer",cN),ie(function(t){if(t){(!t.axisPointer||t.axisPointer.length===0)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!P(e)&&(t.axisPointer.link=[e])}}),Ie(br.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=bL(t,e)}),lt({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},Jk);var zb=["x","y"],dN=["width","height"],gN=bi.extend({makeElOption:function(t,e,r,a,i){var n=r.axis,o=n.coordinateSystem,s=gg(o,1-rh(n)),l=o.dataToPoint(e)[0],u=a.get("type");if(u&&u!=="none"){var h=cg(a),f=pN[u](n,l,s);f.style=h,t.graphicKey=f.type,t.pointer=f}var c=lg(r);Eb(e,t,c,r,a,i)},getHandleTransform:function(t,e,r){var a=lg(e,{labelInside:!1});return a.labelMargin=r.get("handle.margin"),{position:vg(e.axis,t,a),rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,r,a){var i=r.axis,n=i.coordinateSystem,o=rh(i),s=gg(n,o),l=t.position;l[o]+=e[o],l[o]=Math.min(s[1],l[o]),l[o]=Math.max(s[0],l[o]);var u=gg(n,1-o),h=(u[1]+u[0])/2,f=[h,h];return f[o]=l[o],{position:l,rotation:t.rotation,cursorPoint:f,tooltipOption:{verticalAlign:"middle"}}}}),pN={line:function(t,e,r){var a=dg([e,r[0]],[e,r[1]],rh(t));return{type:"Line",subPixelOptimize:!0,shape:a}},shadow:function(t,e,r){var a=t.getBandWidth(),i=r[1]-r[0];return{type:"Rect",shape:Rb([e-a/2,r[0]],[a,i],rh(t))}}};function rh(t){return t.isHorizontal()?0:1}function gg(t,e){var r=t.getRect();return[r[zb[e]],r[zb[e]]+r[dN[e]]]}Pe.registerAxisPointerClass("SingleAxisPointer",gN),Xt({type:"single"});var pg=2,mN=Dt.extend({type:"series.themeRiver",dependencies:["singleAxis"],nameMap:null,init:function(t){mN.superApply(this,"init",arguments),this.legendVisualProvider=new ts(X(this.getData,this),X(this.getRawData,this))},fixData:function(t){var e=t.length,r=sc(t,function(m){return m[2]}),a=[];r.buckets.each(function(m,y){a.push({name:y,dataList:m})});for(var i=a.length,n=-1,o=-1,s=0;s<i;++s){var l=a[s].dataList.length;l>n&&(n=l,o=s)}for(var u=0;u<i;++u)if(u!==o)for(var h=a[u].name,f=0;f<n;++f){for(var c=a[o].dataList[f][0],v=a[u].dataList.length,d=-1,g=0;g<v;++g){var p=a[u].dataList[g][0];if(p===c){d=g;break}}d===-1&&(t[e]=[],t[e][0]=c,t[e][1]=0,t[e][2]=h,e++)}return t},getInitialData:function(t,e){for(var r=e.queryComponents({mainType:"singleAxis",index:this.get("singleAxisIndex"),id:this.get("singleAxisId")})[0],a=r.get("type"),i=Ht(t.data,function(c){return c[2]!==void 0}),n=this.fixData(i||[]),o=[],s=this.nameMap=j(),l=0,u=0;u<n.length;++u)o.push(n[u][pg]),s.get(n[u][pg])||(s.set(n[u][pg],l),l++);var h=un(n,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:lu(a)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}),f=new qt(h,this);return f.initData(n),f},getLayerSeries:function(){for(var t=this.getData(),e=t.count(),r=[],a=0;a<e;++a)r[a]=a;var i=t.mapDimension("single"),n=sc(r,function(s){return t.get("name",s)}),o=[];return n.buckets.each(function(s,l){s.sort(function(u,h){return t.get(i,u)-t.get(i,h)}),o.push({name:l,indices:s})}),o},getAxisTooltipData:function(t,e,r){P(t)||(t=t?[t]:[]);for(var a=this.getData(),i=this.getLayerSeries(),n=[],o=i.length,s,l=0;l<o;++l){for(var u=Number.MAX_VALUE,h=-1,f=i[l].indices.length,c=0;c<f;++c){var v=a.get(t[0],i[l].indices[c]),d=Math.abs(v-e);d<=u&&(s=v,u=d,h=i[l].indices[c])}n.push(h)}return{dataIndices:n,nestestValue:s}},formatTooltip:function(t){var e=this.getData(),r=e.getName(t),a=e.get(e.mapDimension("value"),t);return(isNaN(a)||a==null)&&(a="-"),Tt(r+" : "+a)},defaultOption:{zlevel:0,z:2,coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",color:"#000",fontSize:11},emphasis:{label:{show:!0}}}});_e({type:"themeRiver",init:function(){this._layers=[]},render:function(t,e,r){var a=t.getData(),i=this.group,n=t.getLayerSeries(),o=a.getLayout("layoutInfo"),s=o.rect,l=o.boundaryGap;i.attr("position",[0,s.y+l[0]]);function u(v){return v.name}var h=new Wr(this._layersSeries||[],n,u,u),f={};h.add(X(c,this,"add")).update(X(c,this,"update")).remove(X(c,this,"remove")).execute();function c(v,d,g){var p=this._layers;if(v==="remove"){i.remove(p[d]);return}for(var m=[],y=[],_,x=n[d].indices,w=0;w<x.length;w++){var S=a.getItemLayout(x[w]),b=S.x,A=S.y0,C=S.y;m.push([b,A]),y.push([b,A+C]),_=a.getItemVisual(x[w],"color")}var D,I,L=a.getItemLayout(x[0]),M=a.getItemModel(x[w-1]),B=M.getModel("label"),k=B.get("margin");if(v==="add"){var O=f[d]=new G;D=new j_({shape:{points:m,stackedOnPoints:y,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),I=new nt({style:{x:L.x-k,y:L.y0+L.y/2}}),O.add(D),O.add(I),i.add(O),D.setClipPath(yN(D.getBoundingRect(),t,function(){D.removeClipPath()}))}else{var O=p[g];D=O.childAt(0),I=O.childAt(1),i.add(O),f[d]=O,tt(D,{shape:{points:m,stackedOnPoints:y}},t),tt(I,{style:{x:L.x-k,y:L.y0+L.y/2}},t)}var V=M.getModel("emphasis.itemStyle"),H=M.getModel("itemStyle");Rt(I.style,B,{text:B.get("show")?t.getFormattedLabel(x[w-1],"normal")||a.getName(x[w-1]):null,textVerticalAlign:"middle"}),D.setStyle(Z({fill:_},H.getItemStyle(["color"]))),St(D,V.getItemStyle())}this._layersSeries=n,this._layers=f},dispose:function(){}});function yN(t,e,r){var a=new ft({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return oe(a,{shape:{width:t.width+20,height:t.height+20}},e,r),a}var _N=function(t,e){t.eachSeriesByType("themeRiver",function(r){var a=r.getData(),i=r.coordinateSystem,n={},o=i.getRect();n.rect=o;var s=r.get("boundaryGap"),l=i.getAxis();if(n.boundaryGap=s,l.orient==="horizontal"){s[0]=R(s[0],o.height),s[1]=R(s[1],o.height);var u=o.height-s[0]-s[1];Bb(a,r,u)}else{s[0]=R(s[0],o.width),s[1]=R(s[1],o.width);var h=o.width-s[0]-s[1];Bb(a,r,h)}a.setLayout("layoutInfo",n)})};function Bb(t,e,r){if(!!t.count())for(var a=e.coordinateSystem,i=e.getLayerSeries(),n=t.mapDimension("single"),o=t.mapDimension("value"),s=E(i,function(p){return E(p.indices,function(m){var y=a.dataToPoint(t.get(n,m));return y[1]=t.get(o,m),y})}),l=xN(s),u=l.y0,h=r/l.max,f=i.length,c=i[0].indices.length,v,d=0;d<c;++d){v=u[d]*h,t.setItemLayout(i[0].indices[d],{layerIndex:0,x:s[0][d][0],y0:v,y:s[0][d][1]*h});for(var g=1;g<f;++g)v+=s[g-1][d][1]*h,t.setItemLayout(i[g].indices[d],{layerIndex:g,x:s[g][d][0],y0:v,y:s[g][d][1]*h})}}function xN(t){for(var e=t.length,r=t[0].length,a=[],i=[],n=0,o,s={},l=0;l<r;++l){for(var u=0,o=0;u<e;++u)o+=t[u][l][1];o>n&&(n=o),a.push(o)}for(var h=0;h<r;++h)i[h]=(n-a[h])/2;n=0;for(var f=0;f<r;++f){var c=a[f]+i[f];c>n&&(n=c)}return s.y0=i,s.max=n,s}var wN=function(t){t.eachSeriesByType("themeRiver",function(e){var r=e.getData(),a=e.getRawData(),i=e.get("color"),n=j();r.each(function(o){n.set(r.getRawIndex(o),o)}),a.each(function(o){var s=a.getName(o),l=i[(e.nameMap.get(s)-1)%i.length];a.setItemVisual(o,"color",l);var u=n.get(o);u!=null&&r.setItemVisual(u,"color",l)})})};It(_N),bt(wN),Ie(es("themeRiver")),Dt.extend({type:"series.sunburst",_viewRoot:null,getInitialData:function(t,e){var r={name:t.name,children:t.data};Vb(r);var a=t.levels||[],i={};return i.levels=a,fi.createTree(r,this,i).data},optionUpdated:function(){this.resetViewRoot()},getDataParams:function(t){var e=Dt.prototype.getDataParams.apply(this,arguments),r=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=dd(r,this),e},defaultOption:{zlevel:0,z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,percentPrecision:2,stillShowZeroSum:!0,highlightPolicy:"descendant",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},highlight:{itemStyle:{opacity:1}},downplay:{itemStyle:{opacity:.5},label:{opacity:.6}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicOut",data:[],levels:[],sort:"desc"},getViewRoot:function(){return this._viewRoot},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)}});function Vb(t){var e=0;T(t.children,function(a){Vb(a);var i=a.value;P(i)&&(i=i[0]),e+=i});var r=t.value;P(r)&&(r=r[0]),(r==null||isNaN(r))&&(r=e),r<0&&(r=0),P(t.value)?t.value[0]=r:t.value=r}var ah={NONE:"none",DESCENDANT:"descendant",ANCESTOR:"ancestor",SELF:"self"},bN=2,SN=4;function ih(t,e,r){G.call(this);var a=new ir({z2:bN});a.seriesIndex=e.seriesIndex;var i=new nt({z2:SN,silent:t.getModel("label").get("silent")});this.add(a),this.add(i),this.updateData(!0,t,"normal",e,r);function n(){i.ignore=i.hoverIgnore}function o(){i.ignore=i.normalIgnore}this.on("emphasis",n).on("normal",o).on("mouseover",n).on("mouseout",o)}var Si=ih.prototype;Si.updateData=function(t,e,r,a,i){this.node=e,e.piece=this,a=a||this._seriesModel,i=i||this._ecModel;var n=this.childAt(0);n.dataIndex=e.dataIndex;var o=e.getModel(),s=e.getLayout(),l=Z({},s);l.label=null;var u=AN(e,a,i);DN(e,a,u);var h=o.getModel("itemStyle").getItemStyle(),f;if(r==="normal")f=h;else{var c=o.getModel(r+".itemStyle").getItemStyle();f=J(c,h)}f=U({lineJoin:"bevel",fill:f.fill||u},f),t?(n.setShape(l),n.shape.r=s.r0,tt(n,{shape:{r:s.r}},a,e.dataIndex),n.useStyle(f)):typeof f.fill=="object"&&f.fill.type||typeof n.style.fill=="object"&&n.style.fill.type?(tt(n,{shape:l},a),n.useStyle(f)):tt(n,{shape:l,style:f},a),this._updateLabel(a,u,r);var v=o.getShallow("cursor");if(v&&n.attr("cursor",v),t){var d=a.getShallow("highlightPolicy");this._initEvents(n,e,a,d)}this._seriesModel=a||this._seriesModel,this._ecModel=i||this._ecModel,St(this)},Si.onEmphasis=function(t){var e=this;this.node.hostTree.root.eachNode(function(r){r.piece&&(e.node===r?r.piece.updateData(!1,r,"emphasis"):CN(r,e.node,t)?r.piece.childAt(0).trigger("highlight"):t!==ah.NONE&&r.piece.childAt(0).trigger("downplay"))})},Si.onNormal=function(){this.node.hostTree.root.eachNode(function(t){t.piece&&t.piece.updateData(!1,t,"normal")})},Si.onHighlight=function(){this.updateData(!1,this.node,"highlight")},Si.onDownplay=function(){this.updateData(!1,this.node,"downplay")},Si._updateLabel=function(t,e,r){var a=this.node.getModel(),i=a.getModel("label"),n=r==="normal"||r==="emphasis"?i:a.getModel(r+".label"),o=a.getModel("emphasis.label"),s=Et(t.getFormattedLabel(this.node.dataIndex,r,null,null,"label"),this.node.name);b("show")===!1&&(s="");var l=this.node.getLayout(),u=n.get("minAngle");u==null&&(u=i.get("minAngle")),u=u/180*Math.PI;var h=l.endAngle-l.startAngle;u!=null&&Math.abs(h)<u&&(s="");var f=this.childAt(1);Te(f.style,f.hoverStyle||{},i,o,{defaultText:n.getShallow("show")?s:null,autoColor:e,useInsideStyle:!0});var c=(l.startAngle+l.endAngle)/2,v=Math.cos(c),d=Math.sin(c),g,p=b("position"),m=b("distance")||0,y=b("align");p==="outside"?(g=l.r+m,y=c>Math.PI/2?"right":"left"):!y||y==="center"?(g=(l.r+l.r0)/2,y="center"):y==="left"?(g=l.r0+m,c>Math.PI/2&&(y="right")):y==="right"&&(g=l.r-m,c>Math.PI/2&&(y="left")),f.attr("style",{text:s,textAlign:y,textVerticalAlign:b("verticalAlign")||"middle",opacity:b("opacity")});var _=g*v+l.cx,x=g*d+l.cy;f.attr("position",[_,x]);var w=b("rotate"),S=0;w==="radial"?(S=-c,S<-Math.PI/2&&(S+=Math.PI)):w==="tangential"?(S=Math.PI/2-c,S>Math.PI/2?S-=Math.PI:S<-Math.PI/2&&(S+=Math.PI)):typeof w=="number"&&(S=w*Math.PI/180),f.attr("rotation",S);function b(A){var C=n.get(A);return C??i.get(A)}},Si._initEvents=function(t,e,r,a){t.off("mouseover").off("mouseout").off("emphasis").off("normal");var i=this,n=function(){i.onEmphasis(a)},o=function(){i.onNormal()},s=function(){i.onDownplay()},l=function(){i.onHighlight()};r.isAnimationEnabled()&&t.on("mouseover",n).on("mouseout",o).on("emphasis",n).on("normal",o).on("downplay",s).on("highlight",l)},yt(ih,G);function AN(t,e,r){var a=t.getVisual("color"),i=t.getVisual("visualMeta");(!i||i.length===0)&&(a=null);var n=t.getModel("itemStyle").get("color");if(n)return n;if(a)return a;if(t.depth===0)return r.option.color[0];var o=r.option.color.length;return n=r.option.color[TN(t)%o],n}function TN(t){for(var e=t;e.depth>1;)e=e.parentNode;var r=t.getAncestors()[0];return ut(r.children,e)}function CN(t,e,r){return r===ah.NONE?!1:r===ah.SELF?t===e:r===ah.ANCESTOR?t===e||t.isAncestorOf(e):t===e||t.isDescendantOf(e)}function DN(t,e,r){var a=e.getData();a.setItemVisual(t.dataIndex,"color",r)}var IN="sunburstRootToNode",l5=Yt.extend({type:"sunburst",init:function(){},render:function(t,e,r,a){var i=this;this.seriesModel=t,this.api=r,this.ecModel=e;var n=t.getData(),o=n.tree.root,s=t.getViewRoot(),l=this.group,u=t.get("renderLabelForZeroData"),h=[];s.eachNode(function(y){h.push(y)});var f=this._oldChildren||[];if(d(h,f),m(o,s),a&&a.highlight&&a.highlight.piece){var c=t.getShallow("highlightPolicy");a.highlight.piece.onEmphasis(c)}else if(a&&a.unhighlight){var v=this.virtualPiece;!v&&o.children.length&&(v=o.children[0].piece),v&&v.onNormal()}this._initEvents(),this._oldChildren=h;function d(y,_){if(y.length===0&&_.length===0)return;new Wr(_,y,x,x).add(w).update(w).remove(K(w,null)).execute();function x(S){return S.getId()}function w(S,b){var A=S==null?null:y[S],C=b==null?null:_[b];g(A,C)}}function g(y,_){if(!u&&y&&!y.getValue()&&(y=null),y!==o&&_!==o){if(_&&_.piece)y?(_.piece.updateData(!1,y,"normal",t,e),n.setItemGraphicEl(y.dataIndex,_.piece)):p(_);else if(y){var x=new ih(y,t,e);l.add(x),n.setItemGraphicEl(y.dataIndex,x)}}}function p(y){!y||y.piece&&(l.remove(y.piece),y.piece=null)}function m(y,_){if(_.depth>0){i.virtualPiece?i.virtualPiece.updateData(!1,y,"normal",t,e):(i.virtualPiece=new ih(y,t,e),l.add(i.virtualPiece)),_.piece._onclickEvent&&_.piece.off("click",_.piece._onclickEvent);var x=function(w){i._rootToNode(_.parentNode)};_.piece._onclickEvent=x,i.virtualPiece.on("click",x)}else i.virtualPiece&&(l.remove(i.virtualPiece),i.virtualPiece=null)}},dispose:function(){},_initEvents:function(){var t=this,e=function(r){var a=!1,i=t.seriesModel.getViewRoot();i.eachNode(function(n){if(!a&&n.piece&&n.piece.childAt(0)===r.target){var o=n.getModel().get("nodeClick");if(o==="rootToNode")t._rootToNode(n);else if(o==="link"){var s=n.getModel(),l=s.get("link");if(l){var u=s.get("target",!0)||"_blank";To(l,u)}}a=!0}})};this.group._onclickEvent&&this.group.off("click",this.group._onclickEvent),this.group.on("click",e),this.group._onclickEvent=e},_rootToNode:function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:IN,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},containPoint:function(t,e){var r=e.getData(),a=r.getItemLayout(0);if(a){var i=t[0]-a.cx,n=t[1]-a.cy,o=Math.sqrt(i*i+n*n);return o<=a.r&&o>=a.r0}}}),Gb="sunburstRootToNode";lt({type:Gb,update:"updateView"},function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},r);function r(a,i){var n=ls(t,[Gb],a);if(n){var o=a.getViewRoot();o&&(t.direction=vd(o,n.node)?"rollUp":"drillDown"),a.resetViewRoot(n.node)}}});var Hb="sunburstHighlight";lt({type:Hb,update:"updateView"},function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},r);function r(a,i){var n=ls(t,[Hb],a);n&&(t.highlight=n.node)}});var MN="sunburstUnhighlight";lt({type:MN,update:"updateView"},function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},r);function r(a,i){t.unhighlight=!0}});var Fb=Math.PI/180,LN=function(t,e,r,a){e.eachSeriesByType(t,function(i){var n=i.get("center"),o=i.get("radius");P(o)||(o=[0,o]),P(n)||(n=[n,n]);var s=r.getWidth(),l=r.getHeight(),u=Math.min(s,l),h=R(n[0],s),f=R(n[1],l),c=R(o[0],u/2),v=R(o[1],u/2),d=-i.get("startAngle")*Fb,g=i.get("minAngle")*Fb,p=i.getData().tree.root,m=i.getViewRoot(),y=m.depth,_=i.get("sort");_!=null&&Wb(m,_);var x=0;T(m.children,function(V){!isNaN(V.getValue())&&x++});var w=m.getValue(),S=Math.PI/(w||x)*2,b=m.depth>0,A=m.height-(b?-1:1),C=(v-c)/(A||1),D=i.get("clockwise"),I=i.get("stillShowZeroSum"),L=D?1:-1,M=function(V,H){if(!!V){var W=H;if(V!==p){var F=V.getValue(),N=w===0&&I?S:F*S;N<g&&(N=g),W=H+L*N;var $=V.depth-y-(b?-1:1),et=c+C*$,vt=c+C*($+1),wt=V.getModel();wt.get("r0")!=null&&(et=R(wt.get("r0"),u/2)),wt.get("r")!=null&&(vt=R(wt.get("r"),u/2)),V.setLayout({angle:N,startAngle:H,endAngle:W,clockwise:D,cx:h,cy:f,r0:et,r:vt})}if(V.children&&V.children.length){var Ut=0;T(V.children,function(Vs){Ut+=M(Vs,H+Ut)})}return W-H}};if(b){var B=c,k=c+C,O=Math.PI*2;p.setLayout({angle:O,startAngle:d,endAngle:d+O,clockwise:D,cx:h,cy:f,r0:B,r:k})}M(m,d)})};function Wb(t,e){var r=t.children||[];t.children=PN(r,e),r.length&&T(t.children,function(a){Wb(a,e)})}function PN(t,e){if(typeof e=="function")return t.sort(e);var r=e==="asc";return t.sort(function(a,i){var n=(a.getValue()-i.getValue())*(r?1:-1);return n===0?(a.dataIndex-i.dataIndex)*(r?-1:1):n})}bt(K(Tu,"sunburst")),It(K(LN,"sunburst")),Ie(K(es,"sunburst"));function EN(t,e){return e=e||[0,0],E(["x","y"],function(r,a){var i=this.getAxis(r),n=e[a],o=t[a]/2;return i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(n-o)-i.dataToCoord(n+o))},this)}var RN=function(t){var e=t.grid.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(r){return t.dataToPoint(r)},size:X(EN,t)}}};function kN(t,e){return e=e||[0,0],E([0,1],function(r){var a=e[r],i=t[r]/2,n=[],o=[];return n[r]=a-i,o[r]=a+i,n[1-r]=o[1-r]=e[1-r],Math.abs(this.dataToPoint(n)[r]-this.dataToPoint(o)[r])},this)}var NN=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(r){return t.dataToPoint(r)},size:X(kN,t)}}};function ON(t,e){var r=this.getAxis(),a=e instanceof Array?e[0]:e,i=(t instanceof Array?t[0]:t)/2;return r.type==="category"?r.getBandWidth():Math.abs(r.dataToCoord(a-i)-r.dataToCoord(a+i))}var zN=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(r){return t.dataToPoint(r)},size:X(ON,t)}}};function BN(t,e){return E(["Radius","Angle"],function(r,a){var i=this["get"+r+"Axis"](),n=e[a],o=t[a]/2,s="dataTo"+r,l=i.type==="category"?i.getBandWidth():Math.abs(i[s](n-o)-i[s](n+o));return r==="Angle"&&(l=l*Math.PI/180),l},this)}var VN=function(t){var e=t.getRadiusAxis(),r=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:X(function(i){var n=e.dataToRadius(i[0]),o=r.dataToAngle(i[1]),s=t.coordToPoint([n,o]);return s.push(n,o*Math.PI/180),s}),size:X(BN,t)}}},GN=function(t){var e=t.getRect(),r=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:r.start,end:r.end,weeks:r.weeks,dayCount:r.allDay}},api:{coord:function(a,i){return t.dataToPoint(a,i)}}}},Ub=w0,HN=["itemStyle"],FN=["emphasis","itemStyle"],WN=["label"],UN=["emphasis","label"],$N="e\0\0",$b={cartesian2d:RN,geo:NN,singleAxis:zN,polar:VN,calendar:GN};Dt.extend({type:"series.custom",dependencies:["grid","polar","geo","singleAxis","calendar"],defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,useTransform:!0,clip:!1},getInitialData:function(t,e){return $r(this.getSource(),this)},getDataParams:function(t,e,r){var a=Dt.prototype.getDataParams.apply(this,arguments);return r&&(a.info=r.info),a}}),Yt.extend({type:"custom",_data:null,render:function(t,e,r,a){var i=this._data,n=t.getData(),o=this.group,s=Yb(t,n,e,r);n.diff(i).add(function(u){mg(null,u,s(u,a),t,o,n)}).update(function(u,h){var f=i.getItemGraphicEl(h);mg(f,u,s(u,a),t,o,n)}).remove(function(u){var h=i.getItemGraphicEl(u);h&&o.remove(h)}).execute();var l=t.get("clip",!0)?_u(t.coordinateSystem,!1,t):null;l?o.setClipPath(l):o.removeClipPath(),this._data=n},incrementalPrepareRender:function(t,e,r){this.group.removeAll(),this._data=null},incrementalRender:function(t,e,r,a,i){var n=e.getData(),o=Yb(e,n,r,a);function s(h){h.isGroup||(h.incremental=!0,h.useHoverLayer=!0)}for(var l=t.start;l<t.end;l++){var u=mg(null,l,o(l,i),e,this.group,n);u.traverse(s)}},dispose:Kt,filterForExposedEvent:function(t,e,r,a){var i=e.element;if(i==null||r.name===i)return!0;for(;(r=r.parent)&&r!==this.group;)if(r.name===i)return!0;return!1}});function ZN(t){var e=t.type,r;if(e==="path"){var a=t.shape,i=a.width!=null&&a.height!=null?{x:a.x||0,y:a.y||0,width:a.width,height:a.height}:null,n=Jb(a);r=po(n,null,i,a.layout||"center"),r.__customPathData=n}else if(e==="image")r=new Qt({}),r.__customImagePath=t.style.image;else if(e==="text")r=new nt({}),r.__customText=t.style.text;else if(e==="group")r=new G;else{if(e==="compoundPath")throw new Error('"compoundPath" is not supported yet.');var o=_c(e);z&&ot(o,'graphic type "'+e+'" can not be found.'),r=new o}return r.__customGraphicType=e,r.name=t.name,r}function YN(t,e,r,a,i,n,o){var s={},l=r.style||{};if(r.shape&&(s.shape=Y(r.shape)),r.position&&(s.position=r.position.slice()),r.scale&&(s.scale=r.scale.slice()),r.origin&&(s.origin=r.origin.slice()),r.rotation&&(s.rotation=r.rotation),t.type==="image"&&r.style){var u=s.style={};T(["x","y","width","height"],function(c){Zb(c,u,l,t.style,n)})}if(t.type==="text"&&r.style){var u=s.style={};T(["x","y"],function(v){Zb(v,u,l,t.style,n)}),!l.hasOwnProperty("textFill")&&l.fill&&(l.textFill=l.fill),!l.hasOwnProperty("textStroke")&&l.stroke&&(l.textStroke=l.stroke)}if(t.type!=="group"&&(t.useStyle(l),n)){t.style.opacity=0;var h=l.opacity;h==null&&(h=1),oe(t,{style:{opacity:h}},a,e)}n?t.attr(s):tt(t,s,a,e),r.hasOwnProperty("z2")&&t.attr("z2",r.z2||0),r.hasOwnProperty("silent")&&t.attr("silent",r.silent),r.hasOwnProperty("invisible")&&t.attr("invisible",r.invisible),r.hasOwnProperty("ignore")&&t.attr("ignore",r.ignore),r.hasOwnProperty("info")&&t.attr("info",r.info);var f=r.styleEmphasis;yo(t,f),o&&Ka(t,f!==!1)}function Zb(t,e,r,a,i){r[t]!=null&&!i&&(e[t]=r[t],r[t]=a[t])}function Yb(t,e,r,a){var i=t.get("renderItem"),n=t.coordinateSystem,o={};n&&(z&&(ot(i,"series.render is required."),ot(n.prepareCustoms||$b[n.type],"This coordSys does not support custom series.")),o=n.prepareCustoms?n.prepareCustoms():$b[n.type](n));var s=U({getWidth:a.getWidth,getHeight:a.getHeight,getZr:a.getZr,getDevicePixelRatio:a.getDevicePixelRatio,value:p,style:m,styleEmphasis:y,visual:_,barLayout:x,currentSeriesIndices:w,font:S},o.api||{}),l={context:{},seriesId:t.id,seriesName:t.name,seriesIndex:t.seriesIndex,coordSys:o.coordSys,dataInsideLength:e.count(),encode:XN(t.getData())},u,h=!0,f,c,v,d;return function(b,A){return u=b,h=!0,i&&i(U({dataIndexInside:b,dataIndex:e.getRawIndex(b),actionType:A?A.type:null},l),s)};function g(b){b==null&&(b=u),h&&(f=e.getItemModel(b),c=f.getModel(WN),v=f.getModel(UN),d=e.getItemVisual(b,"color"),h=!1)}function p(b,A){return A==null&&(A=u),e.get(e.getDimension(b||0),A)}function m(b,A){A==null&&(A=u),g(A);var C=f.getModel(HN).getItemStyle();d!=null&&(C.fill=d);var D=e.getItemVisual(A,"opacity");D!=null&&(C.opacity=D);var I=b?Kb(b,c):c;return Rt(C,I,null,{autoColor:d,isRectText:!0}),C.text=I.getShallow("show")?Nt(t.getFormattedLabel(A,"normal"),mu(e,A)):null,b&&Qb(C,b),C}function y(b,A){A==null&&(A=u),g(A);var C=f.getModel(FN).getItemStyle(),D=b?Kb(b,v):v;return Rt(C,D,null,{isRectText:!0},!0),C.text=D.getShallow("show")?Ba(t.getFormattedLabel(A,"emphasis"),t.getFormattedLabel(A,"normal"),mu(e,A)):null,b&&Qb(C,b),C}function _(b,A){return A==null&&(A=u),e.getItemVisual(A,b)}function x(b){if(n.getBaseAxis){var A=n.getBaseAxis();return u2(U({axis:A},b),a)}}function w(){return r.getCurrentSeriesIndices()}function S(b){return Sc(b,r)}}function XN(t){var e={};return T(t.dimensions,function(r,a){var i=t.getDimensionInfo(r);if(!i.isExtraCoord){var n=i.coordDim,o=e[n]=e[n]||[];o[i.coordDimIndex]=a}}),e}function mg(t,e,r,a,i,n){return t=yg(t,e,r,a,i,n,!0),t&&n.setItemGraphicEl(e,t),t}function yg(t,e,r,a,i,n,o){var s=!r;r=r||{};var l=r.type,u=r.shape,h=r.style;if(t&&(s||l!=null&&l!==t.__customGraphicType||l==="path"&&JN(u)&&Jb(u)!==t.__customPathData||l==="image"&&jb(h,"image")&&h.image!==t.__customImagePath||l==="text"&&jb(u,"text")&&h.text!==t.__customText)&&(i.remove(t),t=null),!s){var f=!t;return!t&&(t=ZN(r)),YN(t,e,r,a,n,f,o),l==="group"&&qN(t,e,r,a,n),i.add(t),t}}function qN(t,e,r,a,i){var n=r.children,o=n?n.length:0,s=r.$mergeChildren,l=s==="byName"||r.diffChildrenByName,u=s===!1;if(!(!o&&!l&&!u)){if(l){KN({oldChildren:t.children()||[],newChildren:n||[],dataIndex:e,animatableModel:a,group:t,data:i});return}u&&t.removeAll();for(var h=0;h<o;h++)n[h]&&yg(t.childAt(h),e,n[h],a,t,i);z&&ot(!u||t.childCount()===h,"MUST NOT contain empty item in children array when `group.$mergeChildren` is `false`.")}}function KN(t){new Wr(t.oldChildren,t.newChildren,Xb,Xb,t).add(qb).update(qb).remove(QN).execute()}function Xb(t,e){var r=t&&t.name;return r??$N+e}function qb(t,e){var r=this.context,a=t!=null?r.newChildren[t]:null,i=e!=null?r.oldChildren[e]:null;yg(i,r.dataIndex,a,r.animatableModel,r.group,r.data)}function Kb(t,e){var r=new ht({},e);return T(Ub,function(a,i){t.hasOwnProperty(a)&&(r.option[i]=t[a])}),r}function Qb(t,e){for(var r in e)(e.hasOwnProperty(r)||!Ub.hasOwnProperty(r))&&(t[r]=e[r])}function QN(t){var e=this.context,r=e.oldChildren[t];r&&e.group.remove(r)}function Jb(t){return t&&(t.pathData||t.d)}function JN(t){return t&&(t.hasOwnProperty("pathData")||t.hasOwnProperty("d"))}function jb(t,e){return t&&t.hasOwnProperty(e)}function tS(t){return t.get("stack")||"__ec_stack_"+t.seriesIndex}function eS(t,e){return e.dim+t.model.componentIndex}function jN(t,e,r){var a={},i=tO(Ht(e.getSeriesByType(t),function(n){return!e.isSeriesFiltered(n)&&n.coordinateSystem&&n.coordinateSystem.type==="polar"}));e.eachSeriesByType(t,function(n){if(n.coordinateSystem.type==="polar"){var o=n.getData(),s=n.coordinateSystem,l=s.getBaseAxis(),u=eS(s,l),h=tS(n),f=i[u][h],c=f.offset,v=f.width,d=s.getOtherAxis(l),g=n.coordinateSystem.cx,p=n.coordinateSystem.cy,m=n.get("barMinHeight")||0,y=n.get("barMinAngle")||0;a[h]=a[h]||[];for(var _=o.mapDimension(d.dim),x=o.mapDimension(l.dim),w=Ur(o,_),S=l.dim!=="radius"||!n.get("roundCap",!0),b=d.getExtent()[0],A=0,C=o.count();A<C;A++){var D=o.get(_,A),I=o.get(x,A),L=D>=0?"p":"n",M=b;w&&(a[h][I]||(a[h][I]={p:b,n:b}),M=a[h][I][L]);var B,k,O,V;if(d.dim==="radius"){var H=d.dataToRadius(D)-b,W=l.dataToAngle(I);Math.abs(H)<m&&(H=(H<0?-1:1)*m),B=M,k=M+H,O=W-c,V=O-v,w&&(a[h][I][L]=k)}else{var F=d.dataToAngle(D,S)-b,N=l.dataToRadius(I);Math.abs(F)<y&&(F=(F<0?-1:1)*y),B=N+c,k=B+v,O=M,V=M+F,w&&(a[h][I][L]=V)}o.setItemLayout(A,{cx:g,cy:p,r0:B,r:k,startAngle:-O*Math.PI/180,endAngle:-V*Math.PI/180})}}},this)}function tO(t,e){var r={};T(t,function(i,n){var o=i.getData(),s=i.coordinateSystem,l=s.getBaseAxis(),u=eS(s,l),h=l.getExtent(),f=l.type==="category"?l.getBandWidth():Math.abs(h[1]-h[0])/o.count(),c=r[u]||{bandWidth:f,remainedWidth:f,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},v=c.stacks;r[u]=c;var d=tS(i);v[d]||c.autoWidthCount++,v[d]=v[d]||{width:0,maxWidth:0};var g=R(i.get("barWidth"),f),p=R(i.get("barMaxWidth"),f),m=i.get("barGap"),y=i.get("barCategoryGap");g&&!v[d].width&&(g=Math.min(c.remainedWidth,g),v[d].width=g,c.remainedWidth-=g),p&&(v[d].maxWidth=p),m!=null&&(c.gap=m),y!=null&&(c.categoryGap=y)});var a={};return T(r,function(i,n){a[n]={};var o=i.stacks,s=i.bandWidth,l=R(i.categoryGap,s),u=R(i.gap,1),h=i.remainedWidth,f=i.autoWidthCount,c=(h-l)/(f+(f-1)*u);c=Math.max(c,0),T(o,function(p,m){var y=p.maxWidth;y&&y<c&&(y=Math.min(y,h),p.width&&(y=Math.min(y,p.width)),h-=y,p.width=y,f--)}),c=(h-l)/(f+(f-1)*u),c=Math.max(c,0);var v=0,d;T(o,function(p,m){p.width||(p.width=c),d=p,v+=p.width*(1+u)}),d&&(v-=d.width*u);var g=-v/2;T(o,function(p,m){a[n][m]=a[n][m]||{offset:g,width:p.width},g+=p.width*(1+u)})}),a}function nh(t,e){Vt.call(this,"radius",t,e),this.type="category"}nh.prototype={constructor:nh,pointToData:function(t,e){return this.polar.pointToData(t,e)[this.dim==="radius"?0:1]},dataToRadius:Vt.prototype.dataToCoord,radiusToData:Vt.prototype.coordToData},yt(nh,Vt);var eO=de();function oh(t,e){e=e||[0,360],Vt.call(this,"angle",t,e),this.type="category"}oh.prototype={constructor:oh,pointToData:function(t,e){return this.polar.pointToData(t,e)[this.dim==="radius"?0:1]},dataToAngle:Vt.prototype.dataToCoord,angleToData:Vt.prototype.coordToData,calculateCategoryInterval:function(){var t=this,e=t.getLabelModel(),r=t.scale,a=r.getExtent(),i=r.count();if(a[1]-a[0]<1)return 0;var n=a[0],o=t.dataToCoord(n+1)-t.dataToCoord(n),s=Math.abs(o),l=cr(n,e.getFont(),"center","top"),u=Math.max(l.height,7),h=u/s;isNaN(h)&&(h=1/0);var f=Math.max(0,Math.floor(h)),c=eO(t.model),v=c.lastAutoInterval,d=c.lastTickCount;return v!=null&&d!=null&&Math.abs(v-f)<=1&&Math.abs(d-i)<=1&&v>f?f=v:(c.lastTickCount=i,c.lastAutoInterval=f),f}},yt(oh,Vt);var sh=function(t){this.name=t||"",this.cx=0,this.cy=0,this._radiusAxis=new nh,this._angleAxis=new oh,this._radiusAxis.polar=this._angleAxis.polar=this};sh.prototype={type:"polar",axisPointerEnabled:!0,constructor:sh,dimensions:["radius","angle"],model:null,containPoint:function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},containData:function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},getAxis:function(t){return this["_"+t+"Axis"]},getAxes:function(){return[this._radiusAxis,this._angleAxis]},getAxesByScale:function(t){var e=[],r=this._angleAxis,a=this._radiusAxis;return r.scale.type===t&&e.push(r),a.scale.type===t&&e.push(a),e},getAngleAxis:function(){return this._angleAxis},getRadiusAxis:function(){return this._radiusAxis},getOtherAxis:function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},getTooltipAxes:function(t){var e=t!=null&&t!=="auto"?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},dataToPoint:function(t,e){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)])},pointToData:function(t,e){var r=this.pointToCoord(t);return[this._radiusAxis.radiusToData(r[0],e),this._angleAxis.angleToData(r[1],e)]},pointToCoord:function(t){var e=t[0]-this.cx,r=t[1]-this.cy,a=this.getAngleAxis(),i=a.getExtent(),n=Math.min(i[0],i[1]),o=Math.max(i[0],i[1]);a.inverse?n=o-360:o=n+360;var s=Math.sqrt(e*e+r*r);e/=s,r/=s;for(var l=Math.atan2(-r,e)/Math.PI*180,u=l<n?1:-1;l<n||l>o;)l+=u*360;return[s,l]},coordToPoint:function(t){var e=t[0],r=t[1]/180*Math.PI,a=Math.cos(r)*e+this.cx,i=-Math.sin(r)*e+this.cy;return[a,i]},getArea:function(){var t=this.getAngleAxis(),e=this.getRadiusAxis(),r=e.getExtent().slice();r[0]>r[1]&&r.reverse();var a=t.getExtent(),i=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:r[0],r:r[1],startAngle:-a[0]*i,endAngle:-a[1]*i,clockwise:t.inverse,contain:function(n,o){var s=n-this.cx,l=o-this.cy,u=s*s+l*l,h=this.r,f=this.r0;return u<=h*h&&u>=f*f}}}};var _g=ct.extend({type:"polarAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"polar",index:this.option.polarIndex,id:this.option.polarId})[0]}});J(_g.prototype,oi);var rS={angle:{startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:!1}},radius:{splitNumber:5}};function aS(t,e){return e.type||(e.data?"category":"value")}mn("angle",_g,aS,rS.angle),mn("radius",_g,aS,rS.radius),Me({type:"polar",dependencies:["polarAxis","angleAxis"],coordinateSystem:null,findAxisModel:function(t){var e,r=this.ecModel;return r.eachComponent(t,function(a){a.getCoordSysModel()===this&&(e=a)},this),e},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"80%"}});function rO(t,e,r){var a=e.get("center"),i=r.getWidth(),n=r.getHeight();t.cx=R(a[0],i),t.cy=R(a[1],n);var o=t.getRadiusAxis(),s=Math.min(i,n)/2,l=e.get("radius");l==null?l=[0,"100%"]:P(l)||(l=[0,l]),l=[R(l[0],s),R(l[1],s)],o.inverse?o.setExtent(l[1],l[0]):o.setExtent(l[0],l[1])}function aO(t,e){var r=this,a=r.getAngleAxis(),i=r.getRadiusAxis();if(a.scale.setExtent(1/0,-1/0),i.scale.setExtent(1/0,-1/0),t.eachSeries(function(s){if(s.coordinateSystem===r){var l=s.getData();T(l.mapDimension("radius",!0),function(u){i.scale.unionExtentFromData(l,Uo(l,u))}),T(l.mapDimension("angle",!0),function(u){a.scale.unionExtentFromData(l,Uo(l,u))})}}),xa(a.scale,a.model),xa(i.scale,i.model),a.type==="category"&&!a.onBand){var n=a.getExtent(),o=360/a.scale.count();a.inverse?n[1]+=o:n[1]-=o,a.setExtent(n[0],n[1])}}function iS(t,e){if(t.type=e.get("type"),t.scale=dn(e),t.onBand=e.get("boundaryGap")&&t.type==="category",t.inverse=e.get("inverse"),e.mainType==="angleAxis"){t.inverse^=e.get("clockwise");var r=e.get("startAngle");t.setExtent(r,r+(t.inverse?-360:360))}e.axis=t,t.model=e}var iO={dimensions:sh.prototype.dimensions,create:function(t,e){var r=[];return t.eachComponent("polar",function(a,i){var n=new sh(i);n.update=aO;var o=n.getRadiusAxis(),s=n.getAngleAxis(),l=a.findAxisModel("radiusAxis"),u=a.findAxisModel("angleAxis");iS(o,l),iS(s,u),rO(n,a,e),r.push(n),a.coordinateSystem=n,n.model=a}),t.eachSeries(function(a){if(a.get("coordinateSystem")==="polar"){var i=t.queryComponents({mainType:"polar",index:a.get("polarIndex"),id:a.get("polarId")})[0];if(z&&!i)throw new Error('Polar "'+Et(a.get("polarIndex"),a.get("polarId"),0)+'" not found');a.coordinateSystem=i.coordinateSystem}}),r}};re.register("polar",iO);var nO=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function lh(t,e,r){e[1]>e[0]&&(e=e.slice().reverse());var a=t.coordToPoint([e[0],r]),i=t.coordToPoint([e[1],r]);return{x1:a[0],y1:a[1],x2:i[0],y2:i[1]}}function uh(t){var e=t.getRadiusAxis();return e.inverse?0:1}function nS(t){var e=t[0],r=t[t.length-1];e&&r&&Math.abs(Math.abs(e.coord-r.coord)-360)<1e-4&&t.pop()}Pe.extend({type:"angleAxis",axisPointerClass:"PolarAxisPointer",render:function(t,e){if(this.group.removeAll(),!!t.get("show")){var r=t.axis,a=r.polar,i=a.getRadiusAxis().getExtent(),n=r.getTicksCoords(),o=r.getMinorTicksCoords(),s=E(r.getViewLabels(),function(u){var u=Y(u);return u.coord=r.dataToCoord(u.tickValue),u});nS(s),nS(n),T(nO,function(l){t.get(l+".show")&&(!r.scale.isBlank()||l==="axisLine")&&this["_"+l](t,a,n,o,i,s)},this)}},_axisLine:function(t,e,r,a,i){var n=t.getModel("axisLine.lineStyle"),o=uh(e),s=o?0:1,l;i[s]===0?l=new mr({shape:{cx:e.cx,cy:e.cy,r:i[o]},style:n.getLineStyle(),z2:1,silent:!0}):l=new Cl({shape:{cx:e.cx,cy:e.cy,r:i[o],r0:i[s]},style:n.getLineStyle(),z2:1,silent:!0}),l.style.fill=null,this.group.add(l)},_axisTick:function(t,e,r,a,i){var n=t.getModel("axisTick"),o=(n.get("inside")?-1:1)*n.get("length"),s=i[uh(e)],l=E(r,function(u){return new ee({shape:lh(e,[s,s+o],u.coord)})});this.group.add(He(l,{style:U(n.getModel("lineStyle").getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")})}))},_minorTick:function(t,e,r,a,i){if(!!a.length){for(var n=t.getModel("axisTick"),o=t.getModel("minorTick"),s=(n.get("inside")?-1:1)*o.get("length"),l=i[uh(e)],u=[],h=0;h<a.length;h++)for(var f=0;f<a[h].length;f++)u.push(new ee({shape:lh(e,[l,l+s],a[h][f].coord)}));this.group.add(He(u,{style:U(o.getModel("lineStyle").getLineStyle(),U(n.getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")}))}))}},_axisLabel:function(t,e,r,a,i,n){var o=t.getCategories(!0),s=t.getModel("axisLabel"),l=s.get("margin"),u=t.get("triggerEvent");T(n,function(h,f){var c=s,v=h.tickValue,d=i[uh(e)],g=e.coordToPoint([d+l,h.coord]),p=e.cx,m=e.cy,y=Math.abs(g[0]-p)/d<.3?"center":g[0]>p?"left":"right",_=Math.abs(g[1]-m)/d<.3?"middle":g[1]>m?"top":"bottom";o&&o[v]&&o[v].textStyle&&(c=new ht(o[v].textStyle,s,s.ecModel));var x=new nt({silent:xe.isLabelSilent(t)});this.group.add(x),Rt(x.style,c,{x:g[0],y:g[1],textFill:c.getTextColor()||t.get("axisLine.lineStyle.color"),text:h.formattedLabel,textAlign:y,textVerticalAlign:_}),u&&(x.eventData=xe.makeAxisEventDataBase(t),x.eventData.targetType="axisLabel",x.eventData.value=h.rawLabel)},this)},_splitLine:function(t,e,r,a,i){var n=t.getModel("splitLine"),o=n.getModel("lineStyle"),s=o.get("color"),l=0;s=s instanceof Array?s:[s];for(var u=[],h=0;h<r.length;h++){var f=l++%s.length;u[f]=u[f]||[],u[f].push(new ee({shape:lh(e,i,r[h].coord)}))}for(var h=0;h<u.length;h++)this.group.add(He(u[h],{style:U({stroke:s[h%s.length]},o.getLineStyle()),silent:!0,z:t.get("z")}))},_minorSplitLine:function(t,e,r,a,i){if(!!a.length){for(var n=t.getModel("minorSplitLine"),o=n.getModel("lineStyle"),s=[],l=0;l<a.length;l++)for(var u=0;u<a[l].length;u++)s.push(new ee({shape:lh(e,i,a[l][u].coord)}));this.group.add(He(s,{style:o.getLineStyle(),silent:!0,z:t.get("z")}))}},_splitArea:function(t,e,r,a,i){if(!!r.length){var n=t.getModel("splitArea"),o=n.getModel("areaStyle"),s=o.get("color"),l=0;s=s instanceof Array?s:[s];for(var u=[],h=Math.PI/180,f=-r[0].coord*h,c=Math.min(i[0],i[1]),v=Math.max(i[0],i[1]),d=t.get("clockwise"),g=1;g<r.length;g++){var p=l++%s.length;u[p]=u[p]||[],u[p].push(new ir({shape:{cx:e.cx,cy:e.cy,r0:c,r:v,startAngle:f,endAngle:-r[g].coord*h,clockwise:d},silent:!0})),f=-r[g].coord*h}for(var g=0;g<u.length;g++)this.group.add(He(u[g],{style:U({fill:s[g%s.length]},o.getAreaStyle()),silent:!0}))}}});var oO=["axisLine","axisTickLabel","axisName"],sO=["splitLine","splitArea","minorSplitLine"];Pe.extend({type:"radiusAxis",axisPointerClass:"PolarAxisPointer",render:function(t,e){if(this.group.removeAll(),!!t.get("show")){var r=t.axis,a=r.polar,i=a.getAngleAxis(),n=r.getTicksCoords(),o=r.getMinorTicksCoords(),s=i.getExtent()[0],l=r.getExtent(),u=lO(a,t,s),h=new xe(t,u);T(oO,h.add,h),this.group.add(h.getGroup()),T(sO,function(f){t.get(f+".show")&&!r.scale.isBlank()&&this["_"+f](t,a,s,l,n,o)},this)}},_splitLine:function(t,e,r,a,i){var n=t.getModel("splitLine"),o=n.getModel("lineStyle"),s=o.get("color"),l=0;s=s instanceof Array?s:[s];for(var u=[],h=0;h<i.length;h++){var f=l++%s.length;u[f]=u[f]||[],u[f].push(new mr({shape:{cx:e.cx,cy:e.cy,r:i[h].coord}}))}for(var h=0;h<u.length;h++)this.group.add(He(u[h],{style:U({stroke:s[h%s.length],fill:null},o.getLineStyle()),silent:!0}))},_minorSplitLine:function(t,e,r,a,i,n){if(!!n.length){for(var o=t.getModel("minorSplitLine"),s=o.getModel("lineStyle"),l=[],u=0;u<n.length;u++)for(var h=0;h<n[u].length;h++)l.push(new mr({shape:{cx:e.cx,cy:e.cy,r:n[u][h].coord}}));this.group.add(He(l,{style:U({fill:null},s.getLineStyle()),silent:!0}))}},_splitArea:function(t,e,r,a,i){if(!!i.length){var n=t.getModel("splitArea"),o=n.getModel("areaStyle"),s=o.get("color"),l=0;s=s instanceof Array?s:[s];for(var u=[],h=i[0].coord,f=1;f<i.length;f++){var c=l++%s.length;u[c]=u[c]||[],u[c].push(new ir({shape:{cx:e.cx,cy:e.cy,r0:h,r:i[f].coord,startAngle:0,endAngle:Math.PI*2},silent:!0})),h=i[f].coord}for(var f=0;f<u.length;f++)this.group.add(He(u[f],{style:U({fill:s[f%s.length]},o.getAreaStyle()),silent:!0}))}}});function lO(t,e,r){return{position:[t.cx,t.cy],rotation:r/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:e.getModel("axisLabel").get("rotate"),z2:1}}var uO=bi.extend({makeElOption:function(t,e,r,a,i){var n=r.axis;n.dim==="angle"&&(this.animationThreshold=Math.PI/18);var o=n.polar,s=o.getOtherAxis(n),l=s.getExtent(),u;u=n["dataTo"+Gl(n.dim)](e);var h=a.get("type");if(h&&h!=="none"){var f=cg(a),c=fO[h](n,o,u,l,f);c.style=f,t.graphicKey=c.type,t.pointer=c}var v=a.get("label.margin"),d=hO(e,r,a,o,v);Lb(t,r,a,i,d)}});function hO(t,e,r,a,i){var n=e.axis,o=n.dataToCoord(t),s=a.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=a.getRadiusAxis().getExtent(),u,h,f;if(n.dim==="radius"){var c=ce();Or(c,c,s),Je(c,c,[a.cx,a.cy]),u=xr([o,-i],c);var v=e.getModel("axisLabel").get("rotate")||0,d=xe.innerTextLayout(s,v*Math.PI/180,-1);h=d.textAlign,f=d.textVerticalAlign}else{var g=l[1];u=a.coordToPoint([g+i,o]);var p=a.cx,m=a.cy;h=Math.abs(u[0]-p)/g<.3?"center":u[0]>p?"left":"right",f=Math.abs(u[1]-m)/g<.3?"middle":u[1]>m?"top":"bottom"}return{position:u,align:h,verticalAlign:f}}var fO={line:function(t,e,r,a,i){return t.dim==="angle"?{type:"Line",shape:dg(e.coordToPoint([a[0],r]),e.coordToPoint([a[1],r]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r}}},shadow:function(t,e,r,a,i){var n=Math.max(1,t.getBandWidth()),o=Math.PI/180;return t.dim==="angle"?{type:"Sector",shape:kb(e.cx,e.cy,a[0],a[1],(-r-n/2)*o,(-r+n/2)*o)}:{type:"Sector",shape:kb(e.cx,e.cy,r-n/2,r+n/2,0,Math.PI*2)}}};Pe.registerAxisPointerClass("PolarAxisPointer",uO),It(K(jN,"bar")),Xt({type:"polar"});var cO=ct.extend({type:"geo",coordinateSystem:null,layoutMode:"box",init:function(t){ct.prototype.init.apply(this,arguments),Ua(t,"label",["show"])},optionUpdated:function(){var t=this.option,e=this;t.regions=cx.getFilledRegions(t.regions,t.map,t.nameMap),this._optionModelMap=ki(t.regions||[],function(r,a){return a.name&&r.set(a.name,new ht(a,e)),r},j()),this.updateSelectedMap(t.regions)},defaultOption:{zlevel:0,z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",color:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},getRegionModel:function(t){return this._optionModelMap.get(t)||new ht(null,this,this.ecModel)},getFormattedLabel:function(t,e){var r=this.getRegionModel(t),a=r.get("label"+(e==="normal"?".":e+".")+"formatter"),i={name:t};if(typeof a=="function")return i.status=e,a(i);if(typeof a=="string")return a.replace("{a}",t??"")},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t}});pt(cO,Kv),Xt({type:"geo",init:function(t,e){var r=new Lu(e,!0);this._mapDraw=r,this.group.add(r.group)},render:function(t,e,r,a){if(!(a&&a.type==="geoToggleSelect"&&a.from===this.uid)){var i=this._mapDraw;t.get("show")?i.draw(t,e,r,this,a):this._mapDraw.group.removeAll(),this.group.silent=t.get("silent")}},dispose:function(){this._mapDraw&&this._mapDraw.remove()}});function xg(t,e){e.update="updateView",lt(e,function(r,a){var i={};return a.eachComponent({mainType:"geo",query:r},function(n){n[t](r.name);var o=n.coordinateSystem;T(o.regions,function(s){i[s.name]=n.isSelected(s.name)||!1})}),{selected:i,name:r.name}})}xg("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),xg("select",{type:"geoSelect",event:"geoselected"}),xg("unSelect",{type:"geoUnSelect",event:"geounselected"});var wg=864e5;function qr(t,e,r){this._model=t}qr.prototype={constructor:qr,type:"calendar",dimensions:["time","value"],getDimensionsInfo:function(){return[{name:"time",type:"time"},"value"]},getRangeInfo:function(){return this._rangeInfo},getModel:function(){return this._model},getRect:function(){return this._rect},getCellWidth:function(){return this._sw},getCellHeight:function(){return this._sh},getOrient:function(){return this._orient},getFirstDayOfWeek:function(){return this._firstDayOfWeek},getDateInfo:function(t){t=Ao(t);var e=t.getFullYear(),r=t.getMonth()+1;r=r<10?"0"+r:r;var a=t.getDate();a=a<10?"0"+a:a;var i=t.getDay();return i=Math.abs((i+7-this.getFirstDayOfWeek())%7),{y:e,m:r,d:a,day:i,time:t.getTime(),formatedDate:e+"-"+r+"-"+a,date:t}},getNextNDay:function(t,e){return e=e||0,e===0?this.getDateInfo(t):(t=new Date(this.getDateInfo(t).time),t.setDate(t.getDate()+e),this.getDateInfo(t))},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 r=this._rangeInfo.weeks||1,a=["width","height"],i=this._model.get("cellSize").slice(),n=this._model.getBoxLayoutParams(),o=this._orient==="horizontal"?[r,7]:[7,r];T([0,1],function(h){u(i,h)&&(n[a[h]]=i[h]*o[h])});var s={width:e.getWidth(),height:e.getHeight()},l=this._rect=Ot(n,s);T([0,1],function(h){u(i,h)||(i[h]=l[a[h]]/o[h])});function u(h,f){return h[f]!=null&&h[f]!=="auto"}this._sw=i[0],this._sh=i[1]},dataToPoint:function(t,e){P(t)&&(t=t[0]),e==null&&(e=!0);var r=this.getDateInfo(t),a=this._rangeInfo,i=r.formatedDate;if(e&&!(r.time>=a.start.time&&r.time<a.end.time+wg))return[NaN,NaN];var n=r.day,o=this._getRangeInfo([a.start.time,i]).nthWeek;return this._orient==="vertical"?[this._rect.x+n*this._sw+this._sw/2,this._rect.y+o*this._sh+this._sh/2]:[this._rect.x+o*this._sw+this._sw/2,this._rect.y+n*this._sh+this._sh/2]},pointToData:function(t){var e=this.pointToDate(t);return e&&e.time},dataToRect:function(t,e){var r=this.dataToPoint(t,e);return{contentShape:{x:r[0]-(this._sw-this._lineWidth)/2,y:r[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:r,tl:[r[0]-this._sw/2,r[1]-this._sh/2],tr:[r[0]+this._sw/2,r[1]-this._sh/2],br:[r[0]+this._sw/2,r[1]+this._sh/2],bl:[r[0]-this._sw/2,r[1]+this._sh/2]}},pointToDate:function(t){var e=Math.floor((t[0]-this._rect.x)/this._sw)+1,r=Math.floor((t[1]-this._rect.y)/this._sh)+1,a=this._rangeInfo.range;return this._orient==="vertical"?this._getDateByWeeksAndDay(r,e-1,a):this._getDateByWeeksAndDay(e,r-1,a)},convertToPixel:K(oS,"dataToPoint"),convertFromPixel:K(oS,"pointToData"),_initRangeOption:function(){var t=this._model.get("range"),e=t;if(P(e)&&e.length===1&&(e=e[0]),/^\d{4}$/.test(e)&&(t=[e+"-01-01",e+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(e)){var r=this.getDateInfo(e),a=r.date;a.setMonth(a.getMonth()+1);var i=this.getNextNDay(a,-1);t=[r.formatedDate,i.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(e)&&(t=[e,e]);var n=this._getRangeInfo(t);return n.start.time>n.end.time&&t.reverse(),t},_getRangeInfo:function(t){t=[this.getDateInfo(t[0]),this.getDateInfo(t[1])];var e;t[0].time>t[1].time&&(e=!0,t.reverse());var r=Math.floor(t[1].time/wg)-Math.floor(t[0].time/wg)+1,a=new Date(t[0].time),i=a.getDate(),n=t[1].date.getDate();a.setDate(i+r-1);var o=a.getDate();if(o!==n)for(var s=a.getTime()-t[1].time>0?1:-1;(o=a.getDate())!==n&&(a.getTime()-t[1].time)*s>0;)r-=s,a.setDate(o-s);var l=Math.floor((r+t[0].day+6)/7),u=e?-l+1:l-1;return e&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:r,weeks:l,nthWeek:u,fweek:t[0].day,lweek:t[1].day}},_getDateByWeeksAndDay:function(t,e,r){var a=this._getRangeInfo(r);if(t>a.weeks||t===0&&e<a.fweek||t===a.weeks&&e>a.lweek)return!1;var i=(t-1)*7-a.fweek+e,n=new Date(a.start.time);return n.setDate(a.start.d+i),this.getDateInfo(n)}},qr.dimensions=qr.prototype.dimensions,qr.getDimensionsInfo=qr.prototype.getDimensionsInfo,qr.create=function(t,e){var r=[];return t.eachComponent("calendar",function(a){var i=new qr(a,t,e);r.push(i),a.coordinateSystem=i}),t.eachSeries(function(a){a.get("coordinateSystem")==="calendar"&&(a.coordinateSystem=r[a.get("calendarIndex")||0])}),r};function oS(t,e,r,a){var i=r.calendarModel,n=r.seriesModel,o=i?i.coordinateSystem:n?n.coordinateSystem:null;return o===this?o[t](a):null}re.register("calendar",qr);var sS=ct.extend({type:"calendar",coordinateSystem:null,defaultOption:{zlevel:0,z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",nameMap:"en",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",nameMap:"en",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},init:function(t,e,r,a){var i=rn(t);sS.superApply(this,"init",arguments),lS(t,i)},mergeOption:function(t,e){sS.superApply(this,"mergeOption",arguments),lS(this.option,t)}});function lS(t,e){var r=t.cellSize;P(r)?r.length===1&&(r[1]=r[0]):r=t.cellSize=[r,r];var a=E([0,1],function(i){return JD(e,i)&&(r[i]="auto"),r[i]!=null&&r[i]!=="auto"});ga(t,e,{type:"box",ignoreSize:a})}var vO={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"]},dO={EN:["S","M","T","W","T","F","S"],CN:["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"]};Xt({type:"calendar",_tlpoints:null,_blpoints:null,_firstDayOfMonth:null,_firstDayPoints:null,render:function(t,e,r){var a=this.group;a.removeAll();var i=t.coordinateSystem,n=i.getRangeInfo(),o=i.getOrient();this._renderDayRect(t,n,a),this._renderLines(t,n,o,a),this._renderYearText(t,n,o,a),this._renderMonthText(t,o,a),this._renderWeekText(t,n,o,a)},_renderDayRect:function(t,e,r){for(var a=t.coordinateSystem,i=t.getModel("itemStyle").getItemStyle(),n=a.getCellWidth(),o=a.getCellHeight(),s=e.start.time;s<=e.end.time;s=a.getNextNDay(s,1).time){var l=a.dataToRect([s],!1).tl,u=new ft({shape:{x:l[0],y:l[1],width:n,height:o},cursor:"default",style:i});r.add(u)}},_renderLines:function(t,e,r,a){var i=this,n=t.coordinateSystem,o=t.getModel("splitLine.lineStyle").getLineStyle(),s=t.get("splitLine.show"),l=o.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=e.start,h=0;u.time<=e.end.time;h++){c(u.formatedDate),h===0&&(u=n.getDateInfo(e.start.y+"-"+e.start.m));var f=u.date;f.setMonth(f.getMonth()+1),u=n.getDateInfo(f)}c(n.getNextNDay(e.end.time,1).formatedDate);function c(v){i._firstDayOfMonth.push(n.getDateInfo(v)),i._firstDayPoints.push(n.dataToRect([v],!1).tl);var d=i._getLinePointsOfOneWeek(t,v,r);i._tlpoints.push(d[0]),i._blpoints.push(d[d.length-1]),s&&i._drawSplitline(d,o,a)}s&&this._drawSplitline(i._getEdgesPoints(i._tlpoints,l,r),o,a),s&&this._drawSplitline(i._getEdgesPoints(i._blpoints,l,r),o,a)},_getEdgesPoints:function(t,e,r){var a=[t[0].slice(),t[t.length-1].slice()],i=r==="horizontal"?0:1;return a[0][i]=a[0][i]-e/2,a[1][i]=a[1][i]+e/2,a},_drawSplitline:function(t,e,r){var a=new Ve({z2:20,shape:{points:t},style:e});r.add(a)},_getLinePointsOfOneWeek:function(t,e,r){var a=t.coordinateSystem;e=a.getDateInfo(e);for(var i=[],n=0;n<7;n++){var o=a.getNextNDay(e.time,n),s=a.dataToRect([o.time],!1);i[2*o.day]=s.tl,i[2*o.day+1]=s[r==="horizontal"?"bl":"tr"]}return i},_formatterLabel:function(t,e){return typeof t=="string"&&t?q0(t,e):typeof t=="function"?t(e):e.nameMap},_yearTextPositionControl:function(t,e,r,a,i){e=e.slice();var n=["center","bottom"];a==="bottom"?(e[1]+=i,n=["center","top"]):a==="left"?e[0]-=i:a==="right"?(e[0]+=i,n=["center","top"]):e[1]-=i;var o=0;return(a==="left"||a==="right")&&(o=Math.PI/2),{rotation:o,position:e,style:{textAlign:n[0],textVerticalAlign:n[1]}}},_renderYearText:function(t,e,r,a){var i=t.getModel("yearLabel");if(!!i.get("show")){var n=i.get("margin"),o=i.get("position");o||(o=r!=="horizontal"?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,u=(s[0][1]+s[1][1])/2,h=r==="horizontal"?0:1,f={top:[l,s[h][1]],bottom:[l,s[1-h][1]],left:[s[1-h][0],u],right:[s[h][0],u]},c=e.start.y;+e.end.y>+e.start.y&&(c=c+"-"+e.end.y);var v=i.get("formatter"),d={start:e.start.y,end:e.end.y,nameMap:c},g=this._formatterLabel(v,d),p=new nt({z2:30});Rt(p.style,i,{text:g}),p.attr(this._yearTextPositionControl(p,f[o],r,o,n)),a.add(p)}},_monthTextPositionControl:function(t,e,r,a,i){var n="left",o="top",s=t[0],l=t[1];return r==="horizontal"?(l=l+i,e&&(n="center"),a==="start"&&(o="bottom")):(s=s+i,e&&(o="middle"),a==="start"&&(n="right")),{x:s,y:l,textAlign:n,textVerticalAlign:o}},_renderMonthText:function(t,e,r){var a=t.getModel("monthLabel");if(!!a.get("show")){var i=a.get("nameMap"),n=a.get("margin"),o=a.get("position"),s=a.get("align"),l=[this._tlpoints,this._blpoints];_t(i)&&(i=vO[i.toUpperCase()]||[]);var u=o==="start"?0:1,h=e==="horizontal"?0:1;n=o==="start"?-n:n;for(var f=s==="center",c=0;c<l[u].length-1;c++){var v=l[u][c].slice(),d=this._firstDayOfMonth[c];if(f){var g=this._firstDayPoints[c];v[h]=(g[h]+l[0][c+1][h])/2}var p=a.get("formatter"),m=i[+d.m-1],y={yyyy:d.y,yy:(d.y+"").slice(2),MM:d.m,M:+d.m,nameMap:m},_=this._formatterLabel(p,y),x=new nt({z2:30});Z(Rt(x.style,a,{text:_}),this._monthTextPositionControl(v,f,e,o,n)),r.add(x)}}},_weekTextPositionControl:function(t,e,r,a,i){var n="center",o="middle",s=t[0],l=t[1],u=r==="start";return e==="horizontal"?(s=s+a+(u?1:-1)*i[0]/2,n=u?"right":"left"):(l=l+a+(u?1:-1)*i[1]/2,o=u?"bottom":"top"),{x:s,y:l,textAlign:n,textVerticalAlign:o}},_renderWeekText:function(t,e,r,a){var i=t.getModel("dayLabel");if(!!i.get("show")){var n=t.coordinateSystem,o=i.get("position"),s=i.get("nameMap"),l=i.get("margin"),u=n.getFirstDayOfWeek();_t(s)&&(s=dO[s.toUpperCase()]||[]);var h=n.getNextNDay(e.end.time,7-e.lweek).time,f=[n.getCellWidth(),n.getCellHeight()];l=R(l,f[r==="horizontal"?0:1]),o==="start"&&(h=n.getNextNDay(e.start.time,-(7+e.fweek)).time,l=-l);for(var c=0;c<7;c++){var v=n.getNextNDay(h,c),d=n.dataToRect([v.time],!1).center,g=c;g=Math.abs((c+u)%7);var p=new nt({z2:30});Z(Rt(p.style,i,{text:s[g]}),this._weekTextPositionControl(d,r,o,l,f)),a.add(p)}}}});var uS={path:null,compoundPath:null,group:G,image:Qt,text:nt};ie(function(t){var e=t.graphic;P(e)?!e[0]||!e[0].elements?t.graphic=[{elements:e}]:t.graphic=[t.graphic[0]]:e&&!e.elements&&(t.graphic=[{elements:[e]}])});var gO=Me({type:"graphic",defaultOption:{elements:[],parentId:null},_elOptionsToUpdate:null,mergeOption:function(t){var e=this.option.elements;this.option.elements=null,gO.superApply(this,"mergeOption",arguments),this.option.elements=e},optionUpdated:function(t,e){var r=this.option,a=(e?r:t).elements,i=r.elements=e?[]:r.elements,n=[];this._flatten(a,n);var o=ic(i,n);Um(o);var s=this._elOptionsToUpdate=[];T(o,function(u,h){var f=u.option;z&&ot(Q(f)||u.exist,"Empty graphic option definition"),f&&(s.push(f),mO(u,f),yO(i,h,f),_O(i[h],f))},this);for(var l=i.length-1;l>=0;l--)i[l]==null?i.splice(l,1):delete i[l].$action},_flatten:function(t,e,r){T(t,function(a){if(!!a){r&&(a.parentOption=r),e.push(a);var i=a.children;a.type==="group"&&i&&this._flatten(i,e,a),delete a.children}},this)},useElOptionsToUpdate:function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t}});Xt({type:"graphic",init:function(t,e){this._elMap=j(),this._lastGraphicModel},render:function(t,e,r){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,r)},_updateElements:function(t){var e=t.useElOptionsToUpdate();if(!!e){var r=this._elMap,a=this.group;T(e,function(i){var n=i.$action,o=i.id,s=r.get(o),l=i.parentId,u=l!=null?r.get(l):a,h=i.style;i.type==="text"&&h&&(i.hv&&i.hv[1]&&(h.textVerticalAlign=h.textBaseline=null),!h.hasOwnProperty("textFill")&&h.fill&&(h.textFill=h.fill),!h.hasOwnProperty("textStroke")&&h.stroke&&(h.textStroke=h.stroke));var f=pO(i);z&&s&&ot(u===s.parent,"Changing parent is not supported."),!n||n==="merge"?s?s.attr(f):hS(o,u,f,r):n==="replace"?(hh(s,r),hS(o,u,f,r)):n==="remove"&&hh(s,r);var c=r.get(o);c&&(c.__ecGraphicWidthOption=i.width,c.__ecGraphicHeightOption=i.height,xO(c,t,i))})}},_relocate:function(t,e){for(var r=t.option.elements,a=this.group,i=this._elMap,n=e.getWidth(),o=e.getHeight(),s=0;s<r.length;s++){var l=r[s],u=i.get(l.id);if(!(!u||!u.isGroup)){var h=u.parent,f=h===a;u.__ecGraphicWidth=R(u.__ecGraphicWidthOption,f?n:h.__ecGraphicWidth)||0,u.__ecGraphicHeight=R(u.__ecGraphicHeightOption,f?o:h.__ecGraphicHeight)||0}}for(var s=r.length-1;s>=0;s--){var l=r[s],u=i.get(l.id);if(!!u){var h=u.parent,c=h===a?{width:n,height:o}:{width:h.__ecGraphicWidth,height:h.__ecGraphicHeight};Fl(u,l,c,null,{hv:l.hv,boundingMode:l.bounding})}}},_clear:function(){var t=this._elMap;t.each(function(e){hh(e,t)}),this._elMap=j()},dispose:function(){this._clear()}});function hS(t,e,r,a){var i=r.type;z&&ot(i,"graphic type MUST be set");var n=uS.hasOwnProperty(i)?uS[i]:_c(i);z&&ot(n,"graphic type can not be found");var o=new n(r);e.add(o),a.set(t,o),o.__ecGraphicId=t}function hh(t,e){var r=t&&t.parent;r&&(t.type==="group"&&t.traverse(function(a){hh(a,e)}),e.removeKey(t.__ecGraphicId),r.remove(t))}function pO(t){return t=Z({},t),T(["id","parentId","$action","hv","bounding"].concat(Q0),function(e){delete t[e]}),t}function fS(t,e){var r;return T(e,function(a){t[a]!=null&&t[a]!=="auto"&&(r=!0)}),r}function mO(t,e){var r=t.exist;if(e.id=t.keyInfo.id,!e.type&&r&&(e.type=r.type),e.parentId==null){var a=e.parentOption;a?e.parentId=a.id:r&&(e.parentId=r.parentId)}e.parentOption=null}function yO(t,e,r){var a=Z({},r),i=t[e],n=r.$action||"merge";if(n==="merge")if(i){if(z){var o=r.type;ot(!o||i.type===o,'Please set $action: "replace" to change `type`')}J(i,a,!0),ga(i,a,{ignoreSize:!0}),J0(r,i)}else t[e]=a;else n==="replace"?t[e]=a:n==="remove"&&i&&(t[e]=null)}function _O(t,e){!t||(t.hv=e.hv=[fS(e,["left","right"]),fS(e,["top","bottom"])],t.type==="group"&&(t.width==null&&(t.width=e.width=0),t.height==null&&(t.height=e.height=0)))}function xO(t,e,r){var a=t.eventData;!t.silent&&!t.ignore&&!a&&(a=t.eventData={componentType:"graphic",componentIndex:e.componentIndex,name:t.name}),a&&(a.info=t.info)}var cS={};function Nn(t,e){cS[t]=e}function vS(t){return cS[t]}var wO=Me({type:"toolbox",layoutMode:{type:"box",ignoreSize:!0},optionUpdated:function(){wO.superApply(this,"optionUpdated",arguments),T(this.option.feature,function(t,e){var r=vS(e);r&&J(t,r.defaultOption)})},defaultOption:{show:!0,z:6,zlevel:0,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1}}});function bO(t,e,r){var a=e.getBoxLayoutParams(),i=e.get("padding"),n={width:r.getWidth(),height:r.getHeight()},o=Ot(a,n,i);ei(e.get("orient"),t,e.get("itemGap"),o.width,o.height),Fl(t,a,n,i)}function dS(i,e){var r=ja(e.get("padding")),a=e.getItemStyle(["color","opacity"]);a.fill=e.get("backgroundColor");var i=new ft({shape:{x:i.x-r[3],y:i.y-r[0],width:i.width+r[1]+r[3],height:i.height+r[0]+r[2],r:e.get("borderRadius")},style:a,silent:!0,z2:-1});return i}Xt({type:"toolbox",render:function(t,e,r,a){var i=this.group;if(i.removeAll(),!t.get("show"))return;var n=+t.get("itemSize"),o=t.get("feature")||{},s=this._features||(this._features={}),l=[];T(o,function(f,c){l.push(c)}),new Wr(this._featureNames||[],l).add(u).update(u).remove(K(u,null)).execute(),this._featureNames=l;function u(f,c){var v=l[f],d=l[c],g=o[v],p=new ht(g,t,t.ecModel),m;if(a&&a.newTitle!=null&&a.featureName===v&&(g.title=a.newTitle),v&&!d){if(SO(v))m={model:p,onclick:p.option.onclick,featureName:v};else{var y=vS(v);if(!y)return;m=new y(p,e,r)}s[v]=m}else{if(m=s[d],!m)return;m.model=p,m.ecModel=e,m.api=r}if(!v&&d){m.dispose&&m.dispose(e,r);return}if(!p.get("show")||m.unusable){m.remove&&m.remove(e,r);return}h(p,m,v),p.setIconStatus=function(_,x){var w=this.option,S=this.iconPaths;w.iconStatus=w.iconStatus||{},w.iconStatus[_]=x,S[_]&&S[_].trigger(x)},m.render&&m.render(p,e,r,a)}function h(f,c,v){var d=f.getModel("iconStyle"),g=f.getModel("emphasis.iconStyle"),p=c.getIcons?c.getIcons():f.get("icon"),m=f.get("title")||{};if(typeof p=="string"){var y=p,_=m;p={},m={},p[v]=y,m[v]=_}var x=f.iconPaths={};T(p,function(w,S){var b=xo(w,{},{x:-n/2,y:-n/2,width:n,height:n});b.setStyle(d.getItemStyle()),b.hoverStyle=g.getItemStyle(),b.setStyle({text:m[S],textAlign:g.get("textAlign"),textBorderRadius:g.get("textBorderRadius"),textPadding:g.get("textPadding"),textFill:null});var A=t.getModel("tooltip");A&&A.get("show")&&b.attr("tooltip",Z({content:m[S],formatter:A.get("formatter",!0)||function(){return m[S]},formatterParams:{componentType:"toolbox",name:S,title:m[S],$vars:["name","title"]},position:A.get("position",!0)||"bottom"},A.option)),St(b),t.get("showTitle")&&(b.__title=m[S],b.on("mouseover",function(){var C=g.getItemStyle(),D=t.get("orient")==="vertical"?t.get("right")==null?"right":"left":t.get("bottom")==null?"bottom":"top";b.setStyle({textFill:g.get("textFill")||C.fill||C.stroke||"#000",textBackgroundColor:g.get("textBackgroundColor"),textPosition:g.get("textPosition")||D})}).on("mouseout",function(){b.setStyle({textFill:null,textBackgroundColor:null})})),b.trigger(f.get("iconStatus."+S)||"normal"),i.add(b),b.on("click",X(c.onclick,c,e,r,S)),x[S]=b})}bO(i,t,r),i.add(dS(i.getBoundingRect(),t)),i.eachChild(function(f){var c=f.__title,v=f.hoverStyle;if(v&&c){var d=cr(c,Tm(v)),g=f.position[0]+i.position[0],p=f.position[1]+i.position[1]+n,m=!1;p+d.height>r.getHeight()&&(v.textPosition="top",m=!0);var y=m?-5-d.height:n+8;g+d.width/2>r.getWidth()?(v.textPosition=["100%",y],v.textAlign="right"):g-d.width/2<0&&(v.textPosition=[0,y],v.textAlign="left")}})},updateView:function(t,e,r,a){T(this._features,function(i){i.updateView&&i.updateView(i.model,e,r,a)})},remove:function(t,e){T(this._features,function(r){r.remove&&r.remove(t,e)}),this.group.removeAll()},dispose:function(t,e){T(this._features,function(r){r.dispose&&r.dispose(t,e)})}});function SO(t){return t.indexOf("my")===0}var gS=Fr.toolbox.saveAsImage;function fh(t){this.model=t}fh.defaultOption={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:gS.title,type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:gS.lang.slice()},fh.prototype.unusable=!at.canvasSupported;var AO=fh.prototype;AO.onclick=function(t,e){var r=this.model,a=r.get("name")||t.get("title.0.text")||"echarts",i=e.getZr().painter.getType()==="svg",n=i?"svg":r.get("type",!0)||"png",o=e.getConnectedDataURL({type:n,backgroundColor:r.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:r.get("connectedBackgroundColor"),excludeComponents:r.get("excludeComponents"),pixelRatio:r.get("pixelRatio")});if(typeof MouseEvent=="function"&&!at.browser.ie&&!at.browser.edge){var s=document.createElement("a");s.download=a+"."+n,s.target="_blank",s.href=o;var l=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});s.dispatchEvent(l)}else if(window.navigator.msSaveOrOpenBlob){for(var u=atob(o.split(",")[1]),h=u.length,f=new Uint8Array(h);h--;)f[h]=u.charCodeAt(h);var c=new Blob([f]);window.navigator.msSaveOrOpenBlob(c,a+"."+n)}else{var v=r.get("lang"),d='<body style="margin:0;"><img src="'+o+'" style="max-width:100%;" title="'+(v&&v[0]||"")+'" /></body>',g=window.open();g.document.write(d)}},Nn("saveAsImage",fh);var ch=Fr.toolbox.magicType,bg="__ec_magicType_stack__";function Sg(t){this.model=t}Sg.defaultOption={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:Y(ch.title),option:{},seriesIndex:{}};var pS=Sg.prototype;pS.getIcons=function(){var t=this.model,e=t.get("icon"),r={};return T(t.get("type"),function(a){e[a]&&(r[a]=e[a])}),r};var mS={line:function(t,e,r,a){if(t==="bar")return J({id:e,type:"line",data:r.get("data"),stack:r.get("stack"),markPoint:r.get("markPoint"),markLine:r.get("markLine")},a.get("option.line")||{},!0)},bar:function(t,e,r,a){if(t==="line")return J({id:e,type:"bar",data:r.get("data"),stack:r.get("stack"),markPoint:r.get("markPoint"),markLine:r.get("markLine")},a.get("option.bar")||{},!0)},stack:function(t,e,r,a){var i=r.get("stack")===bg;if(t==="line"||t==="bar")return a.setIconStatus("stack",i?"normal":"emphasis"),J({id:e,stack:i?"":bg},a.get("option.stack")||{},!0)}},TO=[["line","bar"],["stack"]];pS.onclick=function(t,e,r){var a=this.model,i=a.get("seriesIndex."+r);if(!!mS[r]){var n={series:[]},o=function(u){var h=u.subType,f=u.id,c=mS[r](h,f,u,a);c&&(U(c,u.option),n.series.push(c));var v=u.coordinateSystem;if(v&&v.type==="cartesian2d"&&(r==="line"||r==="bar")){var d=v.getAxesByScale("ordinal")[0];if(d){var g=d.dim,p=g+"Axis",m=t.queryComponents({mainType:p,index:u.get(name+"Index"),id:u.get(name+"Id")})[0],y=m.componentIndex;n[p]=n[p]||[];for(var _=0;_<=y;_++)n[p][y]=n[p][y]||{};n[p][y].boundaryGap=r==="bar"}}};T(TO,function(u){ut(u,r)>=0&&T(u,function(h){a.setIconStatus(h,"normal")})}),a.setIconStatus(r,"emphasis"),t.eachComponent({mainType:"series",query:i==null?null:{seriesIndex:i}},o);var s;if(r==="stack"){var l=n.series&&n.series[0]&&n.series[0].stack===bg;s=l?J({stack:ch.title.tiled},ch.title):Y(ch.title)}e.dispatchAction({type:"changeMagicType",currentType:r,newOption:n,newTitle:s,featureName:"magicType"})}},lt({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)}),Nn("magicType",Sg);var yS=Fr.toolbox.dataView,vh=new Array(60).join("-"),On="    ";function CO(t){var e={},r=[],a=[];return t.eachRawSeries(function(i){var n=i.coordinateSystem;if(n&&(n.type==="cartesian2d"||n.type==="polar")){var o=n.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;e[s]||(e[s]={categoryAxis:o,valueAxis:n.getOtherAxis(o),series:[]},a.push({axisDim:o.dim,axisIndex:o.index})),e[s].series.push(i)}else r.push(i)}else r.push(i)}),{seriesGroupByCategoryAxis:e,other:r,meta:a}}function DO(t){var e=[];return T(t,function(r,a){var i=r.categoryAxis,n=r.valueAxis,o=n.dim,s=[" "].concat(E(r.series,function(v){return v.name})),l=[i.model.getCategories()];T(r.series,function(v){l.push(v.getRawData().mapArray(o,function(d){return d}))});for(var u=[s.join(On)],h=0;h<l[0].length;h++){for(var f=[],c=0;c<l.length;c++)f.push(l[c][h]);u.push(f.join(On))}e.push(u.join(`
`))}),e.join(`
 
`+vh+`
 
`)}function IO(t){return E(t,function(e){var r=e.getRawData(),a=[e.name],i=[];return r.each(r.dimensions,function(){for(var n=arguments.length,o=arguments[n-1],s=r.getName(o),l=0;l<n-1;l++)i[l]=arguments[l];a.push((s?s+On:"")+i.join(On))}),a.join(`
`)}).join(`
 
`+vh+`
 
`)}function MO(t){var e=CO(t);return{value:Ht([DO(e.seriesGroupByCategoryAxis),IO(e.other)],function(r){return r.replace(/[\n\t\s]/g,"")}).join(`
 
`+vh+`
 
`),meta:e.meta}}function dh(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function LO(t){var e=t.slice(0,t.indexOf(`
`));if(e.indexOf(On)>=0)return!0}var Ag=new RegExp("["+On+"]+","g");function PO(t){for(var e=t.split(/\n+/g),r=dh(e.shift()).split(Ag),a=[],i=E(r,function(l){return{name:l,data:[]}}),n=0;n<e.length;n++){var o=dh(e[n]).split(Ag);a.push(o.shift());for(var s=0;s<o.length;s++)i[s]&&(i[s].data[n]=o[s])}return{series:i,categories:a}}function EO(t){for(var e=t.split(/\n+/g),r=dh(e.shift()),a=[],i=0;i<e.length;i++){var n=dh(e[i]).split(Ag),o="",s,l=!1;isNaN(n[0])?(l=!0,o=n[0],n=n.slice(1),a[i]={name:o,value:[]},s=a[i].value):s=a[i]=[];for(var u=0;u<n.length;u++)s.push(+n[u]);s.length===1&&(l?a[i].value=s[0]:a[i]=s[0])}return{name:r,data:a}}function RO(t,e){var r=t.split(new RegExp(`
*`+vh+`
*`,"g")),a={series:[]};return T(r,function(i,n){if(LO(i)){var o=PO(i),s=e[n],l=s.axisDim+"Axis";s&&(a[l]=a[l]||[],a[l][s.axisIndex]={data:o.categories},a.series=a.series.concat(o.series))}else{var o=EO(i);a.series.push(o)}}),a}function Ss(t){this._dom=null,this.model=t}Ss.defaultOption={show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:Y(yS.title),lang:Y(yS.lang),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"},Ss.prototype.onclick=function(t,e){var r=e.getDom(),a=this.model;this._dom&&r.removeChild(this._dom);var i=document.createElement("div");i.style.cssText="position:absolute;left:5px;top:5px;bottom:5px;right:5px;",i.style.backgroundColor=a.get("backgroundColor")||"#fff";var n=document.createElement("h4"),o=a.get("lang")||[];n.innerHTML=o[0]||a.get("title"),n.style.cssText="margin: 10px 20px;",n.style.color=a.get("textColor");var s=document.createElement("div"),l=document.createElement("textarea");s.style.cssText="display:block;width:100%;overflow:auto;";var u=a.get("optionToContent"),h=a.get("contentToOption"),f=MO(t);if(typeof u=="function"){var c=u(e.getOption());typeof c=="string"?s.innerHTML=c:Ni(c)&&s.appendChild(c)}else s.appendChild(l),l.readOnly=a.get("readOnly"),l.style.cssText="width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;",l.style.color=a.get("textColor"),l.style.borderColor=a.get("textareaBorderColor"),l.style.backgroundColor=a.get("textareaColor"),l.value=f.value;var v=f.meta,d=document.createElement("div");d.style.cssText="position:absolute;bottom:0;left:0;right:0;";var g="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",p=document.createElement("div"),m=document.createElement("div");g+=";background-color:"+a.get("buttonColor"),g+=";color:"+a.get("buttonTextColor");var y=this;function _(){r.removeChild(i),y._dom=null}Kh(p,"click",_),Kh(m,"click",function(){var x;try{typeof h=="function"?x=h(s,e.getOption()):x=RO(l.value,v)}catch(w){throw _(),new Error("Data view format error "+w)}x&&e.dispatchAction({type:"changeDataView",newOption:x}),_()}),p.innerHTML=o[1],m.innerHTML=o[2],m.style.cssText=g,p.style.cssText=g,!a.get("readOnly")&&d.appendChild(m),d.appendChild(p),i.appendChild(n),i.appendChild(s),i.appendChild(d),s.style.height=r.clientHeight-80+"px",r.appendChild(i),this._dom=i},Ss.prototype.remove=function(t,e){this._dom&&e.getDom().removeChild(this._dom)},Ss.prototype.dispose=function(t,e){this.remove(t,e)};function kO(t,e){return E(t,function(r,a){var i=e&&e[a];return Q(i)&&!P(i)?(Q(r)&&!P(r)&&(r=r.value),U({value:r},i)):r})}Nn("dataView",Ss),lt({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(t,e){var r=[];T(t.newOption.series,function(a){var i=e.getSeriesByName(a.name)[0];if(!i)r.push(Z({type:"scatter"},a));else{var n=i.get("data");r.push({name:a.name,data:kO(a.data,n)})}}),e.mergeOption(U({series:r},t.newOption))});var Ea=T,gh=ut,ph=K,Tg=["dataToPoint","pointToData"],NO=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"];function mh(t,e,r){var a=this._targetInfoList=[],i={},n=_S(e,t);Ea(OO,function(o,s){(!r||!r.include||gh(r.include,s)>=0)&&o(n,a,i)})}var zn=mh.prototype;zn.setOutputRanges=function(t,e){this.matchOutputRanges(t,e,function(r,a,i){if((r.coordRanges||(r.coordRanges=[])).push(a),!r.coordRange){r.coordRange=a;var n=Dg[r.brushType](0,i,a);r.__rangeOffset={offset:SS[r.brushType](n.values,r.range,[1,1]),xyMinMax:n.xyMinMax}}})},zn.matchOutputRanges=function(t,e,r){Ea(t,function(a){var i=this.findTargetInfo(a,e);i&&i!==!0&&T(i.coordSyses,function(n){var o=Dg[a.brushType](1,n,a.range);r(a,o.values,n,e)})},this)},zn.setInputRanges=function(t,e){Ea(t,function(r){var a=this.findTargetInfo(r,e);if(z&&(ot(!a||a===!0||r.coordRange,"coordRange must be specified when coord index specified."),ot(!a||a!==!0||r.range,"range must be specified in global brush.")),r.range=r.range||[],a&&a!==!0){r.panelId=a.panelId;var i=Dg[r.brushType](0,a.coordSys,r.coordRange),n=r.__rangeOffset;r.range=n?SS[r.brushType](i.values,n.offset,zO(i.xyMinMax,n.xyMinMax)):i.values}},this)},zn.makePanelOpts=function(t,e){return E(this._targetInfoList,function(r){var a=r.getPanelRect();return{panelId:r.panelId,defaultBrushType:e&&e(r),clipPath:Tw(a),isTargetByCursor:Dw(a,t,r.coordSysModel),getLinearBrushOtherExtent:Cw(a)}})},zn.controlSeries=function(t,e,r){var a=this.findTargetInfo(t,r);return a===!0||a&&gh(a.coordSyses,e.coordinateSystem)>=0},zn.findTargetInfo=function(t,e){for(var r=this._targetInfoList,a=_S(e,t),i=0;i<r.length;i++){var n=r[i],o=t.panelId;if(o){if(n.panelId===o)return n}else for(var i=0;i<xS.length;i++)if(xS[i](a,n))return n}return!0};function Cg(t){return t[0]>t[1]&&t.reverse(),t}function _S(t,e){return vl(t,e,{includeMainTypes:NO})}var OO={grid:function(t,e){var r=t.xAxisModels,a=t.yAxisModels,i=t.gridModels,n=j(),o={},s={};!r&&!a&&!i||(Ea(r,function(l){var u=l.axis.grid.model;n.set(u.id,u),o[u.id]=!0}),Ea(a,function(l){var u=l.axis.grid.model;n.set(u.id,u),s[u.id]=!0}),Ea(i,function(l){n.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),n.each(function(l){var u=l.coordinateSystem,h=[];Ea(u.getCartesians(),function(f,c){(gh(r,f.getAxis("x").model)>=0||gh(a,f.getAxis("y").model)>=0)&&h.push(f)}),e.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:h[0],coordSyses:h,getPanelRect:wS.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(t,e){Ea(t.geoModels,function(r){var a=r.coordinateSystem;e.push({panelId:"geo--"+r.id,geoModel:r,coordSysModel:r,coordSys:a,coordSyses:[a],getPanelRect:wS.geo})})}},xS=[function(t,e){var r=t.xAxisModel,a=t.yAxisModel,i=t.gridModel;return!i&&r&&(i=r.axis.grid.model),!i&&a&&(i=a.axis.grid.model),i&&i===e.gridModel},function(t,e){var r=t.geoModel;return r&&r===e.geoModel}],wS={grid:function(){return this.coordSys.grid.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(Qa(t)),e}},Dg={lineX:ph(bS,0),lineY:ph(bS,1),rect:function(t,e,r){var a=e[Tg[t]]([r[0][0],r[1][0]]),i=e[Tg[t]]([r[0][1],r[1][1]]),n=[Cg([a[0],i[0]]),Cg([a[1],i[1]])];return{values:n,xyMinMax:n}},polygon:function(t,e,r){var a=[[1/0,-1/0],[1/0,-1/0]],i=E(r,function(n){var o=e[Tg[t]](n);return a[0][0]=Math.min(a[0][0],o[0]),a[1][0]=Math.min(a[1][0],o[1]),a[0][1]=Math.max(a[0][1],o[0]),a[1][1]=Math.max(a[1][1],o[1]),o});return{values:i,xyMinMax:a}}};function bS(t,e,r,a){z&&ot(r.type==="cartesian2d","lineX/lineY brush is available only in cartesian2d.");var i=r.getAxis(["x","y"][t]),n=Cg(E([0,1],function(s){return e?i.coordToData(i.toLocalCoord(a[s])):i.toGlobalCoord(i.dataToCoord(a[s]))})),o=[];return o[t]=n,o[1-t]=[NaN,NaN],{values:n,xyMinMax:o}}var SS={lineX:ph(AS,0),lineY:ph(AS,1),rect:function(t,e,r){return[[t[0][0]-r[0]*e[0][0],t[0][1]-r[0]*e[0][1]],[t[1][0]-r[1]*e[1][0],t[1][1]-r[1]*e[1][1]]]},polygon:function(t,e,r){return E(t,function(a,i){return[a[0]-r[0]*e[i][0],a[1]-r[1]*e[i][1]]})}};function AS(t,e,r,a){return[e[0]-a[t]*r[0],e[1]-a[t]*r[1]]}function zO(t,e){var r=TS(t),a=TS(e),i=[r[0]/a[0],r[1]/a[1]];return isNaN(i[0])&&(i[0]=1),isNaN(i[1])&&(i[1]=1),i}function TS(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}var CS=T,Ig="\0_ec_hist_store";function BO(t,e){var r=Mg(t);CS(e,function(a,i){for(var n=r.length-1;n>=0;n--){var o=r[n];if(o[i])break}if(n<0){var s=t.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(s){var l=s.getPercentRange();r[0][i]={dataZoomId:i,start:l[0],end:l[1]}}}}),r.push(e)}function VO(t){var e=Mg(t),r=e[e.length-1];e.length>1&&e.pop();var a={};return CS(r,function(i,n){for(var o=e.length-1;o>=0;o--){var i=e[o][n];if(i){a[n]=i;break}}}),a}function GO(t){t[Ig]=null}function HO(t){return Mg(t).length}function Mg(t){var e=t[Ig];return e||(e=t[Ig]=[{}]),e}ct.registerSubTypeDefaulter("dataZoom",function(){return"slider"});var FO=["x","y","z","radius","angle","single"],WO=["cartesian2d","polar","singleAxis"];function UO(t){return ut(WO,t)>=0}function $O(t,e){t=t.slice();var r=E(t,Gl);e=(e||[]).slice();var a=E(e,Gl);return function(i,n){T(t,function(o,s){for(var l={name:o,capital:r[s]},u=0;u<e.length;u++)l[e[u]]=o+a[u];i.call(n,l)})}}var DS=$O(FO,["axisIndex","axis","index","id"]);function ZO(t,e,r){return function(o){var s={nodes:[],records:{}};if(e(function(h){s.records[h.name]={}}),!o)return s;n(o,s);var l;do l=!1,t(u);while(l);function u(h){!a(h,s)&&i(h,s)&&(n(h,s),l=!0)}return s};function a(o,s){return ut(s.nodes,o)>=0}function i(o,s){var l=!1;return e(function(u){T(r(o,u)||[],function(h){s.records[u.name][h]&&(l=!0)})}),l}function n(o,s){s.nodes.push(o),e(function(l){T(r(o,l)||[],function(u){s.records[l.name][u]=!0})})}}var Ai=T,IS=Ja,Lg=function(t,e,r,a){this._dimName=t,this._axisIndex=e,this._valueWindow,this._percentWindow,this._dataExtent,this._minMaxSpan,this.ecModel=a,this._dataZoomModel=r};Lg.prototype={constructor:Lg,hostedBy:function(t){return this._dataZoomModel===t},getDataValueWindow:function(){return this._valueWindow.slice()},getDataPercentWindow:function(){return this._percentWindow.slice()},getTargetSeriesModels:function(){var t=[],e=this.ecModel;return e.eachSeries(function(r){if(UO(r.get("coordinateSystem"))){var a=this._dimName,i=e.queryComponents({mainType:a+"Axis",index:r.get(a+"AxisIndex"),id:r.get(a+"AxisId")})[0];this._axisIndex===(i&&i.componentIndex)&&t.push(r)}},this),t},getAxisModel:function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},getOtherAxisModel:function(){var t=this._dimName,e=this.ecModel,r=this.getAxisModel(),a=t==="x"||t==="y",i,n;a?(n="gridIndex",i=t==="x"?"y":"x"):(n="polarIndex",i=t==="angle"?"radius":"angle");var o;return e.eachComponent(i+"Axis",function(s){(s.get(n)||0)===(r.get(n)||0)&&(o=s)}),o},getMinMaxSpan:function(){return Y(this._minMaxSpan)},calculateDataWindow:function(t){var e=this._dataExtent,r=this.getAxisModel(),a=r.axis.scale,i=this._dataZoomModel.getRangePropMode(),n=[0,100],o=[],s=[],l;Ai(["start","end"],function(f,c){var v=t[f],d=t[f+"Value"];i[c]==="percent"?(v==null&&(v=n[c]),d=a.parse(At(v,n,e))):(l=!0,d=d==null?e[c]:a.parse(d),v=At(d,e,n)),s[c]=d,o[c]=v}),IS(s),IS(o);var u=this._minMaxSpan;l?h(s,o,e,n,!1):h(o,s,n,e,!0);function h(f,c,v,d,g){var p=g?"Span":"ValueSpan";pi(0,f,v,"all",u["min"+p],u["max"+p]);for(var m=0;m<2;m++)c[m]=At(f[m],v,d,!0),g&&(c[m]=a.parse(c[m]))}return{valueWindow:s,percentWindow:o}},reset:function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=YO(this,this._dimName,e),qO(this);var r=this.calculateDataWindow(t.settledOption);this._valueWindow=r.valueWindow,this._percentWindow=r.percentWindow,MS(this)}},restore:function(t){t===this._dataZoomModel&&(this._valueWindow=this._percentWindow=null,MS(this,!0))},filterData:function(t,e){if(t!==this._dataZoomModel)return;var r=this._dimName,a=this.getTargetSeriesModels(),i=t.get("filterMode"),n=this._valueWindow;if(i==="none")return;Ai(a,function(s){var l=s.getData(),u=l.mapDimension(r,!0);!u.length||(i==="weakFilter"?l.filterSelf(function(h){for(var f,c,v,d=0;d<u.length;d++){var g=l.get(u[d],h),p=!isNaN(g),m=g<n[0],y=g>n[1];if(p&&!m&&!y)return!0;p&&(v=!0),m&&(f=!0),y&&(c=!0)}return v&&f&&c}):Ai(u,function(h){if(i==="empty")s.setData(l=l.map(h,function(c){return o(c)?c:NaN}));else{var f={};f[h]=n,l.selectRange(f)}}),Ai(u,function(h){l.setApproximateExtent(n,h)}))});function o(s){return s>=n[0]&&s<=n[1]}}};function YO(t,e,r){var a=[1/0,-1/0];return Ai(r,function(i){var n=i.getData();n&&Ai(n.mapDimension(e,!0),function(o){var s=n.getApproximateExtent(o);s[0]<a[0]&&(a[0]=s[0]),s[1]>a[1]&&(a[1]=s[1])})}),a[1]<a[0]&&(a=[NaN,NaN]),XO(t,a),a}function XO(t,e){var r=t.getAxisModel(),a=r.getMin(!0),i=r.get("type")==="category",n=i&&r.getCategories().length;a!=null&&a!=="dataMin"&&typeof a!="function"?e[0]=a:i&&(e[0]=n>0?0:NaN);var o=r.getMax(!0);return o!=null&&o!=="dataMax"&&typeof o!="function"?e[1]=o:i&&(e[1]=n>0?n-1:NaN),r.get("scale",!0)||(e[0]>0&&(e[0]=0),e[1]<0&&(e[1]=0)),e}function MS(t,e){var r=t.getAxisModel(),a=t._percentWindow,i=t._valueWindow;if(!!a){var n=Dc(i,[0,500]);n=Math.min(n,20);var o=e||a[0]===0&&a[1]===100;r.setRange(o?null:+i[0].toFixed(n),o?null:+i[1].toFixed(n))}}function qO(t){var e=t._minMaxSpan={},r=t._dataZoomModel,a=t._dataExtent;Ai(["min","max"],function(i){var n=r.get(i+"Span"),o=r.get(i+"ValueSpan");o!=null&&(o=t.getAxisModel().axis.scale.parse(o)),o!=null?n=At(a[0]+o,a,[0,100],!0):n!=null&&(o=At(n,[0,100],a,!0)-a[0]),e[i+"Span"]=n,e[i+"ValueSpan"]=o})}var Ti=T,Ci=DS,Pg=Me({type:"dataZoom",dependencies:["xAxis","yAxis","zAxis","radiusAxis","angleAxis","singleAxis","series"],defaultOption:{zlevel:0,z:4,orient:null,xAxisIndex:null,yAxisIndex:null,filterMode:"filter",throttle:null,start:0,end:100,startValue:null,endValue:null,minSpan:null,maxSpan:null,minValueSpan:null,maxValueSpan:null,rangeMode:null},init:function(t,e,r){this._dataIntervalByAxis={},this._dataInfo={},this._axisProxies={},this.textStyleModel,this._autoThrottle=!0,this._rangePropMode=["percent","percent"];var a=LS(t);this.settledOption=a,this.mergeDefaultAndTheme(t,r),this.doInit(a)},mergeOption:function(t){var e=LS(t);J(this.option,t,!0),J(this.settledOption,e,!0),this.doInit(e)},doInit:function(t){var e=this.option;at.canvasSupported||(e.realtime=!1),this._setDefaultThrottle(t),PS(this,t);var r=this.settledOption;Ti([["start","startValue"],["end","endValue"]],function(a,i){this._rangePropMode[i]==="value"&&(e[a[0]]=r[a[0]]=null)},this),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var t=this._axisProxies;this.eachTargetAxis(function(e,r,a,i){var n=this.dependentModels[e.axis][r],o=n.__dzAxisProxy||(n.__dzAxisProxy=new Lg(e.name,r,this,i));t[e.name+"_"+r]=o},this)},_resetTarget:function(){var t=this.option,e=this._judgeAutoMode();Ci(function(r){var a=r.axisIndex;t[a]=te(t[a])},this),e==="axisIndex"?this._autoSetAxisIndex():e==="orient"&&this._autoSetOrient()},_judgeAutoMode:function(){var t=this.option,e=!1;Ci(function(a){t[a.axisIndex]!=null&&(e=!0)},this);var r=t.orient;if(r==null&&e)return"orient";if(!e)return r==null&&(t.orient="horizontal"),"axisIndex"},_autoSetAxisIndex:function(){var t=!0,e=this.get("orient",!0),r=this.option,a=this.dependentModels;if(t){var i=e==="vertical"?"y":"x";a[i+"Axis"].length?(r[i+"AxisIndex"]=[0],t=!1):Ti(a.singleAxis,function(n){t&&n.get("orient",!0)===e&&(r.singleAxisIndex=[n.componentIndex],t=!1)})}t&&Ci(function(n){if(!!t){var o=[],s=this.dependentModels[n.axis];if(s.length&&!o.length)for(var l=0,u=s.length;l<u;l++)s[l].get("type")==="category"&&o.push(l);r[n.axisIndex]=o,o.length&&(t=!1)}},this),t&&this.ecModel.eachSeries(function(n){this._isSeriesHasAllAxesTypeOf(n,"value")&&Ci(function(o){var s=r[o.axisIndex],l=n.get(o.axisIndex),u=n.get(o.axisId),h=n.ecModel.queryComponents({mainType:o.axis,index:l,id:u})[0];if(z&&!h)throw new Error(o.axis+' "'+Et(l,u,0)+'" not found');l=h.componentIndex,ut(s,l)<0&&s.push(l)})},this)},_autoSetOrient:function(){var t;this.eachTargetAxis(function(e){!t&&(t=e.name)},this),this.option.orient=t==="y"?"vertical":"horizontal"},_isSeriesHasAllAxesTypeOf:function(t,e){var r=!0;return Ci(function(a){var i=t.get(a.axisIndex),n=this.dependentModels[a.axis][i];(!n||n.get("type")!==e)&&(r=!1)},this),r},_setDefaultThrottle:function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var e=this.ecModel.option;this.option.throttle=e.animation&&e.animationDurationUpdate>0?100:20}},getFirstTargetAxisModel:function(){var t;return Ci(function(e){if(t==null){var r=this.get(e.axisIndex);r.length&&(t=this.dependentModels[e.axis][r[0]])}},this),t},eachTargetAxis:function(t,e){var r=this.ecModel;Ci(function(a){Ti(this.get(a.axisIndex),function(i){t.call(e,a,i,this,r)},this)},this)},getAxisProxy:function(t,e){return this._axisProxies[t+"_"+e]},getAxisModel:function(t,e){var r=this.getAxisProxy(t,e);return r&&r.getAxisModel()},setRawRange:function(t){var e=this.option,r=this.settledOption;Ti([["start","startValue"],["end","endValue"]],function(a){(t[a[0]]!=null||t[a[1]]!=null)&&(e[a[0]]=r[a[0]]=t[a[0]],e[a[1]]=r[a[1]]=t[a[1]])},this),PS(this,t)},setCalculatedRange:function(t){var e=this.option;Ti(["start","startValue","end","endValue"],function(r){e[r]=t[r]})},getPercentRange:function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},getValueRange:function(t,e){if(t==null&&e==null){var r=this.findRepresentativeAxisProxy();if(r)return r.getDataValueWindow()}else return this.getAxisProxy(t,e).getDataValueWindow()},findRepresentativeAxisProxy:function(t){if(t)return t.__dzAxisProxy;var e=this._axisProxies;for(var r in e)if(e.hasOwnProperty(r)&&e[r].hostedBy(this))return e[r];for(var r in e)if(e.hasOwnProperty(r)&&!e[r].hostedBy(this))return e[r]},getRangePropMode:function(){return this._rangePropMode.slice()}});function LS(t){var e={};return Ti(["start","end","startValue","endValue","throttle"],function(r){t.hasOwnProperty(r)&&(e[r]=t[r])}),e}function PS(t,e){var r=t._rangePropMode,a=t.get("rangeMode");Ti([["start","startValue"],["end","endValue"]],function(i,n){var o=e[i[0]]!=null,s=e[i[1]]!=null;o&&!s?r[n]="percent":!o&&s?r[n]="value":a?r[n]=a[n]:o&&(r[n]="percent")})}var Eg=wr.extend({type:"dataZoom",render:function(t,e,r,a){this.dataZoomModel=t,this.ecModel=e,this.api=r},getTargetCoordInfo:function(){var t=this.dataZoomModel,e=this.ecModel,r={};t.eachTargetAxis(function(i,n){var o=e.getComponent(i.axis,n);if(o){var s=o.getCoordSysModel();s&&a(s,o,r[s.mainType]||(r[s.mainType]=[]),s.componentIndex)}},this);function a(i,n,o,s){for(var l,u=0;u<o.length;u++)if(o[u].model===i){l=o[u];break}l||o.push(l={model:i,axisModels:[],coordIndex:s}),l.axisModels.push(n)}return r}});Pg.extend({type:"dataZoom.select"}),Eg.extend({type:"dataZoom.select"}),Ie({getTargetSeries:function(t){var e=j();return t.eachComponent("dataZoom",function(r){r.eachTargetAxis(function(a,i,n){var o=n.getAxisProxy(a.name,i);T(o.getTargetSeriesModels(),function(s){e.set(s.uid,s)})})}),e},modifyOutputEnd:!0,overallReset:function(t,e){t.eachComponent("dataZoom",function(r){r.eachTargetAxis(function(a,i,n){n.getAxisProxy(a.name,i).reset(n,e)}),r.eachTargetAxis(function(a,i,n){n.getAxisProxy(a.name,i).filterData(n,e)})}),t.eachComponent("dataZoom",function(r){var a=r.findRepresentativeAxisProxy(),i=a.getDataPercentWindow(),n=a.getDataValueWindow();r.setCalculatedRange({start:i[0],end:i[1],startValue:n[0],endValue:n[1]})})}}),lt("dataZoom",function(t,e){var r=ZO(X(e.eachComponent,e,"dataZoom"),DS,function(i,n){return i.get(n.axisIndex)}),a=[];e.eachComponent({mainType:"dataZoom",query:t},function(i,n){a.push.apply(a,r(i).nodes)}),T(a,function(i,n){i.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})});var KO=Fr.toolbox.dataZoom,ES=T,QO="\0_ec_\0toolbox-dataZoom_";function Rg(t,e,r){(this._brushController=new Rn(r.getZr())).on("brush",X(this._onBrush,this)).mount(),this._isZoomActive}Rg.defaultOption={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:Y(KO.title)};var Bn=Rg.prototype;Bn.render=function(t,e,r,a){this.model=t,this.ecModel=e,this.api=r,tz(t,e,this,a,r),jO(t,e)},Bn.onclick=function(t,e,r){JO[r].call(this)},Bn.remove=function(t,e){this._brushController.unmount()},Bn.dispose=function(t,e){this._brushController.dispose()};var JO={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(VO(this.ecModel))}};Bn._onBrush=function(t,e){if(!e.isEnd||!t.length)return;var r={},a=this.ecModel;this._brushController.updateCovers([]);var i=new mh(RS(this.model.option),a,{include:["grid"]});i.matchOutputRanges(t,a,function(s,l,u){if(u.type==="cartesian2d"){var h=s.brushType;h==="rect"?(n("x",u,l[0]),n("y",u,l[1])):n({lineX:"x",lineY:"y"}[h],u,l)}}),BO(a,r),this._dispatchZoomAction(r);function n(s,l,u){var h=l.getAxis(s),f=h.model,c=o(s,f,a),v=c.findRepresentativeAxisProxy(f).getMinMaxSpan();(v.minValueSpan!=null||v.maxValueSpan!=null)&&(u=pi(0,u.slice(),h.scale.getExtent(),0,v.minValueSpan,v.maxValueSpan)),c&&(r[c.id]={dataZoomId:c.id,startValue:u[0],endValue:u[1]})}function o(s,l,u){var h;return u.eachComponent({mainType:"dataZoom",subType:"select"},function(f){var c=f.getAxisModel(s,l.componentIndex);c&&(h=f)}),h}},Bn._dispatchZoomAction=function(t){var e=[];ES(t,function(r,a){e.push(Y(r))}),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})};function RS(t){var e={};return T(["xAxisIndex","yAxisIndex"],function(r){e[r]=t[r],e[r]==null&&(e[r]="all"),(e[r]===!1||e[r]==="none")&&(e[r]=[])}),e}function jO(t,e){t.setIconStatus("back",HO(e)>1?"emphasis":"normal")}function tz(t,e,r,a,i){var n=r._isZoomActive;a&&a.type==="takeGlobalCursor"&&(n=a.key==="dataZoomSelect"?a.dataZoomSelectActive:!1),r._isZoomActive=n,t.setIconStatus("zoom",n?"emphasis":"normal");var o=new mh(RS(t.option),e,{include:["grid"]});r._brushController.setPanels(o.makePanelOpts(i,function(s){return s.xAxisDeclared&&!s.yAxisDeclared?"lineX":!s.xAxisDeclared&&s.yAxisDeclared?"lineY":"rect"})).enableBrush(n?{brushType:"auto",brushStyle:{lineWidth:0,fill:"rgba(0,0,0,0.2)"}}:!1)}Nn("dataZoom",Rg),ie(function(t){if(!t)return;var e=t.dataZoom||(t.dataZoom=[]);P(e)||(t.dataZoom=e=[e]);var r=t.toolbox;if(r&&(P(r)&&(r=r[0]),r&&r.feature)){var a=r.feature.dataZoom;i("xAxis",a),i("yAxis",a)}function i(o,s){if(!!s){var l=o+"Index",u=s[l];u!=null&&u!=="all"&&!P(u)&&(u=u===!1||u==="none"?[]:[u]),n(o,function(h,f){if(!(u!=null&&u!=="all"&&ut(u,f)===-1)){var c={type:"select",$fromToolbox:!0,filterMode:s.filterMode||"filter",id:QO+o+f};c[l]=f,e.push(c)}})}}function n(o,s){var l=t[o];P(l)||(l=l?[l]:[]),ES(l,s)}});var ez=Fr.toolbox.restore;function kg(t){this.model=t}kg.defaultOption={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:ez.title};var rz=kg.prototype;rz.onclick=function(t,e,r){GO(t),e.dispatchAction({type:"restore",from:this.uid})},Nn("restore",kg),lt({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")}),Me({type:"tooltip",dependencies:["axisPointer"],defaultOption:{zlevel:0,z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:!1,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"rgba(50,50,50,0.7)",borderColor:"#333",borderRadius:4,borderWidth:0,padding:5,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#fff",fontSize:14}}});var kS=T,az=Y0,iz=["","-webkit-","-moz-","-o-"],nz="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;";function oz(t){var e="cubic-bezier(0.23, 1, 0.32, 1)",r="left "+t+"s "+e+",top "+t+"s "+e;return E(iz,function(a){return a+"transition:"+r}).join(";")}function sz(t){var e=[],r=t.get("fontSize"),a=t.getTextColor();return a&&e.push("color:"+a),e.push("font:"+t.getFont()),r&&e.push("line-height:"+Math.round(r*3/2)+"px"),kS(["decoration","align"],function(i){var n=t.get(i);n&&e.push("text-"+i+":"+n)}),e.join(";")}function lz(t){var e=[],r=t.get("transitionDuration"),a=t.get("backgroundColor"),i=t.getModel("textStyle"),n=t.get("padding");return r&&e.push(oz(r)),a&&(at.canvasSupported?e.push("background-Color:"+a):(e.push("background-Color:#"+uf(a)),e.push("filter:alpha(opacity=70)"))),kS(["width","color","radius"],function(o){var s="border-"+o,l=az(s),u=t.get(l);u!=null&&e.push(s+":"+u+(o==="color"?"":"px"))}),e.push(sz(i)),n!=null&&e.push("padding:"+ja(n).join("px ")+"px"),e.join(";")+";"}function NS(t,e,r,a,i){var n=e&&e.painter;if(r){var o=n&&n.getViewportRoot();o&&CT(t,o,document.body,a,i)}else{t[0]=a,t[1]=i;var s=n&&n.getViewportRootOffset();s&&(t[0]+=s.offsetLeft,t[1]+=s.offsetTop)}}function Ng(t,e,r){if(at.wxa)return null;var a=document.createElement("div");a.domBelongToZr=!0,this.el=a;var i=this._zr=e.getZr(),n=this._appendToBody=r&&r.appendToBody;this._styleCoord=[0,0],NS(this._styleCoord,i,n,e.getWidth()/2,e.getHeight()/2),n?document.body.appendChild(a):t.appendChild(a),this._container=t,this._show=!1,this._hideTimeout;var o=this;a.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},a.onmousemove=function(s){if(s=s||window.event,!o._enterable){var l=i.handler,u=i.painter.getViewportRoot();fr(u,s,!0),l.dispatch("mousemove",s)}},a.onmouseleave=function(){o._enterable&&o._show&&o.hideLater(o._hideDelay),o._inContent=!1}}Ng.prototype={constructor:Ng,_enterable:!0,update:function(){var t=this._container,e=t.currentStyle||document.defaultView.getComputedStyle(t),r=t.style;r.position!=="absolute"&&e.position!=="absolute"&&(r.position="relative")},show:function(t){clearTimeout(this._hideTimeout);var e=this.el,r=this._styleCoord;e.style.cssText=nz+lz(t)+";left:"+r[0]+"px;top:"+r[1]+"px;"+(t.get("extraCssText")||""),e.style.display=e.innerHTML?"block":"none",e.style.pointerEvents=this._enterable?"auto":"none",this._show=!0},setContent:function(t){this.el.innerHTML=t??""},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el;return[t.clientWidth,t.clientHeight]},moveTo:function(t,e){var r=this._styleCoord;NS(r,this._zr,this._appendToBody,t,e);var a=this.el.style;a.left=r[0]+"px",a.top=r[1]+"px"},hide:function(){this.el.style.display="none",this._show=!1},hideLater:function(t){this._show&&!(this._inContent&&this._enterable)&&(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(X(this.hide,this),t)):this.hide())},isShow:function(){return this._show},dispose:function(){this.el.parentNode.removeChild(this.el)},getOuterSize:function(){var t=this.el.clientWidth,e=this.el.clientHeight;if(document.defaultView&&document.defaultView.getComputedStyle){var r=document.defaultView.getComputedStyle(this.el);r&&(t+=parseInt(r.borderLeftWidth,10)+parseInt(r.borderRightWidth,10),e+=parseInt(r.borderTopWidth,10)+parseInt(r.borderBottomWidth,10))}return{width:t,height:e}}};function Og(t){this._zr=t.getZr(),this._show=!1,this._hideTimeout}Og.prototype={constructor:Og,_enterable:!0,update:function(){},show:function(t){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.attr("show",!0),this._show=!0},setContent:function(t,e,r){this.el&&this._zr.remove(this.el);for(var a={},i=t,n="{marker",o="|}",s=i.indexOf(n);s>=0;){var l=i.indexOf(o),u=i.substr(s+n.length,l-s-n.length);u.indexOf("sub")>-1?a["marker"+u]={textWidth:4,textHeight:4,textBorderRadius:2,textBackgroundColor:e[u],textOffset:[3,0]}:a["marker"+u]={textWidth:10,textHeight:10,textBorderRadius:5,textBackgroundColor:e[u]},i=i.substr(l+1),s=i.indexOf("{marker")}this.el=new nt({style:{rich:a,text:t,textLineHeight:20,textBackgroundColor:r.get("backgroundColor"),textBorderRadius:r.get("borderRadius"),textFill:r.get("textStyle.color"),textPadding:r.get("padding")},z:r.get("z")}),this._zr.add(this.el);var h=this;this.el.on("mouseover",function(){h._enterable&&(clearTimeout(h._hideTimeout),h._show=!0),h._inContent=!0}),this.el.on("mouseout",function(){h._enterable&&h._show&&h.hideLater(h._hideDelay),h._inContent=!1})},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el.getBoundingRect();return[t.width,t.height]},moveTo:function(t,e){this.el&&this.el.attr("position",[t,e])},hide:function(){this.el&&this.el.hide(),this._show=!1},hideLater:function(t){this._show&&!(this._inContent&&this._enterable)&&(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(X(this.hide,this),t)):this.hide())},isShow:function(){return this._show},getOuterSize:function(){var t=this.getSize();return{width:t[0],height:t[1]}}};var OS=X,As=T,zS=R,uz=new ft({shape:{x:-1,y:-1,width:2,height:2}});Xt({type:"tooltip",init:function(t,e){if(!at.node){var r=t.getComponent("tooltip"),a=r.get("renderMode");this._renderMode=Zm(a);var i;this._renderMode==="html"?(i=new Ng(e.getDom(),e,{appendToBody:r.get("appendToBody",!0)}),this._newLine="<br/>"):(i=new Og(e),this._newLine=`
`),this._tooltipContent=i}},render:function(t,e,r){if(!at.node){this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=r,this._lastDataByCoordSys=null,this._alwaysShowContent=t.get("alwaysShowContent");var a=this._tooltipContent;a.update(),a.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow()}},_initGlobalListener:function(){var t=this._tooltipModel,e=t.get("triggerOn");bb("itemTooltip",this._api,OS(function(r,a,i){e!=="none"&&(e.indexOf(r)>=0?this._tryShow(a,i):r==="leave"&&this._hide(i))},this))},_keepShow:function(){var t=this._tooltipModel,e=this._ecModel,r=this._api;if(this._lastX!=null&&this._lastY!=null&&t.get("triggerOn")!=="none"){var a=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!r.isDisposed()&&a.manuallyShowTip(t,e,r,{x:a._lastX,y:a._lastY})})}},manuallyShowTip:function(t,e,r,a){if(!(a.from===this.uid||at.node)){var i=BS(a,r);this._ticket="";var n=a.dataByCoordSys;if(a.tooltip&&a.x!=null&&a.y!=null){var o=uz;o.position=[a.x,a.y],o.update(),o.tooltip=a.tooltip,this._tryShow({offsetX:a.x,offsetY:a.y,target:o},i)}else if(n)this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,dataByCoordSys:a.dataByCoordSys,tooltipOption:a.tooltipOption},i);else if(a.seriesIndex!=null){if(this._manuallyAxisShowTip(t,e,r,a))return;var s=mb(a,e),l=s.point[0],u=s.point[1];l!=null&&u!=null&&this._tryShow({offsetX:l,offsetY:u,position:a.position,target:s.el},i)}else a.x!=null&&a.y!=null&&(r.dispatchAction({type:"updateAxisPointer",x:a.x,y:a.y}),this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,target:r.getZr().findHover(a.x,a.y).target},i))}},manuallyHideTip:function(t,e,r,a){var i=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&i.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,a.from!==this.uid&&this._hide(BS(a,r))},_manuallyAxisShowTip:function(u,e,r,a){var i=a.seriesIndex,n=a.dataIndex,o=e.getComponent("axisPointer").coordSysAxesInfo;if(!(i==null||n==null||o==null)){var s=e.getSeriesByIndex(i);if(!!s){var l=s.getData(),u=zg([l.getItemModel(n),s,(s.coordinateSystem||{}).model,u]);if(u.get("trigger")==="axis")return r.dispatchAction({type:"updateAxisPointer",seriesIndex:i,dataIndex:n,position:a.position}),!0}}},_tryShow:function(t,e){var r=t.target,a=this._tooltipModel;if(!!a){this._lastX=t.offsetX,this._lastY=t.offsetY;var i=t.dataByCoordSys;i&&i.length?this._showAxisTooltip(i,t):r&&r.dataIndex!=null?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(t,r,e)):r&&r.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(t,r,e)):(this._lastDataByCoordSys=null,this._hide(e))}},_showOrMove:function(t,e){var r=t.get("showDelay");e=X(e,this),clearTimeout(this._showTimout),r>0?this._showTimout=setTimeout(e,r):e()},_showAxisTooltip:function(t,e){var r=this._ecModel,a=this._tooltipModel,i=[e.offsetX,e.offsetY],n=[],o=[],s=zg([e.tooltipOption,a]),l=this._renderMode,u=this._newLine,h={};As(t,function(c){As(c.dataByAxis,function(v){var d=r.getComponent(v.axisDim+"Axis",v.axisIndex),g=v.value,p=[];if(!(!d||g==null)){var m=Pb(g,d.axis,r,v.seriesDataIndices,v.valueLabelOpt);T(v.seriesDataIndices,function(_){var x=r.getSeriesByIndex(_.seriesIndex),w=_.dataIndexInside,S=x&&x.getDataParams(w);if(S.axisDim=v.axisDim,S.axisIndex=v.axisIndex,S.axisType=v.axisType,S.axisId=v.axisId,S.axisValue=Lv(d.axis,g),S.axisValueLabel=m,S){o.push(S);var b=x.formatTooltip(w,!0,null,l),A;if(Q(b)){A=b.html;var C=b.markers;J(h,C)}else A=b;p.push(A)}});var y=m;l!=="html"?n.push(p.join(u)):n.push((y?Tt(y)+u:"")+p.join(u))}})},this),n.reverse(),n=n.join(this._newLine+this._newLine);var f=e.position;this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(s,f,i[0],i[1],this._tooltipContent,o):this._showTooltipContent(s,n,o,Math.random(),i[0],i[1],f,void 0,h)})},_showSeriesItemTooltip:function(t,e,r){var a=this._ecModel,i=e.seriesIndex,n=a.getSeriesByIndex(i),o=e.dataModel||n,s=e.dataIndex,l=e.dataType,u=o.getData(l),h=zg([u.getItemModel(s),o,n&&(n.coordinateSystem||{}).model,this._tooltipModel]),f=h.get("trigger");if(!(f!=null&&f!=="item")){var c=o.getDataParams(s,l),v=o.formatTooltip(s,!1,l,this._renderMode),d,g;Q(v)?(d=v.html,g=v.markers):(d=v,g=null);var p="item_"+o.name+"_"+s;this._showOrMove(h,function(){this._showTooltipContent(h,d,c,p,t.offsetX,t.offsetY,t.position,t.target,g)}),r({type:"showTip",dataIndexInside:s,dataIndex:u.getRawIndex(s),seriesIndex:i,from:this.uid})}},_showComponentItemTooltip:function(t,e,r){var a=e.tooltip;if(typeof a=="string"){var i=a;a={content:i,formatter:i}}var n=new ht(a,this._tooltipModel,this._ecModel),o=n.get("content"),s=Math.random();this._showOrMove(n,function(){this._showTooltipContent(n,o,n.get("formatterParams")||{},s,t.offsetX,t.offsetY,t.position,e)}),r({type:"showTip",from:this.uid})},_showTooltipContent:function(t,e,r,a,i,n,o,s,l){if(this._ticket="",!(!t.get("showContent")||!t.get("show"))){var u=this._tooltipContent,h=t.get("formatter");o=o||t.get("position");var f=e;if(h&&typeof h=="string")f=kc(h,r,!0);else if(typeof h=="function"){var c=OS(function(v,d){v===this._ticket&&(u.setContent(d,l,t),this._updatePosition(t,o,i,n,u,r,s))},this);this._ticket=a,f=h(r,a,c)}u.setContent(f,l,t),u.show(t),this._updatePosition(t,o,i,n,u,r,s)}},_updatePosition:function(t,e,r,a,i,n,o){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var u=i.getSize(),h=t.get("align"),f=t.get("verticalAlign"),c=o&&o.getBoundingRect().clone();if(o&&c.applyTransform(o.transform),typeof e=="function"&&(e=e([r,a],n,i.el,c,{viewSize:[s,l],contentSize:u.slice()})),P(e))r=zS(e[0],s),a=zS(e[1],l);else if(Q(e)){e.width=u[0],e.height=u[1];var v=Ot(e,{width:s,height:l});r=v.x,a=v.y,h=null,f=null}else if(typeof e=="string"&&o){var d=cz(e,c,u);r=d[0],a=d[1]}else{var d=hz(r,a,i,s,l,h?null:20,f?null:20);r=d[0],a=d[1]}if(h&&(r-=VS(h)?u[0]/2:h==="right"?u[0]:0),f&&(a-=VS(f)?u[1]/2:f==="bottom"?u[1]:0),t.get("confine")){var d=fz(r,a,i,s,l);r=d[0],a=d[1]}i.moveTo(r,a)},_updateContentNotChangedOnAxis:function(t){var e=this._lastDataByCoordSys,r=!!e&&e.length===t.length;return r&&As(e,function(a,i){var n=a.dataByAxis||{},o=t[i]||{},s=o.dataByAxis||[];r&=n.length===s.length,r&&As(n,function(l,u){var h=s[u]||{},f=l.seriesDataIndices||[],c=h.seriesDataIndices||[];r&=l.value===h.value&&l.axisType===h.axisType&&l.axisId===h.axisId&&f.length===c.length,r&&As(f,function(v,d){var g=c[d];r&=v.seriesIndex===g.seriesIndex&&v.dataIndex===g.dataIndex})})}),this._lastDataByCoordSys=t,!!r},_hide:function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},dispose:function(t,e){at.node||(this._tooltipContent.dispose(),ug("itemTooltip",e))}});function zg(t){for(var e=t.pop();t.length;){var r=t.pop();r&&(ht.isInstance(r)&&(r=r.get("tooltip",!0)),typeof r=="string"&&(r={formatter:r}),e=new ht(r,e,e.ecModel))}return e}function BS(t,e){return t.dispatchAction||X(e.dispatchAction,e)}function hz(t,e,r,a,i,n,o){var s=r.getOuterSize(),l=s.width,u=s.height;return n!=null&&(t+l+n>a?t-=l+n:t+=n),o!=null&&(e+u+o>i?e-=u+o:e+=o),[t,e]}function fz(t,e,r,a,i){var n=r.getOuterSize(),o=n.width,s=n.height;return t=Math.min(t+o,a)-o,e=Math.min(e+s,i)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}function cz(t,e,r){var a=r[0],i=r[1],n=5,o=0,s=0,l=e.width,u=e.height;switch(t){case"inside":o=e.x+l/2-a/2,s=e.y+u/2-i/2;break;case"top":o=e.x+l/2-a/2,s=e.y-i-n;break;case"bottom":o=e.x+l/2-a/2,s=e.y+u+n;break;case"left":o=e.x-a-n,s=e.y+u/2-i/2;break;case"right":o=e.x+l+n,s=e.y+u/2-i/2}return[o,s]}function VS(t){return t==="center"||t==="middle"}lt({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},function(){}),lt({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},function(){});var vz=["rect","polygon","keep","clear"],dz=function(t,e){var r=t&&t.brush;if(P(r)||(r=r?[r]:[]),!!r.length){var a=[];T(r,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(a=a.concat(u))});var i=t&&t.toolbox;P(i)&&(i=i[0]),i||(i={feature:{}},t.toolbox=[i]);var n=i.feature||(i.feature={}),o=n.brush||(n.brush={}),s=o.type||(o.type=[]);s.push.apply(s,a),gz(s),e&&!s.length&&s.push.apply(s,vz)}};function gz(t){var e={};T(t,function(r){e[r]=1}),t.length=0,T(e,function(r,a){t.push(a)})}var GS=T;function HS(t){if(t){for(var e in t)if(t.hasOwnProperty(e))return!0}}function Bg(t,e,r){var a={};return GS(e,function(n){var o=a[n]=i();GS(t[n],function(s,l){if(!!mt.isValidType(l)){var u={type:l,visual:s};r&&r(u,n),o[l]=new mt(u),l==="opacity"&&(u=Y(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new mt(u))}})}),a;function i(){var n=function(){};n.prototype.__hidden=n.prototype;var o=new n;return o}}function FS(t,e,r){var a;T(r,function(i){e.hasOwnProperty(i)&&HS(e[i])&&(a=!0)}),a&&T(r,function(i){e.hasOwnProperty(i)&&HS(e[i])?t[i]=Y(e[i]):delete t[i]})}function pz(t,e,r,a,i,n){var o={};T(t,function(f){var c=mt.prepareVisualTypes(e[f]);o[f]=c});var s;function l(f){return r.getItemVisual(s,f)}function u(f,c){r.setItemVisual(s,f,c)}n==null?r.each(h):r.each([n],h);function h(f,c){s=n==null?f:c;var v=r.getRawDataItem(s);if(!(v&&v.visualMap===!1))for(var d=a.call(i,f),g=e[d],p=o[d],m=0,y=p.length;m<y;m++){var _=p[m];g[_]&&g[_].applyVisual(f,l,u)}}}function mz(t,e,r,a){var i={};T(t,function(o){var s=mt.prepareVisualTypes(e[o]);i[o]=s});function n(o,s){a!=null&&(a=s.getDimension(a));function l(_){return s.getItemVisual(h,_)}function u(_,x){s.setItemVisual(h,_,x)}for(var h;(h=o.next())!=null;){var f=s.getRawDataItem(h);if(!(f&&f.visualMap===!1))for(var c=a!=null?s.get(a,h,!0):h,v=r(c),d=e[v],g=i[v],p=0,m=g.length;p<m;p++){var y=g[p];d[y]&&d[y].applyVisual(c,l,u)}}}return{progress:n}}var Vg={lineX:WS(0),lineY:WS(1),rect:{point:function(t,e,r){return t&&r.boundingRect.contain(t[0],t[1])},rect:function(t,e,r){return t&&r.boundingRect.intersect(t)}},polygon:{point:function(t,e,r){return t&&r.boundingRect.contain(t[0],t[1])&&si(r.range,t[0],t[1])},rect:function(t,e,r){var a=r.range;if(!t||a.length<=1)return!1;var i=t.x,n=t.y,o=t.width,s=t.height,l=a[0];if(si(a,i,n)||si(a,i+o,n)||si(a,i,n+s)||si(a,i+o,n+s)||it.create(t).contain(l[0],l[1])||wo(i,n,i+o,n,a)||wo(i,n,i,n+s,a)||wo(i+o,n,i+o,n+s,a)||wo(i,n+s,i+o,n+s,a))return!0}}};function WS(t){var e=["x","y"],r=["width","height"];return{point:function(a,i,n){if(a){var o=n.range,s=a[t];return Ts(s,o)}},rect:function(a,i,n){if(a){var o=n.range,s=[a[e[t]],a[e[t]]+a[r[t]]];return s[1]<s[0]&&s.reverse(),Ts(s[0],o)||Ts(s[1],o)||Ts(o[0],s)||Ts(o[1],s)}}}}function Ts(t,e){return e[0]<=t&&t<=e[1]}var US=["inBrush","outOfBrush"],Gg="__ecBrushSelect",Hg="__ecInBrushSelectEvent",$S=br.VISUAL.BRUSH;It($S,function(t,e,r){t.eachComponent({mainType:"brush"},function(a){r&&r.type==="takeGlobalCursor"&&a.setBrushOption(r.key==="brush"?r.brushOption:{brushType:!1})}),ZS(t)});function ZS(t){t.eachComponent({mainType:"brush"},function(e){var r=e.brushTargetManager=new mh(e.option,t);r.setInputRanges(e.areas,t)})}bt($S,function(t,e,r){var a=[],i,n;t.eachComponent({mainType:"brush"},function(o,s){var l={brushId:o.id,brushIndex:s,brushName:o.name,areas:Y(o.areas),selected:[]};a.push(l);var u=o.option,h=u.brushLink,f=[],c=[],v=[],d=0;s||(i=u.throttleType,n=u.throttleDelay);var g=E(o.areas,function(w){return wz(U({boundingRect:bz[w.brushType](w)},w))}),p=Bg(o.option,US,function(w){w.mappingMethod="fixed"});P(h)&&T(h,function(w){f[w]=1});function m(w){return h==="all"||f[w]}function y(w){return!!w.length}t.eachSeries(function(w,S){var b=v[S]=[];w.subType==="parallel"?_(w,S,b):x(w,S,b)});function _(w,S){var b=w.coordinateSystem;d|=b.hasAxisBrushed(),m(S)&&b.eachActiveState(w.getData(),function(A,C){A==="active"&&(c[C]=1)})}function x(w,S,b){var A=XS(w);if(!(!A||xz(o,S))&&(T(g,function(D){A[D.brushType]&&o.brushTargetManager.controlSeries(D,w,t)&&b.push(D),d|=y(b)}),m(S)&&y(b))){var C=w.getData();C.each(function(D){YS(A,b,C,D)&&(c[D]=1)})}}t.eachSeries(function(w,S){var b={seriesId:w.id,seriesIndex:S,seriesName:w.name,dataIndex:[]};l.selected.push(b);var A=XS(w),C=v[S],D=w.getData(),I=m(S)?function(L){return c[L]?(b.dataIndex.push(D.getRawIndex(L)),"inBrush"):"outOfBrush"}:function(L){return YS(A,C,D,L)?(b.dataIndex.push(D.getRawIndex(L)),"inBrush"):"outOfBrush"};(m(S)?d:y(C))&&pz(US,p,D,I)})}),yz(e,i,n,a,r)});function yz(t,e,r,a,i){if(!!i){var n=t.getZr();if(!n[Hg]){n[Gg]||(n[Gg]=_z);var o=ko(n,Gg,r,e);o(t,a)}}}function _z(t,e){if(!t.isDisposed()){var r=t.getZr();r[Hg]=!0,t.dispatchAction({type:"brushSelect",batch:e}),r[Hg]=!1}}function YS(t,e,r,a){for(var i=0,n=e.length;i<n;i++){var o=e[i];if(t[o.brushType](a,r,o.selectors,o))return!0}}function XS(t){var e=t.brushSelector;if(_t(e)){var r=[];return T(Vg,function(i,n){r[n]=function(o,s,l,u){var h=s.getItemLayout(o);return i[e](h,l,u)}}),r}else if($t(e)){var a={};return T(Vg,function(i,n){a[n]=e}),a}return e}function xz(t,e){var r=t.option.seriesIndex;return r!=null&&r!=="all"&&(P(r)?ut(r,e)<0:e!==r)}function wz(t){var e=t.selectors={};return T(Vg[t.brushType],function(r,a){e[a]=function(i){return r(i,e,t)}}),t}var bz={lineX:Kt,lineY:Kt,rect:function(t){return qS(t.range)},polygon:function(t){for(var e,r=t.range,a=0,i=r.length;a<i;a++){e=e||[[1/0,-1/0],[1/0,-1/0]];var n=r[a];n[0]<e[0][0]&&(e[0][0]=n[0]),n[0]>e[0][1]&&(e[0][1]=n[0]),n[1]<e[1][0]&&(e[1][0]=n[1]),n[1]>e[1][1]&&(e[1][1]=n[1])}return e&&qS(e)}};function qS(t){return new it(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var Sz=["#ddd"],u5=Me({type:"brush",dependencies:["geo","grid","xAxis","yAxis","parallel","series"],defaultOption:{toolbox:null,brushLink:null,seriesIndex:"all",geoIndex:null,xAxisIndex:null,yAxisIndex:null,brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(120,140,180,0.3)",borderColor:"rgba(120,140,180,0.8)"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},areas:[],brushType:null,brushOption:{},coordInfoList:[],optionUpdated:function(t,e){var r=this.option;!e&&FS(r,t,["inBrush","outOfBrush"]);var a=r.inBrush=r.inBrush||{};r.outOfBrush=r.outOfBrush||{color:Sz},a.hasOwnProperty("liftZ")||(a.liftZ=5)},setAreas:function(t){z&&(ot(P(t)),T(t,function(e){ot(e.brushType,"Illegal areas")})),t&&(this.areas=E(t,function(e){return KS(this.option,e)},this))},setBrushOption:function(t){this.brushOption=KS(this.option,t),this.brushType=this.brushOption.brushType}});function KS(t,e){return J({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new ht(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}Xt({type:"brush",init:function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new Rn(e.getZr())).on("brush",X(this._onBrush,this)).mount()},render:function(t){return this.model=t,Fg.apply(this,arguments)},updateTransform:function(t,e){return ZS(e),Fg.apply(this,arguments)},updateView:Fg,dispose:function(){this._brushController.dispose()},_onBrush:function(t,e){var r=this.model.id;this.model.brushTargetManager.setOutputRanges(t,this.ecModel),(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:r,areas:Y(t),$from:r}),e.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:r,areas:Y(t),$from:r})}});function Fg(t,e,r,a){(!a||a.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(r)).enableBrush(t.brushOption).updateCovers(t.areas.slice())}lt({type:"brush",event:"brush"},function(t,e){e.eachComponent({mainType:"brush",query:t},function(r){r.setAreas(t.areas)})}),lt({type:"brushSelect",event:"brushSelected",update:"none"},function(){}),lt({type:"brushEnd",event:"brushEnd",update:"none"},function(){});var Az=Fr.toolbox.brush;function Wg(t,e,r){this.model=t,this.ecModel=e,this.api=r,this._brushType,this._brushMode}Wg.defaultOption={show:!0,type:["rect","polygon","lineX","lineY","keep","clear"],icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:Y(Az.title)};var yh=Wg.prototype;yh.render=yh.updateView=function(t,e,r){var a,i,n;e.eachComponent({mainType:"brush"},function(o){a=o.brushType,i=o.brushOption.brushMode||"single",n|=o.areas.length}),this._brushType=a,this._brushMode=i,T(t.get("type",!0),function(o){t.setIconStatus(o,(o==="keep"?i==="multiple":o==="clear"?n:o===a)?"emphasis":"normal")})},yh.getIcons=function(){var t=this.model,e=t.get("icon",!0),r={};return T(t.get("type",!0),function(a){e[a]&&(r[a]=e[a])}),r},yh.onclick=function(t,e,r){var a=this._brushType,i=this._brushMode;r==="clear"?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:r==="keep"?a:a===r?!1:r,brushMode:r==="keep"?i==="multiple"?"single":"multiple":i}})},Nn("brush",Wg),ie(dz),Me({type:"title",layoutMode:{type:"box",ignoreSize:!0},defaultOption:{zlevel:0,z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bolder",color:"#333"},subtextStyle:{color:"#aaa"}}}),Xt({type:"title",render:function(t,e,r){if(this.group.removeAll(),!!t.get("show")){var a=this.group,i=t.getModel("textStyle"),n=t.getModel("subtextStyle"),o=t.get("textAlign"),s=Nt(t.get("textBaseline"),t.get("textVerticalAlign")),l=new nt({style:Rt({},i,{text:t.get("text"),textFill:i.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),h=t.get("subtext"),f=new nt({style:Rt({},n,{text:h,textFill:n.getTextColor(),y:u.height+t.get("itemGap"),textVerticalAlign:"top"},{disableBox:!0}),z2:10}),c=t.get("link"),v=t.get("sublink"),d=t.get("triggerEvent",!0);l.silent=!c&&!d,f.silent=!v&&!d,c&&l.on("click",function(){To(c,"_"+t.get("target"))}),v&&f.on("click",function(){To(c,"_"+t.get("subtarget"))}),l.eventData=f.eventData=d?{componentType:"title",componentIndex:t.componentIndex}:null,a.add(l),h&&a.add(f);var g=a.getBoundingRect(),p=t.getBoxLayoutParams();p.width=g.width,p.height=g.height;var m=Ot(p,{width:r.getWidth(),height:r.getHeight()},t.get("padding"));o||(o=t.get("left")||t.get("right"),o==="middle"&&(o="center"),o==="right"?m.x+=m.width:o==="center"&&(m.x+=m.width/2)),s||(s=t.get("top")||t.get("bottom"),s==="center"&&(s="middle"),s==="bottom"?m.y+=m.height:s==="middle"&&(m.y+=m.height/2),s=s||"top"),a.attr("position",[m.x,m.y]);var y={textAlign:o,textVerticalAlign:s};l.setStyle(y),f.setStyle(y),g=a.getBoundingRect();var _=m.margin,x=t.getItemStyle(["color","opacity"]);x.fill=t.get("backgroundColor");var w=new ft({shape:{x:g.x-_[3],y:g.y-_[0],width:g.width+_[1]+_[3],height:g.height+_[0]+_[2],r:t.get("borderRadius")},style:x,subPixelOptimize:!0,silent:!0});a.add(w)}}});var Tz=function(t){var e=t&&t.timeline;P(e)||(e=e?[e]:[]),T(e,function(r){!r||Cz(r)})};function Cz(t){var e=t.type,r={number:"value",time:"time"};if(r[e]&&(t.axisType=r[e],delete t.type),QS(t),Di(t,"controlPosition")){var a=t.controlStyle||(t.controlStyle={});Di(a,"position")||(a.position=t.controlPosition),a.position==="none"&&!Di(a,"show")&&(a.show=!1,delete a.position),delete t.controlPosition}T(t.data||[],function(i){Q(i)&&!P(i)&&(!Di(i,"value")&&Di(i,"name")&&(i.value=i.name),QS(i))})}function QS(t){var e=t.itemStyle||(t.itemStyle={}),r=e.emphasis||(e.emphasis={}),a=t.label||t.label||{},i=a.normal||(a.normal={}),n={normal:1,emphasis:1};T(a,function(o,s){!n[s]&&!Di(i,s)&&(i[s]=o)}),r.label&&!Di(a,"emphasis")&&(a.emphasis=r.label,delete r.label)}function Di(t,e){return t.hasOwnProperty(e)}ct.registerSubTypeDefaulter("timeline",function(){return"slider"}),lt({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(t,e){var r=e.getComponent("timeline");return r&&t.currentIndex!=null&&(r.setCurrentIndex(t.currentIndex),!r.get("loop",!0)&&r.isIndexMax()&&r.setPlayState(!1)),e.resetOption("timeline"),U({currentIndex:r.option.currentIndex},t)}),lt({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(t,e){var r=e.getComponent("timeline");r&&t.playState!=null&&r.setPlayState(t.playState)});var JS=ct.extend({type:"timeline",layoutMode:"box",defaultOption:{zlevel:0,z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},init:function(t,e,r){this._data,this._names,this.mergeDefaultAndTheme(t,r),this._initData()},mergeOption:function(t){JS.superApply(this,"mergeOption",arguments),this._initData()},setCurrentIndex:function(t){t==null&&(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},getCurrentIndex:function(){return this.option.currentIndex},isIndexMax:function(){return this.getCurrentIndex()>=this._data.count()-1},setPlayState:function(t){this.option.autoPlay=!!t},getPlayState:function(){return!!this.option.autoPlay},_initData:function(){var t=this.option,e=t.data||[],r=t.axisType,a=this._names=[];if(r==="category"){var i=[];T(e,function(s,l){var u=so(s),h;Q(s)?(h=Y(s),h.value=l):h=l,i.push(h),!_t(u)&&(u==null||isNaN(u))&&(u=""),a.push(u+"")}),e=i}var n={category:"ordinal",time:"time"}[r]||"number",o=this._data=new qt([{name:"value",type:n}],this);o.initData(e,a)},getData:function(){return this._data},getCategories:function(){if(this.get("axisType")==="category")return this._names.slice()}}),Dz=JS.extend({type:"timeline.slider",defaultOption:{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"emptyCircle",symbolSize:10,lineStyle:{show:!0,width:2,color:"#304654"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#304654"},itemStyle:{color:"#304654",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:13,color:"#c23531",borderWidth:5,borderColor:"rgba(194,53,49, 0.5)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:22,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"path://M18.6,50.8l22.5-22.5c0.2-0.2,0.3-0.4,0.3-0.7c0-0.3-0.1-0.5-0.3-0.7L18.7,4.4c-0.1-0.1-0.2-0.3-0.2-0.5 c0-0.4,0.3-0.8,0.8-0.8c0.2,0,0.5,0.1,0.6,0.3l23.5,23.5l0,0c0.2,0.2,0.3,0.4,0.3,0.7c0,0.3-0.1,0.5-0.3,0.7l-0.1,0.1L19.7,52 c-0.1,0.1-0.3,0.2-0.5,0.2c-0.4,0-0.8-0.3-0.8-0.8C18.4,51.2,18.5,51,18.6,50.8z",prevIcon:"path://M43,52.8L20.4,30.3c-0.2-0.2-0.3-0.4-0.3-0.7c0-0.3,0.1-0.5,0.3-0.7L42.9,6.4c0.1-0.1,0.2-0.3,0.2-0.5 c0-0.4-0.3-0.8-0.8-0.8c-0.2,0-0.5,0.1-0.6,0.3L18.3,28.8l0,0c-0.2,0.2-0.3,0.4-0.3,0.7c0,0.3,0.1,0.5,0.3,0.7l0.1,0.1L41.9,54 c0.1,0.1,0.3,0.2,0.5,0.2c0.4,0,0.8-0.3,0.8-0.8C43.2,53.2,43.1,53,43,52.8z",color:"#304654",borderColor:"#304654",borderWidth:1},emphasis:{label:{show:!0,color:"#c23531"},itemStyle:{color:"#c23531"},controlStyle:{color:"#c23531",borderColor:"#c23531",borderWidth:2}},data:[]}});pt(Dz,Jc);var Iz=wr.extend({type:"timeline"}),_h=function(t,e,r,a){Vt.call(this,t,e,r),this.type=a||"value",this.model=null};_h.prototype={constructor:_h,getLabelModel:function(){return this.model.getModel("label")},isHorizontal:function(){return this.model.get("orient")==="horizontal"}},yt(_h,Vt);var Ra=X,Ug=T,$g=Math.PI;Iz.extend({type:"timeline.slider",init:function(t,e){this.api=e,this._axis,this._viewRect,this._timer,this._currentPointer,this._mainGroup,this._labelGroup},render:function(t,e,r,a){if(this.model=t,this.api=r,this.ecModel=e,this.group.removeAll(),t.get("show",!0)){var i=this._layout(t,r),n=this._createGroup("mainGroup"),o=this._createGroup("labelGroup"),s=this._axis=this._createAxis(i,t);t.formatTooltip=function(l){return Tt(s.scale.getLabel(l))},Ug(["AxisLine","AxisTick","Control","CurrentPointer"],function(l){this["_render"+l](i,n,s,t)},this),this._renderAxisLabel(i,o,s,t),this._position(i,t)}this._doPlayStop()},remove:function(){this._clearTimer(),this.group.removeAll()},dispose:function(){this._clearTimer()},_layout:function(t,e){var r=t.get("label.position"),a=t.get("orient"),i=Mz(t,e);r==null||r==="auto"?r=a==="horizontal"?i.y+i.height/2<e.getHeight()/2?"-":"+":i.x+i.width/2<e.getWidth()/2?"+":"-":isNaN(r)&&(r={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[a][r]);var n={horizontal:"center",vertical:r>=0||r==="+"?"left":"right"},o={horizontal:r>=0||r==="+"?"top":"bottom",vertical:"middle"},s={horizontal:0,vertical:$g/2},l=a==="vertical"?i.height:i.width,u=t.getModel("controlStyle"),h=u.get("show",!0),f=h?u.get("itemSize"):0,c=h?u.get("itemGap"):0,v=f+c,d=t.get("label.rotate")||0;d=d*$g/180;var g,p,m,y,_=u.get("position",!0),x=h&&u.get("showPlayBtn",!0),w=h&&u.get("showPrevBtn",!0),S=h&&u.get("showNextBtn",!0),b=0,A=l;return _==="left"||_==="bottom"?(x&&(g=[0,0],b+=v),w&&(p=[b,0],b+=v),S&&(m=[A-f,0],A-=v)):(x&&(g=[A-f,0],A-=v),w&&(p=[0,0],b+=v),S&&(m=[A-f,0],A-=v)),y=[b,A],t.get("inverse")&&y.reverse(),{viewRect:i,mainLength:l,orient:a,rotation:s[a],labelRotation:d,labelPosOpt:r,labelAlign:t.get("label.align")||n[a],labelBaseline:t.get("label.verticalAlign")||t.get("label.baseline")||o[a],playPosition:g,prevBtnPosition:p,nextBtnPosition:m,axisExtent:y,controlSize:f,controlGap:c}},_position:function(t,e){var r=this._mainGroup,a=this._labelGroup,i=t.viewRect;if(t.orient==="vertical"){var n=ce(),o=i.x,s=i.y+i.height;Je(n,n,[-o,-s]),Or(n,n,-$g/2),Je(n,n,[o,s]),i=i.clone(),i.applyTransform(n)}var l=p(i),u=p(r.getBoundingRect()),h=p(a.getBoundingRect()),f=r.position,c=a.position;c[0]=f[0]=l[0][0];var v=t.labelPosOpt;if(isNaN(v)){var d=v==="+"?0:1;m(f,u,l,1,d),m(c,h,l,1,1-d)}else{var d=v>=0?0:1;m(f,u,l,1,d),c[1]=f[1]+v}r.attr("position",f),a.attr("position",c),r.rotation=a.rotation=t.rotation,g(r),g(a);function g(y){var _=y.position;y.origin=[l[0][0]-_[0],l[1][0]-_[1]]}function p(y){return[[y.x,y.x+y.width],[y.y,y.y+y.height]]}function m(y,_,x,w,S){y[w]+=x[w][S]-_[w][S]}},_createAxis:function(t,e){var r=e.getData(),a=e.get("axisType"),i=dn(e,a);i.getTicks=function(){return r.mapArray(["value"],function(s){return s})};var n=r.getDataExtent("value");i.setExtent(n[0],n[1]),i.niceTicks();var o=new _h("value",i,t.axisExtent,a);return o.model=e,o},_createGroup:function(t){var e=this["_"+t]=new G;return this.group.add(e),e},_renderAxisLine:function(t,e,r,a){var i=r.getExtent();!a.get("lineStyle.show")||e.add(new ee({shape:{x1:i[0],y1:0,x2:i[1],y2:0},style:Z({lineCap:"round"},a.getModel("lineStyle").getLineStyle()),silent:!0,z2:1}))},_renderAxisTick:function(t,e,r,a){var i=a.getData(),n=r.scale.getTicks();Ug(n,function(o){var s=r.dataToCoord(o),l=i.getItemModel(o),u=l.getModel("itemStyle"),h=l.getModel("emphasis.itemStyle"),f={position:[s,0],onclick:Ra(this._changeTimeline,this,o)},c=jS(l,u,e,f);St(c,h.getItemStyle()),l.get("tooltip")?(c.dataIndex=o,c.dataModel=a):c.dataIndex=c.dataModel=null},this)},_renderAxisLabel:function(t,e,r,a){var i=r.getLabelModel();if(!!i.get("show")){var n=a.getData(),o=r.getViewLabels();Ug(o,function(s){var l=s.tickValue,u=n.getItemModel(l),h=u.getModel("label"),f=u.getModel("emphasis.label"),c=r.dataToCoord(s.tickValue),v=new nt({position:[c,0],rotation:t.labelRotation-t.rotation,onclick:Ra(this._changeTimeline,this,l),silent:!1});Rt(v.style,h,{text:s.formattedLabel,textAlign:t.labelAlign,textVerticalAlign:t.labelBaseline}),e.add(v),St(v,Rt({},f))},this)}},_renderControl:function(t,e,r,a){var i=t.controlSize,n=t.rotation,o=a.getModel("controlStyle").getItemStyle(),s=a.getModel("emphasis.controlStyle").getItemStyle(),l=[0,-i/2,i,i],u=a.getPlayState(),h=a.get("inverse",!0);f(t.nextBtnPosition,"controlStyle.nextIcon",Ra(this._changeTimeline,this,h?"-":"+")),f(t.prevBtnPosition,"controlStyle.prevIcon",Ra(this._changeTimeline,this,h?"+":"-")),f(t.playPosition,"controlStyle."+(u?"stopIcon":"playIcon"),Ra(this._handlePlayClick,this,!u),!0);function f(c,v,d,g){if(!!c){var p={position:c,origin:[i/2,0],rotation:g?-n:0,rectHover:!0,style:o,onclick:d},m=Lz(a,v,l,p);e.add(m),St(m,s)}}},_renderCurrentPointer:function(t,e,r,a){var i=a.getData(),n=a.getCurrentIndex(),o=i.getItemModel(n).getModel("checkpointStyle"),s=this,l={onCreate:function(u){u.draggable=!0,u.drift=Ra(s._handlePointerDrag,s),u.ondragend=Ra(s._handlePointerDragend,s),tA(u,n,r,a,!0)},onUpdate:function(u){tA(u,n,r,a)}};this._currentPointer=jS(o,o,this._mainGroup,{},this._currentPointer,l)},_handlePlayClick:function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},_handlePointerDrag:function(t,e,r){this._clearTimer(),this._pointerChangeTimeline([r.offsetX,r.offsetY])},_handlePointerDragend:function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},_pointerChangeTimeline:function(t,e){var r=this._toAxisCoord(t)[0],a=this._axis,i=Ja(a.getExtent().slice());r>i[1]&&(r=i[1]),r<i[0]&&(r=i[0]),this._currentPointer.position[0]=r,this._currentPointer.dirty();var n=this._findNearestTick(r),o=this.model;(e||n!==o.getCurrentIndex()&&o.get("realtime"))&&this._changeTimeline(n)},_doPlayStop:function(){this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(Ra(t,this),this.model.get("playInterval")));function t(){var e=this.model;this._changeTimeline(e.getCurrentIndex()+(e.get("rewind",!0)?-1:1))}},_toAxisCoord:function(t){var e=this._mainGroup.getLocalTransform();return xr(t,e,!0)},_findNearestTick:function(t){var e=this.model.getData(),r=1/0,a,i=this._axis;return e.each(["value"],function(n,o){var s=i.dataToCoord(n),l=Math.abs(s-t);l<r&&(r=l,a=o)}),a},_clearTimer:function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},_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})}});function Mz(t,e){return Ot(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},t.get("padding"))}function Lz(t,e,r,a){var i=po(t.get(e).replace(/^path:\/\//,""),Y(a||{}),new it(r[0],r[1],r[2],r[3]),"center");return i}function jS(t,e,r,a,i,n){var o=e.get("color");if(i)i.setColor(o),r.add(i),n&&n.onUpdate(i);else{var s=t.get("symbol");i=Le(s,-1,-1,2,2,o),i.setStyle("strokeNoScale",!0),r.add(i),n&&n.onCreate(i)}var l=e.getItemStyle(["color","symbol","symbolSize"]);i.setStyle(l),a=J({rectHover:!0,z2:100},a,!0);var u=t.get("symbolSize");u=u instanceof Array?u.slice():[+u,+u],u[0]/=2,u[1]/=2,a.scale=u;var h=t.get("symbolOffset");if(h){var f=a.position=a.position||[0,0];f[0]+=R(h[0],u[0]),f[1]+=R(h[1],u[1])}var c=t.get("symbolRotate");return a.rotation=(c||0)*Math.PI/180||0,i.attr(a),i.updateTransform(),i}function tA(t,e,r,a,i){if(!t.dragging){var n=a.getModel("checkpointStyle"),o=r.dataToCoord(a.getData().get(["value"],e));i||!n.get("animation",!0)?t.attr({position:[o,0]}):(t.stopAnimation(!0),t.animateTo({position:[o,0]},n.get("animationDuration",!0),n.get("animationEasing",!0)))}}ie(Tz);var eA=da,Zg=Tt;function xh(t){Ua(t,"label",["show"])}var wh=Me({type:"marker",dependencies:["series","grid","polar","geo"],init:function(t,e,r){if(z&&this.type==="marker")throw new Error("Marker component is abstract component. Use markLine, markPoint, markArea instead.");this.mergeDefaultAndTheme(t,r),this._mergeOption(t,r,!1,!0)},isAnimationEnabled:function(){if(at.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},mergeOption:function(t,e){this._mergeOption(t,e,!1,!1)},_mergeOption:function(t,e,r,a){var i=this.constructor,n=this.mainType+"Model";r||e.eachSeries(function(o){var s=o.get(this.mainType,!0),l=o[n];if(!s||!s.data){o[n]=null;return}l?l._mergeOption(s,e,!0):(a&&xh(s),T(s.data,function(u){u instanceof Array?(xh(u[0]),xh(u[1])):xh(u)}),l=new i(s,this,e),Z(l,{mainType:this.mainType,seriesIndex:o.seriesIndex,name:o.name,createdBySelf:!0}),l.__hostSeries=o),o[n]=l},this)},formatTooltip:function(t){var e=this.getData(),r=this.getRawValue(t),a=P(r)?E(r,eA).join(", "):eA(r),i=e.getName(t),n=Zg(this.name);return(r!=null||i)&&(n+="<br />"),i&&(n+=Zg(i),r!=null&&(n+=" : ")),r!=null&&(n+=Zg(a)),n},getData:function(){return this._data},setData:function(t){this._data=t}});pt(wh,Jc),wh.extend({type:"markPoint",defaultOption:{zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}}});var rA=ut;function Pz(t){return!(isNaN(parseFloat(t.x))&&isNaN(parseFloat(t.y)))}function Ez(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}function Yg(t,e,r,a,i,n){var o=[],s=Ur(e,a),l=s?e.getCalculationInfo("stackResultDimension"):a,u=Kg(e,l,t),h=e.indicesOfNearest(l,u)[0];o[i]=e.get(r,h),o[n]=e.get(l,h);var f=e.get(a,h),c=W0(e.get(a,h));return c=Math.min(c,20),c>=0&&(o[n]=+o[n].toFixed(c)),[o,f]}var Xg=K,qg={min:Xg(Yg,"min"),max:Xg(Yg,"max"),average:Xg(Yg,"average")};function Cs(t,e){var r=t.getData(),a=t.coordinateSystem;if(e&&!Ez(e)&&!P(e.coord)&&a){var i=a.dimensions,n=aA(e,r,a,t);if(e=Y(e),e.type&&qg[e.type]&&n.baseAxis&&n.valueAxis){var o=rA(i,n.baseAxis.dim),s=rA(i,n.valueAxis.dim),l=qg[e.type](r,n.baseDataDim,n.valueDataDim,o,s);e.coord=l[0],e.value=l[1]}else{for(var u=[e.xAxis!=null?e.xAxis:e.radiusAxis,e.yAxis!=null?e.yAxis:e.angleAxis],h=0;h<2;h++)qg[u[h]]&&(u[h]=Kg(r,r.mapDimension(i[h]),u[h]));e.coord=u}}return e}function aA(t,e,r,a){var i={};return t.valueIndex!=null||t.valueDim!=null?(i.valueDataDim=t.valueIndex!=null?e.getDimension(t.valueIndex):t.valueDim,i.valueAxis=r.getAxis(Rz(a,i.valueDataDim)),i.baseAxis=r.getOtherAxis(i.valueAxis),i.baseDataDim=e.mapDimension(i.baseAxis.dim)):(i.baseAxis=a.getBaseAxis(),i.valueAxis=r.getOtherAxis(i.baseAxis),i.baseDataDim=e.mapDimension(i.baseAxis.dim),i.valueDataDim=e.mapDimension(i.valueAxis.dim)),i}function Rz(t,e){var r=t.getData(),a=r.dimensions;e=r.getDimension(e);for(var i=0;i<a.length;i++){var n=r.getDimensionInfo(a[i]);if(n.name===e)return n.coordDim}}function Ds(t,e){return t&&t.containData&&e.coord&&!Pz(e)?t.containData(e.coord):!0}function iA(t,e,r,a){return a<2?t.coord&&t.coord[a]:t.value}function Kg(t,e,r){if(r==="average"){var a=0,i=0;return t.each(e,function(n,o){isNaN(n)||(a+=n,i++)}),a/i}else return r==="median"?t.getMedian(e):t.getDataExtent(e,!0)[r==="max"?1:0]}var Qg=Xt({type:"marker",init:function(){this.markerGroupMap=j()},render:function(t,e,r){var a=this.markerGroupMap;a.each(function(n){n.__keep=!1});var i=this.type+"Model";e.eachSeries(function(n){var o=n[i];o&&this.renderSeries(n,o,e,r)},this),a.each(function(n){!n.__keep&&this.group.remove(n.group)},this)},renderSeries:function(){}});function nA(t,e,r){var a=e.coordinateSystem;t.each(function(i){var n=t.getItemModel(i),o,s=R(n.get("x"),r.getWidth()),l=R(n.get("y"),r.getHeight());if(!isNaN(s)&&!isNaN(l))o=[s,l];else if(e.getMarkerPosition)o=e.getMarkerPosition(t.getValues(t.dimensions,i));else if(a){var u=t.get(a.dimensions[0],i),h=t.get(a.dimensions[1],i);o=a.dataToPoint([u,h])}isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),t.setItemLayout(i,o)})}Qg.extend({type:"markPoint",updateTransform:function(t,e,r){e.eachSeries(function(a){var i=a.markPointModel;i&&(nA(i.getData(),a,r),this.markerGroupMap.get(a.id).updateLayout(i))},this)},renderSeries:function(t,e,r,a){var i=t.coordinateSystem,n=t.id,o=t.getData(),s=this.markerGroupMap,l=s.get(n)||s.set(n,new gn),u=kz(i,t,e);e.setData(u),nA(e.getData(),t,a),u.each(function(h){var f=u.getItemModel(h),c=f.getShallow("symbol"),v=f.getShallow("symbolSize"),d=$t(c),g=$t(v);if(d||g){var p=e.getRawValue(h),m=e.getDataParams(h);d&&(c=c(p,m)),g&&(v=v(p,m))}u.setItemVisual(h,{symbol:c,symbolSize:v,color:f.get("itemStyle.color")||o.getVisual("color")})}),l.updateData(u),this.group.add(l.group),u.eachItemGraphicEl(function(h){h.traverse(function(f){f.dataModel=e})}),l.__keep=!0,l.group.silent=e.get("silent")||t.get("silent")}});function kz(t,e,r){var a;t?a=E(t&&t.dimensions,function(o){var s=e.getData().getDimensionInfo(e.getData().mapDimension(o))||{};return U({name:o},s)}):a=[{name:"value",type:"float"}];var i=new qt(a,r),n=E(r.get("data"),K(Cs,e));return t&&(n=Ht(n,K(Ds,t))),i.initData(n,null,t?iA:function(o){return o.value}),i}ie(function(t){t.markPoint=t.markPoint||{}}),wh.extend({type:"markLine",defaultOption:{zlevel:0,z:5,symbol:["circle","arrow"],symbolSize:[8,16],precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"}});var Nz=function(t,e,r,a){var i=t.getData(),n=a.type;if(!P(a)&&(n==="min"||n==="max"||n==="average"||n==="median"||a.xAxis!=null||a.yAxis!=null)){var o,s;if(a.yAxis!=null||a.xAxis!=null)o=e.getAxis(a.yAxis!=null?"y":"x"),s=Et(a.yAxis,a.xAxis);else{var l=aA(a,i,e,t);o=l.valueAxis;var u=Uo(i,l.valueDataDim);s=Kg(i,u,n)}var h=o.dim==="x"?0:1,f=1-h,c=Y(a),v={};c.type=null,c.coord=[],v.coord=[],c.coord[f]=-1/0,v.coord[f]=1/0;var d=r.get("precision");d>=0&&typeof s=="number"&&(s=+s.toFixed(Math.min(d,20))),c.coord[h]=v.coord[h]=s,a=[c,v,{type:n,valueIndex:a.valueIndex,value:s}]}return a=[Cs(t,a[0]),Cs(t,a[1]),Z({},a[2])],a[2].type=a[2].type||"",J(a[2],a[0]),J(a[2],a[1]),a};function bh(t){return!isNaN(t)&&!isFinite(t)}function oA(t,e,r,a){var i=1-t,n=a.dimensions[t];return bh(e[i])&&bh(r[i])&&e[t]===r[t]&&a.getAxis(n).containData(e[t])}function Oz(t,e){if(t.type==="cartesian2d"){var r=e[0].coord,a=e[1].coord;if(r&&a&&(oA(1,r,a,t)||oA(0,r,a,t)))return!0}return Ds(t,e[0])&&Ds(t,e[1])}function Jg(t,e,r,a,i){var n=a.coordinateSystem,o=t.getItemModel(e),s,l=R(o.get("x"),i.getWidth()),u=R(o.get("y"),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(a.getMarkerPosition)s=a.getMarkerPosition(t.getValues(t.dimensions,e));else{var h=n.dimensions,f=t.get(h[0],e),c=t.get(h[1],e);s=n.dataToPoint([f,c])}if(n.type==="cartesian2d"){var v=n.getAxis("x"),d=n.getAxis("y"),h=n.dimensions;bh(t.get(h[0],e))?s[0]=v.toGlobalCoord(v.getExtent()[r?0:1]):bh(t.get(h[1],e))&&(s[1]=d.toGlobalCoord(d.getExtent()[r?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}t.setItemLayout(e,s)}Qg.extend({type:"markLine",updateTransform:function(t,e,r){e.eachSeries(function(a){var i=a.markLineModel;if(i){var n=i.getData(),o=i.__from,s=i.__to;o.each(function(l){Jg(o,l,!0,a,r),Jg(s,l,!1,a,r)}),n.each(function(l){n.setItemLayout(l,[o.getItemLayout(l),s.getItemLayout(l)])}),this.markerGroupMap.get(a.id).updateLayout()}},this)},renderSeries:function(t,e,r,a){var i=t.coordinateSystem,n=t.id,o=t.getData(),s=this.markerGroupMap,l=s.get(n)||s.set(n,new Vu);this.group.add(l.group);var u=zz(i,t,e),h=u.from,f=u.to,c=u.line;e.__from=h,e.__to=f,e.setData(c);var v=e.get("symbol"),d=e.get("symbolSize");P(v)||(v=[v,v]),typeof d=="number"&&(d=[d,d]),u.from.each(function(p){g(h,p,!0),g(f,p,!1)}),c.each(function(p){var m=c.getItemModel(p).get("lineStyle.color");c.setItemVisual(p,{color:m||h.getItemVisual(p,"color")}),c.setItemLayout(p,[h.getItemLayout(p),f.getItemLayout(p)]),c.setItemVisual(p,{fromSymbolSize:h.getItemVisual(p,"symbolSize"),fromSymbol:h.getItemVisual(p,"symbol"),toSymbolSize:f.getItemVisual(p,"symbolSize"),toSymbol:f.getItemVisual(p,"symbol")})}),l.updateData(c),u.line.eachItemGraphicEl(function(p,m){p.traverse(function(y){y.dataModel=e})});function g(p,m,y){var _=p.getItemModel(m);Jg(p,m,y,t,a),p.setItemVisual(m,{symbolSize:_.get("symbolSize")||d[y?0:1],symbol:_.get("symbol",!0)||v[y?0:1],color:_.get("itemStyle.color")||o.getVisual("color")})}l.__keep=!0,l.group.silent=e.get("silent")||t.get("silent")}});function zz(t,e,r){var a;t?a=E(t&&t.dimensions,function(u){var h=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return U({name:u},h)}):a=[{name:"value",type:"float"}];var i=new qt(a,r),n=new qt(a,r),o=new qt([],r),s=E(r.get("data"),K(Nz,e,t,r));t&&(s=Ht(s,K(Oz,t)));var l=t?iA:function(u){return u.value};return i.initData(E(s,function(u){return u[0]}),null,l),n.initData(E(s,function(u){return u[1]}),null,l),o.initData(E(s,function(u){return u[2]})),o.hasItemOption=!0,{from:i,to:n,line:o}}ie(function(t){t.markLine=t.markLine||{}}),wh.extend({type:"markArea",defaultOption:{zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}}});var Bz=function(t,e,r,a){var i=Cs(t,a[0]),n=Cs(t,a[1]),o=Et,s=i.coord,l=n.coord;s[0]=o(s[0],-1/0),s[1]=o(s[1],-1/0),l[0]=o(l[0],1/0),l[1]=o(l[1],1/0);var u=Yn([{},i,n]);return u.coord=[i.coord,n.coord],u.x0=i.x,u.y0=i.y,u.x1=n.x,u.y1=n.y,u};function Sh(t){return!isNaN(t)&&!isFinite(t)}function sA(t,e,r,a){var i=1-t;return Sh(e[i])&&Sh(r[i])}function Vz(t,e){var r=e.coord[0],a=e.coord[1];return t.type==="cartesian2d"&&r&&a&&(sA(1,r,a,t)||sA(0,r,a,t))?!0:Ds(t,{coord:r,x:e.x0,y:e.y0})||Ds(t,{coord:a,x:e.x1,y:e.y1})}function lA(t,e,r,a,i){var n=a.coordinateSystem,o=t.getItemModel(e),s,l=R(o.get(r[0]),i.getWidth()),u=R(o.get(r[1]),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(a.getMarkerPosition)s=a.getMarkerPosition(t.getValues(r,e));else{var h=t.get(r[0],e),f=t.get(r[1],e),c=[h,f];n.clampData&&n.clampData(c,c),s=n.dataToPoint(c,!0)}if(n.type==="cartesian2d"){var v=n.getAxis("x"),d=n.getAxis("y"),h=t.get(r[0],e),f=t.get(r[1],e);Sh(h)?s[0]=v.toGlobalCoord(v.getExtent()[r[0]==="x0"?0:1]):Sh(f)&&(s[1]=d.toGlobalCoord(d.getExtent()[r[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var uA=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];Qg.extend({type:"markArea",updateTransform:function(t,e,r){e.eachSeries(function(a){var i=a.markAreaModel;if(i){var n=i.getData();n.each(function(o){var s=E(uA,function(u){return lA(n,o,u,a,r)});n.setItemLayout(o,s);var l=n.getItemGraphicEl(o);l.setShape("points",s)})}},this)},renderSeries:function(t,e,r,a){var i=t.coordinateSystem,n=t.id,o=t.getData(),s=this.markerGroupMap,l=s.get(n)||s.set(n,{group:new G});this.group.add(l.group),l.__keep=!0;var u=Gz(i,t,e);e.setData(u),u.each(function(h){u.setItemLayout(h,E(uA,function(f){return lA(u,h,f,t,a)})),u.setItemVisual(h,{color:o.getVisual("color")})}),u.diff(l.__data).add(function(h){var f=new Se({shape:{points:u.getItemLayout(h)}});u.setItemGraphicEl(h,f),l.group.add(f)}).update(function(h,f){var c=l.__data.getItemGraphicEl(f);tt(c,{shape:{points:u.getItemLayout(h)}},e,h),l.group.add(c),u.setItemGraphicEl(h,c)}).remove(function(h){var f=l.__data.getItemGraphicEl(h);l.group.remove(f)}).execute(),u.eachItemGraphicEl(function(h,f){var c=u.getItemModel(f),v=c.getModel("label"),d=c.getModel("emphasis.label"),g=u.getItemVisual(f,"color");h.useStyle(U(c.getModel("itemStyle").getItemStyle(),{fill:Xs(g,.4),stroke:g})),h.hoverStyle=c.getModel("emphasis.itemStyle").getItemStyle(),Te(h.style,h.hoverStyle,v,d,{labelFetcher:e,labelDataIndex:f,defaultText:u.getName(f)||"",isRectText:!0,autoColor:g}),St(h,{}),h.dataModel=e}),l.__data=u,l.group.silent=e.get("silent")||t.get("silent")}});function Gz(t,e,r){var a,i,n=["x0","y0","x1","y1"];t?(a=E(t&&t.dimensions,function(l){var u=e.getData(),h=u.getDimensionInfo(u.mapDimension(l))||{};return U({name:l},h)}),i=new qt(E(n,function(l,u){return{name:l,type:a[u%2].type}}),r)):(a=[{name:"value",type:"float"}],i=new qt(a,r));var o=E(r.get("data"),K(Bz,e,t,r));t&&(o=Ht(o,K(Vz,t)));var s=t?function(l,u,h,f){return l.coord[Math.floor(f/2)][f%2]}:function(l){return l.value};return i.initData(o,null,s),i.hasItemOption=!0,i}ie(function(t){t.markArea=t.markArea||{}});var hA=Fr.legend.selector,Hz={all:{type:"all",title:Y(hA.all)},inverse:{type:"inverse",title:Y(hA.inverse)}},fA=Me({type:"legend.plain",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(t,e,r){this.mergeDefaultAndTheme(t,r),t.selected=t.selected||{},this._updateSelector(t)},mergeOption:function(t){fA.superCall(this,"mergeOption",t),this._updateSelector(t)},_updateSelector:function(t){var e=t.selector;e===!0&&(e=t.selector=["all","inverse"]),P(e)&&T(e,function(r,a){_t(r)&&(r={type:r}),e[a]=J(r,Hz[r.type])})},optionUpdated:function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&this.get("selectedMode")==="single"){for(var e=!1,r=0;r<t.length;r++){var a=t[r].get("name");if(this.isSelected(a)){this.select(a),e=!0;break}}!e&&this.select(t[0].get("name"))}},_updateData:function(t){var e=[],r=[];t.eachRawSeries(function(n){var o=n.name;r.push(o);var s;if(n.legendVisualProvider){var l=n.legendVisualProvider,u=l.getAllNames();t.isSeriesFiltered(n)||(r=r.concat(u)),u.length?e=e.concat(u):s=!0}else s=!0;s&&nc(n)&&e.push(n.name)}),this._availableNames=r;var a=this.get("data")||e,i=E(a,function(n){return(typeof n=="string"||typeof n=="number")&&(n={name:n}),new ht(n,this,this.ecModel)},this);this._data=i},getData:function(){return this._data},select:function(t){var e=this.option.selected,r=this.get("selectedMode");if(r==="single"){var a=this._data;T(a,function(i){e[i.get("name")]=!1})}e[t]=!0},unSelect:function(t){this.get("selectedMode")!=="single"&&(this.option.selected[t]=!1)},toggleSelected:function(t){var e=this.option.selected;e.hasOwnProperty(t)||(e[t]=!0),this[e[t]?"unSelect":"select"](t)},allSelect:function(){var t=this._data,e=this.option.selected;T(t,function(r){e[r.get("name",!0)]=!0})},inverseSelect:function(){var t=this._data,e=this.option.selected;T(t,function(r){var a=r.get("name",!0);e.hasOwnProperty(a)||(e[a]=!0),e[a]=!e[a]})},isSelected:function(t){var e=this.option.selected;return!(e.hasOwnProperty(t)&&!e[t])&&ut(this._availableNames,t)>=0},getOrient:function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},defaultOption:{zlevel:0,z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",itemStyle:{borderWidth:0},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:" sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}}});function Is(t,e,r){var a={},i=t==="toggleSelected",n;return r.eachComponent("legend",function(o){i&&n!=null?o[n?"select":"unSelect"](e.name):t==="allSelect"||t==="inverseSelect"?o[t]():(o[t](e.name),n=o.isSelected(e.name));var s=o.getData();T(s,function(l){var u=l.get("name");if(!(u===`
`||u==="")){var h=o.isSelected(u);a.hasOwnProperty(u)?a[u]=a[u]&&h:a[u]=h}})}),t==="allSelect"||t==="inverseSelect"?{selected:a}:{name:e.name,selected:a}}lt("legendToggleSelect","legendselectchanged",K(Is,"toggleSelected")),lt("legendAllSelect","legendselectall",K(Is,"allSelect")),lt("legendInverseSelect","legendinverseselect",K(Is,"inverseSelect")),lt("legendSelect","legendselected",K(Is,"select")),lt("legendUnSelect","legendunselected",K(Is,"unSelect"));var Vn=K,cA=T,Ah=G,Fz=Xt({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new Ah),this._backgroundEl,this.group.add(this._selectorGroup=new Ah),this._isFirstRender=!0},getContentGroup:function(){return this._contentGroup},getSelectorGroup:function(){return this._selectorGroup},render:function(t,e,r){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!t.get("show",!0)){var i=t.get("align"),n=t.get("orient");(!i||i==="auto")&&(i=t.get("left")==="right"&&n==="vertical"?"right":"left");var o=t.get("selector",!0),s=t.get("selectorPosition",!0);o&&(!s||s==="auto")&&(s=n==="horizontal"?"end":"start"),this.renderInner(i,t,e,r,o,n,s);var l=t.getBoxLayoutParams(),u={width:r.getWidth(),height:r.getHeight()},h=t.get("padding"),f=Ot(l,u,h),c=this.layoutInner(t,i,f,a,o,s),v=Ot(U({width:c.width,height:c.height},l),u,h);this.group.attr("position",[v.x-c.x,v.y-c.y]),this.group.add(this._backgroundEl=dS(c,t))}},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},renderInner:function(t,e,r,a,i,n,o){var s=this.getContentGroup(),l=j(),u=e.get("selectedMode"),h=[];r.eachRawSeries(function(f){!f.get("legendHoverLink")&&h.push(f.id)}),cA(e.getData(),function(f,c){var v=f.get("name");if(!this.newlineDisabled&&(v===""||v===`
`)){s.add(new Ah({newline:!0}));return}var d=r.getSeriesByName(v)[0];if(!l.get(v)){if(d){var g=d.getData(),p=g.getVisual("color"),m=g.getVisual("borderColor");typeof p=="function"&&(p=p(d.getDataParams(0))),typeof m=="function"&&(m=m(d.getDataParams(0)));var y=g.getVisual("legendSymbol")||"roundRect",_=g.getVisual("symbol"),x=this._createItem(v,c,f,e,y,_,t,p,m,u);x.on("click",Vn(dA,v,null,a,h)).on("mouseover",Vn(jg,d.name,null,a,h)).on("mouseout",Vn(tp,d.name,null,a,h)),l.set(v,!0)}else r.eachRawSeries(function(w){if(!l.get(v)&&w.legendVisualProvider){var S=w.legendVisualProvider;if(!S.containName(v))return;var b=S.indexOfName(v),A=S.getItemVisual(b,"color"),C=S.getItemVisual(b,"borderColor"),D="roundRect",I=this._createItem(v,c,f,e,D,null,t,A,C,u);I.on("click",Vn(dA,null,v,a,h)).on("mouseover",Vn(jg,null,v,a,h)).on("mouseout",Vn(tp,null,v,a,h)),l.set(v,!0)}},this);z&&(l.get(v)||console.warn(v+" series not exists. Legend data should be same with series name or data name."))}},this),i&&this._createSelector(i,e,a,n,o)},_createSelector:function(t,e,r,a,i){var n=this.getSelectorGroup();cA(t,function(s){o(s)});function o(s){var l=s.type,u=new nt({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){r.dispatchAction({type:l==="all"?"legendAllSelect":"legendInverseSelect"})}});n.add(u);var h=e.getModel("selectorLabel"),f=e.getModel("emphasis.selectorLabel");Te(u.style,u.hoverStyle={},h,f,{defaultText:s.title,isRectText:!1}),St(u)}},_createItem:function(t,e,r,a,i,n,o,s,l,u){var h=a.get("itemWidth"),f=a.get("itemHeight"),c=a.get("inactiveColor"),v=a.get("inactiveBorderColor"),d=a.get("symbolKeepAspect"),g=a.getModel("itemStyle"),p=a.isSelected(t),m=new Ah,y=r.getModel("textStyle"),_=r.get("icon"),x=r.getModel("tooltip"),w=x.parentModel;i=_||i;var S=Le(i,0,0,h,f,p?s:c,d??!0);if(m.add(vA(S,i,g,l,v,p)),!_&&n&&(n!==i||n==="none")){var b=f*.8;n==="none"&&(n="circle");var A=Le(n,(h-b)/2,(f-b)/2,b,b,p?s:c,d??!0);m.add(vA(A,n,g,l,v,p))}var C=o==="left"?h+5:-5,D=o,I=a.get("formatter"),L=t;typeof I=="string"&&I?L=I.replace("{name}",t??""):typeof I=="function"&&(L=I(t)),m.add(new nt({style:Rt({},y,{text:L,x:C,y:f/2,textFill:p?y.getTextColor():c,textAlign:D,textVerticalAlign:"middle"})}));var M=new ft({shape:m.getBoundingRect(),invisible:!0,tooltip:x.get("show")?Z({content:t,formatter:w.get("formatter",!0)||function(){return t},formatterParams:{componentType:"legend",legendIndex:a.componentIndex,name:t,$vars:["name"]}},x.option):null});return m.add(M),m.eachChild(function(B){B.silent=!0}),M.silent=!u,this.getContentGroup().add(m),St(m),m.__legendDataIndex=e,m},layoutInner:function(t,e,r,a,i,n){var o=this.getContentGroup(),s=this.getSelectorGroup();ei(t.get("orient"),o,t.get("itemGap"),r.width,r.height);var l=o.getBoundingRect(),u=[-l.x,-l.y];if(i){ei("horizontal",s,t.get("selectorItemGap",!0));var h=s.getBoundingRect(),f=[-h.x,-h.y],c=t.get("selectorButtonGap",!0),v=t.getOrient().index,d=v===0?"width":"height",g=v===0?"height":"width",p=v===0?"y":"x";n==="end"?f[v]+=l[d]+c:u[v]+=h[d]+c,f[1-v]+=l[g]/2-h[g]/2,s.attr("position",f),o.attr("position",u);var m={x:0,y:0};return m[d]=l[d]+c+h[d],m[g]=Math.max(l[g],h[g]),m[p]=Math.min(0,h[p]+f[1-v]),m}else return o.attr("position",u),this.group.getBoundingRect()},remove:function(){this.getContentGroup().removeAll(),this._isFirstRender=!0}});function vA(t,e,r,a,i,n){var o;return e!=="line"&&e.indexOf("empty")<0?(o=r.getItemStyle(),t.style.stroke=a,n||(o.stroke=i)):o=r.getItemStyle(["borderWidth","borderColor"]),t.setStyle(o)}function dA(t,e,r,a){tp(t,e,r,a),r.dispatchAction({type:"legendToggleSelect",name:t??e}),jg(t,e,r,a)}function jg(t,e,r,a){var i=r.getZr().storage.getDisplayList()[0];i&&i.useHoverLayer||r.dispatchAction({type:"highlight",seriesName:t,name:e,excludeSeriesId:a})}function tp(t,e,r,a){var i=r.getZr().storage.getDisplayList()[0];i&&i.useHoverLayer||r.dispatchAction({type:"downplay",seriesName:t,name:e,excludeSeriesId:a})}var Wz=function(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries(function(r){for(var a=0;a<e.length;a++)if(!e[a].isSelected(r.name))return!1;return!0})};Ie(br.PROCESSOR.SERIES_FILTER,Wz),ct.registerSubTypeDefaulter("legend",function(){return"plain"});var gA=fA.extend({type:"legend.scroll",setScrollDataIndex:function(t){this.option.scrollDataIndex=t},defaultOption:{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800},init:function(t,e,r,a){var i=rn(t);gA.superCall(this,"init",t,e,r,a),pA(this,t,i)},mergeOption:function(t,e){gA.superCall(this,"mergeOption",t,e),pA(this,this.option,t)}});function pA(t,e,r){var a=t.getOrient(),i=[1,1];i[a.index]=0,ga(e,r,{type:"box",ignoreSize:i})}var mA=G,ep=["width","height"],rp=["x","y"],ap=Fz.extend({type:"legend.scroll",newlineDisabled:!0,init:function(){ap.superCall(this,"init"),this._currentIndex=0,this.group.add(this._containerGroup=new mA),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new mA),this._showController},resetInner:function(){ap.superCall(this,"resetInner"),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},renderInner:function(t,e,r,a,i,n,o){var s=this;ap.superCall(this,"renderInner",t,e,r,a,i,n,o);var l=this._controllerGroup,u=e.get("pageIconSize",!0);P(u)||(u=[u,u]),f("pagePrev",0);var h=e.getModel("pageTextStyle");l.add(new nt({name:"pageText",style:{textFill:h.getTextColor(),font:h.getFont(),textVerticalAlign:"middle",textAlign:"center"},silent:!0})),f("pageNext",1);function f(c,v){var d=c+"DataIndex",g=xo(e.get("pageIcons",!0)[e.getOrient().name][v],{onclick:X(s._pageGo,s,d,e,a)},{x:-u[0]/2,y:-u[1]/2,width:u[0],height:u[1]});g.name=c,l.add(g)}},layoutInner:function(t,e,r,a,i,n){var o=this.getSelectorGroup(),s=t.getOrient().index,l=ep[s],u=rp[s],h=ep[1-s],f=rp[1-s];i&&ei("horizontal",o,t.get("selectorItemGap",!0));var c=t.get("selectorButtonGap",!0),v=o.getBoundingRect(),d=[-v.x,-v.y],g=Y(r);i&&(g[l]=r[l]-v[l]-c);var p=this._layoutContentAndController(t,a,g,s,l,h,f);if(i){if(n==="end")d[s]+=p[l]+c;else{var m=v[l]+c;d[s]-=m,p[u]-=m}p[l]+=v[l]+c,d[1-s]+=p[f]+p[h]/2-v[h]/2,p[h]=Math.max(p[h],v[h]),p[f]=Math.min(p[f],v[f]+d[1-s]),o.attr("position",d)}return p},_layoutContentAndController:function(t,e,r,a,i,n,o){var s=this.getContentGroup(),l=this._containerGroup,u=this._controllerGroup;ei(t.get("orient"),s,t.get("itemGap"),a?r.width:null,a?null:r.height),ei("horizontal",u,t.get("pageButtonItemGap",!0));var h=s.getBoundingRect(),f=u.getBoundingRect(),c=this._showController=h[i]>r[i],v=[-h.x,-h.y];e||(v[a]=s.position[a]);var d=[0,0],g=[-f.x,-f.y],p=Nt(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(c){var m=t.get("pageButtonPosition",!0);m==="end"?g[a]+=r[i]-f[i]:d[a]+=f[i]+p}g[1-a]+=h[n]/2-f[n]/2,s.attr("position",v),l.attr("position",d),u.attr("position",g);var y={x:0,y:0};if(y[i]=c?r[i]:h[i],y[n]=Math.max(h[n],f[n]),y[o]=Math.min(0,f[o]+g[1-a]),l.__rectSize=r[i],c){var _={x:0,y:0};_[i]=Math.max(r[i]-f[i]-p,0),_[n]=y[n],l.setClipPath(new ft({shape:_})),l.__rectSize=_[i]}else u.eachChild(function(w){w.attr({invisible:!0,silent:!0})});var x=this._getPageInfo(t);return x.pageIndex!=null&&tt(s,{position:x.contentPosition},c?t:!1),this._updatePageInfoView(t,x),y},_pageGo:function(t,e,r){var a=this._getPageInfo(e)[t];a!=null&&r.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:e.id})},_updatePageInfoView:function(t,e){var r=this._controllerGroup;T(["pagePrev","pageNext"],function(l){var u=e[l+"DataIndex"]!=null,h=r.childOfName(l);h&&(h.setStyle("fill",u?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),h.cursor=u?"pointer":"default")});var a=r.childOfName("pageText"),i=t.get("pageFormatter"),n=e.pageIndex,o=n!=null?n+1:0,s=e.pageCount;a&&i&&a.setStyle("text",_t(i)?i.replace("{current}",o).replace("{total}",s):i({current:o,total:s}))},_getPageInfo:function(t){var e=t.get("scrollDataIndex",!0),r=this.getContentGroup(),a=this._containerGroup.__rectSize,i=t.getOrient().index,n=ep[i],o=rp[i],s=this._findTargetItemIndex(e),l=r.children(),u=l[s],h=l.length,f=h?1:0,c={contentPosition:r.position.slice(),pageCount:f,pageIndex:f-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return c;var v=y(u);c.contentPosition[i]=-v.s;for(var d=s+1,g=v,p=v,m=null;d<=h;++d)m=y(l[d]),(!m&&p.e>g.s+a||m&&!_(m,g.s))&&(p.i>g.i?g=p:g=m,g&&(c.pageNextDataIndex==null&&(c.pageNextDataIndex=g.i),++c.pageCount)),p=m;for(var d=s-1,g=v,p=v,m=null;d>=-1;--d)m=y(l[d]),(!m||!_(p,m.s))&&g.i<p.i&&(p=g,c.pagePrevDataIndex==null&&(c.pagePrevDataIndex=g.i),++c.pageCount,++c.pageIndex),g=m;return c;function y(x){if(x){var w=x.getBoundingRect(),S=w[o]+x.position[i];return{s:S,e:S+w[n],i:x.__legendDataIndex}}}function _(x,w){return x.e>=w&&x.s<=w+a}},_findTargetItemIndex:function(t){if(!this._showController)return 0;var e,r=this.getContentGroup(),a;return r.eachChild(function(i,n){var o=i.__legendDataIndex;a==null&&o!=null&&(a=n),o===t&&(e=n)}),e??a}});lt("legendScroll","legendscroll",function(t,e){var r=t.scrollDataIndex;r!=null&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(a){a.setScrollDataIndex(r)})});var h5=Pg.extend({type:"dataZoom.slider",layoutMode:"box",defaultOption:{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#2f4554",width:.5,opacity:.3},areaStyle:{color:"rgba(47,69,84,0.3)",opacity:.3}},borderColor:"#ddd",fillerColor:"rgba(167,183,204,0.4)",handleIcon:"M8.2,13.6V3.9H6.3v9.7H3.1v14.9h3.3v9.7h1.8v-9.7h3.3V13.6H8.2z M9.7,24.4H4.8v-1.4h4.9V24.4z M9.7,19.1H4.8v-1.4h4.9V19.1z",handleSize:"100%",handleStyle:{color:"#a7b7cc"},labelPrecision:null,labelFormatter:null,showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#333"}}}),Th=ft,Ii=At,ip=Ja,Kr=X,np=T,yA=7,Uz=1,op=30,Ms="horizontal",_A="vertical",$z=5,Zz=["line","bar","candlestick","scatter"],sp=Eg.extend({type:"dataZoom.slider",init:function(t,e){this._displayables={},this._orient,this._range,this._handleEnds,this._size,this._handleWidth,this._handleHeight,this._location,this._dragging,this._dataShadowInfo,this.api=e},render:function(t,e,r,a){if(sp.superApply(this,"render",arguments),ko(this,"_dispatchZoomAction",this.dataZoomModel.get("throttle"),"fixRate"),this._orient=t.get("orient"),this.dataZoomModel.get("show")===!1){this.group.removeAll();return}(!a||a.type!=="dataZoom"||a.from!==this.uid)&&this._buildView(),this._updateView()},remove:function(){sp.superApply(this,"remove",arguments),My(this,"_dispatchZoomAction")},dispose:function(){sp.superApply(this,"dispose",arguments),My(this,"_dispatchZoomAction")},_buildView:function(){var t=this.group;t.removeAll(),this._resetLocation(),this._resetInterval();var e=this._displayables.barGroup=new G;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},_resetLocation:function(){var t=this.dataZoomModel,e=this.api,r=this._findCoordRect(),a={width:e.getWidth(),height:e.getHeight()},i=this._orient===Ms?{right:a.width-r.x-r.width,top:a.height-op-yA,width:r.width,height:op}:{right:yA,top:r.y,width:op,height:r.height},n=rn(t.option);T(["right","top","width","height"],function(s){n[s]==="ph"&&(n[s]=i[s])});var o=Ot(n,a,t.padding);this._location={x:o.x,y:o.y},this._size=[o.width,o.height],this._orient===_A&&this._size.reverse()},_positionGroup:function(){var t=this.group,e=this._location,r=this._orient,a=this.dataZoomModel.getFirstTargetAxisModel(),i=a&&a.get("inverse"),n=this._displayables.barGroup,o=(this._dataShadowInfo||{}).otherAxisInverse;n.attr(r===Ms&&!i?{scale:o?[1,1]:[1,-1]}:r===Ms&&i?{scale:o?[-1,1]:[-1,-1]}:r===_A&&!i?{scale:o?[1,-1]:[1,1],rotation:Math.PI/2}:{scale:o?[-1,-1]:[-1,1],rotation:Math.PI/2});var s=t.getBoundingRect([n]);t.attr("position",[e.x-s.x,e.y-s.y])},_getViewExtent:function(){return[0,this._size[0]]},_renderBackground:function(){var t=this.dataZoomModel,e=this._size,r=this._displayables.barGroup;r.add(new Th({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40})),r.add(new Th({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:X(this._onClickPanelClick,this)}))},_renderDataShadow:function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(!!t){var e=this._size,r=t.series,a=r.getRawData(),i=r.getShadowDim?r.getShadowDim():t.otherDim;if(i!=null){var n=a.getDataExtent(i),o=(n[1]-n[0])*.3;n=[n[0]-o,n[1]+o];var s=[0,e[1]],l=[0,e[0]],u=[[e[0],0],[0,0]],h=[],f=l[1]/(a.count()-1),c=0,v=Math.round(a.count()/e[0]),d;a.each([i],function(p,m){if(v>0&&m%v){c+=f;return}var y=p==null||isNaN(p)||p==="",_=y?0:Ii(p,n,s,!0);y&&!d&&m?(u.push([u[u.length-1][0],0]),h.push([h[h.length-1][0],0])):!y&&d&&(u.push([c,0]),h.push([c,0])),u.push([c,_]),h.push([c,_]),c+=f,d=y});var g=this.dataZoomModel;this._displayables.barGroup.add(new Se({shape:{points:u},style:U({fill:g.get("dataBackgroundColor")},g.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new Ve({shape:{points:h},style:g.getModel("dataBackground.lineStyle").getLineStyle(),silent:!0,z2:-19}))}}},_prepareDataShadowInfo:function(){var t=this.dataZoomModel,e=t.get("showDataShadow");if(e!==!1){var r,a=this.ecModel;return t.eachTargetAxis(function(i,n){var o=t.getAxisProxy(i.name,n).getTargetSeriesModels();T(o,function(s){if(!r&&!(e!==!0&&ut(Zz,s.get("type"))<0)){var l=a.getComponent(i.axis,n).axis,u=Yz(i.name),h,f=s.coordinateSystem;u!=null&&f.getOtherAxis&&(h=f.getOtherAxis(l).inverse),u=s.getData().mapDimension(u),r={thisAxis:l,series:s,thisDim:i.name,otherDim:u,otherAxisInverse:h}}},this)},this),r}},_renderHandle:function(){var t=this._displayables,e=t.handles=[],r=t.handleLabels=[],a=this._displayables.barGroup,i=this._size,n=this.dataZoomModel;a.add(t.filler=new Th({draggable:!0,cursor:xA(this._orient),drift:Kr(this._onDragMove,this,"all"),ondragstart:Kr(this._showDataInfo,this,!0),ondragend:Kr(this._onDragEnd,this),onmouseover:Kr(this._showDataInfo,this,!0),onmouseout:Kr(this._showDataInfo,this,!1),style:{fill:n.get("fillerColor"),textPosition:"inside"}})),a.add(new Th({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:i[0],height:i[1]},style:{stroke:n.get("dataBackgroundColor")||n.get("borderColor"),lineWidth:Uz,fill:"rgba(0,0,0,0)"}})),np([0,1],function(o){var s=xo(n.get("handleIcon"),{cursor:xA(this._orient),draggable:!0,drift:Kr(this._onDragMove,this,o),ondragend:Kr(this._onDragEnd,this),onmouseover:Kr(this._showDataInfo,this,!0),onmouseout:Kr(this._showDataInfo,this,!1)},{x:-1,y:0,width:2,height:2}),l=s.getBoundingRect();this._handleHeight=R(n.get("handleSize"),this._size[1]),this._handleWidth=l.width/l.height*this._handleHeight,s.setStyle(n.getModel("handleStyle").getItemStyle());var u=n.get("handleColor");u!=null&&(s.style.fill=u),a.add(e[o]=s);var h=n.textStyleModel;this.group.add(r[o]=new nt({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textVerticalAlign:"middle",textAlign:"center",textFill:h.getTextColor(),textFont:h.getFont()},z2:10}))},this)},_resetInterval:function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[Ii(t[0],[0,100],e,!0),Ii(t[1],[0,100],e,!0)]},_updateInterval:function(t,e){var r=this.dataZoomModel,a=this._handleEnds,i=this._getViewExtent(),n=r.findRepresentativeAxisProxy().getMinMaxSpan(),o=[0,100];pi(e,a,i,r.get("zoomLock")?"all":t,n.minSpan!=null?Ii(n.minSpan,o,i,!0):null,n.maxSpan!=null?Ii(n.maxSpan,o,i,!0):null);var s=this._range,l=this._range=ip([Ii(a[0],i,o,!0),Ii(a[1],i,o,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},_updateView:function(t){var e=this._displayables,r=this._handleEnds,a=ip(r.slice()),i=this._size;np([0,1],function(n){var o=e.handles[n],s=this._handleHeight;o.attr({scale:[s/2,s/2],position:[r[n],i[1]/2-s/2]})},this),e.filler.setShape({x:a[0],y:0,width:a[1]-a[0],height:i[1]}),this._updateDataInfo(t)},_updateDataInfo:function(t){var e=this.dataZoomModel,r=this._displayables,a=r.handleLabels,i=this._orient,n=["",""];if(e.get("showDetail")){var o=e.findRepresentativeAxisProxy();if(o){var s=o.getAxisModel().axis,l=this._range,u=t?o.calculateDataWindow({start:l[0],end:l[1]}).valueWindow:o.getDataValueWindow();n=[this._formatLabel(u[0],s),this._formatLabel(u[1],s)]}}var h=ip(this._handleEnds.slice());f.call(this,0),f.call(this,1);function f(c){var v=Qa(r.handles[c].parent,this.group),d=Ac(c===0?"right":"left",v),g=this._handleWidth/2+$z,p=xr([h[c]+(c===0?-g:g),this._size[1]/2],v);a[c].setStyle({x:p[0],y:p[1],textVerticalAlign:i===Ms?"middle":d,textAlign:i===Ms?d:"center",text:n[c]})}},_formatLabel:function(t,e){var r=this.dataZoomModel,a=r.get("labelFormatter"),i=r.get("labelPrecision");(i==null||i==="auto")&&(i=e.getPixelPrecision());var n=t==null||isNaN(t)?"":e.type==="category"||e.type==="time"?e.scale.getLabel(Math.round(t)):t.toFixed(Math.min(i,20));return $t(a)?a(t,n):_t(a)?a.replace("{value}",n):n},_showDataInfo:function(t){t=this._dragging||t;var e=this._displayables.handleLabels;e[0].attr("invisible",!t),e[1].attr("invisible",!t)},_onDragMove:function(t,e,r,a){this._dragging=!0,Va(a.event);var i=this._displayables.barGroup.getLocalTransform(),n=xr([e,r],i,!0),o=this._updateInterval(t,n[0]),s=this.dataZoomModel.get("realtime");this._updateView(!s),o&&s&&this._dispatchZoomAction()},_onDragEnd:function(){this._dragging=!1,this._showDataInfo(!1);var t=this.dataZoomModel.get("realtime");!t&&this._dispatchZoomAction()},_onClickPanelClick:function(t){var e=this._size,r=this._displayables.barGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(r[0]<0||r[0]>e[0]||r[1]<0||r[1]>e[1])){var a=this._handleEnds,i=(a[0]+a[1])/2,n=this._updateInterval("all",r[0]-i);this._updateView(),n&&this._dispatchZoomAction()}},_dispatchZoomAction:function(){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,start:t[0],end:t[1]})},_findCoordRect:function(){var t;if(np(this.getTargetCoordInfo(),function(a){if(!t&&a.length){var i=a[0].model.coordinateSystem;t=i.getRect&&i.getRect()}}),!t){var e=this.api.getWidth(),r=this.api.getHeight();t={x:e*.2,y:r*.2,width:e*.6,height:r*.6}}return t}});function Yz(t){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[t]}function xA(t){return t==="vertical"?"ns-resize":"ew-resize"}Pg.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}});var wA="\0_ec_dataZoom_roams";function Xz(t,e){var r=SA(t),a=e.dataZoomId,i=e.coordId;T(r,function(s,l){var u=s.dataZoomInfos;u[a]&&ut(e.allCoordIds,i)<0&&(delete u[a],s.count--)}),AA(r);var n=r[i];n||(n=r[i]={coordId:i,dataZoomInfos:{},count:0},n.controller=Kz(t,n),n.dispatchAction=K(Qz,t)),!n.dataZoomInfos[a]&&n.count++,n.dataZoomInfos[a]=e;var o=Jz(n.dataZoomInfos);n.controller.enable(o.controlType,o.opt),n.controller.setPointerChecker(e.containsPoint),ko(n,"dispatchAction",e.dataZoomModel.get("throttle",!0),"fixRate")}function qz(t,e){var r=SA(t);T(r,function(a){a.controller.dispose();var i=a.dataZoomInfos;i[e]&&(delete i[e],a.count--)}),AA(r)}function bA(t){return t.type+"\0_"+t.id}function SA(t){var e=t.getZr();return e[wA]||(e[wA]={})}function Kz(t,e){var r=new An(t.getZr());return T(["pan","zoom","scrollMove"],function(a){r.on(a,function(i){var n=[];T(e.dataZoomInfos,function(o){if(!!i.isAvailableBehavior(o.dataZoomModel.option)){var s=(o.getRange||{})[a],l=s&&s(e.controller,i);!o.dataZoomModel.get("disabled",!0)&&l&&n.push({dataZoomId:o.dataZoomId,start:l[0],end:l[1]})}}),n.length&&e.dispatchAction(n)})}),r}function AA(t){T(t,function(e,r){e.count||(e.controller.dispose(),delete t[r])})}function Qz(t,e){t.dispatchAction({type:"dataZoom",batch:e})}function Jz(t){var e,r="type_",a={type_true:2,type_move:1,type_false:0,type_undefined:-1},i=!0;return T(t,function(n){var o=n.dataZoomModel,s=o.get("disabled",!0)?!1:o.get("zoomLock",!0)?"move":!0;a[r+s]>a[r+e]&&(e=s),i&=o.get("preventDefaultMouseMove",!0)}),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!i}}}var jz=X,TA=Eg.extend({type:"dataZoom.inside",init:function(t,e){this._range},render:function(t,e,r,a){TA.superApply(this,"render",arguments),this._range=t.getPercentRange(),T(this.getTargetCoordInfo(),function(i,n){var o=E(i,function(s){return bA(s.model)});T(i,function(s){var l=s.model,u={};T(["pan","zoom","scrollMove"],function(h){u[h]=jz(tB[h],this,s,n)},this),Xz(r,{coordId:bA(l),allCoordIds:o,containsPoint:function(h,f,c){return l.coordinateSystem.containPoint([f,c])},dataZoomId:t.id,dataZoomModel:t,getRange:u})},this)},this)},dispose:function(){qz(this.api,this.dataZoomModel.id),TA.superApply(this,"dispose",arguments),this._range=null}}),tB={zoom:function(t,e,r,a){var i=this._range,n=i.slice(),o=t.axisModels[0];if(!!o){var s=lp[e](null,[a.originX,a.originY],o,r,t),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(n[1]-n[0])+n[0],u=Math.max(1/a.scale,0);n[0]=(n[0]-l)*u+l,n[1]=(n[1]-l)*u+l;var h=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(pi(0,n,[0,100],0,h.minSpan,h.maxSpan),this._range=n,i[0]!==n[0]||i[1]!==n[1])return n}},pan:CA(function(t,e,r,a,i,n){var o=lp[a]([n.oldX,n.oldY],[n.newX,n.newY],e,i,r);return o.signal*(t[1]-t[0])*o.pixel/o.pixelLength}),scrollMove:CA(function(t,e,r,a,i,n){var o=lp[a]([0,0],[n.scrollDelta,n.scrollDelta],e,i,r);return o.signal*(t[1]-t[0])*n.scrollDelta})};function CA(t){return function(e,r,a,i){var n=this._range,o=n.slice(),s=e.axisModels[0];if(!!s){var l=t(o,s,e,r,a,i);if(pi(l,o,[0,100],"all"),this._range=o,n[0]!==o[0]||n[1]!==o[1])return o}}}var lp={grid:function(t,e,r,a,i){var n=r.axis,o={},s=i.model.coordinateSystem.getRect();return t=t||[0,0],n.dim==="x"?(o.pixel=e[0]-t[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=n.inverse?1:-1):(o.pixel=e[1]-t[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=n.inverse?-1:1),o},polar:function(t,e,r,a,i){var n=r.axis,o={},s=i.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),r.mainType==="radiusAxis"?(o.pixel=e[0]-t[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=n.inverse?1:-1):(o.pixel=e[1]-t[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=n.inverse?-1:1),o},singleAxis:function(t,e,r,a,i){var n=r.axis,o=i.model.coordinateSystem.getRect(),s={};return t=t||[0,0],n.orient==="horizontal"?(s.pixel=e[0]-t[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=n.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=n.inverse?-1:1),s}},DA=T,IA=function(t){var e=t&&t.visualMap;P(e)||(e=e?[e]:[]),DA(e,function(r){if(!!r){Gn(r,"splitList")&&!Gn(r,"pieces")&&(r.pieces=r.splitList,delete r.splitList);var a=r.pieces;a&&P(a)&&DA(a,function(i){Q(i)&&(Gn(i,"start")&&!Gn(i,"min")&&(i.min=i.start),Gn(i,"end")&&!Gn(i,"max")&&(i.max=i.end))})}})};function Gn(t,e){return t&&t.hasOwnProperty&&t.hasOwnProperty(e)}ct.registerSubTypeDefaulter("visualMap",function(t){return!t.categories&&(!(t.pieces?t.pieces.length>0:t.splitNumber>0)||t.calculable)?"continuous":"piecewise"});var MA=br.VISUAL.COMPONENT;bt(MA,{createOnAllSeries:!0,reset:function(t,e){var r=[];return e.eachComponent("visualMap",function(a){var i=t.pipelineContext;!a.isTargetSeries(t)||i&&i.large||r.push(mz(a.stateList,a.targetVisuals,X(a.getValueState,a),a.getDataDimension(t.getData())))}),r}}),bt(MA,{createOnAllSeries:!0,reset:function(t,e){var r=t.getData(),a=[];e.eachComponent("visualMap",function(i){if(i.isTargetSeries(t)){var n=i.getVisualMeta(X(eB,null,t,i))||{stops:[],outerColors:[]},o=i.getDataDimension(r),s=r.getDimensionInfo(o);s!=null&&(n.dimension=s.index,a.push(n))}}),t.getData().setVisual("visualMeta",a)}});function eB(t,e,r,a){for(var i=e.targetVisuals[a],n=mt.prepareVisualTypes(i),o={color:t.getData().getVisual("color")},s=0,l=n.length;s<l;s++){var u=n[s],h=i[u==="opacity"?"__alphaForOpacity":u];h&&h.applyVisual(r,f,c)}return o.color;function f(v){return o[v]}function c(v,d){o[v]=d}}var up={get:function(t,e,r){var a=Y((rB[t]||{})[e]);return r&&P(a)?a[a.length-1]:a}},rB={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},LA=mt.mapVisual,aB=mt.eachVisual,iB=P,hp=T,nB=Ja,oB=At,fp=Kt,Ch=Me({type:"visualMap",dependencies:["series"],stateList:["inRange","outOfRange"],replacableOptionKeys:["inRange","outOfRange","target","controller","color"],dataBound:[-1/0,1/0],layoutMode:{type:"box",ignoreSize:!0},defaultOption:{show:!0,zlevel:0,z:4,seriesIndex:"all",min:0,max:200,dimension:null,inRange:null,outOfRange:null,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,color:null,formatter:null,text:null,textStyle:{color:"#333"}},init:function(t,e,r){this._dataExtent,this.targetVisuals={},this.controllerVisuals={},this.textStyleModel,this.itemSize,this.mergeDefaultAndTheme(t,r)},optionUpdated:function(t,e){var r=this.option;at.canvasSupported||(r.realtime=!1),!e&&FS(r,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},resetVisual:function(t){var e=this.stateList;t=X(t,this),this.controllerVisuals=Bg(this.option.controller,e,t),this.targetVisuals=Bg(this.option.target,e,t)},getTargetSeriesIndices:function(){var t=this.option.seriesIndex,e=[];return t==null||t==="all"?this.ecModel.eachSeries(function(r,a){e.push(a)}):e=te(t),e},eachTargetSeries:function(t,e){T(this.getTargetSeriesIndices(),function(r){t.call(e,this.ecModel.getSeriesByIndex(r))},this)},isTargetSeries:function(t){var e=!1;return this.eachTargetSeries(function(r){r===t&&(e=!0)}),e},formatValueText:function(t,e,r){var a=this.option,i=a.precision,n=this.dataBound,o=a.formatter,s,l;if(r=r||["<",">"],P(t)&&(t=t.slice(),s=!0),l=e?t:s?[u(t[0]),u(t[1])]:u(t),_t(o))return o.replace("{value}",s?l[0]:l).replace("{value2}",s?l[1]:l);if($t(o))return s?o(t[0],t[1]):o(t);if(s)return t[0]===n[0]?r[0]+" "+l[1]:t[1]===n[1]?r[1]+" "+l[0]:l[0]+" - "+l[1];return l;function u(h){return h===n[0]?"min":h===n[1]?"max":(+h).toFixed(Math.min(i,20))}},resetExtent:function(){var t=this.option,e=nB([t.min,t.max]);this._dataExtent=e},getDataDimension:function(t){var e=this.option.dimension,r=t.dimensions;if(!(e==null&&!r.length)){if(e!=null)return t.getDimension(e);for(var a=t.dimensions,i=a.length-1;i>=0;i--){var n=a[i],o=t.getDimensionInfo(n);if(!o.isCalculationCoord)return n}}},getExtent:function(){return this._dataExtent.slice()},completeVisualOption:function(){var t=this.ecModel,e=this.option,r={inRange:e.inRange,outOfRange:e.outOfRange},a=e.target||(e.target={}),i=e.controller||(e.controller={});J(a,r),J(i,r);var n=this.isCategory();o.call(this,a),o.call(this,i),s.call(this,a,"inRange","outOfRange"),l.call(this,i);function o(u){iB(e.color)&&!u.inRange&&(u.inRange={color:e.color.slice().reverse()}),u.inRange=u.inRange||{color:t.get("gradientColor")},hp(this.stateList,function(h){var f=u[h];if(_t(f)){var c=up.get(f,"active",n);c?(u[h]={},u[h][f]=c):delete u[h]}},this)}function s(u,h,f){var c=u[h],v=u[f];c&&!v&&(v=u[f]={},hp(c,function(d,g){if(!!mt.isValidType(g)){var p=up.get(g,"inactive",n);p!=null&&(v[g]=p,g==="color"&&!v.hasOwnProperty("opacity")&&!v.hasOwnProperty("colorAlpha")&&(v.opacity=[0,0]))}}))}function l(u){var h=(u.inRange||{}).symbol||(u.outOfRange||{}).symbol,f=(u.inRange||{}).symbolSize||(u.outOfRange||{}).symbolSize,c=this.get("inactiveColor");hp(this.stateList,function(v){var d=this.itemSize,g=u[v];g||(g=u[v]={color:n?c:[c]}),g.symbol==null&&(g.symbol=h&&Y(h)||(n?"roundRect":["roundRect"])),g.symbolSize==null&&(g.symbolSize=f&&Y(f)||(n?d[0]:[d[0],d[0]])),g.symbol=LA(g.symbol,function(y){return y==="none"||y==="square"?"roundRect":y});var p=g.symbolSize;if(p!=null){var m=-1/0;aB(p,function(y){y>m&&(m=y)}),g.symbolSize=LA(p,function(y){return oB(y,[0,m],[0,d[0]],!0)})}},this)}},resetItemSize:function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},isCategory:function(){return!!this.option.categories},setSelected:fp,getValueState:fp,getVisualMeta:fp}),PA=[20,140],EA=Ch.extend({type:"visualMap.continuous",defaultOption:{align:"auto",calculable:!1,range:null,realtime:!0,itemHeight:null,itemWidth:null,hoverLink:!0,hoverLinkDataSize:null,hoverLinkOnHandle:null},optionUpdated:function(t,e){EA.superApply(this,"optionUpdated",arguments),this.resetExtent(),this.resetVisual(function(r){r.mappingMethod="linear",r.dataExtent=this.getExtent()}),this._resetRange()},resetItemSize:function(){EA.superApply(this,"resetItemSize",arguments);var t=this.itemSize;this._orient==="horizontal"&&t.reverse(),(t[0]==null||isNaN(t[0]))&&(t[0]=PA[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=PA[1])},_resetRange:function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):P(e)&&(e[0]>e[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},completeVisualOption:function(){Ch.prototype.completeVisualOption.apply(this,arguments),T(this.stateList,function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=0)},this)},setSelected:function(t){this.option.range=t.slice(),this._resetRange()},getSelected:function(){var t=this.getExtent(),e=Ja((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]<t[0]&&(e[0]=t[0]),e[1]<t[0]&&(e[1]=t[0]),e},getValueState:function(t){var e=this.option.range,r=this.getExtent();return(e[0]<=r[0]||e[0]<=t)&&(e[1]>=r[1]||t<=e[1])?"inRange":"outOfRange"},findTargetDataIndices:function(t){var e=[];return this.eachTargetSeries(function(r){var a=[],i=r.getData();i.each(this.getDataDimension(i),function(n,o){t[0]<=n&&n<=t[1]&&a.push(o)},this),e.push({seriesId:r.id,dataIndex:a})},this),e},getVisualMeta:function(t){var e=RA(this,"outOfRange",this.getExtent()),r=RA(this,"inRange",this.option.range.slice()),a=[];function i(f,c){a.push({value:f,color:t(f,c)})}for(var n=0,o=0,s=r.length,l=e.length;o<l&&(!r.length||e[o]<=r[0]);o++)e[o]<r[n]&&i(e[o],"outOfRange");for(var u=1;n<s;n++,u=0)u&&a.length&&i(r[n],"outOfRange"),i(r[n],"inRange");for(var u=1;o<l;o++)(!r.length||r[r.length-1]<e[o])&&(u&&(a.length&&i(a[a.length-1].value,"outOfRange"),u=0),i(e[o],"outOfRange"));var h=a.length;return{stops:a,outerColors:[h?a[0].color:"transparent",h?a[h-1].color:"transparent"]}}});function RA(t,e,r){if(r[0]===r[1])return r.slice();for(var a=200,i=(r[1]-r[0])/a,n=r[0],o=[],s=0;s<=a&&n<r[1];s++)o.push(n),n+=i;return o.push(r[1]),o}var kA=Xt({type:"visualMap",autoPositionValues:{left:1,right:1,top:1,bottom:1},init:function(t,e){this.ecModel=t,this.api=e,this.visualMapModel},render:function(t,e,r,a){if(this.visualMapModel=t,t.get("show")===!1){this.group.removeAll();return}this.doRender.apply(this,arguments)},renderBackground:function(t){var e=this.visualMapModel,r=ja(e.get("padding")||0),a=t.getBoundingRect();t.add(new ft({z2:-1,silent:!0,shape:{x:a.x-r[3],y:a.y-r[0],width:a.width+r[3]+r[1],height:a.height+r[0]+r[2]},style:{fill:e.get("backgroundColor"),stroke:e.get("borderColor"),lineWidth:e.get("borderWidth")}}))},getControllerVisual:function(t,e,r){r=r||{};var a=r.forceState,i=this.visualMapModel,n={};if(e==="symbol"&&(n.symbol=i.get("itemSymbol")),e==="color"){var o=i.get("contentColor");n.color=o}function s(f){return n[f]}function l(f,c){n[f]=c}var u=i.controllerVisuals[a||i.getValueState(t)],h=mt.prepareVisualTypes(u);return T(h,function(f){var c=u[f];r.convertOpacityToAlpha&&f==="opacity"&&(f="colorAlpha",c=u.__alphaForOpacity),mt.dependsOn(f,e)&&c&&c.applyVisual(t,s,l)}),n[e]},positionGroup:function(t){var e=this.visualMapModel,r=this.api;Fl(t,e.getBoxLayoutParams(),{width:r.getWidth(),height:r.getHeight()})},doRender:Kt});function NA(t,e,r){var a=t.option,i=a.align;if(i!=null&&i!=="auto")return i;for(var n={width:e.getWidth(),height:e.getHeight()},o=a.orient==="horizontal"?1:0,s=[["left","right","width"],["top","bottom","height"]],l=s[o],u=[0,null,10],h={},f=0;f<3;f++)h[s[1-o][f]]=u[f],h[l[f]]=f===2?r[0]:a[l[f]];var c=[["x","width",3],["y","height",0]][o],v=Ot(h,n,a.padding);return l[(v.margin[c[2]]||0)+v[c[0]]+v[c[1]]*.5<n[c[1]]*.5?0:1]}function Dh(t,e){return T(t||[],function(r){r.dataIndex!=null&&(r.dataIndexInside=r.dataIndex,r.dataIndex=null),r.highlightKey="visualMap"+(e?e.componentIndex:"")}),t}var Qr=At,sB=T,Ih=Math.min,Ls=Math.max,lB=12,OA=6,uB=kA.extend({type:"visualMap.continuous",init:function(){uB.superApply(this,"init",arguments),this._shapes={},this._dataInterval=[],this._handleEnds=[],this._orient,this._useHandle,this._hoverLinkDataIndices=[],this._dragging,this._hovering},doRender:function(t,e,r,a){(!a||a.type!=="selectDataRange"||a.from!==this.uid)&&this._buildView()},_buildView:function(){this.group.removeAll();var t=this.visualMapModel,e=this.group;this._orient=t.get("orient"),this._useHandle=t.get("calculable"),this._resetInterval(),this._renderBar(e);var r=t.get("text");this._renderEndsText(e,r,0),this._renderEndsText(e,r,1),this._updateView(!0),this.renderBackground(e),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(e)},_renderEndsText:function(t,e,r){if(!!e){var a=e[1-r];a=a!=null?a+"":"";var i=this.visualMapModel,n=i.get("textGap"),o=i.itemSize,s=this._shapes.barGroup,l=this._applyTransform([o[0]/2,r===0?-n:o[1]+n],s),u=this._applyTransform(r===0?"bottom":"top",s),h=this._orient,f=this.visualMapModel.textStyleModel;this.group.add(new nt({style:{x:l[0],y:l[1],textVerticalAlign:h==="horizontal"?"middle":u,textAlign:h==="horizontal"?u:"center",text:a,textFont:f.getFont(),textFill:f.getTextColor()}}))}},_renderBar:function(t){var e=this.visualMapModel,r=this._shapes,a=e.itemSize,i=this._orient,n=this._useHandle,o=NA(e,this.api,a),s=r.barGroup=this._createBarGroup(o);s.add(r.outOfRange=Mh()),s.add(r.inRange=Mh(null,n?BA(this._orient):null,X(this._dragHandle,this,"all",!1),X(this._dragHandle,this,"all",!0)));var l=e.textStyleModel.getTextRect("\u56FD"),u=Ls(l.width,l.height);n&&(r.handleThumbs=[],r.handleLabels=[],r.handleLabelPoints=[],this._createHandle(s,0,a,u,i,o),this._createHandle(s,1,a,u,i,o)),this._createIndicator(s,a,u,i),t.add(s)},_createHandle:function(t,e,r,a,i){var n=X(this._dragHandle,this,e,!1),o=X(this._dragHandle,this,e,!0),s=Mh(hB(e,a),BA(this._orient),n,o);s.position[0]=r[0],t.add(s);var l=this.visualMapModel.textStyleModel,u=new nt({draggable:!0,drift:n,onmousemove:function(c){Va(c.event)},ondragend:o,style:{x:0,y:0,text:"",textFont:l.getFont(),textFill:l.getTextColor()}});this.group.add(u);var h=[i==="horizontal"?a/2:a*1.5,i==="horizontal"?e===0?-(a*1.5):a*1.5:e===0?-a/2:a/2],f=this._shapes;f.handleThumbs[e]=s,f.handleLabelPoints[e]=h,f.handleLabels[e]=u},_createIndicator:function(t,e,r,a){var i=Mh([[0,0]],"move");i.position[0]=e[0],i.attr({invisible:!0,silent:!0}),t.add(i);var n=this.visualMapModel.textStyleModel,o=new nt({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textFont:n.getFont(),textFill:n.getTextColor()}});this.group.add(o);var s=[a==="horizontal"?r/2:OA+3,0],l=this._shapes;l.indicator=i,l.indicatorLabel=o,l.indicatorLabelPoint=s},_dragHandle:function(t,e,r,a){if(!!this._useHandle){if(this._dragging=!e,!e){var i=this._applyTransform([r,a],this._shapes.barGroup,!0);this._updateInterval(t,i[1]),this._updateView()}e===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),e?!this._hovering&&this._clearHoverLinkToSeries():zA(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[t],!1)}},_resetInterval:function(){var t=this.visualMapModel,e=this._dataInterval=t.getSelected(),r=t.getExtent(),a=[0,t.itemSize[1]];this._handleEnds=[Qr(e[0],r,a,!0),Qr(e[1],r,a,!0)]},_updateInterval:function(t,e){e=e||0;var r=this.visualMapModel,a=this._handleEnds,i=[0,r.itemSize[1]];pi(e,a,i,t,0);var n=r.getExtent();this._dataInterval=[Qr(a[0],i,n,!0),Qr(a[1],i,n,!0)]},_updateView:function(t){var e=this.visualMapModel,r=e.getExtent(),a=this._shapes,i=[0,e.itemSize[1]],n=t?i:this._handleEnds,o=this._createBarVisual(this._dataInterval,r,n,"inRange"),s=this._createBarVisual(r,r,i,"outOfRange");a.inRange.setStyle({fill:o.barColor,opacity:o.opacity}).setShape("points",o.barPoints),a.outOfRange.setStyle({fill:s.barColor,opacity:s.opacity}).setShape("points",s.barPoints),this._updateHandle(n,o)},_createBarVisual:function(t,e,r,a){var i={forceState:a,convertOpacityToAlpha:!0},n=this._makeColorGradient(t,i),o=[this.getControllerVisual(t[0],"symbolSize",i),this.getControllerVisual(t[1],"symbolSize",i)],s=this._createBarPoints(r,o);return{barColor:new qa(0,0,0,1,n),barPoints:s,handlesColor:[n[0].color,n[n.length-1].color]}},_makeColorGradient:function(t,e){var r=100,a=[],i=(t[1]-t[0])/r;a.push({color:this.getControllerVisual(t[0],"color",e),offset:0});for(var n=1;n<r;n++){var o=t[0]+i*n;if(o>t[1])break;a.push({color:this.getControllerVisual(o,"color",e),offset:n/r})}return a.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),a},_createBarPoints:function(t,e){var r=this.visualMapModel.itemSize;return[[r[0]-e[0],t[0]],[r[0],t[0]],[r[0],t[1]],[r[0]-e[1],t[1]]]},_createBarGroup:function(t){var e=this._orient,r=this.visualMapModel.get("inverse");return new G(e==="horizontal"&&!r?{scale:t==="bottom"?[1,1]:[-1,1],rotation:Math.PI/2}:e==="horizontal"&&r?{scale:t==="bottom"?[-1,1]:[1,1],rotation:-Math.PI/2}:e==="vertical"&&!r?{scale:t==="left"?[1,-1]:[-1,-1]}:{scale:t==="left"?[1,1]:[-1,1]})},_updateHandle:function(t,e){if(!!this._useHandle){var r=this._shapes,a=this.visualMapModel,i=r.handleThumbs,n=r.handleLabels;sB([0,1],function(o){var s=i[o];s.setStyle("fill",e.handlesColor[o]),s.position[1]=t[o];var l=xr(r.handleLabelPoints[o],Qa(s,this.group));n[o].setStyle({x:l[0],y:l[1],text:a.formatValueText(this._dataInterval[o]),textVerticalAlign:"middle",textAlign:this._applyTransform(this._orient==="horizontal"?o===0?"bottom":"top":"left",r.barGroup)})},this)}},_showIndicator:function(t,e,r,a){var i=this.visualMapModel,n=i.getExtent(),o=i.itemSize,s=[0,o[1]],l=Qr(t,n,s,!0),u=this._shapes,h=u.indicator;if(!!h){h.position[1]=l,h.attr("invisible",!1),h.setShape("points",fB(!!r,a,l,o[1]));var f={convertOpacityToAlpha:!0},c=this.getControllerVisual(t,"color",f);h.setStyle("fill",c);var v=xr(u.indicatorLabelPoint,Qa(h,this.group)),d=u.indicatorLabel;d.attr("invisible",!1);var g=this._applyTransform("left",u.barGroup),p=this._orient;d.setStyle({text:(r||"")+i.formatValueText(e),textVerticalAlign:p==="horizontal"?g:"middle",textAlign:p==="horizontal"?"center":g,x:v[0],y:v[1]})}},_enableHoverLinkToSeries:function(){var t=this;this._shapes.barGroup.on("mousemove",function(e){if(t._hovering=!0,!t._dragging){var r=t.visualMapModel.itemSize,a=t._applyTransform([e.offsetX,e.offsetY],t._shapes.barGroup,!0,!0);a[1]=Ih(Ls(0,a[1]),r[1]),t._doHoverLinkToSeries(a[1],0<=a[0]&&a[0]<=r[0])}}).on("mouseout",function(){t._hovering=!1,!t._dragging&&t._clearHoverLinkToSeries()})},_enableHoverLinkFromSeries:function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},_doHoverLinkToSeries:function(t,e){var r=this.visualMapModel,a=r.itemSize;if(!!r.option.hoverLink){var i=[0,a[1]],n=r.getExtent();t=Ih(Ls(i[0],t),i[1]);var o=cB(r,n,i),s=[t-o,t+o],l=Qr(t,i,n,!0),u=[Qr(s[0],i,n,!0),Qr(s[1],i,n,!0)];s[0]<i[0]&&(u[0]=-1/0),s[1]>i[1]&&(u[1]=1/0),e&&(u[0]===-1/0?this._showIndicator(l,u[1],"< ",o):u[1]===1/0?this._showIndicator(l,u[0],"> ",o):this._showIndicator(l,l,"\u2248 ",o));var h=this._hoverLinkDataIndices,f=[];(e||zA(r))&&(f=this._hoverLinkDataIndices=r.findTargetDataIndices(u));var c=NC(h,f);this._dispatchHighDown("downplay",Dh(c[0],r)),this._dispatchHighDown("highlight",Dh(c[1],r))}},_hoverLinkFromSeriesMouseOver:function(t){var e=t.target,r=this.visualMapModel;if(!(!e||e.dataIndex==null)){var a=this.ecModel.getSeriesByIndex(e.seriesIndex);if(!!r.isTargetSeries(a)){var i=a.getData(e.dataType),n=i.get(r.getDataDimension(i),e.dataIndex,!0);isNaN(n)||this._showIndicator(n,n)}}},_hideIndicator:function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0)},_clearHoverLinkToSeries:function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",Dh(t,this.visualMapModel)),t.length=0},_clearHoverLinkFromSeries:function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},_applyTransform:function(t,e,r,a){var i=Qa(e,a?null:this.group);return Gr[P(t)?"applyTransform":"transformDirection"](t,i,r)},_dispatchHighDown:function(t,e){e&&e.length&&this.api.dispatchAction({type:t,batch:e})},dispose:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},remove:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()}});function Mh(t,e,r,a){return new Se({shape:{points:t},draggable:!!r,cursor:e,drift:r,onmousemove:function(i){Va(i.event)},ondragend:a})}function hB(t,e){return t===0?[[0,0],[e,0],[e,-e]]:[[0,0],[e,0],[e,e]]}function fB(t,e,r,a){return t?[[0,-Ih(e,Ls(r,0))],[OA,0],[0,Ih(e,Ls(a-r,0))]]:[[0,0],[5,-5],[5,5]]}function cB(t,e,r){var a=lB/2,i=t.get("hoverLinkDataSize");return i&&(a=Qr(i,e,r,!0)/2),a}function zA(t){var e=t.get("hoverLinkOnHandle");return!!(e??t.get("realtime"))}function BA(t){return t==="vertical"?"ns-resize":"ew-resize"}var vB={type:"selectDataRange",event:"dataRangeSelected",update:"update"};lt(vB,function(t,e){e.eachComponent({mainType:"visualMap",query:t},function(r){r.setSelected(t.selected)})}),ie(IA);var dB=Ch.extend({type:"visualMap.piecewise",defaultOption:{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieceList:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0,showLabel:null},optionUpdated:function(t,e){dB.superApply(this,"optionUpdated",arguments),this._pieceList=[],this.resetExtent();var r=this._mode=this._determineMode();gB[this._mode].call(this),this._resetSelected(t,e);var a=this.option.categories;this.resetVisual(function(i,n){r==="categories"?(i.mappingMethod="category",i.categories=Y(a)):(i.dataExtent=this.getExtent(),i.mappingMethod="piecewise",i.pieceList=E(this._pieceList,function(s){var s=Y(s);return n!=="inRange"&&(s.visual=null),s}))})},completeVisualOption:function(){var t=this.option,e={},r=mt.listVisualTypes(),a=this.isCategory();T(t.pieces,function(n){T(r,function(o){n.hasOwnProperty(o)&&(e[o]=1)})}),T(e,function(n,o){var s=0;T(this.stateList,function(l){s|=i(t,l,o)||i(t.target,l,o)},this),!s&&T(this.stateList,function(l){(t[l]||(t[l]={}))[o]=up.get(o,l==="inRange"?"active":"inactive",a)})},this);function i(n,o,s){return n&&n[o]&&(Q(n[o])?n[o].hasOwnProperty(s):n[o]===s)}Ch.prototype.completeVisualOption.apply(this,arguments)},_resetSelected:function(t,e){var r=this.option,a=this._pieceList,i=(e?r:t).selected||{};if(r.selected=i,T(a,function(o,s){var l=this.getSelectedMapKey(o);i.hasOwnProperty(l)||(i[l]=!0)},this),r.selectedMode==="single"){var n=!1;T(a,function(o,s){var l=this.getSelectedMapKey(o);i[l]&&(n?i[l]=!1:n=!0)},this)}},getSelectedMapKey:function(t){return this._mode==="categories"?t.value+"":t.index+""},getPieceList:function(){return this._pieceList},_determineMode:function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},setSelected:function(t){this.option.selected=Y(t)},getValueState:function(t){var e=mt.findPieceIndex(t,this._pieceList);return e!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[e])]?"inRange":"outOfRange"},findTargetDataIndices:function(t){var e=[];return this.eachTargetSeries(function(r){var a=[],i=r.getData();i.each(this.getDataDimension(i),function(n,o){var s=mt.findPieceIndex(n,this._pieceList);s===t&&a.push(o)},this),e.push({seriesId:r.id,dataIndex:a})},this),e},getRepresentValue:function(t){var e;if(this.isCategory())e=t.value;else if(t.value!=null)e=t.value;else{var r=t.interval||[];e=r[0]===-1/0&&r[1]===1/0?0:(r[0]+r[1])/2}return e},getVisualMeta:function(t){if(this.isCategory())return;var e=[],r=[],a=this;function i(l,u){var h=a.getRepresentValue({interval:l});u||(u=a.getValueState(h));var f=t(h,u);l[0]===-1/0?r[0]=f:l[1]===1/0?r[1]=f:e.push({value:l[0],color:f},{value:l[1],color:f})}var n=this._pieceList.slice();if(!n.length)n.push({interval:[-1/0,1/0]});else{var o=n[0].interval[0];o!==-1/0&&n.unshift({interval:[-1/0,o]}),o=n[n.length-1].interval[1],o!==1/0&&n.push({interval:[o,1/0]})}var s=-1/0;return T(n,function(l){var u=l.interval;u&&(u[0]>s&&i([s,u[0]],"outOfRange"),i(u.slice()),s=u[1])},this),{stops:e,outerColors:r}}}),gB={splitNumber:function(){var t=this.option,e=this._pieceList,r=Math.min(t.precision,20),a=this.getExtent(),i=t.splitNumber;i=Math.max(parseInt(i,10),1),t.splitNumber=i;for(var n=(a[1]-a[0])/i;+n.toFixed(r)!==n&&r<5;)r++;t.precision=r,n=+n.toFixed(r),t.minOpen&&e.push({interval:[-1/0,a[0]],close:[0,0]});for(var o=0,s=a[0];o<i;s+=n,o++){var l=o===i-1?a[1]:s+n;e.push({interval:[s,l],close:[1,1]})}t.maxOpen&&e.push({interval:[a[1],1/0],close:[0,0]}),Ec(e),T(e,function(u,h){u.index=h,u.text=this.formatValueText(u.interval)},this)},categories:function(){var t=this.option;T(t.categories,function(e){this._pieceList.push({text:this.formatValueText(e,!0),value:e})},this),VA(t,this._pieceList)},pieces:function(){var t=this.option,e=this._pieceList;T(t.pieces,function(r,a){Q(r)||(r={value:r});var i={text:"",index:a};if(r.label!=null&&(i.text=r.label),r.hasOwnProperty("value")){var n=i.value=r.value;i.interval=[n,n],i.close=[1,1]}else{for(var o=i.interval=[],s=i.close=[0,0],l=[1,0,1],u=[-1/0,1/0],h=[],f=0;f<2;f++){for(var c=[["gte","gt","min"],["lte","lt","max"]][f],v=0;v<3&&o[f]==null;v++)o[f]=r[c[v]],s[f]=l[v],h[f]=v===2;o[f]==null&&(o[f]=u[f])}h[0]&&o[1]===1/0&&(s[0]=0),h[1]&&o[0]===-1/0&&(s[1]=0),z&&o[0]>o[1]&&console.warn("Piece "+a+"is illegal: "+o+" lower bound should not greater then uppper bound."),o[0]===o[1]&&s[0]&&s[1]&&(i.value=o[0])}i.visual=mt.retrieveVisuals(r),e.push(i)},this),VA(t,e),Ec(e),T(e,function(r){var a=r.close,i=[["<","\u2264"][a[1]],[">","\u2265"][a[0]]];r.text=r.text||this.formatValueText(r.value!=null?r.value:r.interval,!1,i)},this)}};function VA(t,e){var r=t.inverse;(t.orient==="vertical"?!r:r)&&e.reverse()}var f5=kA.extend({type:"visualMap.piecewise",doRender:function(){var t=this.group;t.removeAll();var e=this.visualMapModel,r=e.get("textGap"),a=e.textStyleModel,i=a.getFont(),n=a.getTextColor(),o=this._getItemAlign(),s=e.itemSize,l=this._getViewData(),u=l.endsText,h=Et(e.get("showLabel",!0),!u);u&&this._renderEndsText(t,u[0],s,h,o),T(l.viewPieceList,f,this),u&&this._renderEndsText(t,u[1],s,h,o),ei(e.get("orient"),t,e.get("itemGap")),this.renderBackground(t),this.positionGroup(t);function f(c){var v=c.piece,d=new G;d.onclick=X(this._onItemClick,this,v),this._enableHoverLink(d,c.indexInModelPieceList);var g=e.getRepresentValue(v);if(this._createItemSymbol(d,g,[0,0,s[0],s[1]]),h){var p=this.visualMapModel.getValueState(g);d.add(new nt({style:{x:o==="right"?-r:s[0]+r,y:s[1]/2,text:v.text,textVerticalAlign:"middle",textAlign:o,textFont:i,textFill:n,opacity:p==="outOfRange"?.5:1}}))}t.add(d)}},_enableHoverLink:function(t,e){t.on("mouseover",X(r,this,"highlight")).on("mouseout",X(r,this,"downplay"));function r(a){var i=this.visualMapModel;i.option.hoverLink&&this.api.dispatchAction({type:a,batch:Dh(i.findTargetDataIndices(e),i)})}},_getItemAlign:function(){var t=this.visualMapModel,e=t.option;if(e.orient==="vertical")return NA(t,this.api,t.itemSize);var r=e.align;return(!r||r==="auto")&&(r="left"),r},_renderEndsText:function(t,e,r,a,i){if(!!e){var n=new G,o=this.visualMapModel.textStyleModel;n.add(new nt({style:{x:a?i==="right"?r[0]:0:r[0]/2,y:r[1]/2,textVerticalAlign:"middle",textAlign:a?i:"center",text:e,textFont:o.getFont(),textFill:o.getTextColor()}})),t.add(n)}},_getViewData:function(){var t=this.visualMapModel,e=E(t.getPieceList(),function(n,o){return{piece:n,indexInModelPieceList:o}}),r=t.get("text"),a=t.get("orient"),i=t.get("inverse");return(a==="horizontal"?i:!i)?e.reverse():r&&(r=r.slice().reverse()),{viewPieceList:e,endsText:r}},_createItemSymbol:function(t,e,r){t.add(Le(this.getControllerVisual(e,"symbol"),r[0],r[1],r[2],r[3],this.getControllerVisual(e,"color")))},_onItemClick:function(t){var e=this.visualMapModel,r=e.option,a=Y(r.selected),i=e.getSelectedMapKey(t);r.selectedMode==="single"?(a[i]=!0,T(a,function(n,o){a[o]=o===i})):a[i]=!a[i],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:a})}});ie(IA);var GA="urn:schemas-microsoft-com:vml",HA=typeof window>"u"?null:window,FA=!1,Re=HA&&HA.document;function cp(t){return vp(t)}var vp;if(Re&&!at.canvasSupported)try{!Re.namespaces.zrvml&&Re.namespaces.add("zrvml",GA),vp=function(t){return Re.createElement("<zrvml:"+t+' class="zrvml">')}}catch{vp=function(e){return Re.createElement("<"+e+' xmlns="'+GA+'" class="zrvml">')}}function pB(){if(!(FA||!Re)){FA=!0;var t=Re.styleSheets;t.length<31?Re.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):t[0].addRule(".zrvml","behavior:url(#default#VML)")}}var Mi=me.CMD,gt=Math.round,Ps=Math.sqrt,mB=Math.abs,WA=Math.cos,UA=Math.sin,dp=Math.max;if(!at.canvasSupported){var Gt=",",gp="progid:DXImageTransform.Microsoft",Lt=21600,we=Lt/2,yB=1e5,_B=1e3,pp=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=Lt+","+Lt,t.coordorigin="0,0"},xB=function(t){return String(t).replace(/&/g,"&amp;").replace(/"/g,"&quot;")},$A=function(t,e,r){return"rgb("+[t,e,r].join(",")+")"},Mr=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},Es=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},mp=function(t,e,r){return(parseFloat(t)||0)*yB+(parseFloat(e)||0)*_B+r},ZA=Vf,YA=function(t,e,r){var a=be(e);r=+r,isNaN(r)&&(r=1),a&&(t.color=$A(a[0],a[1],a[2]),t.opacity=r*a[3])},wB=function(t){var e=be(t);return[$A(e[0],e[1],e[2]),e[3]]},bB=function(t,e,r){var a=e.fill;if(a!=null)if(a instanceof yr){var i,n=0,o=[0,0],s=0,l=1,u=r.getBoundingRect(),h=u.width,f=u.height;if(a.type==="linear"){i="gradient";var c=r.transform,v=[a.x*h,a.y*f],d=[a.x2*h,a.y2*f];c&&(xt(v,v,c),xt(d,d,c));var g=d[0]-v[0],p=d[1]-v[1];n=Math.atan2(g,p)*180/Math.PI,n<0&&(n+=360),n<1e-6&&(n=0)}else{i="gradientradial";var v=[a.x*h,a.y*f],c=r.transform,m=r.scale,y=h,_=f;o=[(v[0]-u.x)/y,(v[1]-u.y)/_],c&&xt(v,v,c),y/=m[0]*Lt,_/=m[1]*Lt;var x=dp(y,_);s=2*0/x,l=2*a.r/x-s}var w=a.colorStops.slice();w.sort(function(O,V){return O.offset-V.offset});for(var S=w.length,b=[],A=[],C=0;C<S;C++){var D=w[C],I=wB(D.color);A.push(D.offset*l+s+" "+I[0]),(C===0||C===S-1)&&b.push(I)}if(S>=2){var L=b[0][0],M=b[1][0],B=b[0][1]*e.opacity,k=b[1][1]*e.opacity;t.type=i,t.method="none",t.focus="100%",t.angle=n,t.color=L,t.color2=M,t.colors=A.join(","),t.opacity=k,t.opacity2=B}i==="radial"&&(t.focusposition=o.join(","))}else YA(t,a,e.opacity)},SB=function(t,e){e.lineDash&&(t.dashstyle=e.lineDash.join(" ")),e.stroke!=null&&!(e.stroke instanceof yr)&&YA(t,e.stroke,e.opacity)},Lh=function(t,e,r,a){var i=e==="fill",n=t.getElementsByTagName(e)[0];r[e]!=null&&r[e]!=="none"&&(i||!i&&r.lineWidth)?(t[i?"filled":"stroked"]="true",r[e]instanceof yr&&Es(t,n),n||(n=cp(e)),i?bB(n,r,a):SB(n,r),Mr(t,n)):(t[i?"filled":"stroked"]="false",Es(t,n))},ke=[[],[],[]],AB=function(t,e){var r=Mi.M,a=Mi.C,i=Mi.L,n=Mi.A,o=Mi.Q,s=[],l,u,h,f,c,v,d=t.data,g=t.len();for(f=0;f<g;){switch(h=d[f++],u="",l=0,h){case r:u=" m ",l=1,c=d[f++],v=d[f++],ke[0][0]=c,ke[0][1]=v;break;case i:u=" l ",l=1,c=d[f++],v=d[f++],ke[0][0]=c,ke[0][1]=v;break;case o:case a:u=" c ",l=3;var H=d[f++],W=d[f++],p=d[f++],m=d[f++],y,_;h===o?(y=p,_=m,p=(p+2*H)/3,m=(m+2*W)/3,H=(c+2*H)/3,W=(v+2*W)/3):(y=d[f++],_=d[f++]),ke[0][0]=H,ke[0][1]=W,ke[1][0]=p,ke[1][1]=m,ke[2][0]=y,ke[2][1]=_,c=y,v=_;break;case n:var x=0,w=0,S=1,b=1,A=0;e&&(x=e[4],w=e[5],S=Ps(e[0]*e[0]+e[1]*e[1]),b=Ps(e[2]*e[2]+e[3]*e[3]),A=Math.atan2(-e[1]/b,e[0]/S));var C=d[f++],D=d[f++],I=d[f++],L=d[f++],M=d[f++]+A,B=d[f++]+M+A;f++;var k=d[f++],O=C+WA(M)*I,V=D+UA(M)*L,H=C+WA(B)*I,W=D+UA(B)*L,F=k?" wa ":" at ";Math.abs(O-H)<1e-4&&(Math.abs(B-M)>.01?k&&(O+=270/Lt):Math.abs(V-D)<1e-4?k&&O<C||!k&&O>C?W-=270/Lt:W+=270/Lt:k&&V<D||!k&&V>D?H+=270/Lt:H-=270/Lt),s.push(F,gt(((C-I)*S+x)*Lt-we),Gt,gt(((D-L)*b+w)*Lt-we),Gt,gt(((C+I)*S+x)*Lt-we),Gt,gt(((D+L)*b+w)*Lt-we),Gt,gt((O*S+x)*Lt-we),Gt,gt((V*b+w)*Lt-we),Gt,gt((H*S+x)*Lt-we),Gt,gt((W*b+w)*Lt-we)),c=H,v=W;break;case Mi.R:var N=ke[0],$=ke[1];N[0]=d[f++],N[1]=d[f++],$[0]=N[0]+d[f++],$[1]=N[1]+d[f++],e&&(xt(N,N,e),xt($,$,e)),N[0]=gt(N[0]*Lt-we),$[0]=gt($[0]*Lt-we),N[1]=gt(N[1]*Lt-we),$[1]=gt($[1]*Lt-we),s.push(" m ",N[0],Gt,N[1]," l ",$[0],Gt,N[1]," l ",$[0],Gt,$[1]," l ",N[0],Gt,$[1]);break;case Mi.Z:s.push(" x ")}if(l>0){s.push(u);for(var et=0;et<l;et++){var vt=ke[et];e&&xt(vt,vt,e),s.push(gt(vt[0]*Lt-we),Gt,gt(vt[1]*Lt-we),et<l-1?Gt:"")}}}return s.join("")};st.prototype.brushVML=function(t){var e=this.style,r=this._vmlEl;r||(r=cp("shape"),pp(r),this._vmlEl=r),Lh(r,"fill",e,this),Lh(r,"stroke",e,this);var a=this.transform,i=a!=null,n=r.getElementsByTagName("stroke")[0];if(n){var o=e.lineWidth;if(i&&!e.strokeNoScale){var s=a[0]*a[3]-a[1]*a[2];o*=Ps(mB(s))}n.weight=o+"px"}var l=this.path||(this.path=new me);this.__dirtyPath&&(l.beginPath(),l.subPixelOptimize=!1,this.buildPath(l,this.shape),l.toStatic(),this.__dirtyPath=!1),r.path=AB(l,this.transform),r.style.zIndex=mp(this.zlevel,this.z,this.z2),Mr(t,r),e.text!=null?this.drawRectText(t,this.getBoundingRect()):this.removeRectText(t)},st.prototype.onRemove=function(t){Es(t,this._vmlEl),this.removeRectText(t)},st.prototype.onAdd=function(t){Mr(t,this._vmlEl),this.appendRectText(t)};var TB=function(t){return typeof t=="object"&&t.tagName&&t.tagName.toUpperCase()==="IMG"};Qt.prototype.brushVML=function(t){var e=this.style,r=e.image,a,i;if(TB(r)){var n=r.src;if(n===this._imageSrc)a=this._imageWidth,i=this._imageHeight;else{var o=r.runtimeStyle,s=o.width,l=o.height;o.width="auto",o.height="auto",a=r.width,i=r.height,o.width=s,o.height=l,this._imageSrc=n,this._imageWidth=a,this._imageHeight=i}r=n}else r===this._imageSrc&&(a=this._imageWidth,i=this._imageHeight);if(!!r){var u=e.x||0,h=e.y||0,f=e.width,c=e.height,v=e.sWidth,d=e.sHeight,g=e.sx||0,p=e.sy||0,m=v&&d,y=this._vmlEl;y||(y=Re.createElement("div"),pp(y),this._vmlEl=y);var _=y.style,x=!1,w,S=1,b=1;if(this.transform&&(w=this.transform,S=Ps(w[0]*w[0]+w[1]*w[1]),b=Ps(w[2]*w[2]+w[3]*w[3]),x=w[1]||w[2]),x){var A=[u,h],C=[u+f,h],D=[u,h+c],I=[u+f,h+c];xt(A,A,w),xt(C,C,w),xt(D,D,w),xt(I,I,w);var L=dp(A[0],C[0],D[0],I[0]),M=dp(A[1],C[1],D[1],I[1]),B=[];B.push("M11=",w[0]/S,Gt,"M12=",w[2]/b,Gt,"M21=",w[1]/S,Gt,"M22=",w[3]/b,Gt,"Dx=",gt(u*S+w[4]),Gt,"Dy=",gt(h*b+w[5])),_.padding="0 "+gt(L)+"px "+gt(M)+"px 0",_.filter=gp+".Matrix("+B.join("")+", SizingMethod=clip)"}else w&&(u=u*S+w[4],h=h*b+w[5]),_.filter="",_.left=gt(u)+"px",_.top=gt(h)+"px";var k=this._imageEl,O=this._cropEl;k||(k=Re.createElement("div"),this._imageEl=k);var V=k.style;if(m){if(a&&i)V.width=gt(S*a*f/v)+"px",V.height=gt(b*i*c/d)+"px";else{var H=new Image,W=this;H.onload=function(){H.onload=null,a=H.width,i=H.height,V.width=gt(S*a*f/v)+"px",V.height=gt(b*i*c/d)+"px",W._imageWidth=a,W._imageHeight=i,W._imageSrc=r},H.src=r}O||(O=Re.createElement("div"),O.style.overflow="hidden",this._cropEl=O);var F=O.style;F.width=gt((f+g*f/v)*S),F.height=gt((c+p*c/d)*b),F.filter=gp+".Matrix(Dx="+-g*f/v*S+",Dy="+-p*c/d*b+")",O.parentNode||y.appendChild(O),k.parentNode!==O&&O.appendChild(k)}else V.width=gt(S*f)+"px",V.height=gt(b*c)+"px",y.appendChild(k),O&&O.parentNode&&(y.removeChild(O),this._cropEl=null);var N="",$=e.opacity;$<1&&(N+=".Alpha(opacity="+gt($*100)+") "),N+=gp+".AlphaImageLoader(src="+r+", SizingMethod=scale)",V.filter=N,y.style.zIndex=mp(this.zlevel,this.z,this.z2),Mr(t,y),e.text!=null&&this.drawRectText(t,this.getBoundingRect())}},Qt.prototype.onRemove=function(t){Es(t,this._vmlEl),this._vmlEl=null,this._cropEl=null,this._imageEl=null,this.removeRectText(t)},Qt.prototype.onAdd=function(t){Mr(t,this._vmlEl),this.appendRectText(t)};var yp="normal",_p={},xp=0,CB=100,DB=document.createElement("div"),IB=function(t){var e=_p[t];if(!e){xp>CB&&(xp=0,_p={});var r=DB.style,a;try{r.font=t,a=r.fontFamily.split(",")[0]}catch{}e={style:r.fontStyle||yp,variant:r.fontVariant||yp,weight:r.fontWeight||yp,size:parseFloat(r.fontSize||12)|0,family:a||"Microsoft YaHei"},_p[t]=e,xp++}return e},ka;oC("measureText",function(t,e){var r=Re;ka||(ka=r.createElement("div"),ka.style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",Re.body.appendChild(ka));try{ka.style.font=e}catch{}return ka.innerHTML="",ka.appendChild(r.createTextNode(t)),{width:ka.offsetWidth}});for(var wp=new it,MB=function(t,e,r,a){var i=this.style;this.__dirty&&oo(i,!0);var n=i.text;if(n!=null&&(n+=""),!!n){if(i.rich){var o=Pf(n,i);n=[];for(var s=0;s<o.lines.length;s++){for(var l=o.lines[s].tokens,u=[],h=0;h<l.length;h++)u.push(l[h].text);n.push(u.join(""))}n=n.join(`
`)}var f,c,v=i.textAlign,d=i.textVerticalAlign,g=IB(i.font),p=g.style+" "+g.variant+" "+g.weight+" "+g.size+'px "'+g.family+'"';r=r||cr(n,p,v,d,i.textPadding,i.textLineHeight);var m=this.transform;if(m&&!a&&(wp.copy(e),wp.applyTransform(m),e=wp),a)f=e.x,c=e.y;else{var y=i.textPosition;if(y instanceof Array)f=e.x+ZA(y[0],e.width),c=e.y+ZA(y[1],e.height),v=v||"left";else{var _=this.calculateTextPosition?this.calculateTextPosition({},i,e):If({},i,e);f=_.x,c=_.y,v=v||_.textAlign,d=d||_.textVerticalAlign}}f=no(f,r.width,v),c=Zi(c,r.height,d),c+=r.height/2;var x=cp,w=this._textVmlEl,S,b,A;w?(A=w.firstChild,S=A.nextSibling,b=S.nextSibling):(w=x("line"),S=x("path"),b=x("textpath"),A=x("skew"),b.style["v-text-align"]="left",pp(w),S.textpathok=!0,b.on=!0,w.from="0 0",w.to="1000 0.05",Mr(w,A),Mr(w,S),Mr(w,b),this._textVmlEl=w);var C=[f,c],D=w.style;m&&a?(xt(C,C,m),A.on=!0,A.matrix=m[0].toFixed(3)+Gt+m[2].toFixed(3)+Gt+m[1].toFixed(3)+Gt+m[3].toFixed(3)+",0,0",A.offset=(gt(C[0])||0)+","+(gt(C[1])||0),A.origin="0 0",D.left="0px",D.top="0px"):(A.on=!1,D.left=gt(f)+"px",D.top=gt(c)+"px"),b.string=xB(n);try{b.style.font=p}catch{}Lh(w,"fill",{fill:i.textFill,opacity:i.opacity},this),Lh(w,"stroke",{stroke:i.textStroke,opacity:i.opacity,lineDash:i.lineDash||null},this),w.style.zIndex=mp(this.zlevel,this.z,this.z2),Mr(t,w)}},LB=function(t){Es(t,this._textVmlEl),this._textVmlEl=null},PB=function(t){Mr(t,this._textVmlEl)},XA=[nl,ve,Qt,st,nt],bp=0;bp<XA.length;bp++){var Sp=XA[bp].prototype;Sp.drawRectText=MB,Sp.removeRectText=LB,Sp.appendRectText=PB}nt.prototype.brushVML=function(t){var e=this.style;e.text!=null?this.drawRectText(t,{x:e.x||0,y:e.y||0,width:0,height:0},this.getBoundingRect(),!0):this.removeRectText(t)},nt.prototype.onRemove=function(t){this.removeRectText(t)},nt.prototype.onAdd=function(t){this.appendRectText(t)}}function Hn(t){return parseInt(t,10)}function Ph(t,e){pB(),this.root=t,this.storage=e;var r=document.createElement("div"),a=document.createElement("div");r.style.cssText="display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;",a.style.cssText="position:absolute;left:0;top:0;",t.appendChild(r),this._vmlRoot=a,this._vmlViewport=r,this.resize();var i=e.delFromStorage,n=e.addToStorage;e.delFromStorage=function(o){i.call(e,o),o&&o.onRemove&&o.onRemove(a)},e.addToStorage=function(o){o.onAdd&&o.onAdd(a),n.call(e,o)},this._firstPaint=!0}Ph.prototype={constructor:Ph,getType:function(){return"vml"},getViewportRoot:function(){return this._vmlViewport},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(){var t=this.storage.getDisplayList(!0,!0);this._paintList(t)},_paintList:function(t){for(var e=this._vmlRoot,r=0;r<t.length;r++){var a=t[r];a.invisible||a.ignore?(a.__alreadyNotVisible||a.onRemove(e),a.__alreadyNotVisible=!0):(a.__alreadyNotVisible&&a.onAdd(e),a.__alreadyNotVisible=!1,a.__dirty&&(a.beforeBrush&&a.beforeBrush(),(a.brushVML||a.brush).call(a,e),a.afterBrush&&a.afterBrush())),a.__dirty=!1}this._firstPaint&&(this._vmlViewport.appendChild(e),this._firstPaint=!1)},resize:function(r,a){var r=r??this._getWidth(),a=a??this._getHeight();if(this._width!==r||this._height!==a){this._width=r,this._height=a;var i=this._vmlViewport.style;i.width=r+"px",i.height=a+"px"}},dispose:function(){this.root.innerHTML="",this._vmlRoot=this._vmlViewport=this.storage=null},getWidth:function(){return this._width},getHeight:function(){return this._height},clear:function(){this._vmlViewport&&this.root.removeChild(this._vmlViewport)},_getWidth:function(){var t=this.root,e=t.currentStyle;return(t.clientWidth||Hn(e.width))-Hn(e.paddingLeft)-Hn(e.paddingRight)|0},_getHeight:function(){var t=this.root,e=t.currentStyle;return(t.clientHeight||Hn(e.height))-Hn(e.paddingTop)-Hn(e.paddingBottom)|0}};function EB(t){return function(){aa('In IE8.0 VML mode painter not support method "'+t+'"')}}T(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(t){Ph.prototype[t]=EB(t)}),rc("vml",Ph);var RB="http://www.w3.org/2000/svg";function Lr(t){return document.createElementNS(RB,t)}var Li=me.CMD,kB=Array.prototype.join,Fn="none",Ap=Math.round,qA=Math.sin,KA=Math.cos,QA=Math.PI,Na=Math.PI*2,NB=180/QA,JA=1e-4;function hr(t){return Ap(t*1e4)/1e4}function jA(t){return t<JA&&t>-JA}function OB(t,e){var r=e?t.textFill:t.fill;return r!=null&&r!==Fn}function zB(t,e){var r=e?t.textStroke:t.stroke;return r!=null&&r!==Fn}function Tp(t,e){e&&Pt(t,"transform","matrix("+kB.call(e,",")+")")}function Pt(t,e,r){(!r||r.type!=="linear"&&r.type!=="radial")&&t.setAttribute(e,r)}function BB(t,e,r){t.setAttributeNS("http://www.w3.org/1999/xlink",e,r)}function tT(t,e,r,a){if(OB(e,r)){var i=r?e.textFill:e.fill;i=i==="transparent"?Fn:i,Pt(t,"fill",i),Pt(t,"fill-opacity",e.fillOpacity!=null?e.fillOpacity*e.opacity:e.opacity)}else Pt(t,"fill",Fn);if(zB(e,r)){var n=r?e.textStroke:e.stroke;n=n==="transparent"?Fn:n,Pt(t,"stroke",n);var o=r?e.textStrokeWidth:e.lineWidth,s=!r&&e.strokeNoScale?a.getLineScale():1;Pt(t,"stroke-width",o/s),Pt(t,"paint-order",r?"stroke":"fill"),Pt(t,"stroke-opacity",e.strokeOpacity!=null?e.strokeOpacity:e.opacity);var l=e.lineDash;l?(Pt(t,"stroke-dasharray",e.lineDash.join(",")),Pt(t,"stroke-dashoffset",Ap(e.lineDashOffset||0))):Pt(t,"stroke-dasharray",""),e.lineCap&&Pt(t,"stroke-linecap",e.lineCap),e.lineJoin&&Pt(t,"stroke-linejoin",e.lineJoin),e.miterLimit&&Pt(t,"stroke-miterlimit",e.miterLimit)}else Pt(t,"stroke",Fn)}function VB(t){for(var e=[],r=t.data,a=t.len(),i=0;i<a;){var n=r[i++],o="",s=0;switch(n){case Li.M:o="M",s=2;break;case Li.L:o="L",s=2;break;case Li.Q:o="Q",s=4;break;case Li.C:o="C",s=6;break;case Li.A:var l=r[i++],u=r[i++],h=r[i++],f=r[i++],c=r[i++],v=r[i++],d=r[i++],g=r[i++],p=Math.abs(v),m=jA(p-Na)||(g?v>=Na:-v>=Na),y=v>0?v%Na:v%Na+Na,_=!1;m?_=!0:jA(p)?_=!1:_=y>=QA==!!g;var x=hr(l+h*KA(c)),w=hr(u+f*qA(c));m&&(g?v=Na-1e-4:v=-Na+1e-4,_=!0,i===9&&e.push("M",x,w));var S=hr(l+h*KA(c+v)),b=hr(u+f*qA(c+v));e.push("A",hr(h),hr(f),Ap(d*NB),+_,+g,S,b);break;case Li.Z:o="Z";break;case Li.R:var S=hr(r[i++]),b=hr(r[i++]),A=hr(r[i++]),C=hr(r[i++]);e.push("M",S,b,"L",S+A,b,"L",S+A,b+C,"L",S,b+C,"L",S,b);break}o&&e.push(o);for(var D=0;D<s;D++)e.push(hr(r[i++]))}return e.join(" ")}var Rs={};Rs.brush=function(t){var e=t.style,r=t.__svgEl;r||(r=Lr("path"),t.__svgEl=r),t.path||t.createPathProxy();var a=t.path;if(t.__dirtyPath){a.beginPath(),a.subPixelOptimize=!1,t.buildPath(a,t.shape),t.__dirtyPath=!1;var i=VB(a);i.indexOf("NaN")<0&&Pt(r,"d",i)}tT(r,e,!1,t),Tp(r,t.transform),e.text!=null?Rh(t,t.getBoundingRect()):Ip(t)};var Cp={};Cp.brush=function(t){var e=t.style,r=e.image;if(r instanceof HTMLImageElement){var a=r.src;r=a}if(!!r){var i=e.x||0,n=e.y||0,o=e.width,s=e.height,l=t.__svgEl;l||(l=Lr("image"),t.__svgEl=l),r!==t.__imageSrc&&(BB(l,"href",r),t.__imageSrc=r),Pt(l,"width",o),Pt(l,"height",s),Pt(l,"x",i),Pt(l,"y",n),Tp(l,t.transform),e.text!=null?Rh(t,t.getBoundingRect()):Ip(t)}};var Eh={},Dp=new it,ks={},Jr=[],GB={left:"start",right:"end",center:"middle",middle:"middle"},Rh=function(t,e){var r=t.style,a=t.transform,i=t instanceof nt||r.transformText;t.__dirty&&oo(r,!0);var n=r.text;if(n!=null&&(n+=""),!!Gf(n,r)){n==null&&(n=""),!i&&a&&(Dp.copy(e),Dp.applyTransform(a),e=Dp);var o=t.__textSvgEl;o||(o=Lr("text"),t.__textSvgEl=o);var s=o.style,l=r.font||il,u=o.__computedFont;l!==o.__styleFont&&(s.font=o.__styleFont=l,u=o.__computedFont=s.font);var h=r.textPadding,f=r.textLineHeight,c=t.__textCotentBlock;(!c||t.__dirtyText)&&(c=t.__textCotentBlock=Lf(n,u,h,f,r.truncate));var v=c.outerHeight,d=c.lineHeight;zf(ks,t,r,e);var g=ks.baseX,p=ks.baseY,m=ks.textAlign||"left",y=ks.textVerticalAlign;HB(o,i,a,r,e,g,p);var _=Zi(p,v,y),x=g,w=_;h&&(x=FB(g,m,h),w+=h[0]),w+=d/2,tT(o,r,!0,t);var S=c.canCacheByTextString,b=t.__tspanList||(t.__tspanList=[]),A=b.length;if(S&&t.__canCacheByTextString&&t.__text===n){if(t.__dirtyText&&A)for(var C=0;C<A;++C)eT(b[C],m,x,w+C*d)}else{t.__text=n,t.__canCacheByTextString=S;for(var D=c.lines,I=D.length,C=0;C<I;C++){var L=b[C],M=D[C];L?L.__zrText!==M&&(L.innerHTML="",L.appendChild(document.createTextNode(M))):(L=b[C]=Lr("tspan"),o.appendChild(L),L.appendChild(document.createTextNode(M))),eT(L,m,x,w+C*d)}if(A>I){for(;C<A;C++)o.removeChild(b[C]);b.length=I}}}};function HB(t,e,r,a,i,n,o){Hi(Jr),e&&r&&Jn(Jr,r);var s=a.textRotation;if(i&&s){var l=a.textOrigin;l==="center"?(n=i.width/2+i.x,o=i.height/2+i.y):l&&(n=l[0]+i.x,o=l[1]+i.y),Jr[4]-=n,Jr[5]-=o,Or(Jr,Jr,s),Jr[4]+=n,Jr[5]+=o}Tp(t,Jr)}function FB(t,e,r){return e==="right"?t-r[1]:e==="center"?t+r[3]/2-r[1]/2:t+r[3]}function eT(t,e,r,a){Pt(t,"dominant-baseline","middle"),Pt(t,"text-anchor",GB[e]),Pt(t,"x",r),Pt(t,"y",a)}function Ip(t){t&&t.__textSvgEl&&(t.__textSvgEl.parentNode&&t.__textSvgEl.parentNode.removeChild(t.__textSvgEl),t.__textSvgEl=null,t.__tspanList=[],t.__text=null)}Eh.drawRectText=Rh,Eh.brush=function(t){var e=t.style;e.text!=null?Rh(t,!1):Ip(t)};function rT(){}rT.prototype={diff:function(t,e,r){r||(r=function(d,g){return d===g}),this.equals=r;var a=this;t=t.slice(),e=e.slice();var i=e.length,n=t.length,o=1,s=i+n,l=[{newPos:-1,components:[]}],u=this.extractCommon(l[0],e,t,0);if(l[0].newPos+1>=i&&u+1>=n){for(var h=[],f=0;f<e.length;f++)h.push(f);return[{indices:h,count:e.length}]}function c(){for(var d=-1*o;d<=o;d+=2){var g,p=l[d-1],m=l[d+1],y=(m?m.newPos:0)-d;p&&(l[d-1]=void 0);var _=p&&p.newPos+1<i,x=m&&0<=y&&y<n;if(!_&&!x){l[d]=void 0;continue}if(!_||x&&p.newPos<m.newPos?(g=UB(m),a.pushComponent(g.components,void 0,!0)):(g=p,g.newPos++,a.pushComponent(g.components,!0,void 0)),y=a.extractCommon(g,e,t,d),g.newPos+1>=i&&y+1>=n)return WB(a,g.components,e,t);l[d]=g}o++}for(;o<=s;){var v=c();if(v)return v}},pushComponent:function(t,e,r){var a=t[t.length-1];a&&a.added===e&&a.removed===r?t[t.length-1]={count:a.count+1,added:e,removed:r}:t.push({count:1,added:e,removed:r})},extractCommon:function(t,e,r,a){for(var i=e.length,n=r.length,o=t.newPos,s=o-a,l=0;o+1<i&&s+1<n&&this.equals(e[o+1],r[s+1]);)o++,s++,l++;return l&&t.components.push({count:l}),t.newPos=o,s},tokenize:function(t){return t.slice()},join:function(t){return t.slice()}};function WB(t,e,r,a){for(var i=0,n=e.length,o=0,s=0;i<n;i++){var l=e[i];if(l.removed){for(var u=[],h=s;h<s+l.count;h++)u.push(h);l.indices=u,s+=l.count}else{for(var u=[],h=o;h<o+l.count;h++)u.push(h);l.indices=u,o+=l.count,l.added||(s+=l.count)}}return e}function UB(t){return{newPos:t.newPos,components:t.components.slice(0)}}var $B=new rT,ZB=function(t,e,r){return $B.diff(t,e,r)},YB="0",aT="1";function Ct(t,e,r,a,i){this._zrId=t,this._svgRoot=e,this._tagNames=typeof r=="string"?[r]:r,this._markLabel=a,this._domName=i||"_dom",this.nextId=0}Ct.prototype.createElement=Lr,Ct.prototype.getDefs=function(t){var e=this._svgRoot,r=this._svgRoot.getElementsByTagName("defs");return r.length===0?t?(r=e.insertBefore(this.createElement("defs"),e.firstChild),r.contains||(r.contains=function(a){var i=r.children;if(!i)return!1;for(var n=i.length-1;n>=0;--n)if(i[n]===a)return!0;return!1}),r):null:r[0]},Ct.prototype.update=function(t,e){if(!!t){var r=this.getDefs(!1);if(t[this._domName]&&r.contains(t[this._domName]))typeof e=="function"&&e(t);else{var a=this.add(t);a&&(t[this._domName]=a)}}},Ct.prototype.addDom=function(t){var e=this.getDefs(!0);e.appendChild(t)},Ct.prototype.removeDom=function(t){var e=this.getDefs(!1);e&&t[this._domName]&&(e.removeChild(t[this._domName]),t[this._domName]=null)},Ct.prototype.getDoms=function(){var t=this.getDefs(!1);if(!t)return[];var e=[];return T(this._tagNames,function(r){var a=t.getElementsByTagName(r);e=e.concat([].slice.call(a))}),e},Ct.prototype.markAllUnused=function(){var t=this.getDoms(),e=this;T(t,function(r){r[e._markLabel]=YB})},Ct.prototype.markUsed=function(t){t&&(t[this._markLabel]=aT)},Ct.prototype.removeUnused=function(){var t=this.getDefs(!1);if(!!t){var e=this.getDoms(),r=this;T(e,function(a){a[r._markLabel]!==aT&&t.removeChild(a)})}},Ct.prototype.getSvgProxy=function(t){return t instanceof st?Rs:t instanceof Qt?Cp:t instanceof nt?Eh:Rs},Ct.prototype.getTextSvgElement=function(t){return t.__textSvgEl},Ct.prototype.getSvgElement=function(t){return t.__svgEl};function Pi(t,e){Ct.call(this,t,e,["linearGradient","radialGradient"],"__gradient_in_use__")}yt(Pi,Ct),Pi.prototype.addWithoutUpdate=function(t,e){if(e&&e.style){var r=this;T(["fill","stroke"],function(a){if(e.style[a]&&(e.style[a].type==="linear"||e.style[a].type==="radial")){var i=e.style[a],n=r.getDefs(!0),o;i._dom?(o=i._dom,n.contains(i._dom)||r.addDom(o)):o=r.add(i),r.markUsed(e);var s=o.getAttribute("id");t.setAttribute(a,"url(#"+s+")")}})}},Pi.prototype.add=function(t){var e;if(t.type==="linear")e=this.createElement("linearGradient");else if(t.type==="radial")e=this.createElement("radialGradient");else return aa("Illegal gradient type."),null;return t.id=t.id||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-gradient-"+t.id),this.updateDom(t,e),this.addDom(e),e},Pi.prototype.update=function(t){var e=this;Ct.prototype.update.call(this,t,function(){var r=t.type,a=t._dom.tagName;r==="linear"&&a==="linearGradient"||r==="radial"&&a==="radialGradient"?e.updateDom(t,t._dom):(e.removeDom(t),e.add(t))})},Pi.prototype.updateDom=function(t,e){if(t.type==="linear")e.setAttribute("x1",t.x),e.setAttribute("y1",t.y),e.setAttribute("x2",t.x2),e.setAttribute("y2",t.y2);else if(t.type==="radial")e.setAttribute("cx",t.x),e.setAttribute("cy",t.y),e.setAttribute("r",t.r);else{aa("Illegal gradient type.");return}t.global?e.setAttribute("gradientUnits","userSpaceOnUse"):e.setAttribute("gradientUnits","objectBoundingBox"),e.innerHTML="";for(var r=t.colorStops,a=0,i=r.length;a<i;++a){var n=this.createElement("stop");n.setAttribute("offset",r[a].offset*100+"%");var o=r[a].color;if(o.indexOf("rgba">-1)){var s=be(o)[3],l=uf(o);n.setAttribute("stop-color","#"+l),n.setAttribute("stop-opacity",s)}else n.setAttribute("stop-color",r[a].color);e.appendChild(n)}t._dom=e},Pi.prototype.markUsed=function(t){if(t.style){var e=t.style.fill;e&&e._dom&&Ct.prototype.markUsed.call(this,e._dom),e=t.style.stroke,e&&e._dom&&Ct.prototype.markUsed.call(this,e._dom)}};function Ns(t,e){Ct.call(this,t,e,"clipPath","__clippath_in_use__")}yt(Ns,Ct),Ns.prototype.update=function(t){var e=this.getSvgElement(t);e&&this.updateDom(e,t.__clipPaths,!1);var r=this.getTextSvgElement(t);r&&this.updateDom(r,t.__clipPaths,!0),this.markUsed(t)},Ns.prototype.updateDom=function(t,e,r){if(e&&e.length>0){var a=this.getDefs(!0),i=e[0],n,o,s=r?"_textDom":"_dom";i[s]?(o=i[s].getAttribute("id"),n=i[s],a.contains(n)||a.appendChild(n)):(o="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,n=this.createElement("clipPath"),n.setAttribute("id",o),a.appendChild(n),i[s]=n);var l=this.getSvgProxy(i);if(i.transform&&i.parent.invTransform&&!r){var u=Array.prototype.slice.call(i.transform);ea(i.transform,i.parent.invTransform,i.transform),l.brush(i),i.transform=u}else l.brush(i);var h=this.getSvgElement(i);n.innerHTML="",n.appendChild(h.cloneNode()),t.setAttribute("clip-path","url(#"+o+")"),e.length>1&&this.updateDom(n,e.slice(1),r)}else t&&t.setAttribute("clip-path","none")},Ns.prototype.markUsed=function(t){var e=this;t.__clipPaths&&T(t.__clipPaths,function(r){r._dom&&Ct.prototype.markUsed.call(e,r._dom),r._textDom&&Ct.prototype.markUsed.call(e,r._textDom)})};function Oa(t,e){Ct.call(this,t,e,["filter"],"__filter_in_use__","_shadowDom")}yt(Oa,Ct),Oa.prototype.addWithoutUpdate=function(t,e){if(e&&iT(e.style)){var r;if(e._shadowDom){r=e._shadowDom;var a=this.getDefs(!0);a.contains(e._shadowDom)||this.addDom(r)}else r=this.add(e);this.markUsed(e);var i=r.getAttribute("id");t.style.filter="url(#"+i+")"}},Oa.prototype.add=function(t){var e=this.createElement("filter");return t._shadowDomId=t._shadowDomId||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-shadow-"+t._shadowDomId),this.updateDom(t,e),this.addDom(e),e},Oa.prototype.update=function(t,e){var r=e.style;if(iT(r)){var a=this;Ct.prototype.update.call(this,e,function(){a.updateDom(e,e._shadowDom)})}else this.remove(t,e)},Oa.prototype.remove=function(t,e){e._shadowDomId!=null&&(this.removeDom(t),t.style.filter="")},Oa.prototype.updateDom=function(t,e){var r=e.getElementsByTagName("feDropShadow");r.length===0?r=this.createElement("feDropShadow"):r=r[0];var a=t.style,i=t.scale&&t.scale[0]||1,n=t.scale&&t.scale[1]||1,o,s,l,u;if(a.shadowBlur||a.shadowOffsetX||a.shadowOffsetY)o=a.shadowOffsetX||0,s=a.shadowOffsetY||0,l=a.shadowBlur,u=a.shadowColor;else if(a.textShadowBlur)o=a.textShadowOffsetX||0,s=a.textShadowOffsetY||0,l=a.textShadowBlur,u=a.textShadowColor;else{this.removeDom(e,a);return}r.setAttribute("dx",o/i),r.setAttribute("dy",s/n),r.setAttribute("flood-color",u);var h=l/2/i,f=l/2/n,c=h+" "+f;r.setAttribute("stdDeviation",c),e.setAttribute("x","-100%"),e.setAttribute("y","-100%"),e.setAttribute("width",Math.ceil(l/2*200)+"%"),e.setAttribute("height",Math.ceil(l/2*200)+"%"),e.appendChild(r),t._shadowDom=e},Oa.prototype.markUsed=function(t){t._shadowDom&&Ct.prototype.markUsed.call(this,t._shadowDom)};function iT(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY||t.textShadowBlur||t.textShadowOffsetX||t.textShadowOffsetY)}function kh(t){return parseInt(t,10)}function XB(t){return t instanceof st?Rs:t instanceof Qt?Cp:t instanceof nt?Eh:Rs}function nT(t,e){return e&&t&&e.parentNode!==t}function Os(t,e,r){if(nT(t,e)&&r){var a=r.nextSibling;a?t.insertBefore(e,a):t.appendChild(e)}}function oT(t,e){if(nT(t,e)){var r=t.firstChild;r?t.insertBefore(e,r):t.appendChild(e)}}function sT(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)}function zs(t){return t.__textSvgEl}function Bs(t){return t.__svgEl}var Nh=function(t,e,r,a){this.root=t,this.storage=e,this._opts=r=Z({},r||{});var i=Lr("svg");i.setAttribute("xmlns","http://www.w3.org/2000/svg"),i.setAttribute("version","1.1"),i.setAttribute("baseProfile","full"),i.style.cssText="user-select:none;position:absolute;left:0;top:0;";var n=Lr("g");i.appendChild(n);var o=Lr("g");i.appendChild(o),this.gradientManager=new Pi(a,o),this.clipPathManager=new Ns(a,o),this.shadowManager=new Oa(a,o);var s=document.createElement("div");s.style.cssText="overflow:hidden;position:relative",this._svgDom=i,this._svgRoot=o,this._backgroundRoot=n,this._viewport=s,t.appendChild(s),s.appendChild(i),this.resize(r.width,r.height),this._visibleList=[]};Nh.prototype={constructor:Nh,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getSvgDom:function(){return this._svgDom},getSvgRoot:function(){return this._svgRoot},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(){var t=this.storage.getDisplayList(!0);this._paintList(t)},setBackgroundColor:function(t){this._backgroundRoot&&this._backgroundNode&&this._backgroundRoot.removeChild(this._backgroundNode);var e=Lr("rect");e.setAttribute("width",this.getWidth()),e.setAttribute("height",this.getHeight()),e.setAttribute("x",0),e.setAttribute("y",0),e.setAttribute("id",0),e.style.fill=t,this._backgroundRoot.appendChild(e),this._backgroundNode=e},_paintList:function(t){this.gradientManager.markAllUnused(),this.clipPathManager.markAllUnused(),this.shadowManager.markAllUnused();var e=this._svgRoot,r=this._visibleList,a=t.length,i=[],n;for(n=0;n<a;n++){var o=t[n],s=XB(o),l=Bs(o)||zs(o);o.invisible||(o.__dirty&&(s&&s.brush(o),this.clipPathManager.update(o),o.style&&(this.gradientManager.update(o.style.fill),this.gradientManager.update(o.style.stroke),this.shadowManager.update(l,o)),o.__dirty=!1),i.push(o))}var u=ZB(r,i),h;for(n=0;n<u.length;n++){var f=u[n];if(f.removed)for(var c=0;c<f.count;c++){var o=r[f.indices[c]],l=Bs(o),v=zs(o);sT(e,l),sT(e,v)}}for(n=0;n<u.length;n++){var f=u[n];if(f.added)for(var c=0;c<f.count;c++){var o=i[f.indices[c]],l=Bs(o),v=zs(o);h?Os(e,l,h):oT(e,l),l?Os(e,v,l):h?Os(e,v,h):oT(e,v),Os(e,v,l),h=v||l||h,this.gradientManager.addWithoutUpdate(l||v,o),this.shadowManager.addWithoutUpdate(l||v,o),this.clipPathManager.markUsed(o)}else if(!f.removed)for(var c=0;c<f.count;c++){var o=i[f.indices[c]],l=Bs(o),v=zs(o),l=Bs(o),v=zs(o);this.gradientManager.markUsed(o),this.gradientManager.addWithoutUpdate(l||v,o),this.shadowManager.markUsed(o),this.shadowManager.addWithoutUpdate(l||v,o),this.clipPathManager.markUsed(o),v&&Os(e,v,l),h=l||v||h}}this.gradientManager.removeUnused(),this.clipPathManager.removeUnused(),this.shadowManager.removeUnused(),this._visibleList=i},_getDefs:function(t){var e=this._svgDom,r=e.getElementsByTagName("defs");if(r.length===0)if(t){var r=e.insertBefore(Lr("defs"),e.firstChild);return r.contains||(r.contains=function(i){var n=r.children;if(!n)return!1;for(var o=n.length-1;o>=0;--o)if(n[o]===i)return!0;return!1}),r}else return null;else return r[0]},resize:function(t,e){var r=this._viewport;r.style.display="none";var a=this._opts;if(t!=null&&(a.width=t),e!=null&&(a.height=e),t=this._getSize(0),e=this._getSize(1),r.style.display="",this._width!==t||this._height!==e){this._width=t,this._height=e;var i=r.style;i.width=t+"px",i.height=e+"px";var n=this._svgDom;n.setAttribute("width",t),n.setAttribute("height",e)}this._backgroundNode&&(this._backgroundNode.setAttribute("width",t),this._backgroundNode.setAttribute("height",e))},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,r=["width","height"][t],a=["clientWidth","clientHeight"][t],i=["paddingLeft","paddingTop"][t],n=["paddingRight","paddingBottom"][t];if(e[r]!=null&&e[r]!=="auto")return parseFloat(e[r]);var o=this.root,s=document.defaultView.getComputedStyle(o);return(o[a]||kh(s[r])||kh(o.style[r]))-(kh(s[i])||0)-(kh(s[n])||0)|0},dispose:function(){this.root.innerHTML="",this._svgRoot=this._backgroundRoot=this._svgDom=this._backgroundNode=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removeChild(this._viewport)},toDataURL:function(){this.refresh();var t=encodeURIComponent(this._svgDom.outerHTML.replace(/></g,`>
\r<`));return"data:image/svg+xml;charset=UTF-8,"+t}};function qB(t){return function(){aa('In SVG mode painter not support method "'+t+'"')}}T(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","pathToImage"],function(t){Nh.prototype[t]=qB(t)}),rc("svg",Nh),rt.version=Wy,rt.dependencies=nv,rt.PRIORITY=br,rt.init=EM,rt.connect=RM,rt.disConnect=n_,rt.disconnect=kM,rt.dispose=NM,rt.getInstanceByDom=vv,rt.getInstanceById=OM,rt.registerTheme=dv,rt.registerPreprocessor=ie,rt.registerProcessor=Ie,rt.registerPostUpdate=zM,rt.registerAction=lt,rt.registerCoordinateSystem=gv,rt.getCoordinateSystemDimensions=BM,rt.registerLayout=It,rt.registerVisual=bt,rt.registerLoading=o_,rt.extendComponentModel=Me,rt.extendComponentView=Xt,rt.extendSeriesModel=su,rt.extendChartView=_e,rt.setCanvasCreator=VM,rt.registerMap=GM,rt.getMap=HM,rt.dataTool=FM,rt.zrender=EC,rt.number=$D,rt.format=KD,rt.throttle=Yl,rt.helper=k2,rt.matrix=zT,rt.vector=ST,rt.color=FT,rt.parseGeoJSON=Rv,rt.parseGeoJson=Z2,rt.util=Z_,rt.graphic=Y_,rt.List=qt,rt.Model=ht,rt.Axis=Vt,rt.env=at});var c5=uT.echarts;})();