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
58
| (()=>{var M5=Object.create;var kT=Object.defineProperty;var I5=Object.getOwnPropertyDescriptor;var L5=Object.getOwnPropertyNames;var P5=Object.getPrototypeOf,E5=Object.prototype.hasOwnProperty;var R5=(x,C)=>()=>(C||x((C={exports:{}}).exports,C),C.exports);var O5=(x,C,T,N)=>{if(C&&typeof C=="object"||typeof C=="function")for(let k of L5(C))!E5.call(x,k)&&k!==T&&kT(x,k,{get:()=>C[k],enumerable:!(N=I5(C,k))||N.enumerable});return x};var N5=(x,C,T)=>(T=x!=null?M5(P5(x)):{},O5(C||!x||!x.__esModule?kT(T,"default",{value:x,enumerable:!0}):T,x));var VT=R5((n3,BT)=>{var xa=function(x){x==null&&(x=new Date().getTime()),this.N=624,this.M=397,this.MATRIX_A=2567483615,this.UPPER_MASK=2147483648,this.LOWER_MASK=2147483647,this.mt=new Array(this.N),this.mti=this.N+1,x.constructor==Array?this.init_by_array(x,x.length):this.init_seed(x)};xa.prototype.init_seed=function(x){for(this.mt[0]=x>>>0,this.mti=1;this.mti<this.N;this.mti++){var x=this.mt[this.mti-1]^this.mt[this.mti-1]>>>30;this.mt[this.mti]=(((x&4294901760)>>>16)*1812433253<<16)+(x&65535)*1812433253+this.mti,this.mt[this.mti]>>>=0}};xa.prototype.init_by_array=function(x,C){var T,N,k;for(this.init_seed(19650218),T=1,N=0,k=this.N>C?this.N:C;k;k--){var F=this.mt[T-1]^this.mt[T-1]>>>30;this.mt[T]=(this.mt[T]^(((F&4294901760)>>>16)*1664525<<16)+(F&65535)*1664525)+x[N]+N,this.mt[T]>>>=0,T++,N++,T>=this.N&&(this.mt[0]=this.mt[this.N-1],T=1),N>=C&&(N=0)}for(k=this.N-1;k;k--){var F=this.mt[T-1]^this.mt[T-1]>>>30;this.mt[T]=(this.mt[T]^(((F&4294901760)>>>16)*1566083941<<16)+(F&65535)*1566083941)-T,this.mt[T]>>>=0,T++,T>=this.N&&(this.mt[0]=this.mt[this.N-1],T=1)}this.mt[0]=2147483648};xa.prototype.random_int=function(){var x,C=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var T;for(this.mti==this.N+1&&this.init_seed(5489),T=0;T<this.N-this.M;T++)x=this.mt[T]&this.UPPER_MASK|this.mt[T+1]&this.LOWER_MASK,this.mt[T]=this.mt[T+this.M]^x>>>1^C[x&1];for(;T<this.N-1;T++)x=this.mt[T]&this.UPPER_MASK|this.mt[T+1]&this.LOWER_MASK,this.mt[T]=this.mt[T+(this.M-this.N)]^x>>>1^C[x&1];x=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^x>>>1^C[x&1],this.mti=0}return x=this.mt[this.mti++],x^=x>>>11,x^=x<<7&2636928640,x^=x<<15&4022730752,x^=x>>>18,x>>>0};xa.prototype.random_int31=function(){return this.random_int()>>>1};xa.prototype.random_incl=function(){return this.random_int()*(1/4294967295)};xa.prototype.random=function(){return this.random_int()*(1/4294967296)};xa.prototype.random_excl=function(){return(this.random_int()+.5)*(1/4294967296)};xa.prototype.random_long=function(){var x=this.random_int()>>>5,C=this.random_int()>>>6;return(x*67108864+C)*(1/9007199254740992)};BT.exports=xa});var zT={};(function(x,C){C(x.echarts={})})(zT,function(x){"use strict";var C;typeof window<"u"?C=window.__DEV__:typeof global<"u"&&(C=global.__DEV__),typeof C>"u"&&(C=!0);var T=C,N=2311,k=function(){return N++},F={};typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?F={browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:typeof document>"u"&&typeof self<"u"?F={browser:{},os:{},node:!1,worker:!0,canvasSupported:!0,domSupported:!1}:typeof navigator>"u"?F={browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0,domSupported:!1}:F=St(navigator.userAgent);var G=F;function St(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 Ct={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},te={"[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},de=Object.prototype.toString,Yt=Array.prototype,gr=Yt.forEach,en=Yt.filter,Pr=Yt.slice,ZT=Yt.map,YT=Yt.reduce,hf={};function om(t,e){t==="createCanvas"&&(ll=null),hf[t]=e}function rt(t){if(t==null||typeof t!="object")return t;var e=t,r=de.call(t);if(r==="[object Array]"){if(!sn(t)){e=[];for(var a=0,i=t.length;a<i;a++)e[a]=rt(t[a])}}else if(te[r]){if(!sn(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]=rt(t[a])}}}else if(!Ct[r]&&!sn(t)&&!nn(t)){e={};for(var o in t)t.hasOwnProperty(o)&&(e[o]=rt(t[o]))}return e}function ut(t,e,r){if(!lt(e)||!lt(t))return r?rt(e):t;for(var a in e)if(e.hasOwnProperty(a)){var i=t[a],n=e[a];lt(n)&<(i)&&!z(n)&&!z(i)&&!nn(n)&&!nn(i)&&!ff(n)&&!ff(i)&&!sn(n)&&!sn(i)?ut(i,n,r):(r||!(a in t))&&(t[a]=rt(e[a],!0))}return t}function go(t,e){for(var r=t[0],a=1,i=t.length;a<i;a++)r=ut(r,t[a],e);return r}function et(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t}function J(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 rn=function(){return hf.createCanvas()};hf.createCanvas=function(){return document.createElement("canvas")};var ll;function sm(){return ll||(ll=rn().getContext("2d")),ll}function yt(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 It(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 Dt(t,e,r){t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,J(t,e,r)}function Qr(t){if(!!t)return typeof t=="string"?!1:typeof t.length=="number"}function M(t,e,r){if(!!(t&&e))if(t.forEach&&t.forEach===gr)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 V(t,e,r){if(!!(t&&e)){if(t.map&&t.map===ZT)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 an(t,e,r,a){if(!!(t&&e)){if(t.reduce&&t.reduce===YT)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 ee(t,e,r){if(!!(t&&e)){if(t.filter&&t.filter===en)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 lm(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 it(t,e){var r=Pr.call(arguments,2);return function(){return t.apply(e,r.concat(Pr.call(arguments)))}}function ot(t){var e=Pr.call(arguments,1);return function(){return t.apply(this,e.concat(Pr.call(arguments)))}}function z(t){return de.call(t)==="[object Array]"}function se(t){return typeof t=="function"}function Lt(t){return de.call(t)==="[object String]"}function lt(t){var e=typeof t;return e==="function"||!!t&&e==="object"}function ff(t){return!!Ct[de.call(t)]}function pr(t){return!!te[de.call(t)]}function nn(t){return typeof t=="object"&&typeof t.nodeType=="number"&&typeof t.ownerDocument=="object"}function po(t){return t!==t}function Ut(t){for(var e=0,r=arguments.length;e<r;e++)if(arguments[e]!=null)return arguments[e]}function Xt(t,e){return t??e}function ni(t,e,r){return t??e??r}function on(){return Function.call.apply(Pr,arguments)}function cf(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 gt(t,e){if(!t)throw new Error(e)}function tr(t){return t==null?null:typeof t.trim=="function"?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var um="__ec_primitive__";function vf(t){t[um]=!0}function sn(t){return t[um]}function ul(t){var e=z(t);this.data={};var r=this;t instanceof ul?t.each(a):t&&M(t,a);function a(i,n){e?r.set(i,n):r.set(n,i)}}ul.prototype={constructor:ul,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=it(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 ht(t){return new ul(t)}function df(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 ce(){}var XT=(Object.freeze||Object)({$override:om,clone:rt,merge:ut,mergeAll:go,extend:et,defaults:J,createCanvas:rn,getContext:sm,indexOf:yt,inherits:It,mixin:Dt,isArrayLike:Qr,each:M,map:V,reduce:an,filter:ee,find:lm,bind:it,curry:ot,isArray:z,isFunction:se,isString:Lt,isObject:lt,isBuiltInObject:ff,isTypedArray:pr,isDom:nn,eqNaN:po,retrieve:Ut,retrieve2:Xt,retrieve3:ni,slice:on,normalizeCssArray:cf,assert:gt,trim:tr,setAsPrimitive:vf,isPrimitive:sn,createHashMap:ht,concatArray:df,noop:ce}),hm=typeof Float32Array>"u"?Array:Float32Array;function wa(t,e){var r=new hm(2);return t==null&&(t=0),e==null&&(e=0),r[0]=t,r[1]=e,r}function ge(t,e){return t[0]=e[0],t[1]=e[1],t}function mr(t){var e=new hm(2);return e[0]=t[0],e[1]=t[1],e}function fm(t,e,r){return t[0]=e,t[1]=r,t}function gf(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t}function mo(t,e,r,a){return t[0]=e[0]+r[0]*a,t[1]=e[1]+r[1]*a,t}function Jr(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t}function yo(t){return Math.sqrt(pf(t))}var qT=yo;function pf(t){return t[0]*t[0]+t[1]*t[1]}var KT=pf;function jT(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t}function QT(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t}function JT(t,e){return t[0]*e[0]+t[1]*e[1]}function hl(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t}function ln(t,e){var r=yo(e);return r===0?(t[0]=0,t[1]=0):(t[0]=e[0]/r,t[1]=e[1]/r),t}function _o(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var ta=_o;function cm(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}var ba=cm;function tC(t,e){return t[0]=-e[0],t[1]=-e[1],t}function vm(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 Pt(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 ea(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t}function ra(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t}var eC=(Object.freeze||Object)({create:wa,copy:ge,clone:mr,set:fm,add:gf,scaleAndAdd:mo,sub:Jr,len:yo,length:qT,lenSquare:pf,lengthSquare:KT,mul:jT,div:QT,dot:JT,scale:hl,normalize:ln,distance:_o,dist:ta,distanceSquare:cm,distSquare:ba,negate:tC,lerp:vm,applyTransform:Pt,min:ea,max:ra});function fl(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this)}fl.prototype={constructor:fl,_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(un(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(un(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(un(s,t),"dragleave",t.event),o&&o!==s&&this.dispatchToElement(un(o,t),"dragenter",t.event))}},_dragEnd:function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.dispatchToElement(un(e,t),"dragend",t.event),this._dropTarget&&this.dispatchToElement(un(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null}};function un(t,e){return{target:t,topTarget:e&&e.topTarget}}var dm=Array.prototype.slice,le=function(t){this._$handlers={},this._$eventProcessor=t};le.prototype={constructor:le,one:function(t,e,r,a){return gm(this,t,e,r,a,!0)},on:function(t,e,r,a){return gm(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=dm.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=dm.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 rC(t,e){var r=t._$eventProcessor;return e!=null&&r&&r.normalizeQuery&&(e=r.normalizeQuery(e)),e}function gm(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=rC(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 aC=Math.log(2);function mf(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)/aC);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]*mf(t,e-1,h,u,i|d,n),v++)}return n[o]=f,f}function pm(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=mf(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)*mf(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 mm="___zrEVENTSAVED",yf=[];function iC(t,e,r,a,i){return _f(yf,e,a,i,!0)&&_f(t,r,yf[0],yf[1])}function _f(t,e,r,a,i){if(e.getBoundingClientRect&&G.domSupported&&!ym(e)){var n=e[mm]||(e[mm]={}),o=nC(e,n),s=oC(o,n,i);if(s)return s(t,r,a),!0}return!1}function nC(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 oC(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?pm(l,s):pm(s,l))}function ym(t){return t.nodeName.toUpperCase()==="CANVAS"}var xf=typeof window<"u"&&!!window.addEventListener,sC=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,wf=[];function bf(t,e,r,a){return r=r||{},a||!G.canvasSupported?_m(t,e,r):G.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):_m(t,e,r),r}function _m(t,e,r){if(G.domSupported&&t.getBoundingClientRect){var a=e.clientX,i=e.clientY;if(ym(t)){var n=t.getBoundingClientRect();r.zrX=a-n.left,r.zrY=i-n.top;return}else if(_f(wf,t,a,i)){r.zrX=wf[0],r.zrY=wf[1];return}}r.zrX=r.zrY=0}function Sf(t){return t||window.event}function Er(t,e,r){if(e=Sf(e),e.zrX!=null)return e;var a=e.type,i=a&&a.indexOf("touch")>=0;if(!i)bf(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&&bf(t,n,e,r)}var o=e.button;return e.which==null&&o!==void 0&&sC.test(e.type)&&(e.which=o&1?1:o&2?3:o&4?2:0),e}function Af(t,e,r,a){xf?t.addEventListener(e,r,a):t.attachEvent("on"+e,r)}function lC(t,e,r,a){xf?t.removeEventListener(e,r,a):t.detachEvent("on"+e,r)}var oi=xf?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0};function xm(t){return t.which===2||t.which===3}var Tf=function(){this._track=[]};Tf.prototype={constructor:Tf,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=bf(r,s,{});i.points.push([l.zrX,l.zrY]),i.touches.push(s)}this._track.push(i)}},_recognize:function(t){for(var e in Cf)if(Cf.hasOwnProperty(e)){var r=Cf[e](this._track,t);if(r)return r}}};function wm(t){var e=t[1][0]-t[0][0],r=t[1][1]-t[0][1];return Math.sqrt(e*e+r*r)}function uC(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}var Cf={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=wm(a)/wm(i);!isFinite(n)&&(n=1),e.pinchScale=n;var o=uC(a);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:t[0].target,event:e}}}}},bm="silent";function hC(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:fC}}function fC(){oi(this.event)}function Sm(){}Sm.prototype.dispose=function(){};var cC=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],hn=function(t,e,r,a){le.call(this),this.storage=t,this.painter=e,this.painterRoot=a,r=r||new Sm,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,fl.call(this),this.setHandlerProxy(r)};hn.prototype={constructor:hn,setHandlerProxy:function(t){this.proxy&&this.proxy.dispose(),t&&(M(cC,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=Am(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=hC(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=vC(a[n],t,e))&&(!i.topTarget&&(i.topTarget=a[n]),o!==bm)){i.target=a[n];break}}return i},processGesture:function(t,e){this._gestureMgr||(this._gestureMgr=new Tf);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)}}},M(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){hn.prototype[t]=function(e){var r=e.zrX,a=e.zrY,i=Am(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||ta(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,t,e)}});function vC(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?bm:!0}return!1}function Am(t,e,r){var a=t.painter;return e<0||e>a.getWidth()||r<0||r>a.getHeight()}Dt(hn,le),Dt(hn,fl);var dC=typeof Float32Array>"u"?Array:Float32Array;function Ie(){var t=new dC(6);return fn(t),t}function fn(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function xo(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 Sa(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 yr(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 aa(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 wo(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 cl(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 Tm(t){var e=Ie();return xo(e,t),e}var gC=(Object.freeze||Object)({create:Ie,identity:fn,copy:xo,mul:Sa,translate:yr,rotate:aa,scale:wo,invert:cl,clone:Tm}),Df=fn,Cm=5e-5;function si(t){return t>Cm||t<-Cm}var _r=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},xr=_r.prototype;xr.transform=null,xr.needLocalTransform=function(){return si(this.rotation)||si(this.position[0])||si(this.position[1])||si(this.scale[0]-1)||si(this.scale[1]-1)};var li=[];xr.updateTransform=function(){var t=this.parent,e=t&&t.transform,r=this.needLocalTransform(),a=this.transform;if(!(r||e)){a&&Df(a);return}a=a||Ie(),r?this.getLocalTransform(a):Df(a),e&&(r?Sa(a,t.transform,a):xo(a,t.transform)),this.transform=a;var i=this.globalScaleRatio;if(i!=null&&i!==1){this.getGlobalScale(li);var n=li[0]<0?-1:1,o=li[1]<0?-1:1,s=((li[0]-n)*i+n)/li[0]||0,l=((li[1]-o)*i+o)/li[1]||0;a[0]*=s,a[1]*=s,a[2]*=l,a[3]*=l}this.invTransform=this.invTransform||Ie(),cl(this.invTransform,a)},xr.getLocalTransform=function(t){return _r.getLocalTransform(this,t)},xr.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)},xr.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var cn=[],Mf=Ie();xr.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;si(e-1)&&(e=Math.sqrt(e)),si(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)}},xr.decomposeTransform=function(){if(!!this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(Sa(cn,t.invTransform,e),e=cn);var r=this.origin;r&&(r[0]||r[1])&&(Mf[4]=r[0],Mf[5]=r[1],Sa(cn,e,Mf),cn[4]-=r[0],cn[5]-=r[1],e=cn),this.setLocalTransform(e)}},xr.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)},xr.transformCoordToLocal=function(t,e){var r=[t,e],a=this.invTransform;return a&&Pt(r,r,a),r},xr.transformCoordToGlobal=function(t,e){var r=[t,e],a=this.transform;return a&&Pt(r,r,a),r},_r.getLocalTransform=function(t,e){e=e||[],Df(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]),wo(e,e,a),i&&aa(e,e,i),r&&(e[4]+=r[0],e[5]+=r[1]),e[4]+=n[0],e[5]+=n[1],e};var vl={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-vl.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?vl.bounceIn(t*2)*.5:vl.bounceOut(t*2-1)*.5+.5}};function If(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}If.prototype={constructor:If,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"?vl[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 Dm=function(){this.head=null,this.tail=null,this._len=0},bo=Dm.prototype;bo.insert=function(t){var e=new Mm(t);return this.insertEntry(e),e},bo.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++},bo.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--},bo.len=function(){return this._len},bo.clear=function(){this.head=this.tail=null,this._len=0};var Mm=function(t){this.value=t,this.next,this.prev},Lf=function(t){this._list=new Dm,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null},Pf=Lf.prototype;Pf.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 Mm(e),o.key=t,r.insertEntry(o),a[t]=o}return i},Pf.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},Pf.clear=function(){this._list.clear(),this._map={}};var Im={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 wr(t){return t=Math.round(t),t<0?0:t>255?255:t}function pC(t){return t=Math.round(t),t<0?0:t>360?360:t}function So(t){return t<0?0:t>1?1:t}function Ef(t){return t.length&&t.charAt(t.length-1)==="%"?wr(parseFloat(t)/100*255):wr(parseInt(t,10))}function vn(t){return t.length&&t.charAt(t.length-1)==="%"?So(parseFloat(t)/100):So(parseFloat(t))}function Rf(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 Aa(t,e,r){return t+(e-t)*r}function br(t,e,r,a,i){return t[0]=e,t[1]=r,t[2]=a,t[3]=i,t}function Of(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var Lm=new Lf(20),dl=null;function dn(t,e){dl&&Of(dl,e),dl=Lm.put(t,dl||e.slice())}function Ve(t,e){if(!!t){e=e||[];var r=Lm.get(t);if(r)return Of(e,r);t=t+"";var a=t.replace(/ /g,"").toLowerCase();if(a in Im)return Of(e,Im[a]),dn(t,e),e;if(a.charAt(0)==="#"){if(a.length===4){var i=parseInt(a.substr(1),16);if(!(i>=0&&i<=4095)){br(e,0,0,0,1);return}return br(e,(i&3840)>>4|(i&3840)>>8,i&240|(i&240)>>4,i&15|(i&15)<<4,1),dn(t,e),e}else if(a.length===7){var i=parseInt(a.substr(1),16);if(!(i>=0&&i<=16777215)){br(e,0,0,0,1);return}return br(e,(i&16711680)>>16,(i&65280)>>8,i&255,1),dn(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){br(e,0,0,0,1);return}u=vn(l.pop());case"rgb":if(l.length!==3){br(e,0,0,0,1);return}return br(e,Ef(l[0]),Ef(l[1]),Ef(l[2]),u),dn(t,e),e;case"hsla":if(l.length!==4){br(e,0,0,0,1);return}return l[3]=vn(l[3]),Nf(l,e),dn(t,e),e;case"hsl":if(l.length!==3){br(e,0,0,0,1);return}return Nf(l,e),dn(t,e),e;default:return}}br(e,0,0,0,1)}}function Nf(t,e){var r=(parseFloat(t[0])%360+360)%360/360,a=vn(t[1]),i=vn(t[2]),n=i<=.5?i*(a+1):i+a-i*a,o=i*2-n;return e=e||[],br(e,wr(Rf(o,n,r+1/3)*255),wr(Rf(o,n,r)*255),wr(Rf(o,n,r-1/3)*255),1),t.length===4&&(e[3]=t[3]),e}function mC(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 Pm(t,e){var r=Ve(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 ia(r,r.length===4?"rgba":"rgb")}}function kf(t){var e=Ve(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function Ao(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]=wr(Aa(o[0],s[0],l)),r[1]=wr(Aa(o[1],s[1],l)),r[2]=wr(Aa(o[2],s[2],l)),r[3]=So(Aa(o[3],s[3],l)),r}}var yC=Ao;function Em(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=Ve(e[i]),s=Ve(e[n]),l=a-i,u=ia([wr(Aa(o[0],s[0],l)),wr(Aa(o[1],s[1],l)),wr(Aa(o[2],s[2],l)),So(Aa(o[3],s[3],l))],"rgba");return r?{color:u,leftIndex:i,rightIndex:n,value:a}:u}}var _C=Em;function gn(t,e,r,a){if(t=Ve(t),t)return t=mC(t),e!=null&&(t[0]=pC(e)),r!=null&&(t[1]=vn(r)),a!=null&&(t[2]=vn(a)),ia(Nf(t),"rgba")}function gl(t,e){if(t=Ve(t),t&&e!=null)return t[3]=So(e),ia(t,"rgba")}function ia(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 xC=(Object.freeze||Object)({parse:Ve,lift:Pm,toHex:kf,fastLerp:Ao,fastMapToColor:yC,lerp:Em,mapToColor:_C,modifyHSL:gn,modifyAlpha:gl,stringify:ia}),zf=Array.prototype.slice;function wC(t,e){return t[e]}function bC(t,e,r){t[e]=r}function Bf(t,e,r){return(e-t)*r+t}function Rm(t,e,r){return r>.5?e:t}function Om(t,e,r,a,i){var n=t.length;if(i===1)for(var o=0;o<n;o++)a[o]=Bf(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]=Bf(t[o][l],e[o][l],r)}function Nm(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]:zf.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 SC(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 km(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]=Vf(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]=Vf(t[h][c],e[h][c],r[h][c],a[h][c],i,n,o)}function Vf(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 AC(t){if(Qr(t)){var e=t.length;if(Qr(t[0])){for(var r=[],a=0;a<e;a++)r.push(zf.call(t[a]));return r}return zf.call(t)}return t}function zm(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}function TC(t){var e=t[t.length-1].value;return Qr(e&&e[0])?2:1}function CC(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=Qr(h),c=!1,v=!1,d=f?TC(a):0,g;a.sort(function(Q,j){return Q.time-j.time}),g=a[u-1].time;for(var p=[],m=[],y=a[0].value,_=!0,w=0;w<u;w++){p.push(a[w].time/g);var b=a[w].value;if(f&&SC(b,y,d)||!f&&b===y||(_=!1),y=b,typeof b=="string"){var A=Ve(b);A?(b=A,c=!0):v=!0}m.push(b)}if(!(!n&&_)){for(var S=m[u-1],w=0;w<u-1;w++)f?Nm(m[w],S,d):isNaN(m[w])&&!isNaN(S)&&!v&&!c&&(m[w]=S);f&&Nm(o(t._target,i),S,d);var D=0,I=0,L,P,R,E,Z,W;if(c)var $=[0,0,0,0];var X=function(Q,j){var U;if(j<0)U=0;else if(j<I){for(L=Math.min(D+1,u-1),U=L;U>=0&&!(p[U]<=j);U--);U=Math.min(U,u-2)}else{for(U=D;U<u&&!(p[U]>j);U++);U=Math.min(U-1,u-2)}D=U,I=j;var tt=p[U+1]-p[U];if(tt!==0)if(P=(j-p[U])/tt,l)if(E=m[U],R=m[U===0?U:U-1],Z=m[U>u-2?u-1:U+1],W=m[U>u-3?u-1:U+2],f)km(R,E,Z,W,P,P*P,P*P*P,o(Q,i),d);else{var ct;if(c)ct=km(R,E,Z,W,P,P*P,P*P*P,$,1),ct=zm($);else{if(v)return Rm(E,Z,P);ct=Vf(R,E,Z,W,P,P*P,P*P*P)}s(Q,i,ct)}else if(f)Om(m[U],m[U+1],P,o(Q,i),d);else{var ct;if(c)Om(m[U],m[U+1],P,$,1),ct=zm($);else{if(v)return Rm(m[U],m[U+1],P);ct=Bf(m[U],m[U+1],P)}s(Q,i,ct)}},K=new If({target:t._target,life:g,loop:t._loop,delay:t._delay,onframe:X,ondestroy:r});return e&&e!=="spline"&&(K.easing=e),K}}}var Gf=function(t,e,r,a){this._tracks={},this._target=t,this._loop=e||!1,this._getter=r||wC,this._setter=a||bC,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};Gf.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:AC(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=CC(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 Bm=1;typeof window<"u"&&(Bm=Math.max(window.devicePixelRatio||1,1));var DC=0,pl=Bm,Vm=function(){};DC===1&&(Vm=console.error);var Ta=Vm,ml=function(){this.animators=[]};ml.prototype={constructor:ml,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){Ta('Property "'+t+'" is not existed in element '+i.id);return}var h=i.animators,f=new Gf(r,e);return f.during(function(c){i.dirty(a)}).done(function(){h.splice(yt(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){Gm(this,t,e,r,a,i,n)},animateFrom:function(t,e,r,a,i,n){Gm(this,t,e,r,a,i,n,!0)}};function Gm(t,e,r,a,i,n,o,s){Lt(a)?(n=i,i=a,a=0):se(i)?(n=i,i="linear",a=0):se(a)?(n=a,a=0):se(r)?(n=r,r=500):r||(r=500),t.stopAnimation(),Hm(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 Hm(t,e,r,a,i,n,o){var s={},l=0;for(var u in a)!a.hasOwnProperty(u)||(r[u]!=null?lt(a[u])&&!Qr(a[u])?Hm(t,e?e+"."+u:u,r[u],a[u],i,n,o):(o?(s[u]=r[u],Fm(t,e,u,a[u])):s[u]=a[u],l++):a[u]!=null&&!o&&Fm(t,e,u,a[u]));l>0&&t.animate(e,!1).when(i??500,s).delay(n||0)}function Fm(t,e,r,a){if(!e)t.attr(r,a);else{var i={};i[e]={},i[e][r]=a,t.attr(i)}}var na=function(t){_r.call(this,t),le.call(this,t),ml.call(this,t),this.id=t.id||k()};na.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(lt(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)}},Dt(na,ml),Dt(na,_r),Dt(na,le);var yl=Pt,_l=Math.min,xl=Math.max;function vt(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}vt.prototype={constructor:vt,union:function(t){var e=_l(t.x,this.x),r=_l(t.y,this.y);this.width=xl(t.x+t.width,this.x+this.width)-e,this.height=xl(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,yl(t,t,i),yl(e,e,i),yl(r,r,i),yl(a,a,i),this.x=_l(t[0],e[0],r[0],a[0]),this.y=_l(t[1],e[1],r[1],a[1]);var n=xl(t[0],e[0],r[0],a[0]),o=xl(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=Ie();return yr(i,i,[-e.x,-e.y]),wo(i,i,[r,a]),yr(i,i,[t.x,t.y]),i},intersect:function(t){if(!t)return!1;t instanceof vt||(t=vt.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 vt(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}}},vt.create=function(t){return new vt(t.x,t.y,t.width,t.height)};var q=function(t){t=t||{},na.call(this,t);for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};q.prototype={constructor:q,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 q&&t.addChildrenToStorage(e)),r&&r.refresh()},remove:function(t){var e=this.__zr,r=this.__storage,a=this._children,i=yt(a,t);return i<0?this:(a.splice(i,1),t.parent=null,r&&(r.delFromStorage(t),t instanceof q&&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 q&&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 q&&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 q&&r.delChildrenFromStorage(t)}},dirty:function(){return this.__dirty=!0,this.__zr&&this.__zr.refresh(),this},getBoundingRect:function(t){for(var e=null,r=new vt(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}},It(q,na);var Wm=32,To=7;function MC(t){for(var e=0;t>=Wm;)e|=t&1,t>>=1;return t+e}function Um(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++;IC(t,e,i)}else for(;i<r&&a(t[i],t[i-1])>=0;)i++;return i-e}function IC(t,e,r){for(r--;e<r;){var a=t[e];t[e++]=t[r],t[r--]=a}}function $m(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 Hf(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 Ff(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 LC(t,e){var r=To,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=Ff(t[p],t,d,g,0,e);d+=y,g-=y,g!==0&&(m=Hf(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,w=v;if(t[w++]=t[_++],--p===0){for(m=0;m<d;m++)t[w+m]=o[y+m];return}if(d===1){for(m=0;m<p;m++)t[w+m]=t[_+m];t[w+p]=o[y];return}for(var b=r,A,S,D;;){A=0,S=0,D=!1;do if(e(t[_],o[y])<0){if(t[w++]=t[_++],S++,A=0,--p===0){D=!0;break}}else if(t[w++]=o[y++],A++,S=0,--d===1){D=!0;break}while((A|S)<b);if(D)break;do{if(A=Ff(t[_],o,y,d,0,e),A!==0){for(m=0;m<A;m++)t[w+m]=o[y+m];if(w+=A,y+=A,d-=A,d<=1){D=!0;break}}if(t[w++]=t[_++],--p===0){D=!0;break}if(S=Hf(o[y],t,_,p,0,e),S!==0){for(m=0;m<S;m++)t[w+m]=t[_+m];if(w+=S,_+=S,p-=S,p===0){D=!0;break}}if(t[w++]=o[y++],--d===1){D=!0;break}b--}while(A>=To||S>=To);if(D)break;b<0&&(b=0),b+=2}if(r=b,r<1&&(r=1),d===1){for(m=0;m<p;m++)t[w+m]=t[_+m];t[w+p]=o[y]}else{if(d===0)throw new Error;for(m=0;m<d;m++)t[w+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,w=g+p-1,b=0,A=0;if(t[w--]=t[y--],--d===0){for(b=w-(p-1),m=0;m<p;m++)t[b+m]=o[m];return}if(p===1){for(w-=d,y-=d,A=w+1,b=y+1,m=d-1;m>=0;m--)t[A+m]=t[b+m];t[w]=o[_];return}for(var S=r;;){var D=0,I=0,L=!1;do if(e(o[_],t[y])<0){if(t[w--]=t[y--],D++,I=0,--d===0){L=!0;break}}else if(t[w--]=o[_--],I++,D=0,--p===1){L=!0;break}while((D|I)<S);if(L)break;do{if(D=d-Ff(o[_],t,v,d,d-1,e),D!==0){for(w-=D,y-=D,d-=D,A=w+1,b=y+1,m=D-1;m>=0;m--)t[A+m]=t[b+m];if(d===0){L=!0;break}}if(t[w--]=o[_--],--p===1){L=!0;break}if(I=p-Hf(t[y],o,0,p,p-1,e),I!==0){for(w-=I,_-=I,p-=I,A=w+1,b=_+1,m=0;m<I;m++)t[A+m]=o[b+m];if(p<=1){L=!0;break}}if(t[w--]=t[y--],--d===0){L=!0;break}S--}while(D>=To||I>=To);if(L)break;S<0&&(S=0),S+=2}if(r=S,r<1&&(r=1),p===1){for(w-=d,y-=d,A=w+1,b=y+1,m=d-1;m>=0;m--)t[A+m]=t[b+m];t[w]=o[_]}else{if(p===0)throw new Error;for(b=w-(p-1),m=0;m<p;m++)t[b+m]=o[m]}}this.mergeRuns=l,this.forceMergeRuns=u,this.pushRun=s}function wl(t,e,r,a){r||(r=0),a||(a=t.length);var i=a-r;if(!(i<2)){var n=0;if(i<Wm){n=Um(t,r,a,e),$m(t,r,a,r+n,e);return}var o=new LC(t,e),s=MC(i);do{if(n=Um(t,r,a,e),n<s){var l=i;l>s&&(l=s),$m(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 Zm(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var Wf=function(){this._roots=[],this._displayList=[],this._displayListLen=0};Wf.prototype={constructor:Wf,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,G.canvasSupported&&wl(r,Zm)},_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 q&&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 q&&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=yt(this._roots,t);i>=0&&(this.delFromStorage(t),this._roots.splice(i,1),t instanceof q&&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:Zm};var PC={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1},Uf=function(t,e,r){return PC.hasOwnProperty(e)?r*=t.dpr:r},Ca={NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},$f=9,bl=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],Da=function(t){this.extendFrom(t,!1)};function EC(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 RC(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}Da.prototype={constructor:Da,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!==Ca.STYLE_BIND;t.__attrCachedBy=Ca.STYLE_BIND;for(var o=0;o<bl.length;o++){var s=bl[o],l=s[0];(n||a[l]!==i[l])&&(t[l]=Uf(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"?RC:EC,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 Zf=Da.prototype,Yf=0;Yf<bl.length;Yf++){var Xf=bl[Yf];Xf[0]in Zf||(Zf[Xf[0]]=Xf[1])}Da.getGradient=Zf.getGradient;var qf=function(t,e){this.image=t,this.repeat=e,this.type="pattern"};qf.prototype.getCanvasPattern=function(t){return t.createPattern(this.image,this.repeat||"repeat")};function OC(){return!1}function Ym(t,e,r){var a=rn(),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 Co=function(t,e,r){var a;r=r||pl,typeof t=="string"?a=Ym(t,e,r):lt(t)&&(a=t,t=a.id),this.id=t,this.dom=a;var i=a.style;i&&(a.onselectstart=OC,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};Co.prototype={constructor:Co,__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=Ym("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||Da.getGradient(a,o,{x:0,y:0,width:i,height:n}),o.__canvasGradient=h):o.image&&(h=qf.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 Kf=typeof window<"u"&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){setTimeout(t,16)},jf=new Lf(50);function NC(t){if(typeof t=="string"){var e=jf.get(t);return e&&e.image}else return t}function Xm(t,e,r,a,i){if(t)if(typeof t=="string"){if(e&&e.__zrImageSrc===t||!r)return e;var n=jf.get(t),o={hostEl:r,cb:a,cbPayload:i};return n?(e=n.image,!Sl(e)&&n.pending.push(o)):(e=new Image,e.onload=e.onerror=kC,jf.put(t,e.__cachedImgObj={image:e,pending:[o]}),e.src=e.__zrImageSrc=t),e}else return t;else return e}function kC(){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 Sl(t){return t&&t.width&&t.height}var Al={},Qf=0,zC=5e3,Jf=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,Tl="12px sans-serif",tc={};function BC(t,e){tc[t]=e}function er(t,e){e=e||Tl;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(FC(a[n],e).width,i);return Qf>zC&&(Qf=0,Al={}),Qf++,Al[r]=i,i}function Rr(t,e,r,a,i,n,o,s){return o?GC(t,e,r,a,i,n,o,s):VC(t,e,r,a,i,n,s)}function VC(t,e,r,a,i,n,o){var s=ac(t,e,i,n,o),l=er(t,e);i&&(l+=i[1]+i[3]);var u=s.outerHeight,h=Do(0,l,r),f=pn(0,u,a),c=new vt(h,f,l,u);return c.lineHeight=s.lineHeight,c}function GC(t,e,r,a,i,n,o,s){var l=ic(t,{rich:o,truncate:s,font:e,textAlign:r,textPadding:i,textLineHeight:n}),u=l.outerWidth,h=l.outerHeight,f=Do(0,u,r),c=pn(0,h,a);return new vt(f,c,u,h)}function Do(t,e,r){return r==="right"?t-=e:r==="center"&&(t-=e/2),t}function pn(t,e,r){return r==="middle"?t-=e/2:r==="bottom"&&(t-=e),t}function ec(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 rc(t,e,r,a,i){if(!e)return"";var n=(t+"").split(`
| `);i=qm(e,r,a,i);for(var o=0,s=n.length;o<s;o++)n[o]=Km(n[o],i);return n.join(`
| `)}function qm(t,e,i,a){a=et({},a),a.font=e;var i=Xt(i,"...");a.maxIterations=Xt(a.maxIterations,2);var n=a.minChar=Xt(a.minChar,0);a.cnCharWidth=er("\u56FD",e);var o=a.ascCharWidth=er("a",e);a.placeholder=Xt(a.placeholder,"");for(var s=t=Math.max(0,t-1),l=0;l<n&&s>=o;l++)s-=o;var u=er(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 Km(t,e){var r=e.containerWidth,a=e.font,i=e.contentWidth;if(!r)return"";var n=er(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?HC(t,i,e.ascCharWidth,e.cnCharWidth):n>0?Math.floor(t.length*i/n):0;t=t.substr(0,s),n=er(t,a)}return t===""&&(t=e.placeholder),t}function HC(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 jm(t){return er("\u56FD",t)}function FC(t,e){return tc.measureText(t,e)}tc.measureText=function(t,e){var r=sm();return r.font=e||Tl,r.measureText(t)};function ac(t,e,r,a,i){t!=null&&(t+="");var n=Xt(a,jm(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=qm(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]=Km(o[v],c)}return{lines:o,height:s,outerHeight:l,lineHeight:n,canCacheByTextString:u}}function ic(t,e){var r={lines:[],width:0,height:0};if(t!=null&&(t+=""),!t)return r;for(var a=Jf.lastIndex=0,i;(i=Jf.exec(t))!=null;){var n=i.index;n>a&&nc(r,t.substring(a,n)),nc(r,i[2],i[1]),a=Jf.lastIndex}a<t.length&&nc(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],w=_.styleName&&e.rich[_.styleName]||{},b=_.textPadding=w.textPadding,A=_.font=w.font||e.font,S=_.textHeight=Xt(w.textHeight,jm(A));if(b&&(S+=b[0]+b[2]),_.height=S,_.lineHeight=ni(w.textLineHeight,e.textLineHeight,S),_.textAlign=w&&w.textAlign||e.textAlign,_.textVerticalAlign=w&&w.textVerticalAlign||"middle",v!=null&&s+_.lineHeight>v)return{lines:[],width:0,height:0};_.textWidth=er(_.text,A);var D=w.textWidth,I=D==null||D==="auto";if(typeof D=="string"&&D.charAt(D.length-1)==="%")_.percentWidth=D,u.push(_),D=0;else{if(I){D=_.textWidth;var L=w.textBackgroundColor,P=L&&L.image;P&&(P=NC(P),Sl(P)&&(D=Math.max(D,P.width*S/P.height)))}var R=b?b[1]+b[3]:0;D+=R;var E=c!=null?c-m:null;E!=null&&E<D&&(!I||E<R?(_.text="",_.textWidth=D=0):(_.text=rc(_.text,E-R,A,f.ellipsis,{minChar:f.minChar}),_.textWidth=er(_.text,A),D=_.textWidth+R))}m+=_.width=D,w&&(p=Math.max(p,_.lineHeight))}g.width=m,g.lineHeight=p,s+=p,l=Math.max(l,m)}r.outerWidth=r.width=Xt(e.textWidth,l),r.outerHeight=r.height=Xt(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],Z=_.percentWidth;_.width=parseInt(Z,10)/100*l}return r}function nc(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 Qm(t){var e=(t.fontSize||t.fontFamily)&&[t.fontStyle,t.fontWeight,(t.fontSize||12)+"px",t.fontFamily||"sans-serif"].join(" ");return e&&tr(e)||t.textFont||t.font}function Jm(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 oc=Tl,WC={left:1,right:1,center:1},UC={top:1,bottom:1,middle:1},t0=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]],e0={},r0={};function Mo(t){return a0(t),M(t.rich,a0),t}function a0(t){if(t){t.font=Qm(t);var e=t.textAlign;e==="middle"&&(e="center"),t.textAlign=e==null||WC[e]?e:"left";var r=t.textVerticalAlign||t.textBaseline;r==="center"&&(r="middle"),t.textVerticalAlign=r==null||UC[r]?r:"top";var a=t.textPadding;a&&(t.textPadding=cf(t.textPadding))}}function i0(t,e,r,a,i,n){a.rich?ZC(t,e,r,a,i,n):$C(t,e,r,a,i,n)}function $C(t,e,r,a,i,n){"use strict";var o=lc(a),s,l=!1,u=e.__attrCachedBy===Ca.PLAIN_TEXT;n!==$f?(n&&(s=n.style,l=!o&&u&&s),e.__attrCachedBy=o?Ca.NONE:Ca.PLAIN_TEXT):u&&(e.__attrCachedBy=Ca.NONE);var h=a.font||oc;(!l||h!==(s.font||oc))&&(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=ac(r,f,c,v,a.truncate));var g=d.outerHeight,p=d.lines,m=d.lineHeight,y=hc(r0,t,a,i),_=y.baseX,w=y.baseY,b=y.textAlign||"left",A=y.textVerticalAlign;n0(e,a,i,_,w);var S=pn(w,g,A),D=_,I=S;if(o||c){var L=er(r,f),P=L;c&&(P+=c[1]+c[3]);var R=Do(_,P,b);o&&uc(t,e,a,R,S,P,g),c&&(D=s0(_,b,c),I+=c[0])}e.textAlign=b,e.textBaseline="middle",e.globalAlpha=a.opacity||1;for(var E=0;E<t0.length;E++){var Z=t0[E],W=Z[0],$=Z[1],X=a[W];(!l||X!==s[W])&&(e[$]=Uf(e,$,X||Z[2]))}I+=m/2;var K=a.textStrokeWidth,Q=l?s.textStrokeWidth:null,j=!l||K!==Q,U=!l||j||a.textStroke!==s.textStroke,tt=fc(a.textStroke,K),ct=o0(a.textFill);if(tt&&(j&&(e.lineWidth=K),U&&(e.strokeStyle=tt)),ct&&(!l||a.textFill!==s.textFill)&&(e.fillStyle=ct),p.length===1)tt&&e.strokeText(p[0],D,I),ct&&e.fillText(p[0],D,I);else for(var E=0;E<p.length;E++)tt&&e.strokeText(p[E],D,I),ct&&e.fillText(p[E],D,I),I+=m}function ZC(t,e,r,a,i,n){n!==$f&&(e.__attrCachedBy=Ca.NONE);var o=t.__textCotentBlock;(!o||t.__dirtyText)&&(o=t.__textCotentBlock=ic(r,a)),YC(t,e,o,a,i)}function YC(t,e,r,a,i){var n=r.width,o=r.outerWidth,s=r.outerHeight,l=a.textPadding,u=hc(r0,t,a,i),h=u.baseX,f=u.baseY,c=u.textAlign,v=u.textVerticalAlign;n0(e,a,i,h,f);var d=Do(h,o,c),g=pn(f,s,v),p=d,m=g;l&&(p+=l[3],m+=l[0]);var y=p+n;lc(a)&&uc(t,e,a,d,g,o,s);for(var _=0;_<r.lines.length;_++){for(var w=r.lines[_],b=w.tokens,A=b.length,S=w.lineHeight,D=w.width,I=0,L=p,P=y,R=A-1,E;I<A&&(E=b[I],!E.textAlign||E.textAlign==="left");)sc(t,e,E,a,S,m,L,"left"),D-=E.width,L+=E.width,I++;for(;R>=0&&(E=b[R],E.textAlign==="right");)sc(t,e,E,a,S,m,P,"right"),D-=E.width,P-=E.width,R--;for(L+=(n-(L-p)-(y-P)-D)/2;I<=R;)E=b[I],sc(t,e,E,a,S,m,L+E.width/2,"center"),L+=E.width,I++;m+=S}}function n0(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 sc(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&&lc(l)&&uc(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=s0(o,s,f),h-=r.height/2-f[2]-r.textHeight/2),pe(e,"shadowBlur",ni(l.textShadowBlur,a.textShadowBlur,0)),pe(e,"shadowColor",l.textShadowColor||a.textShadowColor||"transparent"),pe(e,"shadowOffsetX",ni(l.textShadowOffsetX,a.textShadowOffsetX,0)),pe(e,"shadowOffsetY",ni(l.textShadowOffsetY,a.textShadowOffsetY,0)),pe(e,"textAlign",s),pe(e,"textBaseline","middle"),pe(e,"font",r.font||oc);var c=fc(l.textStroke||a.textStroke,d),v=o0(l.textFill||a.textFill),d=Xt(l.textStrokeWidth,a.textStrokeWidth);c&&(pe(e,"lineWidth",d),pe(e,"strokeStyle",c),e.strokeText(r.text,o,h)),v&&(pe(e,"fillStyle",v),e.fillText(r.text,o,h))}function lc(t){return!!(t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor)}function uc(t,e,r,a,i,n,o){var s=r.textBackgroundColor,l=r.textBorderWidth,u=r.textBorderColor,h=Lt(s);if(pe(e,"shadowBlur",r.textBoxShadowBlur||0),pe(e,"shadowColor",r.textBoxShadowColor||"transparent"),pe(e,"shadowOffsetX",r.textBoxShadowOffsetX||0),pe(e,"shadowOffsetY",r.textBoxShadowOffsetY||0),h||l&&u){e.beginPath();var f=r.textBorderRadius;f?Jm(e,{x:a,y:i,width:n,height:o,r:f}):e.rect(a,i,n,o),e.closePath()}if(h)if(pe(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(lt(s)){var v=s.image;v=Xm(v,null,t,XC,s),v&&Sl(v)&&e.drawImage(v,a,i,n,o)}if(l&&u)if(pe(e,"lineWidth",l),pe(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 XC(t,e){e.image=t}function hc(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+cc(l[0],a.width),n=a.y+cc(l[1],a.height);else{var u=e&&e.calculateTextPosition?e.calculateTextPosition(e0,r,a):ec(e0,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 pe(t,e,r){return t[e]=Uf(t,e,r),t[e]}function fc(t,e){return t==null||e<=0||t==="transparent"||t==="none"?null:t.image||t.colorStops?"#000":t}function o0(t){return t==null||t==="none"?null:t.image||t.colorStops?"#000":t}function cc(t,e){return typeof t=="string"?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function s0(t,e,r){return e==="right"?t-r[1]:e==="center"?t+r[3]/2-r[1]/2:t+r[3]}function vc(t,e){return t!=null&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)}var dc=new vt,Cl=function(){};Cl.prototype={constructor:Cl,drawRectText:function(t,e){var r=this.style;e=r.textRect||e,this.__dirty&&Mo(r,!0);var a=r.text;if(a!=null&&(a+=""),!!vc(a,r)){t.save();var i=this.transform;r.transformText?this.setTransform(t):i&&(dc.copy(e),dc.applyTransform(i),e=dc),i0(this,t,a,r,e,$f),t.restore()}}};function Le(t){t=t||{},na.call(this,t);for(var e in t)t.hasOwnProperty(e)&&e!=="style"&&(this[e]=t[e]);this.style=new Da(t.style,this),this._rect=null,this.__clipPaths=null}Le.prototype={constructor:Le,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"?na.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 Da(t,this),this.dirty(!1),this},calculateTextPosition:null},It(Le,na),Dt(Le,Cl);function ve(t){Le.call(this,t)}ve.prototype={constructor:ve,type:"image",brush:function(t,e){var r=this.style,a=r.image;r.bind(t,this,e);var i=this._image=Xm(a,this._image,this,this.onload);if(!(!i||!Sl(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 vt(t.x||0,t.y||0,t.width||0,t.height||0)),this._rect}},It(ve,Le);var l0=1e5,ui=314159,Dl=.01,qC=.001;function Ml(t){return parseInt(t,10)}function KC(t){return t?t.__builtin__?!0:!(typeof t.resize!="function"||typeof t.refresh!="function"):!1}var gc=new vt(0,0,0,0),pc=new vt(0,0,0,0);function jC(t,e,r){return gc.copy(t.getBoundingRect()),t.transform&&gc.applyTransform(t.transform),pc.width=e,pc.height=r,!gc.intersect(pc)}function QC(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 JC(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 tD(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 mc=function(t,e,r){this.type="canvas";var a=!t.nodeName||t.nodeName.toUpperCase()==="CANVAS";this._opts=r=et({},r||{}),this.dpr=r.devicePixelRatio||pl,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 Co(t,this,this.dpr);h.__builtin__=!0,h.initContext(),o[ui]=h,h.zlevel=ui,n.push(ui),this._domRoot=t}else{this._width=this._getSize(0),this._height=this._getSize(1);var s=this._domRoot=tD(this._width,this._height);t.appendChild(s)}this._hoverlayer=null,this._hoverElements=[]};mc.prototype={constructor:mc,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=yt(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){wl(t,this.storage.displayableSortFunc),r||(r=this._hoverlayer=this.getLayer(l0));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(l0)},_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;Kf(function(){i._paintList(t,e,r)})}}},_compositeManually:function(){var t=this.getLayer(ui).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 G.wxa&&M(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&&jC(t,this._width,this._height))){var o=t.__clipPaths,s=a.prevElClipPaths;(!s||QC(o,s))&&(s&&(i.restore(),a.prevElClipPaths=null,a.prevEl=null),o&&(i.save(),JC(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=ui);var r=this._layers[t];return r||(r=new Co("zr_"+t,this,this.dpr),r.zlevel=t,r.__builtin__=!0,this._layerConfig[t]?ut(r,this._layerConfig[t],!0):this._layerConfig[t-Dl]&&ut(r,this._layerConfig[t-Dl],!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]){Ta("ZLevel "+t+" has been used already");return}if(!KC(e)){Ta("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+qC,this._needsManuallyCompositing),l.incremental=!0,n=1):l=this.getLayer(s+(n>0?Dl:0),this._needsManuallyCompositing),l.__builtin__||Ta("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]?ut(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+Dl){var n=this._layers[i];ut(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(yt(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);M(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(ui).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[ui].dom;var e=new Co("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]||Ml(s[r])||Ml(o.style[r]))-(Ml(s[i])||0)-(Ml(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=ve,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 Il=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,le.call(this)};Il.prototype={constructor:Il,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=yt(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&&(Kf(e),!t._paused&&t._update())}Kf(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 Gf(t,e.loop,e.getter,e.setter);return this.addAnimator(r),r}},Dt(Il,le);var eD=300,yc=G.domSupported,_c=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=V(t,function(i){var n=i.replace("mouse","pointer");return r.hasOwnProperty(n)?n:i});return{mouse:t,touch:e,pointer:a}}(),u0={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]};function h0(t){return t==="mousewheel"&&G.browser.firefox?"DOMMouseScroll":t}function xc(t){var e=t.pointerType;return e==="pen"||e==="touch"}function rD(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 wc(t){t&&(t.zrByTouch=!0)}function aD(t,e){return Er(t.dom,new c0(t,e),!0)}function f0(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 c0(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 bc=c0.prototype;bc.stopPropagation=bc.stopImmediatePropagation=bc.preventDefault=ce;var Sr={mousedown:function(t){t=Er(this.dom,t),this._mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=Er(this.dom,t);var e=this._mayPointerCapture;e&&(t.zrX!==e[0]||t.zrY!==e[1])&&Tc(this,!0),this.trigger("mousemove",t)},mouseup:function(t){t=Er(this.dom,t),Tc(this,!1),this.trigger("mouseup",t)},mouseout:function(t){t=Er(this.dom,t),this._pointerCapturing&&(t.zrEventControl="no_globalout");var e=t.toElement||t.relatedTarget;t.zrIsToLocalDOM=f0(this,e),this.trigger("mouseout",t)},touchstart:function(t){t=Er(this.dom,t),wc(t),this._lastTouchMoment=new Date,this.handler.processGesture(t,"start"),Sr.mousemove.call(this,t),Sr.mousedown.call(this,t)},touchmove:function(t){t=Er(this.dom,t),wc(t),this.handler.processGesture(t,"change"),Sr.mousemove.call(this,t)},touchend:function(t){t=Er(this.dom,t),wc(t),this.handler.processGesture(t,"end"),Sr.mouseup.call(this,t),+new Date-this._lastTouchMoment<eD&&Sr.click.call(this,t)},pointerdown:function(t){Sr.mousedown.call(this,t)},pointermove:function(t){xc(t)||Sr.mousemove.call(this,t)},pointerup:function(t){Sr.mouseup.call(this,t)},pointerout:function(t){xc(t)||Sr.mouseout.call(this,t)}};M(["click","mousewheel","dblclick","contextmenu"],function(t){Sr[t]=function(e){e=Er(this.dom,e),this.trigger(t,e)}});var Sc={pointermove:function(t){xc(t)||Sc.mousemove.call(this,t)},pointerup:function(t){Sc.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this._pointerCapturing;Tc(this,!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}};function iD(t,e){var r=e.domHandlers;G.pointerEventsSupported?M(_c.pointer,function(a){Ll(e,a,function(i){r[a].call(t,i)})}):(G.touchEventsSupported&&M(_c.touch,function(a){Ll(e,a,function(i){r[a].call(t,i),rD(e)})}),M(_c.mouse,function(a){Ll(e,a,function(i){i=Sf(i),e.touching||r[a].call(t,i)})}))}function nD(t,e){G.pointerEventsSupported?M(u0.pointer,r):G.touchEventsSupported||M(u0.mouse,r);function r(a){function i(n){n=Sf(n),f0(t,n.target)||(n=aD(t,n),e.domHandlers[a].call(t,n))}Ll(e,a,i,{capture:!0})}}function Ll(t,e,r,a){t.mounted[e]=r,t.listenerOpts[e]=a,Af(t.domTarget,h0(e),r,a)}function Ac(t){var e=t.mounted;for(var r in e)e.hasOwnProperty(r)&&lC(t.domTarget,h0(r),e[r],t.listenerOpts[r]);t.mounted={}}function Tc(t,e){if(t._mayPointerCapture=null,yc&&t._pointerCapturing^e){t._pointerCapturing=e;var r=t._globalHandlerScope;e?nD(t,r):Ac(r)}}function v0(t,e){this.domTarget=t,this.domHandlers=e,this.mounted={},this.listenerOpts={},this.touchTimer=null,this.touching=!1}function Cc(t,e){le.call(this),this.dom=t,this.painterRoot=e,this._localHandlerScope=new v0(t,Sr),yc&&(this._globalHandlerScope=new v0(document,Sc)),this._pointerCapturing=!1,this._mayPointerCapture=null,iD(this,this._localHandlerScope)}var d0=Cc.prototype;d0.dispose=function(){Ac(this._localHandlerScope),yc&&Ac(this._globalHandlerScope)},d0.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},Dt(Cc,le);/*!
| * 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 oD=!G.canvasSupported,Pl={canvas:mc},hi={},Dc="4.3.1";function Mc(t,e){var r=new Lc(k(),t,e);return hi[r.id]=r,r}function sD(t){if(t)t.dispose();else{for(var e in hi)hi.hasOwnProperty(e)&&hi[e].dispose();hi={}}return this}function lD(t){return hi[t]}function Ic(t,e){Pl[t]=e}function uD(t){delete hi[t]}var Lc=function(t,e,r){r=r||{},this.dom=e,this.id=t;var a=this,i=new Wf,n=r.renderer;if(oD){if(!Pl.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");n="vml"}else(!n||!Pl[n])&&(n="canvas");var o=new Pl[n](e,i,r,t);this.storage=i,this.painter=o;var s=!G.node&&!G.worker?new Cc(o.getViewportRoot(),o.root):null;this.handler=new hn(i,o,s,o.root),this.animation=new Il({stage:{update:it(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)}};Lc.prototype={constructor:Lc,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,uD(this.id)}};var hD=(Object.freeze||Object)({version:Dc,init:Mc,dispose:sD,getInstance:lD,registerPainter:Ic}),mn=M,yn=lt,fD=z,g0="series\0";function me(t){return t instanceof Array?t:t==null?[]:[t]}function fi(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 p0=["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 Io(t){return yn(t)&&!fD(t)&&!(t instanceof Date)?t.value:t}function cD(t){return yn(t)&&!(t instanceof Array)}function Pc(t,e){e=(e||[]).slice();var r=V(t||[],function(a,i){return{exist:a}});return mn(e,function(a,i){if(!!yn(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&&!El(a)&&!El(o)&&o.name===a.name+""){r[n].option=a,e[i]=null;return}}}}),mn(e,function(a,i){if(!!yn(a)){for(var n=0;n<r.length;n++){var o=r[n].exist;if(!r[n].option&&!El(o)&&a.id==null){r[n].option=a;break}}n>=r.length&&r.push({option:a})}}),r}function m0(t){var e=ht();mn(t,function(r,a){var i=r.exist;i&&e.set(i.id,r)}),mn(t,function(r,a){var i=r.option;gt(!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={})}),mn(t,function(r,a){var i=r.exist,n=r.option,o=r.keyInfo;if(!!yn(n)){if(o.name=n.name!=null?n.name+"":i?i.name:g0+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 Ec(t){var e=t.name;return!!(e&&e.indexOf(g0))}function El(t){return yn(t)&&t.id&&(t.id+"").indexOf("\0_ec_\0")===0}function vD(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=me(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 Rl(t,e){if(e.dataIndexInside!=null)return e.dataIndexInside;if(e.dataIndex!=null)return z(e.dataIndex)?V(e.dataIndex,function(r){return t.indexOfRawIndex(r)}):t.indexOfRawIndex(e.dataIndex);if(e.name!=null)return z(e.name)?V(e.name,function(r){return t.indexOfName(r)}):t.indexOfName(e.name)}function Pe(){var t="__\0ec_inner_"+dD+++"_"+Math.random().toFixed(5);return function(e){return e[t]||(e[t]={})}}var dD=0;function Ol(t,e,r){if(Lt(e)){var a={};a[e+"Index"]=0,e=a}var i=r&&r.defaultMainType;i&&!Rc(e,i+"Index")&&!Rc(e,i+"Id")&&!Rc(e,i+"Name")&&(e[i+"Index"]=0);var n={};return mn(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&&yt(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 Rc(t,e){return t&&t.hasOwnProperty(e)}function y0(t,e,r){t.setAttribute?t.setAttribute(e,r):t[e]=r}function gD(t,e){return t.getAttribute?t.getAttribute(e):t[e]}function _0(t){return t==="auto"?G.domSupported?"html":"richText":t||"html"}function Oc(t,e){var r=ht(),a=[];return M(t,function(i){var n=e(i);(r.get(n)||(a.push(n),r.set(n,[]))).push(i)}),{keys:a,buckets:r}}var pD=".",ci="___EC__COMPONENT__CONTAINER___";function Ma(t){var e={main:"",sub:""};return t&&(t=t.split(pD),e.main=t[0]||"",e.sub=t[1]||""),e}function mD(t){gt(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}function Lo(t,e){t.$constructor=t,t.extend=function(r){T&&M(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 et(i.prototype,r),i.extend=this.extend,i.superCall=_D,i.superApply=xD,It(i,this),i.superClass=a,i}}var yD=0;function Nl(t){var e=["__\0is_clz",yD++,Math.random().toFixed(3)].join("_");t.prototype[e]=!0,T&>(!t.isInstance,'The method "is" can not be defined.'),t.isInstance=function(r){return!!(r&&r[e])}}function _D(t,e){var r=on(arguments,2);return this.superClass.prototype[e].apply(t,r)}function xD(t,e,r){return this.superClass.prototype[e].apply(t,r)}function kl(t,e){e=e||{};var r={};t.registerClass=function(n,o){if(o){if(mD(o),o=Ma(o),!o.sub)T&&r[o.main]&&console.warn(o.main+" exists."),r[o.main]=n;else if(o.sub!==ci){var s=a(o);s[o.sub]=n}}return n},t.getClass=function(n,o,s){var l=r[n];if(l&&l[ci]&&(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=Ma(n);var o=[],s=r[n.main];return s&&s[ci]?M(s,function(l,u){u!==ci&&o.push(l)}):o.push(s),o},t.hasClass=function(n){return n=Ma(n),!!r[n.main]},t.getAllClassMainTypes=function(){var n=[];return M(r,function(o,s){n.push(s)}),n},t.hasSubTypes=function(n){n=Ma(n);var o=r[n.main];return o&&o[ci]},t.parseClassType=Ma;function a(n){var o=r[n.main];return(!o||!o[ci])&&(o=r[n.main]={},o[ci]=!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 _n=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&&yt(a,s)>=0||i&&yt(i,s)<0)){var l=r.getShallow(s);l!=null&&(n[t[o][0]]=l)}}return n}},wD=_n([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),bD={getLineStyle:function(t){var e=wD(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]}},SD=_n([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),AD={getAreaStyle:function(t,e){return SD(this,t,e)}},zl=Math.pow,Ia=Math.sqrt,Bl=1e-8,x0=1e-4,w0=Ia(3),Vl=1/3,Or=wa(),rr=wa(),xn=wa();function La(t){return t>-Bl&&t<Bl}function b0(t){return t>Bl||t<-Bl}function De(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 S0(t,e,r,a,i){var n=1-i;return 3*(((e-t)*n+2*(r-e)*i)*n+(a-r)*i*i)}function TD(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=Ia(g),_=h*s+1.5*o*(-f+y),w=h*s+1.5*o*(-f-y);_<0?_=-zl(-_,Vl):_=zl(_,Vl),w<0?w=-zl(-w,Vl):w=zl(w,Vl);var d=(-s-(_+w))/(3*o);d>=0&&d<=1&&(n[v++]=d)}else{var b=(2*h*s-3*o*f)/(2*Ia(h*h*h)),A=Math.acos(b)/3,S=Ia(h),D=Math.cos(A),d=(-s-2*S*D)/(3*o),m=(-s+S*(D+w0*Math.sin(A)))/(3*o),I=(-s+S*(D-w0*Math.sin(A)))/(3*o);d>=0&&d<=1&&(n[v++]=d),m>=0&&m<=1&&(n[v++]=m),I>=0&&I<=1&&(n[v++]=I)}}return v}function A0(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(b0(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=Ia(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 T0(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 CD(t,e,r,a,i,n,o,s,l,u,h){var f,c=.005,v=1/0,d,g,p,m;Or[0]=l,Or[1]=u;for(var y=0;y<1;y+=.05)rr[0]=De(t,r,i,o,y),rr[1]=De(e,a,n,s,y),p=ba(Or,rr),p<v&&(f=y,v=p);v=1/0;for(var _=0;_<32&&!(c<x0);_++)d=f-c,g=f+c,rr[0]=De(t,r,i,o,d),rr[1]=De(e,a,n,s,d),p=ba(rr,Or),d>=0&&p<v?(f=d,v=p):(xn[0]=De(t,r,i,o,g),xn[1]=De(e,a,n,s,g),m=ba(xn,Or),g<=1&&m<v?(f=g,v=m):c*=.5);return h&&(h[0]=De(t,r,i,o,f),h[1]=De(e,a,n,s,f)),Ia(v)}function be(t,e,r,a){var i=1-a;return i*(i*t+2*a*e)+a*a*r}function Nc(t,e,r,a){return 2*((1-a)*(e-t)+a*(r-e))}function DD(t,e,r,a,i){var n=t-2*e+r,o=2*(e-t),s=t-a,l=0;if(La(n)){if(b0(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=Ia(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 C0(t,e,r){var a=t+r-2*e;return a===0?.5:(t-e)/a}function kc(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 MD(t,e,r,a,i,n,o,s,l){var u,h=.005,f=1/0;Or[0]=o,Or[1]=s;for(var c=0;c<1;c+=.05){rr[0]=be(t,r,i,c),rr[1]=be(e,a,n,c);var v=ba(Or,rr);v<f&&(u=c,f=v)}f=1/0;for(var d=0;d<32&&!(h<x0);d++){var g=u-h,p=u+h;rr[0]=be(t,r,i,g),rr[1]=be(e,a,n,g);var v=ba(rr,Or);if(g>=0&&v<f)u=g,f=v;else{xn[0]=be(t,r,i,p),xn[1]=be(e,a,n,p);var m=ba(xn,Or);p<=1&&m<f?(u=p,f=m):h*=.5}}return l&&(l[0]=be(t,r,i,u),l[1]=be(e,a,n,u)),Ia(f)}var Ee=Math.min,Re=Math.max,zc=Math.sin,Bc=Math.cos,vi=Math.PI*2,Gl=wa(),Hl=wa(),Fl=wa();function Po(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=Ee(i,a[0]),n=Re(n,a[0]),o=Ee(o,a[1]),s=Re(s,a[1]);e[0]=i,e[1]=o,r[0]=n,r[1]=s}}function D0(t,e,r,a,i,n){i[0]=Ee(t,r),i[1]=Ee(e,a),n[0]=Re(t,r),n[1]=Re(e,a)}var M0=[],I0=[];function ID(t,e,r,a,i,n,o,s,l,u){var h=A0,f=De,c,v=h(t,r,i,o,M0);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,M0[c]);l[0]=Ee(d,l[0]),u[0]=Re(d,u[0])}for(v=h(e,a,n,s,I0),c=0;c<v;c++){var g=f(e,a,n,s,I0[c]);l[1]=Ee(g,l[1]),u[1]=Re(g,u[1])}l[0]=Ee(t,l[0]),u[0]=Re(t,u[0]),l[0]=Ee(o,l[0]),u[0]=Re(o,u[0]),l[1]=Ee(e,l[1]),u[1]=Re(e,u[1]),l[1]=Ee(s,l[1]),u[1]=Re(s,u[1])}function LD(t,e,r,a,i,n,o,s){var l=C0,u=be,h=Re(Ee(l(t,r,i),1),0),f=Re(Ee(l(e,a,n),1),0),c=u(t,r,i,h),v=u(e,a,n,f);o[0]=Ee(t,i,c),o[1]=Ee(e,n,v),s[0]=Re(t,i,c),s[1]=Re(e,n,v)}function PD(t,e,r,a,i,n,o,s,l){var u=ea,h=ra,f=Math.abs(i-n);if(f%vi<1e-4&&f>1e-4){s[0]=t-r,s[1]=e-a,l[0]=t+r,l[1]=e+a;return}if(Gl[0]=Bc(i)*r+t,Gl[1]=zc(i)*a+e,Hl[0]=Bc(n)*r+t,Hl[1]=zc(n)*a+e,u(s,Gl,Hl),h(l,Gl,Hl),i=i%vi,i<0&&(i=i+vi),n=n%vi,n<0&&(n=n+vi),i>n&&!o?n+=vi:i<n&&o&&(i+=vi),o){var c=n;n=i,i=c}for(var v=0;v<n;v+=Math.PI/2)v>i&&(Fl[0]=Bc(v)*r+t,Fl[1]=zc(v)*a+e,u(s,Fl,s),h(l,Fl,l))}var Zt={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Nr=[],Pa=[],kr=[],zr=[],L0=Math.min,P0=Math.max,Eo=Math.cos,Ro=Math.sin,Wl=Math.sqrt,wn=Math.abs,Vc=typeof Float32Array<"u",Oe=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};Oe.prototype={constructor:Oe,_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=wn(r/pl/t)||0,this._uy=wn(r/pl/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(Zt.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=wn(t-this._xi)>this._ux||wn(e-this._yi)>this._uy||this._len<5;return this.addData(Zt.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(Zt.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(Zt.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(Zt.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=Eo(i)*r+t,this._yi=Ro(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(Zt.R,t,e,r,a),this},closePath:function(){this.addData(Zt.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)&&Vc&&(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();Vc&&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=Wl(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?L0(f,t):P0(f,t),u>=0?L0(c,e):P0(c,e));l=f-t,u=c-e,this._dashOffset=-Wl(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=De,p=0,m=this._dashIdx,y=l.length,_,w,b=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+=Wl(v*v+d*d);for(;m<y&&(b+=l[m],!(b>s));m++);for(c=(b-s)/p;c<=1;)_=g(h,t,r,i,c),w=g(f,e,a,n,c),m%2?u.moveTo(_,w):u.lineTo(_,w),c+=l[m]/p,m=(m+1)%y;m%2!==0&&u.lineTo(i,n),v=i-_,d=n-w,this._dashOffset=-Wl(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,Vc&&(this.data=new Float32Array(t)))},getBoundingRect:function(){Nr[0]=Nr[1]=kr[0]=kr[1]=Number.MAX_VALUE,Pa[0]=Pa[1]=zr[0]=zr[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 Zt.M:a=t[n++],i=t[n++],e=a,r=i,kr[0]=a,kr[1]=i,zr[0]=a,zr[1]=i;break;case Zt.L:D0(e,r,t[n],t[n+1],kr,zr),e=t[n++],r=t[n++];break;case Zt.C:ID(e,r,t[n++],t[n++],t[n++],t[n++],t[n],t[n+1],kr,zr),e=t[n++],r=t[n++];break;case Zt.Q:LD(e,r,t[n++],t[n++],t[n],t[n+1],kr,zr),e=t[n++],r=t[n++];break;case Zt.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=Eo(f)*u+s,i=Ro(f)*h+l),PD(s,l,u,h,f,c,v,kr,zr),e=Eo(c)*u+s,r=Ro(c)*h+l;break;case Zt.R:a=e=t[n++],i=r=t[n++];var d=t[n++],g=t[n++];D0(a,i,a+d,i+g,kr,zr);break;case Zt.Z:e=a,r=i;break}ea(Nr,Nr,kr),ra(Pa,Pa,zr)}return n===0&&(Nr[0]=Nr[1]=Pa[0]=Pa[1]=0),new vt(Nr[0],Nr[1],Pa[0]-Nr[0],Pa[1]-Nr[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 Zt.M:r=i=e[f++],a=n=e[f++],t.moveTo(i,n);break;case Zt.L:o=e[f++],s=e[f++],(wn(o-i)>l||wn(s-n)>u||f===h-1)&&(t.lineTo(o,s),i=o,n=s);break;case Zt.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 Zt.Q:t.quadraticCurveTo(e[f++],e[f++],e[f++],e[f++]),i=e[f-2],n=e[f-1];break;case Zt.A:var v=e[f++],d=e[f++],g=e[f++],p=e[f++],m=e[f++],y=e[f++],_=e[f++],w=e[f++],b=g>p?g:p,A=g>p?1:g/p,S=g>p?p/g:1,D=Math.abs(g-p)>.001,I=m+y;D?(t.translate(v,d),t.rotate(_),t.scale(A,S),t.arc(0,0,b,m,I,1-w),t.scale(1/A,1/S),t.rotate(-_),t.translate(-v,-d)):t.arc(v,d,b,m,I,1-w),f===1&&(r=Eo(m)*g+v,a=Ro(m)*p+d),i=Eo(I)*g+v,n=Ro(I)*p+d;break;case Zt.R:r=i=e[f],a=n=e[f+1],t.rect(e[f++],e[f++],e[f++],e[f++]);break;case Zt.Z:t.closePath(),i=r,n=a}}}},Oe.CMD=Zt;function Ea(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 ED(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=CD(t,e,r,a,i,n,o,s,u,h,null);return c<=f/2}function E0(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=MD(t,e,r,a,i,n,s,l,null);return h<=u/2}var R0=Math.PI*2;function Ra(t){return t%=R0,t<0&&(t+=R0),t}var Oo=Math.PI*2;function RD(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)%Oo<1e-4)return!0;if(n){var f=a;a=Ra(i),i=Ra(f)}else a=Ra(a),i=Ra(i);a>i&&(i+=Oo);var c=Math.atan2(l,s);return c<0&&(c+=Oo),c>=a&&c<=i||c+Oo>=a&&c+Oo<=i}function oa(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 Oa=Oe.CMD,bn=Math.PI*2,OD=1e-4;function ND(t,e){return Math.abs(t-e)<OD}var Me=[-1,-1,-1],ar=[-1,-1];function kD(){var t=ar[0];ar[0]=ar[1],ar[1]=t}function zD(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=TD(e,a,n,s,u,Me);if(h===0)return 0;for(var f=0,c=-1,v,d,g=0;g<h;g++){var p=Me[g],m=p===0||p===1?.5:1,y=De(t,r,i,o,p);y<l||(c<0&&(c=A0(e,a,n,s,ar),ar[1]<ar[0]&&c>1&&kD(),v=De(e,a,n,s,ar[0]),c>1&&(d=De(e,a,n,s,ar[1]))),c===2?p<ar[0]?f+=v<e?m:-m:p<ar[1]?f+=d<v?m:-m:f+=s<d?m:-m:p<ar[0]?f+=v<e?m:-m:f+=s<v?m:-m)}return f}function BD(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=DD(e,a,n,s,Me);if(l===0)return 0;var u=C0(e,a,n);if(u>=0&&u<=1){for(var h=0,f=be(e,a,n,u),c=0;c<l;c++){var v=Me[c]===0||Me[c]===1?.5:1,d=be(t,r,i,Me[c]);d<o||(Me[c]<u?h+=f<e?v:-v:h+=n<f?v:-v)}return h}else{var v=Me[0]===0||Me[0]===1?.5:1,d=be(t,r,i,Me[0]);return d<o?0:n<e?v:-v}}function VD(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);Me[0]=-l,Me[1]=l;var u=Math.abs(a-i);if(u<1e-4)return 0;if(u%bn<1e-4){a=0,i=bn;var h=n?1:-1;return o>=Me[0]+t&&o<=Me[1]+t?h:0}if(n){var l=a;a=Ra(i),i=Ra(l)}else a=Ra(a),i=Ra(i);a>i&&(i+=bn);for(var f=0,c=0;c<2;c++){var v=Me[c];if(v+t>o){var d=Math.atan2(s,v),h=n?1:-1;d<0&&(d=bn+d),(d>=a&&d<=i||d+bn>=a&&d+bn<=i)&&(d>Math.PI/2&&d<Math.PI*1.5&&(h=-h),f+=h)}}return f}function O0(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===Oa.M&&h>1&&(r||(n+=oa(o,s,l,u,a,i))),h===1&&(o=t[h],s=t[h+1],l=o,u=s),f){case Oa.M:l=t[h++],u=t[h++],o=l,s=u;break;case Oa.L:if(r){if(Ea(o,s,t[h],t[h+1],e,a,i))return!0}else n+=oa(o,s,t[h],t[h+1],a,i)||0;o=t[h++],s=t[h++];break;case Oa.C:if(r){if(ED(o,s,t[h++],t[h++],t[h++],t[h++],t[h],t[h+1],e,a,i))return!0}else n+=zD(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 Oa.Q:if(r){if(E0(o,s,t[h++],t[h++],t[h],t[h+1],e,a,i))return!0}else n+=BD(o,s,t[h++],t[h++],t[h],t[h+1],a,i)||0;o=t[h++],s=t[h++];break;case Oa.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++],A=Math.cos(p)*d+c,S=Math.sin(p)*g+v;h>1?n+=oa(o,s,A,S,a,i):(l=A,u=S);var _=(a-c)*g/d+c;if(r){if(RD(c,v,g,p,p+m,y,e,_,i))return!0}else n+=VD(c,v,g,p,p+m,y,_,i);o=Math.cos(p+m)*d+c,s=Math.sin(p+m)*g+v;break;case Oa.R:l=o=t[h++],u=s=t[h++];var w=t[h++],b=t[h++],A=l+w,S=u+b;if(r){if(Ea(l,u,A,u,e,a,i)||Ea(A,u,A,S,e,a,i)||Ea(A,S,l,S,e,a,i)||Ea(l,S,l,u,e,a,i))return!0}else n+=oa(A,u,A,S,a,i),n+=oa(l,S,l,u,a,i);break;case Oa.Z:if(r){if(Ea(o,s,l,u,e,a,i))return!0}else n+=oa(o,s,l,u,a,i);o=l,s=u;break}}return!r&&!ND(s,u)&&(n+=oa(o,s,l,u,a,i)||0),n!==0}function GD(t,e,r){return O0(t,0,!1,e,r)}function HD(t,e,r,a){return O0(t,e,!0,r,a)}var N0=qf.prototype.getCanvasPattern,Gc=Math.abs,FD=new Oe(!0);function pt(t){Le.call(this,t),this.path=null}pt.prototype={constructor:pt,type:"path",__dirtyPath:!0,strokeContainThreshold:5,segmentIgnoreThreshold:0,subPixelOptimize:!1,brush:function(t,e){var r=this.style,a=this.path||FD,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=N0.call(o,t)),u?t.strokeStyle=this._strokeGradient:f&&(t.strokeStyle=N0.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 Oe},getBoundingRect:function(){var t=this._rect,e=this.style,r=!t;if(r){var a=this.path;a||(a=this.path=new Oe),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)),HD(n,o/s,t,e)))return!0}if(i.hasFill())return GD(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):Le.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var r=this.shape;if(r){if(lt(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&&Gc(t[0]-1)>1e-10&&Gc(t[3]-1)>1e-10?Math.sqrt(Gc(t[0]*t[3]-t[2]*t[1])):1}},pt.extend=function(t){var e=function(a){pt.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)};It(e,pt);for(var r in t)r!=="style"&&r!=="shape"&&(e.prototype[r]=t[r]);return e},It(pt,Le);var Sn=Oe.CMD,WD=[[],[],[]],k0=Math.sqrt,UD=Math.atan2,$D=function(t,e){var r=t.data,a,i,n,o,s,l,u=Sn.M,h=Sn.C,f=Sn.L,c=Sn.R,v=Sn.A,d=Sn.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=k0(e[0]*e[0]+e[1]*e[1]),y=k0(e[2]*e[2]+e[3]*e[3]),_=UD(-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++],Pt(l,l,e),r[o++]=l[0],r[o++]=l[1],l[0]+=r[n++],l[1]+=r[n++],Pt(l,l,e),r[o++]=l[0],r[o++]=l[1]}for(s=0;s<i;s++){var l=WD[s];l[0]=r[n++],l[1]=r[n++],Pt(l,l,e),r[o++]=l[0],r[o++]=l[1]}}},Hc=Math.sqrt,Ul=Math.sin,$l=Math.cos,Zl=Math.PI,z0=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])},Fc=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(z0(t)*z0(e))},B0=function(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(Fc(t,e))};function V0(t,e,r,a,i,n,o,s,l,u,h){var f=l*(Zl/180),c=$l(f)*(t-r)/2+Ul(f)*(e-a)/2,v=-1*Ul(f)*(t-r)/2+$l(f)*(e-a)/2,d=c*c/(o*o)+v*v/(s*s);d>1&&(o*=Hc(d),s*=Hc(d));var g=(i===n?-1:1)*Hc((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+$l(f)*p-Ul(f)*m,_=(e+a)/2+Ul(f)*p+$l(f)*m,w=B0([1,0],[(c-p)/o,(v-m)/s]),b=[(c-p)/o,(v-m)/s],A=[(-1*c-p)/o,(-1*v-m)/s],S=B0(b,A);Fc(b,A)<=-1&&(S=Zl),Fc(b,A)>=1&&(S=0),n===0&&S>0&&(S=S-2*Zl),n===1&&S<0&&(S=S+2*Zl),h.addData(u,y,_,o,s,w,S,f,n)}var ZD=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,YD=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function XD(t){if(!t)return new Oe;for(var e=0,r=0,a=e,i=r,n,o=new Oe,s=Oe.CMD,l=t.match(ZD),u=0;u<l.length;u++){for(var h=l[u],f=h.charAt(0),c,v=h.match(YD)||[],d=v.length,g=0;g<d;g++)v[g]=parseFloat(v[g]);for(var p=0;p<d;){var m,y,_,w,b,A,S,D=e,I=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 L=o.len(),P=o.data;n===s.C&&(m+=e-P[L-4],y+=r-P[L-3]),c=s.C,D=v[p++],I=v[p++],e=v[p++],r=v[p++],o.addData(c,m,y,D,I,e,r);break;case"s":m=e,y=r;var L=o.len(),P=o.data;n===s.C&&(m+=e-P[L-4],y+=r-P[L-3]),c=s.C,D=e+v[p++],I=r+v[p++],e+=v[p++],r+=v[p++],o.addData(c,m,y,D,I,e,r);break;case"Q":D=v[p++],I=v[p++],e=v[p++],r=v[p++],c=s.Q,o.addData(c,D,I,e,r);break;case"q":D=v[p++]+e,I=v[p++]+r,e+=v[p++],r+=v[p++],c=s.Q,o.addData(c,D,I,e,r);break;case"T":m=e,y=r;var L=o.len(),P=o.data;n===s.Q&&(m+=e-P[L-4],y+=r-P[L-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 L=o.len(),P=o.data;n===s.Q&&(m+=e-P[L-4],y+=r-P[L-3]),e+=v[p++],r+=v[p++],c=s.Q,o.addData(c,m,y,e,r);break;case"A":_=v[p++],w=v[p++],b=v[p++],A=v[p++],S=v[p++],D=e,I=r,e=v[p++],r=v[p++],c=s.A,V0(D,I,e,r,A,S,_,w,b,c,o);break;case"a":_=v[p++],w=v[p++],b=v[p++],A=v[p++],S=v[p++],D=e,I=r,e+=v[p++],r+=v[p++],c=s.A,V0(D,I,e,r,A,S,_,w,b,c,o);break}}(f==="z"||f==="Z")&&(c=s.Z,o.addData(c),e=a,r=i),n=c}return o.toStatic(),o}function G0(t,e){var r=XD(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){$D(r,a),this.dirty(!0)},e}function H0(t,e){return new pt(G0(t,e))}function qD(t,e){return pt.extend(G0(t,e))}function KD(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 pt(e);return o.createPathProxy(),o.buildPath=function(s){s.appendPath(r);var l=s.getContext();l&&s.rebuildPath(l)},o}var dt=function(t){Le.call(this,t)};dt.prototype={constructor:dt,type:"text",brush:function(t,e){var r=this.style;this.__dirty&&Mo(r,!0),r.fill=r.stroke=r.shadowBlur=r.shadowColor=r.shadowOffsetX=r.shadowOffsetY=null;var a=r.text;if(a!=null&&(a+=""),!vc(a,r)){t.__attrCachedBy=Ca.NONE;return}this.setTransform(t),i0(this,t,a,r,null,e),this.restoreTransform(t)},getBoundingRect:function(){var t=this.style;if(this.__dirty&&Mo(t,!0),!this._rect){var e=t.text;e!=null?e+="":e="";var r=Rr(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,fc(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}},It(dt,Le);var Br=pt.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)}}),Na=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]],Wc=function(t){return G.browser.ie&&G.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<Na.length;l++)Na[l][2]=r[Na[l][0]],r[Na[l][0]]=Na[l][1];a=!0;break}}if(t.apply(this,arguments),a)for(var l=0;l<Na.length;l++)r[Na[l][0]]=Na[l][2]}:t},Ar=pt.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:Math.PI*2,clockwise:!0},brush:Wc(pt.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()}}),Yl=pt.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 F0(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 jD=function(t,e){for(var r=t.length,a=[],i=0,n=1;n<r;n++)i+=_o(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([F0(h[0],f[0],c[0],v[0],u,d,g),F0(h[1],f[1],c[1],v[1],u,d,g)])}return a},QD=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++)ea(h,h,t[c]),ra(f,f,t[c]);ea(h,h,a[0]),ra(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(mr(t[c]));continue}else l=t[c-1],u=t[c+1];Jr(n,u,l),hl(n,n,e);var g=_o(d,l),p=_o(d,u),m=g+p;m!==0&&(g/=m,p/=m),hl(o,n,-g),hl(s,n,p);var y=gf([],d,o),_=gf([],d,s);a&&(ra(y,y,h),ea(y,y,f),ra(_,_,h),ea(_,_,f)),i.push(y),i.push(_)}return r&&i.push(i.shift()),i};function W0(t,e,r){var a=e.points,i=e.smooth;if(a&&a.length>=2){if(i&&i!=="spline"){var n=QD(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=jD(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 Ge=pt.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,e){W0(t,e,!0)}}),ir=pt.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){W0(t,e,!1)}}),An=Math.round;function U0(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||(An(a*2)===An(i*2)&&(t.x1=t.x2=di(a,s,!0)),An(n*2)===An(o*2)&&(t.y1=t.y2=di(n,s,!0)))}}function $0(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=di(a,s,!0),t.y=di(i,s,!0),t.width=Math.max(di(a+n,s,!1)-t.x,n===0?0:1),t.height=Math.max(di(i+o,s,!1)-t.y,o===0?0:1))}}function di(t,e,r){if(!e)return t;var a=An(t*2);return(a+An(e))%2===0?a/2:(a+(r?1:-1))/2}var gi={},xt=pt.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?($0(gi,e,this.style),r=gi.x,a=gi.y,i=gi.width,n=gi.height,gi.r=e.r,e=gi):(r=e.x,a=e.y,i=e.width,n=e.height),e.r?Jm(t,e):t.rect(r,a,i,n),t.closePath()}}),No={},ye=pt.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?(U0(No,e,this.style),r=No.x1,a=No.y1,i=No.x2,n=No.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]}}),Ne=[];function Z0(t,e,r){var a=t.cpx2,i=t.cpy2;return a===null||i===null?[(r?S0:De)(t.x1,t.cpx1,t.cpx2,t.x2,e),(r?S0:De)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(r?Nc:be)(t.x1,t.cpx1,t.x2,e),(r?Nc:be)(t.y1,t.cpy1,t.y2,e)]}var Xl=pt.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&&(kc(r,o,i,h,Ne),o=Ne[1],i=Ne[2],kc(a,s,n,h,Ne),s=Ne[1],n=Ne[2]),t.quadraticCurveTo(o,s,i,n)):(h<1&&(T0(r,o,l,i,h,Ne),o=Ne[1],l=Ne[2],i=Ne[3],T0(a,s,u,n,h,Ne),s=Ne[1],u=Ne[2],n=Ne[3]),t.bezierCurveTo(o,s,l,u,i,n)))},pointAt:function(t){return Z0(this.shape,t,!1)},tangentAt:function(t){var e=Z0(this.shape,t,!0);return ln(e,e)}}),Uc=pt.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)}}),Y0=pt.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(),pt.prototype.getBoundingRect.call(this)}}),Vr=function(t){this.colorStops=t||[]};Vr.prototype={constructor:Vr,addColorStop:function(t,e){this.colorStops.push({offset:t,color:e})}};var pi=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,Vr.call(this,i)};pi.prototype={constructor:pi},It(pi,Vr);var ql=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,Vr.call(this,a)};ql.prototype={constructor:ql},It(ql,Vr);function He(t){Le.call(this,t),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}He.prototype.incremental=!0,He.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},He.prototype.addDisplayable=function(t,e){e?this._temporaryDisplayables.push(t):this._displayables.push(t),this.dirty()},He.prototype.addDisplayables=function(t,e){e=e||!1;for(var r=0;r<t.length;r++)this.addDisplayable(t[r],e)},He.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])},He.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}},He.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 JD=[];He.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new vt(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(JD)),t.union(a)}this._rect=t}return this._rect},He.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},It(He,Le);var Kl=Math.max,jl=Math.min,Ql={},ko=1,X0={color:"textFill",textBorderColor:"textStroke",textBorderWidth:"textStrokeWidth"},q0="emphasis",K0="normal",j0=1,Q0={},$c={};function nr(t){return pt.extend(t)}function tM(t,e){return qD(t,e)}function Gr(t,e){$c[t]=e}function Zc(t){if($c.hasOwnProperty(t))return $c[t]}function zo(t,e,r,a){var i=H0(t,e);return r&&(a==="center"&&(r=ty(r,i.getBoundingRect())),ey(i,r)),i}function J0(t,e,r){var a=new ve({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(ty(e,n))}}});return a}function ty(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 or=KD;function ey(t,e){if(!!t.applyTransform){var r=t.getBoundingRect(),a=r.calculateTransform(e);t.applyTransform(a)}}function eM(t){return U0(t.shape,t.shape,t.style),t}function rM(t){return $0(t.shape,t.shape,t.style),t}var Jl=di;function ry(t){return t!=null&&t!=="none"}var ay=ht(),iy=0;function aM(t){if(typeof t!="string")return t;var e=ay.get(t);return e||(e=Pm(t,-.1),iy<1e4&&(ay.set(t,e),iy++)),e}function iM(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 Yc(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),ru(n),a||iM(i),n.extendFrom(e),ny(n,e,"fill"),ny(n,e,"stroke"),Go(n),a||(t.dirty(!1),t.z2+=ko)}}}function ny(t,e,r){!ry(e[r])&&ry(t[r])&&(t[r]=aM(t[r]))}function Xc(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&&(ru(r),t.setStyle(a),Go(r));var i=t.__cachedNormalZ2;i!=null&&t.z2-i===ko&&(t.z2=i)}}function Bo(t,e,r){var a=K0,i=K0,n;t.__highlighted&&(a=q0,n=!0),e(t,r),t.__highlighted&&(i=q0,n=!0),t.isGroup&&t.traverse(function(o){!o.isGroup&&e(o,r)}),n&&t.__highDownOnUpdate&&t.__highDownOnUpdate(a,i)}function Vo(t,e){e=t.__hoverStl=e!==!1&&(t.hoverStyle||e||{}),t.__hoverStlDirty=!0,t.__highlighted&&(t.__cachedNormalStl=null,Xc(t),Yc(t))}function nM(t){!oy(this,t)&&!this.__highByOuter&&Bo(this,Yc)}function oM(t){!oy(this,t)&&!this.__highByOuter&&Bo(this,Xc)}function sM(t){this.__highByOuter|=1<<(t||0),Bo(this,Yc)}function lM(t){!(this.__highByOuter&=~(1<<(t||0)))&&Bo(this,Xc)}function oy(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function Ot(t,e){mi(t,!0),Bo(t,Vo,e)}function mi(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",nM)[a]("mouseout",oM),t[a]("emphasis",sM)[a]("normal",lM),t.__highByOuter=t.__highByOuter||0,t.__highDownDispatcher=!r}}function tu(t){return!!(t&&t.__highDownDispatcher)}function sy(t){var e=Q0[t];return e==null&&j0<=32&&(e=Q0[t]=j0++),e}function Fe(t,e,r,a,i,n,o){i=i||Ql;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=se(i.defaultText)?i.defaultText(l,i):i.defaultText));var d=f?v:null,g=c?Xt(s?s.getFormattedLabel(l,"emphasis",null,u,h):null,v):null;(d!=null||g!=null)&&($t(t,r,n,i),$t(e,a,o,i,!0)),t.text=d,e.text=g}function qc(t,e,r){var a=t.style;e&&(ru(a),t.setStyle(e),Go(a)),a=t.__hoverStl,r&&a&&(ru(a),et(a,r),Go(a))}function $t(t,e,r,a,i){return ly(t,e,a,i),r&&et(t,r),t}function uM(t,e,r){var a={isRectText:!0},i;r===!1?i=!0:a.autoColor=r,ly(t,e,a,i)}function ly(t,e,r,a){if(r=r||Ql,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=Xt(e.getShallow("distance"),a?null:5)}var o=e.ecModel,s=o&&o.option.textStyle,l=hM(e),u;if(l){u={};for(var h in l)if(l.hasOwnProperty(h)){var f=e.getModel(["rich",h]);uy(u[h]={},f,s,r,a)}}return t.rich=u,uy(t,e,s,r,a,!0),r.forceRich&&!r.textStyle&&(r.textStyle={}),t}function hM(t){for(var e;t&&t!==t.ecModel;){var r=(t.option||Ql).rich;if(r){e=e||{};for(var a in r)r.hasOwnProperty(a)&&(e[a]=1)}t=t.parentModel}return e}function uy(t,e,r,a,i,n){r=!i&&r||Ql,t.textFill=eu(e.getShallow("color"),a)||r.color,t.textStroke=eu(e.getShallow("textBorderColor"),a)||r.textBorderColor,t.textStrokeWidth=Xt(e.getShallow("textBorderWidth"),r.textBorderWidth),i||(n&&(t.insideRollbackOpt=a,Go(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=eu(e.getShallow("backgroundColor"),a),t.textPadding=e.getShallow("padding"),t.textBorderColor=eu(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 eu(t,e){return t!=="auto"?t:e&&e.autoColor?e.autoColor:null}function Go(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 ru(t){var e=t.insideRollback;e&&(t.textFill=e.textFill,t.textStroke=e.textStroke,t.textStrokeWidth=e.textStrokeWidth,t.insideRollback=null)}function Kc(t,e){var r=e&&e.getModel("textStyle");return tr([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 hy(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 ft(t,e,r,a,i){hy(!0,t,e,r,a,i)}function Se(t,e,r,a,i){hy(!1,t,e,r,a,i)}function yi(t,e){for(var r=fn([]);t&&t!==e;)Sa(r,t.getLocalTransform(),r),t=t.parent;return r}function Hr(t,e,r){return e&&!Qr(e)&&(e=_r.getLocalTransform(e)),r&&(e=cl([],e)),Pt([],t,e)}function jc(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=Hr(n,e,r),Math.abs(n[0])>Math.abs(n[1])?n[0]>0?"right":"left":n[1]>0?"bottom":"top"}function au(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:mr(s.position),rotation:s.rotation};return s.shape&&(l.shape=et({},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)),ft(s,u,r,s.dataIndex)}}})}function fy(t,e){return V(t,function(r){var a=r[0];a=Kl(a,e.x),a=jl(a,e.x+e.width);var i=r[1];return i=Kl(i,e.y),i=jl(i,e.y+e.height),[a,i]})}function fM(t,e){var r=Kl(t.x,e.x),a=jl(t.x+t.width,e.x+e.width),i=Kl(t.y,e.y),n=jl(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 Ho(t,e,r){e=et({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),J(a,r),new ve(e)):zo(t.replace("path://",""),e,r,"center")}function Fo(t,e,r,a,i){for(var n=0,o=i[i.length-1];n<i.length;n++){var s=i[n];if(cy(t,e,r,a,s[0],s[1],o[0],o[1]))return!0;o=s}}function cy(t,e,r,a,i,n,o,s){var l=r-t,u=a-e,h=o-i,f=s-n,c=Qc(h,f,l,u);if(cM(c))return!1;var v=t-i,d=e-n,g=Qc(v,d,l,u)/c;if(g<0||g>1)return!1;var p=Qc(v,d,h,f)/c;return!(p<0||p>1)}function Qc(t,e,r,a){return t*a-r*e}function cM(t){return t<=1e-6&&t>=-1e-6}Gr("circle",Br),Gr("sector",Ar),Gr("ring",Yl),Gr("polygon",Ge),Gr("polyline",ir),Gr("rect",xt),Gr("line",ye),Gr("bezierCurve",Xl),Gr("arc",Uc);var sa=(Object.freeze||Object)({Z2_EMPHASIS_LIFT:ko,CACHED_LABEL_STYLE_PROPERTIES:X0,extendShape:nr,extendPath:tM,registerShape:Gr,getShapeClass:Zc,makePath:zo,makeImage:J0,mergePath:or,resizePath:ey,subPixelOptimizeLine:eM,subPixelOptimizeRect:rM,subPixelOptimize:Jl,setElementHoverStyle:Vo,setHoverStyle:Ot,setAsHighDownDispatcher:mi,isHighDownDispatcher:tu,getHighlightDigit:sy,setLabelStyle:Fe,modifyLabelStyle:qc,setTextStyle:$t,setText:uM,getFont:Kc,updateProps:ft,initProps:Se,getTransform:yi,applyTransform:Hr,transformDirection:jc,groupTransition:au,clipPointsByRect:fy,clipRectByRect:fM,createIcon:Ho,linePolygonIntersect:Fo,lineLineIntersect:cy,Group:q,Image:ve,Text:dt,Circle:Br,Sector:Ar,Ring:Yl,Polygon:Ge,Polyline:ir,Rect:xt,Line:ye,BezierCurve:Xl,Arc:Uc,IncrementalDisplayable:He,CompoundPath:Y0,LinearGradient:pi,RadialGradient:ql,BoundingRect:vt}),vM=["textStyle","color"],dM={getTextColor:function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(vM):null)},getFont:function(){return Kc({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},getTextRect:function(t){return Rr(t,this.getFont(),this.getShallow("align"),this.getShallow("verticalAlign")||this.getShallow("baseline"),this.getShallow("padding"),this.getShallow("lineHeight"),this.getShallow("rich"),this.getShallow("truncateText"))}},gM=_n([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]),pM={getItemStyle:function(t,e){var r=gM(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]}},iu=Dt,vy=Pe();function _t(t,e,r){this.parentModel=e,this.ecModel=r,this.option=t}_t.prototype={constructor:_t,init:null,mergeOption:function(t){ut(this.option,t,!0)},get:function(t,e){return t==null?this.option:dy(this.option,this.parsePath(t),!e&&Jc(this,t))},getShallow:function(t,e){var r=this.option,a=r==null?r:r[t],i=!e&&Jc(this,t);return a==null&&i&&(a=i.getShallow(t)),a},getModel:function(t,e){var r=t==null?this.option:dy(this.option,t=this.parsePath(t)),a;return e=e||(a=Jc(this,t))&&a.getModel(t),new _t(r,e,this.ecModel)},isEmpty:function(){return this.option==null},restoreData:function(){},clone:function(){var t=this.constructor;return new t(rt(this.option))},setReadOnly:function(t){},parsePath:function(t){return typeof t=="string"&&(t=t.split(".")),t},customizeGetParent:function(t){vy(this).getParent=t},isAnimationEnabled:function(){if(!G.node){if(this.option.animation!=null)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}}};function dy(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 Jc(t,e){var r=vy(t).getParent;return r?r.call(t,e):t.parentModel}Lo(_t),Nl(_t),iu(_t,bD),iu(_t,AD),iu(_t,dM),iu(_t,pM);var mM=0;function Wo(t){return[t||"",mM++,Math.random().toFixed(5)].join("_")}function yM(t){var e={};return t.registerSubTypeDefaulter=function(r,a){r=Ma(r),e[r.main]=a},t.determineSubType=function(r,a){var i=a.type;if(!i){var n=Ma(r).main;t.hasSubTypes(r)&&e[n]&&(i=e[n](a))}return i},t}function _M(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(M(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]),M(d.successor,g?m:p)}M(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 M(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),M(f,function(c){yt(u.predecessor,c)<0&&u.predecessor.push(c);var v=a(o,c);yt(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 M(n,function(l){yt(o,l)>=0&&s.push(l)}),s}}var gy=1e-4;function xM(t){return t.replace(/^\s+|\s+$/g,"")}function Nt(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 H(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"?xM(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):t==null?NaN:+t}function re(t,e,r){return e==null&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),r?t:+t}function _i(t){return t.sort(function(e,r){return e-r}),t}function py(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 nu(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 tv(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 my(t,e,r){if(!t[e])return 0;var a=an(t,function(d,g){return d+(isNaN(g)?0:g)},0);if(a===0)return 0;for(var i=Math.pow(10,r),n=V(t,function(d){return(isNaN(d)?0:d)/a*i*100}),o=i*100,s=V(n,function(d){return Math.floor(d)}),l=an(s,function(d,g){return d+g},0),u=V(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 ev=9007199254740991;function rv(t){var e=Math.PI*2;return(t%e+e)%e}function Uo(t){return t>-gy&&t<gy}var wM=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function $o(t){if(t instanceof Date)return t;if(typeof t=="string"){var e=wM.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 yy(t){return Math.pow(10,av(t))}function av(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 iv(t,e){var r=av(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 bM(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 nv(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 _y(t){return t-parseFloat(t)>=0}var SM=(Object.freeze||Object)({linearMap:Nt,parsePercent:H,round:re,asc:_i,getPrecision:py,getPrecisionSafe:nu,getPixelPrecision:tv,getPercentWithPrecision:my,MAX_SAFE_INTEGER:ev,remRadian:rv,isRadianAroundZero:Uo,parseDate:$o,quantity:yy,quantityExponent:av,nice:iv,quantile:bM,reformIntervals:nv,isNumeric:_y});function ka(t){return isNaN(t)?"-":(t=(t+"").split("."),t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:""))}function xy(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 xi=cf,AM=/([&<>"'])/g,TM={"&":"&","<":"<",">":">",'"':""","'":"'"};function kt(t){return t==null?"":(t+"").replace(AM,function(e,r){return TM[r]})}var wy=["a","b","c","d","e","f","g"],ov=function(t,e){return"{"+t+(e??"")+"}"};function sv(t,e,r){z(e)||(e=[e]);var a=e.length;if(!a)return"";for(var i=e[0].$vars||[],n=0;n<i.length;n++){var o=wy[n];t=t.replace(ov(o),ov(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(ov(wy[l],s),r?kt(u):u)}return t}function by(t,e,r){return M(e,function(a,i){t=t.replace("{"+i+"}",r?kt(a):a)}),t}function ou(t,i){t=Lt(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:'+kt(r)+";"+(i||"")+'"></span>':'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:'+kt(r)+";"+(i||"")+'"></span>':{renderMode:n,content:"{marker"+o+"|} ",style:{color:r}}:""}function Tn(t,e){return t+="","0000".substr(0,e-t.length)+t}function lv(t,e,r){(t==="week"||t==="month"||t==="quarter"||t==="half-year"||t==="year")&&(t=`MM-dd
| yyyy`);var a=$o(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",Tn(o,2)).replace("M",o).replace("yyyy",n).replace("yy",n%100).replace("dd",Tn(s,2)).replace("d",s).replace("hh",Tn(l,2)).replace("h",l).replace("mm",Tn(u,2)).replace("m",u).replace("ss",Tn(h,2)).replace("s",h).replace("SSS",Tn(f,3)),t}function su(t){return t&&t.charAt(0).toUpperCase()+t.substr(1)}var Sy=rc;function CM(t){return Rr(t.text,t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich,t.truncate)}function DM(t,e,r,a,i,n,o,s){return Rr(t,e,r,a,i,s,n,o)}function Zo(t,e){if(e==="_blank"||e==="blank"){var r=window.open();r.opener=null,r.location=t}else window.open(t,e)}var MM=(Object.freeze||Object)({addCommas:ka,toCamelCase:xy,normalizeCssArray:xi,encodeHTML:kt,formatTpl:sv,formatTplSimple:by,getTooltipMarker:ou,formatTime:lv,capitalFirst:su,truncateText:Sy,getTextBoundingRect:CM,getTextRect:DM,windowOpen:Zo}),lu=M,Ay=["left","right","top","bottom","width","height"],wi=[["width","left","right"],["height","top","bottom"]];function uv(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 bi=uv,H5=ot(uv,"vertical"),F5=ot(uv,"horizontal");function IM(t,e,r){var a=e.width,i=e.height,n=H(t.x,a),o=H(t.y,i),s=H(t.x2,a),l=H(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=xi(r||0),{width:Math.max(s-n-r[1]-r[3],0),height:Math.max(l-o-r[0]-r[2],0)}}function qt(t,e,r){r=xi(r||0);var a=e.width,i=e.height,n=H(t.left,a),o=H(t.top,i),s=H(t.right,a),l=H(t.bottom,i),u=H(t.width,a),h=H(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 vt(n+r[3],o+r[0],u,h);return d.margin=r,d}function uu(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 vt(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=qt(J({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 LM(t,e){return t[wi[e][0]]!=null||t[wi[e][1]]!=null&&t[wi[e][2]]!=null}function za(t,e,r){!lt(r)&&(r={});var a=r.ignoreSize;!z(a)&&(a=[a,a]);var i=o(wi[0],0),n=o(wi[1],1);u(wi[0],t,i),u(wi[1],t,n);function o(h,f){var c={},v=0,d={},g=0,p=2;if(lu(h,function(_){d[_]=t[_]}),lu(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){lu(h,function(v){f[v]=c[v]})}}function Cn(t){return Ty({},t)}function Ty(t,e){return e&&t&&lu(Ay,function(r){e.hasOwnProperty(r)&&(t[r]=e[r])}),t}var PM={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")}}},EM=Pe(),wt=_t.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(t,e,r,a){_t.call(this,t,e,r,a),this.uid=Wo("ec_cpt_model")},init:function(t,e,r,a){this.mergeDefaultAndTheme(t,r)},mergeDefaultAndTheme:function(t,e){var r=this.layoutMode,a=r?Cn(t):{},i=e.getTheme();ut(t,i.get(this.mainType)),ut(t,this.getDefaultOption()),r&&za(t,a,r)},mergeOption:function(t,e){ut(this.option,t,!0);var r=this.layoutMode;r&&za(this.option,t,r)},optionUpdated:function(t,e){},getDefaultOption:function(){var t=EM(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=ut(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)})}});kl(wt,{registerWhenExtend:!0}),yM(wt),_M(wt,RM);function RM(t){var e=[];return M(wt.getClassesByMainType(t),function(r){e=e.concat(r.prototype.dependencies||[])}),e=V(e,function(r){return Ma(r).main}),t!=="dataset"&&yt(e,"dataset")<=0&&e.unshift("dataset"),e}Dt(wt,PM);var Cy="";typeof navigator<"u"&&(Cy=navigator.platform||"");var OM={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:Cy.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},hv=Pe();function NM(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 fv={clearColorPalette:function(){hv(this).colorIdx=0,hv(this).colorNameMap={}},getColorFromPalette:function(t,e,r){e=e||this;var a=hv(e),i=a.colorIdx||0,n=a.colorNameMap=a.colorNameMap||{};if(n.hasOwnProperty(t))return n[t];var o=me(this.get("color",!0)),s=this.get("colorLayer",!0),l=r==null||!s?o:NM(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}}},Si="original",Yo="arrayRows",Xo="objectRows",qo="keyedColumns",Dy="unknown",Ko="typedArray",My="column",cv="row";function Tr(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===qo?{}:[]),this.sourceFormat=t.sourceFormat||Dy,this.seriesLayoutBy=t.seriesLayoutBy||My,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&ht(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}Tr.seriesDataToSource=function(t){return new Tr({data:t,sourceFormat:pr(t)?Ko:Si,fromDataset:!1})},Nl(Tr);var Ae={Must:1,Might:2,Not:3},Dn=Pe();function kM(t){var e=t.option.source,r=Dy;if(pr(e))r=Ko;else if(z(e)){e.length===0&&(r=Yo);for(var a=0,i=e.length;a<i;a++){var n=e[a];if(n!=null){if(z(n)){r=Yo;break}else if(lt(n)){r=Xo;break}}}}else if(lt(e)){for(var o in e)if(e.hasOwnProperty(o)&&Qr(e[o])){r=qo;break}}else if(e!=null)throw new Error("Invalid data");Dn(t).sourceFormat=r}function zM(t){return Dn(t).source}function BM(t){Dn(t).datasetMap=ht()}function Iy(t){var e=t.option,r=e.data,a=pr(r)?Ko:Si,i=!1,n=e.seriesLayoutBy,o=e.sourceHeader,s=e.dimensions,l=dv(t);if(l){var u=l.option;r=u.source,a=Dn(l).sourceFormat,i=!0,n=n||u.seriesLayoutBy,o==null&&(o=u.sourceHeader),s=s||u.dimensions}var h=VM(r,a,n,o,s);Dn(t).source=new Tr({data:r,fromDataset:i,seriesLayoutBy:n,sourceFormat:a,dimensionsDefine:h.dimensionsDefine,startIndex:h.startIndex,dimensionsDetectCount:h.dimensionsDetectCount,encodeDefine:e.encode})}function VM(t,e,r,a,i){if(!t)return{dimensionsDefine:Ly(i)};var n,o;if(e===Yo)a==="auto"||a==null?Py(function(l){l!=null&&l!=="-"&&(Lt(l)?o==null&&(o=1):o=0)},r,t,10):o=a?1:0,!i&&o===1&&(i=[],Py(function(l,u){i[u]=l??""},r,t)),n=i?i.length:r===cv?t.length:t[0]?t[0].length:null;else if(e===Xo)i||(i=GM(t));else if(e===qo)i||(i=[],M(t,function(l,u){i.push(u)}));else if(e===Si){var s=Io(t[0]);n=z(s)&&s.length||1}else e===Ko&&T&>(!!i,"dimensions must be given if data is TypedArray.");return{startIndex:o,dimensionsDefine:Ly(i),dimensionsDetectCount:n}}function Ly(t){if(!!t){var e=ht();return V(t,function(r,a){if(r=et({},lt(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 Py(t,e,r,a){if(a==null&&(a=1/0),e===cv)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 GM(t){for(var e=0,r;e<t.length&&!(r=t[e++]););if(r){var a=[];return M(r,function(i,n){a.push(n)}),a}}function Ey(t,e,r){var a={},i=dv(e);if(!i||!t)return a;var n=[],o=[],s=e.ecModel,l=Dn(s).datasetMap,u=i.uid+"_"+r.seriesLayoutBy,h,f;t=t.slice(),M(t,function(g,p){!lt(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});M(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 vv(t,e,r){var a={},i=dv(t);if(!i)return a;var n=e.sourceFormat,o=e.dimensionsDefine,s;(n===Xo||n===qo)&&M(o,function(h,f){(lt(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=Ry(e.data,n,e.seriesLayoutBy,o,e.startIndex,v);c.push(g);var p=g===Ae.Not;if(p&&h.v==null&&v!==s&&(h.v=v),(h.n==null||h.n===h.v||!p&&c[h.n]===Ae.Not)&&(h.n=v),m(h)&&c[h.n]!==Ae.Not)return h;p||(g===Ae.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 dv(t){var e=t.option,r=e.data;if(!r)return t.ecModel.getComponent("dataset",e.datasetIndex||0)}function HM(t,e){return Ry(t.data,t.sourceFormat,t.seriesLayoutBy,t.dimensionsDefine,t.startIndex,e)}function Ry(t,e,r,a,i,n){var o,s=5;if(pr(t))return Ae.Not;var l,u;if(a){var h=a[n];lt(h)?(l=h.name,u=h.type):Lt(h)&&(l=h)}if(u!=null)return u==="ordinal"?Ae.Must:Ae.Not;if(e===Yo)if(r===cv){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===Xo){if(!l)return Ae.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===qo){if(!l)return Ae.Not;var f=t[l];if(!f||pr(f))return Ae.Not;for(var c=0;c<f.length&&c<s;c++)if((o=p(f[c]))!=null)return o}else if(e===Si)for(var c=0;c<t.length&&c<s;c++){var d=t[c],g=Io(d);if(!z(g))return Ae.Not;if((o=p(g[n]))!=null)return o}function p(m){var y=Lt(m);if(m!=null&&isFinite(m)&&m!=="")return y?Ae.Might:Ae.Not;if(y&&m!=="-")return Ae.Must}return Ae.Not}var gv="\0_ec_inner",pv=_t.extend({init:function(t,e,r,a){r=r||{},this.option=null,this._theme=new _t(r),this._optionManager=a},setOption:function(t,e){gt(!(gv 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"?UM.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&&M(n,function(o){this.mergeOption(o,e=!0)},this)}return e},mergeOption:function(t){var e=this.option,r=this._componentsMap,a=[];BM(this),M(t,function(n,o){n!=null&&(wt.hasClass(o)?o&&a.push(o):e[o]=e[o]==null?rt(n):ut(e[o],n,!0))}),wt.topologicalTravel(a,wt.getAllClassMainTypes(),i,this);function i(n,o){var s=me(t[n]),l=Pc(r.get(n),s);m0(l),M(l,function(h,f){var c=h.option;lt(c)&&(h.keyInfo.mainType=n,h.keyInfo.subType=ZM(n,c,h.exist))});var u=$M(r,o);e[n]=[],r.set(n,[]),M(l,function(h,f){var c=h.exist,v=h.option;if(gt(lt(v)||c,"Empty component definition"),!v)c.mergeOption({},this),c.optionUpdated({},!1);else{var d=wt.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=et({dependentModels:u,componentIndex:f},h.keyInfo);c=new d(v,this,this,g),et(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"&&mv(this,r.get("series"))}this._seriesIndicesMap=ht(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var t=rt(this.option);return M(t,function(e,r){if(wt.hasClass(r)){for(var e=me(e),a=e.length-1;a>=0;a--)El(e[a])&&e.splice(a,1);t[r]=e}}),delete t[gv],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)z(r)||(r=[r]),o=ee(V(r,function(u){return n[u]}),function(u){return!!u});else if(a!=null){var s=z(a);o=ee(n,function(u){return s&&yt(a,u.id)>=0||!s&&u.id===a})}else if(i!=null){var l=z(i);o=ee(n,function(u){return l&&yt(i,u.name)>=0||!l&&u.name===i})}else o=n.slice();return Oy(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(Oy(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?ee(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){M(n,function(s,l){e.call(r,o,s,l)})});else if(Lt(t))M(a.get(t),e,r);else if(lt(t)){var i=this.findComponents(t);M(i,e,r)}},getSeriesByName:function(t){var e=this._componentsMap.get("series");return ee(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 ee(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){hu(this),M(this._seriesIndices,function(r){var a=this._componentsMap.get("series")[r];t.call(e,a,r)},this)},eachRawSeries:function(t,e){M(this._componentsMap.get("series"),t,e)},eachSeriesByType:function(t,e,r){hu(this),M(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 M(this.getSeriesByType(t),e,r)},isSeriesFiltered:function(t){return hu(this),this._seriesIndicesMap.get(t.componentIndex)==null},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(t,e){hu(this);var r=ee(this._componentsMap.get("series"),t,e);mv(this,r)},restoreData:function(t){var e=this._componentsMap;mv(this,e.get("series"));var r=[];e.each(function(a,i){r.push(i)}),wt.topologicalTravel(r,wt.getAllClassMainTypes(),function(a,i){M(e.get(a),function(n){(a!=="series"||!FM(n,t))&&n.restoreData()})})}});function FM(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 WM(t,e){var r=t.color&&!t.colorLayer;M(e,function(a,i){i==="colorLayer"&&r||wt.hasClass(i)||(typeof a=="object"?t[i]=t[i]?ut(t[i],a,!1):rt(a):t[i]==null&&(t[i]=a))})}function UM(t){t=t,this.option={},this.option[gv]=1,this._componentsMap=ht({series:[]}),this._seriesIndices,this._seriesIndicesMap,WM(t,this._theme.option),ut(t,OM,!1),this.mergeOption(t)}function $M(t,e){z(e)||(e=e?[e]:[]);var r={};return M(e,function(a){r[a]=(t.get(a)||[]).slice()}),r}function ZM(t,e,r){var a=e.type?e.type:r?r.subType:wt.determineSubType(t,e);return a}function mv(t,e){t._seriesIndicesMap=ht(t._seriesIndices=V(e,function(r){return r.componentIndex})||[])}function Oy(t,e){return e.hasOwnProperty("subType")?ee(t,function(r){return r.subType===e.subType}):t}function hu(t){if(T&&!t._seriesIndices)throw new Error("Option should contains series.")}Dt(pv,fv);var YM=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"];function Ny(t){M(YM,function(e){this[e]=it(t[e],t)},this)}var yv={};function _e(){this._coordinateSystems=[]}_e.prototype={constructor:_e,create:function(t,e){var r=[];M(yv,function(a,i){var n=a.create(t,e);r=r.concat(n||[])}),this._coordinateSystems=r},update:function(t,e){M(this._coordinateSystems,function(r){r.update&&r.update(t,e)})},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},_e.register=function(t,e){yv[t]=e},_e.get=function(t){return yv[t]};var fu=M,Ai=rt,cu=V,ky=ut,XM=/^(min|max)?(.+)$/;function _v(t){this._api=t,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}_v.prototype={constructor:_v,setOption:function(t,e){t&&M(me(t.series),function(i){i&&i.data&&pr(i.data)&&vf(i.data)}),t=Ai(t);var r=this._optionBackup,a=qM.call(this,t,e,!r);this._newBaseOption=a.baseOption,r?(JM(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=cu(e.timelineOptions,Ai),this._mediaList=cu(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++)KM(a[s].query,e,r)&&n.push(s);return!n.length&&i&&(n=[-1]),n.length&&!QM(n,this._currentMediaIndices)&&(o=cu(n,function(u){return Ai(u===-1?i.option:a[u].option)})),this._currentMediaIndices=n,o}};function qM(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;fu(l,function(u){u&&u.option&&(u.query?i.push(u):n||(n=u))})}return o||(o=t),o.timeline||(o.timeline=s),fu([o].concat(a).concat(V(i,function(u){return u.option})),function(u){fu(e,function(h){h(u,r)})}),{baseOption:o,timelineOptions:a,mediaDefault:n,mediaList:i}}function KM(t,e,r){var a={width:e,height:r,aspectratio:e/r},i=!0;return M(t,function(n,o){var s=o.match(XM);if(!(!s||!s[1]||!s[2])){var l=s[1],u=s[2].toLowerCase();jM(a[u],n,l)||(i=!1)}}),i}function jM(t,e,r){return r==="min"?t>=e:r==="max"?t<=e:t===e}function QM(t,e){return t.join(",")===e.join(",")}function JM(t,e){e=e||{},fu(e,function(r,a){if(r!=null){var i=t[a];if(!wt.hasClass(a))t[a]=ky(i,r,!0);else{r=me(r),i=me(i);var n=Pc(i,r);t[a]=cu(n,function(o){return o.option&&o.exist?ky(o.exist,o.option,!0):o.exist||o.option})}}})}var Cr=M,jo=lt,zy=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function xv(t){var e=t&&t.itemStyle;if(!!e)for(var r=0,a=zy.length;r<a;r++){var i=zy[r],n=e.normal,o=e.emphasis;n&&n[i]&&(t[i]=t[i]||{},t[i].normal?ut(t[i].normal,n[i]):t[i].normal=n[i],n[i]=null),o&&o[i]&&(t[i]=t[i]||{},t[i].emphasis?ut(t[i].emphasis,o[i]):t[i].emphasis=o[i],o[i]=null)}}function Te(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,J(t[e],a)):t[e]=a),i&&(t.emphasis=t.emphasis||{},t.emphasis[e]=i)}}function Qo(t){Te(t,"itemStyle"),Te(t,"lineStyle"),Te(t,"areaStyle"),Te(t,"label"),Te(t,"labelLine"),Te(t,"upperLabel"),Te(t,"edgeLabel")}function Kt(t,e){var r=jo(t)&&t[e],a=jo(r)&&r.textStyle;if(a)for(var i=0,n=p0.length;i<n;i++){var e=p0[i];a.hasOwnProperty(e)&&(r[e]=a[e])}}function sr(t){t&&(Qo(t),Kt(t,"label"),t.emphasis&&Kt(t.emphasis,"label"))}function tI(t){if(!!jo(t)){xv(t),Qo(t),Kt(t,"label"),Kt(t,"upperLabel"),Kt(t,"edgeLabel"),t.emphasis&&(Kt(t.emphasis,"label"),Kt(t.emphasis,"upperLabel"),Kt(t.emphasis,"edgeLabel"));var n=t.markPoint;n&&(xv(n),sr(n));var s=t.markLine;s&&(xv(s),sr(s));var e=t.markArea;e&&sr(e);var r=t.data;if(t.type==="graph"){r=r||t.nodes;var a=t.links||t.edges;if(a&&!pr(a))for(var i=0;i<a.length;i++)sr(a[i]);M(t.categories,function(u){Qo(u)})}if(r&&!pr(r))for(var i=0;i<r.length;i++)sr(r[i]);var n=t.markPoint;if(n&&n.data)for(var o=n.data,i=0;i<o.length;i++)sr(o[i]);var s=t.markLine;if(s&&s.data)for(var l=s.data,i=0;i<l.length;i++)z(l[i])?(sr(l[i][0]),sr(l[i][1])):sr(l[i]);t.type==="gauge"?(Kt(t,"axisLabel"),Kt(t,"title"),Kt(t,"detail")):t.type==="treemap"?(Te(t.breadcrumb,"itemStyle"),M(t.levels,function(u){Qo(u)})):t.type==="tree"&&Qo(t.leaves)}}function la(t){return z(t)?t:t?[t]:[]}function By(t){return(z(t)?t[0]:t)||{}}var eI=function(t,e){Cr(la(t.series),function(a){jo(a)&&tI(a)});var r=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&r.push("valueAxis","categoryAxis","logAxis","timeAxis"),Cr(r,function(a){Cr(la(t[a]),function(i){i&&(Kt(i,"axisLabel"),Kt(i.axisPointer,"label"))})}),Cr(la(t.parallel),function(a){var i=a&&a.parallelAxisDefault;Kt(i,"axisLabel"),Kt(i&&i.axisPointer,"label")}),Cr(la(t.calendar),function(a){Te(a,"itemStyle"),Kt(a,"dayLabel"),Kt(a,"monthLabel"),Kt(a,"yearLabel")}),Cr(la(t.radar),function(a){Kt(a,"name")}),Cr(la(t.geo),function(a){jo(a)&&(sr(a),Cr(la(a.regions),function(i){sr(i)}))}),Cr(la(t.timeline),function(a){sr(a),Te(a,"label"),Te(a,"itemStyle"),Te(a,"controlStyle",!0);var i=a.data;z(i)&&M(i,function(n){lt(n)&&(Te(n,"label"),Te(n,"itemStyle"))})}),Cr(la(t.toolbox),function(a){Te(a,"iconStyle"),Cr(a.feature,function(i){Te(i,"iconStyle")})}),Kt(By(t.axisPointer),"label"),Kt(By(t.tooltip).axisPointer,"label")};function rI(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 aI(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 Vy(t){M(iI,function(e){e[0]in t&&!(e[1]in t)&&(t[e[1]]=t[e[0]])})}var iI=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],nI=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],Gy=function(t,e){eI(t,e),t.series=me(t.series),M(t.series,function(r){if(!!lt(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=rI(r,"pointer.color");i!=null&&aI(r,"itemStyle.color",i)}Vy(r)}}),t.dataRange&&(t.visualMap=t.dataRange),M(nI,function(r){var a=t[r];a&&(z(a)||(a=[a]),M(a,function(i){Vy(i)}))})},oI=function(t){var e=ht();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(sI)};function sI(t){M(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 Hy(t,e){Tr.isInstance(t)||(t=Tr.seriesDataToSource(t)),this._source=t;var r=this._data=t.data,a=t.sourceFormat;if(a===Ko){if(T&&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===Yo?a+"_"+t.seriesLayoutBy:a];T&>(i,"Invalide sourceFormat: "+a),et(this,i)}var wv=Hy.prototype;wv.pure=!1,wv.persistent=!0,wv.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:bv},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:Fy,getItem:Wy,appendData:bv},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;M(t,function(r,a){for(var i=e[a]||(e[a]=[]),n=0;n<(r||[]).length;n++)i.push(r[n])})}},original:{count:Fy,getItem:Wy,appendData:bv},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){T&>(pr(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 Fy(){return this._data.length}function Wy(t){return this._data[t]}function bv(t){for(var e=0;e<t.length;e++)this._data.push(t[e])}var uI={arrayRows:Sv,objectRows:function(t,e,r,a){return r!=null?t[a]:t},keyedColumns:Sv,original:function(t,e,r,a){var i=Io(t);return r==null||!(i instanceof Array)?i:i[r]},typedArray:Sv};function Sv(t,e,r,a){return r!=null?t[r]:t}var Uy={arrayRows:$y,objectRows:function(t,e,r,a){return Av(t[e],this._dimensionInfos[e])},keyedColumns:$y,original:function(t,e,r,a){var i=t&&(t.value==null?t:t.value);return!this._rawData.pure&&cD(t)&&(this.hasItemOption=!0),Av(i instanceof Array?i[a]:i,this._dimensionInfos[e])},typedArray:function(t,e,r,a){return t[a]}};function $y(t,e,r,a){return Av(t[a],this._dimensionInfos[e])}function Av(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=+$o(t)),t==null||t===""?NaN:+t}function Ti(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),uI[i](a,e,o,n)}}}function Zy(t,e,r){if(!!t){var a=t.getProvider().getSource().sourceFormat;if(!(a!==Si&&a!==Xo)){var i=t.getRawDataItem(e);if(a===Si&&!lt(i)&&(i=null),i)return i[r]}}}var hI=/\{@(.+?)\}/g,Tv={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=_0(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:ou({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=sv(l,s);return u.replace(hI,function(h,f){var c=f.length;return f.charAt(0)==="["&&f.charAt(c-1)==="]"&&(f=+f.slice(1,c-1)),Ti(n,t,f)})}},getRawValue:function(t,e){return Ti(this.getData(e),t)},formatTooltip:function(){}};function Jo(t){return new Yy(t)}function Yy(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 Ba=Yy.prototype;Ba.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=fI(this,r)),this._modBy=s,this._modDataCount=l;var f=t&&t.step;if(e?(T&>(e._outputDueEnd!=null),this._dueEnd=e._outputDueEnd):(T&>(!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(z(d))for(var g=0;g<d.length;g++)qy(this,d[g],c,v,s,l);else qy(this,d,c,v,s,l)}this._dueIndex=v;var p=this._settedOutputEnd!=null?this._settedOutputEnd:v;T&>(p>=this._outputDueEnd),this._outputDueEnd=p}else this._dueIndex=this._outputDueEnd=this._settedOutputEnd!=null?this._settedOutputEnd:this._dueEnd;return this.unfinished()};var Xy=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}}();Ba.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)};function qy(t,e,r,a,i,n){Xy.reset(r,a,i,n),t._callingProgress=e,t._callingProgress({start:r,end:a,count:a-r,next:Xy.next},t.context)}function fI(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),z(r)&&!r.length&&(r=null)),t._progress=r,t._modBy=t._modDataCount=null;var i=t._downstream;return i&&i.dirty(),a}Ba.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},Ba.pipe=function(t){T&>(t&&!t._disposed&&t!==this),(this._downstream!==t||this._dirty)&&(this._downstream=t,t._upstream=this,t.dirty())},Ba.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},Ba.getUpstream=function(){return this._upstream},Ba.getDownstream=function(){return this._downstream},Ba.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t};var ts=Pe(),Vt=wt.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=Jo({count:vI,reset:dI}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,r),Iy(this);var i=this.getInitialData(t,r);jy(i,this),this.dataTask.context.data=i,T&>(i,"getInitialData returned invalid data."),ts(this).dataBeforeProcessed=i,Ky(this)},mergeDefaultAndTheme:function(t,e){var r=this.layoutMode,a=r?Cn(t):{},i=this.subType;wt.hasClass(i)&&(i+="Series"),ut(t,e.getTheme().get(this.subType)),ut(t,this.getDefaultOption()),fi(t,"label",["show"]),this.fillDataTextStyle(t.data),r&&za(t,a,r)},mergeOption:function(t,e){t=ut(this.option,t,!0),this.fillDataTextStyle(t.data);var r=this.layoutMode;r&&za(this.option,t,r),Iy(this);var a=this.getInitialData(t,e);jy(a,this),this.dataTask.dirty(),this.dataTask.context.data=a,ts(this).dataBeforeProcessed=a,Ky(this)},fillDataTextStyle:function(t){if(t&&!pr(t))for(var e=["show"],r=0;r<t.length;r++)t[r]&&t[r].label&&fi(t[r],"label",e)},getInitialData:function(){},appendData:function(t){var e=this.getRawData();e.appendData(t.data)},getData:function(t){var e=Cv(this);if(e){var r=e.context.data;return t==null?r:r.getLinkedData(t)}else return ts(this).data},setData:function(t){var e=Cv(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)}ts(this).data=t},getSource:function(){return zM(this)},getRawData:function(){return ts(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(I){var L=an(I,function(W,$,X){var K=f.getDimensionInfo(X);return W|=K&&K.tooltip!==!1&&K.displayName!=null},0),P=[];c.length?M(c,function(W){R(Ti(f,t,W),W)}):M(I,R);function R(W,$){var X=f.getDimensionInfo($);if(!(!X||X.otherDims.tooltip===!1)){var K=X.type,Q="sub"+i.seriesIndex+"at"+l,j=ou({color:p,type:"subItem",renderMode:a,markerId:Q}),U=typeof j=="string"?j:j.content,tt=(L?U+kt(X.displayName||"-")+": ":"")+kt(K==="ordinal"?W+"":K==="time"?e?"":lv("yyyy/MM/dd hh:mm:ss",W):ka(W));tt&&P.push(tt),o&&(s[Q]=p,++l)}}var E=L?o?`
| `:"<br/>":"",Z=E+P.join(E||", ");return{renderMode:a,content:Z,style:s}}function h(I){return{renderMode:a,content:kt(ka(I)),style:s}}var f=this.getData(),c=f.mapDimension("defaultedTooltip",!0),v=c.length,d=this.getRawValue(t),g=z(d),p=f.getItemVisual(t,"color");lt(p)&&p.colorStops&&(p=(p.colorStops[0]||{}).color),p=p||"transparent";var m=v>1||g&&!v?u(d):h(v?Ti(f,t,c[0]):g?d[0]:d),y=m.content,_=i.seriesIndex+"at"+l,w=ou({color:p,type:"item",renderMode:a,markerId:_});s[_]=p,++l;var b=f.getName(t),A=this.name;Ec(this)||(A=""),A=A?kt(A)+(e?": ":n):"";var S=typeof w=="string"?w:w.content,D=e?S+A+y:A+S+(b?kt(b)+": "+y:y);return{html:D,markers:s}},isAnimationEnabled:function(){if(G.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=fv.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});Dt(Vt,Tv),Dt(Vt,fv);function Ky(t){var e=t.name;Ec(t)||(t.name=cI(t)||e)}function cI(t){var e=t.getRawData(),r=e.mapDimension("seriesName",!0),a=[];return M(r,function(i){var n=e.getDimensionInfo(i);n.displayName&&a.push(n.displayName)}),a.join(" ")}function vI(t){return t.model.getRawData().count()}function dI(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),gI}function gI(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function jy(t,e){M(t.CHANGABLE_METHODS,function(r){t.wrapMethod(r,ot(pI,e))})}function pI(t){var e=Cv(t);e&&e.setOutputEnd(this.count())}function Cv(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 Fr=function(){this.group=new q,this.uid=Wo("viewComponent")};Fr.prototype={constructor:Fr,init:function(t,e){},render:function(t,e,r,a){},dispose:function(){},filterForExposedEvent:null};var Dv=Fr.prototype;Dv.updateView=Dv.updateLayout=Dv.updateVisual=function(t,e,r,a){},Lo(Fr),kl(Fr,{registerWhenExtend:!0});var Mn=function(){var t=Pe();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"}},Qy=Pe(),mI=Mn();function ue(){this.group=new q,this.uid=Wo("viewChart"),this.renderTask=Jo({plan:yI,reset:_I}),this.renderTask.context={view:this}}ue.prototype={type:"chart",init:function(t,e){},render:function(t,e,r,a){},highlight:function(t,e,r,a){Jy(t.getData(),a,"emphasis")},downplay:function(t,e,r,a){Jy(t.getData(),a,"normal")},remove:function(t,e){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};var Mv=ue.prototype;Mv.updateView=Mv.updateLayout=Mv.updateVisual=function(t,e,r,a){this.render(t,e,r,a)};function Iv(t,e,r){if(t&&(t.trigger(e,r),t.isGroup&&!tu(t)))for(var a=0,i=t.childCount();a<i;a++)Iv(t.childAt(a),e,r)}function Jy(t,e,r){var a=Rl(t,e),i=e&&e.highlightKey!=null?sy(e.highlightKey):null;a!=null?M(me(a),function(n){Iv(t.getItemGraphicEl(n),r,i)}):t.eachItemGraphicEl(function(n){Iv(n,r,i)})}Lo(ue,["dispose"]),kl(ue,{registerWhenExtend:!0}),ue.markUpdateMethod=function(t,e){Qy(t).updateMethod=e};function yI(t){return mI(t.model)}function _I(t){var e=t.model,r=t.ecModel,a=t.api,i=t.payload,n=e.pipelineContext.progressiveRender,o=t.view,s=i&&Qy(i).updateMethod,l=n?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](e,r,a,i),xI[l]}var xI={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)}}},vu="\0__throttleOriginMethod",t_="\0__throttleRate",e_="\0__throttleType";function du(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 es(t,e,r,a){var i=t[e];if(!!i){var n=i[vu]||i,o=i[e_],s=i[t_];if(s!==r||o!==a){if(r==null||!a)return t[e]=n;i=t[e]=du(n,r,a==="debounce"),i[vu]=n,i[e_]=a,i[t_]=r}return i}}function r_(t,e){var r=t[e];r&&r[vu]&&(t[e]=r[vu])}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=se(i)&&!(i instanceof Vr)?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}}}},ua={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:""}}}},bI=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 w=g.getData();window.data=w,w.count()>i?m+=f(c("data.partialData"),{displayCnt:i}):m+=c("data.allData");for(var b=[],A=0;A<w.count();A++)if(A<i){var S=w.getName(A),D=Ti(w,A);b.push(f(c(S?"data.withName":"data.withoutName"),{name:S,value:D}))}m+=b.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 M(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=ua.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 ua.series.typeNames[g]||"\u81EA\u5B9A\u4E49\u56FE"}},gu=Math.PI,SI=function(t,e){e=e||{},J(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 q,a=new xt({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});r.add(a);var i=e.fontSize+" sans-serif",n=new xt({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 Uc({shape:{startAngle:-gu/2,endAngle:-gu/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:gu*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:gu*3/2}).delay(300).start("circularInOut"),r.add(o)}return r.resize=function(){var s=er(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 pu(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=ht()}var lr=pu.prototype;lr.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(r){var a=r.overallTask;a&&a.dirty()})},lr.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}}},lr.getPipeline=function(t){return this._pipelineMap.get(t)},lr.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}},lr.restorePipelines=function(t){var e=this,r=e._pipelineMap=ht();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}),mu(e,a,a.dataTask)})},lr.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.ecInstance.getModel(),r=this.api;M(this._allHandlers,function(a){var i=t.get(a.uid)||t.set(a.uid,[]);a.reset&&AI(this,a,i,e,r),a.overallReset&&TI(this,a,i,e,r)},this)},lr.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,mu(this,e,i)},lr.performDataProcessorTasks=function(t,e){a_(this,this._dataProcessorHandlers,t,e,{block:!0})},lr.performVisualTasks=function(t,e,r){a_(this,this._visualHandlers,t,e,r)};function a_(t,e,r,a,i){i=i||{};var n;M(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(),i_(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),i_(g,a),n|=g.perform(m)})}});function o(s,l){return s.setDirty&&(!s.dirtyMap||s.dirtyMap.get(l.__pipeline.id))}t.unfinished|=n}lr.performSeriesTasks=function(t){var e;t.eachSeries(function(r){e|=r.dataTask.perform()}),this.unfinished|=e},lr.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 i_=lr.updatePayload=function(t,e){e!=="remain"&&(t.context.payload=e)};function AI(t,e,r,a,i){var n=r.seriesTaskMap||(r.seriesTaskMap=ht()),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,Jo({plan:LI,reset:PI,count:RI}));c.context={model:h,ecModel:a,api:i,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:t},mu(t,h,c)}var u=t._pipelineMap;n.each(function(h,f){u.get(f)||(h.dispose(),n.removeKey(f))})}function TI(t,e,r,a,i){var n=r.overallTask=r.overallTask||Jo({reset:CI});n.context={ecModel:a,api:i,overallReset:e.overallReset,scheduler:t};var o=n.agentStubMap=n.agentStubMap||ht(),s=e.seriesType,l=e.getTargetSeries,u=!0,h=e.modifyOutputEnd;s?a.eachRawSeriesByType(s,f):l?l(a,i).each(f):(u=!1,M(a.getSeries(),f));function f(v){var d=v.uid,g=o.get(d);g||(g=o.set(d,Jo({reset:DI,onDirty:II})),n.dirty()),g.context={model:v,overallProgress:u,modifyOutputEnd:h},g.agent=n,g.__block=u,mu(t,v,g)}var c=t._pipelineMap;o.each(function(v,d){c.get(d)||(v.dispose(),n.dirty(),o.removeKey(d))})}function CI(t){t.overallReset(t.ecModel,t.api,t.payload)}function DI(t,e){return t.overallProgress&&MI}function MI(){this.agent.dirty(),this.getDownstream().dirty()}function II(){this.agent&&this.agent.dirty()}function LI(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function PI(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=me(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?V(e,function(r,a){return n_(a)}):EI}var EI=n_(0);function n_(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 RI(t){return t.data.count()}function mu(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}pu.wrapStageHandler=function(t,e){return se(t)&&(t={overallReset:t,seriesType:OI(t)}),t.uid=Wo("stageHandler"),e&&(t.visualType=e),t};function OI(t){yu=null;try{t(rs,o_)}catch{}return yu}var rs={},o_={},yu;s_(rs,pv),s_(o_,Ny),rs.eachSeriesByType=rs.eachRawSeriesByType=function(t){yu=t},rs.eachComponent=function(t){t.mainType==="series"&&t.subType&&(yu=t.subType)};function s_(t,e){for(var r in e.prototype)t[r]=ce}var l_=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],NI={color:l_,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],l_]},xe="#eee",_u=function(){return{axisLine:{lineStyle:{color:xe}},axisTick:{lineStyle:{color:xe}},axisLabel:{textStyle:{color:xe}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:xe}}}},Lv=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],u_={color:Lv,backgroundColor:"#333",tooltip:{axisPointer:{lineStyle:{color:xe},crossStyle:{color:xe},label:{color:"#000"}}},legend:{textStyle:{color:xe}},textStyle:{color:xe},title:{textStyle:{color:xe}},toolbox:{iconStyle:{normal:{borderColor:xe}}},dataZoom:{textStyle:{color:xe}},visualMap:{textStyle:{color:xe}},timeline:{lineStyle:{color:xe},itemStyle:{normal:{color:Lv[1]}},label:{normal:{textStyle:{color:xe}}},controlStyle:{normal:{color:xe,borderColor:xe}}},timeAxis:_u(),logAxis:_u(),valueAxis:_u(),categoryAxis:_u(),line:{symbol:"circle"},graph:{color:Lv},gauge:{title:{textStyle:{color:xe}}},candlestick:{itemStyle:{normal:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}}};u_.categoryAxis.splitLine.show=!1,wt.extend({type:"dataset",defaultOption:{seriesLayoutBy:My,sourceHeader:null,dimensions:null,source:null},optionUpdated:function(){kM(this)}}),Fr.extend({type:"dataset"});var kI=pt.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()}}),Va=/[\s,]+/;function h_(t){if(Lt(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 xu(){this._defs={},this._root=null,this._isDefine=!1,this._isText=!1}xu.prototype.parse=function(t,e){e=e||{};var r=h_(t);if(!r)throw new Error("Illegal svg");var a=new q;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),We(r,a,null,!0);for(var s=r.firstChild;s;)this._parseNode(s,a),s=s.nextSibling;var l,u;if(i){var h=tr(i).split(Va);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=d_(l,n,o),!e.ignoreViewBox)){var f=a;a=new q,a.add(f),f.scale=u.scale.slice(),f.position=u.position.slice()}return!e.ignoreRootClip&&n!=null&&o!=null&&a.setClipPath(new xt({shape:{x:0,y:0,width:n,height:o}})),{root:a,width:n,height:o,viewBoxRect:l,viewBoxTransform:u}},xu.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=BI[r];if(i){var n=i.call(this,t),o=t.getAttribute("id");o&&(this._defs[o]=n)}}else{var i=zI[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)},xu.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 dt({style:{text:t.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});ur(e,i),We(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 zI={g:function(t,e){var r=new q;return ur(e,r),We(t,r,this._defs),r},rect:function(t,e){var r=new xt;return ur(e,r),We(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 Br;return ur(e,r),We(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 ye;return ur(e,r),We(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 kI;return ur(e,r),We(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=f_(r));var a=new Ge({shape:{points:r||[]}});return ur(e,a),We(t,a,this._defs),a},polyline:function(t,e){var r=new pt;ur(e,r),We(t,r,this._defs);var a=t.getAttribute("points");a&&(a=f_(a));var i=new ir({shape:{points:a||[]}});return i},image:function(t,e){var r=new ve;return ur(e,r),We(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 q;return ur(e,o),We(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 q;return ur(e,o),We(t,o,this._defs),this._textX+=i,this._textY+=n,o},path:function(t,e){var r=t.getAttribute("d")||"",a=H0(r);return ur(e,a),We(t,a,this._defs),a}},BI={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 pi(e,r,a,i);return VI(t,n),n},radialgradient:function(t){}};function VI(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 ur(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),J(e.__inheritedStyle,t.__inheritedStyle))}function f_(t){for(var e=tr(t).split(Va),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 In={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 We(t,e,r,a){var i=e.__inheritedStyle||{},n=e.type==="text";if(t.nodeType===1&&(FI(t,e),et(i,WI(t)),!a)){for(var o in In)if(In.hasOwnProperty(o)){var s=t.getAttribute(o);s!=null&&(i[In[o]]=s)}}var l=n?"textFill":"fill",u=n?"textStroke":"stroke";e.style=e.style||new Da;var h=e.style;i.fill!=null&&h.set(l,c_(i.fill,r)),i.stroke!=null&&h.set(u,c_(i.stroke,r)),M(["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"),M(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],function(f){i[f]!=null&&h.set(f,i[f])}),i.lineDash&&(e.style.lineDash=tr(i.lineDash).split(Va)),h[u]&&h[u]!=="none"&&(e[u]=!0),e.__inheritedStyle=i}var GI=/url\(\s*#(.*?)\)/;function c_(t,e){var r=e&&t&&t.match(GI);if(r){var a=tr(r[1]),i=e[a];return i}return t}var HI=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g;function FI(t,e){var r=t.getAttribute("transform");if(r){r=r.replace(/,/g," ");var a=null,i=[];r.replace(HI,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||Ie(),s){case"translate":o=tr(o).split(Va),yr(a,a,[parseFloat(o[0]),parseFloat(o[1]||0)]);break;case"scale":o=tr(o).split(Va),wo(a,a,[parseFloat(o[0]),parseFloat(o[1]||o[0])]);break;case"rotate":o=tr(o).split(Va),aa(a,a,parseFloat(o[0]));break;case"skew":o=tr(o).split(Va),console.warn("Skew transform is not supported yet");break;case"matrix":var o=tr(o).split(Va);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 v_=/([^\s:;]+)\s*:\s*([^:;]+)/g;function WI(t){var e=t.getAttribute("style"),r={};if(!e)return r;var a={};v_.lastIndex=0;for(var i;(i=v_.exec(e))!=null;)a[i[1]]=i[2];for(var n in In)In.hasOwnProperty(n)&&a[n]!=null&&(r[In[n]]=a[n]);return r}function d_(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 UI(t,e){var r=new xu;return r.parse(t,e)}var g_=ht(),wu={registerMap:function(t,e,r){var a;return z(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}]),M(a,function(i){var n=i.type;n==="geoJson"&&(n=i.type="geoJSON");var o=$I[n];T&>(o,"Illegal map type: "+n),o(i)}),g_.set(t,a)},retrieveMap:function(t){return g_.get(t)}},$I={geoJSON:function(t){var e=t.source;t.geoJSON=Lt(e)?typeof JSON<"u"&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")():e},svg:function(t){t.svgXML=h_(t.source)}},Ln=gt,ae=M,ZI=se,as=lt,Pv=wt.parseClassType,p_="4.8.0",Ev={zrender:"4.3.1"},YI=1,m_=1e3,XI=800,qI=900,KI=5e3,y_=1e3,jI=1100,__=2e3,x_=3e3,QI=3500,JI=4e3,t2=5e3,Wr={PROCESSOR:{FILTER:m_,SERIES_FILTER:XI,STATISTIC:KI},VISUAL:{LAYOUT:y_,PROGRESSIVE_LAYOUT:jI,GLOBAL:__,CHART:x_,POST_CHART_LAYOUT:QI,COMPONENT:JI,BRUSH:t2}},hr="__flagInMainProcess",Ga="__optionUpdated",w_=/^[a-zA-Z0-9_]+$/;function Pn(t,e){return function(r,a,i){if(!e&&this._disposed){Ue(this.id);return}r=r&&r.toLowerCase(),le.prototype[t].call(this,r,a,i)}}function is(){le.call(this)}is.prototype.on=Pn("on",!0),is.prototype.off=Pn("off",!0),is.prototype.one=Pn("one",!0),Dt(is,le);function ns(t,n,r){r=r||{},typeof n=="string"&&(n=P_[n]),this.id,this.group,this._dom=t;var a="canvas";T&&(a=(typeof window>"u"?global:window).__ECHARTS__DEFAULT__RENDERER__||a);var i=this._zr=Mc(t,{renderer:r.renderer||a,devicePixelRatio:r.devicePixelRatio,width:r.width,height:r.height});this._throttledZrFlush=du(it(i.flush,i),17);var n=rt(n);n&&Gy(n,!0),this._theme=n,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new _e;var o=this._api=o2(this);function s(l,u){return l.__prio-u.__prio}wl(Cu,s),wl(zv,s),this._scheduler=new pu(this,o,zv,Cu),le.call(this,this._ecEventProcessor=new kv),this._messageCenter=new is,this._initEvents(),this.resize=it(this.resize,this),this._pendingActions=[],i.animation.on("frame",this._onframe,this),e2(i,this),vf(this)}var At=ns.prototype;At._onframe=function(){if(!this._disposed){var t=this._scheduler;if(this[Ga]){var e=this[Ga].silent;this[hr]=!0,os(this),Ha.update.call(this),this[hr]=!1,this[Ga]=!1,bu.call(this,e),Su.call(this,e)}else if(t.unfinished){var r=YI,a=this._model,i=this._api;t.unfinished=!1;do{var n=+new Date;t.performSeriesTasks(a),t.performDataProcessorTasks(a),A_(this,a),t.performVisualTasks(a),Ov(this,this._model,i,"remain"),r-=+new Date-n}while(r>0&&t.unfinished);t.unfinished||this._zr.flush()}}},At.getDom=function(){return this._dom},At.getZr=function(){return this._zr},At.setOption=function(t,e,r){if(T&&Ln(!this[hr],"`setOption` should not be called during main process."),this._disposed){Ue(this.id);return}var a;if(as(e)&&(r=e.lazyUpdate,a=e.silent,e=e.notMerge),this[hr]=!0,!this._model||e){var i=new _v(this._api),n=this._theme,o=this._model=new pv;o.scheduler=this._scheduler,o.init(null,null,n,i)}this._model.setOption(t,I_),r?(this[Ga]={silent:a},this[hr]=!1):(os(this),Ha.update.call(this),this._zr.flush(),this[Ga]=!1,this[hr]=!1,bu.call(this,a),Su.call(this,a))},At.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},At.getModel=function(){return this._model},At.getOption=function(){return this._model&&this._model.getOption()},At.getWidth=function(){return this._zr.getWidth()},At.getHeight=function(){return this._zr.getHeight()},At.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},At.getRenderedCanvas=function(t){if(!!G.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)}},At.getSvgDataURL=function(){if(!!G.svgSupported){var t=this._zr,e=t.storage.getDisplayList();return M(e,function(r){r.stopAnimation(!0)}),t.painter.toDataURL()}},At.getDataURL=function(t){if(this._disposed){Ue(this.id);return}t=t||{};var e=t.excludeComponents,r=this._model,a=[],i=this;ae(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 ae(a,function(o){o.group.ignore=!1}),n},At.getConnectedDataURL=function(t){if(this._disposed){Ue(this.id);return}if(!!G.canvasSupported){var e=t.type==="svg",r=this.group,a=Math.min,i=Math.max,n=1/0;if(Du[r]){var o=n,s=n,l=-n,u=-n,h=[],f=t&&t.pixelRatio||1;M(Ci,function(m,y){if(m.group===r){var _=e?m.getZr().painter.getSvgDom().innerHTML:m.getRenderedCanvas(rt(t)),w=m.getDom().getBoundingClientRect();o=a(w.left,o),s=a(w.top,s),l=i(w.right,l),u=i(w.bottom,u),h.push({dom:_,left:w.left,top:w.top})}}),o*=f,s*=f,l*=f,u*=f;var c=l-o,v=u-s,d=rn(),g=Mc(d,{renderer:e?"svg":"canvas"});if(g.resize({width:c,height:v}),e){var p="";return ae(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 xt({shape:{x:0,y:0,width:c,height:v},style:{fill:t.connectedBackgroundColor}})),ae(h,function(m){var y=new ve({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)}},At.convertToPixel=ot(b_,"convertToPixel"),At.convertFromPixel=ot(b_,"convertFromPixel");function b_(t,e,r){if(this._disposed){Ue(this.id);return}var a=this._model,i=this._coordSysMgr.getCoordinateSystems(),n;e=Ol(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}T&&console.warn("No coordinate system that supports "+t+" found by the given finder.")}At.containPixel=function(t,e){if(this._disposed){Ue(this.id);return}var r=this._model,a;return t=Ol(r,t),M(t,function(i,n){n.indexOf("Models")>=0&&M(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):T&&console.warn(n+": "+(l?"The found component do not support containPoint.":"No view mapping to the found component."))}else T&&console.warn(n+": containPoint is not supported")},this)},this),!!a},At.getVisual=function(t,e){var r=this._model;t=Ol(r,t,{defaultMainType:"series"});var a=t.seriesModel;T&&(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)},At.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},At.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]};var Ha={prepareAndUpdate:function(t){os(this),Ha.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),A_(this,e),i.update(e,r),Rv(e),n.performVisualTasks(e,t),D_(this,e,r,t);var o=e.get("backgroundColor")||"transparent";if(G.canvasSupported)a.setBackgroundColor(o);else{var s=Ve(o);o=ia(s,"rgb"),s[3]===0&&(o="transparent")}Nv(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=ht();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)}),Rv(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0,dirtyMap:n}),Ov(r,e,a,t,n),Nv(e,this._api)}},updateView:function(t){var e=this._model;!e||(ue.markUpdateMethod(t,"updateView"),Rv(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0}),D_(this,this._model,this._api,t),Nv(e,this._api))},updateVisual:function(t){Ha.update.call(this,t)},updateLayout:function(t){Ha.update.call(this,t)}};function os(t){var e=t._model,r=t._scheduler;r.restorePipelines(e),r.prepareStageTasks(),C_(t,"component",e,r),C_(t,"chart",e,r),r.plan()}function S_(t,e,r,a,i){var n=t._model;if(!a){ae(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=ht(me(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)}}At.resize=function(t){if(T&&Ln(!this[hr],"`resize` should not be called during main process."),this._disposed){Ue(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[hr]=!0,r&&os(this),Ha.update.call(this),this[hr]=!1,bu.call(this,a),Su.call(this,a)}};function A_(t,e){var r=t._chartsMap,a=t._scheduler;e.eachSeries(function(i){a.updateStreamModes(i,r[i.__viewId])})}At.showLoading=function(t,e){if(this._disposed){Ue(this.id);return}if(as(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),!Bv[t]){T&&console.warn("Loading effects "+t+" not exists.");return}var r=Bv[t](this._api,e),a=this._zr;this._loadingFX=r,a.add(r)},At.hideLoading=function(){if(this._disposed){Ue(this.id);return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},At.makeActionFromEvent=function(t){var e=et({},t);return e.type=Tu[t.type],e},At.dispatchAction=function(t,e){if(this._disposed){Ue(this.id);return}if(as(e)||(e={silent:!!e}),!!Au[t.type]&&!!this._model){if(this[hr]){this._pendingActions.push(t);return}T_.call(this,t,e.silent),e.flush?this._zr.flush(!0):e.flush!==!1&&G.browser.weChat&&this._throttledZrFlush(),bu.call(this,e.silent),Su.call(this,e.silent)}};function T_(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&&Pv(o[0]),this[hr]=!0;var l=[t],u=!1;t.batch&&(u=!0,l=V(t.batch,function(v){return v=J(et({},v),t),v.batch=null,v}));var h=[],f,c=r==="highlight"||r==="downplay";ae(l,function(v){f=i.action(v,this._model,this._api),f=f||et({},v),f.type=n.event||f.type,h.push(f),c?S_(this,s,v,"series"):o&&S_(this,s,v,o.main,o.sub)},this),s!=="none"&&!c&&!o&&(this[Ga]?(os(this),Ha.update.call(this,t),this[Ga]=!1):Ha[s].call(this,t)),u?f={type:n.event||r,escapeConnect:a,batch:h}:f=h[0],this[hr]=!1,!e&&this._messageCenter.trigger(f.type,f)}function bu(t){for(var e=this._pendingActions;e.length;){var r=e.shift();T_.call(this,r,t)}}function Su(t){!t&&this.trigger("updated")}function e2(t,e){t.on("rendered",function(){e.trigger("rendered"),t.animation.isFinished()&&!e[Ga]&&!e._scheduler.unfinished&&!e._pendingActions.length&&e.trigger("finished")})}At.appendData=function(t){if(this._disposed){Ue(this.id);return}var e=t.seriesIndex,r=this.getModel(),a=r.getSeriesByIndex(e);T&&Ln(t.data&&a),a.appendData(t),this._scheduler.unfinished=!0},At.on=Pn("on",!1),At.off=Pn("off",!1),At.one=Pn("one",!1);function C_(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=Pv(c.type),p=i?Fr.getClass(g.main,g.sub):ue.getClass(g.sub);T&&Ln(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 Rv(t){t.clearColorPalette(),t.eachSeries(function(e){e.clearColorPalette()})}function D_(t,e,r,a){r2(t,e,r,a),ae(t._chartsViews,function(i){i.__alive=!1}),Ov(t,e,r,a),ae(t._chartsViews,function(i){i.__alive||i.remove(e,r)})}function r2(t,e,r,a,i){ae(i||t._componentsViews,function(n){var o=n.__model;n.render(o,e,r,a),M_(o,n)})}function Ov(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"),M_(s,l),n2(s,l)}),n.unfinished|=o,i2(t,e),bI(t._zr.dom,e)}function Nv(t,e){ae(L_,function(r){r(t,e)})}var a2=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];At._initEvents=function(){ae(a2,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=et({},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];T&&!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),ae(Tu,function(t,e){this._messageCenter.on(e,function(r){this.trigger(e,r)},this)},this)},At.isDisposed=function(){return this._disposed},At.clear=function(){if(this._disposed){Ue(this.id);return}this.setOption({series:[]},!0)},At.dispose=function(){if(this._disposed){Ue(this.id);return}this._disposed=!0,y0(this.getDom(),Vv,"");var t=this._api,e=this._model;ae(this._componentsViews,function(r){r.dispose(e,t)}),ae(this._chartsViews,function(r){r.dispose(e,t)}),this._zr.dispose(),delete Ci[this.id]},Dt(ns,le);function Ue(t){T&&console.warn("Instance "+t+" has been disposed")}function i2(t,e){var r=t._zr,a=r.storage,i=0;a.traverse(function(n){i++}),i>e.get("hoverLayerThreshold")&&!G.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 n2(t,e){var r=t.get("blendMode")||null;T&&!G.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 M_(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 o2(t){var e=t._coordSysMgr;return et(new Ny(t),{getCoordinateSystems:it(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 kv(){this.eventInfo}kv.prototype={constructor:kv,normalizeQuery:function(t){var e={},r={},a={};if(Lt(t)){var i=Pv(t);e.mainType=i.main||null,e.subType=i.sub||null}else{var n=["Index","Name","Id"],o={name:1,dataIndex:1,dataType:1};M(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={},Tu={},zv=[],I_=[],L_=[],Cu=[],P_={},Bv={},Ci={},Du={},s2=new Date-0,l2=new Date-0,Vv="_echarts_instance_";function u2(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}}ae(Tu,function(o,s){t._messageCenter.on(s,function(l){if(Du[t.group]&&t[i]!==e){if(l&&l.escapeConnect)return;var u=t.makeActionFromEvent(l),h=[];ae(Ci,function(f){f!==t&&f.group===t.group&&h.push(f)}),n(h,e),ae(h,function(f){f[i]!==r&&f.dispatchAction(u)}),n(h,a)}})})}function h2(t,e,r){if(T){if(Dc.replace(".","")-0<Ev.zrender.replace(".","")-0)throw new Error("zrender/src "+Dc+" is too old for ECharts "+p_+". Current version need ZRender "+Ev.zrender+"+");if(!t)throw new Error("Initialize failed: invalid dom.")}var a=Gv(t);if(a)return T&&console.warn("There is a chart instance already initialized on the dom."),a;T&&nn(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 ns(t,e,r);return i.id="ec_"+s2++,Ci[i.id]=i,y0(t,Vv,i.id),u2(i),i}function f2(t){if(z(t)){var e=t;t=null,ae(e,function(r){r.group!=null&&(t=r.group)}),t=t||"g_"+l2++,ae(e,function(r){r.group=t})}return Du[t]=!0,t}function E_(t){Du[t]=!1}var c2=E_;function v2(t){typeof t=="string"?t=Ci[t]:t instanceof ns||(t=Gv(t)),t instanceof ns&&!t.isDisposed()&&t.dispose()}function Gv(t){return Ci[gD(t,Vv)]}function d2(t){return Ci[t]}function Hv(t,e){P_[t]=e}function we(t){I_.push(t)}function $e(t,e){Wv(zv,t,e,m_)}function g2(t){L_.push(t)}function mt(t,e,r){typeof e=="function"&&(r=e,e="");var a=as(t)?t.type:[t,t={event:e}][0];t.event=(t.event||a).toLowerCase(),e=t.event,Ln(w_.test(a)&&w_.test(e)),Au[a]||(Au[a]={action:r,actionInfo:t}),Tu[e]=a}function Fv(t,e){_e.register(t,e)}function p2(t){var e=_e.get(t);if(e)return e.getDimensionsInfo?e.getDimensionsInfo():e.dimensions.slice()}function Gt(t,e){Wv(Cu,t,e,y_,"layout")}function Rt(t,e){Wv(Cu,t,e,x_,"visual")}function Wv(t,e,r,a,i){if((ZI(e)||as(e))&&(r=e,e=a),T){if(isNaN(e)||e==null)throw new Error("Illegal priority");ae(t,function(o){Ln(o.__raw!==r)})}var n=pu.wrapStageHandler(r,i);return n.__prio=e,n.__raw=r,t.push(n),n}function R_(t,e){Bv[t]=e}function Ze(t){return wt.extend(t)}function he(t){return Fr.extend(t)}function Mu(t){return Vt.extend(t)}function ke(t){return ue.extend(t)}function m2(t){om("createCanvas",t)}function y2(t,e,r){wu.registerMap(t,e,r)}function _2(t){var e=wu.retrieveMap(t);return e&&e[0]&&{geoJson:e[0].geoJSON,specialAreas:e[0].specialAreas}}Rt(__,wI),we(Gy),$e(qI,oI),R_("default",SI),mt({type:"highlight",event:"highlight",update:"highlight"},ce),mt({type:"downplay",event:"downplay",update:"downplay"},ce),Hv("light",NI),Hv("dark",u_);var x2={};function O_(t){return t}function ha(t,e,r,a,i){this._old=t,this._new=e,this._oldKeyGetter=r||O_,this._newKeyGetter=a||O_,this.context=i}ha.prototype={constructor:ha,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(N_(t,r,i,"_oldKeyGetter",this),N_(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 N_(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 Uv=ht(["tooltip","label","itemName","itemId","seriesName"]);function w2(t){var e={},r=e.encode={},a=ht(),i=[],n=[],o=e.userOutput={dimensionNames:t.dimensions.slice(),encode:{}};M(t.dimensions,function(f){var c=t.getDimensionInfo(f),v=c.coordDim;if(v){T&>(Uv.get(v)==null);var d=c.coordDimIndex;$v(r,v)[d]=f,c.isExtraCoord||(a.set(v,1),b2(c.type)&&(i[0]=f),$v(o.encode,v)[d]=c.index),c.defaultTooltip&&n.push(f)}Uv.each(function(g,p){var m=$v(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 $v(t,e){return t.hasOwnProperty(e)||(t[e]=[]),t[e]}function Iu(t){return t==="category"?"ordinal":t==="time"?"time":"float"}function b2(t){return!(t==="ordinal"||t==="time")}function ss(t){t!=null&&et(this,t),this.otherDims={}}var Lu=lt,ls="undefined",k_=-1,S2="e\0\0",A2={float:typeof Float64Array===ls?Array:Float64Array,int:typeof Int32Array===ls?Array:Int32Array,ordinal:Array,number:Array,time:Array},T2=typeof Uint32Array===ls?Array:Uint32Array,C2=typeof Int32Array===ls?Array:Int32Array,D2=typeof Uint16Array===ls?Array:Uint16Array;function Pu(t){return t._rawCount>65535?T2:D2}function M2(t){var e=t.constructor;return e===Array?t.slice():new e(t)}var I2=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_rawData","_chunkSize","_chunkCount","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx"],L2=["_extent","_approximateExtent","_rawExtent"];function z_(t,e){M(I2.concat(e.__wrappedMethods||[]),function(r){e.hasOwnProperty(r)&&(t[r]=e[r])}),t.__wrappedMethods=e.__wrappedMethods,M(L2,function(r){t[r]=rt(e[r])}),t._calculationInfo=et(e._calculationInfo)}var fe=function(t,e){t=t||["x","y"];for(var r={},a=[],i={},n=0;n<t.length;n++){var o=t[n];Lt(o)?o=new ss({name:o}):o instanceof ss||(o=new ss(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=w2(this),this._invertedIndicesMap=i,this._calculationInfo={},this.userOutput=this._dimensionsSummary.userOutput},nt=fe.prototype;nt.type="list",nt.hasItemOption=!0,nt.getDimension=function(t){return(typeof t=="number"||!isNaN(t)&&!this._dimensionInfos.hasOwnProperty(t))&&(t=this.dimensions[t]),t},nt.getDimensionInfo=function(t){return this._dimensionInfos[this.getDimension(t)]},nt.getDimensionsOnCoord=function(){return this._dimensionsSummary.dataDimsOnCoord.slice()},nt.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]},nt.initData=function(t,e,r){var a=Tr.isInstance(t)||Qr(t);if(a&&(t=new Hy(t,this.dimensions.length)),T&&!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=Uy[this._rawData.getSource().sourceFormat],this._dimValueGetter=r=r||this.defaultDimValueGetter,this._dimValueGetterArrayRows=Uy.arrayRows,this._rawExtent={},this._initDataFromProvider(0,t.count()),t.pure&&(this.hasItemOption=!1)},nt.getProvider=function(){return this._rawData},nt.appendData=function(t){T&>(!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)},nt.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]=Ru()),a[f]||(a[f]=[]),B_(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={},V_(this)},nt._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]=Ru());var p=s[g];p.otherDims.itemName===0&&(c=this._nameDimIdx=d),p.otherDims.itemId===0&&(this._idDimIdx=d),i[g]||(i[g]=[]),B_(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),w=y%r,b=0;b<o;b++){var g=n[b],A=i[g][_],S=this._dimValueGetter(m,g,y,b);A[w]=S;var D=h[g];S<D[0]&&(D[0]=S),S>D[1]&&(D[1]=S)}if(!a.pure){var I=l[y];if(m&&I==null){if(m.name!=null)l[y]=I=m.name;else if(c!=null){var L=n[c],P=i[L][_];if(P){I=P[w];var R=s[L].ordinalMeta;R&&R.categories.length&&(I=R.categories[I])}}}var E=m==null?null:m.id;E==null&&I!=null&&(f[I]=f[I]||0,E=I,f[I]>0&&(E+="__ec__"+f[I]),f[I]++),E!=null&&(u[y]=E)}}!a.persistent&&a.clean&&a.clean(),this._rawCount=this._count=e,this._extent={},V_(this)}};function B_(t,e,r,a,i){var n=A2[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 V_(t){var e=t._invertedIndicesMap;M(e,function(r,a){var i=t._dimensionInfos[a],n=i.ordinalMeta;if(n){r=e[a]=new C2(n.categories.length);for(var o=0;o<r.length;o++)r[o]=k_;for(var o=0;o<t._count;o++)r[t.get(a,o)]=o}})}function G_(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}nt.count=function(){return this._count},nt.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=Pu(this),t=new r(this.count()),i=0;i<t.length;i++)t[i]=i;return t},nt.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},nt.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]},nt._getFast=function(t,e){var r=Math.floor(e/this._chunkSize),a=e%this._chunkSize,i=this._storage[t][r];return i[a]},nt.getValues=function(t,e){var r=[];z(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},nt.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},nt.getDataExtent=function(t){t=this.getDimension(t);var e=this._storage[t],r=Ru();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},nt.getApproximateExtent=function(t){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t)},nt.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},nt.getCalculationInfo=function(t){return this._calculationInfo[t]},nt.setCalculationInfo=function(t,e){Lu(t)?et(this._calculationInfo,t):this._calculationInfo[t]=e},nt.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},nt.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},nt.rawIndexOf=function(t,e){var r=t&&this._invertedIndicesMap[t];if(T&&!r)throw new Error("Do not supported yet");var a=r[e];return a==null||isNaN(a)?k_:a},nt.indexOfName=function(t){for(var e=0,r=this.count();e<r;e++)if(this.getName(e)===t)return e;return-1},nt.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},nt.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},nt.getRawIndex=us;function us(t){return t}function hs(t){return t<this._count&&t>=0?this._indices[t]:-1}nt.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},nt.getName=function(t){var e=this.getRawIndex(t);return this._nameList[e]||G_(this,this._nameDimIdx,e)||""},nt.getId=function(t){return Zv(this,this.getRawIndex(t))};function Zv(t,e){var r=t._idList[e];return r==null&&(r=G_(t,t._idDimIdx,e)),r==null&&(r=S2+e),r}function Yv(t){return z(t)||(t=[t]),t}function Eu(t,e){for(var r=0;r<e.length;r++)t._dimensionInfos[e[r]]||console.error("Unkown dimension "+e[r])}nt.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=V(Yv(t),this.getDimension,this),T&&Eu(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)}}},nt.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=V(Yv(t),this.getDimension,this),T&&Eu(this,t);for(var i=this.count(),n=Pu(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?hs:us,this}},nt.selectRange=function(t){"use strict";if(!!this._count){var e=[];for(var r in t)t.hasOwnProperty(r)&&e.push(r);T&&Eu(this,e);var a=e.length;if(!!a){var i=this.count(),n=Pu(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]],w=t[e[1]][0],b=t[e[1]][1],d=0;d<this._chunkCount;d++)for(var g=v[d],A=_[d],p=Math.min(this._count-d*this._chunkSize,this._chunkSize),m=0;m<p;m++){var y=g[m],S=A[m];(y>=u&&y<=h||isNaN(y))&&(S>=w&&S<=b||isNaN(S))&&(o[s++]=c),c++}f=!0}}if(!f)if(a===1)for(var m=0;m<i;m++){var D=this.getRawIndex(m),y=this._getFast(l,D);(y>=u&&y<=h||isNaN(y))&&(o[s++]=D)}else for(var m=0;m<i;m++){for(var I=!0,D=this.getRawIndex(m),d=0;d<a;d++){var L=e[d],y=this._getFast(r,D);(y<t[L][0]||y>t[L][1])&&(I=!1)}I&&(o[s++]=this.getRawIndex(m))}return s<i&&(this._indices=o),this._count=s,this._extent={},this.getRawIndex=this._indices?hs:us,this}}},nt.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 H_(t,e){var r=t.dimensions,a=new fe(V(r,t.getDimensionInfo,t),t.hostModel);z_(a,t);for(var i=a._storage={},n=t._storage,o=0;o<r.length;o++){var s=r[o];n[s]&&(yt(e,s)>=0?(i[s]=P2(n[s]),a._rawExtent[s]=Ru(),a._extent[s]=null):i[s]=n[s])}return a}function P2(t){for(var e=new Array(t.length),r=0;r<t.length;r++)e[r]=M2(t[r]);return e}function Ru(){return[1/0,-1/0]}nt.map=function(t,e,r,a){"use strict";r=r||a||this,t=V(Yv(t),this.getDimension,this),T&&Eu(this,t);var i=H_(this,t);i._indices=this._indices,i.getRawIndex=i._indices?hs:us;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],w=d[y],b=f[_],A=n[_];A&&(A[p][m]=w),w<b[0]&&(b[0]=w),w>b[1]&&(b[1]=w)}}}return i},nt.downSample=function(t,e,r,a){for(var i=H_(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(Pu(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),w=this.getRawIndex(Math.min(d+a(o,_)||0,u-1)),b=Math.floor(w/h),A=w%h;l[b][A]=_,_<f[0]&&(f[0]=_),_>f[1]&&(f[1]=_),c[v++]=w}return i._count=v,i._indices=c,i.getRawIndex=hs,i},nt.getItemModel=function(t){var e=this.hostModel;return new _t(this.getRawDataItem(t),e,e&&e.ecModel)},nt.diff=function(t){var e=this;return new ha(t?t.getIndices():[],this.getIndices(),function(r){return Zv(t,r)},function(r){return Zv(e,r)})},nt.getVisual=function(t){var e=this._visual;return e&&e[t]},nt.setVisual=function(t,e){if(Lu(t)){for(var r in t)t.hasOwnProperty(r)&&this.setVisual(r,t[r]);return}this._visual=this._visual||{},this._visual[t]=e},nt.setLayout=function(t,e){if(Lu(t)){for(var r in t)t.hasOwnProperty(r)&&this.setLayout(r,t[r]);return}this._layout[t]=e},nt.getLayout=function(t){return this._layout[t]},nt.getItemLayout=function(t){return this._itemLayouts[t]},nt.setItemLayout=function(t,e,r){this._itemLayouts[t]=r?et(this._itemLayouts[t]||{},e):e},nt.clearItemLayouts=function(){this._itemLayouts.length=0},nt.getItemVisual=function(t,e,r){var a=this._itemVisuals[t],i=a&&a[e];return i==null&&!r?this.getVisual(e):i},nt.setItemVisual=function(t,e,r){var a=this._itemVisuals[t]||{},i=this.hasItemVisual;if(this._itemVisuals[t]=a,Lu(e)){for(var n in e)e.hasOwnProperty(n)&&(a[n]=e[n],i[n]=!0);return}a[e]=r,i[e]=!0},nt.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};var E2=function(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType};nt.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(E2,e)),this._graphicEls[t]=e},nt.getItemGraphicEl=function(t){return this._graphicEls[t]},nt.eachItemGraphicEl=function(t,e){M(this._graphicEls,function(r,a){r&&t&&t.call(e,r,a)})},nt.cloneShallow=function(t){if(!t){var e=V(this.dimensions,this.getDimensionInfo,this);t=new fe(e,this.hostModel)}if(t._storage=this._storage,z_(t,this),this._indices){var r=this._indices.constructor;t._indices=new r(this._indices)}else t._indices=null;return t.getRawIndex=t._indices?hs:us,t},nt.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(on(arguments)))})},nt.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],nt.CHANGABLE_METHODS=["filterSelf","selectRange"];function F_(t,e,r){Tr.isInstance(e)||(e=Tr.seriesDataToSource(e)),r=r||{},t=(t||[]).slice();for(var a=(r.dimsDef||[]).slice(),i=ht(),n=ht(),o=[],s=R2(e,t,a,r.dimCount),l=0;l<s;l++){var u=a[l]=et({},lt(a[l])?a[l]:{name:a[l]}),h=u.name,f=o[l]=new ss;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=ht(c),c.each(function(b,A){if(b=me(b).slice(),b.length===1&&!Lt(b[0])&&b[0]<0){c.set(A,!1);return}var S=c.set(A,[]);M(b,function(D,I){Lt(D)&&(D=i.get(D)),D!=null&&D<s&&(S[I]=D,d(o[D],A,I))})});var v=0;M(t,function(D,A){var S,D,I,L;if(Lt(D))S=D,D={};else{S=D.name;var P=D.ordinalMeta;D.ordinalMeta=null,D=rt(D),D.ordinalMeta=P,I=D.dimsDef,L=D.otherDims,D.name=D.coordDim=D.coordDimIndex=D.dimsDef=D.otherDims=null}var R=c.get(S);if(R!==!1){var R=me(R);if(!R.length)for(var E=0;E<(I&&I.length||1);E++){for(;v<o.length&&o[v].coordDim!=null;)v++;v<o.length&&R.push(v++)}M(R,function(Z,W){var $=o[Z];if(d(J($,D),S,W),$.name==null&&I){var X=I[W];!lt(X)&&(X={name:X}),$.name=$.displayName=X.name,$.defaultTooltip=X.defaultTooltip}L&&J($.otherDims,L)})}});function d(b,A,S){Uv.get(A)!=null?b.otherDims[A]=S:(b.coordDim=A,b.coordDimIndex=S,n.set(A,!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 ss,w=f.coordDim;w==null&&(f.coordDim=W_(y,n,m),f.coordDimIndex=0,(!g||p<=0)&&(f.isExtraCoord=!0),p--),f.name==null&&(f.name=W_(f.coordDim,i)),f.type==null&&(HM(e,_,f.name)===Ae.Must||f.isExtraCoord&&(f.otherDims.itemName!=null||f.otherDims.seriesName!=null))&&(f.type="ordinal")}return o}function R2(t,e,r,a){var i=Math.max(t.dimensionsDetectCount||1,e.length,r.length,a||0);return M(e,function(n){var o=n.dimsDef;o&&(i=Math.max(i,o.length))}),i}function W_(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 En=function(t,e){return e=e||{},F_(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 O2(t){this.coordSysName=t,this.coordSysDims=[],this.axisMap=ht(),this.categoryAxisMap=ht(),this.firstCategoryDimIndex=null}function N2(t){var e=t.get("coordinateSystem"),r=new O2(e),a=k2[e];if(a)return a(t,r,r.axisMap,r.categoryAxisMap),r}var k2={cartesian2d:function(t,e,r,a){var i=t.getReferringComponents("xAxis")[0],n=t.getReferringComponents("yAxis")[0];if(T){if(!i)throw new Error('xAxis "'+Ut(t.get("xAxisIndex"),t.get("xAxisId"),0)+'" not found');if(!n)throw new Error('yAxis "'+Ut(t.get("xAxisIndex"),t.get("yAxisId"),0)+'" not found')}e.coordSysDims=["x","y"],r.set("x",i),r.set("y",n),Rn(i)&&(a.set("x",i),e.firstCategoryDimIndex=0),Rn(n)&&(a.set("y",n),e.firstCategoryDimIndex==null&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,r,a){var i=t.getReferringComponents("singleAxis")[0];if(T&&!i)throw new Error("singleAxis should be specified.");e.coordSysDims=["single"],r.set("single",i),Rn(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(T){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),Rn(n)&&(a.set("radius",n),e.firstCategoryDimIndex=0),Rn(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();M(n.parallelAxisIndex,function(s,l){var u=i.getComponent("parallelAxis",s),h=o[l];r.set(h,u),Rn(u)&&e.firstCategoryDimIndex==null&&(a.set(h,u),e.firstCategoryDimIndex=l)})}};function Rn(t){return t.get("type")==="category"}function U_(t,e,r){r=r||{};var a=r.byIndex,i=r.stackedCoordDimension,n=!!(t&&t.get("stack")),o,s,l,u;if(M(e,function(v,d){Lt(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;M(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 fa(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function fs(t,e){return fa(t,e)?t.getCalculationInfo("stackResultDimension"):e}function ca(t,e,r){r=r||{},Tr.isInstance(t)||(t=Tr.seriesDataToSource(t));var a=e.get("coordinateSystem"),i=_e.get(a),n=N2(e),o;n&&(o=V(n.coordSysDims,function(v){var d={name:v},g=n.axisMap.get(v);if(g){var p=g.get("type");d.type=Iu(p)}return d})),o||(o=i&&(i.getDimensionsInfo?i.getDimensionsInfo():i.dimensions.slice())||["x","y"]);var s=En(t,{coordDimensions:o,generateCoord:r.generateCoord,encodeDefaulter:r.useEncodeDefaulter?ot(Ey,o,e):null}),l,u;n&&M(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=U_(e,s),f=new fe(s,e);f.setCalculationInfo(h);var c=l!=null&&z2(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 z2(t){if(t.sourceFormat===Si){var e=B2(t.data||[]);return e!=null&&!z(Io(e))}}function B2(t){for(var e=0;e<t.length&&t[e]==null;)e++;return t[e]}function jt(t){this._setting=t||{},this._extent=[1/0,-1/0],this._interval=0,this.init&&this.init.apply(this,arguments)}jt.prototype.parse=function(t){return t},jt.prototype.getSetting=function(t){return this._setting[t]},jt.prototype.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},jt.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},jt.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},jt.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])},jt.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},jt.prototype.getExtent=function(){return this._extent.slice()},jt.prototype.setExtent=function(t,e){var r=this._extent;isNaN(t)||(r[0]=t),isNaN(e)||(r[1]=e)},jt.prototype.isBlank=function(){return this._isBlank},jt.prototype.setBlank=function(t){this._isBlank=t},jt.prototype.getLabel=null,Lo(jt),kl(jt,{registerWhenExtend:!0});function cs(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this._map}cs.createByAxisModel=function(t){var e=t.option,r=e.data,a=r&&V(r,V2);return new cs({categories:a,needCollect:!a,deduplication:e.dedplication!==!1})};var $_=cs.prototype;$_.getOrdinal=function(t){return Z_(this).get(t)},$_.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=Z_(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 Z_(t){return t._map||(t._map=ht(t.categories))}function V2(t){return lt(t)&&t.value!=null?t.value:t+""}var Xv=jt.prototype,qv=jt.extend({type:"ordinal",init:function(t,e){(!t||z(t))&&(t=new cs({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),Xv.contain.call(this,t)&&this._ordinalMeta.categories[t]!=null},normalize:function(t){return Xv.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(Xv.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:ce,niceExtent:ce});qv.create=function(){return new qv};var Y_=re;function G2(t,e,r,a){var i={},n=t[1]-t[0],o=i.interval=iv(n/e,!0);r!=null&&o<r&&(o=i.interval=r),a!=null&&o>a&&(o=i.interval=a);var s=i.intervalPrecision=X_(o),l=i.niceTickExtent=[Y_(Math.ceil(t[0]/o)*o,s),Y_(Math.floor(t[1]/o)*o,s)];return K_(l,t),i}function X_(t){return nu(t)+2}function q_(t,e,r){t[e]=Math.max(Math.min(t[e],r[1]),r[0])}function K_(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),q_(t,0,e),q_(t,1,e),t[0]>t[1]&&(t[0]=t[1])}var On=re,Ur=jt.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]),Ur.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=X_(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(On(a[0]-e,i)):n.push(r[0]));for(var s=a[0];s<=a[1]&&(n.push(s),s=On(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(On(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=re(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=nu(t)||0:r==="auto"&&(r=this._intervalPrecision),t=On(t,r,!0),ka(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=G2(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]=On(Math.floor(e[0]/i)*i)),t.fixMax||(e[1]=On(Math.ceil(e[1]/i)*i))}});Ur.create=function(){return new Ur};var Kv="__ec_stack_",j_=.5,jv=typeof Float32Array<"u"?Float32Array:Array;function Qv(t){return t.get("stack")||Kv+t.seriesIndex}function Jv(t){return t.dim+t.index}function H2(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(J({bandWidth:i,axisKey:a,stackId:Kv+n},t));for(var o=J_(e),s=[],n=0;n<t.count;n++){var l=o[a][Kv+n];l.offsetCenter=l.offset+l.width/2,s.push(l)}return s}}function Q_(t,e){var r=[];return e.eachSeriesByType(t,function(a){r1(a)&&!a1(a)&&r.push(a)}),r}function F2(t){var e={};M(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 td(t){var e=F2(t),r=[];return M(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=H(a.get("barWidth"),s),g=H(a.get("barMaxWidth"),s),p=H(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:Jv(n),stackId:Qv(a)})}),J_(r)}function J_(t){var e={};M(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 M(e,function(a,i){r[i]={};var n=a.stacks,o=a.bandWidth,s=H(a.categoryGap,o),l=H(a.gap,1),u=a.remainedWidth,h=a.autoWidthCount,f=(u-s)/(h+(h-1)*l);f=Math.max(f,0),M(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;M(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;M(n,function(g,p){r[i][p]=r[i][p]||{bandWidth:o,offset:d,width:g.width},d+=g.width*(1+l)})}),r}function t1(t,e,r){if(t&&e){var a=t[Jv(e)];return a!=null&&r!=null&&(a=a[Qv(r)]),a}}function e1(t,e){var r=Q_(t,e),a=td(r),i={};M(r,function(n){var o=n.getData(),s=n.coordinateSystem,l=s.getBaseAxis(),u=Qv(n),h=a[Jv(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=fa(o,g),y=v.isHorizontal(),_=i1(l,v,m),w=0,b=o.count();w<b;w++){var A=o.get(g,w),S=o.get(p,w),D=A>=0?"p":"n",I=_;m&&(i[u][S]||(i[u][S]={p:_,n:_}),I=i[u][S][D]);var L,P,R,E;if(y){var Z=s.dataToPoint([A,S]);L=I,P=Z[1]+f,R=Z[0]-_,E=c,Math.abs(R)<d&&(R=(R<0?-1:1)*d),isNaN(R)||m&&(i[u][S][D]+=R)}else{var Z=s.dataToPoint([S,A]);L=Z[0]+f,P=I,R=c,E=Z[1]-_,Math.abs(E)<d&&(E=(E<=0?-1:1)*d),isNaN(E)||m&&(i[u][S][D]+=E)}o.setItemLayout(w,{x:L,y:P,width:R,height:E})}},this)}var W2={seriesType:"bar",plan:Mn(),reset:function(t){if(!r1(t)||!a1(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=t1(td([t]),i,t).width;return h>j_||(h=j_),{progress:f};function f(c,v){for(var d=c.count,g=new jv(d*2),p=new jv(d*2),m=new jv(d),y,_=[],w=[],b=0,A=0;(y=c.next())!=null;)w[u]=v.get(o,y),w[1-u]=v.get(s,y),_=r.dataToPoint(w,null,_),p[b]=l?a.x+a.width:_[0],g[b++]=_[0],p[b]=l?_[1]:a.y+a.height,g[b++]=_[1],m[A++]=y;v.setLayout({largePoints:g,largeDataIndices:m,largeBackgroundPoints:p,barWidth:h,valueAxisStart:i1(i,n,!1),backgroundStart:l?a.x:a.y,valueAxisHorizontal:l})}}};function r1(t){return t.coordinateSystem&&t.coordinateSystem.type==="cartesian2d"}function a1(t){return t.pipelineContext&&t.pipelineContext.large}function i1(t,e,r){return e.toGlobalCoord(e.dataToCoord(e.type==="log"?1:0))}var U2=Ur.prototype,n1=Math.ceil,o1=Math.floor,Nn=1e3,kn=Nn*60,vs=kn*60,Ht=vs*24,$2=function(t,e,r,a){for(;r<a;){var i=r+a>>>1;t[i][1]<e?r=i+1:a=i}return r},ed=Ur.extend({type:"time",getLabel:function(t){var e=this._stepLvl,r=new Date(t);return lv(e[0],r,this.getSetting("useUTC"))},niceExtent:function(t){var e=this._extent;if(e[0]===e[1]&&(e[0]-=Ht,e[1]+=Ht),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]-Ht}this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var a=this._interval;t.fixMin||(e[0]=re(o1(e[0]/a)*a)),t.fixMax||(e[1]=re(n1(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=rd.length,s=$2(rd,n,0,o),l=rd[Math.min(s,o-1)],u=l[1];if(l[0]==="year"){var h=i/u,f=iv(h/t,!0);u*=f}var c=this.getSetting("useUTC")?0:new Date(+a[0]||+a[1]).getTimezoneOffset()*60*1e3,v=[Math.round(n1((a[0]-c)/u)*u+c),Math.round(o1((a[1]-c)/u)*u+c)];K_(v,a),this._stepLvl=l,this._interval=u,this._niceExtent=v},parse:function(t){return+$o(t)}});M(["contain","normalize"],function(t){ed.prototype[t]=function(e){return U2[t].call(this,this.parse(e))}});var rd=[["hh:mm:ss",Nn],["hh:mm:ss",Nn*5],["hh:mm:ss",Nn*10],["hh:mm:ss",Nn*15],["hh:mm:ss",Nn*30],[`hh:mm
| MM-dd`,kn],[`hh:mm
| MM-dd`,kn*5],[`hh:mm
| MM-dd`,kn*10],[`hh:mm
| MM-dd`,kn*15],[`hh:mm
| MM-dd`,kn*30],[`hh:mm
| MM-dd`,vs],[`hh:mm
| MM-dd`,vs*2],[`hh:mm
| MM-dd`,vs*6],[`hh:mm
| MM-dd`,vs*12],[`MM-dd
| yyyy`,Ht],[`MM-dd
| yyyy`,Ht*2],[`MM-dd
| yyyy`,Ht*3],[`MM-dd
| yyyy`,Ht*4],[`MM-dd
| yyyy`,Ht*5],[`MM-dd
| yyyy`,Ht*6],["week",Ht*7],[`MM-dd
| yyyy`,Ht*10],["week",Ht*14],["week",Ht*21],["month",Ht*31],["week",Ht*42],["month",Ht*62],["week",Ht*70],["quarter",Ht*95],["month",Ht*31*4],["month",Ht*31*5],["half-year",Ht*380/2],["month",Ht*31*8],["month",Ht*31*10],["year",Ht*380]];ed.create=function(t){return new ed({useUTC:t.ecModel.get("useUTC")})};var Ou=jt.prototype,ds=Ur.prototype,Z2=nu,Y2=re,X2=Math.floor,q2=Math.ceil,Nu=Math.pow,$r=Math.log,ku=jt.extend({type:"log",base:10,$constructor:function(){jt.apply(this,arguments),this._originalScale=new Ur},getTicks:function(t){var e=this._originalScale,r=this._extent,a=e.getExtent();return V(ds.getTicks.call(this,t),function(i){var n=re(Nu(this.base,i));return n=i===r[0]&&e.__fixMin?zu(n,a[0]):n,n=i===r[1]&&e.__fixMax?zu(n,a[1]):n,n},this)},getMinorTicks:ds.getMinorTicks,getLabel:ds.getLabel,scale:function(t){return t=Ou.scale.call(this,t),Nu(this.base,t)},setExtent:function(t,e){var r=this.base;t=$r(t)/$r(r),e=$r(e)/$r(r),ds.setExtent.call(this,t,e)},getExtent:function(){var t=this.base,e=Ou.getExtent.call(this);e[0]=Nu(t,e[0]),e[1]=Nu(t,e[1]);var r=this._originalScale,a=r.getExtent();return r.__fixMin&&(e[0]=zu(e[0],a[0])),r.__fixMax&&(e[1]=zu(e[1],a[1])),e},unionExtent:function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=$r(t[0])/$r(e),t[1]=$r(t[1])/$r(e),Ou.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=yy(r),i=t/r*a;for(i<=.5&&(a*=10);!isNaN(a)&&Math.abs(a)<1&&Math.abs(a)>0;)a*=10;var n=[re(q2(e[0]/a)*a),re(X2(e[1]/a)*a)];this._interval=a,this._niceExtent=n}},niceExtent:function(t){ds.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin,e.__fixMax=t.fixMax}});M(["contain","normalize"],function(t){ku.prototype[t]=function(e){return e=$r(e)/$r(this.base),Ou[t].call(this,e)}}),ku.create=function(){return new ku};function zu(t,e){return Y2(t,Z2(e))}function s1(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"),z(s)||(s=[s||0,s||0]),typeof s[0]=="boolean"&&(T&&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]=H(s[0],1),s[1]=H(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(po(a)||po(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=Q_("bar",f),v;if(M(c,function(p){v|=p.getBaseAxis()===e.axis}),v){var d=td(c),g=K2(a,i,e,d);a=g.min,i=g.max}}return{extent:[a,i],fixMin:u,fixMax:h}}function K2(t,e,r,a){var i=r.axis.getExtent(),n=i[1]-i[0],o=t1(a,r.axis);if(o===void 0)return{min:t,max:e};var s=1/0;M(o,function(v){s=Math.min(v.offset,s)});var l=-1/0;M(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 Fa(t,e){var r=s1(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 zn(t,e){if(e=e||t.get("type"),e)switch(e){case"category":return new qv(t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),[1/0,-1/0]);case"value":return new Ur;default:return(jt.getClass(e)||Ur).create(t)}}function j2(t){var e=t.scale.getExtent(),r=e[0],a=e[1];return!(r>0&&a>0||r<0&&a<0)}function gs(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(ad(t,a),i)}:function(a){return t.scale.getLabel(a)}}function ad(t,e){return t.type==="category"?t.scale.getLabel(e):e}function Q2(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=gs(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=J2(d,s.get("rotate")||0);u?u.union(g):u=g}return u}}function J2(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 vt(a.x,a.y,o,s);return l}function id(t){var e=t.get("interval");return e??"auto"}function l1(t){return t.type==="category"&&id(t.getLabelModel())===0}var Di={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"&&!po(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"&&!po(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:ce,setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},tL=nr({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()}}),eL=nr({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()}}),rL=nr({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()}}),aL=nr({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()}}),iL={line:ye,rect:xt,roundRect:xt,square:xt,circle:Br,diamond:eL,pin:rL,arrow:aL,triangle:tL},nL={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}},nd={};M(iL,function(t,e){nd[e]=new t});var oL=nr({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(t,e,r){var a=ec(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=nd[a];i||(a="rect",i=nd[a]),nL[a](e.x,e.y,e.width,e.height,i.shape),i.buildPath(t,i.shape,r)}}});function sL(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 Ye(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=J0(t.slice(8),new vt(e,r,a,i),o?"center":"cover"):t.indexOf("path://")===0?l=zo(t.slice(7),{},new vt(e,r,a,i),o?"center":"cover"):l=new oL({shape:{symbolType:t,x:e,y:r,width:a,height:i}}),l.__isEmptyBrush=s,l.setColor=sL,l.setColor(n),l}function lL(t){return ca(t.getSource(),t)}var uL={isDimensionStacked:fa,enableDataStack:U_,getStackedDimension:fs};function hL(t,e){var r=e;_t.isInstance(e)||(r=new _t(e),Dt(r,Di));var a=zn(r);return a.setExtent(t[0],t[1]),Fa(a,r),a}function fL(t){Dt(t,Di)}var cL=(Object.freeze||Object)({createList:lL,getLayoutRect:qt,dataStack:uL,createScale:hL,mixinAxisModelCommonMethods:fL,completeDimensions:F_,createDimensions:En,createSymbol:Ye}),vL=1e-8;function u1(t,e){return Math.abs(t-e)<vL}function Mi(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+=oa(i[0],i[1],o[0],o[1],e,r),i=o}var s=t[0];return(!u1(i[0],s[0])||!u1(i[1],s[1]))&&(a+=oa(i[0],i[1],s[0],s[1],e,r)),a!==0}function ps(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}ps.prototype={constructor:ps,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;Po(l,i,n),ea(r,r,i),ra(a,a,n)}return s===0&&(r[0]=r[1]=a[0]=a[1]=0),this._rect=new vt(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(Mi(n,t[0],t[1])){for(var s=0;s<(o?o.length:0);s++)if(Mi(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 vt(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++)Pt(h[c],h[c],s);for(var v=0;v<(f?f.length:0);v++)for(var c=0;c<f[v].length;c++)Pt(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 ps(t,this.geometries,this.center);return e._rect=this._rect,e.transformTo=null,e}};function dL(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]=h1(u,s[l],e);else if(n.type==="MultiPolygon")for(var h=0;h<u.length;h++){var f=u[h];u[h]=h1(f,s[l][h],e)}}return t.UTF8Encoding=!1,t}function h1(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 od=function(t,e){return dL(t),V(ee(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"&&M(n,function(l){l[0]&&o.push({type:"polygon",exterior:l[0],interiors:l.slice(1)})});var s=new ps(a[e||"name"],o,a.cp);return s.properties=a,s})},ms=Pe();function gL(t){return t.type==="category"?mL(t):_L(t)}function pL(t,e){return t.type==="category"?yL(t,e):{ticks:t.scale.getTicks()}}function mL(t){var e=t.getLabelModel(),r=f1(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:r.labelCategoryInterval}:r}function f1(t,e){var r=c1(t,"labels"),a=id(e),i=v1(r,a);if(i)return i;var n,o;return se(a)?n=p1(t,a):(o=a==="auto"?xL(t):a,n=g1(t,o)),d1(r,a,{labels:n,labelCategoryInterval:o})}function yL(t,e){var r=c1(t,"ticks"),a=id(e),i=v1(r,a);if(i)return i;var n,o;if((!e.get("show")||t.scale.isBlank())&&(n=[]),se(a))n=p1(t,a,!0);else if(a==="auto"){var s=f1(t,t.getLabelModel());o=s.labelCategoryInterval,n=V(s.labels,function(l){return l.tickValue})}else o=a,n=g1(t,o,!0);return d1(r,a,{ticks:n,tickCategoryInterval:o})}function _L(t){var e=t.scale.getTicks(),r=gs(t);return{labels:V(e,function(a,i){return{formattedLabel:r(a,i),rawLabel:t.scale.getLabel(a),tickValue:a}})}}function c1(t,e){return ms(t)[e]||(ms(t)[e]=[])}function v1(t,e){for(var r=0;r<t.length;r++)if(t[r].key===e)return t[r].value}function d1(t,e,r){return t.push({key:e,value:r}),r}function xL(t){var e=ms(t).autoInterval;return e??(ms(t).autoInterval=t.calculateCategoryInterval())}function wL(t){var e=bL(t),r=gs(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=Rr(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))),w=ms(t.model),b=t.getExtent(),A=w.lastAutoInterval,S=w.lastTickCount;return A!=null&&S!=null&&Math.abs(A-_)<=1&&Math.abs(S-o)<=1&&A>_&&w.axisExtend0===b[0]&&w.axisExtend1===b[1]?_=A:(w.lastTickCount=o,w.lastAutoInterval=_,w.axisExtend0=b[0],w.axisExtend1=b[1]),_}function bL(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 g1(t,e,r){var a=gs(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=l1(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 p1(t,e,r){var a=t.scale,i=gs(t),n=[];return M(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 m1=[0,1],Qt=function(t,e,r){this.dim=t,this.scale=e,this._extent=r||[0,0],this.inverse=!1,this.onBand=!1};Qt.prototype={constructor:Qt,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 tv(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(),y1(r,a.count())),Nt(t,m1,r,e)},coordToData:function(t,e){var r=this._extent,a=this.scale;this.onBand&&a.type==="ordinal"&&(r=r.slice(),y1(r,a.count()));var i=Nt(t,r,m1,e);return this.scale.scale(i)},pointToData:function(t,e){},getTicksCoords:function(t){t=t||{};var e=t.tickModel||this.getTickModel(),r=pL(this,e),a=r.ticks,i=V(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this),n=e.get("alignWithLabel");return SL(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=V(r,function(i){return V(i,function(n){return{coord:this.dataToCoord(n),tickValue:n}},this)},this);return a},getViewLabels:function(){return gL(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 wL(this)}};function y1(t,e){var r=t[1]-t[0],a=e,i=r/a/2;t[0]+=i,t[1]-=i}function SL(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;M(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=re(v),d=re(d),f?v>d:v<d}}var AL=od,_1={};M(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],function(t){_1[t]=XT[t]});var x1={};M(["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){x1[t]=sa[t]}),Vt.extend({type:"series.line",dependencies:["grid","polar"],getInitialData:function(t,e){if(T){var r=t.coordinateSystem;if(r!=="polar"&&r!=="cartesian2d")throw new Error("Line not support coordinateSystem besides cartesian and polar")}return ca(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 Bu(t,e){var r=t.mapDimension("defaultedLabel",!0),a=r.length;if(a===1)return Ti(t,e,r[0]);if(a){for(var i=[],n=0;n<r.length;n++){var o=Ti(t,e,r[n]);i.push(o)}return i.join(" ")}}function Wa(t,e,r){q.call(this),this.updateData(t,e,r)}var Dr=Wa.prototype,TL=Wa.getSymbolSize=function(t,e){var r=t.getItemVisual(e,"symbolSize");return r instanceof Array?r.slice():[+r,+r]};function sd(t){return[t[0]/2,t[1]/2]}function CL(t,e){this.parent.drift(t,e)}Dr._createSymbol=function(t,e,r,a,i){this.removeAll();var n=e.getItemVisual(r,"color"),o=Ye(t,-1,-1,2,2,n,i);o.attr({z2:100,culling:!0,scale:sd(a)}),o.drift=CL,this._symbolType=t,this.add(o)},Dr.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(t)},Dr.getSymbolPath=function(){return this.childAt(0)},Dr.getScale=function(){return this.childAt(0).scale},Dr.highlight=function(){this.childAt(0).trigger("emphasis")},Dr.downplay=function(){this.childAt(0).trigger("normal")},Dr.setZ=function(t,e){var r=this.childAt(0);r.zlevel=t,r.z=e},Dr.setDraggable=function(t){var e=this.childAt(0);e.draggable=t,e.cursor=t?"move":e.cursor},Dr.updateData=function(t,e,r){this.silent=!1;var a=t.getItemVisual(e,"symbol")||"circle",i=t.hostModel,n=TL(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,ft(l,{scale:sd(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),Se(l,h,i,e)}this._seriesModel=i};var DL=["itemStyle"],ML=["emphasis","itemStyle"],IL=["label"],LL=["emphasis","label"];Dr._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(DL).getItemStyle(["color"]),l=d.getModel(ML).getItemStyle(),u=d.getShallow("symbolOffset"),h=d.getModel(IL),f=d.getModel(LL),c=d.getShallow("hoverAnimation"),v=d.getShallow("cursor")}else l=et({},l);var g=i.style,p=t.getItemVisual(e,"symbolRotate");i.attr("rotation",(p||0)*Math.PI/180||0),u&&i.attr("position",[H(u[0],r[0]),H(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 w=a&&a.useNameLabel;Fe(g,l,h,f,{labelFetcher:n,labelDataIndex:e,defaultText:b,isRectText:!0,autoColor:o});function b(A,S){return w?t.getName(A):Bu(t,A)}i.__symbolOriginalScale=sd(r),i.hoverStyle=l,i.highDownOnUpdate=c&&n.isAnimationEnabled()?PL:null,Ot(i)};function PL(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")}Dr.fadeOut=function(t,e){var r=this.childAt(0);this.silent=r.silent=!0,!(e&&e.keepLabel)&&(r.style.text=null),ft(r,{style:{opacity:0},scale:[0,0]},this._seriesModel,this.dataIndex,t)},It(Wa,q);function Bn(t){this.group=new q,this._symbolCtor=t||Wa}var Vn=Bn.prototype;function ld(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"}Vn.updateData=function(t,e){e=w1(e);var r=this.group,a=t.hostModel,i=this._data,n=this._symbolCtor,o=b1(t);i||r.removeAll(),t.diff(i).add(function(s){var l=t.getItemLayout(s);if(ld(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(!ld(t,h,s,e)){r.remove(u);return}u?(u.updateData(t,s,o),ft(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},Vn.isPersistent=function(){return!0},Vn.updateLayout=function(){var t=this._data;t&&t.eachItemGraphicEl(function(e,r){var a=t.getItemLayout(r);e.attr("position",a)})},Vn.incrementalPrepareUpdate=function(t){this._seriesScope=b1(t),this._data=null,this.group.removeAll()},Vn.incrementalUpdate=function(t,e,r){r=w1(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(ld(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 w1(t){return t!=null&&!lt(t)&&(t={isIgnore:t}),t||{}}Vn.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 b1(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 ud(t,e,r){var a=t.getBaseAxis(),i=t.getOtherAxis(a),n=EL(i,r),o=a.dim,s=i.dim,l=e.mapDimension(s),u=e.mapDimension(o),h=s==="x"||s==="radius"?1:0,f=V(t.dimensions,function(d){return e.mapDimension(d)}),c,v=e.getCalculationInfo("stackResultDimension");return(c|=fa(e,f[0]))&&(f[0]=v),(c|=fa(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 EL(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 hd(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 RL(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 OL=function(t,e,r,a,i,n,o,s){for(var l=RL(t,e),u=[],h=[],f=[],c=[],v=[],d=[],g=[],p=ud(i,e,o),m=ud(n,t,s),y=0;y<l.length;y++){var _=l[y],w=!0;switch(_.cmd){case"=":var b=t.getItemLayout(_.idx),A=e.getItemLayout(_.idx1);(isNaN(b[0])||isNaN(b[1]))&&(b=A.slice()),u.push(b),h.push(A),f.push(r[_.idx]),c.push(a[_.idx1]),g.push(e.getRawIndex(_.idx1));break;case"+":var S=_.idx;u.push(i.dataToPoint([e.get(p.dataDimsForPoint[0],S),e.get(p.dataDimsForPoint[1],S)])),h.push(e.getItemLayout(S).slice()),f.push(hd(p,i,e,S)),c.push(a[S]),g.push(e.getRawIndex(S));break;case"-":var S=_.idx,D=t.getRawIndex(S);D!==S?(u.push(t.getItemLayout(S)),h.push(n.dataToPoint([t.get(m.dataDimsForPoint[0],S),t.get(m.dataDimsForPoint[1],S)])),f.push(r[S]),c.push(hd(m,n,t,S)),g.push(D)):w=!1}w&&(v.push(_),d.push(d.length))}d.sort(function(Z,W){return g[Z]-g[W]});for(var I=[],L=[],P=[],R=[],E=[],y=0;y<d.length;y++){var S=d[y];I[y]=u[S],L[y]=h[S],P[y]=f[S],R[y]=c[S],E[y]=v[S]}return{current:I,next:L,stackedOnCurrent:P,stackedOnNext:R,status:E}},S1=ea,A1=ra,T1=mo,Vu=ge,fd=[],fr=[],cr=[];function va(t){return isNaN(t[0])||isNaN(t[1])}function cd(t,e,r,a,i,n,o,s,l,u,h){return u==="none"||!u?kL.apply(this,arguments):NL.apply(this,arguments)}function NL(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(va(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;Vu(fr,g),fr[p]=g[p]+m,Vu(cr,d),cr[p]=d[p]-m,t.bezierCurveTo(fr[0],fr[1],cr[0],cr[1],d[0],d[1])}else t.lineTo(d[0],d[1]);f=c,c+=n}return v}function kL(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(va(d)){if(h){c+=n;continue}break}if(c===r)t[n>0?"moveTo":"lineTo"](d[0],d[1]),Vu(fr,d);else if(l>0){var g=c+n,y=e[g];if(h)for(;y&&va(e[g]);)g+=n,y=e[g];var p=.5,m=e[f],y=e[g];if(!y||va(y))Vu(cr,d);else{va(y)&&!h&&(y=d),Jr(fd,y,m);var _,w;if(u==="x"||u==="y"){var b=u==="x"?0:1;_=Math.abs(d[b]-m[b]),w=Math.abs(d[b]-y[b])}else _=ta(d,m),w=ta(d,y);p=w/(w+_),T1(cr,d,fd,-l*(1-p))}S1(fr,fr,s),A1(fr,fr,o),S1(cr,cr,s),A1(cr,cr,o),t.bezierCurveTo(fr[0],fr[1],cr[0],cr[1],d[0],d[1]),T1(fr,d,fd,l*p)}else t.lineTo(d[0],d[1]);f=c,c+=n}return v}function vd(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 zL=pt.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},brush:Wc(pt.prototype.brush),buildPath:function(t,e){var r=e.points,a=0,i=r.length,n=vd(r,e.smoothConstraint);if(e.connectNulls){for(;i>0&&va(r[i-1]);i--);for(;a<i&&va(r[a]);a++);}for(;a<i;)a+=cd(t,r,a,i,i,1,n.min,n.max,e.smooth,e.smoothMonotone,e.connectNulls)+1}}),C1=pt.extend({type:"ec-polygon",shape:{points:[],stackedOnPoints:[],smooth:0,stackedOnSmooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},brush:Wc(pt.prototype.brush),buildPath:function(t,e){var r=e.points,a=e.stackedOnPoints,i=0,n=r.length,o=e.smoothMonotone,s=vd(r,e.smoothConstraint),l=vd(a,e.smoothConstraint);if(e.connectNulls){for(;n>0&&va(r[n-1]);n--);for(;i<n&&va(r[i]);i++);}for(;i<n;){var u=cd(t,r,i,n,n,1,s.min,s.max,e.smooth,o,e.connectNulls);cd(t,a,i+u-1,u,n,-1,l.min,l.max,e.stackedOnSmooth,o,e.connectNulls),i+=u+1,t.closePath()}}});function D1(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 xt({shape:{x:n,y:o,width:s,height:l}});return e&&(h.shape[i?"width":"height"]=0,Se(h,{shape:{width:s,height:l}},r)),h}function M1(t,e,r){var a=t.getArea(),i=new Ar({shape:{cx:re(t.cx,1),cy:re(t.cy,1),r0:re(a.r0,1),r:re(a.r,1),startAngle:a.startAngle,endAngle:a.endAngle,clockwise:a.clockwise}});return e&&(i.shape.endAngle=a.startAngle,Se(i,{shape:{endAngle:a.endAngle}},r)),i}function Gu(t,e,r){if(t){if(t.type==="polar")return M1(t,e,r);if(t.type==="cartesian2d")return D1(t,e,r)}else return null;return null}function I1(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 L1(t,e){var r=[],a=[],i=[],n=[];return Po(t,r,a),Po(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 P1(t){return typeof t=="number"?t:t?.5:0}function BL(t,e,r){if(!r.valueDim)return[];for(var a=[],i=0,n=e.count();i<n;i++)a.push(hd(r,t,e,i));return a}function Ua(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 VL(t,e){var r=t.getVisual("visualMeta");if(!(!r||!r.length||!t.count())){if(e.type!=="cartesian2d"){T&&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){T&&console.warn("Visual map on line style only support x or y dimension.");return}var u=e.getAxis(a),h=V(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";M(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 pi(0,0,0,0,h,!0);return m[a]=d,m[a+"2"]=g,m}}function GL(t,e,r){var a=t.get("showAllSymbol"),i=a==="auto";if(!(a&&!i)){var n=r.getAxesByScale("ordinal")[0];if(!!n&&!(i&&HL(n,e))){var o=e.mapDimension(n.dim),s={};return M(n.getViewLabels(),function(l){s[l.tickValue]=1}),function(l){return!s.hasOwnProperty(e.get(o,l))}}}}function HL(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 E1(t,e,r){if(t.type==="cartesian2d"){var a=t.getBaseAxis().isHorizontal(),i=D1(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 M1(t,e,r)}ue.extend({type:"line",init:function(){var t=new q,e=new Bn;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=ud(a,n,m),_=BL(a,n,y),w=t.get("showSymbol"),b=w&&!u&&GL(t,n,a),A=this._data;A&&A.eachItemGraphicEl(function(E,Z){E.__temp&&(i.remove(E),A.setItemGraphicEl(Z,null))}),w||f.remove(),i.add(d);var S=!u&&t.get("step"),D;a&&a.getArea&&t.get("clip",!0)&&(D=a.getArea(),D.width!=null?(D.x-=.1,D.y-=.1,D.width+=.2,D.height+=.2):D.r0&&(D.r0-=.5,D.r1+=.5)),this._clipShapeForSymbol=D,c&&h.type===a.type&&S===this._step?(p&&!v?v=this._newPolygon(l,_,a,g):v&&!p&&(d.remove(v),v=this._polygon=null),d.setClipPath(E1(a,!1,t)),w&&f.updateData(n,{isIgnore:b,clipShape:D}),n.eachItemGraphicEl(function(E){E.stopAnimation(!0)}),(!I1(this._stackedOnPoints,_)||!I1(this._points,l))&&(g?this._updateAnimation(n,_,a,r,S,m):(S&&(l=Ua(l,a,S),_=Ua(_,a,S)),c.setShape({points:l}),v&&v.setShape({points:l,stackedOnPoints:_})))):(w&&f.updateData(n,{isIgnore:b,clipShape:D}),S&&(l=Ua(l,a,S),_=Ua(_,a,S)),c=this._newPolyline(l,a,g),p&&(v=this._newPolygon(l,_,a,g)),d.setClipPath(E1(a,!0,t)));var I=VL(n,a)||n.getVisual("color");c.useStyle(J(o.getLineStyle(),{fill:"none",stroke:I,lineJoin:"bevel"}));var L=t.get("smooth");if(L=P1(t.get("smooth")),c.setShape({smooth:L,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")}),v){var P=n.getCalculationInfo("stackedOnSeries"),R=0;v.useStyle(J(s.getAreaStyle(),{fill:I,opacity:.7,lineJoin:"bevel"})),P&&(R=P1(P.get("smooth"))),v.setShape({smooth:L,stackedOnSmooth:R,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")})}this._data=n,this._coordSys=a,this._stackedOnPoints=_,this._points=l,this._step=S,this._valueOrigin=m},dispose:function(){},highlight:function(t,e,r,a){var i=t.getData(),n=Rl(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 ue.prototype.highlight.call(this,t,e,r,a)},downplay:function(t,e,r,a){var i=t.getData(),n=Rl(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 ue.prototype.downplay.call(this,t,e,r,a)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new zL({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 C1({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=OL(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=Ua(u.current,r,i),f=Ua(u.stackedOnCurrent,r,i),c=Ua(u.next,r,i),v=Ua(u.stackedOnNext,r,i)),L1(h,c)>3e3||s&&L1(f,v)>3e3){o.setShape({points:c}),s&&s.setShape({points:c,stackedOnPoints:v});return}o.shape.__points=u.current,o.shape.points=h,ft(o,{shape:{points:c}},l),s&&(s.setShape({points:h,stackedOnPoints:f}),ft(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 w=d[_].el;w.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 Ii=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=se(s),c=se(l),v=se(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 w=a.getRawValue(_),b=a.getDataParams(_);f&&y.setItemVisual(_,"symbol",s(w,b)),c&&y.setItemVisual(_,"symbolSize",l(w,b)),v&&y.setItemVisual(_,"symbolRotate",h(w,b))}if(y.hasItemOption){var A=y.getItemModel(_),S=A.getShallow("symbol",!0),D=A.getShallow("symbolSize",!0),I=A.getShallow("symbolRotate",!0),L=A.getShallow("symbolKeepAspect",!0);S!=null&&y.setItemVisual(_,"symbol",S),D!=null&&y.setItemVisual(_,"symbolSize",D),I!=null&&y.setItemVisual(_,"symbolRotate",I),L!=null&&y.setItemVisual(_,"symbolKeepAspect",L)}}return{dataEach:o.hasItemOption||d?m:null}}}},ys=function(t){return{seriesType:t,plan:Mn(),reset:function(e){var r=e.getData(),a=e.coordinateSystem,i=e.pipelineContext,n=i.large;if(!a)return;var o=V(a.dimensions,function(h){return r.mapDimension(h)}).slice(0,2),s=o.length,l=r.getCalculationInfo("stackResultDimension");fa(r,o[0])&&(o[0]=l),fa(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),w=p[1]=f.get(o[1],d);y=!isNaN(_)&&!isNaN(w)&&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}}}},FL={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]}},WL=function(t,e){return Math.round(t.length/2)},UL=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=FL[n]:typeof n=="function"&&(c=n),c&&e.setData(i.downSample(i.mapDimension(l.dim),1/f,c,WL))}}}}};function $L(t){return this._axes[t]}var Hu=function(t){this._axes={},this._dimList=[],this.name=t||""};Hu.prototype={constructor:Hu,type:"cartesian",getAxis:function(t){return this._axes[t]},getAxes:function(){return V(this._dimList,$L,this)},getAxesByScale:function(t){return t=t.toLowerCase(),ee(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 _s(t){Hu.call(this,t)}_s.prototype={constructor:_s,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 vt(r,a,i,n);return o}},It(_s,Hu);var Fu=function(t,e,r,a,i){Qt.call(this,t,e,r),this.type=a||"value",this.position=i||"bottom"};Fu.prototype={constructor:Fu,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},It(Fu,Qt);var R1={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)"]}}},$a={};$a.categoryAxis=ut({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},R1),$a.valueAxis=ut({boundaryGap:[0,0],splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#eee",width:1}}},R1),$a.timeAxis=J({scale:!0,min:"dataMin",max:"dataMax"},$a.valueAxis),$a.logAxis=J({scale:!0,logBase:10},$a.valueAxis);var ZL=["value","category","time","log"],Gn=function(t,e,r,a){M(ZL,function(i){e.extend({type:t+"Axis."+i,mergeDefaultAndTheme:function(n,o){var s=this.layoutMode,l=s?Cn(n):{},u=o.getTheme();ut(n,u.get(i+"Axis")),ut(n,this.getDefaultOption()),n.type=r(t,n),s&&za(n,l,s)},optionUpdated:function(){var n=this.option;n.type==="category"&&(this.__ordinalMeta=cs.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:go([{},$a[i+"Axis"],a],!0)})}),wt.registerSubTypeDefaulter(t+"Axis",ot(r,t))},Hn=wt.extend({type:"cartesian2dAxis",axis:null,init:function(){Hn.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){Hn.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){Hn.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});function O1(t,e){return e.type||(e.data?"category":"value")}ut(Hn.prototype,Di);var N1={offset:0};Gn("x",Hn,O1,N1),Gn("y",Hn,O1,N1),wt.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 dd(t,e,r){return t.getCoordSysModel()===e}function Fn(t,e,r){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,r),this.model=t}var Ce=Fn.prototype;Ce.type="grid",Ce.axisPointerEnabled=!0,Ce.getRect=function(){return this._rect},Ce.update=function(t,e){var r=this._axesMap;this._updateScale(t,this.model),M(r.x,function(i){Fa(i.scale,i.model)}),M(r.y,function(i){Fa(i.scale,i.model)});var a={};M(r.x,function(i){k1(r,"y",i,a)}),M(r.y,function(i){k1(r,"x",i,a)}),this.resize(this.model,e)};function k1(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)z1(i[l])&&(n=i[l]);else for(var u in i)if(i.hasOwnProperty(u)&&z1(i[u])&&!a[h(i[u])]){n=i[u];break}n&&(a[h(n)]=!0);function h(f){return f.dim+"_"+f.index}}function z1(t){return t&&t.type!=="category"&&t.type!=="time"&&j2(t)}Ce.resize=function(t,e,r){var a=qt(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=a;var i=this._axesList;n(),!r&&t.get("containLabel")&&(M(i,function(o){if(!o.model.get("axisLabel.inside")){var s=Q2(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(){M(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]),YL(o,s?a.x:a.y)})}},Ce.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]}},Ce.getAxes=function(){return this._axesList.slice()},Ce.getCartesian=function(t,e){if(t!=null&&e!=null){var r="x"+t+"y"+e;return this._coordsMap[r]}lt(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]},Ce.getCartesians=function(){return this._coordsList.slice()},Ce.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},Ce.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},Ce._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,yt(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}},Ce.containPoint=function(t){var e=this._coordsList[0];if(e)return e.containPoint(t)},Ce._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,M(i.x,function(s,l){M(i.y,function(u,h){var f="x"+l+"y"+h,c=new _s(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(!!dd(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 Fu(s,zn(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]++}}}},Ce._updateScale=function(t,e){M(this._axesList,function(a){a.scale.setExtent(1/0,-1/0)}),t.eachSeries(function(a){if(V1(a)){var i=B1(a,t),n=i[0],o=i[1];if(!dd(n,e,t)||!dd(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){M(a.mapDimension(i.dim,!0),function(o){i.scale.unionExtentFromData(a,fs(a,o))})}},Ce.getTooltipAxes=function(t){var e=[],r=[];return M(this.getCartesians(),function(a){var i=t!=null&&t!=="auto"?a.getAxis(t):a.getBaseAxis(),n=a.getOtherAxis(i);yt(e,i)<0&&e.push(i),yt(r,n)<0&&r.push(n)}),{baseAxes:e,otherAxes:r}};function YL(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 XL=["xAxis","yAxis"];function B1(t,e){return V(XL,function(r){var a=t.getReferringComponents(r)[0];if(T&&!a)throw new Error(r+' "'+Ut(t.get(r+"Index"),t.get(r+"Id"),0)+'" not found');return a})}function V1(t){return t.get("coordinateSystem")==="cartesian2d"}Fn.create=function(t,e){var r=[];return t.eachComponent("grid",function(a,i){var n=new Fn(a,t,e);n.name="grid_"+i,n.resize(a,e,!0),a.coordinateSystem=n,r.push(n)}),t.eachSeries(function(a){if(!!V1(a)){var i=B1(a,t),n=i[0],o=i[1],s=n.getCoordSysModel();if(T){if(!s)throw new Error('Grid "'+Ut(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},Fn.dimensions=Fn.prototype.dimensions=_s.prototype.dimensions,_e.register("cartesian2d",Fn);var Za=Math.PI,ze=function(t,e){this.opt=e,this.axisModel=t,J(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0}),this.group=new q;var r=new q({position:e.position.slice(),rotation:e.rotation});r.updateTransform(),this._transform=r.transform,this._dumbGroup=r};ze.prototype={constructor:ze,hasBuilder:function(t){return!!G1[t]},add:function(t){G1[t].call(this)},getGroup:function(){return this.group}};var G1={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&&(Pt(i,i,a),Pt(n,n,a));var o=et({lineCap:"round"},e.getModel("axisLine.lineStyle").getLineStyle());this.group.add(new ye({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];M([{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=Ye(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=jL(this,t,e),a=JL(this,t,e);KL(t,a,r),QL(this,t,e)},axisName:function(){var t=this.opt,e=this.axisModel,r=Ut(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,$1(a)?t.labelOffset+i*o:0],h,f=e.get("nameRotate");f!=null&&(f=f*Za/180);var c;$1(a)?h=F1(t.rotation,f??t.rotation,i):(h=qL(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=Ut(t.nameTruncateMaxWidth,d.maxWidth,c),m=g!=null&&p!=null?Sy(r,p,v,g,{minChar:2,placeholder:d.placeholder}):r,y=e.get("tooltip",!0),_=e.mainType,w={componentType:_,name:r,$vars:["name"]};w[_+"Index"]=e.componentIndex;var b=new dt({anid:"name",__fullText:r,__truncatedText:m,position:u,rotation:h.rotation,silent:W1(e),z2:1,tooltip:y&&y.show?et({content:r,formatter:function(){return r},formatterParams:w},y):null});$t(b.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")&&(b.eventData=H1(e),b.eventData.targetType="axisName",b.eventData.name=r),this._dumbGroup.add(b),b.updateTransform(),this.group.add(b),b.decomposeTransform()}}},H1=ze.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},F1=ze.innerTextLayout=function(t,e,r){var a=rv(e-t),i,n;return Uo(a)?(n=r>0?"top":"bottom",i="center"):Uo(a-Za)?(n=r>0?"bottom":"top",i="center"):(n="middle",a>0&&a<Za?i=r>0?"right":"left":i=r>0?"left":"right"),{rotation:a,textAlign:i,textVerticalAlign:n}};function qL(t,e,r,a){var i=rv(r-t.rotation),n,o,s=a[0]>a[1],l=e==="start"&&!s||e!=="start"&&s;return Uo(i-Za/2)?(o=l?"bottom":"top",n="center"):Uo(i-Za*1.5)?(o=l?"top":"bottom",n="center"):(o="middle",i<Za*1.5&&i>Za/2?n=l?"left":"right":n=l?"right":"left"),{rotation:i,textAlign:n,textVerticalAlign:o}}var W1=ze.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)};function KL(t,e,r){if(!l1(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?(vr(n),vr(u)):U1(n,o)&&(a?(vr(o),vr(h)):(vr(n),vr(u))),i===!1?(vr(s),vr(f)):U1(l,s)&&(i?(vr(l),vr(c)):(vr(s),vr(f)))}}function vr(t){t&&(t.ignore=!0)}function U1(t,e,r){var a=t&&t.getBoundingRect().clone(),i=e&&e.getBoundingRect().clone();if(!(!a||!i)){var n=fn([]);return aa(n,n,-t.rotation),a.applyTransform(Sa([],n,t.getLocalTransform())),i.applyTransform(Sa([],n,e.getLocalTransform())),a.intersect(i)}}function $1(t){return t==="middle"||t==="center"}function Z1(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&&(Pt(o,o,e),Pt(s,s,e));var h=new ye({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 jL(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=Z1(s,t._transform,o,J(n.getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")}),"ticks"),u=0;u<l.length;u++)t.group.add(l[u]);return l}}function QL(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=J(o.getLineStyle(),J(e.getModel("axisTick").getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")})),u=0;u<n.length;u++)for(var h=Z1(n[u],t._transform,s,l,"minorticks_"+u),f=0;f<h.length;f++)t.group.add(h[f])}}function JL(t,e,r){var a=e.axis,i=Ut(r.axisLabelShow,e.get("axisLabel.show"));if(!(!i||a.scale.isBlank())){var n=e.getModel("axisLabel"),o=n.get("margin"),s=a.getViewLabels(),l=(Ut(r.labelRotate,n.get("rotate"))||0)*Za/180,u=F1(r.rotation,l,r.labelDirection),h=e.getCategories&&e.getCategories(!0),f=[],c=W1(e),v=e.get("triggerEvent");return M(s,function(d,g){var p=d.tickValue,m=d.formattedLabel,y=d.rawLabel,_=n;h&&h[p]&&h[p].textStyle&&(_=new _t(h[p].textStyle,n,e.ecModel));var w=_.getTextColor()||e.get("axisLine.lineStyle.color"),b=a.dataToCoord(p),A=[b,r.labelOffset+r.labelDirection*o],S=new dt({anid:"label_"+p,position:A,rotation:u.rotation,silent:c,z2:10});$t(S.style,_,{text:m,textAlign:_.getShallow("align",!0)||u.textAlign,textVerticalAlign:_.getShallow("verticalAlign",!0)||_.getShallow("baseline",!0)||u.textVerticalAlign,textFill:typeof w=="function"?w(a.type==="category"?y:a.type==="value"?p+"":p,g):w}),v&&(S.eventData=H1(e),S.eventData.targetType="axisLabel",S.eventData.value=y),t._dumbGroup.add(S),S.updateTransform(),f.push(S),t.group.add(S),S.decomposeTransform()}),f}}var Wn=M,gd=ot;function tP(t,e){var r={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return eP(r,t,e),r.seriesInvolved&&aP(r,t),r}function eP(t,e,r){var a=e.getComponent("tooltip"),i=e.getComponent("axisPointer"),n=i.get("link",!0)||[],o=[];Wn(r.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var l=xs(s.model),u=t.coordSysAxesInfo[l]={};t.coordSysMap[l]=s;var h=s.model,f=h.getModel("tooltip",a);if(Wn(s.getAxes(),gd(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)&&Wn(d.baseAxes,gd(g,v?"cross":!0,c)),v&&Wn(d.otherAxes,gd(g,"cross",!1))}function g(p,m,y){var _=y.model.getModel("axisPointer",i),w=_.get("show");if(!(!w||w==="auto"&&!p&&!yd(_))){m==null&&(m=_.get("triggerTooltip")),_=p?rP(y,f,i,e,p,m):_;var b=_.get("snap"),A=xs(y.model),S=m||b||y.type==="category",D=t.axesInfo[A]={key:A,axis:y,coordSys:s,axisPointerModel:_,triggerTooltip:m,involveSeries:S,snap:b,useHandle:yd(_),seriesModels:[]};u[A]=D,t.seriesInvolved|=S;var I=iP(n,y);if(I!=null){var L=o[I]||(o[I]={axesInfo:{}});L.axesInfo[A]=D,L.mapper=n[I].mapper,D.linkGroup=L}}}})}function rP(t,e,r,a,i,n){var o=e.getModel("axisPointer"),s={};Wn(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],function(f){s[f]=rt(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&&J(l,h.textStyle)}}return t.model.getModel("axisPointer",new _t(s,r,a))}function aP(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||Wn(t.coordSysAxesInfo[xs(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 iP(t,e){for(var r=e.model,a=e.dim,i=0;i<t.length;i++){var n=t[i]||{};if(pd(n[a+"AxisId"],r.id)||pd(n[a+"AxisIndex"],r.componentIndex)||pd(n[a+"AxisName"],r.name))return i}}function pd(t,e){return t==="all"||z(t)&&yt(t,e)>=0||t===e}function nP(t){var e=md(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=yd(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 md(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[xs(t)]}function oP(t){var e=md(t);return e&&e.axisPointerModel}function yd(t){return!!t.get("handle.show")}function xs(t){return t.type+"||"+t.id}var Xe=he({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(t,e,r,a){this.axisPointerClass&&nP(t),Xe.superApply(this,"render",arguments),Y1(this,t,e,r,a,!0)},updateAxisPointer:function(t,e,r,a,i){Y1(this,t,e,r,a,!1)},remove:function(t,e){var r=this._axisPointer;r&&r.remove(e),Xe.superApply(this,"remove",arguments)},dispose:function(t,e){X1(this,e),Xe.superApply(this,"dispose",arguments)}});function Y1(t,e,r,a,i,n){var o=Xe.getAxisPointerClass(t.axisPointerClass);if(!!o){var s=oP(e);s?(t._axisPointer||(t._axisPointer=new o)).render(e,s,a,n):X1(t,a)}}function X1(t,e,r){var a=t._axisPointer;a&&a.dispose(e,r),t._axisPointer=null}var _d=[];Xe.registerAxisPointerClass=function(t,e){if(T&&_d[t])throw new Error("axisPointer "+t+" exists");_d[t]=e},Xe.getAxisPointerClass=function(t){return t&&_d[t]};function xd(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),Ut(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 q1(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=ht(),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=z(s)?s:[s];for(var d=1;d<u.length;d++){var y=i.toGlobalCoord(u[d].coord),_,w,b,A;i.isHorizontal()?(_=p,w=l.y,b=y-_,A=l.height,p=_+b):(_=l.x,w=p,b=l.width,A=y-w,p=w+A);var S=u[d-1].tickValue;S!=null&&c.set(S,v),e.add(new xt({anid:S!=null?"area_"+S:null,shape:{x:_,y:w,width:b,height:A},style:J({fill:s[v]},m),silent:!0})),v=(v+1)%h}t.__splitAreaColors=c}}}function K1(t){t.__splitAreaColors=null}var sP=["axisLine","axisTickLabel","axisName"],lP=["splitArea","splitLine","minorSplitLine"],wd=Xe.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(t,e,r,a){this.group.removeAll();var i=this._axisGroup;if(this._axisGroup=new q,this.group.add(this._axisGroup),!!t.get("show")){var n=t.getCoordSysModel(),o=xd(n,t),s=new ze(t,o);M(sP,s.add,s),this._axisGroup.add(s.getGroup()),M(lP,function(l){t.get(l+".show")&&this["_"+l](t,n)},this),au(i,this._axisGroup,t),wd.superCall(this,"render",t,e,r,a)}},remove:function(){K1(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=z(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 ye({anid:p!=null?"line_"+u[v].tickValue:null,subPixelOptimize:!0,shape:{x1:h[0],y1:h[1],x2:f[0],y2:f[1]},style:J({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 ye({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){q1(this,this._axisGroup,t,e)}});wd.extend({type:"xAxis"}),wd.extend({type:"yAxis"}),he({type:"grid",render:function(t,e){this.group.removeAll(),t.get("show")&&this.group.add(new xt({shape:t.coordinateSystem.getRect(),style:J({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))}}),we(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})}),Rt(Ii("line","circle","line")),Gt(ys("line")),$e(Wr.PROCESSOR.STATISTIC,UL("line"));var j1=Vt.extend({type:"series.__base_bar__",getInitialData:function(t,e){return ca(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:{}}});j1.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 Q1(t,e,r,a,i,n,o){var s=r.getModel("label"),l=r.getModel("emphasis.label");Fe(t,e,s,l,{labelFetcher:i,labelDataIndex:n,defaultText:Bu(i.getData(),n),isRectText:!0,autoColor:a}),J1(t),J1(e)}function J1(t,e){t.textPosition==="outside"&&(t.textPosition=e)}var uP=_n([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),hP={getBarItemStyle:function(t){var e=uP(this,t);if(this.getBorderLineDash){var r=this.getBorderLineDash();r&&(e.lineDash=r)}return e}},fP=nr({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()}}),cP=["itemStyle","barBorderWidth"],Wu=[0,0];et(_t.prototype,hP);function vP(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}ke({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):T&&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=vP(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(w){var b=i.getItemModel(w),A=Uu[o.type](i,w,b);if(v){var S=Uu[o.type](i,w),D=yP(o,l,S);D.useStyle(d.getBarItemStyle()),o.type==="cartesian2d"&&D.setShape("r",g),p[w]=D}if(!!i.hasValue(w)){if(h){var I=rx[o.type](f,A);if(I){a.remove(L);return}}var L=ax[o.type](w,A,l,u,!1,c);i.setItemGraphicEl(w,L),a.add(L),ox(L,i,w,b,A,t,l,o.type==="polar")}}).update(function(w,b){var A=i.getItemModel(w),S=Uu[o.type](i,w,A);if(v){var D=m[b];D.useStyle(d.getBarItemStyle()),o.type==="cartesian2d"&&D.setShape("r",g),p[w]=D;var I=Uu[o.type](i,w),L=hx(l,I,o);ft(D,{shape:L},u,w)}var P=n.getItemGraphicEl(b);if(!i.hasValue(w)){a.remove(P);return}if(h){var R=rx[o.type](f,S);if(R){a.remove(P);return}}P?ft(P,{shape:S},u,w):P=ax[o.type](w,S,l,u,!0,c),i.setItemGraphicEl(w,P),a.add(P),ox(P,i,w,A,S,t,l,o.type==="polar")}).remove(function(w){var b=n.getItemGraphicEl(w);o.type==="cartesian2d"?b&&ix(w,u,b):b&&nx(w,u,b)}).execute();var y=this._backgroundGroup||(this._backgroundGroup=new q);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(),lx(t,this.group);var a=t.get("clip",!0)?Gu(t.coordinateSystem,!1,t):null;a?this.group.setClipPath(a):this.group.removeClipPath()},_incrementalRenderLarge:function(t,e){this._removeBackground(),lx(e,this.group,!0)},dispose:ce,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"?nx(a.dataIndex,t,a):ix(a.dataIndex,t,a)})):e.removeAll(),this._data=null},_removeBackground:function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null}});var tx=Math.max,ex=Math.min,rx={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=tx(e.x,t.x),n=ex(e.x+e.width,t.x+t.width),o=tx(e.y,t.y),s=ex(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}},ax={cartesian2d:function(t,e,r,a,i){var n=new xt({shape:et({},e),z2:1});if(n.name="item",a){var o=n.shape,s=r?"height":"width",l={};o[s]=0,l[s]=e[s],sa[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?fP:Ar,l=new s({shape:J({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],sa[i?"updateProps":"initProps"](l,{shape:f},a,t)}return l}};function ix(t,e,r){r.style.text=null,ft(r,{shape:{width:0}},e,t,function(){r.parent&&r.parent.remove(r)})}function nx(t,e,r){r.style.text=null,ft(r,{shape:{r:r.shape.r0}},e,t,function(){r.parent&&r.parent.remove(r)})}var Uu={cartesian2d:function(t,e,r){var a=t.getItemLayout(e),i=r?dP(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 bd(t){return t.startAngle!=null&&t.endAngle!=null&&t.startAngle===t.endAngle}function ox(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(J({stroke:bd(i)?"none":h,fill:bd(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||Q1(t.style,c,a,l,n,r,d),bd(i)&&(c.fill=c.stroke="none"),Ot(t,c)}function dP(t,e){var r=t.get(cP)||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 sx=pt.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 lx(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 sx({shape:{points:h},incremental:!!r,__startPoint:f,__baseDimIdx:n,__largeDataIndices:o,__barWidth:s,silent:!0,z2:0});mP(c,l,a),e.add(c)}var v=new sx({shape:{points:a.getLayout("largePoints")},incremental:!!r,__startPoint:i,__baseDimIdx:n,__largeDataIndices:o,__barWidth:s});e.add(v),pP(v,t,a),v.seriesIndex=t.seriesIndex,t.get("silent")||(v.on("mousedown",ux),v.on("mousemove",ux))}var ux=du(function(t){var e=this,r=gP(e,t.offsetX,t.offsetY);e.dataIndex=r>=0?r:null},30,!1);function gP(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];Wu[0]=e,Wu[1]=r;for(var u=Wu[a],h=Wu[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 pP(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 mP(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 hx(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 yP(t,e,r){var a=t.type==="polar"?Ar:xt;return new a({shape:hx(e,r,t),silent:!0,z2:0})}Gt(Wr.VISUAL.LAYOUT,ot(e1,"bar")),Gt(Wr.VISUAL.PROGRESSIVE_LAYOUT,W2),Rt({seriesType:"bar",reset:function(t){t.getData().setVisual("legendSymbol","roundRect")}});var Un=function(t,e,r){e=z(e)&&{coordDimensions:e}||et({},e);var a=t.getSource(),i=En(a,e),n=new fe(i,t);return n.initData(a,r),n},Sd={updateSelectedMap:function(t){this._targetList=z(t)?t.slice():[],this._selectTargetMap=an(t||[],function(e,r){return e.set(r.name,r),e},ht())},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 ws(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 $u=Mu({type:"series.pie",init:function(t){$u.superApply(this,"init",arguments),this.legendVisualProvider=new ws(it(this.getData,this),it(this.getRawData,this)),this.updateSelectedMap(this._createSelectableList()),this._defaultLabelLine(t)},mergeOption:function(t){$u.superCall(this,"mergeOption",t),this.updateSelectedMap(this._createSelectableList())},getInitialData:function(t,e){return Un(this,{coordDimensions:["value"],encodeDefaulter:ot(vv,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:Zy(t,a,"selected")});return r},getDataParams:function(t){var e=this.getData(),r=$u.superCall(this,"getDataParams",t),a=[];return e.each(e.mapDimension("value"),function(i){a.push(i)}),r.percent=my(a,t,e.hostModel.get("percentPrecision")),r.$vars.push("percent"),r},_defaultLabelLine:function(t){fi(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"}});Dt($u,Sd);function _P(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){fx(i.getItemGraphicEl(l),i.getItemLayout(l),e.isSelected(i.getName(l)),s,r)})}function fx(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 Ad(t,e){q.call(this);var r=new Ar({z2:2}),a=new ir,i=new dt;this.add(r),this.add(a),this.add(i),this.updateData(t,e,!0)}var cx=Ad.prototype;cx.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=et({},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,Se(a,{shape:{r:l.r}},o,e)):(a.shape.endAngle=l.startAngle,ft(a,{shape:{endAngle:l.endAngle}},o,e))}else h==="expansion"?a.setShape(u):ft(a,{shape:u},o,e);var c=t.getItemVisual(e,"color");a.useStyle(J({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),fx(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")))},Ot(this)},cx._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?(ft(a,{shape:u},n,e),ft(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");Fe(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})},It(Ad,q);var W5=ue.extend({type:"pie",init:function(){var t=new q;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=ot(_P,this.uid,t,s,r),c=t.get("selectedMode");if(i.diff(n).add(function(m){var y=new Ad(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(w){w.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=it(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 Ar({shape:{cx:t,cy:e,r0:0,r,startAngle:a,endAngle:a,clockwise:i}}),u=s?Se:ft;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}}}),vx=function(t,e){M(e,function(r){r.update="updateView",mt(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}})})},Zu=function(t){return{getTargetSeries:function(e){var r={},a=ht();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)}})}}},xP=Math.PI/180;function dx(t,e,r,a,i,n,o,s,l,u){t.sort(function(w,b){return w.y-b.y});function h(w,b,A,S){for(var D=w;D<b&&!(t[D].y+A>l+o);D++)if(t[D].y+=A,D>w&&D+1<b&&t[D+1].y>t[D].y+t[D].height){f(D,A/2);return}f(b-1,A/2)}function f(w,b){for(var A=w;A>=0&&!(t[A].y-b<l||(t[A].y-=b,A>0&&t[A].y>t[A-1].y+t[A-1].height));A--);}function c(w,b,A,S,D,I){for(var L=(I>0,b?Number.MAX_VALUE:0),P=0,R=w.length;P<R;P++)if(w[P].labelAlignTo==="none"){var E=Math.abs(w[P].y-S),Z=w[P].len,W=w[P].len2,$=E<D+Z?Math.sqrt((D+Z+W)*(D+Z+W)-E*E):Math.abs(w[P].x-A);b&&$>=L&&($=L-10),!b&&$<=L&&($=L+10),w[P].x=A+$*I,L=$}}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 wP(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++)gx(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])));dx(u,e,r,a,1,i,n,o,s,f),dx(l,e,r,a,-1,i,n,o,s,h);for(var c=0;c<t.length;c++){var v=t[c];if(!gx(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=rc(v.text,m,v.font),v.labelAlignTo==="edge"&&(p=er(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 gx(t){return t.position==="center"}var bP=function(t,e,r,a,i,n){var o=t.getData(),s=[],l,u,h=!1,f=(t.get("minShowLabelAngle")||0)*xP;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"),_=H(g.get("margin"),r),w=g.get("bleedMargin"),b=g.getFont(),A=d.getModel("labelLine"),S=A.get("length");S=H(S,r);var D=A.get("length2");if(D=H(D,r),!(v.angle<f)){var I=(v.startAngle+v.endAngle)/2,L=Math.cos(I),P=Math.sin(I),R,E,Z,W;l=v.cx,u=v.cy;var $=t.getFormattedLabel(c,"normal")||o.getName(c),X=Rr($,b,W,"top"),K=p==="inside"||p==="inner";if(p==="center")R=v.cx,E=v.cy,W="center";else{var Q=(K?(v.r+v.r0)/2*L:v.r*L)+l,j=(K?(v.r+v.r0)/2*P:v.r*P)+u;if(R=Q+L*3,E=j+P*3,!K){var U=Q+L*(S+e-v.r),tt=j+P*(S+e-v.r),ct=U+(L<0?-1:1)*D,bt=tt;y==="edge"?R=L<0?i+_:i+r-_:R=ct+(L<0?-m:m),E=bt,Z=[[Q,j],[U,tt],[ct,bt]]}W=K?"center":y==="edge"?L>0?"right":"left":L>0?"left":"right"}var Et,ie=g.get("rotate");typeof ie=="number"?Et=ie*(Math.PI/180):Et=ie?L<0?-I+Math.PI:-I:0,h=!!Et,v.label={x:R,y:E,position:p,height:X.height,len:S,len2:D,linePoints:Z,textAlign:W,verticalAlign:"middle",rotation:Et,inside:K,labelDistance:m,labelAlignTo:y,labelMargin:_,bleedMargin:w,textRect:X,text:$,font:b},K||s.push(v.label)}}),!h&&t.get("avoidLabelOverlap")&&wP(s,l,u,e,r,a,i,n)},Yu=Math.PI*2,px=Math.PI/180;function SP(t,e){return qt(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}var AP=function(t,e,r,a){e.eachSeriesByType(t,function(i){var n=i.getData(),o=n.mapDimension("value"),s=SP(i,r),l=i.get("center"),u=i.get("radius");z(u)||(u=[0,u]),z(l)||(l=[l,l]);var h=H(s.width,r.getWidth()),f=H(s.height,r.getHeight()),c=Math.min(h,f),v=H(l[0],h)+s.x,d=H(l[1],f)+s.y,g=H(u[0],c/2),p=H(u[1],c/2),m=-i.get("startAngle")*px,y=i.get("minAngle")*px,_=0;n.each(o,function(W){!isNaN(W)&&_++});var w=n.getSum(o),b=Math.PI/(w||_)*2,A=i.get("clockwise"),S=i.get("roseType"),D=i.get("stillShowZeroSum"),I=n.getDataExtent(o);I[0]=0;var L=Yu,P=0,R=m,E=A?1:-1;if(n.each(o,function(W,$){var X;if(isNaN(W)){n.setItemLayout($,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:A,cx:v,cy:d,r0:g,r:S?NaN:p,viewRect:s});return}S!=="area"?X=w===0&&D?b:W*b:X=Yu/_,X<y?(X=y,L-=y):P+=W;var K=R+E*X;n.setItemLayout($,{angle:X,startAngle:R,endAngle:K,clockwise:A,cx:v,cy:d,r0:g,r:S?Nt(W,I,[g,p]):p,viewRect:s}),R=K}),L<Yu&&_)if(L<=.001){var Z=Yu/_;n.each(o,function(W,$){if(!isNaN(W)){var X=n.getItemLayout($);X.angle=Z,X.startAngle=m+E*$*Z,X.endAngle=m+E*($+1)*Z}})}else b=L/P,R=m,n.each(o,function(W,$){if(!isNaN(W)){var X=n.getItemLayout($),K=X.angle===y?y:W*b;X.startAngle=R,X.endAngle=R+E*K,R+=E*K}});bP(i,p,s.width,s.height,s.x,s.y)})},bs=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})}}}};vx("pie",[{type:"pieToggleSelect",event:"pieselectchanged",method:"toggleSelected"},{type:"pieSelect",event:"pieselected",method:"select"},{type:"pieUnSelect",event:"pieunselected",method:"unSelect"}]),Rt(Zu("pie")),Gt(ot(AP,"pie")),$e(bs("pie")),Vt.extend({type:"series.scatter",dependencies:["grid","polar","geo","singleAxis","calendar"],getInitialData:function(t,e){return ca(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 Td=4,Cd=nr({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]<Td;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]<Td;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 mx(){this.group=new q}var Ya=mx.prototype;Ya.isPersistent=function(){return!this._incremental},Ya.updateData=function(t,e){this.group.removeAll();var r=new Cd({rectHover:!0,cursor:"default"});r.setShape({points:t.getLayout("symbolPoints")}),this._setCommon(r,t,!1,e),this.group.add(r),this._incremental=null},Ya.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)})}},Ya.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>2e6?(this._incremental||(this._incremental=new He({silent:!0})),this.group.add(this._incremental)):this._incremental=null},Ya.incrementalUpdate=function(t,e,r){var a;this._incremental?(a=new Cd,this._incremental.addDisplayable(a,!0)):(a=new Cd({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)},Ya._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=Ye(e.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var o=t.shape.size[0]<Td;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))}))},Ya.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},Ya._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()},ke({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=ys().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 mx:new Bn,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(){}}),Rt(Ii("scatter","circle")),Gt(ys("scatter"));function yx(t,e,r){Qt.call(this,t,e,r),this.type="value",this.angle=0,this.name="",this.model}It(yx,Qt);function Zr(t,e,r){this._model=t,this.dimensions=[],this._indicatorAxes=V(t.getIndicatorModels(),function(a,i){var n="indicator_"+i,o=new yx(n,a.get("axisType")==="log"?new ku:new Ur);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}Zr.prototype.getIndicatorAxes=function(){return this._indicatorAxes},Zr.prototype.dataToPoint=function(t,e){var r=this._indicatorAxes[e];return this.coordToPoint(r.dataToCoord(t),e)},Zr.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]},Zr.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))]},Zr.prototype.resize=function(t,e){var r=t.get("center"),a=e.getWidth(),i=e.getHeight(),n=Math.min(a,i)/2;this.cx=H(r[0],a),this.cy=H(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=H(o[0],n),this.r=H(o[1],n),M(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)},Zr.prototype.update=function(t,e){var r=this._indicatorAxes,a=this._model;M(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();M(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}M(r,function(o,s){var l=s1(o.scale,o.model).extent;Fa(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=re(d-v*i);h.setExtent(g,d),h.setInterval(v)}})},Zr.dimensions=[],Zr.create=function(t,e){var r=[];return t.eachComponent("radar",function(a){var i=new Zr(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},_e.register("radar",Zr);var Ss=$a.valueAxis;function Xu(t,e){return J({show:e},t)}var U5=Ze({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=V(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=J({color:v.color},s)),v=ut(rt(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=et(new _t(v,null,this.ecModel),Di);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:ut({lineStyle:{color:"#bbb"}},Ss.axisLine),axisLabel:Xu(Ss.axisLabel,!1),axisTick:Xu(Ss.axisTick,!1),axisType:"interval",splitLine:Xu(Ss.splitLine,!0),splitArea:Xu(Ss.splitArea,!0),indicator:[]}}),TP=["axisLine","axisTickLabel","axisName"];he({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=V(r,function(i){var n=new ze(i.model,{position:[e.cx,e.cy],rotation:i.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return n});M(a,function(i){M(TP,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=z(h)?h:[h],f=z(f)?f:[f];var c=[],v=[];function d(P,R,E){var Z=E%R.length;return P[Z]=P[Z]||[],Z}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 Br({shape:{cx:p,cy:m,r:g[y].coord}}))}if(u&&y<g.length-1){var _=d(v,f,y);v[_].push(new Yl({shape:{cx:p,cy:m,r0:g[y].coord,r:g[y+1].coord}}))}}else for(var w,b=V(r,function(P,R){var E=P.getTicksCoords();return w=w==null?E.length-1:Math.min(E.length-1,w),V(E,function(Z){return e.coordToPoint(Z.coord,R)})}),A=[],y=0;y<=w;y++){for(var S=[],D=0;D<r.length;D++)S.push(b[D][y]);if(S[0]?S.push(S[0].slice()):T&&console.error("Can't draw value axis "+y),l){var _=d(c,h,y);c[_].push(new ir({shape:{points:S}}))}if(u&&A){var _=d(v,f,y-1);v[_].push(new Ge({shape:{points:S.concat(A)}}))}A=S.slice().reverse()}var I=o.getLineStyle(),L=s.getAreaStyle();M(v,function(P,R){this.group.add(or(P,{style:J({stroke:"none",fill:f[R%f.length]},L),silent:!0}))},this),M(c,function(P,R){this.group.add(or(P,{style:J({fill:"none",stroke:h[R%h.length]},I),silent:!0}))},this)}});var CP=Vt.extend({type:"series.radar",dependencies:["radar"],init:function(t){CP.superApply(this,"init",arguments),this.legendVisualProvider=new ws(it(this.getData,this),it(this.getRawData,this))},getInitialData:function(t,e){return Un(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 kt(i===""?this.name:i)+"<br/>"+V(a,function(n,o){var s=e.get(e.mapDimension(n.dim),t);return kt(n.name+" : "+s)}).join("<br />")},getTooltipPosition:function(t){if(t!=null){for(var e=this.getData(),r=this.coordinateSystem,a=e.getValues(V(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 DP(t){return z(t)||(t=[+t,+t]),t}ke({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=DP(h.getItemVisual(f,"symbolSize")),g=Ye(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]),sa[g?"initProps":"updateProps"](m,{position:f[p]},t,d)):m.attr("position",f[p]),c.add(m))}}function u(h){return V(h,function(f){return[a.cx,a.cy]})}n.diff(o).add(function(h){var f=n.getItemLayout(h);if(!!f){var c=new Ge,v=new ir,d={shape:{points:f}};c.shape.points=u(f),v.shape.points=u(f),Se(c,d,t,h),Se(v,d,t,h);var g=new q,p=new q;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),ft(v,p,t),ft(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(J(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(),w=y.isEmpty()&&y.parentModel.isEmpty();w=w&&_,d.ignore=_,d.useStyle(J(m.getAreaStyle(),{fill:p,opacity:.7})),d.hoverStyle=y.getAreaStyle();var b=c.getModel("itemStyle").getItemStyle(["color"]),A=c.getModel("emphasis.itemStyle").getItemStyle(),S=c.getModel("label"),D=c.getModel("emphasis.label");g.eachChild(function(I){I.setStyle(b),I.hoverStyle=rt(A);var L=n.get(n.dimensions[I.__dimIdx],f);(L==null||isNaN(L))&&(L=""),Fe(I.style,I.hoverStyle,S,D,{labelFetcher:n.hostModel,labelDataIndex:f,labelDimIndex:I.__dimIdx,defaultText:L,autoColor:p,isRectText:!0})}),h.highDownOnUpdate=function(I,L){d.attr("ignore",L==="emphasis"?w:_)},Ot(h)}),this._data=n},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}});var MP=function(t){t.eachSeriesByType("radar",function(e){var r=e.getData(),a=[],i=e.coordinateSystem;if(!!i){var n=i.getIndicatorAxes();M(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]=_x(h)?h:xx(i)})}),r.each(function(o){var s=lm(a[o],function(l){return _x(l)})||xx(i);a[o].push(s.slice()),r.setItemLayout(o,a[o])})}})};function _x(t){return!isNaN(t[0])&&!isNaN(t[1])}function xx(t){return[t.cx,t.cy]}var IP=function(t){var e=t.polar;if(e){z(e)||(e=[e]);var r=[];M(e,function(a,i){a.indicator?(a.type&&!a.shape&&(a.shape=a.type),t.radar=t.radar||[],z(t.radar)||(t.radar=[t.radar]),t.radar.push(a)):r.push(a)}),t.polar=r}M(t.series,function(a){a&&a.type==="radar"&&a.polarIndex&&(a.radarIndex=a.polarIndex)})};Rt(Zu("radar")),Rt(Ii("radar","circle")),Gt(MP),$e(bs("radar")),we(IP);for(var Dd=[126,25],Li=[[[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]]],Pi=0;Pi<Li.length;Pi++)for(var $n=0;$n<Li[Pi].length;$n++)Li[Pi][$n][0]/=10.5,Li[Pi][$n][1]/=-10.5/.75,Li[Pi][$n][0]+=Dd[0],Li[Pi][$n][1]+=Dd[1];var LP=function(t,e){t==="china"&&e.push(new ps("\u5357\u6D77\u8BF8\u5C9B",V(Li,function(r){return{type:"polygon",exterior:r}}),Dd))},PP={\u5357\u6D77\u8BF8\u5C9B:[32,80],\u5E7F\u4E1C:[0,-10],\u9999\u6E2F:[10,5],\u6FB3\u95E8:[-10,10],\u5929\u6D25:[5,5]},EP=function(t,e){if(t==="china"){var r=PP[e.name];if(r){var a=e.center;a[0]+=r[0]/10.5,a[1]+=-r[1]/(10.5/.75)}}},RP={Russia:[100,60],"United States":[-99,38],"United States of America":[-99,38]},OP=function(t,e){if(t==="world"){var r=RP[e.name];if(r){var a=e.center;a[0]=r[0],a[1]=r[1]}}},NP=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]],kP=function(t,e){t==="china"&&e.name==="\u53F0\u6E7E"&&e.geometries.push({type:"polygon",exterior:NP[0]})},bx=Pe(),zP={load:function(t,e,r){var a=bx(e).parsed;if(a)return a;var i=e.specialAreas||{},n=e.geoJSON,o;try{o=n?od(n,r):[]}catch(s){throw new Error(`Invalid geoJson format
| `+s.message)}return LP(t,o),M(o,function(s){var l=s.name;EP(t,s),OP(t,s),kP(t,s);var u=i[l];u&&s.transformTo(u.left,u.top,u.width,u.height)}),bx(e).parsed={regions:o,boundingRect:BP(o)}}};function BP(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 Zn=Pe(),VP={load:function(t,e){var r=Zn(e).originRoot;if(r)return{root:r,boundingRect:Zn(e).boundingRect};var a=Sx(e);return Zn(e).originRoot=a.root,Zn(e).boundingRect=a.boundingRect,a},makeGraphic:function(t,e,r){var a=Zn(e),i=a.rootMap||(a.rootMap=ht()),n=i.get(r);if(n)return n;var o=a.originRoot,s=a.boundingRect;return a.originRootHostKey?n=Sx(e,s).root:(a.originRootHostKey=r,n=o),i.set(r,n)},removeGraphic:function(t,e,r){var a=Zn(e),i=a.rootMap;i&&i.removeKey(r),r===a.originRootHostKey&&(a.originRootHostKey=null)}};function Sx(t,e){var r=t.svgXML,a,i;try{a=r&&UI(r,{ignoreViewBox:!0,ignoreRootClip:!0})||{},i=a.root,gt(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 vt(0,0,0,0),n!=null&&(e.width=n),o!=null&&(e.height=o)),s){var l=d_(s,e.width,e.height),u=i;i=new q,i.add(u),u.scale=l.scale,u.position=l.position}return i.setClipPath(new xt({shape:e.plain()})),{root:i,boundingRect:e}}var Ax={geoJSON:zP,svg:VP},As={load:function(t,e,r){var a=[],i=ht(),n=ht(),o,s=Cx(t);return M(s,function(l){var u=Ax[l.type].load(t,l,r);M(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 vt(0,0,0,0)}},makeGraphic:Tx("makeGraphic"),removeGraphic:Tx("removeGraphic")};function Tx(t){return function(e,r){var a=Cx(e),i=[];return M(a,function(n){var o=Ax[n.type][t];o&&i.push(o(e,n,r))}),i}}function GP(t){T&&console.error("Map "+t+" not exists. The GeoJSON of the map must be provided.")}function Cx(t){var e=wu.retrieveMap(t)||[];return T&&(e.length||GP(t)),e}var HP=Vt.extend({type:"series.map",dependencies:["geo"],layoutMode:"box",needsDrawMap:!1,seriesGroup:[],getInitialData:function(t){for(var e=Un(this,{coordDimensions:["value"],encodeDefaulter:ot(vv,this)}),r=e.mapDimension("value"),a=ht(),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:Zy(e,o,"selected")})}var u=As.load(this.getMapType(),this.option.nameMap,this.option.nameProperty);return M(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=ka(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(kt(i[o].name))}return n.join(", ")+"<br />"+kt(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"}});Dt(HP,Sd);var Dx="\0_ec_interaction_mutex";function FP(t,e,r){var a=Md(t);a[e]=r}function WP(t,e,r){var a=Md(t),i=a[e];i===r&&(a[e]=null)}function Mx(t,e){return!!Md(t)[e]}function Md(t){return t[Dx]||(t[Dx]={})}mt({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},function(){});function Yn(t){this.pointerChecker,this._zr=t,this._opt={};var e=it,r=e(UP,this),a=e($P,this),i=e(ZP,this),n=e(YP,this),o=e(XP,this);le.call(this),this.setPointerChecker=function(s){this.pointerChecker=s},this.enable=function(s,l){this.disable(),this._opt=J(rt(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}}Dt(Yn,le);function UP(t){if(!(xm(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 $P(t){if(!(!this._dragging||!qu("moveOnMouseMove",t,this._opt)||t.gestureEvent==="pinch"||Mx(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&&oi(t.event),Ix(this,"pan","moveOnMouseMove",t,{dx:n,dy:o,oldX:a,oldY:i,newX:e,newY:r})}}function ZP(t){xm(t)||(this._dragging=!1)}function YP(t){var e=qu("zoomOnMouseWheel",t,this._opt),r=qu("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;Id(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);Id(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:h,originX:n,originY:o})}}}function XP(t){if(!Mx(this._zr,"globalPan")){var e=t.pinchScale>1?1.1:1/1.1;Id(this,"zoom",null,t,{scale:e,originX:t.pinchX,originY:t.pinchY})}}function Id(t,e,r,a,i){t.pointerChecker&&t.pointerChecker(a,i.originX,i.originY)&&(oi(a.event),Ix(t,e,r,a,i))}function Ix(t,e,r,a,i){i.isAvailableBehavior=it(qu,null,r,a),t.trigger(e,i)}function qu(t,e,r){var a=r[t];return!t||a&&(!Lt(a)||e.event[a+"Key"])}function Ld(t,e,r){var a=t.target,i=a.position;i[0]+=e,i[1]+=r,a.dirty()}function Pd(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 qP={axisPointer:1,tooltip:1,brush:1};function Ku(t,e,r){var a=e.getComponentByElement(t.topTarget),i=a&&a.coordinateSystem;return a&&a!==r&&!qP[a.mainType]&&i&&i.model!==r}function Lx(t){var e=t.getItemStyle(),r=t.get("areaColor");return r!=null&&(e.fill=r),e}function KP(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:V(o.__regions,function(l){return{name:l.name,from:i.uid}})};s[e.mainType+"Id"]=e.id,a.dispatchAction(s),Px(e,r)}}}))}function Px(t,e){e.eachChild(function(r){M(r.__regions,function(a){r.trigger(t.isSelected(a.name)?"emphasis":"normal")})})}function ju(t,e){var r=new q;this.uid=Wo("ec_map_draw"),this._controller=new Yn(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 q),r.add(this._backgroundGroup=new q)}ju.prototype={constructor:ju,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(A){!o&&A.getHostGeoModel()===t&&(o=A.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 _r;v.transform=h.roamTransform,v.decomposeTransform();var d={scale:v.scale,position:v.position};c=v.scale,ft(u,d,t)}var g=h.rawScale,p=h.rawPosition;l.removeAll();var m=["itemStyle"],y=["emphasis","itemStyle"],_=["label"],w=["emphasis","label"],b=ht();M(s.regions,function(A){var S=b.get(A.name)||b.set(A.name,new q),D=new Y0({segmentIgnoreThreshold:1,shape:{paths:[]}});S.add(D);var I=t.getRegionModel(A.name)||t,L=I.getModel(m),P=I.getModel(y),R=Lx(L),E=Lx(P),Z=I.getModel(_),W=I.getModel(w),$;if(o){$=o.indexOfName(A.name);var X=o.getItemVisual($,"color",!0);X&&(R.fill=X)}var K=function(dr){return[dr[0]*g[0]+p[0],dr[1]*g[1]+p[1]]};M(A.geometries,function(dr){if(dr.type==="polygon"){for(var sl=[],Ji=0;Ji<dr.exterior.length;++Ji)sl.push(K(dr.exterior[Ji]));D.shape.paths.push(new Ge({segmentIgnoreThreshold:1,shape:{points:sl}}));for(var Ji=0;Ji<(dr.interiors?dr.interiors.length:0);++Ji){for(var NT=dr.interiors[Ji],sl=[],rm=0;rm<NT.length;++rm)sl.push(K(NT[rm]));D.shape.paths.push(new Ge({segmentIgnoreThreshold:1,shape:{points:sl}}))}}}),D.setStyle(R),D.style.strokeNoScale=!0,D.culling=!0;var Q=Z.get("show"),j=W.get("show"),U=o&&isNaN(o.get(o.mapDimension("value"),$)),tt=o&&o.getItemLayout($);if(n||U&&(Q||j)||tt&&tt.showLabel){var ct=n?A.name:$,bt;(!o||$>=0)&&(bt=t);var Et=new dt({position:K(A.center.slice()),scale:[1/u.scale[0],1/u.scale[1]],z2:10,silent:!0});if(Fe(Et.style,Et.hoverStyle={},Z,W,{labelFetcher:bt,labelDataIndex:ct,defaultText:A.name,useInsideStyle:!1},{textAlign:"center",textVerticalAlign:"middle"}),!f){var ie=[1/c[0],1/c[1]];ft(Et,{scale:ie},t)}S.add(Et)}if(o)o.setItemGraphicEl($,S);else{var I=t.getRegionModel(A.name);D.eventData={componentType:"geo",componentIndex:t.componentIndex,geoIndex:t.componentIndex,name:A.name,region:I&&I.option||{}}}var ol=S.__regions||(S.__regions=[]);ol.push(A),S.highDownSilentOnTouch=!!t.get("selectedMode"),Ot(S,E),l.add(S)}),this._updateController(t,e,r),KP(this,t,l,r,a),Px(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&&M(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,Ld(n,l.dx,l.dy),r.dispatchAction(et(s(),{dx:l.dx,dy:l.dy}))},this),i.off("zoom").on("zoom",function(l){if(this._mouseDownFlag=!1,Pd(n,l.scale,l.originX,l.originY),r.dispatchAction(et(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)&&!Ku(l,r,t)})}};var Ed="__seriesMapHighDown",Ex="__seriesMapCallKey";ke({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 ju(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 Br({style:{fill:t.getData().getVisual("color")},shape:{cx:l[0]+u*9,cy:l[1],r:3},silent:!0,z2:8+(u?0:ko+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=Xt(t.getFormattedLabel(v,"normal"),c),_=Xt(t.getFormattedLabel(v,"emphasis"),y),w=m[Ed],b=Math.random();if(!w){w=m[Ed]={};var A=ot(Rx,!0),S=ot(Rx,!1);m.on("mouseover",A).on("mouseout",S).on("emphasis",A).on("normal",S)}m[Ex]=b,et(w,{recordVersion:b,circle:h,labelModel:g,hoverLabelModel:p,emphasisText:_,normalText:y}),Ox(w,!1)}i.add(h)}}})}});function Rx(t){var e=this[Ed];e&&e.recordVersion===this[Ex]&&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($t({},i,{text:i.get("show")?n:null},{isRectText:!0,useInsideStyle:!1},!0)),r.__mapOriginalZ2=r.z2,r.z2+=ko):($t(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 Rd(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()}}mt({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=Rd(i,t,a.get("scaleLimit"));a.setCenter&&a.setCenter(n.center),a.setZoom&&a.setZoom(n.zoom),r==="series"&&M(a.seriesGroup,function(o){o.setCenter(n.center),o.setZoom(n.zoom)})}})});var Nx=Pt;function Od(){_r.call(this)}Dt(Od,_r);function Xa(t){this.name=t,this.zoomLimit,_r.call(this),this._roamTransformable=new Od,this._rawTransformable=new Od,this._center,this._zoom}Xa.prototype={constructor:Xa,type:"view",dimensions:["x","y"],setBoundingRect:function(t,e,r,a){return this._rect=new vt(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 vt(t,e,r,a)},transformTo:function(t,e,r,a){var i=this.getBoundingRect(),n=this._rawTransformable;n.transform=i.calculateTransform(new vt(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=Pt([],a,t),r=Pt([],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(),xo(this.transform||(this.transform=[]),e.transform||Ie()),this._rawTransform=e.getLocalTransform(),this.invTransform=this.invTransform||[],cl(this.invTransform,this.transform),this.decomposeTransform()},getTransformInfo:function(){var t=this._roamTransformable.transform,e=this._rawTransformable;return{roamTransform:t?on(t):Ie(),rawScale:on(e.scale),rawPosition:on(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?Nx(r,t,a):ge(r,t)},pointToData:function(t){var e=this.invTransform;return e?Nx([],t,e):[t[0],t[1]]},convertToPixel:ot(kx,"dataToPoint"),convertFromPixel:ot(kx,"pointToData"),containPoint:function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])}},Dt(Xa,_r);function kx(t,e,r,a){var i=r.seriesModel,n=i?i.coordinateSystem:null;return n===this?n[t](a):null}function Xn(t,e,r,a){Xa.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}Xn.prototype={constructor:Xn,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 vt(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 Xa.prototype.dataToPoint.call(this,t,e,r)},convertToPixel:ot(zx,"dataToPoint"),convertFromPixel:ot(zx,"pointToData")},Dt(Xn,Xa);function zx(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 Bx(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])?T&&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=[H(s[0],u),H(s[1],h)],l=H(l,Math.min(u,h)),!isNaN(s[0])&&!isNaN(s[1])&&!isNaN(l)?c=!0:T&&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=qt(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 Vx(t,e){M(e.get("geoCoord"),function(r,a){t.addGeoCoord(a,r)})}var Gx={dimensions:Xn.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=wu.retrieveMap(o);u&&u[0]&&u[0].type==="svg"?(s==null&&(s=1),l=!1):s==null&&(s=.75);var h=new Xn(o+n,o,i.get("nameMap"),l);h.aspectScale=s,h.zoomLimit=i.get("scaleLimit"),r.push(h),Vx(h,i),i.coordinateSystem=h,h.model=i,h.resize=Bx,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)}}),M(a,function(i,n){var o=V(i,function(l){return l.get("nameMap")}),s=new Xn(n,n,go(o));s.zoomLimit=Ut.apply(null,V(i,function(l){return l.get("scaleLimit")})),r.push(s),s.resize=Bx,s.aspectScale=i[0].get("aspectScale"),s.resize(i[0],e),M(i,function(l){l.coordinateSystem=s,Vx(s,l)})}),r},getFilledRegions:function(t,e,r){for(var a=(t||[]).slice(),i=ht(),n=0;n<a.length;n++)i.set(a[n].name,a[n]);var o=As.load(e,r);return M(o.regions,function(s){var l=s.name;!i.get(l)&&a.push({name:l})}),a}};Fv("geo",Gx);var jP=function(t){var e={};t.eachSeriesByType("map",function(r){var a=r.getMapType();if(!(r.getHostGeoModel()||e[a])){var i={};M(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}})},QP=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 JP(t,e){var r={};return M(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 tE=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)}),M(e,function(r,a){for(var i=JP(V(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]})},eE=function(t){var e=[];M(t.series,function(r){r&&r.type==="map"&&(e.push(r),r.map=r.map||r.mapType,J(r,r.mapLocation))})};Gt(jP),Rt(QP),$e(Wr.PROCESSOR.STATISTIC,tE),we(eE),vx("map",[{type:"mapToggleSelect",event:"mapselectchanged",method:"toggleSelected"},{type:"mapSelect",event:"mapselected",method:"select"},{type:"mapUnSelect",event:"mapunselected",method:"unSelect"}]);var Ts=M,Cs="\0__link_datas",Qu="\0__link_mainData";function Hx(t){var e=t.mainData,r=t.datas;r||(r={main:e},t.datasAttr={main:"data"}),t.datas=t.mainData=null,Fx(e,r,t),Ts(r,function(a){Ts(e.TRANSFERABLE_METHODS,function(i){a.wrapMethod(i,ot(rE,t))})}),e.wrapMethod("cloneShallow",ot(iE,t)),Ts(e.CHANGABLE_METHODS,function(a){e.wrapMethod(a,ot(aE,t))}),gt(r[e.dataType]===e)}function rE(t,e){if(oE(this)){var r=et({},this[Cs]);r[this.dataType]=e,Fx(e,r,t)}else Nd(e,this.dataType,this[Qu],t);return e}function aE(t,e){return t.struct&&t.struct.update(this),e}function iE(t,e){return Ts(e[Cs],function(r,a){r!==e&&Nd(r.cloneShallow(),a,e,t)}),e}function nE(t){var e=this[Qu];return t==null||e==null?e:e[Cs][t]}function oE(t){return t[Qu]===t}function Fx(t,e,r){t[Cs]={},Ts(e,function(a,i){Nd(a,i,t,r)})}function Nd(t,e,r,a){r[Cs][e]=t,t[Qu]=r,t.dataType=e,a.struct&&(t[a.structAttr]=a.struct,a.struct[a.datasAttr[e]]=t),t.getLinkedData=nE}var kd=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};kd.prototype={constructor:kd,isRemoved:function(){return this.dataIndex<0},eachNode:function(t,e,r){typeof t=="function"&&(r=e,e=t,t=null),t=t||{},Lt(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 Ei(t,e){this.root,this.data,this._nodes=[],this.hostModel=t,this.levelModels=V(e||[],function(r){return new _t(r,t,t.ecModel)})}Ei.prototype={constructor:Ei,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()}},Ei.createTree=function(t,e,r,a){var i=new Ei(e,r&&r.levels),n=[],o=1;s(t);function s(h,f){var c=h.value;o=Math.max(o,z(c)?c.length:1),n.push(h);var v=new kd(h.name,i);f?sE(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=En(n,{coordDimensions:["value"],dimensionsCount:o}),u=new fe(l,e);return u.initData(n),a&&a(u),Hx({mainData:u,struct:i,structAttr:"tree"}),i.update(),i};function sE(t,e){var r=e.children;t.parentNode!==e&&(r.push(t),t.parentNode=e)}Vt.extend({type:"series.tree",layoutInfo:null,layoutMode:"box",getInitialData:function(t){var e={name:t.name,children:t.data},r=t.leaves||{},a=new _t(r,this,this.ecModel),i=Ei.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 kt(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 lE(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 uE(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){cE(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=vE(t,i,t.parentNode.hierNode.defaultAncestor||a[0],e)}function hE(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function Wx(t){return arguments.length?t:pE}function Ds(t,e){var r={};return t-=Math.PI/2,r.x=e*Math.cos(t),r.y=e*Math.sin(t),r}function fE(t,e){return qt(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function cE(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 vE(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=zd(s),n=Bd(n),s&&n;){i=zd(i),o=Bd(o),i.hierNode.ancestor=t;var c=s.hierNode.prelim+f-n.hierNode.prelim-u+a(s,n);c>0&&(gE(dE(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&&!zd(i)&&(i.hierNode.thread=s,i.hierNode.modifier+=f-l),n&&!Bd(o)&&(o.hierNode.thread=n,o.hierNode.modifier+=u-h,r=t)}return r}function zd(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function Bd(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function dE(t,e,r){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:r}function gE(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 pE(t,e){return t.parentNode===e.parentNode?1:2}var mE=nr({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=H(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])}}});ke({type:"tree",init:function(t,e){this._oldTree,this._mainGroup=new q,this._controller=new Yn(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){Ux(i,h)&&Zx(i,h,null,o,t,u)}).update(function(h,f){var c=l.getItemGraphicEl(f);if(!Ux(i,h)){c&&Yx(l,f,c,o,t,u);return}Zx(i,h,c,o,t,u)}).remove(function(h){var f=l.getItemGraphicEl(h);f&&Yx(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=[];Po(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 Xa;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)&&!Ku(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){Ld(i,o.dx,o.dy),r.dispatchAction({seriesId:t.id,type:"treeRoam",dx:o.dx,dy:o.dy})},this).on("zoom",function(o){Pd(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 Ux(t,e){var r=t.getItemLayout(e);return r&&!isNaN(r.x)&&!isNaN(r.y)&&t.getItemVisual(e,"symbol")!=="none"}function $x(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 Zx(t,e,r,a,i,u){var o=!r,s=t.tree.getNodeByDataIndex(e),l=s.getModel(),u=$x(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),ft(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,w,b;if(g.x===y.x&&s.isExpand===!0){var A={};A.x=(m.children[0].getLayout().x+m.children[_-1].getLayout().x)/2,A.y=(m.children[0].getLayout().y+m.children[_-1].getLayout().y)/2,w=Math.atan2(A.y-y.y,A.x-y.x),w<0&&(w=Math.PI*2+w),b=A.x<y.x,b&&(w=w-Math.PI)}else w=Math.atan2(g.y-y.y,g.x-y.x),w<0&&(w=Math.PI*2+w),s.children.length===0||s.children.length!==0&&s.isExpand===!1?(b=g.x<y.x,b&&(w=w-Math.PI)):(b=g.x>y.x,b||(w=w-Math.PI));var S=b?"left":"right",D=u.labelModel.get("rotate"),I=D*(Math.PI/180);p.setStyle({textPosition:u.labelModel.get("position")||S,textRotation:D==null?-w:I,textOrigin:"center",verticalAlign:"middle"})}yE(i,s,h,r,d,v,g,a,u)}function yE(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 Xl({shape:Vd(l,i,i),style:J({opacity:0,strokeNoScale:!0},l.lineStyle)})),ft(h,{shape:Vd(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 mE({shape:{parentPoint:[o.x,o.y],childPoints:[[o.x,o.y]],orient:l.orient,forkPosition:l.edgeForkPosition},style:J({opacity:0,strokeNoScale:!0},l.lineStyle)})),ft(h,{shape:{parentPoint:[o.x,o.y],childPoints:c},style:{opacity:1}},t)}}else if(T)throw new Error("The polyline edgeShape can only be used in orthogonal layout")}s.add(h)}function Yx(t,e,r,a,i,u){for(var o=t.tree.getNodeByDataIndex(e),s=t.tree.root,l=o.getModel(),u=$x(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;ft(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"?ft(d,{shape:Vd(u,f,f),style:{opacity:0}},i,function(){a.remove(d)}):g==="polyline"&&u.layout==="orthogonal"&&ft(d,{shape:{parentPoint:[f.x,f.y],childPoints:[[f.x,f.y]]},style:{opacity:0}},i,function(){a.remove(d)}))}function Vd(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=Ds(l,h),v=Ds(l,h+(f-h)*t.curvature),d=Ds(u,f+(h-f)*t.curvature),g=Ds(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}}mt({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})}),mt({type:"treeRoam",event:"treeRoam",update:"none"},function(t,e){e.eachComponent({mainType:"series",subType:"tree",query:t},function(r){var a=r.coordinateSystem,i=Rd(a,t);r.setCenter&&r.setCenter(i.center),r.setZoom&&r.setZoom(i.zoom)})});function _E(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 Ms(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 xE=function(t,e){t.eachSeriesByType("tree",function(r){wE(r,e)})};function wE(t,e){var r=fE(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=Wx(function(_,w){return(_.parentNode===w.parentNode?1:2)/_.depth})):(i=r.width,n=r.height,o=Wx());var s=t.getData().tree.root,l=s.children[0];if(l){lE(s),_E(l,uE,o),s.hierNode.modifier=-l.hierNode.prelim,Ms(l,hE);var u=l,h=l,f=l;Ms(l,function(_){var w=_.getLayout().x;w<u.getLayout().x&&(u=_),w>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),Ms(l,function(_){p=(_.getLayout().x+v)*d,m=(_.depth-1)*g;var w=Ds(p,m);_.setLayout({x:w.x,y:w.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),Ms(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),Ms(l,function(_){p=(_.getLayout().x+v)*d,m=y==="TB"?(_.depth-1)*g:n-(_.depth-1)*g,_.setLayout({x:p,y:m},!0)}))}}}Rt(Ii("tree","circle")),Gt(xE);function Is(t,e,r){if(t&&yt(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 Gd(t,e){var r=Xx(t);return yt(r,e)>=0}function Hd(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}Vt.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};qx(r);var a=t.levels||[];a=t.levels=bE(a,e);var i=V(a||[],function(s){return new _t(s,this,e)},this),n=Ei.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=z(r)?ka(r[0]):ka(r),i=e.getName(t);return kt(i+": "+a)},getDataParams:function(t){var e=Vt.prototype.getDataParams.apply(this,arguments),r=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=Hd(r,this),e},setLayoutInfo:function(t){this.layoutInfo=this.layoutInfo||{},et(this.layoutInfo,t)},mapIdToIndex:function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=ht(),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 qx(t){var e=0;M(t.children,function(a){qx(a);var i=a.value;z(i)&&(i=i[0]),e+=i});var r=t.value;z(r)&&(r=r[0]),(r==null||isNaN(r))&&(r=e),r<0&&(r=0),z(t.value)?t.value[0]=r:t.value=r}function bE(t,e){var r=e.get("color");if(!!r){t=t||[];var a;if(M(t,function(n){var o=new _t(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 SE=8,Kx=8,Fd=5;function Wd(t){this.group=new q,t.add(this.group)}Wd.prototype={constructor:Wd,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),uu(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+SE*2,e.emptyItemWidth);e.totalWidth+=o+Kx,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=IM(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 Ge({shape:{points:AE(n,0,d,s,f===h.length-1,f===0)},style:J(r.getItemStyle(),{lineJoin:"bevel",text:g,textFill:a.getTextColor(),textFont:a.getFont()}),z:10,onclick:ot(i,v)});this.group.add(p),TE(p,t,v),n+=d+Kx}},remove:function(){this.group.removeAll()}};function AE(t,e,r,a,i,n){var o=[[i?t:t-Fd,e],[t+r,e],[t+r,e+a],[i?t:t-Fd,e+a]];return!n&&o.splice(2,0,[t+r+Fd,e+a/2]),!i&&o.push([t,e+a/2]),o}function TE(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&&Hd(r,e)}}function CE(){var t=[],e={},r;return{add:function(a,i,n,o,s){return Lt(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 Ju=it,jx=q,Qx=xt,Yr=M,Jx=3,DE=["label"],ME=["emphasis","label"],IE=["upperLabel"],LE=["emphasis","upperLabel"],PE=10,EE=1,RE=2,Ud=_n([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),tw=function(t){var e=Ud(t);return e.stroke=e.fill=e.lineWidth=null,e};ke({type:"treemap",init:function(t,e){this._containerGroup,this._storage=Ls(),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(!(yt(i,t)<0)){this.seriesModel=t,this.api=r,this.ecModel=e;var n=["treemapZoomToNode","treemapRootToNode"],o=Is(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 jx,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=Ls(),o=Ls(),s=this._storage,l=[],u=ot(OE,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,Yr(d,function(b,A){!b.isRemoved()&&w(A,A)})):new ha(g,d,_,_).add(w).update(w).remove(ot(w,null)).execute();function _(b){return b.getId()}function w(b,A){var S=b!=null?d[b]:null,D=A!=null?g[A]:null,I=u(S,D,p,y);I&&f(S&&S.viewChildren||[],D&&D.viewChildren||[],I,m,y+1)}}function c(d){var g=Ls();return d&&Yr(d,function(p,m){var y=g[m];Yr(p,function(_){_&&(y.push(_),_.__tmWillDelete=1)})}),g}function v(){Yr(h,function(d){Yr(d,function(g){g.parent&&g.parent.remove(g)})}),Yr(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=CE();Yr(e.willDeleteEls,function(s,l){Yr(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)}})}),Yr(this._storage,function(s,l){Yr(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=et({},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(Ju(function(){this._state="ready",e.renderFinally()},this)).start()}},_resetController:function(t){var e=this._controller;e||(e=this._controller=new Yn(t.getZr()),e.enable(this.seriesModel.get("roam")),e.on("pan",Ju(this._onPan,this)),e.on("zoom",Ju(this._onZoom,this)));var r=new vt(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)>Jx||Math.abs(t.dy)>Jx)){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 vt(i.x,i.y,i.width,i.height),o=this.seriesModel.layoutInfo;e-=o.x,r-=o.y;var s=Ie();yr(s,s,[-e,-r]),wo(s,s,[t.scale,t.scale]),yr(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&&Zo(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 Wd(this.group))).render(t,e,r.node,Ju(a,this));function a(i){this._state!=="animating"&&(Gd(t.getViewRoot(),i)?this._rootToNode({node:i}):this._zoomToNode({node:i}))}},remove:function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=Ls(),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 Ls(){return{nodeGroup:[],background:[],content:[]}}function OE(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,w=y&&y.length,b=o.getModel("itemStyle"),A=o.getModel("emphasis.itemStyle"),S=$("nodeGroup",jx);if(!S)return;if(l.add(S),S.attr("position",[h.x||0,h.y||0]),S.__tmNodeWidth=c,S.__tmNodeHeight=v,h.isAboveViewRoot)return S;var D=o.getModel(),I=$("background",Qx,u,EE);if(I&&P(S,I,w&&h.upperLabelHeight),w)tu(S)&&mi(S,!1),I&&(mi(I,!0),f.setItemGraphicEl(o.dataIndex,I));else{var L=$("content",Qx,u,RE);L&&R(S,L),I&&tu(I)&&mi(I,!1),mi(S,!0),f.setItemGraphicEl(o.dataIndex,S)}return S;function P(Q,j,U){if(j.dataIndex=o.dataIndex,j.seriesIndex=t.seriesIndex,j.setShape({x:0,y:0,width:c,height:v}),g)E(j);else{j.invisible=!1;var tt=o.getVisual("borderColor",!0),ct=A.get("borderColor"),bt=tw(b);bt.fill=tt;var Et=Ud(A);if(Et.fill=ct,U){var ie=c-2*d;Z(bt,Et,tt,ie,_,{x:d,y:0,width:ie,height:_})}else bt.text=Et.text=null;j.setStyle(bt),Vo(j,Et)}Q.add(j)}function R(Q,j){j.dataIndex=o.dataIndex,j.seriesIndex=t.seriesIndex;var U=Math.max(c-2*d,0),tt=Math.max(v-2*d,0);if(j.culling=!0,j.setShape({x:d,y:d,width:U,height:tt}),g)E(j);else{j.invisible=!1;var ct=o.getVisual("color",!0),bt=tw(b);bt.fill=ct;var Et=Ud(A);Z(bt,Et,ct,U,tt),j.setStyle(bt),Vo(j,Et)}Q.add(j)}function E(Q){!Q.invisible&&n.push(Q)}function Z(Q,j,U,tt,ct,bt){var Et=D.get("name"),ie=D.getModel(bt?IE:DE),ol=D.getModel(bt?LE:ME),dr=ie.getShallow("show");Fe(Q,j,ie,ol,{defaultText:dr?Et:null,autoColor:U,isRectText:!0,labelFetcher:t,labelDataIndex:o.dataIndex,labelProp:bt?"upperLabel":"label"}),W(Q,bt,h),W(j,bt,h),bt&&(Q.textRect=rt(bt)),Q.truncate=dr&&ie.get("ellipsis")?{outerWidth:tt,outerHeight:ct,minChar:2}:null}function W(Q,j,U){var tt=Q.text;if(!j&&U.isLeafRoot&&tt!=null){var ct=t.get("drillDownIcon",!0);Q.text=ct?ct+" "+tt:tt}}function $(Q,j,U,tt){var ct=m!=null&&r[Q][m],bt=i[Q];return ct?(r[Q][m]=null,X(bt,ct,Q)):g||(ct=new j({z:NE(U,tt)}),ct.__tmDepth=U,ct.__tmStorageName=Q,K(bt,ct,Q)),e[Q][p]=ct}function X(Q,j,U){var tt=Q[p]={};tt.old=U==="nodeGroup"?j.position.slice():et({},j.shape)}function K(Q,j,U){var tt=Q[p]={},ct=o.parentNode;if(ct&&(!a||a.direction==="drillDown")){var bt=0,Et=0,ie=i.background[ct.getRawIndex()];!a&&ie&&ie.old&&(bt=ie.old.width,Et=ie.old.height),tt.old=U==="nodeGroup"?[0,Et]:{x:bt,y:Et,width:0,height:0}}tt.fadein=U!=="nodeGroup"}}function NE(t,e){var r=t*PE+e;return(r-1)/r}for(var kE=function(){},ew=["treemapZoomToNode","treemapRender","treemapMove"],$d=0;$d<ew.length;$d++)mt({type:ew[$d],update:"updateView"},kE);mt({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=Is(t,n,a);if(o){var s=a.getViewRoot();s&&(t.direction=Gd(s,o.node)?"rollUp":"drillDown"),a.resetViewRoot(o.node)}}});var Ps=M,rw=lt,th=-1,Mt=function(t){var e=t.mappingMethod,r=t.type,a=this.option=rt(t);this.type=r,this.mappingMethod=e,this._normalizeData=VE[e];var i=Es[r];this.applyVisual=i.applyVisual,this.getColorMapper=i.getColorMapper,this._doMap=i._doMap[e],e==="piecewise"?(Zd(a),zE(a)):e==="category"?a.categories?BE(a):Zd(a,!0):(gt(e!=="linear"||a.dataExtent),Zd(a))};Mt.prototype={constructor:Mt,mapValueToVisual:function(t){var e=this._normalizeData(t);return this._doMap(e,t)},getNormalizer:function(){return it(this._normalizeData,this)}};var Es=Mt.visualHandlers={color:{applyVisual:rh("color"),getColorMapper:function(){var t=this.option;return it(t.mappingMethod==="category"?function(e,r){return!r&&(e=this._normalizeData(e)),ah.call(this,e)}:function(e,r,a){var i=!!a;return!r&&(e=this._normalizeData(e)),a=Ao(e,t.parsedVisual,a),i?a:ia(a,"rgba")},this)},_doMap:{linear:function(t){return ia(Ao(t,this.option.parsedVisual),"rgba")},category:ah,piecewise:function(t,e){var r=Xd.call(this,e);return r==null&&(r=ia(Ao(t,this.option.parsedVisual),"rgba")),r},fixed:Ri}},colorHue:eh(function(t,e){return gn(t,e)}),colorSaturation:eh(function(t,e){return gn(t,null,e)}),colorLightness:eh(function(t,e){return gn(t,null,null,e)}),colorAlpha:eh(function(t,e){return gl(t,e)}),opacity:{applyVisual:rh("opacity"),_doMap:Yd([0,1])},liftZ:{applyVisual:rh("liftZ"),_doMap:{linear:Ri,category:Ri,piecewise:Ri,fixed:Ri}},symbol:{applyVisual:function(t,e,r){var a=this.mapValueToVisual(t);if(Lt(a))r("symbol",a);else if(rw(a))for(var i in a)a.hasOwnProperty(i)&&r(i,a[i])},_doMap:{linear:aw,category:ah,piecewise:function(t,e){var r=Xd.call(this,e);return r==null&&(r=aw.call(this,t)),r},fixed:Ri}},symbolSize:{applyVisual:rh("symbolSize"),_doMap:Yd([0,1])}};function zE(t){var e=t.pieceList;t.hasSpecialVisual=!1,M(e,function(r,a){r.originIndex=a,r.visual!=null&&(t.hasSpecialVisual=!0)})}function BE(t){var e=t.categories,r=t.visual,a=t.categoryMap={};if(Ps(e,function(o,s){a[o]=s}),!z(r)){var i=[];lt(r)?Ps(r,function(o,s){var l=a[s];i[l??th]=o}):i[th]=r,r=iw(t,i)}for(var n=e.length-1;n>=0;n--)r[n]==null&&(delete a[e[n]],e.pop())}function Zd(t,e){var r=t.visual,a=[];lt(r)?Ps(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]),iw(t,a)}function eh(t){return{applyVisual:function(e,r,a){e=this.mapValueToVisual(e),a("color",t(r("color"),e))},_doMap:Yd([0,1])}}function aw(t){var e=this.option.visual;return e[Math.round(Nt(t,[0,1],[0,e.length-1],!0))]||{}}function rh(t){return function(e,r,a){a(t,this.mapValueToVisual(e))}}function ah(t){var e=this.option.visual;return e[this.option.loop&&t!==th?t%e.length:t]}function Ri(){return this.option.visual[0]}function Yd(t){return{linear:function(e){return Nt(e,t,this.option.visual,!0)},category:ah,piecewise:function(e,r){var a=Xd.call(this,r);return a==null&&(a=Nt(e,t,this.option.visual,!0)),a},fixed:Ri}}function Xd(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 iw(t,e){return t.visual=e,t.type==="color"&&(t.parsedVisual=V(e,function(r){return Ve(r)})),e}var VE={linear:function(t){return Nt(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 Nt(r,[0,e.length-1],[0,1],!0)},category:function(t){var e=this.option.categories?this.option.categoryMap[t]:t;return e??th},fixed:ce};Mt.listVisualTypes=function(){var t=[];return M(Es,function(e,r){t.push(r)}),t},Mt.addVisualHandler=function(t,e){Es[t]=e},Mt.isValidType=function(t){return Es.hasOwnProperty(t)},Mt.eachVisual=function(t,e,r){lt(t)?M(t,e,r):e.call(r,t)},Mt.mapVisual=function(t,e,r){var a,i=z(t)?[]:lt(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&&Ps(Es,function(a,i){t.hasOwnProperty(i)&&(e[i]=t[i],r=!0)}),r?e:null},Mt.prepareVisualTypes=function(t){if(rw(t)){var e=[];Ps(t,function(r,a){e.push(a)}),t=e}else if(z(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(ih(h[1],t,u[1]))return n}else if(u[1]===1/0){if(ih(h[0],u[0],t))return n}else if(ih(h[0],u[0],t)&&ih(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 ih(t,e,r){return t?e<=r:e<r}var GE=z,qd="itemStyle",HE={seriesType:"treemap",reset:function(t,e,r,a){var i=t.getData().tree,n=i.root,o=t.getModel(qd);if(!n.isRemoved()){var s=V(i.levelModels,function(l){return l?l.get(qd):null});nw(n,{},s,o,t.getViewRoot().getAncestors(),t)}}};function nw(t,e,r,a,i,n){var o=t.getModel(),s=t.getLayout();if(!(!s||s.invisible||!s.isInView)){var l=t.getModel(qd),u=r[t.depth],h=FE(l,e,u,a),f=l.get("borderColor"),c=l.get("borderColorSaturation"),v;c!=null&&(v=ow(h,t),f=WE(c,v)),t.setVisual("borderColor",f);var d=t.viewChildren;if(!d||!d.length)v=ow(h,t),t.setVisual("color",v);else{var g=UE(t,o,s,l,h,d);M(d,function(p,m){if(p.depth>=i.length||p===i[p.depth]){var y=$E(o,h,p,m,g,n);nw(p,y,r,a,i,n)}})}}}function FE(t,e,r,a){var i=et({},e);return M(["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 ow(t){var e=Kd(t,"color");if(e){var r=Kd(t,"colorAlpha"),a=Kd(t,"colorSaturation");return a&&(e=gn(e,null,null,a)),r&&(e=gl(e,r)),e}}function WE(t,e){return e!=null?gn(e,null,null,t):null}function Kd(t,e){var r=t[e];if(r!=null&&r!=="none")return r}function UE(t,e,r,a,i,n){if(!(!n||!n.length)){var o=jd(e,"color")||i.color!=null&&i.color!=="none"&&(jd(e,"colorAlpha")||jd(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 jd(t,e){var r=t.get(e);return GE(r)&&r.length?{name:e,range:r}:null}function $E(t,e,r,a,i,n){var o=et({},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 Rs=Math.max,nh=Math.min,sw=Ut,Qd=M,lw=["itemStyle","borderWidth"],ZE=["itemStyle","gapWidth"],YE=["upperLabel","show"],XE=["upperLabel","height"],qE={seriesType:"treemap",reset:function(t,e,r,a){var i=r.getWidth(),n=r.getHeight(),o=t.option,s=qt(t.getBoxLayoutParams(),{width:r.getWidth(),height:r.getHeight()}),l=o.size||[],u=H(sw(s.width,l[0]),i),h=H(sw(s.height,l[1]),n),f=a&&a.type,c=["treemapZoomToNode","treemapRootToNode"],v=Is(a,c,t),d=f==="treemapRender"||f==="treemapMove"?a.rootRect:null,g=t.getViewRoot(),p=Xx(g);if(f!=="treemapMove"){var m=f==="treemapZoomToNode"?eR(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 w={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};g.setLayout(w),uw(g,_,!1,0);var w=g.getLayout();Qd(p,function(A,S){var D=(p[S+1]||g).getValue();A.setLayout(et({dataExtent:[D,D],borderWidth:0,upperHeight:0},w))})}var b=t.getData().tree.root;b.setLayout(rR(s,d,v),!0),t.setLayoutInfo(s),fw(b,new vt(-s.x,-s.y,i,n),p,g,0)}};function uw(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(lw),l=v.get(ZE)/2,u=cw(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=Rs(i-2*f,0),n=Rs(n-f-c,0);var d=i*n,g=KE(t,v,d,e,r,a);if(!!g.length){var p={x:f,y:c,width:i,height:n},m=nh(i,n),y=1/0,_=[];_.area=0;for(var w=0,b=g.length;w<b;){var A=g[w];_.push(A),_.area+=A.getLayout().area;var S=tR(_,m,e.squareRatio);S<=y?(w++,y=S):(_.area-=_.pop().getLayout().area,hw(_,m,p,l,!1),m=nh(p.width,p.height),_.length=_.area=0,y=1/0)}if(_.length&&hw(_,m,p,l,!0),!r){var D=v.get("childrenVisibleMin");D!=null&&d<D&&(r=!0)}for(var w=0,b=g.length;w<b;w++)uw(g[w],e,r,a+1)}}}function KE(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=ee(o,function(v){return!v.isRemoved()}),QE(o,s);var u=JE(e,o,s);if(u.sum===0)return t.viewChildren=[];if(u.sum=jE(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 jE(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 QE(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 JE(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];Qd(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 tR(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?Rs(u*a/l,l/(u*i)):1/0}function hw(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]]=Rs(h-2*a,0),m=r[s[n]]+r[l[n]]-u,y=f===c-1||m<g?m:g,_=d[l[n]]=Rs(y-2*a,0);d[s[o]]=r[s[o]]+nh(a,p/2),d[s[n]]=u+nh(a,_/2),u+=y,v.setLayout(d,!0)}r[s[o]]+=h,r[l[o]]-=h}function eR(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(lw),m=Math.max(p,cw(g,p));u+=4*p*p+(3*p+m)*Math.pow(u,.5),u>ev&&(u=ev),n=s}u<l&&(u=l);var y=Math.pow(u/l,.5);return[a*y,i*y]}function rR(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 fw(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 vt(e.x-n.x,e.y-n.y,e.width,e.height);Qd(t.viewChildren||[],function(u){fw(u,l,r,a,i+1)})}}function cw(t){return t.get(YE)?t.get(XE):0}Rt(HE),Gt(qE);function qn(t){return"_EC_"+t}var Os=function(t){this._directed=t||!1,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this.data,this.edgeData},qe=Os.prototype;qe.type="graph",qe.isDirected=function(){return this._directed},qe.addNode=function(t,e){t=t==null?""+e:""+t;var r=this._nodesMap;if(r[qn(t)]){T&&console.error("Graph nodes have duplicate name or id");return}var a=new Mr(t,e);return a.hostGraph=this,this.nodes.push(a),r[qn(t)]=a,a},qe.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},qe.getNodeById=function(t){return this._nodesMap[qn(t)]},qe.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]),Mr.isInstance(t)||(t=a[qn(t)]),Mr.isInstance(e)||(e=a[qn(e)]),!(!t||!e)){var n=t.id+"-"+e.id;if(!i[n]){var o=new Ns(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}}},qe.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},qe.getEdge=function(t,e){Mr.isInstance(t)&&(t=t.id),Mr.isInstance(e)&&(e=e.id);var r=this._edgesMap;return this._directed?r[t+"-"+e]:r[t+"-"+e]||r[e+"-"+t]},qe.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)},qe.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)},qe.breadthFirstTraverse=function(t,e,r,a){if(Mr.isInstance(e)||(e=this._nodesMap[qn(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}}}},qe.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},qe.clone=function(){for(var t=new Os(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 Mr(t,e){this.id=t??"",this.inEdges=[],this.outEdges=[],this.edges=[],this.hostGraph,this.dataIndex=e??-1}Mr.prototype={constructor:Mr,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 Ns(t,e,r){this.node1=t,this.node2=e,this.dataIndex=r??-1}Ns.prototype.getModel=function(t){if(!(this.dataIndex<0)){var e=this.hostGraph,r=e.edgeData.getItemModel(this.dataIndex);return r.getModel(t)}};var vw=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)}}};Dt(Mr,vw("hostGraph","data")),Dt(Ns,vw("hostGraph","edgeData")),Os.Node=Mr,Os.Edge=Ns,Nl(Mr),Nl(Ns);var dw=function(t,e,r,a,i){for(var n=new Os(a),o=0;o<t.length;o++)n.addNode(Ut(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(Ut(h.id,f+" > "+c)),u++)}var v=r.get("coordinateSystem"),d;if(v==="cartesian2d"||v==="polar")d=ca(t,r);else{var g=_e.get(v),p=g&&g.type!=="view"?g.dimensions||[]:[];yt(p,"value")<0&&p.concat(["value"]);var m=En(t,{coordDimensions:p});d=new fe(m,r),d.initData(t)}var y=new fe(["value"],r);return y.initData(l,s),i&&i(d,y),Hx({mainData:d,struct:n,structAttr:"graph",datas:{node:d,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),n.update(),n},ks=Mu({type:"series.graph",init:function(t){ks.superApply(this,"init",arguments);var e=this;function r(){return e._categoriesData}this.legendVisualProvider=new ws(r,r),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeOption:function(t){ks.superApply(this,"mergeOption",arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeDefaultAndTheme:function(t){ks.superApply(this,"mergeDefaultAndTheme",arguments),fi(t,["edgeLabel"],["show"])},getInitialData:function(t,e){var r=t.edges||t.links||[],a=t.data||t.nodes||[],i=this;if(a&&r)return dw(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 _t({label:l.option},l.parentModel,e),h=i.getModel("emphasis.edgeLabel"),f=new _t({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=kt(l.join(" > ")),i.value&&(l+=" : "+kt(i.value)),l}else return ks.superApply(this,"formatTooltip",arguments)},_updateCategoriesData:function(){var t=V(this.option.categories||[],function(r){return r.value!=null?r:et({value:0},r)}),e=new fe(["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 ks.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}}}}),gw=ye.prototype,Jd=Xl.prototype;function tg(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}var aR=nr({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[tg(e)?"_buildPathLine":"_buildPathCurve"](t,e)},_buildPathLine:gw.buildPath,_buildPathCurve:Jd.buildPath,pointAt:function(t){return this[tg(this.shape)?"_pointAtLine":"_pointAtCurve"](t)},_pointAtLine:gw.pointAt,_pointAtCurve:Jd.pointAt,tangentAt:function(t){var e=this.shape,r=tg(e)?[e.x2-e.x1,e.y2-e.y1]:this._tangentAtCurve(t);return ln(r,r)},_tangentAtCurve:Jd.tangentAt}),eg=["fromSymbol","toSymbol"];function pw(t){return"_"+t+"Type"}function mw(t,e,r){var a=e.getItemVisual(r,"color"),i=e.getItemVisual(r,t),n=e.getItemVisual(r,t+"Size");if(!(!i||i==="none")){z(n)||(n=[n,n]);var o=Ye(i,-n[0]/2,-n[1]/2,n[0],n[1],a);return o.name=t,o}}function iR(t){var e=new aR({name:"line",subPixelOptimize:!0});return rg(e.shape,t),e}function rg(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 nR(){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=Jr([],u,l);if(ln(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(_),w=[f[1],-f[0]],b=o.pointAt(_);w[1]>0&&(w[0]=-w[0],w[1]=-w[1]);var A=f[0]<0?-1:1;if(a.__position!=="start"&&a.__position!=="end"){var S=-Math.atan2(f[1],f[0]);u[0]<l[0]&&(S=Math.PI+S),a.attr("rotation",S)}var D;switch(a.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":D=-y,d="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":D=y,d="top";break;default:D=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*A+l[0],l[1]+D],v=f[0]<0?"right":"left",g=[-m*A,-D];break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":c=[b[0],b[1]+D],v="center",g=[0,-D];break;case"insideEndTop":case"insideEnd":case"insideEndBottom":c=[-m*A+u[0],u[1]+D],v=f[0]>=0?"right":"left",g=[m*A,-D];break}a.attr({style:{textVerticalAlign:a.__verticalAlign||d,textAlign:a.__textAlign||v},position:c,scale:[i,i],origin:g})}}}}function zs(t,e,r){q.call(this),this._createLine(t,e,r)}var qa=zs.prototype;qa.beforeUpdate=nR,qa._createLine=function(t,e,r){var a=t.hostModel,i=t.getItemLayout(e),n=iR(i);n.shape.percent=0,Se(n,{shape:{percent:1}},a,e),this.add(n);var o=new dt({name:"label",lineLabelOriginalOpacity:1});this.add(o),M(eg,function(s){var l=mw(s,t,e);this.add(l),this[pw(s)]=t.getItemVisual(e,s)},this),this._updateCommonStl(t,e,r)},qa.updateData=function(t,e,r){var a=t.hostModel,i=this.childOfName("line"),n=t.getItemLayout(e),o={shape:{}};rg(o.shape,n),ft(i,o,a,e),M(eg,function(s){var l=t.getItemVisual(e,s),u=pw(s);if(this[u]!==l){this.remove(this.childOfName(s));var h=mw(s,t,e);this.add(h)}this[u]=l},this),this._updateCommonStl(t,e,r)},qa._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=ni(t.getItemVisual(e,"opacity"),n.opacity,1);i.useStyle(J({strokeNoScale:!0,fill:"none",stroke:h,opacity:f},n)),i.hoverStyle=o,M(eg,function(A){var S=this.childOfName(A);S&&(S.setColor(h),S.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)?re(m):m}var y=c?p:null,_=v?Xt(a.getFormattedLabel(e,"emphasis",t.dataType),p):null,w=d.style;if(y!=null||_!=null){$t(d.style,s,{text:y},{autoColor:g}),d.__textAlign=w.textAlign,d.__verticalAlign=w.textVerticalAlign,d.__position=s.get("position")||"middle";var b=s.get("distance");z(b)||(b=[b,b]),d.__labelDistance=b}_!=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,Ot(this)},qa.highlight=function(){this.trigger("emphasis")},qa.downplay=function(){this.trigger("normal")},qa.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},qa.setLinePoints=function(t){var e=this.childOfName("line");rg(e.shape,t),e.dirty()},It(zs,q);function oh(t){this._ctor=t||zs,this.group=new q}var Oi=oh.prototype;Oi.isPersistent=function(){return!0},Oi.updateData=function(t){var e=this,r=e.group,a=e._lineData;e._lineData=t,a||r.removeAll();var i=yw(t);t.diff(a).add(function(n){oR(e,t,n,i)}).update(function(n,o){sR(e,a,t,o,n,i)}).remove(function(n){r.remove(a.getItemGraphicEl(n))}).execute()};function oR(t,e,r,a){var i=e.getItemLayout(r);if(!!ag(i)){var n=new t._ctor(e,r,a);e.setItemGraphicEl(r,n),t.group.add(n)}}function sR(t,e,r,a,i,n){var o=e.getItemGraphicEl(a);if(!ag(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)}Oi.updateLayout=function(){var t=this._lineData;!t||t.eachItemGraphicEl(function(e,r){e.updateLayout(t,r)},this)},Oi.incrementalPrepareUpdate=function(t){this._seriesScope=yw(t),this._lineData=null,this.group.removeAll()};function lR(t){return t.animators&&t.animators.length>0}Oi.incrementalUpdate=function(t,e){function r(o){!o.isGroup&&!lR(o)&&(o.incremental=o.useHoverLayer=!0)}for(var a=t.start;a<t.end;a++){var i=e.getItemLayout(a);if(ag(i)){var n=new this._ctor(e,a,this._seriesScope);n.traverse(r),this.group.add(n),e.setItemGraphicEl(a,n)}}};function yw(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")}}Oi.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},Oi._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};function _w(t){return isNaN(t[0])||isNaN(t[1])}function ag(t){return!_w(t[0])&&!_w(t[1])}function Bs(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 Vs(t){var e=t.getVisual("symbolSize");return e instanceof Array&&(e=(e[0]+e[1])/2),+e}var ig=[],ng=[],og=[],Kn=be,sg=ba,xw=Math.abs;function ww(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){ig[0]=Kn(a[0],i[0],n[0],h),ig[1]=Kn(a[1],i[1],n[1],h);var f=xw(sg(ig,e)-l);f<o&&(o=f,s=h)}for(var c=0;c<32;c++){var v=s+u;ng[0]=Kn(a[0],i[0],n[0],s),ng[1]=Kn(a[1],i[1],n[1],s),og[0]=Kn(a[0],i[0],n[0],v),og[1]=Kn(a[1],i[1],n[1],v);var f=sg(ng,e)-l;if(xw(f)<.01)break;var d=sg(og,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 lg=function(t,e){var r=[],a=kc,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=[mr(u[0]),mr(u[1])],u[2]&&u.__original.push(mr(u[2])));var c=u.__original;if(u[2]!=null){if(ge(i[0],c[0]),ge(i[1],c[2]),ge(i[2],c[1]),h&&h!=="none"){var v=Vs(s.node1),d=ww(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=Vs(s.node2),d=ww(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]}ge(u[0],i[0]),ge(u[1],i[2]),ge(u[2],i[1])}else{if(ge(n[0],c[0]),ge(n[1],c[1]),Jr(o,n[1],n[0]),ln(o,o),h&&h!=="none"){var v=Vs(s.node1);mo(n[0],n[0],o,v*e)}if(f&&f!=="none"){var v=Vs(s.node2);mo(n[1],n[1],o,-v*e)}ge(u[0],n[0]),ge(u[1],n[1])}})},jn="__focusNodeAdjacency",Qn="__unfocusNodeAdjacency",Ni=["itemStyle","opacity"],sh=["lineStyle","opacity"];function bw(t,e){var r=t.getVisual("opacity");return r??t.getModel().get(e)}function lh(t,e,r){var a=t.getGraphicEl(),i=bw(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 ki(t,e){var r=bw(t,e),a=t.getGraphicEl();a.traverse(function(i){!i.isGroup&&i.setStyle("opacity",r)}),a.highlight&&a.highlight()}ke({type:"graph",init:function(t,e){var r=new Bn,a=new oh,i=this.group;this._controller=new Yn(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):ft(s,l,t)}lg(t.getGraph(),Bs(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[jn]&&p.off("mouseover",p[jn]),p[Qn]&&p.off("mouseout",p[Qn]),y.get("focusNodeAdjacency")&&(p.on("mouseover",p[jn]=function(){a._clearTimer(),r.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,dataIndex:p.dataIndex})}),p.on("mouseout",p[Qn]=function(){a._dispatchUnfocus(r)}))},this),u.graph.eachEdge(function(p){var m=p.getGraphicEl();m[jn]&&m.off("mouseover",m[jn]),m[Qn]&&m.off("mouseout",m[Qn]),p.getModel().get("focusNodeAdjacency")&&(m.on("mouseover",m[jn]=function(){a._clearTimer(),r.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,edgeDataIndex:p.dataIndex})}),m.on("mouseout",m[Qn]=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,w=p.getSymbolPath();if(v){var b=u.getItemLayout(m),A=Math.atan2(b[1]-g,b[0]-d);A<0&&(A=Math.PI*2+A);var S=b[0]<d;S&&(A=A-Math.PI);var D=S?"left":"right";qc(w,{textRotation:-A,textPosition:D,textOrigin:"center"},{textPosition:D})}else qc(w,{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){lh(h,Ni,.1)}),n.eachEdge(function(h){lh(h,sh,.1)}),l&&(ki(l,Ni),M(l.edges,function(h){h.dataIndex<0||(ki(h,sh),ki(h.node1,Ni),ki(h.node2,Ni))})),u&&(ki(u,sh),ki(u.node1,Ni),ki(u.node2,Ni)))},unfocusNodeAdjacency:function(t,e,r,a){var i=t.getData().graph;i.eachNode(function(n){lh(n,Ni)}),i.eachEdge(function(n){lh(n,sh)})},_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)&&!Ku(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){Ld(i,o.dx,o.dy),r.dispatchAction({seriesId:t.id,type:"graphRoam",dx:o.dx,dy:o.dy})}).on("zoom",function(o){Pd(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(),lg(t.getGraph(),Bs(t)),this._lineDraw.updateLayout()},this)},_updateNodeAndLinkScale:function(){var t=this._model,e=t.getData(),r=Bs(t),a=[r,r];e.eachItemGraphicEl(function(i,n){i.attr("scale",a)})},updateLayout:function(t){lg(t.getGraph(),Bs(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()}}),mt({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},function(){}),mt({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},function(){});var uR={type:"graphRoam",event:"graphRoam",update:"none"};mt(uR,function(t,e){e.eachComponent({mainType:"series",query:t},function(r){var a=r.coordinateSystem,i=Rd(a,t);r.setCenter&&r.setCenter(i.center),r.setZoom&&r.setZoom(i.zoom)})});var hR=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)},fR=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 uh(t){return t instanceof Array||(t=[t,t]),t}var cR=function(t){t.eachSeriesByType("graph",function(e){var r=e.getGraph(),a=e.getEdgeData(),i=uh(e.get("edgeSymbol")),n=uh(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=uh(u.getShallow("symbol",!0)),c=uh(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 Sw(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")])}),Aw(r)}}function Aw(t){t.eachEdge(function(e){var r=e.getModel().get("lineStyle.curveness")||0,a=mr(e.node1.getLayout()),i=mr(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 vR=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=[];M(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])}Aw(n.graph)}else(!a||a==="none")&&Sw(r)})},Tw=Math.PI,ug=[];function Cw(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&&(dR[e](t,r,n,i,l,o,s,u),n.eachEdge(function(h){var f=h.getModel().get("lineStyle.curveness")||0,c=mr(h.node1.getLayout()),v=mr(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 dR={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;ug.length=s;var u=Bs(t);r.eachNode(function(c){var v=Vs(c);isNaN(v)&&(v=2),v<0&&(v=0),v*=u;var d=Math.asin(v/2/i);isNaN(d)&&(d=Tw/2),ug[c.dataIndex]=d,l+=d*2});var h=(2*Tw-l)/s/2,f=0;r.eachNode(function(c){var v=h+ug[c.dataIndex];f+=v,c.setLayout([i*Math.cos(f)+n,i*Math.sin(f)+o]),f+=v})}},gR=function(t){t.eachSeriesByType("graph",function(e){e.get("layout")==="circular"&&Cw(e,"symbolSize")})},Jn=mo;function pR(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=wa(i*(Math.random()-.5)+o[0],n*(Math.random()-.5)+o[1])),u.pp=mr(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;Jr(v,y.p,m.p);var _=yo(v)-p.d,w=y.w/(m.w+y.w);isNaN(w)&&(w=0),ln(v,v),!m.fixed&&Jn(m.p,m.p,v,w*_*f),!y.fixed&&Jn(y.p,y.p,v,-(1-w)*_*f)}}for(var g=0;g<d;g++){var b=t[g];b.fixed||(Jr(v,o,b.p),Jn(b.p,b.p,v,s*f))}for(var g=0;g<d;g++)for(var m=t[g],A=g+1;A<d;A++){var y=t[A];Jr(v,y.p,m.p);var _=yo(v);_===0&&(fm(v,Math.random()-.5,Math.random()-.5),_=1);var S=(m.rep+y.rep)/_/_;!m.fixed&&Jn(m.pp,m.pp,v,S),!y.fixed&&Jn(y.pp,y.pp,v,-S)}for(var D=[],g=0;g<d;g++){var b=t[g];b.fixed||(Jr(D,b.p,b.pp),Jn(b.p,b.p,D,f),ge(b.pp,b.p))}f=f*.992,c&&c(t,e,f<.01)}}}var mR=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 w=n.getId(_);n.setItemLayout(_,a[w]||[NaN,NaN])}):!l||l==="none"?Sw(e):l==="circular"&&Cw(e,"value");var u=n.getDataExtent("value"),h=o.getDataExtent("value"),f=s.get("repulsion"),c=s.get("edgeLength");z(f)||(f=[f,f]),z(c)||(c=[c,c]),c=[c[1],c[0]];var v=n.mapArray("value",function(_,w){var b=n.getItemLayout(w),A=Nt(_,u,f);return isNaN(A)&&(A=(f[0]+f[1])/2),{w:A,rep:A,fixed:n.getItemModel(w).get("fixed"),p:!b||isNaN(b[0])||isNaN(b[1])?null:b}}),d=o.mapArray("value",function(_,w){var b=i.getEdgeByIndex(w),A=Nt(_,h,c);isNaN(A)&&(A=(c[0]+c[1])/2);var S=b.getModel();return{n1:v[b.node1.dataIndex],n2:v[b.node2.dataIndex],d:A,curveness:S.get("lineStyle.curveness")||0,ignoreForceLayout:S.get("ignoreForceLayout")}}),r=e.coordinateSystem,g=r.getBoundingRect(),p=pR(v,d,{rect:g,gravity:s.get("gravity"),friction:s.get("friction")}),m=p.step;p.step=function(_){for(var w=0,b=v.length;w<b;w++)v[w].fixed&&ge(v[w].p,i.getNodeByIndex(w).getLayout());m(function(A,S,D){for(var I=0,L=A.length;I<L;I++)A[I].fixed||i.getNodeByIndex(I).setLayout(A[I].p),a[n.getId(I)]=A[I].p;for(var I=0,L=S.length;I<L;I++){var P=S[I],R=i.getEdgeByIndex(I),E=P.n1.p,Z=P.n2.p,W=R.getLayout();W=W?W.slice():[],W[0]=W[0]||[],W[1]=W[1]||[],ge(W[0],E),ge(W[1],Z),+P.curveness&&(W[2]=[(E[0]+Z[0])/2-(E[1]-Z[1])*P.curveness,(E[1]+Z[1])/2-(Z[0]-E[0])*P.curveness]),R.setLayout(W)}_&&_(D)})},e.forceLayout=p,e.preservedPoints=a,p.step()}else e.forceLayout=null})};function yR(t,e,r){var a=t.getBoxLayoutParams();return a.aspect=r,qt(a,{width:e.getWidth(),height:e.getHeight()})}var _R=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=[];Po(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=yR(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 Xa;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};$e(hR),Rt(Ii("graph","circle",null)),Rt(fR),Rt(cR),Gt(vR),Gt(Wr.VISUAL.POST_CHART_LAYOUT,gR),Gt(mR),Fv("graphView",{create:_R});var $5=Vt.extend({type:"series.gauge",getInitialData:function(t,e){return Un(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}}}),xR=pt.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 wR(t,e){var r=t.get("center"),a=e.getWidth(),i=e.getHeight(),n=Math.min(a,i),o=H(r[0],e.getWidth()),s=H(r[1],e.getHeight()),l=H(t.get("radius"),n/2);return{cx:o,cy:s,r:l}}function Dw(t,e){return e&&(typeof e=="string"?t=e.replace("{value}",t??""):typeof e=="function"&&(t=e(t))),t}var bR=Math.PI*2,Z5=ue.extend({type:"gauge",render:function(t,e,r){this.group.removeAll();var a=t.get("axisLine.lineStyle.color"),i=wR(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)%bR,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 Ar({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(w){if(w<=0)return a[0][1];for(var b=0;b<a.length;b++)if(a[b][0]>=w&&(b===0?0:a[b-1][0])<w)return a[b][1];return a[b-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"),_=H(d.get("length"),f),w=H(g.get("length"),f),b=n,A=(o-n)/m,S=A/y,D=d.getModel("lineStyle").getLineStyle(),I=g.getModel("lineStyle").getLineStyle(),L=0;L<=m;L++){var P=Math.cos(b),R=Math.sin(b);if(d.get("show")){var E=new ye({shape:{x1:P*f+u,y1:R*f+h,x2:P*(f-_)+u,y2:R*(f-_)+h},style:D,silent:!0});D.stroke==="auto"&&E.setStyle({stroke:a(L/m)}),l.add(E)}if(p.get("show")){var Z=Dw(re(L/m*(v-c)+c),p.get("formatter")),W=p.get("distance"),$=a(L/m);l.add(new dt({style:$t({},p,{text:Z,x:P*(f-_-W)+u,y:R*(f-_-W)+h,textVerticalAlign:R<-.4?"top":R>.4?"bottom":"middle",textAlign:P<-.4?"left":P>.4?"right":"center"},{autoColor:$}),silent:!0}))}if(g.get("show")&&L!==m){for(var X=0;X<=y;X++){var P=Math.cos(b),R=Math.sin(b),K=new ye({shape:{x1:P*f+u,y1:R*f+h,x2:P*(f-w)+u,y2:R*(f-w)+h},silent:!0,style:I});I.stroke==="auto"&&K.setStyle({stroke:a((L+X/y)/m)}),l.add(K),b+=S}b-=S}else b+=A}},_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 xR({shape:{angle:n}});Se(g,{shape:{angle:Nt(c.get(v,d),h,f,!0)}},t),l.add(g),c.setItemGraphicEl(d,g)}).update(function(d,g){var p=u.getItemGraphicEl(g);ft(p,{shape:{angle:Nt(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:H(m.get("width"),i.r),r:H(m.get("length"),i.r)}),d.useStyle(p.getModel("itemStyle").getItemStyle()),d.style.fill==="auto"&&d.setStyle("fill",a(Nt(c.get(v,g),h,[0,1],!0))),Ot(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+H(l[0],i.r),h=i.cy+H(l[1],i.r),f=+t.get("min"),c=+t.get("max"),v=t.getData().get(o,0),d=a(Nt(v,[f,c],[0,1],!0));this.group.add(new dt({silent:!0,style:$t({},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+H(l[0],i.r),h=i.cy+H(l[1],i.r),f=H(n.get("width"),i.r),c=H(n.get("height"),i.r),v=t.getData(),d=v.get(v.mapDimension("value"),0),g=a(Nt(d,[o,s],[0,1],!0));this.group.add(new dt({silent:!0,style:$t({},n,{x:u,y:h,text:Dw(d,n.get("formatter")),textWidth:isNaN(f)?null:f,textHeight:isNaN(c)?null:c,textAlign:"center",textVerticalAlign:"middle"},{autoColor:g,forceRich:!0})}))}}}),Mw=Mu({type:"series.funnel",init:function(t){Mw.superApply(this,"init",arguments),this.legendVisualProvider=new ws(it(this.getData,this),it(this.getRawData,this)),this._defaultLabelLine(t)},getInitialData:function(t,e){return Un(this,{coordDimensions:["value"],encodeDefaulter:ot(vv,this)})},_defaultLabelLine:function(t){fi(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=Mw.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 hg(t,e){q.call(this);var r=new Ge,a=new ir,i=new dt;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 Iw=hg.prototype,SR=["itemStyle","opacity"];Iw.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(SR);s=s??1,a.useStyle({}),r?(a.setShape({points:o.points}),a.setStyle({opacity:0}),Se(a,{style:{opacity:s}},i,e)):ft(a,{style:{opacity:s},shape:{points:o.points}},i,e);var l=n.getModel("itemStyle"),u=t.getItemVisual(e,"color");a.setStyle(J({lineJoin:"round",fill:u},l.getItemStyle(["opacity"]))),a.hoverStyle=l.getModel("emphasis").getItemStyle(),this._updateLabel(t,e),Ot(this)},Iw._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");ft(r,{shape:{points:s.linePoints||s.linePoints}},i,e),ft(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");Fe(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()},It(hg,q);var Y5=ue.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 hg(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 AR(t,e){return qt(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function TR(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 CR(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 DR=function(t,e,r){t.eachSeriesByType("funnel",function(a){var i=a.getData(),n=i.mapDimension("value"),o=a.get("sort"),s=AR(a,e),l=TR(i,o),u=[H(a.get("minSize"),s.width),H(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(I,L){var P=i.get(n,I)||0,R=Nt(P,[f,c],u,!0),E;switch(v){case"left":E=s.x;break;case"center":E=s.x+(s.width-R)/2;break;case"right":E=s.x+s.width-R;break}return[[E,L],[E+R,L]]};o==="ascending"&&(g=-g,d=-d,p+=s.height,l=l.reverse());for(var y=0;y<l.length;y++){var _=l[y],w=l[y+1],b=i.getItemModel(_),A=b.get("itemStyle.height");A==null?A=g:(A=H(A,s.height),o==="ascending"&&(A=-A));var S=m(_,p),D=m(w,p+A);p+=A+d,i.setItemLayout(_,{points:S.concat(D.slice().reverse())})}CR(i)})};Rt(Zu("funnel")),Gt(DR),$e(bs("funnel"));var MR=function(t){IR(t),LR(t)};function IR(t){if(!t.parallel){var e=!1;M(t.series,function(r){r&&r.type==="parallel"&&(e=!0)}),e&&(t.parallel=[{}])}}function LR(t){var e=me(t.parallelAxis);M(e,function(r){if(!!lt(r)){var a=r.parallelIndex||0,i=me(t.parallel)[a];i&&i.parallelAxisDefault&&ut(r,i.parallelAxisDefault,!1)}})}var hh=function(t,e,r,a,i){Qt.call(this,t,e,r),this.type=a||"value",this.axisIndex=i};hh.prototype={constructor:hh,model:null,isHorizontal:function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"}},It(hh,Qt);var zi=function(t,e,r,a,i,n){t=t||0;var o=r[1]-r[0];if(i!=null&&(i=to(i,[0,o])),n!=null&&(n=Math.max(n,i??0)),a==="all"){var s=Math.abs(e[1]-e[0]);s=to(s,[0,o]),i=n=to(s,[i,n]),a=0}e[0]=to(e[0],r),e[1]=to(e[1],r);var l=fg(e,a);e[a]+=t;var u=i||0,h=r.slice();l.sign<0?h[0]+=u:h[1]-=u,e[a]=to(e[a],h);var f=fg(e,a);i!=null&&(f.sign!==l.sign||f.span<i)&&(e[1-a]=e[a]+l.sign*i);var f=fg(e,a);return n!=null&&f.span>n&&(e[1-a]=e[a]+f.sign*n),e};function fg(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 to(t,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,t))}var cg=M,Lw=Math.min,Pw=Math.max,Ew=Math.floor,PR=Math.ceil,Rw=re,ER=Math.PI;function vg(t,e,r){this._axesMap=ht(),this._axesLayout={},this.dimensions=t.dimensions,this._rect,this._model=t,this._init(t,e,r)}vg.prototype={type:"parallel",constructor:vg,_init:function(t,e,r){var a=t.dimensions,i=t.parallelAxisIndex;cg(a,function(n,o){var s=i[o],l=e.getComponent("parallelAxis",s),u=this._axesMap.set(n,new hh(n,zn(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();cg(this.dimensions,function(i){var n=this._axesMap.get(i);n.scale.unionExtentFromData(a,a.mapDimension(i)),Fa(n.scale,n.model)},this)}},this)},resize:function(t,e){this._rect=qt(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=fh(t.get("axisExpandWidth"),s),h=fh(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=fh(c[1]-c[0],s),c[1]=c[0]+v;else{v=fh(u*(h-1),s);var d=t.get("axisExpandCenter")||Ew(l/2);c=[u*d-v/2],c[1]=c[0]+v}var g=(o-v)/(l-h);g<3&&(g=0);var p=[Ew(Rw(c[0]/u,1))+1,PR(Rw(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])}),cg(r,function(n,o){var s=(a.axisExpandable?OR:RR)(o,a),l={horizontal:{x:s.position,y:a.axisLength},vertical:{x:0,y:s.position}},u={horizontal:ER/2,vertical:0},h=[l[i].x+t.x,l[i].y+t.y],f=u[i],c=Ie();aa(c,c,f),yr(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=[];M(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 Hr([t,0],r.transform)},getAxisLayout:function(t){return rt(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?zi(s,a,n,"all"):l="none";else{var i=a[1]-a[0],c=n[1]*o/i;a=[Pw(0,c-i/2)],a[1]=Lw(n[1],a[0]+i),a[0]=a[1]-i}return{axisExpandWindow:a,behavior:l}}};function fh(t,e){return Lw(Pw(t,e[0]),e[1])}function RR(t,e){var r=e.layoutLength/(e.axisCount-1);return{position:r*t,axisNameAvailableWidth:r,axisLabelShow:!0}}function OR(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 NR(t,e){var r=[];return t.eachComponent("parallel",function(a,i){var n=new vg(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}_e.register("parallel",{create:NR});var Ow=wt.extend({type:"baseParallelAxis",axis:null,activeIntervals:[],getAreaSelectStyle:function(){return _n([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},setActiveIntervals:function(t){var e=this.activeIntervals=rt(t);if(e)for(var r=e.length-1;r>=0;r--)_i(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"}}),kR={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};ut(Ow.prototype,Di);function zR(t,e){return e.type||(e.data?"category":"value")}Gn("parallel",Ow,zR,kR),wt.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(){wt.prototype.init.apply(this,arguments),this.mergeOption({})},mergeOption:function(t){var e=this.option;t&&ut(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){M(["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=ee(this.dependentModels.parallelAxis,function(a){return(a.get("parallelIndex")||0)===this.componentIndex},this);M(r,function(a){t.push("dim"+a.get("dim")),e.push(a.componentIndex)})}});var BR={type:"axisAreaSelect",event:"axisAreaSelected"};mt(BR,function(t,e){e.eachComponent({mainType:"parallelAxis",query:t},function(r){r.axis.model.setActiveIntervals(t.intervals)})}),mt("parallelAxisExpand",function(t,e){e.eachComponent({mainType:"parallel",query:t},function(r){r.setAxisExpand(t)})});var Ka=ot,Xr=M,VR=V,Gs=Math.min,eo=Math.max,GR=Math.pow,HR=1e4,FR=6,WR=6,Nw="globalPan",UR={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},$R={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},kw={brushStyle:{lineWidth:2,stroke:"rgba(0,0,0,0.3)",fill:"rgba(0,0,0,0.1)"},transformable:!0,brushMode:"single",removeOnClick:!1},ZR=0;function ro(t){T&>(t),le.call(this),this._zr=t,this.group=new q,this._brushType,this._brushOption,this._panels,this._track=[],this._dragging,this._covers=[],this._creatingCover,this._creatingPanel,this._enableGlobalPan,T&&this._mounted,this._uid="brushController_"+ZR++,this._handlers={},Xr(rO,function(e,r){this._handlers[r]=it(e,this)},this)}ro.prototype={constructor:ro,enableBrush:function(t){return T&>(this._mounted),this._brushType&&XR(this),t.brushType&&YR(this,t),this},setPanels:function(t){if(t&&t.length){var e=this._panels={};M(t,function(r){e[r.panelId]=rt(r)})}else this._panels=null;return this},mount:function(t){t=t||{},T&&(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){Xr(this._covers,t,e)},updateCovers:function(t){T&>(this._mounted),t=V(t,function(h){return ut(rt(kw),h,!0)});var e="\0-brush-index-",r=this._covers,a=this._covers=[],i=this,n=this._creatingCover;return new ha(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]):Bw(i,zw(i,c));dg(i,v)}}function u(h){r[h]!==n&&i.group.remove(r[h])}},unmount:function(){if(!(T&&!this._mounted))return this.enableBrush(!1),mg(this),this._zr.remove(this.group),T&&(this._mounted=!1),this},dispose:function(){this.unmount(),this.off()}},Dt(ro,le);function YR(t,e){var r=t._zr;t._enableGlobalPan||FP(r,Nw,t._uid),qR(r,t._handlers),t._brushType=e.brushType,t._brushOption=ut(rt(kw),e,!0)}function XR(t){var e=t._zr;WP(e,Nw,t._uid),KR(e,t._handlers),t._brushType=t._brushOption=null}function qR(t,e){Xr(e,function(r,a){t.on(a,r)})}function KR(t,e){Xr(e,function(r,a){t.off(a,r)})}function zw(t,e){var r=ch[e.brushType].createCover(t,e);return r.__brushOption=e,Gw(r,e),t.group.add(r),r}function Bw(t,e){var r=gg(e);return r.endCreating&&(r.endCreating(t,e),Gw(e,e.__brushOption)),e}function Vw(t,e){var r=e.__brushOption;gg(e).updateCoverShape(t,e,r.range,r)}function Gw(t,e){var r=e.z;r==null&&(r=HR),t.traverse(function(a){a.z=r,a.z2=r})}function dg(t,e){gg(e).updateCommon(t,e),Vw(t,e)}function gg(t){return ch[t.__brushOption.brushType]}function pg(t,e,r){var a=t._panels;if(!a)return!0;var i,n=t._transform;return Xr(a,function(o){o.isTargetByCursor(e,r,n)&&(i=o)}),i}function Hw(t,e){var r=t._panels;if(!r)return!0;var a=e.__brushOption.panelId;return a!=null?r[a]:!0}function mg(t){var e=t._covers,r=e.length;return Xr(e,function(a){t.group.remove(a)},t),e.length=0,!!r}function Bi(t,e){var r=VR(t._covers,function(a){var i=a.__brushOption,n=rt(i.range);return{brushType:i.brushType,panelId:i.panelId,range:n}});t.trigger("brush",r,{isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function jR(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=GR(i*i+n*n,.5);return o>FR}function Fw(t){var e=t.length-1;return e<0&&(e=0),[t[0],t[e]]}function Ww(t,e,r,a){var i=new q;return i.add(new xt({name:"main",style:_g(r),silent:!0,draggable:!0,cursor:"move",drift:Ka(t,e,i,"nswe"),ondragend:Ka(Bi,e,{isEnd:!0})})),Xr(a,function(n){i.add(new xt({name:n,style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:Ka(t,e,i,n),ondragend:Ka(Bi,e,{isEnd:!0})}))}),i}function Uw(t,e,r,a){var i=a.brushStyle.lineWidth||0,n=eo(i,WR),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;da(t,e,"main",o,s,d,g),a.transformable&&(da(t,e,"w",l,u,n,m),da(t,e,"e",c,u,n,m),da(t,e,"n",l,u,p,n),da(t,e,"s",l,v,p,n),da(t,e,"nw",l,u,n,n),da(t,e,"ne",c,u,n,n),da(t,e,"sw",l,v,n,n),da(t,e,"se",c,v,n,n))}function yg(t,e){var r=e.__brushOption,a=r.transformable,i=e.childAt(0);i.useStyle(_g(r)),i.attr({silent:!a,cursor:a?"move":"default"}),Xr(["w","e","n","s","se","sw","ne","nw"],function(n){var o=e.childOfName(n),s=xg(t,n);o&&o.attr({silent:!a,invisible:!a,cursor:a?$R[s]+"-resize":null})})}function da(t,e,r,a,i,n,o){var s=e.childOfName(r);s&&s.setShape(tO(wg(t,e,[[a,i],[a+n,i+o]])))}function _g(t){return J({strokeNoScale:!0},t.brushStyle)}function $w(t,e,r,a){var i=[Gs(t,r),Gs(e,a)],n=[eo(t,r),eo(e,a)];return[[i[0],n[0]],[i[1],n[1]]]}function QR(t){return yi(t.group)}function xg(t,e){if(e.length>1){e=e.split("");var r=[xg(t,e[0]),xg(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=jc(a[e],QR(t));return i[r]}}function Zw(t,e,r,a,i,n,o,s){var l=a.__brushOption,u=t(l.range),h=Yw(r,n,o);Xr(i.split(""),function(f){var c=UR[f];u[c[0]][c[1]]+=h[c[0]]}),l.range=e($w(u[0][0],u[1][0],u[0][1],u[1][1])),dg(r,a),Bi(r,{isEnd:!1})}function JR(t,e,r,a,i){var n=e.__brushOption.range,o=Yw(t,r,a);Xr(n,function(s){s[0]+=o[0],s[1]+=o[1]}),dg(t,e),Bi(t,{isEnd:!1})}function Yw(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 wg(t,e,r){var a=Hw(t,e);return a&&a!==!0?a.clipPath(r,t._transform):rt(r)}function tO(t){var e=Gs(t[0][0],t[1][0]),r=Gs(t[0][1],t[1][1]),a=eo(t[0][0],t[1][0]),i=eo(t[0][1],t[1][1]);return{x:e,y:r,width:a-e,height:i-r}}function eO(t,e,r){if(!(!t._brushType||aO(t,e))){var a=t._zr,i=t._covers,n=pg(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)&&ch[s.brushType].contain(i[o],r[0],r[1]))return}n&&a.setCursorStyle("crosshair")}}function bg(t){var e=t.event;e.preventDefault&&e.preventDefault()}function Sg(t,e,r){return t.childOfName("main").contain(e,r)}function Xw(t,e,r,a){var i=t._creatingCover,n=t._creatingPanel,o=t._brushOption,s;if(t._track.push(r.slice()),jR(t)||i){if(n&&!i){o.brushMode==="single"&&mg(t);var l=rt(o);l.brushType=qw(l.brushType,n),l.panelId=n===!0?null:n.panelId,i=t._creatingCover=zw(t,l),t._covers.push(i)}if(i){var u=ch[qw(t._brushType,n)],h=i.__brushOption;h.range=u.getCreatingRange(wg(t,i,t._track)),a&&(Bw(t,i),u.updateCommon(t,i)),Vw(t,i),s={isEnd:a}}}else a&&o.brushMode==="single"&&o.removeOnClick&&pg(t,e,r)&&mg(t)&&(s={isEnd:a,removeOnClick:!0});return s}function qw(t,e){return t==="auto"?(T&>(e&&e.defaultBrushType,'MUST have defaultBrushType when brushType is "atuo"'),e.defaultBrushType):t}var rO={mousedown:function(t){if(this._dragging)Kw(this,t);else if(!t.target||!t.target.draggable){bg(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null;var r=this._creatingPanel=pg(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(eO(this,t,a),this._dragging){bg(t);var i=Xw(this,t,a,!1);i&&Bi(this,i)}},mouseup:function(t){Kw(this,t)}};function Kw(t,e){if(t._dragging){bg(e);var r=e.offsetX,a=e.offsetY,i=t.group.transformCoordToLocal(r,a),n=Xw(t,e,i,!0);t._dragging=!1,t._track=[],t._creatingCover=null,n&&Bi(t,n)}}function aO(t,e,r){var a=t._zr;return e<0||e>a.getWidth()||r<0||r>a.getHeight()}var ch={lineX:jw(0),lineY:jw(1),rect:{createCover:function(t,e){return Ww(Ka(Zw,function(r){return r},function(r){return r}),t,e,["w","e","n","s","se","sw","ne","nw"])},getCreatingRange:function(t){var e=Fw(t);return $w(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(t,e,r,a){Uw(t,e,r,a)},updateCommon:yg,contain:Sg},polygon:{createCover:function(t,e){var r=new q;return r.add(new ir({name:"main",style:_g(e),silent:!0})),r},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new Ge({name:"main",draggable:!0,drift:Ka(JR,t,e),ondragend:Ka(Bi,t,{isEnd:!0})}))},updateCoverShape:function(t,e,r,a){e.childAt(0).setShape({points:wg(t,e,r)})},updateCommon:yg,contain:Sg}};function jw(t){return{createCover:function(e,r){return Ww(Ka(Zw,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=Fw(e),a=Gs(r[0][t],r[1][t]),i=eo(r[0][t],r[1][t]);return[a,i]},updateCoverShape:function(e,r,a,i){var n,o=Hw(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(),Uw(e,r,l,i)},updateCommon:yg,contain:Sg}}function Qw(t){return t=Ag(t),function(e,r){return fy(e,t)}}function Jw(t,e){return t=Ag(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 tb(t,e,r){return t=Ag(t),function(a,i,n){return t.contain(i[0],i[1])&&!Ku(a,e,r)}}function Ag(t){return vt.create(t)}var iO=["axisLine","axisTickLabel","axisName"],nO=he({type:"parallelAxis",init:function(t,e){nO.superApply(this,"init",arguments),(this._brushController=new ro(e.getZr())).on("brush",it(this._onBrush,this))},render:function(t,e,r,a){if(!oO(t,e,a)){this.axisModel=t,this.api=r,this.group.removeAll();var i=this._axisGroup;if(this._axisGroup=new q,this.group.add(this._axisGroup),!!t.get("show")){var n=lO(t,e),o=n.coordinateSystem,s=t.getAreaSelectStyle(),l=s.width,u=t.axis.dim,h=o.getAxisLayout(u),f=et({strokeContainThreshold:l},h),c=new ze(t,f);M(iO,c.add,c),this._axisGroup.add(c.getGroup()),this._refreshBrushController(f,s,t,n,l,r);var v=a&&a.animation===!1?null:t;au(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=vt.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:Qw(u),isTargetByCursor:tb(u,n,a),getLinearBrushOtherExtent:Jw(u,0)}]).enableBrush({brushType:"lineX",brushStyle:e,removeOnClick:!0}).updateCovers(sO(r))},_onBrush:function(t,e){var r=this.axisModel,a=r.axis,i=V(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 oO(t,e,r){return r&&r.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:r})[0]===t}function sO(t){var e=t.axis;return V(t.activeIntervals,function(r){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(r[0],!0),e.dataToCoord(r[1],!0)]}})}function lO(t,e){return e.getComponent("parallel",t.get("parallelIndex"))}var uO=5;he({type:"parallel",render:function(t,e,r){this._model=t,this._api=r,this._handlers||(this._handlers={},M(hO,function(a,i){r.getZr().on(i,this._handlers[i]=it(a,this))},this)),es(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},dispose:function(t,e){M(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(et({type:"parallelAxisExpand"},t))}});var hO={mousedown:function(t){Tg(this,"click")&&(this._mouseDownPoint=[t.offsetX,t.offsetY])},mouseup:function(t){var e=this._mouseDownPoint;if(Tg(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>uO)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||!Tg(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 Tg(t,e){var r=t._model;return r.get("axisExpandable")&&r.get("axisExpandTriggerOn")===e}we(MR),Vt.extend({type:"series.parallel",dependencies:["parallel"],visualColorAccessPath:"lineStyle.color",getInitialData:function(t,e){var r=this.getSource();return fO(r,this),ca(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 fO(t,e){if(!t.encodeDefine){var r=e.ecModel.getComponent("parallel",e.get("parallelIndex"));if(!!r){var a=t.encodeDefine=ht();M(r.dimensions,function(i){var n=cO(i);a.set(i,n)})}}}function cO(t){return+t.replace("dim","")}var eb=.3,X5=ue.extend({type:"parallel",init:function(){this._dataGroup=new q,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=ib(t);n.diff(o).add(h).update(f).remove(c).execute();function h(d){var g=ab(n,i,d,l,s);Cg(g,n,d,u)}function f(d,g){var p=o.getItemGraphicEl(g),m=rb(n,d,l,s);n.setItemGraphicEl(d,p);var y=a&&a.animation===!1?null:t;ft(p,{shape:{points:m}},y,d),Cg(p,n,d,u)}function c(d){var g=o.getItemGraphicEl(d);i.remove(g)}if(!this._initialized){this._initialized=!0;var v=vO(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=ib(e),s=t.start;s<t.end;s++){var l=ab(a,this._dataGroup,s,n,i);l.incremental=!0,Cg(l,a,s,o)}},dispose:function(){},remove:function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null}});function vO(t,e,r){var a=t.model,i=t.getRect(),n=new xt({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),Se(n,{shape:{width:i.width,height:i.height}},e,r),n}function rb(t,e,r,a){for(var i=[],n=0;n<r.length;n++){var o=r[n],s=t.get(t.mapDimension(o),e);dO(s,a.getAxis(o).type)||i.push(a.dataToPoint(s,o))}return i}function ab(t,e,r,a,i){var n=rb(t,r,a,i),o=new ir({shape:{points:n},silent:!0,z2:10});return e.add(o),t.setItemGraphicEl(r,o),o}function ib(t){var e=t.get("smooth",!0);return e===!0&&(e=eb),{lineStyle:t.getModel("lineStyle").getLineStyle(),smooth:e??eb}}function Cg(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 dO(t,e){return e==="category"?t==null:t==null||isNaN(t)}var gO=["lineStyle","normal","opacity"],pO={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(gO,!0);_!=null&&(y=_)}g.setItemVisual(m,"opacity",y)},d.start,d.end)}return{progress:v}}};Rt(pO);var nb=Vt.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 _t(i[o],this,e);else if(T)throw new Error("levels[i].depth is mandatory and should be natural number");if(a&&r){var s=dw(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),kt(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 kt(n)}return nb.superCall(this,"formatTooltip",t,e)},optionUpdated:function(){var t=this.option;t.focusNodeAdjacency===!0&&(t.focusNodeAdjacency="allEdges")},getDataParams:function(t,e){var r=nb.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}}),ob=["itemStyle","opacity"],Vi=["emphasis","itemStyle","opacity"],sb=["lineStyle","opacity"],vh=["emphasis","lineStyle","opacity"];function lb(t,e){return t.getVisual("opacity")||t.getModel().get(e)}function dh(t,e,r){var a=t.getGraphicEl(),i=lb(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 Ir(t,e){var r=lb(t,e),a=t.getGraphicEl();a.traverse(function(i){i.type!=="group"&&i.setStyle("opacity",r)}),a.highlight&&a.highlight()}var mO=nr({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")}});ke({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 mO;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"),w=c.node2.getLayout(),b=c.node2.getModel(),A=b.get("localX"),S=b.get("localY"),D=c.getLayout(),I,L,P,R,E,Z,W,$;switch(v.shape.extent=Math.max(1,D.dy),v.shape.orient=f,f==="vertical"?(I=(y!=null?y*s:p.x)+D.sy,L=(_!=null?_*l:p.y)+p.dy,P=(A!=null?A*s:w.x)+D.ty,R=S!=null?S*l:w.y,E=I,Z=L*(1-g)+R*g,W=P,$=L*g+R*(1-g)):(I=(y!=null?y*s:p.x)+p.dx,L=(_!=null?_*l:p.y)+D.sy,P=A!=null?A*s:w.x,R=(S!=null?S*l:w.y)+D.ty,E=I*(1-g)+P*g,Z=L,W=I*g+P*(1-g),$=R),v.setShape({x1:I,y1:L,x2:P,y2:R,cpx1:E,cpy1:Z,cpx2:W,cpy2:$}),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}Ot(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 xt({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()}),w=c.getModel("emphasis.itemStyle").getItemStyle();Fe(_.style,w,m,y,{labelFetcher:t,labelDataIndex:c.dataIndex,defaultText:c.id,isRectText:!0}),_.setStyle("fill",c.getVisual("color")),Ot(_,w),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(yO(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){dh(c,ob,.1)}),n.eachEdge(function(c){dh(c,sb,.1)}),u){Ir(u,Vi);var f=s.get("focusNodeAdjacency");f==="outEdges"?M(u.outEdges,function(c){c.dataIndex<0||(Ir(c,vh),Ir(c.node2,Vi))}):f==="inEdges"?M(u.inEdges,function(c){c.dataIndex<0||(Ir(c,vh),Ir(c.node1,Vi))}):f==="allEdges"&&M(u.edges,function(c){c.dataIndex<0||(Ir(c,vh),c.node1!==u&&Ir(c.node1,Vi),c.node2!==u&&Ir(c.node2,Vi))})}h&&(Ir(h,vh),Ir(h.node1,Vi),Ir(h.node2,Vi))}},unfocusNodeAdjacency:function(t,e,r,a){var i=t.getGraph();i.eachNode(function(n){dh(n,ob)}),i.eachEdge(function(n){dh(n,sb)})}});function yO(t,e,r){var a=new xt({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return Se(a,{shape:{width:t.width+20}},e,r),a}mt({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 _O=function(t,e,r){t.eachSeriesByType("sankey",function(a){var i=a.get("nodeWidth"),n=a.get("nodeGap"),o=xO(a,e);a.layoutInfo=o;var s=o.width,l=o.height,u=a.getGraph(),h=u.nodes,f=u.edges;bO(h);var c=ee(h,function(p){return p.getLayout().value===0}),v=c.length!==0?0:a.get("layoutIterations"),d=a.get("orient"),g=a.get("nodeAlign");wO(h,f,i,n,s,l,v,d,g)})};function xO(t,e){return qt(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function wO(t,e,r,a,i,n,o,s,l){SO(t,e,r,i,n,s,l),DO(t,e,n,i,a,o,s),kO(t,s)}function bO(t){M(t,function(e){var r=Qa(e.outEdges,gh),a=Qa(e.inEdges,gh),i=e.getValue()||0,n=Math.max(r,a,i);e.setLayout({value:n},!0)})}function SO(t,e,r,a,i,n,o){for(var s=[],l=[],u=[],h=[],f=0,D=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],w=e.indexOf(_);s[w]=0;var b=_.node2,A=t.indexOf(b);--l[A]===0&&h.indexOf(b)<0&&h.push(b)}}++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 S=v>f-1?v:f-1;o&&o!=="left"&&AO(t,o,n,S);var D=n==="vertical"?(i-r)/S:(a-r)/S;CO(t,D,n)}function ub(t){var e=t.hostGraph.data.getRawDataItem(t.dataIndex);return e.depth!=null&&e.depth>=0}function AO(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}M(t,function(f){ub(f)||f.setLayout({depth:Math.max(0,a-f.getLayout().skNodeHeight)},!0)})}else e==="justify"&&TO(t,a)}function TO(t,e){M(t,function(r){!ub(r)&&!r.outEdges.length&&r.setLayout({depth:e},!0)})}function CO(t,e,r){M(t,function(a){var i=a.getLayout().depth*e;r==="vertical"?a.setLayout({y:i},!0):a.setLayout({x:i},!0)})}function DO(t,e,r,a,i,n,o){var s=MO(t,o);IO(s,e,r,a,i,o),Dg(s,i,r,a,o);for(var l=1;n>0;n--)l*=.99,LO(s,l,o),Dg(s,i,r,a,o),NO(s,l,o),Dg(s,i,r,a,o)}function MO(t,e){var r=[],a=e==="vertical"?"y":"x",i=Oc(t,function(n){return n.getLayout()[a]});return i.keys.sort(function(n,o){return n-o}),M(i.keys,function(n){r.push(i.buckets.get(n))}),r}function IO(t,e,r,a,i,n){var o=1/0;M(t,function(s){var l=s.length,u=0;M(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)}),M(t,function(s){M(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))})}),M(e,function(s){var l=+s.getValue()*o;s.setLayout({dy:l},!0)})}function Dg(t,e,r,a,i){var n=i==="vertical"?"x":"y";M(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 LO(t,e,r){M(t.slice().reverse(),function(a){M(a,function(i){if(i.outEdges.length){var n=Qa(i.outEdges,PO,r)/Qa(i.outEdges,gh,r);if(isNaN(n)){var o=i.outEdges.length;n=o?Qa(i.outEdges,EO,r)/o:0}if(r==="vertical"){var s=i.getLayout().x+(n-ja(i,r))*e;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(n-ja(i,r))*e;i.setLayout({y:l},!0)}}})})}function PO(t,e){return ja(t.node2,e)*t.getValue()}function EO(t,e){return ja(t.node2,e)}function RO(t,e){return ja(t.node1,e)*t.getValue()}function OO(t,e){return ja(t.node1,e)}function ja(t,e){return e==="vertical"?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function gh(t){return t.getValue()}function Qa(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 NO(t,e,r){M(t,function(a){M(a,function(i){if(i.inEdges.length){var n=Qa(i.inEdges,RO,r)/Qa(i.inEdges,gh,r);if(isNaN(n)){var o=i.inEdges.length;n=o?Qa(i.inEdges,OO,r)/o:0}if(r==="vertical"){var s=i.getLayout().x+(n-ja(i,r))*e;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(n-ja(i,r))*e;i.setLayout({y:l},!0)}}})})}function kO(t,e){var r=e==="vertical"?"x":"y";M(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]})}),M(t,function(a){var i=0,n=0;M(a.outEdges,function(o){o.setLayout({sy:i},!0),i+=o.getLayout().dy}),M(a.inEdges,function(o){o.setLayout({ty:n},!0),n+=o.getLayout().dy})})}var zO=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;M(i,function(s){var l=s.getLayout().value;l<n&&(n=l),l>o&&(o=l)}),M(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)})}})};Gt(_O),Rt(zO);var hb={_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=[];M(g,function(_,w){var b;_.value&&z(_.value)?(b=_.value.slice(),_.value.unshift(w)):z(_)?(b=_.slice(),_.unshift(w)):b=_,p.push(b)}),t.data=p}var m=this.defaultValueDimensions,y=[{name:h,type:Iu(v),ordinalMeta:r,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:f,type:Iu(d),dimsDef:m.slice()}];return Un(this,{coordDimensions:y,dimensionsCount:m.length+1,encodeDefaulter:ot(Ey,y,this)})},getBaseAxis:function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis}},BO=Vt.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}});Dt(BO,hb,!0);var VO=["itemStyle"],GO=["emphasis","itemStyle"],q5=ue.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=fb(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?cb(h,u,a,s):u=fb(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:ce}),HO=pt.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 fb(t,e,r,a,i){var n=t.ends,o=new HO({shape:{points:i?FO(n,a,t):n}});return cb(t,o,e,r,i),o}function cb(t,e,r,a,i){var n=r.hostModel,o=sa[i?"initProps":"updateProps"];o(e,{shape:{points:t.ends}},n,a);var s=r.getItemModel(a),l=s.getModel(VO),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(GO).getItemStyle();Ot(e,f)}function FO(t,e,r){return V(t,function(a){return a=a.slice(),a[e]=r.initBaseline,a})}var vb=["itemStyle","borderColor"],WO=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(vb)||i}),t.isSeriesFiltered(a)||n.each(function(o){var s=n.getItemModel(o);n.setItemVisual(o,{color:s.get(vb,!0)})})})},Hs=M,UO=function(t){var e=$O(t);Hs(e,function(r){var a=r.seriesModels;!a.length||(ZO(r),Hs(a,function(i,n){YO(i,r.boxOffsetList[n],r.boxWidthList[n])}))})};function $O(t){var e=[],r=[];return t.eachSeriesByType("boxplot",function(a){var i=a.getBaseAxis(),n=yt(r,i);n<0&&(n=r.length,r[n]=i,e[n]={axis:i,seriesModels:[]}),e[n].seriesModels.push(a)}),e}function ZO(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;Hs(a,function(d){u=Math.max(u,d.getData().count())}),e=r.getExtent(),Math.abs(e[1]-e[0])/u}Hs(a,function(d){var g=d.get("boxWidth");z(g)||(g=[g,g]),s.push([H(g[0],l)||0,H(g[1],l)||0])});var h=l*.8-2,f=h/i*.3,c=(h-f*(i-1))/i,v=c/2-h/2;Hs(a,function(d,g){o.push(v),v+=f+c,n.push(Math.min(Math.max(c,s[g][0]),s[g][1]))})}function YO(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=[];w(y,g,0),w(y,p,1),y.push(d,g,m,p),b(y,d),b(y,m),b(y,v),i.setItemLayout(f,{initBaseline:v[s],ends:y})}function _(A,S,D){var I=i.get(S,D),L=[];L[o]=A,L[s]=I;var P;return isNaN(A)||isNaN(I)?P=[NaN,NaN]:(P=a.dataToPoint(L),P[o]+=e),P}function w(A,S,D){var I=S.slice(),L=S.slice();I[o]+=n,L[o]-=n,D?A.push(I,L):A.push(L,I)}function b(A,S){var D=S.slice(),I=S.slice();D[o]-=n,I[o]+=n,A.push(D,I)}}Rt(WO),Gt(UO);var XO=Vt.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)}});Dt(XO,hb,!0);var db=["itemStyle"],qO=["emphasis","itemStyle"],gb=["color","color0","borderColor","borderColor0"],K5=ue.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&&pb(s,h))return;u=Mg(h,l,!0),Se(u,{shape:{points:h.ends}},t,l),Ig(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&&pb(s,f)){a.remove(h);return}h?ft(h,{shape:{points:f.ends}},t,l):h=Mg(f,l),Ig(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(),yb(t,this.group);var e=t.get("clip",!0)?Gu(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=Mg(o,i),Ig(n,r,i,a),n.incremental=!0,this.group.add(n)}},_incrementalRenderLarge:function(t,e){yb(e,this.group,!0)},remove:function(t){this._clear()},_clear:function(){this.group.removeAll(),this._data=null},dispose:ce}),KO=pt.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 Mg(t,e,r){var a=t.ends;return new KO({shape:{points:r?jO(a,t):a},z2:100})}function pb(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 Ig(t,e,r,a){var i=e.getItemModel(r),n=i.getModel(db),o=e.getItemVisual(r,"color"),s=e.getItemVisual(r,"borderColor")||o,l=n.getItemStyle(gb);t.useStyle(l),t.style.strokeNoScale=!0,t.style.fill=o,t.style.stroke=s,t.__simpleBox=a;var u=i.getModel(qO).getItemStyle();Ot(t,u)}function jO(t,e){return V(t,function(r){return r=r.slice(),r[1]=e.initBaseline,r})}var mb=pt.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 yb(t,e,r){var a=t.getData(),i=a.getLayout("largePoints"),n=new mb({shape:{points:i},__sign:1});e.add(n);var o=new mb({shape:{points:i},__sign:-1});e.add(o),_b(1,n,t,a),_b(-1,o,t,a),r&&(n.incremental=!0,o.incremental=!0)}function _b(t,e,r,a){var i=t>0?"P":"N",n=a.getVisual("borderColor"+i)||a.getVisual("color"+i),o=r.getModel(db).getItemStyle(gb);e.useStyle(o),e.style.fill=null,e.style.stroke=n}var QO=function(t){!t||!z(t.series)||M(t.series,function(e){lt(e)&&e.type==="k"&&(e.type="candlestick")})},JO=["itemStyle","borderColor"],tN=["itemStyle","borderColor0"],eN=["itemStyle","color"],rN=["itemStyle","color0"],aN={seriesType:"candlestick",plan:Mn(),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?eN:rN)}function o(s,l){return l.get(s>0?JO:tN)}}},iN=typeof Float32Array<"u"?Float32Array:Array,nN={seriesType:"candlestick",plan:Mn(),reset:function(t){var e=t.coordinateSystem,r=t.getData(),a=oN(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),w=p.get(h,m),b=p.get(f,m),A=p.get(c,m),S=Math.min(_,w),D=Math.max(_,w),I=Z(S,y),L=Z(D,y),P=Z(b,y),R=Z(A,y),E=[];W(E,L,0),W(E,I,1),E.push(X(R),X(L),X(P),X(I)),p.setItemLayout(m,{sign:xb(p,m,_,w,h),initBaseline:_>w?L[n]:I[n],ends:E,brushRect:$(b,A,y)})}function Z(K,Q){var j=[];return j[i]=Q,j[n]=K,isNaN(Q)||isNaN(K)?[NaN,NaN]:e.dataToPoint(j)}function W(K,Q,j){var U=Q.slice(),tt=Q.slice();U[i]=Jl(U[i]+a/2,1,!1),tt[i]=Jl(tt[i]-a/2,1,!0),j?K.push(U,tt):K.push(tt,U)}function $(K,Q,j){var U=Z(K,j),tt=Z(Q,j);return U[i]-=a/2,tt[i]-=a/2,{x:U[0],y:U[1],width:n?a:tt[0]-U[0],height:n?tt[1]-U[1]:a}}function X(K){return K[i]=Jl(K[i],1),K}}function d(g,p){for(var m=new iN(g.count*4),y=0,_,w=[],b=[],A;(A=g.next())!=null;){var S=p.get(s,A),D=p.get(u,A),I=p.get(h,A),L=p.get(f,A),P=p.get(c,A);if(isNaN(S)||isNaN(L)||isNaN(P)){m[y++]=NaN,y+=3;continue}m[y++]=xb(p,A,D,I,h),w[i]=S,w[n]=L,_=e.dataToPoint(w,null,b),m[y++]=_?_[0]:NaN,m[y++]=_?_[1]:NaN,w[n]=P,_=e.dataToPoint(w,null,b),m[y++]=_?_[1]:NaN}p.setLayout("largePoints",m)}}};function xb(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 oN(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=H(Xt(t.get("barMaxWidth"),i),i),o=H(Xt(t.get("barMinWidth"),1),i),s=t.get("barWidth");return s!=null?H(s,i):Math.max(Math.min(i/2,n),o)}we(QO),Rt(aN),Gt(nN),Vt.extend({type:"series.effectScatter",dependencies:["grid","polar"],getInitialData:function(t,e){return ca(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 wb=3;function sN(t){return z(t)||(t=[+t,+t]),t}function bb(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 Lg(t,e){q.call(this);var r=new Wa(t,e),a=new q;this.add(r),this.add(a),a.beforeUpdate=function(){this.attr(r.getScale())},this.updateData(t,e)}var Gi=Lg.prototype;Gi.stopEffectAnimation=function(){this.childAt(1).removeAll()},Gi.startEffectAnimation=function(t){for(var e=t.symbolType,r=t.color,a=this.childAt(1),i=0;i<wb;i++){var n=Ye(e,-1,-1,2,2,r);n.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scale:[.5,.5]});var o=-i/wb*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)}bb(a,t)},Gi.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}}bb(r,t)},Gi.highlight=function(){this.trigger("emphasis")},Gi.downplay=function(){this.trigger("normal")},Gi.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=sN(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]=H(l[0],o[0]),u[1]=H(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},Gi.fadeOut=function(t){this.off("mouseover").off("mouseout").off("emphasis").off("normal"),t&&t()},It(Lg,q),ke({type:"effectScatter",init:function(){this._symbolDraw=new Bn(Lg)},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=ys().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=Tm(e.getRoamTransform()),this.group.decomposeTransform())},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(e)},dispose:function(){}}),Rt(Ii("effectScatter","circle")),Gt(ys("effectScatter"));var lN=typeof Uint32Array>"u"?Array:Uint32Array,uN=typeof Float64Array>"u"?Array:Float64Array;function Sb(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(T&&console.warn("Lines data configuration has been changed to { coords:[[1,2],[2,3]] }"),t.data=V(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),go([i,r[0],r[1]])}))}var Ab=Vt.extend({type:"series.lines",dependencies:["grid","polar"],visualColorAccessPath:"lineStyle.color",init:function(t){t.data=t.data||[],Sb(t);var e=this._processFlatCoordsArray(t.data);this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset,e.flatCoords&&(t.data=new Float32Array(e.count)),Ab.superApply(this,"init",arguments)},mergeOption:function(t){if(t.data=t.data||[],Sb(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))}Ab.superApply(this,"mergeOption",arguments)},appendData:function(t){var e=this._processFlatCoordsArray(t.data);e.flatCoords&&(this._flatCoords?(this._flatCoords=df(this._flatCoords,e.flatCoords),this._flatCoordsOffset=df(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(T&&!(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 lN(r),i=new uN(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&&T)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(T){var r=_e.get(t.coordinateSystem);if(!r)throw new Error("Unkown coordinate system "+t.coordinateSystem)}var a=new fe(["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),kt(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 Fs(t,e,r){q.call(this),this.add(this.createLine(t,e,r)),this._updateEffectSymbol(t,e)}var Ja=Fs.prototype;Ja.createLine=function(t,e,r){return new zs(t,e,r)},Ja._updateEffectSymbol=function(t,e){var r=t.getItemModel(e),a=r.getModel("effect"),i=a.get("symbolSize"),n=a.get("symbol");z(i)||(i=[i,i]);var o=a.get("color")||t.getItemVisual(e,"color"),s=this.childAt(1);this._symbolType!==n&&(this.remove(s),s=Ye(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))},Ja._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=Ut(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}},Ja.getLineLength=function(t){return ta(t.__p1,t.__cp1)+ta(t.__cp1,t.__p2)},Ja.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]},Ja.updateData=function(t,e,r){this.childAt(0).updateData(t,e,r),this._updateEffectSymbol(t,e)},Ja.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=be,l=Nc;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=ta(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*ta(e,n);t.attr("scale",[t.scale[0],f])}else t.attr("scale",this._symbolScale);t.__lastT=t.__t,t.ignore=!1},Ja.updateLayout=function(t,e){this.childAt(0).updateLayout(t,e);var r=t.getItemModel(e).getModel("effect");this._updateEffectAnimation(t,r,e)},It(Fs,q);function ph(t,e,r){q.call(this),this._createPolyline(t,e,r)}var mh=ph.prototype;mh._createPolyline=function(t,e,r){var a=t.getItemLayout(e),i=new ir({shape:{points:a}});this.add(i),this._updateCommonStl(t,e,r)},mh.updateData=function(t,e,r){var a=t.hostModel,i=this.childAt(0),n={shape:{points:t.getItemLayout(e)}};ft(i,n,a,e),this._updateCommonStl(t,e,r)},mh._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(J({strokeNoScale:!0,fill:"none",stroke:n},o)),a.hoverStyle=s,Ot(this)},mh.updateLayout=function(t,e){var r=this.childAt(0);r.setShape("points",t.getItemLayout(e))},It(ph,q);function Pg(t,e,r){Fs.call(this,t,e,r),this._lastFrame=0,this._lastFramePercent=0}var yh=Pg.prototype;yh.createLine=function(t,e,r){return new ph(t,e,r)},yh.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+=ta(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}},yh.getLineLength=function(t){return this._length},yh.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)}vm(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}},It(Pg,Fs);var Tb=nr({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(Ea(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(E0(l,u,v,d,f,c))return n}else if(Ea(l,u,f,c))return n;n++}return-1}});function Cb(){this.group=new q}var Hi=Cb.prototype;Hi.isPersistent=function(){return!this._incremental},Hi.updateData=function(t){this.group.removeAll();var e=new Tb({rectHover:!0,cursor:"default"});e.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(e,t),this.group.add(e),this._incremental=null},Hi.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>5e5?(this._incremental||(this._incremental=new He({silent:!0})),this.group.add(this._incremental)):this._incremental=null},Hi.incrementalUpdate=function(t,e){var r=new Tb;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))},Hi.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},Hi._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)}))},Hi._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};var Db={seriesType:"lines",plan:Mn(),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}}};ke({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(T){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)&&Gu(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=Db.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 T&&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 Cb:new oh(i?a?Pg:ph:a?Fs:zs),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 _h(t){return t instanceof Array||(t=[t,t]),t}var Mb="lineStyle.opacity".split("."),hN={seriesType:"lines",reset:function(t,e,r){var a=_h(t.get("symbol")),i=_h(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(Mb));function o(s,l){var u=s.getItemModel(l),h=_h(u.getShallow("symbol",!0)),f=_h(u.getShallow("symbolSize",!0)),c=u.get(Mb);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}}};Gt(Db),Rt(hN),Vt.extend({type:"series.heatmap",getInitialData:function(t,e){return ca(this.getSource(),this,{generateCoord:"value"})},preventIncremental:function(){var t=_e.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 fN=256;function Ib(){var t=rn();this.canvas=t,this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={}}Ib.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),w=_.data,b=0,A=w.length,S=this.minOpacity,D=this.maxOpacity,I=D-S;b<A;){var y=w[b+3]/256,L=Math.floor(y*(fN-1))*4;if(y>0){var P=n(y)?s:l;y>0&&(y=y*I+S),w[b++]=P[L],w[b++]=P[L+1],w[b++]=P[L+2],w[b++]=P[L+3]*y*256}else b+=4}return f.putImageData(_,0,0),h},_getBrush:function(){var t=this._brushCanvas||(this._brushCanvas=rn()),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 cN(t,e,r){var a=t[1]-t[0];e=V(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 vN(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 dN(t){var e=t.dimensions;return e[0]==="lng"&&e[1]==="lat"}ke({type:"heatmap",render:function(t,e,r){var a;if(e.eachComponent("visualMap",function(n){n.eachTargetSeries(function(o){o===t&&(a=n)})}),T&&!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()):dN(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(T){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),w=n.type,b=w==="cartesian2d"?[f.mapDimension("x"),f.mapDimension("y"),f.mapDimension("value")]:[f.mapDimension("time"),f.mapDimension("value")],A=r;A<a;A++){var S;if(w==="cartesian2d"){if(isNaN(f.get(b[2],A)))continue;var D=n.dataToPoint([f.get(b[0],A),f.get(b[1],A)]);S=new xt({shape:{x:Math.floor(Math.round(D[0])-o/2),y:Math.floor(Math.round(D[1])-s/2),width:Math.ceil(o),height:Math.ceil(s)},style:{fill:f.getItemVisual(A,"color"),opacity:f.getItemVisual(A,"opacity")}})}else{if(isNaN(f.get(b[1],A)))continue;S=new xt({z2:1,shape:n.dataToRect([f.get(b[0],A)]).contentShape,style:{fill:f.getItemVisual(A,"color"),opacity:f.getItemVisual(A,"opacity")}})}var I=f.getItemModel(A);f.hasItemOption&&(p=I.getModel(c).getItemStyle(["color"]),m=I.getModel(v).getItemStyle(),y=I.getModel(d),_=I.getModel(g));var L=t.getRawValue(A),P="-";L&&L[2]!=null&&(P=L[2]),Fe(p,m,y,_,{labelFetcher:t,labelDataIndex:A,defaultText:P,isRectText:!0}),S.setStyle(p),Ot(S,f.hasItemOption?m:et({},m)),S.incremental=i,i&&(S.useHoverLayer=!0),h.add(S),f.setItemGraphicEl(A,S)}},_renderOnGeo:function(t,e,r,a){var i=r.targetVisuals.inRange,n=r.targetVisuals.outOfRange,o=e.getData(),s=this._hmLayer||this._hmLayer||new Ib;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(b,A,S){var D=t.dataToPoint([b,A]);return D[0]-=h,D[1]-=f,D.push(S),D}),y=r.getExtent(),_=r.type==="visualMap.continuous"?vN(y,r.option.range):cN(y,r.getPieceList(),r.option.selected);s.update(m,d,g,i.color.getNormalizer(),{inRange:i.color.getColorMapper(),outOfRange:n.color.getColorMapper()},_);var w=new ve({style:{width:d,height:g,x:h,y:f,image:s.canvas},silent:!0});this.group.add(w)},dispose:function(){}});var gN=j1.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,gN.superApply(this,"getInitialData",arguments)}}),pN=["itemStyle","borderWidth"],Lb=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],Eg=new Br,j5=ke({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:Lb[+l],categoryDim:Lb[1-l]};return i.diff(n).add(function(f){if(!!i.hasValue(f)){var c=zb(i,f),v=Pb(i,f,c,h),d=Bb(i,h,v);i.setItemGraphicEl(f,d),a.add(d),Hb(d,h,v)}}).update(function(f,c){var v=n.getItemGraphicEl(c);if(!i.hasValue(f)){a.remove(v);return}var d=zb(i,f),g=Pb(i,f,d,h),p=Gb(i,g);v&&p!==v.__pictorialShapeStr&&(a.remove(v),i.setItemGraphicEl(f,null),v=null),v?SN(v,h,g):v=Bb(i,h,g,!0),i.setItemGraphicEl(f,v),v.__pictorialSymbolMeta=g,a.add(v),Hb(v,h,g)}).remove(function(f){var c=n.getItemGraphicEl(f);c&&Vb(n,f,c.__pictorialSymbolMeta.animationModel,c)}).execute(),this._data=i,this.group},dispose:ce,remove:function(t,e){var r=this.group,a=this._data;t.get("animation")?a&&a.eachItemGraphicEl(function(i){Vb(a,i.dataIndex,t,i)}):r.removeAll()}});function Pb(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};mN(r,n,i,a,c),yN(t,e,i,n,o,c.boundingLength,c.pxSign,h,a,c),_N(r,c.symbolScale,u,a,c);var v=c.symbolSize,d=r.get("symbolOffset");return z(d)&&(d=[H(d[0],v[0]),H(d[1],v[1])]),xN(r,v,i,n,o,d,s,c.valueLineWidth,c.boundingLength,c.repeatCutLength,a,c),c}function mN(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(z(o)){var f=[Rg(s,o[0])-l,Rg(s,o[1])-l];f[1]<f[0]&&f.reverse(),h=f[u]}else o!=null?h=Rg(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 Rg(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function yN(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");z(v)?v=v.slice():(v==null&&(v="100%"),v=[v,v]),v[f.index]=H(v[f.index],c),v[h.index]=H(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 _N(t,e,r,a,i){var n=t.get(pN)||0;n&&(Eg.attr({scale:e.slice(),rotation:r}),Eg.updateTransform(),n/=Eg.getLineScale(),n*=e[a.valueDim.index]),i.valueLineWidth=n}function xN(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=Ut(t.get("symbolMargin"),"15%")+"",_=!1;y.lastIndexOf("!")===y.length-1&&(_=!0,y=y.slice(0,y.length-1)),y=H(y,e[v.index]);var w=Math.max(g+y*2,0),b=_?0:y*2,A=_y(a),S=A?a:Fb((m+b)/w),D=m-S*g;y=D/2/(_?S:S-1),w=g+y*2,b=_?0:y*2,!A&&a!=="fixed"&&(S=u?Fb((Math.abs(u)+b)/w):0),p=S*w-b,f.repeatTimes=S,f.symbolMargin=y}var I=d*(p/2),L=f.pathPosition=[];L[c.index]=r[c.wh]/2,L[v.index]=o==="start"?I:o==="end"?l-I:l/2,n&&(L[0]+=n[0],L[1]+=n[1]);var P=f.bundlePosition=[];P[c.index]=r[c.xy],P[v.index]=r[v.xy];var R=f.barRectShape=et({},r);R[v.wh]=d*Math.max(Math.abs(r[v.wh]),Math.abs(L[v.index]+I)),R[c.wh]=r[c.wh];var E=f.clipShape={};E[c.xy]=-r[c.xy],E[c.wh]=h.ecSize[c.wh],E[v.xy]=0,E[v.wh]=r[v.wh]}function Eb(t){var e=t.symbolPatternSize,r=Ye(t.symbolType,-e/2,-e/2,e,e,t.color);return r.attr({culling:!0}),r.type!=="image"&&r.setStyle({strokeNoScale:!0}),r}function Rb(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(Ws(t,function(m){m.__pictorialAnimationIndex=h,m.__pictorialRepeatTimes=u,h<u?ao(m,null,d(h),r,a):ao(m,null,{scale:[0,0]},r,a,function(){i.remove(m)}),Og(m,r),h++});h<u;h++){var c=Eb(r);c.__pictorialAnimationIndex=h,c.__pictorialRepeatTimes=u,i.add(c);var v=d(h);ao(c,{position:v.position,scale:[0,0]},{scale:v.scale,rotation:v.rotation},r,a),c.on("mouseover",g).on("mouseout",p),Og(c,r)}function d(m){var y=s.slice(),_=r.pxSign,w=m;return(r.symbolRepeatDirection==="start"?_>0:_<0)&&(w=u-1-m),y[l.index]=f*(w-u/2+.5)+s[l.index],{position:y,scale:r.symbolScale.slice(),rotation:r.rotation}}function g(){Ws(t,function(m){m.trigger("emphasis")})}function p(){Ws(t,function(m){m.trigger("normal")})}}function Ob(t,e,r,a){var i=t.__pictorialBundle,n=t.__pictorialMainPath;n?ao(n,null,{position:r.pathPosition.slice(),scale:r.symbolScale.slice(),rotation:r.rotation},r,a):(n=t.__pictorialMainPath=Eb(r),i.add(n),ao(n,{position:r.pathPosition.slice(),scale:[0,0],rotation:r.rotation},{scale:r.symbolScale.slice()},r,a),n.on("mouseover",o).on("mouseout",s)),Og(n,r);function o(){this.trigger("emphasis")}function s(){this.trigger("normal")}}function Nb(t,e,r){var a=et({},e.barRectShape),i=t.__pictorialBarRect;i?ao(i,null,{shape:a},e,r):(i=t.__pictorialBarRect=new xt({z2:2,shape:a,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),t.add(i))}function kb(t,e,r,a){if(r.symbolClip){var i=t.__pictorialClipPath,n=et({},r.clipShape),o=e.valueDim,s=r.animationModel,l=r.dataIndex;if(i)ft(i,{shape:n},s,l);else{n[o.wh]=0,i=new xt({shape:n}),t.__pictorialBundle.setClipPath(i),t.__pictorialClipPath=i;var u={};u[o.wh]=r.clipShape[o.wh],sa[a?"updateProps":"initProps"](i,{shape:u},s,l)}}}function zb(t,e){var r=t.getItemModel(e);return r.getAnimationDelayParams=wN,r.isAnimationEnabled=bN,r}function wN(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function bN(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function Og(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 Bb(t,e,r,a){var i=new q,n=new q;return i.add(n),i.__pictorialBundle=n,n.attr("position",r.bundlePosition.slice()),r.symbolRepeat?Rb(i,e,r):Ob(i,e,r),Nb(i,r,a),kb(i,e,r,a),i.__pictorialShapeStr=Gb(t,r),i.__pictorialSymbolMeta=r,i}function SN(t,e,r){var a=r.animationModel,i=r.dataIndex,n=t.__pictorialBundle;ft(n,{position:r.bundlePosition.slice()},a,i),r.symbolRepeat?Rb(t,e,r,!0):Ob(t,e,r,!0),Nb(t,r,!0),kb(t,e,r,!0)}function Vb(t,e,r,a){var i=a.__pictorialBarRect;i&&(i.style.text=null);var n=[];Ws(a,function(o){n.push(o)}),a.__pictorialMainPath&&n.push(a.__pictorialMainPath),a.__pictorialClipPath&&(r=null),M(n,function(o){ft(o,{scale:[0,0]},r,e,function(){a.parent&&a.parent.remove(a)})}),t.setItemGraphicEl(e,null)}function Gb(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function Ws(t,e,r){M(t.__pictorialBundle.children(),function(a){a!==t.__pictorialBarRect&&e.call(r,a)})}function ao(t,e,r,a,i,n){e&&t.attr(e),a.symbolClip&&!i?r&&t.attr(r):r&&sa[i?"updateProps":"initProps"](t,r,a.animationModel,a.dataIndex,n)}function Hb(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");Ws(t,function(c){c.setColor(a),c.setStyle(J({fill:a,opacity:r.opacity},o)),Ot(c,s),l&&(c.cursor=l),c.z2=r.z2});var u={},h=e.valueDim.posDesc[+(r.boundingLength>0)],f=t.__pictorialBarRect;Q1(f.style,u,n,a,e.seriesModel,i,h),Ot(f,u)}function Fb(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}Gt(ot(e1,"pictorialBar")),Rt(Ii("pictorialBar","roundRect"));var xh=function(t,e,r,a,i){Qt.call(this,t,e,r),this.type=a||"value",this.position=i||"bottom",this.orient=null};xh.prototype={constructor:xh,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},It(xh,Qt);function wh(t,e,r){this.dimension="single",this.dimensions=["single"],this._axis=null,this._rect,this._init(t,e,r),this.model=t}wh.prototype={type:"singleAxis",axisPointerEnabled:!0,constructor:wh,_init:function(t,e,r){var a=this.dimension,i=new xh(a,zn(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();M(a.mapDimension(this.dimension,!0),function(i){this._axis.scale.unionExtentFromData(a,i)},this),Fa(this._axis.scale,this._axis.model)}},this)},resize:function(t,e){this._rect=qt({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 AN(t,e){var r=[];return t.eachComponent("singleAxis",function(a,i){var n=new wh(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}_e.register("single",{create:AN,dimensions:wh.prototype.dimensions});function Ng(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),Ut(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 TN=["axisLine","axisTickLabel","axisName"],CN=["splitArea","splitLine"],DN=Xe.extend({type:"singleAxis",axisPointerClass:"SingleAxisPointer",render:function(t,e,r,a){var i=this.group;i.removeAll();var n=this._axisGroup;this._axisGroup=new q;var o=Ng(t),s=new ze(t,o);M(TN,s.add,s),i.add(this._axisGroup),i.add(s.getGroup()),M(CN,function(l){t.get(l+".show")&&this["_"+l](t)},this),au(n,this._axisGroup,t),DN.superCall(this,"render",t,e,r,a)},remove:function(){K1(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 ye({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(or(l[v],{style:{stroke:n[v%n.length],lineDash:a.getLineDash(i),lineWidth:i},silent:!0}))}},_splitArea:function(t){q1(this,this._axisGroup,t,t)}}),Wb=wt.extend({type:"singleAxis",layoutMode:"box",axis:null,coordinateSystem:null,getCoordSysModel:function(){return this}}),MN={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 IN(t,e){return e.type||(e.data?"category":"value")}ut(Wb.prototype,Di),Gn("single",Wb,IN,MN);var Ub=function(t,e){var r=[],a=t.seriesIndex,i;if(a==null||!(i=e.getSeriesByIndex(a)))return{point:[]};var n=i.getData(),o=Rl(n,t);if(o==null||o<0||z(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(V(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}},qr=M,$b=ot,Zb=Pe(),LN=function(t,e,r){var a=t.currTrigger,i=[t.x,t.y],n=t,o=t.dispatchAction||it(r.dispatchAction,r),s=e.getComponent("axisPointer").coordSysAxesInfo;if(!!s){bh(i)&&(i=Ub({seriesIndex:n.seriesIndex,dataIndex:n.dataIndex},e).point);var l=bh(i),u=n.axesInfo,h=s.axesInfo,f=a==="leave"||bh(i),c={},v={},d={list:[],map:{}},g={showPointer:$b(EN,v),showTooltip:$b(RN,d)};qr(s.coordSysMap,function(m,y){var _=l||m.containPoint(i);qr(s.coordSysAxesInfo[y],function(w,b){var A=w.axis,S=zN(u,w);if(!f&&_&&(!u||S)){var D=S&&S.value;D==null&&!l&&(D=A.pointToData(i)),D!=null&&Yb(w,D,g,!1,c)}})});var p={};return qr(h,function(m,y){var _=m.linkGroup;_&&!v[y]&&qr(_.axesInfo,function(w,b){var A=v[b];if(w!==m&&A){var S=A.value;_.mapper&&(S=m.axis.scale.parse(_.mapper(S,Xb(w),Xb(m)))),p[m.key]=S}})}),qr(p,function(m,y){Yb(h[y],m,g,!0,c)}),ON(v,h,c),NN(d,i,t,o),kN(h,o,r),c}};function Yb(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=PN(e,t),s=o.payloadBatch,l=o.snapToValue;s[0]&&i.seriesIndex==null&&et(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 PN(t,e){var r=e.axis,a=r.dim,i=t,n=[],o=Number.MAX_VALUE,s=-1;return qr(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),qr(c,function(p){n.push({seriesIndex:l.seriesIndex,dataIndexInside:p,dataIndex:l.getData().getRawIndex(p)})}))}}),{payloadBatch:n,snapToValue:i}}function EN(t,e,r,a){t[e.key]={value:r,payloadBatch:a}}function RN(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=xs(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 ON(t,e,r){var a=r.axesInfo=[];qr(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 NN(t,e,r,a){if(bh(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 kN(t,e,r){var a=r.getZr(),i="axisPointerLastHighlights",n=Zb(a)[i]||{},o=Zb(a)[i]={};qr(t,function(u,h){var f=u.axisPointerModel.option;f.status==="show"&&qr(f.seriesDataIndices,function(c){var v=c.seriesIndex+" | "+c.dataIndex;o[v]=c})});var s=[],l=[];M(n,function(u,h){!o[h]&&l.push(u)}),M(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 zN(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 Xb(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 bh(t){return!t||t[0]==null||isNaN(t[0])||t[1]==null||isNaN(t[1])}var Q5=Ze({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}}}),ga=Pe(),BN=M;function qb(t,e,r){if(!G.node){var a=e.getZr();ga(a).records||(ga(a).records={}),VN(a,e);var i=ga(a).records[t]||(ga(a).records[t]={});i.handler=r}}function VN(t,e){if(ga(t).initialized)return;ga(t).initialized=!0,r("click",ot(Kb,"click")),r("mousemove",ot(Kb,"mousemove")),r("globalout",HN);function r(a,i){t.on(a,function(n){var o=FN(e);BN(ga(t).records,function(s){s&&i(s,n,o.dispatchAction)}),GN(o.pendings,e)})}}function GN(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 HN(t,e,r){t.handler("leave",null,r)}function Kb(t,e,r,a){e.handler(t,r,a)}function FN(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 kg(t,e){if(!G.node){var r=e.getZr(),a=(ga(r).records||{})[t];a&&(ga(r).records[t]=null)}}var jb=he({type:"axisPointer",render:function(t,e,r){var a=e.getComponent("tooltip"),i=t.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click";qb("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){kg(e.getZr(),"axisPointer"),jb.superApply(this._model,"remove",arguments)},dispose:function(t,e){kg("axisPointer",e),jb.superApply(this._model,"dispose",arguments)}}),Fi=Pe(),Qb=rt,zg=it;function Wi(){}Wi.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 q,this.createPointerEl(o,l,t,e),this.createLabelEl(o,l,t,e),r.getZr().add(o);else{var f=ot(Jb,e,h);this.updatePointerEl(o,l,f,e),this.updateLabelEl(o,l,f,e)}rS(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=md(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=Fi(t).pointerEl=new sa[i.type](Qb(e.pointer));t.add(n)}},createLabelEl:function(t,e,r,a){if(e.label){var i=Fi(t).labelEl=new xt(Qb(e.label));t.add(i),eS(i,a)}},updatePointerEl:function(t,e,r){var a=Fi(t).pointerEl;a&&e.pointer&&(a.setStyle(e.pointer.style),r(a,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,r,a){var i=Fi(t).labelEl;i&&(i.setStyle(e.label.style),r(i,{shape:e.label.shape,position:e.label.position}),eS(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=Ho(i.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){oi(u.event)},onmousedown:zg(this._onHandleDragMove,this,0,0),drift:zg(this._onHandleDragMove,this),ondragend:zg(this._onHandleDragEnd,this)}),r.add(a)),rS(a,e,!1);var s=["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];a.setStyle(i.getItemStyle(null,s));var l=i.get("size");z(l)||(l=[l,l]),a.attr("scale",[l[0]/2,l[1]/2]),es(this,"_doDispatchAxisPointer",i.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,o)}},_moveHandleToValue:function(t,e){Jb(this._axisPointerModel,!e&&this._moveAnimation,this._handle,Bg(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var r=this._handle;if(!!r){this._dragging=!0;var a=this.updateHandleTransform(Bg(r),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=a,r.stopAnimation(),r.attr(Bg(a)),Fi(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]}}},Wi.prototype.constructor=Wi;function Jb(t,e,r,a){tS(Fi(r).lastProp,a)||(Fi(r).lastProp=a,e?ft(r,a,t):(r.stopAnimation(),r.attr(a)))}function tS(t,e){if(lt(t)&<(e)){var r=!0;return M(e,function(a,i){r=r&&tS(t[i],a)}),!!r}else return t===e}function eS(t,e){t[e.get("label.show")?"show":"hide"]()}function Bg(t){return{position:t.position.slice(),rotation:t.rotation||0}}function rS(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(Wi);function Vg(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 aS(t,e,r,a,i){var n=r.get("value"),o=iS(n,e.axis,e.ecModel,r.get("seriesDataIndices"),{precision:r.get("label.precision"),formatter:r.get("label.formatter")}),s=r.getModel("label"),l=xi(s.get("padding")||0),u=s.getFont(),h=Rr(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),WN(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 WN(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 iS(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:ad(e,t),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};M(a,function(l){var u=r.getSeriesByIndex(l.seriesIndex),h=l.dataIndexInside,f=u&&u.getDataParams(h);f&&s.seriesData.push(f)}),Lt(o)?n=o.replace("{value}",n):se(o)&&(n=o(s))}return n}function Gg(t,e,r){var a=Ie();return aa(a,a,r.rotation),yr(a,a,r.position),Hr([t.dataToCoord(e),(r.labelOffset||0)+(r.labelDirection||1)*(r.labelMargin||0)],a)}function nS(t,e,r,a,i,n){var o=ze.innerTextLayout(r.rotation,0,r.labelDirection);r.labelMargin=i.get("label.margin"),aS(e,a,i,n,{position:Gg(a.axis,t,r),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function Hg(t,e,r){return r=r||0,{x1:t[r],y1:t[1-r],x2:e[r],y2:e[1-r]}}function oS(t,e,r){return r=r||0,{x:t[r],y:t[1-r],width:e[r],height:e[1-r]}}function sS(t,e,r,a,i,n){return{cx:t,cy:e,r0:r,r:a,startAngle:i,endAngle:n,clockwise:!0}}var UN=Wi.extend({makeElOption:function(t,e,r,a,i){var n=r.axis,o=n.grid,s=a.get("type"),l=lS(o,n).getOtherAxis(n).getGlobalExtent(),u=n.toGlobalCoord(n.dataToCoord(e,!0));if(s&&s!=="none"){var h=Vg(a),f=$N[s](n,u,l);f.style=h,t.graphicKey=f.type,t.pointer=f}var c=xd(o.model,r);nS(e,t,c,r,a,i)},getHandleTransform:function(t,e,r){var a=xd(e.axis.grid.model,e,{labelInside:!1});return a.labelMargin=r.get("handle.margin"),{position:Gg(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=lS(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 lS(t,e){var r={};return r[e.dim+"AxisIndex"]=e.index,t.getCartesian(r)}var $N={line:function(t,e,r){var a=Hg([e,r[0]],[e,r[1]],uS(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:oS([e-a/2,r[0]],[a,i],uS(t))}}};function uS(t){return t.dim==="x"?0:1}Xe.registerAxisPointerClass("CartesianAxisPointer",UN),we(function(t){if(t){(!t.axisPointer||t.axisPointer.length===0)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!z(e)&&(t.axisPointer.link=[e])}}),$e(Wr.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=tP(t,e)}),mt({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},LN);var hS=["x","y"],ZN=["width","height"],YN=Wi.extend({makeElOption:function(t,e,r,a,i){var n=r.axis,o=n.coordinateSystem,s=Fg(o,1-Sh(n)),l=o.dataToPoint(e)[0],u=a.get("type");if(u&&u!=="none"){var h=Vg(a),f=XN[u](n,l,s);f.style=h,t.graphicKey=f.type,t.pointer=f}var c=Ng(r);nS(e,t,c,r,a,i)},getHandleTransform:function(t,e,r){var a=Ng(e,{labelInside:!1});return a.labelMargin=r.get("handle.margin"),{position:Gg(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=Sh(i),s=Fg(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=Fg(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"}}}}),XN={line:function(t,e,r){var a=Hg([e,r[0]],[e,r[1]],Sh(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:oS([e-a/2,r[0]],[a,i],Sh(t))}}};function Sh(t){return t.isHorizontal()?0:1}function Fg(t,e){var r=t.getRect();return[r[hS[e]],r[hS[e]]+r[ZN[e]]]}Xe.registerAxisPointerClass("SingleAxisPointer",YN),he({type:"single"});var Wg=2,qN=Vt.extend({type:"series.themeRiver",dependencies:["singleAxis"],nameMap:null,init:function(t){qN.superApply(this,"init",arguments),this.legendVisualProvider=new ws(it(this.getData,this),it(this.getRawData,this))},fixData:function(t){var e=t.length,r=Oc(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=ee(t.data,function(c){return c[2]!==void 0}),n=this.fixData(i||[]),o=[],s=this.nameMap=ht(),l=0,u=0;u<n.length;++u)o.push(n[u][Wg]),s.get(n[u][Wg])||(s.set(n[u][Wg],l),l++);var h=En(n,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:Iu(a)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}),f=new fe(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=Oc(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){z(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="-"),kt(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}}}});ke({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 ha(this._layersSeries||[],n,u,u),f={};h.add(it(c,this,"add")).update(it(c,this,"update")).remove(it(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=[],_,w=n[d].indices,b=0;b<w.length;b++){var A=a.getItemLayout(w[b]),S=A.x,D=A.y0,I=A.y;m.push([S,D]),y.push([S,D+I]),_=a.getItemVisual(w[b],"color")}var L,P,R=a.getItemLayout(w[0]),E=a.getItemModel(w[b-1]),Z=E.getModel("label"),W=Z.get("margin");if(v==="add"){var $=f[d]=new q;L=new C1({shape:{points:m,stackedOnPoints:y,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),P=new dt({style:{x:R.x-W,y:R.y0+R.y/2}}),$.add(L),$.add(P),i.add($),L.setClipPath(KN(L.getBoundingRect(),t,function(){L.removeClipPath()}))}else{var $=p[g];L=$.childAt(0),P=$.childAt(1),i.add($),f[d]=$,ft(L,{shape:{points:m,stackedOnPoints:y}},t),ft(P,{style:{x:R.x-W,y:R.y0+R.y/2}},t)}var X=E.getModel("emphasis.itemStyle"),K=E.getModel("itemStyle");$t(P.style,Z,{text:Z.get("show")?t.getFormattedLabel(w[b-1],"normal")||a.getName(w[b-1]):null,textVerticalAlign:"middle"}),L.setStyle(et({fill:_},K.getItemStyle(["color"]))),Ot(L,X.getItemStyle())}this._layersSeries=n,this._layers=f},dispose:function(){}});function KN(t,e,r){var a=new xt({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return Se(a,{shape:{width:t.width+20,height:t.height+20}},e,r),a}var jN=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]=H(s[0],o.height),s[1]=H(s[1],o.height);var u=o.height-s[0]-s[1];fS(a,r,u)}else{s[0]=H(s[0],o.width),s[1]=H(s[1],o.width);var h=o.width-s[0]-s[1];fS(a,r,h)}a.setLayout("layoutInfo",n)})};function fS(t,e,r){if(!!t.count())for(var a=e.coordinateSystem,i=e.getLayerSeries(),n=t.mapDimension("single"),o=t.mapDimension("value"),s=V(i,function(p){return V(p.indices,function(m){var y=a.dataToPoint(t.get(n,m));return y[1]=t.get(o,m),y})}),l=QN(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 QN(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 JN=function(t){t.eachSeriesByType("themeRiver",function(e){var r=e.getData(),a=e.getRawData(),i=e.get("color"),n=ht();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)})})};Gt(jN),Rt(JN),$e(bs("themeRiver")),Vt.extend({type:"series.sunburst",_viewRoot:null,getInitialData:function(t,e){var r={name:t.name,children:t.data};cS(r);var a=t.levels||[],i={};return i.levels=a,Ei.createTree(r,this,i).data},optionUpdated:function(){this.resetViewRoot()},getDataParams:function(t){var e=Vt.prototype.getDataParams.apply(this,arguments),r=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=Hd(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 cS(t){var e=0;M(t.children,function(a){cS(a);var i=a.value;z(i)&&(i=i[0]),e+=i});var r=t.value;z(r)&&(r=r[0]),(r==null||isNaN(r))&&(r=e),r<0&&(r=0),z(t.value)?t.value[0]=r:t.value=r}var Ah={NONE:"none",DESCENDANT:"descendant",ANCESTOR:"ancestor",SELF:"self"},tk=2,ek=4;function Th(t,e,r){q.call(this);var a=new Ar({z2:tk});a.seriesIndex=e.seriesIndex;var i=new dt({z2:ek,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 Ui=Th.prototype;Ui.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=et({},s);l.label=null;var u=rk(e,a,i);nk(e,a,u);var h=o.getModel("itemStyle").getItemStyle(),f;if(r==="normal")f=h;else{var c=o.getModel(r+".itemStyle").getItemStyle();f=ut(c,h)}f=J({lineJoin:"bevel",fill:f.fill||u},f),t?(n.setShape(l),n.shape.r=s.r0,ft(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?(ft(n,{shape:l},a),n.useStyle(f)):ft(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,Ot(this)},Ui.onEmphasis=function(t){var e=this;this.node.hostTree.root.eachNode(function(r){r.piece&&(e.node===r?r.piece.updateData(!1,r,"emphasis"):ik(r,e.node,t)?r.piece.childAt(0).trigger("highlight"):t!==Ah.NONE&&r.piece.childAt(0).trigger("downplay"))})},Ui.onNormal=function(){this.node.hostTree.root.eachNode(function(t){t.piece&&t.piece.updateData(!1,t,"normal")})},Ui.onHighlight=function(){this.updateData(!1,this.node,"highlight")},Ui.onDownplay=function(){this.updateData(!1,this.node,"downplay")},Ui._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=Ut(t.getFormattedLabel(this.node.dataIndex,r,null,null,"label"),this.node.name);S("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);Fe(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=S("position"),m=S("distance")||0,y=S("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:S("verticalAlign")||"middle",opacity:S("opacity")});var _=g*v+l.cx,w=g*d+l.cy;f.attr("position",[_,w]);var b=S("rotate"),A=0;b==="radial"?(A=-c,A<-Math.PI/2&&(A+=Math.PI)):b==="tangential"?(A=Math.PI/2-c,A>Math.PI/2?A-=Math.PI:A<-Math.PI/2&&(A+=Math.PI)):typeof b=="number"&&(A=b*Math.PI/180),f.attr("rotation",A);function S(D){var I=n.get(D);return I??i.get(D)}},Ui._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)},It(Th,q);function rk(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[ak(t)%o],n}function ak(t){for(var e=t;e.depth>1;)e=e.parentNode;var r=t.getAncestors()[0];return yt(r.children,e)}function ik(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 nk(t,e,r){var a=e.getData();a.setItemVisual(t.dataIndex,"color",r)}var ok="sunburstRootToNode",J5=ue.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 ha(_,y,w,w).add(b).update(b).remove(ot(b,null)).execute();function w(A){return A.getId()}function b(A,S){var D=A==null?null:y[A],I=S==null?null:_[S];g(D,I)}}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 w=new Th(y,t,e);l.add(w),n.setItemGraphicEl(y.dataIndex,w)}}}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 Th(y,t,e),l.add(i.virtualPiece)),_.piece._onclickEvent&&_.piece.off("click",_.piece._onclickEvent);var w=function(b){i._rootToNode(_.parentNode)};_.piece._onclickEvent=w,i.virtualPiece.on("click",w)}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";Zo(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:ok,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}}}),vS="sunburstRootToNode";mt({type:vS,update:"updateView"},function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},r);function r(a,i){var n=Is(t,[vS],a);if(n){var o=a.getViewRoot();o&&(t.direction=Gd(o,n.node)?"rollUp":"drillDown"),a.resetViewRoot(n.node)}}});var dS="sunburstHighlight";mt({type:dS,update:"updateView"},function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},r);function r(a,i){var n=Is(t,[dS],a);n&&(t.highlight=n.node)}});var sk="sunburstUnhighlight";mt({type:sk,update:"updateView"},function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},r);function r(a,i){t.unhighlight=!0}});var gS=Math.PI/180,lk=function(t,e,r,a){e.eachSeriesByType(t,function(i){var n=i.get("center"),o=i.get("radius");z(o)||(o=[0,o]),z(n)||(n=[n,n]);var s=r.getWidth(),l=r.getHeight(),u=Math.min(s,l),h=H(n[0],s),f=H(n[1],l),c=H(o[0],u/2),v=H(o[1],u/2),d=-i.get("startAngle")*gS,g=i.get("minAngle")*gS,p=i.getData().tree.root,m=i.getViewRoot(),y=m.depth,_=i.get("sort");_!=null&&pS(m,_);var w=0;M(m.children,function(X){!isNaN(X.getValue())&&w++});var b=m.getValue(),A=Math.PI/(b||w)*2,S=m.depth>0,D=m.height-(S?-1:1),I=(v-c)/(D||1),L=i.get("clockwise"),P=i.get("stillShowZeroSum"),R=L?1:-1,E=function(X,K){if(!!X){var Q=K;if(X!==p){var j=X.getValue(),U=b===0&&P?A:j*A;U<g&&(U=g),Q=K+R*U;var tt=X.depth-y-(S?-1:1),ct=c+I*tt,bt=c+I*(tt+1),Et=X.getModel();Et.get("r0")!=null&&(ct=H(Et.get("r0"),u/2)),Et.get("r")!=null&&(bt=H(Et.get("r"),u/2)),X.setLayout({angle:U,startAngle:K,endAngle:Q,clockwise:L,cx:h,cy:f,r0:ct,r:bt})}if(X.children&&X.children.length){var ie=0;M(X.children,function(ol){ie+=E(ol,K+ie)})}return Q-K}};if(S){var Z=c,W=c+I,$=Math.PI*2;p.setLayout({angle:$,startAngle:d,endAngle:d+$,clockwise:L,cx:h,cy:f,r0:Z,r:W})}E(m,d)})};function pS(t,e){var r=t.children||[];t.children=uk(r,e),r.length&&M(t.children,function(a){pS(a,e)})}function uk(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})}Rt(ot(Zu,"sunburst")),Gt(ot(lk,"sunburst")),$e(ot(bs,"sunburst"));function hk(t,e){return e=e||[0,0],V(["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 fk=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:it(hk,t)}}};function ck(t,e){return e=e||[0,0],V([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 vk=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:it(ck,t)}}};function dk(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 gk=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:it(dk,t)}}};function pk(t,e){return V(["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 mk=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:it(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:it(pk,t)}}},yk=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)}}}},mS=X0,_k=["itemStyle"],xk=["emphasis","itemStyle"],wk=["label"],bk=["emphasis","label"],Sk="e\0\0",yS={cartesian2d:fk,geo:vk,singleAxis:gk,polar:mk,calendar:yk};Vt.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 ca(this.getSource(),this)},getDataParams:function(t,e,r){var a=Vt.prototype.getDataParams.apply(this,arguments);return r&&(a.info=r.info),a}}),ue.extend({type:"custom",_data:null,render:function(t,e,r,a){var i=this._data,n=t.getData(),o=this.group,s=xS(t,n,e,r);n.diff(i).add(function(u){Ug(null,u,s(u,a),t,o,n)}).update(function(u,h){var f=i.getItemGraphicEl(h);Ug(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)?Gu(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=xS(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=Ug(null,l,o(l,i),e,this.group,n);u.traverse(s)}},dispose:ce,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 Ak(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=TS(a);r=zo(n,null,i,a.layout||"center"),r.__customPathData=n}else if(e==="image")r=new ve({}),r.__customImagePath=t.style.image;else if(e==="text")r=new dt({}),r.__customText=t.style.text;else if(e==="group")r=new q;else{if(e==="compoundPath")throw new Error('"compoundPath" is not supported yet.');var o=Zc(e);T&>(o,'graphic type "'+e+'" can not be found.'),r=new o}return r.__customGraphicType=e,r.name=t.name,r}function Tk(t,e,r,a,i,n,o){var s={},l=r.style||{};if(r.shape&&(s.shape=rt(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={};M(["x","y","width","height"],function(c){_S(c,u,l,t.style,n)})}if(t.type==="text"&&r.style){var u=s.style={};M(["x","y"],function(v){_S(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),Se(t,{style:{opacity:h}},a,e)}n?t.attr(s):ft(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;Vo(t,f),o&&mi(t,f!==!1)}function _S(t,e,r,a,i){r[t]!=null&&!i&&(e[t]=r[t],r[t]=a[t])}function xS(t,e,r,a){var i=t.get("renderItem"),n=t.coordinateSystem,o={};n&&(T&&(gt(i,"series.render is required."),gt(n.prepareCustoms||yS[n.type],"This coordSys does not support custom series.")),o=n.prepareCustoms?n.prepareCustoms():yS[n.type](n));var s=J({getWidth:a.getWidth,getHeight:a.getHeight,getZr:a.getZr,getDevicePixelRatio:a.getDevicePixelRatio,value:p,style:m,styleEmphasis:y,visual:_,barLayout:w,currentSeriesIndices:b,font:A},o.api||{}),l={context:{},seriesId:t.id,seriesName:t.name,seriesIndex:t.seriesIndex,coordSys:o.coordSys,dataInsideLength:e.count(),encode:Ck(t.getData())},u,h=!0,f,c,v,d;return function(S,D){return u=S,h=!0,i&&i(J({dataIndexInside:S,dataIndex:e.getRawIndex(S),actionType:D?D.type:null},l),s)};function g(S){S==null&&(S=u),h&&(f=e.getItemModel(S),c=f.getModel(wk),v=f.getModel(bk),d=e.getItemVisual(S,"color"),h=!1)}function p(S,D){return D==null&&(D=u),e.get(e.getDimension(S||0),D)}function m(S,D){D==null&&(D=u),g(D);var I=f.getModel(_k).getItemStyle();d!=null&&(I.fill=d);var L=e.getItemVisual(D,"opacity");L!=null&&(I.opacity=L);var P=S?SS(S,c):c;return $t(I,P,null,{autoColor:d,isRectText:!0}),I.text=P.getShallow("show")?Xt(t.getFormattedLabel(D,"normal"),Bu(e,D)):null,S&&AS(I,S),I}function y(S,D){D==null&&(D=u),g(D);var I=f.getModel(xk).getItemStyle(),L=S?SS(S,v):v;return $t(I,L,null,{isRectText:!0},!0),I.text=L.getShallow("show")?ni(t.getFormattedLabel(D,"emphasis"),t.getFormattedLabel(D,"normal"),Bu(e,D)):null,S&&AS(I,S),I}function _(S,D){return D==null&&(D=u),e.getItemVisual(D,S)}function w(S){if(n.getBaseAxis){var D=n.getBaseAxis();return H2(J({axis:D},S),a)}}function b(){return r.getCurrentSeriesIndices()}function A(S){return Kc(S,r)}}function Ck(t){var e={};return M(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 Ug(t,e,r,a,i,n){return t=$g(t,e,r,a,i,n,!0),t&&n.setItemGraphicEl(e,t),t}function $g(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"&&Lk(u)&&TS(u)!==t.__customPathData||l==="image"&&CS(h,"image")&&h.image!==t.__customImagePath||l==="text"&&CS(u,"text")&&h.text!==t.__customText)&&(i.remove(t),t=null),!s){var f=!t;return!t&&(t=Ak(r)),Tk(t,e,r,a,n,f,o),l==="group"&&Dk(t,e,r,a,n),i.add(t),t}}function Dk(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){Mk({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]&&$g(t.childAt(h),e,n[h],a,t,i);T&>(!u||t.childCount()===h,"MUST NOT contain empty item in children array when `group.$mergeChildren` is `false`.")}}function Mk(t){new ha(t.oldChildren,t.newChildren,wS,wS,t).add(bS).update(bS).remove(Ik).execute()}function wS(t,e){var r=t&&t.name;return r??Sk+e}function bS(t,e){var r=this.context,a=t!=null?r.newChildren[t]:null,i=e!=null?r.oldChildren[e]:null;$g(i,r.dataIndex,a,r.animatableModel,r.group,r.data)}function SS(t,e){var r=new _t({},e);return M(mS,function(a,i){t.hasOwnProperty(a)&&(r.option[i]=t[a])}),r}function AS(t,e){for(var r in e)(e.hasOwnProperty(r)||!mS.hasOwnProperty(r))&&(t[r]=e[r])}function Ik(t){var e=this.context,r=e.oldChildren[t];r&&e.group.remove(r)}function TS(t){return t&&(t.pathData||t.d)}function Lk(t){return t&&(t.hasOwnProperty("pathData")||t.hasOwnProperty("d"))}function CS(t,e){return t&&t.hasOwnProperty(e)}function DS(t){return t.get("stack")||"__ec_stack_"+t.seriesIndex}function MS(t,e){return e.dim+t.model.componentIndex}function Pk(t,e,r){var a={},i=Ek(ee(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=MS(s,l),h=DS(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),w=o.mapDimension(l.dim),b=fa(o,_),A=l.dim!=="radius"||!n.get("roundCap",!0),S=d.getExtent()[0],D=0,I=o.count();D<I;D++){var L=o.get(_,D),P=o.get(w,D),R=L>=0?"p":"n",E=S;b&&(a[h][P]||(a[h][P]={p:S,n:S}),E=a[h][P][R]);var Z,W,$,X;if(d.dim==="radius"){var K=d.dataToRadius(L)-S,Q=l.dataToAngle(P);Math.abs(K)<m&&(K=(K<0?-1:1)*m),Z=E,W=E+K,$=Q-c,X=$-v,b&&(a[h][P][R]=W)}else{var j=d.dataToAngle(L,A)-S,U=l.dataToRadius(P);Math.abs(j)<y&&(j=(j<0?-1:1)*y),Z=U+c,W=Z+v,$=E,X=E+j,b&&(a[h][P][R]=X)}o.setItemLayout(D,{cx:g,cy:p,r0:Z,r:W,startAngle:-$*Math.PI/180,endAngle:-X*Math.PI/180})}}},this)}function Ek(t,e){var r={};M(t,function(i,n){var o=i.getData(),s=i.coordinateSystem,l=s.getBaseAxis(),u=MS(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=DS(i);v[d]||c.autoWidthCount++,v[d]=v[d]||{width:0,maxWidth:0};var g=H(i.get("barWidth"),f),p=H(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 M(r,function(i,n){a[n]={};var o=i.stacks,s=i.bandWidth,l=H(i.categoryGap,s),u=H(i.gap,1),h=i.remainedWidth,f=i.autoWidthCount,c=(h-l)/(f+(f-1)*u);c=Math.max(c,0),M(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;M(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;M(o,function(p,m){a[n][m]=a[n][m]||{offset:g,width:p.width},g+=p.width*(1+u)})}),a}function Ch(t,e){Qt.call(this,"radius",t,e),this.type="category"}Ch.prototype={constructor:Ch,pointToData:function(t,e){return this.polar.pointToData(t,e)[this.dim==="radius"?0:1]},dataToRadius:Qt.prototype.dataToCoord,radiusToData:Qt.prototype.coordToData},It(Ch,Qt);var Rk=Pe();function Dh(t,e){e=e||[0,360],Qt.call(this,"angle",t,e),this.type="category"}Dh.prototype={constructor:Dh,pointToData:function(t,e){return this.polar.pointToData(t,e)[this.dim==="radius"?0:1]},dataToAngle:Qt.prototype.dataToCoord,angleToData:Qt.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=Rr(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=Rk(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}},It(Dh,Qt);var Mh=function(t){this.name=t||"",this.cx=0,this.cy=0,this._radiusAxis=new Ch,this._angleAxis=new Dh,this._radiusAxis.polar=this._angleAxis.polar=this};Mh.prototype={type:"polar",axisPointerEnabled:!0,constructor:Mh,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 Zg=wt.extend({type:"polarAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"polar",index:this.option.polarIndex,id:this.option.polarId})[0]}});ut(Zg.prototype,Di);var IS={angle:{startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:!1}},radius:{splitNumber:5}};function LS(t,e){return e.type||(e.data?"category":"value")}Gn("angle",Zg,LS,IS.angle),Gn("radius",Zg,LS,IS.radius),Ze({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 Ok(t,e,r){var a=e.get("center"),i=r.getWidth(),n=r.getHeight();t.cx=H(a[0],i),t.cy=H(a[1],n);var o=t.getRadiusAxis(),s=Math.min(i,n)/2,l=e.get("radius");l==null?l=[0,"100%"]:z(l)||(l=[0,l]),l=[H(l[0],s),H(l[1],s)],o.inverse?o.setExtent(l[1],l[0]):o.setExtent(l[0],l[1])}function Nk(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();M(l.mapDimension("radius",!0),function(u){i.scale.unionExtentFromData(l,fs(l,u))}),M(l.mapDimension("angle",!0),function(u){a.scale.unionExtentFromData(l,fs(l,u))})}}),Fa(a.scale,a.model),Fa(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 PS(t,e){if(t.type=e.get("type"),t.scale=zn(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 kk={dimensions:Mh.prototype.dimensions,create:function(t,e){var r=[];return t.eachComponent("polar",function(a,i){var n=new Mh(i);n.update=Nk;var o=n.getRadiusAxis(),s=n.getAngleAxis(),l=a.findAxisModel("radiusAxis"),u=a.findAxisModel("angleAxis");PS(o,l),PS(s,u),Ok(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(T&&!i)throw new Error('Polar "'+Ut(a.get("polarIndex"),a.get("polarId"),0)+'" not found');a.coordinateSystem=i.coordinateSystem}}),r}};_e.register("polar",kk);var zk=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function Ih(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 Lh(t){var e=t.getRadiusAxis();return e.inverse?0:1}function ES(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()}Xe.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=V(r.getViewLabels(),function(u){var u=rt(u);return u.coord=r.dataToCoord(u.tickValue),u});ES(s),ES(n),M(zk,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=Lh(e),s=o?0:1,l;i[s]===0?l=new Br({shape:{cx:e.cx,cy:e.cy,r:i[o]},style:n.getLineStyle(),z2:1,silent:!0}):l=new Yl({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[Lh(e)],l=V(r,function(u){return new ye({shape:Ih(e,[s,s+o],u.coord)})});this.group.add(or(l,{style:J(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[Lh(e)],u=[],h=0;h<a.length;h++)for(var f=0;f<a[h].length;f++)u.push(new ye({shape:Ih(e,[l,l+s],a[h][f].coord)}));this.group.add(or(u,{style:J(o.getModel("lineStyle").getLineStyle(),J(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");M(n,function(h,f){var c=s,v=h.tickValue,d=i[Lh(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 _t(o[v].textStyle,s,s.ecModel));var w=new dt({silent:ze.isLabelSilent(t)});this.group.add(w),$t(w.style,c,{x:g[0],y:g[1],textFill:c.getTextColor()||t.get("axisLine.lineStyle.color"),text:h.formattedLabel,textAlign:y,textVerticalAlign:_}),u&&(w.eventData=ze.makeAxisEventDataBase(t),w.eventData.targetType="axisLabel",w.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 ye({shape:Ih(e,i,r[h].coord)}))}for(var h=0;h<u.length;h++)this.group.add(or(u[h],{style:J({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 ye({shape:Ih(e,i,a[l][u].coord)}));this.group.add(or(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 Ar({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(or(u[g],{style:J({fill:s[g%s.length]},o.getAreaStyle()),silent:!0}))}}});var Bk=["axisLine","axisTickLabel","axisName"],Vk=["splitLine","splitArea","minorSplitLine"];Xe.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=Gk(a,t,s),h=new ze(t,u);M(Bk,h.add,h),this.group.add(h.getGroup()),M(Vk,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 Br({shape:{cx:e.cx,cy:e.cy,r:i[h].coord}}))}for(var h=0;h<u.length;h++)this.group.add(or(u[h],{style:J({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 Br({shape:{cx:e.cx,cy:e.cy,r:n[u][h].coord}}));this.group.add(or(l,{style:J({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 Ar({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(or(u[f],{style:J({fill:s[f%s.length]},o.getAreaStyle()),silent:!0}))}}});function Gk(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 Hk=Wi.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"+su(n.dim)](e);var h=a.get("type");if(h&&h!=="none"){var f=Vg(a),c=Wk[h](n,o,u,l,f);c.style=f,t.graphicKey=c.type,t.pointer=c}var v=a.get("label.margin"),d=Fk(e,r,a,o,v);aS(t,r,a,i,d)}});function Fk(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=Ie();aa(c,c,s),yr(c,c,[a.cx,a.cy]),u=Hr([o,-i],c);var v=e.getModel("axisLabel").get("rotate")||0,d=ze.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 Wk={line:function(t,e,r,a,i){return t.dim==="angle"?{type:"Line",shape:Hg(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:sS(e.cx,e.cy,a[0],a[1],(-r-n/2)*o,(-r+n/2)*o)}:{type:"Sector",shape:sS(e.cx,e.cy,r-n/2,r+n/2,0,Math.PI*2)}}};Xe.registerAxisPointerClass("PolarAxisPointer",Hk),Gt(ot(Pk,"bar")),he({type:"polar"});var Uk=wt.extend({type:"geo",coordinateSystem:null,layoutMode:"box",init:function(t){wt.prototype.init.apply(this,arguments),fi(t,"label",["show"])},optionUpdated:function(){var t=this.option,e=this;t.regions=Gx.getFilledRegions(t.regions,t.map,t.nameMap),this._optionModelMap=an(t.regions||[],function(r,a){return a.name&&r.set(a.name,new _t(a,e)),r},ht()),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 _t(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}});Dt(Uk,Sd),he({type:"geo",init:function(t,e){var r=new ju(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 Yg(t,e){e.update="updateView",mt(e,function(r,a){var i={};return a.eachComponent({mainType:"geo",query:r},function(n){n[t](r.name);var o=n.coordinateSystem;M(o.regions,function(s){i[s.name]=n.isSelected(s.name)||!1})}),{selected:i,name:r.name}})}Yg("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),Yg("select",{type:"geoSelect",event:"geoselected"}),Yg("unSelect",{type:"geoUnSelect",event:"geounselected"});var Xg=864e5;function pa(t,e,r){this._model=t}pa.prototype={constructor:pa,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=$o(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];M([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=qt(n,s);M([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){z(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+Xg))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:ot(RS,"dataToPoint"),convertFromPixel:ot(RS,"pointToData"),_initRangeOption:function(){var t=this._model.get("range"),e=t;if(z(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/Xg)-Math.floor(t[0].time/Xg)+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)}},pa.dimensions=pa.prototype.dimensions,pa.getDimensionsInfo=pa.prototype.getDimensionsInfo,pa.create=function(t,e){var r=[];return t.eachComponent("calendar",function(a){var i=new pa(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 RS(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}_e.register("calendar",pa);var OS=wt.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=Cn(t);OS.superApply(this,"init",arguments),NS(t,i)},mergeOption:function(t,e){OS.superApply(this,"mergeOption",arguments),NS(this.option,t)}});function NS(t,e){var r=t.cellSize;z(r)?r.length===1&&(r[1]=r[0]):r=t.cellSize=[r,r];var a=V([0,1],function(i){return LM(e,i)&&(r[i]="auto"),r[i]!=null&&r[i]!=="auto"});za(t,e,{type:"box",ignoreSize:a})}var $k={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"]},Zk={EN:["S","M","T","W","T","F","S"],CN:["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"]};he({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 xt({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 ir({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?by(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 dt({z2:30});$t(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];Lt(i)&&(i=$k[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),w=new dt({z2:30});et($t(w.style,a,{text:_}),this._monthTextPositionControl(v,f,e,o,n)),r.add(w)}}},_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();Lt(s)&&(s=Zk[s.toUpperCase()]||[]);var h=n.getNextNDay(e.end.time,7-e.lweek).time,f=[n.getCellWidth(),n.getCellHeight()];l=H(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 dt({z2:30});et($t(p.style,i,{text:s[g]}),this._weekTextPositionControl(d,r,o,l,f)),a.add(p)}}}});var kS={path:null,compoundPath:null,group:q,image:ve,text:dt};we(function(t){var e=t.graphic;z(e)?!e[0]||!e[0].elements?t.graphic=[{elements:e}]:t.graphic=[t.graphic[0]]:e&&!e.elements&&(t.graphic=[{elements:[e]}])});var Yk=Ze({type:"graphic",defaultOption:{elements:[],parentId:null},_elOptionsToUpdate:null,mergeOption:function(t){var e=this.option.elements;this.option.elements=null,Yk.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=Pc(i,n);m0(o);var s=this._elOptionsToUpdate=[];M(o,function(u,h){var f=u.option;T&>(lt(f)||u.exist,"Empty graphic option definition"),f&&(s.push(f),qk(u,f),Kk(i,h,f),jk(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){M(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}});he({type:"graphic",init:function(t,e){this._elMap=ht(),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;M(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=Xk(i);T&&s&>(u===s.parent,"Changing parent is not supported."),!n||n==="merge"?s?s.attr(f):zS(o,u,f,r):n==="replace"?(Ph(s,r),zS(o,u,f,r)):n==="remove"&&Ph(s,r);var c=r.get(o);c&&(c.__ecGraphicWidthOption=i.width,c.__ecGraphicHeightOption=i.height,Qk(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=H(u.__ecGraphicWidthOption,f?n:h.__ecGraphicWidth)||0,u.__ecGraphicHeight=H(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};uu(u,l,c,null,{hv:l.hv,boundingMode:l.bounding})}}},_clear:function(){var t=this._elMap;t.each(function(e){Ph(e,t)}),this._elMap=ht()},dispose:function(){this._clear()}});function zS(t,e,r,a){var i=r.type;T&>(i,"graphic type MUST be set");var n=kS.hasOwnProperty(i)?kS[i]:Zc(i);T&>(n,"graphic type can not be found");var o=new n(r);e.add(o),a.set(t,o),o.__ecGraphicId=t}function Ph(t,e){var r=t&&t.parent;r&&(t.type==="group"&&t.traverse(function(a){Ph(a,e)}),e.removeKey(t.__ecGraphicId),r.remove(t))}function Xk(t){return t=et({},t),M(["id","parentId","$action","hv","bounding"].concat(Ay),function(e){delete t[e]}),t}function BS(t,e){var r;return M(e,function(a){t[a]!=null&&t[a]!=="auto"&&(r=!0)}),r}function qk(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 Kk(t,e,r){var a=et({},r),i=t[e],n=r.$action||"merge";if(n==="merge")if(i){if(T){var o=r.type;gt(!o||i.type===o,'Please set $action: "replace" to change `type`')}ut(i,a,!0),za(i,a,{ignoreSize:!0}),Ty(r,i)}else t[e]=a;else n==="replace"?t[e]=a:n==="remove"&&i&&(t[e]=null)}function jk(t,e){!t||(t.hv=e.hv=[BS(e,["left","right"]),BS(e,["top","bottom"])],t.type==="group"&&(t.width==null&&(t.width=e.width=0),t.height==null&&(t.height=e.height=0)))}function Qk(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 VS={};function io(t,e){VS[t]=e}function GS(t){return VS[t]}var Jk=Ze({type:"toolbox",layoutMode:{type:"box",ignoreSize:!0},optionUpdated:function(){Jk.superApply(this,"optionUpdated",arguments),M(this.option.feature,function(t,e){var r=GS(e);r&&ut(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 tz(t,e,r){var a=e.getBoxLayoutParams(),i=e.get("padding"),n={width:r.getWidth(),height:r.getHeight()},o=qt(a,n,i);bi(e.get("orient"),t,e.get("itemGap"),o.width,o.height),uu(t,a,n,i)}function HS(i,e){var r=xi(e.get("padding")),a=e.getItemStyle(["color","opacity"]);a.fill=e.get("backgroundColor");var i=new xt({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}he({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=[];M(o,function(f,c){l.push(c)}),new ha(this._featureNames||[],l).add(u).update(u).remove(ot(u,null)).execute(),this._featureNames=l;function u(f,c){var v=l[f],d=l[c],g=o[v],p=new _t(g,t,t.ecModel),m;if(a&&a.newTitle!=null&&a.featureName===v&&(g.title=a.newTitle),v&&!d){if(ez(v))m={model:p,onclick:p.option.onclick,featureName:v};else{var y=GS(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(_,w){var b=this.option,A=this.iconPaths;b.iconStatus=b.iconStatus||{},b.iconStatus[_]=w,A[_]&&A[_].trigger(w)},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 w=f.iconPaths={};M(p,function(b,A){var S=Ho(b,{},{x:-n/2,y:-n/2,width:n,height:n});S.setStyle(d.getItemStyle()),S.hoverStyle=g.getItemStyle(),S.setStyle({text:m[A],textAlign:g.get("textAlign"),textBorderRadius:g.get("textBorderRadius"),textPadding:g.get("textPadding"),textFill:null});var D=t.getModel("tooltip");D&&D.get("show")&&S.attr("tooltip",et({content:m[A],formatter:D.get("formatter",!0)||function(){return m[A]},formatterParams:{componentType:"toolbox",name:A,title:m[A],$vars:["name","title"]},position:D.get("position",!0)||"bottom"},D.option)),Ot(S),t.get("showTitle")&&(S.__title=m[A],S.on("mouseover",function(){var I=g.getItemStyle(),L=t.get("orient")==="vertical"?t.get("right")==null?"right":"left":t.get("bottom")==null?"bottom":"top";S.setStyle({textFill:g.get("textFill")||I.fill||I.stroke||"#000",textBackgroundColor:g.get("textBackgroundColor"),textPosition:g.get("textPosition")||L})}).on("mouseout",function(){S.setStyle({textFill:null,textBackgroundColor:null})})),S.trigger(f.get("iconStatus."+A)||"normal"),i.add(S),S.on("click",it(c.onclick,c,e,r,A)),w[A]=S})}tz(i,t,r),i.add(HS(i.getBoundingRect(),t)),i.eachChild(function(f){var c=f.__title,v=f.hoverStyle;if(v&&c){var d=Rr(c,Qm(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){M(this._features,function(i){i.updateView&&i.updateView(i.model,e,r,a)})},remove:function(t,e){M(this._features,function(r){r.remove&&r.remove(t,e)}),this.group.removeAll()},dispose:function(t,e){M(this._features,function(r){r.dispose&&r.dispose(t,e)})}});function ez(t){return t.indexOf("my")===0}var FS=ua.toolbox.saveAsImage;function Eh(t){this.model=t}Eh.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:FS.title,type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:FS.lang.slice()},Eh.prototype.unusable=!G.canvasSupported;var rz=Eh.prototype;rz.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"&&!G.browser.ie&&!G.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)}},io("saveAsImage",Eh);var Rh=ua.toolbox.magicType,qg="__ec_magicType_stack__";function Kg(t){this.model=t}Kg.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:rt(Rh.title),option:{},seriesIndex:{}};var WS=Kg.prototype;WS.getIcons=function(){var t=this.model,e=t.get("icon"),r={};return M(t.get("type"),function(a){e[a]&&(r[a]=e[a])}),r};var US={line:function(t,e,r,a){if(t==="bar")return ut({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 ut({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")===qg;if(t==="line"||t==="bar")return a.setIconStatus("stack",i?"normal":"emphasis"),ut({id:e,stack:i?"":qg},a.get("option.stack")||{},!0)}},az=[["line","bar"],["stack"]];WS.onclick=function(t,e,r){var a=this.model,i=a.get("seriesIndex."+r);if(!!US[r]){var n={series:[]},o=function(u){var h=u.subType,f=u.id,c=US[r](h,f,u,a);c&&(J(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"}}};M(az,function(u){yt(u,r)>=0&&M(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===qg;s=l?ut({stack:Rh.title.tiled},Rh.title):rt(Rh.title)}e.dispatchAction({type:"changeMagicType",currentType:r,newOption:n,newTitle:s,featureName:"magicType"})}},mt({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)}),io("magicType",Kg);var $S=ua.toolbox.dataView,Oh=new Array(60).join("-"),no=" ";function iz(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 nz(t){var e=[];return M(t,function(r,a){var i=r.categoryAxis,n=r.valueAxis,o=n.dim,s=[" "].concat(V(r.series,function(v){return v.name})),l=[i.model.getCategories()];M(r.series,function(v){l.push(v.getRawData().mapArray(o,function(d){return d}))});for(var u=[s.join(no)],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(no))}e.push(u.join(`
| `))}),e.join(`
|
| `+Oh+`
|
| `)}function oz(t){return V(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+no:"")+i.join(no))}),a.join(`
| `)}).join(`
|
| `+Oh+`
|
| `)}function sz(t){var e=iz(t);return{value:ee([nz(e.seriesGroupByCategoryAxis),oz(e.other)],function(r){return r.replace(/[\n\t\s]/g,"")}).join(`
|
| `+Oh+`
|
| `),meta:e.meta}}function Nh(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function lz(t){var e=t.slice(0,t.indexOf(`
| `));if(e.indexOf(no)>=0)return!0}var jg=new RegExp("["+no+"]+","g");function uz(t){for(var e=t.split(/\n+/g),r=Nh(e.shift()).split(jg),a=[],i=V(r,function(l){return{name:l,data:[]}}),n=0;n<e.length;n++){var o=Nh(e[n]).split(jg);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 hz(t){for(var e=t.split(/\n+/g),r=Nh(e.shift()),a=[],i=0;i<e.length;i++){var n=Nh(e[i]).split(jg),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 fz(t,e){var r=t.split(new RegExp(`
| *`+Oh+`
| *`,"g")),a={series:[]};return M(r,function(i,n){if(lz(i)){var o=uz(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=hz(i);a.series.push(o)}}),a}function Us(t){this._dom=null,this.model=t}Us.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:rt($S.title),lang:rt($S.lang),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"},Us.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=sz(t);if(typeof u=="function"){var c=u(e.getOption());typeof c=="string"?s.innerHTML=c:nn(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}Af(p,"click",_),Af(m,"click",function(){var w;try{typeof h=="function"?w=h(s,e.getOption()):w=fz(l.value,v)}catch(b){throw _(),new Error("Data view format error "+b)}w&&e.dispatchAction({type:"changeDataView",newOption:w}),_()}),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},Us.prototype.remove=function(t,e){this._dom&&e.getDom().removeChild(this._dom)},Us.prototype.dispose=function(t,e){this.remove(t,e)};function cz(t,e){return V(t,function(r,a){var i=e&&e[a];return lt(i)&&!z(i)?(lt(r)&&!z(r)&&(r=r.value),J({value:r},i)):r})}io("dataView",Us),mt({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(t,e){var r=[];M(t.newOption.series,function(a){var i=e.getSeriesByName(a.name)[0];if(!i)r.push(et({type:"scatter"},a));else{var n=i.get("data");r.push({name:a.name,data:cz(a.data,n)})}}),e.mergeOption(J({series:r},t.newOption))});var ti=M,kh=yt,zh=ot,Qg=["dataToPoint","pointToData"],vz=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"];function Bh(t,e,r){var a=this._targetInfoList=[],i={},n=ZS(e,t);ti(dz,function(o,s){(!r||!r.include||kh(r.include,s)>=0)&&o(n,a,i)})}var oo=Bh.prototype;oo.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=tp[r.brushType](0,i,a);r.__rangeOffset={offset:KS[r.brushType](n.values,r.range,[1,1]),xyMinMax:n.xyMinMax}}})},oo.matchOutputRanges=function(t,e,r){ti(t,function(a){var i=this.findTargetInfo(a,e);i&&i!==!0&&M(i.coordSyses,function(n){var o=tp[a.brushType](1,n,a.range);r(a,o.values,n,e)})},this)},oo.setInputRanges=function(t,e){ti(t,function(r){var a=this.findTargetInfo(r,e);if(T&&(gt(!a||a===!0||r.coordRange,"coordRange must be specified when coord index specified."),gt(!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=tp[r.brushType](0,a.coordSys,r.coordRange),n=r.__rangeOffset;r.range=n?KS[r.brushType](i.values,n.offset,gz(i.xyMinMax,n.xyMinMax)):i.values}},this)},oo.makePanelOpts=function(t,e){return V(this._targetInfoList,function(r){var a=r.getPanelRect();return{panelId:r.panelId,defaultBrushType:e&&e(r),clipPath:Qw(a),isTargetByCursor:tb(a,t,r.coordSysModel),getLinearBrushOtherExtent:Jw(a)}})},oo.controlSeries=function(t,e,r){var a=this.findTargetInfo(t,r);return a===!0||a&&kh(a.coordSyses,e.coordinateSystem)>=0},oo.findTargetInfo=function(t,e){for(var r=this._targetInfoList,a=ZS(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<YS.length;i++)if(YS[i](a,n))return n}return!0};function Jg(t){return t[0]>t[1]&&t.reverse(),t}function ZS(t,e){return Ol(t,e,{includeMainTypes:vz})}var dz={grid:function(t,e){var r=t.xAxisModels,a=t.yAxisModels,i=t.gridModels,n=ht(),o={},s={};!r&&!a&&!i||(ti(r,function(l){var u=l.axis.grid.model;n.set(u.id,u),o[u.id]=!0}),ti(a,function(l){var u=l.axis.grid.model;n.set(u.id,u),s[u.id]=!0}),ti(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=[];ti(u.getCartesians(),function(f,c){(kh(r,f.getAxis("x").model)>=0||kh(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:XS.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(t,e){ti(t.geoModels,function(r){var a=r.coordinateSystem;e.push({panelId:"geo--"+r.id,geoModel:r,coordSysModel:r,coordSys:a,coordSyses:[a],getPanelRect:XS.geo})})}},YS=[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}],XS={grid:function(){return this.coordSys.grid.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(yi(t)),e}},tp={lineX:zh(qS,0),lineY:zh(qS,1),rect:function(t,e,r){var a=e[Qg[t]]([r[0][0],r[1][0]]),i=e[Qg[t]]([r[0][1],r[1][1]]),n=[Jg([a[0],i[0]]),Jg([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=V(r,function(n){var o=e[Qg[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 qS(t,e,r,a){T&>(r.type==="cartesian2d","lineX/lineY brush is available only in cartesian2d.");var i=r.getAxis(["x","y"][t]),n=Jg(V([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 KS={lineX:zh(jS,0),lineY:zh(jS,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 V(t,function(a,i){return[a[0]-r[0]*e[i][0],a[1]-r[1]*e[i][1]]})}};function jS(t,e,r,a){return[e[0]-a[t]*r[0],e[1]-a[t]*r[1]]}function gz(t,e){var r=QS(t),a=QS(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 QS(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}var JS=M,ep="\0_ec_hist_store";function pz(t,e){var r=rp(t);JS(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 mz(t){var e=rp(t),r=e[e.length-1];e.length>1&&e.pop();var a={};return JS(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 yz(t){t[ep]=null}function _z(t){return rp(t).length}function rp(t){var e=t[ep];return e||(e=t[ep]=[{}]),e}wt.registerSubTypeDefaulter("dataZoom",function(){return"slider"});var xz=["x","y","z","radius","angle","single"],wz=["cartesian2d","polar","singleAxis"];function bz(t){return yt(wz,t)>=0}function Sz(t,e){t=t.slice();var r=V(t,su);e=(e||[]).slice();var a=V(e,su);return function(i,n){M(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 tA=Sz(xz,["axisIndex","axis","index","id"]);function Az(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 yt(s.nodes,o)>=0}function i(o,s){var l=!1;return e(function(u){M(r(o,u)||[],function(h){s.records[u.name][h]&&(l=!0)})}),l}function n(o,s){s.nodes.push(o),e(function(l){M(r(o,l)||[],function(u){s.records[l.name][u]=!0})})}}var $i=M,eA=_i,ap=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};ap.prototype={constructor:ap,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(bz(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 rt(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;$i(["start","end"],function(f,c){var v=t[f],d=t[f+"Value"];i[c]==="percent"?(v==null&&(v=n[c]),d=a.parse(Nt(v,n,e))):(l=!0,d=d==null?e[c]:a.parse(d),v=Nt(d,e,n)),s[c]=d,o[c]=v}),eA(s),eA(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";zi(0,f,v,"all",u["min"+p],u["max"+p]);for(var m=0;m<2;m++)c[m]=Nt(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=Tz(this,this._dimName,e),Dz(this);var r=this.calculateDataWindow(t.settledOption);this._valueWindow=r.valueWindow,this._percentWindow=r.percentWindow,rA(this)}},restore:function(t){t===this._dataZoomModel&&(this._valueWindow=this._percentWindow=null,rA(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;$i(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}):$i(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)}}),$i(u,function(h){l.setApproximateExtent(n,h)}))});function o(s){return s>=n[0]&&s<=n[1]}}};function Tz(t,e,r){var a=[1/0,-1/0];return $i(r,function(i){var n=i.getData();n&&$i(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]),Cz(t,a),a}function Cz(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 rA(t,e){var r=t.getAxisModel(),a=t._percentWindow,i=t._valueWindow;if(!!a){var n=tv(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 Dz(t){var e=t._minMaxSpan={},r=t._dataZoomModel,a=t._dataExtent;$i(["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=Nt(a[0]+o,a,[0,100],!0):n!=null&&(o=Nt(n,[0,100],a,!0)-a[0]),e[i+"Span"]=n,e[i+"ValueSpan"]=o})}var Zi=M,Yi=tA,ip=Ze({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=aA(t);this.settledOption=a,this.mergeDefaultAndTheme(t,r),this.doInit(a)},mergeOption:function(t){var e=aA(t);ut(this.option,t,!0),ut(this.settledOption,e,!0),this.doInit(e)},doInit:function(t){var e=this.option;G.canvasSupported||(e.realtime=!1),this._setDefaultThrottle(t),iA(this,t);var r=this.settledOption;Zi([["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 ap(e.name,r,this,i));t[e.name+"_"+r]=o},this)},_resetTarget:function(){var t=this.option,e=this._judgeAutoMode();Yi(function(r){var a=r.axisIndex;t[a]=me(t[a])},this),e==="axisIndex"?this._autoSetAxisIndex():e==="orient"&&this._autoSetOrient()},_judgeAutoMode:function(){var t=this.option,e=!1;Yi(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):Zi(a.singleAxis,function(n){t&&n.get("orient",!0)===e&&(r.singleAxisIndex=[n.componentIndex],t=!1)})}t&&Yi(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")&&Yi(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(T&&!h)throw new Error(o.axis+' "'+Ut(l,u,0)+'" not found');l=h.componentIndex,yt(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 Yi(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 Yi(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;Yi(function(a){Zi(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;Zi([["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),iA(this,t)},setCalculatedRange:function(t){var e=this.option;Zi(["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 aA(t){var e={};return Zi(["start","end","startValue","endValue","throttle"],function(r){t.hasOwnProperty(r)&&(e[r]=t[r])}),e}function iA(t,e){var r=t._rangePropMode,a=t.get("rangeMode");Zi([["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 np=Fr.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}});ip.extend({type:"dataZoom.select"}),np.extend({type:"dataZoom.select"}),$e({getTargetSeries:function(t){var e=ht();return t.eachComponent("dataZoom",function(r){r.eachTargetAxis(function(a,i,n){var o=n.getAxisProxy(a.name,i);M(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]})})}}),mt("dataZoom",function(t,e){var r=Az(it(e.eachComponent,e,"dataZoom"),tA,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)}),M(a,function(i,n){i.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})});var Mz=ua.toolbox.dataZoom,nA=M,Iz="\0_ec_\0toolbox-dataZoom_";function op(t,e,r){(this._brushController=new ro(r.getZr())).on("brush",it(this._onBrush,this)).mount(),this._isZoomActive}op.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:rt(Mz.title)};var so=op.prototype;so.render=function(t,e,r,a){this.model=t,this.ecModel=e,this.api=r,Ez(t,e,this,a,r),Pz(t,e)},so.onclick=function(t,e,r){Lz[r].call(this)},so.remove=function(t,e){this._brushController.unmount()},so.dispose=function(t,e){this._brushController.dispose()};var Lz={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(mz(this.ecModel))}};so._onBrush=function(t,e){if(!e.isEnd||!t.length)return;var r={},a=this.ecModel;this._brushController.updateCovers([]);var i=new Bh(oA(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)}}),pz(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=zi(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}},so._dispatchZoomAction=function(t){var e=[];nA(t,function(r,a){e.push(rt(r))}),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})};function oA(t){var e={};return M(["xAxisIndex","yAxisIndex"],function(r){e[r]=t[r],e[r]==null&&(e[r]="all"),(e[r]===!1||e[r]==="none")&&(e[r]=[])}),e}function Pz(t,e){t.setIconStatus("back",_z(e)>1?"emphasis":"normal")}function Ez(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 Bh(oA(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)}io("dataZoom",op),we(function(t){if(!t)return;var e=t.dataZoom||(t.dataZoom=[]);z(e)||(t.dataZoom=e=[e]);var r=t.toolbox;if(r&&(z(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"&&!z(u)&&(u=u===!1||u==="none"?[]:[u]),n(o,function(h,f){if(!(u!=null&&u!=="all"&&yt(u,f)===-1)){var c={type:"select",$fromToolbox:!0,filterMode:s.filterMode||"filter",id:Iz+o+f};c[l]=f,e.push(c)}})}}function n(o,s){var l=t[o];z(l)||(l=l?[l]:[]),nA(l,s)}});var Rz=ua.toolbox.restore;function sp(t){this.model=t}sp.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:Rz.title};var Oz=sp.prototype;Oz.onclick=function(t,e,r){yz(t),e.dispatchAction({type:"restore",from:this.uid})},io("restore",sp),mt({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")}),Ze({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 sA=M,Nz=xy,kz=["","-webkit-","-moz-","-o-"],zz="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;";function Bz(t){var e="cubic-bezier(0.23, 1, 0.32, 1)",r="left "+t+"s "+e+",top "+t+"s "+e;return V(kz,function(a){return a+"transition:"+r}).join(";")}function Vz(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"),sA(["decoration","align"],function(i){var n=t.get(i);n&&e.push("text-"+i+":"+n)}),e.join(";")}function Gz(t){var e=[],r=t.get("transitionDuration"),a=t.get("backgroundColor"),i=t.getModel("textStyle"),n=t.get("padding");return r&&e.push(Bz(r)),a&&(G.canvasSupported?e.push("background-Color:"+a):(e.push("background-Color:#"+kf(a)),e.push("filter:alpha(opacity=70)"))),sA(["width","color","radius"],function(o){var s="border-"+o,l=Nz(s),u=t.get(l);u!=null&&e.push(s+":"+u+(o==="color"?"":"px"))}),e.push(Vz(i)),n!=null&&e.push("padding:"+xi(n).join("px ")+"px"),e.join(";")+";"}function lA(t,e,r,a,i){var n=e&&e.painter;if(r){var o=n&&n.getViewportRoot();o&&iC(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 lp(t,e,r){if(G.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],lA(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();Er(u,s,!0),l.dispatch("mousemove",s)}},a.onmouseleave=function(){o._enterable&&o._show&&o.hideLater(o._hideDelay),o._inContent=!1}}lp.prototype={constructor:lp,_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=zz+Gz(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;lA(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(it(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 up(t){this._zr=t.getZr(),this._show=!1,this._hideTimeout}up.prototype={constructor:up,_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 dt({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(it(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 uA=it,$s=M,hA=H,Hz=new xt({shape:{x:-1,y:-1,width:2,height:2}});he({type:"tooltip",init:function(t,e){if(!G.node){var r=t.getComponent("tooltip"),a=r.get("renderMode");this._renderMode=_0(a);var i;this._renderMode==="html"?(i=new lp(e.getDom(),e,{appendToBody:r.get("appendToBody",!0)}),this._newLine="<br/>"):(i=new up(e),this._newLine=`
| `),this._tooltipContent=i}},render:function(t,e,r){if(!G.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");qb("itemTooltip",this._api,uA(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||G.node)){var i=fA(a,r);this._ticket="";var n=a.dataByCoordSys;if(a.tooltip&&a.x!=null&&a.y!=null){var o=Hz;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=Ub(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(fA(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=hp([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=it(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=hp([e.tooltipOption,a]),l=this._renderMode,u=this._newLine,h={};$s(t,function(c){$s(c.dataByAxis,function(v){var d=r.getComponent(v.axisDim+"Axis",v.axisIndex),g=v.value,p=[];if(!(!d||g==null)){var m=iS(g,d.axis,r,v.seriesDataIndices,v.valueLabelOpt);M(v.seriesDataIndices,function(_){var w=r.getSeriesByIndex(_.seriesIndex),b=_.dataIndexInside,A=w&&w.getDataParams(b);if(A.axisDim=v.axisDim,A.axisIndex=v.axisIndex,A.axisType=v.axisType,A.axisId=v.axisId,A.axisValue=ad(d.axis,g),A.axisValueLabel=m,A){o.push(A);var S=w.formatTooltip(b,!0,null,l),D;if(lt(S)){D=S.html;var I=S.markers;ut(h,I)}else D=S;p.push(D)}});var y=m;l!=="html"?n.push(p.join(u)):n.push((y?kt(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=hp([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;lt(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 _t(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=sv(h,r,!0);else if(typeof h=="function"){var c=uA(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()})),z(e))r=hA(e[0],s),a=hA(e[1],l);else if(lt(e)){e.width=u[0],e.height=u[1];var v=qt(e,{width:s,height:l});r=v.x,a=v.y,h=null,f=null}else if(typeof e=="string"&&o){var d=Uz(e,c,u);r=d[0],a=d[1]}else{var d=Fz(r,a,i,s,l,h?null:20,f?null:20);r=d[0],a=d[1]}if(h&&(r-=cA(h)?u[0]/2:h==="right"?u[0]:0),f&&(a-=cA(f)?u[1]/2:f==="bottom"?u[1]:0),t.get("confine")){var d=Wz(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&&$s(e,function(a,i){var n=a.dataByAxis||{},o=t[i]||{},s=o.dataByAxis||[];r&=n.length===s.length,r&&$s(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&&$s(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){G.node||(this._tooltipContent.dispose(),kg("itemTooltip",e))}});function hp(t){for(var e=t.pop();t.length;){var r=t.pop();r&&(_t.isInstance(r)&&(r=r.get("tooltip",!0)),typeof r=="string"&&(r={formatter:r}),e=new _t(r,e,e.ecModel))}return e}function fA(t,e){return t.dispatchAction||it(e.dispatchAction,e)}function Fz(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 Wz(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 Uz(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 cA(t){return t==="center"||t==="middle"}mt({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},function(){}),mt({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},function(){});var $z=["rect","polygon","keep","clear"],Zz=function(t,e){var r=t&&t.brush;if(z(r)||(r=r?[r]:[]),!!r.length){var a=[];M(r,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(a=a.concat(u))});var i=t&&t.toolbox;z(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),Yz(s),e&&!s.length&&s.push.apply(s,$z)}};function Yz(t){var e={};M(t,function(r){e[r]=1}),t.length=0,M(e,function(r,a){t.push(a)})}var vA=M;function dA(t){if(t){for(var e in t)if(t.hasOwnProperty(e))return!0}}function fp(t,e,r){var a={};return vA(e,function(n){var o=a[n]=i();vA(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=rt(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 gA(t,e,r){var a;M(r,function(i){e.hasOwnProperty(i)&&dA(e[i])&&(a=!0)}),a&&M(r,function(i){e.hasOwnProperty(i)&&dA(e[i])?t[i]=rt(e[i]):delete t[i]})}function Xz(t,e,r,a,i,n){var o={};M(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 qz(t,e,r,a){var i={};M(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(_,w){s.setItemVisual(h,_,w)}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 cp={lineX:pA(0),lineY:pA(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])&&Mi(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(Mi(a,i,n)||Mi(a,i+o,n)||Mi(a,i,n+s)||Mi(a,i+o,n+s)||vt.create(t).contain(l[0],l[1])||Fo(i,n,i+o,n,a)||Fo(i,n,i,n+s,a)||Fo(i+o,n,i+o,n+s,a)||Fo(i,n+s,i+o,n+s,a))return!0}}};function pA(t){var e=["x","y"],r=["width","height"];return{point:function(a,i,n){if(a){var o=n.range,s=a[t];return Zs(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(),Zs(s[0],o)||Zs(s[1],o)||Zs(o[0],s)||Zs(o[1],s)}}}}function Zs(t,e){return e[0]<=t&&t<=e[1]}var mA=["inBrush","outOfBrush"],vp="__ecBrushSelect",dp="__ecInBrushSelectEvent",yA=Wr.VISUAL.BRUSH;Gt(yA,function(t,e,r){t.eachComponent({mainType:"brush"},function(a){r&&r.type==="takeGlobalCursor"&&a.setBrushOption(r.key==="brush"?r.brushOption:{brushType:!1})}),_A(t)});function _A(t){t.eachComponent({mainType:"brush"},function(e){var r=e.brushTargetManager=new Bh(e.option,t);r.setInputRanges(e.areas,t)})}Rt(yA,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:rt(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=V(o.areas,function(b){return Jz(J({boundingRect:tB[b.brushType](b)},b))}),p=fp(o.option,mA,function(b){b.mappingMethod="fixed"});z(h)&&M(h,function(b){f[b]=1});function m(b){return h==="all"||f[b]}function y(b){return!!b.length}t.eachSeries(function(b,A){var S=v[A]=[];b.subType==="parallel"?_(b,A,S):w(b,A,S)});function _(b,A){var S=b.coordinateSystem;d|=S.hasAxisBrushed(),m(A)&&S.eachActiveState(b.getData(),function(D,I){D==="active"&&(c[I]=1)})}function w(b,A,S){var D=wA(b);if(!(!D||Qz(o,A))&&(M(g,function(L){D[L.brushType]&&o.brushTargetManager.controlSeries(L,b,t)&&S.push(L),d|=y(S)}),m(A)&&y(S))){var I=b.getData();I.each(function(L){xA(D,S,I,L)&&(c[L]=1)})}}t.eachSeries(function(b,A){var S={seriesId:b.id,seriesIndex:A,seriesName:b.name,dataIndex:[]};l.selected.push(S);var D=wA(b),I=v[A],L=b.getData(),P=m(A)?function(R){return c[R]?(S.dataIndex.push(L.getRawIndex(R)),"inBrush"):"outOfBrush"}:function(R){return xA(D,I,L,R)?(S.dataIndex.push(L.getRawIndex(R)),"inBrush"):"outOfBrush"};(m(A)?d:y(I))&&Xz(mA,p,L,P)})}),Kz(e,i,n,a,r)});function Kz(t,e,r,a,i){if(!!i){var n=t.getZr();if(!n[dp]){n[vp]||(n[vp]=jz);var o=es(n,vp,r,e);o(t,a)}}}function jz(t,e){if(!t.isDisposed()){var r=t.getZr();r[dp]=!0,t.dispatchAction({type:"brushSelect",batch:e}),r[dp]=!1}}function xA(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 wA(t){var e=t.brushSelector;if(Lt(e)){var r=[];return M(cp,function(i,n){r[n]=function(o,s,l,u){var h=s.getItemLayout(o);return i[e](h,l,u)}}),r}else if(se(e)){var a={};return M(cp,function(i,n){a[n]=e}),a}return e}function Qz(t,e){var r=t.option.seriesIndex;return r!=null&&r!=="all"&&(z(r)?yt(r,e)<0:e!==r)}function Jz(t){var e=t.selectors={};return M(cp[t.brushType],function(r,a){e[a]=function(i){return r(i,e,t)}}),t}var tB={lineX:ce,lineY:ce,rect:function(t){return bA(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&&bA(e)}};function bA(t){return new vt(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var eB=["#ddd"],t3=Ze({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&&gA(r,t,["inBrush","outOfBrush"]);var a=r.inBrush=r.inBrush||{};r.outOfBrush=r.outOfBrush||{color:eB},a.hasOwnProperty("liftZ")||(a.liftZ=5)},setAreas:function(t){T&&(gt(z(t)),M(t,function(e){gt(e.brushType,"Illegal areas")})),t&&(this.areas=V(t,function(e){return SA(this.option,e)},this))},setBrushOption:function(t){this.brushOption=SA(this.option,t),this.brushType=this.brushOption.brushType}});function SA(t,e){return ut({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new _t(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}he({type:"brush",init:function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new ro(e.getZr())).on("brush",it(this._onBrush,this)).mount()},render:function(t){return this.model=t,gp.apply(this,arguments)},updateTransform:function(t,e){return _A(e),gp.apply(this,arguments)},updateView:gp,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:rt(t),$from:r}),e.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:r,areas:rt(t),$from:r})}});function gp(t,e,r,a){(!a||a.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(r)).enableBrush(t.brushOption).updateCovers(t.areas.slice())}mt({type:"brush",event:"brush"},function(t,e){e.eachComponent({mainType:"brush",query:t},function(r){r.setAreas(t.areas)})}),mt({type:"brushSelect",event:"brushSelected",update:"none"},function(){}),mt({type:"brushEnd",event:"brushEnd",update:"none"},function(){});var rB=ua.toolbox.brush;function pp(t,e,r){this.model=t,this.ecModel=e,this.api=r,this._brushType,this._brushMode}pp.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:rt(rB.title)};var Vh=pp.prototype;Vh.render=Vh.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,M(t.get("type",!0),function(o){t.setIconStatus(o,(o==="keep"?i==="multiple":o==="clear"?n:o===a)?"emphasis":"normal")})},Vh.getIcons=function(){var t=this.model,e=t.get("icon",!0),r={};return M(t.get("type",!0),function(a){e[a]&&(r[a]=e[a])}),r},Vh.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}})},io("brush",pp),we(Zz),Ze({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"}}}),he({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=Xt(t.get("textBaseline"),t.get("textVerticalAlign")),l=new dt({style:$t({},i,{text:t.get("text"),textFill:i.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),h=t.get("subtext"),f=new dt({style:$t({},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(){Zo(c,"_"+t.get("target"))}),v&&f.on("click",function(){Zo(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=qt(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,w=t.getItemStyle(["color","opacity"]);w.fill=t.get("backgroundColor");var b=new xt({shape:{x:g.x-_[3],y:g.y-_[0],width:g.width+_[1]+_[3],height:g.height+_[0]+_[2],r:t.get("borderRadius")},style:w,subPixelOptimize:!0,silent:!0});a.add(b)}}});var aB=function(t){var e=t&&t.timeline;z(e)||(e=e?[e]:[]),M(e,function(r){!r||iB(r)})};function iB(t){var e=t.type,r={number:"value",time:"time"};if(r[e]&&(t.axisType=r[e],delete t.type),AA(t),Xi(t,"controlPosition")){var a=t.controlStyle||(t.controlStyle={});Xi(a,"position")||(a.position=t.controlPosition),a.position==="none"&&!Xi(a,"show")&&(a.show=!1,delete a.position),delete t.controlPosition}M(t.data||[],function(i){lt(i)&&!z(i)&&(!Xi(i,"value")&&Xi(i,"name")&&(i.value=i.name),AA(i))})}function AA(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};M(a,function(o,s){!n[s]&&!Xi(i,s)&&(i[s]=o)}),r.label&&!Xi(a,"emphasis")&&(a.emphasis=r.label,delete r.label)}function Xi(t,e){return t.hasOwnProperty(e)}wt.registerSubTypeDefaulter("timeline",function(){return"slider"}),mt({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"),J({currentIndex:r.option.currentIndex},t)}),mt({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(t,e){var r=e.getComponent("timeline");r&&t.playState!=null&&r.setPlayState(t.playState)});var TA=wt.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){TA.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=[];M(e,function(s,l){var u=Io(s),h;lt(s)?(h=rt(s),h.value=l):h=l,i.push(h),!Lt(u)&&(u==null||isNaN(u))&&(u=""),a.push(u+"")}),e=i}var n={category:"ordinal",time:"time"}[r]||"number",o=this._data=new fe([{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()}}),nB=TA.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:[]}});Dt(nB,Tv);var oB=Fr.extend({type:"timeline"}),Gh=function(t,e,r,a){Qt.call(this,t,e,r),this.type=a||"value",this.model=null};Gh.prototype={constructor:Gh,getLabelModel:function(){return this.model.getModel("label")},isHorizontal:function(){return this.model.get("orient")==="horizontal"}},It(Gh,Qt);var ei=it,mp=M,yp=Math.PI;oB.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 kt(s.scale.getLabel(l))},mp(["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=sB(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:yp/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*yp/180;var g,p,m,y,_=u.get("position",!0),w=h&&u.get("showPlayBtn",!0),b=h&&u.get("showPrevBtn",!0),A=h&&u.get("showNextBtn",!0),S=0,D=l;return _==="left"||_==="bottom"?(w&&(g=[0,0],S+=v),b&&(p=[S,0],S+=v),A&&(m=[D-f,0],D-=v)):(w&&(g=[D-f,0],D-=v),b&&(p=[0,0],S+=v),A&&(m=[D-f,0],D-=v)),y=[S,D],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=Ie(),o=i.x,s=i.y+i.height;yr(n,n,[-o,-s]),aa(n,n,-yp/2),yr(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,_,w,b,A){y[b]+=w[b][A]-_[b][A]}},_createAxis:function(t,e){var r=e.getData(),a=e.get("axisType"),i=zn(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 Gh("value",i,t.axisExtent,a);return o.model=e,o},_createGroup:function(t){var e=this["_"+t]=new q;return this.group.add(e),e},_renderAxisLine:function(t,e,r,a){var i=r.getExtent();!a.get("lineStyle.show")||e.add(new ye({shape:{x1:i[0],y1:0,x2:i[1],y2:0},style:et({lineCap:"round"},a.getModel("lineStyle").getLineStyle()),silent:!0,z2:1}))},_renderAxisTick:function(t,e,r,a){var i=a.getData(),n=r.scale.getTicks();mp(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:ei(this._changeTimeline,this,o)},c=CA(l,u,e,f);Ot(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();mp(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 dt({position:[c,0],rotation:t.labelRotation-t.rotation,onclick:ei(this._changeTimeline,this,l),silent:!1});$t(v.style,h,{text:s.formattedLabel,textAlign:t.labelAlign,textVerticalAlign:t.labelBaseline}),e.add(v),Ot(v,$t({},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",ei(this._changeTimeline,this,h?"-":"+")),f(t.prevBtnPosition,"controlStyle.prevIcon",ei(this._changeTimeline,this,h?"+":"-")),f(t.playPosition,"controlStyle."+(u?"stopIcon":"playIcon"),ei(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=lB(a,v,l,p);e.add(m),Ot(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=ei(s._handlePointerDrag,s),u.ondragend=ei(s._handlePointerDragend,s),DA(u,n,r,a,!0)},onUpdate:function(u){DA(u,n,r,a)}};this._currentPointer=CA(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=_i(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(ei(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 Hr(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 sB(t,e){return qt(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},t.get("padding"))}function lB(t,e,r,a){var i=zo(t.get(e).replace(/^path:\/\//,""),rt(a||{}),new vt(r[0],r[1],r[2],r[3]),"center");return i}function CA(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=Ye(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=ut({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]+=H(h[0],u[0]),f[1]+=H(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 DA(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)))}}we(aB);var MA=ka,_p=kt;function Hh(t){fi(t,"label",["show"])}var Fh=Ze({type:"marker",dependencies:["series","grid","polar","geo"],init:function(t,e,r){if(T&&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(G.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&&Hh(s),M(s.data,function(u){u instanceof Array?(Hh(u[0]),Hh(u[1])):Hh(u)}),l=new i(s,this,e),et(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=z(r)?V(r,MA).join(", "):MA(r),i=e.getName(t),n=_p(this.name);return(r!=null||i)&&(n+="<br />"),i&&(n+=_p(i),r!=null&&(n+=" : ")),r!=null&&(n+=_p(a)),n},getData:function(){return this._data},setData:function(t){this._data=t}});Dt(Fh,Tv),Fh.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 IA=yt;function uB(t){return!(isNaN(parseFloat(t.x))&&isNaN(parseFloat(t.y)))}function hB(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}function xp(t,e,r,a,i,n){var o=[],s=fa(e,a),l=s?e.getCalculationInfo("stackResultDimension"):a,u=Sp(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=py(e.get(a,h));return c=Math.min(c,20),c>=0&&(o[n]=+o[n].toFixed(c)),[o,f]}var wp=ot,bp={min:wp(xp,"min"),max:wp(xp,"max"),average:wp(xp,"average")};function Ys(t,e){var r=t.getData(),a=t.coordinateSystem;if(e&&!hB(e)&&!z(e.coord)&&a){var i=a.dimensions,n=LA(e,r,a,t);if(e=rt(e),e.type&&bp[e.type]&&n.baseAxis&&n.valueAxis){var o=IA(i,n.baseAxis.dim),s=IA(i,n.valueAxis.dim),l=bp[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++)bp[u[h]]&&(u[h]=Sp(r,r.mapDimension(i[h]),u[h]));e.coord=u}}return e}function LA(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(fB(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 fB(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 Xs(t,e){return t&&t.containData&&e.coord&&!uB(e)?t.containData(e.coord):!0}function PA(t,e,r,a){return a<2?t.coord&&t.coord[a]:t.value}function Sp(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 Ap=he({type:"marker",init:function(){this.markerGroupMap=ht()},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 EA(t,e,r){var a=e.coordinateSystem;t.each(function(i){var n=t.getItemModel(i),o,s=H(n.get("x"),r.getWidth()),l=H(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)})}Ap.extend({type:"markPoint",updateTransform:function(t,e,r){e.eachSeries(function(a){var i=a.markPointModel;i&&(EA(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 Bn),u=cB(i,t,e);e.setData(u),EA(e.getData(),t,a),u.each(function(h){var f=u.getItemModel(h),c=f.getShallow("symbol"),v=f.getShallow("symbolSize"),d=se(c),g=se(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 cB(t,e,r){var a;t?a=V(t&&t.dimensions,function(o){var s=e.getData().getDimensionInfo(e.getData().mapDimension(o))||{};return J({name:o},s)}):a=[{name:"value",type:"float"}];var i=new fe(a,r),n=V(r.get("data"),ot(Ys,e));return t&&(n=ee(n,ot(Xs,t))),i.initData(n,null,t?PA:function(o){return o.value}),i}we(function(t){t.markPoint=t.markPoint||{}}),Fh.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 vB=function(t,e,r,a){var i=t.getData(),n=a.type;if(!z(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=Ut(a.yAxis,a.xAxis);else{var l=LA(a,i,e,t);o=l.valueAxis;var u=fs(i,l.valueDataDim);s=Sp(i,u,n)}var h=o.dim==="x"?0:1,f=1-h,c=rt(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=[Ys(t,a[0]),Ys(t,a[1]),et({},a[2])],a[2].type=a[2].type||"",ut(a[2],a[0]),ut(a[2],a[1]),a};function Wh(t){return!isNaN(t)&&!isFinite(t)}function RA(t,e,r,a){var i=1-t,n=a.dimensions[t];return Wh(e[i])&&Wh(r[i])&&e[t]===r[t]&&a.getAxis(n).containData(e[t])}function dB(t,e){if(t.type==="cartesian2d"){var r=e[0].coord,a=e[1].coord;if(r&&a&&(RA(1,r,a,t)||RA(0,r,a,t)))return!0}return Xs(t,e[0])&&Xs(t,e[1])}function Tp(t,e,r,a,i){var n=a.coordinateSystem,o=t.getItemModel(e),s,l=H(o.get("x"),i.getWidth()),u=H(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;Wh(t.get(h[0],e))?s[0]=v.toGlobalCoord(v.getExtent()[r?0:1]):Wh(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)}Ap.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){Tp(o,l,!0,a,r),Tp(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 oh);this.group.add(l.group);var u=gB(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");z(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);Tp(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 gB(t,e,r){var a;t?a=V(t&&t.dimensions,function(u){var h=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return J({name:u},h)}):a=[{name:"value",type:"float"}];var i=new fe(a,r),n=new fe(a,r),o=new fe([],r),s=V(r.get("data"),ot(vB,e,t,r));t&&(s=ee(s,ot(dB,t)));var l=t?PA:function(u){return u.value};return i.initData(V(s,function(u){return u[0]}),null,l),n.initData(V(s,function(u){return u[1]}),null,l),o.initData(V(s,function(u){return u[2]})),o.hasItemOption=!0,{from:i,to:n,line:o}}we(function(t){t.markLine=t.markLine||{}}),Fh.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 pB=function(t,e,r,a){var i=Ys(t,a[0]),n=Ys(t,a[1]),o=Ut,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=go([{},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 Uh(t){return!isNaN(t)&&!isFinite(t)}function OA(t,e,r,a){var i=1-t;return Uh(e[i])&&Uh(r[i])}function mB(t,e){var r=e.coord[0],a=e.coord[1];return t.type==="cartesian2d"&&r&&a&&(OA(1,r,a,t)||OA(0,r,a,t))?!0:Xs(t,{coord:r,x:e.x0,y:e.y0})||Xs(t,{coord:a,x:e.x1,y:e.y1})}function NA(t,e,r,a,i){var n=a.coordinateSystem,o=t.getItemModel(e),s,l=H(o.get(r[0]),i.getWidth()),u=H(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);Uh(h)?s[0]=v.toGlobalCoord(v.getExtent()[r[0]==="x0"?0:1]):Uh(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 kA=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];Ap.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=V(kA,function(u){return NA(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 q});this.group.add(l.group),l.__keep=!0;var u=yB(i,t,e);e.setData(u),u.each(function(h){u.setItemLayout(h,V(kA,function(f){return NA(u,h,f,t,a)})),u.setItemVisual(h,{color:o.getVisual("color")})}),u.diff(l.__data).add(function(h){var f=new Ge({shape:{points:u.getItemLayout(h)}});u.setItemGraphicEl(h,f),l.group.add(f)}).update(function(h,f){var c=l.__data.getItemGraphicEl(f);ft(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(J(c.getModel("itemStyle").getItemStyle(),{fill:gl(g,.4),stroke:g})),h.hoverStyle=c.getModel("emphasis.itemStyle").getItemStyle(),Fe(h.style,h.hoverStyle,v,d,{labelFetcher:e,labelDataIndex:f,defaultText:u.getName(f)||"",isRectText:!0,autoColor:g}),Ot(h,{}),h.dataModel=e}),l.__data=u,l.group.silent=e.get("silent")||t.get("silent")}});function yB(t,e,r){var a,i,n=["x0","y0","x1","y1"];t?(a=V(t&&t.dimensions,function(l){var u=e.getData(),h=u.getDimensionInfo(u.mapDimension(l))||{};return J({name:l},h)}),i=new fe(V(n,function(l,u){return{name:l,type:a[u%2].type}}),r)):(a=[{name:"value",type:"float"}],i=new fe(a,r));var o=V(r.get("data"),ot(pB,e,t,r));t&&(o=ee(o,ot(mB,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}we(function(t){t.markArea=t.markArea||{}});var zA=ua.legend.selector,_B={all:{type:"all",title:rt(zA.all)},inverse:{type:"inverse",title:rt(zA.inverse)}},BA=Ze({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){BA.superCall(this,"mergeOption",t),this._updateSelector(t)},_updateSelector:function(t){var e=t.selector;e===!0&&(e=t.selector=["all","inverse"]),z(e)&&M(e,function(r,a){Lt(r)&&(r={type:r}),e[a]=ut(r,_B[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&&Ec(n)&&e.push(n.name)}),this._availableNames=r;var a=this.get("data")||e,i=V(a,function(n){return(typeof n=="string"||typeof n=="number")&&(n={name:n}),new _t(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;M(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;M(t,function(r){e[r.get("name",!0)]=!0})},inverseSelect:function(){var t=this._data,e=this.option.selected;M(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])&&yt(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 qs(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();M(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}}mt("legendToggleSelect","legendselectchanged",ot(qs,"toggleSelected")),mt("legendAllSelect","legendselectall",ot(qs,"allSelect")),mt("legendInverseSelect","legendinverseselect",ot(qs,"inverseSelect")),mt("legendSelect","legendselected",ot(qs,"select")),mt("legendUnSelect","legendunselected",ot(qs,"unSelect"));var lo=ot,VA=M,$h=q,xB=he({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new $h),this._backgroundEl,this.group.add(this._selectorGroup=new $h),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=qt(l,u,h),c=this.layoutInner(t,i,f,a,o,s),v=qt(J({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=HS(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=ht(),u=e.get("selectedMode"),h=[];r.eachRawSeries(function(f){!f.get("legendHoverLink")&&h.push(f.id)}),VA(e.getData(),function(f,c){var v=f.get("name");if(!this.newlineDisabled&&(v===""||v===`
| `)){s.add(new $h({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"),w=this._createItem(v,c,f,e,y,_,t,p,m,u);w.on("click",lo(HA,v,null,a,h)).on("mouseover",lo(Cp,d.name,null,a,h)).on("mouseout",lo(Dp,d.name,null,a,h)),l.set(v,!0)}else r.eachRawSeries(function(b){if(!l.get(v)&&b.legendVisualProvider){var A=b.legendVisualProvider;if(!A.containName(v))return;var S=A.indexOfName(v),D=A.getItemVisual(S,"color"),I=A.getItemVisual(S,"borderColor"),L="roundRect",P=this._createItem(v,c,f,e,L,null,t,D,I,u);P.on("click",lo(HA,null,v,a,h)).on("mouseover",lo(Cp,null,v,a,h)).on("mouseout",lo(Dp,null,v,a,h)),l.set(v,!0)}},this);T&&(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();VA(t,function(s){o(s)});function o(s){var l=s.type,u=new dt({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");Fe(u.style,u.hoverStyle={},h,f,{defaultText:s.title,isRectText:!1}),Ot(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 $h,y=r.getModel("textStyle"),_=r.get("icon"),w=r.getModel("tooltip"),b=w.parentModel;i=_||i;var A=Ye(i,0,0,h,f,p?s:c,d??!0);if(m.add(GA(A,i,g,l,v,p)),!_&&n&&(n!==i||n==="none")){var S=f*.8;n==="none"&&(n="circle");var D=Ye(n,(h-S)/2,(f-S)/2,S,S,p?s:c,d??!0);m.add(GA(D,n,g,l,v,p))}var I=o==="left"?h+5:-5,L=o,P=a.get("formatter"),R=t;typeof P=="string"&&P?R=P.replace("{name}",t??""):typeof P=="function"&&(R=P(t)),m.add(new dt({style:$t({},y,{text:R,x:I,y:f/2,textFill:p?y.getTextColor():c,textAlign:L,textVerticalAlign:"middle"})}));var E=new xt({shape:m.getBoundingRect(),invisible:!0,tooltip:w.get("show")?et({content:t,formatter:b.get("formatter",!0)||function(){return t},formatterParams:{componentType:"legend",legendIndex:a.componentIndex,name:t,$vars:["name"]}},w.option):null});return m.add(E),m.eachChild(function(Z){Z.silent=!0}),E.silent=!u,this.getContentGroup().add(m),Ot(m),m.__legendDataIndex=e,m},layoutInner:function(t,e,r,a,i,n){var o=this.getContentGroup(),s=this.getSelectorGroup();bi(t.get("orient"),o,t.get("itemGap"),r.width,r.height);var l=o.getBoundingRect(),u=[-l.x,-l.y];if(i){bi("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 GA(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 HA(t,e,r,a){Dp(t,e,r,a),r.dispatchAction({type:"legendToggleSelect",name:t??e}),Cp(t,e,r,a)}function Cp(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 Dp(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 wB=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})};$e(Wr.PROCESSOR.SERIES_FILTER,wB),wt.registerSubTypeDefaulter("legend",function(){return"plain"});var FA=BA.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=Cn(t);FA.superCall(this,"init",t,e,r,a),WA(this,t,i)},mergeOption:function(t,e){FA.superCall(this,"mergeOption",t,e),WA(this,this.option,t)}});function WA(t,e,r){var a=t.getOrient(),i=[1,1];i[a.index]=0,za(e,r,{type:"box",ignoreSize:i})}var UA=q,Mp=["width","height"],Ip=["x","y"],Lp=xB.extend({type:"legend.scroll",newlineDisabled:!0,init:function(){Lp.superCall(this,"init"),this._currentIndex=0,this.group.add(this._containerGroup=new UA),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new UA),this._showController},resetInner:function(){Lp.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;Lp.superCall(this,"renderInner",t,e,r,a,i,n,o);var l=this._controllerGroup,u=e.get("pageIconSize",!0);z(u)||(u=[u,u]),f("pagePrev",0);var h=e.getModel("pageTextStyle");l.add(new dt({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=Ho(e.get("pageIcons",!0)[e.getOrient().name][v],{onclick:it(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=Mp[s],u=Ip[s],h=Mp[1-s],f=Ip[1-s];i&&bi("horizontal",o,t.get("selectorItemGap",!0));var c=t.get("selectorButtonGap",!0),v=o.getBoundingRect(),d=[-v.x,-v.y],g=rt(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;bi(t.get("orient"),s,t.get("itemGap"),a?r.width:null,a?null:r.height),bi("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=Xt(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 xt({shape:_})),l.__rectSize=_[i]}else u.eachChild(function(b){b.attr({invisible:!0,silent:!0})});var w=this._getPageInfo(t);return w.pageIndex!=null&&ft(s,{position:w.contentPosition},c?t:!1),this._updatePageInfoView(t,w),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;M(["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",Lt(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=Mp[i],o=Ip[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(w){if(w){var b=w.getBoundingRect(),A=b[o]+w.position[i];return{s:A,e:A+b[n],i:w.__legendDataIndex}}}function _(w,b){return w.e>=b&&w.s<=b+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}});mt("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 e3=ip.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"}}}),Zh=xt,qi=Nt,Pp=_i,ma=it,Ep=M,$A=7,bB=1,Rp=30,Ks="horizontal",ZA="vertical",SB=5,AB=["line","bar","candlestick","scatter"],Op=np.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(Op.superApply(this,"render",arguments),es(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(){Op.superApply(this,"remove",arguments),r_(this,"_dispatchZoomAction")},dispose:function(){Op.superApply(this,"dispose",arguments),r_(this,"_dispatchZoomAction")},_buildView:function(){var t=this.group;t.removeAll(),this._resetLocation(),this._resetInterval();var e=this._displayables.barGroup=new q;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===Ks?{right:a.width-r.x-r.width,top:a.height-Rp-$A,width:r.width,height:Rp}:{right:$A,top:r.y,width:Rp,height:r.height},n=Cn(t.option);M(["right","top","width","height"],function(s){n[s]==="ph"&&(n[s]=i[s])});var o=qt(n,a,t.padding);this._location={x:o.x,y:o.y},this._size=[o.width,o.height],this._orient===ZA&&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===Ks&&!i?{scale:o?[1,1]:[1,-1]}:r===Ks&&i?{scale:o?[-1,1]:[-1,-1]}:r===ZA&&!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 Zh({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40})),r.add(new Zh({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:it(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:qi(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 Ge({shape:{points:u},style:J({fill:g.get("dataBackgroundColor")},g.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new ir({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();M(o,function(s){if(!r&&!(e!==!0&&yt(AB,s.get("type"))<0)){var l=a.getComponent(i.axis,n).axis,u=TB(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 Zh({draggable:!0,cursor:YA(this._orient),drift:ma(this._onDragMove,this,"all"),ondragstart:ma(this._showDataInfo,this,!0),ondragend:ma(this._onDragEnd,this),onmouseover:ma(this._showDataInfo,this,!0),onmouseout:ma(this._showDataInfo,this,!1),style:{fill:n.get("fillerColor"),textPosition:"inside"}})),a.add(new Zh({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:i[0],height:i[1]},style:{stroke:n.get("dataBackgroundColor")||n.get("borderColor"),lineWidth:bB,fill:"rgba(0,0,0,0)"}})),Ep([0,1],function(o){var s=Ho(n.get("handleIcon"),{cursor:YA(this._orient),draggable:!0,drift:ma(this._onDragMove,this,o),ondragend:ma(this._onDragEnd,this),onmouseover:ma(this._showDataInfo,this,!0),onmouseout:ma(this._showDataInfo,this,!1)},{x:-1,y:0,width:2,height:2}),l=s.getBoundingRect();this._handleHeight=H(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 dt({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=[qi(t[0],[0,100],e,!0),qi(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];zi(e,a,i,r.get("zoomLock")?"all":t,n.minSpan!=null?qi(n.minSpan,o,i,!0):null,n.maxSpan!=null?qi(n.maxSpan,o,i,!0):null);var s=this._range,l=this._range=Pp([qi(a[0],i,o,!0),qi(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=Pp(r.slice()),i=this._size;Ep([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=Pp(this._handleEnds.slice());f.call(this,0),f.call(this,1);function f(c){var v=yi(r.handles[c].parent,this.group),d=jc(c===0?"right":"left",v),g=this._handleWidth/2+SB,p=Hr([h[c]+(c===0?-g:g),this._size[1]/2],v);a[c].setStyle({x:p[0],y:p[1],textVerticalAlign:i===Ks?"middle":d,textAlign:i===Ks?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 se(a)?a(t,n):Lt(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,oi(a.event);var i=this._displayables.barGroup.getLocalTransform(),n=Hr([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(Ep(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 TB(t){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[t]}function YA(t){return t==="vertical"?"ns-resize":"ew-resize"}ip.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}});var XA="\0_ec_dataZoom_roams";function CB(t,e){var r=KA(t),a=e.dataZoomId,i=e.coordId;M(r,function(s,l){var u=s.dataZoomInfos;u[a]&&yt(e.allCoordIds,i)<0&&(delete u[a],s.count--)}),jA(r);var n=r[i];n||(n=r[i]={coordId:i,dataZoomInfos:{},count:0},n.controller=MB(t,n),n.dispatchAction=ot(IB,t)),!n.dataZoomInfos[a]&&n.count++,n.dataZoomInfos[a]=e;var o=LB(n.dataZoomInfos);n.controller.enable(o.controlType,o.opt),n.controller.setPointerChecker(e.containsPoint),es(n,"dispatchAction",e.dataZoomModel.get("throttle",!0),"fixRate")}function DB(t,e){var r=KA(t);M(r,function(a){a.controller.dispose();var i=a.dataZoomInfos;i[e]&&(delete i[e],a.count--)}),jA(r)}function qA(t){return t.type+"\0_"+t.id}function KA(t){var e=t.getZr();return e[XA]||(e[XA]={})}function MB(t,e){var r=new Yn(t.getZr());return M(["pan","zoom","scrollMove"],function(a){r.on(a,function(i){var n=[];M(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 jA(t){M(t,function(e,r){e.count||(e.controller.dispose(),delete t[r])})}function IB(t,e){t.dispatchAction({type:"dataZoom",batch:e})}function LB(t){var e,r="type_",a={type_true:2,type_move:1,type_false:0,type_undefined:-1},i=!0;return M(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 PB=it,QA=np.extend({type:"dataZoom.inside",init:function(t,e){this._range},render:function(t,e,r,a){QA.superApply(this,"render",arguments),this._range=t.getPercentRange(),M(this.getTargetCoordInfo(),function(i,n){var o=V(i,function(s){return qA(s.model)});M(i,function(s){var l=s.model,u={};M(["pan","zoom","scrollMove"],function(h){u[h]=PB(EB[h],this,s,n)},this),CB(r,{coordId:qA(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(){DB(this.api,this.dataZoomModel.id),QA.superApply(this,"dispose",arguments),this._range=null}}),EB={zoom:function(t,e,r,a){var i=this._range,n=i.slice(),o=t.axisModels[0];if(!!o){var s=Np[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(zi(0,n,[0,100],0,h.minSpan,h.maxSpan),this._range=n,i[0]!==n[0]||i[1]!==n[1])return n}},pan:JA(function(t,e,r,a,i,n){var o=Np[a]([n.oldX,n.oldY],[n.newX,n.newY],e,i,r);return o.signal*(t[1]-t[0])*o.pixel/o.pixelLength}),scrollMove:JA(function(t,e,r,a,i,n){var o=Np[a]([0,0],[n.scrollDelta,n.scrollDelta],e,i,r);return o.signal*(t[1]-t[0])*n.scrollDelta})};function JA(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(zi(l,o,[0,100],"all"),this._range=o,n[0]!==o[0]||n[1]!==o[1])return o}}}var Np={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}},tT=M,eT=function(t){var e=t&&t.visualMap;z(e)||(e=e?[e]:[]),tT(e,function(r){if(!!r){uo(r,"splitList")&&!uo(r,"pieces")&&(r.pieces=r.splitList,delete r.splitList);var a=r.pieces;a&&z(a)&&tT(a,function(i){lt(i)&&(uo(i,"start")&&!uo(i,"min")&&(i.min=i.start),uo(i,"end")&&!uo(i,"max")&&(i.max=i.end))})}})};function uo(t,e){return t&&t.hasOwnProperty&&t.hasOwnProperty(e)}wt.registerSubTypeDefaulter("visualMap",function(t){return!t.categories&&(!(t.pieces?t.pieces.length>0:t.splitNumber>0)||t.calculable)?"continuous":"piecewise"});var rT=Wr.VISUAL.COMPONENT;Rt(rT,{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(qz(a.stateList,a.targetVisuals,it(a.getValueState,a),a.getDataDimension(t.getData())))}),r}}),Rt(rT,{createOnAllSeries:!0,reset:function(t,e){var r=t.getData(),a=[];e.eachComponent("visualMap",function(i){if(i.isTargetSeries(t)){var n=i.getVisualMeta(it(RB,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 RB(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 kp={get:function(t,e,r){var a=rt((OB[t]||{})[e]);return r&&z(a)?a[a.length-1]:a}},OB={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]}},aT=Mt.mapVisual,NB=Mt.eachVisual,kB=z,zp=M,zB=_i,BB=Nt,Bp=ce,Yh=Ze({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;G.canvasSupported||(r.realtime=!1),!e&&gA(r,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},resetVisual:function(t){var e=this.stateList;t=it(t,this),this.controllerVisuals=fp(this.option.controller,e,t),this.targetVisuals=fp(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=me(t),e},eachTargetSeries:function(t,e){M(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||["<",">"],z(t)&&(t=t.slice(),s=!0),l=e?t:s?[u(t[0]),u(t[1])]:u(t),Lt(o))return o.replace("{value}",s?l[0]:l).replace("{value2}",s?l[1]:l);if(se(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=zB([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={});ut(a,r),ut(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){kB(e.color)&&!u.inRange&&(u.inRange={color:e.color.slice().reverse()}),u.inRange=u.inRange||{color:t.get("gradientColor")},zp(this.stateList,function(h){var f=u[h];if(Lt(f)){var c=kp.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]={},zp(c,function(d,g){if(!!Mt.isValidType(g)){var p=kp.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");zp(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&&rt(h)||(n?"roundRect":["roundRect"])),g.symbolSize==null&&(g.symbolSize=f&&rt(f)||(n?d[0]:[d[0],d[0]])),g.symbol=aT(g.symbol,function(y){return y==="none"||y==="square"?"roundRect":y});var p=g.symbolSize;if(p!=null){var m=-1/0;NB(p,function(y){y>m&&(m=y)}),g.symbolSize=aT(p,function(y){return BB(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:Bp,getValueState:Bp,getVisualMeta:Bp}),iT=[20,140],nT=Yh.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){nT.superApply(this,"optionUpdated",arguments),this.resetExtent(),this.resetVisual(function(r){r.mappingMethod="linear",r.dataExtent=this.getExtent()}),this._resetRange()},resetItemSize:function(){nT.superApply(this,"resetItemSize",arguments);var t=this.itemSize;this._orient==="horizontal"&&t.reverse(),(t[0]==null||isNaN(t[0]))&&(t[0]=iT[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=iT[1])},_resetRange:function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):z(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(){Yh.prototype.completeVisualOption.apply(this,arguments),M(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=_i((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=oT(this,"outOfRange",this.getExtent()),r=oT(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 oT(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 sT=he({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=xi(e.get("padding")||0),a=t.getBoundingRect();t.add(new xt({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 M(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;uu(t,e.getBoxLayoutParams(),{width:r.getWidth(),height:r.getHeight()})},doRender:ce});function lT(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=qt(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 Xh(t,e){return M(t||[],function(r){r.dataIndex!=null&&(r.dataIndexInside=r.dataIndex,r.dataIndex=null),r.highlightKey="visualMap"+(e?e.componentIndex:"")}),t}var ya=Nt,VB=M,qh=Math.min,js=Math.max,GB=12,uT=6,HB=sT.extend({type:"visualMap.continuous",init:function(){HB.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 dt({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=lT(e,this.api,a),s=r.barGroup=this._createBarGroup(o);s.add(r.outOfRange=Kh()),s.add(r.inRange=Kh(null,n?fT(this._orient):null,it(this._dragHandle,this,"all",!1),it(this._dragHandle,this,"all",!0)));var l=e.textStyleModel.getTextRect("\u56FD"),u=js(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=it(this._dragHandle,this,e,!1),o=it(this._dragHandle,this,e,!0),s=Kh(FB(e,a),fT(this._orient),n,o);s.position[0]=r[0],t.add(s);var l=this.visualMapModel.textStyleModel,u=new dt({draggable:!0,drift:n,onmousemove:function(c){oi(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=Kh([[0,0]],"move");i.position[0]=e[0],i.attr({invisible:!0,silent:!0}),t.add(i);var n=this.visualMapModel.textStyleModel,o=new dt({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:uT+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():hT(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=[ya(e[0],r,a,!0),ya(e[1],r,a,!0)]},_updateInterval:function(t,e){e=e||0;var r=this.visualMapModel,a=this._handleEnds,i=[0,r.itemSize[1]];zi(e,a,i,t,0);var n=r.getExtent();this._dataInterval=[ya(a[0],i,n,!0),ya(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 pi(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 q(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;VB([0,1],function(o){var s=i[o];s.setStyle("fill",e.handlesColor[o]),s.position[1]=t[o];var l=Hr(r.handleLabelPoints[o],yi(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=ya(t,n,s,!0),u=this._shapes,h=u.indicator;if(!!h){h.position[1]=l,h.attr("invisible",!1),h.setShape("points",WB(!!r,a,l,o[1]));var f={convertOpacityToAlpha:!0},c=this.getControllerVisual(t,"color",f);h.setStyle("fill",c);var v=Hr(u.indicatorLabelPoint,yi(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]=qh(js(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=qh(js(i[0],t),i[1]);var o=UB(r,n,i),s=[t-o,t+o],l=ya(t,i,n,!0),u=[ya(s[0],i,n,!0),ya(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||hT(r))&&(f=this._hoverLinkDataIndices=r.findTargetDataIndices(u));var c=vD(h,f);this._dispatchHighDown("downplay",Xh(c[0],r)),this._dispatchHighDown("highlight",Xh(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",Xh(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=yi(e,a?null:this.group);return sa[z(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 Kh(t,e,r,a){return new Ge({shape:{points:t},draggable:!!r,cursor:e,drift:r,onmousemove:function(i){oi(i.event)},ondragend:a})}function FB(t,e){return t===0?[[0,0],[e,0],[e,-e]]:[[0,0],[e,0],[e,e]]}function WB(t,e,r,a){return t?[[0,-qh(e,js(r,0))],[uT,0],[0,qh(e,js(a-r,0))]]:[[0,0],[5,-5],[5,5]]}function UB(t,e,r){var a=GB/2,i=t.get("hoverLinkDataSize");return i&&(a=ya(i,e,r,!0)/2),a}function hT(t){var e=t.get("hoverLinkOnHandle");return!!(e??t.get("realtime"))}function fT(t){return t==="vertical"?"ns-resize":"ew-resize"}var $B={type:"selectDataRange",event:"dataRangeSelected",update:"update"};mt($B,function(t,e){e.eachComponent({mainType:"visualMap",query:t},function(r){r.setSelected(t.selected)})}),we(eT);var ZB=Yh.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){ZB.superApply(this,"optionUpdated",arguments),this._pieceList=[],this.resetExtent();var r=this._mode=this._determineMode();YB[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=rt(a)):(i.dataExtent=this.getExtent(),i.mappingMethod="piecewise",i.pieceList=V(this._pieceList,function(s){var s=rt(s);return n!=="inRange"&&(s.visual=null),s}))})},completeVisualOption:function(){var t=this.option,e={},r=Mt.listVisualTypes(),a=this.isCategory();M(t.pieces,function(n){M(r,function(o){n.hasOwnProperty(o)&&(e[o]=1)})}),M(e,function(n,o){var s=0;M(this.stateList,function(l){s|=i(t,l,o)||i(t.target,l,o)},this),!s&&M(this.stateList,function(l){(t[l]||(t[l]={}))[o]=kp.get(o,l==="inRange"?"active":"inactive",a)})},this);function i(n,o,s){return n&&n[o]&&(lt(n[o])?n[o].hasOwnProperty(s):n[o]===s)}Yh.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,M(a,function(o,s){var l=this.getSelectedMapKey(o);i.hasOwnProperty(l)||(i[l]=!0)},this),r.selectedMode==="single"){var n=!1;M(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=rt(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 M(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}}}),YB={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]}),nv(e),M(e,function(u,h){u.index=h,u.text=this.formatValueText(u.interval)},this)},categories:function(){var t=this.option;M(t.categories,function(e){this._pieceList.push({text:this.formatValueText(e,!0),value:e})},this),cT(t,this._pieceList)},pieces:function(){var t=this.option,e=this._pieceList;M(t.pieces,function(r,a){lt(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),T&&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),cT(t,e),nv(e),M(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 cT(t,e){var r=t.inverse;(t.orient==="vertical"?!r:r)&&e.reverse()}var r3=sT.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=Ut(e.get("showLabel",!0),!u);u&&this._renderEndsText(t,u[0],s,h,o),M(l.viewPieceList,f,this),u&&this._renderEndsText(t,u[1],s,h,o),bi(e.get("orient"),t,e.get("itemGap")),this.renderBackground(t),this.positionGroup(t);function f(c){var v=c.piece,d=new q;d.onclick=it(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 dt({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",it(r,this,"highlight")).on("mouseout",it(r,this,"downplay"));function r(a){var i=this.visualMapModel;i.option.hoverLink&&this.api.dispatchAction({type:a,batch:Xh(i.findTargetDataIndices(e),i)})}},_getItemAlign:function(){var t=this.visualMapModel,e=t.option;if(e.orient==="vertical")return lT(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 q,o=this.visualMapModel.textStyleModel;n.add(new dt({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=V(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(Ye(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=rt(r.selected),i=e.getSelectedMapKey(t);r.selectedMode==="single"?(a[i]=!0,M(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})}});we(eT);var vT="urn:schemas-microsoft-com:vml",dT=typeof window>"u"?null:window,gT=!1,Ke=dT&&dT.document;function Vp(t){return Gp(t)}var Gp;if(Ke&&!G.canvasSupported)try{!Ke.namespaces.zrvml&&Ke.namespaces.add("zrvml",vT),Gp=function(t){return Ke.createElement("<zrvml:"+t+' class="zrvml">')}}catch{Gp=function(e){return Ke.createElement("<"+e+' xmlns="'+vT+'" class="zrvml">')}}function XB(){if(!(gT||!Ke)){gT=!0;var t=Ke.styleSheets;t.length<31?Ke.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):t[0].addRule(".zrvml","behavior:url(#default#VML)")}}var Ki=Oe.CMD,Tt=Math.round,Qs=Math.sqrt,qB=Math.abs,pT=Math.cos,mT=Math.sin,Hp=Math.max;if(!G.canvasSupported){var Jt=",",Fp="progid:DXImageTransform.Microsoft",Ft=21600,Be=Ft/2,KB=1e5,jB=1e3,Wp=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=Ft+","+Ft,t.coordorigin="0,0"},QB=function(t){return String(t).replace(/&/g,"&").replace(/"/g,""")},yT=function(t,e,r){return"rgb("+[t,e,r].join(",")+")"},Kr=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},Js=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},Up=function(t,e,r){return(parseFloat(t)||0)*KB+(parseFloat(e)||0)*jB+r},_T=cc,xT=function(t,e,r){var a=Ve(e);r=+r,isNaN(r)&&(r=1),a&&(t.color=yT(a[0],a[1],a[2]),t.opacity=r*a[3])},JB=function(t){var e=Ve(t);return[yT(e[0],e[1],e[2]),e[3]]},t5=function(t,e,r){var a=e.fill;if(a!=null)if(a instanceof Vr){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&&(Pt(v,v,c),Pt(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&&Pt(v,v,c),y/=m[0]*Ft,_/=m[1]*Ft;var w=Hp(y,_);s=2*0/w,l=2*a.r/w-s}var b=a.colorStops.slice();b.sort(function($,X){return $.offset-X.offset});for(var A=b.length,S=[],D=[],I=0;I<A;I++){var L=b[I],P=JB(L.color);D.push(L.offset*l+s+" "+P[0]),(I===0||I===A-1)&&S.push(P)}if(A>=2){var R=S[0][0],E=S[1][0],Z=S[0][1]*e.opacity,W=S[1][1]*e.opacity;t.type=i,t.method="none",t.focus="100%",t.angle=n,t.color=R,t.color2=E,t.colors=D.join(","),t.opacity=W,t.opacity2=Z}i==="radial"&&(t.focusposition=o.join(","))}else xT(t,a,e.opacity)},e5=function(t,e){e.lineDash&&(t.dashstyle=e.lineDash.join(" ")),e.stroke!=null&&!(e.stroke instanceof Vr)&&xT(t,e.stroke,e.opacity)},jh=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 Vr&&Js(t,n),n||(n=Vp(e)),i?t5(n,r,a):e5(n,r),Kr(t,n)):(t[i?"filled":"stroked"]="false",Js(t,n))},je=[[],[],[]],r5=function(t,e){var r=Ki.M,a=Ki.C,i=Ki.L,n=Ki.A,o=Ki.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++],je[0][0]=c,je[0][1]=v;break;case i:u=" l ",l=1,c=d[f++],v=d[f++],je[0][0]=c,je[0][1]=v;break;case o:case a:u=" c ",l=3;var K=d[f++],Q=d[f++],p=d[f++],m=d[f++],y,_;h===o?(y=p,_=m,p=(p+2*K)/3,m=(m+2*Q)/3,K=(c+2*K)/3,Q=(v+2*Q)/3):(y=d[f++],_=d[f++]),je[0][0]=K,je[0][1]=Q,je[1][0]=p,je[1][1]=m,je[2][0]=y,je[2][1]=_,c=y,v=_;break;case n:var w=0,b=0,A=1,S=1,D=0;e&&(w=e[4],b=e[5],A=Qs(e[0]*e[0]+e[1]*e[1]),S=Qs(e[2]*e[2]+e[3]*e[3]),D=Math.atan2(-e[1]/S,e[0]/A));var I=d[f++],L=d[f++],P=d[f++],R=d[f++],E=d[f++]+D,Z=d[f++]+E+D;f++;var W=d[f++],$=I+pT(E)*P,X=L+mT(E)*R,K=I+pT(Z)*P,Q=L+mT(Z)*R,j=W?" wa ":" at ";Math.abs($-K)<1e-4&&(Math.abs(Z-E)>.01?W&&($+=270/Ft):Math.abs(X-L)<1e-4?W&&$<I||!W&&$>I?Q-=270/Ft:Q+=270/Ft:W&&X<L||!W&&X>L?K+=270/Ft:K-=270/Ft),s.push(j,Tt(((I-P)*A+w)*Ft-Be),Jt,Tt(((L-R)*S+b)*Ft-Be),Jt,Tt(((I+P)*A+w)*Ft-Be),Jt,Tt(((L+R)*S+b)*Ft-Be),Jt,Tt(($*A+w)*Ft-Be),Jt,Tt((X*S+b)*Ft-Be),Jt,Tt((K*A+w)*Ft-Be),Jt,Tt((Q*S+b)*Ft-Be)),c=K,v=Q;break;case Ki.R:var U=je[0],tt=je[1];U[0]=d[f++],U[1]=d[f++],tt[0]=U[0]+d[f++],tt[1]=U[1]+d[f++],e&&(Pt(U,U,e),Pt(tt,tt,e)),U[0]=Tt(U[0]*Ft-Be),tt[0]=Tt(tt[0]*Ft-Be),U[1]=Tt(U[1]*Ft-Be),tt[1]=Tt(tt[1]*Ft-Be),s.push(" m ",U[0],Jt,U[1]," l ",tt[0],Jt,U[1]," l ",tt[0],Jt,tt[1]," l ",U[0],Jt,tt[1]);break;case Ki.Z:s.push(" x ")}if(l>0){s.push(u);for(var ct=0;ct<l;ct++){var bt=je[ct];e&&Pt(bt,bt,e),s.push(Tt(bt[0]*Ft-Be),Jt,Tt(bt[1]*Ft-Be),ct<l-1?Jt:"")}}}return s.join("")};pt.prototype.brushVML=function(t){var e=this.style,r=this._vmlEl;r||(r=Vp("shape"),Wp(r),this._vmlEl=r),jh(r,"fill",e,this),jh(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*=Qs(qB(s))}n.weight=o+"px"}var l=this.path||(this.path=new Oe);this.__dirtyPath&&(l.beginPath(),l.subPixelOptimize=!1,this.buildPath(l,this.shape),l.toStatic(),this.__dirtyPath=!1),r.path=r5(l,this.transform),r.style.zIndex=Up(this.zlevel,this.z,this.z2),Kr(t,r),e.text!=null?this.drawRectText(t,this.getBoundingRect()):this.removeRectText(t)},pt.prototype.onRemove=function(t){Js(t,this._vmlEl),this.removeRectText(t)},pt.prototype.onAdd=function(t){Kr(t,this._vmlEl),this.appendRectText(t)};var a5=function(t){return typeof t=="object"&&t.tagName&&t.tagName.toUpperCase()==="IMG"};ve.prototype.brushVML=function(t){var e=this.style,r=e.image,a,i;if(a5(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=Ke.createElement("div"),Wp(y),this._vmlEl=y);var _=y.style,w=!1,b,A=1,S=1;if(this.transform&&(b=this.transform,A=Qs(b[0]*b[0]+b[1]*b[1]),S=Qs(b[2]*b[2]+b[3]*b[3]),w=b[1]||b[2]),w){var D=[u,h],I=[u+f,h],L=[u,h+c],P=[u+f,h+c];Pt(D,D,b),Pt(I,I,b),Pt(L,L,b),Pt(P,P,b);var R=Hp(D[0],I[0],L[0],P[0]),E=Hp(D[1],I[1],L[1],P[1]),Z=[];Z.push("M11=",b[0]/A,Jt,"M12=",b[2]/S,Jt,"M21=",b[1]/A,Jt,"M22=",b[3]/S,Jt,"Dx=",Tt(u*A+b[4]),Jt,"Dy=",Tt(h*S+b[5])),_.padding="0 "+Tt(R)+"px "+Tt(E)+"px 0",_.filter=Fp+".Matrix("+Z.join("")+", SizingMethod=clip)"}else b&&(u=u*A+b[4],h=h*S+b[5]),_.filter="",_.left=Tt(u)+"px",_.top=Tt(h)+"px";var W=this._imageEl,$=this._cropEl;W||(W=Ke.createElement("div"),this._imageEl=W);var X=W.style;if(m){if(a&&i)X.width=Tt(A*a*f/v)+"px",X.height=Tt(S*i*c/d)+"px";else{var K=new Image,Q=this;K.onload=function(){K.onload=null,a=K.width,i=K.height,X.width=Tt(A*a*f/v)+"px",X.height=Tt(S*i*c/d)+"px",Q._imageWidth=a,Q._imageHeight=i,Q._imageSrc=r},K.src=r}$||($=Ke.createElement("div"),$.style.overflow="hidden",this._cropEl=$);var j=$.style;j.width=Tt((f+g*f/v)*A),j.height=Tt((c+p*c/d)*S),j.filter=Fp+".Matrix(Dx="+-g*f/v*A+",Dy="+-p*c/d*S+")",$.parentNode||y.appendChild($),W.parentNode!==$&&$.appendChild(W)}else X.width=Tt(A*f)+"px",X.height=Tt(S*c)+"px",y.appendChild(W),$&&$.parentNode&&(y.removeChild($),this._cropEl=null);var U="",tt=e.opacity;tt<1&&(U+=".Alpha(opacity="+Tt(tt*100)+") "),U+=Fp+".AlphaImageLoader(src="+r+", SizingMethod=scale)",X.filter=U,y.style.zIndex=Up(this.zlevel,this.z,this.z2),Kr(t,y),e.text!=null&&this.drawRectText(t,this.getBoundingRect())}},ve.prototype.onRemove=function(t){Js(t,this._vmlEl),this._vmlEl=null,this._cropEl=null,this._imageEl=null,this.removeRectText(t)},ve.prototype.onAdd=function(t){Kr(t,this._vmlEl),this.appendRectText(t)};var $p="normal",Zp={},Yp=0,i5=100,n5=document.createElement("div"),o5=function(t){var e=Zp[t];if(!e){Yp>i5&&(Yp=0,Zp={});var r=n5.style,a;try{r.font=t,a=r.fontFamily.split(",")[0]}catch{}e={style:r.fontStyle||$p,variant:r.fontVariant||$p,weight:r.fontWeight||$p,size:parseFloat(r.fontSize||12)|0,family:a||"Microsoft YaHei"},Zp[t]=e,Yp++}return e},ri;BC("measureText",function(t,e){var r=Ke;ri||(ri=r.createElement("div"),ri.style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",Ke.body.appendChild(ri));try{ri.style.font=e}catch{}return ri.innerHTML="",ri.appendChild(r.createTextNode(t)),{width:ri.offsetWidth}});for(var Xp=new vt,s5=function(t,e,r,a){var i=this.style;this.__dirty&&Mo(i,!0);var n=i.text;if(n!=null&&(n+=""),!!n){if(i.rich){var o=ic(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=o5(i.font),p=g.style+" "+g.variant+" "+g.weight+" "+g.size+'px "'+g.family+'"';r=r||Rr(n,p,v,d,i.textPadding,i.textLineHeight);var m=this.transform;if(m&&!a&&(Xp.copy(e),Xp.applyTransform(m),e=Xp),a)f=e.x,c=e.y;else{var y=i.textPosition;if(y instanceof Array)f=e.x+_T(y[0],e.width),c=e.y+_T(y[1],e.height),v=v||"left";else{var _=this.calculateTextPosition?this.calculateTextPosition({},i,e):ec({},i,e);f=_.x,c=_.y,v=v||_.textAlign,d=d||_.textVerticalAlign}}f=Do(f,r.width,v),c=pn(c,r.height,d),c+=r.height/2;var w=Vp,b=this._textVmlEl,A,S,D;b?(D=b.firstChild,A=D.nextSibling,S=A.nextSibling):(b=w("line"),A=w("path"),S=w("textpath"),D=w("skew"),S.style["v-text-align"]="left",Wp(b),A.textpathok=!0,S.on=!0,b.from="0 0",b.to="1000 0.05",Kr(b,D),Kr(b,A),Kr(b,S),this._textVmlEl=b);var I=[f,c],L=b.style;m&&a?(Pt(I,I,m),D.on=!0,D.matrix=m[0].toFixed(3)+Jt+m[2].toFixed(3)+Jt+m[1].toFixed(3)+Jt+m[3].toFixed(3)+",0,0",D.offset=(Tt(I[0])||0)+","+(Tt(I[1])||0),D.origin="0 0",L.left="0px",L.top="0px"):(D.on=!1,L.left=Tt(f)+"px",L.top=Tt(c)+"px"),S.string=QB(n);try{S.style.font=p}catch{}jh(b,"fill",{fill:i.textFill,opacity:i.opacity},this),jh(b,"stroke",{stroke:i.textStroke,opacity:i.opacity,lineDash:i.lineDash||null},this),b.style.zIndex=Up(this.zlevel,this.z,this.z2),Kr(t,b)}},l5=function(t){Js(t,this._textVmlEl),this._textVmlEl=null},u5=function(t){Kr(t,this._textVmlEl)},wT=[Cl,Le,ve,pt,dt],qp=0;qp<wT.length;qp++){var Kp=wT[qp].prototype;Kp.drawRectText=s5,Kp.removeRectText=l5,Kp.appendRectText=u5}dt.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)},dt.prototype.onRemove=function(t){this.removeRectText(t)},dt.prototype.onAdd=function(t){this.appendRectText(t)}}function ho(t){return parseInt(t,10)}function Qh(t,e){XB(),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}Qh.prototype={constructor:Qh,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||ho(e.width))-ho(e.paddingLeft)-ho(e.paddingRight)|0},_getHeight:function(){var t=this.root,e=t.currentStyle;return(t.clientHeight||ho(e.height))-ho(e.paddingTop)-ho(e.paddingBottom)|0}};function h5(t){return function(){Ta('In IE8.0 VML mode painter not support method "'+t+'"')}}M(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(t){Qh.prototype[t]=h5(t)}),Ic("vml",Qh);var f5="http://www.w3.org/2000/svg";function jr(t){return document.createElementNS(f5,t)}var ji=Oe.CMD,c5=Array.prototype.join,fo="none",jp=Math.round,bT=Math.sin,ST=Math.cos,AT=Math.PI,ai=Math.PI*2,v5=180/AT,TT=1e-4;function Lr(t){return jp(t*1e4)/1e4}function CT(t){return t<TT&&t>-TT}function d5(t,e){var r=e?t.textFill:t.fill;return r!=null&&r!==fo}function g5(t,e){var r=e?t.textStroke:t.stroke;return r!=null&&r!==fo}function Qp(t,e){e&&Wt(t,"transform","matrix("+c5.call(e,",")+")")}function Wt(t,e,r){(!r||r.type!=="linear"&&r.type!=="radial")&&t.setAttribute(e,r)}function p5(t,e,r){t.setAttributeNS("http://www.w3.org/1999/xlink",e,r)}function DT(t,e,r,a){if(d5(e,r)){var i=r?e.textFill:e.fill;i=i==="transparent"?fo:i,Wt(t,"fill",i),Wt(t,"fill-opacity",e.fillOpacity!=null?e.fillOpacity*e.opacity:e.opacity)}else Wt(t,"fill",fo);if(g5(e,r)){var n=r?e.textStroke:e.stroke;n=n==="transparent"?fo:n,Wt(t,"stroke",n);var o=r?e.textStrokeWidth:e.lineWidth,s=!r&&e.strokeNoScale?a.getLineScale():1;Wt(t,"stroke-width",o/s),Wt(t,"paint-order",r?"stroke":"fill"),Wt(t,"stroke-opacity",e.strokeOpacity!=null?e.strokeOpacity:e.opacity);var l=e.lineDash;l?(Wt(t,"stroke-dasharray",e.lineDash.join(",")),Wt(t,"stroke-dashoffset",jp(e.lineDashOffset||0))):Wt(t,"stroke-dasharray",""),e.lineCap&&Wt(t,"stroke-linecap",e.lineCap),e.lineJoin&&Wt(t,"stroke-linejoin",e.lineJoin),e.miterLimit&&Wt(t,"stroke-miterlimit",e.miterLimit)}else Wt(t,"stroke",fo)}function m5(t){for(var e=[],r=t.data,a=t.len(),i=0;i<a;){var n=r[i++],o="",s=0;switch(n){case ji.M:o="M",s=2;break;case ji.L:o="L",s=2;break;case ji.Q:o="Q",s=4;break;case ji.C:o="C",s=6;break;case ji.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=CT(p-ai)||(g?v>=ai:-v>=ai),y=v>0?v%ai:v%ai+ai,_=!1;m?_=!0:CT(p)?_=!1:_=y>=AT==!!g;var w=Lr(l+h*ST(c)),b=Lr(u+f*bT(c));m&&(g?v=ai-1e-4:v=-ai+1e-4,_=!0,i===9&&e.push("M",w,b));var A=Lr(l+h*ST(c+v)),S=Lr(u+f*bT(c+v));e.push("A",Lr(h),Lr(f),jp(d*v5),+_,+g,A,S);break;case ji.Z:o="Z";break;case ji.R:var A=Lr(r[i++]),S=Lr(r[i++]),D=Lr(r[i++]),I=Lr(r[i++]);e.push("M",A,S,"L",A+D,S,"L",A+D,S+I,"L",A,S+I,"L",A,S);break}o&&e.push(o);for(var L=0;L<s;L++)e.push(Lr(r[i++]))}return e.join(" ")}var tl={};tl.brush=function(t){var e=t.style,r=t.__svgEl;r||(r=jr("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=m5(a);i.indexOf("NaN")<0&&Wt(r,"d",i)}DT(r,e,!1,t),Qp(r,t.transform),e.text!=null?tf(t,t.getBoundingRect()):em(t)};var Jp={};Jp.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=jr("image"),t.__svgEl=l),r!==t.__imageSrc&&(p5(l,"href",r),t.__imageSrc=r),Wt(l,"width",o),Wt(l,"height",s),Wt(l,"x",i),Wt(l,"y",n),Qp(l,t.transform),e.text!=null?tf(t,t.getBoundingRect()):em(t)}};var Jh={},tm=new vt,el={},_a=[],y5={left:"start",right:"end",center:"middle",middle:"middle"},tf=function(t,e){var r=t.style,a=t.transform,i=t instanceof dt||r.transformText;t.__dirty&&Mo(r,!0);var n=r.text;if(n!=null&&(n+=""),!!vc(n,r)){n==null&&(n=""),!i&&a&&(tm.copy(e),tm.applyTransform(a),e=tm);var o=t.__textSvgEl;o||(o=jr("text"),t.__textSvgEl=o);var s=o.style,l=r.font||Tl,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=ac(n,u,h,f,r.truncate));var v=c.outerHeight,d=c.lineHeight;hc(el,t,r,e);var g=el.baseX,p=el.baseY,m=el.textAlign||"left",y=el.textVerticalAlign;_5(o,i,a,r,e,g,p);var _=pn(p,v,y),w=g,b=_;h&&(w=x5(g,m,h),b+=h[0]),b+=d/2,DT(o,r,!0,t);var A=c.canCacheByTextString,S=t.__tspanList||(t.__tspanList=[]),D=S.length;if(A&&t.__canCacheByTextString&&t.__text===n){if(t.__dirtyText&&D)for(var I=0;I<D;++I)MT(S[I],m,w,b+I*d)}else{t.__text=n,t.__canCacheByTextString=A;for(var L=c.lines,P=L.length,I=0;I<P;I++){var R=S[I],E=L[I];R?R.__zrText!==E&&(R.innerHTML="",R.appendChild(document.createTextNode(E))):(R=S[I]=jr("tspan"),o.appendChild(R),R.appendChild(document.createTextNode(E))),MT(R,m,w,b+I*d)}if(D>P){for(;I<D;I++)o.removeChild(S[I]);S.length=P}}}};function _5(t,e,r,a,i,n,o){fn(_a),e&&r&&xo(_a,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),_a[4]-=n,_a[5]-=o,aa(_a,_a,s),_a[4]+=n,_a[5]+=o}Qp(t,_a)}function x5(t,e,r){return e==="right"?t-r[1]:e==="center"?t+r[3]/2-r[1]/2:t+r[3]}function MT(t,e,r,a){Wt(t,"dominant-baseline","middle"),Wt(t,"text-anchor",y5[e]),Wt(t,"x",r),Wt(t,"y",a)}function em(t){t&&t.__textSvgEl&&(t.__textSvgEl.parentNode&&t.__textSvgEl.parentNode.removeChild(t.__textSvgEl),t.__textSvgEl=null,t.__tspanList=[],t.__text=null)}Jh.drawRectText=tf,Jh.brush=function(t){var e=t.style;e.text!=null?tf(t,!1):em(t)};function IT(){}IT.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,w=m&&0<=y&&y<n;if(!_&&!w){l[d]=void 0;continue}if(!_||w&&p.newPos<m.newPos?(g=b5(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 w5(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 w5(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 b5(t){return{newPos:t.newPos,components:t.components.slice(0)}}var S5=new IT,A5=function(t,e,r){return S5.diff(t,e,r)},T5="0",LT="1";function zt(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}zt.prototype.createElement=jr,zt.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]},zt.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)}}},zt.prototype.addDom=function(t){var e=this.getDefs(!0);e.appendChild(t)},zt.prototype.removeDom=function(t){var e=this.getDefs(!1);e&&t[this._domName]&&(e.removeChild(t[this._domName]),t[this._domName]=null)},zt.prototype.getDoms=function(){var t=this.getDefs(!1);if(!t)return[];var e=[];return M(this._tagNames,function(r){var a=t.getElementsByTagName(r);e=e.concat([].slice.call(a))}),e},zt.prototype.markAllUnused=function(){var t=this.getDoms(),e=this;M(t,function(r){r[e._markLabel]=T5})},zt.prototype.markUsed=function(t){t&&(t[this._markLabel]=LT)},zt.prototype.removeUnused=function(){var t=this.getDefs(!1);if(!!t){var e=this.getDoms(),r=this;M(e,function(a){a[r._markLabel]!==LT&&t.removeChild(a)})}},zt.prototype.getSvgProxy=function(t){return t instanceof pt?tl:t instanceof ve?Jp:t instanceof dt?Jh:tl},zt.prototype.getTextSvgElement=function(t){return t.__textSvgEl},zt.prototype.getSvgElement=function(t){return t.__svgEl};function Qi(t,e){zt.call(this,t,e,["linearGradient","radialGradient"],"__gradient_in_use__")}It(Qi,zt),Qi.prototype.addWithoutUpdate=function(t,e){if(e&&e.style){var r=this;M(["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+")")}})}},Qi.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 Ta("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},Qi.prototype.update=function(t){var e=this;zt.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))})},Qi.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{Ta("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=Ve(o)[3],l=kf(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},Qi.prototype.markUsed=function(t){if(t.style){var e=t.style.fill;e&&e._dom&&zt.prototype.markUsed.call(this,e._dom),e=t.style.stroke,e&&e._dom&&zt.prototype.markUsed.call(this,e._dom)}};function rl(t,e){zt.call(this,t,e,"clipPath","__clippath_in_use__")}It(rl,zt),rl.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)},rl.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);Sa(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")},rl.prototype.markUsed=function(t){var e=this;t.__clipPaths&&M(t.__clipPaths,function(r){r._dom&&zt.prototype.markUsed.call(e,r._dom),r._textDom&&zt.prototype.markUsed.call(e,r._textDom)})};function ii(t,e){zt.call(this,t,e,["filter"],"__filter_in_use__","_shadowDom")}It(ii,zt),ii.prototype.addWithoutUpdate=function(t,e){if(e&&PT(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+")"}},ii.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},ii.prototype.update=function(t,e){var r=e.style;if(PT(r)){var a=this;zt.prototype.update.call(this,e,function(){a.updateDom(e,e._shadowDom)})}else this.remove(t,e)},ii.prototype.remove=function(t,e){e._shadowDomId!=null&&(this.removeDom(t),t.style.filter="")},ii.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},ii.prototype.markUsed=function(t){t._shadowDom&&zt.prototype.markUsed.call(this,t._shadowDom)};function PT(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY||t.textShadowBlur||t.textShadowOffsetX||t.textShadowOffsetY)}function ef(t){return parseInt(t,10)}function C5(t){return t instanceof pt?tl:t instanceof ve?Jp:t instanceof dt?Jh:tl}function ET(t,e){return e&&t&&e.parentNode!==t}function al(t,e,r){if(ET(t,e)&&r){var a=r.nextSibling;a?t.insertBefore(e,a):t.appendChild(e)}}function RT(t,e){if(ET(t,e)){var r=t.firstChild;r?t.insertBefore(e,r):t.appendChild(e)}}function OT(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)}function il(t){return t.__textSvgEl}function nl(t){return t.__svgEl}var rf=function(t,e,r,a){this.root=t,this.storage=e,this._opts=r=et({},r||{});var i=jr("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=jr("g");i.appendChild(n);var o=jr("g");i.appendChild(o),this.gradientManager=new Qi(a,o),this.clipPathManager=new rl(a,o),this.shadowManager=new ii(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=[]};rf.prototype={constructor:rf,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=jr("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=C5(o),l=nl(o)||il(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=A5(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=nl(o),v=il(o);OT(e,l),OT(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=nl(o),v=il(o);h?al(e,l,h):RT(e,l),l?al(e,v,l):h?al(e,v,h):RT(e,v),al(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=nl(o),v=il(o),l=nl(o),v=il(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&&al(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(jr("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]||ef(s[r])||ef(o.style[r]))-(ef(s[i])||0)-(ef(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 D5(t){return function(){Ta('In SVG mode painter not support method "'+t+'"')}}M(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","pathToImage"],function(t){rf.prototype[t]=D5(t)}),Ic("svg",rf),x.version=p_,x.dependencies=Ev,x.PRIORITY=Wr,x.init=h2,x.connect=f2,x.disConnect=E_,x.disconnect=c2,x.dispose=v2,x.getInstanceByDom=Gv,x.getInstanceById=d2,x.registerTheme=Hv,x.registerPreprocessor=we,x.registerProcessor=$e,x.registerPostUpdate=g2,x.registerAction=mt,x.registerCoordinateSystem=Fv,x.getCoordinateSystemDimensions=p2,x.registerLayout=Gt,x.registerVisual=Rt,x.registerLoading=R_,x.extendComponentModel=Ze,x.extendComponentView=he,x.extendSeriesModel=Mu,x.extendChartView=ke,x.setCanvasCreator=m2,x.registerMap=y2,x.getMap=_2,x.dataTool=x2,x.zrender=hD,x.number=SM,x.format=MM,x.throttle=du,x.helper=cL,x.matrix=gC,x.vector=eC,x.color=xC,x.parseGeoJSON=od,x.parseGeoJson=AL,x.util=_1,x.graphic=x1,x.List=fe,x.Model=_t,x.Axis=Qt,x.env=G});var co=zT.echarts;var am=N5(VT(),1);function k5(x){return x!=null}var st=k5;function tn(x){this.name="DeveloperError",this.message=x;let C;try{throw new Error}catch(T){C=T.stack}this.stack=C}st(Object.create)&&(tn.prototype=Object.create(Error.prototype),tn.prototype.constructor=tn);tn.prototype.toString=function(){let x=`${this.name}: ${this.message}`;return st(this.stack)&&(x+=`
| ${this.stack.toString()}`),x};tn.throwInstantiationError=function(){throw new tn("This function defines an interface and should not be called directly.")};var at=tn;var ne={};ne.typeOf={};function z5(x){return`${x} is required, actual value was undefined`}function vo(x,C,T){return`Expected ${T} to be typeof ${C}, actual typeof was ${x}`}ne.defined=function(x,C){if(!st(C))throw new at(z5(x))};ne.typeOf.func=function(x,C){if(typeof C!="function")throw new at(vo(typeof C,"function",x))};ne.typeOf.string=function(x,C){if(typeof C!="string")throw new at(vo(typeof C,"string",x))};ne.typeOf.number=function(x,C){if(typeof C!="number")throw new at(vo(typeof C,"number",x))};ne.typeOf.number.lessThan=function(x,C,T){if(ne.typeOf.number(x,C),C>=T)throw new at(`Expected ${x} to be less than ${T}, actual value was ${C}`)};ne.typeOf.number.lessThanOrEquals=function(x,C,T){if(ne.typeOf.number(x,C),C>T)throw new at(`Expected ${x} to be less than or equal to ${T}, actual value was ${C}`)};ne.typeOf.number.greaterThan=function(x,C,T){if(ne.typeOf.number(x,C),C<=T)throw new at(`Expected ${x} to be greater than ${T}, actual value was ${C}`)};ne.typeOf.number.greaterThanOrEquals=function(x,C,T){if(ne.typeOf.number(x,C),C<T)throw new at(`Expected ${x} to be greater than or equal to ${T}, actual value was ${C}`)};ne.typeOf.object=function(x,C){if(typeof C!="object")throw new at(vo(typeof C,"object",x))};ne.typeOf.bool=function(x,C){if(typeof C!="boolean")throw new at(vo(typeof C,"boolean",x))};ne.typeOf.bigint=function(x,C){if(typeof C!="bigint")throw new at(vo(typeof C,"bigint",x))};ne.typeOf.number.equals=function(x,C,T,N){if(ne.typeOf.number(x,T),ne.typeOf.number(C,N),T!==N)throw new at(`${x} must be equal to ${C}, the actual values are ${T} and ${N}`)};var Y=ne;function GT(x,C){return x??C}GT.EMPTY_OBJECT=Object.freeze({});var oe=GT;var B={};B.EPSILON1=.1;B.EPSILON2=.01;B.EPSILON3=.001;B.EPSILON4=1e-4;B.EPSILON5=1e-5;B.EPSILON6=1e-6;B.EPSILON7=1e-7;B.EPSILON8=1e-8;B.EPSILON9=1e-9;B.EPSILON10=1e-10;B.EPSILON11=1e-11;B.EPSILON12=1e-12;B.EPSILON13=1e-13;B.EPSILON14=1e-14;B.EPSILON15=1e-15;B.EPSILON16=1e-16;B.EPSILON17=1e-17;B.EPSILON18=1e-18;B.EPSILON19=1e-19;B.EPSILON20=1e-20;B.EPSILON21=1e-21;B.GRAVITATIONALPARAMETER=3986004418e5;B.SOLAR_RADIUS=6955e5;B.LUNAR_RADIUS=1737400;B.SIXTY_FOUR_KILOBYTES=64*1024;B.FOUR_GIGABYTES=4*1024*1024*1024;B.sign=oe(Math.sign,function(C){return C=+C,C===0||C!==C?C:C>0?1:-1});B.signNotZero=function(x){return x<0?-1:1};B.toSNorm=function(x,C){return C=oe(C,255),Math.round((B.clamp(x,-1,1)*.5+.5)*C)};B.fromSNorm=function(x,C){return C=oe(C,255),B.clamp(x,0,C)/C*2-1};B.normalize=function(x,C,T){return T=Math.max(T-C,0),T===0?0:B.clamp((x-C)/T,0,1)};B.sinh=oe(Math.sinh,function(C){return(Math.exp(C)-Math.exp(-C))/2});B.cosh=oe(Math.cosh,function(C){return(Math.exp(C)+Math.exp(-C))/2});B.lerp=function(x,C,T){return(1-T)*x+T*C};B.PI=Math.PI;B.ONE_OVER_PI=1/Math.PI;B.PI_OVER_TWO=Math.PI/2;B.PI_OVER_THREE=Math.PI/3;B.PI_OVER_FOUR=Math.PI/4;B.PI_OVER_SIX=Math.PI/6;B.THREE_PI_OVER_TWO=3*Math.PI/2;B.TWO_PI=2*Math.PI;B.ONE_OVER_TWO_PI=1/(2*Math.PI);B.RADIANS_PER_DEGREE=Math.PI/180;B.DEGREES_PER_RADIAN=180/Math.PI;B.RADIANS_PER_ARCSECOND=B.RADIANS_PER_DEGREE/3600;B.toRadians=function(x){if(!st(x))throw new at("degrees is required.");return x*B.RADIANS_PER_DEGREE};B.toDegrees=function(x){if(!st(x))throw new at("radians is required.");return x*B.DEGREES_PER_RADIAN};B.convertLongitudeRange=function(x){if(!st(x))throw new at("angle is required.");let C=B.TWO_PI,T=x-Math.floor(x/C)*C;return T<-Math.PI?T+C:T>=Math.PI?T-C:T};B.clampToLatitudeRange=function(x){if(!st(x))throw new at("angle is required.");return B.clamp(x,-1*B.PI_OVER_TWO,B.PI_OVER_TWO)};B.negativePiToPi=function(x){if(!st(x))throw new at("angle is required.");return x>=-B.PI&&x<=B.PI?x:B.zeroToTwoPi(x+B.PI)-B.PI};B.zeroToTwoPi=function(x){if(!st(x))throw new at("angle is required.");if(x>=0&&x<=B.TWO_PI)return x;let C=B.mod(x,B.TWO_PI);return Math.abs(C)<B.EPSILON14&&Math.abs(x)>B.EPSILON14?B.TWO_PI:C};B.mod=function(x,C){if(!st(x))throw new at("m is required.");if(!st(C))throw new at("n is required.");if(C===0)throw new at("divisor cannot be 0.");return B.sign(x)===B.sign(C)&&Math.abs(x)<Math.abs(C)?x:(x%C+C)%C};B.equalsEpsilon=function(x,C,T,N){if(!st(x))throw new at("left is required.");if(!st(C))throw new at("right is required.");T=oe(T,0),N=oe(N,T);let k=Math.abs(x-C);return k<=N||k<=T*Math.max(Math.abs(x),Math.abs(C))};B.lessThan=function(x,C,T){if(!st(x))throw new at("first is required.");if(!st(C))throw new at("second is required.");if(!st(T))throw new at("absoluteEpsilon is required.");return x-C<-T};B.lessThanOrEquals=function(x,C,T){if(!st(x))throw new at("first is required.");if(!st(C))throw new at("second is required.");if(!st(T))throw new at("absoluteEpsilon is required.");return x-C<T};B.greaterThan=function(x,C,T){if(!st(x))throw new at("first is required.");if(!st(C))throw new at("second is required.");if(!st(T))throw new at("absoluteEpsilon is required.");return x-C>T};B.greaterThanOrEquals=function(x,C,T){if(!st(x))throw new at("first is required.");if(!st(C))throw new at("second is required.");if(!st(T))throw new at("absoluteEpsilon is required.");return x-C>-T};var af=[1];B.factorial=function(x){if(typeof x!="number"||x<0)throw new at("A number greater than or equal to 0 is required.");let C=af.length;if(x>=C){let T=af[C-1];for(let N=C;N<=x;N++){let k=T*N;af.push(k),T=k}}return af[x]};B.incrementWrap=function(x,C,T){if(T=oe(T,0),!st(x))throw new at("n is required.");if(C<=T)throw new at("maximumValue must be greater than minimumValue.");return++x,x>C&&(x=T),x};B.isPowerOfTwo=function(x){if(typeof x!="number"||x<0||x>4294967295)throw new at("A number between 0 and (2^32)-1 is required.");return x!==0&&(x&x-1)===0};B.nextPowerOfTwo=function(x){if(typeof x!="number"||x<0||x>2147483648)throw new at("A number between 0 and 2^31 is required.");return--x,x|=x>>1,x|=x>>2,x|=x>>4,x|=x>>8,x|=x>>16,++x,x};B.previousPowerOfTwo=function(x){if(typeof x!="number"||x<0||x>4294967295)throw new at("A number between 0 and (2^32)-1 is required.");return x|=x>>1,x|=x>>2,x|=x>>4,x|=x>>8,x|=x>>16,x|=x>>32,x=(x>>>0)-(x>>>1),x};B.clamp=function(x,C,T){return Y.typeOf.number("value",x),Y.typeOf.number("min",C),Y.typeOf.number("max",T),x<C?C:x>T?T:x};var HT=new am.default;B.setRandomNumberSeed=function(x){if(!st(x))throw new at("seed is required.");HT=new am.default(x)};B.nextRandomNumber=function(){return HT.random()};B.randomBetween=function(x,C){return B.nextRandomNumber()*(C-x)+x};B.acosClamped=function(x){if(!st(x))throw new at("value is required.");return Math.acos(B.clamp(x,-1,1))};B.asinClamped=function(x){if(!st(x))throw new at("value is required.");return Math.asin(B.clamp(x,-1,1))};B.chordLength=function(x,C){if(!st(x))throw new at("angle is required.");if(!st(C))throw new at("radius is required.");return 2*C*Math.sin(x*.5)};B.logBase=function(x,C){if(!st(x))throw new at("number is required.");if(!st(C))throw new at("base is required.");return Math.log(x)/Math.log(C)};B.cbrt=oe(Math.cbrt,function(C){let T=Math.pow(Math.abs(C),.3333333333333333);return C<0?-T:T});B.log2=oe(Math.log2,function(C){return Math.log(C)*Math.LOG2E});B.fog=function(x,C){let T=x*C;return 1-Math.exp(-(T*T))};B.fastApproximateAtan=function(x){return Y.typeOf.number("x",x),x*(-.1784*Math.abs(x)-.0663*x*x+1.0301)};B.fastApproximateAtan2=function(x,C){Y.typeOf.number("x",x),Y.typeOf.number("y",C);let T,N=Math.abs(x);T=Math.abs(C);let k=Math.max(N,T);T=Math.min(N,T);let F=T/k;if(isNaN(F))throw new at("either x or y must be nonzero");return N=B.fastApproximateAtan(F),N=Math.abs(C)>Math.abs(x)?B.PI_OVER_TWO-N:N,N=x<0?B.PI-N:N,N=C<0?-N:N,N};var Qe=B;var nf={ellipsoidCoordinates:null,changeApproximateTerrainHeights:!1,minTerrainHeight:-2e4,maxTerrainHeight:2e4};nf.isMoon=function(){return nf.ellipsoidCoordinates==="MOON"||nf.ellipsoidCoordinates==="MOON2000"};var of=nf;function O(x,C,T){this.x=oe(x,0),this.y=oe(C,0),this.z=oe(T,0)}O.fromSpherical=function(x,C){Y.typeOf.object("spherical",x),st(C)||(C=new O);let T=x.clock,N=x.cone,k=oe(x.magnitude,1),F=k*Math.sin(N);return C.x=F*Math.cos(T),C.y=F*Math.sin(T),C.z=k*Math.cos(N),C};O.fromElements=function(x,C,T,N){return st(N)?(N.x=x,N.y=C,N.z=T,N):new O(x,C,T)};O.clone=function(x,C){if(!!st(x))return st(C)?(C.x=x.x,C.y=x.y,C.z=x.z,C):new O(x.x,x.y,x.z)};O.fromCartesian4=O.clone;O.packedLength=3;O.pack=function(x,C,T){return Y.typeOf.object("value",x),Y.defined("array",C),T=oe(T,0),C[T++]=x.x,C[T++]=x.y,C[T]=x.z,C};O.unpack=function(x,C,T){return Y.defined("array",x),C=oe(C,0),st(T)||(T=new O),T.x=x[C++],T.y=x[C++],T.z=x[C],T};O.packArray=function(x,C){Y.defined("array",x);let T=x.length,N=T*3;if(!st(C))C=new Array(N);else{if(!Array.isArray(C)&&C.length!==N)throw new at("If result is a typed array, it must have exactly array.length * 3 elements");C.length!==N&&(C.length=N)}for(let k=0;k<T;++k)O.pack(x[k],C,k*3);return C};O.unpackArray=function(x,C){if(Y.defined("array",x),Y.typeOf.number.greaterThanOrEquals("array.length",x.length,3),x.length%3!==0)throw new at("array length must be a multiple of 3.");let T=x.length;st(C)?C.length=T/3:C=new Array(T/3);for(let N=0;N<T;N+=3){let k=N/3;C[k]=O.unpack(x,N,C[k])}return C};O.fromArray=O.unpack;O.maximumComponent=function(x){return Y.typeOf.object("cartesian",x),Math.max(x.x,x.y,x.z)};O.minimumComponent=function(x){return Y.typeOf.object("cartesian",x),Math.min(x.x,x.y,x.z)};O.minimumByComponent=function(x,C,T){return Y.typeOf.object("first",x),Y.typeOf.object("second",C),Y.typeOf.object("result",T),T.x=Math.min(x.x,C.x),T.y=Math.min(x.y,C.y),T.z=Math.min(x.z,C.z),T};O.maximumByComponent=function(x,C,T){return Y.typeOf.object("first",x),Y.typeOf.object("second",C),Y.typeOf.object("result",T),T.x=Math.max(x.x,C.x),T.y=Math.max(x.y,C.y),T.z=Math.max(x.z,C.z),T};O.clamp=function(x,C,T,N){Y.typeOf.object("value",x),Y.typeOf.object("min",C),Y.typeOf.object("max",T),Y.typeOf.object("result",N);let k=Qe.clamp(x.x,C.x,T.x),F=Qe.clamp(x.y,C.y,T.y),G=Qe.clamp(x.z,C.z,T.z);return N.x=k,N.y=F,N.z=G,N};O.magnitudeSquared=function(x){return Y.typeOf.object("cartesian",x),x.x*x.x+x.y*x.y+x.z*x.z};O.magnitude=function(x){return Math.sqrt(O.magnitudeSquared(x))};var lf=new O;O.distance=function(x,C){return Y.typeOf.object("left",x),Y.typeOf.object("right",C),O.subtract(x,C,lf),O.magnitude(lf)};O.distanceSquared=function(x,C){return Y.typeOf.object("left",x),Y.typeOf.object("right",C),O.subtract(x,C,lf),O.magnitudeSquared(lf)};O.normalize=function(x,C){Y.typeOf.object("cartesian",x),Y.typeOf.object("result",C);let T=O.magnitude(x);if(C.x=x.x/T,C.y=x.y/T,C.z=x.z/T,isNaN(C.x)||isNaN(C.y)||isNaN(C.z))throw new at("normalized result is not a number");return C};O.dot=function(x,C){return Y.typeOf.object("left",x),Y.typeOf.object("right",C),x.x*C.x+x.y*C.y+x.z*C.z};O.multiplyComponents=function(x,C,T){return Y.typeOf.object("left",x),Y.typeOf.object("right",C),Y.typeOf.object("result",T),T.x=x.x*C.x,T.y=x.y*C.y,T.z=x.z*C.z,T};O.divideComponents=function(x,C,T){return Y.typeOf.object("left",x),Y.typeOf.object("right",C),Y.typeOf.object("result",T),T.x=x.x/C.x,T.y=x.y/C.y,T.z=x.z/C.z,T};O.add=function(x,C,T){return Y.typeOf.object("left",x),Y.typeOf.object("right",C),Y.typeOf.object("result",T),T.x=x.x+C.x,T.y=x.y+C.y,T.z=x.z+C.z,T};O.subtract=function(x,C,T){return Y.typeOf.object("left",x),Y.typeOf.object("right",C),Y.typeOf.object("result",T),T.x=x.x-C.x,T.y=x.y-C.y,T.z=x.z-C.z,T};O.multiplyByScalar=function(x,C,T){return Y.typeOf.object("cartesian",x),Y.typeOf.number("scalar",C),Y.typeOf.object("result",T),T.x=x.x*C,T.y=x.y*C,T.z=x.z*C,T};O.divideByScalar=function(x,C,T){return Y.typeOf.object("cartesian",x),Y.typeOf.number("scalar",C),Y.typeOf.object("result",T),T.x=x.x/C,T.y=x.y/C,T.z=x.z/C,T};O.negate=function(x,C){return Y.typeOf.object("cartesian",x),Y.typeOf.object("result",C),C.x=-x.x,C.y=-x.y,C.z=-x.z,C};O.abs=function(x,C){return Y.typeOf.object("cartesian",x),Y.typeOf.object("result",C),C.x=Math.abs(x.x),C.y=Math.abs(x.y),C.z=Math.abs(x.z),C};var FT=new O;O.lerp=function(x,C,T,N){return Y.typeOf.object("start",x),Y.typeOf.object("end",C),Y.typeOf.number("t",T),Y.typeOf.object("result",N),O.multiplyByScalar(C,T,FT),N=O.multiplyByScalar(x,1-T,N),O.add(FT,N,N)};var sf=new O,im=new O;O.angleBetween=function(x,C){Y.typeOf.object("left",x),Y.typeOf.object("right",C),O.normalize(x,sf),O.normalize(C,im);let T=O.dot(sf,im),N=O.magnitude(O.cross(sf,im,sf));return Math.atan2(N,T)};var B5=new O;O.mostOrthogonalAxis=function(x,C){Y.typeOf.object("cartesian",x),Y.typeOf.object("result",C);let T=O.normalize(x,B5);return O.abs(T,T),T.x<=T.y?T.x<=T.z?C=O.clone(O.UNIT_X,C):C=O.clone(O.UNIT_Z,C):T.y<=T.z?C=O.clone(O.UNIT_Y,C):C=O.clone(O.UNIT_Z,C),C};O.projectVector=function(x,C,T){Y.defined("a",x),Y.defined("b",C),Y.defined("result",T);let N=O.dot(x,C)/O.dot(C,C);return O.multiplyByScalar(C,N,T)};O.equals=function(x,C){return x===C||st(x)&&st(C)&&x.x===C.x&&x.y===C.y&&x.z===C.z};O.equalsArray=function(x,C,T){return x.x===C[T]&&x.y===C[T+1]&&x.z===C[T+2]};O.equalsEpsilon=function(x,C,T,N){return x===C||st(x)&&st(C)&&Qe.equalsEpsilon(x.x,C.x,T,N)&&Qe.equalsEpsilon(x.y,C.y,T,N)&&Qe.equalsEpsilon(x.z,C.z,T,N)};O.cross=function(x,C,T){Y.typeOf.object("left",x),Y.typeOf.object("right",C),Y.typeOf.object("result",T);let N=x.x,k=x.y,F=x.z,G=C.x,St=C.y,Ct=C.z,te=k*Ct-F*St,de=F*G-N*Ct,Yt=N*St-k*G;return T.x=te,T.y=de,T.z=Yt,T};O.midpoint=function(x,C,T){return Y.typeOf.object("left",x),Y.typeOf.object("right",C),Y.typeOf.object("result",T),T.x=(x.x+C.x)*.5,T.y=(x.y+C.y)*.5,T.z=(x.z+C.z)*.5,T};O.fromDegrees=function(x,C,T,N,k){return Y.typeOf.number("longitude",x),Y.typeOf.number("latitude",C),x=Qe.toRadians(x),C=Qe.toRadians(C),O.fromRadians(x,C,T,N,k)};var Bt=new O,Je=new O,V5=new O(6378137*6378137,6378137*6378137,6356752314245179e-9*6356752314245179e-9);O.fromCGCS2000Degrees=function(x,C,T,N){return Y.typeOf.number("longitude",x),Y.typeOf.number("latitude",C),x=Qe.toRadians(x),C=Qe.toRadians(C),O.fromcgcs2000Radians(x,C,T,N)};var WT=new O(6378137*6378137,6378137*6378137,6356752314140356e-9*6356752314140356e-9);O.fromcgcs2000Radians=function(x,C,T,N){Y.typeOf.number("longitude",x),Y.typeOf.number("latitude",C),T=oe(T,0);let k=WT,F=Math.cos(C);Bt.x=F*Math.cos(x),Bt.y=F*Math.sin(x),Bt.z=Math.sin(C),Bt=O.normalize(Bt,Bt),O.multiplyComponents(k,Bt,Je);let G=Math.sqrt(O.dot(Bt,Je));return Je=O.divideByScalar(Je,G,Je),Bt=O.multiplyByScalar(Bt,T,Bt),st(N)||(N=new O),O.add(Je,Bt,N)};Bt=new O;Je=new O;var G5=new O(1737400*1737400,1737400*1737400,1737400*1737400);O.fromRadians=function(x,C,T,N,k){Y.typeOf.number("longitude",x),Y.typeOf.number("latitude",C),T=oe(T,0);let F=null;of.ellipsoidCoordinates==="CGCS2000"?F=WT:of.ellipsoidCoordinates==="MOON"||of.ellipsoidCoordinates==="MOON2000"?F=G5:F=st(N)?N.radiiSquared:V5;let G=Math.cos(C);Bt.x=G*Math.cos(x),Bt.y=G*Math.sin(x),Bt.z=Math.sin(C),Bt=O.normalize(Bt,Bt),O.multiplyComponents(F,Bt,Je);let St=Math.sqrt(O.dot(Bt,Je));return Je=O.divideByScalar(Je,St,Je),Bt=O.multiplyByScalar(Bt,T,Bt),st(k)||(k=new O),O.add(Je,Bt,k)};O.fromDegreesArray=function(x,C,T){if(Y.defined("coordinates",x),x.length<2||x.length%2!==0)throw new at("the number of coordinates must be a multiple of 2 and at least 2");let N=x.length;st(T)?T.length=N/2:T=new Array(N/2);for(let k=0;k<N;k+=2){let F=x[k],G=x[k+1],St=k/2;T[St]=O.fromDegrees(F,G,0,C,T[St])}return T};O.fromRadiansArray=function(x,C,T){if(Y.defined("coordinates",x),x.length<2||x.length%2!==0)throw new at("the number of coordinates must be a multiple of 2 and at least 2");let N=x.length;st(T)?T.length=N/2:T=new Array(N/2);for(let k=0;k<N;k+=2){let F=x[k],G=x[k+1],St=k/2;T[St]=O.fromRadians(F,G,0,C,T[St])}return T};O.fromDegreesArrayHeights=function(x,C,T){if(Y.defined("coordinates",x),x.length<3||x.length%3!==0)throw new at("the number of coordinates must be a multiple of 3 and at least 3");let N=x.length;st(T)?T.length=N/3:T=new Array(N/3);for(let k=0;k<N;k+=3){let F=x[k],G=x[k+1],St=x[k+2],Ct=k/3;T[Ct]=O.fromDegrees(F,G,St,C,T[Ct])}return T};O.fromRadiansArrayHeights=function(x,C,T){if(Y.defined("coordinates",x),x.length<3||x.length%3!==0)throw new at("the number of coordinates must be a multiple of 3 and at least 3");let N=x.length;st(T)?T.length=N/3:T=new Array(N/3);for(let k=0;k<N;k+=3){let F=x[k],G=x[k+1],St=x[k+2],Ct=k/3;T[Ct]=O.fromRadians(F,G,St,C,T[Ct])}return T};O.ZERO=Object.freeze(new O(0,0,0));O.ONE=Object.freeze(new O(1,1,1));O.UNIT_X=Object.freeze(new O(1,0,0));O.UNIT_Y=Object.freeze(new O(0,1,0));O.UNIT_Z=Object.freeze(new O(0,0,1));O.prototype.clone=function(x){return O.clone(this,x)};O.prototype.equals=function(x){return O.equals(this,x)};O.prototype.equalsEpsilon=function(x,C,T){return O.equalsEpsilon(this,x,C,T)};O.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z})`};var nm=O;var uf={MORPHING:0,COLUMBUS_VIEW:1,SCENE2D:2,SCENE3D:3};uf.getMorphTime=function(x){return x===uf.SCENE3D?1:x===uf.MORPHING?void 0:0};var UT=Object.freeze(uf);var $T={};(function(C,T){C.FlowEcharts=T(co,C.Geoworld)})($T,function(x,C){return function(T){var N={};function k(F){if(N[F])return N[F].exports;var G=N[F]={i:F,l:!1,exports:{}};return T[F].call(G.exports,G,G.exports,k),G.l=!0,G.exports}return k.m=T,k.c=N,k.d=function(F,G,St){k.o(F,G)||Object.defineProperty(F,G,{enumerable:!0,get:St})},k.r=function(F){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(F,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(F,"__esModule",{value:!0})},k.t=function(F,G){if(G&1&&(F=k(F)),G&8||G&4&&typeof F=="object"&&F&&F.__esModule)return F;var St=Object.create(null);if(k.r(St),Object.defineProperty(St,"default",{enumerable:!0,value:F}),G&2&&typeof F!="string")for(var Ct in F)k.d(St,Ct,function(te){return F[te]}.bind(null,Ct));return St},k.n=function(F){var G=F&&F.__esModule?function(){return F.default}:function(){return F};return k.d(G,"a",G),G},k.o=function(F,G){return Object.prototype.hasOwnProperty.call(F,G)},k.p="",k(k.s=0)}([function(T,N,k){k(1);var F=k(7);T.exports=F},function(T,N,k){var F;F=function(G){return k(2).registerCoordinateSystem("GLMap",k(3)),k(5),k(6),k(2).registerAction({type:"GLMapRoam",event:"GLMapRoam",update:"updateLayout"},function(St,Ct){}),{version:"1.0.0"}}.call(N,k,N,T),F!==void 0&&(T.exports=F)},function(T,N){T.exports=x},function(T,N,k){var F;F=function(G){var St=k(2);function Ct(te,de){this._GLMap=te,this.dimensions=["lng","lat"],this._mapOffset=[0,0],this._api=de}return Ct.prototype.dimensions=["lng","lat"],Ct.prototype.setMapOffset=function(te){this._mapOffset=te},Ct.prototype.getBMap=function(){return this._GLMap},Ct.prototype.dataToPoint=function(te){var de=Qe.toRadians(80),Yt=[99999,99999],gr=nm.fromDegrees(te[0],te[1]);if(!gr)return Yt;var en=this._GLMap.cartesianToCanvasCoordinates(gr);if(!en)return Yt;var Pr=this._GLMap;return Pr.mode===UT.SCENE3D&&nm.angleBetween(Pr.camera.position,gr)>de?!1:[en.x-this._mapOffset[0],en.y-this._mapOffset[1]]},Ct.prototype.pointToData=function(Yt){var de=this._mapOffset,Yt=this._bmap.project([Yt[0]+de[0],Yt[1]+de[1]]);return[Yt.lng,Yt.lat]},Ct.prototype.getViewRect=function(){var te=this._api;return new St.graphic.BoundingRect(0,0,te.getWidth(),te.getHeight())},Ct.prototype.getRoamTransform=function(){return St.matrix.create()},Ct.dimensions=Ct.prototype.dimensions,Ct.create=function(te,de){var Yt;te.eachComponent("GLMap",function(gr){var en=de.getZr().painter.getViewportRoot(),Pr=St.glMap;Yt=new Ct(Pr,de),Yt.setMapOffset(gr.__mapOffset||[0,0]),gr.coordinateSystem=Yt}),te.eachSeries(function(gr){gr.get("coordinateSystem")==="GLMap"&&(gr.coordinateSystem=Yt)})},Ct}.call(N,k,N,T),F!==void 0&&(T.exports=F)},function(T,N){T.exports=C},function(T,N,k){var F;F=function(G){return k(2).extendComponentModel({type:"GLMap",getBMap:function(){return this.__GLMap},defaultOption:{roam:!1}})}.call(N,k,N,T),F!==void 0&&(T.exports=F)},function(T,N,k){var F;F=function(G){return k(2).extendComponentView({type:"GLMap",init:function(St,Ct){this.api=Ct,co.glMap.postRender.addEventListener(this.moveHandler,this)},moveHandler:function(){this.api.dispatchAction({type:"GLMapRoam"})},render:function(St,Ct,te){},dispose:function(St,Ct){co.glMap.postRender.removeEventListener(this.moveHandler,this)}})}.call(N,k,N,T),F!==void 0&&(T.exports=F)},function(T,N){function k(F,G){this._mapContainer=F,this._overlay=this._createChartOverlay(),this._overlay.setOption(G)}k.prototype._createChartOverlay=function(){var F=this._mapContainer.scene;F.canvas.setAttribute("tabIndex",0);var G=document.createElement("div");return G.style.position="absolute",G.style.top="0px",G.style.left="0px",G.style.width=F.canvas.width+"px",G.style.height=F.canvas.height+"px",G.style.pointerEvents="none",G.setAttribute("id","echarts"),G.setAttribute("class","echartMap"),this._mapContainer.container.appendChild(G),this._echartsContainer=G,co.glMap=F,co.init(G)},k.prototype.dispose=function(){this._echartsContainer&&(this._mapContainer.container.removeChild(this._echartsContainer),this._echartsContainer=null),this._overlay&&(this._overlay.dispose(),this._overlay=null)},k.prototype.destroy=function(){this.dispose()},k.prototype.updateOverlay=function(F){this._overlay&&this._overlay.setOption(F)},k.prototype.getMap=function(){return this._mapContainer},k.prototype.getOverlay=function(){return this._overlay},T.exports=k}])});var P3=$T.FlowEcharts;})();
|
|