@qfo/qfchart 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,109 @@
1
+
2
+ /*
3
+ * Copyright (C) 2025 Alaa-eddine KADDOURI
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ (function(Ca,Gi){typeof exports=="object"&&typeof module<"u"?Gi(exports):typeof define=="function"&&define.amd?define(["exports"],Gi):(Ca=typeof globalThis<"u"?globalThis:Ca||self,Gi(Ca.QFChart={}))})(this,function(Ca){"use strict";/*! *****************************************************************************
18
+ Copyright (c) Microsoft Corporation.
19
+
20
+ Permission to use, copy, modify, and/or distribute this software for any
21
+ purpose with or without fee is hereby granted.
22
+
23
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
24
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
25
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
26
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
27
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
28
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
29
+ PERFORMANCE OF THIS SOFTWARE.
30
+ ***************************************************************************** */var Gi=function(r,e){return Gi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,a){t.__proto__=a}||function(t,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(t[i]=a[i])},Gi(r,e)};function z(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Gi(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var Lk=function(){function r(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return r}(),Ik=function(){function r(){this.browser=new Lk,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<"u"}return r}(),Ja=new Ik;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(Ja.wxa=!0,Ja.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?Ja.worker=!0:!Ja.hasGlobalWindow||"Deno"in window||typeof navigator<"u"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Node.js")>-1?(Ja.node=!0,Ja.svgSupported=!0):Pk(navigator.userAgent,Ja);function Pk(r,e){var t=e.browser,a=r.match(/Firefox\/([\d.]+)/),i=r.match(/MSIE\s([\d.]+)/)||r.match(/Trident\/.+?rv:(([\d.]+))/),n=r.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(r);a&&(t.firefox=!0,t.version=a[1]),i&&(t.ie=!0,t.version=i[1]),n&&(t.edge=!0,t.version=n[1],t.newEdge=+n[1].split(".")[0]>18),o&&(t.weChat=!0),e.svgSupported=typeof SVGRect<"u",e.touchEventsSupported="ontouchstart"in window&&!t.ie&&!t.edge,e.pointerEventsSupported="onpointerdown"in window&&(t.edge||t.ie&&+t.version>=11);var s=e.domSupported=typeof document<"u";if(s){var l=document.documentElement.style;e.transform3dSupported=(t.ie&&"transition"in l||t.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in l)&&!("OTransition"in l),e.transformSupported=e.transform3dSupported||t.ie&&+t.version>=9}}var Pt=Ja,nc=12,m_="sans-serif",Aa=nc+"px "+m_,kk=20,Rk=100,Ek="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function Ok(r){var e={};if(typeof JSON>"u")return e;for(var t=0;t<r.length;t++){var a=String.fromCharCode(t+32),i=(r.charCodeAt(t)-kk)/Rk;e[a]=i}return e}var Nk=Ok(Ek),kr={createCanvas:function(){return typeof document<"u"&&document.createElement("canvas")},measureText:function(){var r,e;return function(t,a){if(!r){var i=kr.createCanvas();r=i&&i.getContext("2d")}if(r)return e!==a&&(e=r.font=a||Aa),r.measureText(t);t=t||"",a=a||Aa;var n=/((?:\d+)?\.?\d*)px/.exec(a),o=n&&+n[1]||nc,s=0;if(a.indexOf("mono")>=0)s=o*t.length;else for(var l=0;l<t.length;l++){var u=Nk[t[l]];s+=u==null?o:u*o}return{width:s}}}(),loadImage:function(r,e,t){var a=new Image;return a.onload=e,a.onerror=t,a.src=r,a}},__=Xr(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(r,e){return r["[object "+e+"]"]=!0,r},{}),x_=Xr(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(r,e){return r["[object "+e+"Array]"]=!0,r},{}),lo=Object.prototype.toString,Lu=Array.prototype,Bk=Lu.forEach,zk=Lu.filter,oc=Lu.slice,Vk=Lu.map,S_=function(){}.constructor,Iu=S_?S_.prototype:null,sc="__proto__",Gk=2311;function b_(){return Gk++}function lc(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];typeof console<"u"&&console.error.apply(console,r)}function at(r){if(r==null||typeof r!="object")return r;var e=r,t=lo.call(r);if(t==="[object Array]"){if(!Ps(r)){e=[];for(var a=0,i=r.length;a<i;a++)e[a]=at(r[a])}}else if(x_[t]){if(!Ps(r)){var n=r.constructor;if(n.from)e=n.from(r);else{e=new n(r.length);for(var a=0,i=r.length;a<i;a++)e[a]=r[a]}}}else if(!__[t]&&!Ps(r)&&!uo(r)){e={};for(var o in r)r.hasOwnProperty(o)&&o!==sc&&(e[o]=at(r[o]))}return e}function yt(r,e,t){if(!lt(e)||!lt(r))return t?at(e):r;for(var a in e)if(e.hasOwnProperty(a)&&a!==sc){var i=r[a],n=e[a];lt(n)&&lt(i)&&!W(n)&&!W(i)&&!uo(n)&&!uo(i)&&!w_(n)&&!w_(i)&&!Ps(n)&&!Ps(i)?yt(i,n,t):(t||!(a in r))&&(r[a]=at(e[a]))}return r}function uc(r,e){for(var t=r[0],a=1,i=r.length;a<i;a++)t=yt(t,r[a],e);return t}function F(r,e){if(Object.assign)Object.assign(r,e);else for(var t in e)e.hasOwnProperty(t)&&t!==sc&&(r[t]=e[t]);return r}function st(r,e,t){for(var a=Mt(e),i=0,n=a.length;i<n;i++){var o=a[i];(t?e[o]!=null:r[o]==null)&&(r[o]=e[o])}return r}function gt(r,e){if(r){if(r.indexOf)return r.indexOf(e);for(var t=0,a=r.length;t<a;t++)if(r[t]===e)return t}return-1}function Fk(r,e){var t=r.prototype;function a(){}a.prototype=e.prototype,r.prototype=new a;for(var i in t)t.hasOwnProperty(i)&&(r.prototype[i]=t[i]);r.prototype.constructor=r,r.superClass=e}function ie(r,e,t){if(r="prototype"in r?r.prototype:r,e="prototype"in e?e.prototype:e,Object.getOwnPropertyNames)for(var a=Object.getOwnPropertyNames(e),i=0;i<a.length;i++){var n=a[i];n!=="constructor"&&(t?e[n]!=null:r[n]==null)&&(r[n]=e[n])}else st(r,e,t)}function ke(r){return!r||typeof r=="string"?!1:typeof r.length=="number"}function M(r,e,t){if(r&&e)if(r.forEach&&r.forEach===Bk)r.forEach(e,t);else if(r.length===+r.length)for(var a=0,i=r.length;a<i;a++)e.call(t,r[a],a,r);else for(var n in r)r.hasOwnProperty(n)&&e.call(t,r[n],n,r)}function U(r,e,t){if(!r)return[];if(!e)return fc(r);if(r.map&&r.map===Vk)return r.map(e,t);for(var a=[],i=0,n=r.length;i<n;i++)a.push(e.call(t,r[i],i,r));return a}function Xr(r,e,t,a){if(r&&e){for(var i=0,n=r.length;i<n;i++)t=e.call(a,t,r[i],i,r);return t}}function Et(r,e,t){if(!r)return[];if(!e)return fc(r);if(r.filter&&r.filter===zk)return r.filter(e,t);for(var a=[],i=0,n=r.length;i<n;i++)e.call(t,r[i],i,r)&&a.push(r[i]);return a}function Fi(r,e,t){if(r&&e){for(var a=0,i=r.length;a<i;a++)if(e.call(t,r[a],a,r))return r[a]}}function Mt(r){if(!r)return[];if(Object.keys)return Object.keys(r);var e=[];for(var t in r)r.hasOwnProperty(t)&&e.push(t);return e}function Hk(r,e){for(var t=[],a=2;a<arguments.length;a++)t[a-2]=arguments[a];return function(){return r.apply(e,t.concat(oc.call(arguments)))}}var X=Iu&&rt(Iu.bind)?Iu.call.bind(Iu.bind):Hk;function pt(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return function(){return r.apply(this,e.concat(oc.call(arguments)))}}function W(r){return Array.isArray?Array.isArray(r):lo.call(r)==="[object Array]"}function rt(r){return typeof r=="function"}function $(r){return typeof r=="string"}function hc(r){return lo.call(r)==="[object String]"}function Dt(r){return typeof r=="number"}function lt(r){var e=typeof r;return e==="function"||!!r&&e==="object"}function w_(r){return!!__[lo.call(r)]}function Xe(r){return!!x_[lo.call(r)]}function uo(r){return typeof r=="object"&&typeof r.nodeType=="number"&&typeof r.ownerDocument=="object"}function Pu(r){return r.colorStops!=null}function Wk(r){return r.image!=null}function Uk(r){return lo.call(r)==="[object RegExp]"}function Re(r){return r!==r}function Ae(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];for(var t=0,a=r.length;t<a;t++)if(r[t]!=null)return r[t]}function Q(r,e){return r??e}function er(r,e,t){return r??e??t}function fc(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return oc.apply(r,e)}function ku(r){if(typeof r=="number")return[r,r,r,r];var e=r.length;return e===2?[r[0],r[1],r[0],r[1]]:e===3?[r[0],r[1],r[2],r[1]]:r}function Ee(r,e){if(!r)throw new Error(e)}function cr(r){return r==null?null:typeof r.trim=="function"?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var T_="__ec_primitive__";function Ru(r){r[T_]=!0}function Ps(r){return r[T_]}var Yk=function(){function r(){this.data={}}return r.prototype.delete=function(e){var t=this.has(e);return t&&delete this.data[e],t},r.prototype.has=function(e){return this.data.hasOwnProperty(e)},r.prototype.get=function(e){return this.data[e]},r.prototype.set=function(e,t){return this.data[e]=t,this},r.prototype.keys=function(){return Mt(this.data)},r.prototype.forEach=function(e){var t=this.data;for(var a in t)t.hasOwnProperty(a)&&e(t[a],a)},r}(),C_=typeof Map=="function";function Zk(){return C_?new Map:new Yk}var $k=function(){function r(e){var t=W(e);this.data=Zk();var a=this;e instanceof r?e.each(i):e&&M(e,i);function i(n,o){t?a.set(n,o):a.set(o,n)}}return r.prototype.hasKey=function(e){return this.data.has(e)},r.prototype.get=function(e){return this.data.get(e)},r.prototype.set=function(e,t){return this.data.set(e,t),t},r.prototype.each=function(e,t){this.data.forEach(function(a,i){e.call(t,a,i)})},r.prototype.keys=function(){var e=this.data.keys();return C_?Array.from(e):e},r.prototype.removeKey=function(e){this.data.delete(e)},r}();function J(r){return new $k(r)}function ks(r,e){for(var t=new r.constructor(r.length+e.length),a=0;a<r.length;a++)t[a]=r[a];for(var i=r.length,a=0;a<e.length;a++)t[a+i]=e[a];return t}function Eu(r,e){var t;if(Object.create)t=Object.create(r);else{var a=function(){};a.prototype=r,t=new a}return e&&F(t,e),t}function A_(r){var e=r.style;e.webkitUserSelect="none",e.userSelect="none",e.webkitTapHighlightColor="rgba(0,0,0,0)",e["-webkit-touch-callout"]="none"}function K(r,e){return r.hasOwnProperty(e)}function Qt(){}var Ou=180/Math.PI;/*! *****************************************************************************
31
+ Copyright (c) Microsoft Corporation.
32
+
33
+ Permission to use, copy, modify, and/or distribute this software for any
34
+ purpose with or without fee is hereby granted.
35
+
36
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
37
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
38
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
39
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
40
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
41
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
42
+ PERFORMANCE OF THIS SOFTWARE.
43
+ ***************************************************************************** */var vc=function(r,e){return vc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,a){t.__proto__=a}||function(t,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(t[i]=a[i])},vc(r,e)};function Ut(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");vc(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function Hi(r,e){return r==null&&(r=0),e==null&&(e=0),[r,e]}function Ge(r,e){return r[0]=e[0],r[1]=e[1],r}function Ma(r){return[r[0],r[1]]}function cc(r,e,t){return r[0]=e,r[1]=t,r}function M_(r,e,t){return r[0]=e[0]+t[0],r[1]=e[1]+t[1],r}function dc(r,e,t,a){return r[0]=e[0]+t[0]*a,r[1]=e[1]+t[1]*a,r}function Wi(r,e,t){return r[0]=e[0]-t[0],r[1]=e[1]-t[1],r}function pc(r){return Math.sqrt(Xk(r))}function Xk(r){return r[0]*r[0]+r[1]*r[1]}function Nu(r,e,t){return r[0]=e[0]*t,r[1]=e[1]*t,r}function ho(r,e){var t=pc(e);return t===0?(r[0]=0,r[1]=0):(r[0]=e[0]/t,r[1]=e[1]/t),r}function gc(r,e){return Math.sqrt((r[0]-e[0])*(r[0]-e[0])+(r[1]-e[1])*(r[1]-e[1]))}var Qa=gc;function qk(r,e){return(r[0]-e[0])*(r[0]-e[0])+(r[1]-e[1])*(r[1]-e[1])}var Ui=qk;function Bu(r,e,t,a){return r[0]=e[0]+a*(t[0]-e[0]),r[1]=e[1]+a*(t[1]-e[1]),r}function te(r,e,t){var a=e[0],i=e[1];return r[0]=t[0]*a+t[2]*i+t[4],r[1]=t[1]*a+t[3]*i+t[5],r}function ti(r,e,t){return r[0]=Math.min(e[0],t[0]),r[1]=Math.min(e[1],t[1]),r}function ei(r,e,t){return r[0]=Math.max(e[0],t[0]),r[1]=Math.max(e[1],t[1]),r}var fo=function(){function r(e,t){this.target=e,this.topTarget=t&&t.topTarget}return r}(),Kk=function(){function r(e){this.handler=e,e.on("mousedown",this._dragStart,this),e.on("mousemove",this._drag,this),e.on("mouseup",this._dragEnd,this)}return r.prototype._dragStart=function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent||t.__hostTarget;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new fo(t,e),"dragstart",e.event))},r.prototype._drag=function(e){var t=this._draggingTarget;if(t){var a=e.offsetX,i=e.offsetY,n=a-this._x,o=i-this._y;this._x=a,this._y=i,t.drift(n,o,e),this.handler.dispatchToElement(new fo(t,e),"drag",e.event);var s=this.handler.findHover(a,i,t).target,l=this._dropTarget;this._dropTarget=s,t!==s&&(l&&s!==l&&this.handler.dispatchToElement(new fo(l,e),"dragleave",e.event),s&&s!==l&&this.handler.dispatchToElement(new fo(s,e),"dragenter",e.event))}},r.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new fo(t,e),"dragend",e.event),this._dropTarget&&this.handler.dispatchToElement(new fo(this._dropTarget,e),"drop",e.event),this._draggingTarget=null,this._dropTarget=null},r}(),jk=function(){function r(e){e&&(this._$eventProcessor=e)}return r.prototype.on=function(e,t,a,i){this._$handlers||(this._$handlers={});var n=this._$handlers;if(typeof t=="function"&&(i=a,a=t,t=null),!a||!e)return this;var o=this._$eventProcessor;t!=null&&o&&o.normalizeQuery&&(t=o.normalizeQuery(t)),n[e]||(n[e]=[]);for(var s=0;s<n[e].length;s++)if(n[e][s].h===a)return this;var l={h:a,query:t,ctx:i||this,callAtLast:a.zrEventfulCallAtLast},u=n[e].length-1,h=n[e][u];return h&&h.callAtLast?n[e].splice(u,0,l):n[e].push(l),this},r.prototype.isSilent=function(e){var t=this._$handlers;return!t||!t[e]||!t[e].length},r.prototype.off=function(e,t){var a=this._$handlers;if(!a)return this;if(!e)return this._$handlers={},this;if(t){if(a[e]){for(var i=[],n=0,o=a[e].length;n<o;n++)a[e][n].h!==t&&i.push(a[e][n]);a[e]=i}a[e]&&a[e].length===0&&delete a[e]}else delete a[e];return this},r.prototype.trigger=function(e){for(var t=[],a=1;a<arguments.length;a++)t[a-1]=arguments[a];if(!this._$handlers)return this;var i=this._$handlers[e],n=this._$eventProcessor;if(i)for(var o=t.length,s=i.length,l=0;l<s;l++){var u=i[l];if(!(n&&n.filter&&u.query!=null&&!n.filter(e,u.query)))switch(o){case 0:u.h.call(u.ctx);break;case 1:u.h.call(u.ctx,t[0]);break;case 2:u.h.call(u.ctx,t[0],t[1]);break;default:u.h.apply(u.ctx,t);break}}return n&&n.afterTrigger&&n.afterTrigger(e),this},r.prototype.triggerWithContext=function(e){for(var t=[],a=1;a<arguments.length;a++)t[a-1]=arguments[a];if(!this._$handlers)return this;var i=this._$handlers[e],n=this._$eventProcessor;if(i)for(var o=t.length,s=t[o-1],l=i.length,u=0;u<l;u++){var h=i[u];if(!(n&&n.filter&&h.query!=null&&!n.filter(e,h.query)))switch(o){case 0:h.h.call(s);break;case 1:h.h.call(s,t[0]);break;case 2:h.h.call(s,t[0],t[1]);break;default:h.h.apply(s,t.slice(1,o-1));break}}return n&&n.afterTrigger&&n.afterTrigger(e),this},r}(),dr=jk,Jk=Math.log(2);function yc(r,e,t,a,i,n){var o=a+"-"+i,s=r.length;if(n.hasOwnProperty(o))return n[o];if(e===1){var l=Math.round(Math.log((1<<s)-1&~i)/Jk);return r[t][l]}for(var u=a|1<<t,h=t+1;a&1<<h;)h++;for(var f=0,v=0,c=0;v<s;v++){var d=1<<v;d&i||(f+=(c%2?-1:1)*r[t][v]*yc(r,e-1,h,u,i|d,n),c++)}return n[o]=f,f}function D_(r,e){var t=[[r[0],r[1],1,0,0,0,-e[0]*r[0],-e[0]*r[1]],[0,0,0,r[0],r[1],1,-e[1]*r[0],-e[1]*r[1]],[r[2],r[3],1,0,0,0,-e[2]*r[2],-e[2]*r[3]],[0,0,0,r[2],r[3],1,-e[3]*r[2],-e[3]*r[3]],[r[4],r[5],1,0,0,0,-e[4]*r[4],-e[4]*r[5]],[0,0,0,r[4],r[5],1,-e[5]*r[4],-e[5]*r[5]],[r[6],r[7],1,0,0,0,-e[6]*r[6],-e[6]*r[7]],[0,0,0,r[6],r[7],1,-e[7]*r[6],-e[7]*r[7]]],a={},i=yc(t,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)*yc(t,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 zu="___zrEVENTSAVED",mc=[];function Qk(r,e,t,a,i){return _c(mc,e,a,i,!0)&&_c(r,t,mc[0],mc[1])}function tR(r,e){r&&t(r),e&&t(e);function t(a){var i=a[zu];i&&(i.clearMarkers&&i.clearMarkers(),delete a[zu])}}function _c(r,e,t,a,i){if(e.getBoundingClientRect&&Pt.domSupported&&!L_(e)){var n=e[zu]||(e[zu]={}),o=eR(e,n),s=rR(o,n,i);if(s)return s(r,t,a),!0}return!1}function eR(r,e){var t=e.markers;if(t)return t;t=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;"),r.appendChild(o),t.push(o)}return e.clearMarkers=function(){M(t,function(h){h.parentNode&&h.parentNode.removeChild(h)})},t}function rR(r,e,t){for(var a=t?"invTrans":"trans",i=e[a],n=e.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var h=r[u].getBoundingClientRect(),f=2*u,v=h.left,c=h.top;o.push(v,c),l=l&&n&&v===n[f]&&c===n[f+1],s.push(r[u].offsetLeft,r[u].offsetTop)}return l&&i?i:(e.srcCoords=o,e[a]=t?D_(s,o):D_(o,s))}function L_(r){return r.nodeName.toUpperCase()==="CANVAS"}var aR=/([&<>"'])/g,iR={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Oe(r){return r==null?"":(r+"").replace(aR,function(e,t){return iR[t]})}var nR=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,xc=[],oR=Pt.browser.firefox&&+Pt.browser.version.split(".")[0]<39;function Sc(r,e,t,a){return t=t||{},a?I_(r,e,t):oR&&e.layerX!=null&&e.layerX!==e.offsetX?(t.zrX=e.layerX,t.zrY=e.layerY):e.offsetX!=null?(t.zrX=e.offsetX,t.zrY=e.offsetY):I_(r,e,t),t}function I_(r,e,t){if(Pt.domSupported&&r.getBoundingClientRect){var a=e.clientX,i=e.clientY;if(L_(r)){var n=r.getBoundingClientRect();t.zrX=a-n.left,t.zrY=i-n.top;return}else if(_c(xc,r,a,i)){t.zrX=xc[0],t.zrY=xc[1];return}}t.zrX=t.zrY=0}function bc(r){return r||window.event}function pr(r,e,t){if(e=bc(e),e.zrX!=null)return e;var a=e.type,i=a&&a.indexOf("touch")>=0;if(i){var o=a!=="touchend"?e.targetTouches[0]:e.changedTouches[0];o&&Sc(r,o,e,t)}else{Sc(r,e,e,t);var n=sR(e);e.zrDelta=n?n/120:-(e.detail||0)/3}var s=e.button;return e.which==null&&s!==void 0&&nR.test(e.type)&&(e.which=s&1?1:s&2?3:s&4?2:0),e}function sR(r){var e=r.wheelDelta;if(e)return e;var t=r.deltaX,a=r.deltaY;if(t==null||a==null)return e;var i=Math.abs(a!==0?a:t),n=a>0?-1:a<0?1:t>0?-1:1;return 3*i*n}function wc(r,e,t,a){r.addEventListener(e,t,a)}function lR(r,e,t,a){r.removeEventListener(e,t,a)}var Da=function(r){r.preventDefault(),r.stopPropagation(),r.cancelBubble=!0};function P_(r){return r.which===2||r.which===3}var uR=function(){function r(){this._track=[]}return r.prototype.recognize=function(e,t,a){return this._doTrack(e,t,a),this._recognize(e)},r.prototype.clear=function(){return this._track.length=0,this},r.prototype._doTrack=function(e,t,a){var i=e.touches;if(i){for(var n={points:[],touches:[],target:t,event:e},o=0,s=i.length;o<s;o++){var l=i[o],u=Sc(a,l,{});n.points.push([u.zrX,u.zrY]),n.touches.push(l)}this._track.push(n)}},r.prototype._recognize=function(e){for(var t in Tc)if(Tc.hasOwnProperty(t)){var a=Tc[t](this._track,e);if(a)return a}},r}();function k_(r){var e=r[1][0]-r[0][0],t=r[1][1]-r[0][1];return Math.sqrt(e*e+t*t)}function hR(r){return[(r[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2]}var Tc={pinch:function(r,e){var t=r.length;if(t){var a=(r[t-1]||{}).points,i=(r[t-2]||{}).points||a;if(i&&i.length>1&&a&&a.length>1){var n=k_(a)/k_(i);!isFinite(n)&&(n=1),e.pinchScale=n;var o=hR(a);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:r[0].target,event:e}}}}};function Se(){return[1,0,0,1,0,0]}function Vu(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r}function Gu(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4],r[5]=e[5],r}function qr(r,e,t){var a=e[0]*t[0]+e[2]*t[1],i=e[1]*t[0]+e[3]*t[1],n=e[0]*t[2]+e[2]*t[3],o=e[1]*t[2]+e[3]*t[3],s=e[0]*t[4]+e[2]*t[5]+e[4],l=e[1]*t[4]+e[3]*t[5]+e[5];return r[0]=a,r[1]=i,r[2]=n,r[3]=o,r[4]=s,r[5]=l,r}function Kr(r,e,t){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4]+t[0],r[5]=e[5]+t[1],r}function ri(r,e,t,a){a===void 0&&(a=[0,0]);var i=e[0],n=e[2],o=e[4],s=e[1],l=e[3],u=e[5],h=Math.sin(t),f=Math.cos(t);return r[0]=i*f+s*h,r[1]=-i*h+s*f,r[2]=n*f+l*h,r[3]=-n*h+f*l,r[4]=f*(o-a[0])+h*(u-a[1])+a[0],r[5]=f*(u-a[1])-h*(o-a[0])+a[1],r}function Cc(r,e,t){var a=t[0],i=t[1];return r[0]=e[0]*a,r[1]=e[1]*i,r[2]=e[2]*a,r[3]=e[3]*i,r[4]=e[4]*a,r[5]=e[5]*i,r}function Rr(r,e){var t=e[0],a=e[2],i=e[4],n=e[1],o=e[3],s=e[5],l=t*o-n*a;return l?(l=1/l,r[0]=o*l,r[1]=-n*l,r[2]=-a*l,r[3]=t*l,r[4]=(a*s-o*i)*l,r[5]=(n*i-t*s)*l,r):null}function fR(r){var e=Se();return Gu(e,r),e}var vR=function(){function r(e,t){this.x=e||0,this.y=t||0}return r.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},r.prototype.clone=function(){return new r(this.x,this.y)},r.prototype.set=function(e,t){return this.x=e,this.y=t,this},r.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},r.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},r.prototype.scale=function(e){this.x*=e,this.y*=e},r.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},r.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},r.prototype.dot=function(e){return this.x*e.x+this.y*e.y},r.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},r.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},r.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},r.prototype.distance=function(e){var t=this.x-e.x,a=this.y-e.y;return Math.sqrt(t*t+a*a)},r.prototype.distanceSquare=function(e){var t=this.x-e.x,a=this.y-e.y;return t*t+a*a},r.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},r.prototype.transform=function(e){if(e){var t=this.x,a=this.y;return this.x=e[0]*t+e[2]*a+e[4],this.y=e[1]*t+e[3]*a+e[5],this}},r.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},r.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},r.set=function(e,t,a){e.x=t,e.y=a},r.copy=function(e,t){e.x=t.x,e.y=t.y},r.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},r.lenSquare=function(e){return e.x*e.x+e.y*e.y},r.dot=function(e,t){return e.x*t.x+e.y*t.y},r.add=function(e,t,a){e.x=t.x+a.x,e.y=t.y+a.y},r.sub=function(e,t,a){e.x=t.x-a.x,e.y=t.y-a.y},r.scale=function(e,t,a){e.x=t.x*a,e.y=t.y*a},r.scaleAndAdd=function(e,t,a,i){e.x=t.x+a.x*i,e.y=t.y+a.y*i},r.lerp=function(e,t,a,i){var n=1-i;e.x=n*t.x+i*a.x,e.y=n*t.y+i*a.y},r}(),nt=vR,Yi=Math.min,vo=Math.max,Ac=Math.abs,R_=["x","y"],cR=["width","height"],Zi=new nt,$i=new nt,Xi=new nt,qi=new nt,rr=O_(),Rs=rr.minTv,Mc=rr.maxTv,Es=[0,0],Dc=function(){function r(e,t,a,i){r.set(this,e,t,a,i)}return r.set=function(e,t,a,i,n){return i<0&&(t=t+i,i=-i),n<0&&(a=a+n,n=-n),e.x=t,e.y=a,e.width=i,e.height=n,e},r.prototype.union=function(e){var t=Yi(e.x,this.x),a=Yi(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=vo(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=vo(e.y+e.height,this.y+this.height)-a:this.height=e.height,this.x=t,this.y=a},r.prototype.applyTransform=function(e){r.applyTransform(this,this,e)},r.prototype.calculateTransform=function(e){var t=this,a=e.width/t.width,i=e.height/t.height,n=Se();return Kr(n,n,[-t.x,-t.y]),Cc(n,n,[a,i]),Kr(n,n,[e.x,e.y]),n},r.prototype.intersect=function(e,t,a){return r.intersect(this,e,t,a)},r.intersect=function(e,t,a,i){a&&nt.set(a,0,0);var n=i&&i.outIntersectRect||null,o=i&&i.clamp;if(n&&(n.x=n.y=n.width=n.height=NaN),!e||!t)return!1;e instanceof r||(e=r.set(dR,e.x,e.y,e.width,e.height)),t instanceof r||(t=r.set(pR,t.x,t.y,t.width,t.height));var s=!!a;rr.reset(i,s);var l=rr.touchThreshold,u=e.x+l,h=e.x+e.width-l,f=e.y+l,v=e.y+e.height-l,c=t.x+l,d=t.x+t.width-l,p=t.y+l,g=t.y+t.height-l;if(u>h||f>v||c>d||p>g)return!1;var y=!(h<c||d<u||v<p||g<f);return(s||n)&&(Es[0]=1/0,Es[1]=0,E_(u,h,c,d,0,s,n,o),E_(f,v,p,g,1,s,n,o),s&&nt.copy(a,y?rr.useDir?rr.dirMinTv:Rs:Mc)),y},r.contain=function(e,t,a){return t>=e.x&&t<=e.x+e.width&&a>=e.y&&a<=e.y+e.height},r.prototype.contain=function(e,t){return r.contain(this,e,t)},r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.copy=function(e){r.copy(this,e)},r.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},r.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},r.prototype.isZero=function(){return this.width===0||this.height===0},r.create=function(e){return new r(e.x,e.y,e.width,e.height)},r.copy=function(e,t){return e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e},r.applyTransform=function(e,t,a){if(!a){e!==t&&r.copy(e,t);return}if(a[1]<1e-5&&a[1]>-1e-5&&a[2]<1e-5&&a[2]>-1e-5){var i=a[0],n=a[3],o=a[4],s=a[5];e.x=t.x*i+o,e.y=t.y*n+s,e.width=t.width*i,e.height=t.height*n,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}Zi.x=Xi.x=t.x,Zi.y=qi.y=t.y,$i.x=qi.x=t.x+t.width,$i.y=Xi.y=t.y+t.height,Zi.transform(a),qi.transform(a),$i.transform(a),Xi.transform(a),e.x=Yi(Zi.x,$i.x,Xi.x,qi.x),e.y=Yi(Zi.y,$i.y,Xi.y,qi.y);var l=vo(Zi.x,$i.x,Xi.x,qi.x),u=vo(Zi.y,$i.y,Xi.y,qi.y);e.width=l-e.x,e.height=u-e.y},r}(),dR=new Dc(0,0,0,0),pR=new Dc(0,0,0,0);function E_(r,e,t,a,i,n,o,s){var l=Ac(e-t),u=Ac(a-r),h=Yi(l,u),f=R_[i],v=R_[1-i],c=cR[i];e<t||a<r?l<u?(n&&(Mc[f]=-l),s&&(o[f]=e,o[c]=0)):(n&&(Mc[f]=u),s&&(o[f]=r,o[c]=0)):(o&&(o[f]=vo(r,t),o[c]=Yi(e,a)-o[f]),n&&(h<Es[0]||rr.useDir)&&(Es[0]=Yi(h,Es[0]),(l<u||!rr.bidirectional)&&(Rs[f]=l,Rs[v]=0,rr.useDir&&rr.calcDirMTV()),(l>=u||!rr.bidirectional)&&(Rs[f]=-u,Rs[v]=0,rr.useDir&&rr.calcDirMTV())))}function O_(){var r=0,e=new nt,t=new nt,a={minTv:new nt,maxTv:new nt,useDir:!1,dirMinTv:new nt,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(n,o){a.touchThreshold=0,n&&n.touchThreshold!=null&&(a.touchThreshold=vo(0,n.touchThreshold)),a.negativeSize=!1,o&&(a.minTv.set(1/0,1/0),a.maxTv.set(0,0),a.useDir=!1,n&&n.direction!=null&&(a.useDir=!0,a.dirMinTv.copy(a.minTv),t.copy(a.minTv),r=n.direction,a.bidirectional=n.bidirectional==null||!!n.bidirectional,a.bidirectional||e.set(Math.cos(r),Math.sin(r))))},calcDirMTV:function(){var n=a.minTv,o=a.dirMinTv,s=n.y*n.y+n.x*n.x,l=Math.sin(r),u=Math.cos(r),h=l*n.y+u*n.x;if(i(h)){i(n.x)&&i(n.y)&&o.set(0,0);return}if(t.x=s*u/h,t.y=s*l/h,i(t.x)&&i(t.y)){o.set(0,0);return}(a.bidirectional||e.dot(t)>0)&&t.len()<o.len()&&o.copy(t)}};function i(n){return Ac(n)<1e-10}return a}var ht=Dc,N_="silent";function gR(r,e,t){return{type:r,event:t,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:t.zrX,offsetY:t.zrY,gestureEvent:t.gestureEvent,pinchX:t.pinchX,pinchY:t.pinchY,pinchScale:t.pinchScale,wheelDelta:t.zrDelta,zrByTouch:t.zrByTouch,which:t.which,stop:yR}}function yR(){Da(this.event)}var mR=function(r){Ut(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.handler=null,t}return e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e}(dr),Os=function(){function r(e,t){this.x=e,this.y=t}return r}(),_R=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Lc=new ht(0,0,0,0),B_=function(r){Ut(e,r);function e(t,a,i,n,o){var s=r.call(this)||this;return s._hovered=new Os(0,0),s.storage=t,s.painter=a,s.painterRoot=n,s._pointerSize=o,i=i||new mR,s.proxy=null,s.setHandlerProxy(i),s._draggingMgr=new Kk(s),s}return e.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(M(_R,function(a){t.on&&t.on(a,this[a],this)},this),t.handler=this),this.proxy=t},e.prototype.mousemove=function(t){var a=t.zrX,i=t.zrY,n=V_(this,a,i),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var l=this._hovered=n?new Os(a,i):this.findHover(a,i),u=l.target,h=this.proxy;h.setCursor&&h.setCursor(u?u.cursor:"default"),s&&u!==s&&this.dispatchToElement(o,"mouseout",t),this.dispatchToElement(l,"mousemove",t),u&&u!==s&&this.dispatchToElement(l,"mouseover",t)},e.prototype.mouseout=function(t){var a=t.zrEventControl;a!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",t),a!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:t})},e.prototype.resize=function(){this._hovered=new Os(0,0)},e.prototype.dispatch=function(t,a){var i=this[t];i&&i.call(this,a)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(t){var a=this.proxy;a.setCursor&&a.setCursor(t)},e.prototype.dispatchToElement=function(t,a,i){t=t||{};var n=t.target;if(!(n&&n.silent)){for(var o="on"+a,s=gR(a,t,i);n&&(n[o]&&(s.cancelBubble=!!n[o].call(n,s)),n.trigger(a,s),n=n.__hostTarget?n.__hostTarget:n.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(a,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(l){typeof l[o]=="function"&&l[o].call(l,s),l.trigger&&l.trigger(a,s)}))}},e.prototype.findHover=function(t,a,i){var n=this.storage.getDisplayList(),o=new Os(t,a);if(z_(n,o,t,a,i),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,h=new ht(t-u,a-u,l,l),f=n.length-1;f>=0;f--){var v=n[f];v!==i&&!v.ignore&&!v.ignoreCoarsePointer&&(!v.parent||!v.parent.ignoreCoarsePointer)&&(Lc.copy(v.getBoundingRect()),v.transform&&Lc.applyTransform(v.transform),Lc.intersect(h)&&s.push(v))}if(s.length)for(var c=4,d=Math.PI/12,p=Math.PI*2,g=0;g<u;g+=c)for(var y=0;y<p;y+=d){var m=t+g*Math.cos(y),_=a+g*Math.sin(y);if(z_(s,o,m,_,i),o.target)return o}}return o},e.prototype.processGesture=function(t,a){this._gestureMgr||(this._gestureMgr=new uR);var i=this._gestureMgr;a==="start"&&i.clear();var n=i.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if(a==="end"&&i.clear(),n){var o=n.type;t.gestureEvent=o;var s=new Os;s.target=n.target,this.dispatchToElement(s,o,n.event)}},e}(dr);M(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(r){B_.prototype[r]=function(e){var t=e.zrX,a=e.zrY,i=V_(this,t,a),n,o;if((r!=="mouseup"||!i)&&(n=this.findHover(t,a),o=n.target),r==="mousedown")this._downEl=o,this._downPoint=[e.zrX,e.zrY],this._upEl=o;else if(r==="mouseup")this._upEl=o;else if(r==="click"){if(this._downEl!==this._upEl||!this._downPoint||Qa(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,r,e)}});function xR(r,e,t){if(r[r.rectHover?"rectContain":"contain"](e,t)){for(var a=r,i=void 0,n=!1;a;){if(a.ignoreClip&&(n=!0),!n){var o=a.getClipPath();if(o&&!o.contain(e,t))return!1}a.silent&&(i=!0);var s=a.__hostTarget;a=s?a.ignoreHostSilent?null:s:a.parent}return i?N_:!0}return!1}function z_(r,e,t,a,i){for(var n=r.length-1;n>=0;n--){var o=r[n],s=void 0;if(o!==i&&!o.ignore&&(s=xR(o,t,a))&&(!e.topTarget&&(e.topTarget=o),s!==N_)){e.target=o;break}}}function V_(r,e,t){var a=r.painter;return e<0||e>a.getWidth()||t<0||t>a.getHeight()}var G_=32,Ns=7;function SR(r){for(var e=0;r>=G_;)e|=r&1,r>>=1;return r+e}function F_(r,e,t,a){var i=e+1;if(i===t)return 1;if(a(r[i++],r[e])<0){for(;i<t&&a(r[i],r[i-1])<0;)i++;bR(r,e,i)}else for(;i<t&&a(r[i],r[i-1])>=0;)i++;return i-e}function bR(r,e,t){for(t--;e<t;){var a=r[e];r[e++]=r[t],r[t--]=a}}function H_(r,e,t,a,i){for(a===e&&a++;a<t;a++){for(var n=r[a],o=e,s=a,l;o<s;)l=o+s>>>1,i(n,r[l])<0?s=l:o=l+1;var u=a-o;switch(u){case 3:r[o+3]=r[o+2];case 2:r[o+2]=r[o+1];case 1:r[o+1]=r[o];break;default:for(;u>0;)r[o+u]=r[o+u-1],u--}r[o]=n}}function Ic(r,e,t,a,i,n){var o=0,s=0,l=1;if(n(r,e[t+i])>0){for(s=a-i;l<s&&n(r,e[t+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(r,e[t+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(r,e[t+h])>0?o=h+1:l=h}return l}function Pc(r,e,t,a,i,n){var o=0,s=0,l=1;if(n(r,e[t+i])<0){for(s=i+1;l<s&&n(r,e[t+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(r,e[t+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(r,e[t+h])<0?l=h:o=h+1}return l}function wR(r,e){var t=Ns,a,i,n=0,o=[];a=[],i=[];function s(c,d){a[n]=c,i[n]=d,n+=1}function l(){for(;n>1;){var c=n-2;if(c>=1&&i[c-1]<=i[c]+i[c+1]||c>=2&&i[c-2]<=i[c]+i[c-1])i[c-1]<i[c+1]&&c--;else if(i[c]>i[c+1])break;h(c)}}function u(){for(;n>1;){var c=n-2;c>0&&i[c-1]<i[c+1]&&c--,h(c)}}function h(c){var d=a[c],p=i[c],g=a[c+1],y=i[c+1];i[c]=p+y,c===n-3&&(a[c+1]=a[c+2],i[c+1]=i[c+2]),n--;var m=Pc(r[g],r,d,p,0,e);d+=m,p-=m,p!==0&&(y=Ic(r[d+p-1],r,g,y,y-1,e),y!==0&&(p<=y?f(d,p,g,y):v(d,p,g,y)))}function f(c,d,p,g){var y=0;for(y=0;y<d;y++)o[y]=r[c+y];var m=0,_=p,x=c;if(r[x++]=r[_++],--g===0){for(y=0;y<d;y++)r[x+y]=o[m+y];return}if(d===1){for(y=0;y<g;y++)r[x+y]=r[_+y];r[x+g]=o[m];return}for(var b=t,S,w,T;;){S=0,w=0,T=!1;do if(e(r[_],o[m])<0){if(r[x++]=r[_++],w++,S=0,--g===0){T=!0;break}}else if(r[x++]=o[m++],S++,w=0,--d===1){T=!0;break}while((S|w)<b);if(T)break;do{if(S=Pc(r[_],o,m,d,0,e),S!==0){for(y=0;y<S;y++)r[x+y]=o[m+y];if(x+=S,m+=S,d-=S,d<=1){T=!0;break}}if(r[x++]=r[_++],--g===0){T=!0;break}if(w=Ic(o[m],r,_,g,0,e),w!==0){for(y=0;y<w;y++)r[x+y]=r[_+y];if(x+=w,_+=w,g-=w,g===0){T=!0;break}}if(r[x++]=o[m++],--d===1){T=!0;break}b--}while(S>=Ns||w>=Ns);if(T)break;b<0&&(b=0),b+=2}if(t=b,t<1&&(t=1),d===1){for(y=0;y<g;y++)r[x+y]=r[_+y];r[x+g]=o[m]}else{if(d===0)throw new Error;for(y=0;y<d;y++)r[x+y]=o[m+y]}}function v(c,d,p,g){var y=0;for(y=0;y<g;y++)o[y]=r[p+y];var m=c+d-1,_=g-1,x=p+g-1,b=0,S=0;if(r[x--]=r[m--],--d===0){for(b=x-(g-1),y=0;y<g;y++)r[b+y]=o[y];return}if(g===1){for(x-=d,m-=d,S=x+1,b=m+1,y=d-1;y>=0;y--)r[S+y]=r[b+y];r[x]=o[_];return}for(var w=t;;){var T=0,C=0,A=!1;do if(e(o[_],r[m])<0){if(r[x--]=r[m--],T++,C=0,--d===0){A=!0;break}}else if(r[x--]=o[_--],C++,T=0,--g===1){A=!0;break}while((T|C)<w);if(A)break;do{if(T=d-Pc(o[_],r,c,d,d-1,e),T!==0){for(x-=T,m-=T,d-=T,S=x+1,b=m+1,y=T-1;y>=0;y--)r[S+y]=r[b+y];if(d===0){A=!0;break}}if(r[x--]=o[_--],--g===1){A=!0;break}if(C=g-Ic(r[m],o,0,g,g-1,e),C!==0){for(x-=C,_-=C,g-=C,S=x+1,b=_+1,y=0;y<C;y++)r[S+y]=o[b+y];if(g<=1){A=!0;break}}if(r[x--]=r[m--],--d===0){A=!0;break}w--}while(T>=Ns||C>=Ns);if(A)break;w<0&&(w=0),w+=2}if(t=w,t<1&&(t=1),g===1){for(x-=d,m-=d,S=x+1,b=m+1,y=d-1;y>=0;y--)r[S+y]=r[b+y];r[x]=o[_]}else{if(g===0)throw new Error;for(b=x-(g-1),y=0;y<g;y++)r[b+y]=o[y]}}return{mergeRuns:l,forceMergeRuns:u,pushRun:s}}function Fu(r,e,t,a){t||(t=0),a||(a=r.length);var i=a-t;if(!(i<2)){var n=0;if(i<G_){n=F_(r,t,a,e),H_(r,t,a,t+n,e);return}var o=wR(r,e),s=SR(i);do{if(n=F_(r,t,a,e),n<s){var l=i;l>s&&(l=s),H_(r,t,t+l,t+n,e),n=l}o.pushRun(t,n),o.mergeRuns(),i-=n,t+=n}while(i!==0);o.forceMergeRuns()}}var ar=1,Bs=2,co=4,W_=!1;function kc(){W_||(W_=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function U_(r,e){return r.zlevel===e.zlevel?r.z===e.z?r.z2-e.z2:r.z-e.z:r.zlevel-e.zlevel}var TR=function(){function r(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=U_}return r.prototype.traverse=function(e,t){for(var a=0;a<this._roots.length;a++)this._roots[a].traverse(e,t)},r.prototype.getDisplayList=function(e,t){t=t||!1;var a=this._displayList;return(e||!a.length)&&this.updateDisplayList(t),a},r.prototype.updateDisplayList=function(e){this._displayListLen=0;for(var t=this._roots,a=this._displayList,i=0,n=t.length;i<n;i++)this._updateAndAddDisplayable(t[i],null,e);a.length=this._displayListLen,Fu(a,U_)},r.prototype._updateAndAddDisplayable=function(e,t,a){if(!(e.ignore&&!a)){e.beforeUpdate(),e.update(),e.afterUpdate();var i=e.getClipPath(),n=t&&t.length,o=0,s=e.__clipPaths;if(!e.ignoreClip&&(n||i)){if(s||(s=e.__clipPaths=[]),n)for(var l=0;l<t.length;l++)s[o++]=t[l];for(var u=i,h=e;u;)u.parent=h,u.updateTransform(),s[o++]=u,h=u,u=u.getClipPath()}if(s&&(s.length=o),e.childrenRef){for(var f=e.childrenRef(),v=0;v<f.length;v++){var c=f[v];e.__dirty&&(c.__dirty|=ar),this._updateAndAddDisplayable(c,s,a)}e.__dirty=0}else{var d=e;isNaN(d.z)&&(kc(),d.z=0),isNaN(d.z2)&&(kc(),d.z2=0),isNaN(d.zlevel)&&(kc(),d.zlevel=0),this._displayList[this._displayListLen++]=d}var p=e.getDecalElement&&e.getDecalElement();p&&this._updateAndAddDisplayable(p,s,a);var g=e.getTextGuideLine();g&&this._updateAndAddDisplayable(g,s,a);var y=e.getTextContent();y&&this._updateAndAddDisplayable(y,s,a)}},r.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},r.prototype.delRoot=function(e){if(e instanceof Array){for(var t=0,a=e.length;t<a;t++)this.delRoot(e[t]);return}var i=gt(this._roots,e);i>=0&&this._roots.splice(i,1)},r.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},r.prototype.getRoots=function(){return this._roots},r.prototype.dispose=function(){this._displayList=null,this._roots=null},r}(),Y_;Y_=Pt.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(r){return setTimeout(r,16)};var Rc=Y_,zs={linear:function(r){return r},quadraticIn:function(r){return r*r},quadraticOut:function(r){return r*(2-r)},quadraticInOut:function(r){return(r*=2)<1?.5*r*r:-.5*(--r*(r-2)-1)},cubicIn:function(r){return r*r*r},cubicOut:function(r){return--r*r*r+1},cubicInOut:function(r){return(r*=2)<1?.5*r*r*r:.5*((r-=2)*r*r+2)},quarticIn:function(r){return r*r*r*r},quarticOut:function(r){return 1- --r*r*r*r},quarticInOut:function(r){return(r*=2)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2)},quinticIn:function(r){return r*r*r*r*r},quinticOut:function(r){return--r*r*r*r*r+1},quinticInOut:function(r){return(r*=2)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2)},sinusoidalIn:function(r){return 1-Math.cos(r*Math.PI/2)},sinusoidalOut:function(r){return Math.sin(r*Math.PI/2)},sinusoidalInOut:function(r){return .5*(1-Math.cos(Math.PI*r))},exponentialIn:function(r){return r===0?0:Math.pow(1024,r-1)},exponentialOut:function(r){return r===1?1:1-Math.pow(2,-10*r)},exponentialInOut:function(r){return r===0?0:r===1?1:(r*=2)<1?.5*Math.pow(1024,r-1):.5*(-Math.pow(2,-10*(r-1))+2)},circularIn:function(r){return 1-Math.sqrt(1-r*r)},circularOut:function(r){return Math.sqrt(1- --r*r)},circularInOut:function(r){return(r*=2)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1)},elasticIn:function(r){var e,t=.1,a=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=a/4):e=a*Math.asin(1/t)/(2*Math.PI),-(t*Math.pow(2,10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/a)))},elasticOut:function(r){var e,t=.1,a=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=a/4):e=a*Math.asin(1/t)/(2*Math.PI),t*Math.pow(2,-10*r)*Math.sin((r-e)*(2*Math.PI)/a)+1)},elasticInOut:function(r){var e,t=.1,a=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=a/4):e=a*Math.asin(1/t)/(2*Math.PI),(r*=2)<1?-.5*(t*Math.pow(2,10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/a)):t*Math.pow(2,-10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/a)*.5+1)},backIn:function(r){var e=1.70158;return r*r*((e+1)*r-e)},backOut:function(r){var e=1.70158;return--r*r*((e+1)*r+e)+1},backInOut:function(r){var e=2.5949095;return(r*=2)<1?.5*(r*r*((e+1)*r-e)):.5*((r-=2)*r*((e+1)*r+e)+2)},bounceIn:function(r){return 1-zs.bounceOut(1-r)},bounceOut:function(r){return r<1/2.75?7.5625*r*r:r<2/2.75?7.5625*(r-=1.5/2.75)*r+.75:r<2.5/2.75?7.5625*(r-=2.25/2.75)*r+.9375:7.5625*(r-=2.625/2.75)*r+.984375},bounceInOut:function(r){return r<.5?zs.bounceIn(r*2)*.5:zs.bounceOut(r*2-1)*.5+.5}},Hu=Math.pow,ai=Math.sqrt,Wu=1e-8,Z_=1e-4,$_=ai(3),Uu=1/3,jr=Hi(),gr=Hi(),po=Hi();function ii(r){return r>-Wu&&r<Wu}function X_(r){return r>Wu||r<-Wu}function ge(r,e,t,a,i){var n=1-i;return n*n*(n*r+3*i*e)+i*i*(i*a+3*n*t)}function q_(r,e,t,a,i){var n=1-i;return 3*(((e-r)*n+2*(t-e)*i)*n+(a-t)*i*i)}function Yu(r,e,t,a,i,n){var o=a+3*(e-t)-r,s=3*(t-e*2+r),l=3*(e-r),u=r-i,h=s*s-3*o*l,f=s*l-9*o*u,v=l*l-3*s*u,c=0;if(ii(h)&&ii(f))if(ii(s))n[0]=0;else{var d=-l/s;d>=0&&d<=1&&(n[c++]=d)}else{var p=f*f-4*h*v;if(ii(p)){var g=f/h,d=-s/o+g,y=-g/2;d>=0&&d<=1&&(n[c++]=d),y>=0&&y<=1&&(n[c++]=y)}else if(p>0){var m=ai(p),_=h*s+1.5*o*(-f+m),x=h*s+1.5*o*(-f-m);_<0?_=-Hu(-_,Uu):_=Hu(_,Uu),x<0?x=-Hu(-x,Uu):x=Hu(x,Uu);var d=(-s-(_+x))/(3*o);d>=0&&d<=1&&(n[c++]=d)}else{var b=(2*h*s-3*o*f)/(2*ai(h*h*h)),S=Math.acos(b)/3,w=ai(h),T=Math.cos(S),d=(-s-2*w*T)/(3*o),y=(-s+w*(T+$_*Math.sin(S)))/(3*o),C=(-s+w*(T-$_*Math.sin(S)))/(3*o);d>=0&&d<=1&&(n[c++]=d),y>=0&&y<=1&&(n[c++]=y),C>=0&&C<=1&&(n[c++]=C)}}return c}function K_(r,e,t,a,i){var n=6*t-12*e+6*r,o=9*e+3*a-3*r-9*t,s=3*e-3*r,l=0;if(ii(o)){if(X_(n)){var u=-s/n;u>=0&&u<=1&&(i[l++]=u)}}else{var h=n*n-4*o*s;if(ii(h))i[0]=-n/(2*o);else if(h>0){var f=ai(h),u=(-n+f)/(2*o),v=(-n-f)/(2*o);u>=0&&u<=1&&(i[l++]=u),v>=0&&v<=1&&(i[l++]=v)}}return l}function ni(r,e,t,a,i,n){var o=(e-r)*i+r,s=(t-e)*i+e,l=(a-t)*i+t,u=(s-o)*i+o,h=(l-s)*i+s,f=(h-u)*i+u;n[0]=r,n[1]=o,n[2]=u,n[3]=f,n[4]=f,n[5]=h,n[6]=l,n[7]=a}function j_(r,e,t,a,i,n,o,s,l,u,h){var f,v=.005,c=1/0,d,p,g,y;jr[0]=l,jr[1]=u;for(var m=0;m<1;m+=.05)gr[0]=ge(r,t,i,o,m),gr[1]=ge(e,a,n,s,m),g=Ui(jr,gr),g<c&&(f=m,c=g);c=1/0;for(var _=0;_<32&&!(v<Z_);_++)d=f-v,p=f+v,gr[0]=ge(r,t,i,o,d),gr[1]=ge(e,a,n,s,d),g=Ui(gr,jr),d>=0&&g<c?(f=d,c=g):(po[0]=ge(r,t,i,o,p),po[1]=ge(e,a,n,s,p),y=Ui(po,jr),p<=1&&y<c?(f=p,c=y):v*=.5);return h&&(h[0]=ge(r,t,i,o,f),h[1]=ge(e,a,n,s,f)),ai(c)}function CR(r,e,t,a,i,n,o,s,l){for(var u=r,h=e,f=0,v=1/l,c=1;c<=l;c++){var d=c*v,p=ge(r,t,i,o,d),g=ge(e,a,n,s,d),y=p-u,m=g-h;f+=Math.sqrt(y*y+m*m),u=p,h=g}return f}function be(r,e,t,a){var i=1-a;return i*(i*r+2*a*e)+a*a*t}function Ec(r,e,t,a){return 2*((1-a)*(e-r)+a*(t-e))}function AR(r,e,t,a,i){var n=r-2*e+t,o=2*(e-r),s=r-a,l=0;if(ii(n)){if(X_(o)){var u=-s/o;u>=0&&u<=1&&(i[l++]=u)}}else{var h=o*o-4*n*s;if(ii(h)){var u=-o/(2*n);u>=0&&u<=1&&(i[l++]=u)}else if(h>0){var f=ai(h),u=(-o+f)/(2*n),v=(-o-f)/(2*n);u>=0&&u<=1&&(i[l++]=u),v>=0&&v<=1&&(i[l++]=v)}}return l}function J_(r,e,t){var a=r+t-2*e;return a===0?.5:(r-e)/a}function Vs(r,e,t,a,i){var n=(e-r)*a+r,o=(t-e)*a+e,s=(o-n)*a+n;i[0]=r,i[1]=n,i[2]=s,i[3]=s,i[4]=o,i[5]=t}function Q_(r,e,t,a,i,n,o,s,l){var u,h=.005,f=1/0;jr[0]=o,jr[1]=s;for(var v=0;v<1;v+=.05){gr[0]=be(r,t,i,v),gr[1]=be(e,a,n,v);var c=Ui(jr,gr);c<f&&(u=v,f=c)}f=1/0;for(var d=0;d<32&&!(h<Z_);d++){var p=u-h,g=u+h;gr[0]=be(r,t,i,p),gr[1]=be(e,a,n,p);var c=Ui(gr,jr);if(p>=0&&c<f)u=p,f=c;else{po[0]=be(r,t,i,g),po[1]=be(e,a,n,g);var y=Ui(po,jr);g<=1&&y<f?(u=g,f=y):h*=.5}}return l&&(l[0]=be(r,t,i,u),l[1]=be(e,a,n,u)),ai(f)}function MR(r,e,t,a,i,n,o){for(var s=r,l=e,u=0,h=1/o,f=1;f<=o;f++){var v=f*h,c=be(r,t,i,v),d=be(e,a,n,v),p=c-s,g=d-l;u+=Math.sqrt(p*p+g*g),s=c,l=d}return u}var DR=/cubic-bezier\(([0-9,\.e ]+)\)/;function Oc(r){var e=r&&DR.exec(r);if(e){var t=e[1].split(","),a=+cr(t[0]),i=+cr(t[1]),n=+cr(t[2]),o=+cr(t[3]);if(isNaN(a+i+n+o))return;var s=[];return function(l){return l<=0?0:l>=1?1:Yu(0,a,n,1,l,s)&&ge(0,i,o,1,s[0])}}}var LR=function(){function r(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||Qt,this.ondestroy=e.ondestroy||Qt,this.onrestart=e.onrestart||Qt,e.easing&&this.setEasing(e.easing)}return r.prototype.step=function(e,t){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),this._paused){this._pausedTime+=t;return}var a=this._life,i=e-this._startTime-this._pausedTime,n=i/a;n<0&&(n=0),n=Math.min(n,1);var o=this.easingFunc,s=o?o(n):n;if(this.onframe(s),n===1)if(this.loop){var l=i%a;this._startTime=e-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},r.prototype.pause=function(){this._paused=!0},r.prototype.resume=function(){this._paused=!1},r.prototype.setEasing=function(e){this.easing=e,this.easingFunc=rt(e)?e:zs[e]||Oc(e)},r}(),t1=function(){function r(e){this.value=e}return r}(),IR=function(){function r(){this._len=0}return r.prototype.insert=function(e){var t=new t1(e);return this.insertEntry(t),t},r.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},r.prototype.remove=function(e){var t=e.prev,a=e.next;t?t.next=a:this.head=a,a?a.prev=t:this.tail=t,e.next=e.prev=null,this._len--},r.prototype.len=function(){return this._len},r.prototype.clear=function(){this.head=this.tail=null,this._len=0},r}(),go=function(){function r(e){this._list=new IR,this._maxSize=10,this._map={},this._maxSize=e}return r.prototype.put=function(e,t){var a=this._list,i=this._map,n=null;if(i[e]==null){var o=a.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=a.head;a.remove(l),delete i[l.key],n=l.value,this._lastRemovedEntry=l}s?s.value=t:s=new t1(t),s.key=e,a.insertEntry(s),i[e]=s}return n},r.prototype.get=function(e){var t=this._map[e],a=this._list;if(t!=null)return t!==a.tail&&(a.remove(t),a.insertEntry(t)),t.value},r.prototype.clear=function(){this._list.clear(),this._map={}},r.prototype.len=function(){return this._list.len()},r}(),e1={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Er(r){return r=Math.round(r),r<0?0:r>255?255:r}function PR(r){return r=Math.round(r),r<0?0:r>360?360:r}function Gs(r){return r<0?0:r>1?1:r}function Nc(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?Er(parseFloat(e)/100*255):Er(parseInt(e,10))}function oi(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?Gs(parseFloat(e)/100):Gs(parseFloat(e))}function Bc(r,e,t){return t<0?t+=1:t>1&&(t-=1),t*6<1?r+(e-r)*t*6:t*2<1?e:t*3<2?r+(e-r)*(2/3-t)*6:r}function si(r,e,t){return r+(e-r)*t}function yr(r,e,t,a,i){return r[0]=e,r[1]=t,r[2]=a,r[3]=i,r}function zc(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r}var r1=new go(20),Zu=null;function yo(r,e){Zu&&zc(Zu,e),Zu=r1.put(r,Zu||e.slice())}function qe(r,e){if(r){e=e||[];var t=r1.get(r);if(t)return zc(e,t);r=r+"";var a=r.replace(/ /g,"").toLowerCase();if(a in e1)return zc(e,e1[a]),yo(r,e),e;var i=a.length;if(a.charAt(0)==="#"){if(i===4||i===5){var n=parseInt(a.slice(1,4),16);if(!(n>=0&&n<=4095)){yr(e,0,0,0,1);return}return yr(e,(n&3840)>>4|(n&3840)>>8,n&240|(n&240)>>4,n&15|(n&15)<<4,i===5?parseInt(a.slice(4),16)/15:1),yo(r,e),e}else if(i===7||i===9){var n=parseInt(a.slice(1,7),16);if(!(n>=0&&n<=16777215)){yr(e,0,0,0,1);return}return yr(e,(n&16711680)>>16,(n&65280)>>8,n&255,i===9?parseInt(a.slice(7),16)/255:1),yo(r,e),e}return}var o=a.indexOf("("),s=a.indexOf(")");if(o!==-1&&s+1===i){var l=a.substr(0,o),u=a.substr(o+1,s-(o+1)).split(","),h=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?yr(e,+u[0],+u[1],+u[2],1):yr(e,0,0,0,1);h=oi(u.pop());case"rgb":if(u.length>=3)return yr(e,Nc(u[0]),Nc(u[1]),Nc(u[2]),u.length===3?h:oi(u[3])),yo(r,e),e;yr(e,0,0,0,1);return;case"hsla":if(u.length!==4){yr(e,0,0,0,1);return}return u[3]=oi(u[3]),Vc(u,e),yo(r,e),e;case"hsl":if(u.length!==3){yr(e,0,0,0,1);return}return Vc(u,e),yo(r,e),e;default:return}}yr(e,0,0,0,1)}}function Vc(r,e){var t=(parseFloat(r[0])%360+360)%360/360,a=oi(r[1]),i=oi(r[2]),n=i<=.5?i*(a+1):i+a-i*a,o=i*2-n;return e=e||[],yr(e,Er(Bc(o,n,t+1/3)*255),Er(Bc(o,n,t)*255),Er(Bc(o,n,t-1/3)*255),1),r.length===4&&(e[3]=r[3]),e}function kR(r){if(r){var e=r[0]/255,t=r[1]/255,a=r[2]/255,i=Math.min(e,t,a),n=Math.max(e,t,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-t)/6+o/2)/o,v=((n-a)/6+o/2)/o;e===n?l=v-f:t===n?l=1/3+h-v:a===n&&(l=2/3+f-h),l<0&&(l+=1),l>1&&(l-=1)}var c=[l*360,u,s];return r[3]!=null&&c.push(r[3]),c}}function Gc(r,e){var t=qe(r);if(t){for(var a=0;a<3;a++)e<0?t[a]=t[a]*(1-e)|0:t[a]=(255-t[a])*e+t[a]|0,t[a]>255?t[a]=255:t[a]<0&&(t[a]=0);return Jr(t,t.length===4?"rgba":"rgb")}}function Fc(r,e,t){if(!(!(e&&e.length)||!(r>=0&&r<=1))){t=t||[];var a=r*(e.length-1),i=Math.floor(a),n=Math.ceil(a),o=e[i],s=e[n],l=a-i;return t[0]=Er(si(o[0],s[0],l)),t[1]=Er(si(o[1],s[1],l)),t[2]=Er(si(o[2],s[2],l)),t[3]=Gs(si(o[3],s[3],l)),t}}function RR(r,e,t){if(!(!(e&&e.length)||!(r>=0&&r<=1))){var a=r*(e.length-1),i=Math.floor(a),n=Math.ceil(a),o=qe(e[i]),s=qe(e[n]),l=a-i,u=Jr([Er(si(o[0],s[0],l)),Er(si(o[1],s[1],l)),Er(si(o[2],s[2],l)),Gs(si(o[3],s[3],l))],"rgba");return t?{color:u,leftIndex:i,rightIndex:n,value:a}:u}}function li(r,e,t,a){var i=qe(r);if(r)return i=kR(i),e!=null&&(i[0]=PR(rt(e)?e(i[0]):e)),t!=null&&(i[1]=oi(rt(t)?t(i[1]):t)),a!=null&&(i[2]=oi(rt(a)?a(i[2]):a)),Jr(Vc(i),"rgba")}function $u(r,e){var t=qe(r);if(t&&e!=null)return t[3]=Gs(e),Jr(t,"rgba")}function Jr(r,e){if(!(!r||!r.length)){var t=r[0]+","+r[1]+","+r[2];return(e==="rgba"||e==="hsva"||e==="hsla")&&(t+=","+r[3]),e+"("+t+")"}}function Xu(r,e){var t=qe(r);return t?(.299*t[0]+.587*t[1]+.114*t[2])*t[3]/255+(1-t[3])*e:0}var a1=new go(100);function Hc(r){if($(r)){var e=a1.get(r);return e||(e=Gc(r,-.1),a1.put(r,e)),e}else if(Pu(r)){var t=F({},r);return t.colorStops=U(r.colorStops,function(a){return{offset:a.offset,color:Gc(a.color,-.1)}}),t}return r}var qu=Math.round;function Fs(r){var e;if(!r||r==="transparent")r="none";else if(typeof r=="string"&&r.indexOf("rgba")>-1){var t=qe(r);t&&(r="rgb("+t[0]+","+t[1]+","+t[2]+")",e=t[3])}return{color:r,opacity:e??1}}var i1=1e-4;function ui(r){return r<i1&&r>-i1}function Ku(r){return qu(r*1e3)/1e3}function Wc(r){return qu(r*1e4)/1e4}function ER(r){return"matrix("+Ku(r[0])+","+Ku(r[1])+","+Ku(r[2])+","+Ku(r[3])+","+Wc(r[4])+","+Wc(r[5])+")"}var OR={left:"start",right:"end",center:"middle",middle:"middle"};function NR(r,e,t){return t==="top"?r+=e/2:t==="bottom"&&(r-=e/2),r}function BR(r){return r&&(r.shadowBlur||r.shadowOffsetX||r.shadowOffsetY)}function zR(r){var e=r.style,t=r.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),t[0],t[1]].join(",")}function n1(r){return r&&!!r.image}function VR(r){return r&&!!r.svgElement}function Uc(r){return n1(r)||VR(r)}function o1(r){return r.type==="linear"}function s1(r){return r.type==="radial"}function l1(r){return r&&(r.type==="linear"||r.type==="radial")}function ju(r){return"url(#"+r+")"}function u1(r){var e=r.getGlobalScale(),t=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(t)/Math.log(10)),1)}function h1(r){var e=r.x||0,t=r.y||0,a=(r.rotation||0)*Ou,i=Q(r.scaleX,1),n=Q(r.scaleY,1),o=r.skewX||0,s=r.skewY||0,l=[];return(e||t)&&l.push("translate("+e+"px,"+t+"px)"),a&&l.push("rotate("+a+")"),(i!==1||n!==1)&&l.push("scale("+i+","+n+")"),(o||s)&&l.push("skew("+qu(o*Ou)+"deg, "+qu(s*Ou)+"deg)"),l.join(" ")}var GR=function(){return Pt.hasGlobalWindow&&rt(window.btoa)?function(r){return window.btoa(unescape(encodeURIComponent(r)))}:typeof Buffer<"u"?function(r){return Buffer.from(r).toString("base64")}:function(r){return null}}(),Yc=Array.prototype.slice;function La(r,e,t){return(e-r)*t+r}function Zc(r,e,t,a){for(var i=e.length,n=0;n<i;n++)r[n]=La(e[n],t[n],a);return r}function FR(r,e,t,a){for(var i=e.length,n=i&&e[0].length,o=0;o<i;o++){r[o]||(r[o]=[]);for(var s=0;s<n;s++)r[o][s]=La(e[o][s],t[o][s],a)}return r}function Ju(r,e,t,a){for(var i=e.length,n=0;n<i;n++)r[n]=e[n]+t[n]*a;return r}function f1(r,e,t,a){for(var i=e.length,n=i&&e[0].length,o=0;o<i;o++){r[o]||(r[o]=[]);for(var s=0;s<n;s++)r[o][s]=e[o][s]+t[o][s]*a}return r}function HR(r,e){for(var t=r.length,a=e.length,i=t>a?e:r,n=Math.min(t,a),o=i[n-1]||{color:[0,0,0,0],offset:0},s=n;s<Math.max(t,a);s++)i.push({offset:o.offset,color:o.color.slice()})}function WR(r,e,t){var a=r,i=e;if(!(!a.push||!i.push)){var n=a.length,o=i.length;if(n!==o){var s=n>o;if(s)a.length=o;else for(var l=n;l<o;l++)a.push(t===1?i[l]:Yc.call(i[l]))}for(var u=a[0]&&a[0].length,l=0;l<a.length;l++)if(t===1)isNaN(a[l])&&(a[l]=i[l]);else for(var h=0;h<u;h++)isNaN(a[l][h])&&(a[l][h]=i[l][h])}}function Hs(r){if(ke(r)){var e=r.length;if(ke(r[0])){for(var t=[],a=0;a<e;a++)t.push(Yc.call(r[a]));return t}return Yc.call(r)}return r}function Qu(r){return r[0]=Math.floor(r[0])||0,r[1]=Math.floor(r[1])||0,r[2]=Math.floor(r[2])||0,r[3]=r[3]==null?1:r[3],"rgba("+r.join(",")+")"}function UR(r){return ke(r&&r[0])?2:1}var th=0,eh=1,v1=2,Ws=3,$c=4,Xc=5,c1=6;function d1(r){return r===$c||r===Xc}function rh(r){return r===eh||r===v1}var Us=[0,0,0,0],YR=function(){function r(e){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=e}return r.prototype.isFinished=function(){return this._finished},r.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},r.prototype.needsAnimate=function(){return this.keyframes.length>=1},r.prototype.getAdditiveTrack=function(){return this._additiveTrack},r.prototype.addKeyframe=function(e,t,a){this._needsSort=!0;var i=this.keyframes,n=i.length,o=!1,s=c1,l=t;if(ke(t)){var u=UR(t);s=u,(u===1&&!Dt(t[0])||u===2&&!Dt(t[0][0]))&&(o=!0)}else if(Dt(t)&&!Re(t))s=th;else if($(t))if(!isNaN(+t))s=th;else{var h=qe(t);h&&(l=h,s=Ws)}else if(Pu(t)){var f=F({},l);f.colorStops=U(t.colorStops,function(c){return{offset:c.offset,color:qe(c.color)}}),o1(t)?s=$c:s1(t)&&(s=Xc),l=f}n===0?this.valType=s:(s!==this.valType||s===c1)&&(o=!0),this.discrete=this.discrete||o;var v={time:e,value:l,rawValue:t,percent:0};return a&&(v.easing=a,v.easingFunc=rt(a)?a:zs[a]||Oc(a)),i.push(v),v},r.prototype.prepare=function(e,t){var a=this.keyframes;this._needsSort&&a.sort(function(p,g){return p.time-g.time});for(var i=this.valType,n=a.length,o=a[n-1],s=this.discrete,l=rh(i),u=d1(i),h=0;h<n;h++){var f=a[h],v=f.value,c=o.value;f.percent=f.time/e,s||(l&&h!==n-1?WR(v,c,i):u&&HR(v.colorStops,c.colorStops))}if(!s&&i!==Xc&&t&&this.needsAnimate()&&t.needsAnimate()&&i===t.valType&&!t._finished){this._additiveTrack=t;for(var d=a[0].value,h=0;h<n;h++)i===th?a[h].additiveValue=a[h].value-d:i===Ws?a[h].additiveValue=Ju([],a[h].value,d,-1):rh(i)&&(a[h].additiveValue=i===eh?Ju([],a[h].value,d,-1):f1([],a[h].value,d,-1))}},r.prototype.step=function(e,t){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var a=this._additiveTrack!=null,i=a?"additiveValue":"value",n=this.valType,o=this.keyframes,s=o.length,l=this.propName,u=n===Ws,h,f=this._lastFr,v=Math.min,c,d;if(s===1)c=d=o[0];else{if(t<0)h=0;else if(t<this._lastFrP){var p=v(f+1,s-1);for(h=p;h>=0&&!(o[h].percent<=t);h--);h=v(h,s-2)}else{for(h=f;h<s&&!(o[h].percent>t);h++);h=v(h-1,s-2)}d=o[h+1],c=o[h]}if(c&&d){this._lastFr=h,this._lastFrP=t;var g=d.percent-c.percent,y=g===0?1:v((t-c.percent)/g,1);d.easingFunc&&(y=d.easingFunc(y));var m=a?this._additiveValue:u?Us:e[l];if((rh(n)||u)&&!m&&(m=this._additiveValue=[]),this.discrete)e[l]=y<1?c.rawValue:d.rawValue;else if(rh(n))n===eh?Zc(m,c[i],d[i],y):FR(m,c[i],d[i],y);else if(d1(n)){var _=c[i],x=d[i],b=n===$c;e[l]={type:b?"linear":"radial",x:La(_.x,x.x,y),y:La(_.y,x.y,y),colorStops:U(_.colorStops,function(w,T){var C=x.colorStops[T];return{offset:La(w.offset,C.offset,y),color:Qu(Zc([],w.color,C.color,y))}}),global:x.global},b?(e[l].x2=La(_.x2,x.x2,y),e[l].y2=La(_.y2,x.y2,y)):e[l].r=La(_.r,x.r,y)}else if(u)Zc(m,c[i],d[i],y),a||(e[l]=Qu(m));else{var S=La(c[i],d[i],y);a?this._additiveValue=S:e[l]=S}a&&this._addToTarget(e)}}},r.prototype._addToTarget=function(e){var t=this.valType,a=this.propName,i=this._additiveValue;t===th?e[a]=e[a]+i:t===Ws?(qe(e[a],Us),Ju(Us,Us,i,1),e[a]=Qu(Us)):t===eh?Ju(e[a],e[a],i,1):t===v1&&f1(e[a],e[a],i,1)},r}(),qc=function(){function r(e,t,a,i){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&i){lc("Can' use additive animation on looped animation.");return}this._additiveAnimators=i,this._allowDiscrete=a}return r.prototype.getMaxTime=function(){return this._maxTime},r.prototype.getDelay=function(){return this._delay},r.prototype.getLoop=function(){return this._loop},r.prototype.getTarget=function(){return this._target},r.prototype.changeTarget=function(e){this._target=e},r.prototype.when=function(e,t,a){return this.whenWithKeys(e,t,Mt(t),a)},r.prototype.whenWithKeys=function(e,t,a,i){for(var n=this._tracks,o=0;o<a.length;o++){var s=a[o],l=n[s];if(!l){l=n[s]=new YR(s);var u=void 0,h=this._getAdditiveTrack(s);if(h){var f=h.keyframes,v=f[f.length-1];u=v&&v.value,h.valType===Ws&&u&&(u=Qu(u))}else u=this._target[s];if(u==null)continue;e>0&&l.addKeyframe(0,Hs(u),i),this._trackKeys.push(s)}l.addKeyframe(e,Hs(t[s]),i)}return this._maxTime=Math.max(this._maxTime,e),this},r.prototype.pause=function(){this._clip.pause(),this._paused=!0},r.prototype.resume=function(){this._clip.resume(),this._paused=!1},r.prototype.isPaused=function(){return!!this._paused},r.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},r.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,a=0;a<t;a++)e[a].call(this)},r.prototype._abortedCallback=function(){this._setTracksFinished();var e=this.animation,t=this._abortedCbs;if(e&&e.removeClip(this._clip),this._clip=null,t)for(var a=0;a<t.length;a++)t[a].call(this)},r.prototype._setTracksFinished=function(){for(var e=this._tracks,t=this._trackKeys,a=0;a<t.length;a++)e[t[a]].setFinished()},r.prototype._getAdditiveTrack=function(e){var t,a=this._additiveAnimators;if(a)for(var i=0;i<a.length;i++){var n=a[i].getTrack(e);n&&(t=n)}return t},r.prototype.start=function(e){if(!(this._started>0)){this._started=1;for(var t=this,a=[],i=this._maxTime||0,n=0;n<this._trackKeys.length;n++){var o=this._trackKeys[n],s=this._tracks[o],l=this._getAdditiveTrack(o),u=s.keyframes,h=u.length;if(s.prepare(i,l),s.needsAnimate())if(!this._allowDiscrete&&s.discrete){var f=u[h-1];f&&(t._target[s.propName]=f.rawValue),s.setFinished()}else a.push(s)}if(a.length||this._force){var v=new LR({life:i,loop:this._loop,delay:this._delay||0,onframe:function(c){t._started=2;var d=t._additiveAnimators;if(d){for(var p=!1,g=0;g<d.length;g++)if(d[g]._clip){p=!0;break}p||(t._additiveAnimators=null)}for(var g=0;g<a.length;g++)a[g].step(t._target,c);var y=t._onframeCbs;if(y)for(var g=0;g<y.length;g++)y[g](t._target,c)},ondestroy:function(){t._doneCallback()}});this._clip=v,this.animation&&this.animation.addClip(v),e&&v.setEasing(e)}else this._doneCallback();return this}},r.prototype.stop=function(e){if(this._clip){var t=this._clip;e&&t.onframe(1),this._abortedCallback()}},r.prototype.delay=function(e){return this._delay=e,this},r.prototype.during=function(e){return e&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(e)),this},r.prototype.done=function(e){return e&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(e)),this},r.prototype.aborted=function(e){return e&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(e)),this},r.prototype.getClip=function(){return this._clip},r.prototype.getTrack=function(e){return this._tracks[e]},r.prototype.getTracks=function(){var e=this;return U(this._trackKeys,function(t){return e._tracks[t]})},r.prototype.stopTracks=function(e,t){if(!e.length||!this._clip)return!0;for(var a=this._tracks,i=this._trackKeys,n=0;n<e.length;n++){var o=a[e[n]];o&&!o.isFinished()&&(t?o.step(this._target,1):this._started===1&&o.step(this._target,0),o.setFinished())}for(var s=!0,n=0;n<i.length;n++)if(!a[i[n]].isFinished()){s=!1;break}return s&&this._abortedCallback(),s},r.prototype.saveTo=function(e,t,a){if(e){t=t||this._trackKeys;for(var i=0;i<t.length;i++){var n=t[i],o=this._tracks[n];if(!(!o||o.isFinished())){var s=o.keyframes,l=s[a?0:s.length-1];l&&(e[n]=Hs(l.rawValue))}}}},r.prototype.__changeFinalValue=function(e,t){t=t||Mt(e);for(var a=0;a<t.length;a++){var i=t[a],n=this._tracks[i];if(n){var o=n.keyframes;if(o.length>1){var s=o.pop();n.addKeyframe(s.time,e[i]),n.prepare(this._maxTime,n.getAdditiveTrack())}}}},r}();function mo(){return new Date().getTime()}var ZR=function(r){Ut(e,r);function e(t){var a=r.call(this)||this;return a._running=!1,a._time=0,a._pausedTime=0,a._pauseStart=0,a._paused=!1,t=t||{},a.stage=t.stage||{},a}return e.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._head?(this._tail.next=t,t.prev=this._tail,t.next=null,this._tail=t):this._head=this._tail=t,t.animation=this},e.prototype.addAnimator=function(t){t.animation=this;var a=t.getClip();a&&this.addClip(a)},e.prototype.removeClip=function(t){if(t.animation){var a=t.prev,i=t.next;a?a.next=i:this._head=i,i?i.prev=a:this._tail=a,t.next=t.prev=t.animation=null}},e.prototype.removeAnimator=function(t){var a=t.getClip();a&&this.removeClip(a),t.animation=null},e.prototype.update=function(t){for(var a=mo()-this._pausedTime,i=a-this._time,n=this._head;n;){var o=n.next,s=n.step(a,i);s&&(n.ondestroy(),this.removeClip(n)),n=o}this._time=a,t||(this.trigger("frame",i),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0;function a(){t._running&&(Rc(a),!t._paused&&t.update())}Rc(a)},e.prototype.start=function(){this._running||(this._time=mo(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=mo(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=mo()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._head;t;){var a=t.next;t.prev=t.next=t.animation=null,t=a}this._head=this._tail=null},e.prototype.isFinished=function(){return this._head==null},e.prototype.animate=function(t,a){a=a||{},this.start();var i=new qc(t,a.loop);return this.addAnimator(i),i},e}(dr),$R=300,Kc=Pt.domSupported,jc=function(){var r=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],t={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},a=U(r,function(i){var n=i.replace("mouse","pointer");return t.hasOwnProperty(n)?n:i});return{mouse:r,touch:e,pointer:a}}(),p1={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},g1=!1;function Jc(r){var e=r.pointerType;return e==="pen"||e==="touch"}function XR(r){r.touching=!0,r.touchTimer!=null&&(clearTimeout(r.touchTimer),r.touchTimer=null),r.touchTimer=setTimeout(function(){r.touching=!1,r.touchTimer=null},700)}function Qc(r){r&&(r.zrByTouch=!0)}function qR(r,e){return pr(r.dom,new KR(r,e),!0)}function y1(r,e){for(var t=e,a=!1;t&&t.nodeType!==9&&!(a=t.domBelongToZr||t!==e&&t===r.painterRoot);)t=t.parentNode;return a}var KR=function(){function r(e,t){this.stopPropagation=Qt,this.stopImmediatePropagation=Qt,this.preventDefault=Qt,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return r}(),Or={mousedown:function(r){r=pr(this.dom,r),this.__mayPointerCapture=[r.zrX,r.zrY],this.trigger("mousedown",r)},mousemove:function(r){r=pr(this.dom,r);var e=this.__mayPointerCapture;e&&(r.zrX!==e[0]||r.zrY!==e[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",r)},mouseup:function(r){r=pr(this.dom,r),this.__togglePointerCapture(!1),this.trigger("mouseup",r)},mouseout:function(r){r=pr(this.dom,r);var e=r.toElement||r.relatedTarget;y1(this,e)||(this.__pointerCapturing&&(r.zrEventControl="no_globalout"),this.trigger("mouseout",r))},wheel:function(r){g1=!0,r=pr(this.dom,r),this.trigger("mousewheel",r)},mousewheel:function(r){g1||(r=pr(this.dom,r),this.trigger("mousewheel",r))},touchstart:function(r){r=pr(this.dom,r),Qc(r),this.__lastTouchMoment=new Date,this.handler.processGesture(r,"start"),Or.mousemove.call(this,r),Or.mousedown.call(this,r)},touchmove:function(r){r=pr(this.dom,r),Qc(r),this.handler.processGesture(r,"change"),Or.mousemove.call(this,r)},touchend:function(r){r=pr(this.dom,r),Qc(r),this.handler.processGesture(r,"end"),Or.mouseup.call(this,r),+new Date-+this.__lastTouchMoment<$R&&Or.click.call(this,r)},pointerdown:function(r){Or.mousedown.call(this,r)},pointermove:function(r){Jc(r)||Or.mousemove.call(this,r)},pointerup:function(r){Or.mouseup.call(this,r)},pointerout:function(r){Jc(r)||Or.mouseout.call(this,r)}};M(["click","dblclick","contextmenu"],function(r){Or[r]=function(e){e=pr(this.dom,e),this.trigger(r,e)}});var td={pointermove:function(r){Jc(r)||td.mousemove.call(this,r)},pointerup:function(r){td.mouseup.call(this,r)},mousemove:function(r){this.trigger("mousemove",r)},mouseup:function(r){var e=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",r),e&&(r.zrEventControl="only_globalout",this.trigger("mouseout",r))}};function jR(r,e){var t=e.domHandlers;Pt.pointerEventsSupported?M(jc.pointer,function(a){ah(e,a,function(i){t[a].call(r,i)})}):(Pt.touchEventsSupported&&M(jc.touch,function(a){ah(e,a,function(i){t[a].call(r,i),XR(e)})}),M(jc.mouse,function(a){ah(e,a,function(i){i=bc(i),e.touching||t[a].call(r,i)})}))}function JR(r,e){Pt.pointerEventsSupported?M(p1.pointer,t):Pt.touchEventsSupported||M(p1.mouse,t);function t(a){function i(n){n=bc(n),y1(r,n.target)||(n=qR(r,n),e.domHandlers[a].call(r,n))}ah(e,a,i,{capture:!0})}}function ah(r,e,t,a){r.mounted[e]=t,r.listenerOpts[e]=a,wc(r.domTarget,e,t,a)}function ed(r){var e=r.mounted;for(var t in e)e.hasOwnProperty(t)&&lR(r.domTarget,t,e[t],r.listenerOpts[t]);r.mounted={}}var m1=function(){function r(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t}return r}(),QR=function(r){Ut(e,r);function e(t,a){var i=r.call(this)||this;return i.__pointerCapturing=!1,i.dom=t,i.painterRoot=a,i._localHandlerScope=new m1(t,Or),Kc&&(i._globalHandlerScope=new m1(document,td)),jR(i,i._localHandlerScope),i}return e.prototype.dispose=function(){ed(this._localHandlerScope),Kc&&ed(this._globalHandlerScope)},e.prototype.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},e.prototype.__togglePointerCapture=function(t){if(this.__mayPointerCapture=null,Kc&&+this.__pointerCapturing^+t){this.__pointerCapturing=t;var a=this._globalHandlerScope;t?JR(this,a):ed(a)}},e}(dr),_1=1;Pt.hasGlobalWindow&&(_1=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var ih=_1,rd=.4,ad="#333",id="#ccc",tE="#eee",x1=Vu,S1=5e-5;function Ki(r){return r>S1||r<-S1}var ji=[],_o=[],nd=Se(),od=Math.abs,eE=function(){function r(){}return r.prototype.getLocalTransform=function(e){return r.getLocalTransform(this,e)},r.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},r.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},r.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},r.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},r.prototype.needLocalTransform=function(){return Ki(this.rotation)||Ki(this.x)||Ki(this.y)||Ki(this.scaleX-1)||Ki(this.scaleY-1)||Ki(this.skewX)||Ki(this.skewY)},r.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),a=this.transform;if(!(t||e)){a&&(x1(a),this.invTransform=null);return}a=a||Se(),t?this.getLocalTransform(a):x1(a),e&&(t?qr(a,e,a):Gu(a,e)),this.transform=a,this._resolveGlobalScaleRatio(a)},r.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(ji);var a=ji[0]<0?-1:1,i=ji[1]<0?-1:1,n=((ji[0]-a)*t+a)/ji[0]||0,o=((ji[1]-i)*t+i)/ji[1]||0;e[0]*=n,e[1]*=n,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||Se(),Rr(this.invTransform,e)},r.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},r.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],a=e[2]*e[2]+e[3]*e[3],i=Math.atan2(e[1],e[0]),n=Math.PI/2+i-Math.atan2(e[3],e[2]);a=Math.sqrt(a)*Math.cos(n),t=Math.sqrt(t),this.skewX=n,this.skewY=0,this.rotation=-i,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=a,this.originX=0,this.originY=0}},r.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||Se(),qr(_o,e.invTransform,t),t=_o);var a=this.originX,i=this.originY;(a||i)&&(nd[4]=a,nd[5]=i,qr(_o,t,nd),_o[4]-=a,_o[5]-=i,t=_o),this.setLocalTransform(t)}},r.prototype.getGlobalScale=function(e){var t=this.transform;return e=e||[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},r.prototype.transformCoordToLocal=function(e,t){var a=[e,t],i=this.invTransform;return i&&te(a,a,i),a},r.prototype.transformCoordToGlobal=function(e,t){var a=[e,t],i=this.transform;return i&&te(a,a,i),a},r.prototype.getLineScale=function(){var e=this.transform;return e&&od(e[0]-1)>1e-10&&od(e[3]-1)>1e-10?Math.sqrt(od(e[0]*e[3]-e[2]*e[1])):1},r.prototype.copyTransform=function(e){nh(this,e)},r.getLocalTransform=function(e,t){t=t||[];var a=e.originX||0,i=e.originY||0,n=e.scaleX,o=e.scaleY,s=e.anchorX,l=e.anchorY,u=e.rotation||0,h=e.x,f=e.y,v=e.skewX?Math.tan(e.skewX):0,c=e.skewY?Math.tan(-e.skewY):0;if(a||i||s||l){var d=a+s,p=i+l;t[4]=-d*n-v*p*o,t[5]=-p*o-c*d*n}else t[4]=t[5]=0;return t[0]=n,t[3]=o,t[1]=c*n,t[2]=v*o,u&&ri(t,t,u),t[4]+=a+h,t[5]+=i+f,t},r.initDefaultProps=function(){var e=r.prototype;e.scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0}(),r}(),Qr=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function nh(r,e){for(var t=0;t<Qr.length;t++){var a=Qr[t];r[a]=e[a]}}var Ia=eE;function ta(r){oh||(oh=new go(100)),r=r||Aa;var e=oh.get(r);return e||(e={font:r,strWidthCache:new go(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:kr.measureText("\u56FD",r).width,asciiCharWidth:kr.measureText("a",r).width},oh.put(r,e)),e}var oh;function rE(r){if(!(sd>=b1)){r=r||Aa;for(var e=[],t=+new Date,a=0;a<=127;a++)e[a]=kr.measureText(String.fromCharCode(a),r).width;var i=+new Date-t;return i>16?sd=b1:i>2&&sd++,e}}var sd=0,b1=5;function w1(r,e){return r.asciiWidthMapTried||(r.asciiWidthMap=rE(r.font),r.asciiWidthMapTried=!0),0<=e&&e<=127?r.asciiWidthMap!=null?r.asciiWidthMap[e]:r.asciiCharWidth:r.stWideCharWidth}function ea(r,e){var t=r.strWidthCache,a=t.get(e);return a==null&&(a=kr.measureText(e,r.font).width,t.put(e,a)),a}function T1(r,e,t,a){var i=ea(ta(e),r),n=Ys(e),o=xo(0,i,t),s=Ji(0,n,a),l=new ht(o,s,i,n);return l}function sh(r,e,t,a){var i=((r||"")+"").split(`
44
+ `),n=i.length;if(n===1)return T1(i[0],e,t,a);for(var o=new ht(0,0,0,0),s=0;s<i.length;s++){var l=T1(i[s],e,t,a);s===0?o.copy(l):o.union(l)}return o}function xo(r,e,t,a){return t==="right"?a?r+=e:r-=e:t==="center"&&(a?r+=e/2:r-=e/2),r}function Ji(r,e,t,a){return t==="middle"?a?r+=e/2:r-=e/2:t==="bottom"&&(a?r+=e:r-=e),r}function Ys(r){return ta(r).stWideCharWidth}function Nr(r,e){return typeof r=="string"?r.lastIndexOf("%")>=0?parseFloat(r)/100*e:parseFloat(r):r}function lh(r,e,t){var a=e.position||"inside",i=e.distance!=null?e.distance:5,n=t.height,o=t.width,s=n/2,l=t.x,u=t.y,h="left",f="top";if(a instanceof Array)l+=Nr(a[0],t.width),u+=Nr(a[1],t.height),h=null,f=null;else switch(a){case"left":l-=i,u+=s,h="right",f="middle";break;case"right":l+=i+o,u+=s,f="middle";break;case"top":l+=o/2,u-=i,h="center",f="bottom";break;case"bottom":l+=o/2,u+=n+i,h="center";break;case"inside":l+=o/2,u+=s,h="center",f="middle";break;case"insideLeft":l+=i,u+=s,f="middle";break;case"insideRight":l+=o-i,u+=s,h="right",f="middle";break;case"insideTop":l+=o/2,u+=i,h="center";break;case"insideBottom":l+=o/2,u+=n-i,h="center",f="bottom";break;case"insideTopLeft":l+=i,u+=i;break;case"insideTopRight":l+=o-i,u+=i,h="right";break;case"insideBottomLeft":l+=i,u+=n-i,f="bottom";break;case"insideBottomRight":l+=o-i,u+=n-i,h="right",f="bottom";break}return r=r||{},r.x=l,r.y=u,r.align=h,r.verticalAlign=f,r}var ld="__zr_normal__",ud=Qr.concat(["ignore"]),aE=Xr(Qr,function(r,e){return r[e]=!0,r},{ignore:!1}),So={},iE=new ht(0,0,0,0),uh=[],hh=function(){function r(e){this.id=b_(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return r.prototype._init=function(e){this.attr(e)},r.prototype.drift=function(e,t,a){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0;break}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=e,i[5]+=t,this.decomposeTransform(),this.markRedraw()},r.prototype.beforeUpdate=function(){},r.prototype.afterUpdate=function(){},r.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},r.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||(this.textConfig={});var a=this.textConfig,i=a.local,n=t.innerTransformable,o=void 0,s=void 0,l=!1;n.parent=i?this:null;var u=!1;n.copyTransform(t);var h=a.position!=null,f=a.autoOverflowArea,v=void 0;if((f||h)&&(v=iE,a.layoutRect?v.copy(a.layoutRect):v.copy(this.getBoundingRect()),i||v.applyTransform(this.transform)),h){this.calculateTextPosition?this.calculateTextPosition(So,a,v):lh(So,a,v),n.x=So.x,n.y=So.y,o=So.align,s=So.verticalAlign;var c=a.origin;if(c&&a.rotation!=null){var d=void 0,p=void 0;c==="center"?(d=v.width*.5,p=v.height*.5):(d=Nr(c[0],v.width),p=Nr(c[1],v.height)),u=!0,n.originX=-n.x+d+(i?0:v.x),n.originY=-n.y+p+(i?0:v.y)}}a.rotation!=null&&(n.rotation=a.rotation);var g=a.offset;g&&(n.x+=g[0],n.y+=g[1],u||(n.originX=-g[0],n.originY=-g[1]));var y=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={});if(f){var m=y.overflowRect=y.overflowRect||new ht(0,0,0,0);n.getLocalTransform(uh),Rr(uh,uh),ht.copy(m,v),m.applyTransform(uh)}else y.overflowRect=null;var _=a.inside==null?typeof a.position=="string"&&a.position.indexOf("inside")>=0:a.inside,x=void 0,b=void 0,S=void 0;_&&this.canBeInsideText()?(x=a.insideFill,b=a.insideStroke,(x==null||x==="auto")&&(x=this.getInsideTextFill()),(b==null||b==="auto")&&(b=this.getInsideTextStroke(x),S=!0)):(x=a.outsideFill,b=a.outsideStroke,(x==null||x==="auto")&&(x=this.getOutsideFill()),(b==null||b==="auto")&&(b=this.getOutsideStroke(x),S=!0)),x=x||"#000",(x!==y.fill||b!==y.stroke||S!==y.autoStroke||o!==y.align||s!==y.verticalAlign)&&(l=!0,y.fill=x,y.stroke=b,y.autoStroke=S,y.align=o,y.verticalAlign=s,t.setDefaultTextStyle(y)),t.__dirty|=ar,l&&t.dirtyStyle(!0)}},r.prototype.canBeInsideText=function(){return!0},r.prototype.getInsideTextFill=function(){return"#fff"},r.prototype.getInsideTextStroke=function(e){return"#000"},r.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?id:ad},r.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),a=typeof t=="string"&&qe(t);a||(a=[255,255,255,1]);for(var i=a[3],n=this.__zr.isDarkMode(),o=0;o<3;o++)a[o]=a[o]*i+(n?0:255)*(1-i);return a[3]=1,Jr(a,"rgba")},r.prototype.traverse=function(e,t){},r.prototype.attrKV=function(e,t){e==="textConfig"?this.setTextConfig(t):e==="textContent"?this.setTextContent(t):e==="clipPath"?this.setClipPath(t):e==="extra"?(this.extra=this.extra||{},F(this.extra,t)):this[e]=t},r.prototype.hide=function(){this.ignore=!0,this.markRedraw()},r.prototype.show=function(){this.ignore=!1,this.markRedraw()},r.prototype.attr=function(e,t){if(typeof e=="string")this.attrKV(e,t);else if(lt(e))for(var a=e,i=Mt(a),n=0;n<i.length;n++){var o=i[n];this.attrKV(o,e[o])}return this.markRedraw(),this},r.prototype.saveCurrentToNormalState=function(e){this._innerSaveToNormal(e);for(var t=this._normalState,a=0;a<this.animators.length;a++){var i=this.animators[a],n=i.__fromStateTransition;if(!(i.getLoop()||n&&n!==ld)){var o=i.targetName,s=o?t[o]:t;i.saveTo(s)}}},r.prototype._innerSaveToNormal=function(e){var t=this._normalState;t||(t=this._normalState={}),e.textConfig&&!t.textConfig&&(t.textConfig=this.textConfig),this._savePrimaryToNormal(e,t,ud)},r.prototype._savePrimaryToNormal=function(e,t,a){for(var i=0;i<a.length;i++){var n=a[i];e[n]!=null&&!(n in t)&&(t[n]=this[n])}},r.prototype.hasState=function(){return this.currentStates.length>0},r.prototype.getState=function(e){return this.states[e]},r.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},r.prototype.clearStates=function(e){this.useState(ld,!1,e)},r.prototype.useState=function(e,t,a,i){var n=e===ld,o=this.hasState();if(!(!o&&n)){var s=this.currentStates,l=this.stateTransition;if(!(gt(s,e)>=0&&(t||s.length===1))){var u;if(this.stateProxy&&!n&&(u=this.stateProxy(e)),u||(u=this.states&&this.states[e]),!u&&!n){lc("State "+e+" not exists.");return}n||this.saveCurrentToNormalState(u);var h=!!(u&&u.hoverLayer||i);h&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,u,this._normalState,t,!a&&!this.__inHover&&l&&l.duration>0,l);var f=this._textContent,v=this._textGuide;return f&&f.useState(e,t,a,h),v&&v.useState(e,t,a,h),n?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!h&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~ar),u}}},r.prototype.useStates=function(e,t,a){if(!e.length)this.clearStates();else{var i=[],n=this.currentStates,o=e.length,s=o===n.length;if(s){for(var l=0;l<o;l++)if(e[l]!==n[l]){s=!1;break}}if(s)return;for(var l=0;l<o;l++){var u=e[l],h=void 0;this.stateProxy&&(h=this.stateProxy(u,e)),h||(h=this.states[u]),h&&i.push(h)}var f=i[o-1],v=!!(f&&f.hoverLayer||a);v&&this._toggleHoverLayerFlag(!0);var c=this._mergeStates(i),d=this.stateTransition;this.saveCurrentToNormalState(c),this._applyStateObj(e.join(","),c,this._normalState,!1,!t&&!this.__inHover&&d&&d.duration>0,d);var p=this._textContent,g=this._textGuide;p&&p.useStates(e,t,v),g&&g.useStates(e,t,v),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!v&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~ar)}},r.prototype.isSilent=function(){for(var e=this;e;){if(e.silent)return!0;var t=e.__hostTarget;e=t?e.ignoreHostSilent?null:t:e.parent}return!1},r.prototype._updateAnimationTargets=function(){for(var e=0;e<this.animators.length;e++){var t=this.animators[e];t.targetName&&t.changeTarget(this[t.targetName])}},r.prototype.removeState=function(e){var t=gt(this.currentStates,e);if(t>=0){var a=this.currentStates.slice();a.splice(t,1),this.useStates(a)}},r.prototype.replaceState=function(e,t,a){var i=this.currentStates.slice(),n=gt(i,e),o=gt(i,t)>=0;n>=0?o?i.splice(n,1):i[n]=t:a&&!o&&i.push(t),this.useStates(i)},r.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},r.prototype._mergeStates=function(e){for(var t={},a,i=0;i<e.length;i++){var n=e[i];F(t,n),n.textConfig&&(a=a||{},F(a,n.textConfig))}return a&&(t.textConfig=a),t},r.prototype._applyStateObj=function(e,t,a,i,n,o){var s=!(t&&i);t&&t.textConfig?(this.textConfig=F({},i?this.textConfig:a.textConfig),F(this.textConfig,t.textConfig)):s&&a.textConfig&&(this.textConfig=a.textConfig);for(var l={},u=!1,h=0;h<ud.length;h++){var f=ud[h],v=n&&aE[f];t&&t[f]!=null?v?(u=!0,l[f]=t[f]):this[f]=t[f]:s&&a[f]!=null&&(v?(u=!0,l[f]=a[f]):this[f]=a[f])}if(!n)for(var h=0;h<this.animators.length;h++){var c=this.animators[h],d=c.targetName;c.getLoop()||c.__changeFinalValue(d?(t||a)[d]:t||a)}u&&this._transitionState(e,l,o)},r.prototype._attachComponent=function(e){if(!(e.__zr&&!e.__hostTarget)&&e!==this){var t=this.__zr;t&&e.addSelfToZr(t),e.__zr=t,e.__hostTarget=this}},r.prototype._detachComponent=function(e){e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__hostTarget=null},r.prototype.getClipPath=function(){return this._clipPath},r.prototype.setClipPath=function(e){this._clipPath&&this._clipPath!==e&&this.removeClipPath(),this._attachComponent(e),this._clipPath=e,this.markRedraw()},r.prototype.removeClipPath=function(){var e=this._clipPath;e&&(this._detachComponent(e),this._clipPath=null,this.markRedraw())},r.prototype.getTextContent=function(){return this._textContent},r.prototype.setTextContent=function(e){var t=this._textContent;t!==e&&(t&&t!==e&&this.removeTextContent(),e.innerTransformable=new Ia,this._attachComponent(e),this._textContent=e,this.markRedraw())},r.prototype.setTextConfig=function(e){this.textConfig||(this.textConfig={}),F(this.textConfig,e),this.markRedraw()},r.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},r.prototype.removeTextContent=function(){var e=this._textContent;e&&(e.innerTransformable=null,this._detachComponent(e),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},r.prototype.getTextGuideLine=function(){return this._textGuide},r.prototype.setTextGuideLine=function(e){this._textGuide&&this._textGuide!==e&&this.removeTextGuideLine(),this._attachComponent(e),this._textGuide=e,this.markRedraw()},r.prototype.removeTextGuideLine=function(){var e=this._textGuide;e&&(this._detachComponent(e),this._textGuide=null,this.markRedraw())},r.prototype.markRedraw=function(){this.__dirty|=ar;var e=this.__zr;e&&(this.__inHover?e.refreshHover():e.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},r.prototype.dirty=function(){this.markRedraw()},r.prototype._toggleHoverLayerFlag=function(e){this.__inHover=e;var t=this._textContent,a=this._textGuide;t&&(t.__inHover=e),a&&(a.__inHover=e)},r.prototype.addSelfToZr=function(e){if(this.__zr!==e){this.__zr=e;var t=this.animators;if(t)for(var a=0;a<t.length;a++)e.animation.addAnimator(t[a]);this._clipPath&&this._clipPath.addSelfToZr(e),this._textContent&&this._textContent.addSelfToZr(e),this._textGuide&&this._textGuide.addSelfToZr(e)}},r.prototype.removeSelfFromZr=function(e){if(this.__zr){this.__zr=null;var t=this.animators;if(t)for(var a=0;a<t.length;a++)e.animation.removeAnimator(t[a]);this._clipPath&&this._clipPath.removeSelfFromZr(e),this._textContent&&this._textContent.removeSelfFromZr(e),this._textGuide&&this._textGuide.removeSelfFromZr(e)}},r.prototype.animate=function(e,t,a){var i=e?this[e]:this,n=new qc(i,t,a);return e&&(n.targetName=e),this.addAnimator(n,e),n},r.prototype.addAnimator=function(e,t){var a=this.__zr,i=this;e.during(function(){i.updateDuringAnimation(t)}).done(function(){var n=i.animators,o=gt(n,e);o>=0&&n.splice(o,1)}),this.animators.push(e),a&&a.animation.addAnimator(e),a&&a.wakeUp()},r.prototype.updateDuringAnimation=function(e){this.markRedraw()},r.prototype.stopAnimation=function(e,t){for(var a=this.animators,i=a.length,n=[],o=0;o<i;o++){var s=a[o];!e||e===s.scope?s.stop(t):n.push(s)}return this.animators=n,this},r.prototype.animateTo=function(e,t,a){hd(this,e,t,a)},r.prototype.animateFrom=function(e,t,a){hd(this,e,t,a,!0)},r.prototype._transitionState=function(e,t,a,i){for(var n=hd(this,t,a,i),o=0;o<n.length;o++)n[o].__fromStateTransition=e},r.prototype.getBoundingRect=function(){return null},r.prototype.getPaintRect=function(){return null},r.initDefaultProps=function(){var e=r.prototype;e.type="element",e.name="",e.ignore=e.silent=e.ignoreHostSilent=e.isGroup=e.draggable=e.dragging=e.ignoreClip=e.__inHover=!1,e.__dirty=ar;function t(a,i,n,o){Object.defineProperty(e,a,{get:function(){if(!this[i]){var l=this[i]=[];s(this,l)}return this[i]},set:function(l){this[n]=l[0],this[o]=l[1],this[i]=l,s(this,l)}});function s(l,u){Object.defineProperty(u,0,{get:function(){return l[n]},set:function(h){l[n]=h}}),Object.defineProperty(u,1,{get:function(){return l[o]},set:function(h){l[o]=h}})}}Object.defineProperty&&(t("position","_legacyPos","x","y"),t("scale","_legacyScale","scaleX","scaleY"),t("origin","_legacyOrigin","originX","originY"))}(),r}();ie(hh,dr),ie(hh,Ia);function hd(r,e,t,a,i){t=t||{};var n=[];C1(r,"",r,e,t,a,n,i);var o=n.length,s=!1,l=t.done,u=t.aborted,h=function(){s=!0,o--,o<=0&&(s?l&&l():u&&u())},f=function(){o--,o<=0&&(s?l&&l():u&&u())};o||l&&l(),n.length>0&&t.during&&n[0].during(function(d,p){t.during(p)});for(var v=0;v<n.length;v++){var c=n[v];h&&c.done(h),f&&c.aborted(f),t.force&&c.duration(t.duration),c.start(t.easing)}return n}function fd(r,e,t){for(var a=0;a<t;a++)r[a]=e[a]}function nE(r){return ke(r[0])}function oE(r,e,t){if(ke(e[t]))if(ke(r[t])||(r[t]=[]),Xe(e[t])){var a=e[t].length;r[t].length!==a&&(r[t]=new e[t].constructor(a),fd(r[t],e[t],a))}else{var i=e[t],n=r[t],o=i.length;if(nE(i))for(var s=i[0].length,l=0;l<o;l++)n[l]?fd(n[l],i[l],s):n[l]=Array.prototype.slice.call(i[l]);else fd(n,i,o);n.length=i.length}else r[t]=e[t]}function sE(r,e){return r===e||ke(r)&&ke(e)&&lE(r,e)}function lE(r,e){var t=r.length;if(t!==e.length)return!1;for(var a=0;a<t;a++)if(r[a]!==e[a])return!1;return!0}function C1(r,e,t,a,i,n,o,s){for(var l=Mt(a),u=i.duration,h=i.delay,f=i.additive,v=i.setToFinal,c=!lt(n),d=r.animators,p=[],g=0;g<l.length;g++){var y=l[g],m=a[y];if(m!=null&&t[y]!=null&&(c||n[y]))if(lt(m)&&!ke(m)&&!Pu(m)){if(e){s||(t[y]=m,r.updateDuringAnimation(e));continue}C1(r,y,t[y],m,i,n&&n[y],o,s)}else p.push(y);else s||(t[y]=m,r.updateDuringAnimation(e),p.push(y))}var _=p.length;if(!f&&_)for(var x=0;x<d.length;x++){var b=d[x];if(b.targetName===e){var S=b.stopTracks(p);if(S){var w=gt(d,b);d.splice(w,1)}}}if(i.force||(p=Et(p,function(D){return!sE(a[D],t[D])}),_=p.length),_>0||i.force&&!o.length){var T=void 0,C=void 0,A=void 0;if(s){C={},v&&(T={});for(var x=0;x<_;x++){var y=p[x];C[y]=t[y],v?T[y]=a[y]:t[y]=a[y]}}else if(v){A={};for(var x=0;x<_;x++){var y=p[x];A[y]=Hs(t[y]),oE(t,a,y)}}var b=new qc(t,!1,!1,f?Et(d,function(I){return I.targetName===e}):null);b.targetName=e,i.scope&&(b.scope=i.scope),v&&T&&b.whenWithKeys(0,T,p),A&&b.whenWithKeys(0,A,p),b.whenWithKeys(u??500,s?C:a,p).delay(h||0),r.addAnimator(b,e),o.push(b)}}var A1=function(r){Ut(e,r);function e(t){var a=r.call(this)||this;return a.isGroup=!0,a._children=[],a.attr(t),a}return e.prototype.childrenRef=function(){return this._children},e.prototype.children=function(){return this._children.slice()},e.prototype.childAt=function(t){return this._children[t]},e.prototype.childOfName=function(t){for(var a=this._children,i=0;i<a.length;i++)if(a[i].name===t)return a[i]},e.prototype.childCount=function(){return this._children.length},e.prototype.add=function(t){return t&&t!==this&&t.parent!==this&&(this._children.push(t),this._doAdd(t)),this},e.prototype.addBefore=function(t,a){if(t&&t!==this&&t.parent!==this&&a&&a.parent===this){var i=this._children,n=i.indexOf(a);n>=0&&(i.splice(n,0,t),this._doAdd(t))}return this},e.prototype.replace=function(t,a){var i=gt(this._children,t);return i>=0&&this.replaceAt(a,i),this},e.prototype.replaceAt=function(t,a){var i=this._children,n=i[a];if(t&&t!==this&&t.parent!==this&&t!==n){i[a]=t,n.parent=null;var o=this.__zr;o&&n.removeSelfFromZr(o),this._doAdd(t)}return this},e.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var a=this.__zr;a&&a!==t.__zr&&t.addSelfToZr(a),a&&a.refresh()},e.prototype.remove=function(t){var a=this.__zr,i=this._children,n=gt(i,t);return n<0?this:(i.splice(n,1),t.parent=null,a&&t.removeSelfFromZr(a),a&&a.refresh(),this)},e.prototype.removeAll=function(){for(var t=this._children,a=this.__zr,i=0;i<t.length;i++){var n=t[i];a&&n.removeSelfFromZr(a),n.parent=null}return t.length=0,this},e.prototype.eachChild=function(t,a){for(var i=this._children,n=0;n<i.length;n++){var o=i[n];t.call(a,o,n)}return this},e.prototype.traverse=function(t,a){for(var i=0;i<this._children.length;i++){var n=this._children[i],o=t.call(a,n);n.isGroup&&!o&&n.traverse(t,a)}return this},e.prototype.addSelfToZr=function(t){r.prototype.addSelfToZr.call(this,t);for(var a=0;a<this._children.length;a++){var i=this._children[a];i.addSelfToZr(t)}},e.prototype.removeSelfFromZr=function(t){r.prototype.removeSelfFromZr.call(this,t);for(var a=0;a<this._children.length;a++){var i=this._children[a];i.removeSelfFromZr(t)}},e.prototype.getBoundingRect=function(t){for(var a=new ht(0,0,0,0),i=t||this._children,n=[],o=null,s=0;s<i.length;s++){var l=i[s];if(!(l.ignore||l.invisible)){var u=l.getBoundingRect(),h=l.getLocalTransform(n);h?(ht.applyTransform(a,u,h),o=o||a.clone(),o.union(a)):(o=o||u.clone(),o.union(u))}}return o||a},e}(hh);A1.prototype.type="group";var et=A1;/*!
45
+ * ZRender, a high performance 2d drawing library.
46
+ *
47
+ * Copyright (c) 2013, Baidu Inc.
48
+ * All rights reserved.
49
+ *
50
+ * LICENSE
51
+ * https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
52
+ */var fh={},M1={};function uE(r){delete M1[r]}function hE(r){if(!r)return!1;if(typeof r=="string")return Xu(r,1)<rd;if(r.colorStops){for(var e=r.colorStops,t=0,a=e.length,i=0;i<a;i++)t+=Xu(e[i].color,1);return t/=a,t<rd}return!1}var fE=function(){function r(e,t,a){var i=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,a=a||{},this.dom=t,this.id=e;var n=new TR,o=a.renderer||"canvas";fh[o]||(o=Mt(fh)[0]),a.useDirtyRect=a.useDirtyRect==null?!1:a.useDirtyRect;var s=new fh[o](t,n,a,e),l=a.ssr||s.ssrOnly;this.storage=n,this.painter=s;var u=!Pt.node&&!Pt.worker&&!l?new QR(s.getViewportRoot(),s.root):null,h=a.useCoarsePointer,f=h==null||h==="auto"?Pt.touchEventsSupported:!!h,v=44,c;f&&(c=Q(a.pointerSize,v)),this.handler=new B_(n,s,u,s.root,c),this.animation=new ZR({stage:{update:l?null:function(){return i._flush(!0)}}}),l||this.animation.start()}return r.prototype.add=function(e){this._disposed||!e||(this.storage.addRoot(e),e.addSelfToZr(this),this.refresh())},r.prototype.remove=function(e){this._disposed||!e||(this.storage.delRoot(e),e.removeSelfFromZr(this),this.refresh())},r.prototype.configLayer=function(e,t){this._disposed||(this.painter.configLayer&&this.painter.configLayer(e,t),this.refresh())},r.prototype.setBackgroundColor=function(e){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this.refresh(),this._backgroundColor=e,this._darkMode=hE(e))},r.prototype.getBackgroundColor=function(){return this._backgroundColor},r.prototype.setDarkMode=function(e){this._darkMode=e},r.prototype.isDarkMode=function(){return this._darkMode},r.prototype.refreshImmediately=function(e){this._disposed||(e||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1)},r.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},r.prototype.flush=function(){this._disposed||this._flush(!1)},r.prototype._flush=function(e){var t,a=mo();this._needsRefresh&&(t=!0,this.refreshImmediately(e)),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately());var i=mo();t?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:i-a})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},r.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},r.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},r.prototype.refreshHover=function(){this._needsRefreshHover=!0},r.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},r.prototype.resize=function(e){this._disposed||(e=e||{},this.painter.resize(e.width,e.height),this.handler.resize())},r.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},r.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},r.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},r.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},r.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},r.prototype.on=function(e,t,a){return this._disposed||this.handler.on(e,t,a),this},r.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},r.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},r.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t<e.length;t++)e[t]instanceof et&&e[t].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},r.prototype.dispose=function(){this._disposed||(this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,this._disposed=!0,uE(this.id))},r}();function D1(r,e){var t=new fE(b_(),r,e);return M1[t.id]=t,t}function vE(r,e){fh[r]=e}var vd;function cE(r){if(typeof vd=="function")return vd(r)}function dE(r){vd=r}var L1=1e-4,I1=20;function pE(r){return r.replace(/^\s+|\s+$/g,"")}var ir=Math.min,ee=Math.max,ra=Math.abs;function Ot(r,e,t,a){var i=e[0],n=e[1],o=t[0],s=t[1],l=n-i,u=s-o;if(l===0)return u===0?o:(o+s)/2;if(a)if(l>0){if(r<=i)return o;if(r>=n)return s}else{if(r>=i)return o;if(r<=n)return s}else{if(r===i)return o;if(r===n)return s}return(r-i)/l*u+o}var Z=gE;function gE(r,e,t){switch(r){case"center":case"middle":r="50%";break;case"left":case"top":r="0%";break;case"right":case"bottom":r="100%";break}return vh(r,e,t)}function vh(r,e,t){return $(r)?pE(r).match(/%$/)?parseFloat(r)/100*e+(t||0):parseFloat(r):r==null?NaN:+r}function ne(r,e,t){return e==null&&(e=10),e=Math.min(Math.max(0,e),I1),r=(+r).toFixed(e),t?r:+r}function mr(r){return r.sort(function(e,t){return e-t}),r}function aa(r){if(r=+r,isNaN(r))return 0;if(r>1e-14){for(var e=1,t=0;t<15;t++,e*=10)if(Math.round(r*e)/e===r)return t}return yE(r)}function yE(r){var e=r.toString().toLowerCase(),t=e.indexOf("e"),a=t>0?+e.slice(t+1):0,i=t>0?t:e.length,n=e.indexOf("."),o=n<0?0:i-1-n;return Math.max(0,o-a)}function P1(r,e){var t=Math.log,a=Math.LN10,i=Math.floor(t(r[1]-r[0])/a),n=Math.round(t(ra(e[1]-e[0]))/a),o=Math.min(Math.max(-i+n,0),20);return isFinite(o)?o:20}function mE(r,e){var t=Xr(r,function(c,d){return c+(isNaN(d)?0:d)},0);if(t===0)return[];for(var a=Math.pow(10,e),i=U(r,function(c){return(isNaN(c)?0:c)/t*a*100}),n=a*100,o=U(i,function(c){return Math.floor(c)}),s=Xr(o,function(c,d){return c+d},0),l=U(i,function(c,d){return c-o[d]});s<n;){for(var u=Number.NEGATIVE_INFINITY,h=null,f=0,v=l.length;f<v;++f)l[f]>u&&(u=l[f],h=f);++o[h],l[h]=0,++s}return U(o,function(c){return c/a})}function _E(r,e){var t=Math.max(aa(r),aa(e)),a=r+e;return t>I1?a:ne(a,t)}var k1=9007199254740991;function R1(r){var e=Math.PI*2;return(r%e+e)%e}function Zs(r){return r>-L1&&r<L1}var xE=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function Qi(r){if(r instanceof Date)return r;if($(r)){var e=xE.exec(r);if(!e)return new Date(NaN);if(e[8]){var t=+e[4]||0;return e[8].toUpperCase()!=="Z"&&(t-=+e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,t,+(e[5]||0),+e[6]||0,e[7]?+e[7].substring(0,3):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]?+e[7].substring(0,3):0)}else if(r==null)return new Date(NaN);return new Date(Math.round(r))}function SE(r){return Math.pow(10,cd(r))}function cd(r){if(r===0)return 0;var e=Math.floor(Math.log(r)/Math.LN10);return r/Math.pow(10,e)>=10&&e++,e}function E1(r,e){var t=cd(r),a=Math.pow(10,t),i=r/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,r=n*a,t>=-20?+r.toFixed(t<0?-t:0):r}function dd(r,e){var t=(r.length-1)*e+1,a=Math.floor(t),i=+r[a-1],n=t-a;return n?i+n*(r[a]-i):i}function O1(r){r.sort(function(l,u){return s(l,u,0)?-1:1});for(var e=-1/0,t=1,a=0;a<r.length;){for(var i=r[a].interval,n=r[a].close,o=0;o<2;o++)i[o]<=e&&(i[o]=e,n[o]=o?1:1-t),e=i[o],t=n[o];i[0]===i[1]&&n[0]*n[1]!==1?r.splice(a,1):a++}return r;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 Pa(r){var e=parseFloat(r);return e==r&&(e!==0||!$(r)||r.indexOf("x")<=0)?e:NaN}function N1(r){return!isNaN(Pa(r))}function B1(){return Math.round(Math.random()*9)}function z1(r,e){return e===0?r:z1(e,r%e)}function V1(r,e){return r==null?e:e==null?r:r*e/z1(r,e)}var bE="[ECharts] ",G1={},wE=typeof console<"u"&&console.warn&&console.log;function F1(r,e,t){if(wE){if(t){if(G1[e])return;G1[e]=!0}console[r](bE+e)}}function aK(r,e){F1("warn",r,e)}function H1(r,e){F1("error",r,e)}function Rt(r){throw new Error(r)}function W1(r,e,t){return(e-r)*t+r}var U1="series\0",Y1="\0_ec_\0";function Vt(r){return r instanceof Array?r:r==null?[]:[r]}function tn(r,e,t){if(r){r[e]=r[e]||{},r.emphasis=r.emphasis||{},r.emphasis[e]=r.emphasis[e]||{};for(var a=0,i=t.length;a<i;a++){var n=t[a];!r.emphasis[e].hasOwnProperty(n)&&r[e].hasOwnProperty(n)&&(r.emphasis[e][n]=r[e][n])}}}var Z1=["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 bo(r){return lt(r)&&!W(r)&&!(r instanceof Date)?r.value:r}function TE(r){return lt(r)&&!(r instanceof Array)}function $1(r,e,t){var a=t==="normalMerge",i=t==="replaceMerge",n=t==="replaceAll";r=r||[],e=(e||[]).slice();var o=J();M(e,function(l,u){if(!lt(l)){e[u]=null;return}});var s=CE(r,o,t);return(a||i)&&AE(s,r,o,e),a&&ME(s,e),a||i?DE(s,e,i):n&&LE(s,e),IE(s),s}function CE(r,e,t){var a=[];if(t==="replaceAll")return a;for(var i=0;i<r.length;i++){var n=r[i];n&&n.id!=null&&e.set(n.id,i),a.push({existing:t==="replaceMerge"||Xs(n)?null:n,newOption:null,keyInfo:null,brandNew:null})}return a}function AE(r,e,t,a){M(a,function(i,n){if(!(!i||i.id==null)){var o=$s(i.id),s=t.get(o);if(s!=null){var l=r[s];Ee(!l.newOption,'Duplicated option on id "'+o+'".'),l.newOption=i,l.existing=e[s],a[n]=null}}})}function ME(r,e){M(e,function(t,a){if(!(!t||t.name==null))for(var i=0;i<r.length;i++){var n=r[i].existing;if(!r[i].newOption&&n&&(n.id==null||t.id==null)&&!Xs(t)&&!Xs(n)&&X1("name",n,t)){r[i].newOption=t,e[a]=null;return}}})}function DE(r,e,t){M(e,function(a){if(a){for(var i,n=0;(i=r[n])&&(i.newOption||Xs(i.existing)||i.existing&&a.id!=null&&!X1("id",a,i.existing));)n++;i?(i.newOption=a,i.brandNew=t):r.push({newOption:a,brandNew:t,existing:null,keyInfo:null}),n++}})}function LE(r,e){M(e,function(t){r.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})})}function IE(r){var e=J();M(r,function(t){var a=t.existing;a&&e.set(a.id,t)}),M(r,function(t){var a=t.newOption;Ee(!a||a.id==null||!e.get(a.id)||e.get(a.id)===t,"id duplicates: "+(a&&a.id)),a&&a.id!=null&&e.set(a.id,t),!t.keyInfo&&(t.keyInfo={})}),M(r,function(t,a){var i=t.existing,n=t.newOption,o=t.keyInfo;if(lt(n)){if(o.name=n.name!=null?$s(n.name):i?i.name:U1+a,i)o.id=$s(i.id);else if(n.id!=null)o.id=$s(n.id);else{var s=0;do o.id="\0"+o.name+"\0"+s++;while(e.get(o.id))}e.set(o.id,t)}})}function X1(r,e,t){var a=fe(e[r],null),i=fe(t[r],null);return a!=null&&i!=null&&a===i}function $s(r){return fe(r,"")}function fe(r,e){return r==null?e:$(r)?r:Dt(r)||hc(r)?r+"":e}function pd(r){var e=r.name;return!!(e&&e.indexOf(U1))}function Xs(r){return r&&r.id!=null&&$s(r.id).indexOf(Y1)===0}function PE(r){return Y1+r}function kE(r,e,t){M(r,function(a){var i=a.newOption;lt(i)&&(a.keyInfo.mainType=e,a.keyInfo.subType=RE(e,i,a.existing,t))})}function RE(r,e,t,a){var i=e.type?e.type:t?t.subType:a.determineSubType(r,e);return i}function EE(r,e){var t={},a={};return i(r||[],t),i(e||[],a,t),[n(t),n(a)];function i(o,s,l){for(var u=0,h=o.length;u<h;u++){var f=fe(o[u].seriesId,null);if(f==null)return;for(var v=Vt(o[u].dataIndex),c=l&&l[f],d=0,p=v.length;d<p;d++){var g=v[d];c&&c[g]?c[g]=null:(s[f]||(s[f]={}))[g]=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 en(r,e){if(e.dataIndexInside!=null)return e.dataIndexInside;if(e.dataIndex!=null)return W(e.dataIndex)?U(e.dataIndex,function(t){return r.indexOfRawIndex(t)}):r.indexOfRawIndex(e.dataIndex);if(e.name!=null)return W(e.name)?U(e.name,function(t){return r.indexOfName(t)}):r.indexOfName(e.name)}function St(){var r="__ec_inner_"+OE++;return function(e){return e[r]||(e[r]={})}}var OE=B1();function wo(r,e,t){var a=gd(e,t),i=a.mainTypeSpecified,n=a.queryOptionMap,o=a.others,s=o,l=t?t.defaultMainType:null;return!i&&l&&n.set(l,{}),n.each(function(u,h){var f=To(r,h,u,{useDefault:l===h,enableAll:t&&t.enableAll!=null?t.enableAll:!0,enableNone:t&&t.enableNone!=null?t.enableNone:!0});s[h+"Models"]=f.models,s[h+"Model"]=f.models[0]}),s}function gd(r,e){var t;if($(r)){var a={};a[r+"Index"]=0,t=a}else t=r;var i=J(),n={},o=!1;return M(t,function(s,l){if(l==="dataIndex"||l==="dataIndexInside"){n[l]=s;return}var u=l.match(/^(\w+)(Index|Id|Name)$/)||[],h=u[1],f=(u[2]||"").toLowerCase();if(!(!h||!f||e&&e.includeMainTypes&&gt(e.includeMainTypes,h)<0)){o=o||!!h;var v=i.get(h)||i.set(h,{});v[f]=s}}),{mainTypeSpecified:o,queryOptionMap:i,others:n}}var Jt={useDefault:!0,enableAll:!1,enableNone:!1},NE={useDefault:!1,enableAll:!0,enableNone:!0};function To(r,e,t,a){a=a||Jt;var i=t.index,n=t.id,o=t.name,s={models:null,specified:i!=null||n!=null||o!=null};if(!s.specified){var l=void 0;return s.models=a.useDefault&&(l=r.getComponent(e))?[l]:[],s}if(i==="none"||i===!1){if(a.enableNone)return s.models=[],s;i=-1}return i==="all"&&(a.enableAll?i=n=o=null:i=-1),s.models=r.queryComponents({mainType:e,index:i,id:n,name:o}),s}function q1(r,e,t){r.setAttribute?r.setAttribute(e,t):r[e]=t}function BE(r,e){return r.getAttribute?r.getAttribute(e):r[e]}function zE(r){return r==="auto"?Pt.domSupported?"html":"richText":r||"html"}function yd(r,e){var t=J(),a=[];return M(r,function(i){var n=e(i);(t.get(n)||(a.push(n),t.set(n,[]))).push(i)}),{keys:a,buckets:t}}function K1(r,e,t,a,i){var n=e==null||e==="auto";if(a==null)return a;if(Dt(a)){var o=W1(t||0,a,i);return ne(o,n?Math.max(aa(t||0),aa(a)):e)}else{if($(a))return i<1?t:a;for(var s=[],l=t,u=a,h=Math.max(l?l.length:0,u.length),f=0;f<h;++f){var v=r.getDimensionInfo(f);if(v&&v.type==="ordinal")s[f]=(i<1&&l?l:u)[f];else{var c=l&&l[f]?l[f]:0,d=u[f],o=W1(c,d,i);s[f]=ne(o,n?Math.max(aa(c),aa(d)):e)}}return s}}var hi=function(){function r(){}return r.prototype.reset=function(e,t,a,i){return this._list=e,this._step=i=i||1,this._idx=t,this._end=a??(i>0?e.length:0),this.item=null,this.key=NaN,this},r.prototype.next=function(){return(this._step>0?this._idx<this._end:this._idx>=this._end)?(this.item=this._list[this._idx],this.key=this._idx=this._idx+this._step,!0):!1},r}();function md(r){r.option=r.parentModel=r.ecModel=null}var VE=".",rn="___EC__COMPONENT__CONTAINER___",j1="___EC__EXTENDED_CLASS___";function ia(r){var e={main:"",sub:""};if(r){var t=r.split(VE);e.main=t[0]||"",e.sub=t[1]||""}return e}function GE(r){Ee(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(r),'componentType "'+r+'" illegal')}function FE(r){return!!(r&&r[j1])}function _d(r,e){r.$constructor=r,r.extend=function(t){var a=this,i;return HE(a)?i=function(n){z(o,n);function o(){return n.apply(this,arguments)||this}return o}(a):(i=function(){(t.$constructor||a).apply(this,arguments)},Fk(i,this)),F(i.prototype,t),i[j1]=!0,i.extend=this.extend,i.superCall=YE,i.superApply=ZE,i.superClass=a,i}}function HE(r){return rt(r)&&/^class\s/.test(Function.prototype.toString.call(r))}function J1(r,e){r.extend=e.extend}var WE=Math.round(Math.random()*10);function UE(r){var e=["__\0is_clz",WE++].join("_");r.prototype[e]=!0,r.isInstance=function(t){return!!(t&&t[e])}}function YE(r,e){for(var t=[],a=2;a<arguments.length;a++)t[a-2]=arguments[a];return this.superClass.prototype[e].apply(r,t)}function ZE(r,e,t){return this.superClass.prototype[e].apply(r,t)}function ch(r){var e={};r.registerClass=function(a){var i=a.type||a.prototype.type;if(i){GE(i),a.prototype.type=i;var n=ia(i);if(!n.sub)e[n.main]=a;else if(n.sub!==rn){var o=t(n);o[n.sub]=a}}return a},r.getClass=function(a,i,n){var o=e[a];if(o&&o[rn]&&(o=i?o[i]:null),n&&!o)throw new Error(i?"Component "+a+"."+(i||"")+" is used but not imported.":a+".type should be specified.");return o},r.getClassesByMainType=function(a){var i=ia(a),n=[],o=e[i.main];return o&&o[rn]?M(o,function(s,l){l!==rn&&n.push(s)}):n.push(o),n},r.hasClass=function(a){var i=ia(a);return!!e[i.main]},r.getAllClassMainTypes=function(){var a=[];return M(e,function(i,n){a.push(n)}),a},r.hasSubTypes=function(a){var i=ia(a),n=e[i.main];return n&&n[rn]};function t(a){var i=e[a.main];return(!i||!i[rn])&&(i=e[a.main]={},i[rn]=!0),i}}function an(r,e){for(var t=0;t<r.length;t++)r[t][1]||(r[t][1]=r[t][0]);return e=e||!1,function(a,i,n){for(var o={},s=0;s<r.length;s++){var l=r[s][1];if(!(i&&gt(i,l)>=0||n&&gt(n,l)<0)){var u=a.getShallow(l,e);u!=null&&(o[r[s][0]]=u)}}return o}}var $E=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],XE=an($E),qE=function(){function r(){}return r.prototype.getAreaStyle=function(e,t){return XE(this,e,t)},r}(),xd=new go(50);function KE(r){if(typeof r=="string"){var e=xd.get(r);return e&&e.image}else return r}function Sd(r,e,t,a,i){if(r)if(typeof r=="string"){if(e&&e.__zrImageSrc===r||!t)return e;var n=xd.get(r),o={hostEl:t,cb:a,cbPayload:i};return n?(e=n.image,!dh(e)&&n.pending.push(o)):(e=kr.loadImage(r,Q1,Q1),e.__zrImageSrc=r,xd.put(r,e.__cachedImgObj={image:e,pending:[o]})),e}else return r;else return e}function Q1(){var r=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e<r.pending.length;e++){var t=r.pending[e],a=t.cb;a&&a(this,t.cbPayload),t.hostEl.dirty()}r.pending.length=0}function dh(r){return r&&r.width&&r.height}var bd=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function jE(r,e,t,a,i,n){if(!t){r.text="",r.isTruncated=!1;return}var o=(e+"").split(`
53
+ `);n=tx(t,a,i,n);for(var s=!1,l={},u=0,h=o.length;u<h;u++)ex(l,o[u],n),o[u]=l.textLine,s=s||l.isTruncated;r.text=o.join(`
54
+ `),r.isTruncated=s}function tx(r,e,t,a){a=a||{};var i=F({},a);t=Q(t,"..."),i.maxIterations=Q(a.maxIterations,2);var n=i.minChar=Q(a.minChar,0),o=i.fontMeasureInfo=ta(e),s=o.asciiCharWidth;i.placeholder=Q(a.placeholder,"");for(var l=r=Math.max(0,r-1),u=0;u<n&&l>=s;u++)l-=s;var h=ea(o,t);return h>l&&(t="",h=0),l=r-h,i.ellipsis=t,i.ellipsisWidth=h,i.contentWidth=l,i.containerWidth=r,i}function ex(r,e,t){var a=t.containerWidth,i=t.contentWidth,n=t.fontMeasureInfo;if(!a){r.textLine="",r.isTruncated=!1;return}var o=ea(n,e);if(o<=a){r.textLine=e,r.isTruncated=!1;return}for(var s=0;;s++){if(o<=i||s>=t.maxIterations){e+=t.ellipsis;break}var l=s===0?JE(e,i,n):o>0?Math.floor(e.length*i/o):0;e=e.substr(0,l),o=ea(n,e)}e===""&&(e=t.placeholder),r.textLine=e,r.isTruncated=!0}function JE(r,e,t){for(var a=0,i=0,n=r.length;i<n&&a<e;i++)a+=w1(t,r.charCodeAt(i));return i}function QE(r,e,t,a){var i=Td(r),n=e.overflow,o=e.padding,s=o?o[1]+o[3]:0,l=o?o[0]+o[2]:0,u=e.font,h=n==="truncate",f=Ys(u),v=Q(e.lineHeight,f),c=e.lineOverflow==="truncate",d=!1,p=e.width;p==null&&t!=null&&(p=t-s);var g=e.height;g==null&&a!=null&&(g=a-l);var y;p!=null&&(n==="break"||n==="breakAll")?y=i?ax(i,e.font,p,n==="breakAll",0).lines:[]:y=i?i.split(`
55
+ `):[];var m=y.length*v;if(g==null&&(g=m),m>g&&c){var _=Math.floor(g/v);d=d||y.length>_,y=y.slice(0,_),m=y.length*v}if(i&&h&&p!=null)for(var x=tx(p,u,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),b={},S=0;S<y.length;S++)ex(b,y[S],x),y[S]=b.textLine,d=d||b.isTruncated;for(var w=g,T=0,C=ta(u),S=0;S<y.length;S++)T=Math.max(ea(C,y[S]),T);p==null&&(p=T);var A=p;return w+=l,A+=s,{lines:y,height:g,outerWidth:A,outerHeight:w,lineHeight:v,calculatedLineHeight:f,contentWidth:T,contentHeight:m,width:p,isTruncated:d}}var tO=function(){function r(){}return r}(),rx=function(){function r(e){this.tokens=[],e&&(this.tokens=e)}return r}(),eO=function(){function r(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1}return r}();function rO(r,e,t,a,i){var n=new eO,o=Td(r);if(!o)return n;var s=e.padding,l=s?s[1]+s[3]:0,u=s?s[0]+s[2]:0,h=e.width;h==null&&t!=null&&(h=t-l);var f=e.height;f==null&&a!=null&&(f=a-u);for(var v=e.overflow,c=(v==="break"||v==="breakAll")&&h!=null?{width:h,accumWidth:0,breakAll:v==="breakAll"}:null,d=bd.lastIndex=0,p;(p=bd.exec(o))!=null;){var g=p.index;g>d&&wd(n,o.substring(d,g),e,c),wd(n,p[2],e,c,p[1]),d=bd.lastIndex}d<o.length&&wd(n,o.substring(d,o.length),e,c);var y=[],m=0,_=0,x=v==="truncate",b=e.lineOverflow==="truncate",S={};function w(xt,At,ut){xt.width=At,xt.lineHeight=ut,m+=ut,_=Math.max(_,At)}t:for(var T=0;T<n.lines.length;T++){for(var C=n.lines[T],A=0,D=0,I=0;I<C.tokens.length;I++){var L=C.tokens[I],P=L.styleName&&e.rich[L.styleName]||{},k=L.textPadding=P.padding,R=k?k[1]+k[3]:0,O=L.font=P.font||e.font;L.contentHeight=Ys(O);var E=Q(P.height,L.contentHeight);if(L.innerHeight=E,k&&(E+=k[0]+k[2]),L.height=E,L.lineHeight=er(P.lineHeight,e.lineHeight,E),L.align=P&&P.align||i,L.verticalAlign=P&&P.verticalAlign||"middle",b&&f!=null&&m+L.lineHeight>f){var N=n.lines.length;I>0?(C.tokens=C.tokens.slice(0,I),w(C,D,A),n.lines=n.lines.slice(0,T+1)):n.lines=n.lines.slice(0,T),n.isTruncated=n.isTruncated||n.lines.length<N;break t}var V=P.width,G=V==null||V==="auto";if(typeof V=="string"&&V.charAt(V.length-1)==="%")L.percentWidth=V,y.push(L),L.contentWidth=ea(ta(O),L.text);else{if(G){var H=P.backgroundColor,Y=H&&H.image;Y&&(Y=KE(Y),dh(Y)&&(L.width=Math.max(L.width,Y.width*E/Y.height)))}var q=x&&h!=null?h-D:null;q!=null&&q<L.width?!G||q<R?(L.text="",L.width=L.contentWidth=0):(jE(S,L.text,q-R,O,e.ellipsis,{minChar:e.truncateMinChar}),L.text=S.text,n.isTruncated=n.isTruncated||S.isTruncated,L.width=L.contentWidth=ea(ta(O),L.text)):L.contentWidth=ea(ta(O),L.text)}L.width+=R,D+=L.width,P&&(A=Math.max(A,L.lineHeight))}w(C,D,A)}n.outerWidth=n.width=Q(h,_),n.outerHeight=n.height=Q(f,m),n.contentHeight=m,n.contentWidth=_,n.outerWidth+=l,n.outerHeight+=u;for(var T=0;T<y.length;T++){var L=y[T],it=L.percentWidth;L.width=parseInt(it,10)/100*n.width}return n}function wd(r,e,t,a,i){var n=e==="",o=i&&t.rich[i]||{},s=r.lines,l=o.font||t.font,u=!1,h,f;if(a){var v=o.padding,c=v?v[1]+v[3]:0;if(o.width!=null&&o.width!=="auto"){var d=Nr(o.width,a.width)+c;s.length>0&&d+a.accumWidth>a.width&&(h=e.split(`
56
+ `),u=!0),a.accumWidth=d}else{var p=ax(e,l,a.width,a.breakAll,a.accumWidth);a.accumWidth=p.accumWidth+c,f=p.linesWidths,h=p.lines}}h||(h=e.split(`
57
+ `));for(var g=ta(l),y=0;y<h.length;y++){var m=h[y],_=new tO;if(_.styleName=i,_.text=m,_.isLineHolder=!m&&!n,typeof o.width=="number"?_.width=o.width:_.width=f?f[y]:ea(g,m),!y&&!u){var x=(s[s.length-1]||(s[0]=new rx)).tokens,b=x.length;b===1&&x[0].isLineHolder?x[0]=_:(m||!b||n)&&x.push(_)}else s.push(new rx([_]))}}function aO(r){var e=r.charCodeAt(0);return e>=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}var iO=Xr(",&?/;] ".split(""),function(r,e){return r[e]=!0,r},{});function nO(r){return aO(r)?!!iO[r]:!0}function ax(r,e,t,a,i){for(var n=[],o=[],s="",l="",u=0,h=0,f=ta(e),v=0;v<r.length;v++){var c=r.charAt(v);if(c===`
58
+ `){l&&(s+=l,h+=u),n.push(s),o.push(h),s="",l="",u=0,h=0;continue}var d=w1(f,c.charCodeAt(0)),p=a?!1:!nO(c);if(n.length?h+d>t:i+h+d>t){h?(s||l)&&(p?(s||(s=l,l="",u=0,h=u),n.push(s),o.push(h-u),l+=c,u+=d,s="",h=u):(l&&(s+=l,l="",u=0),n.push(s),o.push(h),s=c,h=d)):p?(n.push(l),o.push(u),l=c,u=d):(n.push(c),o.push(d));continue}h+=d,p?(l+=c,u+=d):(l&&(s+=l,l="",u=0),s+=c)}return l&&(s+=l),s&&(n.push(s),o.push(h)),n.length===1&&(h+=i),{accumWidth:h,lines:n,linesWidths:o}}function ix(r,e,t,a,i,n){if(r.baseX=t,r.baseY=a,r.outerWidth=r.outerHeight=null,!!e){var o=e.width*2,s=e.height*2;ht.set(nx,xo(t,o,i),Ji(a,s,n),o,s),ht.intersect(e,nx,null,ox);var l=ox.outIntersectRect;r.outerWidth=l.width,r.outerHeight=l.height,r.baseX=xo(l.x,l.width,i,!0),r.baseY=Ji(l.y,l.height,n,!0)}}var nx=new ht(0,0,0,0),ox={outIntersectRect:{},clamp:!0};function Td(r){return r!=null?r+="":r=""}function oO(r){var e=Td(r.text),t=r.font,a=ea(ta(t),e),i=Ys(t);return Cd(r,a,i,null)}function Cd(r,e,t,a){var i=new ht(xo(r.x||0,e,r.textAlign),Ji(r.y||0,t,r.textBaseline),e,t),n=a??(sx(r)?r.lineWidth:0);return n>0&&(i.x-=n/2,i.y-=n/2,i.width+=n,i.height+=n),i}function sx(r){var e=r.stroke;return e!=null&&e!=="none"&&r.lineWidth>0}var Ad="__zr_style_"+Math.round(Math.random()*10),nn={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},ph={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};nn[Ad]=!0;var lx=["z","z2","invisible"],sO=["invisible"],lO=function(r){Ut(e,r);function e(t){return r.call(this,t)||this}return e.prototype._init=function(t){for(var a=Mt(t),i=0;i<a.length;i++){var n=a[i];n==="style"?this.useStyle(t[n]):r.prototype.attrKV.call(this,n,t[n])}this.style||this.useStyle({})},e.prototype.beforeBrush=function(){},e.prototype.afterBrush=function(){},e.prototype.innerBeforeBrush=function(){},e.prototype.innerAfterBrush=function(){},e.prototype.shouldBePainted=function(t,a,i,n){var o=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&uO(this,t,a)||o&&!o[0]&&!o[3])return!1;if(i&&this.__clipPaths&&this.__clipPaths.length){for(var s=0;s<this.__clipPaths.length;++s)if(this.__clipPaths[s].isZeroArea())return!1}if(n&&this.parent)for(var l=this.parent;l;){if(l.ignore)return!1;l=l.parent}return!0},e.prototype.contain=function(t,a){return this.rectContain(t,a)},e.prototype.traverse=function(t,a){t.call(a,this)},e.prototype.rectContain=function(t,a){var i=this.transformCoordToLocal(t,a),n=this.getBoundingRect();return n.contain(i[0],i[1])},e.prototype.getPaintRect=function(){var t=this._paintRect;if(!this._paintRect||this.__dirty){var a=this.transform,i=this.getBoundingRect(),n=this.style,o=n.shadowBlur||0,s=n.shadowOffsetX||0,l=n.shadowOffsetY||0;t=this._paintRect||(this._paintRect=new ht(0,0,0,0)),a?ht.applyTransform(t,i,a):t.copy(i),(o||s||l)&&(t.width+=o*2+Math.abs(s),t.height+=o*2+Math.abs(l),t.x=Math.min(t.x,t.x+s-o),t.y=Math.min(t.y,t.y+l-o));var u=this.dirtyRectTolerance;t.isZero()||(t.x=Math.floor(t.x-u),t.y=Math.floor(t.y-u),t.width=Math.ceil(t.width+1+u*2),t.height=Math.ceil(t.height+1+u*2))}return t},e.prototype.setPrevPaintRect=function(t){t?(this._prevPaintRect=this._prevPaintRect||new ht(0,0,0,0),this._prevPaintRect.copy(t)):this._prevPaintRect=null},e.prototype.getPrevPaintRect=function(){return this._prevPaintRect},e.prototype.animateStyle=function(t){return this.animate("style",t)},e.prototype.updateDuringAnimation=function(t){t==="style"?this.dirtyStyle():this.markRedraw()},e.prototype.attrKV=function(t,a){t!=="style"?r.prototype.attrKV.call(this,t,a):this.style?this.setStyle(a):this.useStyle(a)},e.prototype.setStyle=function(t,a){return typeof t=="string"?this.style[t]=a:F(this.style,t),this.dirtyStyle(),this},e.prototype.dirtyStyle=function(t){t||this.markRedraw(),this.__dirty|=Bs,this._rect&&(this._rect=null)},e.prototype.dirty=function(){this.dirtyStyle()},e.prototype.styleChanged=function(){return!!(this.__dirty&Bs)},e.prototype.styleUpdated=function(){this.__dirty&=~Bs},e.prototype.createStyle=function(t){return Eu(nn,t)},e.prototype.useStyle=function(t){t[Ad]||(t=this.createStyle(t)),this.__inHover?this.__hoverStyle=t:this.style=t,this.dirtyStyle()},e.prototype.isStyleObject=function(t){return t[Ad]},e.prototype._innerSaveToNormal=function(t){r.prototype._innerSaveToNormal.call(this,t);var a=this._normalState;t.style&&!a.style&&(a.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(t,a,lx)},e.prototype._applyStateObj=function(t,a,i,n,o,s){r.prototype._applyStateObj.call(this,t,a,i,n,o,s);var l=!(a&&n),u;if(a&&a.style?o?n?u=a.style:(u=this._mergeStyle(this.createStyle(),i.style),this._mergeStyle(u,a.style)):(u=this._mergeStyle(this.createStyle(),n?this.style:i.style),this._mergeStyle(u,a.style)):l&&(u=i.style),u)if(o){var h=this.style;if(this.style=this.createStyle(l?{}:h),l)for(var f=Mt(h),v=0;v<f.length;v++){var c=f[v];c in u&&(u[c]=u[c],this.style[c]=h[c])}for(var d=Mt(u),v=0;v<d.length;v++){var c=d[v];this.style[c]=this.style[c]}this._transitionState(t,{style:u},s,this.getAnimationStyleProps())}else this.useStyle(u);for(var p=this.__inHover?sO:lx,v=0;v<p.length;v++){var c=p[v];a&&a[c]!=null?this[c]=a[c]:l&&i[c]!=null&&(this[c]=i[c])}},e.prototype._mergeStates=function(t){for(var a=r.prototype._mergeStates.call(this,t),i,n=0;n<t.length;n++){var o=t[n];o.style&&(i=i||{},this._mergeStyle(i,o.style))}return i&&(a.style=i),a},e.prototype._mergeStyle=function(t,a){return F(t,a),t},e.prototype.getAnimationStyleProps=function(){return ph},e.initDefaultProps=function(){var t=e.prototype;t.type="displayable",t.invisible=!1,t.z=0,t.z2=0,t.zlevel=0,t.culling=!1,t.cursor="pointer",t.rectHover=!1,t.incremental=!1,t._rect=null,t.dirtyRectTolerance=0,t.__dirty=ar|Bs}(),e}(hh),Md=new ht(0,0,0,0),Dd=new ht(0,0,0,0);function uO(r,e,t){return Md.copy(r.getBoundingRect()),r.transform&&Md.applyTransform(r.transform),Dd.width=e,Dd.height=t,!Md.intersect(Dd)}var _r=lO,Ke=Math.min,je=Math.max,Ld=Math.sin,Id=Math.cos,on=Math.PI*2,gh=Hi(),yh=Hi(),mh=Hi();function _h(r,e,t){if(r.length!==0){for(var a=r[0],i=a[0],n=a[0],o=a[1],s=a[1],l=1;l<r.length;l++)a=r[l],i=Ke(i,a[0]),n=je(n,a[0]),o=Ke(o,a[1]),s=je(s,a[1]);e[0]=i,e[1]=o,t[0]=n,t[1]=s}}function ux(r,e,t,a,i,n){i[0]=Ke(r,t),i[1]=Ke(e,a),n[0]=je(r,t),n[1]=je(e,a)}var hx=[],fx=[];function hO(r,e,t,a,i,n,o,s,l,u){var h=K_,f=ge,v=h(r,t,i,o,hx);l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0;for(var c=0;c<v;c++){var d=f(r,t,i,o,hx[c]);l[0]=Ke(d,l[0]),u[0]=je(d,u[0])}v=h(e,a,n,s,fx);for(var c=0;c<v;c++){var p=f(e,a,n,s,fx[c]);l[1]=Ke(p,l[1]),u[1]=je(p,u[1])}l[0]=Ke(r,l[0]),u[0]=je(r,u[0]),l[0]=Ke(o,l[0]),u[0]=je(o,u[0]),l[1]=Ke(e,l[1]),u[1]=je(e,u[1]),l[1]=Ke(s,l[1]),u[1]=je(s,u[1])}function fO(r,e,t,a,i,n,o,s){var l=J_,u=be,h=je(Ke(l(r,t,i),1),0),f=je(Ke(l(e,a,n),1),0),v=u(r,t,i,h),c=u(e,a,n,f);o[0]=Ke(r,i,v),o[1]=Ke(e,n,c),s[0]=je(r,i,v),s[1]=je(e,n,c)}function vO(r,e,t,a,i,n,o,s,l){var u=ti,h=ei,f=Math.abs(i-n);if(f%on<1e-4&&f>1e-4){s[0]=r-t,s[1]=e-a,l[0]=r+t,l[1]=e+a;return}if(gh[0]=Id(i)*t+r,gh[1]=Ld(i)*a+e,yh[0]=Id(n)*t+r,yh[1]=Ld(n)*a+e,u(s,gh,yh),h(l,gh,yh),i=i%on,i<0&&(i=i+on),n=n%on,n<0&&(n=n+on),i>n&&!o?n+=on:i<n&&o&&(i+=on),o){var v=n;n=i,i=v}for(var c=0;c<n;c+=Math.PI/2)c>i&&(mh[0]=Id(c)*t+r,mh[1]=Ld(c)*a+e,u(s,mh,s),h(l,mh,l))}var Gt={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},sn=[],ln=[],na=[],fi=[],oa=[],sa=[],Pd=Math.min,kd=Math.max,un=Math.cos,hn=Math.sin,ka=Math.abs,Rd=Math.PI,vi=Rd*2,Ed=typeof Float32Array<"u",qs=[];function Od(r){var e=Math.round(r/Rd*1e8)/1e8;return e%2*Rd}function xh(r,e){var t=Od(r[0]);t<0&&(t+=vi);var a=t-r[0],i=r[1];i+=a,!e&&i-t>=vi?i=t+vi:e&&t-i>=vi?i=t-vi:!e&&t>i?i=t+(vi-Od(t-i)):e&&t<i&&(i=t-(vi-Od(i-t))),r[0]=t,r[1]=i}var la=function(){function r(e){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,e&&(this._saveData=!1),this._saveData&&(this.data=[])}return r.prototype.increaseVersion=function(){this._version++},r.prototype.getVersion=function(){return this._version},r.prototype.setScale=function(e,t,a){a=a||0,a>0&&(this._ux=ka(a/ih/e)||0,this._uy=ka(a/ih/t)||0)},r.prototype.setDPR=function(e){this.dpr=e},r.prototype.setContext=function(e){this._ctx=e},r.prototype.getContext=function(){return this._ctx},r.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},r.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},r.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(Gt.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},r.prototype.lineTo=function(e,t){var a=ka(e-this._xi),i=ka(t-this._yi),n=a>this._ux||i>this._uy;if(this.addData(Gt.L,e,t),this._ctx&&n&&this._ctx.lineTo(e,t),n)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var o=a*a+i*i;o>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=o)}return this},r.prototype.bezierCurveTo=function(e,t,a,i,n,o){return this._drawPendingPt(),this.addData(Gt.C,e,t,a,i,n,o),this._ctx&&this._ctx.bezierCurveTo(e,t,a,i,n,o),this._xi=n,this._yi=o,this},r.prototype.quadraticCurveTo=function(e,t,a,i){return this._drawPendingPt(),this.addData(Gt.Q,e,t,a,i),this._ctx&&this._ctx.quadraticCurveTo(e,t,a,i),this._xi=a,this._yi=i,this},r.prototype.arc=function(e,t,a,i,n,o){this._drawPendingPt(),qs[0]=i,qs[1]=n,xh(qs,o),i=qs[0],n=qs[1];var s=n-i;return this.addData(Gt.A,e,t,a,a,i,s,0,o?0:1),this._ctx&&this._ctx.arc(e,t,a,i,n,o),this._xi=un(n)*a+e,this._yi=hn(n)*a+t,this},r.prototype.arcTo=function(e,t,a,i,n){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,a,i,n),this},r.prototype.rect=function(e,t,a,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,a,i),this.addData(Gt.R,e,t,a,i),this},r.prototype.closePath=function(){this._drawPendingPt(),this.addData(Gt.Z);var e=this._ctx,t=this._x0,a=this._y0;return e&&e.closePath(),this._xi=t,this._yi=a,this},r.prototype.fill=function(e){e&&e.fill(),this.toStatic()},r.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},r.prototype.len=function(){return this._len},r.prototype.setData=function(e){if(this._saveData){var t=e.length;!(this.data&&this.data.length===t)&&Ed&&(this.data=new Float32Array(t));for(var a=0;a<t;a++)this.data[a]=e[a];this._len=t}},r.prototype.appendPath=function(e){if(this._saveData){e instanceof Array||(e=[e]);for(var t=e.length,a=0,i=this._len,n=0;n<t;n++)a+=e[n].len();var o=this.data;if(Ed&&(o instanceof Float32Array||!o)&&(this.data=new Float32Array(i+a),i>0&&o))for(var s=0;s<i;s++)this.data[s]=o[s];for(var n=0;n<t;n++)for(var l=e[n].data,s=0;s<l.length;s++)this.data[i++]=l[s];this._len=i}},r.prototype.addData=function(e,t,a,i,n,o,s,l,u){if(this._saveData){var h=this.data;this._len+arguments.length>h.length&&(this._expandData(),h=this.data);for(var f=0;f<arguments.length;f++)h[this._len++]=arguments[f]}},r.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},r.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t<this._len;t++)e[t]=this.data[t];this.data=e}},r.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var e=this.data;e instanceof Array&&(e.length=this._len,Ed&&this._len>11&&(this.data=new Float32Array(e)))}},r.prototype.getBoundingRect=function(){na[0]=na[1]=oa[0]=oa[1]=Number.MAX_VALUE,fi[0]=fi[1]=sa[0]=sa[1]=-Number.MAX_VALUE;var e=this.data,t=0,a=0,i=0,n=0,o;for(o=0;o<this._len;){var s=e[o++],l=o===1;switch(l&&(t=e[o],a=e[o+1],i=t,n=a),s){case Gt.M:t=i=e[o++],a=n=e[o++],oa[0]=i,oa[1]=n,sa[0]=i,sa[1]=n;break;case Gt.L:ux(t,a,e[o],e[o+1],oa,sa),t=e[o++],a=e[o++];break;case Gt.C:hO(t,a,e[o++],e[o++],e[o++],e[o++],e[o],e[o+1],oa,sa),t=e[o++],a=e[o++];break;case Gt.Q:fO(t,a,e[o++],e[o++],e[o],e[o+1],oa,sa),t=e[o++],a=e[o++];break;case Gt.A:var u=e[o++],h=e[o++],f=e[o++],v=e[o++],c=e[o++],d=e[o++]+c;o+=1;var p=!e[o++];l&&(i=un(c)*f+u,n=hn(c)*v+h),vO(u,h,f,v,c,d,p,oa,sa),t=un(d)*f+u,a=hn(d)*v+h;break;case Gt.R:i=t=e[o++],n=a=e[o++];var g=e[o++],y=e[o++];ux(i,n,i+g,n+y,oa,sa);break;case Gt.Z:t=i,a=n;break}ti(na,na,oa),ei(fi,fi,sa)}return o===0&&(na[0]=na[1]=fi[0]=fi[1]=0),new ht(na[0],na[1],fi[0]-na[0],fi[1]-na[1])},r.prototype._calculateLength=function(){var e=this.data,t=this._len,a=this._ux,i=this._uy,n=0,o=0,s=0,l=0;this._pathSegLen||(this._pathSegLen=[]);for(var u=this._pathSegLen,h=0,f=0,v=0;v<t;){var c=e[v++],d=v===1;d&&(n=e[v],o=e[v+1],s=n,l=o);var p=-1;switch(c){case Gt.M:n=s=e[v++],o=l=e[v++];break;case Gt.L:{var g=e[v++],y=e[v++],m=g-n,_=y-o;(ka(m)>a||ka(_)>i||v===t-1)&&(p=Math.sqrt(m*m+_*_),n=g,o=y);break}case Gt.C:{var x=e[v++],b=e[v++],g=e[v++],y=e[v++],S=e[v++],w=e[v++];p=CR(n,o,x,b,g,y,S,w,10),n=S,o=w;break}case Gt.Q:{var x=e[v++],b=e[v++],g=e[v++],y=e[v++];p=MR(n,o,x,b,g,y,10),n=g,o=y;break}case Gt.A:var T=e[v++],C=e[v++],A=e[v++],D=e[v++],I=e[v++],L=e[v++],P=L+I;v+=1,d&&(s=un(I)*A+T,l=hn(I)*D+C),p=kd(A,D)*Pd(vi,Math.abs(L)),n=un(P)*A+T,o=hn(P)*D+C;break;case Gt.R:{s=n=e[v++],l=o=e[v++];var k=e[v++],R=e[v++];p=k*2+R*2;break}case Gt.Z:{var m=s-n,_=l-o;p=Math.sqrt(m*m+_*_),n=s,o=l;break}}p>=0&&(u[f++]=p,h+=p)}return this._pathLen=h,h},r.prototype.rebuildPath=function(e,t){var a=this.data,i=this._ux,n=this._uy,o=this._len,s,l,u,h,f,v,c=t<1,d,p,g=0,y=0,m,_=0,x,b;if(!(c&&(this._pathSegLen||this._calculateLength(),d=this._pathSegLen,p=this._pathLen,m=t*p,!m)))t:for(var S=0;S<o;){var w=a[S++],T=S===1;switch(T&&(u=a[S],h=a[S+1],s=u,l=h),w!==Gt.L&&_>0&&(e.lineTo(x,b),_=0),w){case Gt.M:s=u=a[S++],l=h=a[S++],e.moveTo(u,h);break;case Gt.L:{f=a[S++],v=a[S++];var C=ka(f-u),A=ka(v-h);if(C>i||A>n){if(c){var D=d[y++];if(g+D>m){var I=(m-g)/D;e.lineTo(u*(1-I)+f*I,h*(1-I)+v*I);break t}g+=D}e.lineTo(f,v),u=f,h=v,_=0}else{var L=C*C+A*A;L>_&&(x=f,b=v,_=L)}break}case Gt.C:{var P=a[S++],k=a[S++],R=a[S++],O=a[S++],E=a[S++],N=a[S++];if(c){var D=d[y++];if(g+D>m){var I=(m-g)/D;ni(u,P,R,E,I,sn),ni(h,k,O,N,I,ln),e.bezierCurveTo(sn[1],ln[1],sn[2],ln[2],sn[3],ln[3]);break t}g+=D}e.bezierCurveTo(P,k,R,O,E,N),u=E,h=N;break}case Gt.Q:{var P=a[S++],k=a[S++],R=a[S++],O=a[S++];if(c){var D=d[y++];if(g+D>m){var I=(m-g)/D;Vs(u,P,R,I,sn),Vs(h,k,O,I,ln),e.quadraticCurveTo(sn[1],ln[1],sn[2],ln[2]);break t}g+=D}e.quadraticCurveTo(P,k,R,O),u=R,h=O;break}case Gt.A:var V=a[S++],G=a[S++],H=a[S++],Y=a[S++],q=a[S++],it=a[S++],xt=a[S++],At=!a[S++],ut=H>Y?H:Y,tt=ka(H-Y)>.001,ct=q+it,j=!1;if(c){var D=d[y++];g+D>m&&(ct=q+it*(m-g)/D,j=!0),g+=D}if(tt&&e.ellipse?e.ellipse(V,G,H,Y,xt,q,ct,At):e.arc(V,G,ut,q,ct,At),j)break t;T&&(s=un(q)*H+V,l=hn(q)*Y+G),u=un(ct)*H+V,h=hn(ct)*Y+G;break;case Gt.R:s=u=a[S],l=h=a[S+1],f=a[S++],v=a[S++];var ft=a[S++],Nt=a[S++];if(c){var D=d[y++];if(g+D>m){var wt=m-g;e.moveTo(f,v),e.lineTo(f+Pd(wt,ft),v),wt-=ft,wt>0&&e.lineTo(f+ft,v+Pd(wt,Nt)),wt-=Nt,wt>0&&e.lineTo(f+kd(ft-wt,0),v+Nt),wt-=ft,wt>0&&e.lineTo(f,v+kd(Nt-wt,0));break t}g+=D}e.rect(f,v,ft,Nt);break;case Gt.Z:if(c){var D=d[y++];if(g+D>m){var I=(m-g)/D;e.lineTo(u*(1-I)+s*I,h*(1-I)+l*I);break t}g+=D}e.closePath(),u=s,h=l}}},r.prototype.clone=function(){var e=new r,t=this.data;return e.data=t.slice?t.slice():Array.prototype.slice.call(t),e._len=this._len,e},r.prototype.canSave=function(){return!!this._saveData},r.CMD=Gt,r.initDefaultProps=function(){var e=r.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0}(),r}();function ci(r,e,t,a,i,n,o){if(i===0)return!1;var s=i,l=0,u=r;if(o>e+s&&o>a+s||o<e-s&&o<a-s||n>r+s&&n>t+s||n<r-s&&n<t-s)return!1;if(r!==t)l=(e-a)/(r-t),u=(r*a-t*e)/(r-t);else return Math.abs(n-r)<=s/2;var h=l*n-o+u,f=h*h/(l*l+1);return f<=s/2*s/2}function cO(r,e,t,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>r+f&&u>t+f&&u>i+f&&u>o+f||u<r-f&&u<t-f&&u<i-f&&u<o-f)return!1;var v=j_(r,e,t,a,i,n,o,s,u,h,null);return v<=f/2}function vx(r,e,t,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>r+u&&s>t+u&&s>i+u||s<r-u&&s<t-u&&s<i-u)return!1;var h=Q_(r,e,t,a,i,n,s,l,null);return h<=u/2}var cx=Math.PI*2;function nr(r){return r%=cx,r<0&&(r+=cx),r}var Ks=Math.PI*2;function dO(r,e,t,a,i,n,o,s,l){if(o===0)return!1;var u=o;s-=r,l-=e;var h=Math.sqrt(s*s+l*l);if(h-u>t||h+u<t)return!1;if(Math.abs(a-i)%Ks<1e-4)return!0;if(n){var f=a;a=nr(i),i=nr(f)}else a=nr(a),i=nr(i);a>i&&(i+=Ks);var v=Math.atan2(l,s);return v<0&&(v+=Ks),v>=a&&v<=i||v+Ks>=a&&v+Ks<=i}function Ra(r,e,t,a,i,n){if(n>e&&n>a||n<e&&n<a||a===e)return 0;var o=(n-e)/(a-e),s=a<e?1:-1;(o===1||o===0)&&(s=a<e?.5:-.5);var l=o*(t-r)+r;return l===i?1/0:l>i?s:0}var di=la.CMD,fn=Math.PI*2,pO=1e-4;function gO(r,e){return Math.abs(r-e)<pO}var Fe=[-1,-1,-1],xr=[-1,-1];function yO(){var r=xr[0];xr[0]=xr[1],xr[1]=r}function mO(r,e,t,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=Yu(e,a,n,s,u,Fe);if(h===0)return 0;for(var f=0,v=-1,c=void 0,d=void 0,p=0;p<h;p++){var g=Fe[p],y=g===0||g===1?.5:1,m=ge(r,t,i,o,g);m<l||(v<0&&(v=K_(e,a,n,s,xr),xr[1]<xr[0]&&v>1&&yO(),c=ge(e,a,n,s,xr[0]),v>1&&(d=ge(e,a,n,s,xr[1]))),v===2?g<xr[0]?f+=c<e?y:-y:g<xr[1]?f+=d<c?y:-y:f+=s<d?y:-y:g<xr[0]?f+=c<e?y:-y:f+=s<c?y:-y)}return f}function _O(r,e,t,a,i,n,o,s){if(s>e&&s>a&&s>n||s<e&&s<a&&s<n)return 0;var l=AR(e,a,n,s,Fe);if(l===0)return 0;var u=J_(e,a,n);if(u>=0&&u<=1){for(var h=0,f=be(e,a,n,u),v=0;v<l;v++){var c=Fe[v]===0||Fe[v]===1?.5:1,d=be(r,t,i,Fe[v]);d<o||(Fe[v]<u?h+=f<e?c:-c:h+=n<f?c:-c)}return h}else{var c=Fe[0]===0||Fe[0]===1?.5:1,d=be(r,t,i,Fe[0]);return d<o?0:n<e?c:-c}}function xO(r,e,t,a,i,n,o,s){if(s-=e,s>t||s<-t)return 0;var l=Math.sqrt(t*t-s*s);Fe[0]=-l,Fe[1]=l;var u=Math.abs(a-i);if(u<1e-4)return 0;if(u>=fn-1e-4){a=0,i=fn;var h=n?1:-1;return o>=Fe[0]+r&&o<=Fe[1]+r?h:0}if(a>i){var f=a;a=i,i=f}a<0&&(a+=fn,i+=fn);for(var v=0,c=0;c<2;c++){var d=Fe[c];if(d+r>o){var p=Math.atan2(s,d),h=n?1:-1;p<0&&(p=fn+p),(p>=a&&p<=i||p+fn>=a&&p+fn<=i)&&(p>Math.PI/2&&p<Math.PI*1.5&&(h=-h),v+=h)}}return v}function dx(r,e,t,a,i){for(var n=r.data,o=r.len(),s=0,l=0,u=0,h=0,f=0,v,c,d=0;d<o;){var p=n[d++],g=d===1;switch(p===di.M&&d>1&&(t||(s+=Ra(l,u,h,f,a,i))),g&&(l=n[d],u=n[d+1],h=l,f=u),p){case di.M:h=n[d++],f=n[d++],l=h,u=f;break;case di.L:if(t){if(ci(l,u,n[d],n[d+1],e,a,i))return!0}else s+=Ra(l,u,n[d],n[d+1],a,i)||0;l=n[d++],u=n[d++];break;case di.C:if(t){if(cO(l,u,n[d++],n[d++],n[d++],n[d++],n[d],n[d+1],e,a,i))return!0}else s+=mO(l,u,n[d++],n[d++],n[d++],n[d++],n[d],n[d+1],a,i)||0;l=n[d++],u=n[d++];break;case di.Q:if(t){if(vx(l,u,n[d++],n[d++],n[d],n[d+1],e,a,i))return!0}else s+=_O(l,u,n[d++],n[d++],n[d],n[d+1],a,i)||0;l=n[d++],u=n[d++];break;case di.A:var y=n[d++],m=n[d++],_=n[d++],x=n[d++],b=n[d++],S=n[d++];d+=1;var w=!!(1-n[d++]);v=Math.cos(b)*_+y,c=Math.sin(b)*x+m,g?(h=v,f=c):s+=Ra(l,u,v,c,a,i);var T=(a-y)*x/_+y;if(t){if(dO(y,m,x,b,b+S,w,e,T,i))return!0}else s+=xO(y,m,x,b,b+S,w,T,i);l=Math.cos(b+S)*_+y,u=Math.sin(b+S)*x+m;break;case di.R:h=l=n[d++],f=u=n[d++];var C=n[d++],A=n[d++];if(v=h+C,c=f+A,t){if(ci(h,f,v,f,e,a,i)||ci(v,f,v,c,e,a,i)||ci(v,c,h,c,e,a,i)||ci(h,c,h,f,e,a,i))return!0}else s+=Ra(v,f,v,c,a,i),s+=Ra(h,c,h,f,a,i);break;case di.Z:if(t){if(ci(l,u,h,f,e,a,i))return!0}else s+=Ra(l,u,h,f,a,i);l=h,u=f;break}}return!t&&!gO(u,f)&&(s+=Ra(l,u,h,f,a,i)||0),s!==0}function SO(r,e,t){return dx(r,0,!1,e,t)}function bO(r,e,t,a){return dx(r,e,!0,t,a)}var Sh=st({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},nn),wO={style:st({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},ph.style)},Nd=Qr.concat(["invisible","culling","z","z2","zlevel","parent"]),TO=function(r){Ut(e,r);function e(t){return r.call(this,t)||this}return e.prototype.update=function(){var t=this;r.prototype.update.call(this);var a=this.style;if(a.decal){var i=this._decalEl=this._decalEl||new e;i.buildPath===e.prototype.buildPath&&(i.buildPath=function(l){t.buildPath(l,t.shape)}),i.silent=!0;var n=i.style;for(var o in a)n[o]!==a[o]&&(n[o]=a[o]);n.fill=a.fill?a.decal:null,n.decal=null,n.shadowColor=null,a.strokeFirst&&(n.stroke=null);for(var s=0;s<Nd.length;++s)i[Nd[s]]=this[Nd[s]];i.__dirty|=ar}else this._decalEl&&(this._decalEl=null)},e.prototype.getDecalElement=function(){return this._decalEl},e.prototype._init=function(t){var a=Mt(t);this.shape=this.getDefaultShape();var i=this.getDefaultStyle();i&&this.useStyle(i);for(var n=0;n<a.length;n++){var o=a[n],s=t[o];o==="style"?this.style?F(this.style,s):this.useStyle(s):o==="shape"?F(this.shape,s):r.prototype.attrKV.call(this,o,s)}this.style||this.useStyle({})},e.prototype.getDefaultStyle=function(){return null},e.prototype.getDefaultShape=function(){return{}},e.prototype.canBeInsideText=function(){return this.hasFill()},e.prototype.getInsideTextFill=function(){var t=this.style.fill;if(t!=="none"){if($(t)){var a=Xu(t,0);return a>.5?ad:a>.2?tE:id}else if(t)return id}return ad},e.prototype.getInsideTextStroke=function(t){var a=this.style.fill;if($(a)){var i=this.__zr,n=!!(i&&i.isDarkMode()),o=Xu(t,0)<rd;if(n===o)return a}},e.prototype.buildPath=function(t,a,i){},e.prototype.pathUpdated=function(){this.__dirty&=~co},e.prototype.getUpdatedPathProxy=function(t){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,t),this.path},e.prototype.createPathProxy=function(){this.path=new la(!1)},e.prototype.hasStroke=function(){var t=this.style,a=t.stroke;return!(a==null||a==="none"||!(t.lineWidth>0))},e.prototype.hasFill=function(){var t=this.style,a=t.fill;return a!=null&&a!=="none"},e.prototype.getBoundingRect=function(){var t=this._rect,a=this.style,i=!t;if(i){var n=!1;this.path||(n=!0,this.createPathProxy());var o=this.path;(n||this.__dirty&co)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),t=o.getBoundingRect()}if(this._rect=t,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=t.clone());if(this.__dirty||i){s.copy(t);var l=a.strokeNoScale?this.getLineScale():1,u=a.lineWidth;if(!this.hasFill()){var h=this.strokeContainThreshold;u=Math.max(u,h??4)}l>1e-10&&(s.width+=u/l,s.height+=u/l,s.x-=u/l/2,s.y-=u/l/2)}return s}return t},e.prototype.contain=function(t,a){var i=this.transformCoordToLocal(t,a),n=this.getBoundingRect(),o=this.style;if(t=i[0],a=i[1],n.contain(t,a)){var s=this.path;if(this.hasStroke()){var l=o.lineWidth,u=o.strokeNoScale?this.getLineScale():1;if(u>1e-10&&(this.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),bO(s,l/u,t,a)))return!0}if(this.hasFill())return SO(s,t,a)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=co,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(t){return this.animate("shape",t)},e.prototype.updateDuringAnimation=function(t){t==="style"?this.dirtyStyle():t==="shape"?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(t,a){t==="shape"?this.setShape(a):r.prototype.attrKV.call(this,t,a)},e.prototype.setShape=function(t,a){var i=this.shape;return i||(i=this.shape={}),typeof t=="string"?i[t]=a:F(i,t),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&co)},e.prototype.createStyle=function(t){return Eu(Sh,t)},e.prototype._innerSaveToNormal=function(t){r.prototype._innerSaveToNormal.call(this,t);var a=this._normalState;t.shape&&!a.shape&&(a.shape=F({},this.shape))},e.prototype._applyStateObj=function(t,a,i,n,o,s){r.prototype._applyStateObj.call(this,t,a,i,n,o,s);var l=!(a&&n),u;if(a&&a.shape?o?n?u=a.shape:(u=F({},i.shape),F(u,a.shape)):(u=F({},n?this.shape:i.shape),F(u,a.shape)):l&&(u=i.shape),u)if(o){this.shape=F({},this.shape);for(var h={},f=Mt(u),v=0;v<f.length;v++){var c=f[v];typeof u[c]=="object"?this.shape[c]=u[c]:h[c]=u[c]}this._transitionState(t,{shape:h},s)}else this.shape=u,this.dirtyShape()},e.prototype._mergeStates=function(t){for(var a=r.prototype._mergeStates.call(this,t),i,n=0;n<t.length;n++){var o=t[n];o.shape&&(i=i||{},this._mergeStyle(i,o.shape))}return i&&(a.shape=i),a},e.prototype.getAnimationStyleProps=function(){return wO},e.prototype.isZeroArea=function(){return!1},e.extend=function(t){var a=function(n){Ut(o,n);function o(s){var l=n.call(this,s)||this;return t.init&&t.init.call(l,s),l}return o.prototype.getDefaultStyle=function(){return at(t.style)},o.prototype.getDefaultShape=function(){return at(t.shape)},o}(e);for(var i in t)typeof t[i]=="function"&&(a.prototype[i]=t[i]);return a},e.initDefaultProps=function(){var t=e.prototype;t.type="path",t.strokeContainThreshold=5,t.segmentIgnoreThreshold=0,t.subPixelOptimize=!1,t.autoBatch=!1,t.__dirty=ar|Bs|co}(),e}(_r),bt=TO,CO=st({strokeFirst:!0,font:Aa,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},Sh),Co=function(r){Ut(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.hasStroke=function(){return sx(this.style)},e.prototype.hasFill=function(){var t=this.style,a=t.fill;return a!=null&&a!=="none"},e.prototype.createStyle=function(t){return Eu(CO,t)},e.prototype.setBoundingRect=function(t){this._rect=t},e.prototype.getBoundingRect=function(){return this._rect||(this._rect=oO(this.style)),this._rect},e.initDefaultProps=function(){var t=e.prototype;t.dirtyRectTolerance=10}(),e}(_r);Co.prototype.type="tspan";var AO=st({x:0,y:0},nn),MO={style:st({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},ph.style)};function DO(r){return!!(r&&typeof r!="string"&&r.width&&r.height)}var px=function(r){Ut(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.createStyle=function(t){return Eu(AO,t)},e.prototype._getSize=function(t){var a=this.style,i=a[t];if(i!=null)return i;var n=DO(a.image)?a.image:this.__image;if(!n)return 0;var o=t==="width"?"height":"width",s=a[o];return s==null?n[t]:n[t]/n[o]*s},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return MO},e.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new ht(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},e}(_r);px.prototype.type="image";var Me=px;function LO(r,e){var t=e.x,a=e.y,i=e.width,n=e.height,o=e.r,s,l,u,h;i<0&&(t=t+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),r.moveTo(t+s,a),r.lineTo(t+i-l,a),l!==0&&r.arc(t+i-l,a+l,l,-Math.PI/2,0),r.lineTo(t+i,a+n-u),u!==0&&r.arc(t+i-u,a+n-u,u,0,Math.PI/2),r.lineTo(t+h,a+n),h!==0&&r.arc(t+h,a+n-h,h,Math.PI/2,Math.PI),r.lineTo(t,a+s),s!==0&&r.arc(t+s,a+s,s,Math.PI,Math.PI*1.5)}var Ao=Math.round;function bh(r,e,t){if(e){var a=e.x1,i=e.x2,n=e.y1,o=e.y2;r.x1=a,r.x2=i,r.y1=n,r.y2=o;var s=t&&t.lineWidth;return s&&(Ao(a*2)===Ao(i*2)&&(r.x1=r.x2=or(a,s,!0)),Ao(n*2)===Ao(o*2)&&(r.y1=r.y2=or(n,s,!0))),r}}function gx(r,e,t){if(e){var a=e.x,i=e.y,n=e.width,o=e.height;r.x=a,r.y=i,r.width=n,r.height=o;var s=t&&t.lineWidth;return s&&(r.x=or(a,s,!0),r.y=or(i,s,!0),r.width=Math.max(or(a+n,s,!1)-r.x,n===0?0:1),r.height=Math.max(or(i+o,s,!1)-r.y,o===0?0:1)),r}}function or(r,e,t){if(!e)return r;var a=Ao(r*2);return(a+Ao(e))%2===0?a/2:(a+(t?1:-1))/2}var IO=function(){function r(){this.x=0,this.y=0,this.width=0,this.height=0}return r}(),PO={},yx=function(r){Ut(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new IO},e.prototype.buildPath=function(t,a){var i,n,o,s;if(this.subPixelOptimize){var l=gx(PO,a,this.style);i=l.x,n=l.y,o=l.width,s=l.height,l.r=a.r,a=l}else i=a.x,n=a.y,o=a.width,s=a.height;a.r?LO(t,a):t.rect(i,n,o,s)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(bt);yx.prototype.type="rect";var _t=yx,mx={fill:"#000"},_x=2,ua={},kO={style:st({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},ph.style)},xx=function(r){Ut(e,r);function e(t){var a=r.call(this)||this;return a.type="text",a._children=[],a._defaultStyle=mx,a.attr(t),a}return e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){r.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t<this._children.length;t++){var a=this._children[t];a.zlevel=this.zlevel,a.z=this.z,a.z2=this.z2,a.culling=this.culling,a.cursor=this.cursor,a.invisible=this.invisible}},e.prototype.updateTransform=function(){var t=this.innerTransformable;t?(t.updateTransform(),t.transform&&(this.transform=t.transform)):r.prototype.updateTransform.call(this)},e.prototype.getLocalTransform=function(t){var a=this.innerTransformable;return a?a.getLocalTransform(t):r.prototype.getLocalTransform.call(this,t)},e.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),r.prototype.getComputedTransform.call(this)},e.prototype._updateSubTexts=function(){this._childCursor=0,OO(this.style),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},e.prototype.addSelfToZr=function(t){r.prototype.addSelfToZr.call(this,t);for(var a=0;a<this._children.length;a++)this._children[a].__zr=t},e.prototype.removeSelfFromZr=function(t){r.prototype.removeSelfFromZr.call(this,t);for(var a=0;a<this._children.length;a++)this._children[a].__zr=null},e.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var t=new ht(0,0,0,0),a=this._children,i=[],n=null,o=0;o<a.length;o++){var s=a[o],l=s.getBoundingRect(),u=s.getLocalTransform(i);u?(t.copy(l),t.applyTransform(u),n=n||t.clone(),n.union(t)):(n=n||l.clone(),n.union(l))}this._rect=n||t}return this._rect},e.prototype.setDefaultTextStyle=function(t){this._defaultStyle=t||mx},e.prototype.setTextContent=function(t){},e.prototype._mergeStyle=function(t,a){if(!a)return t;var i=a.rich,n=t.rich||i&&{};return F(t,a),i&&n?(this._mergeRich(n,i),t.rich=n):n&&(t.rich=n),t},e.prototype._mergeRich=function(t,a){for(var i=Mt(a),n=0;n<i.length;n++){var o=i[n];t[o]=t[o]||{},F(t[o],a[o])}},e.prototype.getAnimationStyleProps=function(){return kO},e.prototype._getOrCreateChild=function(t){var a=this._children[this._childCursor];return(!a||!(a instanceof t))&&(a=new t),this._children[this._childCursor++]=a,a.__zr=this.__zr,a.parent=this,a},e.prototype._updatePlainTexts=function(){var t=this.style,a=t.font||Aa,i=t.padding,n=this._defaultStyle,o=t.x||0,s=t.y||0,l=t.align||n.align||"left",u=t.verticalAlign||n.verticalAlign||"top";ix(ua,n.overflowRect,o,s,l,u),o=ua.baseX,s=ua.baseY;var h=Ix(t),f=QE(h,t,ua.outerWidth,ua.outerHeight),v=Bd(t),c=!!t.backgroundColor,d=f.outerHeight,p=f.outerWidth,g=f.lines,y=f.lineHeight;this.isTruncated=!!f.isTruncated;var m=o,_=Ji(s,f.contentHeight,u);if(v||i){var x=xo(o,p,l),b=Ji(s,d,u);v&&this._renderBackground(t,t,x,b,p,d)}_+=y/2,i&&(m=Lx(o,l,i),u==="top"?_+=i[0]:u==="bottom"&&(_-=i[2]));for(var S=0,w=!1,T=!1,C=Dx("fill"in t?t.fill:(T=!0,n.fill)),A=Mx("stroke"in t?t.stroke:!c&&(!n.autoStroke||T)?(S=_x,w=!0,n.stroke):null),D=t.textShadowBlur>0,I=0;I<g.length;I++){var L=this._getOrCreateChild(Co),P=L.createStyle();L.useStyle(P),P.text=g[I],P.x=m,P.y=_,l&&(P.textAlign=l),P.textBaseline="middle",P.opacity=t.opacity,P.strokeFirst=!0,D&&(P.shadowBlur=t.textShadowBlur||0,P.shadowColor=t.textShadowColor||"transparent",P.shadowOffsetX=t.textShadowOffsetX||0,P.shadowOffsetY=t.textShadowOffsetY||0),P.stroke=A,P.fill=C,A&&(P.lineWidth=t.lineWidth||S,P.lineDash=t.lineDash,P.lineDashOffset=t.lineDashOffset||0),P.font=a,Tx(P,t),_+=y,L.setBoundingRect(Cd(P,f.contentWidth,f.calculatedLineHeight,w?0:null))}},e.prototype._updateRichTexts=function(){var t=this.style,a=this._defaultStyle,i=t.align||a.align,n=t.verticalAlign||a.verticalAlign,o=t.x||0,s=t.y||0;ix(ua,a.overflowRect,o,s,i,n),o=ua.baseX,s=ua.baseY;var l=Ix(t),u=rO(l,t,ua.outerWidth,ua.outerHeight,i),h=u.width,f=u.outerWidth,v=u.outerHeight,c=t.padding;this.isTruncated=!!u.isTruncated;var d=xo(o,f,i),p=Ji(s,v,n),g=d,y=p;c&&(g+=c[3],y+=c[0]);var m=g+h;Bd(t)&&this._renderBackground(t,t,d,p,f,v);for(var _=!!t.backgroundColor,x=0;x<u.lines.length;x++){for(var b=u.lines[x],S=b.tokens,w=S.length,T=b.lineHeight,C=b.width,A=0,D=g,I=m,L=w-1,P=void 0;A<w&&(P=S[A],!P.align||P.align==="left");)this._placeToken(P,t,T,y,D,"left",_),C-=P.width,D+=P.width,A++;for(;L>=0&&(P=S[L],P.align==="right");)this._placeToken(P,t,T,y,I,"right",_),C-=P.width,I-=P.width,L--;for(D+=(h-(D-g)-(m-I)-C)/2;A<=L;)P=S[A],this._placeToken(P,t,T,y,D+P.width/2,"center",_),D+=P.width,A++;y+=T}},e.prototype._placeToken=function(t,a,i,n,o,s,l){var u=a.rich[t.styleName]||{};u.text=t.text;var h=t.verticalAlign,f=n+i/2;h==="top"?f=n+t.height/2:h==="bottom"&&(f=n+i-t.height/2);var v=!t.isLineHolder&&Bd(u);v&&this._renderBackground(u,a,s==="right"?o-t.width:s==="center"?o-t.width/2:o,f-t.height/2,t.width,t.height);var c=!!u.backgroundColor,d=t.textPadding;d&&(o=Lx(o,s,d),f-=t.height/2-d[0]-t.innerHeight/2);var p=this._getOrCreateChild(Co),g=p.createStyle();p.useStyle(g);var y=this._defaultStyle,m=!1,_=0,x=!1,b=Dx("fill"in u?u.fill:"fill"in a?a.fill:(m=!0,y.fill)),S=Mx("stroke"in u?u.stroke:"stroke"in a?a.stroke:!c&&!l&&(!y.autoStroke||m)?(_=_x,x=!0,y.stroke):null),w=u.textShadowBlur>0||a.textShadowBlur>0;g.text=t.text,g.x=o,g.y=f,w&&(g.shadowBlur=u.textShadowBlur||a.textShadowBlur||0,g.shadowColor=u.textShadowColor||a.textShadowColor||"transparent",g.shadowOffsetX=u.textShadowOffsetX||a.textShadowOffsetX||0,g.shadowOffsetY=u.textShadowOffsetY||a.textShadowOffsetY||0),g.textAlign=s,g.textBaseline="middle",g.font=t.font||Aa,g.opacity=er(u.opacity,a.opacity,1),Tx(g,u),S&&(g.lineWidth=er(u.lineWidth,a.lineWidth,_),g.lineDash=Q(u.lineDash,a.lineDash),g.lineDashOffset=a.lineDashOffset||0,g.stroke=S),b&&(g.fill=b),p.setBoundingRect(Cd(g,t.contentWidth,t.contentHeight,x?0:null))},e.prototype._renderBackground=function(t,a,i,n,o,s){var l=t.backgroundColor,u=t.borderWidth,h=t.borderColor,f=l&&l.image,v=l&&!f,c=t.borderRadius,d=this,p,g;if(v||t.lineHeight||u&&h){p=this._getOrCreateChild(_t),p.useStyle(p.createStyle()),p.style.fill=null;var y=p.shape;y.x=i,y.y=n,y.width=o,y.height=s,y.r=c,p.dirtyShape()}if(v){var m=p.style;m.fill=l||null,m.fillOpacity=Q(t.fillOpacity,1)}else if(f){g=this._getOrCreateChild(Me),g.onload=function(){d.dirtyStyle()};var _=g.style;_.image=l.image,_.x=i,_.y=n,_.width=o,_.height=s}if(u&&h){var m=p.style;m.lineWidth=u,m.stroke=h,m.strokeOpacity=Q(t.strokeOpacity,1),m.lineDash=t.borderDash,m.lineDashOffset=t.borderDashOffset||0,p.strokeContainThreshold=0,p.hasFill()&&p.hasStroke()&&(m.strokeFirst=!0,m.lineWidth*=2)}var x=(p||g).style;x.shadowBlur=t.shadowBlur||0,x.shadowColor=t.shadowColor||"transparent",x.shadowOffsetX=t.shadowOffsetX||0,x.shadowOffsetY=t.shadowOffsetY||0,x.opacity=er(t.opacity,a.opacity,1)},e.makeFont=function(t){var a="";return Cx(t)&&(a=[t.fontStyle,t.fontWeight,bx(t.fontSize),t.fontFamily||"sans-serif"].join(" ")),a&&cr(a)||t.textFont||t.font},e}(_r),RO={left:!0,right:1,center:1},EO={top:1,bottom:1,middle:1},Sx=["fontStyle","fontWeight","fontSize","fontFamily"];function bx(r){return typeof r=="string"&&(r.indexOf("px")!==-1||r.indexOf("rem")!==-1||r.indexOf("em")!==-1)?r:isNaN(+r)?nc+"px":r+"px"}function Tx(r,e){for(var t=0;t<Sx.length;t++){var a=Sx[t],i=e[a];i!=null&&(r[a]=i)}}function Cx(r){return r.fontSize!=null||r.fontFamily||r.fontWeight}function OO(r){return Ax(r),M(r.rich,Ax),r}function Ax(r){if(r){r.font=xx.makeFont(r);var e=r.align;e==="middle"&&(e="center"),r.align=e==null||RO[e]?e:"left";var t=r.verticalAlign;t==="center"&&(t="middle"),r.verticalAlign=t==null||EO[t]?t:"top";var a=r.padding;a&&(r.padding=ku(r.padding))}}function Mx(r,e){return r==null||e<=0||r==="transparent"||r==="none"?null:r.image||r.colorStops?"#000":r}function Dx(r){return r==null||r==="none"?null:r.image||r.colorStops?"#000":r}function Lx(r,e,t){return e==="right"?r-t[1]:e==="center"?r+t[3]/2-t[1]/2:r+t[3]}function Ix(r){var e=r.text;return e!=null&&(e+=""),e}function Bd(r){return!!(r.backgroundColor||r.lineHeight||r.borderWidth&&r.borderColor)}var Lt=xx,vt=St(),zd=function(r,e,t,a){if(a){var i=vt(a);i.dataIndex=t,i.dataType=e,i.seriesIndex=r,i.ssrType="chart",a.type==="group"&&a.traverse(function(n){var o=vt(n);o.seriesIndex=r,o.dataIndex=t,o.dataType=e,o.ssrType="chart"})}},Px=1,kx={},Rx=St(),Vd=St(),Gd=0,js=1,wh=2,He=["emphasis","blur","select"],Js=["normal","emphasis","blur","select"],Mo=10,NO=9,vn="highlight",Th="downplay",Ch="select",Fd="unselect",Ah="toggleSelect",Hd="selectchanged";function Do(r){return r!=null&&r!=="none"}function Mh(r,e,t){r.onHoverStateChange&&(r.hoverState||0)!==t&&r.onHoverStateChange(e),r.hoverState=t}function Ex(r){Mh(r,"emphasis",wh)}function Ox(r){r.hoverState===wh&&Mh(r,"normal",Gd)}function Wd(r){Mh(r,"blur",js)}function Nx(r){r.hoverState===js&&Mh(r,"normal",Gd)}function BO(r){r.selected=!0}function zO(r){r.selected=!1}function Bx(r,e,t){e(r,t)}function Ea(r,e,t){Bx(r,e,t),r.isGroup&&r.traverse(function(a){Bx(a,e,t)})}function Dh(r,e){switch(e){case"emphasis":r.hoverState=wh;break;case"normal":r.hoverState=Gd;break;case"blur":r.hoverState=js;break;case"select":r.selected=!0}}function VO(r,e,t,a){for(var i=r.style,n={},o=0;o<e.length;o++){var s=e[o],l=i[s];n[s]=l??(a&&a[s])}for(var o=0;o<r.animators.length;o++){var u=r.animators[o];u.__fromStateTransition&&u.__fromStateTransition.indexOf(t)<0&&u.targetName==="style"&&u.saveTo(n,e)}return n}function GO(r,e,t,a){var i=t&&gt(t,"select")>=0,n=!1;if(r instanceof bt){var o=Rx(r),s=i&&o.selectFill||o.normalFill,l=i&&o.selectStroke||o.normalStroke;if(Do(s)||Do(l)){a=a||{};var u=a.style||{};u.fill==="inherit"?(n=!0,a=F({},a),u=F({},u),u.fill=s):!Do(u.fill)&&Do(s)?(n=!0,a=F({},a),u=F({},u),u.fill=Hc(s)):!Do(u.stroke)&&Do(l)&&(n||(a=F({},a),u=F({},u)),u.stroke=Hc(l)),a.style=u}}if(a&&a.z2==null){n||(a=F({},a));var h=r.z2EmphasisLift;a.z2=r.z2+(h??Mo)}return a}function FO(r,e,t){if(t&&t.z2==null){t=F({},t);var a=r.z2SelectLift;t.z2=r.z2+(a??NO)}return t}function HO(r,e,t){var a=gt(r.currentStates,e)>=0,i=r.style.opacity,n=a?null:VO(r,["opacity"],e,{opacity:1});t=t||{};var o=t.style||{};return o.opacity==null&&(t=F({},t),o=F({opacity:a?i:n.opacity*.1},o),t.style=o),t}function Ud(r,e){var t=this.states[r];if(this.style){if(r==="emphasis")return GO(this,r,e,t);if(r==="blur")return HO(this,r,t);if(r==="select")return FO(this,r,t)}return t}function cn(r){r.stateProxy=Ud;var e=r.getTextContent(),t=r.getTextGuideLine();e&&(e.stateProxy=Ud),t&&(t.stateProxy=Ud)}function zx(r,e){!Wx(r,e)&&!r.__highByOuter&&Ea(r,Ex)}function Vx(r,e){!Wx(r,e)&&!r.__highByOuter&&Ea(r,Ox)}function Oa(r,e){r.__highByOuter|=1<<(e||0),Ea(r,Ex)}function Na(r,e){!(r.__highByOuter&=~(1<<(e||0)))&&Ea(r,Ox)}function Gx(r){Ea(r,Wd)}function Yd(r){Ea(r,Nx)}function Fx(r){Ea(r,BO)}function Hx(r){Ea(r,zO)}function Wx(r,e){return r.__highDownSilentOnTouch&&e.zrByTouch}function Ux(r){var e=r.getModel(),t=[],a=[];e.eachComponent(function(i,n){var o=Vd(n),s=i==="series",l=s?r.getViewOfSeriesModel(n):r.getViewOfComponentModel(n);!s&&a.push(l),o.isBlured&&(l.group.traverse(function(u){Nx(u)}),s&&t.push(n)),o.isBlured=!1}),M(a,function(i){i&&i.toggleBlurSeries&&i.toggleBlurSeries(t,!1,e)})}function Zd(r,e,t,a){var i=a.getModel();t=t||"coordinateSystem";function n(u,h){for(var f=0;f<h.length;f++){var v=u.getItemGraphicEl(h[f]);v&&Yd(v)}}if(r!=null&&!(!e||e==="none")){var o=i.getSeriesByIndex(r),s=o.coordinateSystem;s&&s.master&&(s=s.master);var l=[];i.eachSeries(function(u){var h=o===u,f=u.coordinateSystem;f&&f.master&&(f=f.master);var v=f&&s?f===s:h;if(!(t==="series"&&!h||t==="coordinateSystem"&&!v||e==="series"&&h)){var c=a.getViewOfSeriesModel(u);if(c.group.traverse(function(g){g.__highByOuter&&h&&e==="self"||Wd(g)}),ke(e))n(u.getData(),e);else if(lt(e))for(var d=Mt(e),p=0;p<d.length;p++)n(u.getData(d[p]),e[d[p]]);l.push(u),Vd(u).isBlured=!0}}),i.eachComponent(function(u,h){if(u!=="series"){var f=a.getViewOfComponentModel(h);f&&f.toggleBlurSeries&&f.toggleBlurSeries(l,!0,i)}})}}function $d(r,e,t){if(!(r==null||e==null)){var a=t.getModel().getComponent(r,e);if(a){Vd(a).isBlured=!0;var i=t.getViewOfComponentModel(a);!i||!i.focusBlurEnabled||i.group.traverse(function(n){Wd(n)})}}}function WO(r,e,t){var a=r.seriesIndex,i=r.getData(e.dataType);if(i){var n=en(i,e);n=(W(n)?n[0]:n)||0;var o=i.getItemGraphicEl(n);if(!o)for(var s=i.count(),l=0;!o&&l<s;)o=i.getItemGraphicEl(l++);if(o){var u=vt(o);Zd(a,u.focus,u.blurScope,t)}else{var h=r.get(["emphasis","focus"]),f=r.get(["emphasis","blurScope"]);h!=null&&Zd(a,h,f,t)}}}function Xd(r,e,t,a){var i={focusSelf:!1,dispatchers:null};if(r==null||r==="series"||e==null||t==null)return i;var n=a.getModel().getComponent(r,e);if(!n)return i;var o=a.getViewOfComponentModel(n);if(!o||!o.findHighDownDispatchers)return i;for(var s=o.findHighDownDispatchers(t),l,u=0;u<s.length;u++)if(vt(s[u]).focus==="self"){l=!0;break}return{focusSelf:l,dispatchers:s}}function UO(r,e,t){var a=vt(r),i=Xd(a.componentMainType,a.componentIndex,a.componentHighDownName,t),n=i.dispatchers,o=i.focusSelf;n?(o&&$d(a.componentMainType,a.componentIndex,t),M(n,function(s){return zx(s,e)})):(Zd(a.seriesIndex,a.focus,a.blurScope,t),a.focus==="self"&&$d(a.componentMainType,a.componentIndex,t),zx(r,e))}function YO(r,e,t){Ux(t);var a=vt(r),i=Xd(a.componentMainType,a.componentIndex,a.componentHighDownName,t).dispatchers;i?M(i,function(n){return Vx(n,e)}):Vx(r,e)}function ZO(r,e,t){if(Kd(e)){var a=e.dataType,i=r.getData(a),n=en(i,e);W(n)||(n=[n]),r[e.type===Ah?"toggleSelect":e.type===Ch?"select":"unselect"](n,a)}}function Yx(r){var e=r.getAllData();M(e,function(t){var a=t.data,i=t.type;a.eachItemGraphicEl(function(n,o){r.isSelected(o,i)?Fx(n):Hx(n)})})}function $O(r){var e=[];return r.eachSeries(function(t){var a=t.getAllData();M(a,function(i){i.data;var n=i.type,o=t.getSelectedDataIndices();if(o.length>0){var s={dataIndex:o,seriesIndex:t.seriesIndex};n!=null&&(s.dataType=n),e.push(s)}})}),e}function dn(r,e,t){pn(r,!0),Ea(r,cn),qd(r,e,t)}function XO(r){pn(r,!1)}function Xt(r,e,t,a){a?XO(r):dn(r,e,t)}function qd(r,e,t){var a=vt(r);e!=null?(a.focus=e,a.blurScope=t):a.focus&&(a.focus=null)}var Zx=["emphasis","blur","select"],qO={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function ve(r,e,t,a){t=t||"itemStyle";for(var i=0;i<Zx.length;i++){var n=Zx[i],o=e.getModel([n,t]),s=r.ensureState(n);s.style=a?a(o):o[qO[t]]()}}function pn(r,e){var t=e===!1,a=r;r.highDownSilentOnTouch&&(a.__highDownSilentOnTouch=r.highDownSilentOnTouch),(!t||a.__highDownDispatcher)&&(a.__highByOuter=a.__highByOuter||0,a.__highDownDispatcher=!t)}function Qs(r){return!!(r&&r.__highDownDispatcher)}function KO(r,e,t){var a=vt(r);a.componentMainType=e.mainType,a.componentIndex=e.componentIndex,a.componentHighDownName=t}function jO(r){var e=kx[r];return e==null&&Px<=32&&(e=kx[r]=Px++),e}function Kd(r){var e=r.type;return e===Ch||e===Fd||e===Ah}function $x(r){var e=r.type;return e===vn||e===Th}function JO(r){var e=Rx(r);e.normalFill=r.style.fill,e.normalStroke=r.style.stroke;var t=r.states.select||{};e.selectFill=t.style&&t.style.fill||null,e.selectStroke=t.style&&t.style.stroke||null}var Lo=la.CMD,QO=[[],[],[]],Xx=Math.sqrt,tN=Math.atan2;function qx(r,e){if(e){var t=r.data,a=r.len(),i,n,o,s,l,u,h=Lo.M,f=Lo.C,v=Lo.L,c=Lo.R,d=Lo.A,p=Lo.Q;for(o=0,s=0;o<a;){switch(i=t[o++],s=o,n=0,i){case h:n=1;break;case v:n=1;break;case f:n=3;break;case p:n=2;break;case d:var g=e[4],y=e[5],m=Xx(e[0]*e[0]+e[1]*e[1]),_=Xx(e[2]*e[2]+e[3]*e[3]),x=tN(-e[1]/_,e[0]/m);t[o]*=m,t[o++]+=g,t[o]*=_,t[o++]+=y,t[o++]*=m,t[o++]*=_,t[o++]+=x,t[o++]+=x,o+=2,s=o;break;case c:u[0]=t[o++],u[1]=t[o++],te(u,u,e),t[s++]=u[0],t[s++]=u[1],u[0]+=t[o++],u[1]+=t[o++],te(u,u,e),t[s++]=u[0],t[s++]=u[1]}for(l=0;l<n;l++){var b=QO[l];b[0]=t[o++],b[1]=t[o++],te(b,b,e),t[s++]=b[0],t[s++]=b[1]}}r.increaseVersion()}}var jd=Math.sqrt,Lh=Math.sin,Ih=Math.cos,tl=Math.PI;function Kx(r){return Math.sqrt(r[0]*r[0]+r[1]*r[1])}function Jd(r,e){return(r[0]*e[0]+r[1]*e[1])/(Kx(r)*Kx(e))}function jx(r,e){return(r[0]*e[1]<r[1]*e[0]?-1:1)*Math.acos(Jd(r,e))}function Jx(r,e,t,a,i,n,o,s,l,u,h){var f=l*(tl/180),v=Ih(f)*(r-t)/2+Lh(f)*(e-a)/2,c=-1*Lh(f)*(r-t)/2+Ih(f)*(e-a)/2,d=v*v/(o*o)+c*c/(s*s);d>1&&(o*=jd(d),s*=jd(d));var p=(i===n?-1:1)*jd((o*o*(s*s)-o*o*(c*c)-s*s*(v*v))/(o*o*(c*c)+s*s*(v*v)))||0,g=p*o*c/s,y=p*-s*v/o,m=(r+t)/2+Ih(f)*g-Lh(f)*y,_=(e+a)/2+Lh(f)*g+Ih(f)*y,x=jx([1,0],[(v-g)/o,(c-y)/s]),b=[(v-g)/o,(c-y)/s],S=[(-1*v-g)/o,(-1*c-y)/s],w=jx(b,S);if(Jd(b,S)<=-1&&(w=tl),Jd(b,S)>=1&&(w=0),w<0){var T=Math.round(w/tl*1e6)/1e6;w=tl*2+T%2*tl}h.addData(u,m,_,o,s,x,w,f,n)}var eN=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,rN=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function aN(r){var e=new la;if(!r)return e;var t=0,a=0,i=t,n=a,o,s=la.CMD,l=r.match(eN);if(!l)return e;for(var u=0;u<l.length;u++){for(var h=l[u],f=h.charAt(0),v=void 0,c=h.match(rN)||[],d=c.length,p=0;p<d;p++)c[p]=parseFloat(c[p]);for(var g=0;g<d;){var y=void 0,m=void 0,_=void 0,x=void 0,b=void 0,S=void 0,w=void 0,T=t,C=a,A=void 0,D=void 0;switch(f){case"l":t+=c[g++],a+=c[g++],v=s.L,e.addData(v,t,a);break;case"L":t=c[g++],a=c[g++],v=s.L,e.addData(v,t,a);break;case"m":t+=c[g++],a+=c[g++],v=s.M,e.addData(v,t,a),i=t,n=a,f="l";break;case"M":t=c[g++],a=c[g++],v=s.M,e.addData(v,t,a),i=t,n=a,f="L";break;case"h":t+=c[g++],v=s.L,e.addData(v,t,a);break;case"H":t=c[g++],v=s.L,e.addData(v,t,a);break;case"v":a+=c[g++],v=s.L,e.addData(v,t,a);break;case"V":a=c[g++],v=s.L,e.addData(v,t,a);break;case"C":v=s.C,e.addData(v,c[g++],c[g++],c[g++],c[g++],c[g++],c[g++]),t=c[g-2],a=c[g-1];break;case"c":v=s.C,e.addData(v,c[g++]+t,c[g++]+a,c[g++]+t,c[g++]+a,c[g++]+t,c[g++]+a),t+=c[g-2],a+=c[g-1];break;case"S":y=t,m=a,A=e.len(),D=e.data,o===s.C&&(y+=t-D[A-4],m+=a-D[A-3]),v=s.C,T=c[g++],C=c[g++],t=c[g++],a=c[g++],e.addData(v,y,m,T,C,t,a);break;case"s":y=t,m=a,A=e.len(),D=e.data,o===s.C&&(y+=t-D[A-4],m+=a-D[A-3]),v=s.C,T=t+c[g++],C=a+c[g++],t+=c[g++],a+=c[g++],e.addData(v,y,m,T,C,t,a);break;case"Q":T=c[g++],C=c[g++],t=c[g++],a=c[g++],v=s.Q,e.addData(v,T,C,t,a);break;case"q":T=c[g++]+t,C=c[g++]+a,t+=c[g++],a+=c[g++],v=s.Q,e.addData(v,T,C,t,a);break;case"T":y=t,m=a,A=e.len(),D=e.data,o===s.Q&&(y+=t-D[A-4],m+=a-D[A-3]),t=c[g++],a=c[g++],v=s.Q,e.addData(v,y,m,t,a);break;case"t":y=t,m=a,A=e.len(),D=e.data,o===s.Q&&(y+=t-D[A-4],m+=a-D[A-3]),t+=c[g++],a+=c[g++],v=s.Q,e.addData(v,y,m,t,a);break;case"A":_=c[g++],x=c[g++],b=c[g++],S=c[g++],w=c[g++],T=t,C=a,t=c[g++],a=c[g++],v=s.A,Jx(T,C,t,a,S,w,_,x,b,v,e);break;case"a":_=c[g++],x=c[g++],b=c[g++],S=c[g++],w=c[g++],T=t,C=a,t+=c[g++],a+=c[g++],v=s.A,Jx(T,C,t,a,S,w,_,x,b,v,e);break}}(f==="z"||f==="Z")&&(v=s.Z,e.addData(v),t=i,a=n),o=v}return e.toStatic(),e}var Qx=function(r){Ut(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.applyTransform=function(t){},e}(bt);function tS(r){return r.setData!=null}function eS(r,e){var t=aN(r),a=F({},e);return a.buildPath=function(i){var n=tS(i);if(n&&i.canSave()){i.appendPath(t);var o=i.getContext();o&&i.rebuildPath(o,1)}else{var o=n?i.getContext():i;o&&t.rebuildPath(o,1)}},a.applyTransform=function(i){qx(t,i),this.dirtyShape()},a}function rS(r,e){return new Qx(eS(r,e))}function iN(r,e){var t=eS(r,e),a=function(i){Ut(n,i);function n(o){var s=i.call(this,o)||this;return s.applyTransform=t.applyTransform,s.buildPath=t.buildPath,s}return n}(Qx);return a}function nN(r,e){for(var t=[],a=r.length,i=0;i<a;i++){var n=r[i];t.push(n.getUpdatedPathProxy(!0))}var o=new bt(e);return o.createPathProxy(),o.buildPath=function(s){if(tS(s)){s.appendPath(t);var l=s.getContext();l&&s.rebuildPath(l,1)}},o}function Qd(r,e){e=e||{};var t=new bt;return r.shape&&t.setShape(r.shape),t.setStyle(r.style),e.bakeTransform?qx(t.path,r.getComputedTransform()):e.toLocal?t.setLocalTransform(r.getComputedTransform()):t.copyTransform(r),t.buildPath=r.buildPath,t.applyTransform=t.applyTransform,t.z=r.z,t.z2=r.z2,t.zlevel=r.zlevel,t}var oN=function(){function r(){this.cx=0,this.cy=0,this.r=0}return r}(),aS=function(r){Ut(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new oN},e.prototype.buildPath=function(t,a){t.moveTo(a.cx+a.r,a.cy),t.arc(a.cx,a.cy,a.r,0,Math.PI*2)},e}(bt);aS.prototype.type="circle";var Sr=aS,sN=function(){function r(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return r}(),iS=function(r){Ut(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new sN},e.prototype.buildPath=function(t,a){var i=.5522848,n=a.cx,o=a.cy,s=a.rx,l=a.ry,u=s*i,h=l*i;t.moveTo(n-s,o),t.bezierCurveTo(n-s,o-h,n-u,o-l,n,o-l),t.bezierCurveTo(n+u,o-l,n+s,o-h,n+s,o),t.bezierCurveTo(n+s,o+h,n+u,o+l,n,o+l),t.bezierCurveTo(n-u,o+l,n-s,o+h,n-s,o),t.closePath()},e}(bt);iS.prototype.type="ellipse";var tp=iS,nS=Math.PI,ep=nS*2,gn=Math.sin,Io=Math.cos,lN=Math.acos,Ne=Math.atan2,oS=Math.abs,el=Math.sqrt,rl=Math.max,ha=Math.min,Br=1e-4;function uN(r,e,t,a,i,n,o,s){var l=t-r,u=a-e,h=o-i,f=s-n,v=f*l-h*u;if(!(v*v<Br))return v=(h*(e-n)-f*(r-i))/v,[r+v*l,e+v*u]}function Ph(r,e,t,a,i,n,o){var s=r-t,l=e-a,u=(o?n:-n)/el(s*s+l*l),h=u*l,f=-u*s,v=r+h,c=e+f,d=t+h,p=a+f,g=(v+d)/2,y=(c+p)/2,m=d-v,_=p-c,x=m*m+_*_,b=i-n,S=v*p-d*c,w=(_<0?-1:1)*el(rl(0,b*b*x-S*S)),T=(S*_-m*w)/x,C=(-S*m-_*w)/x,A=(S*_+m*w)/x,D=(-S*m+_*w)/x,I=T-g,L=C-y,P=A-g,k=D-y;return I*I+L*L>P*P+k*k&&(T=A,C=D),{cx:T,cy:C,x0:-h,y0:-f,x1:T*(i/b-1),y1:C*(i/b-1)}}function hN(r){var e;if(W(r)){var t=r.length;if(!t)return r;t===1?e=[r[0],r[0],0,0]:t===2?e=[r[0],r[0],r[1],r[1]]:t===3?e=r.concat(r[2]):e=r}else e=[r,r,r,r];return e}function fN(r,e){var t,a=rl(e.r,0),i=rl(e.r0||0,0),n=a>0,o=i>0;if(!(!n&&!o)){if(n||(a=i,i=0),i>a){var s=a;a=i,i=s}var l=e.startAngle,u=e.endAngle;if(!(isNaN(l)||isNaN(u))){var h=e.cx,f=e.cy,v=!!e.clockwise,c=oS(u-l),d=c>ep&&c%ep;if(d>Br&&(c=d),!(a>Br))r.moveTo(h,f);else if(c>ep-Br)r.moveTo(h+a*Io(l),f+a*gn(l)),r.arc(h,f,a,l,u,!v),i>Br&&(r.moveTo(h+i*Io(u),f+i*gn(u)),r.arc(h,f,i,u,l,v));else{var p=void 0,g=void 0,y=void 0,m=void 0,_=void 0,x=void 0,b=void 0,S=void 0,w=void 0,T=void 0,C=void 0,A=void 0,D=void 0,I=void 0,L=void 0,P=void 0,k=a*Io(l),R=a*gn(l),O=i*Io(u),E=i*gn(u),N=c>Br;if(N){var V=e.cornerRadius;V&&(t=hN(V),p=t[0],g=t[1],y=t[2],m=t[3]);var G=oS(a-i)/2;if(_=ha(G,y),x=ha(G,m),b=ha(G,p),S=ha(G,g),C=w=rl(_,x),A=T=rl(b,S),(w>Br||T>Br)&&(D=a*Io(u),I=a*gn(u),L=i*Io(l),P=i*gn(l),c<nS)){var H=uN(k,R,L,P,D,I,O,E);if(H){var Y=k-H[0],q=R-H[1],it=D-H[0],xt=I-H[1],At=1/gn(lN((Y*it+q*xt)/(el(Y*Y+q*q)*el(it*it+xt*xt)))/2),ut=el(H[0]*H[0]+H[1]*H[1]);C=ha(w,(a-ut)/(At+1)),A=ha(T,(i-ut)/(At-1))}}}if(!N)r.moveTo(h+k,f+R);else if(C>Br){var tt=ha(y,C),ct=ha(m,C),j=Ph(L,P,k,R,a,tt,v),ft=Ph(D,I,O,E,a,ct,v);r.moveTo(h+j.cx+j.x0,f+j.cy+j.y0),C<w&&tt===ct?r.arc(h+j.cx,f+j.cy,C,Ne(j.y0,j.x0),Ne(ft.y0,ft.x0),!v):(tt>0&&r.arc(h+j.cx,f+j.cy,tt,Ne(j.y0,j.x0),Ne(j.y1,j.x1),!v),r.arc(h,f,a,Ne(j.cy+j.y1,j.cx+j.x1),Ne(ft.cy+ft.y1,ft.cx+ft.x1),!v),ct>0&&r.arc(h+ft.cx,f+ft.cy,ct,Ne(ft.y1,ft.x1),Ne(ft.y0,ft.x0),!v))}else r.moveTo(h+k,f+R),r.arc(h,f,a,l,u,!v);if(!(i>Br)||!N)r.lineTo(h+O,f+E);else if(A>Br){var tt=ha(p,A),ct=ha(g,A),j=Ph(O,E,D,I,i,-ct,v),ft=Ph(k,R,L,P,i,-tt,v);r.lineTo(h+j.cx+j.x0,f+j.cy+j.y0),A<T&&tt===ct?r.arc(h+j.cx,f+j.cy,A,Ne(j.y0,j.x0),Ne(ft.y0,ft.x0),!v):(ct>0&&r.arc(h+j.cx,f+j.cy,ct,Ne(j.y0,j.x0),Ne(j.y1,j.x1),!v),r.arc(h,f,i,Ne(j.cy+j.y1,j.cx+j.x1),Ne(ft.cy+ft.y1,ft.cx+ft.x1),v),tt>0&&r.arc(h+ft.cx,f+ft.cy,tt,Ne(ft.y1,ft.x1),Ne(ft.y0,ft.x0),!v))}else r.lineTo(h+O,f+E),r.arc(h,f,i,u,l,v)}r.closePath()}}}var vN=function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return r}(),sS=function(r){Ut(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new vN},e.prototype.buildPath=function(t,a){fN(t,a)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(bt);sS.prototype.type="sector";var We=sS,cN=function(){function r(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return r}(),lS=function(r){Ut(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new cN},e.prototype.buildPath=function(t,a){var i=a.cx,n=a.cy,o=Math.PI*2;t.moveTo(i+a.r,n),t.arc(i,n,a.r,0,o,!1),t.moveTo(i+a.r0,n),t.arc(i,n,a.r0,0,o,!0)},e}(bt);lS.prototype.type="ring";var kh=lS;function dN(r,e,t,a){var i=[],n=[],o=[],s=[],l,u,h,f;if(a){h=[1/0,1/0],f=[-1/0,-1/0];for(var v=0,c=r.length;v<c;v++)ti(h,h,r[v]),ei(f,f,r[v]);ti(h,h,a[0]),ei(f,f,a[1])}for(var v=0,c=r.length;v<c;v++){var d=r[v];if(t)l=r[v?v-1:c-1],u=r[(v+1)%c];else if(v===0||v===c-1){i.push(Ma(r[v]));continue}else l=r[v-1],u=r[v+1];Wi(n,u,l),Nu(n,n,e);var p=gc(d,l),g=gc(d,u),y=p+g;y!==0&&(p/=y,g/=y),Nu(o,n,-p),Nu(s,n,g);var m=M_([],d,o),_=M_([],d,s);a&&(ei(m,m,h),ti(m,m,f),ei(_,_,h),ti(_,_,f)),i.push(m),i.push(_)}return t&&i.push(i.shift()),i}function uS(r,e,t){var a=e.smooth,i=e.points;if(i&&i.length>=2){if(a){var n=dN(i,a,t,e.smoothConstraint);r.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(t?o:o-1);s++){var l=n[s*2],u=n[s*2+1],h=i[(s+1)%o];r.bezierCurveTo(l[0],l[1],u[0],u[1],h[0],h[1])}}else{r.moveTo(i[0][0],i[0][1]);for(var s=1,f=i.length;s<f;s++)r.lineTo(i[s][0],i[s][1])}t&&r.closePath()}}var pN=function(){function r(){this.points=null,this.smooth=0,this.smoothConstraint=null}return r}(),hS=function(r){Ut(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new pN},e.prototype.buildPath=function(t,a){uS(t,a,!0)},e}(bt);hS.prototype.type="polygon";var De=hS,gN=function(){function r(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return r}(),fS=function(r){Ut(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new gN},e.prototype.buildPath=function(t,a){uS(t,a,!1)},e}(bt);fS.prototype.type="polyline";var Be=fS,yN={},mN=function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return r}(),vS=function(r){Ut(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new mN},e.prototype.buildPath=function(t,a){var i,n,o,s;if(this.subPixelOptimize){var l=bh(yN,a,this.style);i=l.x1,n=l.y1,o=l.x2,s=l.y2}else i=a.x1,n=a.y1,o=a.x2,s=a.y2;var u=a.percent;u!==0&&(t.moveTo(i,n),u<1&&(o=i*(1-u)+o*u,s=n*(1-u)+s*u),t.lineTo(o,s))},e.prototype.pointAt=function(t){var a=this.shape;return[a.x1*(1-t)+a.x2*t,a.y1*(1-t)+a.y2*t]},e}(bt);vS.prototype.type="line";var Kt=vS,Je=[],_N=function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1}return r}();function cS(r,e,t){var a=r.cpx2,i=r.cpy2;return a!=null||i!=null?[(t?q_:ge)(r.x1,r.cpx1,r.cpx2,r.x2,e),(t?q_:ge)(r.y1,r.cpy1,r.cpy2,r.y2,e)]:[(t?Ec:be)(r.x1,r.cpx1,r.x2,e),(t?Ec:be)(r.y1,r.cpy1,r.y2,e)]}var dS=function(r){Ut(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new _N},e.prototype.buildPath=function(t,a){var i=a.x1,n=a.y1,o=a.x2,s=a.y2,l=a.cpx1,u=a.cpy1,h=a.cpx2,f=a.cpy2,v=a.percent;v!==0&&(t.moveTo(i,n),h==null||f==null?(v<1&&(Vs(i,l,o,v,Je),l=Je[1],o=Je[2],Vs(n,u,s,v,Je),u=Je[1],s=Je[2]),t.quadraticCurveTo(l,u,o,s)):(v<1&&(ni(i,l,h,o,v,Je),l=Je[1],h=Je[2],o=Je[3],ni(n,u,f,s,v,Je),u=Je[1],f=Je[2],s=Je[3]),t.bezierCurveTo(l,u,h,f,o,s)))},e.prototype.pointAt=function(t){return cS(this.shape,t,!1)},e.prototype.tangentAt=function(t){var a=cS(this.shape,t,!0);return ho(a,a)},e}(bt);dS.prototype.type="bezier-curve";var Rh=dS,xN=function(){function r(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return r}(),pS=function(r){Ut(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new xN},e.prototype.buildPath=function(t,a){var i=a.cx,n=a.cy,o=Math.max(a.r,0),s=a.startAngle,l=a.endAngle,u=a.clockwise,h=Math.cos(s),f=Math.sin(s);t.moveTo(h*o+i,f*o+n),t.arc(i,n,o,s,l,!u)},e}(bt);pS.prototype.type="arc";var rp=pS,SN=function(r){Ut(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="compound",t}return e.prototype._updatePathDirty=function(){for(var t=this.shape.paths,a=this.shapeChanged(),i=0;i<t.length;i++)a=a||t[i].shapeChanged();a&&this.dirtyShape()},e.prototype.beforeBrush=function(){this._updatePathDirty();for(var t=this.shape.paths||[],a=this.getGlobalScale(),i=0;i<t.length;i++)t[i].path||t[i].createPathProxy(),t[i].path.setScale(a[0],a[1],t[i].segmentIgnoreThreshold)},e.prototype.buildPath=function(t,a){for(var i=a.paths||[],n=0;n<i.length;n++)i[n].buildPath(t,i[n].shape,!0)},e.prototype.afterBrush=function(){for(var t=this.shape.paths||[],a=0;a<t.length;a++)t[a].pathUpdated()},e.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),bt.prototype.getBoundingRect.call(this)},e}(bt),Eh=SN,gS=function(){function r(e){this.colorStops=e||[]}return r.prototype.addColorStop=function(e,t){this.colorStops.push({offset:e,color:t})},r}(),bN=function(r){Ut(e,r);function e(t,a,i,n,o,s){var l=r.call(this,o)||this;return l.x=t??0,l.y=a??0,l.x2=i??1,l.y2=n??0,l.type="linear",l.global=s||!1,l}return e}(gS),Po=bN,wN=function(r){Ut(e,r);function e(t,a,i,n,o){var s=r.call(this,n)||this;return s.x=t??.5,s.y=a??.5,s.r=i??.5,s.type="radial",s.global=o||!1,s}return e}(gS),yS=wN,ap=Math.min,TN=Math.max,Oh=Math.abs,yn=[0,0],mn=[0,0],we=O_(),Nh=we.minTv,Bh=we.maxTv,CN=function(){function r(e,t){this._corners=[],this._axes=[],this._origin=[0,0];for(var a=0;a<4;a++)this._corners[a]=new nt;for(var a=0;a<2;a++)this._axes[a]=new nt;e&&this.fromBoundingRect(e,t)}return r.prototype.fromBoundingRect=function(e,t){var a=this._corners,i=this._axes,n=e.x,o=e.y,s=n+e.width,l=o+e.height;if(a[0].set(n,o),a[1].set(s,o),a[2].set(s,l),a[3].set(n,l),t)for(var u=0;u<4;u++)a[u].transform(t);nt.sub(i[0],a[1],a[0]),nt.sub(i[1],a[3],a[0]),i[0].normalize(),i[1].normalize();for(var u=0;u<2;u++)this._origin[u]=i[u].dot(a[0])},r.prototype.intersect=function(e,t,a){var i=!0,n=!t;return t&&nt.set(t,0,0),we.reset(a,!n),!this._intersectCheckOneSide(this,e,n,1)&&(i=!1,n)||!this._intersectCheckOneSide(e,this,n,-1)&&(i=!1,n)||!n&&!we.negativeSize&&nt.copy(t,i?we.useDir?we.dirMinTv:Nh:Bh),i},r.prototype._intersectCheckOneSide=function(e,t,a,i){for(var n=!0,o=0;o<2;o++){var s=e._axes[o];if(e._getProjMinMaxOnAxis(o,e._corners,yn),e._getProjMinMaxOnAxis(o,t._corners,mn),we.negativeSize||yn[1]<mn[0]||yn[0]>mn[1]){if(n=!1,we.negativeSize||a)return n;var l=Oh(mn[0]-yn[1]),u=Oh(yn[0]-mn[1]);ap(l,u)>Bh.len()&&(l<u?nt.scale(Bh,s,-l*i):nt.scale(Bh,s,u*i))}else if(!a){var l=Oh(mn[0]-yn[1]),u=Oh(yn[0]-mn[1]);(we.useDir||ap(l,u)<Nh.len())&&((l<u||!we.bidirectional)&&(nt.scale(Nh,s,l*i),we.useDir&&we.calcDirMTV()),(l>=u||!we.bidirectional)&&(nt.scale(Nh,s,-u*i),we.useDir&&we.calcDirMTV()))}}return n},r.prototype._getProjMinMaxOnAxis=function(e,t,a){for(var i=this._axes[e],n=this._origin,o=t[0].dot(i)+n[e],s=o,l=o,u=1;u<t.length;u++){var h=t[u].dot(i)+n[e];s=ap(h,s),l=TN(h,l)}a[0]=s+we.touchThreshold,a[1]=l-we.touchThreshold,we.negativeSize=a[1]<a[0]},r}(),mS=CN,AN=[],MN=function(r){Ut(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.notClear=!0,t.incremental=!0,t._displayables=[],t._temporaryDisplayables=[],t._cursor=0,t}return e.prototype.traverse=function(t,a){t.call(a,this)},e.prototype.useStyle=function(){this.style={}},e.prototype.getCursor=function(){return this._cursor},e.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},e.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},e.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},e.prototype.addDisplayable=function(t,a){a?this._temporaryDisplayables.push(t):this._displayables.push(t),this.markRedraw()},e.prototype.addDisplayables=function(t,a){a=a||!1;for(var i=0;i<t.length;i++)this.addDisplayable(t[i],a)},e.prototype.getDisplayables=function(){return this._displayables},e.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},e.prototype.eachPendingDisplayable=function(t){for(var a=this._cursor;a<this._displayables.length;a++)t&&t(this._displayables[a]);for(var a=0;a<this._temporaryDisplayables.length;a++)t&&t(this._temporaryDisplayables[a])},e.prototype.update=function(){this.updateTransform();for(var t=this._cursor;t<this._displayables.length;t++){var a=this._displayables[t];a.parent=this,a.update(),a.parent=null}for(var t=0;t<this._temporaryDisplayables.length;t++){var a=this._temporaryDisplayables[t];a.parent=this,a.update(),a.parent=null}},e.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new ht(1/0,1/0,-1/0,-1/0),a=0;a<this._displayables.length;a++){var i=this._displayables[a],n=i.getBoundingRect().clone();i.needLocalTransform()&&n.applyTransform(i.getLocalTransform(AN)),t.union(n)}this._rect=t}return this._rect},e.prototype.contain=function(t,a){var i=this.transformCoordToLocal(t,a),n=this.getBoundingRect();if(n.contain(i[0],i[1]))for(var o=0;o<this._displayables.length;o++){var s=this._displayables[o];if(s.contain(t,a))return!0}return!1},e}(_r),DN=MN,_S=St();function ko(r,e,t,a,i){var n;if(e&&e.ecModel){var o=e.ecModel.getUpdatePayload();n=o&&o.animation}var s=e&&e.isAnimationEnabled(),l=r==="update";if(s){var u=void 0,h=void 0,f=void 0;a?(u=Q(a.duration,200),h=Q(a.easing,"cubicOut"),f=0):(u=e.getShallow(l?"animationDurationUpdate":"animationDuration"),h=e.getShallow(l?"animationEasingUpdate":"animationEasing"),f=e.getShallow(l?"animationDelayUpdate":"animationDelay")),n&&(n.duration!=null&&(u=n.duration),n.easing!=null&&(h=n.easing),n.delay!=null&&(f=n.delay)),rt(f)&&(f=f(t,i)),rt(u)&&(u=u(t));var v={duration:u||0,delay:f,easing:h};return v}else return null}function ip(r,e,t,a,i,n,o){var s=!1,l;rt(i)?(o=n,n=i,i=null):lt(i)&&(n=i.cb,o=i.during,s=i.isFrom,l=i.removeOpt,i=i.dataIndex);var u=r==="leave";u||e.stopAnimation("leave");var h=ko(r,a,i,u?l||{}:null,a&&a.getAnimationDelayParams?a.getAnimationDelayParams(e,i):null);if(h&&h.duration>0){var f=h.duration,v=h.delay,c=h.easing,d={duration:f,delay:v||0,easing:c,done:n,force:!!n||!!o,setToFinal:!u,scope:r,during:o};s?e.animateFrom(t,d):e.animateTo(t,d)}else e.stopAnimation(),!s&&e.attr(t),o&&o(1),n&&n()}function It(r,e,t,a,i,n){ip("update",r,e,t,a,i,n)}function Yt(r,e,t,a,i,n){ip("enter",r,e,t,a,i,n)}function Ro(r){if(!r.__zr)return!0;for(var e=0;e<r.animators.length;e++){var t=r.animators[e];if(t.scope==="leave")return!0}return!1}function pi(r,e,t,a,i,n){Ro(r)||ip("leave",r,e,t,a,i,n)}function xS(r,e,t,a){r.removeTextContent(),r.removeTextGuideLine(),pi(r,{style:{opacity:0}},e,t,a)}function Ba(r,e,t){function a(){r.parent&&r.parent.remove(r)}r.isGroup?r.traverse(function(i){i.isGroup||xS(i,e,t,a)}):xS(r,e,t,a)}function br(r){_S(r).oldStyle=r.style}function LN(r){return _S(r).oldStyle}var np={},dt=["x","y"],oe=["width","height"];function IN(r){return bt.extend(r)}var PN=iN;function kN(r,e){return PN(r,e)}function zr(r,e){np[r]=e}function zh(r){if(np.hasOwnProperty(r))return np[r]}function al(r,e,t,a){var i=rS(r,e);return t&&(a==="center"&&(t=bS(t,i.getBoundingRect())),wS(i,t)),i}function SS(r,e,t){var a=new Me({style:{image:r,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(i){if(t==="center"){var n={width:i.width,height:i.height};a.setStyle(bS(e,n))}}});return a}function bS(r,e){var t=e.width/e.height,a=r.height*t,i;a<=r.width?i=r.height:(a=r.width,i=a/t);var n=r.x+r.width/2,o=r.y+r.height/2;return{x:n-a/2,y:o-i/2,width:a,height:i}}var wr=nN;function wS(r,e){if(r.applyTransform){var t=r.getBoundingRect(),a=t.calculateTransform(e);r.applyTransform(a)}}function Eo(r,e){return bh(r,r,{lineWidth:e}),r}function RN(r,e){return gx(r,r,e),r}var Vh=or;function _n(r,e){for(var t=Vu([]);r&&r!==e;)qr(t,r.getLocalTransform(),t),r=r.parent;return t}function Vr(r,e,t){return e&&!ke(e)&&(e=Ia.getLocalTransform(e)),t&&(e=Rr([],e)),te([],r,e)}function Gh(r,e,t){var a=e[4]===0||e[5]===0||e[0]===0?1:ra(2*e[4]/e[0]),i=e[4]===0||e[5]===0||e[2]===0?1:ra(2*e[4]/e[2]),n=[r==="left"?-a:r==="right"?a:0,r==="top"?-i:r==="bottom"?i:0];return n=Vr(n,e,t),ra(n[0])>ra(n[1])?n[0]>0?"right":"left":n[1]>0?"bottom":"top"}function TS(r){return!r.isGroup}function EN(r){return r.shape!=null}function il(r,e,t){if(!r||!e)return;function a(o){var s={};return o.traverse(function(l){TS(l)&&l.anid&&(s[l.anid]=l)}),s}function i(o){var s={x:o.x,y:o.y,rotation:o.rotation};return EN(o)&&(s.shape=at(o.shape)),s}var n=a(r);e.traverse(function(o){if(TS(o)&&o.anid){var s=n[o.anid];if(s){var l=i(o);o.attr(i(s)),It(o,l,t,vt(o).dataIndex)}}})}function CS(r,e){return U(r,function(t){var a=t[0];a=ee(a,e.x),a=ir(a,e.x+e.width);var i=t[1];return i=ee(i,e.y),i=ir(i,e.y+e.height),[a,i]})}function ON(r,e){var t=ee(r.x,e.x),a=ir(r.x+r.width,e.x+e.width),i=ee(r.y,e.y),n=ir(r.y+r.height,e.y+e.height);if(a>=t&&n>=i)return{x:t,y:i,width:a-t,height:n-i}}function nl(r,e,t){var a=F({rectHover:!0},e),i=a.style={strokeNoScale:!0};if(t=t||{x:-1,y:-1,width:2,height:2},r)return r.indexOf("image://")===0?(i.image=r.slice(8),st(i,t),new Me(a)):al(r.replace("path://",""),a,t,"center")}function ol(r,e,t,a,i){for(var n=0,o=i[i.length-1];n<i.length;n++){var s=i[n];if(AS(r,e,t,a,s[0],s[1],o[0],o[1]))return!0;o=s}}function AS(r,e,t,a,i,n,o,s){var l=t-r,u=a-e,h=o-i,f=s-n,v=op(h,f,l,u);if(NN(v))return!1;var c=r-i,d=e-n,p=op(c,d,l,u)/v;if(p<0||p>1)return!1;var g=op(c,d,h,f)/v;return!(g<0||g>1)}function op(r,e,t,a){return r*a-t*e}function NN(r){return r<=1e-6&&r>=-1e-6}function xn(r,e,t,a,i){return e==null||(Dt(e)?jt[0]=jt[1]=jt[2]=jt[3]=e:(jt[0]=e[0],jt[1]=e[1],jt[2]=e[2],jt[3]=e[3]),a&&(jt[0]=ee(0,jt[0]),jt[1]=ee(0,jt[1]),jt[2]=ee(0,jt[2]),jt[3]=ee(0,jt[3])),t&&(jt[0]=-jt[0],jt[1]=-jt[1],jt[2]=-jt[2],jt[3]=-jt[3]),MS(r,jt,"x","width",3,1,i&&i[0]||0),MS(r,jt,"y","height",0,2,i&&i[1]||0)),r}var jt=[0,0,0,0];function MS(r,e,t,a,i,n,o){var s=e[n]+e[i],l=r[a];r[a]+=s,o=ee(0,ir(o,l)),r[a]<o?(r[a]=o,r[t]+=e[i]>=0?-e[i]:e[n]>=0?l+e[n]:ra(s)>1e-8?(l-o)*e[i]/s:0):r[t]-=e[i]}function za(r){var e=r.itemTooltipOption,t=r.componentModel,a=r.itemName,i=$(e)?{formatter:e}:e,n=t.mainType,o=t.componentIndex,s={componentType:n,name:a,$vars:["name"]};s[n+"Index"]=o;var l=r.formatterParamsExtra;l&&M(Mt(l),function(h){K(s,h)||(s[h]=l[h],s.$vars.push(h))});var u=vt(r.el);u.componentMainType=n,u.componentIndex=o,u.tooltipConfig={name:a,option:st({content:a,encodeHTMLContent:!0,formatterParams:s},i)}}function sp(r,e){var t;r.isGroup&&(t=e(r)),t||r.traverse(e)}function gi(r,e){if(r)if(W(r))for(var t=0;t<r.length;t++)sp(r[t],e);else sp(r,e)}function lp(r){return!r||ra(r[1])<Fh&&ra(r[2])<Fh||ra(r[0])<Fh&&ra(r[3])<Fh}var Fh=1e-5;function sl(r,e){return r?ht.copy(r,e):e.clone()}function up(r,e){return e?Gu(r||Se(),e):void 0}function Sn(r){return{z:r.get("z")||0,zlevel:r.get("zlevel")||0}}function DS(r){var e=-1/0,t=1/0;sp(r,function(n){a(n),a(n.getTextContent()),a(n.getTextGuideLine())});function a(n){if(!(!n||n.isGroup)){var o=n.currentStates;if(o.length)for(var s=0;s<o.length;s++)i(n.states[o[s]]);i(n)}}function i(n){if(n){var o=n.z2;o>e&&(e=o),o<t&&(t=o)}}return t>e&&(t=e=0),{min:t,max:e}}function Hh(r,e,t){LS(r,e,t,-1/0)}function LS(r,e,t,a){if(r.ignoreModelZ)return a;var i=r.getTextContent(),n=r.getTextGuideLine(),o=r.isGroup;if(o)for(var s=r.childrenRef(),l=0;l<s.length;l++)a=ee(LS(s[l],e,t,a),a);else r.z=e,r.zlevel=t,a=ee(r.z2||0,a);if(i&&(i.z=e,i.zlevel=t,isFinite(a)&&(i.z2=a+2)),n){var u=r.textGuideLineConfig;n.z=e,n.zlevel=t,isFinite(a)&&(n.z2=a+(u&&u.showAbove?1:-1))}return a}zr("circle",Sr),zr("ellipse",tp),zr("sector",We),zr("ring",kh),zr("polygon",De),zr("polyline",Be),zr("rect",_t),zr("line",Kt),zr("bezierCurve",Rh),zr("arc",rp);var bn=Object.freeze({__proto__:null,Arc:rp,BezierCurve:Rh,BoundingRect:ht,Circle:Sr,CompoundPath:Eh,Ellipse:tp,Group:et,Image:Me,IncrementalDisplayable:DN,Line:Kt,LinearGradient:Po,OrientedBoundingRect:mS,Path:bt,Point:nt,Polygon:De,Polyline:Be,RadialGradient:yS,Rect:_t,Ring:kh,Sector:We,Text:Lt,WH:oe,XY:dt,applyTransform:Vr,calcZ2Range:DS,clipPointsByRect:CS,clipRectByRect:ON,createIcon:nl,ensureCopyRect:sl,ensureCopyTransform:up,expandOrShrinkRect:xn,extendPath:kN,extendShape:IN,getShapeClass:zh,getTransform:_n,groupTransition:il,initProps:Yt,isBoundingRectAxisAligned:lp,isElementRemoved:Ro,lineLineIntersect:AS,linePolygonIntersect:ol,makeImage:SS,makePath:al,mergePath:wr,registerShape:zr,removeElement:pi,removeElementWithFadeOut:Ba,resizePath:wS,retrieveZInfo:Sn,setTooltipConfig:za,subPixelOptimize:Vh,subPixelOptimizeLine:Eo,subPixelOptimizeRect:RN,transformDirection:Gh,traverseElements:gi,traverseUpdateZ:Hh,updateProps:It}),Wh={};function IS(r,e){for(var t=0;t<He.length;t++){var a=He[t],i=e[a],n=r.ensureState(a);n.style=n.style||{},n.style.text=i}var o=r.currentStates.slice();r.clearStates(!0),r.setStyle({text:e.normal}),r.useStates(o,!0)}function hp(r,e,t){var a=r.labelFetcher,i=r.labelDataIndex,n=r.labelDimIndex,o=e.normal,s;a&&(s=a.getFormattedLabel(i,"normal",null,n,o&&o.get("formatter"),t!=null?{interpolatedValue:t}:null)),s==null&&(s=rt(r.defaultText)?r.defaultText(i,r,t):r.defaultText);for(var l={normal:s},u=0;u<He.length;u++){var h=He[u],f=e[h];l[h]=Q(a?a.getFormattedLabel(i,h,null,n,f&&f.get("formatter")):null,s)}return l}function ye(r,e,t,a){t=t||Wh;for(var i=r instanceof Lt,n=!1,o=0;o<Js.length;o++){var s=e[Js[o]];if(s&&s.getShallow("show")){n=!0;break}}var l=i?r:r.getTextContent();if(n){i||(l||(l=new Lt,r.setTextContent(l)),r.stateProxy&&(l.stateProxy=r.stateProxy));var u=hp(t,e),h=e.normal,f=!!h.getShallow("show"),v=Ft(h,a&&a.normal,t,!1,!i);v.text=u.normal,i||r.setTextConfig(Uh(h,t,!1));for(var o=0;o<He.length;o++){var c=He[o],s=e[c];if(s){var d=l.ensureState(c),p=!!Q(s.getShallow("show"),f);if(p!==f&&(d.ignore=!p),d.style=Ft(s,a&&a[c],t,!0,!i),d.style.text=u[c],!i){var g=r.ensureState(c);g.textConfig=Uh(s,t,!0)}}}l.silent=!!h.getShallow("silent"),l.style.x!=null&&(v.x=l.style.x),l.style.y!=null&&(v.y=l.style.y),l.ignore=!f,l.useStyle(v),l.dirty(),t.enableTextSetter&&(Oo(l).setLabelText=function(y){var m=hp(t,e,y);IS(l,m)})}else l&&(l.ignore=!0);r.dirty()}function ce(r,e){e=e||"label";for(var t={normal:r.getModel(e)},a=0;a<He.length;a++){var i=He[a];t[i]=r.getModel([i,e])}return t}function Ft(r,e,t,a,i){var n={};return BN(n,r,t,a,i),e&&F(n,e),n}function Uh(r,e,t){e=e||{};var a={},i,n=r.getShallow("rotate"),o=Q(r.getShallow("distance"),t?null:5),s=r.getShallow("offset");return i=r.getShallow("position")||(t?null:"inside"),i==="outside"&&(i=e.defaultOutsidePosition||"top"),i!=null&&(a.position=i),s!=null&&(a.offset=s),n!=null&&(n*=Math.PI/180,a.rotation=n),o!=null&&(a.distance=o),a.outsideFill=r.get("color")==="inherit"?e.inheritColor||null:"auto",e.autoOverflowArea!=null&&(a.autoOverflowArea=e.autoOverflowArea),e.layoutRect!=null&&(a.layoutRect=e.layoutRect),a}function BN(r,e,t,a,i){t=t||Wh;var n=e.ecModel,o=n&&n.option.textStyle,s=zN(e),l;if(s){l={};var u="richInheritPlainLabel",h=Q(e.get(u),n?n.get(u):void 0);for(var f in s)if(s.hasOwnProperty(f)){var v=e.getModel(["rich",f]);ES(l[f]={},v,o,e,h,t,a,i,!1,!0)}}l&&(r.rich=l);var c=e.get("overflow");c&&(r.overflow=c);var d=e.get("lineOverflow");d&&(r.lineOverflow=d);var p=r,g=e.get("minMargin");if(g!=null)g=Dt(g)?g/2:0,p.margin=[g,g,g,g],p.__marginType=No.minMargin;else{var y=e.get("textMargin");y!=null&&(p.margin=ku(y),p.__marginType=No.textMargin)}ES(r,e,o,null,null,t,a,i,!0,!1)}function zN(r){for(var e;r&&r!==r.ecModel;){var t=(r.option||Wh).rich;if(t){e=e||{};for(var a=Mt(t),i=0;i<a.length;i++){var n=a[i];e[n]=1}}r=r.parentModel}return e}var PS=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],kS=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],RS=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function ES(r,e,t,a,i,n,o,s,l,u){t=!o&&t||Wh;var h=n&&n.inheritColor,f=e.getShallow("color"),v=e.getShallow("textBorderColor"),c=Q(e.getShallow("opacity"),t.opacity);(f==="inherit"||f==="auto")&&(h?f=h:f=null),(v==="inherit"||v==="auto")&&(h?v=h:v=null),s||(f=f||t.color,v=v||t.textBorderColor),f!=null&&(r.fill=f),v!=null&&(r.stroke=v);var d=Q(e.getShallow("textBorderWidth"),t.textBorderWidth);d!=null&&(r.lineWidth=d);var p=Q(e.getShallow("textBorderType"),t.textBorderType);p!=null&&(r.lineDash=p);var g=Q(e.getShallow("textBorderDashOffset"),t.textBorderDashOffset);g!=null&&(r.lineDashOffset=g),!o&&c==null&&!u&&(c=n&&n.defaultOpacity),c!=null&&(r.opacity=c),!o&&!s&&r.fill==null&&n.inheritColor&&(r.fill=n.inheritColor);for(var y=0;y<PS.length;y++){var m=PS[y],_=i!==!1&&a?er(e.getShallow(m),a.getShallow(m),t[m]):Q(e.getShallow(m),t[m]);_!=null&&(r[m]=_)}for(var y=0;y<kS.length;y++){var m=kS[y],_=e.getShallow(m);_!=null&&(r[m]=_)}if(r.verticalAlign==null){var x=e.getShallow("baseline");x!=null&&(r.verticalAlign=x)}if(!l||!n.disableBox){for(var y=0;y<RS.length;y++){var m=RS[y],_=e.getShallow(m);_!=null&&(r[m]=_)}var b=e.getShallow("borderType");b!=null&&(r.borderDash=b),(r.backgroundColor==="auto"||r.backgroundColor==="inherit")&&h&&(r.backgroundColor=h),(r.borderColor==="auto"||r.borderColor==="inherit")&&h&&(r.borderColor=h)}}function fp(r,e){var t=e&&e.getModel("textStyle");return cr([r.fontStyle||t&&t.getShallow("fontStyle")||"",r.fontWeight||t&&t.getShallow("fontWeight")||"",(r.fontSize||t&&t.getShallow("fontSize")||12)+"px",r.fontFamily||t&&t.getShallow("fontFamily")||"sans-serif"].join(" "))}var Oo=St();function OS(r,e,t,a){if(r){var i=Oo(r);i.prevValue=i.value,i.value=t;var n=e.normal;i.valueAnimation=n.get("valueAnimation"),i.valueAnimation&&(i.precision=n.get("precision"),i.defaultInterpolatedText=a,i.statesModels=e)}}function NS(r,e,t,a,i){var n=Oo(r);if(!n.valueAnimation||n.prevValue===n.value)return;var o=n.defaultInterpolatedText,s=Q(n.interpolatedValue,n.prevValue),l=n.value;function u(h){var f=K1(t,n.precision,s,l,h);n.interpolatedValue=h===1?null:f;var v=hp({labelDataIndex:e,labelFetcher:i,defaultText:o?o(f):f+""},n.statesModels,f);IS(r,v)}r.percent=0,(n.prevValue==null?Yt:It)(r,{percent:1},a,e,null,u)}var No={minMargin:1,textMargin:2},VN=["textStyle","color"],vp=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],cp=new Lt,GN=function(){function r(){}return r.prototype.getTextColor=function(e){var t=this.ecModel;return this.getShallow("color")||(!e&&t?t.get(VN):null)},r.prototype.getFont=function(){return fp({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},r.prototype.getTextRect=function(e){for(var t={text:e,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},a=0;a<vp.length;a++)t[vp[a]]=this.getShallow(vp[a]);return cp.useStyle(t),cp.update(),cp.getBoundingRect()},r}(),BS=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],FN=an(BS),HN=function(){function r(){}return r.prototype.getLineStyle=function(e){return FN(this,e)},r}(),zS=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],WN=an(zS),UN=function(){function r(){}return r.prototype.getItemStyle=function(e,t){return WN(this,e,t)},r}(),Ct=function(){function r(e,t,a){this.parentModel=t,this.ecModel=a,this.option=e}return r.prototype.init=function(e,t,a){},r.prototype.mergeOption=function(e,t){yt(this.option,e,!0)},r.prototype.get=function(e,t){return e==null?this.option:this._doGet(this.parsePath(e),!t&&this.parentModel)},r.prototype.getShallow=function(e,t){var a=this.option,i=a==null?a:a[e];if(i==null&&!t){var n=this.parentModel;n&&(i=n.getShallow(e))}return i},r.prototype.getModel=function(e,t){var a=e!=null,i=a?this.parsePath(e):null,n=a?this._doGet(i):this.option;return t=t||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(i)),new r(n,t,this.ecModel)},r.prototype.isEmpty=function(){return this.option==null},r.prototype.restoreData=function(){},r.prototype.clone=function(){var e=this.constructor;return new e(at(this.option))},r.prototype.parsePath=function(e){return typeof e=="string"?e.split("."):e},r.prototype.resolveParentPath=function(e){return e},r.prototype.isAnimationEnabled=function(){if(!Pt.node&&this.option){if(this.option.animation!=null)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},r.prototype._doGet=function(e,t){var a=this.option;if(!e)return a;for(var i=0;i<e.length&&!(e[i]&&(a=a&&typeof a=="object"?a[e[i]]:null,a==null));i++);return a==null&&t&&(a=t._doGet(this.resolveParentPath(e),t.parentModel)),a},r}();_d(Ct),UE(Ct),ie(Ct,HN),ie(Ct,UN),ie(Ct,qE),ie(Ct,GN);var YN=Math.round(Math.random()*10);function Bo(r){return[r||"",YN++].join("_")}function ZN(r){var e={};r.registerSubTypeDefaulter=function(t,a){var i=ia(t);e[i.main]=a},r.determineSubType=function(t,a){var i=a.type;if(!i){var n=ia(t).main;r.hasSubTypes(t)&&e[n]&&(i=e[n](a))}return i}}function $N(r,e){r.topologicalTravel=function(n,o,s,l){if(!n.length)return;var u=t(o),h=u.graph,f=u.noEntryList,v={};for(M(n,function(m){v[m]=!0});f.length;){var c=f.pop(),d=h[c],p=!!v[c];p&&(s.call(l,c,d.originalDeps.slice()),delete v[c]),M(d.successor,p?y:g)}M(v,function(){var m="";throw new Error(m)});function g(m){h[m].entryCount--,h[m].entryCount===0&&f.push(m)}function y(m){v[m]=!0,g(m)}};function t(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(v){gt(u.predecessor,v)<0&&u.predecessor.push(v);var c=a(o,v);gt(c.successor,v)<0&&c.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){gt(o,l)>=0&&s.push(l)}),s}}function yi(r,e){return yt(yt({},r,!0),e,!0)}var XN={time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}},qN={time:{month:["\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"],monthAbbr:["1\u6708","2\u6708","3\u6708","4\u6708","5\u6708","6\u6708","7\u6708","8\u6708","9\u6708","10\u6708","11\u6708","12\u6708"],dayOfWeek:["\u661F\u671F\u65E5","\u661F\u671F\u4E00","\u661F\u671F\u4E8C","\u661F\u671F\u4E09","\u661F\u671F\u56DB","\u661F\u671F\u4E94","\u661F\u671F\u516D"],dayOfWeekAbbr:["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"]},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",custom:"\u81EA\u5B9A\u4E49\u56FE\u8868",chart:"\u56FE\u8868"}},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:""}}}},Yh="ZH",dp="EN",zo=dp,Zh={},pp={},VS=Pt.domSupported?function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage||zo).toUpperCase();return r.indexOf(Yh)>-1?Yh:zo}():zo;function GS(r,e){r=r.toUpperCase(),pp[r]=new Ct(e),Zh[r]=e}function KN(r){if($(r)){var e=Zh[r.toUpperCase()]||{};return r===Yh||r===dp?at(e):yt(at(e),at(Zh[zo]),!1)}else return yt(at(r),at(Zh[zo]),!1)}function gp(r){return pp[r]}function jN(){return pp[zo]}GS(dp,XN),GS(Yh,qN);var yp=null;function JN(r){yp||(yp=r)}function se(){return yp}var mp=1e3,_p=mp*60,ll=_p*60,Tr=ll*24,FS=Tr*365,QN={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},$h={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}"},tB="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}",Xh="{yyyy}-{MM}-{dd}",HS={year:"{yyyy}",month:"{yyyy}-{MM}",day:Xh,hour:Xh+" "+$h.hour,minute:Xh+" "+$h.minute,second:Xh+" "+$h.second,millisecond:tB},sr=["year","month","day","hour","minute","second","millisecond"],eB=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function rB(r){return!$(r)&&!rt(r)?aB(r):r}function aB(r){r=r||{};var e={},t=!0;return M(sr,function(a){t&&(t=r[a]==null)}),M(sr,function(a,i){var n=r[a];e[a]={};for(var o=null,s=i;s>=0;s--){var l=sr[s],u=lt(n)&&!W(n)?n[l]:n,h=void 0;W(u)?(h=u.slice(),o=h[0]||""):$(u)?(o=u,h=[o]):(o==null?o=$h[a]:QN[l].test(o)||(o=e[l][l][0]+" "+o),h=[o],t&&(h[1]="{primary|"+o+"}")),e[a][l]=h}}),e}function mi(r,e){return r+="","0000".substr(0,e-r.length)+r}function ul(r){switch(r){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return r}}function iB(r){return r===ul(r)}function nB(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function qh(r,e,t,a){var i=Qi(r),n=i[WS(t)](),o=i[Sp(t)]()+1,s=Math.floor((o-1)/3)+1,l=i[bp(t)](),u=i["get"+(t?"UTC":"")+"Day"](),h=i[wp(t)](),f=(h-1)%12+1,v=i[Tp(t)](),c=i[Cp(t)](),d=i[Ap(t)](),p=h>=12?"pm":"am",g=p.toUpperCase(),y=a instanceof Ct?a:gp(a||VS)||jN(),m=y.getModel("time"),_=m.get("month"),x=m.get("monthAbbr"),b=m.get("dayOfWeek"),S=m.get("dayOfWeekAbbr");return(e||"").replace(/{a}/g,p+"").replace(/{A}/g,g+"").replace(/{yyyy}/g,n+"").replace(/{yy}/g,mi(n%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,_[o-1]).replace(/{MMM}/g,x[o-1]).replace(/{MM}/g,mi(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,mi(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,b[u]).replace(/{ee}/g,S[u]).replace(/{e}/g,u+"").replace(/{HH}/g,mi(h,2)).replace(/{H}/g,h+"").replace(/{hh}/g,mi(f+"",2)).replace(/{h}/g,f+"").replace(/{mm}/g,mi(v,2)).replace(/{m}/g,v+"").replace(/{ss}/g,mi(c,2)).replace(/{s}/g,c+"").replace(/{SSS}/g,mi(d,3)).replace(/{S}/g,d+"")}function oB(r,e,t,a,i){var n=null;if($(t))n=t;else if(rt(t)){var o={time:r.time,level:r.time.level},s=se();s&&s.makeAxisLabelFormatterParamBreak(o,r.break),n=t(r.value,e,o)}else{var l=r.time;if(l){var u=t[l.lowerTimeUnit][l.upperTimeUnit];n=u[Math.min(l.level,u.length-1)]||""}else{var h=Vo(r.value,i);n=t[h][h][0]}}return qh(new Date(r.value),n,i,a)}function Vo(r,e){var t=Qi(r),a=t[Sp(e)]()+1,i=t[bp(e)](),n=t[wp(e)](),o=t[Tp(e)](),s=t[Cp(e)](),l=t[Ap(e)](),u=l===0,h=u&&s===0,f=h&&o===0,v=f&&n===0,c=v&&i===1,d=c&&a===1;return d?"year":c?"month":v?"day":f?"hour":h?"minute":u?"second":"millisecond"}function xp(r,e,t){switch(e){case"year":r[US(t)](0);case"month":r[YS(t)](1);case"day":r[ZS(t)](0);case"hour":r[$S(t)](0);case"minute":r[XS(t)](0);case"second":r[qS(t)](0)}return r}function WS(r){return r?"getUTCFullYear":"getFullYear"}function Sp(r){return r?"getUTCMonth":"getMonth"}function bp(r){return r?"getUTCDate":"getDate"}function wp(r){return r?"getUTCHours":"getHours"}function Tp(r){return r?"getUTCMinutes":"getMinutes"}function Cp(r){return r?"getUTCSeconds":"getSeconds"}function Ap(r){return r?"getUTCMilliseconds":"getMilliseconds"}function sB(r){return r?"setUTCFullYear":"setFullYear"}function US(r){return r?"setUTCMonth":"setMonth"}function YS(r){return r?"setUTCDate":"setDate"}function ZS(r){return r?"setUTCHours":"setHours"}function $S(r){return r?"setUTCMinutes":"setMinutes"}function XS(r){return r?"setUTCSeconds":"setSeconds"}function qS(r){return r?"setUTCMilliseconds":"setMilliseconds"}function KS(r){if(!N1(r))return $(r)?r:"-";var e=(r+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function jS(r,e){return r=(r||"").toLowerCase().replace(/-(.)/g,function(t,a){return a.toUpperCase()}),e&&r&&(r=r.charAt(0).toUpperCase()+r.slice(1)),r}var hl=ku;function Mp(r,e,t){var a="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function i(h){return h&&cr(h)?h:"-"}function n(h){return!!(h!=null&&!isNaN(h)&&isFinite(h))}var o=e==="time",s=r instanceof Date;if(o||s){var l=o?Qi(r):r;if(isNaN(+l)){if(s)return"-"}else return qh(l,a,t)}if(e==="ordinal")return hc(r)?i(r):Dt(r)&&n(r)?r+"":"-";var u=Pa(r);return n(u)?KS(u):hc(r)?i(r):typeof r=="boolean"?r+"":"-"}var JS=["a","b","c","d","e","f","g"],Dp=function(r,e){return"{"+r+(e??"")+"}"};function QS(r,e,t){W(e)||(e=[e]);var a=e.length;if(!a)return"";for(var i=e[0].$vars||[],n=0;n<i.length;n++){var o=JS[n];r=r.replace(Dp(o),Dp(o,0))}for(var s=0;s<a;s++)for(var l=0;l<i.length;l++){var u=e[s][i[l]];r=r.replace(Dp(JS[l],s),t?Oe(u):u)}return r}function lB(r,e,t){return M(e,function(a,i){r=r.replace("{"+i+"}",t?Oe(a):a)}),r}function uB(r,e){var t=$(r)?{color:r,extraCssText:e}:r||{},a=t.color,i=t.type;e=t.extraCssText;var n=t.renderMode||"html";if(!a)return"";if(n==="html")return i==="subItem"?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+Oe(a)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+Oe(a)+";"+(e||"")+'"></span>';var o=t.markerId||"markerX";return{renderMode:n,content:"{"+o+"|} ",style:i==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:a}:{width:10,height:10,borderRadius:5,backgroundColor:a}}}function wn(r,e){return e=e||"transparent",$(r)?r:lt(r)&&r.colorStops&&(r.colorStops[0]||{}).color||e}function Kh(r,e){if(e==="_blank"||e==="blank"){var t=window.open();t.opener=null,t.location.href=r}else window.open(r,e)}var jh={},Lp={},fl=function(){function r(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return r.prototype.create=function(e,t){this._nonSeriesBoxMasterList=a(jh),this._normalMasterList=a(Lp);function a(i,n){var o=[];return M(i,function(s,l){var u=s.create(e,t);o=o.concat(u||[])}),o}},r.prototype.update=function(e,t){M(this._normalMasterList,function(a){a.update&&a.update(e,t)})},r.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},r.register=function(e,t){if(e==="matrix"||e==="calendar"){jh[e]=t;return}Lp[e]=t},r.get=function(e){return Lp[e]||jh[e]},r}();function hB(r){return!!jh[r]}var Ip={coord:1,coord2:2};function fB(r){tb.set(r.fullType,{getCoord2:void 0}).getCoord2=r.getCoord2}var tb=J();function vB(r){var e=r.getShallow("coord",!0),t=Ip.coord;if(e==null){var a=tb.get(r.type);a&&a.getCoord2&&(t=Ip.coord2,e=a.getCoord2(r))}return{coord:e,from:t}}var fa={none:0,dataCoordSys:1,boxCoordSys:2};function eb(r,e){var t=r.getShallow("coordinateSystem"),a=r.getShallow("coordinateSystemUsage",!0),i=fa.none;if(t){var n=r.mainType==="series";a==null&&(a=n?"data":"box"),a==="data"?(i=fa.dataCoordSys,n||(i=fa.none)):a==="box"&&(i=fa.boxCoordSys,!n&&!hB(t)&&(i=fa.none))}return{coordSysType:t,kind:i}}function vl(r){var e=r.targetModel,t=r.coordSysType,a=r.coordSysProvider,i=r.isDefaultDataCoordSys;r.allowNotFound;var n=eb(e),o=n.kind,s=n.coordSysType;if(i&&o!==fa.dataCoordSys&&(o=fa.dataCoordSys,s=t),o===fa.none||s!==t)return!1;var l=a(t,e);return l?(o===fa.dataCoordSys?e.coordinateSystem=l:e.boxCoordinateSystem=l,!0):!1}var rb=function(r,e){var t=e.getReferringComponents(r,Jt).models[0];return t&&t.coordinateSystem},Jh=M,ab=["left","right","top","bottom","width","height"],Tn=[["width","left","right"],["height","top","bottom"]];function Pp(r,e,t,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.getBoundingRect(),f=e.childAt(u+1),v=f&&f.getBoundingRect(),c,d;if(r==="horizontal"){var p=h.width+(v?-v.x+h.x:0);c=n+p,c>a||l.newline?(n=0,c=p,o+=s+t,s=h.height):s=Math.max(s,h.height)}else{var g=h.height+(v?-v.y+h.y:0);d=o+g,d>i||l.newline?(n+=s+t,o=0,d=g,s=h.width):s=Math.max(s,h.width)}l.newline||(l.x=n,l.y=o,l.markRedraw(),r==="horizontal"?n=c+t:o=d+t)})}var Cn=Pp;pt(Pp,"vertical"),pt(Pp,"horizontal");function ib(r,e){return{left:r.getShallow("left",e),top:r.getShallow("top",e),right:r.getShallow("right",e),bottom:r.getShallow("bottom",e),width:r.getShallow("width",e),height:r.getShallow("height",e)}}function cB(r,e){var t=de(r,e,{enableLayoutOnlyByCenter:!0}),a=r.getBoxLayoutParams(),i,n;if(t.type===cl.point)n=t.refPoint,i=qt(a,{width:e.getWidth(),height:e.getHeight()});else{var o=r.get("center"),s=W(o)?o:[o,o];i=qt(a,t.refContainer),n=t.boxCoordFrom===Ip.coord2?t.refPoint:[Z(s[0],i.width)+i.x,Z(s[1],i.height)+i.y]}return{viewRect:i,center:n}}function nb(r,e){var t=cB(r,e),a=t.viewRect,i=t.center,n=r.get("radius");W(n)||(n=[0,n]);var o=Z(a.width,e.getWidth()),s=Z(a.height,e.getHeight()),l=Math.min(o,s),u=Z(n[0],l/2),h=Z(n[1],l/2);return{cx:i[0],cy:i[1],r0:u,r:h,viewRect:a}}function qt(r,e,t){t=hl(t||0);var a=e.width,i=e.height,n=Z(r.left,a),o=Z(r.top,i),s=Z(r.right,a),l=Z(r.bottom,i),u=Z(r.width,a),h=Z(r.height,i),f=t[2]+t[0],v=t[1]+t[3],c=r.aspect;switch(isNaN(u)&&(u=a-s-v-n),isNaN(h)&&(h=i-l-f-o),c!=null&&(isNaN(u)&&isNaN(h)&&(c>a/i?u=a*.8:h=i*.8),isNaN(u)&&(u=c*h),isNaN(h)&&(h=u/c)),isNaN(n)&&(n=a-s-u-v),isNaN(o)&&(o=i-l-h-f),r.left||r.right){case"center":n=a/2-u/2-t[3];break;case"right":n=a-u-v;break}switch(r.top||r.bottom){case"middle":case"center":o=i/2-h/2-t[0];break;case"bottom":o=i-h-f;break}n=n||0,o=o||0,isNaN(u)&&(u=a-v-n-(s||0)),isNaN(h)&&(h=i-f-o-(l||0));var d=new ht((e.x||0)+n+t[3],(e.y||0)+o+t[0],u,h);return d.margin=t,d}function ob(r,e,t){var a=r.getShallow("preserveAspect",!0);if(!a)return e;var i=e.width/e.height;if(Math.abs(Math.atan(t)-Math.atan(i))<1e-9)return e;var n=r.getShallow("preserveAspectAlign",!0),o=r.getShallow("preserveAspectVerticalAlign",!0),s={width:e.width,height:e.height},l=a==="cover";return i>t&&!l||i<t&&l?(s.width=e.height*t,n==="left"?s.left=0:n==="right"?s.right=0:s.left="center"):(s.height=e.width/t,o==="top"?s.top=0:o==="bottom"?s.bottom=0:s.top="middle"),qt(s,e)}var cl={rect:1,point:2};function de(r,e,t){var a,i,n,o=r.boxCoordinateSystem,s;if(o){var l=vB(r),u=l.coord,h=l.from;if(o.dataToLayout){n=cl.rect,s=h;var f=o.dataToLayout(u);a=f.contentRect||f.rect}else t&&t.enableLayoutOnlyByCenter&&o.dataToPoint&&(n=cl.point,s=h,i=o.dataToPoint(u))}return n==null&&(n=cl.rect),n===cl.rect&&(a||(a={x:0,y:0,width:e.getWidth(),height:e.getHeight()}),i=[a.x+a.width/2,a.y+a.height/2]),{type:n,refContainer:a,refPoint:i,boxCoordFrom:s}}function Qh(r,e,t,a,i,n){var o=!i||!i.hv||i.hv[0],s=!i||!i.hv||i.hv[1],l=i&&i.boundingMode||"all";if(n=n||r,n.x=r.x,n.y=r.y,!o&&!s)return!1;var u;if(l==="raw")u=r.type==="group"?new ht(0,0,+e.width||0,+e.height||0):r.getBoundingRect();else if(u=r.getBoundingRect(),r.needLocalTransform()){var h=r.getLocalTransform();u=u.clone(),u.applyTransform(h)}var f=qt(st({width:u.width,height:u.height},e),t,a),v=o?f.x-u.x:0,c=s?f.y-u.y:0;return l==="raw"?(n.x=v,n.y=c):(n.x+=v,n.y+=c),n===r&&r.markRedraw(),!0}function dB(r,e){return r[Tn[e][0]]!=null||r[Tn[e][1]]!=null&&r[Tn[e][2]]!=null}function dl(r){var e=r.layoutMode||r.constructor.layoutMode;return lt(e)?e:e?{type:e}:null}function va(r,e,t){var a=t&&t.ignoreSize;!W(a)&&(a=[a,a]);var i=o(Tn[0],0),n=o(Tn[1],1);l(Tn[0],r,i),l(Tn[1],r,n);function o(u,h){var f={},v=0,c={},d=0,p=2;if(Jh(u,function(m){c[m]=r[m]}),Jh(u,function(m){K(e,m)&&(f[m]=c[m]=e[m]),s(f,m)&&v++,s(c,m)&&d++}),a[h])return s(e,u[1])?c[u[2]]=null:s(e,u[2])&&(c[u[1]]=null),c;if(d===p||!v)return c;if(v>=p)return f;for(var g=0;g<u.length;g++){var y=u[g];if(!K(f,y)&&K(r,y)){f[y]=r[y];break}}return f}function s(u,h){return u[h]!=null&&u[h]!=="auto"}function l(u,h,f){Jh(u,function(v){h[v]=f[v]})}}function An(r){return sb({},r)}function sb(r,e){return e&&r&&Jh(ab,function(t){K(e,t)&&(r[t]=e[t])}),r}var pB=St(),Tt=function(r){z(e,r);function e(t,a,i){var n=r.call(this,t,a,i)||this;return n.uid=Bo("ec_cpt_model"),n}return e.prototype.init=function(t,a,i){this.mergeDefaultAndTheme(t,i)},e.prototype.mergeDefaultAndTheme=function(t,a){var i=dl(this),n=i?An(t):{},o=a.getTheme();yt(t,o.get(this.mainType)),yt(t,this.getDefaultOption()),i&&va(t,n,i)},e.prototype.mergeOption=function(t,a){yt(this.option,t,!0);var i=dl(this);i&&va(this.option,t,i)},e.prototype.optionUpdated=function(t,a){},e.prototype.getDefaultOption=function(){var t=this.constructor;if(!FE(t))return t.defaultOption;var a=pB(this);if(!a.defaultOption){for(var i=[],n=t;n;){var o=n.prototype.defaultOption;o&&i.push(o),n=n.superClass}for(var s={},l=i.length-1;l>=0;l--)s=yt(s,i[l],!0);a.defaultOption=s}return a.defaultOption},e.prototype.getReferringComponents=function(t,a){var i=t+"Index",n=t+"Id";return To(this.ecModel,t,{index:this.get(i,!0),id:this.get(n,!0)},a)},e.prototype.getBoxLayoutParams=function(){return ib(this,!1)},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(t){this.option.zlevel=t},e.protoInitialize=function(){var t=e.prototype;t.type="component",t.id="",t.name="",t.mainType="",t.subType="",t.componentIndex=0}(),e}(Ct);J1(Tt,Ct),ch(Tt),ZN(Tt),$N(Tt,gB);function gB(r){var e=[];return M(Tt.getClassesByMainType(r),function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])}),e=U(e,function(t){return ia(t).main}),r!=="dataset"&&gt(e,"dataset")<=0&&e.unshift("dataset"),e}var B={color:{},darkColor:{},size:{}},re=B.color={theme:["#5070dd","#b6d634","#505372","#ff994d","#0ca8df","#ffd10a","#fb628b","#785db0","#3fbe95"],neutral00:"#fff",neutral05:"#f4f7fd",neutral10:"#e8ebf0",neutral15:"#dbdee4",neutral20:"#cfd2d7",neutral25:"#c3c5cb",neutral30:"#b7b9be",neutral35:"#aaacb2",neutral40:"#9ea0a5",neutral45:"#929399",neutral50:"#86878c",neutral55:"#797b7f",neutral60:"#6d6e73",neutral65:"#616266",neutral70:"#54555a",neutral75:"#48494d",neutral80:"#3c3c41",neutral85:"#303034",neutral90:"#232328",neutral95:"#17171b",neutral99:"#000",accent05:"#eff1f9",accent10:"#e0e4f2",accent15:"#d0d6ec",accent20:"#c0c9e6",accent25:"#b1bbdf",accent30:"#a1aed9",accent35:"#91a0d3",accent40:"#8292cc",accent45:"#7285c6",accent50:"#6578ba",accent55:"#5c6da9",accent60:"#536298",accent65:"#4a5787",accent70:"#404c76",accent75:"#374165",accent80:"#2e3654",accent85:"#252b43",accent90:"#1b2032",accent95:"#121521",transparent:"rgba(0,0,0,0)",highlight:"rgba(255,231,130,0.8)"};F(re,{primary:re.neutral80,secondary:re.neutral70,tertiary:re.neutral60,quaternary:re.neutral50,disabled:re.neutral20,border:re.neutral30,borderTint:re.neutral20,borderShade:re.neutral40,background:re.neutral05,backgroundTint:"rgba(234,237,245,0.5)",backgroundTransparent:"rgba(255,255,255,0)",backgroundShade:re.neutral10,shadow:"rgba(0,0,0,0.2)",shadowTint:"rgba(129,130,136,0.2)",axisLine:re.neutral70,axisLineTint:re.neutral40,axisTick:re.neutral70,axisTickMinor:re.neutral60,axisLabel:re.neutral70,axisSplitLine:re.neutral15,axisMinorSplitLine:re.neutral05});for(var Mn in re)if(re.hasOwnProperty(Mn)){var lb=re[Mn];Mn==="theme"?B.darkColor.theme=re.theme.slice():Mn==="highlight"?B.darkColor.highlight="rgba(255,231,130,0.4)":Mn.indexOf("accent")===0?B.darkColor[Mn]=li(lb,null,function(r){return r*.5},function(r){return Math.min(1,1.3-r)}):B.darkColor[Mn]=li(lb,null,function(r){return r*.9},function(r){return 1-Math.pow(r,1.5)})}B.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var ub="";typeof navigator<"u"&&(ub=navigator.platform||"");var Go="rgba(0, 0, 0, 0.2)",hb=B.color.theme[0],yB=li(hb,null,null,.9),mB={darkMode:"auto",colorBy:"series",color:B.color.theme,gradientColor:[yB,hb],aria:{decal:{decals:[{color:Go,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Go,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Go,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Go,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Go,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Go,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:ub.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},fb=J(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),lr="original",Te="arrayRows",ur="objectRows",Gr="keyedColumns",_i="typedArray",vb="unknown",Fr="column",Dn="row",Le={Must:1,Might:2,Not:3},cb=St();function _B(r){cb(r).datasetMap=J()}function db(r,e,t){var a={},i=Rp(e);if(!i||!r)return a;var n=[],o=[],s=e.ecModel,l=cb(s).datasetMap,u=i.uid+"_"+t.seriesLayoutBy,h,f;r=r.slice(),M(r,function(p,g){var y=lt(p)?p:r[g]={name:p};y.type==="ordinal"&&h==null&&(h=g,f=d(y)),a[y.name]=[]});var v=l.get(u)||l.set(u,{categoryWayDim:f,valueWayDim:0});M(r,function(p,g){var y=p.name,m=d(p);if(h==null){var _=v.valueWayDim;c(a[y],_,m),c(o,_,m),v.valueWayDim+=m}else if(h===g)c(a[y],0,m),c(n,0,m);else{var _=v.categoryWayDim;c(a[y],_,m),c(o,_,m),v.categoryWayDim+=m}});function c(p,g,y){for(var m=0;m<y;m++)p.push(g+m)}function d(p){var g=p.dimsDef;return g?g.length:1}return n.length&&(a.itemName=n),o.length&&(a.seriesName=o),a}function kp(r,e,t){var a={},i=Rp(r);if(!i)return a;var n=e.sourceFormat,o=e.dimensionsDefine,s;(n===ur||n===Gr)&&M(o,function(h,f){(lt(h)?h.name:h)==="name"&&(s=f)});var l=function(){for(var h={},f={},v=[],c=0,d=Math.min(5,t);c<d;c++){var p=gb(e.data,n,e.seriesLayoutBy,o,e.startIndex,c);v.push(p);var g=p===Le.Not;if(g&&h.v==null&&c!==s&&(h.v=c),(h.n==null||h.n===h.v||!g&&v[h.n]===Le.Not)&&(h.n=c),y(h)&&v[h.n]!==Le.Not)return h;g||(p===Le.Might&&f.v==null&&c!==s&&(f.v=c),(f.n==null||f.n===f.v)&&(f.n=c))}function y(m){return m.v!=null&&m.n!=null}return y(h)?h:y(f)?f:null}();if(l){a.value=[l.v];var u=s??l.n;a.itemName=[u],a.seriesName=[u]}return a}function Rp(r){var e=r.get("data",!0);if(!e)return To(r.ecModel,"dataset",{index:r.get("datasetIndex",!0),id:r.get("datasetId",!0)},Jt).models[0]}function xB(r){return!r.get("transform",!0)&&!r.get("fromTransformResult",!0)?[]:To(r.ecModel,"dataset",{index:r.get("fromDatasetIndex",!0),id:r.get("fromDatasetId",!0)},Jt).models}function pb(r,e){return gb(r.data,r.sourceFormat,r.seriesLayoutBy,r.dimensionsDefine,r.startIndex,e)}function gb(r,e,t,a,i,n){var o,s=5;if(Xe(r))return Le.Not;var l,u;if(a){var h=a[n];lt(h)?(l=h.name,u=h.type):$(h)&&(l=h)}if(u!=null)return u==="ordinal"?Le.Must:Le.Not;if(e===Te){var f=r;if(t===Dn){for(var v=f[n],c=0;c<(v||[]).length&&c<s;c++)if((o=x(v[i+c]))!=null)return o}else for(var c=0;c<f.length&&c<s;c++){var d=f[i+c];if(d&&(o=x(d[n]))!=null)return o}}else if(e===ur){var p=r;if(!l)return Le.Not;for(var c=0;c<p.length&&c<s;c++){var g=p[c];if(g&&(o=x(g[l]))!=null)return o}}else if(e===Gr){var y=r;if(!l)return Le.Not;var v=y[l];if(!v||Xe(v))return Le.Not;for(var c=0;c<v.length&&c<s;c++)if((o=x(v[c]))!=null)return o}else if(e===lr)for(var m=r,c=0;c<m.length&&c<s;c++){var g=m[c],_=bo(g);if(!W(_))return Le.Not;if((o=x(_[n]))!=null)return o}function x(b){var S=$(b);if(b!=null&&Number.isFinite(Number(b))&&b!=="")return S?Le.Might:Le.Not;if(S&&b!=="-")return Le.Must}return Le.Not}var Ep=J();function SB(r,e){Ee(Ep.get(r)==null&&e),Ep.set(r,e)}function bB(r,e,t){var a=Ep.get(e);if(!a)return t;var i=a(r);return i?t.concat(i):t}var yb=St(),wB=St(),Op=function(){function r(){}return r.prototype.getColorFromPalette=function(e,t,a){var i=Vt(this.get("color",!0)),n=this.get("colorLayer",!0);return mb(this,yb,i,n,e,t,a)},r.prototype.clearColorPalette=function(){CB(this,yb)},r}();function Np(r,e,t,a){var i=Vt(r.get(["aria","decal","decals"]));return mb(r,wB,i,null,e,t,a)}function TB(r,e){for(var t=r.length,a=0;a<t;a++)if(r[a].length>e)return r[a];return r[t-1]}function mb(r,e,t,a,i,n,o){n=n||r;var s=e(n),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(i))return u[i];var h=o==null||!a?t:TB(a,o);if(h=h||t,!(!h||!h.length)){var f=h[l];return i&&(u[i]=f),s.paletteIdx=(l+1)%h.length,f}}function CB(r,e){e(r).paletteIdx=0,e(r).paletteNameMap={}}var tf,pl,_b,xb="\0_ec_inner",AB=1,Bp=function(r){z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(t,a,i,n,o,s){n=n||{},this.option=null,this._theme=new Ct(n),this._locale=new Ct(o),this._optionManager=s},e.prototype.setOption=function(t,a,i){var n=wb(a);this._optionManager.setOption(t,i,n),this._resetOption(null,n)},e.prototype.resetOption=function(t,a){return this._resetOption(t,wb(a))},e.prototype._resetOption=function(t,a){var i=!1,n=this._optionManager;if(!t||t==="recreate"){var o=n.mountOption(t==="recreate");!this.option||t==="recreate"?_b(this,o):(this.restoreData(),this._mergeOption(o,a)),i=!0}if((t==="timeline"||t==="media")&&this.restoreData(),!t||t==="recreate"||t==="timeline"){var s=n.getTimelineOption(this);s&&(i=!0,this._mergeOption(s,a))}if(!t||t==="recreate"||t==="media"){var l=n.getMediaOption(this);l.length&&M(l,function(u){i=!0,this._mergeOption(u,a)},this)}return i},e.prototype.mergeOption=function(t){this._mergeOption(t,null)},e.prototype._mergeOption=function(t,a){var i=this.option,n=this._componentsMap,o=this._componentsCount,s=[],l=J(),u=a&&a.replaceMergeMainTypeMap;_B(this),M(t,function(f,v){f!=null&&(Tt.hasClass(v)?v&&(s.push(v),l.set(v,!0)):i[v]=i[v]==null?at(f):yt(i[v],f,!0))}),u&&u.each(function(f,v){Tt.hasClass(v)&&!l.get(v)&&(s.push(v),l.set(v,!0))}),Tt.topologicalTravel(s,Tt.getAllClassMainTypes(),h,this);function h(f){var v=bB(this,f,Vt(t[f])),c=n.get(f),d=c?u&&u.get(f)?"replaceMerge":"normalMerge":"replaceAll",p=$1(c,v,d);kE(p,f,Tt),i[f]=null,n.set(f,null),o.set(f,0);var g=[],y=[],m=0,_;M(p,function(x,b){var S=x.existing,w=x.newOption;if(!w)S&&(S.mergeOption({},this),S.optionUpdated({},!1));else{var T=f==="series",C=Tt.getClass(f,x.keyInfo.subType,!T);if(!C)return;if(f==="tooltip"){if(_)return;_=!0}if(S&&S.constructor===C)S.name=x.keyInfo.name,S.mergeOption(w,this),S.optionUpdated(w,!1);else{var A=F({componentIndex:b},x.keyInfo);S=new C(w,this,this,A),F(S,A),x.brandNew&&(S.__requireNewView=!0),S.init(w,this,this),S.optionUpdated(null,!0)}}S?(g.push(S.option),y.push(S),m++):(g.push(void 0),y.push(void 0))},this),i[f]=g,n.set(f,y),o.set(f,m),f==="series"&&tf(this)}this._seriesIndices||tf(this)},e.prototype.getOption=function(){var t=at(this.option);return M(t,function(a,i){if(Tt.hasClass(i)){for(var n=Vt(a),o=n.length,s=!1,l=o-1;l>=0;l--)n[l]&&!Xs(n[l])?s=!0:(n[l]=null,!s&&o--);n.length=o,t[i]=n}}),delete t[xb],t},e.prototype.setTheme=function(t){this._theme=new Ct(t),this._resetOption("recreate",null)},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(t){this._payload=t},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(t,a){var i=this._componentsMap.get(t);if(i){var n=i[a||0];if(n)return n;if(a==null){for(var o=0;o<i.length;o++)if(i[o])return i[o]}}},e.prototype.queryComponents=function(t){var a=t.mainType;if(!a)return[];var i=t.index,n=t.id,o=t.name,s=this._componentsMap.get(a);if(!s||!s.length)return[];var l;return i!=null?(l=[],M(Vt(i),function(u){s[u]&&l.push(s[u])})):n!=null?l=Sb("id",n,s):o!=null?l=Sb("name",o,s):l=Et(s,function(u){return!!u}),bb(l,t)},e.prototype.findComponents=function(t){var a=t.query,i=t.mainType,n=s(a),o=n?this.queryComponents(n):Et(this._componentsMap.get(i),function(u){return!!u});return l(bb(o,t));function s(u){var h=i+"Index",f=i+"Id",v=i+"Name";return u&&(u[h]!=null||u[f]!=null||u[v]!=null)?{mainType:i,index:u[h],id:u[f],name:u[v]}:null}function l(u){return t.filter?Et(u,t.filter):u}},e.prototype.eachComponent=function(t,a,i){var n=this._componentsMap;if(rt(t)){var o=a,s=t;n.each(function(f,v){for(var c=0;f&&c<f.length;c++){var d=f[c];d&&s.call(o,v,d,d.componentIndex)}})}else for(var l=$(t)?n.get(t):lt(t)?this.findComponents(t):null,u=0;l&&u<l.length;u++){var h=l[u];h&&a.call(i,h,h.componentIndex)}},e.prototype.getSeriesByName=function(t){var a=fe(t,null);return Et(this._componentsMap.get("series"),function(i){return!!i&&a!=null&&i.name===a})},e.prototype.getSeriesByIndex=function(t){return this._componentsMap.get("series")[t]},e.prototype.getSeriesByType=function(t){return Et(this._componentsMap.get("series"),function(a){return!!a&&a.subType===t})},e.prototype.getSeries=function(){return Et(this._componentsMap.get("series"),function(t){return!!t})},e.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},e.prototype.eachSeries=function(t,a){pl(this),M(this._seriesIndices,function(i){var n=this._componentsMap.get("series")[i];t.call(a,n,i)},this)},e.prototype.eachRawSeries=function(t,a){M(this._componentsMap.get("series"),function(i){i&&t.call(a,i,i.componentIndex)})},e.prototype.eachSeriesByType=function(t,a,i){pl(this),M(this._seriesIndices,function(n){var o=this._componentsMap.get("series")[n];o.subType===t&&a.call(i,o,n)},this)},e.prototype.eachRawSeriesByType=function(t,a,i){return M(this.getSeriesByType(t),a,i)},e.prototype.isSeriesFiltered=function(t){return pl(this),this._seriesIndicesMap.get(t.componentIndex)==null},e.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},e.prototype.filterSeries=function(t,a){pl(this);var i=[];M(this._seriesIndices,function(n){var o=this._componentsMap.get("series")[n];t.call(a,o,n)&&i.push(n)},this),this._seriesIndices=i,this._seriesIndicesMap=J(i)},e.prototype.restoreData=function(t){tf(this);var a=this._componentsMap,i=[];a.each(function(n,o){Tt.hasClass(o)&&i.push(o)}),Tt.topologicalTravel(i,Tt.getAllClassMainTypes(),function(n){M(a.get(n),function(o){o&&(n!=="series"||!MB(o,t))&&o.restoreData()})})},e.internalField=function(){tf=function(t){var a=t._seriesIndices=[];M(t._componentsMap.get("series"),function(i){i&&a.push(i.componentIndex)}),t._seriesIndicesMap=J(a)},pl=function(t){},_b=function(t,a){t.option={},t.option[xb]=AB,t._componentsMap=J({series:[]}),t._componentsCount=J();var i=a.aria;lt(i)&&i.enabled==null&&(i.enabled=!0),DB(a,t._theme.option),yt(a,mB,!1),t._mergeOption(a,null)}}(),e}(Ct);function MB(r,e){if(e){var t=e.seriesIndex,a=e.seriesId,i=e.seriesName;return t!=null&&r.componentIndex!==t||a!=null&&r.id!==a||i!=null&&r.name!==i}}function DB(r,e){var t=r.color&&!r.colorLayer;M(e,function(a,i){i==="colorLayer"&&t||i==="color"&&r.color||Tt.hasClass(i)||(typeof a=="object"?r[i]=r[i]?yt(r[i],a,!1):at(a):r[i]==null&&(r[i]=a))})}function Sb(r,e,t){if(W(e)){var a=J();return M(e,function(n){if(n!=null){var o=fe(n,null);o!=null&&a.set(n,!0)}}),Et(t,function(n){return n&&a.get(n[r])})}else{var i=fe(e,null);return Et(t,function(n){return n&&i!=null&&n[r]===i})}}function bb(r,e){return e.hasOwnProperty("subType")?Et(r,function(t){return t&&t.subType===e.subType}):r}function wb(r){var e=J();return r&&M(Vt(r.replaceMerge),function(t){e.set(t,!0)}),{replaceMergeMainTypeMap:e}}ie(Bp,Op);var LB=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],Tb=function(){function r(e){M(LB,function(t){this[t]=X(e[t],e)},this)}return r}(),IB=/^(min|max)?(.+)$/,PB=function(){function r(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return r.prototype.setOption=function(e,t,a){e&&(M(Vt(e.series),function(o){o&&o.data&&Xe(o.data)&&Ru(o.data)}),M(Vt(e.dataset),function(o){o&&o.source&&Xe(o.source)&&Ru(o.source)})),e=at(e);var i=this._optionBackup,n=kB(e,t,!i);this._newBaseOption=n.baseOption,i?(n.timelineOptions.length&&(i.timelineOptions=n.timelineOptions),n.mediaList.length&&(i.mediaList=n.mediaList),n.mediaDefault&&(i.mediaDefault=n.mediaDefault)):this._optionBackup=n},r.prototype.mountOption=function(e){var t=this._optionBackup;return this._timelineOptions=t.timelineOptions,this._mediaList=t.mediaList,this._mediaDefault=t.mediaDefault,this._currentMediaIndices=[],at(e?t.baseOption:this._newBaseOption)},r.prototype.getTimelineOption=function(e){var t,a=this._timelineOptions;if(a.length){var i=e.getComponent("timeline");i&&(t=at(a[i.getCurrentIndex()]))}return t},r.prototype.getMediaOption=function(e){var t=this._api.getWidth(),a=this._api.getHeight(),i=this._mediaList,n=this._mediaDefault,o=[],s=[];if(!i.length&&!n)return s;for(var l=0,u=i.length;l<u;l++)RB(i[l].query,t,a)&&o.push(l);return!o.length&&n&&(o=[-1]),o.length&&!OB(o,this._currentMediaIndices)&&(s=U(o,function(h){return at(h===-1?n.option:i[h].option)})),this._currentMediaIndices=o,s},r}();function kB(r,e,t){var a=[],i,n,o=r.baseOption,s=r.timeline,l=r.options,u=r.media,h=!!r.media,f=!!(l||s||o&&o.timeline);o?(n=o,n.timeline||(n.timeline=s)):((f||h)&&(r.options=r.media=null),n=r),h&&W(u)&&M(u,function(c){c&&c.option&&(c.query?a.push(c):i||(i=c))}),v(n),M(l,function(c){return v(c)}),M(a,function(c){return v(c.option)});function v(c){M(e,function(d){d(c,t)})}return{baseOption:n,timelineOptions:l||[],mediaDefault:i,mediaList:a}}function RB(r,e,t){var a={width:e,height:t,aspectratio:e/t},i=!0;return M(r,function(n,o){var s=o.match(IB);if(!(!s||!s[1]||!s[2])){var l=s[1],u=s[2].toLowerCase();EB(a[u],n,l)||(i=!1)}}),i}function EB(r,e,t){return t==="min"?r>=e:t==="max"?r<=e:r===e}function OB(r,e){return r.join(",")===e.join(",")}var Hr=M,gl=lt,Cb=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function zp(r){var e=r&&r.itemStyle;if(e)for(var t=0,a=Cb.length;t<a;t++){var i=Cb[t],n=e.normal,o=e.emphasis;n&&n[i]&&(r[i]=r[i]||{},r[i].normal?yt(r[i].normal,n[i]):r[i].normal=n[i],n[i]=null),o&&o[i]&&(r[i]=r[i]||{},r[i].emphasis?yt(r[i].emphasis,o[i]):r[i].emphasis=o[i],o[i]=null)}}function ze(r,e,t){if(r&&r[e]&&(r[e].normal||r[e].emphasis)){var a=r[e].normal,i=r[e].emphasis;a&&(t?(r[e].normal=r[e].emphasis=null,st(r[e],a)):r[e]=a),i&&(r.emphasis=r.emphasis||{},r.emphasis[e]=i,i.focus&&(r.emphasis.focus=i.focus),i.blurScope&&(r.emphasis.blurScope=i.blurScope))}}function yl(r){ze(r,"itemStyle"),ze(r,"lineStyle"),ze(r,"areaStyle"),ze(r,"label"),ze(r,"labelLine"),ze(r,"upperLabel"),ze(r,"edgeLabel")}function le(r,e){var t=gl(r)&&r[e],a=gl(t)&&t.textStyle;if(a)for(var i=0,n=Z1.length;i<n;i++){var o=Z1[i];a.hasOwnProperty(o)&&(t[o]=a[o])}}function Cr(r){r&&(yl(r),le(r,"label"),r.emphasis&&le(r.emphasis,"label"))}function NB(r){if(gl(r)){zp(r),yl(r),le(r,"label"),le(r,"upperLabel"),le(r,"edgeLabel"),r.emphasis&&(le(r.emphasis,"label"),le(r.emphasis,"upperLabel"),le(r.emphasis,"edgeLabel"));var e=r.markPoint;e&&(zp(e),Cr(e));var t=r.markLine;t&&(zp(t),Cr(t));var a=r.markArea;a&&Cr(a);var i=r.data;if(r.type==="graph"){i=i||r.nodes;var n=r.links||r.edges;if(n&&!Xe(n))for(var o=0;o<n.length;o++)Cr(n[o]);M(r.categories,function(u){yl(u)})}if(i&&!Xe(i))for(var o=0;o<i.length;o++)Cr(i[o]);if(e=r.markPoint,e&&e.data)for(var s=e.data,o=0;o<s.length;o++)Cr(s[o]);if(t=r.markLine,t&&t.data)for(var l=t.data,o=0;o<l.length;o++)W(l[o])?(Cr(l[o][0]),Cr(l[o][1])):Cr(l[o]);r.type==="gauge"?(le(r,"axisLabel"),le(r,"title"),le(r,"detail")):r.type==="treemap"?(ze(r.breadcrumb,"itemStyle"),M(r.levels,function(u){yl(u)})):r.type==="tree"&&yl(r.leaves)}}function Va(r){return W(r)?r:r?[r]:[]}function Ab(r){return(W(r)?r[0]:r)||{}}function BB(r,e){Hr(Va(r.series),function(a){gl(a)&&NB(a)});var t=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&t.push("valueAxis","categoryAxis","logAxis","timeAxis"),Hr(t,function(a){Hr(Va(r[a]),function(i){i&&(le(i,"axisLabel"),le(i.axisPointer,"label"))})}),Hr(Va(r.parallel),function(a){var i=a&&a.parallelAxisDefault;le(i,"axisLabel"),le(i&&i.axisPointer,"label")}),Hr(Va(r.calendar),function(a){ze(a,"itemStyle"),le(a,"dayLabel"),le(a,"monthLabel"),le(a,"yearLabel")}),Hr(Va(r.radar),function(a){le(a,"name"),a.name&&a.axisName==null&&(a.axisName=a.name,delete a.name),a.nameGap!=null&&a.axisNameGap==null&&(a.axisNameGap=a.nameGap,delete a.nameGap)}),Hr(Va(r.geo),function(a){gl(a)&&(Cr(a),Hr(Va(a.regions),function(i){Cr(i)}))}),Hr(Va(r.timeline),function(a){Cr(a),ze(a,"label"),ze(a,"itemStyle"),ze(a,"controlStyle",!0);var i=a.data;W(i)&&M(i,function(n){lt(n)&&(ze(n,"label"),ze(n,"itemStyle"))})}),Hr(Va(r.toolbox),function(a){ze(a,"iconStyle"),Hr(a.feature,function(i){ze(i,"iconStyle")})}),le(Ab(r.axisPointer),"label"),le(Ab(r.tooltip).axisPointer,"label")}function zB(r,e){for(var t=e.split(","),a=r,i=0;i<t.length&&(a=a&&a[t[i]],a!=null);i++);return a}function VB(r,e,t,a){for(var i=e.split(","),n=r,o,s=0;s<i.length-1;s++)o=i[s],n[o]==null&&(n[o]={}),n=n[o];(a||n[i[s]]==null)&&(n[i[s]]=t)}function Mb(r){r&&M(GB,function(e){e[0]in r&&!(e[1]in r)&&(r[e[1]]=r[e[0]])})}var GB=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],FB=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],Vp=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function ml(r){var e=r&&r.itemStyle;if(e)for(var t=0;t<Vp.length;t++){var a=Vp[t][1],i=Vp[t][0];e[a]!=null&&(e[i]=e[a])}}function Db(r){r&&r.alignTo==="edge"&&r.margin!=null&&r.edgeDistance==null&&(r.edgeDistance=r.margin)}function Lb(r){r&&r.downplay&&!r.blur&&(r.blur=r.downplay)}function HB(r){r&&r.focusNodeAdjacency!=null&&(r.emphasis=r.emphasis||{},r.emphasis.focus==null&&(r.emphasis.focus="adjacency"))}function Ib(r,e){if(r)for(var t=0;t<r.length;t++)e(r[t]),r[t]&&Ib(r[t].children,e)}function Pb(r,e){BB(r,e),r.series=Vt(r.series),M(r.series,function(t){if(lt(t)){var a=t.type;if(a==="line")t.clipOverflow!=null&&(t.clip=t.clipOverflow);else if(a==="pie"||a==="gauge"){t.clockWise!=null&&(t.clockwise=t.clockWise),Db(t.label);var i=t.data;if(i&&!Xe(i))for(var n=0;n<i.length;n++)Db(i[n]);t.hoverOffset!=null&&(t.emphasis=t.emphasis||{},(t.emphasis.scaleSize=null)&&(t.emphasis.scaleSize=t.hoverOffset))}else if(a==="gauge"){var o=zB(t,"pointer.color");o!=null&&VB(t,"itemStyle.color",o)}else if(a==="bar"){ml(t),ml(t.backgroundStyle),ml(t.emphasis);var i=t.data;if(i&&!Xe(i))for(var n=0;n<i.length;n++)typeof i[n]=="object"&&(ml(i[n]),ml(i[n]&&i[n].emphasis))}else if(a==="sunburst"){var s=t.highlightPolicy;s&&(t.emphasis=t.emphasis||{},t.emphasis.focus||(t.emphasis.focus=s)),Lb(t),Ib(t.data,Lb)}else a==="graph"||a==="sankey"?HB(t):a==="map"&&(t.mapType&&!t.map&&(t.map=t.mapType),t.mapLocation&&st(t,t.mapLocation));t.hoverAnimation!=null&&(t.emphasis=t.emphasis||{},t.emphasis&&t.emphasis.scale==null&&(t.emphasis.scale=t.hoverAnimation)),Mb(t)}}),r.dataRange&&(r.visualMap=r.dataRange),M(FB,function(t){var a=r[t];a&&(W(a)||(a=[a]),M(a,function(i){Mb(i)}))})}function WB(r){var e=J();r.eachSeries(function(t){var a=t.get("stack");if(a){var i=e.get(a)||e.set(a,[]),n=t.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:t};if(!o.stackedDimension||!(o.isStackedByIndex||o.stackedByDimension))return;i.push(o)}}),e.each(function(t){if(t.length!==0){var a=t[0].seriesModel,i=a.get("stackOrder")||"seriesAsc";i==="seriesDesc"&&t.reverse(),M(t,function(n,o){n.data.setCalculationInfo("stackedOnSeries",o>0?t[o-1].seriesModel:null)}),UB(t)}})}function UB(r){M(r,function(e,t){var a=[],i=[NaN,NaN],n=[e.stackResultDimension,e.stackedOverDimension],o=e.data,s=e.isStackedByIndex,l=e.seriesModel.get("stackStrategy")||"samesign";o.modify(n,function(u,h,f){var v=o.get(e.stackedDimension,f);if(isNaN(v))return i;var c,d;s?d=o.getRawIndex(f):c=o.get(e.stackedByDimension,f);for(var p=NaN,g=t-1;g>=0;g--){var y=r[g];if(s||(d=y.data.rawIndexOf(y.stackedByDimension,c)),d>=0){var m=y.data.getByRawIndex(y.stackResultDimension,d);if(l==="all"||l==="positive"&&m>0||l==="negative"&&m<0||l==="samesign"&&v>=0&&m>0||l==="samesign"&&v<=0&&m<0){v=_E(v,m),p=m;break}}}return a[0]=v,a[1]=p,a})})}var ef=function(){function r(e){this.data=e.data||(e.sourceFormat===Gr?{}:[]),this.sourceFormat=e.sourceFormat||vb,this.seriesLayoutBy=e.seriesLayoutBy||Fr,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var a=0;a<t.length;a++){var i=t[a];i.type==null&&pb(this,a)===Le.Must&&(i.type="ordinal")}}return r}();function Gp(r){return r instanceof ef}function Fp(r,e,t){t=t||kb(r);var a=e.seriesLayoutBy,i=ZB(r,t,a,e.sourceHeader,e.dimensions),n=new ef({data:r,sourceFormat:t,seriesLayoutBy:a,dimensionsDefine:i.dimensionsDefine,startIndex:i.startIndex,dimensionsDetectedCount:i.dimensionsDetectedCount,metaRawOption:at(e)});return n}function Hp(r){return new ef({data:r,sourceFormat:Xe(r)?_i:lr})}function YB(r){return new ef({data:r.data,sourceFormat:r.sourceFormat,seriesLayoutBy:r.seriesLayoutBy,dimensionsDefine:at(r.dimensionsDefine),startIndex:r.startIndex,dimensionsDetectedCount:r.dimensionsDetectedCount})}function kb(r){var e=vb;if(Xe(r))e=_i;else if(W(r)){r.length===0&&(e=Te);for(var t=0,a=r.length;t<a;t++){var i=r[t];if(i!=null){if(W(i)||Xe(i)){e=Te;break}else if(lt(i)){e=ur;break}}}}else if(lt(r)){for(var n in r)if(K(r,n)&&ke(r[n])){e=Gr;break}}return e}function ZB(r,e,t,a,i){var n,o;if(!r)return{dimensionsDefine:Rb(i),startIndex:o,dimensionsDetectedCount:n};if(e===Te){var s=r;a==="auto"||a==null?Eb(function(u){u!=null&&u!=="-"&&($(u)?o==null&&(o=1):o=0)},t,s,10):o=Dt(a)?a:a?1:0,!i&&o===1&&(i=[],Eb(function(u,h){i[h]=u!=null?u+"":""},t,s,1/0)),n=i?i.length:t===Dn?s.length:s[0]?s[0].length:null}else if(e===ur)i||(i=$B(r));else if(e===Gr)i||(i=[],M(r,function(u,h){i.push(h)}));else if(e===lr){var l=bo(r[0]);n=W(l)&&l.length||1}return{startIndex:o,dimensionsDefine:Rb(i),dimensionsDetectedCount:n}}function $B(r){for(var e=0,t;e<r.length&&!(t=r[e++]););if(t)return Mt(t)}function Rb(r){if(r){var e=J();return U(r,function(t,a){t=lt(t)?t:{name:t};var i={name:t.name,displayName:t.displayName,type:t.type};if(i.name==null)return i;i.name+="",i.displayName==null&&(i.displayName=i.name);var n=e.get(i.name);return n?i.name+="-"+n.count++:e.set(i.name,{count:1}),i})}}function Eb(r,e,t,a){if(e===Dn)for(var i=0;i<t.length&&i<a;i++)r(t[i]?t[i][0]:null,i);else for(var n=t[0]||[],i=0;i<n.length&&i<a;i++)r(n[i],i)}function Ob(r){var e=r.sourceFormat;return e===ur||e===Gr}var Ln,In,Pn,kn,Nb,Bb,zb=function(){function r(e,t){var a=Gp(e)?e:Hp(e);this._source=a;var i=this._data=a.data,n=a.sourceFormat;a.seriesLayoutBy,n===_i&&(this._offset=0,this._dimSize=t,this._data=i),Bb(this,i,a)}return r.prototype.getSource=function(){return this._source},r.prototype.count=function(){return 0},r.prototype.getItem=function(e,t){},r.prototype.appendData=function(e){},r.prototype.clean=function(){},r.protoInitialize=function(){var e=r.prototype;e.pure=!1,e.persistent=!0}(),r.internalField=function(){var e;Bb=function(o,s,l){var u=l.sourceFormat,h=l.seriesLayoutBy,f=l.startIndex,v=l.dimensionsDefine,c=Nb[Up(u,h)];if(F(o,c),u===_i)o.getItem=t,o.count=i,o.fillStorage=a;else{var d=Gb(u,h);o.getItem=X(d,null,s,f,v);var p=Hb(u,h);o.count=X(p,null,s,f,v)}};var t=function(o,s){o=o-this._offset,s=s||[];for(var l=this._data,u=this._dimSize,h=u*o,f=0;f<u;f++)s[f]=l[h+f];return s},a=function(o,s,l,u){for(var h=this._data,f=this._dimSize,v=0;v<f;v++){for(var c=u[v],d=c[0]==null?1/0:c[0],p=c[1]==null?-1/0:c[1],g=s-o,y=l[v],m=0;m<g;m++){var _=h[m*f+v];y[o+m]=_,_<d&&(d=_),_>p&&(p=_)}c[0]=d,c[1]=p}},i=function(){return this._data?this._data.length/this._dimSize:0};Nb=(e={},e[Te+"_"+Fr]={pure:!0,appendData:n},e[Te+"_"+Dn]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[ur]={pure:!0,appendData:n},e[Gr]={pure:!0,appendData:function(o){var s=this._data;M(o,function(l,u){for(var h=s[u]||(s[u]=[]),f=0;f<(l||[]).length;f++)h.push(l[f])})}},e[lr]={appendData:n},e[_i]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},e);function n(o){for(var s=0;s<o.length;s++)this._data.push(o[s])}}(),r}(),rf=function(r){W(r)||H1("series.data or dataset.source must be an array.")};Ln={},Ln[Te+"_"+Fr]=rf,Ln[Te+"_"+Dn]=rf,Ln[ur]=rf,Ln[Gr]=function(r,e){for(var t=0;t<e.length;t++){var a=e[t].name;a==null&&H1("dimension name must not be null/undefined.")}},Ln[lr]=rf;var Vb=function(r,e,t,a){return r[a]},XB=(In={},In[Te+"_"+Fr]=function(r,e,t,a){return r[a+e]},In[Te+"_"+Dn]=function(r,e,t,a,i){a+=e;for(var n=i||[],o=r,s=0;s<o.length;s++){var l=o[s];n[s]=l?l[a]:null}return n},In[ur]=Vb,In[Gr]=function(r,e,t,a,i){for(var n=i||[],o=0;o<t.length;o++){var s=t[o].name,l=s!=null?r[s]:null;n[o]=l?l[a]:null}return n},In[lr]=Vb,In);function Gb(r,e){var t=XB[Up(r,e)];return t}var Fb=function(r,e,t){return r.length},qB=(Pn={},Pn[Te+"_"+Fr]=function(r,e,t){return Math.max(0,r.length-e)},Pn[Te+"_"+Dn]=function(r,e,t){var a=r[0];return a?Math.max(0,a.length-e):0},Pn[ur]=Fb,Pn[Gr]=function(r,e,t){var a=t[0].name,i=a!=null?r[a]:null;return i?i.length:0},Pn[lr]=Fb,Pn);function Hb(r,e){var t=qB[Up(r,e)];return t}var Wp=function(r,e,t){return r[e]},KB=(kn={},kn[Te]=Wp,kn[ur]=function(r,e,t){return r[t]},kn[Gr]=Wp,kn[lr]=function(r,e,t){var a=bo(r);return a instanceof Array?a[e]:a},kn[_i]=Wp,kn);function Wb(r){var e=KB[r];return e}function Up(r,e){return r===Te?r+"_"+e:r}function Fo(r,e,t){if(r){var a=r.getRawDataItem(e);if(a!=null){var i=r.getStore(),n=i.getSource().sourceFormat;if(t!=null){var o=r.getDimensionIndex(t),s=i.getDimensionProperty(o);return Wb(n)(a,o,s)}else{var l=a;return n===lr&&(l=bo(a)),l}}}}var jB=/\{@(.+?)\}/g,af=function(){function r(){}return r.prototype.getDataParams=function(e,t){var a=this.getData(t),i=this.getRawValue(e,t),n=a.getRawIndex(e),o=a.getName(e),s=a.getRawDataItem(e),l=a.getItemVisual(e,"style"),u=l&&l[a.getItemVisual(e,"drawType")||"fill"],h=l&&l.stroke,f=this.mainType,v=f==="series",c=a.userOutput&&a.userOutput.get();return{componentType:f,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:o,dataIndex:n,data:s,dataType:t,value:i,color:u,borderColor:h,dimensionNames:c?c.fullDimensions:null,encode:c?c.encode:null,$vars:["seriesName","name","value"]}},r.prototype.getFormattedLabel=function(e,t,a,i,n,o){t=t||"normal";var s=this.getData(a),l=this.getDataParams(e,a);if(o&&(l.value=o.interpolatedValue),i!=null&&W(l.value)&&(l.value=l.value[i]),!n){var u=s.getItemModel(e);n=u.get(t==="normal"?["label","formatter"]:[t,"label","formatter"])}if(rt(n))return l.status=t,l.dimensionIndex=i,n(l);if($(n)){var h=QS(n,l);return h.replace(jB,function(f,v){var c=v.length,d=v;d.charAt(0)==="["&&d.charAt(c-1)==="]"&&(d=+d.slice(1,c-1));var p=Fo(s,e,d);if(o&&W(o.interpolatedValue)){var g=s.getDimensionIndex(d);g>=0&&(p=o.interpolatedValue[g])}return p!=null?p+"":""})}},r.prototype.getRawValue=function(e,t){return Fo(this.getData(t),e)},r.prototype.formatTooltip=function(e,t,a){},r}();function Ub(r){var e,t;return lt(r)?r.type&&(t=r):e=r,{text:e,frag:t}}function _l(r){return new JB(r)}var JB=function(){function r(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return r.prototype.perform=function(e){var t=this._upstream,a=e&&e.skip;if(this._dirty&&t){var i=this.context;i.data=i.outputData=t.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var n;this._plan&&!a&&(n=this._plan(this.context));var o=h(this._modBy),s=this._modDataCount||0,l=h(e&&e.modBy),u=e&&e.modDataCount||0;(o!==l||s!==u)&&(n="reset");function h(m){return!(m>=1)&&(m=1),m}var f;(this._dirty||n==="reset")&&(this._dirty=!1,f=this._doReset(a)),this._modBy=l,this._modDataCount=u;var v=e&&e.step;if(t?this._dueEnd=t._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var c=this._dueIndex,d=Math.min(v!=null?this._dueIndex+v:1/0,this._dueEnd);if(!a&&(f||c<d)){var p=this._progress;if(W(p))for(var g=0;g<p.length;g++)this._doProgress(p[g],c,d,l,u);else this._doProgress(p,c,d,l,u)}this._dueIndex=d;var y=this._settedOutputEnd!=null?this._settedOutputEnd:d;this._outputDueEnd=y}else this._dueIndex=this._outputDueEnd=this._settedOutputEnd!=null?this._settedOutputEnd:this._dueEnd;return this.unfinished()},r.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},r.prototype._doProgress=function(e,t,a,i,n){Yb.reset(t,a,i,n),this._callingProgress=e,this._callingProgress({start:t,end:a,count:a-t,next:Yb.next},this.context)},r.prototype._doReset=function(e){this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null;var t,a;!e&&this._reset&&(t=this._reset(this.context),t&&t.progress&&(a=t.forceFirstProgress,t=t.progress),W(t)&&!t.length&&(t=null)),this._progress=t,this._modBy=this._modDataCount=null;var i=this._downstream;return i&&i.dirty(),a},r.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},r.prototype.pipe=function(e){(this._downstream!==e||this._dirty)&&(this._downstream=e,e._upstream=this,e.dirty())},r.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},r.prototype.getUpstream=function(){return this._upstream},r.prototype.getDownstream=function(){return this._downstream},r.prototype.setOutputEnd=function(e){this._outputDueEnd=this._settedOutputEnd=e},r}(),Yb=function(){var r,e,t,a,i,n={reset:function(l,u,h,f){e=l,r=u,t=h,a=f,i=Math.ceil(a/t),n.next=t>1&&a>0?s:o}};return n;function o(){return e<r?e++:null}function s(){var l=e%i*t+Math.ceil(e/i),u=e>=r?null:l<a?l:e;return e++,u}}();function xi(r,e){var t=e&&e.type;return t==="ordinal"?r:(t==="time"&&!Dt(r)&&r!=null&&r!=="-"&&(r=+Qi(r)),r==null||r===""?NaN:Number(r))}var QB=J({number:function(r){return parseFloat(r)},time:function(r){return+Qi(r)},trim:function(r){return $(r)?cr(r):r}});function Zb(r){return QB.get(r)}var $b={lt:function(r,e){return r<e},lte:function(r,e){return r<=e},gt:function(r,e){return r>e},gte:function(r,e){return r>=e}},tz=function(){function r(e,t){if(!Dt(t)){var a="";Rt(a)}this._opFn=$b[e],this._rvalFloat=Pa(t)}return r.prototype.evaluate=function(e){return Dt(e)?this._opFn(e,this._rvalFloat):this._opFn(Pa(e),this._rvalFloat)},r}(),Xb=function(){function r(e,t){var a=e==="desc";this._resultLT=a?1:-1,t==null&&(t=a?"min":"max"),this._incomparable=t==="min"?-1/0:1/0}return r.prototype.evaluate=function(e,t){var a=Dt(e)?e:Pa(e),i=Dt(t)?t:Pa(t),n=isNaN(a),o=isNaN(i);if(n&&(a=this._incomparable),o&&(i=this._incomparable),n&&o){var s=$(e),l=$(t);s&&(a=l?e:0),l&&(i=s?t:0)}return a<i?this._resultLT:a>i?-this._resultLT:0},r}(),ez=function(){function r(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=Pa(t)}return r.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var a=typeof e;a!==this._rvalTypeof&&(a==="number"||this._rvalTypeof==="number")&&(t=Pa(e)===this._rvalFloat)}return this._isEQ?t:!t},r}();function rz(r,e){return r==="eq"||r==="ne"?new ez(r==="eq",e):K($b,r)?new tz(r,e):null}var az=function(){function r(){}return r.prototype.getRawData=function(){throw new Error("not supported")},r.prototype.getRawDataItem=function(e){throw new Error("not supported")},r.prototype.cloneRawData=function(){},r.prototype.getDimensionInfo=function(e){},r.prototype.cloneAllDimensionInfo=function(){},r.prototype.count=function(){},r.prototype.retrieveValue=function(e,t){},r.prototype.retrieveValueFromItem=function(e,t){},r.prototype.convertValue=function(e,t){return xi(e,t)},r}();function iz(r,e){var t=new az,a=r.data,i=t.sourceFormat=r.sourceFormat,n=r.startIndex,o="";r.seriesLayoutBy!==Fr&&Rt(o);var s=[],l={},u=r.dimensionsDefine;if(u)M(u,function(p,g){var y=p.name,m={index:g,name:y,displayName:p.displayName};if(s.push(m),y!=null){var _="";K(l,y)&&Rt(_),l[y]=m}});else for(var h=0;h<r.dimensionsDetectedCount;h++)s.push({index:h});var f=Gb(i,Fr);e.__isBuiltIn&&(t.getRawDataItem=function(p){return f(a,n,s,p)},t.getRawData=X(nz,null,r)),t.cloneRawData=X(oz,null,r);var v=Hb(i,Fr);t.count=X(v,null,a,n,s);var c=Wb(i);t.retrieveValue=function(p,g){var y=f(a,n,s,p);return d(y,g)};var d=t.retrieveValueFromItem=function(p,g){if(p!=null){var y=s[g];if(y)return c(p,g,y.name)}};return t.getDimensionInfo=X(sz,null,s,l),t.cloneAllDimensionInfo=X(lz,null,s),t}function nz(r){var e=r.sourceFormat;if(!Yp(e)){var t="";Rt(t)}return r.data}function oz(r){var e=r.sourceFormat,t=r.data;if(!Yp(e)){var a="";Rt(a)}if(e===Te){for(var i=[],n=0,o=t.length;n<o;n++)i.push(t[n].slice());return i}else if(e===ur){for(var i=[],n=0,o=t.length;n<o;n++)i.push(F({},t[n]));return i}}function sz(r,e,t){if(t!=null){if(Dt(t)||!isNaN(t)&&!K(e,t))return r[t];if(K(e,t))return e[t]}}function lz(r){return at(r)}var qb=J();function uz(r){r=at(r);var e=r.type,t="";e||Rt(t);var a=e.split(":");a.length!==2&&Rt(t);var i=!1;a[0]==="echarts"&&(e=a[1],i=!0),r.__isBuiltIn=i,qb.set(e,r)}function hz(r,e,t){var a=Vt(r),i=a.length,n="";i||Rt(n);for(var o=0,s=i;o<s;o++){var l=a[o];e=fz(l,e),o!==s-1&&(e.length=Math.max(e.length,1))}return e}function fz(r,e,t,a){var i="";e.length||Rt(i),lt(r)||Rt(i);var n=r.type,o=qb.get(n);o||Rt(i);var s=U(e,function(u){return iz(u,o)}),l=Vt(o.transform({upstream:s[0],upstreamList:s,config:at(r.config)}));return U(l,function(u,h){var f="";lt(u)||Rt(f),u.data||Rt(f);var v=kb(u.data);Yp(v)||Rt(f);var c,d=e[0];if(d&&h===0&&!u.dimensions){var p=d.startIndex;p&&(u.data=d.data.slice(0,p).concat(u.data)),c={seriesLayoutBy:Fr,sourceHeader:p,dimensions:d.metaRawOption.dimensions}}else c={seriesLayoutBy:Fr,sourceHeader:0,dimensions:u.dimensions};return Fp(u.data,c,null)})}function Yp(r){return r===Te||r===ur}var nf="undefined",vz=typeof Uint32Array===nf?Array:Uint32Array,cz=typeof Uint16Array===nf?Array:Uint16Array,Kb=typeof Int32Array===nf?Array:Int32Array,jb=typeof Float64Array===nf?Array:Float64Array,Jb={float:jb,int:Kb,ordinal:Array,number:Array,time:jb},Zp;function Ho(r){return r>65535?vz:cz}function Wo(){return[1/0,-1/0]}function dz(r){var e=r.constructor;return e===Array?r.slice():new e(r)}function Qb(r,e,t,a,i){var n=Jb[t||"float"];if(i){var o=r[e],s=o&&o.length;if(s!==a){for(var l=new n(a),u=0;u<s;u++)l[u]=o[u];r[e]=l}}else r[e]=new n(a)}var $p=function(){function r(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=J()}return r.prototype.initData=function(e,t,a){this._provider=e,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var i=e.getSource(),n=this.defaultDimValueGetter=Zp[i.sourceFormat];this._dimValueGetter=a||n,this._rawExtent=[],Ob(i),this._dimensions=U(t,function(o){return{type:o.type,property:o.property}}),this._initDataFromProvider(0,e.count())},r.prototype.getProvider=function(){return this._provider},r.prototype.getSource=function(){return this._provider.getSource()},r.prototype.ensureCalculationDimension=function(e,t){var a=this._calcDimNameToIdx,i=this._dimensions,n=a.get(e);if(n!=null){if(i[n].type===t)return n}else n=i.length;return i[n]={type:t},a.set(e,n),this._chunks[n]=new Jb[t||"float"](this._rawCount),this._rawExtent[n]=Wo(),n},r.prototype.collectOrdinalMeta=function(e,t){var a=this._chunks[e],i=this._dimensions[e],n=this._rawExtent,o=i.ordinalOffset||0,s=a.length;o===0&&(n[e]=Wo());for(var l=n[e],u=o;u<s;u++){var h=a[u]=t.parseAndCollect(a[u]);isNaN(h)||(l[0]=Math.min(h,l[0]),l[1]=Math.max(h,l[1]))}i.ordinalMeta=t,i.ordinalOffset=s,i.type="ordinal"},r.prototype.getOrdinalMeta=function(e){var t=this._dimensions[e],a=t.ordinalMeta;return a},r.prototype.getDimensionProperty=function(e){var t=this._dimensions[e];return t&&t.property},r.prototype.appendData=function(e){var t=this._provider,a=this.count();t.appendData(e);var i=t.count();return t.persistent||(i+=a),a<i&&this._initDataFromProvider(a,i,!0),[a,i]},r.prototype.appendValues=function(e,t){for(var a=this._chunks,i=this._dimensions,n=i.length,o=this._rawExtent,s=this.count(),l=s+Math.max(e.length,t||0),u=0;u<n;u++){var h=i[u];Qb(a,u,h.type,l,!0)}for(var f=[],v=s;v<l;v++)for(var c=v-s,d=0;d<n;d++){var h=i[d],p=Zp.arrayRows.call(this,e[c]||f,h.property,c,d);a[d][v]=p;var g=o[d];p<g[0]&&(g[0]=p),p>g[1]&&(g[1]=p)}return this._rawCount=this._count=l,{start:s,end:l}},r.prototype._initDataFromProvider=function(e,t,a){for(var i=this._provider,n=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=U(o,function(m){return m.property}),h=0;h<s;h++){var f=o[h];l[h]||(l[h]=Wo()),Qb(n,h,f.type,t,a)}if(i.fillStorage)i.fillStorage(e,t,n,l);else for(var v=[],c=e;c<t;c++){v=i.getItem(c,v);for(var d=0;d<s;d++){var p=n[d],g=this._dimValueGetter(v,u[d],c,d);p[c]=g;var y=l[d];g<y[0]&&(y[0]=g),g>y[1]&&(y[1]=g)}}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=t,this._extent=[]},r.prototype.count=function(){return this._count},r.prototype.get=function(e,t){if(!(t>=0&&t<this._count))return NaN;var a=this._chunks[e];return a?a[this.getRawIndex(t)]:NaN},r.prototype.getValues=function(e,t){var a=[],i=[];if(t==null){t=e,e=[];for(var n=0;n<this._dimensions.length;n++)i.push(n)}else i=e;for(var n=0,o=i.length;n<o;n++)a.push(this.get(i[n],t));return a},r.prototype.getByRawIndex=function(e,t){if(!(t>=0&&t<this._rawCount))return NaN;var a=this._chunks[e];return a?a[t]:NaN},r.prototype.getSum=function(e){var t=this._chunks[e],a=0;if(t)for(var i=0,n=this.count();i<n;i++){var o=this.get(e,i);isNaN(o)||(a+=o)}return a},r.prototype.getMedian=function(e){var t=[];this.each([e],function(n){isNaN(n)||t.push(n)});var a=t.sort(function(n,o){return n-o}),i=this.count();return i===0?0:i%2===1?a[(i-1)/2]:(a[i/2]+a[i/2-1])/2},r.prototype.indexOfRawIndex=function(e){if(e>=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,a=t[e];if(a!=null&&a<this._count&&a===e)return e;for(var i=0,n=this._count-1;i<=n;){var o=(i+n)/2|0;if(t[o]<e)i=o+1;else if(t[o]>e)n=o-1;else return o}return-1},r.prototype.getIndices=function(){var e,t=this._indices;if(t){var a=t.constructor,i=this._count;if(a===Array){e=new a(i);for(var n=0;n<i;n++)e[n]=t[n]}else e=new a(t.buffer,0,i)}else{var a=Ho(this._rawCount);e=new a(this.count());for(var n=0;n<e.length;n++)e[n]=n}return e},r.prototype.filter=function(e,t){if(!this._count)return this;for(var a=this.clone(),i=a.count(),n=Ho(a._rawCount),o=new n(i),s=[],l=e.length,u=0,h=e[0],f=a._chunks,v=0;v<i;v++){var c=void 0,d=a.getRawIndex(v);if(l===0)c=t(v);else if(l===1){var p=f[h][d];c=t(p,v)}else{for(var g=0;g<l;g++)s[g]=f[e[g]][d];s[g]=v,c=t.apply(null,s)}c&&(o[u++]=d)}return u<i&&(a._indices=o),a._count=u,a._extent=[],a._updateGetRawIdx(),a},r.prototype.selectRange=function(e){var t=this.clone(),a=t._count;if(!a)return this;var i=Mt(e),n=i.length;if(!n)return this;var o=t.count(),s=Ho(t._rawCount),l=new s(o),u=0,h=i[0],f=e[h][0],v=e[h][1],c=t._chunks,d=!1;if(!t._indices){var p=0;if(n===1){for(var g=c[i[0]],y=0;y<a;y++){var m=g[y];(m>=f&&m<=v||isNaN(m))&&(l[u++]=p),p++}d=!0}else if(n===2){for(var g=c[i[0]],_=c[i[1]],x=e[i[1]][0],b=e[i[1]][1],y=0;y<a;y++){var m=g[y],S=_[y];(m>=f&&m<=v||isNaN(m))&&(S>=x&&S<=b||isNaN(S))&&(l[u++]=p),p++}d=!0}}if(!d)if(n===1)for(var y=0;y<o;y++){var w=t.getRawIndex(y),m=c[i[0]][w];(m>=f&&m<=v||isNaN(m))&&(l[u++]=w)}else for(var y=0;y<o;y++){for(var T=!0,w=t.getRawIndex(y),C=0;C<n;C++){var A=i[C],m=c[A][w];(m<e[A][0]||m>e[A][1])&&(T=!1)}T&&(l[u++]=t.getRawIndex(y))}return u<o&&(t._indices=l),t._count=u,t._extent=[],t._updateGetRawIdx(),t},r.prototype.map=function(e,t){var a=this.clone(e);return this._updateDims(a,e,t),a},r.prototype.modify=function(e,t){this._updateDims(this,e,t)},r.prototype._updateDims=function(e,t,a){for(var i=e._chunks,n=[],o=t.length,s=e.count(),l=[],u=e._rawExtent,h=0;h<t.length;h++)u[t[h]]=Wo();for(var f=0;f<s;f++){for(var v=e.getRawIndex(f),c=0;c<o;c++)l[c]=i[t[c]][v];l[o]=f;var d=a&&a.apply(null,l);if(d!=null){typeof d!="object"&&(n[0]=d,d=n);for(var h=0;h<d.length;h++){var p=t[h],g=d[h],y=u[p],m=i[p];m&&(m[v]=g),g<y[0]&&(y[0]=g),g>y[1]&&(y[1]=g)}}}},r.prototype.lttbDownSample=function(e,t){var a=this.clone([e],!0),i=a._chunks,n=i[e],o=this.count(),s=0,l=Math.floor(1/t),u=this.getRawIndex(0),h,f,v,c=new(Ho(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));c[s++]=u;for(var d=1;d<o-1;d+=l){for(var p=Math.min(d+l,o-1),g=Math.min(d+l*2,o),y=(g+p)/2,m=0,_=p;_<g;_++){var x=this.getRawIndex(_),b=n[x];isNaN(b)||(m+=b)}m/=g-p;var S=d,w=Math.min(d+l,o),T=d-1,C=n[u];h=-1,v=S;for(var A=-1,D=0,_=S;_<w;_++){var x=this.getRawIndex(_),b=n[x];if(isNaN(b)){D++,A<0&&(A=x);continue}f=Math.abs((T-y)*(b-C)-(T-_)*(m-C)),f>h&&(h=f,v=x)}D>0&&D<w-S&&(c[s++]=Math.min(A,v),v=Math.max(A,v)),c[s++]=v,u=v}return c[s++]=this.getRawIndex(o-1),a._count=s,a._indices=c,a.getRawIndex=this._getRawIdx,a},r.prototype.minmaxDownSample=function(e,t){for(var a=this.clone([e],!0),i=a._chunks,n=Math.floor(1/t),o=i[e],s=this.count(),l=new(Ho(this._rawCount))(Math.ceil(s/n)*2),u=0,h=0;h<s;h+=n){var f=h,v=o[this.getRawIndex(f)],c=h,d=o[this.getRawIndex(c)],p=n;h+n>s&&(p=s-h);for(var g=0;g<p;g++){var y=this.getRawIndex(h+g),m=o[y];m<v&&(v=m,f=h+g),m>d&&(d=m,c=h+g)}var _=this.getRawIndex(f),x=this.getRawIndex(c);f<c?(l[u++]=_,l[u++]=x):(l[u++]=x,l[u++]=_)}return a._count=u,a._indices=l,a._updateGetRawIdx(),a},r.prototype.downSample=function(e,t,a,i){for(var n=this.clone([e],!0),o=n._chunks,s=[],l=Math.floor(1/t),u=o[e],h=this.count(),f=n._rawExtent[e]=Wo(),v=new(Ho(this._rawCount))(Math.ceil(h/l)),c=0,d=0;d<h;d+=l){l>h-d&&(l=h-d,s.length=l);for(var p=0;p<l;p++){var g=this.getRawIndex(d+p);s[p]=u[g]}var y=a(s),m=this.getRawIndex(Math.min(d+i(s,y)||0,h-1));u[m]=y,y<f[0]&&(f[0]=y),y>f[1]&&(f[1]=y),v[c++]=m}return n._count=c,n._indices=v,n._updateGetRawIdx(),n},r.prototype.each=function(e,t){if(this._count)for(var a=e.length,i=this._chunks,n=0,o=this.count();n<o;n++){var s=this.getRawIndex(n);switch(a){case 0:t(n);break;case 1:t(i[e[0]][s],n);break;case 2:t(i[e[0]][s],i[e[1]][s],n);break;default:for(var l=0,u=[];l<a;l++)u[l]=i[e[l]][s];u[l]=n,t.apply(null,u)}}},r.prototype.getDataExtent=function(e){var t=this._chunks[e],a=Wo();if(!t)return a;var i=this.count(),n=!this._indices,o;if(n)return this._rawExtent[e].slice();if(o=this._extent[e],o)return o.slice();o=a;for(var s=o[0],l=o[1],u=0;u<i;u++){var h=this.getRawIndex(u),f=t[h];f<s&&(s=f),f>l&&(l=f)}return o=[s,l],this._extent[e]=o,o},r.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var a=[],i=this._chunks,n=0;n<i.length;n++)a.push(i[n][t]);return a},r.prototype.clone=function(e,t){var a=new r,i=this._chunks,n=e&&Xr(e,function(s,l){return s[l]=!0,s},{});if(n)for(var o=0;o<i.length;o++)a._chunks[o]=n[o]?dz(i[o]):i[o];else a._chunks=i;return this._copyCommonProps(a),t||(a._indices=this._cloneIndices()),a._updateGetRawIdx(),a},r.prototype._copyCommonProps=function(e){e._count=this._count,e._rawCount=this._rawCount,e._provider=this._provider,e._dimensions=this._dimensions,e._extent=at(this._extent),e._rawExtent=at(this._rawExtent)},r.prototype._cloneIndices=function(){if(this._indices){var e=this._indices.constructor,t=void 0;if(e===Array){var a=this._indices.length;t=new e(a);for(var i=0;i<a;i++)t[i]=this._indices[i]}else t=new e(this._indices);return t}return null},r.prototype._getRawIdxIdentity=function(e){return e},r.prototype._getRawIdx=function(e){return e<this._count&&e>=0?this._indices[e]:-1},r.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},r.internalField=function(){function e(t,a,i,n){return xi(t[n],this._dimensions[n])}Zp={arrayRows:e,objectRows:function(t,a,i,n){return xi(t[a],this._dimensions[n])},keyedColumns:e,original:function(t,a,i,n){var o=t&&(t.value==null?t:t.value);return xi(o instanceof Array?o[n]:o,this._dimensions[n])},typedArray:function(t,a,i,n){return t[n]}}}(),r}(),tw=function(){function r(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return r.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},r.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},r.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},r.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},r.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,t=this._getUpstreamSourceManagers(),a=!!t.length,i,n;if(of(e)){var o=e,s=void 0,l=void 0,u=void 0;if(a){var h=t[0];h.prepareSource(),u=h.getSource(),s=u.data,l=u.sourceFormat,n=[h._getVersionSign()]}else s=o.get("data",!0),l=Xe(s)?_i:lr,n=[];var f=this._getSourceMetaRawOption()||{},v=u&&u.metaRawOption||{},c=Q(f.seriesLayoutBy,v.seriesLayoutBy)||null,d=Q(f.sourceHeader,v.sourceHeader),p=Q(f.dimensions,v.dimensions),g=c!==v.seriesLayoutBy||!!d!=!!v.sourceHeader||p;i=g?[Fp(s,{seriesLayoutBy:c,sourceHeader:d,dimensions:p},l)]:[]}else{var y=e;if(a){var m=this._applyTransform(t);i=m.sourceList,n=m.upstreamSignList}else{var _=y.get("source",!0);i=[Fp(_,this._getSourceMetaRawOption(),null)],n=[]}}this._setLocalSource(i,n)},r.prototype._applyTransform=function(e){var t=this._sourceHost,a=t.get("transform",!0),i=t.get("fromTransformResult",!0);if(i!=null){var n="";e.length!==1&&rw(n)}var o,s=[],l=[];return M(e,function(u){u.prepareSource();var h=u.getSource(i||0),f="";i!=null&&!h&&rw(f),s.push(h),l.push(u._getVersionSign())}),a?o=hz(a,s,{datasetIndex:t.componentIndex}):i!=null&&(o=[YB(s[0])]),{sourceList:o,upstreamSignList:l}},r.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t<e.length;t++){var a=e[t];if(a._isDirty()||this._upstreamSignList[t]!==a._getVersionSign())return!0}},r.prototype.getSource=function(e){e=e||0;var t=this._sourceList[e];if(!t){var a=this._getUpstreamSourceManagers();return a[0]&&a[0].getSource(e)}return t},r.prototype.getSharedDataStore=function(e){var t=e.makeStoreSchema();return this._innerGetDataStore(t.dimensions,e.source,t.hash)},r.prototype._innerGetDataStore=function(e,t,a){var i=0,n=this._storeList,o=n[i];o||(o=n[i]={});var s=o[a];if(!s){var l=this._getUpstreamSourceManagers()[0];of(this._sourceHost)&&l?s=l._innerGetDataStore(e,t,a):(s=new $p,s.initData(new zb(t,e.length),e)),o[a]=s}return s},r.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(of(e)){var t=Rp(e);return t?[t.getSourceManager()]:[]}else return U(xB(e),function(a){return a.getSourceManager()})},r.prototype._getSourceMetaRawOption=function(){var e=this._sourceHost,t,a,i;if(of(e))t=e.get("seriesLayoutBy",!0),a=e.get("sourceHeader",!0),i=e.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var n=e;t=n.get("seriesLayoutBy",!0),a=n.get("sourceHeader",!0),i=n.get("dimensions",!0)}return{seriesLayoutBy:t,sourceHeader:a,dimensions:i}},r}();function ew(r){var e=r.option.transform;e&&Ru(r.option.transform)}function of(r){return r.mainType==="series"}function rw(r){throw new Error(r)}var pz="line-height:1";function aw(r){var e=r.lineHeight;return e==null?pz:"line-height:"+Oe(e+"")+"px"}function iw(r,e){var t=r.color||B.color.tertiary,a=r.fontSize||12,i=r.fontWeight||"400",n=r.color||B.color.secondary,o=r.fontSize||14,s=r.fontWeight||"900";return e==="html"?{nameStyle:"font-size:"+Oe(a+"")+"px;color:"+Oe(t)+";font-weight:"+Oe(i+""),valueStyle:"font-size:"+Oe(o+"")+"px;color:"+Oe(n)+";font-weight:"+Oe(s+"")}:{nameStyle:{fontSize:a,fill:t,fontWeight:i},valueStyle:{fontSize:o,fill:n,fontWeight:s}}}var gz=[0,10,20,30],yz=["",`
59
+ `,`
60
+
61
+ `,`
62
+
63
+
64
+ `];function ue(r,e){return e.type=r,e}function Xp(r){return r.type==="section"}function nw(r){return Xp(r)?mz:_z}function ow(r){if(Xp(r)){var e=0,t=r.blocks.length,a=t>1||t>0&&!r.noHeader;return M(r.blocks,function(i){var n=ow(i);n>=e&&(e=n+ +(a&&(!n||Xp(i)&&!i.noHeader)))}),e}return 0}function mz(r,e,t,a){var i=e.noHeader,n=xz(ow(e)),o=[],s=e.blocks||[];Ee(!s||W(s)),s=s||[];var l=r.orderMode;if(e.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(K(u,l)){var h=new Xb(u[l],null);s.sort(function(p,g){return h.evaluate(p.sortParam,g.sortParam)})}else l==="seriesDesc"&&s.reverse()}M(s,function(p,g){var y=e.valueFormatter,m=nw(p)(y?F(F({},r),{valueFormatter:y}):r,p,g>0?n.html:0,a);m!=null&&o.push(m)});var f=r.renderMode==="richText"?o.join(n.richText):qp(a,o.join(""),i?t:n.html);if(i)return f;var v=Mp(e.header,"ordinal",r.useUTC),c=iw(a,r.renderMode).nameStyle,d=aw(a);return r.renderMode==="richText"?lw(r,v,c)+n.richText+f:qp(a,'<div style="'+c+";"+d+';">'+Oe(v)+"</div>"+f,t)}function _z(r,e,t,a){var i=r.renderMode,n=e.noName,o=e.noValue,s=!e.markerType,l=e.name,u=r.useUTC,h=e.valueFormatter||r.valueFormatter||function(x){return x=W(x)?x:[x],U(x,function(b,S){return Mp(b,W(c)?c[S]:c,u)})};if(!(n&&o)){var f=s?"":r.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||B.color.secondary,i),v=n?"":Mp(l,"ordinal",u),c=e.valueType,d=o?[]:h(e.value,e.dataIndex),p=!s||!n,g=!s&&n,y=iw(a,i),m=y.nameStyle,_=y.valueStyle;return i==="richText"?(s?"":f)+(n?"":lw(r,v,m))+(o?"":wz(r,d,p,g,_)):qp(a,(s?"":f)+(n?"":Sz(v,!s,m))+(o?"":bz(d,p,g,_)),t)}}function sw(r,e,t,a,i,n){if(r){var o=nw(r),s={useUTC:i,renderMode:t,orderMode:a,markupStyleCreator:e,valueFormatter:r.valueFormatter};return o(s,r,0,n)}}function xz(r){return{html:gz[r],richText:yz[r]}}function qp(r,e,t){var a='<div style="clear:both"></div>',i="margin: "+t+"px 0 0",n=aw(r);return'<div style="'+i+";"+n+';">'+e+a+"</div>"}function Sz(r,e,t){var a=e?"margin-left:2px":"";return'<span style="'+t+";"+a+'">'+Oe(r)+"</span>"}function bz(r,e,t,a){var i=t?"10px":"20px",n=e?"float:right;margin-left:"+i:"";return r=W(r)?r:[r],'<span style="'+n+";"+a+'">'+U(r,function(o){return Oe(o)}).join("&nbsp;&nbsp;")+"</span>"}function lw(r,e,t){return r.markupStyleCreator.wrapRichTextStyle(e,t)}function wz(r,e,t,a,i){var n=[i],o=a?10:20;return t&&n.push({padding:[0,0,0,o],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(W(e)?e.join(" "):e,n)}function uw(r,e){var t=r.getData().getItemVisual(e,"style"),a=t[r.visualDrawType];return wn(a)}function hw(r,e){var t=r.get("padding");return t??(e==="richText"?[8,10]:10)}var Kp=function(){function r(){this.richTextStyles={},this._nextStyleNameId=B1()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(e,t,a){var i=a==="richText"?this._generateStyleName():null,n=uB({color:t,type:e,renderMode:a,markerId:i});return $(n)?n:(this.richTextStyles[i]=n.style,n.content)},r.prototype.wrapRichTextStyle=function(e,t){var a={};W(t)?M(t,function(n){return F(a,n)}):F(a,t);var i=this._generateStyleName();return this.richTextStyles[i]=a,"{"+i+"|"+e+"}"},r}();function fw(r){var e=r.series,t=r.dataIndex,a=r.multipleSeries,i=e.getData(),n=i.mapDimensionsAll("defaultedTooltip"),o=n.length,s=e.getRawValue(t),l=W(s),u=uw(e,t),h,f,v,c;if(o>1||l&&!o){var d=Tz(s,e,t,n,u);h=d.inlineValues,f=d.inlineValueTypes,v=d.blocks,c=d.inlineValues[0]}else if(o){var p=i.getDimensionInfo(n[0]);c=h=Fo(i,t,n[0]),f=p.type}else c=h=l?s[0]:s;var g=pd(e),y=g&&e.name||"",m=i.getName(t),_=a?y:m;return ue("section",{header:y,noHeader:a||!g,sortParam:c,blocks:[ue("nameValue",{markerType:"item",markerColor:u,name:_,noName:!cr(_),value:h,valueType:f,dataIndex:t})].concat(v||[])})}function Tz(r,e,t,a,i){var n=e.getData(),o=Xr(r,function(f,v,c){var d=n.getDimensionInfo(c);return f=f||d&&d.tooltip!==!1&&d.displayName!=null},!1),s=[],l=[],u=[];a.length?M(a,function(f){h(Fo(n,t,f),f)}):M(r,h);function h(f,v){var c=n.getDimensionInfo(v);!c||c.otherDims.tooltip===!1||(o?u.push(ue("nameValue",{markerType:"subItem",markerColor:i,name:c.displayName,value:f,valueType:c.type})):(s.push(f),l.push(c.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var Si=St();function sf(r,e){return r.getName(e)||r.getId(e)}var lf="__universalTransitionEnabled",Ht=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return e.prototype.init=function(t,a,i){this.seriesIndex=this.componentIndex,this.dataTask=_l({count:Az,reset:Mz}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,i);var n=Si(this).sourceManager=new tw(this);n.prepareSource();var o=this.getInitialData(t,i);cw(o,this),this.dataTask.context.data=o,Si(this).dataBeforeProcessed=o,vw(this),this._initSelectedMapFromData(o)},e.prototype.mergeDefaultAndTheme=function(t,a){var i=dl(this),n=i?An(t):{},o=this.subType;Tt.hasClass(o)&&(o+="Series"),yt(t,a.getTheme().get(this.subType)),yt(t,this.getDefaultOption()),tn(t,"label",["show"]),this.fillDataTextStyle(t.data),i&&va(t,n,i)},e.prototype.mergeOption=function(t,a){t=yt(this.option,t,!0),this.fillDataTextStyle(t.data);var i=dl(this);i&&va(this.option,t,i);var n=Si(this).sourceManager;n.dirty(),n.prepareSource();var o=this.getInitialData(t,a);cw(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,Si(this).dataBeforeProcessed=o,vw(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(t){if(t&&!Xe(t))for(var a=["show"],i=0;i<t.length;i++)t[i]&&t[i].label&&tn(t[i],"label",a)},e.prototype.getInitialData=function(t,a){},e.prototype.appendData=function(t){var a=this.getRawData();a.appendData(t.data)},e.prototype.getData=function(t){var a=jp(this);if(a){var i=a.context.data;return t==null||!i.getLinkedData?i:i.getLinkedData(t)}else return Si(this).data},e.prototype.getAllData=function(){var t=this.getData();return t&&t.getLinkedDataAll?t.getLinkedDataAll():[{data:t}]},e.prototype.setData=function(t){var a=jp(this);if(a){var i=a.context;i.outputData=t,a!==this.dataTask&&(i.data=t)}Si(this).data=t},e.prototype.getEncode=function(){var t=this.get("encode",!0);if(t)return J(t)},e.prototype.getSourceManager=function(){return Si(this).sourceManager},e.prototype.getSource=function(){return this.getSourceManager().getSource()},e.prototype.getRawData=function(){return Si(this).dataBeforeProcessed},e.prototype.getColorBy=function(){var t=this.get("colorBy");return t||"series"},e.prototype.isColorBySeries=function(){return this.getColorBy()==="series"},e.prototype.getBaseAxis=function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},e.prototype.indicesOfNearest=function(t,a,i,n){var o=this.getData(),s=this.coordinateSystem,l=s&&s.getAxis(t);if(!s||!l)return[];var u=l.dataToCoord(i);n==null&&(n=1/0);var h=[],f=1/0,v=-1,c=0;return o.each(a,function(d,p){var g=l.dataToCoord(d),y=u-g,m=Math.abs(y);m<=n&&((m<f||m===f&&y>=0&&v<0)&&(f=m,v=y,c=0),y===v&&(h[c++]=p))}),h.length=c,h},e.prototype.formatTooltip=function(t,a,i){return fw({series:this,dataIndex:t,multipleSeries:a})},e.prototype.isAnimationEnabled=function(){var t=this.ecModel;if(Pt.node&&!(t&&t.ssr))return!1;var a=this.getShallow("animation");return a&&this.getData().count()>this.getShallow("animationThreshold")&&(a=!1),!!a},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,a,i){var n=this.ecModel,o=Op.prototype.getColorFromPalette.call(this,t,a,i);return o||(o=n.getColorFromPalette(t,a,i)),o},e.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(t,a){this._innerSelect(this.getData(a),t)},e.prototype.unselect=function(t,a){var i=this.option.selectedMap;if(i){var n=this.option.selectedMode,o=this.getData(a);if(n==="series"||i==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s<t.length;s++){var l=t[s],u=sf(o,l);i[u]=!1,this._selectedDataIndicesMap[u]=-1}}},e.prototype.toggleSelect=function(t,a){for(var i=[],n=0;n<t.length;n++)i[0]=t[n],this.isSelected(t[n],a)?this.unselect(i,a):this.select(i,a)},e.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap==="all")return[].slice.call(this.getData().getIndices());for(var t=this._selectedDataIndicesMap,a=Mt(t),i=[],n=0;n<a.length;n++){var o=t[a[n]];o>=0&&i.push(o)}return i},e.prototype.isSelected=function(t,a){var i=this.option.selectedMap;if(!i)return!1;var n=this.getData(a);return(i==="all"||i[sf(n,t)])&&!n.getItemModel(t).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[lf])return!0;var t=this.option.universalTransition;return t?t===!0?!0:t&&t.enabled:!1},e.prototype._innerSelect=function(t,a){var i,n,o=this.option,s=o.selectedMode,l=a.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){lt(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,h=0;h<l;h++){var f=a[h],v=sf(t,f);u[v]=!0,this._selectedDataIndicesMap[v]=t.getRawIndex(f)}}else if(s==="single"||s===!0){var c=a[l-1],v=sf(t,c);o.selectedMap=(i={},i[v]=!0,i),this._selectedDataIndicesMap=(n={},n[v]=t.getRawIndex(c),n)}}},e.prototype._initSelectedMapFromData=function(t){if(!this.option.selectedMap){var a=[];t.hasItemOption&&t.each(function(i){var n=t.getRawDataItem(i);n&&n.selected&&a.push(i)}),a.length>0&&this._innerSelect(t,a)}},e.registerClass=function(t){return Tt.registerClass(t)},e.protoInitialize=function(){var t=e.prototype;t.type="series.__base__",t.seriesIndex=0,t.ignoreStyleOnData=!1,t.hasSymbolVisual=!1,t.defaultSymbol="circle",t.visualStyleAccessPath="itemStyle",t.visualDrawType="fill"}(),e}(Tt);ie(Ht,af),ie(Ht,Op),J1(Ht,Tt);function vw(r){var e=r.name;pd(r)||(r.name=Cz(r)||e)}function Cz(r){var e=r.getRawData(),t=e.mapDimensionsAll("seriesName"),a=[];return M(t,function(i){var n=e.getDimensionInfo(i);n.displayName&&a.push(n.displayName)}),a.join(" ")}function Az(r){return r.model.getRawData().count()}function Mz(r){var e=r.model;return e.setData(e.getRawData().cloneShallow()),Dz}function Dz(r,e){e.outputData&&r.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function cw(r,e){M(ks(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(t){r.wrapMethod(t,pt(Lz,e))})}function Lz(r,e){var t=jp(r);return t&&t.setOutputEnd((e||this).count()),e}function jp(r){var e=(r.ecModel||{}).scheduler,t=e&&e.getPipeline(r.uid);if(t){var a=t.currentTask;if(a){var i=a.agentStubMap;i&&(a=i.get(r.uid))}return a}}var Zt=function(){function r(){this.group=new et,this.uid=Bo("viewComponent")}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,a,i){},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,a,i){},r.prototype.updateLayout=function(e,t,a,i){},r.prototype.updateVisual=function(e,t,a,i){},r.prototype.toggleBlurSeries=function(e,t,a){},r.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},r}();_d(Zt),ch(Zt);function Uo(){var r=St();return function(e){var t=r(e),a=e.pipelineContext,i=!!t.large,n=!!t.progressiveRender,o=t.large=!!(a&&a.large),s=t.progressiveRender=!!(a&&a.progressiveRender);return(i!==o||n!==s)&&"reset"}}var dw=St(),Iz=Uo(),zt=function(){function r(){this.group=new et,this.uid=Bo("viewChart"),this.renderTask=_l({plan:Pz,reset:kz}),this.renderTask.context={view:this}}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,a,i){},r.prototype.highlight=function(e,t,a,i){var n=e.getData(i&&i.dataType);n&&gw(n,i,"emphasis")},r.prototype.downplay=function(e,t,a,i){var n=e.getData(i&&i.dataType);n&&gw(n,i,"normal")},r.prototype.remove=function(e,t){this.group.removeAll()},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,a,i){this.render(e,t,a,i)},r.prototype.updateLayout=function(e,t,a,i){this.render(e,t,a,i)},r.prototype.updateVisual=function(e,t,a,i){this.render(e,t,a,i)},r.prototype.eachRendered=function(e){gi(this.group,e)},r.markUpdateMethod=function(e,t){dw(e).updateMethod=t},r.protoInitialize=function(){var e=r.prototype;e.type="chart"}(),r}();function pw(r,e,t){r&&Qs(r)&&(e==="emphasis"?Oa:Na)(r,t)}function gw(r,e,t){var a=en(r,e),i=e&&e.highlightKey!=null?jO(e.highlightKey):null;a!=null?M(Vt(a),function(n){pw(r.getItemGraphicEl(n),t,i)}):r.eachItemGraphicEl(function(n){pw(n,t,i)})}_d(zt),ch(zt);function Pz(r){return Iz(r.model)}function kz(r){var e=r.model,t=r.ecModel,a=r.api,i=r.payload,n=e.pipelineContext.progressiveRender,o=r.view,s=i&&dw(i).updateMethod,l=n?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](e,t,a,i),Rz[l]}var Rz={incrementalPrepareRender:{progress:function(r,e){e.view.incrementalRender(r,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(r,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},uf="\0__throttleOriginMethod",yw="\0__throttleRate",mw="\0__throttleType";function Jp(r,e,t){var a,i=0,n=0,o=null,s,l,u,h;e=e||0;function f(){n=new Date().getTime(),o=null,r.apply(l,u||[])}var v=function(){for(var c=[],d=0;d<arguments.length;d++)c[d]=arguments[d];a=new Date().getTime(),l=this,u=c;var p=h||e,g=h||t;h=null,s=a-(g?i:n)-p,clearTimeout(o),g?o=setTimeout(f,p):s>=0?f():o=setTimeout(f,-s),i=a};return v.clear=function(){o&&(clearTimeout(o),o=null)},v.debounceNextCall=function(c){h=c},v}function Yo(r,e,t,a){var i=r[e];if(i){var n=i[uf]||i,o=i[mw],s=i[yw];if(s!==t||o!==a){if(t==null||!a)return r[e]=n;i=r[e]=Jp(n,t,a==="debounce"),i[uf]=n,i[mw]=a,i[yw]=t}return i}}function xl(r,e){var t=r[e];t&&t[uf]&&(t.clear&&t.clear(),r[e]=t[uf])}var _w=St(),xw={itemStyle:an(zS,!0),lineStyle:an(BS,!0)},Ez={lineStyle:"stroke",itemStyle:"fill"};function Sw(r,e){var t=r.visualStyleMapper||xw[e];return t||(console.warn("Unknown style type '"+e+"'."),xw.itemStyle)}function bw(r,e){var t=r.visualDrawType||Ez[e];return t||(console.warn("Unknown style type '"+e+"'."),"fill")}var Oz={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData(),a=r.visualStyleAccessPath||"itemStyle",i=r.getModel(a),n=Sw(r,a),o=n(i),s=i.getShallow("decal");s&&(t.setVisual("decal",s),s.dirty=!0);var l=bw(r,a),u=o[l],h=rt(u)?u:null,f=o.fill==="auto"||o.stroke==="auto";if(!o[l]||h||f){var v=r.getColorFromPalette(r.name,null,e.getSeriesCount());o[l]||(o[l]=v,t.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||rt(o.fill)?v:o.fill,o.stroke=o.stroke==="auto"||rt(o.stroke)?v:o.stroke}if(t.setVisual("style",o),t.setVisual("drawType",l),!e.isSeriesFiltered(r)&&h)return t.setVisual("colorFromPalette",!1),{dataEach:function(c,d){var p=r.getDataParams(d),g=F({},o);g[l]=h(p),c.setItemVisual(d,"style",g)}}}},Sl=new Ct,Nz={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){if(!(r.ignoreStyleOnData||e.isSeriesFiltered(r))){var t=r.getData(),a=r.visualStyleAccessPath||"itemStyle",i=Sw(r,a),n=t.getVisual("drawType");return{dataEach:t.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[a]){Sl.option=l[a];var u=i(Sl),h=o.ensureUniqueItemVisual(s,"style");F(h,u),Sl.option.decal&&(o.setItemVisual(s,"decal",Sl.option.decal),Sl.option.decal.dirty=!0),n in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},Bz={performRawSeries:!0,overallReset:function(r){var e=J();r.eachSeries(function(t){var a=t.getColorBy();if(!t.isColorBySeries()){var i=t.type+"-"+a,n=e.get(i);n||(n={},e.set(i,n)),_w(t).scope=n}}),r.eachSeries(function(t){if(!(t.isColorBySeries()||r.isSeriesFiltered(t))){var a=t.getRawData(),i={},n=t.getData(),o=_w(t).scope,s=t.visualStyleAccessPath||"itemStyle",l=bw(t,s);n.each(function(u){var h=n.getRawIndex(u);i[h]=u}),a.each(function(u){var h=i[u],f=n.getItemVisual(h,"colorFromPalette");if(f){var v=n.ensureUniqueItemVisual(h,"style"),c=a.getName(u)||u+"",d=a.count();v[l]=t.getColorFromPalette(c,o,d)}})}})}},hf=Math.PI;function zz(r,e){e=e||{},st(e,{text:"loading",textColor:B.color.primary,fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255,255,255,0.8)",showSpinner:!0,color:B.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var t=new et,a=new _t({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});t.add(a);var i=new Lt({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),n=new _t({style:{fill:"none"},textContent:i,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});t.add(n);var o;return e.showSpinner&&(o=new rp({shape:{startAngle:-hf/2,endAngle:-hf/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:hf*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:hf*3/2}).delay(300).start("circularInOut"),t.add(o)),t.resize=function(){var s=i.getBoundingRect().width,l=e.showSpinner?e.spinnerRadius:0,u=(r.getWidth()-l*2-(e.showSpinner&&s?10:0)-s)/2-(e.showSpinner&&s?0:5+s/2)+(e.showSpinner?0:s/2)+(s?0:l),h=r.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:r.getWidth(),height:r.getHeight()})},t.resize(),t}var ww=function(){function r(e,t,a,i){this._stageTaskMap=J(),this.ecInstance=e,this.api=t,a=this._dataProcessorHandlers=a.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=a.concat(i)}return r.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(a){var i=a.overallTask;i&&i.dirty()})},r.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var a=this._pipelineMap.get(e.__pipeline.id),i=a.context,n=!t&&a.progressiveEnabled&&(!i||i.progressiveRender)&&e.__idxInPipeline>a.blockIndex,o=n?a.step:null,s=i&&i.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},r.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},r.prototype.updateStreamModes=function(e,t){var a=this._pipelineMap.get(e.uid),i=e.getData(),n=i.count(),o=a.progressiveEnabled&&t.incrementalPrepareRender&&n>=a.threshold,s=e.get("large")&&n>=e.get("largeThreshold"),l=e.get("progressiveChunkMode")==="mod"?n:null;e.pipelineContext=a.context={progressiveRender:o,modDataCount:l,large:s}},r.prototype.restorePipelines=function(e){var t=this,a=t._pipelineMap=J();e.eachSeries(function(i){var n=i.getProgressive(),o=i.uid;a.set(o,{id:o,head:null,tail:null,threshold:i.getProgressiveThreshold(),progressiveEnabled:n&&!(i.preventIncremental&&i.preventIncremental()),blockIndex:-1,step:Math.round(n||700),count:0}),t._pipe(i,i.dataTask)})},r.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),a=this.api;M(this._allHandlers,function(i){var n=e.get(i.uid)||e.set(i.uid,{}),o="";Ee(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,n,t,a),i.overallReset&&this._createOverallStageTask(i,n,t,a)},this)},r.prototype.prepareView=function(e,t,a,i){var n=e.renderTask,o=n.context;o.model=t,o.ecModel=a,o.api=i,n.__block=!e.incrementalPrepareRender,this._pipe(t,n)},r.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},r.prototype.performVisualTasks=function(e,t,a){this._performStageTasks(this._visualHandlers,e,t,a)},r.prototype._performStageTasks=function(e,t,a,i){i=i||{};var n=!1,o=this;M(e,function(l,u){if(!(i.visualType&&i.visualType!==l.visualType)){var h=o._stageTaskMap.get(l.uid),f=h.seriesTaskMap,v=h.overallTask;if(v){var c,d=v.agentStubMap;d.each(function(g){s(i,g)&&(g.dirty(),c=!0)}),c&&v.dirty(),o.updatePayload(v,a);var p=o.getPerformArgs(v,i.block);d.each(function(g){g.perform(p)}),v.perform(p)&&(n=!0)}else f&&f.each(function(g,y){s(i,g)&&g.dirty();var m=o.getPerformArgs(g,i.block);m.skip=!l.performRawSeries&&t.isSeriesFiltered(g.context.model),o.updatePayload(g,a),g.perform(m)&&(n=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=n||this.unfinished},r.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(a){t=a.dataTask.perform()||t}),this.unfinished=t||this.unfinished},r.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},r.prototype.updatePayload=function(e,t){t!=="remain"&&(e.context.payload=t)},r.prototype._createSeriesStageTask=function(e,t,a,i){var n=this,o=t.seriesTaskMap,s=t.seriesTaskMap=J(),l=e.seriesType,u=e.getTargetSeries;e.createOnAllSeries?a.eachRawSeries(h):l?a.eachRawSeriesByType(l,h):u&&u(a,i).each(h);function h(f){var v=f.uid,c=s.set(v,o&&o.get(v)||_l({plan:Wz,reset:Uz,count:Zz}));c.context={model:f,ecModel:a,api:i,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:n},n._pipe(f,c)}},r.prototype._createOverallStageTask=function(e,t,a,i){var n=this,o=t.overallTask=t.overallTask||_l({reset:Vz});o.context={ecModel:a,api:i,overallReset:e.overallReset,scheduler:n};var s=o.agentStubMap,l=o.agentStubMap=J(),u=e.seriesType,h=e.getTargetSeries,f=!0,v=!1,c="";Ee(!e.createOnAllSeries,c),u?a.eachRawSeriesByType(u,d):h?h(a,i).each(d):(f=!1,M(a.getSeries(),d));function d(p){var g=p.uid,y=l.set(g,s&&s.get(g)||(v=!0,_l({reset:Gz,onDirty:Hz})));y.context={model:p,overallProgress:f},y.agent=o,y.__block=f,n._pipe(p,y)}v&&o.dirty()},r.prototype._pipe=function(e,t){var a=e.uid,i=this._pipelineMap.get(a);!i.head&&(i.head=t),i.tail&&i.tail.pipe(t),i.tail=t,t.__idxInPipeline=i.count++,t.__pipeline=i},r.wrapStageHandler=function(e,t){return rt(e)&&(e={overallReset:e,seriesType:$z(e)}),e.uid=Bo("stageHandler"),t&&(e.visualType=t),e},r}();function Vz(r){r.overallReset(r.ecModel,r.api,r.payload)}function Gz(r){return r.overallProgress&&Fz}function Fz(){this.agent.dirty(),this.getDownstream().dirty()}function Hz(){this.agent&&this.agent.dirty()}function Wz(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function Uz(r){r.useClearVisual&&r.data.clearAllVisual();var e=r.resetDefines=Vt(r.reset(r.model,r.ecModel,r.api,r.payload));return e.length>1?U(e,function(t,a){return Tw(a)}):Yz}var Yz=Tw(0);function Tw(r){return function(e,t){var a=t.data,i=t.resetDefines[r];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 Zz(r){return r.data.count()}function $z(r){ff=null;try{r(bl,Cw)}catch{}return ff}var bl={},Cw={},ff;Aw(bl,Bp),Aw(Cw,Tb),bl.eachSeriesByType=bl.eachRawSeriesByType=function(r){ff=r},bl.eachComponent=function(r){r.mainType==="series"&&r.subType&&(ff=r.subType)};function Aw(r,e){for(var t in e.prototype)r[t]=Qt}var ot=B.darkColor,Xz=ot.background,wl=function(){return{axisLine:{lineStyle:{color:ot.axisLine}},splitLine:{lineStyle:{color:ot.axisSplitLine}},splitArea:{areaStyle:{color:[ot.backgroundTint,ot.backgroundTransparent]}},minorSplitLine:{lineStyle:{color:ot.axisMinorSplitLine}},axisLabel:{color:ot.axisLabel},axisName:{}}},Mw={label:{color:ot.secondary},itemStyle:{borderColor:ot.borderTint},dividerLineStyle:{color:ot.border}},Dw={darkMode:!0,color:ot.theme,backgroundColor:Xz,axisPointer:{lineStyle:{color:ot.border},crossStyle:{color:ot.borderShade},label:{color:ot.tertiary}},legend:{textStyle:{color:ot.secondary},pageTextStyle:{color:ot.tertiary}},textStyle:{color:ot.secondary},title:{textStyle:{color:ot.primary},subtextStyle:{color:ot.quaternary}},toolbox:{iconStyle:{borderColor:ot.accent50}},tooltip:{backgroundColor:ot.neutral20,defaultBorderColor:ot.border,textStyle:{color:ot.tertiary}},dataZoom:{borderColor:ot.accent10,textStyle:{color:ot.tertiary},brushStyle:{color:ot.backgroundTint},handleStyle:{color:ot.neutral00,borderColor:ot.accent20},moveHandleStyle:{color:ot.accent40},emphasis:{handleStyle:{borderColor:ot.accent50}},dataBackground:{lineStyle:{color:ot.accent30},areaStyle:{color:ot.accent20}},selectedDataBackground:{lineStyle:{color:ot.accent50},areaStyle:{color:ot.accent30}}},visualMap:{textStyle:{color:ot.secondary},handleStyle:{borderColor:ot.neutral30}},timeline:{lineStyle:{color:ot.accent10},label:{color:ot.tertiary},controlStyle:{color:ot.accent30,borderColor:ot.accent30}},calendar:{itemStyle:{color:ot.neutral00,borderColor:ot.neutral20},dayLabel:{color:ot.tertiary},monthLabel:{color:ot.secondary},yearLabel:{color:ot.secondary}},matrix:{x:Mw,y:Mw,backgroundColor:{borderColor:ot.axisLine},body:{itemStyle:{borderColor:ot.borderTint}}},timeAxis:wl(),logAxis:wl(),valueAxis:wl(),categoryAxis:wl(),line:{symbol:"circle"},graph:{color:ot.theme},gauge:{title:{color:ot.secondary},axisLine:{lineStyle:{color:[[1,ot.neutral05]]}},axisLabel:{color:ot.axisLabel},detail:{color:ot.primary}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}},funnel:{itemStyle:{borderColor:ot.background}},radar:function(){var r=wl();return r.axisName={color:ot.axisLabel},r.axisLine.lineStyle.color=ot.neutral20,r}(),treemap:{breadcrumb:{itemStyle:{color:ot.neutral20,textStyle:{color:ot.secondary}},emphasis:{itemStyle:{color:ot.neutral30}}}},sunburst:{itemStyle:{borderColor:ot.background}},map:{itemStyle:{borderColor:ot.border,areaColor:ot.neutral10},label:{color:ot.tertiary},emphasis:{label:{color:ot.primary},itemStyle:{areaColor:ot.highlight}},select:{label:{color:ot.primary},itemStyle:{areaColor:ot.highlight}}},geo:{itemStyle:{borderColor:ot.border,areaColor:ot.neutral10},emphasis:{label:{color:ot.primary},itemStyle:{areaColor:ot.highlight}},select:{label:{color:ot.primary},itemStyle:{color:ot.highlight}}}};Dw.categoryAxis.splitLine.show=!1;var qz=function(){function r(){}return r.prototype.normalizeQuery=function(e){var t={},a={},i={};if($(e)){var n=ia(e);t.mainType=n.main||null,t.subType=n.sub||null}else{var o=["Index","Name","Id"],s={name:1,dataIndex:1,dataType:1};M(e,function(l,u){for(var h=!1,f=0;f<o.length;f++){var v=o[f],c=u.lastIndexOf(v);if(c>0&&c===u.length-v.length){var d=u.slice(0,c);d!=="data"&&(t.mainType=d,t[v.toLowerCase()]=l,h=!0)}}s.hasOwnProperty(u)&&(a[u]=l,h=!0),h||(i[u]=l)})}return{cptQuery:t,dataQuery:a,otherQuery:i}},r.prototype.filter=function(e,t){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=t.cptQuery,u=t.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(e,t.otherQuery,i,n));function h(f,v,c,d){return f[c]==null||v[d||c]===f[c]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r}(),Qp=["symbol","symbolSize","symbolRotate","symbolOffset"],Lw=Qp.concat(["symbolKeepAspect"]),Kz={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData();if(r.legendIcon&&t.setVisual("legendIcon",r.legendIcon),!r.hasSymbolVisual)return;for(var a={},i={},n=!1,o=0;o<Qp.length;o++){var s=Qp[o],l=r.get(s);rt(l)?(n=!0,i[s]=l):a[s]=l}if(a.symbol=a.symbol||r.defaultSymbol,t.setVisual(F({legendIcon:r.legendIcon||a.symbol,symbolKeepAspect:r.get("symbolKeepAspect")},a)),e.isSeriesFiltered(r))return;var u=Mt(i);function h(f,v){for(var c=r.getRawValue(v),d=r.getDataParams(v),p=0;p<u.length;p++){var g=u[p];f.setItemVisual(v,g,i[g](c,d))}}return{dataEach:n?h:null}}},jz={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){if(!r.hasSymbolVisual||e.isSeriesFiltered(r))return;var t=r.getData();function a(i,n){for(var o=i.getItemModel(n),s=0;s<Lw.length;s++){var l=Lw[s],u=o.getShallow(l,!0);u!=null&&i.setItemVisual(n,l,u)}}return{dataEach:t.hasItemOption?a:null}}};function tg(r,e,t){switch(t){case"color":var a=r.getItemVisual(e,"style");return a[r.getVisual("drawType")];case"opacity":return r.getItemVisual(e,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return r.getItemVisual(e,t)}}function Tl(r,e){switch(e){case"color":var t=r.getVisual("style");return t[r.getVisual("drawType")];case"opacity":return r.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return r.getVisual(e)}}function Iw(r,e,t,a){switch(t){case"color":var i=r.ensureUniqueItemVisual(e,"style");i[r.getVisual("drawType")]=a,r.setItemVisual(e,"colorFromPalette",!1);break;case"opacity":r.ensureUniqueItemVisual(e,"style").opacity=a;break;case"symbol":case"symbolSize":case"liftZ":r.setItemVisual(e,t,a);break}}function Pw(r,e){function t(a,i){var n=[];return a.eachComponent({mainType:"series",subType:r,query:i},function(o){n.push(o.seriesIndex)}),n}M([[r+"ToggleSelect","toggleSelect"],[r+"Select","select"],[r+"UnSelect","unselect"]],function(a){e(a[0],function(i,n,o){i=F({},i),o.dispatchAction(F(i,{type:a[1],seriesIndex:t(n,i)}))})})}function Zo(r,e,t,a,i){var n=r+e;t.isSilent(n)||a.eachComponent({mainType:"series",subType:"pie"},function(o){for(var s=o.seriesIndex,l=o.option.selectedMap,u=i.selected,h=0;h<u.length;h++)if(u[h].seriesIndex===s){var f=o.getData(),v=en(f,i.fromActionPayload);t.trigger(n,{type:n,seriesId:o.id,name:W(v)?f.getName(v[0]):f.getName(v),selected:$(l)?l:F({},l)})}})}function Jz(r,e,t){r.on("selectchanged",function(a){var i=t.getModel();a.isFromClick?(Zo("map","selectchanged",e,i,a),Zo("pie","selectchanged",e,i,a)):a.fromAction==="select"?(Zo("map","selected",e,i,a),Zo("pie","selected",e,i,a)):a.fromAction==="unselect"&&(Zo("map","unselected",e,i,a),Zo("pie","unselected",e,i,a))})}function Rn(r,e,t){for(var a;r&&!(e(r)&&(a=r,t));)r=r.__hostTarget||r.parent;return a}var Qz=Math.round(Math.random()*9),t5=typeof Object.defineProperty=="function",e5=function(){function r(){this._id="__ec_inner_"+Qz++}return r.prototype.get=function(e){return this._guard(e)[this._id]},r.prototype.set=function(e,t){var a=this._guard(e);return t5?Object.defineProperty(a,this._id,{value:t,enumerable:!1,configurable:!0}):a[this._id]=t,this},r.prototype.delete=function(e){return this.has(e)?(delete this._guard(e)[this._id],!0):!1},r.prototype.has=function(e){return!!this._guard(e)[this._id]},r.prototype._guard=function(e){if(e!==Object(e))throw TypeError("Value of WeakMap is not a non-null object.");return e},r}(),r5=e5,a5=bt.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(r,e){var t=e.cx,a=e.cy,i=e.width/2,n=e.height/2;r.moveTo(t,a-n),r.lineTo(t+i,a+n),r.lineTo(t-i,a+n),r.closePath()}}),i5=bt.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(r,e){var t=e.cx,a=e.cy,i=e.width/2,n=e.height/2;r.moveTo(t,a-n),r.lineTo(t+i,a),r.lineTo(t,a+n),r.lineTo(t-i,a),r.closePath()}}),n5=bt.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(r,e){var t=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),v=Math.cos(u),c=o*.6,d=o*.7;r.moveTo(t-h,l+s),r.arc(t,l,o,Math.PI-u,Math.PI*2+u),r.bezierCurveTo(t+h-f*c,l+s+v*c,t,a-d,t,a),r.bezierCurveTo(t,a-d,t-h+f*c,l+s+v*c,t-h,l+s),r.closePath()}}),o5=bt.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(r,e){var t=e.height,a=e.width,i=e.x,n=e.y,o=a/3*2;r.moveTo(i,n),r.lineTo(i+o,n+t),r.lineTo(i,n+t/4*3),r.lineTo(i-o,n+t),r.lineTo(i,n),r.closePath()}}),s5={line:Kt,rect:_t,roundRect:_t,square:_t,circle:Sr,diamond:i5,pin:n5,arrow:o5,triangle:a5},l5={line:function(r,e,t,a,i){i.x1=r,i.y1=e+a/2,i.x2=r+t,i.y2=e+a/2},rect:function(r,e,t,a,i){i.x=r,i.y=e,i.width=t,i.height=a},roundRect:function(r,e,t,a,i){i.x=r,i.y=e,i.width=t,i.height=a,i.r=Math.min(t,a)/4},square:function(r,e,t,a,i){var n=Math.min(t,a);i.x=r,i.y=e,i.width=n,i.height=n},circle:function(r,e,t,a,i){i.cx=r+t/2,i.cy=e+a/2,i.r=Math.min(t,a)/2},diamond:function(r,e,t,a,i){i.cx=r+t/2,i.cy=e+a/2,i.width=t,i.height=a},pin:function(r,e,t,a,i){i.x=r+t/2,i.y=e+a/2,i.width=t,i.height=a},arrow:function(r,e,t,a,i){i.x=r+t/2,i.y=e+a/2,i.width=t,i.height=a},triangle:function(r,e,t,a,i){i.cx=r+t/2,i.cy=e+a/2,i.width=t,i.height=a}},vf={};M(s5,function(r,e){vf[e]=new r});var u5=bt.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(r,e,t){var a=lh(r,e,t),i=this.shape;return i&&i.symbolType==="pin"&&e.position==="inside"&&(a.y=t.y+t.height*.4),a},buildPath:function(r,e,t){var a=e.symbolType;if(a!=="none"){var i=vf[a];i||(a="rect",i=vf[a]),l5[a](e.x,e.y,e.width,e.height,i.shape),i.buildPath(r,i.shape,t)}}});function h5(r,e){if(this.type!=="image"){var t=this.style;this.__isEmptyBrush?(t.stroke=r,t.fill=e||B.color.neutral00,t.lineWidth=2):this.shape.symbolType==="line"?t.stroke=r:t.fill=r,this.markRedraw()}}function he(r,e,t,a,i,n,o){var s=r.indexOf("empty")===0;s&&(r=r.substr(5,1).toLowerCase()+r.substr(6));var l;return r.indexOf("image://")===0?l=SS(r.slice(8),new ht(e,t,a,i),o?"center":"cover"):r.indexOf("path://")===0?l=al(r.slice(7),{},new ht(e,t,a,i),o?"center":"cover"):l=new u5({shape:{symbolType:r,x:e,y:t,width:a,height:i}}),l.__isEmptyBrush=s,l.setColor=h5,n&&l.setColor(n),l}function $o(r){return W(r)||(r=[+r,+r]),[r[0]||0,r[1]||0]}function En(r,e){if(r!=null)return W(r)||(r=[r,r]),[Z(r[0],e[0])||0,Z(Q(r[1],r[0]),e[1])||0]}function On(r){return isFinite(r)}function f5(r,e,t){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*t.width+t.x,i=i*t.width+t.x,n=n*t.height+t.y,o=o*t.height+t.y),a=On(a)?a:0,i=On(i)?i:1,n=On(n)?n:0,o=On(o)?o:0;var s=r.createLinearGradient(a,n,i,o);return s}function v5(r,e,t){var a=t.width,i=t.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+t.x,s=s*i+t.y,l=l*n),o=On(o)?o:.5,s=On(s)?s:.5,l=l>=0&&On(l)?l:.5;var u=r.createRadialGradient(o,s,0,o,s,l);return u}function eg(r,e,t){for(var a=e.type==="radial"?v5(r,e,t):f5(r,e,t),i=e.colorStops,n=0;n<i.length;n++)a.addColorStop(i[n].offset,i[n].color);return a}function c5(r,e){if(r===e||!r&&!e)return!1;if(!r||!e||r.length!==e.length)return!0;for(var t=0;t<r.length;t++)if(r[t]!==e[t])return!0;return!1}function cf(r){return parseInt(r,10)}function Xo(r,e,t){var a=["width","height"][e],i=["clientWidth","clientHeight"][e],n=["paddingLeft","paddingTop"][e],o=["paddingRight","paddingBottom"][e];if(t[a]!=null&&t[a]!=="auto")return parseFloat(t[a]);var s=document.defaultView.getComputedStyle(r);return(r[i]||cf(s[a])||cf(r.style[a]))-(cf(s[n])||0)-(cf(s[o])||0)|0}function d5(r,e){return!r||r==="solid"||!(e>0)?null:r==="dashed"?[4*e,2*e]:r==="dotted"?[e]:Dt(r)?[r]:W(r)?r:null}function rg(r){var e=r.style,t=e.lineDash&&e.lineWidth>0&&d5(e.lineDash,e.lineWidth),a=e.lineDashOffset;if(t){var i=e.strokeNoScale&&r.getLineScale?r.getLineScale():1;i&&i!==1&&(t=U(t,function(n){return n/i}),a/=i)}return[t,a]}var p5=new la(!0);function df(r){var e=r.stroke;return!(e==null||e==="none"||!(r.lineWidth>0))}function kw(r){return typeof r=="string"&&r!=="none"}function pf(r){var e=r.fill;return e!=null&&e!=="none"}function Rw(r,e){if(e.fillOpacity!=null&&e.fillOpacity!==1){var t=r.globalAlpha;r.globalAlpha=e.fillOpacity*e.opacity,r.fill(),r.globalAlpha=t}else r.fill()}function Ew(r,e){if(e.strokeOpacity!=null&&e.strokeOpacity!==1){var t=r.globalAlpha;r.globalAlpha=e.strokeOpacity*e.opacity,r.stroke(),r.globalAlpha=t}else r.stroke()}function ag(r,e,t){var a=Sd(e.image,e.__image,t);if(dh(a)){var i=r.createPattern(a,e.repeat||"repeat");if(typeof DOMMatrix=="function"&&i&&i.setTransform){var n=new DOMMatrix;n.translateSelf(e.x||0,e.y||0),n.rotateSelf(0,0,(e.rotation||0)*Ou),n.scaleSelf(e.scaleX||1,e.scaleY||1),i.setTransform(n)}return i}}function g5(r,e,t,a){var i,n=df(t),o=pf(t),s=t.strokePercent,l=s<1,u=!e.path;(!e.silent||l)&&u&&e.createPathProxy();var h=e.path||p5,f=e.__dirty;if(!a){var v=t.fill,c=t.stroke,d=o&&!!v.colorStops,p=n&&!!c.colorStops,g=o&&!!v.image,y=n&&!!c.image,m=void 0,_=void 0,x=void 0,b=void 0,S=void 0;(d||p)&&(S=e.getBoundingRect()),d&&(m=f?eg(r,v,S):e.__canvasFillGradient,e.__canvasFillGradient=m),p&&(_=f?eg(r,c,S):e.__canvasStrokeGradient,e.__canvasStrokeGradient=_),g&&(x=f||!e.__canvasFillPattern?ag(r,v,e):e.__canvasFillPattern,e.__canvasFillPattern=x),y&&(b=f||!e.__canvasStrokePattern?ag(r,c,e):e.__canvasStrokePattern,e.__canvasStrokePattern=b),d?r.fillStyle=m:g&&(x?r.fillStyle=x:o=!1),p?r.strokeStyle=_:y&&(b?r.strokeStyle=b:n=!1)}var w=e.getGlobalScale();h.setScale(w[0],w[1],e.segmentIgnoreThreshold);var T,C;r.setLineDash&&t.lineDash&&(i=rg(e),T=i[0],C=i[1]);var A=!0;(u||f&co)&&(h.setDPR(r.dpr),l?h.setContext(null):(h.setContext(r),A=!1),h.reset(),e.buildPath(h,e.shape,a),h.toStatic(),e.pathUpdated()),A&&h.rebuildPath(r,l?s:1),T&&(r.setLineDash(T),r.lineDashOffset=C),a||(t.strokeFirst?(n&&Ew(r,t),o&&Rw(r,t)):(o&&Rw(r,t),n&&Ew(r,t))),T&&r.setLineDash([])}function y5(r,e,t){var a=e.__image=Sd(t.image,e.__image,e,e.onload);if(!(!a||!dh(a))){var i=t.x||0,n=t.y||0,o=e.getWidth(),s=e.getHeight(),l=a.width/a.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=a.width,s=a.height),t.sWidth&&t.sHeight){var u=t.sx||0,h=t.sy||0;r.drawImage(a,u,h,t.sWidth,t.sHeight,i,n,o,s)}else if(t.sx&&t.sy){var u=t.sx,h=t.sy,f=o-u,v=s-h;r.drawImage(a,u,h,f,v,i,n,o,s)}else r.drawImage(a,i,n,o,s)}}function m5(r,e,t){var a,i=t.text;if(i!=null&&(i+=""),i){r.font=t.font||Aa,r.textAlign=t.textAlign,r.textBaseline=t.textBaseline;var n=void 0,o=void 0;r.setLineDash&&t.lineDash&&(a=rg(e),n=a[0],o=a[1]),n&&(r.setLineDash(n),r.lineDashOffset=o),t.strokeFirst?(df(t)&&r.strokeText(i,t.x,t.y),pf(t)&&r.fillText(i,t.x,t.y)):(pf(t)&&r.fillText(i,t.x,t.y),df(t)&&r.strokeText(i,t.x,t.y)),n&&r.setLineDash([])}}var Ow=["shadowBlur","shadowOffsetX","shadowOffsetY"],Nw=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function Bw(r,e,t,a,i){var n=!1;if(!a&&(t=t||{},e===t))return!1;if(a||e.opacity!==t.opacity){Qe(r,i),n=!0;var o=Math.max(Math.min(e.opacity,1),0);r.globalAlpha=isNaN(o)?nn.opacity:o}(a||e.blend!==t.blend)&&(n||(Qe(r,i),n=!0),r.globalCompositeOperation=e.blend||nn.blend);for(var s=0;s<Ow.length;s++){var l=Ow[s];(a||e[l]!==t[l])&&(n||(Qe(r,i),n=!0),r[l]=r.dpr*(e[l]||0))}return(a||e.shadowColor!==t.shadowColor)&&(n||(Qe(r,i),n=!0),r.shadowColor=e.shadowColor||nn.shadowColor),n}function zw(r,e,t,a,i){var n=Cl(e,i.inHover),o=a?null:t&&Cl(t,i.inHover)||{};if(n===o)return!1;var s=Bw(r,n,o,a,i);if((a||n.fill!==o.fill)&&(s||(Qe(r,i),s=!0),kw(n.fill)&&(r.fillStyle=n.fill)),(a||n.stroke!==o.stroke)&&(s||(Qe(r,i),s=!0),kw(n.stroke)&&(r.strokeStyle=n.stroke)),(a||n.opacity!==o.opacity)&&(s||(Qe(r,i),s=!0),r.globalAlpha=n.opacity==null?1:n.opacity),e.hasStroke()){var l=n.lineWidth,u=l/(n.strokeNoScale&&e.getLineScale?e.getLineScale():1);r.lineWidth!==u&&(s||(Qe(r,i),s=!0),r.lineWidth=u)}for(var h=0;h<Nw.length;h++){var f=Nw[h],v=f[0];(a||n[v]!==o[v])&&(s||(Qe(r,i),s=!0),r[v]=n[v]||f[1])}return s}function _5(r,e,t,a,i){return Bw(r,Cl(e,i.inHover),t&&Cl(t,i.inHover),a,i)}function Vw(r,e){var t=e.transform,a=r.dpr||1;t?r.setTransform(a*t[0],a*t[1],a*t[2],a*t[3],a*t[4],a*t[5]):r.setTransform(a,0,0,a,0,0)}function x5(r,e,t){for(var a=!1,i=0;i<r.length;i++){var n=r[i];a=a||n.isZeroArea(),Vw(e,n),e.beginPath(),n.buildPath(e,n.shape),e.clip()}t.allClipped=a}function S5(r,e){return r&&e?r[0]!==e[0]||r[1]!==e[1]||r[2]!==e[2]||r[3]!==e[3]||r[4]!==e[4]||r[5]!==e[5]:!(!r&&!e)}var Gw=1,Fw=2,Hw=3,Ww=4;function b5(r){var e=pf(r),t=df(r);return!(r.lineDash||!(+e^+t)||e&&typeof r.fill!="string"||t&&typeof r.stroke!="string"||r.strokePercent<1||r.strokeOpacity<1||r.fillOpacity<1)}function Qe(r,e){e.batchFill&&r.fill(),e.batchStroke&&r.stroke(),e.batchFill="",e.batchStroke=""}function Cl(r,e){return e&&r.__hoverStyle||r.style}function Uw(r,e){Nn(r,e,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function Nn(r,e,t,a){var i=e.transform;if(!e.shouldBePainted(t.viewWidth,t.viewHeight,!1,!1)){e.__dirty&=~ar,e.__isRendered=!1;return}var n=e.__clipPaths,o=t.prevElClipPaths,s=!1,l=!1;if((!o||c5(n,o))&&(o&&o.length&&(Qe(r,t),r.restore(),l=s=!0,t.prevElClipPaths=null,t.allClipped=!1,t.prevEl=null),n&&n.length&&(Qe(r,t),r.save(),x5(n,r,t),s=!0),t.prevElClipPaths=n),t.allClipped){e.__isRendered=!1;return}e.beforeBrush&&e.beforeBrush(),e.innerBeforeBrush();var u=t.prevEl;u||(l=s=!0);var h=e instanceof bt&&e.autoBatch&&b5(e.style);s||S5(i,u.transform)?(Qe(r,t),Vw(r,e)):h||Qe(r,t);var f=Cl(e,t.inHover);e instanceof bt?(t.lastDrawType!==Gw&&(l=!0,t.lastDrawType=Gw),zw(r,e,u,l,t),(!h||!t.batchFill&&!t.batchStroke)&&r.beginPath(),g5(r,e,f,h),h&&(t.batchFill=f.fill||"",t.batchStroke=f.stroke||"")):e instanceof Co?(t.lastDrawType!==Hw&&(l=!0,t.lastDrawType=Hw),zw(r,e,u,l,t),m5(r,e,f)):e instanceof Me?(t.lastDrawType!==Fw&&(l=!0,t.lastDrawType=Fw),_5(r,e,u,l,t),y5(r,e,f)):e.getTemporalDisplayables&&(t.lastDrawType!==Ww&&(l=!0,t.lastDrawType=Ww),w5(r,e,t)),h&&a&&Qe(r,t),e.innerAfterBrush(),e.afterBrush&&e.afterBrush(),t.prevEl=e,e.__dirty=0,e.__isRendered=!0}function w5(r,e,t){var a=e.getDisplayables(),i=e.getTemporalDisplayables();r.save();var n={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:t.viewWidth,viewHeight:t.viewHeight,inHover:t.inHover},o,s;for(o=e.getCursor(),s=a.length;o<s;o++){var l=a[o];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),Nn(r,l,n,o===s-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),n.prevEl=l}for(var u=0,h=i.length;u<h;u++){var l=i[u];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),Nn(r,l,n,u===h-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),n.prevEl=l}e.clearTemporalDisplayables(),e.notClear=!0,r.restore()}var ig=new r5,Yw=new go(100),Zw=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function qo(r,e){if(r==="none")return null;var t=e.getDevicePixelRatio(),a=e.getZr(),i=a.painter.type==="svg";r.dirty&&ig.delete(r);var n=ig.get(r);if(n)return n;var o=st(r,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});o.backgroundColor==="none"&&(o.backgroundColor=null);var s={repeat:"repeat"};return l(s),s.rotation=o.rotation,s.scaleX=s.scaleY=i?1:1/t,ig.set(r,s),r.dirty=!1,s;function l(u){for(var h=[t],f=!0,v=0;v<Zw.length;++v){var c=o[Zw[v]];if(c!=null&&!W(c)&&!$(c)&&!Dt(c)&&typeof c!="boolean"){f=!1;break}h.push(c)}var d;if(f){d=h.join(",")+(i?"-svg":"");var p=Yw.get(d);p&&(i?u.svgElement=p:u.image=p)}var g=Xw(o.dashArrayX),y=T5(o.dashArrayY),m=$w(o.symbol),_=C5(g),x=qw(y),b=!i&&kr.createCanvas(),S=i&&{tag:"g",attrs:{},key:"dcl",children:[]},w=C(),T;b&&(b.width=w.width*t,b.height=w.height*t,T=b.getContext("2d")),A(),f&&Yw.put(d,b||S),u.image=b,u.svgElement=S,u.svgWidth=w.width,u.svgHeight=w.height;function C(){for(var D=1,I=0,L=_.length;I<L;++I)D=V1(D,_[I]);for(var P=1,I=0,L=m.length;I<L;++I)P=V1(P,m[I].length);D*=P;var k=x*_.length*m.length;return{width:Math.max(1,Math.min(D,o.maxTileWidth)),height:Math.max(1,Math.min(k,o.maxTileHeight))}}function A(){T&&(T.clearRect(0,0,b.width,b.height),o.backgroundColor&&(T.fillStyle=o.backgroundColor,T.fillRect(0,0,b.width,b.height)));for(var D=0,I=0;I<y.length;++I)D+=y[I];if(D<=0)return;for(var L=-x,P=0,k=0,R=0;L<w.height;){if(P%2===0){for(var O=k/2%m.length,E=0,N=0,V=0;E<w.width*2;){for(var G=0,I=0;I<g[R].length;++I)G+=g[R][I];if(G<=0)break;if(N%2===0){var H=(1-o.symbolSize)*.5,Y=E+g[R][N]*H,q=L+y[P]*H,it=g[R][N]*o.symbolSize,xt=y[P]*o.symbolSize,At=V/2%m[O].length;ut(Y,q,it,xt,m[O][At])}E+=g[R][N],++V,++N,N===g[R].length&&(N=0)}++R,R===g.length&&(R=0)}L+=y[P],++k,++P,P===y.length&&(P=0)}function ut(tt,ct,j,ft,Nt){var wt=i?1:t,kt=he(Nt,tt*wt,ct*wt,j*wt,ft*wt,o.color,o.symbolKeepAspect);if(i){var Bt=a.painter.renderOneToVNode(kt);Bt&&S.children.push(Bt)}else Uw(T,kt)}}}}function $w(r){if(!r||r.length===0)return[["rect"]];if($(r))return[[r]];for(var e=!0,t=0;t<r.length;++t)if(!$(r[t])){e=!1;break}if(e)return $w([r]);for(var a=[],t=0;t<r.length;++t)$(r[t])?a.push([r[t]]):a.push(r[t]);return a}function Xw(r){if(!r||r.length===0)return[[0,0]];if(Dt(r)){var e=Math.ceil(r);return[[e,e]]}for(var t=!0,a=0;a<r.length;++a)if(!Dt(r[a])){t=!1;break}if(t)return Xw([r]);for(var i=[],a=0;a<r.length;++a)if(Dt(r[a])){var e=Math.ceil(r[a]);i.push([e,e])}else{var e=U(r[a],function(s){return Math.ceil(s)});e.length%2===1?i.push(e.concat(e)):i.push(e)}return i}function T5(r){if(!r||typeof r=="object"&&r.length===0)return[0,0];if(Dt(r)){var e=Math.ceil(r);return[e,e]}var t=U(r,function(a){return Math.ceil(a)});return r.length%2?t.concat(t):t}function C5(r){return U(r,function(e){return qw(e)})}function qw(r){for(var e=0,t=0;t<r.length;++t)e+=r[t];return r.length%2===1?e*2:e}function A5(r,e){r.eachRawSeries(function(t){if(!r.isSeriesFiltered(t)){var a=t.getData();a.hasItemVisual()&&a.each(function(o){var s=a.getItemVisual(o,"decal");if(s){var l=a.ensureUniqueItemVisual(o,"style");l.decal=qo(s,e)}});var i=a.getVisual("decal");if(i){var n=a.getVisual("style");n.decal=qo(i,e)}}})}var Wr=new dr,Kw={};function M5(r,e){Kw[r]=e}function D5(r){return Kw[r]}var jw={};function L5(r,e){jw[r]=e}function I5(r){return jw[r]}var P5=1,k5=800,R5=900,E5=1e3,O5=2e3,N5=5e3,Jw=1e3,B5=1100,ng=2e3,Qw=3e3,z5=4e3,gf=4500,V5=4600,G5=5e3,F5=6e3,tT=7e3,H5={PROCESSOR:{FILTER:E5,SERIES_FILTER:k5,STATISTIC:N5},VISUAL:{LAYOUT:Jw,PROGRESSIVE_LAYOUT:B5,GLOBAL:ng,CHART:Qw,POST_CHART_LAYOUT:V5,COMPONENT:z5,BRUSH:G5,CHART_ITEM:gf,ARIA:F5,DECAL:tT}},pe="__flagInMainProcess",yf="__mainProcessVersion",Ce="__pendingUpdate",og="__needsUpdateStatus",eT=/^[a-zA-Z0-9_]+$/,sg="__connectUpdateStatus",rT=0,W5=1,U5=2;function aT(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(this.isDisposed()){this.id;return}return nT(this,r,e)}}function iT(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return nT(this,r,e)}}function nT(r,e,t){return t[0]=t[0]&&t[0].toLowerCase(),dr.prototype[e].apply(r,t)}var oT=function(r){z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e}(dr),sT=oT.prototype;sT.on=iT("on"),sT.off=iT("off");var Bn,lg,mf,Ga,_f,ug,hg,Ko,jo,lT,uT,fg,hT,xf,fT,vT,Ar,cT,Jo,dT=function(r){z(e,r);function e(t,a,i){var n=r.call(this,new qz)||this;n._chartsViews=[],n._chartsMap={},n._componentsViews=[],n._componentsMap={},n._pendingActions=[],i=i||{},n._dom=t;var o="canvas",s="auto",l=!1;n[yf]=1,i.ssr&&dE(function(v){var c=vt(v),d=c.dataIndex;if(d!=null){var p=J();return p.set("series_index",c.seriesIndex),p.set("data_index",d),c.ssrType&&p.set("ssr_type",c.ssrType),p}});var u=n._zr=D1(t,{renderer:i.renderer||o,devicePixelRatio:i.devicePixelRatio,width:i.width,height:i.height,ssr:i.ssr,useDirtyRect:Q(i.useDirtyRect,l),useCoarsePointer:Q(i.useCoarsePointer,s),pointerSize:i.pointerSize});n._ssr=i.ssr,n._throttledZrFlush=Jp(X(u.flush,u),17),n._updateTheme(a),n._locale=KN(i.locale||VS),n._coordSysMgr=new fl;var h=n._api=fT(n);function f(v,c){return v.__prio-c.__prio}return Fu(bf,f),Fu(pg,f),n._scheduler=new ww(n,h,pg,bf),n._messageCenter=new oT,n._initEvents(),n.resize=X(n.resize,n),u.animation.on("frame",n._onframe,n),lT(u,n),uT(u,n),Ru(n),n}return e.prototype._onframe=function(){if(!this._disposed){cT(this);var t=this._scheduler;if(this[Ce]){var a=this[Ce].silent;this[pe]=!0,Jo(this);try{Bn(this),Ga.update.call(this,null,this[Ce].updateParams)}catch(l){throw this[pe]=!1,this[Ce]=null,l}this._zr.flush(),this[pe]=!1,this[Ce]=null,Ko.call(this,a),jo.call(this,a)}else if(t.unfinished){var i=P5,n=this._model,o=this._api;t.unfinished=!1;do{var s=+new Date;t.performSeriesTasks(n),t.performDataProcessorTasks(n),ug(this,n),t.performVisualTasks(n),xf(this,this._model,o,"remain",{}),i-=+new Date-s}while(i>0&&t.unfinished);t.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(t,a,i){if(!this[pe]){if(this._disposed){this.id;return}var n,o,s;if(lt(a)&&(i=a.lazyUpdate,n=a.silent,o=a.replaceMerge,s=a.transition,a=a.notMerge),this[pe]=!0,Jo(this),!this._model||a){var l=new PB(this._api),u=this._theme,h=this._model=new Bp;h.scheduler=this._scheduler,h.ssr=this._ssr,h.init(null,null,null,u,this._locale,l)}this._model.setOption(t,{replaceMerge:o},gg);var f={seriesTransition:s,optionChanged:!0};if(i)this[Ce]={silent:n,updateParams:f},this[pe]=!1,this.getZr().wakeUp();else{try{Bn(this),Ga.update.call(this,null,f)}catch(v){throw this[Ce]=null,this[pe]=!1,v}this._ssr||this._zr.flush(),this[Ce]=null,this[pe]=!1,Ko.call(this,n),jo.call(this,n)}}},e.prototype.setTheme=function(t,a){if(!this[pe]){if(this._disposed){this.id;return}var i=this._model;if(i){var n=a&&a.silent,o=null;this[Ce]&&(n==null&&(n=this[Ce].silent),o=this[Ce].updateParams,this[Ce]=null),this[pe]=!0,Jo(this);try{this._updateTheme(t),i.setTheme(this._theme),Bn(this),Ga.update.call(this,{type:"setTheme"},o)}catch(s){throw this[pe]=!1,s}this[pe]=!1,Ko.call(this,n),jo.call(this,n)}}},e.prototype._updateTheme=function(t){$(t)&&(t=pT[t]),t&&(t=at(t),t&&Pb(t,!0),this._theme=t)},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Pt.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){return this.renderToCanvas(t)},e.prototype.renderToCanvas=function(t){t=t||{};var a=this._zr.painter;return a.getRenderedCanvas({backgroundColor:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(t){t=t||{};var a=this._zr.painter;return a.renderToString({useViewBox:t.useViewBox})},e.prototype.getSvgDataURL=function(){var t=this._zr,a=t.storage.getDisplayList();return M(a,function(i){i.stopAnimation(null,!0)}),t.painter.toDataURL()},e.prototype.getDataURL=function(t){if(this._disposed){this.id;return}t=t||{};var a=t.excludeComponents,i=this._model,n=[],o=this;M(a,function(l){i.eachComponent({mainType:l},function(u){var h=o._componentsMap[u.__viewId];h.group.ignore||(n.push(h),h.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return M(n,function(l){l.group.ignore=!1}),s},e.prototype.getConnectedDataURL=function(t){if(this._disposed){this.id;return}var a=t.type==="svg",i=this.group,n=Math.min,o=Math.max,s=1/0;if(gT[i]){var l=s,u=s,h=-s,f=-s,v=[],c=t&&t.pixelRatio||this.getDevicePixelRatio();M(Al,function(_,x){if(_.group===i){var b=a?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(at(t)),S=_.getDom().getBoundingClientRect();l=n(S.left,l),u=n(S.top,u),h=o(S.right,h),f=o(S.bottom,f),v.push({dom:b,left:S.left,top:S.top})}}),l*=c,u*=c,h*=c,f*=c;var d=h-l,p=f-u,g=kr.createCanvas(),y=D1(g,{renderer:a?"svg":"canvas"});if(y.resize({width:d,height:p}),a){var m="";return M(v,function(_){var x=_.left-l,b=_.top-u;m+='<g transform="translate('+x+","+b+')">'+_.dom+"</g>"}),y.painter.getSvgRoot().innerHTML=m,t.connectedBackgroundColor&&y.painter.setBackgroundColor(t.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}else return t.connectedBackgroundColor&&y.add(new _t({shape:{x:0,y:0,width:d,height:p},style:{fill:t.connectedBackgroundColor}})),M(v,function(_){var x=new Me({style:{x:_.left*c-l,y:_.top*c-u,image:_.dom}});y.add(x)}),y.refreshImmediately(),g.toDataURL("image/"+(t&&t.type||"png"))}else return this.getDataURL(t)},e.prototype.convertToPixel=function(t,a,i){return _f(this,"convertToPixel",t,a,i)},e.prototype.convertToLayout=function(t,a,i){return _f(this,"convertToLayout",t,a,i)},e.prototype.convertFromPixel=function(t,a,i){return _f(this,"convertFromPixel",t,a,i)},e.prototype.containPixel=function(t,a){if(this._disposed){this.id;return}var i=this._model,n,o=wo(i,t);return M(o,function(s,l){l.indexOf("Models")>=0&&M(s,function(u){var h=u.coordinateSystem;if(h&&h.containPoint)n=n||!!h.containPoint(a);else if(l==="seriesModels"){var f=this._chartsMap[u.__viewId];f&&f.containPoint&&(n=n||f.containPoint(a,u))}},this)},this),!!n},e.prototype.getVisual=function(t,a){var i=this._model,n=wo(i,t,{defaultMainType:"series"}),o=n.seriesModel,s=o.getData(),l=n.hasOwnProperty("dataIndexInside")?n.dataIndexInside:n.hasOwnProperty("dataIndex")?s.indexOfRawIndex(n.dataIndex):null;return l!=null?tg(s,l,a):Tl(s,a)},e.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},e.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},e.prototype._initEvents=function(){var t=this;M(Y5,function(i){var n=function(o){var s=t.getModel(),l=o.target,u,h=i==="globalout";if(h?u={}:l&&Rn(l,function(p){var g=vt(p);if(g&&g.dataIndex!=null){var y=g.dataModel||s.getSeriesByIndex(g.seriesIndex);return u=y&&y.getDataParams(g.dataIndex,g.dataType,l)||{},!0}else if(g.eventData)return u=F({},g.eventData),!0},!0),u){var f=u.componentType,v=u.componentIndex;(f==="markLine"||f==="markPoint"||f==="markArea")&&(f="series",v=u.seriesIndex);var c=f&&v!=null&&s.getComponent(f,v),d=c&&t[c.mainType==="series"?"_chartsMap":"_componentsMap"][c.__viewId];u.event=o,u.type=i,t._$eventProcessor.eventInfo={targetEl:l,packedEvent:u,model:c,view:d},t.trigger(i,u)}};n.zrEventfulCallAtLast=!0,t._zr.on(i,n,t)});var a=this._messageCenter;M(dg,function(i,n){a.on(n,function(o){t.trigger(n,o)})}),Jz(a,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var t=this.getDom();t&&q1(this.getDom(),mg,"");var a=this,i=a._api,n=a._model;M(a._componentsViews,function(o){o.dispose(n,i)}),M(a._chartsViews,function(o){o.dispose(n,i)}),a._zr.dispose(),a._dom=a._model=a._chartsMap=a._componentsMap=a._chartsViews=a._componentsViews=a._scheduler=a._api=a._zr=a._throttledZrFlush=a._theme=a._coordSysMgr=a._messageCenter=null,delete Al[a.id]},e.prototype.resize=function(t){if(!this[pe]){if(this._disposed){this.id;return}this._zr.resize(t);var a=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!a){var i=a.resetOption("media"),n=t&&t.silent;this[Ce]&&(n==null&&(n=this[Ce].silent),i=!0,this[Ce]=null),this[pe]=!0,Jo(this);try{i&&Bn(this),Ga.update.call(this,{type:"resize",animation:F({duration:0},t&&t.animation)})}catch(o){throw this[pe]=!1,o}this[pe]=!1,Ko.call(this,n),jo.call(this,n)}}},e.prototype.showLoading=function(t,a){if(this._disposed){this.id;return}if(lt(t)&&(a=t,t=""),t=t||"default",this.hideLoading(),!!yg[t]){var i=yg[t](this._api,a),n=this._zr;this._loadingFX=i,n.add(i)}},e.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},e.prototype.makeActionFromEvent=function(t){var a=F({},t);return a.type=cg[t.type],a},e.prototype.dispatchAction=function(t,a){if(this._disposed){this.id;return}if(lt(a)||(a={silent:!!a}),!!Sf[t.type]&&this._model){if(this[pe]){this._pendingActions.push(t);return}var i=a.silent;hg.call(this,t,i);var n=a.flush;n?this._zr.flush():n!==!1&&Pt.browser.weChat&&this._throttledZrFlush(),Ko.call(this,i),jo.call(this,i)}},e.prototype.updateLabelLayout=function(){Wr.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(t){if(this._disposed){this.id;return}var a=t.seriesIndex,i=this.getModel(),n=i.getSeriesByIndex(a);n.appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()},e.internalField=function(){Bn=function(f){var v=f._scheduler;v.restorePipelines(f._model),v.prepareStageTasks(),lg(f,!0),lg(f,!1),v.plan()},lg=function(f,v){for(var c=f._model,d=f._scheduler,p=v?f._componentsViews:f._chartsViews,g=v?f._componentsMap:f._chartsMap,y=f._zr,m=f._api,_=0;_<p.length;_++)p[_].__alive=!1;v?c.eachComponent(function(S,w){S!=="series"&&x(w)}):c.eachSeries(x);function x(S){var w=S.__requireNewView;S.__requireNewView=!1;var T="_ec_"+S.id+"_"+S.type,C=!w&&g[T];if(!C){var A=ia(S.type),D=v?Zt.getClass(A.main,A.sub):zt.getClass(A.sub);C=new D,C.init(c,m),g[T]=C,p.push(C),y.add(C.group)}S.__viewId=C.__id=T,C.__alive=!0,C.__model=S,C.group.__ecComponentInfo={mainType:S.mainType,index:S.componentIndex},!v&&d.prepareView(C,S,c,m)}for(var _=0;_<p.length;){var b=p[_];b.__alive?_++:(!v&&b.renderTask.dispose(),y.remove(b.group),b.dispose(c,m),p.splice(_,1),g[b.__id]===b&&delete g[b.__id],b.__id=b.group.__ecComponentInfo=null)}},mf=function(f,v,c,d,p){var g=f._model;if(g.setUpdatePayload(c),!d){M([].concat(f._componentsViews).concat(f._chartsViews),b);return}var y={};y[d+"Id"]=c[d+"Id"],y[d+"Index"]=c[d+"Index"],y[d+"Name"]=c[d+"Name"];var m={mainType:d,query:y};p&&(m.subType=p);var _=c.excludeSeriesId,x;_!=null&&(x=J(),M(Vt(_),function(S){var w=fe(S,null);w!=null&&x.set(w,!0)})),g&&g.eachComponent(m,function(S){var w=x&&x.get(S.id)!=null;if(!w)if($x(c))if(S instanceof Ht)c.type===vn&&!c.notBlur&&!S.get(["emphasis","disabled"])&&WO(S,c,f._api);else{var T=Xd(S.mainType,S.componentIndex,c.name,f._api),C=T.focusSelf,A=T.dispatchers;c.type===vn&&C&&!c.notBlur&&$d(S.mainType,S.componentIndex,f._api),A&&M(A,function(D){c.type===vn?Oa(D):Na(D)})}else Kd(c)&&S instanceof Ht&&(ZO(S,c,f._api),Yx(S),Ar(f))},f),g&&g.eachComponent(m,function(S){var w=x&&x.get(S.id)!=null;w||b(f[d==="series"?"_chartsMap":"_componentsMap"][S.__viewId])},f);function b(S){S&&S.__alive&&S[v]&&S[v](S.__model,g,f._api,c)}},Ga={prepareAndUpdate:function(f){Bn(this),Ga.update.call(this,f,f&&{optionChanged:f.newOption!=null})},update:function(f,v){var c=this._model,d=this._api,p=this._zr,g=this._coordSysMgr,y=this._scheduler;if(c){c.setUpdatePayload(f),y.restoreData(c,f),y.performSeriesTasks(c),g.create(c,d),y.performDataProcessorTasks(c,f),ug(this,c),g.update(c,d),a(c),y.performVisualTasks(c,f);var m=c.get("backgroundColor")||"transparent";p.setBackgroundColor(m);var _=c.get("darkMode");_!=null&&_!=="auto"&&p.setDarkMode(_),fg(this,c,d,f,v),Wr.trigger("afterupdate",c,d)}},updateTransform:function(f){var v=this,c=this._model,d=this._api;if(c){c.setUpdatePayload(f);var p=[];c.eachComponent(function(y,m){if(y!=="series"){var _=v.getViewOfComponentModel(m);if(_&&_.__alive)if(_.updateTransform){var x=_.updateTransform(m,c,d,f);x&&x.update&&p.push(_)}else p.push(_)}});var g=J();c.eachSeries(function(y){var m=v._chartsMap[y.__viewId];if(m.updateTransform){var _=m.updateTransform(y,c,d,f);_&&_.update&&g.set(y.uid,1)}else g.set(y.uid,1)}),a(c),this._scheduler.performVisualTasks(c,f,{setDirty:!0,dirtyMap:g}),xf(this,c,d,f,{},g),Wr.trigger("afterupdate",c,d)}},updateView:function(f){var v=this._model;v&&(v.setUpdatePayload(f),zt.markUpdateMethod(f,"updateView"),a(v),this._scheduler.performVisualTasks(v,f,{setDirty:!0}),fg(this,v,this._api,f,{}),Wr.trigger("afterupdate",v,this._api))},updateVisual:function(f){var v=this,c=this._model;c&&(c.setUpdatePayload(f),c.eachSeries(function(d){d.getData().clearAllVisual()}),zt.markUpdateMethod(f,"updateVisual"),a(c),this._scheduler.performVisualTasks(c,f,{visualType:"visual",setDirty:!0}),c.eachComponent(function(d,p){if(d!=="series"){var g=v.getViewOfComponentModel(p);g&&g.__alive&&g.updateVisual(p,c,v._api,f)}}),c.eachSeries(function(d){var p=v._chartsMap[d.__viewId];p.updateVisual(d,c,v._api,f)}),Wr.trigger("afterupdate",c,this._api))},updateLayout:function(f){Ga.update.call(this,f)}};function t(f,v,c,d,p){if(f._disposed){f.id;return}for(var g=f._model,y=f._coordSysMgr.getCoordinateSystems(),m,_=wo(g,c),x=0;x<y.length;x++){var b=y[x];if(b[v]&&(m=b[v](g,_,d,p))!=null)return m}}_f=t,ug=function(f,v){var c=f._chartsMap,d=f._scheduler;v.eachSeries(function(p){d.updateStreamModes(p,c[p.__viewId])})},hg=function(f,v){var c=this,d=this.getModel(),p=f.type,g=f.escapeConnect,y=Sf[p],m=(y.update||"update").split(":"),_=m.pop(),x=m[0]!=null&&ia(m[0]);this[pe]=!0,Jo(this);var b=[f],S=!1;f.batch&&(S=!0,b=U(f.batch,function(R){return R=st(F({},R),f),R.batch=null,R}));var w=[],T,C=[],A=y.nonRefinedEventType,D=Kd(f),I=$x(f);if(I&&Ux(this._api),M(b,function(R){var O=y.action(R,d,c._api);if(y.refineEvent?C.push(O):T=O,T=T||F({},R),T.type=A,w.push(T),I){var E=gd(f),N=E.queryOptionMap,V=E.mainTypeSpecified,G=V?N.keys()[0]:"series";mf(c,_,R,G),Ar(c)}else D?(mf(c,_,R,"series"),Ar(c)):x&&mf(c,_,R,x.main,x.sub)}),_!=="none"&&!I&&!D&&!x)try{this[Ce]?(Bn(this),Ga.update.call(this,f),this[Ce]=null):Ga[_].call(this,f)}catch(R){throw this[pe]=!1,R}if(S?T={type:A,escapeConnect:g,batch:w}:T=w[0],this[pe]=!1,!v){var L=void 0;if(y.refineEvent){var P=y.refineEvent(C,f,d,this._api).eventContent;Ee(lt(P)),L=st({type:y.refinedEventType},P),L.fromAction=f.type,L.fromActionPayload=f,L.escapeConnect=!0}var k=this._messageCenter;k.trigger(T.type,T),L&&k.trigger(L.type,L)}},Ko=function(f){for(var v=this._pendingActions;v.length;){var c=v.shift();hg.call(this,c,f)}},jo=function(f){!f&&this.trigger("updated")},lT=function(f,v){f.on("rendered",function(c){v.trigger("rendered",c),f.animation.isFinished()&&!v[Ce]&&!v._scheduler.unfinished&&!v._pendingActions.length&&v.trigger("finished")})},uT=function(f,v){f.on("mouseover",function(c){var d=c.target,p=Rn(d,Qs);p&&(UO(p,c,v._api),Ar(v))}).on("mouseout",function(c){var d=c.target,p=Rn(d,Qs);p&&(YO(p,c,v._api),Ar(v))}).on("click",function(c){var d=c.target,p=Rn(d,function(m){return vt(m).dataIndex!=null},!0);if(p){var g=p.selected?"unselect":"select",y=vt(p);v._api.dispatchAction({type:g,dataType:y.dataType,dataIndexInside:y.dataIndex,seriesIndex:y.seriesIndex,isFromClick:!0})}})};function a(f){f.clearColorPalette(),f.eachSeries(function(v){v.clearColorPalette()})}function i(f){var v=[],c=[],d=!1;if(f.eachComponent(function(m,_){var x=_.get("zlevel")||0,b=_.get("z")||0,S=_.getZLevelKey();d=d||!!S,(m==="series"?c:v).push({zlevel:x,z:b,idx:_.componentIndex,type:m,key:S})}),d){var p=v.concat(c),g,y;Fu(p,function(m,_){return m.zlevel===_.zlevel?m.z-_.z:m.zlevel-_.zlevel}),M(p,function(m){var _=f.getComponent(m.type,m.idx),x=m.zlevel,b=m.key;g!=null&&(x=Math.max(g,x)),b?(x===g&&b!==y&&x++,y=b):y&&(x===g&&x++,y=""),g=x,_.setZLevel(x)})}}fg=function(f,v,c,d,p){i(v),hT(f,v,c,d,p),M(f._chartsViews,function(g){g.__alive=!1}),xf(f,v,c,d,p),M(f._chartsViews,function(g){g.__alive||g.remove(v,c)})},hT=function(f,v,c,d,p,g){M(g||f._componentsViews,function(y){var m=y.__model;u(m,y),y.render(m,v,c,d),l(m,y),h(m,y)})},xf=function(f,v,c,d,p,g){var y=f._scheduler;p=F(p||{},{updatedSeries:v.getSeries()}),Wr.trigger("series:beforeupdate",v,c,p);var m=!1;v.eachSeries(function(_){var x=f._chartsMap[_.__viewId];x.__alive=!0;var b=x.renderTask;y.updatePayload(b,d),u(_,x),g&&g.get(_.uid)&&b.dirty(),b.perform(y.getPerformArgs(b))&&(m=!0),x.group.silent=!!_.get("silent"),s(_,x),Yx(_)}),y.unfinished=m||y.unfinished,Wr.trigger("series:layoutlabels",v,c,p),Wr.trigger("series:transition",v,c,p),v.eachSeries(function(_){var x=f._chartsMap[_.__viewId];l(_,x),h(_,x)}),o(f,v),Wr.trigger("series:afterupdate",v,c,p)},Ar=function(f){f[og]=!0,f.getZr().wakeUp()},Jo=function(f){f[yf]=(f[yf]+1)%1e3},cT=function(f){f[og]&&(f.getZr().storage.traverse(function(v){Ro(v)||n(v)}),f[og]=!1)};function n(f){for(var v=[],c=f.currentStates,d=0;d<c.length;d++){var p=c[d];p==="emphasis"||p==="blur"||p==="select"||v.push(p)}f.selected&&f.states.select&&v.push("select"),f.hoverState===wh&&f.states.emphasis?v.push("emphasis"):f.hoverState===js&&f.states.blur&&v.push("blur"),f.useStates(v)}function o(f,v){var c=f._zr,d=c.storage,p=0;d.traverse(function(g){g.isGroup||p++}),p>v.get("hoverLayerThreshold")&&!Pt.node&&!Pt.worker&&v.eachSeries(function(g){if(!g.preventUsingHoverLayer){var y=f._chartsMap[g.__viewId];y.__alive&&y.eachRendered(function(m){m.states.emphasis&&(m.states.emphasis.hoverLayer=!0)})}})}function s(f,v){var c=f.get("blendMode")||null;v.eachRendered(function(d){d.isGroup||(d.style.blend=c)})}function l(f,v){if(!f.preventAutoZ){var c=Sn(f);v.eachRendered(function(d){return Hh(d,c.z,c.zlevel),!0})}}function u(f,v){v.eachRendered(function(c){if(!Ro(c)){var d=c.getTextContent(),p=c.getTextGuideLine();c.stateTransition&&(c.stateTransition=null),d&&d.stateTransition&&(d.stateTransition=null),p&&p.stateTransition&&(p.stateTransition=null),c.hasState()?(c.prevStates=c.currentStates,c.clearStates()):c.prevStates&&(c.prevStates=null)}})}function h(f,v){var c=f.getModel("stateAnimation"),d=f.isAnimationEnabled(),p=c.get("duration"),g=p>0?{duration:p,delay:c.get("delay"),easing:c.get("easing")}:null;v.eachRendered(function(y){if(y.states&&y.states.emphasis){if(Ro(y))return;if(y instanceof bt&&JO(y),y.__dirty){var m=y.prevStates;m&&y.useStates(m)}if(d){y.stateTransition=g;var _=y.getTextContent(),x=y.getTextGuideLine();_&&(_.stateTransition=g),x&&(x.stateTransition=g)}y.__dirty&&n(y)}})}fT=function(f){return new(function(v){z(c,v);function c(){return v!==null&&v.apply(this,arguments)||this}return c.prototype.getCoordinateSystems=function(){return f._coordSysMgr.getCoordinateSystems()},c.prototype.getComponentByElement=function(d){for(;d;){var p=d.__ecComponentInfo;if(p!=null)return f._model.getComponent(p.mainType,p.index);d=d.parent}},c.prototype.enterEmphasis=function(d,p){Oa(d,p),Ar(f)},c.prototype.leaveEmphasis=function(d,p){Na(d,p),Ar(f)},c.prototype.enterBlur=function(d){Gx(d),Ar(f)},c.prototype.leaveBlur=function(d){Yd(d),Ar(f)},c.prototype.enterSelect=function(d){Fx(d),Ar(f)},c.prototype.leaveSelect=function(d){Hx(d),Ar(f)},c.prototype.getModel=function(){return f.getModel()},c.prototype.getViewOfComponentModel=function(d){return f.getViewOfComponentModel(d)},c.prototype.getViewOfSeriesModel=function(d){return f.getViewOfSeriesModel(d)},c.prototype.getMainProcessVersion=function(){return f[yf]},c}(Tb))(f)},vT=function(f){function v(c,d){for(var p=0;p<c.length;p++){var g=c[p];g[sg]=d}}M(cg,function(c,d){f._messageCenter.on(d,function(p){if(gT[f.group]&&f[sg]!==rT){if(p&&p.escapeConnect)return;var g=f.makeActionFromEvent(p),y=[];M(Al,function(m){m!==f&&m.group===f.group&&y.push(m)}),v(y,rT),M(y,function(m){m[sg]!==W5&&m.dispatchAction(g)}),v(y,U5)}})})}}(),e}(dr),vg=dT.prototype;vg.on=aT("on"),vg.off=aT("off"),vg.one=function(r,e,t){var a=this;function i(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];e&&e.apply&&e.apply(this,n),a.off(r,i)}this.on.call(this,r,i,t)};var Y5=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function iK(r){}var Sf={},cg={},dg={},pg=[],gg=[],bf=[],pT={},yg={},Al={},gT={},Z5=+new Date-0,mg="_echarts_instance_";function $5(r,e,t){var a=!(t&&t.ssr);if(a){var i=X5(r);if(i)return i}var n=new dT(r,e,t);return n.id="ec_"+Z5++,Al[n.id]=n,a&&q1(r,mg,n.id),vT(n),Wr.trigger("afterinit",n),n}function X5(r){return Al[BE(r,mg)]}function yT(r,e){pT[r]=e}function mT(r){gt(gg,r)<0&&gg.push(r)}function _T(r,e){xg(pg,r,e,O5)}function q5(r){_g("afterinit",r)}function K5(r){_g("afterupdate",r)}function _g(r,e){Wr.on(r,e)}function ca(r,e,t){var a,i,n,o,s;rt(e)&&(t=e,e=""),lt(r)?(a=r.type,i=r.event,o=r.update,s=r.publishNonRefinedEvent,t||(t=r.action),n=r.refineEvent):(a=r,i=e);function l(h){return h.toLowerCase()}i=l(i||a);var u=n?l(a):i;Sf[a]||(Ee(eT.test(a)&&eT.test(i)),n&&Ee(i!==a),Sf[a]={actionType:a,refinedEventType:i,nonRefinedEventType:u,update:o,action:t,refineEvent:n},dg[i]=1,n&&s&&(dg[u]=1),cg[u]=a)}function j5(r,e){fl.register(r,e)}function J5(r,e){xg(bf,r,e,Jw,"layout")}function zn(r,e){xg(bf,r,e,Qw,"visual")}var xT=[];function xg(r,e,t,a,i){if((rt(e)||lt(e))&&(t=e,e=a),!(gt(xT,t)>=0)){xT.push(t);var n=ww.wrapStageHandler(t,i);n.__prio=e,n.__raw=t,r.push(n)}}function ST(r,e){yg[r]=e}function Q5(r,e,t){var a=D5("registerMap");a&&a(r,e,t)}var tV=uz;zn(ng,Oz),zn(gf,Nz),zn(gf,Bz),zn(ng,Kz),zn(gf,jz),zn(tT,A5),mT(Pb),_T(R5,WB),ST("default",zz),ca({type:vn,event:vn,update:vn},Qt),ca({type:Th,event:Th,update:Th},Qt),ca({type:Ch,event:Hd,update:Ch,action:Qt,refineEvent:Sg,publishNonRefinedEvent:!0}),ca({type:Fd,event:Hd,update:Fd,action:Qt,refineEvent:Sg,publishNonRefinedEvent:!0}),ca({type:Ah,event:Hd,update:Ah,action:Qt,refineEvent:Sg,publishNonRefinedEvent:!0});function Sg(r,e,t,a){return{eventContent:{selected:$O(t),isFromClick:e.isFromClick||!1}}}yT("default",{}),yT("dark",Dw);var bT=[],eV={registerPreprocessor:mT,registerProcessor:_T,registerPostInit:q5,registerPostUpdate:K5,registerUpdateLifecycle:_g,registerAction:ca,registerCoordinateSystem:j5,registerLayout:J5,registerVisual:zn,registerTransform:tV,registerLoading:ST,registerMap:Q5,registerImpl:M5,PRIORITY:H5,ComponentModel:Tt,ComponentView:Zt,SeriesModel:Ht,ChartView:zt,registerComponentModel:function(r){Tt.registerClass(r)},registerComponentView:function(r){Zt.registerClass(r)},registerSeriesModel:function(r){Ht.registerClass(r)},registerChartView:function(r){zt.registerClass(r)},registerCustomSeries:function(r,e){L5(r,e)},registerSubTypeDefaulter:function(r,e){Tt.registerSubTypeDefaulter(r,e)},registerPainter:function(r,e){vE(r,e)}};function mt(r){if(W(r)){M(r,function(e){mt(e)});return}gt(bT,r)>=0||(bT.push(r),rt(r)&&(r={install:r}),r.install(eV))}function Ml(r){return r==null?0:r.length||1}function wT(r){return r}var Fa=function(){function r(e,t,a,i,n,o){this._old=e,this._new=t,this._oldKeyGetter=a||wT,this._newKeyGetter=i||wT,this.context=n,this._diffModeMultiple=o==="multiple"}return r.prototype.add=function(e){return this._add=e,this},r.prototype.update=function(e){return this._update=e,this},r.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},r.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},r.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},r.prototype.remove=function(e){return this._remove=e,this},r.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},r.prototype._executeOneToOne=function(){var e=this._old,t=this._new,a={},i=new Array(e.length),n=new Array(t.length);this._initIndexMap(e,null,i,"_oldKeyGetter"),this._initIndexMap(t,a,n,"_newKeyGetter");for(var o=0;o<e.length;o++){var s=i[o],l=a[s],u=Ml(l);if(u>1){var h=l.shift();l.length===1&&(a[s]=l[0]),this._update&&this._update(h,o)}else u===1?(a[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(n,a)},r.prototype._executeMultiple=function(){var e=this._old,t=this._new,a={},i={},n=[],o=[];this._initIndexMap(e,a,n,"_oldKeyGetter"),this._initIndexMap(t,i,o,"_newKeyGetter");for(var s=0;s<n.length;s++){var l=n[s],u=a[l],h=i[l],f=Ml(u),v=Ml(h);if(f>1&&v===1)this._updateManyToOne&&this._updateManyToOne(h,u),i[l]=null;else if(f===1&&v>1)this._updateOneToMany&&this._updateOneToMany(h,u),i[l]=null;else if(f===1&&v===1)this._update&&this._update(h,u),i[l]=null;else if(f>1&&v>1)this._updateManyToMany&&this._updateManyToMany(h,u),i[l]=null;else if(f>1)for(var c=0;c<f;c++)this._remove&&this._remove(u[c]);else this._remove&&this._remove(u)}this._performRestAdd(o,i)},r.prototype._performRestAdd=function(e,t){for(var a=0;a<e.length;a++){var i=e[a],n=t[i],o=Ml(n);if(o>1)for(var s=0;s<o;s++)this._add&&this._add(n[s]);else o===1&&this._add&&this._add(n);t[i]=null}},r.prototype._initIndexMap=function(e,t,a,i){for(var n=this._diffModeMultiple,o=0;o<e.length;o++){var s="_ec_"+this[i](e[o],o);if(n||(a[o]=s),!!t){var l=t[s],u=Ml(l);u===0?(t[s]=o,n&&a.push(s)):u===1?t[s]=[l,o]:l.push(o)}}},r}(),rV=function(){function r(e,t){this._encode=e,this._schema=t}return r.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},r.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},r}();function aV(r,e){var t={},a=t.encode={},i=J(),n=[],o=[],s={};M(r.dimensions,function(v){var c=r.getDimensionInfo(v),d=c.coordDim;if(d){var p=c.coordDimIndex;bg(a,d)[p]=v,c.isExtraCoord||(i.set(d,1),iV(c.type)&&(n[0]=v),bg(s,d)[p]=r.getDimensionIndex(c.name)),c.defaultTooltip&&o.push(v)}fb.each(function(g,y){var m=bg(a,y),_=c.otherDims[y];_!=null&&_!==!1&&(m[_]=c.name)})});var l=[],u={};i.each(function(v,c){var d=a[c];u[c]=d[0],l=l.concat(d)}),t.dataDimsOnCoord=l,t.dataDimIndicesOnCoord=U(l,function(v){return r.getDimensionInfo(v).storeDimIndex}),t.encodeFirstDimNotExtra=u;var h=a.label;h&&h.length&&(n=h.slice());var f=a.tooltip;return f&&f.length?o=f.slice():o.length||(o=n.slice()),a.defaultedLabel=n,a.defaultedTooltip=o,t.userOutput=new rV(s,e),t}function bg(r,e){return r.hasOwnProperty(e)||(r[e]=[]),r[e]}function wf(r){return r==="category"?"ordinal":r==="time"?"time":"float"}function iV(r){return!(r==="ordinal"||r==="time")}var Tf=function(){function r(e){this.otherDims={},e!=null&&F(this,e)}return r}(),nV=St(),oV={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},TT=function(){function r(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return r.prototype.isDimensionOmitted=function(){return this._dimOmitted},r.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||(this._dimNameMap=MT(this.source)))},r.prototype.getSourceDimensionIndex=function(e){return Q(this._dimNameMap.get(e),-1)},r.prototype.getSourceDimension=function(e){var t=this.source.dimensionsDefine;if(t)return t[e]},r.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,t=Ob(this.source),a=!DT(e),i="",n=[],o=0,s=0;o<e;o++){var l=void 0,u=void 0,h=void 0,f=this.dimensions[s];if(f&&f.storeDimIndex===o)l=t?f.name:null,u=f.type,h=f.ordinalMeta,s++;else{var v=this.getSourceDimension(o);v&&(l=t?v.name:null,u=v.type)}n.push({property:l,type:u,ordinalMeta:h}),t&&l!=null&&(!f||!f.isCalculationCoord)&&(i+=a?l.replace(/\`/g,"`1").replace(/\$/g,"`2"):l),i+="$",i+=oV[u]||"f",h&&(i+=h.uid),i+="$"}var c=this.source,d=[c.seriesLayoutBy,c.startIndex,i].join("$$");return{dimensions:n,hash:d}},r.prototype.makeOutputDimensionNames=function(){for(var e=[],t=0,a=0;t<this._fullDimCount;t++){var i=void 0,n=this.dimensions[a];if(n&&n.storeDimIndex===t)n.isCalculationCoord||(i=n.name),a++;else{var o=this.getSourceDimension(t);o&&(i=o.name)}e.push(i)}return e},r.prototype.appendCalculationDimension=function(e){this.dimensions.push(e),e.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},r}();function CT(r){return r instanceof TT}function AT(r){for(var e=J(),t=0;t<(r||[]).length;t++){var a=r[t],i=lt(a)?a.name:a;i!=null&&e.get(i)==null&&e.set(i,t)}return e}function MT(r){var e=nV(r);return e.dimNameMap||(e.dimNameMap=AT(r.dimensionsDefine))}function DT(r){return r>30}var Dl=lt,bi=U,sV=typeof Int32Array>"u"?Array:Int32Array,lV="e\0\0",LT=-1,uV=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],hV=["_approximateExtent"],IT,Cf,Ll,Il,wg,Pl,Tg,Ue=function(){function r(e,t){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var a,i=!1;CT(e)?(a=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(i=!0,a=e),a=a||["x","y"];for(var n={},o=[],s={},l=!1,u={},h=0;h<a.length;h++){var f=a[h],v=$(f)?new Tf({name:f}):f instanceof Tf?f:new Tf(f),c=v.name;v.type=v.type||"float",v.coordDim||(v.coordDim=c,v.coordDimIndex=0);var d=v.otherDims=v.otherDims||{};o.push(c),n[c]=v,u[c]!=null&&(l=!0),v.createInvertedIndices&&(s[c]=[]);var p=h;Dt(v.storeDimIndex)&&(p=v.storeDimIndex),d.itemName===0&&(this._nameDimIdx=p),d.itemId===0&&(this._idDimIdx=p),i&&(v.storeDimIndex=h)}if(this.dimensions=o,this._dimInfos=n,this._initGetDimensionInfo(l),this.hostModel=t,this._invertedIndicesMap=s,this._dimOmitted){var g=this._dimIdxToName=J();M(o,function(y){g.set(n[y].storeDimIndex,y)})}}return r.prototype.getDimension=function(e){var t=this._recognizeDimIndex(e);if(t==null)return e;if(t=e,!this._dimOmitted)return this.dimensions[t];var a=this._dimIdxToName.get(t);if(a!=null)return a;var i=this._schema.getSourceDimension(t);if(i)return i.name},r.prototype.getDimensionIndex=function(e){var t=this._recognizeDimIndex(e);if(t!=null)return t;if(e==null)return-1;var a=this._getDimInfo(e);return a?a.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(e):-1},r.prototype._recognizeDimIndex=function(e){if(Dt(e)||e!=null&&!isNaN(e)&&!this._getDimInfo(e)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(e)<0))return+e},r.prototype._getStoreDimIndex=function(e){var t=this.getDimensionIndex(e);return t},r.prototype.getDimensionInfo=function(e){return this._getDimInfo(this.getDimension(e))},r.prototype._initGetDimensionInfo=function(e){var t=this._dimInfos;this._getDimInfo=e?function(a){return t.hasOwnProperty(a)?t[a]:void 0}:function(a){return t[a]}},r.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},r.prototype.mapDimension=function(e,t){var a=this._dimSummary;if(t==null)return a.encodeFirstDimNotExtra[e];var i=a.encode[e];return i?i[t]:null},r.prototype.mapDimensionsAll=function(e){var t=this._dimSummary,a=t.encode[e];return(a||[]).slice()},r.prototype.getStore=function(){return this._store},r.prototype.initData=function(e,t,a){var i=this,n;if(e instanceof $p&&(n=e),!n){var o=this.dimensions,s=Gp(e)||ke(e)?new zb(e,o.length):e;n=new $p;var l=bi(o,function(u){return{type:i._dimInfos[u].type,property:u}});n.initData(s,l,a)}this._store=n,this._nameList=(t||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,n.count()),this._dimSummary=aV(this,this._schema),this.userOutput=this._dimSummary.userOutput},r.prototype.appendData=function(e){var t=this._store.appendData(e);this._doInit(t[0],t[1])},r.prototype.appendValues=function(e,t){var a=this._store.appendValues(e,t&&t.length),i=a.start,n=a.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),t)for(var s=i;s<n;s++){var l=s-i;this._nameList[s]=t[l],o&&Tg(this,s)}},r.prototype._updateOrdinalMeta=function(){for(var e=this._store,t=this.dimensions,a=0;a<t.length;a++){var i=this._dimInfos[t[a]];i.ordinalMeta&&e.collectOrdinalMeta(i.storeDimIndex,i.ordinalMeta)}},r.prototype._shouldMakeIdFromName=function(){var e=this._store.getProvider();return this._idDimIdx==null&&e.getSource().sourceFormat!==_i&&!e.fillStorage},r.prototype._doInit=function(e,t){if(!(e>=t)){var a=this._store,i=a.getProvider();this._updateOrdinalMeta();var n=this._nameList,o=this._idList,s=i.getSource().sourceFormat,l=s===lr;if(l&&!i.pure)for(var u=[],h=e;h<t;h++){var f=i.getItem(h,u);if(!this.hasItemOption&&TE(f)&&(this.hasItemOption=!0),f){var v=f.name;n[h]==null&&v!=null&&(n[h]=fe(v,null));var c=f.id;o[h]==null&&c!=null&&(o[h]=fe(c,null))}}if(this._shouldMakeIdFromName())for(var h=e;h<t;h++)Tg(this,h);IT(this)}},r.prototype.getApproximateExtent=function(e){return this._approximateExtent[e]||this._store.getDataExtent(this._getStoreDimIndex(e))},r.prototype.setApproximateExtent=function(e,t){t=this.getDimension(t),this._approximateExtent[t]=e.slice()},r.prototype.getCalculationInfo=function(e){return this._calculationInfo[e]},r.prototype.setCalculationInfo=function(e,t){Dl(e)?F(this._calculationInfo,e):this._calculationInfo[e]=t},r.prototype.getName=function(e){var t=this.getRawIndex(e),a=this._nameList[t];return a==null&&this._nameDimIdx!=null&&(a=Ll(this,this._nameDimIdx,t)),a==null&&(a=""),a},r.prototype._getCategory=function(e,t){var a=this._store.get(e,t),i=this._store.getOrdinalMeta(e);return i?i.categories[a]:a},r.prototype.getId=function(e){return Cf(this,this.getRawIndex(e))},r.prototype.count=function(){return this._store.count()},r.prototype.get=function(e,t){var a=this._store,i=this._dimInfos[e];if(i)return a.get(i.storeDimIndex,t)},r.prototype.getByRawIndex=function(e,t){var a=this._store,i=this._dimInfos[e];if(i)return a.getByRawIndex(i.storeDimIndex,t)},r.prototype.getIndices=function(){return this._store.getIndices()},r.prototype.getDataExtent=function(e){return this._store.getDataExtent(this._getStoreDimIndex(e))},r.prototype.getSum=function(e){return this._store.getSum(this._getStoreDimIndex(e))},r.prototype.getMedian=function(e){return this._store.getMedian(this._getStoreDimIndex(e))},r.prototype.getValues=function(e,t){var a=this,i=this._store;return W(e)?i.getValues(bi(e,function(n){return a._getStoreDimIndex(n)}),t):i.getValues(e)},r.prototype.hasValue=function(e){for(var t=this._dimSummary.dataDimIndicesOnCoord,a=0,i=t.length;a<i;a++)if(isNaN(this._store.get(t[a],e)))return!1;return!0},r.prototype.indexOfName=function(e){for(var t=0,a=this._store.count();t<a;t++)if(this.getName(t)===e)return t;return-1},r.prototype.getRawIndex=function(e){return this._store.getRawIndex(e)},r.prototype.indexOfRawIndex=function(e){return this._store.indexOfRawIndex(e)},r.prototype.rawIndexOf=function(e,t){var a=e&&this._invertedIndicesMap[e],i=a&&a[t];return i==null||isNaN(i)?LT:i},r.prototype.each=function(e,t,a){rt(e)&&(a=t,t=e,e=[]);var i=a||this,n=bi(Il(e),this._getStoreDimIndex,this);this._store.each(n,i?X(t,i):t)},r.prototype.filterSelf=function(e,t,a){rt(e)&&(a=t,t=e,e=[]);var i=a||this,n=bi(Il(e),this._getStoreDimIndex,this);return this._store=this._store.filter(n,i?X(t,i):t),this},r.prototype.selectRange=function(e){var t=this,a={},i=Mt(e);return M(i,function(n){var o=t._getStoreDimIndex(n);a[o]=e[n]}),this._store=this._store.selectRange(a),this},r.prototype.mapArray=function(e,t,a){rt(e)&&(a=t,t=e,e=[]),a=a||this;var i=[];return this.each(e,function(){i.push(t&&t.apply(this,arguments))},a),i},r.prototype.map=function(e,t,a,i){var n=a||i||this,o=bi(Il(e),this._getStoreDimIndex,this),s=Pl(this);return s._store=this._store.map(o,n?X(t,n):t),s},r.prototype.modify=function(e,t,a,i){var n=a||i||this,o=bi(Il(e),this._getStoreDimIndex,this);this._store.modify(o,n?X(t,n):t)},r.prototype.downSample=function(e,t,a,i){var n=Pl(this);return n._store=this._store.downSample(this._getStoreDimIndex(e),t,a,i),n},r.prototype.minmaxDownSample=function(e,t){var a=Pl(this);return a._store=this._store.minmaxDownSample(this._getStoreDimIndex(e),t),a},r.prototype.lttbDownSample=function(e,t){var a=Pl(this);return a._store=this._store.lttbDownSample(this._getStoreDimIndex(e),t),a},r.prototype.getRawDataItem=function(e){return this._store.getRawDataItem(e)},r.prototype.getItemModel=function(e){var t=this.hostModel,a=this.getRawDataItem(e);return new Ct(a,t,t&&t.ecModel)},r.prototype.diff=function(e){var t=this;return new Fa(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(a){return Cf(e,a)},function(a){return Cf(t,a)})},r.prototype.getVisual=function(e){var t=this._visual;return t&&t[e]},r.prototype.setVisual=function(e,t){this._visual=this._visual||{},Dl(e)?F(this._visual,e):this._visual[e]=t},r.prototype.getItemVisual=function(e,t){var a=this._itemVisuals[e],i=a&&a[t];return i??this.getVisual(t)},r.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},r.prototype.ensureUniqueItemVisual=function(e,t){var a=this._itemVisuals,i=a[e];i||(i=a[e]={});var n=i[t];return n==null&&(n=this.getVisual(t),W(n)?n=n.slice():Dl(n)&&(n=F({},n)),i[t]=n),n},r.prototype.setItemVisual=function(e,t,a){var i=this._itemVisuals[e]||{};this._itemVisuals[e]=i,Dl(t)?F(i,t):i[t]=a},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(e,t){Dl(e)?F(this._layout,e):this._layout[e]=t},r.prototype.getLayout=function(e){return this._layout[e]},r.prototype.getItemLayout=function(e){return this._itemLayouts[e]},r.prototype.setItemLayout=function(e,t,a){this._itemLayouts[e]=a?F(this._itemLayouts[e]||{},t):t},r.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},r.prototype.setItemGraphicEl=function(e,t){var a=this.hostModel&&this.hostModel.seriesIndex;zd(a,this.dataType,e,t),this._graphicEls[e]=t},r.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},r.prototype.eachItemGraphicEl=function(e,t){M(this._graphicEls,function(a,i){a&&e&&e.call(t,a,i)})},r.prototype.cloneShallow=function(e){return e||(e=new r(this._schema?this._schema:bi(this.dimensions,this._getDimInfo,this),this.hostModel)),wg(e,this),e._store=this._store,e},r.prototype.wrapMethod=function(e,t){var a=this[e];rt(a)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var i=a.apply(this,arguments);return t.apply(this,[i].concat(fc(arguments)))})},r.internalField=function(){IT=function(e){var t=e._invertedIndicesMap;M(t,function(a,i){var n=e._dimInfos[i],o=n.ordinalMeta,s=e._store;if(o){a=t[i]=new sV(o.categories.length);for(var l=0;l<a.length;l++)a[l]=LT;for(var l=0;l<s.count();l++)a[s.get(n.storeDimIndex,l)]=l}})},Ll=function(e,t,a){return fe(e._getCategory(t,a),null)},Cf=function(e,t){var a=e._idList[t];return a==null&&e._idDimIdx!=null&&(a=Ll(e,e._idDimIdx,t)),a==null&&(a=lV+t),a},Il=function(e){return W(e)||(e=e!=null?[e]:[]),e},Pl=function(e){var t=new r(e._schema?e._schema:bi(e.dimensions,e._getDimInfo,e),e.hostModel);return wg(t,e),t},wg=function(e,t){M(uV.concat(t.__wrappedMethods||[]),function(a){t.hasOwnProperty(a)&&(e[a]=t[a])}),e.__wrappedMethods=t.__wrappedMethods,M(hV,function(a){e[a]=at(t[a])}),e._calculationInfo=F({},t._calculationInfo)},Tg=function(e,t){var a=e._nameList,i=e._idList,n=e._nameDimIdx,o=e._idDimIdx,s=a[t],l=i[t];if(s==null&&n!=null&&(a[t]=s=Ll(e,n,t)),l==null&&o!=null&&(i[t]=l=Ll(e,o,t)),l==null&&s!=null){var u=e._nameRepeatCount,h=u[s]=(u[s]||0)+1;l=s,h>1&&(l+="__ec__"+h),i[t]=l}}}(),r}();function kl(r,e){Gp(r)||(r=Hp(r)),e=e||{};var t=e.coordDimensions||[],a=e.dimensionsDefine||r.dimensionsDefine||[],i=J(),n=[],o=vV(r,t,a,e.dimensionsCount),s=e.canOmitUnusedDimensions&&DT(o),l=a===r.dimensionsDefine,u=l?MT(r):AT(a),h=e.encodeDefine;!h&&e.encodeDefaulter&&(h=e.encodeDefaulter(r,o));for(var f=J(h),v=new Kb(o),c=0;c<v.length;c++)v[c]=-1;function d(C){var A=v[C];if(A<0){var D=a[C],I=lt(D)?D:{name:D},L=new Tf,P=I.name;P!=null&&u.get(P)!=null&&(L.name=L.displayName=P),I.type!=null&&(L.type=I.type),I.displayName!=null&&(L.displayName=I.displayName);var k=n.length;return v[C]=k,L.storeDimIndex=C,n.push(L),L}return n[A]}if(!s)for(var c=0;c<o;c++)d(c);f.each(function(C,A){var D=Vt(C).slice();if(D.length===1&&!$(D[0])&&D[0]<0){f.set(A,!1);return}var I=f.set(A,[]);M(D,function(L,P){var k=$(L)?u.get(L):L;k!=null&&k<o&&(I[P]=k,g(d(k),A,P))})});var p=0;M(t,function(C){var A,D,I,L;if($(C))A=C,L={};else{L=C,A=L.name;var P=L.ordinalMeta;L.ordinalMeta=null,L=F({},L),L.ordinalMeta=P,D=L.dimsDef,I=L.otherDims,L.name=L.coordDim=L.coordDimIndex=L.dimsDef=L.otherDims=null}var k=f.get(A);if(k!==!1){if(k=Vt(k),!k.length)for(var R=0;R<(D&&D.length||1);R++){for(;p<o&&d(p).coordDim!=null;)p++;p<o&&k.push(p++)}M(k,function(O,E){var N=d(O);if(l&&L.type!=null&&(N.type=L.type),g(st(N,L),A,E),N.name==null&&D){var V=D[E];!lt(V)&&(V={name:V}),N.name=N.displayName=V.name,N.defaultTooltip=V.defaultTooltip}I&&st(N.otherDims,I)})}});function g(C,A,D){fb.get(A)!=null?C.otherDims[A]=D:(C.coordDim=A,C.coordDimIndex=D,i.set(A,!0))}var y=e.generateCoord,m=e.generateCoordCount,_=m!=null;m=y?m||1:0;var x=y||"value";function b(C){C.name==null&&(C.name=C.coordDim)}if(s)M(n,function(C){b(C)}),n.sort(function(C,A){return C.storeDimIndex-A.storeDimIndex});else for(var S=0;S<o;S++){var w=d(S),T=w.coordDim;T==null&&(w.coordDim=cV(x,i,_),w.coordDimIndex=0,(!y||m<=0)&&(w.isExtraCoord=!0),m--),b(w),w.type==null&&(pb(r,S)===Le.Must||w.isExtraCoord&&(w.otherDims.itemName!=null||w.otherDims.seriesName!=null))&&(w.type="ordinal")}return fV(n),new TT({source:r,dimensions:n,fullDimensionCount:o,dimensionOmitted:s})}function fV(r){for(var e=J(),t=0;t<r.length;t++){var a=r[t],i=a.name,n=e.get(i)||0;n>0&&(a.name=i+(n-1)),n++,e.set(i,n)}}function vV(r,e,t,a){var i=Math.max(r.dimensionsDetectedCount||1,e.length,t.length,a||0);return M(e,function(n){var o;lt(n)&&(o=n.dimsDef)&&(i=Math.max(i,o.length))}),i}function cV(r,e,t){if(t||e.hasKey(r)){for(var a=0;e.hasKey(r+a);)a++;r+=a}return e.set(r,!0),r}var dV=function(){function r(e){this.coordSysDims=[],this.axisMap=J(),this.categoryAxisMap=J(),this.coordSysName=e}return r}();function pV(r){var e=r.get("coordinateSystem"),t=new dV(e),a=gV[e];if(a)return a(r,t,t.axisMap,t.categoryAxisMap),t}var gV={cartesian2d:function(r,e,t,a){var i=r.getReferringComponents("xAxis",Jt).models[0],n=r.getReferringComponents("yAxis",Jt).models[0];e.coordSysDims=["x","y"],t.set("x",i),t.set("y",n),Qo(i)&&(a.set("x",i),e.firstCategoryDimIndex=0),Qo(n)&&(a.set("y",n),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(r,e,t,a){var i=r.getReferringComponents("singleAxis",Jt).models[0];e.coordSysDims=["single"],t.set("single",i),Qo(i)&&(a.set("single",i),e.firstCategoryDimIndex=0)},polar:function(r,e,t,a){var i=r.getReferringComponents("polar",Jt).models[0],n=i.findAxisModel("radiusAxis"),o=i.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],t.set("radius",n),t.set("angle",o),Qo(n)&&(a.set("radius",n),e.firstCategoryDimIndex=0),Qo(o)&&(a.set("angle",o),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},geo:function(r,e,t,a){e.coordSysDims=["lng","lat"]},parallel:function(r,e,t,a){var i=r.ecModel,n=i.getComponent("parallel",r.get("parallelIndex")),o=e.coordSysDims=n.dimensions.slice();M(n.parallelAxisIndex,function(s,l){var u=i.getComponent("parallelAxis",s),h=o[l];t.set(h,u),Qo(u)&&(a.set(h,u),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=l))})},matrix:function(r,e,t,a){var i=r.getReferringComponents("matrix",Jt).models[0];e.coordSysDims=["x","y"];var n=i.getDimensionModel("x"),o=i.getDimensionModel("y");t.set("x",n),t.set("y",o),a.set("x",n),a.set("y",o)}};function Qo(r){return r.get("type")==="category"}function yV(r,e,t){t=t||{};var a=t.byIndex,i=t.stackedCoordDimension,n,o,s;mV(e)?n=e:(o=e.schema,n=o.dimensions,s=e.store);var l=!!(r&&r.get("stack")),u,h,f,v;if(M(n,function(m,_){$(m)&&(n[_]=m={name:m}),l&&!m.isExtraCoord&&(!a&&!u&&m.ordinalMeta&&(u=m),!h&&m.type!=="ordinal"&&m.type!=="time"&&(!i||i===m.coordDim)&&(h=m))}),h&&!a&&!u&&(a=!0),h){f="__\0ecstackresult_"+r.id,v="__\0ecstackedover_"+r.id,u&&(u.createInvertedIndices=!0);var c=h.coordDim,d=h.type,p=0;M(n,function(m){m.coordDim===c&&p++});var g={name:f,coordDim:c,coordDimIndex:p,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:n.length},y={name:v,coordDim:v,coordDimIndex:p+1,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:n.length+1};o?(s&&(g.storeDimIndex=s.ensureCalculationDimension(v,d),y.storeDimIndex=s.ensureCalculationDimension(f,d)),o.appendCalculationDimension(g),o.appendCalculationDimension(y)):(n.push(g),n.push(y))}return{stackedDimension:h&&h.name,stackedByDimension:u&&u.name,isStackedByIndex:a,stackedOverDimension:v,stackResultDimension:f}}function mV(r){return!CT(r.schema)}function wi(r,e){return!!e&&e===r.getCalculationInfo("stackedDimension")}function PT(r,e){return wi(r,e)?r.getCalculationInfo("stackResultDimension"):e}function _V(r,e){var t=r.get("coordinateSystem"),a=fl.get(t),i;return e&&e.coordSysDims&&(i=U(e.coordSysDims,function(n){var o={name:n},s=e.axisMap.get(n);if(s){var l=s.get("type");o.type=wf(l)}return o})),i||(i=a&&(a.getDimensionsInfo?a.getDimensionsInfo():a.dimensions.slice())||["x","y"]),i}function xV(r,e,t){var a,i;return t&&M(r,function(n,o){var s=n.coordDim,l=t.categoryAxisMap.get(s);l&&(a==null&&(a=o),n.ordinalMeta=l.getOrdinalMeta(),e&&(n.createInvertedIndices=!0)),n.otherDims.itemName!=null&&(i=!0)}),!i&&a!=null&&(r[a].otherDims.itemName=0),a}function Ha(r,e,t){t=t||{};var a=e.getSourceManager(),i,n=!1;r?(n=!0,i=Hp(r)):(i=a.getSource(),n=i.sourceFormat===lr);var o=pV(e),s=_V(e,o),l=t.useEncodeDefaulter,u=rt(l)?l:l?pt(db,s,e):null,h={coordDimensions:s,generateCoord:t.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!n},f=kl(i,h),v=xV(f.dimensions,t.createInvertedIndices,o),c=n?null:a.getSharedDataStore(f),d=yV(e,{schema:f,store:c}),p=new Ue(f,e);p.setCalculationInfo(d);var g=v!=null&&SV(i)?function(y,m,_,x){return x===v?_:this.defaultDimValueGetter(y,m,_,x)}:null;return p.hasItemOption=!1,p.initData(n?i:c,null,g),p}function SV(r){if(r.sourceFormat===lr){var e=bV(r.data||[]);return!W(bo(e))}}function bV(r){for(var e=0;e<r.length&&r[e]==null;)e++;return r[e]}function Cg(r){return r.type==="interval"||r.type==="log"}function wV(r,e,t,a,i){var n={},o=n.interval=E1(e/t,!0);a!=null&&o<a&&(o=n.interval=a),i!=null&&o>i&&(o=n.interval=i);var s=n.intervalPrecision=Rl(o),l=n.niceTickExtent=[ne(Math.ceil(r[0]/o)*o,s),ne(Math.floor(r[1]/o)*o,s)];return TV(l,r),n}function Ag(r){var e=Math.pow(10,cd(r)),t=r/e;return t?t===2?t=3:t===3?t=5:t*=2:t=1,ne(t*e)}function Rl(r){return aa(r)+2}function kT(r,e,t){r[e]=Math.max(Math.min(r[e],t[1]),t[0])}function TV(r,e){!isFinite(r[0])&&(r[0]=e[0]),!isFinite(r[1])&&(r[1]=e[1]),kT(r,0,e),kT(r,1,e),r[0]>r[1]&&(r[0]=r[1])}function Mg(r,e){return r>=e[0]&&r<=e[1]}var CV=function(){function r(){this.normalize=RT,this.scale=ET}return r.prototype.updateMethods=function(e){e.hasBreaks()?(this.normalize=X(e.normalize,e),this.scale=X(e.scale,e)):(this.normalize=RT,this.scale=ET)},r}();function RT(r,e){return e[1]===e[0]?.5:(r-e[0])/(e[1]-e[0])}function ET(r,e){return r*(e[1]-e[0])+e[0]}function Dg(r,e,t){var a=Math.log(r);return[Math.log(t?e[0]:Math.max(0,e[0]))/a,Math.log(t?e[1]:Math.max(0,e[1]))/a]}var Ti=function(){function r(e){this._calculator=new CV,this._setting=e||{},this._extent=[1/0,-1/0];var t=se();t&&(this._brkCtx=t.createScaleBreakContext(),this._brkCtx.update(this._extent))}return r.prototype.getSetting=function(e){return this._setting[e]},r.prototype._innerUnionExtent=function(e){var t=this._extent;this._innerSetExtent(e[0]<t[0]?e[0]:t[0],e[1]>t[1]?e[1]:t[1])},r.prototype.unionExtentFromData=function(e,t){this._innerUnionExtent(e.getApproximateExtent(t))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(e,t){this._innerSetExtent(e,t)},r.prototype._innerSetExtent=function(e,t){var a=this._extent;isNaN(e)||(a[0]=e),isNaN(t)||(a[1]=t),this._brkCtx&&this._brkCtx.update(a)},r.prototype.setBreaksFromOption=function(e){var t=se();t&&this._innerSetBreak(t.parseAxisBreakOption(e,X(this.parse,this)))},r.prototype._innerSetBreak=function(e){this._brkCtx&&(this._brkCtx.setBreaks(e),this._calculator.updateMethods(this._brkCtx),this._brkCtx.update(this._extent))},r.prototype._innerGetBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},r.prototype.hasBreaks=function(){return this._brkCtx?this._brkCtx.hasBreaks():!1},r.prototype._getExtentSpanWithBreaks=function(){return this._brkCtx&&this._brkCtx.hasBreaks()?this._brkCtx.getExtentSpan():this._extent[1]-this._extent[0]},r.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},r.prototype.isBlank=function(){return this._isBlank},r.prototype.setBlank=function(e){this._isBlank=e},r}();ch(Ti);var AV=0,El=function(){function r(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++AV,this._onCollect=e.onCollect}return r.createByAxisModel=function(e){var t=e.option,a=t.data,i=a&&U(a,MV);return new r({categories:i,needCollect:!i,deduplication:t.dedplication!==!1})},r.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},r.prototype.parseAndCollect=function(e){var t,a=this._needCollect;if(!$(e)&&!a)return e;if(a&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,this._onCollect&&this._onCollect(e,t),t;var i=this._getOrCreateMap();return t=i.get(e),t==null&&(a?(t=this.categories.length,this.categories[t]=e,i.set(e,t),this._onCollect&&this._onCollect(e,t)):t=NaN),t},r.prototype._getOrCreateMap=function(){return this._map||(this._map=J(this.categories))},r}();function MV(r){return lt(r)&&r.value!=null?r.value:r+""}var ts=function(r){z(e,r);function e(t){var a=r.call(this,t)||this;a.type="ordinal";var i=a.getSetting("ordinalMeta");return i||(i=new El({})),W(i)&&(i=new El({categories:U(i,function(n){return lt(n)?n.value:n})})),a._ordinalMeta=i,a._extent=a.getSetting("extent")||[0,i.categories.length-1],a}return e.prototype.parse=function(t){return t==null?NaN:$(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return Mg(t,this._extent)&&t>=0&&t<this._ordinalMeta.categories.length},e.prototype.normalize=function(t){return t=this._getTickNumber(t),this._calculator.normalize(t,this._extent)},e.prototype.scale=function(t){return t=Math.round(this._calculator.scale(t,this._extent)),this.getRawOrdinalNumber(t)},e.prototype.getTicks=function(){for(var t=[],a=this._extent,i=a[0];i<=a[1];)t.push({value:i}),i++;return t},e.prototype.getMinorTicks=function(t){},e.prototype.setSortInfo=function(t){if(t==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var a=t.ordinalNumbers,i=this._ordinalNumbersByTick=[],n=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Math.min(s,a.length);o<l;++o){var u=a[o];i[o]=u,n[u]=o}for(var h=0;o<s;++o){for(;n[h]!=null;)h++;i.push(h),n[h]=o}},e.prototype._getTickNumber=function(t){var a=this._ticksByOrdinalNumber;return a&&t>=0&&t<a.length?a[t]:t},e.prototype.getRawOrdinalNumber=function(t){var a=this._ordinalNumbersByTick;return a&&t>=0&&t<a.length?a[t]:t},e.prototype.getLabel=function(t){if(!this.isBlank()){var a=this.getRawOrdinalNumber(t.value),i=this._ordinalMeta.categories[a];return i==null?"":i+""}},e.prototype.count=function(){return this._extent[1]-this._extent[0]+1},e.prototype.isInExtentRange=function(t){return t=this._getTickNumber(t),this._extent[0]<=t&&this._extent[1]>=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(Ti);Ti.registerClass(ts);var Ci=ne,Wa=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="interval",t._interval=0,t._intervalPrecision=2,t}return e.prototype.parse=function(t){return t==null||t===""?NaN:Number(t)},e.prototype.contain=function(t){return Mg(t,this._extent)},e.prototype.normalize=function(t){return this._calculator.normalize(t,this._extent)},e.prototype.scale=function(t){return this._calculator.scale(t,this._extent)},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=Rl(t)},e.prototype.getTicks=function(t){t=t||{};var a=this._interval,i=this._extent,n=this._niceExtent,o=this._intervalPrecision,s=se(),l=[];if(!a)return l;if(t.breakTicks==="only_break"&&s)return s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l;var u=1e4;i[0]<n[0]&&(t.expandToNicedExtent?l.push({value:Ci(n[0]-a,o)}):l.push({value:i[0]}));for(var h=function(d,p){return Math.round((p-d)/a)},f=n[0];f<=n[1];){if(l.push({value:f}),f=Ci(f+a,o),this._brkCtx){var v=this._brkCtx.calcNiceTickMultiple(f,h);v>=0&&(f=Ci(f+v*a,o))}if(l.length>0&&f===l[l.length-1].value)break;if(l.length>u)return[]}var c=l.length?l[l.length-1].value:n[1];return i[1]>c&&(t.expandToNicedExtent?l.push({value:Ci(c+a,o)}):l.push({value:i[1]})),s&&s.pruneTicksByBreak(t.pruneByBreak,l,this._brkCtx.breaks,function(d){return d.value},this._interval,this._extent),t.breakTicks!=="none"&&s&&s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l},e.prototype.getMinorTicks=function(t){for(var a=this.getTicks({expandToNicedExtent:!0}),i=[],n=this.getExtent(),o=1;o<a.length;o++){var s=a[o],l=a[o-1];if(!(l.break||s.break)){for(var u=0,h=[],f=s.value-l.value,v=f/t,c=Rl(v);u<t-1;){var d=Ci(l.value+(u+1)*v,c);d>n[0]&&d<n[1]&&h.push(d),u++}var p=se();p&&p.pruneTicksByBreak("auto",h,this._getNonTransBreaks(),function(g){return g},this._interval,n),i.push(h)}}return i},e.prototype._getNonTransBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},e.prototype.getLabel=function(t,a){if(t==null)return"";var i=a&&a.precision;i==null?i=aa(t.value)||0:i==="auto"&&(i=this._intervalPrecision);var n=Ci(t.value,i,!0);return KS(n)},e.prototype.calcNiceTicks=function(t,a,i){t=t||5;var n=this._extent.slice(),o=this._getExtentSpanWithBreaks();if(isFinite(o)){o<0&&(o=-o,n.reverse(),this._innerSetExtent(n[0],n[1]),n=this._extent.slice());var s=wV(n,o,t,a,i);this._intervalPrecision=s.intervalPrecision,this._interval=s.interval,this._niceExtent=s.niceTickExtent}},e.prototype.calcNiceExtent=function(t){var a=this._extent.slice();if(a[0]===a[1])if(a[0]!==0){var i=Math.abs(a[0]);t.fixMax||(a[1]+=i/2),a[0]-=i/2}else a[1]=1;var n=a[1]-a[0];isFinite(n)||(a[0]=0,a[1]=1),this._innerSetExtent(a[0],a[1]),a=this._extent.slice(),this.calcNiceTicks(t.splitNumber,t.minInterval,t.maxInterval);var o=this._interval,s=this._intervalPrecision;t.fixMin||(a[0]=Ci(Math.floor(a[0]/o)*o,s)),t.fixMax||(a[1]=Ci(Math.ceil(a[1]/o)*o,s)),this._innerSetExtent(a[0],a[1])},e.prototype.setNiceExtent=function(t,a){this._niceExtent=[t,a]},e.type="interval",e}(Ti);Ti.registerClass(Wa);var OT=typeof Float32Array<"u",DV=OT?Float32Array:Array;function da(r){return W(r)?OT?new Float32Array(r):r:new DV(r)}var Lg="__ec_stack_";function Ig(r){return r.get("stack")||Lg+r.seriesIndex}function Pg(r){return r.dim+r.index}function LV(r){var e=[],t=r.axis,a="axis0";if(t.type==="category"){for(var i=t.getBandWidth(),n=0;n<r.count;n++)e.push(st({bandWidth:i,axisKey:a,stackId:Lg+n},r));for(var o=zT(e),s=[],n=0;n<r.count;n++){var l=o[a][Lg+n];l.offsetCenter=l.offset+l.width/2,s.push(l)}return s}}function NT(r,e){var t=[];return e.eachSeriesByType(r,function(a){FT(a)&&t.push(a)}),t}function IV(r){var e={};M(r,function(l){var u=l.coordinateSystem,h=u.getBaseAxis();if(!(h.type!=="time"&&h.type!=="value"))for(var f=l.getData(),v=h.dim+"_"+h.index,c=f.getDimensionIndex(f.mapDimension(h.dim)),d=f.getStore(),p=0,g=d.count();p<g;++p){var y=d.get(c,p);e[v]?e[v].push(y):e[v]=[y]}});var t={};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))}t[a]=n}}return t}function BT(r){var e=IV(r),t=[];return M(r,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(),v=Math.abs(f[1]-f[0]);s=u?h/v*u:h}else{var c=a.getData();s=Math.abs(o[1]-o[0])/c.count()}var d=Z(a.get("barWidth"),s),p=Z(a.get("barMaxWidth"),s),g=Z(a.get("barMinWidth")||(HT(a)?.5:1),s),y=a.get("barGap"),m=a.get("barCategoryGap"),_=a.get("defaultBarGap");t.push({bandWidth:s,barWidth:d,barMaxWidth:p,barMinWidth:g,barGap:y,barCategoryGap:m,defaultBarGap:_,axisKey:Pg(n),stackId:Ig(a)})}),zT(t)}function zT(r){var e={};M(r,function(a,i){var n=a.axisKey,o=a.bandWidth,s=e[n]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:a.defaultBarGap||0,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 v=a.barMinWidth;v&&(l[u].minWidth=v);var c=a.barGap;c!=null&&(s.gap=c);var d=a.barCategoryGap;d!=null&&(s.categoryGap=d)});var t={};return M(e,function(a,i){t[i]={};var n=a.stacks,o=a.bandWidth,s=a.categoryGap;if(s==null){var l=Mt(n).length;s=Math.max(35-l*4,15)+"%"}var u=Z(s,o),h=Z(a.gap,1),f=a.remainedWidth,v=a.autoWidthCount,c=(f-u)/(v+(v-1)*h);c=Math.max(c,0),M(n,function(y){var m=y.maxWidth,_=y.minWidth;if(y.width){var x=y.width;m&&(x=Math.min(x,m)),_&&(x=Math.max(x,_)),y.width=x,f-=x+h*x,v--}else{var x=c;m&&m<x&&(x=Math.min(m,f)),_&&_>x&&(x=_),x!==c&&(y.width=x,f-=x+h*x,v--)}}),c=(f-u)/(v+(v-1)*h),c=Math.max(c,0);var d=0,p;M(n,function(y,m){y.width||(y.width=c),p=y,d+=y.width*(1+h)}),p&&(d-=p.width*h);var g=-d/2;M(n,function(y,m){t[i][m]=t[i][m]||{bandWidth:o,offset:g,width:y.width},g+=y.width*(1+h)})}),t}function PV(r,e,t){if(r&&e){var a=r[Pg(e)];return a!=null&&t!=null?a[Ig(t)]:a}}function VT(r,e){var t=NT(r,e),a=BT(t);M(t,function(i){var n=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),l=Ig(i),u=a[Pg(s)][l],h=u.offset,f=u.width;n.setLayout({bandWidth:u.bandWidth,offset:h,size:f})})}function GT(r){return{seriesType:r,plan:Uo(),reset:function(e){if(FT(e)){var t=e.getData(),a=e.coordinateSystem,i=a.getBaseAxis(),n=a.getOtherAxis(i),o=t.getDimensionIndex(t.mapDimension(n.dim)),s=t.getDimensionIndex(t.mapDimension(i.dim)),l=e.get("showBackground",!0),u=t.mapDimension(n.dim),h=t.getCalculationInfo("stackResultDimension"),f=wi(t,u)&&!!t.getCalculationInfo("stackedOnSeries"),v=n.isHorizontal(),c=kV(i,n),d=HT(e),p=e.get("barMinHeight")||0,g=h&&t.getDimensionIndex(h),y=t.getLayout("size"),m=t.getLayout("offset");return{progress:function(_,x){for(var b=_.count,S=d&&da(b*3),w=d&&l&&da(b*3),T=d&&da(b),C=a.master.getRect(),A=v?C.width:C.height,D,I=x.getStore(),L=0;(D=_.next())!=null;){var P=I.get(f?g:o,D),k=I.get(s,D),R=c,O=void 0;f&&(O=+P-I.get(o,D));var E=void 0,N=void 0,V=void 0,G=void 0;if(v){var H=a.dataToPoint([P,k]);if(f){var Y=a.dataToPoint([O,k]);R=Y[0]}E=R,N=H[1]+m,V=H[0]-R,G=y,Math.abs(V)<p&&(V=(V<0?-1:1)*p)}else{var H=a.dataToPoint([k,P]);if(f){var Y=a.dataToPoint([k,O]);R=Y[1]}E=H[0]+m,N=R,V=y,G=H[1]-R,Math.abs(G)<p&&(G=(G<=0?-1:1)*p)}d?(S[L]=E,S[L+1]=N,S[L+2]=v?V:G,w&&(w[L]=v?C.x:E,w[L+1]=v?N:C.y,w[L+2]=A),T[D]=D):x.setItemLayout(D,{x:E,y:N,width:V,height:G}),L+=3}d&&x.setLayout({largePoints:S,largeDataIndices:T,largeBackgroundPoints:w,valueAxisHorizontal:v})}}}}}}function FT(r){return r.coordinateSystem&&r.coordinateSystem.type==="cartesian2d"}function HT(r){return r.pipelineContext&&r.pipelineContext.large}function kV(r,e){var t=e.model.get("startValue");return t||(t=0),e.toGlobalCoord(e.dataToCoord(e.type==="log"?t>0?t:1:t))}var RV=function(r,e,t,a){for(;t<a;){var i=t+a>>>1;r[i][1]<e?t=i+1:a=i}return t},kg=function(r){z(e,r);function e(t){var a=r.call(this,t)||this;return a.type="time",a}return e.prototype.getLabel=function(t){var a=this.getSetting("useUTC");return qh(t.value,HS[nB(ul(this._minLevelUnit))]||HS.second,a,this.getSetting("locale"))},e.prototype.getFormattedLabel=function(t,a,i){var n=this.getSetting("useUTC"),o=this.getSetting("locale");return oB(t,a,i,o,n)},e.prototype.getTicks=function(t){t=t||{};var a=this._interval,i=this._extent,n=se(),o=[];if(!a)return o;var s=this.getSetting("useUTC");if(n&&t.breakTicks==="only_break")return se().addBreaksToTicks(o,this._brkCtx.breaks,this._extent),o;var l=Vo(i[1],s);o.push({value:i[0],time:{level:0,upperTimeUnit:l,lowerTimeUnit:l}});var u=GV(this._minLevelUnit,this._approxInterval,s,i,this._getExtentSpanWithBreaks(),this._brkCtx);o=o.concat(u);var h=Vo(i[1],s);o.push({value:i[1],time:{level:0,upperTimeUnit:h,lowerTimeUnit:h}});var f=this.getSetting("useUTC"),v=sr.length-1,c=0;return M(o,function(d){v=Math.min(v,gt(sr,d.time.upperTimeUnit)),c=Math.max(c,d.time.level)}),n&&se().pruneTicksByBreak(t.pruneByBreak,o,this._brkCtx.breaks,function(d){return d.value},this._approxInterval,this._extent),n&&t.breakTicks!=="none"&&se().addBreaksToTicks(o,this._brkCtx.breaks,this._extent,function(d){for(var p=Math.max(gt(sr,Vo(d.vmin,f)),gt(sr,Vo(d.vmax,f))),g=0,y=0;y<sr.length;y++)if(!WT(sr[y],d.vmin,d.vmax,f)){g=y;break}var m=Math.min(g,v),_=Math.max(m,p);return{level:c,lowerTimeUnit:sr[_],upperTimeUnit:sr[m]}}),o},e.prototype.calcNiceExtent=function(t){var a=this.getExtent();if(a[0]===a[1]&&(a[0]-=Tr,a[1]+=Tr),a[1]===-1/0&&a[0]===1/0){var i=new Date;a[1]=+new Date(i.getFullYear(),i.getMonth(),i.getDate()),a[0]=a[1]-Tr}this._innerSetExtent(a[0],a[1]),this.calcNiceTicks(t.splitNumber,t.minInterval,t.maxInterval)},e.prototype.calcNiceTicks=function(t,a,i){t=t||10;var n=this._getExtentSpanWithBreaks();this._approxInterval=n/t,a!=null&&this._approxInterval<a&&(this._approxInterval=a),i!=null&&this._approxInterval>i&&(this._approxInterval=i);var o=Af.length,s=Math.min(RV(Af,this._approxInterval,0,o),o-1);this._interval=Af[s][1],this._intervalPrecision=Rl(this._interval),this._minLevelUnit=Af[Math.max(s-1,0)][0]},e.prototype.parse=function(t){return Dt(t)?t:+Qi(t)},e.prototype.contain=function(t){return Mg(t,this._extent)},e.prototype.normalize=function(t){return this._calculator.normalize(t,this._extent)},e.prototype.scale=function(t){return this._calculator.scale(t,this._extent)},e.type="time",e}(Wa),Af=[["second",mp],["minute",_p],["hour",ll],["quarter-day",ll*6],["half-day",ll*12],["day",Tr*1.2],["half-week",Tr*3.5],["week",Tr*7],["month",Tr*31],["quarter",Tr*95],["half-year",FS/2],["year",FS]];function WT(r,e,t,a){return xp(new Date(e),r,a).getTime()===xp(new Date(t),r,a).getTime()}function EV(r,e){return r/=Tr,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function OV(r){var e=30*Tr;return r/=e,r>6?6:r>3?3:r>2?2:1}function NV(r){return r/=ll,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function UT(r,e){return r/=e?_p:mp,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function BV(r){return E1(r,!0)}function zV(r,e,t){var a=Math.max(0,gt(sr,e)-1);return xp(new Date(r),sr[a],t).getTime()}function VV(r,e){var t=new Date(0);t[r](1);var a=t.getTime();t[r](1+e);var i=t.getTime()-a;return function(n,o){return Math.max(0,Math.round((o-n)/i))}}function GV(r,e,t,a,i,n){var o=1e4,s=eB,l=0;function u(L,P,k,R,O,E,N){for(var V=VV(O,L),G=P,H=new Date(G);G<k&&G<=a[1]&&(N.push({value:G}),!(l++>o));)if(H[O](H[R]()+L),G=H.getTime(),n){var Y=n.calcNiceTickMultiple(G,V);Y>0&&(H[O](H[R]()+Y*L),G=H.getTime())}N.push({value:G,notAdd:!0})}function h(L,P,k){var R=[],O=!P.length;if(!WT(ul(L),a[0],a[1],t)){O&&(P=[{value:zV(a[0],L,t)},{value:a[1]}]);for(var E=0;E<P.length-1;E++){var N=P[E].value,V=P[E+1].value;if(N!==V){var G=void 0,H=void 0,Y=void 0,q=!1;switch(L){case"year":G=Math.max(1,Math.round(e/Tr/365)),H=WS(t),Y=sB(t);break;case"half-year":case"quarter":case"month":G=OV(e),H=Sp(t),Y=US(t);break;case"week":case"half-week":case"day":G=EV(e),H=bp(t),Y=YS(t),q=!0;break;case"half-day":case"quarter-day":case"hour":G=NV(e),H=wp(t),Y=ZS(t);break;case"minute":G=UT(e,!0),H=Tp(t),Y=$S(t);break;case"second":G=UT(e,!1),H=Cp(t),Y=XS(t);break;case"millisecond":G=BV(e),H=Ap(t),Y=qS(t);break}V>=a[0]&&N<=a[1]&&u(G,N,V,H,Y,q,R),L==="year"&&k.length>1&&E===0&&k.unshift({value:k[0].value-G})}}for(var E=0;E<R.length;E++)k.push(R[E])}}for(var f=[],v=[],c=0,d=0,p=0;p<s.length;++p){var g=ul(s[p]);if(iB(s[p])){h(s[p],f[f.length-1]||[],v);var y=s[p+1]?ul(s[p+1]):null;if(g!==y){if(v.length){d=c,v.sort(function(L,P){return L.value-P.value});for(var m=[],_=0;_<v.length;++_){var x=v[_].value;(_===0||v[_-1].value!==x)&&(m.push(v[_]),x>=a[0]&&x<=a[1]&&c++)}var b=i/e;if(c>b*1.5&&d>b/1.5||(f.push(m),c>b||r===s[p]))break}v=[]}}}for(var S=Et(U(f,function(L){return Et(L,function(P){return P.value>=a[0]&&P.value<=a[1]&&!P.notAdd})}),function(L){return L.length>0}),w=[],T=S.length-1,p=0;p<S.length;++p)for(var C=S[p],A=0;A<C.length;++A){var D=Vo(C[A].value,t);w.push({value:C[A].value,time:{level:T-p,upperTimeUnit:D,lowerTimeUnit:D}})}w.sort(function(L,P){return L.value-P.value});for(var I=[],p=0;p<w.length;++p)(p===0||w[p].value!==w[p-1].value)&&I.push(w[p]);return I}Ti.registerClass(kg);var Rg=ne,FV=Math.floor,HV=Math.ceil,Mf=Math.pow,Df=Math.log,YT=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="log",t.base=10,t._originalScale=new Wa,t}return e.prototype.getTicks=function(t){t=t||{};var a=this._extent.slice(),i=this._originalScale.getExtent(),n=r.prototype.getTicks.call(this,t),o=this.base,s=this._originalScale._innerGetBreaks(),l=se();return U(n,function(u){var h=u.value,f=null,v=Mf(o,h);h===a[0]&&this._fixMin?f=i[0]:h===a[1]&&this._fixMax&&(f=i[1]);var c;if(l){var d=l.getTicksLogTransformBreak(u,o,s,Lf);c=d.vBreak,f==null&&(f=d.brkRoundingCriterion)}return f!=null&&(v=Lf(v,f)),{value:v,break:c}},this)},e.prototype._getNonTransBreaks=function(){return this._originalScale._innerGetBreaks()},e.prototype.setExtent=function(t,a){this._originalScale.setExtent(t,a);var i=Dg(this.base,[t,a]);r.prototype.setExtent.call(this,i[0],i[1])},e.prototype.getExtent=function(){var t=this.base,a=r.prototype.getExtent.call(this);a[0]=Mf(t,a[0]),a[1]=Mf(t,a[1]);var i=this._originalScale.getExtent();return this._fixMin&&(a[0]=Lf(a[0],i[0])),this._fixMax&&(a[1]=Lf(a[1],i[1])),a},e.prototype.unionExtentFromData=function(t,a){this._originalScale.unionExtentFromData(t,a);var i=Dg(this.base,t.getApproximateExtent(a),!0);this._innerUnionExtent(i)},e.prototype.calcNiceTicks=function(t){t=t||10;var a=this._extent.slice(),i=this._getExtentSpanWithBreaks();if(!(!isFinite(i)||i<=0)){var n=SE(i),o=t/i*n;for(o<=.5&&(n*=10);!isNaN(n)&&Math.abs(n)<1&&Math.abs(n)>0;)n*=10;var s=[Rg(HV(a[0]/n)*n),Rg(FV(a[1]/n)*n)];this._interval=n,this._intervalPrecision=Rl(n),this._niceExtent=s}},e.prototype.calcNiceExtent=function(t){r.prototype.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.contain=function(t){return t=Df(t)/Df(this.base),r.prototype.contain.call(this,t)},e.prototype.normalize=function(t){return t=Df(t)/Df(this.base),r.prototype.normalize.call(this,t)},e.prototype.scale=function(t){return t=r.prototype.scale.call(this,t),Mf(this.base,t)},e.prototype.setBreaksFromOption=function(t){var a=se();if(a){var i=a.logarithmicParseBreaksFromOption(t,this.base,X(this.parse,this)),n=i.parsedOriginal,o=i.parsedLogged;this._originalScale._innerSetBreak(n),this._innerSetBreak(o)}},e.type="log",e}(Wa);function Lf(r,e){return Rg(r,aa(e))}Ti.registerClass(YT);var WV=function(){function r(e,t,a){this._prepareParams(e,t,a)}return r.prototype._prepareParams=function(e,t,a){a[1]<a[0]&&(a=[NaN,NaN]),this._dataMin=a[0],this._dataMax=a[1];var i=this._isOrdinal=e.type==="ordinal";this._needCrossZero=e.type==="interval"&&t.getNeedCrossZero&&t.getNeedCrossZero();var n=t.get("min",!0);n==null&&(n=t.get("startValue",!0));var o=this._modelMinRaw=n;rt(o)?this._modelMinNum=If(e,o({min:a[0],max:a[1]})):o!=="dataMin"&&(this._modelMinNum=If(e,o));var s=this._modelMaxRaw=t.get("max",!0);if(rt(s)?this._modelMaxNum=If(e,s({min:a[0],max:a[1]})):s!=="dataMax"&&(this._modelMaxNum=If(e,s)),i)this._axisDataLen=t.getCategories().length;else{var l=t.get("boundaryGap"),u=W(l)?l:[l||0,l||0];typeof u[0]=="boolean"||typeof u[1]=="boolean"?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[Nr(u[0],1),Nr(u[1],1)]}},r.prototype.calculate=function(){var e=this._isOrdinal,t=this._dataMin,a=this._dataMax,i=this._axisDataLen,n=this._boundaryGapInner,o=e?null:a-t||Math.abs(t),s=this._modelMinRaw==="dataMin"?t:this._modelMinNum,l=this._modelMaxRaw==="dataMax"?a:this._modelMaxNum,u=s!=null,h=l!=null;s==null&&(s=e?i?0:NaN:t-n[0]*o),l==null&&(l=e?i?i-1:NaN:a+n[1]*o),(s==null||!isFinite(s))&&(s=NaN),(l==null||!isFinite(l))&&(l=NaN);var f=Re(s)||Re(l)||e&&!i;this._needCrossZero&&(s>0&&l>0&&!u&&(s=0),s<0&&l<0&&!h&&(l=0));var v=this._determinedMin,c=this._determinedMax;return v!=null&&(s=v,u=!0),c!=null&&(l=c,h=!0),{min:s,max:l,minFixed:u,maxFixed:h,isBlank:f}},r.prototype.modifyDataMinMax=function(e,t){this[YV[e]]=t},r.prototype.setDeterminedMinMax=function(e,t){var a=UV[e];this[a]=t},r.prototype.freeze=function(){this.frozen=!0},r}(),UV={min:"_determinedMin",max:"_determinedMax"},YV={min:"_dataMin",max:"_dataMax"};function ZT(r,e,t){var a=r.rawExtentInfo;return a||(a=new WV(r,e,t),r.rawExtentInfo=a,a)}function If(r,e){return e==null?null:Re(e)?NaN:r.parse(e)}function $T(r,e){var t=r.type,a=ZT(r,e,r.getExtent()).calculate();r.setBlank(a.isBlank);var i=a.min,n=a.max,o=e.ecModel;if(o&&t==="time"){var s=NT("bar",o),l=!1;if(M(s,function(f){l=l||f.getBaseAxis()===e.axis}),l){var u=BT(s),h=ZV(i,n,e,u);i=h.min,n=h.max}}return{extent:[i,n],fixMin:a.minFixed,fixMax:a.maxFixed}}function ZV(r,e,t,a){var i=t.axis.getExtent(),n=Math.abs(i[1]-i[0]),o=PV(a,t.axis);if(o===void 0)return{min:r,max:e};var s=1/0;M(o,function(c){s=Math.min(c.offset,s)});var l=-1/0;M(o,function(c){l=Math.max(c.offset+c.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,h=e-r,f=1-(s+l)/n,v=h/f-h;return e+=v*(l/u),r-=v*(s/u),{min:r,max:e}}function es(r,e){var t=e,a=$T(r,t),i=a.extent,n=t.get("splitNumber");r instanceof YT&&(r.base=t.get("logBase"));var o=r.type,s=t.get("interval"),l=o==="interval"||o==="time";r.setBreaksFromOption(qT(t)),r.setExtent(i[0],i[1]),r.calcNiceExtent({splitNumber:n,fixMin:a.fixMin,fixMax:a.fixMax,minInterval:l?t.get("minInterval"):null,maxInterval:l?t.get("maxInterval"):null}),s!=null&&r.setInterval&&r.setInterval(s)}function Pf(r,e){if(e=e||r.get("type"),e)switch(e){case"category":return new ts({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:[1/0,-1/0]});case"time":return new kg({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new(Ti.getClass(e)||Wa)}}function $V(r){var e=r.scale.getExtent(),t=e[0],a=e[1];return!(t>0&&a>0||t<0&&a<0)}function rs(r){var e=r.getLabelModel().get("formatter");if(r.type==="time"){var t=rB(e);return function(i,n){return r.scale.getFormattedLabel(i,n,t)}}else{if($(e))return function(i){var n=r.scale.getLabel(i),o=e.replace("{value}",n??"");return o};if(rt(e)){if(r.type==="category")return function(i,n){return e(kf(r,i),i.value-r.scale.getExtent()[0],null)};var a=se();return function(i,n){var o=null;return a&&(o=a.makeAxisLabelFormatterParamBreak(o,i.break)),e(kf(r,i),n,o)}}else return function(i){return r.scale.getLabel(i)}}}function kf(r,e){return r.type==="category"?r.scale.getLabel(e):e.value}function Eg(r){var e=r.get("interval");return e??"auto"}function XT(r){return r.type==="category"&&Eg(r.getLabelModel())===0}function Rf(r,e){var t={};return M(r.mapDimensionsAll(e),function(a){t[PT(r,a)]=!0}),Mt(t)}function XV(r,e,t){e&&M(Rf(e,t),function(a){var i=e.getApproximateExtent(a);i[0]<r[0]&&(r[0]=i[0]),i[1]>r[1]&&(r[1]=i[1])})}function as(r){return r==="middle"||r==="center"}function Ol(r){return r.getShallow("show")}function qT(r){var e=r.get("breaks",!0);if(e!=null)return!se()||!qV(r.axis)?void 0:e}function qV(r){return(r.dim==="x"||r.dim==="y"||r.dim==="z"||r.dim==="single")&&r.type!=="category"}var Nl=function(){function r(){}return r.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},r.prototype.getCoordSysModel=function(){},r}(),KV=1e-8;function KT(r,e){return Math.abs(r-e)<KV}function Vn(r,e,t){var a=0,i=r[0];if(!i)return!1;for(var n=1;n<r.length;n++){var o=r[n];a+=Ra(i[0],i[1],o[0],o[1],e,t),i=o}var s=r[0];return(!KT(i[0],s[0])||!KT(i[1],s[1]))&&(a+=Ra(i[0],i[1],s[0],s[1],e,t)),a!==0}var jV=[];function Og(r,e){for(var t=0;t<r.length;t++)te(r[t],r[t],e)}function jT(r,e,t,a){for(var i=0;i<r.length;i++){var n=r[i];a&&(n=a.project(n)),n&&isFinite(n[0])&&isFinite(n[1])&&(ti(e,e,n),ei(t,t,n))}}function JV(r){for(var e=0,t=0,a=0,i=r.length,n=r[i-1][0],o=r[i-1][1],s=0;s<i;s++){var l=r[s][0],u=r[s][1],h=n*u-l*o;e+=h,t+=(n+l)*h,a+=(o+u)*h,n=l,o=u}return e?[t/e/3,a/e/3,e]:[r[0][0]||0,r[0][1]||0]}var JT=function(){function r(e){this.name=e}return r.prototype.setCenter=function(e){this._center=e},r.prototype.getCenter=function(){var e=this._center;return e||(e=this._center=this.calcCenter()),e},r}(),QT=function(){function r(e,t){this.type="polygon",this.exterior=e,this.interiors=t}return r}(),tC=function(){function r(e){this.type="linestring",this.points=e}return r}(),eC=function(r){z(e,r);function e(t,a,i){var n=r.call(this,t)||this;return n.type="geoJSON",n.geometries=a,n._center=i&&[i[0],i[1]],n}return e.prototype.calcCenter=function(){for(var t=this.geometries,a,i=0,n=0;n<t.length;n++){var o=t[n],s=o.exterior,l=s&&s.length;l>i&&(a=o,i=l)}if(a)return JV(a.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},e.prototype.getBoundingRect=function(t){var a=this._rect;if(a&&!t)return a;var i=[1/0,1/0],n=[-1/0,-1/0],o=this.geometries;return M(o,function(s){s.type==="polygon"?jT(s.exterior,i,n,t):M(s.points,function(l){jT(l,i,n,t)})}),isFinite(i[0])&&isFinite(i[1])&&isFinite(n[0])&&isFinite(n[1])||(i[0]=i[1]=n[0]=n[1]=0),a=new ht(i[0],i[1],n[0]-i[0],n[1]-i[1]),t||(this._rect=a),a},e.prototype.contain=function(t){var a=this.getBoundingRect(),i=this.geometries;if(!a.contain(t[0],t[1]))return!1;t:for(var n=0,o=i.length;n<o;n++){var s=i[n];if(s.type==="polygon"){var l=s.exterior,u=s.interiors;if(Vn(l,t[0],t[1])){for(var h=0;h<(u?u.length:0);h++)if(Vn(u[h],t[0],t[1]))continue t;return!0}}}return!1},e.prototype.transformTo=function(t,a,i,n){var o=this.getBoundingRect(),s=o.width/o.height;i?n||(n=i/s):i=s*n;for(var l=new ht(t,a,i,n),u=o.calculateTransform(l),h=this.geometries,f=0;f<h.length;f++){var v=h[f];v.type==="polygon"?(Og(v.exterior,u),M(v.interiors,function(c){Og(c,u)})):M(v.points,function(c){Og(c,u)})}o=this._rect,o.copy(l),this._center=[o.x+o.width/2,o.y+o.height/2]},e.prototype.cloneShallow=function(t){t==null&&(t=this.name);var a=new e(t,this.geometries,this._center);return a._rect=this._rect,a.transformTo=null,a},e}(JT),QV=function(r){z(e,r);function e(t,a){var i=r.call(this,t)||this;return i.type="geoSVG",i._elOnlyForCalculate=a,i}return e.prototype.calcCenter=function(){for(var t=this._elOnlyForCalculate,a=t.getBoundingRect(),i=[a.x+a.width/2,a.y+a.height/2],n=Vu(jV),o=t;o&&!o.isGeoSVGGraphicRoot;)qr(n,o.getLocalTransform(),n),o=o.parent;return Rr(n,n),te(i,i,n),i},e}(JT);function tG(r){if(!r.UTF8Encoding)return r;var e=r,t=e.UTF8Scale;t==null&&(t=1024);var a=e.features;return M(a,function(i){var n=i.geometry,o=n.encodeOffsets,s=n.coordinates;if(o)switch(n.type){case"LineString":n.coordinates=rC(s,o,t);break;case"Polygon":Ng(s,o,t);break;case"MultiLineString":Ng(s,o,t);break;case"MultiPolygon":M(s,function(l,u){return Ng(l,o[u],t)})}}),e.UTF8Encoding=!1,e}function Ng(r,e,t){for(var a=0;a<r.length;a++)r[a]=rC(r[a],e[a],t)}function rC(r,e,t){for(var a=[],i=e[0],n=e[1],o=0;o<r.length;o+=2){var s=r.charCodeAt(o)-64,l=r.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/t,l/t])}return a}function eG(r,e){return r=tG(r),U(Et(r.features,function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0}),function(t){var a=t.properties,i=t.geometry,n=[];switch(i.type){case"Polygon":var o=i.coordinates;n.push(new QT(o[0],o.slice(1)));break;case"MultiPolygon":M(i.coordinates,function(l){l[0]&&n.push(new QT(l[0],l.slice(1)))});break;case"LineString":n.push(new tC([i.coordinates]));break;case"MultiLineString":n.push(new tC(i.coordinates))}var s=new eC(a[e||"name"],n,a.cp);return s.properties=a,s})}var rG=St(),Bl=St(),Ur={estimate:1,determine:2};function Ef(r){return{out:{noPxChangeTryDetermine:[]},kind:r}}function aC(r,e){var t=U(e,function(a){return r.scale.parse(a)});return r.type==="time"&&t.length>0&&(t.sort(),t.unshift(t[0]),t.push(t[t.length-1])),t}function aG(r,e){var t=r.getLabelModel().get("customValues");if(t){var a=rs(r),i=r.scale.getExtent(),n=aC(r,t),o=Et(n,function(s){return s>=i[0]&&s<=i[1]});return{labels:U(o,function(s){var l={value:s};return{formattedLabel:a(l),rawLabel:r.scale.getLabel(l),tickValue:s,time:void 0,break:void 0}})}}return r.type==="category"?nG(r,e):sG(r)}function iG(r,e,t){var a=r.getTickModel().get("customValues");if(a){var i=r.scale.getExtent(),n=aC(r,a);return{ticks:Et(n,function(o){return o>=i[0]&&o<=i[1]})}}return r.type==="category"?oG(r,e):{ticks:U(r.scale.getTicks(t),function(o){return o.value})}}function nG(r,e){var t=r.getLabelModel(),a=iC(r,t,e);return!t.get("show")||r.scale.isBlank()?{labels:[]}:a}function iC(r,e,t){var a=uG(r),i=Eg(e),n=t.kind===Ur.estimate;if(!n){var o=oC(a,i);if(o)return o}var s,l;rt(i)?s=uC(r,i):(l=i==="auto"?hG(r,t):i,s=lC(r,l));var u={labels:s,labelCategoryInterval:l};return n?t.out.noPxChangeTryDetermine.push(function(){return Bg(a,i,u),!0}):Bg(a,i,u),u}function oG(r,e){var t=lG(r),a=Eg(e),i=oC(t,a);if(i)return i;var n,o;if((!e.get("show")||r.scale.isBlank())&&(n=[]),rt(a))n=uC(r,a,!0);else if(a==="auto"){var s=iC(r,r.getLabelModel(),Ef(Ur.determine));o=s.labelCategoryInterval,n=U(s.labels,function(l){return l.tickValue})}else o=a,n=lC(r,o,!0);return Bg(t,a,{ticks:n,tickCategoryInterval:o})}function sG(r){var e=r.scale.getTicks(),t=rs(r);return{labels:U(e,function(a,i){return{formattedLabel:t(a,i),rawLabel:r.scale.getLabel(a),tickValue:a.value,time:a.time,break:a.break}})}}var lG=nC("axisTick"),uG=nC("axisLabel");function nC(r){return function(t){return Bl(t)[r]||(Bl(t)[r]={list:[]})}}function oC(r,e){for(var t=0;t<r.list.length;t++)if(r.list[t].key===e)return r.list[t].value}function Bg(r,e,t){return r.list.push({key:e,value:t}),t}function hG(r,e){if(e.kind===Ur.estimate){var t=r.calculateCategoryInterval(e);return e.out.noPxChangeTryDetermine.push(function(){return Bl(r).autoInterval=t,!0}),t}var a=Bl(r).autoInterval;return a??(Bl(r).autoInterval=r.calculateCategoryInterval(e))}function fG(r,e){var t=e.kind,a=cG(r),i=rs(r),n=(a.axisRotate-a.labelRotate)/180*Math.PI,o=r.scale,s=o.getExtent(),l=o.count();if(s[1]-s[0]<1)return 0;var u=1,h=40;l>h&&(u=Math.max(1,Math.floor(l/h)));for(var f=s[0],v=r.dataToCoord(f+1)-r.dataToCoord(f),c=Math.abs(v*Math.cos(n)),d=Math.abs(v*Math.sin(n)),p=0,g=0;f<=s[1];f+=u){var y=0,m=0,_=sh(i({value:f}),a.font,"center","top");y=_.width*1.3,m=_.height*1.3,p=Math.max(p,y,7),g=Math.max(g,m,7)}var x=p/c,b=g/d;isNaN(x)&&(x=1/0),isNaN(b)&&(b=1/0);var S=Math.max(0,Math.floor(Math.min(x,b)));if(t===Ur.estimate)return e.out.noPxChangeTryDetermine.push(X(vG,null,r,S,l)),S;var w=sC(r,S,l);return w??S}function vG(r,e,t){return sC(r,e,t)==null}function sC(r,e,t){var a=rG(r.model),i=r.getExtent(),n=a.lastAutoInterval,o=a.lastTickCount;if(n!=null&&o!=null&&Math.abs(n-e)<=1&&Math.abs(o-t)<=1&&n>e&&a.axisExtent0===i[0]&&a.axisExtent1===i[1])return n;a.lastTickCount=t,a.lastAutoInterval=e,a.axisExtent0=i[0],a.axisExtent1=i[1]}function cG(r){var e=r.getLabelModel();return{axisRotate:r.getRotate?r.getRotate():r.isHorizontal&&!r.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function lC(r,e,t){var a=rs(r),i=r.scale,n=i.getExtent(),o=r.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=XT(r),v=o.get("showMinLabel")||f,c=o.get("showMaxLabel")||f;v&&u!==n[0]&&p(n[0]);for(var d=u;d<=n[1];d+=l)p(d);c&&d-l!==n[1]&&p(n[1]);function p(g){var y={value:g};s.push(t?g:{formattedLabel:a(y),rawLabel:i.getLabel(y),tickValue:g,time:void 0,break:void 0})}return s}function uC(r,e,t){var a=r.scale,i=rs(r),n=[];return M(a.getTicks(),function(o){var s=a.getLabel(o),l=o.value;e(o.value,s)&&n.push(t?l:{formattedLabel:i(o),rawLabel:s,tickValue:l,time:void 0,break:void 0})}),n}var hC=[0,1],Yr=function(){function r(e,t,a){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=a||[0,0]}return r.prototype.contain=function(e){var t=this._extent,a=Math.min(t[0],t[1]),i=Math.max(t[0],t[1]);return e>=a&&e<=i},r.prototype.containData=function(e){return this.scale.contain(this.scale.parse(e))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.getPixelPrecision=function(e){return P1(e||this.scale.getExtent(),this._extent)},r.prototype.setExtent=function(e,t){var a=this._extent;a[0]=e,a[1]=t},r.prototype.dataToCoord=function(e,t){var a=this._extent,i=this.scale;return e=i.normalize(i.parse(e)),this.onBand&&i.type==="ordinal"&&(a=a.slice(),fC(a,i.count())),Ot(e,hC,a,t)},r.prototype.coordToData=function(e,t){var a=this._extent,i=this.scale;this.onBand&&i.type==="ordinal"&&(a=a.slice(),fC(a,i.count()));var n=Ot(e,a,hC,t);return this.scale.scale(n)},r.prototype.pointToData=function(e,t){},r.prototype.getTicksCoords=function(e){e=e||{};var t=e.tickModel||this.getTickModel(),a=iG(this,t,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}),i=a.ticks,n=U(i,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=t.get("alignWithLabel");return dG(this,n,o,e.clamp),n},r.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var e=this.model.getModel("minorTick"),t=e.get("splitNumber");t>0&&t<100||(t=5);var a=this.scale.getMinorTicks(t),i=U(a,function(n){return U(n,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return i},r.prototype.getViewLabels=function(e){return e=e||Ef(Ur.determine),aG(this,e).labels},r.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},r.prototype.getTickModel=function(){return this.model.getModel("axisTick")},r.prototype.getBandWidth=function(){var e=this._extent,t=this.scale.getExtent(),a=t[1]-t[0]+(this.onBand?1:0);a===0&&(a=1);var i=Math.abs(e[1]-e[0]);return Math.abs(i)/a},r.prototype.calculateCategoryInterval=function(e){return e=e||Ef(Ur.determine),fG(this,e)},r}();function fC(r,e){var t=r[1]-r[0],a=e,i=t/a/2;r[0]+=i,r[1]-=i}function dG(r,e,t,a){var i=e.length;if(!r.onBand||t||!i)return;var n=r.getExtent(),o,s;if(i===1)e[0].coord=n[0],e[0].onBand=!0,o=e[1]={coord:n[1],tickValue:e[0].tickValue,onBand:!0};else{var l=e[i-1].tickValue-e[0].tickValue,u=(e[i-1].coord-e[0].coord)/l;M(e,function(c){c.coord-=u/2,c.onBand=!0});var h=r.scale.getExtent();s=1+h[1]-e[i-1].tickValue,o={coord:e[i-1].coord+u*s,tickValue:h[1]+1,onBand:!0},e.push(o)}var f=n[0]>n[1];v(e[0].coord,n[0])&&(a?e[0].coord=n[0]:e.shift()),a&&v(n[0],e[0].coord)&&e.unshift({coord:n[0],onBand:!0}),v(n[1],o.coord)&&(a?o.coord=n[1]:e.pop()),a&&v(o.coord,n[1])&&e.push({coord:n[1],onBand:!0});function v(c,d){return c=ne(c),d=ne(d),f?c>d:c<d}}var zl=Math.PI*2,Gn=la.CMD,pG=["top","right","bottom","left"];function gG(r,e,t,a,i){var n=t.width,o=t.height;switch(r){case"top":a.set(t.x+n/2,t.y-e),i.set(0,-1);break;case"bottom":a.set(t.x+n/2,t.y+o+e),i.set(0,1);break;case"left":a.set(t.x-e,t.y+o/2),i.set(-1,0);break;case"right":a.set(t.x+n+e,t.y+o/2),i.set(1,0);break}}function yG(r,e,t,a,i,n,o,s,l){o-=r,s-=e;var u=Math.sqrt(o*o+s*s);o/=u,s/=u;var h=o*t+r,f=s*t+e;if(Math.abs(a-i)%zl<1e-4)return l[0]=h,l[1]=f,u-t;if(n){var v=a;a=nr(i),i=nr(v)}else a=nr(a),i=nr(i);a>i&&(i+=zl);var c=Math.atan2(s,o);if(c<0&&(c+=zl),c>=a&&c<=i||c+zl>=a&&c+zl<=i)return l[0]=h,l[1]=f,u-t;var d=t*Math.cos(a)+r,p=t*Math.sin(a)+e,g=t*Math.cos(i)+r,y=t*Math.sin(i)+e,m=(d-o)*(d-o)+(p-s)*(p-s),_=(g-o)*(g-o)+(y-s)*(y-s);return m<_?(l[0]=d,l[1]=p,Math.sqrt(m)):(l[0]=g,l[1]=y,Math.sqrt(_))}function Of(r,e,t,a,i,n,o,s){var l=i-r,u=n-e,h=t-r,f=a-e,v=Math.sqrt(h*h+f*f);h/=v,f/=v;var c=l*h+u*f,d=c/v;s&&(d=Math.min(Math.max(d,0),1)),d*=v;var p=o[0]=r+d*h,g=o[1]=e+d*f;return Math.sqrt((p-i)*(p-i)+(g-n)*(g-n))}function vC(r,e,t,a,i,n,o){t<0&&(r=r+t,t=-t),a<0&&(e=e+a,a=-a);var s=r+t,l=e+a,u=o[0]=Math.min(Math.max(i,r),s),h=o[1]=Math.min(Math.max(n,e),l);return Math.sqrt((u-i)*(u-i)+(h-n)*(h-n))}var Zr=[];function mG(r,e,t){var a=vC(e.x,e.y,e.width,e.height,r.x,r.y,Zr);return t.set(Zr[0],Zr[1]),a}function _G(r,e,t){for(var a=0,i=0,n=0,o=0,s,l,u=1/0,h=e.data,f=r.x,v=r.y,c=0;c<h.length;){var d=h[c++];c===1&&(a=h[c],i=h[c+1],n=a,o=i);var p=u;switch(d){case Gn.M:n=h[c++],o=h[c++],a=n,i=o;break;case Gn.L:p=Of(a,i,h[c],h[c+1],f,v,Zr,!0),a=h[c++],i=h[c++];break;case Gn.C:p=j_(a,i,h[c++],h[c++],h[c++],h[c++],h[c],h[c+1],f,v,Zr),a=h[c++],i=h[c++];break;case Gn.Q:p=Q_(a,i,h[c++],h[c++],h[c],h[c+1],f,v,Zr),a=h[c++],i=h[c++];break;case Gn.A:var g=h[c++],y=h[c++],m=h[c++],_=h[c++],x=h[c++],b=h[c++];c+=1;var S=!!(1-h[c++]);s=Math.cos(x)*m+g,l=Math.sin(x)*_+y,c<=1&&(n=s,o=l);var w=(f-g)*_/m+g;p=yG(g,y,_,x,x+b,S,w,v,Zr),a=Math.cos(x+b)*m+g,i=Math.sin(x+b)*_+y;break;case Gn.R:n=a=h[c++],o=i=h[c++];var T=h[c++],C=h[c++];p=vC(n,o,T,C,f,v,Zr);break;case Gn.Z:p=Of(a,i,n,o,f,v,Zr,!0),a=n,i=o;break}p<u&&(u=p,t.set(Zr[0],Zr[1]))}return u}var $r=new nt,Wt=new nt,ae=new nt,pa=new nt,ga=new nt;function cC(r,e){if(r){var t=r.getTextGuideLine(),a=r.getTextContent();if(a&&t){var i=r.textGuideLineConfig||{},n=[[0,0],[0,0],[0,0]],o=i.candidates||pG,s=a.getBoundingRect().clone();s.applyTransform(a.getComputedTransform());var l=1/0,u=i.anchor,h=r.getComputedTransform(),f=h&&Rr([],h),v=e.get("length2")||0;u&&ae.copy(u);for(var c=0;c<o.length;c++){var d=o[c];gG(d,0,s,$r,pa),nt.scaleAndAdd(Wt,$r,pa,v),Wt.transform(f);var p=r.getBoundingRect(),g=u?u.distance(Wt):r instanceof bt?_G(Wt,r.path,ae):mG(Wt,p,ae);g<l&&(l=g,Wt.transform(h),ae.transform(h),ae.toArray(n[0]),Wt.toArray(n[1]),$r.toArray(n[2]))}dC(n,e.get("minTurnAngle")),t.setShape({points:n})}}}var Nf=[],Ye=new nt;function dC(r,e){if(e<=180&&e>0){e=e/180*Math.PI,$r.fromArray(r[0]),Wt.fromArray(r[1]),ae.fromArray(r[2]),nt.sub(pa,$r,Wt),nt.sub(ga,ae,Wt);var t=pa.len(),a=ga.len();if(!(t<.001||a<.001)){pa.scale(1/t),ga.scale(1/a);var i=pa.dot(ga),n=Math.cos(e);if(n<i){var o=Of(Wt.x,Wt.y,ae.x,ae.y,$r.x,$r.y,Nf,!1);Ye.fromArray(Nf),Ye.scaleAndAdd(ga,o/Math.tan(Math.PI-e));var s=ae.x!==Wt.x?(Ye.x-Wt.x)/(ae.x-Wt.x):(Ye.y-Wt.y)/(ae.y-Wt.y);if(isNaN(s))return;s<0?nt.copy(Ye,Wt):s>1&&nt.copy(Ye,ae),Ye.toArray(r[1])}}}}function xG(r,e,t){if(t<=180&&t>0){t=t/180*Math.PI,$r.fromArray(r[0]),Wt.fromArray(r[1]),ae.fromArray(r[2]),nt.sub(pa,Wt,$r),nt.sub(ga,ae,Wt);var a=pa.len(),i=ga.len();if(!(a<.001||i<.001)){pa.scale(1/a),ga.scale(1/i);var n=pa.dot(e),o=Math.cos(t);if(n<o){var s=Of(Wt.x,Wt.y,ae.x,ae.y,$r.x,$r.y,Nf,!1);Ye.fromArray(Nf);var l=Math.PI/2,u=Math.acos(ga.dot(e)),h=l+u-t;if(h>=l)nt.copy(Ye,ae);else{Ye.scaleAndAdd(ga,s/Math.tan(Math.PI/2-h));var f=ae.x!==Wt.x?(Ye.x-Wt.x)/(ae.x-Wt.x):(Ye.y-Wt.y)/(ae.y-Wt.y);if(isNaN(f))return;f<0?nt.copy(Ye,Wt):f>1&&nt.copy(Ye,ae)}Ye.toArray(r[1])}}}}function zg(r,e,t,a){var i=t==="normal",n=i?r:r.ensureState(t);n.ignore=e;var o=a.get("smooth");o&&o===!0&&(o=.3),n.shape=n.shape||{},o>0&&(n.shape.smooth=o);var s=a.getModel("lineStyle").getLineStyle();i?r.useStyle(s):n.style=s}function SG(r,e){var t=e.smooth,a=e.points;if(a)if(r.moveTo(a[0][0],a[0][1]),t>0&&a.length>=3){var i=Qa(a[0],a[1]),n=Qa(a[1],a[2]);if(!i||!n){r.lineTo(a[1][0],a[1][1]),r.lineTo(a[2][0],a[2][1]);return}var o=Math.min(i,n)*t,s=Bu([],a[1],a[0],o/i),l=Bu([],a[1],a[2],o/n),u=Bu([],s,l,.5);r.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),r.bezierCurveTo(l[0],l[1],l[0],l[1],a[2][0],a[2][1])}else for(var h=1;h<a.length;h++)r.lineTo(a[h][0],a[h][1])}function Vg(r,e,t){var a=r.getTextGuideLine(),i=r.getTextContent();if(!i){a&&r.removeTextGuideLine();return}for(var n=e.normal,o=n.get("show"),s=i.ignore,l=0;l<Js.length;l++){var u=Js[l],h=e[u],f=u==="normal";if(h){var v=h.get("show"),c=f?s:Q(i.states[u]&&i.states[u].ignore,s);if(c||!Q(v,o)){var d=f?a:a&&a.states[u];d&&(d.ignore=!0),a&&zg(a,!0,u,h);continue}a||(a=new Be,r.setTextGuideLine(a),!f&&(s||!o)&&zg(a,!0,"normal",e.normal),r.stateProxy&&(a.stateProxy=r.stateProxy)),zg(a,!1,u,h)}}if(a){st(a.style,t),a.style.fill=null;var p=n.get("showAbove"),g=r.textGuideLineConfig=r.textGuideLineConfig||{};g.showAbove=p||!1,a.buildPath=SG}}function Gg(r,e){e=e||"labelLine";for(var t={normal:r.getModel(e)},a=0;a<He.length;a++){var i=He[a];t[i]=r.getModel([i,e])}return t}var pC=["label","labelLine","layoutOption","priority","defaultAttr","marginForce","minMarginForce","marginDefault","suggestIgnore"],bG=1,Bf=2,gC=bG|Bf;function zf(r,e,t){t=t||gC,e?r.dirty|=t:r.dirty&=~t}function yC(r,e){return e=e||gC,r.dirty==null||!!(r.dirty&e)}function ya(r){if(r)return yC(r)&&mC(r,r.label,r),r}function mC(r,e,t){var a=e.getComputedTransform();r.transform=up(r.transform,a);var i=r.localRect=sl(r.localRect,e.getBoundingRect()),n=e.style,o=n.margin,s=t&&t.marginForce,l=t&&t.minMarginForce,u=t&&t.marginDefault,h=n.__marginType;h==null&&u&&(o=u,h=No.textMargin);for(var f=0;f<4;f++)Fg[f]=h===No.minMargin&&l&&l[f]!=null?l[f]:s&&s[f]!=null?s[f]:o?o[f]:0;h===No.textMargin&&xn(i,Fg,!1,!1);var v=r.rect=sl(r.rect,i);return a&&v.applyTransform(a),h===No.minMargin&&xn(v,Fg,!1,!1),r.axisAligned=lp(a),(r.label=r.label||{}).ignore=e.ignore,zf(r,!1),zf(r,!0,Bf),r}var Fg=[0,0,0,0];function wG(r,e,t){return r.transform=up(r.transform,t),r.localRect=sl(r.localRect,e),r.rect=sl(r.rect,e),t&&r.rect.applyTransform(t),r.axisAligned=lp(t),r.obb=void 0,(r.label=r.label||{}).ignore=!1,r}function Hg(r,e){if(r){r.label.x+=e.x,r.label.y+=e.y,r.label.markRedraw();var t=r.transform;t&&(t[4]+=e.x,t[5]+=e.y);var a=r.rect;a&&(a.x+=e.x,a.y+=e.y);var i=r.obb;i&&i.fromBoundingRect(r.localRect,t)}}function Wg(r,e){for(var t=0;t<pC.length;t++){var a=pC[t];r[a]==null&&(r[a]=e[a])}return ya(r)}function _C(r){var e=r.obb;return(!e||yC(r,Bf))&&(r.obb=e=e||new mS,e.fromBoundingRect(r.localRect,r.transform),zf(r,!1,Bf)),e}function Ug(r,e,t,a,i){var n=r.length,o=dt[e],s=oe[e];if(n<2)return!1;r.sort(function(C,A){return C.rect[o]-A.rect[o]});for(var l=0,u,h=!1,f=0,v=0;v<n;v++){var c=r[v],d=c.rect;u=d[o]-l,u<0&&(d[o]-=u,c.label[o]-=u,h=!0);var p=Math.max(-u,0);f+=p,l=d[o]+d[s]}f>0&&i&&S(-f/n,0,n);var g=r[0],y=r[n-1],m,_;x(),m<0&&w(-m,.8),_<0&&w(_,.8),x(),b(m,_,1),b(_,m,-1),x(),m<0&&T(-m),_<0&&T(_);function x(){m=g.rect[o]-t,_=a-y.rect[o]-y.rect[s]}function b(C,A,D){if(C<0){var I=Math.min(A,-C);if(I>0){S(I*D,0,n);var L=I+C;L<0&&w(-L*D,1)}else w(-C*D,1)}}function S(C,A,D){C!==0&&(h=!0);for(var I=A;I<D;I++){var L=r[I],P=L.rect;P[o]+=C,L.label[o]+=C}}function w(C,A){for(var D=[],I=0,L=1;L<n;L++){var P=r[L-1].rect,k=Math.max(r[L].rect[o]-P[o]-P[s],0);D.push(k),I+=k}if(I){var R=Math.min(Math.abs(C)/I,A);if(C>0)for(var L=0;L<n-1;L++){var O=D[L]*R;S(O,0,L+1)}else for(var L=n-1;L>0;L--){var O=D[L-1]*R;S(-O,L,n)}}}function T(C){var A=C<0?-1:1;C=Math.abs(C);for(var D=Math.ceil(C/(n-1)),I=0;I<n-1;I++)if(A>0?S(D,0,I+1):S(-D,n-I-1,n),C-=D,C<=0)return}return h}function TG(r){for(var e=0;e<r.length;e++){var t=r[e],a=t.defaultAttr,i=t.labelLine;t.label.attr("ignore",a.ignore),i&&i.attr("ignore",a.labelGuideIgnore)}}function xC(r){var e=[];r.sort(function(u,h){return(h.suggestIgnore?1:0)-(u.suggestIgnore?1:0)||h.priority-u.priority});function t(u){if(!u.ignore){var h=u.ensureState("emphasis");h.ignore==null&&(h.ignore=!1)}u.ignore=!0}for(var a=0;a<r.length;a++){var i=ya(r[a]);if(!i.label.ignore){for(var n=i.label,o=i.labelLine,s=!1,l=0;l<e.length;l++)if(Vf(i,e[l],null,{touchThreshold:.05})){s=!0;break}s?(t(n),o&&t(o)):e.push(i)}}}function Vf(r,e,t,a){return!r||!e||r.label&&r.label.ignore||e.label&&e.label.ignore||!r.rect.intersect(e.rect,t,a)?!1:r.axisAligned&&e.axisAligned?!0:_C(r).intersect(_C(e),t,a)}function CG(r){if(r){for(var e=[],t=0;t<r.length;t++)e.push(r[t].slice());return e}}function AG(r,e){var t=r.label,a=e&&e.getTextGuideLine();return{dataIndex:r.dataIndex,dataType:r.dataType,seriesIndex:r.seriesModel.seriesIndex,text:r.label.style.text,rect:r.hostRect,labelRect:r.rect,align:t.style.align,verticalAlign:t.style.verticalAlign,labelLinePoints:CG(a&&a.shape.points)}}var SC=["align","verticalAlign","width","height","fontSize"],Ze=new Ia,Yg=St(),MG=St();function Gf(r,e,t){for(var a=0;a<t.length;a++){var i=t[a];e[i]!=null&&(r[i]=e[i])}}var Ff=["x","y","rotation"],DG=function(){function r(){this._labelList=[],this._chartViewList=[]}return r.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},r.prototype._addLabel=function(e,t,a,i,n){var o=i.style,s=i.__hostTarget,l=s.textConfig||{},u=i.getComputedTransform(),h=i.getBoundingRect().plain();ht.applyTransform(h,h,u),u?Ze.setLocalTransform(u):(Ze.x=Ze.y=Ze.rotation=Ze.originX=Ze.originY=0,Ze.scaleX=Ze.scaleY=1),Ze.rotation=nr(Ze.rotation);var f=i.__hostTarget,v;if(f){v=f.getBoundingRect().plain();var c=f.getComputedTransform();ht.applyTransform(v,v,c)}var d=v&&f.getTextGuideLine();this._labelList.push({label:i,labelLine:d,seriesModel:a,dataIndex:e,dataType:t,layoutOptionOrCb:n,layoutOption:null,rect:h,hostRect:v,priority:v?v.width*v.height:0,defaultAttr:{ignore:i.ignore,labelGuideIgnore:d&&d.ignore,x:Ze.x,y:Ze.y,scaleX:Ze.scaleX,scaleY:Ze.scaleY,rotation:Ze.rotation,style:{x:o.x,y:o.y,align:o.align,verticalAlign:o.verticalAlign,width:o.width,height:o.height,fontSize:o.fontSize},cursor:i.cursor,attachedPos:l.position,attachedRot:l.rotation}})},r.prototype.addLabelsOfSeries=function(e){var t=this;this._chartViewList.push(e);var a=e.__model,i=a.get("labelLayout");(rt(i)||Mt(i).length)&&e.group.traverse(function(n){if(n.ignore)return!0;var o=n.getTextContent(),s=vt(n);o&&!o.disableLabelLayout&&t._addLabel(s.dataIndex,s.dataType,a,o,i)})},r.prototype.updateLayoutConfig=function(e){var t=e.getWidth(),a=e.getHeight();function i(_,x){return function(){cC(_,x)}}for(var n=0;n<this._labelList.length;n++){var o=this._labelList[n],s=o.label,l=s.__hostTarget,u=o.defaultAttr,h=void 0;rt(o.layoutOptionOrCb)?h=o.layoutOptionOrCb(AG(o,l)):h=o.layoutOptionOrCb,h=h||{},o.layoutOption=h;var f=Math.PI/180;l&&l.setTextConfig({local:!1,position:h.x!=null||h.y!=null?null:u.attachedPos,rotation:h.rotate!=null?h.rotate*f:u.attachedRot,offset:[h.dx||0,h.dy||0]});var v=!1;if(h.x!=null?(s.x=Z(h.x,t),s.setStyle("x",0),v=!0):(s.x=u.x,s.setStyle("x",u.style.x)),h.y!=null?(s.y=Z(h.y,a),s.setStyle("y",0),v=!0):(s.y=u.y,s.setStyle("y",u.style.y)),h.labelLinePoints){var c=l.getTextGuideLine();c&&(c.setShape({points:h.labelLinePoints}),v=!1)}var d=Yg(s);d.needsUpdateLabelLine=v,s.rotation=h.rotate!=null?h.rotate*f:u.rotation,s.scaleX=u.scaleX,s.scaleY=u.scaleY;for(var p=0;p<SC.length;p++){var g=SC[p];s.setStyle(g,h[g]!=null?h[g]:u.style[g])}if(h.draggable){if(s.draggable=!0,s.cursor="move",l){var y=o.seriesModel;if(o.dataIndex!=null){var m=o.seriesModel.getData(o.dataType);y=m.getItemModel(o.dataIndex)}s.on("drag",i(l,y.getModel("labelLine")))}}else s.off("drag"),s.cursor=u.cursor}},r.prototype.layout=function(e){var t=e.getWidth(),a=e.getHeight(),i=[];M(this._labelList,function(l){l.defaultAttr.ignore||i.push(Wg({},l))});var n=Et(i,function(l){return l.layoutOption.moveOverlap==="shiftX"}),o=Et(i,function(l){return l.layoutOption.moveOverlap==="shiftY"});Ug(n,0,0,t),Ug(o,1,0,a);var s=Et(i,function(l){return l.layoutOption.hideOverlap});TG(s),xC(s)},r.prototype.processLabelsOverall=function(){var e=this;M(this._chartViewList,function(t){var a=t.__model,i=t.ignoreLabelLineUpdate,n=a.isAnimationEnabled();t.group.traverse(function(o){if(o.ignore&&!o.forceLabelAnimation)return!0;var s=!i,l=o.getTextContent();!s&&l&&(s=Yg(l).needsUpdateLabelLine),s&&e._updateLabelLine(o,a),n&&e._animateLabels(o,a)})})},r.prototype._updateLabelLine=function(e,t){var a=e.getTextContent(),i=vt(e),n=i.dataIndex;if(a&&n!=null){var o=t.getData(i.dataType),s=o.getItemModel(n),l={},u=o.getItemVisual(n,"style");if(u){var h=o.getVisual("drawType");l.stroke=u[h]}var f=s.getModel("labelLine");Vg(e,Gg(s),l),cC(e,f)}},r.prototype._animateLabels=function(e,t){var a=e.getTextContent(),i=e.getTextGuideLine();if(a&&(e.forceLabelAnimation||!a.ignore&&!a.invisible&&!e.disableLabelAnimation&&!Ro(e))){var n=Yg(a),o=n.oldLayout,s=vt(e),l=s.dataIndex,u={x:a.x,y:a.y,rotation:a.rotation},h=t.getData(s.dataType);if(o){a.attr(o);var v=e.prevStates;v&&(gt(v,"select")>=0&&a.attr(n.oldLayoutSelect),gt(v,"emphasis")>=0&&a.attr(n.oldLayoutEmphasis)),It(a,u,t,l)}else if(a.attr(u),!Oo(a).valueAnimation){var f=Q(a.style.opacity,1);a.style.opacity=0,Yt(a,{style:{opacity:f}},t,l)}if(n.oldLayout=u,a.states.select){var c=n.oldLayoutSelect={};Gf(c,u,Ff),Gf(c,a.states.select,Ff)}if(a.states.emphasis){var d=n.oldLayoutEmphasis={};Gf(d,u,Ff),Gf(d,a.states.emphasis,Ff)}NS(a,l,h,t,t)}if(i&&!i.ignore&&!i.invisible){var n=MG(i),o=n.oldLayout,p={points:i.shape.points};o?(i.attr({shape:o}),It(i,{shape:p},t)):(i.setShape(p),i.style.strokePercent=0,Yt(i,{style:{strokePercent:1}},t)),n.oldLayout=p}},r}(),Zg=St();function bC(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,a){var i=Zg(t).labelManager;i||(i=Zg(t).labelManager=new DG),i.clearLabels()}),r.registerUpdateLifecycle("series:layoutlabels",function(e,t,a){var i=Zg(t).labelManager;a.updatedSeries.forEach(function(n){i.addLabelsOfSeries(t.getViewOfSeriesModel(n))}),i.updateLayoutConfig(t),i.layout(t),i.processLabelsOverall()})}mt(bC);var $g=Math.sin,Xg=Math.cos,wC=Math.PI,Fn=Math.PI*2,LG=180/wC,TC=function(){function r(){}return r.prototype.reset=function(e){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,e||4)},r.prototype.moveTo=function(e,t){this._add("M",e,t)},r.prototype.lineTo=function(e,t){this._add("L",e,t)},r.prototype.bezierCurveTo=function(e,t,a,i,n,o){this._add("C",e,t,a,i,n,o)},r.prototype.quadraticCurveTo=function(e,t,a,i){this._add("Q",e,t,a,i)},r.prototype.arc=function(e,t,a,i,n,o){this.ellipse(e,t,a,a,0,i,n,o)},r.prototype.ellipse=function(e,t,a,i,n,o,s,l){var u=s-o,h=!l,f=Math.abs(u),v=ui(f-Fn)||(h?u>=Fn:-u>=Fn),c=u>0?u%Fn:u%Fn+Fn,d=!1;v?d=!0:ui(f)?d=!1:d=c>=wC==!!h;var p=e+a*Xg(o),g=t+i*$g(o);this._start&&this._add("M",p,g);var y=Math.round(n*LG);if(v){var m=1/this._p,_=(h?1:-1)*(Fn-m);this._add("A",a,i,y,1,+h,e+a*Xg(o+_),t+i*$g(o+_)),m>.01&&this._add("A",a,i,y,0,+h,p,g)}else{var x=e+a*Xg(s),b=t+i*$g(s);this._add("A",a,i,y,+d,+h,x,b)}},r.prototype.rect=function(e,t,a,i){this._add("M",e,t),this._add("l",a,0),this._add("l",0,i),this._add("l",-a,0),this._add("Z")},r.prototype.closePath=function(){this._d.length>0&&this._add("Z")},r.prototype._add=function(e,t,a,i,n,o,s,l,u){for(var h=[],f=this._p,v=1;v<arguments.length;v++){var c=arguments[v];if(isNaN(c)){this._invalid=!0;return}h.push(Math.round(c*f)/f)}this._d.push(e+h.join(" ")),this._start=e==="Z"},r.prototype.generateStr=function(){this._str=this._invalid?"":this._d.join(""),this._d=[]},r.prototype.getStr=function(){return this._str},r}(),Vl="none",IG=Math.round;function PG(r){var e=r.fill;return e!=null&&e!==Vl}function kG(r){var e=r.stroke;return e!=null&&e!==Vl}var qg=["lineCap","miterLimit","lineJoin"],RG=U(qg,function(r){return"stroke-"+r.toLowerCase()});function EG(r,e,t,a){var i=e.opacity==null?1:e.opacity;if(t instanceof Me){r("opacity",i);return}if(PG(e)){var n=Fs(e.fill);r("fill",n.color);var o=e.fillOpacity!=null?e.fillOpacity*n.opacity*i:n.opacity*i;(a||o<1)&&r("fill-opacity",o)}else r("fill",Vl);if(kG(e)){var s=Fs(e.stroke);r("stroke",s.color);var l=e.strokeNoScale?t.getLineScale():1,u=l?(e.lineWidth||0)/l:0,h=e.strokeOpacity!=null?e.strokeOpacity*s.opacity*i:s.opacity*i,f=e.strokeFirst;if((a||u!==1)&&r("stroke-width",u),(a||f)&&r("paint-order",f?"stroke":"fill"),(a||h<1)&&r("stroke-opacity",h),e.lineDash){var v=rg(t),c=v[0],d=v[1];c&&(d=IG(d||0),r("stroke-dasharray",c.join(",")),(d||a)&&r("stroke-dashoffset",d))}else a&&r("stroke-dasharray",Vl);for(var p=0;p<qg.length;p++){var g=qg[p];if(a||e[g]!==Sh[g]){var y=e[g]||Sh[g];y&&r(RG[p],y)}}}else a&&r("stroke",Vl)}var CC="http://www.w3.org/2000/svg",AC="http://www.w3.org/1999/xlink",OG="http://www.w3.org/2000/xmlns/",NG="http://www.w3.org/XML/1998/namespace",MC="ecmeta_";function DC(r){return document.createElementNS(CC,r)}function me(r,e,t,a,i){return{tag:r,attrs:t||{},children:a,text:i,key:e}}function BG(r,e){var t=[];if(e)for(var a in e){var i=e[a],n=a;i!==!1&&(i!==!0&&i!=null&&(n+='="'+i+'"'),t.push(n))}return"<"+r+" "+t.join(" ")+">"}function zG(r){return"</"+r+">"}function Kg(r,e){e=e||{};var t=e.newline?`
65
+ `:"";function a(i){var n=i.children,o=i.tag,s=i.attrs,l=i.text;return BG(o,s)+(o!=="style"?Oe(l):l||"")+(n?""+t+U(n,function(u){return a(u)}).join(t)+t:"")+zG(o)}return a(r)}function VG(r,e,t){t=t||{};var a=t.newline?`
66
+ `:"",i=" {"+a,n=a+"}",o=U(Mt(r),function(l){return l+i+U(Mt(r[l]),function(u){return u+":"+r[l][u]+";"}).join(a)+n}).join(a),s=U(Mt(e),function(l){return"@keyframes "+l+i+U(Mt(e[l]),function(u){return u+i+U(Mt(e[l][u]),function(h){var f=e[l][u][h];return h==="d"&&(f='path("'+f+'")'),h+":"+f+";"}).join(a)+n}).join(a)+n}).join(a);return!o&&!s?"":["<![CDATA[",o,s,"]]>"].join(a)}function jg(r){return{zrId:r,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function LC(r,e,t,a){return me("svg","root",{width:r,height:e,xmlns:CC,"xmlns:xlink":AC,version:"1.1",baseProfile:"full",viewBox:a?"0 0 "+r+" "+e:!1},t)}var GG=0;function IC(){return GG++}var PC={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},Hn="transform-origin";function FG(r,e,t){var a=F({},r.shape);F(a,e),r.buildPath(t,a);var i=new TC;return i.reset(u1(r)),t.rebuildPath(i,1),i.generateStr(),i.getStr()}function HG(r,e){var t=e.originX,a=e.originY;(t||a)&&(r[Hn]=t+"px "+a+"px")}var WG={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function kC(r,e){var t=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[t]=r,t}function UG(r,e,t){var a=r.shape.paths,i={},n,o;if(M(a,function(l){var u=jg(t.zrId);u.animation=!0,Hf(l,{},u,!0);var h=u.cssAnims,f=u.cssNodes,v=Mt(h),c=v.length;if(c){o=v[c-1];var d=h[o];for(var p in d){var g=d[p];i[p]=i[p]||{d:""},i[p].d+=g.d||""}for(var y in f){var m=f[y].animation;m.indexOf(o)>=0&&(n=m)}}}),!!n){e.d=!1;var s=kC(i,t);return n.replace(o,s)}}function RC(r){return $(r)?PC[r]?"cubic-bezier("+PC[r]+")":Oc(r)?r:"":""}function Hf(r,e,t,a){var i=r.animators,n=i.length,o=[];if(r instanceof Eh){var s=UG(r,e,t);if(s)o.push(s);else if(!n)return}else if(!n)return;for(var l={},u=0;u<n;u++){var h=i[u],f=[h.getMaxTime()/1e3+"s"],v=RC(h.getClip().easing),c=h.getDelay();v?f.push(v):f.push("linear"),c&&f.push(c/1e3+"s"),h.getLoop()&&f.push("infinite");var d=f.join(" ");l[d]=l[d]||[d,[]],l[d][1].push(h)}function p(m){var _=m[1],x=_.length,b={},S={},w={},T="animation-timing-function";function C(ut,tt,ct){for(var j=ut.getTracks(),ft=ut.getMaxTime(),Nt=0;Nt<j.length;Nt++){var wt=j[Nt];if(wt.needsAnimate()){var kt=wt.keyframes,Bt=wt.propName;if(ct&&(Bt=ct(Bt)),Bt)for(var xe=0;xe<kt.length;xe++){var vr=kt[xe],tr=Math.round(vr.time/ft*100)+"%",so=RC(vr.easing),Is=vr.rawValue;($(Is)||Dt(Is))&&(tt[tr]=tt[tr]||{},tt[tr][Bt]=vr.rawValue,so&&(tt[tr][T]=so))}}}}for(var A=0;A<x;A++){var D=_[A],I=D.targetName;I?I==="shape"&&C(D,S):!a&&C(D,b)}for(var L in b){var P={};nh(P,r),F(P,b[L]);var k=h1(P),R=b[L][T];w[L]=k?{transform:k}:{},HG(w[L],P),R&&(w[L][T]=R)}var O,E=!0;for(var L in S){w[L]=w[L]||{};var N=!O,R=S[L][T];N&&(O=new la);var V=O.len();O.reset(),w[L].d=FG(r,S[L],O);var G=O.len();if(!N&&V!==G){E=!1;break}R&&(w[L][T]=R)}if(!E)for(var L in w)delete w[L].d;if(!a)for(var A=0;A<x;A++){var D=_[A],I=D.targetName;I==="style"&&C(D,w,function(j){return WG[j]})}for(var H=Mt(w),Y=!0,q,A=1;A<H.length;A++){var it=H[A-1],xt=H[A];if(w[it][Hn]!==w[xt][Hn]){Y=!1;break}q=w[it][Hn]}if(Y&&q){for(var L in w)w[L][Hn]&&delete w[L][Hn];e[Hn]=q}if(Et(H,function(ut){return Mt(w[ut]).length>0}).length){var At=kC(w,t);return At+" "+m[0]+" both"}}for(var g in l){var s=p(l[g]);s&&o.push(s)}if(o.length){var y=t.zrId+"-cls-"+IC();t.cssNodes["."+y]={animation:o.join(",")},e.class=y}}function YG(r,e,t){if(!r.ignore)if(r.isSilent()){var a={"pointer-events":"none"};EC(a,e,t,!0)}else{var i=r.states.emphasis&&r.states.emphasis.style?r.states.emphasis.style:{},n=i.fill;if(!n){var o=r.style&&r.style.fill,s=r.states.select&&r.states.select.style&&r.states.select.style.fill,l=r.currentStates.indexOf("select")>=0&&s||o;l&&(n=Hc(l))}var u=i.lineWidth;if(u){var h=!i.strokeNoScale&&r.transform?r.transform[0]:1;u=u/h}var a={cursor:"pointer"};n&&(a.fill=n),i.stroke&&(a.stroke=i.stroke),u&&(a["stroke-width"]=u),EC(a,e,t,!0)}}function EC(r,e,t,a){var i=JSON.stringify(r),n=t.cssStyleCache[i];n||(n=t.zrId+"-cls-"+IC(),t.cssStyleCache[i]=n,t.cssNodes["."+n+(a?":hover":"")]=r),e.class=e.class?e.class+" "+n:n}var Gl=Math.round;function OC(r){return r&&$(r.src)}function NC(r){return r&&rt(r.toDataURL)}function Jg(r,e,t,a){EG(function(i,n){var o=i==="fill"||i==="stroke";o&&l1(n)?HC(e,r,i,a):o&&Uc(n)?WC(t,r,i,a):r[i]=n,o&&a.ssr&&n==="none"&&(r["pointer-events"]="visible")},e,t,!1),JG(t,r,a)}function Qg(r,e){var t=cE(e);t&&(t.each(function(a,i){a!=null&&(r[(MC+i).toLowerCase()]=a+"")}),e.isSilent()&&(r[MC+"silent"]="true"))}function BC(r){return ui(r[0]-1)&&ui(r[1])&&ui(r[2])&&ui(r[3]-1)}function ZG(r){return ui(r[4])&&ui(r[5])}function ty(r,e,t){if(e&&!(ZG(e)&&BC(e))){var a=t?10:1e4;r.transform=BC(e)?"translate("+Gl(e[4]*a)/a+" "+Gl(e[5]*a)/a+")":ER(e)}}function zC(r,e,t){for(var a=r.points,i=[],n=0;n<a.length;n++)i.push(Gl(a[n][0]*t)/t),i.push(Gl(a[n][1]*t)/t);e.points=i.join(" ")}function VC(r){return!r.smooth}function $G(r){var e=U(r,function(t){return typeof t=="string"?[t,t]:t});return function(t,a,i){for(var n=0;n<e.length;n++){var o=e[n],s=t[o[0]];s!=null&&(a[o[1]]=Gl(s*i)/i)}}}var XG={circle:[$G(["cx","cy","r"])],polyline:[zC,VC],polygon:[zC,VC]};function qG(r){for(var e=r.animators,t=0;t<e.length;t++)if(e[t].targetName==="shape")return!0;return!1}function GC(r,e){var t=r.style,a=r.shape,i=XG[r.type],n={},o=e.animation,s="path",l=r.style.strokePercent,u=e.compress&&u1(r)||4;if(i&&!e.willUpdate&&!(i[1]&&!i[1](a))&&!(o&&qG(r))&&!(l<1)){s=r.type;var h=Math.pow(10,u);i[0](a,n,h)}else{var f=!r.path||r.shapeChanged();r.path||r.createPathProxy();var v=r.path;f&&(v.beginPath(),r.buildPath(v,r.shape),r.pathUpdated());var c=v.getVersion(),d=r,p=d.__svgPathBuilder;(d.__svgPathVersion!==c||!p||l!==d.__svgPathStrokePercent)&&(p||(p=d.__svgPathBuilder=new TC),p.reset(u),v.rebuildPath(p,l),p.generateStr(),d.__svgPathVersion=c,d.__svgPathStrokePercent=l),n.d=p.getStr()}return ty(n,r.transform),Jg(n,t,r,e),Qg(n,r),e.animation&&Hf(r,n,e),e.emphasis&&YG(r,n,e),me(s,r.id+"",n)}function KG(r,e){var t=r.style,a=t.image;if(a&&!$(a)&&(OC(a)?a=a.src:NC(a)&&(a=a.toDataURL())),!!a){var i=t.x||0,n=t.y||0,o=t.width,s=t.height,l={href:a,width:o,height:s};return i&&(l.x=i),n&&(l.y=n),ty(l,r.transform),Jg(l,t,r,e),Qg(l,r),e.animation&&Hf(r,l,e),me("image",r.id+"",l)}}function jG(r,e){var t=r.style,a=t.text;if(a!=null&&(a+=""),!(!a||isNaN(t.x)||isNaN(t.y))){var i=t.font||Aa,n=t.x||0,o=NR(t.y||0,Ys(i),t.textBaseline),s=OR[t.textAlign]||t.textAlign,l={"dominant-baseline":"central","text-anchor":s};if(Cx(t)){var u="",h=t.fontStyle,f=bx(t.fontSize);if(!parseFloat(f))return;var v=t.fontFamily||m_,c=t.fontWeight;u+="font-size:"+f+";font-family:"+v+";",h&&h!=="normal"&&(u+="font-style:"+h+";"),c&&c!=="normal"&&(u+="font-weight:"+c+";"),l.style=u}else l.style="font: "+i;return a.match(/\s/)&&(l["xml:space"]="preserve"),n&&(l.x=n),o&&(l.y=o),ty(l,r.transform),Jg(l,t,r,e),Qg(l,r),e.animation&&Hf(r,l,e),me("text",r.id+"",l,void 0,a)}}function FC(r,e){if(r instanceof bt)return GC(r,e);if(r instanceof Me)return KG(r,e);if(r instanceof Co)return jG(r,e)}function JG(r,e,t){var a=r.style;if(BR(a)){var i=zR(r),n=t.shadowCache,o=n[i];if(!o){var s=r.getGlobalScale(),l=s[0],u=s[1];if(!l||!u)return;var h=a.shadowOffsetX||0,f=a.shadowOffsetY||0,v=a.shadowBlur,c=Fs(a.shadowColor),d=c.opacity,p=c.color,g=v/2/l,y=v/2/u,m=g+" "+y;o=t.zrId+"-s"+t.shadowIdx++,t.defs[o]=me("filter",o,{id:o,x:"-100%",y:"-100%",width:"300%",height:"300%"},[me("feDropShadow","",{dx:h/l,dy:f/u,stdDeviation:m,"flood-color":p,"flood-opacity":d})]),n[i]=o}e.filter=ju(o)}}function HC(r,e,t,a){var i=r[t],n,o={gradientUnits:i.global?"userSpaceOnUse":"objectBoundingBox"};if(o1(i))n="linearGradient",o.x1=i.x,o.y1=i.y,o.x2=i.x2,o.y2=i.y2;else if(s1(i))n="radialGradient",o.cx=Q(i.x,.5),o.cy=Q(i.y,.5),o.r=Q(i.r,.5);else return;for(var s=i.colorStops,l=[],u=0,h=s.length;u<h;++u){var f=Wc(s[u].offset)*100+"%",v=s[u].color,c=Fs(v),d=c.color,p=c.opacity,g={offset:f};g["stop-color"]=d,p<1&&(g["stop-opacity"]=p),l.push(me("stop",u+"",g))}var y=me(n,"",o,l),m=Kg(y),_=a.gradientCache,x=_[m];x||(x=a.zrId+"-g"+a.gradientIdx++,_[m]=x,o.id=x,a.defs[x]=me(n,x,o,l)),e[t]=ju(x)}function WC(r,e,t,a){var i=r.style[t],n=r.getBoundingRect(),o={},s=i.repeat,l=s==="no-repeat",u=s==="repeat-x",h=s==="repeat-y",f;if(n1(i)){var v=i.imageWidth,c=i.imageHeight,d=void 0,p=i.image;if($(p)?d=p:OC(p)?d=p.src:NC(p)&&(d=p.toDataURL()),typeof Image>"u"){var g="Image width/height must been given explictly in svg-ssr renderer.";Ee(v,g),Ee(c,g)}else if(v==null||c==null){var y=function(A,D){if(A){var I=A.elm,L=v||D.width,P=c||D.height;A.tag==="pattern"&&(u?(P=1,L/=n.width):h&&(L=1,P/=n.height)),A.attrs.width=L,A.attrs.height=P,I&&(I.setAttribute("width",L),I.setAttribute("height",P))}},m=Sd(d,null,r,function(A){l||y(S,A),y(f,A)});m&&m.width&&m.height&&(v=v||m.width,c=c||m.height)}f=me("image","img",{href:d,width:v,height:c}),o.width=v,o.height=c}else i.svgElement&&(f=at(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(f){var _,x;l?_=x=1:u?(x=1,_=o.width/n.width):h?(_=1,x=o.height/n.height):o.patternUnits="userSpaceOnUse",_!=null&&!isNaN(_)&&(o.width=_),x!=null&&!isNaN(x)&&(o.height=x);var b=h1(i);b&&(o.patternTransform=b);var S=me("pattern","",o,[f]),w=Kg(S),T=a.patternCache,C=T[w];C||(C=a.zrId+"-p"+a.patternIdx++,T[w]=C,o.id=C,S=a.defs[C]=me("pattern",C,o,[f])),e[t]=ju(C)}}function QG(r,e,t){var a=t.clipPathCache,i=t.defs,n=a[r.id];if(!n){n=t.zrId+"-c"+t.clipPathIdx++;var o={id:n};a[r.id]=n,i[n]=me("clipPath",n,o,[GC(r,t)])}e["clip-path"]=ju(n)}function UC(r){return document.createTextNode(r)}function Wn(r,e,t){r.insertBefore(e,t)}function YC(r,e){r.removeChild(e)}function ZC(r,e){r.appendChild(e)}function $C(r){return r.parentNode}function XC(r){return r.nextSibling}function ey(r,e){r.textContent=e}var qC=58,t3=120,e3=me("","");function ry(r){return r===void 0}function ma(r){return r!==void 0}function r3(r,e,t){for(var a={},i=e;i<=t;++i){var n=r[i].key;n!==void 0&&(a[n]=i)}return a}function Fl(r,e){var t=r.key===e.key,a=r.tag===e.tag;return a&&t}function Hl(r){var e,t=r.children,a=r.tag;if(ma(a)){var i=r.elm=DC(a);if(ay(e3,r),W(t))for(e=0;e<t.length;++e){var n=t[e];n!=null&&ZC(i,Hl(n))}else ma(r.text)&&!lt(r.text)&&ZC(i,UC(r.text))}else r.elm=UC(r.text);return r.elm}function KC(r,e,t,a,i){for(;a<=i;++a){var n=t[a];n!=null&&Wn(r,Hl(n),e)}}function Wf(r,e,t,a){for(;t<=a;++t){var i=e[t];if(i!=null)if(ma(i.tag)){var n=$C(i.elm);YC(n,i.elm)}else YC(r,i.elm)}}function ay(r,e){var t,a=e.elm,i=r&&r.attrs||{},n=e.attrs||{};if(i!==n){for(t in n){var o=n[t],s=i[t];s!==o&&(o===!0?a.setAttribute(t,""):o===!1?a.removeAttribute(t):t==="style"?a.style.cssText=o:t.charCodeAt(0)!==t3?a.setAttribute(t,o):t==="xmlns:xlink"||t==="xmlns"?a.setAttributeNS(OG,t,o):t.charCodeAt(3)===qC?a.setAttributeNS(NG,t,o):t.charCodeAt(5)===qC?a.setAttributeNS(AC,t,o):a.setAttribute(t,o))}for(t in i)t in n||a.removeAttribute(t)}}function a3(r,e,t){for(var a=0,i=0,n=e.length-1,o=e[0],s=e[n],l=t.length-1,u=t[0],h=t[l],f,v,c,d;a<=n&&i<=l;)o==null?o=e[++a]:s==null?s=e[--n]:u==null?u=t[++i]:h==null?h=t[--l]:Fl(o,u)?(is(o,u),o=e[++a],u=t[++i]):Fl(s,h)?(is(s,h),s=e[--n],h=t[--l]):Fl(o,h)?(is(o,h),Wn(r,o.elm,XC(s.elm)),o=e[++a],h=t[--l]):Fl(s,u)?(is(s,u),Wn(r,s.elm,o.elm),s=e[--n],u=t[++i]):(ry(f)&&(f=r3(e,a,n)),v=f[u.key],ry(v)?Wn(r,Hl(u),o.elm):(c=e[v],c.tag!==u.tag?Wn(r,Hl(u),o.elm):(is(c,u),e[v]=void 0,Wn(r,c.elm,o.elm))),u=t[++i]);(a<=n||i<=l)&&(a>n?(d=t[l+1]==null?null:t[l+1].elm,KC(r,d,t,i,l)):Wf(r,e,a,n))}function is(r,e){var t=e.elm=r.elm,a=r.children,i=e.children;r!==e&&(ay(r,e),ry(e.text)?ma(a)&&ma(i)?a!==i&&a3(t,a,i):ma(i)?(ma(r.text)&&ey(t,""),KC(t,null,i,0,i.length-1)):ma(a)?Wf(t,a,0,a.length-1):ma(r.text)&&ey(t,""):r.text!==e.text&&(ma(a)&&Wf(t,a,0,a.length-1),ey(t,e.text)))}function i3(r,e){if(Fl(r,e))is(r,e);else{var t=r.elm,a=$C(t);Hl(e),a!==null&&(Wn(a,e.elm,XC(t)),Wf(a,[r],0,0))}return e}var n3=0,o3=function(){function r(e,t,a){if(this.type="svg",this.refreshHover=jC(),this.configLayer=jC(),this.storage=t,this._opts=a=F({},a),this.root=e,this._id="zr"+n3++,this._oldVNode=LC(a.width,a.height),e&&!a.ssr){var i=this._viewport=document.createElement("div");i.style.cssText="position:relative;overflow:hidden";var n=this._svgDom=this._oldVNode.elm=DC("svg");ay(null,this._oldVNode),i.appendChild(n),e.appendChild(i)}this.resize(a.width,a.height)}return r.prototype.getType=function(){return this.type},r.prototype.getViewportRoot=function(){return this._viewport},r.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},r.prototype.getSvgDom=function(){return this._svgDom},r.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style="position:absolute;left:0;top:0;user-select:none",i3(this._oldVNode,e),this._oldVNode=e}},r.prototype.renderOneToVNode=function(e){return FC(e,jg(this._id))},r.prototype.renderToVNode=function(e){e=e||{};var t=this.storage.getDisplayList(!0),a=this._width,i=this._height,n=jg(this._id);n.animation=e.animation,n.willUpdate=e.willUpdate,n.compress=e.compress,n.emphasis=e.emphasis,n.ssr=this._opts.ssr;var o=[],s=this._bgVNode=s3(a,i,this._backgroundColor,n);s&&o.push(s);var l=e.compress?null:this._mainVNode=me("g","main",{},[]);this._paintList(t,n,l?l.children:o),l&&o.push(l);var u=U(Mt(n.defs),function(v){return n.defs[v]});if(u.length&&o.push(me("defs","defs",{},u)),e.animation){var h=VG(n.cssNodes,n.cssAnims,{newline:!0});if(h){var f=me("style","stl",{},[],h);o.push(f)}}return LC(a,i,o,e.useViewBox)},r.prototype.renderToString=function(e){return e=e||{},Kg(this.renderToVNode({animation:Q(e.cssAnimation,!0),emphasis:Q(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:Q(e.useViewBox,!0)}),{newline:!0})},r.prototype.setBackgroundColor=function(e){this._backgroundColor=e},r.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},r.prototype._paintList=function(e,t,a){for(var i=e.length,n=[],o=0,s,l,u=0,h=0;h<i;h++){var f=e[h];if(!f.invisible){var v=f.__clipPaths,c=v&&v.length||0,d=l&&l.length||0,p=void 0;for(p=Math.max(c-1,d-1);p>=0&&!(v&&l&&v[p]===l[p]);p--);for(var g=d-1;g>p;g--)o--,s=n[o-1];for(var y=p+1;y<c;y++){var m={};QG(v[y],m,t);var _=me("g","clip-g-"+u++,m,[]);(s?s.children:a).push(_),n[o++]=_,s=_}l=v;var x=FC(f,t);x&&(s?s.children:a).push(x)}}},r.prototype.resize=function(e,t){var a=this._opts,i=this.root,n=this._viewport;if(e!=null&&(a.width=e),t!=null&&(a.height=t),i&&n&&(n.style.display="none",e=Xo(i,0,a),t=Xo(i,1,a),n.style.display=""),this._width!==e||this._height!==t){if(this._width=e,this._height=t,n){var o=n.style;o.width=e+"px",o.height=t+"px"}if(Uc(this._backgroundColor))this.refresh();else{var s=this._svgDom;s&&(s.setAttribute("width",e),s.setAttribute("height",t));var l=this._bgVNode&&this._bgVNode.elm;l&&(l.setAttribute("width",e),l.setAttribute("height",t))}}},r.prototype.getWidth=function(){return this._width},r.prototype.getHeight=function(){return this._height},r.prototype.dispose=function(){this.root&&(this.root.innerHTML=""),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},r.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},r.prototype.toDataURL=function(e){var t=this.renderToString(),a="data:image/svg+xml;";return e?(t=GR(t),t&&a+"base64,"+t):a+"charset=UTF-8,"+encodeURIComponent(t)},r}();function jC(r){return function(){}}function s3(r,e,t,a){var i;if(t&&t!=="none")if(i=me("rect","bg",{width:r,height:e,x:"0",y:"0"}),l1(t))HC({fill:t},i.attrs,"fill",a);else if(Uc(t))WC({style:{fill:t},dirty:Qt,getBoundingRect:function(){return{width:r,height:e}}},i.attrs,"fill",a);else{var n=Fs(t),o=n.color,s=n.opacity;i.attrs.fill=o,s<1&&(i.attrs["fill-opacity"]=s)}return i}var l3=o3;function u3(r){r.registerPainter("svg",l3)}function JC(r,e,t){var a=kr.createCanvas(),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",r)),a.width=i*t,a.height=n*t,a}var iy=function(r){Ut(e,r);function e(t,a,i){var n=r.call(this)||this;n.motionBlur=!1,n.lastFrameAlpha=.7,n.dpr=1,n.virtual=!1,n.config={},n.incremental=!1,n.zlevel=0,n.maxRepaintRectCount=5,n.__dirty=!0,n.__firstTimePaint=!0,n.__used=!1,n.__drawIndex=0,n.__startIndex=0,n.__endIndex=0,n.__prevStartIndex=null,n.__prevEndIndex=null;var o;i=i||ih,typeof t=="string"?o=JC(t,a,i):lt(t)&&(o=t,t=o.id),n.id=t,n.dom=o;var s=o.style;return s&&(A_(o),o.onselectstart=function(){return!1},s.padding="0",s.margin="0",s.borderWidth="0"),n.painter=a,n.dpr=i,n}return e.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},e.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},e.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},e.prototype.setUnpainted=function(){this.__firstTimePaint=!0},e.prototype.createBackBuffer=function(){var t=this.dpr;this.domBack=JC("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),t!==1&&this.ctxBack.scale(t,t)},e.prototype.createRepaintRects=function(t,a,i,n){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var o=[],s=this.maxRepaintRectCount,l=!1,u=new ht(0,0,0,0);function h(m){if(!(!m.isFinite()||m.isZero()))if(o.length===0){var _=new ht(0,0,0,0);_.copy(m),o.push(_)}else{for(var x=!1,b=1/0,S=0,w=0;w<o.length;++w){var T=o[w];if(T.intersect(m)){var C=new ht(0,0,0,0);C.copy(T),C.union(m),o[w]=C,x=!0;break}else if(l){u.copy(m),u.union(T);var A=m.width*m.height,D=T.width*T.height,I=u.width*u.height,L=I-A-D;L<b&&(b=L,S=w)}}if(l&&(o[S].union(m),x=!0),!x){var _=new ht(0,0,0,0);_.copy(m),o.push(_)}l||(l=o.length>=s)}}for(var f=this.__startIndex;f<this.__endIndex;++f){var v=t[f];if(v){var c=v.shouldBePainted(i,n,!0,!0),d=v.__isRendered&&(v.__dirty&ar||!c)?v.getPrevPaintRect():null;d&&h(d);var p=c&&(v.__dirty&ar||!v.__isRendered)?v.getPaintRect():null;p&&h(p)}}for(var f=this.__prevStartIndex;f<this.__prevEndIndex;++f){var v=a[f],c=v&&v.shouldBePainted(i,n,!0,!0);if(v&&(!c||!v.__zr)&&v.__isRendered){var d=v.getPrevPaintRect();d&&h(d)}}var g;do{g=!1;for(var f=0;f<o.length;){if(o[f].isZero()){o.splice(f,1);continue}for(var y=f+1;y<o.length;)o[f].intersect(o[y])?(g=!0,o[f].union(o[y]),o.splice(y,1)):y++;f++}}while(g);return this._paintRects=o,o},e.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},e.prototype.resize=function(t,a){var i=this.dpr,n=this.dom,o=n.style,s=this.domBack;o&&(o.width=t+"px",o.height=a+"px"),n.width=t*i,n.height=a*i,s&&(s.width=t*i,s.height=a*i,i!==1&&this.ctxBack.scale(i,i))},e.prototype.clear=function(t,a,i){var n=this.dom,o=this.ctx,s=n.width,l=n.height;a=a||this.clearColor;var u=this.motionBlur&&!t,h=this.lastFrameAlpha,f=this.dpr,v=this;u&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(n,0,0,s/f,l/f));var c=this.domBack;function d(p,g,y,m){if(o.clearRect(p,g,y,m),a&&a!=="transparent"){var _=void 0;if(Pu(a)){var x=a.global||a.__width===y&&a.__height===m;_=x&&a.__canvasGradient||eg(o,a,{x:0,y:0,width:y,height:m}),a.__canvasGradient=_,a.__width=y,a.__height=m}else Wk(a)&&(a.scaleX=a.scaleX||f,a.scaleY=a.scaleY||f,_=ag(o,a,{dirty:function(){v.setUnpainted(),v.painter.refresh()}}));o.save(),o.fillStyle=_||a,o.fillRect(p,g,y,m),o.restore()}u&&(o.save(),o.globalAlpha=h,o.drawImage(c,p,g,y,m),o.restore())}!i||u?d(0,0,s,l):i.length&&M(i,function(p){d(p.x*f,p.y*f,p.width*f,p.height*f)})},e}(dr),QC=1e5,Un=314159,Uf=.01,h3=.001;function f3(r){return r?r.__builtin__?!0:!(typeof r.resize!="function"||typeof r.refresh!="function"):!1}function v3(r,e){var t=document.createElement("div");return t.style.cssText=["position:relative","width:"+r+"px","height:"+e+"px","padding:0","margin:0","border-width:0"].join(";")+";",t}var c3=function(){function r(e,t,a,i){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var n=!e.nodeName||e.nodeName.toUpperCase()==="CANVAS";this._opts=a=F({},a||{}),this.dpr=a.devicePixelRatio||ih,this._singleCanvas=n,this.root=e;var o=e.style;o&&(A_(e),e.innerHTML=""),this.storage=t;var s=this._zlevelList;this._prevDisplayList=[];var l=this._layers;if(n){var h=e,f=h.width,v=h.height;a.width!=null&&(f=a.width),a.height!=null&&(v=a.height),this.dpr=a.devicePixelRatio||1,h.width=f*this.dpr,h.height=v*this.dpr,this._width=f,this._height=v;var c=new iy(h,this,this.dpr);c.__builtin__=!0,c.initContext(),l[Un]=c,c.zlevel=Un,s.push(Un),this._domRoot=e}else{this._width=Xo(e,0,a),this._height=Xo(e,1,a);var u=this._domRoot=v3(this._width,this._height);e.appendChild(u)}}return r.prototype.getType=function(){return"canvas"},r.prototype.isSingleCanvas=function(){return this._singleCanvas},r.prototype.getViewportRoot=function(){return this._domRoot},r.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},r.prototype.refresh=function(e){var t=this.storage.getDisplayList(!0),a=this._prevDisplayList,i=this._zlevelList;this._redrawId=Math.random(),this._paintList(t,a,e,this._redrawId);for(var n=0;n<i.length;n++){var o=i[n],s=this._layers[o];if(!s.__builtin__&&s.refresh){var l=n===0?this._backgroundColor:null;s.refresh(l)}}return this._opts.useDirtyRect&&(this._prevDisplayList=t.slice()),this},r.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},r.prototype._paintHoverList=function(e){var t=e.length,a=this._hoverlayer;if(a&&a.clear(),!!t){for(var i={inHover:!0,viewWidth:this._width,viewHeight:this._height},n,o=0;o<t;o++){var s=e[o];s.__inHover&&(a||(a=this._hoverlayer=this.getLayer(QC)),n||(n=a.ctx,n.save()),Nn(n,s,i,o===t-1))}n&&n.restore()}},r.prototype.getHoverLayer=function(){return this.getLayer(QC)},r.prototype.paintOne=function(e,t){Uw(e,t)},r.prototype._paintList=function(e,t,a,i){if(this._redrawId===i){a=a||!1,this._updateLayerStatus(e);var n=this._doPaintList(e,t,a),o=n.finished,s=n.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),s&&this._paintHoverList(e),o)this.eachLayer(function(u){u.afterBrush&&u.afterBrush()});else{var l=this;Rc(function(){l._paintList(e,t,a,i)})}}},r.prototype._compositeManually=function(){var e=this.getLayer(Un).ctx,t=this._domRoot.width,a=this._domRoot.height;e.clearRect(0,0,t,a),this.eachBuiltinLayer(function(i){i.virtual&&e.drawImage(i.dom,0,0,t,a)})},r.prototype._doPaintList=function(e,t,a){for(var i=this,n=[],o=this._opts.useDirtyRect,s=0;s<this._zlevelList.length;s++){var l=this._zlevelList[s],u=this._layers[l];u.__builtin__&&u!==this._hoverlayer&&(u.__dirty||a)&&n.push(u)}for(var h=!0,f=!1,v=function(p){var g=n[p],y=g.ctx,m=o&&g.createRepaintRects(e,t,c._width,c._height),_=a?g.__startIndex:g.__drawIndex,x=!a&&g.incremental&&Date.now,b=x&&Date.now(),S=g.zlevel===c._zlevelList[0]?c._backgroundColor:null;if(g.__startIndex===g.__endIndex)g.clear(!1,S,m);else if(_===g.__startIndex){var w=e[_];(!w.incremental||!w.notClear||a)&&g.clear(!1,S,m)}_===-1&&(console.error("For some unknown reason. drawIndex is -1"),_=g.__startIndex);var T,C=function(L){var P={inHover:!1,allClipped:!1,prevEl:null,viewWidth:i._width,viewHeight:i._height};for(T=_;T<g.__endIndex;T++){var k=e[T];if(k.__inHover&&(f=!0),i._doPaintEl(k,g,o,L,P,T===g.__endIndex-1),x){var R=Date.now()-b;if(R>15)break}}P.prevElClipPaths&&y.restore()};if(m)if(m.length===0)T=g.__endIndex;else for(var A=c.dpr,D=0;D<m.length;++D){var I=m[D];y.save(),y.beginPath(),y.rect(I.x*A,I.y*A,I.width*A,I.height*A),y.clip(),C(I),y.restore()}else y.save(),C(),y.restore();g.__drawIndex=T,g.__drawIndex<g.__endIndex&&(h=!1)},c=this,d=0;d<n.length;d++)v(d);return Pt.wxa&&M(this._layers,function(p){p&&p.ctx&&p.ctx.draw&&p.ctx.draw()}),{finished:h,needsRefreshHover:f}},r.prototype._doPaintEl=function(e,t,a,i,n,o){var s=t.ctx;if(a){var l=e.getPaintRect();(!i||l&&l.intersect(i))&&(Nn(s,e,n,o),e.setPrevPaintRect(l))}else Nn(s,e,n,o)},r.prototype.getLayer=function(e,t){this._singleCanvas&&!this._needsManuallyCompositing&&(e=Un);var a=this._layers[e];return a||(a=new iy("zr_"+e,this,this.dpr),a.zlevel=e,a.__builtin__=!0,this._layerConfig[e]?yt(a,this._layerConfig[e],!0):this._layerConfig[e-Uf]&&yt(a,this._layerConfig[e-Uf],!0),t&&(a.virtual=t),this.insertLayer(e,a),a.initContext()),a},r.prototype.insertLayer=function(e,t){var a=this._layers,i=this._zlevelList,n=i.length,o=this._domRoot,s=null,l=-1;if(!a[e]&&f3(t)){if(n>0&&e>i[0]){for(l=0;l<n-1&&!(i[l]<e&&i[l+1]>e);l++);s=a[i[l]]}if(i.splice(l+1,0,e),a[e]=t,!t.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(t.dom,u.nextSibling):o.appendChild(t.dom)}else o.firstChild?o.insertBefore(t.dom,o.firstChild):o.appendChild(t.dom);t.painter||(t.painter=this)}},r.prototype.eachLayer=function(e,t){for(var a=this._zlevelList,i=0;i<a.length;i++){var n=a[i];e.call(t,this._layers[n],n)}},r.prototype.eachBuiltinLayer=function(e,t){for(var a=this._zlevelList,i=0;i<a.length;i++){var n=a[i],o=this._layers[n];o.__builtin__&&e.call(t,o,n)}},r.prototype.eachOtherLayer=function(e,t){for(var a=this._zlevelList,i=0;i<a.length;i++){var n=a[i],o=this._layers[n];o.__builtin__||e.call(t,o,n)}},r.prototype.getLayers=function(){return this._layers},r.prototype._updateLayerStatus=function(e){this.eachBuiltinLayer(function(f,v){f.__dirty=f.__used=!1});function t(f){n&&(n.__endIndex!==f&&(n.__dirty=!0),n.__endIndex=f)}if(this._singleCanvas)for(var a=1;a<e.length;a++){var i=e[a];if(i.zlevel!==e[a-1].zlevel||i.incremental){this._needsManuallyCompositing=!0;break}}var n=null,o=0,s,l;for(l=0;l<e.length;l++){var i=e[l],u=i.zlevel,h=void 0;s!==u&&(s=u,o=0),i.incremental?(h=this.getLayer(u+h3,this._needsManuallyCompositing),h.incremental=!0,o=1):h=this.getLayer(u+(o>0?Uf:0),this._needsManuallyCompositing),h.__builtin__||lc("ZLevel "+u+" has been used by unkown layer "+h.id),h!==n&&(h.__used=!0,h.__startIndex!==l&&(h.__dirty=!0),h.__startIndex=l,h.incremental?h.__drawIndex=-1:h.__drawIndex=l,t(l),n=h),i.__dirty&ar&&!i.__inHover&&(h.__dirty=!0,h.incremental&&h.__drawIndex<0&&(h.__drawIndex=l))}t(l),this.eachBuiltinLayer(function(f,v){!f.__used&&f.getElementCount()>0&&(f.__dirty=!0,f.__startIndex=f.__endIndex=f.__drawIndex=0),f.__dirty&&f.__drawIndex<0&&(f.__drawIndex=f.__startIndex)})},r.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},r.prototype._clearLayer=function(e){e.clear()},r.prototype.setBackgroundColor=function(e){this._backgroundColor=e,M(this._layers,function(t){t.setUnpainted()})},r.prototype.configLayer=function(e,t){if(t){var a=this._layerConfig;a[e]?yt(a[e],t,!0):a[e]=t;for(var i=0;i<this._zlevelList.length;i++){var n=this._zlevelList[i];if(n===e||n===e+Uf){var o=this._layers[n];yt(o,a[e],!0)}}}},r.prototype.delLayer=function(e){var t=this._layers,a=this._zlevelList,i=t[e];i&&(i.dom.parentNode.removeChild(i.dom),delete t[e],a.splice(gt(a,e),1))},r.prototype.resize=function(e,t){if(this._domRoot.style){var a=this._domRoot;a.style.display="none";var i=this._opts,n=this.root;if(e!=null&&(i.width=e),t!=null&&(i.height=t),e=Xo(n,0,i),t=Xo(n,1,i),a.style.display="",this._width!==e||t!==this._height){a.style.width=e+"px",a.style.height=t+"px";for(var o in this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(e,t);this.refresh(!0)}this._width=e,this._height=t}else{if(e==null||t==null)return;this._width=e,this._height=t,this.getLayer(Un).resize(e,t)}return this},r.prototype.clearLayer=function(e){var t=this._layers[e];t&&t.clear()},r.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},r.prototype.getRenderedCanvas=function(e){if(e=e||{},this._singleCanvas&&!this._compositeManually)return this._layers[Un].dom;var t=new iy("image",this,e.pixelRatio||this.dpr);t.initContext(),t.clear(!1,e.backgroundColor||this._backgroundColor);var a=t.ctx;if(e.pixelRatio<=this.dpr){this.refresh();var i=t.dom.width,n=t.dom.height;this.eachLayer(function(f){f.__builtin__?a.drawImage(f.dom,0,0,i,n):f.renderToCanvas&&(a.save(),f.renderToCanvas(a),a.restore())})}else for(var o={inHover:!1,viewWidth:this._width,viewHeight:this._height},s=this.storage.getDisplayList(!0),l=0,u=s.length;l<u;l++){var h=s[l];Nn(a,h,o,l===u-1)}return t.dom},r.prototype.getWidth=function(){return this._width},r.prototype.getHeight=function(){return this._height},r}(),d3=c3;function p3(r){r.registerPainter("canvas",d3)}var g3=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t){return Ha(null,this,{useEncodeDefaulter:!0})},e.prototype.getLegendIcon=function(t){var a=new et,i=he("line",0,t.itemHeight/2,t.itemWidth,0,t.lineStyle.stroke,!1);a.add(i),i.setStyle(t.lineStyle);var n=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),s=n==="none"?"circle":n,l=t.itemHeight*.8,u=he(s,(t.itemWidth-l)/2,(t.itemHeight-l)/2,l,l,t.itemStyle.fill);a.add(u),u.setStyle(t.itemStyle);var h=t.iconRotate==="inherit"?o:t.iconRotate||0;return u.rotation=h*Math.PI/180,u.setOrigin([t.itemWidth/2,t.itemHeight/2]),s.indexOf("empty")>-1&&(u.style.stroke=u.style.fill,u.style.fill=B.color.neutral00,u.style.lineWidth=2),a},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:6,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e}(Ht);function ns(r,e){var t=r.mapDimensionsAll("defaultedLabel"),a=t.length;if(a===1){var i=Fo(r,e,t[0]);return i!=null?i+"":null}else if(a){for(var n=[],o=0;o<t.length;o++)n.push(Fo(r,e,t[o]));return n.join(" ")}}function tA(r,e){var t=r.mapDimensionsAll("defaultedLabel");if(!W(e))return e+"";for(var a=[],i=0;i<t.length;i++){var n=r.getDimensionIndex(t[i]);n>=0&&a.push(e[n])}return a.join(" ")}var Wl=function(r){z(e,r);function e(t,a,i,n){var o=r.call(this)||this;return o.updateData(t,a,i,n),o}return e.prototype._createSymbol=function(t,a,i,n,o,s){this.removeAll();var l=he(t,-1,-1,2,2,null,s);l.attr({z2:Q(o,100),culling:!0,scaleX:n[0]/2,scaleY:n[1]/2}),l.drift=y3,this._symbolType=t,this.add(l)},e.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){Oa(this.childAt(0))},e.prototype.downplay=function(){Na(this.childAt(0))},e.prototype.setZ=function(t,a){var i=this.childAt(0);i.zlevel=t,i.z=a},e.prototype.setDraggable=function(t,a){var i=this.childAt(0);i.draggable=t,i.cursor=!a&&t?"move":i.cursor},e.prototype.updateData=function(t,a,i,n){this.silent=!1;var o=t.getItemVisual(a,"symbol")||"circle",s=t.hostModel,l=e.getSymbolSize(t,a),u=e.getSymbolZ2(t,a),h=o!==this._symbolType,f=n&&n.disableAnimation;if(h){var v=t.getItemVisual(a,"symbolKeepAspect");this._createSymbol(o,t,a,l,u,v)}else{var c=this.childAt(0);c.silent=!1;var d={scaleX:l[0]/2,scaleY:l[1]/2};f?c.attr(d):It(c,d,s,a),br(c)}if(this._updateCommon(t,a,l,i,n),h){var c=this.childAt(0);if(!f){var d={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:c.style.opacity}};c.scaleX=c.scaleY=0,c.style.opacity=0,Yt(c,d,s,a)}}f&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(t,a,i,n,o){var s=this.childAt(0),l=t.hostModel,u,h,f,v,c,d,p,g,y;if(n&&(u=n.emphasisItemStyle,h=n.blurItemStyle,f=n.selectItemStyle,v=n.focus,c=n.blurScope,p=n.labelStatesModels,g=n.hoverScale,y=n.cursorStyle,d=n.emphasisDisabled),!n||t.hasItemOption){var m=n&&n.itemModel?n.itemModel:t.getItemModel(a),_=m.getModel("emphasis");u=_.getModel("itemStyle").getItemStyle(),f=m.getModel(["select","itemStyle"]).getItemStyle(),h=m.getModel(["blur","itemStyle"]).getItemStyle(),v=_.get("focus"),c=_.get("blurScope"),d=_.get("disabled"),p=ce(m),g=_.getShallow("scale"),y=m.getShallow("cursor")}var x=t.getItemVisual(a,"symbolRotate");s.attr("rotation",(x||0)*Math.PI/180||0);var b=En(t.getItemVisual(a,"symbolOffset"),i);b&&(s.x=b[0],s.y=b[1]),y&&s.attr("cursor",y);var S=t.getItemVisual(a,"style"),w=S.fill;if(s instanceof Me){var T=s.style;s.useStyle(F({image:T.image,x:T.x,y:T.y,width:T.width,height:T.height},S))}else s.__isEmptyBrush?s.useStyle(F({},S)):s.useStyle(S),s.style.decal=null,s.setColor(w,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var C=t.getItemVisual(a,"liftZ"),A=this._z2;C!=null?A==null&&(this._z2=s.z2,s.z2+=C):A!=null&&(s.z2=A,this._z2=null);var D=o&&o.useNameLabel;ye(s,p,{labelFetcher:l,labelDataIndex:a,defaultText:I,inheritColor:w,defaultOpacity:S.opacity});function I(k){return D?t.getName(k):ns(t,k)}this._sizeX=i[0]/2,this._sizeY=i[1]/2;var L=s.ensureState("emphasis");L.style=u,s.ensureState("select").style=f,s.ensureState("blur").style=h;var P=g==null||g===!0?Math.max(1.1,3/this._sizeY):isFinite(g)&&g>0?+g:1;L.scaleX=this._sizeX*P,L.scaleY=this._sizeY*P,this.setSymbolScale(1),Xt(this,v,c,d)},e.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},e.prototype.fadeOut=function(t,a,i){var n=this.childAt(0),o=vt(this).dataIndex,s=i&&i.animation;if(this.silent=n.silent=!0,i&&i.fadeLabel){var l=n.getTextContent();l&&pi(l,{style:{opacity:0}},a,{dataIndex:o,removeOpt:s,cb:function(){n.removeTextContent()}})}else n.removeTextContent();pi(n,{style:{opacity:0},scaleX:0,scaleY:0},a,{dataIndex:o,cb:t,removeOpt:s})},e.getSymbolSize=function(t,a){return $o(t.getItemVisual(a,"symbolSize"))},e.getSymbolZ2=function(t,a){return t.getItemVisual(a,"z2")},e}(et);function y3(r,e){this.parent.drift(r,e)}function ny(r,e,t,a){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(a.isIgnore&&a.isIgnore(t))&&!(a.clipShape&&!a.clipShape.contain(e[0],e[1]))&&r.getItemVisual(t,"symbol")!=="none"}function eA(r){return r!=null&&!lt(r)&&(r={isIgnore:r}),r||{}}function rA(r){var e=r.hostModel,t=e.getModel("emphasis");return{emphasisItemStyle:t.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:t.get("focus"),blurScope:t.get("blurScope"),emphasisDisabled:t.get("disabled"),hoverScale:t.get("scale"),labelStatesModels:ce(e),cursorStyle:e.get("cursor")}}var Ul=function(){function r(e){this.group=new et,this._SymbolCtor=e||Wl}return r.prototype.updateData=function(e,t){this._progressiveEls=null,t=eA(t);var a=this.group,i=e.hostModel,n=this._data,o=this._SymbolCtor,s=t.disableAnimation,l=rA(e),u={disableAnimation:s},h=t.getSymbolPoint||function(f){return e.getItemLayout(f)};n||a.removeAll(),e.diff(n).add(function(f){var v=h(f);if(ny(e,v,f,t)){var c=new o(e,f,l,u);c.setPosition(v),e.setItemGraphicEl(f,c),a.add(c)}}).update(function(f,v){var c=n.getItemGraphicEl(v),d=h(f);if(!ny(e,d,f,t)){a.remove(c);return}var p=e.getItemVisual(f,"symbol")||"circle",g=c&&c.getSymbolType&&c.getSymbolType();if(!c||g&&g!==p)a.remove(c),c=new o(e,f,l,u),c.setPosition(d);else{c.updateData(e,f,l,u);var y={x:d[0],y:d[1]};s?c.attr(y):It(c,y,i)}a.add(c),e.setItemGraphicEl(f,c)}).remove(function(f){var v=n.getItemGraphicEl(f);v&&v.fadeOut(function(){a.remove(v)},i)}).execute(),this._getSymbolPoint=h,this._data=e},r.prototype.updateLayout=function(){var e=this,t=this._data;t&&t.eachItemGraphicEl(function(a,i){var n=e._getSymbolPoint(i);a.setPosition(n),a.markRedraw()})},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=rA(e),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t,a){this._progressiveEls=[],a=eA(a);function i(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var n=e.start;n<e.end;n++){var o=t.getItemLayout(n);if(ny(t,o,n,a)){var s=new this._SymbolCtor(t,n,this._seriesScope);s.traverse(i),s.setPosition(o),this.group.add(s),t.setItemGraphicEl(n,s),this._progressiveEls.push(s)}}},r.prototype.eachRendered=function(e){gi(this._progressiveEls||this.group,e)},r.prototype.remove=function(e){var t=this.group,a=this._data;a&&e?a.eachItemGraphicEl(function(i){i.fadeOut(function(){t.remove(i)},a.hostModel)}):t.removeAll()},r}();function aA(r,e,t){var a=r.getBaseAxis(),i=r.getOtherAxis(a),n=m3(i,t),o=a.dim,s=i.dim,l=e.mapDimension(s),u=e.mapDimension(o),h=s==="x"||s==="radius"?1:0,f=U(r.dimensions,function(d){return e.mapDimension(d)}),v=!1,c=e.getCalculationInfo("stackResultDimension");return wi(e,f[0])&&(v=!0,f[0]=c),wi(e,f[1])&&(v=!0,f[1]=c),{dataDimsForPoint:f,valueStart:n,valueAxisDim:s,baseAxisDim:o,stacked:!!v,valueDim:l,baseDim:u,baseDataOffset:h,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function m3(r,e){var t=0,a=r.scale.getExtent();return e==="start"?t=a[0]:e==="end"?t=a[1]:Dt(e)&&!isNaN(e)?t=e:a[0]>0?t=a[0]:a[1]<0&&(t=a[1]),t}function iA(r,e,t,a){var i=NaN;r.stacked&&(i=t.get(t.getCalculationInfo("stackedOverDimension"),a)),isNaN(i)&&(i=r.valueStart);var n=r.baseDataOffset,o=[];return o[n]=t.get(r.baseDim,a),o[1-n]=i,e.dataToPoint(o)}function _3(r,e){var t=[];return e.diff(r).add(function(a){t.push({cmd:"+",idx:a})}).update(function(a,i){t.push({cmd:"=",idx:i,idx1:a})}).remove(function(a){t.push({cmd:"-",idx:a})}).execute(),t}function x3(r,e,t,a,i,n,o,s){for(var l=_3(r,e),u=[],h=[],f=[],v=[],c=[],d=[],p=[],g=aA(i,e,o),y=r.getLayout("points")||[],m=e.getLayout("points")||[],_=0;_<l.length;_++){var x=l[_],b=!0,S=void 0,w=void 0;switch(x.cmd){case"=":S=x.idx*2,w=x.idx1*2;var T=y[S],C=y[S+1],A=m[w],D=m[w+1];(isNaN(T)||isNaN(C))&&(T=A,C=D),u.push(T,C),h.push(A,D),f.push(t[S],t[S+1]),v.push(a[w],a[w+1]),p.push(e.getRawIndex(x.idx1));break;case"+":var I=x.idx,L=g.dataDimsForPoint,P=i.dataToPoint([e.get(L[0],I),e.get(L[1],I)]);w=I*2,u.push(P[0],P[1]),h.push(m[w],m[w+1]);var k=iA(g,i,e,I);f.push(k[0],k[1]),v.push(a[w],a[w+1]),p.push(e.getRawIndex(I));break;case"-":b=!1}b&&(c.push(x),d.push(d.length))}d.sort(function(it,xt){return p[it]-p[xt]});for(var R=u.length,O=da(R),E=da(R),N=da(R),V=da(R),G=[],_=0;_<d.length;_++){var H=d[_],Y=_*2,q=H*2;O[Y]=u[q],O[Y+1]=u[q+1],E[Y]=h[q],E[Y+1]=h[q+1],N[Y]=f[q],N[Y+1]=f[q+1],V[Y]=v[q],V[Y+1]=v[q+1],G[_]=c[H]}return{current:O,next:E,stackedOnCurrent:N,stackedOnNext:V,status:G}}var Ai=Math.min,Mi=Math.max;function Yn(r,e){return isNaN(r)||isNaN(e)}function oy(r,e,t,a,i,n,o,s,l){for(var u,h,f,v,c,d,p=t,g=0;g<a;g++){var y=e[p*2],m=e[p*2+1];if(p>=i||p<0)break;if(Yn(y,m)){if(l){p+=n;continue}break}if(p===t)r[n>0?"moveTo":"lineTo"](y,m),f=y,v=m;else{var _=y-u,x=m-h;if(_*_+x*x<.5){p+=n;continue}if(o>0){for(var b=p+n,S=e[b*2],w=e[b*2+1];S===y&&w===m&&g<a;)g++,b+=n,p+=n,S=e[b*2],w=e[b*2+1],y=e[p*2],m=e[p*2+1],_=y-u,x=m-h;var T=g+1;if(l)for(;Yn(S,w)&&T<a;)T++,b+=n,S=e[b*2],w=e[b*2+1];var C=.5,A=0,D=0,I=void 0,L=void 0;if(T>=a||Yn(S,w))c=y,d=m;else{A=S-u,D=w-h;var P=y-u,k=S-y,R=m-h,O=w-m,E=void 0,N=void 0;if(s==="x"){E=Math.abs(P),N=Math.abs(k);var V=A>0?1:-1;c=y-V*E*o,d=m,I=y+V*N*o,L=m}else if(s==="y"){E=Math.abs(R),N=Math.abs(O);var G=D>0?1:-1;c=y,d=m-G*E*o,I=y,L=m+G*N*o}else E=Math.sqrt(P*P+R*R),N=Math.sqrt(k*k+O*O),C=N/(N+E),c=y-A*o*(1-C),d=m-D*o*(1-C),I=y+A*o*C,L=m+D*o*C,I=Ai(I,Mi(S,y)),L=Ai(L,Mi(w,m)),I=Mi(I,Ai(S,y)),L=Mi(L,Ai(w,m)),A=I-y,D=L-m,c=y-A*E/N,d=m-D*E/N,c=Ai(c,Mi(u,y)),d=Ai(d,Mi(h,m)),c=Mi(c,Ai(u,y)),d=Mi(d,Ai(h,m)),A=y-c,D=m-d,I=y+A*N/E,L=m+D*N/E}r.bezierCurveTo(f,v,c,d,y,m),f=I,v=L}else r.lineTo(y,m)}u=y,h=m,p+=n}return g}var nA=function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r}(),S3=function(r){z(e,r);function e(t){var a=r.call(this,t)||this;return a.type="ec-polyline",a}return e.prototype.getDefaultStyle=function(){return{stroke:B.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new nA},e.prototype.buildPath=function(t,a){var i=a.points,n=0,o=i.length/2;if(a.connectNulls){for(;o>0&&Yn(i[o*2-2],i[o*2-1]);o--);for(;n<o&&Yn(i[n*2],i[n*2+1]);n++);}for(;n<o;)n+=oy(t,i,n,o,o,1,a.smooth,a.smoothMonotone,a.connectNulls)+1},e.prototype.getPointOn=function(t,a){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var i=this.path,n=i.data,o=la.CMD,s,l,u=a==="x",h=[],f=0;f<n.length;){var v=n[f++],c=void 0,d=void 0,p=void 0,g=void 0,y=void 0,m=void 0,_=void 0;switch(v){case o.M:s=n[f++],l=n[f++];break;case o.L:if(c=n[f++],d=n[f++],_=u?(t-s)/(c-s):(t-l)/(d-l),_<=1&&_>=0){var x=u?(d-l)*_+l:(c-s)*_+s;return u?[t,x]:[x,t]}s=c,l=d;break;case o.C:c=n[f++],d=n[f++],p=n[f++],g=n[f++],y=n[f++],m=n[f++];var b=u?Yu(s,c,p,y,t,h):Yu(l,d,g,m,t,h);if(b>0)for(var S=0;S<b;S++){var w=h[S];if(w<=1&&w>=0){var x=u?ge(l,d,g,m,w):ge(s,c,p,y,w);return u?[t,x]:[x,t]}}s=y,l=m;break}}},e}(bt),b3=function(r){z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e}(nA),oA=function(r){z(e,r);function e(t){var a=r.call(this,t)||this;return a.type="ec-polygon",a}return e.prototype.getDefaultShape=function(){return new b3},e.prototype.buildPath=function(t,a){var i=a.points,n=a.stackedOnPoints,o=0,s=i.length/2,l=a.smoothMonotone;if(a.connectNulls){for(;s>0&&Yn(i[s*2-2],i[s*2-1]);s--);for(;o<s&&Yn(i[o*2],i[o*2+1]);o++);}for(;o<s;){var u=oy(t,i,o,s,s,1,a.smooth,l,a.connectNulls);oy(t,n,o+u-1,u,s,-1,a.stackedOnSmooth,l,a.connectNulls),o+=u+1,t.closePath()}},e}(bt);function sA(r,e,t,a,i){var n=r.getArea(),o=n.x,s=n.y,l=n.width,u=n.height,h=t.get(["lineStyle","width"])||0;o-=h/2,s-=h/2,l+=h,u+=h,l=Math.ceil(l),o!==Math.floor(o)&&(o=Math.floor(o),l++);var f=new _t({shape:{x:o,y:s,width:l,height:u}});if(e){var v=r.getBaseAxis(),c=v.isHorizontal(),d=v.inverse;c?(d&&(f.shape.x+=l),f.shape.width=0):(d||(f.shape.y+=u),f.shape.height=0);var p=rt(i)?function(g){i(g,f)}:null;Yt(f,{shape:{width:l,height:u,x:o,y:s}},t,null,a,p)}return f}function lA(r,e,t){var a=r.getArea(),i=ne(a.r0,1),n=ne(a.r,1),o=new We({shape:{cx:ne(r.cx,1),cy:ne(r.cy,1),r0:i,r:n,startAngle:a.startAngle,endAngle:a.endAngle,clockwise:a.clockwise}});if(e){var s=r.getBaseAxis().dim==="angle";s?o.shape.endAngle=a.startAngle:o.shape.r=i,Yt(o,{shape:{endAngle:a.endAngle,r:n}},t)}return o}function Yl(r,e,t,a,i){if(r){if(r.type==="polar")return lA(r,e,t);if(r.type==="cartesian2d")return sA(r,e,t,a,i)}else return null;return null}function Di(r,e){return r.type===e}function uA(r,e){if(r.length===e.length){for(var t=0;t<r.length;t++)if(r[t]!==e[t])return;return!0}}function hA(r){for(var e=1/0,t=1/0,a=-1/0,i=-1/0,n=0;n<r.length;){var o=r[n++],s=r[n++];isNaN(o)||(e=Math.min(o,e),a=Math.max(o,a)),isNaN(s)||(t=Math.min(s,t),i=Math.max(s,i))}return[[e,t],[a,i]]}function fA(r,e){var t=hA(r),a=t[0],i=t[1],n=hA(e),o=n[0],s=n[1];return Math.max(Math.abs(a[0]-o[0]),Math.abs(a[1]-o[1]),Math.abs(i[0]-s[0]),Math.abs(i[1]-s[1]))}function vA(r){return Dt(r)?r:r?.5:0}function w3(r,e,t){if(!t.valueDim)return[];for(var a=e.count(),i=da(a*2),n=0;n<a;n++){var o=iA(t,r,e,n);i[n*2]=o[0],i[n*2+1]=o[1]}return i}function Li(r,e,t,a,i){var n=t.getBaseAxis(),o=n.dim==="x"||n.dim==="radius"?0:1,s=[],l=0,u=[],h=[],f=[],v=[];if(i){for(l=0;l<r.length;l+=2){var c=e||r;!isNaN(c[l])&&!isNaN(c[l+1])&&v.push(r[l],r[l+1])}r=v}for(l=0;l<r.length-2;l+=2)switch(f[0]=r[l+2],f[1]=r[l+3],h[0]=r[l],h[1]=r[l+1],s.push(h[0],h[1]),a){case"end":u[o]=f[o],u[1-o]=h[1-o],s.push(u[0],u[1]);break;case"middle":var d=(h[o]+f[o])/2,p=[];u[o]=p[o]=d,u[1-o]=h[1-o],p[1-o]=f[1-o],s.push(u[0],u[1]),s.push(p[0],p[1]);break;default:u[o]=h[o],u[1-o]=f[1-o],s.push(u[0],u[1])}return s.push(r[l++],r[l++]),s}function T3(r,e){var t=[],a=r.length,i,n;function o(h,f,v){var c=h.coord,d=(v-c)/(f.coord-c),p=RR(d,[h.color,f.color]);return{coord:v,color:p}}for(var s=0;s<a;s++){var l=r[s],u=l.coord;if(u<0)i=l;else if(u>e){n?t.push(o(n,l,e)):i&&t.push(o(i,l,0),o(i,l,e));break}else i&&(t.push(o(i,l,0)),i=null),t.push(l),n=l}return t}function C3(r,e,t){var a=r.getVisual("visualMeta");if(!(!a||!a.length||!r.count())&&e.type==="cartesian2d"){for(var i,n,o=a.length-1;o>=0;o--){var s=r.getDimensionInfo(a[o].dimension);if(i=s&&s.coordDim,i==="x"||i==="y"){n=a[o];break}}if(n){var l=e.getAxis(i),u=U(n.stops,function(_){return{coord:l.toGlobalCoord(l.dataToCoord(_.value)),color:_.color}}),h=u.length,f=n.outerColors.slice();h&&u[0].coord>u[h-1].coord&&(u.reverse(),f.reverse());var v=T3(u,i==="x"?t.getWidth():t.getHeight()),c=v.length;if(!c&&h)return u[0].coord<0?f[1]?f[1]:u[h-1].color:f[0]?f[0]:u[0].color;var d=10,p=v[0].coord-d,g=v[c-1].coord+d,y=g-p;if(y<.001)return"transparent";M(v,function(_){_.offset=(_.coord-p)/y}),v.push({offset:c?v[c-1].offset:.5,color:f[1]||"transparent"}),v.unshift({offset:c?v[0].offset:.5,color:f[0]||"transparent"});var m=new Po(0,0,0,0,v,!0);return m[i]=p,m[i+"2"]=g,m}}}function A3(r,e,t){var a=r.get("showAllSymbol"),i=a==="auto";if(!(a&&!i)){var n=t.getAxesByScale("ordinal")[0];if(n&&!(i&&M3(n,e))){var o=e.mapDimension(n.dim),s={};return M(n.getViewLabels(),function(l){var u=n.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(e.get(o,l))}}}}function M3(r,e){var t=r.getExtent(),a=Math.abs(t[1]-t[0])/r.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(Wl.getSymbolSize(e,o)[r.isHorizontal()?1:0]*1.5>a)return!1;return!0}function D3(r,e){return isNaN(r)||isNaN(e)}function L3(r){for(var e=r.length/2;e>0&&D3(r[e*2-2],r[e*2-1]);e--);return e-1}function cA(r,e){return[r[e*2],r[e*2+1]]}function I3(r,e,t){for(var a=r.length/2,i=t==="x"?0:1,n,o,s=0,l=-1,u=0;u<a;u++)if(o=r[u*2+i],!(isNaN(o)||isNaN(r[u*2+1-i]))){if(u===0){n=o;continue}if(n<=e&&o>=e||n>=e&&o<=e){l=u;break}s=u,n=o}return{range:[s,l],t:(e-n)/(o-n)}}function dA(r){if(r.get(["endLabel","show"]))return!0;for(var e=0;e<He.length;e++)if(r.get([He[e],"endLabel","show"]))return!0;return!1}function sy(r,e,t,a){if(Di(e,"cartesian2d")){var i=a.getModel("endLabel"),n=i.get("valueAnimation"),o=a.getData(),s={lastFrameIndex:0},l=dA(a)?function(c,d){r._endLabelOnDuring(c,d,o,s,n,i,e)}:null,u=e.getBaseAxis().isHorizontal(),h=sA(e,t,a,function(){var c=r._endLabel;c&&t&&s.originalX!=null&&c.attr({x:s.originalX,y:s.originalY})},l);if(!a.get("clip",!0)){var f=h.shape,v=Math.max(f.width,f.height);u?(f.y-=v,f.height+=v*2):(f.x-=v,f.width+=v*2)}return l&&l(1,h),h}else return lA(e,t,a)}function P3(r,e){var t=e.getBaseAxis(),a=t.isHorizontal(),i=t.inverse,n=a?i?"right":"left":"center",o=a?"middle":i?"top":"bottom";return{normal:{align:r.get("align")||n,verticalAlign:r.get("verticalAlign")||o}}}var k3=function(r){z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(){var t=new et,a=new Ul;this.group.add(a.group),this._symbolDraw=a,this._lineGroup=t,this._changePolyState=X(this._changePolyState,this)},e.prototype.render=function(t,a,i){var n=t.coordinateSystem,o=this.group,s=t.getData(),l=t.getModel("lineStyle"),u=t.getModel("areaStyle"),h=s.getLayout("points")||[],f=n.type==="polar",v=this._coordSys,c=this._symbolDraw,d=this._polyline,p=this._polygon,g=this._lineGroup,y=!a.ssr&&t.get("animation"),m=!u.isEmpty(),_=u.get("origin"),x=aA(n,s,_),b=m&&w3(n,s,x),S=t.get("showSymbol"),w=t.get("connectNulls"),T=S&&!f&&A3(t,s,n),C=this._data;C&&C.eachItemGraphicEl(function(it,xt){it.__temp&&(o.remove(it),C.setItemGraphicEl(xt,null))}),S||c.remove(),o.add(g);var A=f?!1:t.get("step"),D;n&&n.getArea&&t.get("clip",!0)&&(D=n.getArea(),D.width!=null?(D.x-=.1,D.y-=.1,D.width+=.2,D.height+=.2):D.r0&&(D.r0-=.5,D.r+=.5)),this._clipShapeForSymbol=D;var I=C3(s,n,i)||s.getVisual("style")[s.getVisual("drawType")];if(!(d&&v.type===n.type&&A===this._step))S&&c.updateData(s,{isIgnore:T,clipShape:D,disableAnimation:!0,getSymbolPoint:function(it){return[h[it*2],h[it*2+1]]}}),y&&this._initSymbolLabelAnimation(s,n,D),A&&(b&&(b=Li(b,h,n,A,w)),h=Li(h,null,n,A,w)),d=this._newPolyline(h),m?p=this._newPolygon(h,b):p&&(g.remove(p),p=this._polygon=null),f||this._initOrUpdateEndLabel(t,n,wn(I)),g.setClipPath(sy(this,n,!0,t));else{m&&!p?p=this._newPolygon(h,b):p&&!m&&(g.remove(p),p=this._polygon=null),f||this._initOrUpdateEndLabel(t,n,wn(I));var L=g.getClipPath();if(L){var P=sy(this,n,!1,t);Yt(L,{shape:P.shape},t)}else g.setClipPath(sy(this,n,!0,t));S&&c.updateData(s,{isIgnore:T,clipShape:D,disableAnimation:!0,getSymbolPoint:function(it){return[h[it*2],h[it*2+1]]}}),(!uA(this._stackedOnPoints,b)||!uA(this._points,h))&&(y?this._doUpdateAnimation(s,b,n,i,A,_,w):(A&&(b&&(b=Li(b,h,n,A,w)),h=Li(h,null,n,A,w)),d.setShape({points:h}),p&&p.setShape({points:h,stackedOnPoints:b})))}var k=t.getModel("emphasis"),R=k.get("focus"),O=k.get("blurScope"),E=k.get("disabled");if(d.useStyle(st(l.getLineStyle(),{fill:"none",stroke:I,lineJoin:"bevel"})),ve(d,t,"lineStyle"),d.style.lineWidth>0&&t.get(["emphasis","lineStyle","width"])==="bolder"){var N=d.getState("emphasis").style;N.lineWidth=+d.style.lineWidth+1}vt(d).seriesIndex=t.seriesIndex,Xt(d,R,O,E);var V=vA(t.get("smooth")),G=t.get("smoothMonotone");if(d.setShape({smooth:V,smoothMonotone:G,connectNulls:w}),p){var H=s.getCalculationInfo("stackedOnSeries"),Y=0;p.useStyle(st(u.getAreaStyle(),{fill:I,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),H&&(Y=vA(H.get("smooth"))),p.setShape({smooth:V,stackedOnSmooth:Y,smoothMonotone:G,connectNulls:w}),ve(p,t,"areaStyle"),vt(p).seriesIndex=t.seriesIndex,Xt(p,R,O,E)}var q=this._changePolyState;s.eachItemGraphicEl(function(it){it&&(it.onHoverStateChange=q)}),this._polyline.onHoverStateChange=q,this._data=s,this._coordSys=n,this._stackedOnPoints=b,this._points=h,this._step=A,this._valueOrigin=_,t.get("triggerLineEvent")&&(this.packEventData(t,d),p&&this.packEventData(t,p))},e.prototype.packEventData=function(t,a){vt(a).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},e.prototype.highlight=function(t,a,i,n){var o=t.getData(),s=en(o,n);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var h=l[s*2],f=l[s*2+1];if(isNaN(h)||isNaN(f)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(h,f))return;var v=t.get("zlevel")||0,c=t.get("z")||0;u=new Wl(o,s),u.x=h,u.y=f,u.setZ(v,c);var d=u.getSymbolPath().getTextContent();d&&(d.zlevel=v,d.z=c,d.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else zt.prototype.highlight.call(this,t,a,i,n)},e.prototype.downplay=function(t,a,i,n){var o=t.getData(),s=en(o,n);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else zt.prototype.downplay.call(this,t,a,i,n)},e.prototype._changePolyState=function(t){var a=this._polygon;Dh(this._polyline,t),a&&Dh(a,t)},e.prototype._newPolyline=function(t){var a=this._polyline;return a&&this._lineGroup.remove(a),a=new S3({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(a),this._polyline=a,a},e.prototype._newPolygon=function(t,a){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new oA({shape:{points:t,stackedOnPoints:a},segmentIgnoreThreshold:2}),this._lineGroup.add(i),this._polygon=i,i},e.prototype._initSymbolLabelAnimation=function(t,a,i){var n,o,s=a.getBaseAxis(),l=s.inverse;a.type==="cartesian2d"?(n=s.isHorizontal(),o=!1):a.type==="polar"&&(n=s.dim==="angle",o=!0);var u=t.hostModel,h=u.get("animationDuration");rt(h)&&(h=h(null));var f=u.get("animationDelay")||0,v=rt(f)?f(null):f;t.eachItemGraphicEl(function(c,d){var p=c;if(p){var g=[c.x,c.y],y=void 0,m=void 0,_=void 0;if(i)if(o){var x=i,b=a.pointToCoord(g);n?(y=x.startAngle,m=x.endAngle,_=-b[1]/180*Math.PI):(y=x.r0,m=x.r,_=b[0])}else{var S=i;n?(y=S.x,m=S.x+S.width,_=c.x):(y=S.y+S.height,m=S.y,_=c.y)}var w=m===y?0:(_-y)/(m-y);l&&(w=1-w);var T=rt(f)?f(d):h*w+v,C=p.getSymbolPath(),A=C.getTextContent();p.attr({scaleX:0,scaleY:0}),p.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:T}),A&&A.animateFrom({style:{opacity:0}},{duration:300,delay:T}),C.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(t,a,i){var n=t.getModel("endLabel");if(dA(t)){var o=t.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new Lt({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var h=L3(l);h>=0&&(ye(s,ce(t,"endLabel"),{inheritColor:i,labelFetcher:t,labelDataIndex:h,defaultText:function(f,v,c){return c!=null?tA(o,c):ns(o,f)},enableTextSetter:!0},P3(n,a)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,a,i,n,o,s,l){var u=this._endLabel,h=this._polyline;if(u){t<1&&n.originalX==null&&(n.originalX=u.x,n.originalY=u.y);var f=i.getLayout("points"),v=i.hostModel,c=v.get("connectNulls"),d=s.get("precision"),p=s.get("distance")||0,g=l.getBaseAxis(),y=g.isHorizontal(),m=g.inverse,_=a.shape,x=m?y?_.x:_.y+_.height:y?_.x+_.width:_.y,b=(y?p:0)*(m?-1:1),S=(y?0:-p)*(m?-1:1),w=y?"x":"y",T=I3(f,x,w),C=T.range,A=C[1]-C[0],D=void 0;if(A>=1){if(A>1&&!c){var I=cA(f,C[0]);u.attr({x:I[0]+b,y:I[1]+S}),o&&(D=v.getRawValue(C[0]))}else{var I=h.getPointOn(x,w);I&&u.attr({x:I[0]+b,y:I[1]+S});var L=v.getRawValue(C[0]),P=v.getRawValue(C[1]);o&&(D=K1(i,d,L,P,T.t))}n.lastFrameIndex=C[0]}else{var k=t===1||n.lastFrameIndex>0?C[0]:0,I=cA(f,k);o&&(D=v.getRawValue(k)),u.attr({x:I[0]+b,y:I[1]+S})}if(o){var R=Oo(u);typeof R.setLabelText=="function"&&R.setLabelText(D)}}},e.prototype._doUpdateAnimation=function(t,a,i,n,o,s,l){var u=this._polyline,h=this._polygon,f=t.hostModel,v=x3(this._data,t,this._stackedOnPoints,a,this._coordSys,i,this._valueOrigin),c=v.current,d=v.stackedOnCurrent,p=v.next,g=v.stackedOnNext;if(o&&(d=Li(v.stackedOnCurrent,v.current,i,o,l),c=Li(v.current,null,i,o,l),g=Li(v.stackedOnNext,v.next,i,o,l),p=Li(v.next,null,i,o,l)),fA(c,p)>3e3||h&&fA(d,g)>3e3){u.stopAnimation(),u.setShape({points:p}),h&&(h.stopAnimation(),h.setShape({points:p,stackedOnPoints:g}));return}u.shape.__points=v.current,u.shape.points=c;var y={shape:{points:p}};v.current!==c&&(y.shape.__points=v.next),u.stopAnimation(),It(u,y,f),h&&(h.setShape({points:c,stackedOnPoints:d}),h.stopAnimation(),It(h,{shape:{stackedOnPoints:g}},f),u.shape.points!==h.shape.points&&(h.shape.points=u.shape.points));for(var m=[],_=v.status,x=0;x<_.length;x++){var b=_[x].cmd;if(b==="="){var S=t.getItemGraphicEl(_[x].idx1);S&&m.push({el:S,ptIdx:x})}}u.animators&&u.animators.length&&u.animators[0].during(function(){h&&h.dirtyShape();for(var w=u.shape.__points,T=0;T<m.length;T++){var C=m[T].el,A=m[T].ptIdx*2;C.x=w[A],C.y=w[A+1],C.markRedraw()}})},e.prototype.remove=function(t){var a=this.group,i=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),i&&i.eachItemGraphicEl(function(n,o){n.__temp&&(a.remove(n),i.setItemGraphicEl(o,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},e.type="line",e}(zt);function Zl(r,e){return{seriesType:r,plan:Uo(),reset:function(t){var a=t.getData(),i=t.coordinateSystem,n=t.pipelineContext,o=e||n.large;if(i){var s=U(i.dimensions,function(c){return a.mapDimension(c)}).slice(0,2),l=s.length,u=a.getCalculationInfo("stackResultDimension");wi(a,s[0])&&(s[0]=u),wi(a,s[1])&&(s[1]=u);var h=a.getStore(),f=a.getDimensionIndex(s[0]),v=a.getDimensionIndex(s[1]);return l&&{progress:function(c,d){for(var p=c.end-c.start,g=o&&da(p*l),y=[],m=[],_=c.start,x=0;_<c.end;_++){var b=void 0;if(l===1){var S=h.get(f,_);b=i.dataToPoint(S,null,m)}else y[0]=h.get(f,_),y[1]=h.get(v,_),b=i.dataToPoint(y,null,m);o?(g[x++]=b[0],g[x++]=b[1]):d.setItemLayout(_,b.slice())}o&&d.setLayout("points",g)}}}}}}var R3={average:function(r){for(var e=0,t=0,a=0;a<r.length;a++)isNaN(r[a])||(e+=r[a],t++);return t===0?NaN:e/t},sum:function(r){for(var e=0,t=0;t<r.length;t++)e+=r[t]||0;return e},max:function(r){for(var e=-1/0,t=0;t<r.length;t++)r[t]>e&&(e=r[t]);return isFinite(e)?e:NaN},min:function(r){for(var e=1/0,t=0;t<r.length;t++)r[t]<e&&(e=r[t]);return isFinite(e)?e:NaN},nearest:function(r){return r[0]}},E3=function(r){return Math.round(r.length/2)};function pA(r){return{seriesType:r,reset:function(e,t,a){var i=e.getData(),n=e.get("sampling"),o=e.coordinateSystem,s=i.count();if(s>10&&o.type==="cartesian2d"&&n){var l=o.getBaseAxis(),u=o.getOtherAxis(l),h=l.getExtent(),f=a.getDevicePixelRatio(),v=Math.abs(h[1]-h[0])*(f||1),c=Math.round(s/v);if(isFinite(c)&&c>1){n==="lttb"?e.setData(i.lttbDownSample(i.mapDimension(u.dim),1/c)):n==="minmax"&&e.setData(i.minmaxDownSample(i.mapDimension(u.dim),1/c));var d=void 0;$(n)?d=R3[n]:rt(n)&&(d=n),d&&e.setData(i.downSample(i.mapDimension(u.dim),1/c,d,E3))}}}}}function O3(r){r.registerChartView(k3),r.registerSeriesModel(g3),r.registerLayout(Zl("line",!0)),r.registerVisual({seriesType:"line",reset:function(e){var t=e.getData(),a=e.getModel("lineStyle").getLineStyle();a&&!a.stroke&&(a.stroke=t.getVisual("style").fill),t.setVisual("legendLineStyle",a)}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,pA("line"))}var $l=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,a){return Ha(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t,a,i){var n=this.coordinateSystem;if(n&&n.clampData){var o=n.clampData(t),s=n.dataToPoint(o);if(i)M(n.getAxes(),function(v,c){if(v.type==="category"&&a!=null){var d=v.getTicksCoords(),p=v.getTickModel().get("alignWithLabel"),g=o[c],y=a[c]==="x1"||a[c]==="y1";if(y&&!p&&(g+=1),d.length<2)return;if(d.length===2){s[c]=v.toGlobalCoord(v.getExtent()[y?1:0]);return}for(var m=void 0,_=void 0,x=1,b=0;b<d.length;b++){var S=d[b].coord,w=b===d.length-1?d[b-1].tickValue+x:d[b].tickValue;if(w===g){_=S;break}else if(w<g)m=S;else if(m!=null&&w>g){_=(S+m)/2;break}b===1&&(x=w-d[0].tickValue)}_==null&&(m?m&&(_=d[d.length-1].coord):_=d[0].coord),s[c]=v.toGlobalCoord(_)}});else{var l=this.getData(),u=l.getLayout("offset"),h=l.getLayout("size"),f=n.getBaseAxis().isHorizontal()?0:1;s[f]+=u+h/2}return s}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",defaultBarGap:"10%"},e}(Ht);Ht.registerClass($l);var N3=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(){return Ha(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},e.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),a=this.get("largeThreshold");return a>t&&(t=a),t},e.prototype.brushSelector=function(t,a,i){return i.rect(a.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=yi($l.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},select:{itemStyle:{borderColor:B.color.primary,borderWidth:2}},realtimeSort:!1}),e}($l),B3=function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return r}(),Yf=function(r){z(e,r);function e(t){var a=r.call(this,t)||this;return a.type="sausage",a}return e.prototype.getDefaultShape=function(){return new B3},e.prototype.buildPath=function(t,a){var i=a.cx,n=a.cy,o=Math.max(a.r0||0,0),s=Math.max(a.r,0),l=(s-o)*.5,u=o+l,h=a.startAngle,f=a.endAngle,v=a.clockwise,c=Math.PI*2,d=v?f-h<c:h-f<c;d||(h=f-(v?c:-c));var p=Math.cos(h),g=Math.sin(h),y=Math.cos(f),m=Math.sin(f);d?(t.moveTo(p*o+i,g*o+n),t.arc(p*u+i,g*u+n,l,-Math.PI+h,h,!v)):t.moveTo(p*s+i,g*s+n),t.arc(i,n,s,h,f,!v),t.arc(y*u+i,m*u+n,l,f-Math.PI*2,f-Math.PI,!v),o!==0&&t.arc(i,n,o,f,h,v)},e}(bt);function z3(r,e){e=e||{};var t=e.isRoundCap;return function(a,i,n){var o=i.position;if(!o||o instanceof Array)return lh(a,i,n);var s=r(o),l=i.distance!=null?i.distance:5,u=this.shape,h=u.cx,f=u.cy,v=u.r,c=u.r0,d=(v+c)/2,p=u.startAngle,g=u.endAngle,y=(p+g)/2,m=t?Math.abs(v-c)/2:0,_=Math.cos,x=Math.sin,b=h+v*_(p),S=f+v*x(p),w="left",T="top";switch(s){case"startArc":b=h+(c-l)*_(y),S=f+(c-l)*x(y),w="center",T="top";break;case"insideStartArc":b=h+(c+l)*_(y),S=f+(c+l)*x(y),w="center",T="bottom";break;case"startAngle":b=h+d*_(p)+Zf(p,l+m,!1),S=f+d*x(p)+$f(p,l+m,!1),w="right",T="middle";break;case"insideStartAngle":b=h+d*_(p)+Zf(p,-l+m,!1),S=f+d*x(p)+$f(p,-l+m,!1),w="left",T="middle";break;case"middle":b=h+d*_(y),S=f+d*x(y),w="center",T="middle";break;case"endArc":b=h+(v+l)*_(y),S=f+(v+l)*x(y),w="center",T="bottom";break;case"insideEndArc":b=h+(v-l)*_(y),S=f+(v-l)*x(y),w="center",T="top";break;case"endAngle":b=h+d*_(g)+Zf(g,l+m,!0),S=f+d*x(g)+$f(g,l+m,!0),w="left",T="middle";break;case"insideEndAngle":b=h+d*_(g)+Zf(g,-l+m,!0),S=f+d*x(g)+$f(g,-l+m,!0),w="right",T="middle";break;default:return lh(a,i,n)}return a=a||{},a.x=b,a.y=S,a.align=w,a.verticalAlign=T,a}}function V3(r,e,t,a){if(Dt(a)){r.setTextConfig({rotation:a});return}else if(W(e)){r.setTextConfig({rotation:0});return}var i=r.shape,n=i.clockwise?i.startAngle:i.endAngle,o=i.clockwise?i.endAngle:i.startAngle,s=(n+o)/2,l,u=t(e);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":l=s;break;case"startAngle":case"insideStartAngle":l=n;break;case"endAngle":case"insideEndAngle":l=o;break;default:r.setTextConfig({rotation:0});return}var h=Math.PI*1.5-l;u==="middle"&&h>Math.PI/2&&h<Math.PI*1.5&&(h-=Math.PI),r.setTextConfig({rotation:h})}function Zf(r,e,t){return e*Math.sin(r)*(t?-1:1)}function $f(r,e,t){return e*Math.cos(r)*(t?1:-1)}function _a(r,e,t){var a=r.get("borderRadius");if(a==null)return t?{cornerRadius:0}:null;W(a)||(a=[a,a,a,a]);var i=Math.abs(e.r||0-e.r0||0);return{cornerRadius:U(a,function(n){return Nr(n,i)})}}var ly=Math.max,uy=Math.min;function G3(r,e){var t=r.getArea&&r.getArea();if(Di(r,"cartesian2d")){var a=r.getBaseAxis();if(a.type!=="category"||!a.onBand){var i=e.getLayout("bandWidth");a.isHorizontal()?(t.x-=i,t.width+=i*2):(t.y-=i,t.height+=i*2)}}return t}var F3=function(r){z(e,r);function e(){var t=r.call(this)||this;return t.type=e.type,t._isFirstFrame=!0,t}return e.prototype.render=function(t,a,i,n){this._model=t,this._removeOnRenderedListener(i),this._updateDrawMode(t);var o=t.get("coordinateSystem");(o==="cartesian2d"||o==="polar")&&(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(t,a,i):this._renderNormal(t,a,i,n))},e.prototype.incrementalPrepareRender=function(t){this._clear(),this._updateDrawMode(t),this._updateLargeClip(t)},e.prototype.incrementalRender=function(t,a){this._progressiveEls=[],this._incrementalRenderLarge(t,a)},e.prototype.eachRendered=function(t){gi(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var a=t.pipelineContext.large;(this._isLargeDraw==null||a!==this._isLargeDraw)&&(this._isLargeDraw=a,this._clear())},e.prototype._renderNormal=function(t,a,i,n){var o=this.group,s=t.getData(),l=this._data,u=t.coordinateSystem,h=u.getBaseAxis(),f;u.type==="cartesian2d"?f=h.isHorizontal():u.type==="polar"&&(f=h.dim==="angle");var v=t.isAnimationEnabled()?t:null,c=H3(t,u);c&&this._enableRealtimeSort(c,s,i);var d=t.get("clip",!0)||c,p=G3(u,s);o.removeClipPath();var g=t.get("roundCap",!0),y=t.get("showBackground",!0),m=t.getModel("backgroundStyle"),_=m.get("borderRadius")||0,x=[],b=this._backgroundEls,S=n&&n.isInitSort,w=n&&n.type==="changeAxisOrder";function T(D){var I=Xf[u.type](s,D);if(!I)return null;var L=q3(u,f,I);return L.useStyle(m.getItemStyle()),u.type==="cartesian2d"?L.setShape("r",_):L.setShape("cornerRadius",_),x[D]=L,L}s.diff(l).add(function(D){var I=s.getItemModel(D),L=Xf[u.type](s,D,I);if(L&&(y&&T(D),!(!s.hasValue(D)||!xA[u.type](L)))){var P=!1;d&&(P=gA[u.type](p,L));var k=yA[u.type](t,s,D,L,f,v,h.model,!1,g);c&&(k.forceLabelAnimation=!0),bA(k,s,D,I,L,t,f,u.type==="polar"),S?k.attr({shape:L}):c?mA(c,v,k,L,D,f,!1,!1):Yt(k,{shape:L},t,D),s.setItemGraphicEl(D,k),o.add(k),k.ignore=P}}).update(function(D,I){var L=s.getItemModel(D),P=Xf[u.type](s,D,L);if(P){if(y){var k=void 0;b.length===0?k=T(I):(k=b[I],k.useStyle(m.getItemStyle()),u.type==="cartesian2d"?k.setShape("r",_):k.setShape("cornerRadius",_),x[D]=k);var R=Xf[u.type](s,D),O=AA(f,R,u);It(k,{shape:O},v,D)}var E=l.getItemGraphicEl(I);if(!s.hasValue(D)||!xA[u.type](P)){o.remove(E);return}var N=!1;d&&(N=gA[u.type](p,P),N&&o.remove(E));var V=E&&(E.type==="sector"&&g||E.type==="sausage"&&!g);if(V&&(E&&Ba(E,t,I),E=null),E?br(E):E=yA[u.type](t,s,D,P,f,v,h.model,!0,g),c&&(E.forceLabelAnimation=!0),w){var G=E.getTextContent();if(G){var H=Oo(G);H.prevValue!=null&&(H.prevValue=H.value)}}else bA(E,s,D,L,P,t,f,u.type==="polar");S?E.attr({shape:P}):c?mA(c,v,E,P,D,f,!0,w):It(E,{shape:P},t,D,null),s.setItemGraphicEl(D,E),E.ignore=N,o.add(E)}}).remove(function(D){var I=l.getItemGraphicEl(D);I&&Ba(I,t,D)}).execute();var C=this._backgroundGroup||(this._backgroundGroup=new et);C.removeAll();for(var A=0;A<x.length;++A)C.add(x[A]);o.add(C),this._backgroundEls=x,this._data=s},e.prototype._renderLarge=function(t,a,i){this._clear(),TA(t,this.group),this._updateLargeClip(t)},e.prototype._incrementalRenderLarge=function(t,a){this._removeBackground(),TA(a,this.group,this._progressiveEls,!0)},e.prototype._updateLargeClip=function(t){var a=t.get("clip",!0)&&Yl(t.coordinateSystem,!1,t),i=this.group;a?i.setClipPath(a):i.removeClipPath()},e.prototype._enableRealtimeSort=function(t,a,i){var n=this;if(a.count()){var o=t.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(a,t,i),this._isFirstFrame=!1;else{var s=function(l){var u=a.getItemGraphicEl(l),h=u&&u.shape;return h&&Math.abs(o.isHorizontal()?h.height:h.width)||0};this._onRendered=function(){n._updateSortWithinSameData(a,s,o,i)},i.getZr().on("rendered",this._onRendered)}}},e.prototype._dataSort=function(t,a,i){var n=[];return t.each(t.mapDimension(a.dim),function(o,s){var l=i(s);l=l??NaN,n.push({dataIndex:s,mappedValue:l,ordinalNumber:o})}),n.sort(function(o,s){return s.mappedValue-o.mappedValue}),{ordinalNumbers:U(n,function(o){return o.ordinalNumber})}},e.prototype._isOrderChangedWithinSameData=function(t,a,i){for(var n=i.scale,o=t.mapDimension(i.dim),s=Number.MAX_VALUE,l=0,u=n.getOrdinalMeta().categories.length;l<u;++l){var h=t.rawIndexOf(o,n.getRawOrdinalNumber(l)),f=h<0?Number.MIN_VALUE:a(t.indexOfRawIndex(h));if(f>s)return!0;s=f}return!1},e.prototype._isOrderDifferentInView=function(t,a){for(var i=a.scale,n=i.getExtent(),o=Math.max(0,n[0]),s=Math.min(n[1],i.getOrdinalMeta().categories.length-1);o<=s;++o)if(t.ordinalNumbers[o]!==i.getRawOrdinalNumber(o))return!0},e.prototype._updateSortWithinSameData=function(t,a,i,n){if(this._isOrderChangedWithinSameData(t,a,i)){var o=this._dataSort(t,i,a);this._isOrderDifferentInView(o,i)&&(this._removeOnRenderedListener(n),n.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",axisId:i.index,sortInfo:o}))}},e.prototype._dispatchInitSort=function(t,a,i){var n=a.baseAxis,o=this._dataSort(t,n,function(s){return t.get(t.mapDimension(a.otherAxis.dim),s)});i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",isInitSort:!0,axisId:n.index,sortInfo:o})},e.prototype.remove=function(t,a){this._clear(this._model),this._removeOnRenderedListener(a)},e.prototype.dispose=function(t,a){this._removeOnRenderedListener(a)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var a=this.group,i=this._data;t&&t.isAnimationEnabled()&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl(function(n){Ba(n,t,vt(n).dataIndex)})):a.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(zt),gA={cartesian2d:function(r,e){var t=e.width<0?-1:1,a=e.height<0?-1:1;t<0&&(e.x+=e.width,e.width=-e.width),a<0&&(e.y+=e.height,e.height=-e.height);var i=r.x+r.width,n=r.y+r.height,o=ly(e.x,r.x),s=uy(e.x+e.width,i),l=ly(e.y,r.y),u=uy(e.y+e.height,n),h=s<o,f=u<l;return e.x=h&&o>i?s:o,e.y=f&&l>n?u:l,e.width=h?0:s-o,e.height=f?0:u-l,t<0&&(e.x+=e.width,e.width=-e.width),a<0&&(e.y+=e.height,e.height=-e.height),h||f},polar:function(r,e){var t=e.r0<=e.r?1:-1;if(t<0){var a=e.r;e.r=e.r0,e.r0=a}var i=uy(e.r,r.r),n=ly(e.r0,r.r0);e.r=i,e.r0=n;var o=i-n<0;if(t<0){var a=e.r;e.r=e.r0,e.r0=a}return o}},yA={cartesian2d:function(r,e,t,a,i,n,o,s,l){var u=new _t({shape:F({},a),z2:1});if(u.__dataIndex=t,u.name="item",n){var h=u.shape,f=i?"height":"width";h[f]=0}return u},polar:function(r,e,t,a,i,n,o,s,l){var u=!i&&l?Yf:We,h=new u({shape:a,z2:1});h.name="item";var f=SA(i);if(h.calculateTextPosition=z3(f,{isRoundCap:u===Yf}),n){var v=h.shape,c=i?"r":"endAngle",d={};v[c]=i?a.r0:a.startAngle,d[c]=a[c],(s?It:Yt)(h,{shape:d},n)}return h}};function H3(r,e){var t=r.get("realtimeSort",!0),a=e.getBaseAxis();if(t&&a.type==="category"&&e.type==="cartesian2d")return{baseAxis:a,otherAxis:e.getOtherAxis(a)}}function mA(r,e,t,a,i,n,o,s){var l,u;n?(u={x:a.x,width:a.width},l={y:a.y,height:a.height}):(u={y:a.y,height:a.height},l={x:a.x,width:a.width}),s||(o?It:Yt)(t,{shape:l},e,i,null);var h=e?r.baseAxis.model:null;(o?It:Yt)(t,{shape:u},h,i)}function _A(r,e){for(var t=0;t<e.length;t++)if(!isFinite(r[e[t]]))return!0;return!1}var W3=["x","y","width","height"],U3=["cx","cy","r","startAngle","endAngle"],xA={cartesian2d:function(r){return!_A(r,W3)},polar:function(r){return!_A(r,U3)}},Xf={cartesian2d:function(r,e,t){var a=r.getItemLayout(e);if(!a)return null;var i=t?Z3(t,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(r,e,t){var a=r.getItemLayout(e);return{cx:a.cx,cy:a.cy,r0:a.r0,r:a.r,startAngle:a.startAngle,endAngle:a.endAngle,clockwise:a.clockwise}}};function Y3(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function SA(r){return function(e){var t=e?"Arc":"Angle";return function(a){switch(a){case"start":case"insideStart":case"end":case"insideEnd":return a+t;default:return a}}}(r)}function bA(r,e,t,a,i,n,o,s){var l=e.getItemVisual(t,"style");if(s){if(!n.get("roundCap")){var h=r.shape,f=_a(a.getModel("itemStyle"),h,!0);F(h,f),r.setShape(h)}}else{var u=a.get(["itemStyle","borderRadius"])||0;r.setShape("r",u)}r.useStyle(l);var v=a.getShallow("cursor");v&&r.attr("cursor",v);var c=s?o?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":o?i.height>=0?"bottom":"top":i.width>=0?"right":"left",d=ce(a);ye(r,d,{labelFetcher:n,labelDataIndex:t,defaultText:ns(n.getData(),t),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:c});var p=r.getTextContent();if(s&&p){var g=a.get(["label","position"]);r.textConfig.inside=g==="middle"?!0:null,V3(r,g==="outside"?c:g,SA(o),a.get(["label","rotate"]))}OS(p,d,n.getRawValue(t),function(m){return tA(e,m)});var y=a.getModel(["emphasis"]);Xt(r,y.get("focus"),y.get("blurScope"),y.get("disabled")),ve(r,a),Y3(i)&&(r.style.fill="none",r.style.stroke="none",M(r.states,function(m){m.style&&(m.style.fill=m.style.stroke="none")}))}function Z3(r,e){var t=r.get(["itemStyle","borderColor"]);if(!t||t==="none")return 0;var a=r.get(["itemStyle","borderWidth"])||0,i=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),n=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(a,i,n)}var $3=function(){function r(){}return r}(),wA=function(r){z(e,r);function e(t){var a=r.call(this,t)||this;return a.type="largeBar",a}return e.prototype.getDefaultShape=function(){return new $3},e.prototype.buildPath=function(t,a){for(var i=a.points,n=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,h=0;h<i.length;h+=3)l[n]=u,l[o]=i[h+2],s[n]=i[h+n],s[o]=i[h+o],t.rect(s[0],s[1],l[0],l[1])},e}(bt);function TA(r,e,t,a){var i=r.getData(),n=i.getLayout("valueAxisHorizontal")?1:0,o=i.getLayout("largeDataIndices"),s=i.getLayout("size"),l=r.getModel("backgroundStyle"),u=i.getLayout("largeBackgroundPoints");if(u){var h=new wA({shape:{points:u},incremental:!!a,silent:!0,z2:0});h.baseDimIdx=n,h.largeDataIndices=o,h.barWidth=s,h.useStyle(l.getItemStyle()),e.add(h),t&&t.push(h)}var f=new wA({shape:{points:i.getLayout("largePoints")},incremental:!!a,ignoreCoarsePointer:!0,z2:1});f.baseDimIdx=n,f.largeDataIndices=o,f.barWidth=s,e.add(f),f.useStyle(i.getVisual("style")),f.style.stroke=null,vt(f).seriesIndex=r.seriesIndex,r.get("silent")||(f.on("mousedown",CA),f.on("mousemove",CA)),t&&t.push(f)}var CA=Jp(function(r){var e=this,t=X3(e,r.offsetX,r.offsetY);vt(e).dataIndex=t>=0?t:null},30,!1);function X3(r,e,t){for(var a=r.baseDimIdx,i=1-a,n=r.shape.points,o=r.largeDataIndices,s=[],l=[],u=r.barWidth,h=0,f=n.length/3;h<f;h++){var v=h*3;if(l[a]=u,l[i]=n[v+2],s[a]=n[v+a],s[i]=n[v+i],l[i]<0&&(s[i]+=l[i],l[i]=-l[i]),e>=s[0]&&e<=s[0]+l[0]&&t>=s[1]&&t<=s[1]+l[1])return o[h]}return-1}function AA(r,e,t){if(Di(t,"cartesian2d")){var a=e,i=t.getArea();return{x:r?a.x:i.x,y:r?i.y:a.y,width:r?a.width:i.width,height:r?i.height:a.height}}else{var i=t.getArea(),n=e;return{cx:i.cx,cy:i.cy,r0:r?i.r0:n.r0,r:r?i.r:n.r,startAngle:r?n.startAngle:0,endAngle:r?n.endAngle:Math.PI*2}}}function q3(r,e,t){var a=r.type==="polar"?We:_t;return new a({shape:AA(e,t,r),silent:!0,z2:0})}function K3(r){r.registerChartView(F3),r.registerSeriesModel(N3),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,pt(VT,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,GT("bar")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,pA("bar")),r.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,t){var a=e.componentType||"series";t.eachComponent({mainType:a,query:e},function(i){e.sortInfo&&i.axis.setCategorySortInfo(e.sortInfo)})})}var MA=Math.PI*2,qf=Math.PI/180;function j3(r,e,t){e.eachSeriesByType(r,function(a){var i=a.getData(),n=i.mapDimension("value"),o=nb(a,t),s=o.cx,l=o.cy,u=o.r,h=o.r0,f=o.viewRect,v=-a.get("startAngle")*qf,c=a.get("endAngle"),d=a.get("padAngle")*qf;c=c==="auto"?v-MA:-c*qf;var p=a.get("minAngle")*qf,g=p+d,y=0;i.each(n,function(O){!isNaN(O)&&y++});var m=i.getSum(n),_=Math.PI/(m||y)*2,x=a.get("clockwise"),b=a.get("roseType"),S=a.get("stillShowZeroSum"),w=i.getDataExtent(n);w[0]=0;var T=x?1:-1,C=[v,c],A=T*d/2;xh(C,!x),v=C[0],c=C[1];var D=DA(a);D.startAngle=v,D.endAngle=c,D.clockwise=x,D.cx=s,D.cy=l,D.r=u,D.r0=h;var I=Math.abs(c-v),L=I,P=0,k=v;if(i.setLayout({viewRect:f,r:u}),i.each(n,function(O,E){var N;if(isNaN(O)){i.setItemLayout(E,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:x,cx:s,cy:l,r0:h,r:b?NaN:u});return}b!=="area"?N=m===0&&S?_:O*_:N=I/y,N<g?(N=g,L-=g):P+=O;var V=k+T*N,G=0,H=0;d>N?(G=k+T*N/2,H=G):(G=k+A,H=V-A),i.setItemLayout(E,{angle:N,startAngle:G,endAngle:H,clockwise:x,cx:s,cy:l,r0:h,r:b?Ot(O,w,[h,u]):u}),k=V}),L<MA&&y)if(L<=.001){var R=I/y;i.each(n,function(O,E){if(!isNaN(O)){var N=i.getItemLayout(E);N.angle=R;var V=0,G=0;R<d?(V=v+T*(E+1/2)*R,G=V):(V=v+T*E*R+A,G=v+T*(E+1)*R-A),N.startAngle=V,N.endAngle=G}})}else _=L/P,k=v,i.each(n,function(O,E){if(!isNaN(O)){var N=i.getItemLayout(E),V=N.angle===g?g:O*_,G=0,H=0;V<d?(G=k+T*V/2,H=G):(G=k+A,H=k+T*V-A),N.startAngle=G,N.endAngle=H,k+=T*V}})})}var DA=St();function os(r){return{seriesType:r,reset:function(e,t){var a=t.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})}}}}var J3=Math.PI/180;function LA(r,e,t,a,i,n,o,s,l,u){if(r.length<2)return;function h(p){for(var g=p.rB,y=g*g,m=0;m<p.list.length;m++){var _=p.list[m],x=Math.abs(_.label.y-t),b=a+_.len,S=b*b,w=Math.sqrt(Math.abs((1-x*x/y)*S)),T=e+(w+_.len2)*i,C=T-_.label.x,A=_.targetTextWidth-C*i;IA(_,A,!0),_.label.x=T}}function f(p){for(var g={list:[],maxY:0},y={list:[],maxY:0},m=0;m<p.length;m++)if(p[m].labelAlignTo==="none"){var _=p[m],x=_.label.y>t?y:g,b=Math.abs(_.label.y-t);if(b>=x.maxY){var S=_.label.x-e-_.len2*i,w=a+_.len,T=Math.abs(S)<w?Math.sqrt(b*b/(1-S*S/w/w)):w;x.rB=T,x.maxY=b}x.list.push(_)}h(g),h(y)}for(var v=r.length,c=0;c<v;c++)if(r[c].position==="outer"&&r[c].labelAlignTo==="labelLine"){var d=r[c].label.x-u;r[c].linePoints[1][0]+=d,r[c].label.x=u}Ug(r,1,l,l+o)&&f(r)}function Q3(r,e,t,a,i,n,o,s){for(var l=[],u=[],h=Number.MAX_VALUE,f=-Number.MAX_VALUE,v=0;v<r.length;v++){var c=r[v].label;hy(r[v])||(c.x<e?(h=Math.min(h,c.x),l.push(r[v])):(f=Math.max(f,c.x),u.push(r[v])))}for(var v=0;v<r.length;v++){var d=r[v];if(!hy(d)&&d.linePoints){if(d.labelStyleWidth!=null)continue;var c=d.label,p=d.linePoints,g=void 0;d.labelAlignTo==="edge"?c.x<e?g=p[2][0]-d.labelDistance-o-d.edgeDistance:g=o+i-d.edgeDistance-p[2][0]-d.labelDistance:d.labelAlignTo==="labelLine"?c.x<e?g=h-o-d.bleedMargin:g=o+i-f-d.bleedMargin:c.x<e?g=c.x-o-d.bleedMargin:g=o+i-c.x-d.bleedMargin,d.targetTextWidth=g,IA(d,g,!1)}}LA(u,e,t,a,1,i,n,o,s,f),LA(l,e,t,a,-1,i,n,o,s,h);for(var v=0;v<r.length;v++){var d=r[v];if(!hy(d)&&d.linePoints){var c=d.label,p=d.linePoints,y=d.labelAlignTo==="edge",m=c.style.padding,_=m?m[1]+m[3]:0,x=c.style.backgroundColor?0:_,b=d.rect.width+x,S=p[1][0]-p[2][0];y?c.x<e?p[2][0]=o+d.edgeDistance+b+d.labelDistance:p[2][0]=o+i-d.edgeDistance-b-d.labelDistance:(c.x<e?p[2][0]=c.x+d.labelDistance:p[2][0]=c.x-d.labelDistance,p[1][0]=p[2][0]+S),p[1][1]=p[2][1]=c.y}}}function IA(r,e,t){if(r.labelStyleWidth==null){var a=r.label,i=a.style,n=r.rect,o=i.backgroundColor,s=i.padding,l=s?s[1]+s[3]:0,u=i.overflow,h=n.width+(o?0:l);if(e<h||t){if(u&&u.match("break")){a.setStyle("backgroundColor",null),a.setStyle("width",e-l);var f=a.getBoundingRect();a.setStyle("width",Math.ceil(f.width)),a.setStyle("backgroundColor",o)}else{var v=e-l,c=e<h?v:t?v>r.unconstrainedWidth?null:v:null;a.setStyle("width",c)}PA(n,a)}}}function PA(r,e){kA.rect=r,mC(kA,e,tF)}var tF={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},kA={};function hy(r){return r.position==="center"}function eF(r){var e=r.getData(),t=[],a,i,n=!1,o=(r.get("minShowLabelAngle")||0)*J3,s=e.getLayout("viewRect"),l=e.getLayout("r"),u=s.width,h=s.x,f=s.y,v=s.height;function c(S){S.ignore=!0}function d(S){if(!S.ignore)return!0;for(var w in S.states)if(S.states[w].ignore===!1)return!0;return!1}e.each(function(S){var w=e.getItemGraphicEl(S),T=w.shape,C=w.getTextContent(),A=w.getTextGuideLine(),D=e.getItemModel(S),I=D.getModel("label"),L=I.get("position")||D.get(["emphasis","label","position"]),P=I.get("distanceToLabelLine"),k=I.get("alignTo"),R=Z(I.get("edgeDistance"),u),O=I.get("bleedMargin");O==null&&(O=Math.min(u,v)>200?10:2);var E=D.getModel("labelLine"),N=E.get("length");N=Z(N,u);var V=E.get("length2");if(V=Z(V,u),Math.abs(T.endAngle-T.startAngle)<o){M(C.states,c),C.ignore=!0,A&&(M(A.states,c),A.ignore=!0);return}if(d(C)){var G=(T.startAngle+T.endAngle)/2,H=Math.cos(G),Y=Math.sin(G),q,it,xt,At;a=T.cx,i=T.cy;var ut=L==="inside"||L==="inner";if(L==="center")q=T.cx,it=T.cy,At="center";else{var tt=(ut?(T.r+T.r0)/2*H:T.r*H)+a,ct=(ut?(T.r+T.r0)/2*Y:T.r*Y)+i;if(q=tt+H*3,it=ct+Y*3,!ut){var j=tt+H*(N+l-T.r),ft=ct+Y*(N+l-T.r),Nt=j+(H<0?-1:1)*V,wt=ft;k==="edge"?q=H<0?h+R:h+u-R:q=Nt+(H<0?-P:P),it=wt,xt=[[tt,ct],[j,ft],[Nt,wt]]}At=ut?"center":k==="edge"?H>0?"right":"left":H>0?"left":"right"}var kt=Math.PI,Bt=0,xe=I.get("rotate");if(Dt(xe))Bt=xe*(kt/180);else if(L==="center")Bt=0;else if(xe==="radial"||xe===!0){var vr=H<0?-G+kt:-G;Bt=vr}else if(xe==="tangential"&&L!=="outside"&&L!=="outer"){var tr=Math.atan2(H,Y);tr<0&&(tr=kt*2+tr);var so=Y>0;so&&(tr=kt+tr),Bt=tr-kt}if(n=!!Bt,C.x=q,C.y=it,C.rotation=Bt,C.setStyle({verticalAlign:"middle"}),ut){C.setStyle({align:At});var y_=C.states.select;y_&&(y_.x+=C.x,y_.y+=C.y)}else{var Is=new ht(0,0,0,0);PA(Is,C),t.push({label:C,labelLine:A,position:L,len:N,len2:V,minTurnAngle:E.get("minTurnAngle"),maxSurfaceAngle:E.get("maxSurfaceAngle"),surfaceNormal:new nt(H,Y),linePoints:xt,textAlign:At,labelDistance:P,labelAlignTo:k,edgeDistance:R,bleedMargin:O,rect:Is,unconstrainedWidth:Is.width,labelStyleWidth:C.style.width})}w.setTextConfig({inside:ut})}}),!n&&r.get("avoidLabelOverlap")&&Q3(t,a,i,l,u,v,h,f);for(var p=0;p<t.length;p++){var g=t[p],y=g.label,m=g.labelLine,_=isNaN(y.x)||isNaN(y.y);if(y){y.setStyle({align:g.textAlign}),_&&(M(y.states,c),y.ignore=!0);var x=y.states.select;x&&(x.x+=y.x,x.y+=y.y)}if(m){var b=g.linePoints;_||!b?(M(m.states,c),m.ignore=!0):(dC(b,g.minTurnAngle),xG(b,g.surfaceNormal,g.maxSurfaceAngle),m.setShape({points:b}),y.__hostTarget.textGuideLineConfig={anchor:new nt(b[0][0],b[0][1])})}}}var rF=function(r){z(e,r);function e(t,a,i){var n=r.call(this)||this;n.z2=2;var o=new Lt;return n.setTextContent(o),n.updateData(t,a,i,!0),n}return e.prototype.updateData=function(t,a,i,n){var o=this,s=t.hostModel,l=t.getItemModel(a),u=l.getModel("emphasis"),h=t.getItemLayout(a),f=F(_a(l.getModel("itemStyle"),h,!0),h);if(isNaN(f.startAngle)){o.setShape(f);return}if(n){o.setShape(f);var v=s.getShallow("animationType");s.ecModel.ssr?(Yt(o,{scaleX:0,scaleY:0},s,{dataIndex:a,isFrom:!0}),o.originX=f.cx,o.originY=f.cy):v==="scale"?(o.shape.r=h.r0,Yt(o,{shape:{r:h.r}},s,a)):i!=null?(o.setShape({startAngle:i,endAngle:i}),Yt(o,{shape:{startAngle:h.startAngle,endAngle:h.endAngle}},s,a)):(o.shape.endAngle=h.startAngle,It(o,{shape:{endAngle:h.endAngle}},s,a))}else br(o),It(o,{shape:f},s,a);o.useStyle(t.getItemVisual(a,"style")),ve(o,l);var c=(h.startAngle+h.endAngle)/2,d=s.get("selectedOffset"),p=Math.cos(c)*d,g=Math.sin(c)*d,y=l.getShallow("cursor");y&&o.attr("cursor",y),this._updateLabel(s,t,a),o.ensureState("emphasis").shape=F({r:h.r+(u.get("scale")&&u.get("scaleSize")||0)},_a(u.getModel("itemStyle"),h)),F(o.ensureState("select"),{x:p,y:g,shape:_a(l.getModel(["select","itemStyle"]),h)}),F(o.ensureState("blur"),{shape:_a(l.getModel(["blur","itemStyle"]),h)});var m=o.getTextGuideLine(),_=o.getTextContent();m&&F(m.ensureState("select"),{x:p,y:g}),F(_.ensureState("select"),{x:p,y:g}),Xt(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t,a,i){var n=this,o=a.getItemModel(i),s=o.getModel("labelLine"),l=a.getItemVisual(i,"style"),u=l&&l.fill,h=l&&l.opacity;ye(n,ce(o),{labelFetcher:a.hostModel,labelDataIndex:i,inheritColor:u,defaultOpacity:h,defaultText:t.getFormattedLabel(i,"normal")||a.getName(i)});var f=n.getTextContent();n.setTextConfig({position:null,rotation:null}),f.attr({z2:10});var v=o.get(["label","position"]);if(v!=="outside"&&v!=="outer")n.removeTextGuideLine();else{var c=this.getTextGuideLine();c||(c=new Be,this.setTextGuideLine(c)),Vg(this,Gg(o),{stroke:u,opacity:er(s.get(["lineStyle","opacity"]),h,1)})}},e}(We),aF=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.ignoreLabelLineUpdate=!0,t}return e.prototype.render=function(t,a,i,n){var o=t.getData(),s=this._data,l=this.group,u;if(!s&&o.count()>0){for(var h=o.getItemLayout(0),f=1;isNaN(h&&h.startAngle)&&f<o.count();++f)h=o.getItemLayout(f);h&&(u=h.startAngle)}if(this._emptyCircleSector&&l.remove(this._emptyCircleSector),o.count()===0&&t.get("showEmptyCircle")){var v=DA(t),c=new We({shape:at(v)});c.useStyle(t.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=c,l.add(c)}o.diff(s).add(function(d){var p=new rF(o,d,u);o.setItemGraphicEl(d,p),l.add(p)}).update(function(d,p){var g=s.getItemGraphicEl(p);g.updateData(o,d,u),g.off("click"),l.add(g),o.setItemGraphicEl(d,g)}).remove(function(d){var p=s.getItemGraphicEl(d);Ba(p,t,d)}).execute(),eF(t),t.get("animationTypeUpdate")!=="expansion"&&(this._data=o)},e.prototype.dispose=function(){},e.prototype.containPoint=function(t,a){var i=a.getData(),n=i.getItemLayout(0);if(n){var o=t[0]-n.cx,s=t[1]-n.cy,l=Math.sqrt(o*o+s*s);return l<=n.r&&l>=n.r0}},e.type="pie",e}(zt);function ss(r,e,t){e=W(e)&&{coordDimensions:e}||F({encodeDefine:r.getEncode()},e);var a=r.getSource(),i=kl(a,e).dimensions,n=new Ue(i,r);return n.initData(a,t),n}var ls=function(){function r(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}return r.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},r.prototype.containName=function(e){var t=this._getRawData();return t.indexOfName(e)>=0},r.prototype.indexOfName=function(e){var t=this._getDataWithEncodedVisual();return t.indexOfName(e)},r.prototype.getItemVisual=function(e,t){var a=this._getDataWithEncodedVisual();return a.getItemVisual(e,t)},r}(),iF=St(),RA=function(r){z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new ls(X(this.getData,this),X(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.mergeOption=function(){r.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return ss(this,{coordDimensions:["value"],encodeDefaulter:pt(kp,this)})},e.prototype.getDataParams=function(t){var a=this.getData(),i=iF(a),n=i.seats;if(!n){var o=[];a.each(a.mapDimension("value"),function(l){o.push(l)}),n=i.seats=mE(o,a.hostModel.get("percentPrecision"))}var s=r.prototype.getDataParams.call(this,t);return s.percent=n[t]||0,s.$vars.push("percent"),s},e.prototype._defaultLabelLine=function(t){tn(t,"labelLine",["show"]);var a=t.labelLine,i=t.emphasis.labelLine;a.show=a.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"50%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,coordinateSystemUsage:"box",left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:30,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(Ht);fB({fullType:RA.type,getCoord2:function(r){return r.getShallow("center")}});function nF(r){return{seriesType:r,reset:function(e,t){var a=e.getData();a.filterSelf(function(i){var n=a.mapDimension("value"),o=a.get(n,i);return!(Dt(o)&&!isNaN(o)&&o<0)})}}}function oF(r){r.registerChartView(aF),r.registerSeriesModel(RA),Pw("pie",r.registerAction),r.registerLayout(pt(j3,"pie")),r.registerProcessor(os("pie")),r.registerProcessor(nF("pie"))}var sF=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t,a){return Ha(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return t??(this.option.large?5e3:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t??(this.option.large?1e4:this.get("progressiveThreshold"))},e.prototype.brushSelector=function(t,a,i){return i.point(a.getItemLayout(t))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:B.color.primary}},universalTransition:{divideShape:"clone"}},e}(Ht),EA=4,lF=function(){function r(){}return r}(),uF=function(r){z(e,r);function e(t){var a=r.call(this,t)||this;return a._off=0,a.hoverDataIdx=-1,a}return e.prototype.getDefaultShape=function(){return new lF},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(t,a){var i=a.points,n=a.size,o=this.symbolProxy,s=o.shape,l=t.getContext?t.getContext():t,u=l&&n[0]<EA,h=this.softClipShape,f;if(u){this._ctx=l;return}for(this._ctx=null,f=this._off;f<i.length;){var v=i[f++],c=i[f++];isNaN(v)||isNaN(c)||h&&!h.contain(v,c)||(s.x=v-n[0]/2,s.y=c-n[1]/2,s.width=n[0],s.height=n[1],o.buildPath(t,s,!0))}this.incremental&&(this._off=f,this.notClear=!0)},e.prototype.afterBrush=function(){var t=this.shape,a=t.points,i=t.size,n=this._ctx,o=this.softClipShape,s;if(n){for(s=this._off;s<a.length;){var l=a[s++],u=a[s++];isNaN(l)||isNaN(u)||o&&!o.contain(l,u)||n.fillRect(l-i[0]/2,u-i[1]/2,i[0],i[1])}this.incremental&&(this._off=s,this.notClear=!0)}},e.prototype.findDataIndex=function(t,a){for(var i=this.shape,n=i.points,o=i.size,s=Math.max(o[0],4),l=Math.max(o[1],4),u=n.length/2-1;u>=0;u--){var h=u*2,f=n[h]-s/2,v=n[h+1]-l/2;if(t>=f&&a>=v&&t<=f+s&&a<=v+l)return u}return-1},e.prototype.contain=function(t,a){var i=this.transformCoordToLocal(t,a),n=this.getBoundingRect();if(t=i[0],a=i[1],n.contain(t,a)){var o=this.hoverDataIdx=this.findDataIndex(t,a);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var a=this.shape,i=a.points,n=a.size,o=n[0],s=n[1],l=1/0,u=1/0,h=-1/0,f=-1/0,v=0;v<i.length;){var c=i[v++],d=i[v++];l=Math.min(c,l),h=Math.max(c,h),u=Math.min(d,u),f=Math.max(d,f)}t=this._rect=new ht(l-o/2,u-s/2,h-l+o,f-u+s)}return t},e}(bt),hF=function(){function r(){this.group=new et}return r.prototype.updateData=function(e,t){this._clear();var a=this._create();a.setShape({points:e.getLayout("points")}),this._setCommon(a,e,t)},r.prototype.updateLayout=function(e){var t=e.getLayout("points");this.group.eachChild(function(a){if(a.startIndex!=null){var i=(a.endIndex-a.startIndex)*2,n=a.startIndex*4*2;t=new Float32Array(t.buffer,n,i)}a.setShape("points",t),a.reset()})},r.prototype.incrementalPrepareUpdate=function(e){this._clear()},r.prototype.incrementalUpdate=function(e,t,a){var i=this._newAdded[0],n=t.getLayout("points"),o=i&&i.shape.points;if(o&&o.length<2e4){var s=o.length,l=new Float32Array(s+n.length);l.set(o),l.set(n,s),i.endIndex=e.end,i.setShape({points:l})}else{this._newAdded=[];var u=this._create();u.startIndex=e.start,u.endIndex=e.end,u.incremental=!0,u.setShape({points:n}),this._setCommon(u,t,a)}},r.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},r.prototype._create=function(){var e=new uF({cursor:"default"});return e.ignoreCoarsePointer=!0,this.group.add(e),this._newAdded.push(e),e},r.prototype._setCommon=function(e,t,a){var i=t.hostModel;a=a||{};var n=t.getVisual("symbolSize");e.setShape("size",n instanceof Array?n:[n,n]),e.softClipShape=a.clipShape||null,e.symbolProxy=he(t.getVisual("symbol"),0,0,0,0),e.setColor=e.symbolProxy.setColor;var o=e.shape.size[0]<EA;e.useStyle(i.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var s=t.getVisual("style"),l=s&&s.fill;l&&e.setColor(l);var u=vt(e);u.seriesIndex=i.seriesIndex,e.on("mousemove",function(h){u.dataIndex=null;var f=e.hoverDataIdx;f>=0&&(u.dataIndex=f+(e.startIndex||0))})},r.prototype.remove=function(){this._clear()},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}(),fF=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,i){var n=t.getData(),o=this._updateSymbolDraw(n,t);o.updateData(n,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,a,i){var n=t.getData(),o=this._updateSymbolDraw(n,t);o.incrementalPrepareUpdate(n),this._finished=!1},e.prototype.incrementalRender=function(t,a,i){this._symbolDraw.incrementalUpdate(t,a.getData(),{clipShape:this._getClipShape(a)}),this._finished=t.end===a.getData().count()},e.prototype.updateTransform=function(t,a,i){var n=t.getData();if(this.group.dirty(),!this._finished||n.count()>1e4)return{update:!0};var o=Zl("").reset(t,a,i);o.progress&&o.progress({start:0,end:n.count(),count:n.count()},n),this._symbolDraw.updateLayout(n)},e.prototype.eachRendered=function(t){this._symbolDraw&&this._symbolDraw.eachRendered(t)},e.prototype._getClipShape=function(t){if(t.get("clip",!0)){var a=t.coordinateSystem;return a&&a.getArea&&a.getArea(.1)}},e.prototype._updateSymbolDraw=function(t,a){var i=this._symbolDraw,n=a.pipelineContext,o=n.large;return(!i||o!==this._isLargeDraw)&&(i&&i.remove(),i=this._symbolDraw=o?new hF:new Ul,this._isLargeDraw=o,this.group.removeAll()),this.group.add(i.group),i},e.prototype.remove=function(t,a){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(zt),OA={left:0,right:0,top:0,bottom:0},Kf=["25%","25%"],vF=function(r){z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.mergeDefaultAndTheme=function(t,a){var i=An(t.outerBounds);r.prototype.mergeDefaultAndTheme.apply(this,arguments),i&&t.outerBounds&&va(t.outerBounds,i)},e.prototype.mergeOption=function(t,a){r.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&t.outerBounds&&va(this.option.outerBounds,t.outerBounds)},e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"15%",top:65,right:"10%",bottom:80,containLabel:!1,outerBoundsMode:"auto",outerBounds:OA,outerBoundsContain:"all",outerBoundsClampWidth:Kf[0],outerBoundsClampHeight:Kf[1],backgroundColor:B.color.transparent,borderWidth:1,borderColor:B.color.neutral30},e}(Tt),fy=function(r){z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Jt).models[0]},e.type="cartesian2dAxis",e}(Tt);ie(fy,Nl);var NA={show:!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:B.color.axisLine,width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15],breakLine:!0},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,color:B.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:B.color.axisSplitLine,width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:[B.color.backgroundTint,B.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:B.color.neutral00,borderColor:B.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:"auto"}},cF=yt({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},NA),vy=yt({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:B.color.axisMinorSplitLine,width:1}}},NA),dF=yt({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},vy),pF=st({logBase:10},vy),BA={category:cF,value:vy,time:dF,log:pF},gF={value:1,category:1,time:1,log:1},cy=null;function yF(r){cy||(cy=r)}function Xl(){return cy}function us(r,e,t,a){M(gF,function(i,n){var o=yt(yt({},BA[n],!0),a,!0),s=function(l){z(u,l);function u(){var h=l!==null&&l.apply(this,arguments)||this;return h.type=e+"Axis."+n,h}return u.prototype.mergeDefaultAndTheme=function(h,f){var v=dl(this),c=v?An(h):{},d=f.getTheme();yt(h,d.get(n+"Axis")),yt(h,this.getDefaultOption()),h.type=zA(h),v&&va(h,c,v)},u.prototype.optionUpdated=function(){var h=this.option;h.type==="category"&&(this.__ordinalMeta=El.createByAxisModel(this))},u.prototype.getCategories=function(h){var f=this.option;if(f.type==="category")return h?f.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.prototype.updateAxisBreaks=function(h){var f=Xl();return f?f.updateModelAxisBreak(this,h):{breaks:[]}},u.type=e+"Axis."+n,u.defaultOption=o,u}(t);r.registerComponentModel(s)}),r.registerSubTypeDefaulter(e+"Axis",zA)}function zA(r){return r.type||(r.data?"category":"value")}var mF=function(){function r(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return r.prototype.getAxis=function(e){return this._axes[e]},r.prototype.getAxes=function(){return U(this._dimList,function(e){return this._axes[e]},this)},r.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),Et(this.getAxes(),function(t){return t.scale.type===e})},r.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},r}(),dy=["x","y"];function VA(r){return(r.type==="interval"||r.type==="time")&&!r.hasBreaks()}var _F=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=dy,t}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,a=this.getAxis("y").scale;if(!(!VA(t)||!VA(a))){var i=t.getExtent(),n=a.getExtent(),o=this.dataToPoint([i[0],n[0]]),s=this.dataToPoint([i[1],n[1]]),l=i[1]-i[0],u=n[1]-n[0];if(!(!l||!u)){var h=(s[0]-o[0])/l,f=(s[1]-o[1])/u,v=o[0]-i[0]*h,c=o[1]-n[0]*f,d=this._transform=[h,0,0,f,v,c];this._invTransform=Rr([],d)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(t){var a=this.getAxis("x"),i=this.getAxis("y");return a.contain(a.toLocalCoord(t[0]))&&i.contain(i.toLocalCoord(t[1]))},e.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},e.prototype.containZone=function(t,a){var i=this.dataToPoint(t),n=this.dataToPoint(a),o=this.getArea(),s=new ht(i[0],i[1],n[0]-i[0],n[1]-i[1]);return o.intersect(s)},e.prototype.dataToPoint=function(t,a,i){i=i||[];var n=t[0],o=t[1];if(this._transform&&n!=null&&isFinite(n)&&o!=null&&isFinite(o))return te(i,t,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return i[0]=s.toGlobalCoord(s.dataToCoord(n,a)),i[1]=l.toGlobalCoord(l.dataToCoord(o,a)),i},e.prototype.clampData=function(t,a){var i=this.getAxis("x").scale,n=this.getAxis("y").scale,o=i.getExtent(),s=n.getExtent(),l=i.parse(t[0]),u=n.parse(t[1]);return a=a||[],a[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),a[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),a},e.prototype.pointToData=function(t,a,i){if(i=i||[],this._invTransform)return te(i,t,this._invTransform);var n=this.getAxis("x"),o=this.getAxis("y");return i[0]=n.coordToData(n.toLocalCoord(t[0]),a),i[1]=o.coordToData(o.toLocalCoord(t[1]),a),i},e.prototype.getOtherAxis=function(t){return this.getAxis(t.dim==="x"?"y":"x")},e.prototype.getArea=function(t){t=t||0;var a=this.getAxis("x").getGlobalExtent(),i=this.getAxis("y").getGlobalExtent(),n=Math.min(a[0],a[1])-t,o=Math.min(i[0],i[1])-t,s=Math.max(a[0],a[1])-n+t,l=Math.max(i[0],i[1])-o+t;return new ht(n,o,s,l)},e}(mF),GA=function(r){z(e,r);function e(t,a,i,n,o){var s=r.call(this,t,a,i)||this;return s.index=0,s.type=n||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var t=this.position;return t==="top"||t==="bottom"},e.prototype.getGlobalExtent=function(t){var a=this.getExtent();return a[0]=this.toGlobalCoord(a[0]),a[1]=this.toGlobalCoord(a[1]),t&&a[0]>a[1]&&a.reverse(),a},e.prototype.pointToData=function(t,a){return this.coordToData(this.toLocalCoord(t[this.dim==="x"?0:1]),a)},e.prototype.setCategorySortInfo=function(t){if(this.type!=="category")return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e}(Yr),jf="expandAxisBreak",FA="collapseAxisBreak",HA="toggleAxisBreak",py="axisbreakchanged",xF={type:jf,event:py,update:"update",refineEvent:gy},SF={type:FA,event:py,update:"update",refineEvent:gy},bF={type:HA,event:py,update:"update",refineEvent:gy};function gy(r,e,t,a){var i=[];return M(r,function(n){i=i.concat(n.eventBreaks)}),{eventContent:{breaks:i}}}function wF(r){r.registerAction(xF,e),r.registerAction(SF,e),r.registerAction(bF,e);function e(t,a){var i=[],n=wo(a,t);function o(s,l){M(n[s],function(u){var h=u.updateAxisBreaks(t);M(h.breaks,function(f){var v;i.push(st((v={},v[l]=u.componentIndex,v),f))})})}return o("xAxisModels","xAxisIndex"),o("yAxisModels","yAxisIndex"),o("singleAxisModels","singleAxisIndex"),{eventBreaks:i}}}var Ii=Math.PI,TF=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],CF=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],hs=St(),WA=St(),UA=function(){function r(e){this.recordMap={},this.resolveAxisNameOverlap=e}return r.prototype.ensureRecord=function(e){var t=e.axis.dim,a=e.componentIndex,i=this.recordMap,n=i[t]||(i[t]=[]);return n[a]||(n[a]={ready:{}})},r}();function AF(r,e,t,a){var i=t.axis,n=e.ensureRecord(t),o=[],s,l=my(r.axisName)&&as(r.nameLocation);M(a,function(d){var p=ya(d);if(!(!p||p.label.ignore)){o.push(p);var g=n.transGroup;l&&(g.transform?Rr(ql,g.transform):Vu(ql),p.transform&&qr(ql,ql,p.transform),ht.copy(Jf,p.localRect),Jf.applyTransform(ql),s?s.union(Jf):ht.copy(s=new ht(0,0,0,0),Jf))}});var u=Math.abs(n.dirVec.x)>.1?"x":"y",h=n.transGroup[u];if(o.sort(function(d,p){return Math.abs(d.label[u]-h)-Math.abs(p.label[u]-h)}),l&&s){var f=i.getExtent(),v=Math.min(f[0],f[1]),c=Math.max(f[0],f[1])-v;s.union(new ht(v,0,c,1))}n.stOccupiedRect=s,n.labelInfoList=o}var ql=Se(),Jf=new ht(0,0,0,0),YA=function(r,e,t,a,i,n){if(as(r.nameLocation)){var o=n.stOccupiedRect;o&&ZA(wG({},o,n.transGroup.transform),a,i)}else $A(n.labelInfoList,n.dirVec,a,i)};function ZA(r,e,t){var a=new nt;Vf(r,e,a,{direction:Math.atan2(t.y,t.x),bidirectional:!1,touchThreshold:.05})&&Hg(e,a)}function $A(r,e,t,a){for(var i=nt.dot(a,e)>=0,n=0,o=r.length;n<o;n++){var s=r[i?n:o-1-n];s.label.ignore||ZA(s,t,a)}}var $e=function(){function r(e,t,a,i){this.group=new et,this._axisModel=e,this._api=t,this._local={},this._shared=i||new UA(YA),this._resetCfgDetermined(a)}return r.prototype.updateCfg=function(e){var t=this._cfg.raw;t.position=e.position,t.labelOffset=e.labelOffset,this._resetCfgDetermined(t)},r.prototype.__getRawCfg=function(){return this._cfg.raw},r.prototype._resetCfgDetermined=function(e){var t=this._axisModel,a=t.getDefaultOption?t.getDefaultOption():{},i=Q(e.axisName,t.get("name")),n=t.get("nameMoveOverlap");(n==null||n==="auto")&&(n=Q(e.defaultNameMoveOverlap,!0));var o={raw:e,position:e.position,rotation:e.rotation,nameDirection:Q(e.nameDirection,1),tickDirection:Q(e.tickDirection,1),labelDirection:Q(e.labelDirection,1),labelOffset:Q(e.labelOffset,0),silent:Q(e.silent,!0),axisName:i,nameLocation:er(t.get("nameLocation"),a.nameLocation,"end"),shouldNameMoveOverlap:my(i)&&n,optionHideOverlap:t.get(["axisLabel","hideOverlap"]),showMinorTicks:t.get(["minorTick","show"])};this._cfg=o;var s=new et({x:o.position[0],y:o.position[1],rotation:o.rotation});s.updateTransform(),this._transformGroup=s;var l=this._shared.ensureRecord(t);l.transGroup=this._transformGroup,l.dirVec=new nt(Math.cos(-o.rotation),Math.sin(-o.rotation))},r.prototype.build=function(e,t){var a=this;return e||(e={axisLine:!0,axisTickLabelEstimate:!1,axisTickLabelDetermine:!0,axisName:!0}),M(MF,function(i){e[i]&&DF[i](a._cfg,a._local,a._shared,a._axisModel,a.group,a._transformGroup,a._api,t||{})}),this},r.innerTextLayout=function(e,t,a){var i=R1(t-e),n,o;return Zs(i)?(o=a>0?"top":"bottom",n="center"):Zs(i-Ii)?(o=a>0?"bottom":"top",n="center"):(o="middle",i>0&&i<Ii?n=a>0?"right":"left":n=a>0?"left":"right"),{rotation:i,textAlign:n,textVerticalAlign:o}},r.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},r.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)},r}(),MF=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],DF={axisLine:function(r,e,t,a,i,n,o){var s=a.get(["axisLine","show"]);if(s==="auto"&&(s=!0,r.raw.axisLineAutoShow!=null&&(s=!!r.raw.axisLineAutoShow)),!!s){var l=a.axis.getExtent(),u=n.transform,h=[l[0],0],f=[l[1],0],v=h[0]>f[0];u&&(te(h,h,u),te(f,f,u));var c=F({lineCap:"round"},a.getModel(["axisLine","lineStyle"]).getLineStyle()),d={strokeContainThreshold:r.raw.strokeContainThreshold||5,silent:!0,z2:1,style:c};if(a.get(["axisLine","breakLine"])&&a.axis.scale.hasBreaks())Xl().buildAxisBreakLine(a,i,n,d);else{var p=new Kt(F({shape:{x1:h[0],y1:h[1],x2:f[0],y2:f[1]}},d));Eo(p.shape,p.style.lineWidth),p.anid="line",i.add(p)}var g=a.get(["axisLine","symbol"]);if(g!=null){var y=a.get(["axisLine","symbolSize"]);$(g)&&(g=[g,g]),($(y)||Dt(y))&&(y=[y,y]);var m=En(a.get(["axisLine","symbolOffset"])||0,y),_=y[0],x=y[1];M([{rotate:r.rotation+Math.PI/2,offset:m[0],r:0},{rotate:r.rotation-Math.PI/2,offset:m[1],r:Math.sqrt((h[0]-f[0])*(h[0]-f[0])+(h[1]-f[1])*(h[1]-f[1]))}],function(b,S){if(g[S]!=="none"&&g[S]!=null){var w=he(g[S],-_/2,-x/2,_,x,c.stroke,!0),T=b.r+b.offset,C=v?f:h;w.attr({rotation:b.rotate,x:C[0]+T*Math.cos(r.rotation),y:C[1]-T*Math.sin(r.rotation),silent:!0,z2:11}),i.add(w)}})}}},axisTickLabelEstimate:function(r,e,t,a,i,n,o,s){var l=KA(e,i,s);l&&XA(r,e,t,a,i,n,o,Ur.estimate)},axisTickLabelDetermine:function(r,e,t,a,i,n,o,s){var l=KA(e,i,s);l&&XA(r,e,t,a,i,n,o,Ur.determine);var u=kF(r,i,n,a);PF(r,e.labelLayoutList,u),RF(r,i,n,a,r.tickDirection)},axisName:function(r,e,t,a,i,n,o,s){var l=t.ensureRecord(a);e.nameEl&&(i.remove(e.nameEl),e.nameEl=l.nameLayout=l.nameLocation=null);var u=r.axisName;if(my(u)){var h=r.nameLocation,f=r.nameDirection,v=a.getModel("nameTextStyle"),c=a.get("nameGap")||0,d=a.axis.getExtent(),p=a.axis.inverse?-1:1,g=new nt(0,0),y=new nt(0,0);h==="start"?(g.x=d[0]-p*c,y.x=-p):h==="end"?(g.x=d[1]+p*c,y.x=p):(g.x=(d[0]+d[1])/2,g.y=r.labelOffset+f*c,y.y=f);var m=Se();y.transform(ri(m,m,r.rotation));var _=a.get("nameRotate");_!=null&&(_=_*Ii/180);var x,b;as(h)?x=$e.innerTextLayout(r.rotation,_??r.rotation,f):(x=LF(r.rotation,h,_||0,d),b=r.raw.axisNameAvailableWidth,b!=null&&(b=Math.abs(b/Math.sin(x.rotation)),!isFinite(b)&&(b=null)));var S=v.getFont(),w=a.get("nameTruncate",!0)||{},T=w.ellipsis,C=Ae(r.raw.nameTruncateMaxWidth,w.maxWidth,b),A=s.nameMarginLevel||0,D=new Lt({x:g.x,y:g.y,rotation:x.rotation,silent:$e.isLabelSilent(a),style:Ft(v,{text:u,font:S,overflow:"truncate",width:C,ellipsis:T,fill:v.getTextColor()||a.get(["axisLine","lineStyle","color"]),align:v.get("align")||x.textAlign,verticalAlign:v.get("verticalAlign")||x.textVerticalAlign}),z2:1});if(za({el:D,componentModel:a,itemName:u}),D.__fullText=u,D.anid="name",a.get("triggerEvent")){var I=$e.makeAxisEventDataBase(a);I.targetType="axisName",I.name=u,vt(D).eventData=I}n.add(D),D.updateTransform(),e.nameEl=D;var L=l.nameLayout=ya({label:D,priority:D.z2,defaultAttr:{ignore:D.ignore},marginDefault:as(h)?TF[A]:CF[A]});if(l.nameLocation=h,i.add(D),D.decomposeTransform(),r.shouldNameMoveOverlap&&L){var P=t.ensureRecord(a);t.resolveAxisNameOverlap(r,t,a,L,y,P)}}}};function XA(r,e,t,a,i,n,o,s){jA(e)||EF(r,e,i,s,a,o);var l=e.labelLayoutList;OF(r,a,l,n),zF(a,r.rotation,l);var u=r.optionHideOverlap;IF(a,l,u),u&&xC(Et(l,function(h){return h&&!h.label.ignore})),AF(r,t,a,l)}function LF(r,e,t,a){var i=R1(t-r),n,o,s=a[0]>a[1],l=e==="start"&&!s||e!=="start"&&s;return Zs(i-Ii/2)?(o=l?"bottom":"top",n="center"):Zs(i-Ii*1.5)?(o=l?"top":"bottom",n="center"):(o="middle",i<Ii*1.5&&i>Ii/2?n=l?"left":"right":n=l?"right":"left"),{rotation:i,textAlign:n,textVerticalAlign:o}}function IF(r,e,t){if(XT(r.axis))return;function a(s,l,u){var h=ya(e[l]),f=ya(e[u]);if(!(!h||!f)){if(s===!1||h.suggestIgnore){Kl(h.label);return}if(f.suggestIgnore){Kl(f.label);return}var v=.1;if(!t){var c=[0,0,0,0];h=Wg({marginForce:c},h),f=Wg({marginForce:c},f)}Vf(h,f,null,{touchThreshold:v})&&Kl(s?f.label:h.label)}}var i=r.get(["axisLabel","showMinLabel"]),n=r.get(["axisLabel","showMaxLabel"]),o=e.length;a(i,0,1),a(n,o-1,o-2)}function PF(r,e,t){r.showMinorTicks||M(e,function(a){if(a&&a.label.ignore)for(var i=0;i<t.length;i++){var n=t[i],o=WA(n),s=hs(a.label);if(o.tickValue!=null&&!o.onBand&&o.tickValue===s.tickValue){Kl(n);return}}})}function Kl(r){r&&(r.ignore=!0)}function qA(r,e,t,a,i){for(var n=[],o=[],s=[],l=0;l<r.length;l++){var u=r[l].coord;o[0]=u,o[1]=0,s[0]=u,s[1]=t,e&&(te(o,o,e),te(s,s,e));var h=new Kt({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:a,z2:2,autoBatch:!0,silent:!0});Eo(h.shape,h.style.lineWidth),h.anid=i+"_"+r[l].tickValue,n.push(h);var f=WA(h);f.onBand=!!r[l].onBand,f.tickValue=r[l].tickValue}return n}function kF(r,e,t,a){var i=a.axis,n=a.getModel("axisTick"),o=n.get("show");if(o==="auto"&&(o=!0,r.raw.axisTickAutoShow!=null&&(o=!!r.raw.axisTickAutoShow)),!o||i.scale.isBlank())return[];for(var s=n.getModel("lineStyle"),l=r.tickDirection*n.get("length"),u=i.getTicksCoords(),h=qA(u,t.transform,l,st(s.getLineStyle(),{stroke:a.get(["axisLine","lineStyle","color"])}),"ticks"),f=0;f<h.length;f++)e.add(h[f]);return h}function RF(r,e,t,a,i){var n=a.axis,o=a.getModel("minorTick");if(!(!r.showMinorTicks||n.scale.isBlank())){var s=n.getMinorTicksCoords();if(s.length)for(var l=o.getModel("lineStyle"),u=i*o.get("length"),h=st(l.getLineStyle(),st(a.getModel("axisTick").getLineStyle(),{stroke:a.get(["axisLine","lineStyle","color"])})),f=0;f<s.length;f++)for(var v=qA(s[f],t.transform,u,h,"minorticks_"+f),c=0;c<v.length;c++)e.add(v[c])}}function KA(r,e,t){if(jA(r)){var a=r.axisLabelsCreationContext,i=a.out.noPxChangeTryDetermine;if(t.noPxChange){for(var n=!0,o=0;o<i.length;o++)n=n&&i[o]();if(n)return!1}i.length&&(e.remove(r.labelGroup),yy(r,null,null,null))}return!0}function EF(r,e,t,a,i,n){var o=i.axis,s=Ae(r.raw.axisLabelShow,i.get(["axisLabel","show"])),l=new et;t.add(l);var u=Ef(a);if(!s||o.scale.isBlank()){yy(e,[],l,u);return}var h=i.getModel("axisLabel"),f=o.getViewLabels(u),v=(Ae(r.raw.labelRotate,h.get("rotate"))||0)*Ii/180,c=$e.innerTextLayout(r.rotation,v,r.labelDirection),d=i.getCategories&&i.getCategories(!0),p=[],g=i.get("triggerEvent"),y=1/0,m=-1/0;M(f,function(x,b){var S,w=o.scale.type==="ordinal"?o.scale.getRawOrdinalNumber(x.tickValue):x.tickValue,T=x.formattedLabel,C=x.rawLabel,A=h;if(d&&d[w]){var D=d[w];lt(D)&&D.textStyle&&(A=new Ct(D.textStyle,h,i.ecModel))}var I=A.getTextColor()||i.get(["axisLine","lineStyle","color"]),L=A.getShallow("align",!0)||c.textAlign,P=Q(A.getShallow("alignMinLabel",!0),L),k=Q(A.getShallow("alignMaxLabel",!0),L),R=A.getShallow("verticalAlign",!0)||A.getShallow("baseline",!0)||c.textVerticalAlign,O=Q(A.getShallow("verticalAlignMinLabel",!0),R),E=Q(A.getShallow("verticalAlignMaxLabel",!0),R),N=10+(((S=x.time)===null||S===void 0?void 0:S.level)||0);y=Math.min(y,N),m=Math.max(m,N);var V=new Lt({x:0,y:0,rotation:0,silent:$e.isLabelSilent(i),z2:N,style:Ft(A,{text:T,align:b===0?P:b===f.length-1?k:L,verticalAlign:b===0?O:b===f.length-1?E:R,fill:rt(I)?I(o.type==="category"?C:o.type==="value"?w+"":w,b):I})});V.anid="label_"+w;var G=hs(V);if(G.break=x.break,G.tickValue=w,G.layoutRotation=c.rotation,za({el:V,componentModel:i,itemName:T,formatterParamsExtra:{isTruncated:function(){return V.isTruncated},value:C,tickIndex:b}}),g){var H=$e.makeAxisEventDataBase(i);H.targetType="axisLabel",H.value=C,H.tickIndex=b,x.break&&(H.break={start:x.break.parsedBreak.vmin,end:x.break.parsedBreak.vmax}),o.type==="category"&&(H.dataIndex=w),vt(V).eventData=H,x.break&&BF(i,n,V,x.break)}p.push(V),l.add(V)});var _=U(p,function(x){return{label:x,priority:hs(x).break?x.z2+(m-y+1):x.z2,defaultAttr:{ignore:x.ignore}}});yy(e,_,l,u)}function jA(r){return!!r.labelLayoutList}function yy(r,e,t,a){r.labelLayoutList=e,r.labelGroup=t,r.axisLabelsCreationContext=a}function OF(r,e,t,a){var i=e.get(["axisLabel","margin"]);M(t,function(n,o){var s=ya(n);if(s){var l=s.label,u=hs(l);s.suggestIgnore=l.ignore,l.ignore=!1,nh(Ua,NF),Ua.x=e.axis.dataToCoord(u.tickValue),Ua.y=r.labelOffset+r.labelDirection*i,Ua.rotation=u.layoutRotation,a.add(Ua),Ua.updateTransform(),a.remove(Ua),Ua.decomposeTransform(),nh(l,Ua),l.markRedraw(),zf(s,!0),ya(s)}})}var Ua=new _t,NF=new _t;function my(r){return!!r}function BF(r,e,t,a){t.on("click",function(i){var n={type:jf,breaks:[{start:a.parsedBreak.breakOption.start,end:a.parsedBreak.breakOption.end}]};n[r.axis.dim+"AxisIndex"]=r.componentIndex,e.dispatchAction(n)})}function zF(r,e,t){var a=se();if(a){var i=a.retrieveAxisBreakPairs(t,function(o){return o&&hs(o.label).break},!0),n=r.get(["breakLabelLayout","moveOverlap"],!0);(n===!0||n==="auto")&&M(i,function(o){Xl().adjustBreakLabelPair(r.axis.inverse,e,[ya(t[o[0]]),ya(t[o[1]])])})}}function Qf(r,e,t){t=t||{};var a=e.axis,i={},n=a.getAxesOnZeroOf()[0],o=a.position,s=n?"onZero":o,l=a.dim,u=[r.x,r.x+r.width,r.y,r.y+r.height],h={left:0,right:1,top:0,bottom:1,onZero:2},f=e.get("offset")||0,v=l==="x"?[u[2]-f,u[3]+f]:[u[0]-f,u[1]+f];if(n){var c=n.toGlobalCoord(n.dataToCoord(0));v[h.onZero]=Math.max(Math.min(c,v[1]),v[0])}i.position=[l==="y"?v[h[s]]:u[0],l==="x"?v[h[s]]:u[3]],i.rotation=Math.PI/2*(l==="x"?0:1);var d={top:-1,bottom:1,left:-1,right:1};i.labelDirection=i.tickDirection=i.nameDirection=d[o],i.labelOffset=n?v[h[o]]-v[h.onZero]:0,e.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),Ae(t.labelInside,e.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var p=e.get(["axisLabel","rotate"]);return i.labelRotate=s==="top"?-p:p,i.z2=1,i}function VF(r){return r.coordinateSystem&&r.coordinateSystem.type==="cartesian2d"}function JA(r){var e={xAxisModel:null,yAxisModel:null};return M(e,function(t,a){var i=a.replace(/Model$/,""),n=r.getReferringComponents(i,Jt).models[0];e[a]=n}),e}function GF(r,e,t,a,i,n){for(var o=Qf(r,t),s=!1,l=!1,u=0;u<e.length;u++)Cg(e[u].getOtherAxis(t.axis).scale)&&(s=l=!0,t.axis.type==="category"&&t.axis.onBand&&(l=!1));return o.axisLineAutoShow=s,o.axisTickAutoShow=l,o.defaultNameMoveOverlap=n,new $e(t,a,o,i)}function FF(r,e,t){var a=Qf(e,t);r.updateCfg(a)}function QA(r,e,t){var a=Wa.prototype,i=a.getTicks.call(t),n=a.getTicks.call(t,{expandToNicedExtent:!0}),o=i.length-1,s=a.getInterval.call(t),l=$T(r,e),u=l.extent,h=l.fixMin,f=l.fixMax;r.type==="log"&&(u=Dg(r.base,u,!0)),r.setBreaksFromOption(qT(e)),r.setExtent(u[0],u[1]),r.calcNiceExtent({splitNumber:o,fixMin:h,fixMax:f});var v=a.getExtent.call(r);h&&(u[0]=v[0]),f&&(u[1]=v[1]);var c=a.getInterval.call(r),d=u[0],p=u[1];if(h&&f)c=(p-d)/o;else if(h)for(p=u[0]+c*o;p<u[1]&&isFinite(p)&&isFinite(u[1]);)c=Ag(c),p=u[0]+c*o;else if(f)for(d=u[1]-c*o;d>u[0]&&isFinite(d)&&isFinite(u[0]);)c=Ag(c),d=u[1]-c*o;else{var g=r.getTicks().length-1;g>o&&(c=Ag(c));var y=c*o;p=Math.ceil(u[1]/c)*c,d=ne(p-y),d<0&&u[0]>=0?(d=0,p=ne(y)):p>0&&u[1]<=0&&(p=0,d=-ne(y))}var m=(i[0].value-n[0].value)/s,_=(i[o].value-n[o].value)/s;a.setExtent.call(r,d+c*m,p+c*_),a.setInterval.call(r,c),(m||_)&&a.setNiceExtent.call(r,d+c,p-c)}var tM=[[3,1],[0,2]],HF=function(){function r(e,t,a){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=dy,this._initCartesian(e,t,a),this.model=e}return r.prototype.getRect=function(){return this._rect},r.prototype.update=function(e,t){var a=this._axesMap;this._updateScale(e,this.model);function i(o){var s,l=Mt(o),u=l.length;if(u){for(var h=[],f=u-1;f>=0;f--){var v=+l[f],c=o[v],d=c.model,p=c.scale;Cg(p)&&d.get("alignTicks")&&d.get("interval")==null?h.push(c):(es(p,d),Cg(p)&&(s=c))}h.length&&(s||(s=h.pop(),es(s.scale,s.model)),M(h,function(g){QA(g.scale,g.model,s.scale)}))}}i(a.x),i(a.y);var n={};M(a.x,function(o){eM(a,"y",o,n)}),M(a.y,function(o){eM(a,"x",o,n)}),this.resize(this.model,t)},r.prototype.resize=function(e,t,a){var i=de(e,t),n=this._rect=qt(e.getBoxLayoutParams(),i.refContainer),o=this._axesMap,s=this._coordsList,l=e.get("containLabel");if(xy(o,n),!a){var u=YF(n,s,o,l,t),h=void 0;if(l)Sy?(Sy(this._axesList,n),xy(o,n)):h=iM(n.clone(),"axisLabel",null,n,o,u,i);else{var f=ZF(e,n,i),v=f.outerBoundsRect,c=f.parsedOuterBoundsContain,d=f.outerBoundsClamp;v&&(h=iM(v,c,d,n,o,u,i))}nM(n,o,Ur.determine,null,h,i)}M(this._coordsList,function(p){p.calcAffineTransform()})},r.prototype.getAxis=function(e,t){var a=this._axesMap[e];if(a!=null)return a[t||0]},r.prototype.getAxes=function(){return this._axesList.slice()},r.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var a="x"+e+"y"+t;return this._coordsMap[a]}lt(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var i=0,n=this._coordsList;i<n.length;i++)if(n[i].getAxis("x").index===e||n[i].getAxis("y").index===t)return n[i]},r.prototype.getCartesians=function(){return this._coordsList.slice()},r.prototype.convertToPixel=function(e,t,a){var i=this._findConvertTarget(t);return i.cartesian?i.cartesian.dataToPoint(a):i.axis?i.axis.toGlobalCoord(i.axis.dataToCoord(a)):null},r.prototype.convertFromPixel=function(e,t,a){var i=this._findConvertTarget(t);return i.cartesian?i.cartesian.pointToData(a):i.axis?i.axis.coordToData(i.axis.toLocalCoord(a)):null},r.prototype._findConvertTarget=function(e){var t=e.seriesModel,a=e.xAxisModel||t&&t.getReferringComponents("xAxis",Jt).models[0],i=e.yAxisModel||t&&t.getReferringComponents("yAxis",Jt).models[0],n=e.gridModel,o=this._coordsList,s,l;if(t)s=t.coordinateSystem,gt(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}},r.prototype.containPoint=function(e){var t=this._coordsList[0];if(t)return t.containPoint(e)},r.prototype._initCartesian=function(e,t,a){var i=this,n=this,o={left:!1,right:!1,top:!1,bottom:!1},s={x:{},y:{}},l={x:0,y:0};if(t.eachComponent("xAxis",u("x"),this),t.eachComponent("yAxis",u("y"),this),!l.x||!l.y){this._axesMap={},this._axesList=[];return}this._axesMap=s,M(s.x,function(h,f){M(s.y,function(v,c){var d="x"+f+"y"+c,p=new _F(d);p.master=i,p.model=e,i._coordsMap[d]=p,i._coordsList.push(p),p.addAxis(h),p.addAxis(v)})});function u(h){return function(f,v){if(_y(f,e)){var c=f.get("position");h==="x"?c!=="top"&&c!=="bottom"&&(c=o.bottom?"top":"bottom"):c!=="left"&&c!=="right"&&(c=o.left?"right":"left"),o[c]=!0;var d=new GA(h,Pf(f),[0,0],f.get("type"),c),p=d.type==="category";d.onBand=p&&f.get("boundaryGap"),d.inverse=f.get("inverse"),f.axis=d,d.model=f,d.grid=n,d.index=v,n._axesList.push(d),s[h][v]=d,l[h]++}}}},r.prototype._updateScale=function(e,t){M(this._axesList,function(i){if(i.scale.setExtent(1/0,-1/0),i.type==="category"){var n=i.model.get("categorySortInfo");i.scale.setSortInfo(n)}}),e.eachSeries(function(i){if(VF(i)){var n=JA(i),o=n.xAxisModel,s=n.yAxisModel;if(!_y(o,t)||!_y(s,t))return;var l=this.getCartesian(o.componentIndex,s.componentIndex),u=i.getData(),h=l.getAxis("x"),f=l.getAxis("y");a(u,h),a(u,f)}},this);function a(i,n){M(Rf(i,n.dim),function(o){n.scale.unionExtentFromData(i,o)})}},r.prototype.getTooltipAxes=function(e){var t=[],a=[];return M(this.getCartesians(),function(i){var n=e!=null&&e!=="auto"?i.getAxis(e):i.getBaseAxis(),o=i.getOtherAxis(n);gt(t,n)<0&&t.push(n),gt(a,o)<0&&a.push(o)}),{baseAxes:t,otherAxes:a}},r.create=function(e,t){var a=[];return e.eachComponent("grid",function(i,n){var o=new r(i,e,t);o.name="grid_"+n,o.resize(i,t,!0),i.coordinateSystem=o,a.push(o)}),e.eachSeries(function(i){vl({targetModel:i,coordSysType:"cartesian2d",coordSysProvider:n});function n(){var o=JA(i),s=o.xAxisModel,l=o.yAxisModel,u=s.getCoordSysModel(),h=u.coordinateSystem;return h.getCartesian(s.componentIndex,l.componentIndex)}}),a},r.dimensions=dy,r}();function _y(r,e){return r.getCoordSysModel()===e}function eM(r,e,t,a){t.getAxesOnZeroOf=function(){return n?[n]:[]};var i=r[e],n,o=t.model,s=o.get(["axisLine","onZero"]),l=o.get(["axisLine","onZeroAxisIndex"]);if(!s)return;if(l!=null)rM(i[l])&&(n=i[l]);else for(var u in i)if(i.hasOwnProperty(u)&&rM(i[u])&&!a[h(i[u])]){n=i[u];break}n&&(a[h(n)]=!0);function h(f){return f.dim+"_"+f.index}}function rM(r){return r&&r.type!=="category"&&r.type!=="time"&&$V(r)}function WF(r,e){var t=r.getExtent(),a=t[0]+t[1];r.toGlobalCoord=r.dim==="x"?function(i){return i+e}:function(i){return a-i+e},r.toLocalCoord=r.dim==="x"?function(i){return i-e}:function(i){return a-i+e}}function xy(r,e){M(r.x,function(t){return aM(t,e.x,e.width)}),M(r.y,function(t){return aM(t,e.y,e.height)})}function aM(r,e,t){var a=[0,t],i=r.inverse?1:0;r.setExtent(a[i],a[1-i]),WF(r,e)}var Sy;function UF(r){Sy=r}function iM(r,e,t,a,i,n,o){nM(a,i,Ur.estimate,e,!1,o);var s=[0,0,0,0];u(0),u(1),h(a,0,NaN),h(a,1,NaN);var l=Fi(s,function(v){return v>0})==null;return xn(a,s,!0,!0,t),xy(i,a),l;function u(v){M(i[dt[v]],function(c){if(Ol(c.model)){var d=n.ensureRecord(c.model),p=d.labelInfoList;if(p)for(var g=0;g<p.length;g++){var y=p[g],m=c.scale.normalize(hs(y.label).tickValue);m=v===1?1-m:m,h(y.rect,v,m),h(y.rect,1-v,NaN)}var _=d.nameLayout;if(_){var m=as(d.nameLocation)?.5:NaN;h(_.rect,v,m),h(_.rect,1-v,NaN)}}})}function h(v,c,d){var p=r[dt[c]]-v[dt[c]],g=v[oe[c]]+v[dt[c]]-(r[oe[c]]+r[dt[c]]);p=f(p,1-d),g=f(g,d);var y=tM[c][0],m=tM[c][1];s[y]=ee(s[y],p),s[m]=ee(s[m],g)}function f(v,c){return v>0&&!Re(c)&&c>1e-4&&(v/=c),v}}function YF(r,e,t,a,i){var n=new UA($F);return M(t,function(o){return M(o,function(s){if(Ol(s.model)){var l=!a;s.axisBuilder=GF(r,e,s.model,i,n,l)}})}),n}function nM(r,e,t,a,i,n){var o=t===Ur.determine;M(e,function(u){return M(u,function(h){Ol(h.model)&&(FF(h.axisBuilder,r,h.model),h.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:i}))})});var s={x:0,y:0};l(0),l(1);function l(u){s[dt[1-u]]=r[oe[u]]<=n.refContainer[oe[u]]*.5?0:1-u===1?2:1}M(e,function(u,h){return M(u,function(f){Ol(f.model)&&((a==="all"||o)&&f.axisBuilder.build({axisName:!0},{nameMarginLevel:s[h]}),o&&f.axisBuilder.build({axisLine:!0}))})})}function ZF(r,e,t){var a,i=r.get("outerBoundsMode",!0);i==="same"?a=e.clone():(i==null||i==="auto")&&(a=qt(r.get("outerBounds",!0)||OA,t.refContainer));var n=r.get("outerBoundsContain",!0),o;n==null||n==="auto"||gt(["all","axisLabel"],n)<0?o="all":o=n;var s=[vh(Q(r.get("outerBoundsClampWidth",!0),Kf[0]),e.width),vh(Q(r.get("outerBoundsClampHeight",!0),Kf[1]),e.height)];return{outerBoundsRect:a,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var $F=function(r,e,t,a,i,n){var o=t.axis.dim==="x"?"y":"x";YA(r,e,t,a,i,n),as(r.nameLocation)||M(e.recordMap[o],function(s){s&&s.labelInfoList&&s.dirVec&&$A(s.labelInfoList,s.dirVec,a,i)})};function XF(r,e){var t={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return qF(t,r,e),t.seriesInvolved&&jF(t,r),t}function qF(r,e,t){var a=e.getComponent("tooltip"),i=e.getComponent("axisPointer"),n=i.get("link",!0)||[],o=[];M(t.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var l=jl(s.model),u=r.coordSysAxesInfo[l]={};r.coordSysMap[l]=s;var h=s.model,f=h.getModel("tooltip",a);if(M(s.getAxes(),pt(p,!1,null)),s.getTooltipAxes&&a&&f.get("show")){var v=f.get("trigger")==="axis",c=f.get(["axisPointer","type"])==="cross",d=s.getTooltipAxes(f.get(["axisPointer","axis"]));(v||c)&&M(d.baseAxes,pt(p,c?"cross":!0,v)),c&&M(d.otherAxes,pt(p,"cross",!1))}function p(g,y,m){var _=m.model.getModel("axisPointer",i),x=_.get("show");if(!(!x||x==="auto"&&!g&&!Ty(_))){y==null&&(y=_.get("triggerTooltip")),_=g?KF(m,f,i,e,g,y):_;var b=_.get("snap"),S=_.get("triggerEmphasis"),w=jl(m.model),T=y||b||m.type==="category",C=r.axesInfo[w]={key:w,axis:m,coordSys:s,axisPointerModel:_,triggerTooltip:y,triggerEmphasis:S,involveSeries:T,snap:b,useHandle:Ty(_),seriesModels:[],linkGroup:null};u[w]=C,r.seriesInvolved=r.seriesInvolved||T;var A=JF(n,m);if(A!=null){var D=o[A]||(o[A]={axesInfo:{}});D.axesInfo[w]=C,D.mapper=n[A].mapper,C.linkGroup=D}}}})}function KF(r,e,t,a,i,n){var o=e.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],l={};M(s,function(v){l[v]=at(o.get(v))}),l.snap=r.type!=="category"&&!!n,o.get("type")==="cross"&&(l.type="line");var u=l.label||(l.label={});if(u.show==null&&(u.show=!1),i==="cross"){var h=o.get(["label","show"]);if(u.show=h??!0,!n){var f=l.lineStyle=o.get("crossStyle");f&&st(u,f.textStyle)}}return r.model.getModel("axisPointer",new Ct(l,t,a))}function jF(r,e){e.eachSeries(function(t){var a=t.coordinateSystem,i=t.get(["tooltip","trigger"],!0),n=t.get(["tooltip","show"],!0);!a||!a.model||i==="none"||i===!1||i==="item"||n===!1||t.get(["axisPointer","show"],!0)===!1||M(r.coordSysAxesInfo[jl(a.model)],function(o){var s=o.axis;a.getAxis(s.dim)===s&&(o.seriesModels.push(t),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=t.getData().count())})})}function JF(r,e){for(var t=e.model,a=e.dim,i=0;i<r.length;i++){var n=r[i]||{};if(by(n[a+"AxisId"],t.id)||by(n[a+"AxisIndex"],t.componentIndex)||by(n[a+"AxisName"],t.name))return i}}function by(r,e){return r==="all"||W(r)&&gt(r,e)>=0||r===e}function QF(r){var e=wy(r);if(e){var t=e.axisPointerModel,a=e.axis.scale,i=t.option,n=t.get("status"),o=t.get("value");o!=null&&(o=a.parse(o));var s=Ty(t);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 wy(r){var e=(r.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[jl(r)]}function tH(r){var e=wy(r);return e&&e.axisPointerModel}function Ty(r){return!!r.get(["handle","show"])}function jl(r){return r.type+"||"+r.id}var oM={},Zn=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,i,n){this.axisPointerClass&&QF(t),r.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(t,i,!0)},e.prototype.updateAxisPointer=function(t,a,i,n){this._doUpdateAxisPointerClass(t,i,!1)},e.prototype.remove=function(t,a){var i=this._axisPointer;i&&i.remove(a)},e.prototype.dispose=function(t,a){this._disposeAxisPointer(a),r.prototype.dispose.apply(this,arguments)},e.prototype._doUpdateAxisPointerClass=function(t,a,i){var n=e.getAxisPointerClass(this.axisPointerClass);if(n){var o=tH(t);o?(this._axisPointer||(this._axisPointer=new n)).render(t,o,a,i):this._disposeAxisPointer(a)}},e.prototype._disposeAxisPointer=function(t){this._axisPointer&&this._axisPointer.dispose(t),this._axisPointer=null},e.registerAxisPointerClass=function(t,a){oM[t]=a},e.getAxisPointerClass=function(t){return t&&oM[t]},e.type="axis",e}(Zt),Cy=St();function sM(r,e,t,a){var i=t.axis;if(!i.scale.isBlank()){var n=t.getModel("splitArea"),o=n.getModel("areaStyle"),s=o.get("color"),l=a.coordinateSystem.getRect(),u=i.getTicksCoords({tickModel:n,clamp:!0,breakTicks:"none",pruneByBreak:"preserve_extent_bound"});if(u.length){var h=s.length,f=Cy(r).splitAreaColors,v=J(),c=0;if(f)for(var d=0;d<u.length;d++){var p=f.get(u[d].tickValue);if(p!=null){c=(p+(h-1)*d)%h;break}}var g=i.toGlobalCoord(u[0].coord),y=o.getAreaStyle();s=W(s)?s:[s];for(var d=1;d<u.length;d++){var m=i.toGlobalCoord(u[d].coord),_=void 0,x=void 0,b=void 0,S=void 0;i.isHorizontal()?(_=g,x=l.y,b=m-_,S=l.height,g=_+b):(_=l.x,x=g,b=l.width,S=m-x,g=x+S);var w=u[d-1].tickValue;w!=null&&v.set(w,c),e.add(new _t({anid:w!=null?"area_"+w:null,shape:{x:_,y:x,width:b,height:S},style:st({fill:s[c]},y),autoBatch:!0,silent:!0})),c=(c+1)%h}Cy(r).splitAreaColors=v}}}function lM(r){Cy(r).splitAreaColors=null}var eH=["splitArea","splitLine","minorSplitLine","breakArea"],uM=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="CartesianAxisPointer",t}return e.prototype.render=function(t,a,i,n){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new et,this.group.add(this._axisGroup),!!Ol(t)){this._axisGroup.add(t.axis.axisBuilder.group),M(eH,function(l){t.get([l,"show"])&&rH[l](this,this._axisGroup,t,t.getCoordSysModel(),i)},this);var s=n&&n.type==="changeAxisOrder"&&n.isInitSort;s||il(o,this._axisGroup,t),r.prototype.render.call(this,t,a,i,n)}},e.prototype.remove=function(){lM(this)},e.type="cartesianAxis",e}(Zn),rH={splitLine:function(r,e,t,a,i){var n=t.axis;if(!n.scale.isBlank()){var o=t.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=o.get("showMinLine")!==!1,h=o.get("showMaxLine")!==!1;l=W(l)?l:[l];for(var f=a.coordinateSystem.getRect(),v=n.isHorizontal(),c=0,d=n.getTicksCoords({tickModel:o,breakTicks:"none",pruneByBreak:"preserve_extent_bound"}),p=[],g=[],y=s.getLineStyle(),m=0;m<d.length;m++){var _=n.toGlobalCoord(d[m].coord);if(!(m===0&&!u||m===d.length-1&&!h)){var x=d[m].tickValue;v?(p[0]=_,p[1]=f.y,g[0]=_,g[1]=f.y+f.height):(p[0]=f.x,p[1]=_,g[0]=f.x+f.width,g[1]=_);var b=c++%l.length,S=new Kt({anid:x!=null?"line_"+x:null,autoBatch:!0,shape:{x1:p[0],y1:p[1],x2:g[0],y2:g[1]},style:st({stroke:l[b]},y),silent:!0});Eo(S.shape,y.lineWidth),e.add(S)}}}},minorSplitLine:function(r,e,t,a,i){var n=t.axis,o=t.getModel("minorSplitLine"),s=o.getModel("lineStyle"),l=a.coordinateSystem.getRect(),u=n.isHorizontal(),h=n.getMinorTicksCoords();if(h.length)for(var f=[],v=[],c=s.getLineStyle(),d=0;d<h.length;d++)for(var p=0;p<h[d].length;p++){var g=n.toGlobalCoord(h[d][p].coord);u?(f[0]=g,f[1]=l.y,v[0]=g,v[1]=l.y+l.height):(f[0]=l.x,f[1]=g,v[0]=l.x+l.width,v[1]=g);var y=new Kt({anid:"minor_line_"+h[d][p].tickValue,autoBatch:!0,shape:{x1:f[0],y1:f[1],x2:v[0],y2:v[1]},style:c,silent:!0});Eo(y.shape,c.lineWidth),e.add(y)}},splitArea:function(r,e,t,a,i){sM(r,e,t,a)},breakArea:function(r,e,t,a,i){var n=Xl(),o=t.axis.scale;n&&o.type!=="ordinal"&&n.rectCoordBuildBreakAxis(e,r,t,a.coordinateSystem.getRect(),i)}},hM=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="xAxis",e}(uM),aH=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=hM.type,t}return e.type="yAxis",e}(uM),iH=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="grid",t}return e.prototype.render=function(t,a){this.group.removeAll(),t.get("show")&&this.group.add(new _t({shape:t.coordinateSystem.getRect(),style:st({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))},e.type="grid",e}(Zt),fM={offset:0};function vM(r){r.registerComponentView(iH),r.registerComponentModel(vF),r.registerCoordinateSystem("cartesian2d",HF),us(r,"x",fy,fM),us(r,"y",fy,fM),r.registerComponentView(hM),r.registerComponentView(aH),r.registerPreprocessor(function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})}function nH(r,e){var t=r.coordinateSystem,a=t&&t.type,i=t&&t.getBaseAxis&&t.getBaseAxis(),n=i&&i.scale&&i.scale.type,o=a==="cartesian2d"&&n==="ordinal"||a==="single",s=e.model.get("jitter")>0;return o&&s}var oH=St();function cM(r,e,t,a){if(r instanceof GA){var i=r.scale.type;if(i!=="category"&&i!=="ordinal")return t}var n=r.model,o=n.get("jitter"),s=n.get("jitterOverlap"),l=n.get("jitterMargin")||0,u=r.scale.type==="ordinal"?r.getBandWidth():null;return o>0?s?dM(t,o,u,a):sH(r,e,t,a,o,l):t}function dM(r,e,t,a){if(t===null)return r+(Math.random()-.5)*e;var i=t-a*2,n=Math.min(Math.max(0,e),i);return r+(Math.random()-.5)*n}function sH(r,e,t,a,i,n){var o=oH(r);o.items||(o.items=[]);var s=o.items,l=pM(s,e,t,a,i,n,1),u=pM(s,e,t,a,i,n,-1),h=Math.abs(l-t)<Math.abs(u-t)?l:u,f=r.scale.type==="ordinal"?r.getBandWidth():null,v=Math.abs(h-t);return v>i/2||f&&v>f/2-a?dM(t,i,f,a):(s.push({fixedCoord:e,floatCoord:h,r:a}),h)}function pM(r,e,t,a,i,n,o){for(var s=t,l=0;l<r.length;l++){var u=r[l],h=e-u.fixedCoord,f=s-u.floatCoord,v=h*h+f*f,c=a+u.r+n;if(v<c*c){var d=u.floatCoord+Math.sqrt(c*c-h*h)*o;if(Math.abs(d-t)>i/2)return Number.MAX_VALUE;if(o===1&&d>s||o===-1&&d<s){s=d,l=-1;continue}}}return s}function lH(r){r.eachSeriesByType("scatter",function(e){var t=e.coordinateSystem;if(t&&(t.type==="cartesian2d"||t.type==="single")){var a=t.getBaseAxis?t.getBaseAxis():null,i=a&&nH(e,a);if(i){var n=e.getData();n.each(function(o){var s=a.dim,l=a.orient,u=l==="horizontal"&&a.type!=="category"||l==="vertical"&&a.type==="category",h=n.getItemLayout(o),f=n.getItemVisual(o,"symbolSize"),v=f instanceof Array?(f[1]+f[0])/2:f;if(s==="y"||s==="single"&&u){var c=cM(a,h[0],h[1],v/2);n.setItemLayout(o,[h[0],c])}else if(s==="x"||s==="single"&&!u){var c=cM(a,h[1],h[0],v/2);n.setItemLayout(o,[c,h[1]])}})}}})}function uH(r){mt(vM),r.registerSeriesModel(sF),r.registerChartView(fF),r.registerLayout(Zl("scatter"))}function hH(r){r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,lH)}function fH(r){r.eachSeriesByType("radar",function(e){var t=e.getData(),a=[],i=e.coordinateSystem;if(i){var n=i.getIndicatorAxes();M(n,function(o,s){t.each(t.mapDimension(n[s].dim),function(l,u){a[u]=a[u]||[];var h=i.dataToPoint(l,s);a[u][s]=gM(h)?h:yM(i)})}),t.each(function(o){var s=Fi(a[o],function(l){return gM(l)})||yM(i);a[o].push(s.slice()),t.setItemLayout(o,a[o])})}})}function gM(r){return!isNaN(r[0])&&!isNaN(r[1])}function yM(r){return[r.cx,r.cy]}function vH(r){var e=r.polar;if(e){W(e)||(e=[e]);var t=[];M(e,function(a,i){a.indicator?(a.type&&!a.shape&&(a.shape=a.type),r.radar=r.radar||[],W(r.radar)||(r.radar=[r.radar]),r.radar.push(a)):t.push(a)}),r.polar=t}M(r.series,function(a){a&&a.type==="radar"&&a.polarIndex&&(a.radarIndex=a.polarIndex)})}var cH=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,i){var n=t.coordinateSystem,o=this.group,s=t.getData(),l=this._data;function u(v,c){var d=v.getItemVisual(c,"symbol")||"circle";if(d!=="none"){var p=$o(v.getItemVisual(c,"symbolSize")),g=he(d,-1,-1,2,2),y=v.getItemVisual(c,"symbolRotate")||0;return g.attr({style:{strokeNoScale:!0},z2:100,scaleX:p[0]/2,scaleY:p[1]/2,rotation:y*Math.PI/180||0}),g}}function h(v,c,d,p,g,y){d.removeAll();for(var m=0;m<c.length-1;m++){var _=u(p,g);_&&(_.__dimIdx=m,v[m]?(_.setPosition(v[m]),bn[y?"initProps":"updateProps"](_,{x:c[m][0],y:c[m][1]},t,g)):_.setPosition(c[m]),d.add(_))}}function f(v){return U(v,function(c){return[n.cx,n.cy]})}s.diff(l).add(function(v){var c=s.getItemLayout(v);if(c){var d=new De,p=new Be,g={shape:{points:c}};d.shape.points=f(c),p.shape.points=f(c),Yt(d,g,t,v),Yt(p,g,t,v);var y=new et,m=new et;y.add(p),y.add(d),y.add(m),h(p.shape.points,c,m,s,v,!0),s.setItemGraphicEl(v,y)}}).update(function(v,c){var d=l.getItemGraphicEl(c),p=d.childAt(0),g=d.childAt(1),y=d.childAt(2),m={shape:{points:s.getItemLayout(v)}};m.shape.points&&(h(p.shape.points,m.shape.points,y,s,v,!1),br(g),br(p),It(p,m,t),It(g,m,t),s.setItemGraphicEl(v,d))}).remove(function(v){o.remove(l.getItemGraphicEl(v))}).execute(),s.eachItemGraphicEl(function(v,c){var d=s.getItemModel(c),p=v.childAt(0),g=v.childAt(1),y=v.childAt(2),m=s.getItemVisual(c,"style"),_=m.fill;o.add(v),p.useStyle(st(d.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:_})),ve(p,d,"lineStyle"),ve(g,d,"areaStyle");var x=d.getModel("areaStyle"),b=x.isEmpty()&&x.parentModel.isEmpty();g.ignore=b,M(["emphasis","select","blur"],function(w){var T=d.getModel([w,"areaStyle"]),C=T.isEmpty()&&T.parentModel.isEmpty();g.ensureState(w).ignore=C&&b;var A=d.getModel([w,"lineStyle"]).getLineStyle();p.ensureState(w).style=A;var D=T.getAreaStyle();g.ensureState(w).style=D;var I=d.getModel([w,"itemStyle"]).getItemStyle();y.eachChild(function(L){L.ensureState(w).style=at(I)})}),g.useStyle(st(d.getModel("areaStyle").getAreaStyle(),{fill:_,opacity:.7,decal:m.decal}));var S=d.getModel("emphasis");y.eachChild(function(w){if(w instanceof Me){var T=w.style;w.useStyle(F({image:T.image,x:T.x,y:T.y,width:T.width,height:T.height},m))}else w.useStyle(m),w.setColor(_),w.style.strokeNoScale=!0;var C=s.getStore().get(s.getDimensionIndex(w.__dimIdx),c);(C==null||isNaN(C))&&(C=""),ye(w,ce(d),{labelFetcher:s.hostModel,labelDataIndex:c,labelDimIndex:w.__dimIdx,defaultText:C,inheritColor:_,defaultOpacity:m.opacity})}),Xt(v,S.get("focus"),S.get("blurScope"),S.get("disabled"))}),this._data=s},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.type="radar",e}(zt),dH=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new ls(X(this.getData,this),X(this.getRawData,this))},e.prototype.getInitialData=function(t,a){return ss(this,{generateCoord:"indicator_",generateCoordCount:1/0})},e.prototype.formatTooltip=function(t,a,i){var n=this.getData(),o=this.coordinateSystem,s=o.getIndicatorAxes(),l=this.getData().getName(t),u=l===""?this.name:l,h=uw(this,t);return ue("section",{header:u,sortBlocks:!0,blocks:U(s,function(f){var v=n.get(n.mapDimension(f.dim),t);return ue("nameValue",{markerType:"subItem",markerColor:h,name:f.name,value:v,sortParam:v})})})},e.prototype.getTooltipPosition=function(t){if(t!=null){for(var a=this.getData(),i=this.coordinateSystem,n=a.getValues(U(i.dimensions,function(u){return a.mapDimension(u)}),t),o=0,s=n.length;o<s;o++)if(!isNaN(n[o])){var l=i.getIndicatorAxes();return i.coordToPoint(l[o].dataToCoord(n[o]),o)}}},e.type="series.radar",e.dependencies=["radar"],e.defaultOption={z:2,colorBy:"data",coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid",join:"round"},label:{position:"top"},symbolSize:8},e}(Ht),Jl=BA.value;function tv(r,e){return st({show:e},r)}var pH=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){var t=this.get("boundaryGap"),a=this.get("splitNumber"),i=this.get("scale"),n=this.get("axisLine"),o=this.get("axisTick"),s=this.get("axisLabel"),l=this.get("axisName"),u=this.get(["axisName","show"]),h=this.get(["axisName","formatter"]),f=this.get("axisNameGap"),v=this.get("triggerEvent"),c=U(this.get("indicator")||[],function(d){d.max!=null&&d.max>0&&!d.min?d.min=0:d.min!=null&&d.min<0&&!d.max&&(d.max=0);var p=l;d.color!=null&&(p=st({color:d.color},l));var g=yt(at(d),{boundaryGap:t,splitNumber:a,scale:i,axisLine:n,axisTick:o,axisLabel:s,name:d.text,showName:u,nameLocation:"end",nameGap:f,nameTextStyle:p,triggerEvent:v},!1);if($(h)){var y=g.name;g.name=h.replace("{value}",y??"")}else rt(h)&&(g.name=h(g.name,g));var m=new Ct(g,null,this.ecModel);return ie(m,Nl.prototype),m.mainType="radar",m.componentIndex=this.componentIndex,m},this);this._indicatorModels=c},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"50%",startAngle:90,axisName:{show:!0,color:B.color.axisLabel},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:yt({lineStyle:{color:B.color.neutral20}},Jl.axisLine),axisLabel:tv(Jl.axisLabel,!1),axisTick:tv(Jl.axisTick,!1),splitLine:tv(Jl.splitLine,!0),splitArea:tv(Jl.splitArea,!0),indicator:[]},e}(Tt),gH=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,i){var n=this.group;n.removeAll(),this._buildAxes(t,i),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t,a){var i=t.coordinateSystem,n=i.getIndicatorAxes(),o=U(n,function(s){var l=s.model.get("showName")?s.name:"",u=new $e(s.model,a,{axisName:l,position:[i.cx,i.cy],rotation:s.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return u});M(o,function(s){s.build(),this.group.add(s.group)},this)},e.prototype._buildSplitLineAndArea=function(t){var a=t.coordinateSystem,i=a.getIndicatorAxes();if(!i.length)return;var n=t.get("shape"),o=t.getModel("splitLine"),s=t.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),h=o.get("show"),f=s.get("show"),v=l.get("color"),c=u.get("color"),d=W(v)?v:[v],p=W(c)?c:[c],g=[],y=[];function m(k,R,O){var E=O%R.length;return k[E]=k[E]||[],E}if(n==="circle")for(var _=i[0].getTicksCoords(),x=a.cx,b=a.cy,S=0;S<_.length;S++){if(h){var w=m(g,d,S);g[w].push(new Sr({shape:{cx:x,cy:b,r:_[S].coord}}))}if(f&&S<_.length-1){var w=m(y,p,S);y[w].push(new kh({shape:{cx:x,cy:b,r0:_[S].coord,r:_[S+1].coord}}))}}else for(var T,C=U(i,function(k,R){var O=k.getTicksCoords();return T=T==null?O.length-1:Math.min(O.length-1,T),U(O,function(E){return a.coordToPoint(E.coord,R)})}),A=[],S=0;S<=T;S++){for(var D=[],I=0;I<i.length;I++)D.push(C[I][S]);if(D[0]&&D.push(D[0].slice()),h){var w=m(g,d,S);g[w].push(new Be({shape:{points:D}}))}if(f&&A){var w=m(y,p,S-1);y[w].push(new De({shape:{points:D.concat(A)}}))}A=D.slice().reverse()}var L=l.getLineStyle(),P=u.getAreaStyle();M(y,function(k,R){this.group.add(wr(k,{style:st({stroke:"none",fill:p[R%p.length]},P),silent:!0}))},this),M(g,function(k,R){this.group.add(wr(k,{style:st({fill:"none",stroke:d[R%d.length]},L),silent:!0}))},this)},e.type="radar",e}(Zt),yH=function(r){z(e,r);function e(t,a,i){var n=r.call(this,t,a,i)||this;return n.type="value",n.angle=0,n.name="",n}return e}(Yr),mH=function(){function r(e,t,a){this.dimensions=[],this._model=e,this._indicatorAxes=U(e.getIndicatorModels(),function(i,n){var o="indicator_"+n,s=new yH(o,new Wa);return s.name=i.get("name"),s.model=i,i.axis=s,this.dimensions.push(o),s},this),this.resize(e,a)}return r.prototype.getIndicatorAxes=function(){return this._indicatorAxes},r.prototype.dataToPoint=function(e,t){var a=this._indicatorAxes[t];return this.coordToPoint(a.dataToCoord(e),t)},r.prototype.coordToPoint=function(e,t){var a=this._indicatorAxes[t],i=a.angle,n=this.cx+e*Math.cos(i),o=this.cy-e*Math.sin(i);return[n,o]},r.prototype.pointToData=function(e){var t=e[0]-this.cx,a=e[1]-this.cy,i=Math.sqrt(t*t+a*a);t/=i,a/=i;for(var n=Math.atan2(-a,t),o=1/0,s,l=-1,u=0;u<this._indicatorAxes.length;u++){var h=this._indicatorAxes[u],f=Math.abs(n-h.angle);f<o&&(s=h,l=u,o=f)}return[l,+(s&&s.coordToData(i))]},r.prototype.resize=function(e,t){var a=de(e,t).refContainer,i=e.get("center"),n=Math.min(a.width,a.height)/2;this.cx=Z(i[0],a.width)+a.x,this.cy=Z(i[1],a.height)+a.y,this.startAngle=e.get("startAngle")*Math.PI/180;var o=e.get("radius");($(o)||Dt(o))&&(o=[0,o]),this.r0=Z(o[0],n),this.r=Z(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)},r.prototype.update=function(e,t){var a=this._indicatorAxes,i=this._model;M(a,function(s){s.scale.setExtent(1/0,-1/0)}),e.eachSeriesByType("radar",function(s,l){if(!(s.get("coordinateSystem")!=="radar"||e.getComponent("radar",s.get("radarIndex"))!==i)){var u=s.getData();M(a,function(h){h.scale.unionExtentFromData(u,u.mapDimension(h.dim))})}},this);var n=i.get("splitNumber"),o=new Wa;o.setExtent(0,n),o.setInterval(1),M(a,function(s,l){QA(s.scale,s.model,o)})},r.prototype.convertToPixel=function(e,t,a){return console.warn("Not implemented."),null},r.prototype.convertFromPixel=function(e,t,a){return console.warn("Not implemented."),null},r.prototype.containPoint=function(e){return console.warn("Not implemented."),!1},r.create=function(e,t){var a=[];return e.eachComponent("radar",function(i){var n=new r(i,e,t);a.push(n),i.coordinateSystem=n}),e.eachSeriesByType("radar",function(i){i.get("coordinateSystem")==="radar"&&(i.coordinateSystem=a[i.get("radarIndex")||0])}),a},r.dimensions=[],r}();function _H(r){r.registerCoordinateSystem("radar",mH),r.registerComponentModel(pH),r.registerComponentView(gH),r.registerVisual({seriesType:"radar",reset:function(e){var t=e.getData();t.each(function(a){t.setItemVisual(a,"legendIcon","roundRect")}),t.setVisual("legendIcon","roundRect")}})}function xH(r){mt(_H),r.registerChartView(cH),r.registerSeriesModel(dH),r.registerLayout(fH),r.registerProcessor(os("radar")),r.registerPreprocessor(vH)}var Ay=St();function SH(r,e,t){Ay(r)[e]=t}function bH(r,e,t){var a=Ay(r),i=a[e];i===t&&(a[e]=null)}function mM(r,e){return!!Ay(r)[e]}ca({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},Qt);var wH={axisPointer:1,tooltip:1,brush:1};function _M(r,e,t){var a=e.getComponentByElement(r.topTarget);if(!a||a===t||wH.hasOwnProperty(a.mainType))return!1;var i=a.coordinateSystem;if(!i||i.model===t)return!1;var n=Sn(a),o=Sn(t);return!((n.zlevel-o.zlevel||n.z-o.z)<=0)}var $n=function(r){z(e,r);function e(t){var a=r.call(this)||this;a._zr=t;var i=X(a._mousedownHandler,a),n=X(a._mousemoveHandler,a),o=X(a._mouseupHandler,a),s=X(a._mousewheelHandler,a),l=X(a._pinchHandler,a);return a.enable=function(u,h){var f=h.zInfo,v=Sn(f.component),c=v.z,d=v.zlevel,p={component:f.component,z:c,zlevel:d,z2:Q(f.z2,-1/0)},g=F({},h.triggerInfo);this._opt=st(F({},h),{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0,zInfoParsed:p,triggerInfo:g}),u==null&&(u=!0),(!this._enabled||this._controlType!==u)&&(this._enabled=!0,this.disable(),(u===!0||u==="move"||u==="pan")&&(tu(t,"mousedown",i,p),tu(t,"mousemove",n,p),tu(t,"mouseup",o,p)),(u===!0||u==="scale"||u==="zoom")&&(tu(t,"mousewheel",s,p),tu(t,"pinch",l,p)))},a.disable=function(){this._enabled=!1,eu(t,"mousedown",i),eu(t,"mousemove",n),eu(t,"mouseup",o),eu(t,"mousewheel",s),eu(t,"pinch",l)},a}return e.prototype.isDragging=function(){return this._dragging},e.prototype.isPinching=function(){return this._pinching},e.prototype._checkPointer=function(t,a,i){var n=this._opt,o=n.zInfoParsed;if(_M(t,n.api,o.component))return!1;var s=n.triggerInfo,l=s.roamTrigger,u=!1;return l==="global"&&(u=!0),u||(u=s.isInSelf(t,a,i)),u&&s.isInClip&&!s.isInClip(t,a,i)&&(u=!1),u},e.prototype._decideCursorStyle=function(t,a,i,n){var o=t.target;if(!o&&this._checkPointer(t,a,i))return"grab";if(n)return o&&o.cursor||"default"},e.prototype.dispose=function(){this.disable()},e.prototype._mousedownHandler=function(t){if(!(P_(t)||Ql(t))){for(var a=t.target;a;){if(a.draggable)return;a=a.__hostTarget||a.parent}var i=t.offsetX,n=t.offsetY;this._checkPointer(t,i,n)&&(this._x=i,this._y=n,this._dragging=!0)}},e.prototype._mousemoveHandler=function(t){var a=this._zr;if(!(t.gestureEvent==="pinch"||mM(a,"globalPan")||Ql(t))){var i=t.offsetX,n=t.offsetY;if(!this._dragging||!rv("moveOnMouseMove",t,this._opt)){var o=this._decideCursorStyle(t,i,n,!1);o&&a.setCursorStyle(o);return}a.setCursorStyle("grabbing");var s=this._x,l=this._y,u=i-s,h=n-l;this._x=i,this._y=n,this._opt.preventDefaultMouseMove&&Da(t.event),t.__ecRoamConsumed=!0,xM(this,"pan","moveOnMouseMove",t,{dx:u,dy:h,oldX:s,oldY:l,newX:i,newY:n,isAvailableBehavior:null})}},e.prototype._mouseupHandler=function(t){if(!Ql(t)){var a=this._zr;if(!P_(t)){this._dragging=!1;var i=this._decideCursorStyle(t,t.offsetX,t.offsetY,!0);i&&a.setCursorStyle(i)}}},e.prototype._mousewheelHandler=function(t){if(!Ql(t)){var a=rv("zoomOnMouseWheel",t,this._opt),i=rv("moveOnMouseWheel",t,this._opt),n=t.wheelDelta,o=Math.abs(n),s=t.offsetX,l=t.offsetY;if(!(n===0||!a&&!i)){if(a){var u=o>3?1.4:o>1?1.2:1.1,h=n>0?u:1/u;this._checkTriggerMoveZoom(this,"zoom","zoomOnMouseWheel",t,{scale:h,originX:s,originY:l,isAvailableBehavior:null})}if(i){var f=Math.abs(n),v=(n>0?1:-1)*(f>3?.4:f>1?.15:.05);this._checkTriggerMoveZoom(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:v,originX:s,originY:l,isAvailableBehavior:null})}}}},e.prototype._pinchHandler=function(t){if(!(mM(this._zr,"globalPan")||Ql(t))){var a=t.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,"zoom",null,t,{scale:a,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})}},e.prototype._checkTriggerMoveZoom=function(t,a,i,n,o){t._checkPointer(n,o.originX,o.originY)&&(Da(n.event),n.__ecRoamConsumed=!0,xM(t,a,i,n,o))},e}(dr);function Ql(r){return r.__ecRoamConsumed}var TH=St();function ev(r){var e=TH(r);return e.roam=e.roam||{},e.uniform=e.uniform||{},e}function tu(r,e,t,a){for(var i=ev(r),n=i.roam,o=n[e]=n[e]||[],s=0;s<o.length;s++){var l=o[s].zInfoParsed;if((l.zlevel-a.zlevel||l.z-a.z||l.z2-a.z2)<=0)break}o.splice(s,0,{listener:t,zInfoParsed:a}),CH(r,e)}function eu(r,e,t){for(var a=ev(r),i=a.roam[e]||[],n=0;n<i.length;n++)if(i[n].listener===t){i.splice(n,1),i.length||AH(r,e);return}}function CH(r,e){var t=ev(r);t.uniform[e]||r.on(e,t.uniform[e]=function(a){var i=t.roam[e];if(i)for(var n=0;n<i.length;n++)i[n].listener(a)})}function AH(r,e){var t=ev(r),a=t.uniform;a[e]&&(r.off(e,a[e]),a[e]=null)}function xM(r,e,t,a,i){i.isAvailableBehavior=X(rv,null,t,a),r.trigger(e,i)}function rv(r,e,t){var a=t[r];return!r||a&&(!$(a)||e.event[a+"Key"])}function My(r,e,t){var a=r.target;a.x+=e,a.y+=t,a.dirty()}function Dy(r,e,t,a){var i=r.target,n=r.zoomLimit,o=r.zoom=r.zoom||1;o*=e,o=Ly(o,n);var s=o/r.zoom;r.zoom=o,wM(i,t,a,s),i.dirty()}function SM(r,e,t,a,i,n){var o=new ht(0,0,0,0);a.enable(r.get("roam"),{api:e,zInfo:{component:r},triggerInfo:{roamTrigger:r.get("roamTrigger"),isInSelf:function(u,h,f){return o.copy(t.getBoundingRect()),o.applyTransform(t.getComputedTransform()),o.contain(h,f)},isInClip:function(u,h,f){return!n||n.contain(h,f)}}}),i.zoomLimit=r.get("scaleLimit");var s=r.coordinateSystem;i.zoom=s?s.getZoom():1;var l=r.subType+"Roam";a.off("pan").off("zoom").on("pan",function(u){My(i,u.dx,u.dy),e.dispatchAction({seriesId:r.id,type:l,dx:u.dx,dy:u.dy})}).on("zoom",function(u){Dy(i,u.scale,u.originX,u.originY),e.dispatchAction({seriesId:r.id,type:l,zoom:u.scale,originX:u.originX,originY:u.originY}),e.updateLabelLayout()})}function bM(r,e){return r.pointToProjected?r.pointToProjected(e):r.pointToData(e)}function av(r,e,t){var a=r.getZoom(),i=r.getCenter(),n=e.zoom,o=r.projectedToPoint?r.projectedToPoint(i):r.dataToPoint(i);return e.dx!=null&&e.dy!=null&&(o[0]-=e.dx,o[1]-=e.dy,r.setCenter(bM(r,o))),n!=null&&(n=Ly(a*n,t)/a,wM(r,e.originX,e.originY,n),r.updateTransform(),r.setCenter(bM(r,o)),r.setZoom(n*a)),{center:r.getCenter(),zoom:r.getZoom()}}function wM(r,e,t,a){r.x-=(e-r.x)*(a-1),r.y-=(t-r.y)*(a-1),r.scaleX*=a,r.scaleY*=a}function Ly(r,e){if(e){var t=e.min||0,a=e.max||1/0;r=Math.max(Math.min(a,r),t)}return r}function TM(r){if($(r)){var e=new DOMParser;r=e.parseFromString(r,"text/xml")}var t=r;for(t.nodeType===9&&(t=t.firstChild);t.nodeName.toLowerCase()!=="svg"||t.nodeType!==1;)t=t.nextSibling;return t}var Iy,iv={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-anchor":"textAlign",visibility:"visibility",display:"display"},CM=Mt(iv),nv={"alignment-baseline":"textBaseline","stop-color":"stopColor"},AM=Mt(nv),MH=function(){function r(){this._defs={},this._root=null}return r.prototype.parse=function(e,t){t=t||{};var a=TM(e);this._defsUsePending=[];var i=new et;this._root=i;var n=[],o=a.getAttribute("viewBox")||"",s=parseFloat(a.getAttribute("width")||t.width),l=parseFloat(a.getAttribute("height")||t.height);isNaN(s)&&(s=null),isNaN(l)&&(l=null),hr(a,i,null,!0,!1);for(var u=a.firstChild;u;)this._parseNode(u,i,n,null,!1,!1),u=u.nextSibling;IH(this._defs,this._defsUsePending),this._defsUsePending=[];var h,f;if(o){var v=ov(o);v.length>=4&&(h={x:parseFloat(v[0]||0),y:parseFloat(v[1]||0),width:parseFloat(v[2]),height:parseFloat(v[3])})}if(h&&s!=null&&l!=null&&(f=EM(h,{x:0,y:0,width:s,height:l}),!t.ignoreViewBox)){var c=i;i=new et,i.add(c),c.scaleX=c.scaleY=f.scale,c.x=f.x,c.y=f.y}return!t.ignoreRootClip&&s!=null&&l!=null&&i.setClipPath(new _t({shape:{x:0,y:0,width:s,height:l}})),{root:i,width:s,height:l,viewBoxRect:h,viewBoxTransform:f,named:n}},r.prototype._parseNode=function(e,t,a,i,n,o){var s=e.nodeName.toLowerCase(),l,u=i;if(s==="defs"&&(n=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=t;else{if(!n){var h=Iy[s];if(h&&K(Iy,s)){l=h.call(this,e,t);var f=e.getAttribute("name");if(f){var v={name:f,namedFrom:null,svgNodeTagLower:s,el:l};a.push(v),s==="g"&&(u=v)}else i&&a.push({name:i.name,namedFrom:i,svgNodeTagLower:s,el:l});t.add(l)}}var c=MM[s];if(c&&K(MM,s)){var d=c.call(this,e),p=e.getAttribute("id");p&&(this._defs[p]=d)}}if(l&&l.isGroup)for(var g=e.firstChild;g;)g.nodeType===1?this._parseNode(g,l,a,u,n,o):g.nodeType===3&&o&&this._parseText(g,l),g=g.nextSibling},r.prototype._parseText=function(e,t){var a=new Co({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});Mr(t,a),hr(e,a,this._defsUsePending,!1,!1),DH(a,t);var i=a.style,n=i.fontSize;n&&n<9&&(i.fontSize=9,a.scaleX*=n/9,a.scaleY*=n/9);var o=(i.fontSize||i.fontFamily)&&[i.fontStyle,i.fontWeight,(i.fontSize||12)+"px",i.fontFamily||"sans-serif"].join(" ");i.font=o;var s=a.getBoundingRect();return this._textX+=s.width,t.add(a),a},r.internalField=function(){Iy={g:function(e,t){var a=new et;return Mr(t,a),hr(e,a,this._defsUsePending,!1,!1),a},rect:function(e,t){var a=new _t;return Mr(t,a),hr(e,a,this._defsUsePending,!1,!1),a.setShape({x:parseFloat(e.getAttribute("x")||"0"),y:parseFloat(e.getAttribute("y")||"0"),width:parseFloat(e.getAttribute("width")||"0"),height:parseFloat(e.getAttribute("height")||"0")}),a.silent=!0,a},circle:function(e,t){var a=new Sr;return Mr(t,a),hr(e,a,this._defsUsePending,!1,!1),a.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),r:parseFloat(e.getAttribute("r")||"0")}),a.silent=!0,a},line:function(e,t){var a=new Kt;return Mr(t,a),hr(e,a,this._defsUsePending,!1,!1),a.setShape({x1:parseFloat(e.getAttribute("x1")||"0"),y1:parseFloat(e.getAttribute("y1")||"0"),x2:parseFloat(e.getAttribute("x2")||"0"),y2:parseFloat(e.getAttribute("y2")||"0")}),a.silent=!0,a},ellipse:function(e,t){var a=new tp;return Mr(t,a),hr(e,a,this._defsUsePending,!1,!1),a.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),rx:parseFloat(e.getAttribute("rx")||"0"),ry:parseFloat(e.getAttribute("ry")||"0")}),a.silent=!0,a},polygon:function(e,t){var a=e.getAttribute("points"),i;a&&(i=IM(a));var n=new De({shape:{points:i||[]},silent:!0});return Mr(t,n),hr(e,n,this._defsUsePending,!1,!1),n},polyline:function(e,t){var a=e.getAttribute("points"),i;a&&(i=IM(a));var n=new Be({shape:{points:i||[]},silent:!0});return Mr(t,n),hr(e,n,this._defsUsePending,!1,!1),n},image:function(e,t){var a=new Me;return Mr(t,a),hr(e,a,this._defsUsePending,!1,!1),a.setStyle({image:e.getAttribute("xlink:href")||e.getAttribute("href"),x:+e.getAttribute("x"),y:+e.getAttribute("y"),width:+e.getAttribute("width"),height:+e.getAttribute("height")}),a.silent=!0,a},text:function(e,t){var a=e.getAttribute("x")||"0",i=e.getAttribute("y")||"0",n=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0";this._textX=parseFloat(a)+parseFloat(n),this._textY=parseFloat(i)+parseFloat(o);var s=new et;return Mr(t,s),hr(e,s,this._defsUsePending,!1,!0),s},tspan:function(e,t){var a=e.getAttribute("x"),i=e.getAttribute("y");a!=null&&(this._textX=parseFloat(a)),i!=null&&(this._textY=parseFloat(i));var n=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0",s=new et;return Mr(t,s),hr(e,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(n),this._textY+=parseFloat(o),s},path:function(e,t){var a=e.getAttribute("d")||"",i=rS(a);return Mr(t,i),hr(e,i,this._defsUsePending,!1,!1),i.silent=!0,i}}}(),r}(),MM={lineargradient:function(r){var e=parseInt(r.getAttribute("x1")||"0",10),t=parseInt(r.getAttribute("y1")||"0",10),a=parseInt(r.getAttribute("x2")||"10",10),i=parseInt(r.getAttribute("y2")||"0",10),n=new Po(e,t,a,i);return DM(r,n),LM(r,n),n},radialgradient:function(r){var e=parseInt(r.getAttribute("cx")||"0",10),t=parseInt(r.getAttribute("cy")||"0",10),a=parseInt(r.getAttribute("r")||"0",10),i=new yS(e,t,a);return DM(r,i),LM(r,i),i}};function DM(r,e){var t=r.getAttribute("gradientUnits");t==="userSpaceOnUse"&&(e.global=!0)}function LM(r,e){for(var t=r.firstChild;t;){if(t.nodeType===1&&t.nodeName.toLocaleLowerCase()==="stop"){var a=t.getAttribute("offset"),i=void 0;a&&a.indexOf("%")>0?i=parseInt(a,10)/100:a?i=parseFloat(a):i=0;var n={};RM(t,n,n);var o=n.stopColor||t.getAttribute("stop-color")||"#000000",s=n.stopOpacity||t.getAttribute("stop-opacity");if(s){var l=qe(o),u=l&&l[3];u&&(l[3]*=oi(s),o=Jr(l,"rgba"))}e.colorStops.push({offset:i,color:o})}t=t.nextSibling}}function Mr(r,e){r&&r.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),st(e.__inheritedStyle,r.__inheritedStyle))}function IM(r){for(var e=ov(r),t=[],a=0;a<e.length;a+=2){var i=parseFloat(e[a]),n=parseFloat(e[a+1]);t.push([i,n])}return t}function hr(r,e,t,a,i){var n=e,o=n.__inheritedStyle=n.__inheritedStyle||{},s={};r.nodeType===1&&(RH(r,e),RM(r,o,s),a||EH(r,o,s)),n.style=n.style||{},o.fill!=null&&(n.style.fill=PM(n,"fill",o.fill,t)),o.stroke!=null&&(n.style.stroke=PM(n,"stroke",o.stroke,t)),M(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(l){o[l]!=null&&(n.style[l]=parseFloat(o[l]))}),M(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign"],function(l){o[l]!=null&&(n.style[l]=o[l])}),i&&(n.__selfStyle=s),o.lineDash&&(n.style.lineDash=U(ov(o.lineDash),function(l){return parseFloat(l)})),(o.visibility==="hidden"||o.visibility==="collapse")&&(n.invisible=!0),o.display==="none"&&(n.ignore=!0)}function DH(r,e){var t=e.__selfStyle;if(t){var a=t.textBaseline,i=a;!a||a==="auto"||a==="baseline"?i="alphabetic":a==="before-edge"||a==="text-before-edge"?i="top":a==="after-edge"||a==="text-after-edge"?i="bottom":(a==="central"||a==="mathematical")&&(i="middle"),r.style.textBaseline=i}var n=e.__inheritedStyle;if(n){var o=n.textAlign,s=o;o&&(o==="middle"&&(s="center"),r.style.textAlign=s)}}var LH=/^url\(\s*#(.*?)\)/;function PM(r,e,t,a){var i=t&&t.match(LH);if(i){var n=cr(i[1]);a.push([r,e,n]);return}return t==="none"&&(t=null),t}function IH(r,e){for(var t=0;t<e.length;t++){var a=e[t];a[0].style[a[1]]=r[a[2]]}}var PH=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function ov(r){return r.match(PH)||[]}var kH=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g,Py=Math.PI/180;function RH(r,e){var t=r.getAttribute("transform");if(t){t=t.replace(/,/g," ");var a=[],i=null;t.replace(kH,function(f,v,c){return a.push(v,c),""});for(var n=a.length-1;n>0;n-=2){var o=a[n],s=a[n-1],l=ov(o);switch(i=i||Se(),s){case"translate":Kr(i,i,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":Cc(i,i,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":ri(i,i,-parseFloat(l[0])*Py,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*Py);qr(i,[1,0,u,1,0,0],i);break;case"skewY":var h=Math.tan(parseFloat(l[0])*Py);qr(i,[1,h,0,1,0,0],i);break;case"matrix":i[0]=parseFloat(l[0]),i[1]=parseFloat(l[1]),i[2]=parseFloat(l[2]),i[3]=parseFloat(l[3]),i[4]=parseFloat(l[4]),i[5]=parseFloat(l[5]);break}}e.setLocalTransform(i)}}var kM=/([^\s:;]+)\s*:\s*([^:;]+)/g;function RM(r,e,t){var a=r.getAttribute("style");if(a){kM.lastIndex=0;for(var i;(i=kM.exec(a))!=null;){var n=i[1],o=K(iv,n)?iv[n]:null;o&&(e[o]=i[2]);var s=K(nv,n)?nv[n]:null;s&&(t[s]=i[2])}}}function EH(r,e,t){for(var a=0;a<CM.length;a++){var i=CM[a],n=r.getAttribute(i);n!=null&&(e[iv[i]]=n)}for(var a=0;a<AM.length;a++){var i=AM[a],n=r.getAttribute(i);n!=null&&(t[nv[i]]=n)}}function EM(r,e){var t=e.width/r.width,a=e.height/r.height,i=Math.min(t,a);return{scale:i,x:-(r.x+r.width/2)*i+(e.x+e.width/2),y:-(r.y+r.height/2)*i+(e.y+e.height/2)}}function OH(r,e){var t=new MH;return t.parse(r,e)}var NH=J(["rect","circle","line","ellipse","polygon","polyline","path","text","tspan","g"]),BH=function(){function r(e,t){this.type="geoSVG",this._usedGraphicMap=J(),this._freedGraphics=[],this._mapName=e,this._parsedXML=TM(t)}return r.prototype.load=function(){var e=this._firstGraphic;if(!e){e=this._firstGraphic=this._buildGraphic(this._parsedXML),this._freedGraphics.push(e),this._boundingRect=this._firstGraphic.boundingRect.clone();var t=VH(e.named),a=t.regions,i=t.regionsMap;this._regions=a,this._regionsMap=i}return{boundingRect:this._boundingRect,regions:this._regions,regionsMap:this._regionsMap}},r.prototype._buildGraphic=function(e){var t,a;try{t=e&&OH(e,{ignoreViewBox:!0,ignoreRootClip:!0})||{},a=t.root,Ee(a!=null)}catch(g){throw new Error(`Invalid svg format
67
+ `+g.message)}var i=new et;i.add(a),i.isGeoSVGGraphicRoot=!0;var n=t.width,o=t.height,s=t.viewBoxRect,l=this._boundingRect;if(!l){var u=void 0,h=void 0,f=void 0,v=void 0;if(n!=null?(u=0,f=n):s&&(u=s.x,f=s.width),o!=null?(h=0,v=o):s&&(h=s.y,v=s.height),u==null||h==null){var c=a.getBoundingRect();u==null&&(u=c.x,f=c.width),h==null&&(h=c.y,v=c.height)}l=this._boundingRect=new ht(u,h,f,v)}if(s){var d=EM(s,l);a.scaleX=a.scaleY=d.scale,a.x=d.x,a.y=d.y}i.setClipPath(new _t({shape:l.plain()}));var p=[];return M(t.named,function(g){NH.get(g.svgNodeTagLower)!=null&&(p.push(g),zH(g.el))}),{root:i,boundingRect:l,named:p}},r.prototype.useGraphic=function(e){var t=this._usedGraphicMap,a=t.get(e);return a||(a=this._freedGraphics.pop()||this._buildGraphic(this._parsedXML),t.set(e,a),a)},r.prototype.freeGraphic=function(e){var t=this._usedGraphicMap,a=t.get(e);a&&(t.removeKey(e),this._freedGraphics.push(a))},r}();function zH(r){r.silent=!1,r.isGroup&&r.traverse(function(e){e.silent=!1})}function VH(r){var e=[],t=J();return M(r,function(a){if(a.namedFrom==null){var i=new QV(a.name,a.el);e.push(i),t.set(a.name,i)}}),{regions:e,regionsMap:t}}for(var ky=[126,25],OM="\u5357\u6D77\u8BF8\u5C9B",Xn=[[[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]]],qn=0;qn<Xn.length;qn++)for(var fs=0;fs<Xn[qn].length;fs++)Xn[qn][fs][0]/=10.5,Xn[qn][fs][1]/=-10.5/.75,Xn[qn][fs][0]+=ky[0],Xn[qn][fs][1]+=ky[1];function GH(r,e){if(r==="china"){for(var t=0;t<e.length;t++)if(e[t].name===OM)return;e.push(new eC(OM,U(Xn,function(a){return{type:"polygon",exterior:a}}),ky))}}var FH={\u5357\u6D77\u8BF8\u5C9B:[32,80],\u5E7F\u4E1C:[0,-10],\u9999\u6E2F:[10,5],\u6FB3\u95E8:[-10,10],\u5929\u6D25:[5,5]};function HH(r,e){if(r==="china"){var t=FH[e.name];if(t){var a=e.getCenter();a[0]+=t[0]/10.5,a[1]+=-t[1]/(10.5/.75),e.setCenter(a)}}}var WH=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];function UH(r,e){r==="china"&&e.name==="\u53F0\u6E7E"&&e.geometries.push({type:"polygon",exterior:WH[0]})}var YH="name",ZH=function(){function r(e,t,a){this.type="geoJSON",this._parsedMap=J(),this._mapName=e,this._specialAreas=a,this._geoJSON=XH(t)}return r.prototype.load=function(e,t){t=t||YH;var a=this._parsedMap.get(t);if(!a){var i=this._parseToRegions(t);a=this._parsedMap.set(t,{regions:i,boundingRect:$H(i)})}var n=J(),o=[];return M(a.regions,function(s){var l=s.name;e&&K(e,l)&&(s=s.cloneShallow(l=e[l])),o.push(s),n.set(l,s)}),{regions:o,boundingRect:a.boundingRect||new ht(0,0,0,0),regionsMap:n}},r.prototype._parseToRegions=function(e){var t=this._mapName,a=this._geoJSON,i;try{i=a?eG(a,e):[]}catch(n){throw new Error(`Invalid geoJson format
68
+ `+n.message)}return GH(t,i),M(i,function(n){var o=n.name;HH(t,n),UH(t,n);var s=this._specialAreas&&this._specialAreas[o];s&&n.transformTo(s.left,s.top,s.width,s.height)},this),i},r.prototype.getMapForUser=function(){return{geoJson:this._geoJSON,geoJSON:this._geoJSON,specialAreas:this._specialAreas}},r}();function $H(r){for(var e,t=0;t<r.length;t++){var a=r[t].getBoundingRect();e=e||a.clone(),e.union(a)}return e}function XH(r){return $(r)?typeof JSON<"u"&&JSON.parse?JSON.parse(r):new Function("return ("+r+");")():r}var ru=J(),Ya={registerMap:function(r,e,t){if(e.svg){var a=new BH(r,e.svg);ru.set(r,a)}else{var i=e.geoJson||e.geoJSON;i&&!e.features?t=e.specialAreas:i=e;var a=new ZH(r,i,t);ru.set(r,a)}},getGeoResource:function(r){return ru.get(r)},getMapForUser:function(r){var e=ru.get(r);return e&&e.type==="geoJSON"&&e.getMapForUser()},load:function(r,e,t){var a=ru.get(r);if(a)return a.load(e,t)}},Ry=["rect","circle","line","ellipse","polygon","polyline","path"],qH=J(Ry),KH=J(Ry.concat(["g"])),jH=J(Ry.concat(["g"])),NM=St();function sv(r){var e=r.getItemStyle(),t=r.get("areaColor");return t!=null&&(e.fill=t),e}function BM(r){var e=r.style;e&&(e.stroke=e.stroke||e.fill,e.fill=null)}var zM=function(){function r(e){var t=this.group=new et,a=this._transformGroup=new et;t.add(a),this.uid=Bo("ec_map_draw"),this._controller=new $n(e.getZr()),this._controllerHost={target:a},a.add(this._regionsGroup=new et),a.add(this._svgGroup=new et)}return r.prototype.draw=function(e,t,a,i,n){var o=e.mainType==="geo",s=e.getData&&e.getData();o&&t.eachComponent({mainType:"series",subType:"map"},function(_){!s&&_.getHostGeoModel()===e&&(s=_.getData())});var l=e.coordinateSystem,u=this._regionsGroup,h=this._transformGroup,f=l.getTransformInfo(),v=f.raw,c=f.roam,d=!u.childAt(0)||n,p=e.getShallow("clip",!0),g;p?(g=l.getViewRect().clone(),this.group.setClipPath(new _t({shape:g.clone()}))):this.group.removeClipPath(),d?(h.x=c.x,h.y=c.y,h.scaleX=c.scaleX,h.scaleY=c.scaleY,h.dirty()):It(h,c,e);var y=s&&s.getVisual("visualMeta")&&s.getVisual("visualMeta").length>0,m={api:a,geo:l,mapOrGeoModel:e,data:s,isVisualEncodedByVisualMap:y,isGeo:o,transformInfoRaw:v};l.resourceType==="geoJSON"?this._buildGeoJSON(m):l.resourceType==="geoSVG"&&this._buildSVG(m),this._updateController(e,g,t,a),this._updateMapSelectHandler(e,u,a,i)},r.prototype._buildGeoJSON=function(e){var t=this._regionsGroupByName=J(),a=J(),i=this._regionsGroup,n=e.transformInfoRaw,o=e.mapOrGeoModel,s=e.data,l=e.geo.projection,u=l&&l.stream;function h(c,d){return d&&(c=d(c)),c&&[c[0]*n.scaleX+n.x,c[1]*n.scaleY+n.y]}function f(c){for(var d=[],p=!u&&l&&l.project,g=0;g<c.length;++g){var y=h(c[g],p);y&&d.push(y)}return d}function v(c){return{shape:{points:f(c)}}}i.removeAll(),M(e.geo.regions,function(c){var d=c.name,p=t.get(d),g=a.get(d)||{},y=g.dataIdx,m=g.regionModel;if(!p){p=t.set(d,new et),i.add(p),y=s?s.indexOfName(d):null,m=e.isGeo?o.getRegionModel(d):s?s.getItemModel(y):null;var _=m.get("silent",!0);_!=null&&(p.silent=_),a.set(d,{dataIdx:y,regionModel:m})}var x=[],b=[];M(c.geometries,function(T){if(T.type==="polygon"){var C=[T.exterior].concat(T.interiors||[]);u&&(C=UM(C,u)),M(C,function(D){x.push(new De(v(D)))})}else{var A=T.points;u&&(A=UM(A,u,!0)),M(A,function(D){b.push(new Be(v(D)))})}});var S=h(c.getCenter(),l&&l.project);function w(T,C){if(T.length){var A=new Eh({culling:!0,segmentIgnoreThreshold:1,shape:{paths:T}});p.add(A),VM(e,A,y,m),GM(e,A,d,m,o,y,S),C&&(BM(A),M(A.states,BM))}}w(x),w(b,!0)}),t.each(function(c,d){var p=a.get(d),g=p.dataIdx,y=p.regionModel;FM(e,c,d,y,o,g),HM(e,c,d,y,o),WM(e,c,d,y,o)},this)},r.prototype._buildSVG=function(e){var t=e.geo.map,a=e.transformInfoRaw;this._svgGroup.x=a.x,this._svgGroup.y=a.y,this._svgGroup.scaleX=a.scaleX,this._svgGroup.scaleY=a.scaleY,this._svgResourceChanged(t)&&(this._freeSVG(),this._useSVG(t));var i=this._svgDispatcherMap=J(),n=!1;M(this._svgGraphicRecord.named,function(o){var s=o.name,l=e.mapOrGeoModel,u=e.data,h=o.svgNodeTagLower,f=o.el,v=u?u.indexOfName(s):null,c=l.getRegionModel(s);qH.get(h)!=null&&f instanceof _r&&VM(e,f,v,c),f instanceof _r&&(f.culling=!0);var d=c.get("silent",!0);if(d!=null&&(f.silent=d),f.z2EmphasisLift=0,!o.namedFrom&&(jH.get(h)!=null&&GM(e,f,s,c,l,v,null),FM(e,f,s,c,l,v),HM(e,f,s,c,l),KH.get(h)!=null)){var p=WM(e,f,s,c,l);p==="self"&&(n=!0);var g=i.get(s)||i.set(s,[]);g.push(f)}},this),this._enableBlurEntireSVG(n,e)},r.prototype._enableBlurEntireSVG=function(e,t){if(e&&t.isGeo){var a=t.mapOrGeoModel.getModel(["blur","itemStyle"]).getItemStyle(),i=a.opacity;this._svgGraphicRecord.root.traverse(function(n){if(!n.isGroup){cn(n);var o=n.ensureState("blur").style||{};o.opacity==null&&i!=null&&(o.opacity=i),n.ensureState("emphasis")}})}},r.prototype.remove=function(){this._regionsGroup.removeAll(),this._regionsGroupByName=null,this._svgGroup.removeAll(),this._freeSVG(),this._controller.dispose(),this._controllerHost=null},r.prototype.findHighDownDispatchers=function(e,t){if(e==null)return[];var a=t.coordinateSystem;if(a.resourceType==="geoJSON"){var i=this._regionsGroupByName;if(i){var n=i.get(e);return n?[n]:[]}}else if(a.resourceType==="geoSVG")return this._svgDispatcherMap&&this._svgDispatcherMap.get(e)||[]},r.prototype._svgResourceChanged=function(e){return this._svgMapName!==e},r.prototype._useSVG=function(e){var t=Ya.getGeoResource(e);if(t&&t.type==="geoSVG"){var a=t.useGraphic(this.uid);this._svgGroup.add(a.root),this._svgGraphicRecord=a,this._svgMapName=e}},r.prototype._freeSVG=function(){var e=this._svgMapName;if(e!=null){var t=Ya.getGeoResource(e);t&&t.type==="geoSVG"&&t.freeGraphic(this.uid),this._svgGraphicRecord=null,this._svgDispatcherMap=null,this._svgGroup.removeAll(),this._svgMapName=null}},r.prototype._updateController=function(e,t,a,i){var n=e.coordinateSystem,o=this._controller,s=this._controllerHost;s.zoomLimit=e.get("scaleLimit"),s.zoom=n.getZoom(),o.enable(e.get("roam")||!1,{api:i,zInfo:{component:e},triggerInfo:{roamTrigger:e.get("roamTrigger"),isInSelf:function(h,f,v){return n.containPoint([f,v])},isInClip:function(h,f,v){return!t||t.contain(f,v)}}});var l=e.mainType;function u(){var h={type:"geoRoam",componentType:l};return h[l+"Id"]=e.id,h}o.off("pan").on("pan",function(h){this._mouseDownFlag=!1,My(s,h.dx,h.dy),i.dispatchAction(F(u(),{dx:h.dx,dy:h.dy,animation:{duration:0}}))},this),o.off("zoom").on("zoom",function(h){this._mouseDownFlag=!1,Dy(s,h.scale,h.originX,h.originY),i.dispatchAction(F(u(),{totalZoom:s.zoom,zoom:h.scale,originX:h.originX,originY:h.originY,animation:{duration:0}}))},this)},r.prototype.resetForLabelLayout=function(){this.group.traverse(function(e){var t=e.getTextContent();t&&(t.ignore=NM(t).ignore)})},r.prototype._updateMapSelectHandler=function(e,t,a,i){var n=this;t.off("mousedown"),t.off("click"),e.get("selectedMode")&&(t.on("mousedown",function(){n._mouseDownFlag=!0}),t.on("click",function(o){n._mouseDownFlag&&(n._mouseDownFlag=!1)}))},r}();function VM(r,e,t,a){var i=a.getModel("itemStyle"),n=a.getModel(["emphasis","itemStyle"]),o=a.getModel(["blur","itemStyle"]),s=a.getModel(["select","itemStyle"]),l=sv(i),u=sv(n),h=sv(s),f=sv(o),v=r.data;if(v){var c=v.getItemVisual(t,"style"),d=v.getItemVisual(t,"decal");r.isVisualEncodedByVisualMap&&c.fill&&(l.fill=c.fill),d&&(l.decal=qo(d,r.api))}e.setStyle(l),e.style.strokeNoScale=!0,e.ensureState("emphasis").style=u,e.ensureState("select").style=h,e.ensureState("blur").style=f,cn(e)}function GM(r,e,t,a,i,n,o){var s=r.data,l=r.isGeo,u=s&&isNaN(s.get(s.mapDimension("value"),n)),h=s&&s.getItemLayout(n);if(l||u||h&&h.showLabel){var f=l?t:n,v=void 0;(!s||n>=0)&&(v=i);var c=o?{normal:{align:"center",verticalAlign:"middle"}}:null;ye(e,ce(a),{labelFetcher:v,labelDataIndex:f,defaultText:t},c);var d=e.getTextContent();if(d&&(NM(d).ignore=d.ignore,e.textConfig&&o)){var p=e.getBoundingRect().clone();e.textConfig.layoutRect=p,e.textConfig.position=[(o[0]-p.x)/p.width*100+"%",(o[1]-p.y)/p.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function FM(r,e,t,a,i,n){r.data?r.data.setItemGraphicEl(n,e):vt(e).eventData={componentType:"geo",componentIndex:i.componentIndex,geoIndex:i.componentIndex,name:t,region:a&&a.option||{}}}function HM(r,e,t,a,i){r.data||za({el:e,componentModel:i,itemName:t,itemTooltipOption:a.get("tooltip")})}function WM(r,e,t,a,i){e.highDownSilentOnTouch=!!i.get("selectedMode");var n=a.getModel("emphasis"),o=n.get("focus");return Xt(e,o,n.get("blurScope"),n.get("disabled")),r.isGeo&&KO(e,i,t),o}function UM(r,e,t){var a=[],i;function n(){i=[]}function o(){i.length&&(a.push(i),i=[])}var s=e({polygonStart:n,polygonEnd:o,lineStart:n,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&i.push([l,u])},sphere:function(){}});return!t&&s.polygonStart(),M(r,function(l){s.lineStart();for(var u=0;u<l.length;u++)s.point(l[u][0],l[u][1]);s.lineEnd()}),!t&&s.polygonEnd(),a}var JH=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,i,n){if(!(n&&n.type==="mapToggleSelect"&&n.from===this.uid)){var o=this.group;if(o.removeAll(),!t.getHostGeoModel()){if(this._mapDraw&&n&&n.type==="geoRoam"&&this._mapDraw.resetForLabelLayout(),n&&n.type==="geoRoam"&&n.componentType==="series"&&n.seriesId===t.id){var s=this._mapDraw;s&&o.add(s.group)}else if(t.needsDrawMap){var s=this._mapDraw||new zM(i);o.add(s.group),s.draw(t,a,i,this,n),this._mapDraw=s}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;t.get("showLegendSymbol")&&a.getComponent("legend")&&this._renderSymbols(t,a,i)}}},e.prototype.remove=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},e.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},e.prototype._renderSymbols=function(t,a,i){var n=t.originalData,o=this.group;n.each(n.mapDimension("value"),function(s,l){if(!isNaN(s)){var u=n.getItemLayout(l);if(!(!u||!u.point)){var h=u.point,f=u.offset,v=new Sr({style:{fill:t.getData().getVisual("style").fill},shape:{cx:h[0]+f*9,cy:h[1],r:3},silent:!0,z2:8+(f?0:Mo+1)});if(!f){var c=t.mainSeries.getData(),d=n.getName(l),p=c.indexOfName(d),g=n.getItemModel(l),y=g.getModel("label"),m=c.getItemGraphicEl(p);ye(v,ce(g),{labelFetcher:{getFormattedLabel:function(_,x){return t.getFormattedLabel(p,x)}},defaultText:d}),v.disableLabelAnimation=!0,y.get("position")||v.setTextConfig({position:"bottom"}),m.onHoverStateChange=function(_){Dh(v,_)}}o.add(v)}}})},e.type="map",e}(zt),QH=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.needsDrawMap=!1,t.seriesGroup=[],t.getTooltipPosition=function(a){if(a!=null){var i=this.getData().getName(a),n=this.coordinateSystem,o=n.getRegion(i);return o&&n.dataToPoint(o.getCenter())}},t}return e.prototype.getInitialData=function(t){for(var a=ss(this,{coordDimensions:["value"],encodeDefaulter:pt(kp,this)}),i=J(),n=[],o=0,s=a.count();o<s;o++){var l=a.getName(o);i.set(l,o)}var u=Ya.load(this.getMapType(),this.option.nameMap,this.option.nameProperty);return M(u.regions,function(h){var f=h.name,v=i.get(f),c=h.properties&&h.properties.echartsStyle,d;v==null?(d={name:f},n.push(d)):d=a.getRawDataItem(v),c&&yt(d,c)}),a.appendData(n),a},e.prototype.getHostGeoModel=function(){if(eb(this).kind!==fa.boxCoordSys)return this.getReferringComponents("geo",{useDefault:!1,enableAll:!1,enableNone:!1}).models[0]},e.prototype.getMapType=function(){return(this.getHostGeoModel()||this).option.map},e.prototype.getRawValue=function(t){var a=this.getData();return a.get(a.mapDimension("value"),t)},e.prototype.getRegionModel=function(t){var a=this.getData();return a.getItemModel(a.indexOfName(t))},e.prototype.formatTooltip=function(t,a,i){for(var n=this.getData(),o=this.getRawValue(t),s=n.getName(t),l=this.seriesGroup,u=[],h=0;h<l.length;h++){var f=l[h].originalData.indexOfName(s),v=n.mapDimension("value");isNaN(l[h].originalData.get(v,f))||u.push(l[h].name)}return ue("section",{header:u.join(", "),noHeader:!u.length,blocks:[ue("nameValue",{name:s,value:o})]})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.getLegendIcon=function(t){var a=t.icon||"roundRect",i=he(a,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill);return i.setStyle(t.itemStyle),i.style.stroke="none",a.indexOf("empty")>-1&&(i.style.stroke=i.style.fill,i.style.fill=B.color.neutral00,i.style.lineWidth=2),i},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:B.color.tertiary},itemStyle:{borderWidth:.5,borderColor:B.color.border,areaColor:B.color.background},emphasis:{label:{show:!0,color:B.color.primary},itemStyle:{areaColor:B.color.highlight}},select:{label:{show:!0,color:B.color.primary},itemStyle:{color:B.color.highlight}},nameProperty:"name"},e}(Ht);function t4(r,e){var t={};return M(r,function(a){a.each(a.mapDimension("value"),function(i,n){var o="ec-"+a.getName(n);t[o]=t[o]||[],isNaN(i)||t[o].push(i)})}),r[0].map(r[0].mapDimension("value"),function(a,i){for(var n="ec-"+r[0].getName(i),o=0,s=1/0,l=-1/0,u=t[n].length,h=0;h<u;h++)s=Math.min(s,t[n][h]),l=Math.max(l,t[n][h]),o+=t[n][h];var f;return e==="min"?f=s:e==="max"?f=l:e==="average"?f=o/u:f=o,u===0?NaN:f})}function e4(r){var e={};r.eachSeriesByType("map",function(t){var a=t.getHostGeoModel(),i=a?"o"+a.id:"i"+t.getMapType();(e[i]=e[i]||[]).push(t)}),M(e,function(t,a){for(var i=t4(U(t,function(o){return o.getData()}),t[0].get("mapValueCalculation")),n=0;n<t.length;n++)t[n].originalData=t[n].getData();for(var n=0;n<t.length;n++)t[n].seriesGroup=t,t[n].needsDrawMap=n===0&&!t[n].getHostGeoModel(),t[n].setData(i.cloneShallow()),t[n].mainSeries=t[0]})}function r4(r){var e={};r.eachSeriesByType("map",function(t){var a=t.getMapType();if(!(t.getHostGeoModel()||e[a])){var i={};M(t.seriesGroup,function(o){var s=o.coordinateSystem,l=o.originalData;o.get("showLegendSymbol")&&r.getComponent("legend")&&l.each(l.mapDimension("value"),function(u,h){var f=l.getName(h),v=s.getRegion(f);if(!(!v||isNaN(u))){var c=i[f]||0,d=s.dataToPoint(v.getCenter());i[f]=c+1,l.setItemLayout(h,{point:d,offset:c})}})});var n=t.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}})}var YM=te,Kn=function(r){z(e,r);function e(t,a){var i=r.call(this)||this;return i.type="view",i.dimensions=["x","y"],i._roamTransformable=new Ia,i._rawTransformable=new Ia,i.name=t,i._opt=a,i}return e.prototype.setBoundingRect=function(t,a,i,n){return this._rect=new ht(t,a,i,n),this._updateCenterAndZoom(),this._rect},e.prototype.getBoundingRect=function(){return this._rect},e.prototype.setViewRect=function(t,a,i,n){this._transformTo(t,a,i,n),this._viewRect=new ht(t,a,i,n)},e.prototype._transformTo=function(t,a,i,n){var o=this.getBoundingRect(),s=this._rawTransformable;s.transform=o.calculateTransform(new ht(t,a,i,n));var l=s.parent;s.parent=null,s.decomposeTransform(),s.parent=l,this._updateTransform()},e.prototype.setCenter=function(t){var a=this._opt;a&&a.api&&a.ecModel&&a.ecModel.getShallow("legacyViewCoordSysCenterBase")&&t&&(t=[Z(t[0],a.api.getWidth()),Z(t[1],a.api.getWidth())]),this._centerOption=at(t),this._updateCenterAndZoom()},e.prototype.setZoom=function(t){this._zoom=Ly(t||1,this.zoomLimit),this._updateCenterAndZoom()},e.prototype.getDefaultCenter=function(){var t=this.getBoundingRect(),a=t.x+t.width/2,i=t.y+t.height/2;return[a,i]},e.prototype.getCenter=function(){return this._center||this.getDefaultCenter()},e.prototype.getZoom=function(){return this._zoom||1},e.prototype.getRoamTransform=function(){return this._roamTransformable.getLocalTransform()},e.prototype._updateCenterAndZoom=function(){var t=this._centerOption,a=this._rect;t&&a&&(this._center=[Z(t[0],a.width,a.x),Z(t[1],a.height,a.y)]);var i=this._rawTransformable.getLocalTransform(),n=this._roamTransformable,o=this.getDefaultCenter(),s=this.getCenter(),l=this.getZoom();s=te([],s,i),o=te([],o,i),n.originX=s[0],n.originY=s[1],n.x=o[0]-s[0],n.y=o[1]-s[1],n.scaleX=n.scaleY=l,this._updateTransform()},e.prototype._updateTransform=function(){var t=this._roamTransformable,a=this._rawTransformable;a.parent=t,t.updateTransform(),a.updateTransform(),Gu(this.transform||(this.transform=[]),a.transform||Se()),this._rawTransform=a.getLocalTransform(),this.invTransform=this.invTransform||[],Rr(this.invTransform,this.transform),this.decomposeTransform()},e.prototype.getTransformInfo=function(){var t=this._rawTransformable,a=this._roamTransformable,i=new Ia;return i.transform=a.transform,i.decomposeTransform(),{roam:{x:i.x,y:i.y,scaleX:i.scaleX,scaleY:i.scaleY},raw:{x:t.x,y:t.y,scaleX:t.scaleX,scaleY:t.scaleY}}},e.prototype.getViewRect=function(){return this._viewRect},e.prototype.getViewRectAfterRoam=function(){var t=this.getBoundingRect().clone();return t.applyTransform(this.transform),t},e.prototype.dataToPoint=function(t,a,i){var n=a?this._rawTransform:this.transform;return i=i||[],n?YM(i,t,n):Ge(i,t)},e.prototype.pointToData=function(t,a,i){i=i||[];var n=this.invTransform;return n?YM(i,t,n):(i[0]=t[0],i[1]=t[1],i)},e.prototype.convertToPixel=function(t,a,i){var n=ZM(a);return n===this?n.dataToPoint(i):null},e.prototype.convertFromPixel=function(t,a,i){var n=ZM(a);return n===this?n.pointToData(i):null},e.prototype.containPoint=function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])},e.dimensions=["x","y"],e}(Ia);function ZM(r){var e=r.seriesModel;return e?e.coordinateSystem:null}var a4={geoJSON:{aspectScale:.75,invertLongitute:!0},geoSVG:{aspectScale:1,invertLongitute:!1}},$M=["lng","lat"],Ey=function(r){z(e,r);function e(t,a,i){var n=r.call(this,t,{api:i.api,ecModel:i.ecModel})||this;n.dimensions=$M,n.type="geo",n._nameCoordMap=J(),n.map=a;var o=i.projection,s=Ya.load(a,i.nameMap,i.nameProperty),l=Ya.getGeoResource(a);n.resourceType=l?l.type:null;var u=n.regions=s.regions,h=a4[l.type];n._regionsMap=s.regionsMap,n.regions=s.regions,n.projection=o;var f;if(o)for(var v=0;v<u.length;v++){var c=u[v].getBoundingRect(o);f=f||c.clone(),f.union(c)}else f=s.boundingRect;return n.setBoundingRect(f.x,f.y,f.width,f.height),n.aspectScale=o?1:Q(i.aspectScale,h.aspectScale),n._invertLongitute=o?!1:h.invertLongitute,n}return e.prototype._transformTo=function(t,a,i,n){var o=this.getBoundingRect(),s=this._invertLongitute;o=o.clone(),s&&(o.y=-o.y-o.height);var l=this._rawTransformable;l.transform=o.calculateTransform(new ht(t,a,i,n));var u=l.parent;l.parent=null,l.decomposeTransform(),l.parent=u,s&&(l.scaleY=-l.scaleY),this._updateTransform()},e.prototype.getRegion=function(t){return this._regionsMap.get(t)},e.prototype.getRegionByCoord=function(t){for(var a=this.regions,i=0;i<a.length;i++){var n=a[i];if(n.type==="geoJSON"&&n.contain(t))return a[i]}},e.prototype.addGeoCoord=function(t,a){this._nameCoordMap.set(t,a)},e.prototype.getGeoCoord=function(t){var a=this._regionsMap.get(t);return this._nameCoordMap.get(t)||a&&a.getCenter()},e.prototype.dataToPoint=function(t,a,i){if($(t)&&(t=this.getGeoCoord(t)),t){var n=this.projection;return n&&(t=n.project(t)),t&&this.projectedToPoint(t,a,i)}},e.prototype.pointToData=function(t,a,i){var n=this.projection;return n&&(t=n.unproject(t)),t&&this.pointToProjected(t,i)},e.prototype.pointToProjected=function(t,a){return r.prototype.pointToData.call(this,t,0,a)},e.prototype.projectedToPoint=function(t,a,i){return r.prototype.dataToPoint.call(this,t,a,i)},e.prototype.convertToPixel=function(t,a,i){var n=XM(a);return n===this?n.dataToPoint(i):null},e.prototype.convertFromPixel=function(t,a,i){var n=XM(a);return n===this?n.pointToData(i):null},e}(Kn);ie(Ey,Kn);function XM(r){var e=r.geoModel,t=r.seriesModel;return e?e.coordinateSystem:t?t.coordinateSystem||(t.getReferringComponents("geo",Jt).models[0]||{}).coordinateSystem:null}function qM(r,e){var t=r.get("boundingCoords");if(t!=null){var a=t[0],i=t[1];if(isFinite(a[0])&&isFinite(a[1])&&isFinite(i[0])&&isFinite(i[1])){var n=this.projection;if(n){var o=a[0],s=a[1],l=i[0],u=i[1];a=[1/0,1/0],i=[-1/0,-1/0];var h=function(b,S,w,T){for(var C=w-b,A=T-S,D=0;D<=100;D++){var I=D/100,L=n.project([b+C*I,S+A*I]);ti(a,a,L),ei(i,i,L)}};h(o,s,l,s),h(l,s,l,u),h(l,u,o,u),h(o,u,l,s)}this.setBoundingRect(a[0],a[1],i[0]-a[0],i[1]-a[1])}}var f=this.getBoundingRect(),v=r.get("layoutCenter"),c=r.get("layoutSize"),d=de(r,e).refContainer,p=f.width/f.height*this.aspectScale,g=!1,y,m;v&&c&&(y=[Z(v[0],d.width)+d.x,Z(v[1],d.height)+d.y],m=Z(c,Math.min(d.width,d.height)),!isNaN(y[0])&&!isNaN(y[1])&&!isNaN(m)&&(g=!0));var _;if(g)_={},p>1?(_.width=m,_.height=m/p):(_.height=m,_.width=m*p),_.y=y[1]-_.height/2,_.x=y[0]-_.width/2;else{var x=r.getBoxLayoutParams();x.aspect=p,_=qt(x,d),_=ob(r,_,p)}this.setViewRect(_.x,_.y,_.width,_.height),this.setCenter(r.get("center")),this.setZoom(r.get("zoom"))}function i4(r,e){M(e.get("geoCoord"),function(t,a){r.addGeoCoord(a,t)})}var n4=function(){function r(){this.dimensions=$M}return r.prototype.create=function(e,t){var a=[];function i(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}e.eachComponent("geo",function(o,s){var l=o.get("map"),u=new Ey(l+s,l,F({nameMap:o.get("nameMap"),api:t,ecModel:e},i(o)));u.zoomLimit=o.get("scaleLimit"),a.push(u),o.coordinateSystem=u,u.model=o,u.resize=qM,u.resize(o,t)}),e.eachSeries(function(o){vl({targetModel:o,coordSysType:"geo",coordSysProvider:function(){var s=o.subType==="map"?o.getHostGeoModel():o.getReferringComponents("geo",Jt).models[0];return s&&s.coordinateSystem},allowNotFound:!0})});var n={};return e.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();n[s]=n[s]||[],n[s].push(o)}}),M(n,function(o,s){var l=U(o,function(h){return h.get("nameMap")}),u=new Ey(s,s,F({nameMap:uc(l),api:t,ecModel:e},i(o[0])));u.zoomLimit=Ae.apply(null,U(o,function(h){return h.get("scaleLimit")})),a.push(u),u.resize=qM,u.resize(o[0],t),M(o,function(h){h.coordinateSystem=u,i4(u,h)})}),a},r.prototype.getFilledRegions=function(e,t,a,i){for(var n=(e||[]).slice(),o=J(),s=0;s<n.length;s++)o.set(n[s].name,n[s]);var l=Ya.load(t,a,i);return M(l.regions,function(u){var h=u.name,f=o.get(h),v=u.properties&&u.properties.echartsStyle;f||(f={name:h},n.push(f)),v&&yt(f,v)}),n},r}(),KM=new n4,o4=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a,i){this.mergeDefaultAndTheme(t,i);var n=Ya.getGeoResource(t.map);if(n&&n.type==="geoJSON"){var o=t.itemStyle=t.itemStyle||{};"color"in o||(o.color=t.defaultItemStyleColor||B.color.backgroundTint)}tn(t,"label",["show"])},e.prototype.optionUpdated=function(){var t=this,a=this.option;a.regions=KM.getFilledRegions(a.regions,a.map,a.nameMap,a.nameProperty);var i={};this._optionModelMap=Xr(a.regions||[],function(n,o){var s=o.name;return s&&(n.set(s,new Ct(o,t,t.ecModel)),o.selected&&(i[s]=!0)),n},J()),a.selectedMap||(a.selectedMap=i)},e.prototype.getRegionModel=function(t){return this._optionModelMap.get(t)||new Ct(null,this,this.ecModel)},e.prototype.getFormattedLabel=function(t,a){var i=this.getRegionModel(t),n=a==="normal"?i.get(["label","formatter"]):i.get(["emphasis","label","formatter"]),o={name:t};if(rt(n))return o.status=a,n(o);if($(n))return n.replace("{a}",t??"")},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.select=function(t){var a=this.option,i=a.selectedMode;if(i){i!=="multiple"&&(a.selectedMap=null);var n=a.selectedMap||(a.selectedMap={});n[t]=!0}},e.prototype.unSelect=function(t){var a=this.option.selectedMap;a&&(a[t]=!1)},e.prototype.toggleSelected=function(t){this[this.isSelected(t)?"unSelect":"select"](t)},e.prototype.isSelected=function(t){var a=this.option.selectedMap;return!!(a&&a[t])},e.type="geo",e.layoutMode="box",e.defaultOption={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:B.color.tertiary},itemStyle:{borderWidth:.5,borderColor:B.color.border},emphasis:{label:{show:!0,color:B.color.primary},itemStyle:{color:B.color.highlight}},select:{label:{show:!0,color:B.color.primary},itemStyle:{color:B.color.highlight}},regions:[]},e}(Tt),s4=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.focusBlurEnabled=!0,t}return e.prototype.init=function(t,a){this._api=a},e.prototype.render=function(t,a,i,n){if(this._model=t,!t.get("show")){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;return}this._mapDraw||(this._mapDraw=new zM(i));var o=this._mapDraw;o.draw(t,a,i,this,n),o.group.on("click",this._handleRegionClick,this),o.group.silent=t.get("silent"),this.group.add(o.group),this.updateSelectStatus(t,a,i)},e.prototype._handleRegionClick=function(t){var a;Rn(t.target,function(i){return(a=vt(i).eventData)!=null},!0),a&&this._api.dispatchAction({type:"geoToggleSelect",geoId:this._model.id,name:a.name})},e.prototype.updateSelectStatus=function(t,a,i){var n=this;this._mapDraw.group.traverse(function(o){var s=vt(o).eventData;if(s)return n._model.isSelected(s.name)?i.enterSelect(o):i.leaveSelect(o),!0})},e.prototype.findHighDownDispatchers=function(t){return this._mapDraw&&this._mapDraw.findHighDownDispatchers(t,this._model)},e.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove()},e.type="geo",e}(Zt);function l4(r,e,t){Ya.registerMap(r,e,t)}function jM(r){r.registerCoordinateSystem("geo",KM),r.registerComponentModel(o4),r.registerComponentView(s4),r.registerImpl("registerMap",l4),r.registerImpl("getMap",function(t){return Ya.getMapForUser(t)});function e(t,a){a.update="geo:updateSelectStatus",r.registerAction(a,function(i,n){var o={},s=[];return n.eachComponent({mainType:"geo",query:i},function(l){l[t](i.name);var u=l.coordinateSystem;M(u.regions,function(f){o[f.name]=l.isSelected(f.name)||!1});var h=[];M(o,function(f,v){o[v]&&h.push(v)}),s.push({geoIndex:l.componentIndex,name:h})}),{selected:o,allSelected:s,name:i.name}})}e("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),e("select",{type:"geoSelect",event:"geoselected"}),e("unSelect",{type:"geoUnSelect",event:"geounselected"}),r.registerAction({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(t,a,i){var n=t.componentType;n||(t.geoId!=null?n="geo":t.seriesId!=null&&(n="series")),n||(n="series"),a.eachComponent({mainType:n,query:t},function(o){var s=o.coordinateSystem;if(s.type==="geo"){var l=av(s,t,o.get("scaleLimit"));o.setCenter&&o.setCenter(l.center),o.setZoom&&o.setZoom(l.zoom),n==="series"&&M(o.seriesGroup,function(u){u.setCenter(l.center),u.setZoom(l.zoom)})}})})}function u4(r){mt(jM),r.registerChartView(JH),r.registerSeriesModel(QH),r.registerLayout(r4),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,e4),Pw("map",r.registerAction)}function h4(r){var e=r;e.hierNode={defaultAncestor:null,ancestor:e,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var t=[e],a,i;a=t.pop();)if(i=a.children,a.isExpand&&i.length)for(var n=i.length,o=n-1;o>=0;o--){var s=i[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},t.push(s)}}function f4(r,e){var t=r.isExpand?r.children:[],a=r.parentNode.children,i=r.hierNode.i?a[r.hierNode.i-1]:null;if(t.length){c4(r);var n=(t[0].hierNode.prelim+t[t.length-1].hierNode.prelim)/2;i?(r.hierNode.prelim=i.hierNode.prelim+e(r,i),r.hierNode.modifier=r.hierNode.prelim-n):r.hierNode.prelim=n}else i&&(r.hierNode.prelim=i.hierNode.prelim+e(r,i));r.parentNode.hierNode.defaultAncestor=d4(r,i,r.parentNode.hierNode.defaultAncestor||a[0],e)}function v4(r){var e=r.hierNode.prelim+r.parentNode.hierNode.modifier;r.setLayout({x:e},!0),r.hierNode.modifier+=r.parentNode.hierNode.modifier}function JM(r){return arguments.length?r:y4}function au(r,e){return r-=Math.PI/2,{x:e*Math.cos(r),y:e*Math.sin(r)}}function c4(r){for(var e=r.children,t=e.length,a=0,i=0;--t>=0;){var n=e[t];n.hierNode.prelim+=a,n.hierNode.modifier+=a,i+=n.hierNode.change,a+=n.hierNode.shift+i}}function d4(r,e,t,a){if(e){for(var i=r,n=r,o=n.parentNode.children[0],s=e,l=i.hierNode.modifier,u=n.hierNode.modifier,h=o.hierNode.modifier,f=s.hierNode.modifier;s=Oy(s),n=Ny(n),s&&n;){i=Oy(i),o=Ny(o),i.hierNode.ancestor=r;var v=s.hierNode.prelim+f-n.hierNode.prelim-u+a(s,n);v>0&&(g4(p4(s,r,t),r,v),u+=v,l+=v),f+=s.hierNode.modifier,u+=n.hierNode.modifier,l+=i.hierNode.modifier,h+=o.hierNode.modifier}s&&!Oy(i)&&(i.hierNode.thread=s,i.hierNode.modifier+=f-l),n&&!Ny(o)&&(o.hierNode.thread=n,o.hierNode.modifier+=u-h,t=r)}return t}function Oy(r){var e=r.children;return e.length&&r.isExpand?e[e.length-1]:r.hierNode.thread}function Ny(r){var e=r.children;return e.length&&r.isExpand?e[0]:r.hierNode.thread}function p4(r,e,t){return r.hierNode.ancestor.parentNode===e.parentNode?r.hierNode.ancestor:t}function g4(r,e,t){var a=t/(e.hierNode.i-r.hierNode.i);e.hierNode.change-=a,e.hierNode.shift+=t,e.hierNode.modifier+=t,e.hierNode.prelim+=t,r.hierNode.change+=a}function y4(r,e){return r.parentNode===e.parentNode?1:2}var m4=function(){function r(){this.parentPoint=[],this.childPoints=[]}return r}(),_4=function(r){z(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:B.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new m4},e.prototype.buildPath=function(t,a){var i=a.childPoints,n=i.length,o=a.parentPoint,s=i[0],l=i[n-1];if(n===1){t.moveTo(o[0],o[1]),t.lineTo(s[0],s[1]);return}var u=a.orient,h=u==="TB"||u==="BT"?0:1,f=1-h,v=Z(a.forkPosition,1),c=[];c[h]=o[h],c[f]=o[f]+(l[f]-o[f])*v,t.moveTo(o[0],o[1]),t.lineTo(c[0],c[1]),t.moveTo(s[0],s[1]),c[h]=s[h],t.lineTo(c[0],c[1]),c[h]=l[h],t.lineTo(c[0],c[1]),t.lineTo(l[0],l[1]);for(var d=1;d<n-1;d++){var p=i[d];t.moveTo(p[0],p[1]),c[h]=p[h],t.lineTo(c[0],c[1])}},e}(bt),x4=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._mainGroup=new et,t}return e.prototype.init=function(t,a){this._controller=new $n(a.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},e.prototype.render=function(t,a,i){var n=t.getData(),o=t.layoutInfo,s=this._mainGroup,l=t.get("layout");l==="radial"?(s.x=o.x+o.width/2,s.y=o.y+o.height/2):(s.x=o.x,s.y=o.y),this._updateViewCoordSys(t,i),this._updateController(t,null,a,i);var u=this._data;n.diff(u).add(function(h){QM(n,h)&&tD(n,h,null,s,t)}).update(function(h,f){var v=u.getItemGraphicEl(f);if(!QM(n,h)){v&&aD(u,f,v,s,t);return}tD(n,h,v,s,t)}).remove(function(h){var f=u.getItemGraphicEl(h);f&&aD(u,h,f,s,t)}).execute(),this._nodeScaleRatio=t.get("nodeScaleRatio"),this._updateNodeAndLinkScale(t),t.get("expandAndCollapse")===!0&&n.eachItemGraphicEl(function(h,f){h.off("click").on("click",function(){i.dispatchAction({type:"treeExpandAndCollapse",seriesId:t.id,dataIndex:f})})}),this._data=n},e.prototype._updateViewCoordSys=function(t,a){var i=t.getData(),n=[];i.each(function(f){var v=i.getItemLayout(f);v&&!isNaN(v.x)&&!isNaN(v.y)&&n.push([+v.x,+v.y])});var o=[],s=[];_h(n,o,s);var l=this._min,u=this._max;s[0]-o[0]===0&&(o[0]=l?l[0]:o[0]-1,s[0]=u?u[0]:s[0]+1),s[1]-o[1]===0&&(o[1]=l?l[1]:o[1]-1,s[1]=u?u[1]:s[1]+1);var h=t.coordinateSystem=new Kn(null,{api:a,ecModel:t.ecModel});h.zoomLimit=t.get("scaleLimit"),h.setBoundingRect(o[0],o[1],s[0]-o[0],s[1]-o[1]),h.setCenter(t.get("center")),h.setZoom(t.get("zoom")),this.group.attr({x:h.x,y:h.y,scaleX:h.scaleX,scaleY:h.scaleY}),this._min=o,this._max=s},e.prototype._updateController=function(t,a,i,n){var o=this;SM(t,n,this.group,this._controller,this._controllerHost,a),this._controller.on("zoom",function(s){o._updateNodeAndLinkScale(t)})},e.prototype._updateNodeAndLinkScale=function(t){var a=t.getData(),i=this._getNodeGlobalScale(t);a.eachItemGraphicEl(function(n,o){n.setSymbolScale(i)})},e.prototype._getNodeGlobalScale=function(t){var a=t.coordinateSystem;if(a.type!=="view")return 1;var i=this._nodeScaleRatio,n=a.scaleX||1,o=a.getZoom(),s=(o-1)*i+1;return s/n},e.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype.remove=function(){this._mainGroup.removeAll(),this._data=null},e.type="tree",e}(zt);function QM(r,e){var t=r.getItemLayout(e);return t&&!isNaN(t.x)&&!isNaN(t.y)}function tD(r,e,t,a,i){var n=!t,o=r.tree.getNodeByDataIndex(e),s=o.getModel(),l=o.getVisual("style").fill,u=o.isExpand===!1&&o.children.length!==0?l:B.color.neutral00,h=r.tree.root,f=o.parentNode===h?o:o.parentNode||o,v=r.getItemGraphicEl(f.dataIndex),c=f.getLayout(),d=v?{x:v.__oldX,y:v.__oldY,rawX:v.__radialOldRawX,rawY:v.__radialOldRawY}:c,p=o.getLayout();n?(t=new Wl(r,e,null,{symbolInnerColor:u,useNameLabel:!0}),t.x=d.x,t.y=d.y):t.updateData(r,e,null,{symbolInnerColor:u,useNameLabel:!0}),t.__radialOldRawX=t.__radialRawX,t.__radialOldRawY=t.__radialRawY,t.__radialRawX=p.rawX,t.__radialRawY=p.rawY,a.add(t),r.setItemGraphicEl(e,t),t.__oldX=t.x,t.__oldY=t.y,It(t,{x:p.x,y:p.y},i);var g=t.getSymbolPath();if(i.get("layout")==="radial"){var y=h.children[0],m=y.getLayout(),_=y.children.length,x=void 0,b=void 0;if(p.x===m.x&&o.isExpand===!0&&y.children.length){var S={x:(y.children[0].getLayout().x+y.children[_-1].getLayout().x)/2,y:(y.children[0].getLayout().y+y.children[_-1].getLayout().y)/2};x=Math.atan2(S.y-m.y,S.x-m.x),x<0&&(x=Math.PI*2+x),b=S.x<m.x,b&&(x=x-Math.PI)}else x=Math.atan2(p.y-m.y,p.x-m.x),x<0&&(x=Math.PI*2+x),o.children.length===0||o.children.length!==0&&o.isExpand===!1?(b=p.x<m.x,b&&(x=x-Math.PI)):(b=p.x>m.x,b||(x=x-Math.PI));var w=b?"left":"right",T=s.getModel("label"),C=T.get("rotate"),A=C*(Math.PI/180),D=g.getTextContent();D&&(g.setTextConfig({position:T.get("position")||w,rotation:C==null?-x:A,origin:"center"}),D.setStyle("verticalAlign","middle"))}var I=s.get(["emphasis","focus"]),L=I==="relative"?ks(o.getAncestorsIndices(),o.getDescendantIndices()):I==="ancestor"?o.getAncestorsIndices():I==="descendant"?o.getDescendantIndices():null;L&&(vt(t).focus=L),S4(i,o,h,t,d,c,p,a),t.__edge&&(t.onHoverStateChange=function(P){if(P!=="blur"){var k=o.parentNode&&r.getItemGraphicEl(o.parentNode.dataIndex);k&&k.hoverState===js||Dh(t.__edge,P)}})}function S4(r,e,t,a,i,n,o,s){var l=e.getModel(),u=r.get("edgeShape"),h=r.get("layout"),f=r.getOrient(),v=r.get(["lineStyle","curveness"]),c=r.get("edgeForkPosition"),d=l.getModel("lineStyle").getLineStyle(),p=a.__edge;if(u==="curve")e.parentNode&&e.parentNode!==t&&(p||(p=a.__edge=new Rh({shape:By(h,f,v,i,i)})),It(p,{shape:By(h,f,v,n,o)},r));else if(u==="polyline"&&h==="orthogonal"&&e!==t&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var g=e.children,y=[],m=0;m<g.length;m++){var _=g[m].getLayout();y.push([_.x,_.y])}p||(p=a.__edge=new _4({shape:{parentPoint:[o.x,o.y],childPoints:[[o.x,o.y]],orient:f,forkPosition:c}})),It(p,{shape:{parentPoint:[o.x,o.y],childPoints:y}},r)}p&&!(u==="polyline"&&!e.isExpand)&&(p.useStyle(st({strokeNoScale:!0,fill:null},d)),ve(p,l,"lineStyle"),cn(p),s.add(p))}function eD(r,e,t,a,i){var n=e.tree.root,o=rD(n,r),s=o.source,l=o.sourceLayout,u=e.getItemGraphicEl(r.dataIndex);if(u){var h=e.getItemGraphicEl(s.dataIndex),f=h.__edge,v=u.__edge||(s.isExpand===!1||s.children.length===1?f:void 0),c=a.get("edgeShape"),d=a.get("layout"),p=a.get("orient"),g=a.get(["lineStyle","curveness"]);v&&(c==="curve"?pi(v,{shape:By(d,p,g,l,l),style:{opacity:0}},a,{cb:function(){t.remove(v)},removeOpt:i}):c==="polyline"&&a.get("layout")==="orthogonal"&&pi(v,{shape:{parentPoint:[l.x,l.y],childPoints:[[l.x,l.y]]},style:{opacity:0}},a,{cb:function(){t.remove(v)},removeOpt:i}))}}function rD(r,e){for(var t=e.parentNode===r?e:e.parentNode||e,a;a=t.getLayout(),a==null;)t=t.parentNode===r?t:t.parentNode||t;return{source:t,sourceLayout:a}}function aD(r,e,t,a,i){var n=r.tree.getNodeByDataIndex(e),o=r.tree.root,s=rD(o,n).sourceLayout,l={duration:i.get("animationDurationUpdate"),easing:i.get("animationEasingUpdate")};pi(t,{x:s.x+1,y:s.y+1},i,{cb:function(){a.remove(t),r.setItemGraphicEl(e,null)},removeOpt:l}),t.fadeOut(null,r.hostModel,{fadeLabel:!0,animation:l}),n.children.forEach(function(u){eD(u,r,a,i,l)}),eD(n,r,a,i,l)}function By(r,e,t,a,i){var n,o,s,l,u,h,f,v;if(r==="radial"){u=a.rawX,f=a.rawY,h=i.rawX,v=i.rawY;var c=au(u,f),d=au(u,f+(v-f)*t),p=au(h,v+(f-v)*t),g=au(h,v);return{x1:c.x||0,y1:c.y||0,x2:g.x||0,y2:g.y||0,cpx1:d.x||0,cpy1:d.y||0,cpx2:p.x||0,cpy2:p.y||0}}else u=a.x,f=a.y,h=i.x,v=i.y,(e==="LR"||e==="RL")&&(n=u+(h-u)*t,o=f,s=h+(u-h)*t,l=v),(e==="TB"||e==="BT")&&(n=u,o=f+(v-f)*t,s=h,l=v+(f-v)*t);return{x1:u,y1:f,x2:h,y2:v,cpx1:n,cpy1:o,cpx2:s,cpy2:l}}var Dr=St();function iD(r){var e=r.mainData,t=r.datas;t||(t={main:e},r.datasAttr={main:"data"}),r.datas=r.mainData=null,nD(e,t,r),M(t,function(a){M(e.TRANSFERABLE_METHODS,function(i){a.wrapMethod(i,pt(b4,r))})}),e.wrapMethod("cloneShallow",pt(T4,r)),M(e.CHANGABLE_METHODS,function(a){e.wrapMethod(a,pt(w4,r))}),Ee(t[e.dataType]===e)}function b4(r,e){if(M4(this)){var t=F({},Dr(this).datas);t[this.dataType]=e,nD(e,t,r)}else zy(e,this.dataType,Dr(this).mainData,r);return e}function w4(r,e){return r.struct&&r.struct.update(),e}function T4(r,e){return M(Dr(e).datas,function(t,a){t!==e&&zy(t.cloneShallow(),a,e,r)}),e}function C4(r){var e=Dr(this).mainData;return r==null||e==null?e:Dr(e).datas[r]}function A4(){var r=Dr(this).mainData;return r==null?[{data:r}]:U(Mt(Dr(r).datas),function(e){return{type:e,data:Dr(r).datas[e]}})}function M4(r){return Dr(r).mainData===r}function nD(r,e,t){Dr(r).datas={},M(e,function(a,i){zy(a,i,r,t)})}function zy(r,e,t,a){Dr(t).datas[e]=r,Dr(r).mainData=t,r.dataType=e,a.struct&&(r[a.structAttr]=a.struct,a.struct[a.datasAttr[e]]=r),r.getLinkedData=C4,r.getLinkedDataAll=A4}var D4=function(){function r(e,t){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=e||"",this.hostTree=t}return r.prototype.isRemoved=function(){return this.dataIndex<0},r.prototype.eachNode=function(e,t,a){rt(e)&&(a=t,t=e,e=null),e=e||{},$(e)&&(e={order:e});var i=e.order||"preorder",n=this[e.attr||"children"],o;i==="preorder"&&(o=t.call(a,this));for(var s=0;!o&&s<n.length;s++)n[s].eachNode(e,t,a);i==="postorder"&&t.call(a,this)},r.prototype.updateDepthAndHeight=function(e){var t=0;this.depth=e;for(var a=0;a<this.children.length;a++){var i=this.children[a];i.updateDepthAndHeight(e+1),i.height>t&&(t=i.height)}this.height=t+1},r.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,a=this.children,i=a.length;t<i;t++){var n=a[t].getNodeById(e);if(n)return n}},r.prototype.contains=function(e){if(e===this)return!0;for(var t=0,a=this.children,i=a.length;t<i;t++){var n=a[t].contains(e);if(n)return n}},r.prototype.getAncestors=function(e){for(var t=[],a=e?this:this.parentNode;a;)t.push(a),a=a.parentNode;return t.reverse(),t},r.prototype.getAncestorsIndices=function(){for(var e=[],t=this;t;)e.push(t.dataIndex),t=t.parentNode;return e.reverse(),e},r.prototype.getDescendantIndices=function(){var e=[];return this.eachNode(function(t){e.push(t.dataIndex)}),e},r.prototype.getValue=function(e){var t=this.hostTree.data;return t.getStore().get(t.getDimensionIndex(e||"value"),this.dataIndex)},r.prototype.setLayout=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},r.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostTree,a=t.data.getItemModel(this.dataIndex);return a.getModel(e)}},r.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},r.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},r.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},r.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},r.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},r.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,t=0;t<e.length;++t)if(e[t]===this)return t;return-1}return-1},r.prototype.isAncestorOf=function(e){for(var t=e.parentNode;t;){if(t===this)return!0;t=t.parentNode}return!1},r.prototype.isDescendantOf=function(e){return e!==this&&e.isAncestorOf(this)},r}(),Vy=function(){function r(e){this.type="tree",this._nodes=[],this.hostModel=e}return r.prototype.eachNode=function(e,t,a){this.root.eachNode(e,t,a)},r.prototype.getNodeByDataIndex=function(e){var t=this.data.getRawIndex(e);return this._nodes[t]},r.prototype.getNodeById=function(e){return this.root.getNodeById(e)},r.prototype.update=function(){for(var e=this.data,t=this._nodes,a=0,i=t.length;a<i;a++)t[a].dataIndex=-1;for(var a=0,i=e.count();a<i;a++)t[e.getRawIndex(a)].dataIndex=a},r.prototype.clearLayouts=function(){this.data.clearItemLayouts()},r.createTree=function(e,t,a){var i=new r(t),n=[],o=1;s(e);function s(h,f){var v=h.value;o=Math.max(o,W(v)?v.length:1),n.push(h);var c=new D4(fe(h.name,""),i);f?L4(c,f):i.root=c,i._nodes.push(c);var d=h.children;if(d)for(var p=0;p<d.length;p++)s(d[p],c)}i.root.updateDepthAndHeight(0);var l=kl(n,{coordDimensions:["value"],dimensionsCount:o}).dimensions,u=new Ue(l,t);return u.initData(n),a&&a(u),iD({mainData:u,struct:i,structAttr:"tree"}),i.update(),i},r}();function L4(r,e){var t=e.children;r.parentNode!==e&&(t.push(r),r.parentNode=e)}function iu(r,e,t){if(r&&gt(e,r.type)>=0){var a=t.getData().tree.root,i=r.targetNode;if($(i)&&(i=a.getNodeById(i)),i&&a.contains(i))return{node:i};var n=r.targetNodeId;if(n!=null&&(i=a.getNodeById(n)))return{node:i}}}function oD(r){for(var e=[];r;)r=r.parentNode,r&&e.push(r);return e.reverse()}function Gy(r,e){var t=oD(r);return gt(t,e)>=0}function lv(r,e){for(var t=[];r;){var a=r.dataIndex;t.push({name:r.name,dataIndex:a,value:e.getRawValue(a)}),r=r.parentNode}return t.reverse(),t}var I4=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.hasSymbolVisual=!0,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t){var a={name:t.name,children:t.data},i=t.leaves||{},n=new Ct(i,this,this.ecModel),o=Vy.createTree(a,this,s);function s(f){f.wrapMethod("getItemModel",function(v,c){var d=o.getNodeByDataIndex(c);return d&&d.children.length&&d.isExpand||(v.parentModel=n),v})}var l=0;o.eachNode("preorder",function(f){f.depth>l&&(l=f.depth)});var u=t.expandAndCollapse,h=u&&t.initialTreeDepth>=0?t.initialTreeDepth:l;return o.root.eachNode("preorder",function(f){var v=f.hostTree.data.getRawDataItem(f.dataIndex);f.isExpand=v&&v.collapsed!=null?!v.collapsed:f.depth<=h}),o.data},e.prototype.getOrient=function(){var t=this.get("orient");return t==="horizontal"?t="LR":t==="vertical"&&(t="TB"),t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.formatTooltip=function(t,a,i){for(var n=this.getData().tree,o=n.root.children[0],s=n.getNodeByDataIndex(t),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return ue("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},e.prototype.getDataParams=function(t){var a=r.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return a.treeAncestors=lv(i,this),a.collapsed=!i.isExpand,a},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystemUsage:"box",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,roamTrigger:"global",nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:B.color.borderTint,width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(Ht);function P4(r,e,t){for(var a=[r],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,t)}function nu(r,e){for(var t=[r],a;a=t.pop();)if(e(a),a.isExpand){var i=a.children;if(i.length)for(var n=i.length-1;n>=0;n--)t.push(i[n])}}function k4(r,e){r.eachSeriesByType("tree",function(t){R4(t,e)})}function R4(r,e){var t=de(r,e).refContainer,a=qt(r.getBoxLayoutParams(),t);r.layoutInfo=a;var i=r.get("layout"),n=0,o=0,s=null;i==="radial"?(n=2*Math.PI,o=Math.min(a.height,a.width)/2,s=JM(function(x,b){return(x.parentNode===b.parentNode?1:2)/x.depth})):(n=a.width,o=a.height,s=JM());var l=r.getData().tree.root,u=l.children[0];if(u){h4(l),P4(u,f4,s),l.hierNode.modifier=-u.hierNode.prelim,nu(u,v4);var h=u,f=u,v=u;nu(u,function(x){var b=x.getLayout().x;b<h.getLayout().x&&(h=x),b>f.getLayout().x&&(f=x),x.depth>v.depth&&(v=x)});var c=h===f?1:s(h,f)/2,d=c-h.getLayout().x,p=0,g=0,y=0,m=0;if(i==="radial")p=n/(f.getLayout().x+c+d),g=o/(v.depth-1||1),nu(u,function(x){y=(x.getLayout().x+d)*p,m=(x.depth-1)*g;var b=au(y,m);x.setLayout({x:b.x,y:b.y,rawX:y,rawY:m},!0)});else{var _=r.getOrient();_==="RL"||_==="LR"?(g=o/(f.getLayout().x+c+d),p=n/(v.depth-1||1),nu(u,function(x){m=(x.getLayout().x+d)*g,y=_==="LR"?(x.depth-1)*p:n-(x.depth-1)*p,x.setLayout({x:y,y:m},!0)})):(_==="TB"||_==="BT")&&(p=n/(f.getLayout().x+c+d),g=o/(v.depth-1||1),nu(u,function(x){y=(x.getLayout().x+d)*p,m=_==="TB"?(x.depth-1)*g:o-(x.depth-1)*g,x.setLayout({x:y,y:m},!0)}))}}}function E4(r){r.eachSeriesByType("tree",function(e){var t=e.getData(),a=t.tree;a.eachNode(function(i){var n=i.getModel(),o=n.getModel("itemStyle").getItemStyle(),s=t.ensureUniqueItemVisual(i.dataIndex,"style");F(s,o)})})}function O4(r){r.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},function(a){var i=e.dataIndex,n=a.getData().tree,o=n.getNodeByDataIndex(i);o.isExpand=!o.isExpand})}),r.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(e,t,a){t.eachComponent({mainType:"series",subType:"tree",query:e},function(i){var n=i.coordinateSystem,o=av(n,e,i.get("scaleLimit"));i.setCenter(o.center),i.setZoom(o.zoom)})})}function N4(r){r.registerChartView(x4),r.registerSeriesModel(I4),r.registerLayout(k4),r.registerVisual(E4),O4(r)}var sD=["treemapZoomToNode","treemapRender","treemapMove"];function B4(r){for(var e=0;e<sD.length;e++)r.registerAction({type:sD[e],update:"updateView"},Qt);r.registerAction({type:"treemapRootToNode",update:"updateView"},function(t,a){a.eachComponent({mainType:"series",subType:"treemap",query:t},i);function i(n,o){var s=["treemapZoomToNode","treemapRootToNode"],l=iu(t,s,n);if(l){var u=n.getViewRoot();u&&(t.direction=Gy(u,l.node)?"rollUp":"drillDown"),n.resetViewRoot(l.node)}}})}function lD(r){var e=r.getData(),t=e.tree,a={};t.eachNode(function(i){for(var n=i;n&&n.depth>1;)n=n.parentNode;var o=Np(r.ecModel,n.name||n.dataIndex+"",a);i.setVisual("decal",o)})}var z4=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.preventUsingHoverLayer=!0,t}return e.prototype.getInitialData=function(t,a){var i={name:t.name,children:t.data};uD(i);var n=t.levels||[],o=this.designatedVisualItemStyle={},s=new Ct({itemStyle:o},this,a);n=t.levels=V4(n,a);var l=U(n||[],function(f){return new Ct(f,s,a)},this),u=Vy.createTree(i,this,h);function h(f){f.wrapMethod("getItemModel",function(v,c){var d=u.getNodeByDataIndex(c),p=d?l[d.depth]:null;return v.parentModel=p||s,v})}return u.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,a,i){var n=this.getData(),o=this.getRawValue(t),s=n.getName(t);return ue("nameValue",{name:s,value:o})},e.prototype.getDataParams=function(t){var a=r.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return a.treeAncestors=lv(i,this),a.treePathInfo=a.treeAncestors,a},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},F(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var a=this._idIndexMap;a||(a=this._idIndexMap=J(),this._idIndexMapCount=0);var i=a.get(t);return i==null&&a.set(t,i=this._idIndexMapCount++),i},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var a=this.getRawData().tree.root;(!t||t!==a&&!a.contains(t))&&(this._viewRoot=a)},e.prototype.enableAriaDecal=function(){lD(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,coordinateSystemUsage:"box",left:B.size.l,top:B.size.xxxl,right:B.size.l,bottom:B.size.xxxl,sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"\u25B6",zoomToNodeRatio:.32*.32,scaleLimit:{max:5,min:.2},roam:!0,roamTrigger:"global",nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",bottom:B.size.m,emptyItemWidth:25,itemStyle:{color:B.color.backgroundShade,textStyle:{color:B.color.secondary}},emphasis:{itemStyle:{color:B.color.background}}},label:{show:!0,distance:0,padding:5,position:"inside",color:B.color.neutral00,overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:B.color.neutral00,borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e}(Ht);function uD(r){var e=0;M(r.children,function(a){uD(a);var i=a.value;W(i)&&(i=i[0]),e+=i});var t=r.value;W(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),W(r.value)?r.value[0]=t:r.value=t}function V4(r,e){var t=Vt(e.get("color")),a=Vt(e.get(["aria","decal","decals"]));if(t){r=r||[];var i,n;M(r,function(s){var l=new Ct(s),u=l.get("color"),h=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(i=!0),(l.get(["itemStyle","decal"])||h&&h!=="none")&&(n=!0)});var o=r[0]||(r[0]={});return i||(o.color=t.slice()),!n&&a&&(o.decal=a.slice()),r}}var G4=8,hD=8,Fy=5,F4=function(){function r(e){this.group=new et,e.add(this.group)}return r.prototype.render=function(e,t,a,i){var n=e.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!n.get("show")||!a)){var s=n.getModel("itemStyle"),l=n.getModel("emphasis"),u=s.getModel("textStyle"),h=l.getModel(["itemStyle","textStyle"]),f=de(e,t).refContainer,v={left:n.get("left"),right:n.get("right"),top:n.get("top"),bottom:n.get("bottom")},c={emptyItemWidth:n.get("emptyItemWidth"),totalWidth:0,renderList:[]},d=qt(v,f);this._prepare(a,c,u),this._renderContent(e,c,d,s,l,u,h,i),Qh(o,v,f)}},r.prototype._prepare=function(e,t,a){for(var i=e;i;i=i.parentNode){var n=fe(i.getModel().get("name"),""),o=a.getTextRect(n),s=Math.max(o.width+G4*2,t.emptyItemWidth);t.totalWidth+=s+hD,t.renderList.push({node:i,text:n,width:s})}},r.prototype._renderContent=function(e,t,a,i,n,o,s,l){for(var u=0,h=t.emptyItemWidth,f=e.get(["breadcrumb","height"]),v=t.totalWidth,c=t.renderList,d=n.getModel("itemStyle").getItemStyle(),p=c.length-1;p>=0;p--){var g=c[p],y=g.node,m=g.width,_=g.text;v>a.width&&(v-=m-h,m=h,_=null);var x=new De({shape:{points:H4(u,0,m,f,p===c.length-1,p===0)},style:st(i.getItemStyle(),{lineJoin:"bevel"}),textContent:new Lt({style:Ft(o,{text:_})}),textConfig:{position:"inside"},z2:Mo*1e4,onclick:pt(l,y)});x.disableLabelAnimation=!0,x.getTextContent().ensureState("emphasis").style=Ft(s,{text:_}),x.ensureState("emphasis").style=d,Xt(x,n.get("focus"),n.get("blurScope"),n.get("disabled")),this.group.add(x),W4(x,e,y),u+=m+hD}},r.prototype.remove=function(){this.group.removeAll()},r}();function H4(r,e,t,a,i,n){var o=[[i?r:r-Fy,e],[r+t,e],[r+t,e+a],[i?r:r-Fy,e+a]];return!n&&o.splice(2,0,[r+t+Fy,e+a/2]),!i&&o.push([r,e+a/2]),o}function W4(r,e,t){vt(r).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:t&&t.dataIndex,name:t&&t.name},treePathInfo:t&&lv(t,e)}}var U4=function(){function r(){this._storage=[],this._elExistsMap={}}return r.prototype.add=function(e,t,a,i,n){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:a,delay:i,easing:n}),!0)},r.prototype.finished=function(e){return this._finishedCallback=e,this},r.prototype.start=function(){for(var e=this,t=this._storage.length,a=function(){t--,t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},i=0,n=this._storage.length;i<n;i++){var o=this._storage[i];o.el.animateTo(o.target,{duration:o.duration,delay:o.delay,easing:o.easing,setToFinal:!0,done:a,aborted:a})}return this},r}();function Y4(){return new U4}var Hy=et,fD=_t,vD=3,cD="label",dD="upperLabel",Z4=Mo*10,$4=Mo*2,X4=Mo*3,jn=an([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),pD=function(r){var e=jn(r);return e.stroke=e.fill=e.lineWidth=null,e},uv=St(),q4=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._state="ready",t._storage=ou(),t}return e.prototype.render=function(t,a,i,n){var o=a.findComponents({mainType:"series",subType:"treemap",query:n});if(!(gt(o,t)<0)){this.seriesModel=t,this.api=i,this.ecModel=a;var s=["treemapZoomToNode","treemapRootToNode"],l=iu(n,s,t),u=n&&n.type,h=t.layoutInfo,f=!this._oldTree,v=this._storage,c=u==="treemapRootToNode"&&l&&v?{rootNodeGroup:v.nodeGroup[l.node.getRawIndex()],direction:n.direction}:null,d=this._giveContainerGroup(h),p=t.get("animation"),g=this._doRender(d,t,c);p&&!f&&(!u||u==="treemapZoomToNode"||u==="treemapRootToNode")?this._doAnimation(d,g,t,c):g.renderFinally(),this._resetController(i),this._renderBreadcrumb(t,i,l)}},e.prototype._giveContainerGroup=function(t){var a=this._containerGroup;return a||(a=this._containerGroup=new Hy,this._initEvents(a),this.group.add(a)),a.x=t.x,a.y=t.y,a},e.prototype._doRender=function(t,a,i){var n=a.getData().tree,o=this._oldTree,s=ou(),l=ou(),u=this._storage,h=[];function f(m,_,x,b){return K4(a,l,u,i,s,h,m,_,x,b)}p(n.root?[n.root]:[],o&&o.root?[o.root]:[],t,n===o||!o,0);var v=g(u);if(this._oldTree=n,this._storage=l,this._controllerHost){var c=this.seriesModel.layoutInfo,d=n.root.getLayout();d.width===c.width&&d.height===c.height&&(this._controllerHost.zoom=1)}return{lastsForAnimation:s,willDeleteEls:v,renderFinally:y};function p(m,_,x,b,S){b?(_=m,M(m,function(C,A){!C.isRemoved()&&T(A,A)})):new Fa(_,m,w,w).add(T).update(T).remove(pt(T,null)).execute();function w(C){return C.getId()}function T(C,A){var D=C!=null?m[C]:null,I=A!=null?_[A]:null,L=f(D,I,x,S);L&&p(D&&D.viewChildren||[],I&&I.viewChildren||[],L,b,S+1)}}function g(m){var _=ou();return m&&M(m,function(x,b){var S=_[b];M(x,function(w){w&&(S.push(w),uv(w).willDelete=!0)})}),_}function y(){M(v,function(m){M(m,function(_){_.parent&&_.parent.remove(_)})}),M(h,function(m){m.invisible=!0,m.dirty()})}},e.prototype._doAnimation=function(t,a,i,n){var o=i.get("animationDurationUpdate"),s=i.get("animationEasing"),l=(rt(o)?0:o)||0,u=(rt(s)?null:s)||"cubicOut",h=Y4();M(a.willDeleteEls,function(f,v){M(f,function(c,d){if(!c.invisible){var p=c.parent,g,y=uv(p);if(n&&n.direction==="drillDown")g=p===n.rootNodeGroup?{shape:{x:0,y:0,width:y.nodeWidth,height:y.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var m=0,_=0;y.willDelete||(m=y.nodeWidth/2,_=y.nodeHeight/2),g=v==="nodeGroup"?{x:m,y:_,style:{opacity:0}}:{shape:{x:m,y:_,width:0,height:0},style:{opacity:0}}}g&&h.add(c,g,l,0,u)}})}),M(this._storage,function(f,v){M(f,function(c,d){var p=a.lastsForAnimation[v][d],g={};p&&(c instanceof et?p.oldX!=null&&(g.x=c.x,g.y=c.y,c.x=p.oldX,c.y=p.oldY):(p.oldShape&&(g.shape=F({},c.shape),c.setShape(p.oldShape)),p.fadein?(c.setStyle("opacity",0),g.style={opacity:1}):c.style.opacity!==1&&(g.style={opacity:1})),h.add(c,g,l,0,u))})},this),this._state="animating",h.finished(X(function(){this._state="ready",a.renderFinally()},this)).start()},e.prototype._resetController=function(t){var a=this,i=this._controller,n=this._controllerHost;n||(this._controllerHost={target:this.group},n=this._controllerHost);var o=this.seriesModel;i||(i=this._controller=new $n(t.getZr()),i.on("pan",X(this._onPan,this)),i.on("zoom",X(this._onZoom,this))),i.enable(o.get("roam"),{api:t,zInfo:{component:o},triggerInfo:{roamTrigger:o.get("roamTrigger"),isInSelf:function(s,l,u){var h=a._containerGroup;return h?h.getBoundingRect().contain(l-h.x,u-h.y):!1}}}),n.zoomLimit=o.get("scaleLimit"),n.zoom=o.get("zoom")},e.prototype._clearController=function(){var t=this._controller;this._controllerHost=null,t&&(t.dispose(),t=null)},e.prototype._onPan=function(t){if(this._state!=="animating"&&(Math.abs(t.dx)>vD||Math.abs(t.dy)>vD)){var a=this.seriesModel.getData().tree.root;if(!a)return;var i=a.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+t.dx,y:i.y+t.dy,width:i.width,height:i.height}})}},e.prototype._onZoom=function(t){var a=t.originX,i=t.originY,n=t.scale;if(this._state!=="animating"){var o=this.seriesModel.getData().tree.root;if(!o)return;var s=o.getLayout();if(!s)return;var l=new ht(s.x,s.y,s.width,s.height),u=null,h=this._controllerHost;u=h.zoomLimit;var f=h.zoom=h.zoom||1;if(f*=n,u){var v=u.min||0,c=u.max||1/0;f=Math.max(Math.min(c,f),v)}var d=f/h.zoom;h.zoom=f;var p=this.seriesModel.layoutInfo;a-=p.x,i-=p.y;var g=Se();Kr(g,g,[-a,-i]),Cc(g,g,[d,d]),Kr(g,g,[a,i]),l.applyTransform(g),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:l.x,y:l.y,width:l.width,height:l.height}})}},e.prototype._initEvents=function(t){var a=this;t.on("click",function(i){if(a._state==="ready"){var n=a.seriesModel.get("nodeClick",!0);if(n){var o=a.findTarget(i.offsetX,i.offsetY);if(o){var s=o.node;if(s.getLayout().isLeafRoot)a._rootToNode(o);else if(n==="zoomToNode")a._zoomToNode(o);else if(n==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),h=l.get("target",!0)||"blank";u&&Kh(u,h)}}}}},this)},e.prototype._renderBreadcrumb=function(t,a,i){var n=this;i||(i=t.get("leafDepth",!0)!=null?{node:t.getViewRoot()}:this.findTarget(a.getWidth()/2,a.getHeight()/2),i||(i={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new F4(this.group))).render(t,a,i.node,function(o){n._state!=="animating"&&(Gy(t.getViewRoot(),o)?n._rootToNode({node:o}):n._zoomToNode({node:o}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=ou(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype._rootToNode=function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype.findTarget=function(t,a){var i,n=this.seriesModel.getViewRoot();return n.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(t,a),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)i={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),i},e.type="treemap",e}(zt);function ou(){return{nodeGroup:[],background:[],content:[]}}function K4(r,e,t,a,i,n,o,s,l,u){if(!o)return;var h=o.getLayout(),f=r.getData(),v=o.getModel();if(f.setItemGraphicEl(o.dataIndex,null),!h||!h.isInView)return;var c=h.width,d=h.height,p=h.borderWidth,g=h.invisible,y=o.getRawIndex(),m=s&&s.getRawIndex(),_=o.viewChildren,x=h.upperHeight,b=_&&_.length,S=v.getModel("itemStyle"),w=v.getModel(["emphasis","itemStyle"]),T=v.getModel(["blur","itemStyle"]),C=v.getModel(["select","itemStyle"]),A=S.get("borderRadius")||0,D=it("nodeGroup",Hy);if(!D)return;if(l.add(D),D.x=h.x||0,D.y=h.y||0,D.markRedraw(),uv(D).nodeWidth=c,uv(D).nodeHeight=d,h.isAboveViewRoot)return D;var I=it("background",fD,u,$4);I&&V(D,I,b&&h.upperLabelHeight);var L=v.getModel("emphasis"),P=L.get("focus"),k=L.get("blurScope"),R=L.get("disabled"),O=P==="ancestor"?o.getAncestorsIndices():P==="descendant"?o.getDescendantIndices():P;if(b)Qs(D)&&pn(D,!1),I&&(pn(I,!R),f.setItemGraphicEl(o.dataIndex,I),qd(I,O,k));else{var E=it("content",fD,u,X4);E&&G(D,E),I.disableMorphing=!0,I&&Qs(I)&&pn(I,!1),pn(D,!R),f.setItemGraphicEl(o.dataIndex,D);var N=v.getShallow("cursor");N&&E.attr("cursor",N),qd(D,O,k)}return D;function V(ut,tt,ct){var j=vt(tt);if(j.dataIndex=o.dataIndex,j.seriesIndex=r.seriesIndex,tt.setShape({x:0,y:0,width:c,height:d,r:A}),g)H(tt);else{tt.invisible=!1;var ft=o.getVisual("style"),Nt=ft.stroke,wt=pD(S);wt.fill=Nt;var kt=jn(w);kt.fill=w.get("borderColor");var Bt=jn(T);Bt.fill=T.get("borderColor");var xe=jn(C);if(xe.fill=C.get("borderColor"),ct){var vr=c-2*p;Y(tt,Nt,ft.opacity,{x:p,y:0,width:vr,height:x})}else tt.removeTextContent();tt.setStyle(wt),tt.ensureState("emphasis").style=kt,tt.ensureState("blur").style=Bt,tt.ensureState("select").style=xe,cn(tt)}ut.add(tt)}function G(ut,tt){var ct=vt(tt);ct.dataIndex=o.dataIndex,ct.seriesIndex=r.seriesIndex;var j=Math.max(c-2*p,0),ft=Math.max(d-2*p,0);if(tt.culling=!0,tt.setShape({x:p,y:p,width:j,height:ft,r:A}),g)H(tt);else{tt.invisible=!1;var Nt=o.getVisual("style"),wt=Nt.fill,kt=pD(S);kt.fill=wt,kt.decal=Nt.decal;var Bt=jn(w),xe=jn(T),vr=jn(C);Y(tt,wt,Nt.opacity,null),tt.setStyle(kt),tt.ensureState("emphasis").style=Bt,tt.ensureState("blur").style=xe,tt.ensureState("select").style=vr,cn(tt)}ut.add(tt)}function H(ut){!ut.invisible&&n.push(ut)}function Y(ut,tt,ct,j){var ft=v.getModel(j?dD:cD),Nt=fe(v.get("name"),null),wt=ft.getShallow("show");ye(ut,ce(v,j?dD:cD),{defaultText:wt?Nt:null,inheritColor:tt,defaultOpacity:ct,labelFetcher:r,labelDataIndex:o.dataIndex});var kt=ut.getTextContent();if(kt){var Bt=kt.style,xe=ku(Bt.padding||0);j&&(ut.setTextConfig({layoutRect:j}),kt.disableLabelLayout=!0),kt.beforeUpdate=function(){var tr=Math.max((j?j.width:ut.shape.width)-xe[1]-xe[3],0),so=Math.max((j?j.height:ut.shape.height)-xe[0]-xe[2],0);(Bt.width!==tr||Bt.height!==so)&&kt.setStyle({width:tr,height:so})},Bt.truncateMinChar=2,Bt.lineOverflow="truncate",q(Bt,j,h);var vr=kt.getState("emphasis");q(vr?vr.style:null,j,h)}}function q(ut,tt,ct){var j=ut?ut.text:null;if(!tt&&ct.isLeafRoot&&j!=null){var ft=r.get("drillDownIcon",!0);ut.text=ft?ft+" "+j:j}}function it(ut,tt,ct,j){var ft=m!=null&&t[ut][m],Nt=i[ut];return ft?(t[ut][m]=null,xt(Nt,ft)):g||(ft=new tt,ft instanceof _r&&(ft.z2=j4(ct,j)),At(Nt,ft)),e[ut][y]=ft}function xt(ut,tt){var ct=ut[y]={};tt instanceof Hy?(ct.oldX=tt.x,ct.oldY=tt.y):ct.oldShape=F({},tt.shape)}function At(ut,tt){var ct=ut[y]={},j=o.parentNode,ft=tt instanceof et;if(j&&(!a||a.direction==="drillDown")){var Nt=0,wt=0,kt=i.background[j.getRawIndex()];!a&&kt&&kt.oldShape&&(Nt=kt.oldShape.width,wt=kt.oldShape.height),ft?(ct.oldX=0,ct.oldY=wt):ct.oldShape={x:Nt,y:wt,width:0,height:0}}ct.fadein=!ft}}function j4(r,e){return r*Z4+e}var su=M,J4=lt,hv=-1,_e=function(){function r(e){var t=e.mappingMethod,a=e.type,i=this.option=at(e);this.type=a,this.mappingMethod=t,this._normalizeData=eW[t];var n=r.visualHandlers[a];this.applyVisual=n.applyVisual,this.getColorMapper=n.getColorMapper,this._normalizedToVisual=n._normalizedToVisual[t],t==="piecewise"?(Wy(i),Q4(i)):t==="category"?i.categories?tW(i):Wy(i,!0):(Ee(t!=="linear"||i.dataExtent),Wy(i))}return r.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},r.prototype.getNormalizer=function(){return X(this._normalizeData,this)},r.listVisualTypes=function(){return Mt(r.visualHandlers)},r.isValidType=function(e){return r.visualHandlers.hasOwnProperty(e)},r.eachVisual=function(e,t,a){lt(e)?M(e,t,a):t.call(a,e)},r.mapVisual=function(e,t,a){var i,n=W(e)?[]:lt(e)?{}:(i=!0,null);return r.eachVisual(e,function(o,s){var l=t.call(a,o,s);i?n=l:n[s]=l}),n},r.retrieveVisuals=function(e){var t={},a;return e&&su(r.visualHandlers,function(i,n){e.hasOwnProperty(n)&&(t[n]=e[n],a=!0)}),a?t:null},r.prepareVisualTypes=function(e){if(W(e))e=e.slice();else if(J4(e)){var t=[];su(e,function(a,i){t.push(i)}),e=t}else return[];return e.sort(function(a,i){return i==="color"&&a!=="color"&&a.indexOf("color")===0?1:-1}),e},r.dependsOn=function(e,t){return t==="color"?!!(e&&e.indexOf(t)===0):e===t},r.findPieceIndex=function(e,t,a){for(var i,n=1/0,o=0,s=t.length;o<s;o++){var l=t[o].value;if(l!=null){if(l===e||$(l)&&l===e+"")return o;a&&v(l,o)}}for(var o=0,s=t.length;o<s;o++){var u=t[o],h=u.interval,f=u.close;if(h){if(h[0]===-1/0){if(vv(f[1],e,h[1]))return o}else if(h[1]===1/0){if(vv(f[0],h[0],e))return o}else if(vv(f[0],h[0],e)&&vv(f[1],e,h[1]))return o;a&&v(h[0],o),a&&v(h[1],o)}}if(a)return e===1/0?t.length-1:e===-1/0?0:i;function v(c,d){var p=Math.abs(c-e);p<n&&(n=p,i=d)}},r.visualHandlers={color:{applyVisual:lu("color"),getColorMapper:function(){var e=this.option;return X(e.mappingMethod==="category"?function(t,a){return!a&&(t=this._normalizeData(t)),uu.call(this,t)}:function(t,a,i){var n=!!i;return!a&&(t=this._normalizeData(t)),i=Fc(t,e.parsedVisual,i),n?i:Jr(i,"rgba")},this)},_normalizedToVisual:{linear:function(e){return Jr(Fc(e,this.option.parsedVisual),"rgba")},category:uu,piecewise:function(e,t){var a=Yy.call(this,t);return a==null&&(a=Jr(Fc(e,this.option.parsedVisual),"rgba")),a},fixed:Jn}},colorHue:fv(function(e,t){return li(e,t)}),colorSaturation:fv(function(e,t){return li(e,null,t)}),colorLightness:fv(function(e,t){return li(e,null,null,t)}),colorAlpha:fv(function(e,t){return $u(e,t)}),decal:{applyVisual:lu("decal"),_normalizedToVisual:{linear:null,category:uu,piecewise:null,fixed:null}},opacity:{applyVisual:lu("opacity"),_normalizedToVisual:Uy([0,1])},liftZ:{applyVisual:lu("liftZ"),_normalizedToVisual:{linear:Jn,category:Jn,piecewise:Jn,fixed:Jn}},symbol:{applyVisual:function(e,t,a){var i=this.mapValueToVisual(e);a("symbol",i)},_normalizedToVisual:{linear:gD,category:uu,piecewise:function(e,t){var a=Yy.call(this,t);return a==null&&(a=gD.call(this,e)),a},fixed:Jn}},symbolSize:{applyVisual:lu("symbolSize"),_normalizedToVisual:Uy([0,1])}},r}();function Q4(r){var e=r.pieceList;r.hasSpecialVisual=!1,M(e,function(t,a){t.originIndex=a,t.visual!=null&&(r.hasSpecialVisual=!0)})}function tW(r){var e=r.categories,t=r.categoryMap={},a=r.visual;if(su(e,function(o,s){t[o]=s}),!W(a)){var i=[];lt(a)?su(a,function(o,s){var l=t[s];i[l??hv]=o}):i[hv]=a,a=yD(r,i)}for(var n=e.length-1;n>=0;n--)a[n]==null&&(delete t[e[n]],e.pop())}function Wy(r,e){var t=r.visual,a=[];lt(t)?su(t,function(n){a.push(n)}):t!=null&&a.push(t);var i={color:1,symbol:1};!e&&a.length===1&&!i.hasOwnProperty(r.type)&&(a[1]=a[0]),yD(r,a)}function fv(r){return{applyVisual:function(e,t,a){var i=this.mapValueToVisual(e);a("color",r(t("color"),i))},_normalizedToVisual:Uy([0,1])}}function gD(r){var e=this.option.visual;return e[Math.round(Ot(r,[0,1],[0,e.length-1],!0))]||{}}function lu(r){return function(e,t,a){a(r,this.mapValueToVisual(e))}}function uu(r){var e=this.option.visual;return e[this.option.loop&&r!==hv?r%e.length:r]}function Jn(){return this.option.visual[0]}function Uy(r){return{linear:function(e){return Ot(e,r,this.option.visual,!0)},category:uu,piecewise:function(e,t){var a=Yy.call(this,t);return a==null&&(a=Ot(e,r,this.option.visual,!0)),a},fixed:Jn}}function Yy(r){var e=this.option,t=e.pieceList;if(e.hasSpecialVisual){var a=_e.findPieceIndex(r,t),i=t[a];if(i&&i.visual)return i.visual[this.type]}}function yD(r,e){return r.visual=e,r.type==="color"&&(r.parsedVisual=U(e,function(t){var a=qe(t);return a||[0,0,0,1]})),e}var eW={linear:function(r){return Ot(r,this.option.dataExtent,[0,1],!0)},piecewise:function(r){var e=this.option.pieceList,t=_e.findPieceIndex(r,e,!0);if(t!=null)return Ot(t,[0,e.length-1],[0,1],!0)},category:function(r){var e=this.option.categories?this.option.categoryMap[r]:r;return e??hv},fixed:Qt};function vv(r,e,t){return r?e<=t:e<t}var rW="itemStyle",mD=St(),aW={seriesType:"treemap",reset:function(r){var e=r.getData().tree,t=e.root;t.isRemoved()||_D(t,{},r.getViewRoot().getAncestors(),r)}};function _D(r,e,t,a){var i=r.getModel(),n=r.getLayout(),o=r.hostTree.data;if(!(!n||n.invisible||!n.isInView)){var s=i.getModel(rW),l=iW(s,e,a),u=o.ensureUniqueItemVisual(r.dataIndex,"style"),h=s.get("borderColor"),f=s.get("borderColorSaturation"),v;f!=null&&(v=xD(l),h=nW(f,v)),u.stroke=h;var c=r.viewChildren;if(!c||!c.length)v=xD(l),u.fill=v;else{var d=oW(r,i,n,s,l,c);M(c,function(p,g){if(p.depth>=t.length||p===t[p.depth]){var y=sW(i,l,p,g,d,a);_D(p,y,t,a)}})}}}function iW(r,e,t){var a=F({},e),i=t.designatedVisualItemStyle;return M(["color","colorAlpha","colorSaturation"],function(n){i[n]=e[n];var o=r.get(n);i[n]=null,o!=null&&(a[n]=o)}),a}function xD(r){var e=Zy(r,"color");if(e){var t=Zy(r,"colorAlpha"),a=Zy(r,"colorSaturation");return a&&(e=li(e,null,null,a)),t&&(e=$u(e,t)),e}}function nW(r,e){return e!=null?li(e,null,null,r):null}function Zy(r,e){var t=r[e];if(t!=null&&t!=="none")return t}function oW(r,e,t,a,i,n){if(!(!n||!n.length)){var o=$y(e,"color")||i.color!=null&&i.color!=="none"&&($y(e,"colorAlpha")||$y(e,"colorSaturation"));if(o){var s=e.get("visualMin"),l=e.get("visualMax"),u=t.dataExtent.slice();s!=null&&s<u[0]&&(u[0]=s),l!=null&&l>u[1]&&(u[1]=l);var 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 v=new _e(f);return mD(v).drColorMappingBy=h,v}}}function $y(r,e){var t=r.get(e);return W(t)&&t.length?{name:e,range:t}:null}function sW(r,e,t,a,i,n){var o=F({},e);if(i){var s=i.type,l=s==="color"&&mD(i).drColorMappingBy,u=l==="index"?a:l==="id"?n.mapIdToIndex(t.getId()):t.getValue(r.get("visualDimension"));o[s]=i.mapValueToVisual(u)}return o}var hu=Math.max,cv=Math.min,SD=Ae,Xy=M,bD=["itemStyle","borderWidth"],lW=["itemStyle","gapWidth"],uW=["upperLabel","show"],hW=["upperLabel","height"],fW={seriesType:"treemap",reset:function(r,e,t,a){var i=r.option,n=de(r,t).refContainer,o=qt(r.getBoxLayoutParams(),n),s=i.size||[],l=Z(SD(o.width,s[0]),n.width),u=Z(SD(o.height,s[1]),n.height),h=a&&a.type,f=["treemapZoomToNode","treemapRootToNode"],v=iu(a,f,r),c=h==="treemapRender"||h==="treemapMove"?a.rootRect:null,d=r.getViewRoot(),p=oD(d);if(h!=="treemapMove"){var g=h==="treemapZoomToNode"?yW(r,v,d,l,u):c?[c.width,c.height]:[l,u],y=i.sort;y&&y!=="asc"&&y!=="desc"&&(y="desc");var m={squareRatio:i.squareRatio,sort:y,leafDepth:i.leafDepth};d.hostTree.clearLayouts();var _={x:0,y:0,width:g[0],height:g[1],area:g[0]*g[1]};d.setLayout(_),wD(d,m,!1,0),_=d.getLayout(),Xy(p,function(b,S){var w=(p[S+1]||d).getValue();b.setLayout(F({dataExtent:[w,w],borderWidth:0,upperHeight:0},_))})}var x=r.getData().tree.root;x.setLayout(mW(o,c,v),!0),r.setLayoutInfo(o),CD(x,new ht(-o.x,-o.y,t.getWidth(),t.getHeight()),p,d,0)}};function wD(r,e,t,a){var i,n;if(!r.isRemoved()){var o=r.getLayout();i=o.width,n=o.height;var s=r.getModel(),l=s.get(bD),u=s.get(lW)/2,h=AD(s),f=Math.max(l,h),v=l-u,c=f-u;r.setLayout({borderWidth:l,upperHeight:f,upperLabelHeight:h},!0),i=hu(i-2*v,0),n=hu(n-v-c,0);var d=i*n,p=vW(r,s,d,e,t,a);if(p.length){var g={x:v,y:c,width:i,height:n},y=cv(i,n),m=1/0,_=[];_.area=0;for(var x=0,b=p.length;x<b;){var S=p[x];_.push(S),_.area+=S.getLayout().area;var w=gW(_,y,e.squareRatio);w<=m?(x++,m=w):(_.area-=_.pop().getLayout().area,TD(_,y,g,u,!1),y=cv(g.width,g.height),_.length=_.area=0,m=1/0)}if(_.length&&TD(_,y,g,u,!0),!t){var T=s.get("childrenVisibleMin");T!=null&&d<T&&(t=!0)}for(var x=0,b=p.length;x<b;x++)wD(p[x],e,t,a+1)}}}function vW(r,e,t,a,i,n){var o=r.children||[],s=a.sort;s!=="asc"&&s!=="desc"&&(s=null);var l=a.leafDepth!=null&&a.leafDepth<=n;if(i&&!l)return r.viewChildren=[];o=Et(o,function(c){return!c.isRemoved()}),dW(o,s);var u=pW(e,o,s);if(u.sum===0)return r.viewChildren=[];if(u.sum=cW(e,t,u.sum,s,o),u.sum===0)return r.viewChildren=[];for(var h=0,f=o.length;h<f;h++){var v=o[h].getValue()/u.sum*t;o[h].setLayout({area:v})}return l&&(o.length&&r.setLayout({isLeafRoot:!0},!0),o.length=0),r.viewChildren=o,r.setLayout({dataExtent:u.dataExtent},!0),o}function cW(r,e,t,a,i){if(!a)return t;for(var n=r.get("visibleMin"),o=i.length,s=o,l=o-1;l>=0;l--){var u=i[a==="asc"?o-l-1:l].getValue();u/t*e<n&&(s=l,t-=u)}return a==="asc"?i.splice(0,o-s):i.splice(s,o-s),t}function dW(r,e){return e&&r.sort(function(t,a){var i=e==="asc"?t.getValue()-a.getValue():a.getValue()-t.getValue();return i===0?e==="asc"?t.dataIndex-a.dataIndex:a.dataIndex-t.dataIndex:i}),r}function pW(r,e,t){for(var a=0,i=0,n=e.length;i<n;i++)a+=e[i].getValue();var o=r.get("visualDimension"),s;return!e||!e.length?s=[NaN,NaN]:o==="value"&&t?(s=[e[e.length-1].getValue(),e[0].getValue()],t==="asc"&&s.reverse()):(s=[1/0,-1/0],Xy(e,function(l){var u=l.getValue(o);u<s[0]&&(s[0]=u),u>s[1]&&(s[1]=u)})),{sum:a,dataExtent:s}}function gW(r,e,t){for(var a=0,i=1/0,n=0,o=void 0,s=r.length;n<s;n++)o=r[n].getLayout().area,o&&(o<i&&(i=o),o>a&&(a=o));var l=r.area*r.area,u=e*e*t;return l?hu(u*a/l,l/(u*i)):1/0}function TD(r,e,t,a,i){var n=e===t.width?0:1,o=1-n,s=["x","y"],l=["width","height"],u=t[s[n]],h=e?r.area/e:0;(i||h>t[l[o]])&&(h=t[l[o]]);for(var f=0,v=r.length;f<v;f++){var c=r[f],d={},p=h?c.getLayout().area/h:0,g=d[l[o]]=hu(h-2*a,0),y=t[s[n]]+t[l[n]]-u,m=f===v-1||y<p?y:p,_=d[l[n]]=hu(m-2*a,0);d[s[o]]=t[s[o]]+cv(a,g/2),d[s[n]]=u+cv(a,_/2),u+=m,c.setLayout(d,!0)}t[s[o]]+=h,t[l[o]]-=h}function yW(r,e,t,a,i){var n=(e||{}).node,o=[a,i];if(!n||n===t)return o;for(var s,l=a*i,u=l*r.option.zoomToNodeRatio;s=n.parentNode;){for(var h=0,f=s.children,v=0,c=f.length;v<c;v++)h+=f[v].getValue();var d=n.getValue();if(d===0)return o;u*=h/d;var p=s.getModel(),g=p.get(bD),y=Math.max(g,AD(p));u+=4*g*g+(3*g+y)*Math.pow(u,.5),u>k1&&(u=k1),n=s}u<l&&(u=l);var m=Math.pow(u/l,.5);return[a*m,i*m]}function mW(r,e,t){if(e)return{x:e.x,y:e.y};var a={x:0,y:0};if(!t)return a;var i=t.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:r.width/2-o[0],y:r.height/2-o[1]}}function CD(r,e,t,a,i){var n=r.getLayout(),o=t[i],s=o&&o===r;if(!(o&&!s||i===t.length&&r!==a)){r.setLayout({isInView:!0,invisible:!s&&!e.intersect(n),isAboveViewRoot:s},!0);var l=new ht(e.x-n.x,e.y-n.y,e.width,e.height);Xy(r.viewChildren||[],function(u){CD(u,l,t,a,i+1)})}}function AD(r){return r.get(uW)?r.get(hW):0}function _W(r){r.registerSeriesModel(z4),r.registerChartView(q4),r.registerVisual(aW),r.registerLayout(fW),B4(r)}function xW(r){var e=r.findComponents({mainType:"legend"});!e||!e.length||r.eachSeriesByType("graph",function(t){var a=t.getCategoriesData(),i=t.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){Dt(u)&&(u=o[u]);for(var h=0;h<e.length;h++)if(!e[h].isSelected(u))return!1}return!0})})}function SW(r){var e={};r.eachSeriesByType("graph",function(t){var a=t.getCategoriesData(),i=t.getData(),n={};a.each(function(o){var s=a.getName(o);n["ec-"+s]=o;var l=a.getItemModel(o),u=l.getModel("itemStyle").getItemStyle();u.fill||(u.fill=t.getColorFromPalette(s,e)),a.setItemVisual(o,"style",u);for(var h=["symbol","symbolSize","symbolKeepAspect"],f=0;f<h.length;f++){var v=l.getShallow(h[f],!0);v!=null&&a.setItemVisual(o,h[f],v)}}),a.count()&&i.each(function(o){var s=i.getItemModel(o),l=s.getShallow("category");if(l!=null){$(l)&&(l=n["ec-"+l]);var u=a.getItemVisual(l,"style"),h=i.ensureUniqueItemVisual(o,"style");F(h,u);for(var f=["symbol","symbolSize","symbolKeepAspect"],v=0;v<f.length;v++)i.setItemVisual(o,f[v],a.getItemVisual(l,f[v]))}})})}function dv(r){return r instanceof Array||(r=[r,r]),r}function bW(r){r.eachSeriesByType("graph",function(e){var t=e.getGraph(),a=e.getEdgeData(),i=dv(e.get("edgeSymbol")),n=dv(e.get("edgeSymbolSize"));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("style",e.getModel("lineStyle").getLineStyle()),a.each(function(o){var s=a.getItemModel(o),l=t.getEdgeByIndex(o),u=dv(s.getShallow("symbol",!0)),h=dv(s.getShallow("symbolSize",!0)),f=s.getModel("lineStyle").getLineStyle(),v=a.ensureUniqueItemVisual(o,"style");switch(F(v,f),v.stroke){case"source":{var c=l.node1.getVisual("style");v.stroke=c&&c.fill;break}case"target":{var c=l.node2.getVisual("style");v.stroke=c&&c.fill;break}}u[0]&&l.setVisual("fromSymbol",u[0]),u[1]&&l.setVisual("toSymbol",u[1]),h[0]&&l.setVisual("fromSymbolSize",h[0]),h[1]&&l.setVisual("toSymbolSize",h[1])})})}var qy="-->",pv=function(r){return r.get("autoCurveness")||null},MD=function(r,e){var t=pv(r),a=20,i=[];if(Dt(t))a=t;else if(W(t)){r.__curvenessList=t;return}e>a&&(a=e);var n=a%2?a+2:a+3;i=[];for(var o=0;o<n;o++)i.push((o%2?o+1:o)/10*(o%2?-1:1));r.__curvenessList=i},fu=function(r,e,t){var a=[r.id,r.dataIndex].join("."),i=[e.id,e.dataIndex].join(".");return[t.uid,a,i].join(qy)},DD=function(r){var e=r.split(qy);return[e[0],e[2],e[1]].join(qy)},wW=function(r,e){var t=fu(r.node1,r.node2,e);return e.__edgeMap[t]},TW=function(r,e){var t=Ky(fu(r.node1,r.node2,e),e),a=Ky(fu(r.node2,r.node1,e),e);return t+a},Ky=function(r,e){var t=e.__edgeMap;return t[r]?t[r].length:0};function CW(r){pv(r)&&(r.__curvenessList=[],r.__edgeMap={},MD(r))}function AW(r,e,t,a){if(pv(t)){var i=fu(r,e,t),n=t.__edgeMap,o=n[DD(i)];n[i]&&!o?n[i].isForward=!0:o&&n[i]&&(o.isForward=!0,n[i].isForward=!1),n[i]=n[i]||[],n[i].push(a)}}function jy(r,e,t,a){var i=pv(e),n=W(i);if(!i)return null;var o=wW(r,e);if(!o)return null;for(var s=-1,l=0;l<o.length;l++)if(o[l]===t){s=l;break}var u=TW(r,e);MD(e,u),r.lineStyle=r.lineStyle||{};var h=fu(r.node1,r.node2,e),f=e.__curvenessList,v=n||u%2?0:1;if(o.isForward)return f[v+s];var c=DD(h),d=Ky(c,e),p=f[s+d+v];return a?n?i&&i[0]===0?(d+v)%2?p:-p:((d%2?0:1)+v)%2?p:-p:(d+v)%2?p:-p:f[s+d+v]}function LD(r){var e=r.coordinateSystem;if(!(e&&e.type!=="view")){var t=r.getGraph();t.eachNode(function(a){var i=a.getModel();a.setLayout([+i.get("x"),+i.get("y")])}),Jy(t,r)}}function Jy(r,e){r.eachEdge(function(t,a){var i=er(t.getModel().get(["lineStyle","curveness"]),-jy(t,e,a,!0),0),n=Ma(t.node1.getLayout()),o=Ma(t.node2.getLayout()),s=[n,o];+i&&s.push([(n[0]+o[0])/2-(n[1]-o[1])*i,(n[1]+o[1])/2-(o[0]-n[0])*i]),t.setLayout(s)})}function MW(r,e){r.eachSeriesByType("graph",function(t){var a=t.get("layout"),i=t.coordinateSystem;if(i&&i.type!=="view"){var n=t.getData(),o=[];M(i.dimensions,function(v){o=o.concat(n.mapDimensionsAll(v))});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])}Jy(n.graph,t)}else(!a||a==="none")&&LD(t)})}function vu(r){var e=r.coordinateSystem;if(e.type!=="view")return 1;var t=r.option.nodeScaleRatio,a=e.scaleX,i=e.getZoom(),n=(i-1)*t+1;return n/a}function cu(r){var e=r.getVisual("symbolSize");return e instanceof Array&&(e=(e[0]+e[1])/2),+e}var ID=Math.PI,Qy=[];function tm(r,e,t,a){var i=r.coordinateSystem;if(!(i&&i.type!=="view")){var n=i.getBoundingRect(),o=r.getData(),s=o.graph,l=n.width/2+n.x,u=n.height/2+n.y,h=Math.min(n.width,n.height)/2,f=o.count();if(o.setLayout({cx:l,cy:u}),!!f){if(t){var v=i.pointToData(a),c=v[0],d=v[1],p=[c-l,d-u];ho(p,p),Nu(p,p,h),t.setLayout([l+p[0],u+p[1]],!0);var g=r.get(["circular","rotateLabel"]);PD(t,g,l,u)}DW[e](r,s,o,h,l,u,f),s.eachEdge(function(y,m){var _=er(y.getModel().get(["lineStyle","curveness"]),jy(y,r,m),0),x=Ma(y.node1.getLayout()),b=Ma(y.node2.getLayout()),S,w=(x[0]+b[0])/2,T=(x[1]+b[1])/2;+_&&(_*=3,S=[l*_+w*(1-_),u*_+T*(1-_)]),y.setLayout([x,b,S])})}}}var DW={value:function(r,e,t,a,i,n,o){var s=0,l=t.getSum("value"),u=Math.PI*2/(l||o);e.eachNode(function(h){var f=h.getValue("value"),v=u*(l?f:1)/2;s+=v,h.setLayout([a*Math.cos(s)+i,a*Math.sin(s)+n]),s+=v})},symbolSize:function(r,e,t,a,i,n,o){var s=0;Qy.length=o;var l=vu(r);e.eachNode(function(f){var v=cu(f);isNaN(v)&&(v=2),v<0&&(v=0),v*=l;var c=Math.asin(v/2/a);isNaN(c)&&(c=ID/2),Qy[f.dataIndex]=c,s+=c*2});var u=(2*ID-s)/o/2,h=0;e.eachNode(function(f){var v=u+Qy[f.dataIndex];h+=v,(!f.getLayout()||!f.getLayout().fixed)&&f.setLayout([a*Math.cos(h)+i,a*Math.sin(h)+n]),h+=v})}};function PD(r,e,t,a){var i=r.getGraphicEl();if(i){var n=r.getModel(),o=n.get(["label","rotate"])||0,s=i.getSymbolPath();if(e){var l=r.getLayout(),u=Math.atan2(l[1]-a,l[0]-t);u<0&&(u=Math.PI*2+u);var h=l[0]<t;h&&(u=u-Math.PI);var f=h?"left":"right";s.setTextConfig({rotation:-u,position:f,origin:"center"});var v=s.ensureState("emphasis");F(v.textConfig||(v.textConfig={}),{position:f})}else s.setTextConfig({rotation:o*=Math.PI/180})}}function LW(r){r.eachSeriesByType("graph",function(e){e.get("layout")==="circular"&&tm(e,"symbolSize")})}var vs=dc;function IW(r,e,t){for(var a=r,i=e,n=t.rect,o=n.width,s=n.height,l=[n.x+o/2,n.y+s/2],u=t.gravity==null?.1:t.gravity,h=0;h<a.length;h++){var f=a[h];f.p||(f.p=Hi(o*(Math.random()-.5)+l[0],s*(Math.random()-.5)+l[1])),f.pp=Ma(f.p),f.edges=null}var v=t.friction==null?.6:t.friction,c=v,d,p;return{warmUp:function(){c=v*.8},setFixed:function(g){a[g].fixed=!0},setUnfixed:function(g){a[g].fixed=!1},beforeStep:function(g){d=g},afterStep:function(g){p=g},step:function(g){d&&d(a,i);for(var y=[],m=a.length,_=0;_<i.length;_++){var x=i[_];if(!x.ignoreForceLayout){var b=x.n1,S=x.n2;Wi(y,S.p,b.p);var w=pc(y)-x.d,T=S.w/(b.w+S.w);isNaN(T)&&(T=0),ho(y,y),!b.fixed&&vs(b.p,b.p,y,T*w*c),!S.fixed&&vs(S.p,S.p,y,-(1-T)*w*c)}}for(var _=0;_<m;_++){var C=a[_];C.fixed||(Wi(y,l,C.p),vs(C.p,C.p,y,u*c))}for(var _=0;_<m;_++)for(var b=a[_],A=_+1;A<m;A++){var S=a[A];Wi(y,S.p,b.p);var w=pc(y);w===0&&(cc(y,Math.random()-.5,Math.random()-.5),w=1);var D=(b.rep+S.rep)/w/w;!b.fixed&&vs(b.pp,b.pp,y,D),!S.fixed&&vs(S.pp,S.pp,y,-D)}for(var I=[],_=0;_<m;_++){var C=a[_];C.fixed||(Wi(I,C.p,C.pp),vs(C.p,C.p,I,c),Ge(C.pp,C.p))}c=c*.992;var L=c<.01;p&&p(a,i,L),g&&g(L)}}}function PW(r){r.eachSeriesByType("graph",function(e){var t=e.coordinateSystem;if(!(t&&t.type!=="view"))if(e.get("layout")==="force"){var a=e.preservedPoints||{},i=e.getGraph(),n=i.data,o=i.edgeData,s=e.getModel("force"),l=s.get("initLayout");e.preservedPoints?n.each(function(_){var x=n.getId(_);n.setItemLayout(_,a[x]||[NaN,NaN])}):!l||l==="none"?LD(e):l==="circular"&&tm(e,"value");var u=n.getDataExtent("value"),h=o.getDataExtent("value"),f=s.get("repulsion"),v=s.get("edgeLength"),c=W(f)?f:[f,f],d=W(v)?v:[v,v];d=[d[1],d[0]];var p=n.mapArray("value",function(_,x){var b=n.getItemLayout(x),S=Ot(_,u,c);return isNaN(S)&&(S=(c[0]+c[1])/2),{w:S,rep:S,fixed:n.getItemModel(x).get("fixed"),p:!b||isNaN(b[0])||isNaN(b[1])?null:b}}),g=o.mapArray("value",function(_,x){var b=i.getEdgeByIndex(x),S=Ot(_,h,d);isNaN(S)&&(S=(d[0]+d[1])/2);var w=b.getModel(),T=er(b.getModel().get(["lineStyle","curveness"]),-jy(b,e,x,!0),0);return{n1:p[b.node1.dataIndex],n2:p[b.node2.dataIndex],d:S,curveness:T,ignoreForceLayout:w.get("ignoreForceLayout")}}),y=t.getBoundingRect(),m=IW(p,g,{rect:y,gravity:s.get("gravity"),friction:s.get("friction")});m.beforeStep(function(_,x){for(var b=0,S=_.length;b<S;b++)_[b].fixed&&Ge(_[b].p,i.getNodeByIndex(b).getLayout())}),m.afterStep(function(_,x,b){for(var S=0,w=_.length;S<w;S++)_[S].fixed||i.getNodeByIndex(S).setLayout(_[S].p),a[n.getId(S)]=_[S].p;for(var S=0,w=x.length;S<w;S++){var T=x[S],C=i.getEdgeByIndex(S),A=T.n1.p,D=T.n2.p,I=C.getLayout();I=I?I.slice():[],I[0]=I[0]||[],I[1]=I[1]||[],Ge(I[0],A),Ge(I[1],D),+T.curveness&&(I[2]=[(A[0]+D[0])/2-(A[1]-D[1])*T.curveness,(A[1]+D[1])/2-(D[0]-A[0])*T.curveness]),C.setLayout(I)}}),e.forceLayout=m,e.preservedPoints=a,m.step()}else e.forceLayout=null})}function kW(r,e,t){var a=de(r,e),i=F(r.getBoxLayoutParams(),{aspect:t}),n=qt(i,a.refContainer);return ob(r,n,t)}function RW(r,e){var t=[];return r.eachSeriesByType("graph",function(a){vl({targetModel:a,coordSysType:"view",coordSysProvider:i,isDefaultDataCoordSys:!0});function i(){var n=a.getData(),o=n.mapArray(function(d){var p=n.getItemModel(d);return[+p.get("x"),+p.get("y")]}),s=[],l=[];_h(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=kW(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],v=l[1]-s[1],c=new Kn(null,{api:e,ecModel:r});return c.zoomLimit=a.get("scaleLimit"),c.setBoundingRect(s[0],s[1],f,v),c.setViewRect(h.x,h.y,h.width,h.height),c.setCenter(a.get("center")),c.setZoom(a.get("zoom")),t.push(c),c}}),t}var kD=Kt.prototype,em=Rh.prototype,RD=function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return r}();(function(r){z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e})(RD);function rm(r){return isNaN(+r.cpx1)||isNaN(+r.cpy1)}var ED=function(r){z(e,r);function e(t){var a=r.call(this,t)||this;return a.type="ec-line",a}return e.prototype.getDefaultStyle=function(){return{stroke:B.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new RD},e.prototype.buildPath=function(t,a){rm(a)?kD.buildPath.call(this,t,a):em.buildPath.call(this,t,a)},e.prototype.pointAt=function(t){return rm(this.shape)?kD.pointAt.call(this,t):em.pointAt.call(this,t)},e.prototype.tangentAt=function(t){var a=this.shape,i=rm(a)?[a.x2-a.x1,a.y2-a.y1]:em.tangentAt.call(this,t);return ho(i,i)},e}(bt),am=["fromSymbol","toSymbol"];function OD(r){return"_"+r+"Type"}function ND(r,e,t){var a=e.getItemVisual(t,r);if(!a||a==="none")return a;var i=e.getItemVisual(t,r+"Size"),n=e.getItemVisual(t,r+"Rotate"),o=e.getItemVisual(t,r+"Offset"),s=e.getItemVisual(t,r+"KeepAspect"),l=$o(i),u=En(o||0,l);return a+l+u+(n||"")+(s||"")}function BD(r,e,t){var a=e.getItemVisual(t,r);if(!(!a||a==="none")){var i=e.getItemVisual(t,r+"Size"),n=e.getItemVisual(t,r+"Rotate"),o=e.getItemVisual(t,r+"Offset"),s=e.getItemVisual(t,r+"KeepAspect"),l=$o(i),u=En(o||0,l),h=he(a,-l[0]/2+u[0],-l[1]/2+u[1],l[0],l[1],null,s);return h.__specifiedRotation=n==null||isNaN(n)?void 0:+n*Math.PI/180||0,h.name=r,h}}function EW(r){var e=new ED({name:"line",subPixelOptimize:!0});return im(e.shape,r),e}function im(r,e){r.x1=e[0][0],r.y1=e[0][1],r.x2=e[1][0],r.y2=e[1][1],r.percent=1;var t=e[2];t?(r.cpx1=t[0],r.cpy1=t[1]):(r.cpx1=NaN,r.cpy1=NaN)}var nm=function(r){z(e,r);function e(t,a,i){var n=r.call(this)||this;return n._createLine(t,a,i),n}return e.prototype._createLine=function(t,a,i){var n=t.hostModel,o=t.getItemLayout(a),s=t.getItemVisual(a,"z2"),l=EW(o);l.shape.percent=0,Yt(l,{z2:Q(s,0),shape:{percent:1}},n,a),this.add(l),M(am,function(u){var h=BD(u,t,a);this.add(h),this[OD(u)]=ND(u,t,a)},this),this._updateCommonStl(t,a,i)},e.prototype.updateData=function(t,a,i){var n=t.hostModel,o=this.childOfName("line"),s=t.getItemLayout(a),l={shape:{}};im(l.shape,s),It(o,l,n,a),M(am,function(u){var h=ND(u,t,a),f=OD(u);if(this[f]!==h){this.remove(this.childOfName(u));var v=BD(u,t,a);this.add(v)}this[f]=h},this),this._updateCommonStl(t,a,i)},e.prototype.getLinePath=function(){return this.childAt(0)},e.prototype._updateCommonStl=function(t,a,i){var n=t.hostModel,o=this.childOfName("line"),s=i&&i.emphasisLineStyle,l=i&&i.blurLineStyle,u=i&&i.selectLineStyle,h=i&&i.labelStatesModels,f=i&&i.emphasisDisabled,v=i&&i.focus,c=i&&i.blurScope;if(!i||t.hasItemOption){var d=t.getItemModel(a),p=d.getModel("emphasis");s=p.getModel("lineStyle").getLineStyle(),l=d.getModel(["blur","lineStyle"]).getLineStyle(),u=d.getModel(["select","lineStyle"]).getLineStyle(),f=p.get("disabled"),v=p.get("focus"),c=p.get("blurScope"),h=ce(d)}var g=t.getItemVisual(a,"style"),y=g.stroke;o.useStyle(g),o.style.fill=null,o.style.strokeNoScale=!0,o.ensureState("emphasis").style=s,o.ensureState("blur").style=l,o.ensureState("select").style=u,M(am,function(S){var w=this.childOfName(S);if(w){w.setColor(y),w.style.opacity=g.opacity;for(var T=0;T<He.length;T++){var C=He[T],A=o.getState(C);if(A){var D=A.style||{},I=w.ensureState(C),L=I.style||(I.style={});D.stroke!=null&&(L[w.__isEmptyBrush?"stroke":"fill"]=D.stroke),D.opacity!=null&&(L.opacity=D.opacity)}}w.markRedraw()}},this);var m=n.getRawValue(a);ye(this,h,{labelDataIndex:a,labelFetcher:{getFormattedLabel:function(S,w){return n.getFormattedLabel(S,w,t.dataType)}},inheritColor:y||B.color.neutral99,defaultOpacity:g.opacity,defaultText:(m==null?t.getName(a):isFinite(m)?ne(m):m)+""});var _=this.getTextContent();if(_){var x=h.normal;_.__align=_.style.align,_.__verticalAlign=_.style.verticalAlign,_.__position=x.get("position")||"middle";var b=x.get("distance");W(b)||(b=[b,b]),_.__labelDistance=b}this.setTextConfig({position:null,local:!0,inside:!1}),Xt(this,v,c,f)},e.prototype.highlight=function(){Oa(this)},e.prototype.downplay=function(){Na(this)},e.prototype.updateLayout=function(t,a){this.setLinePoints(t.getItemLayout(a))},e.prototype.setLinePoints=function(t){var a=this.childOfName("line");im(a.shape,t),a.dirty()},e.prototype.beforeUpdate=function(){var t=this,a=t.childOfName("fromSymbol"),i=t.childOfName("toSymbol"),n=t.getTextContent();if(!a&&!i&&(!n||n.ignore))return;for(var o=1,s=this.parent;s;)s.scaleX&&(o/=s.scaleX),s=s.parent;var l=t.childOfName("line");if(!this.__dirty&&!l.__dirty)return;var u=l.shape.percent,h=l.pointAt(0),f=l.pointAt(u),v=Wi([],f,h);ho(v,v);function c(A,D){var I=A.__specifiedRotation;if(I==null){var L=l.tangentAt(D);A.attr("rotation",(D===1?-1:1)*Math.PI/2-Math.atan2(L[1],L[0]))}else A.attr("rotation",I)}if(a&&(a.setPosition(h),c(a,0),a.scaleX=a.scaleY=o*u,a.markRedraw()),i&&(i.setPosition(f),c(i,1),i.scaleX=i.scaleY=o*u,i.markRedraw()),n&&!n.ignore){n.x=n.y=0,n.originX=n.originY=0;var d=void 0,p=void 0,g=n.__labelDistance,y=g[0]*o,m=g[1]*o,_=u/2,x=l.tangentAt(_),b=[x[1],-x[0]],S=l.pointAt(_);b[1]>0&&(b[0]=-b[0],b[1]=-b[1]);var w=x[0]<0?-1:1;if(n.__position!=="start"&&n.__position!=="end"){var T=-Math.atan2(x[1],x[0]);f[0]<h[0]&&(T=Math.PI+T),n.rotation=T}var C=void 0;switch(n.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":C=-m,p="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":C=m,p="top";break;default:C=0,p="middle"}switch(n.__position){case"end":n.x=v[0]*y+f[0],n.y=v[1]*m+f[1],d=v[0]>.8?"left":v[0]<-.8?"right":"center",p=v[1]>.8?"top":v[1]<-.8?"bottom":"middle";break;case"start":n.x=-v[0]*y+h[0],n.y=-v[1]*m+h[1],d=v[0]>.8?"right":v[0]<-.8?"left":"center",p=v[1]>.8?"bottom":v[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":n.x=y*w+h[0],n.y=h[1]+C,d=x[0]<0?"right":"left",n.originX=-y*w,n.originY=-C;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":n.x=S[0],n.y=S[1]+C,d="center",n.originY=-C;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":n.x=-y*w+f[0],n.y=f[1]+C,d=x[0]>=0?"right":"left",n.originX=y*w,n.originY=-C;break}n.scaleX=n.scaleY=o,n.setStyle({verticalAlign:n.__verticalAlign||p,align:n.__align||d})}},e}(et),om=function(){function r(e){this.group=new et,this._LineCtor=e||nm}return r.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var a=this,i=a.group,n=a._lineData;a._lineData=e,n||i.removeAll();var o=zD(e);e.diff(n).add(function(s){t._doAdd(e,s,o)}).update(function(s,l){t._doUpdate(n,e,l,s,o)}).remove(function(s){i.remove(n.getItemGraphicEl(s))}).execute()},r.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(t,a){t.updateLayout(e,a)},this)},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=zD(e),this._lineData=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t){this._progressiveEls=[];function a(s){!s.isGroup&&!OW(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var i=e.start;i<e.end;i++){var n=t.getItemLayout(i);if(sm(n)){var o=new this._LineCtor(t,i,this._seriesScope);o.traverse(a),this.group.add(o),t.setItemGraphicEl(i,o),this._progressiveEls.push(o)}}},r.prototype.remove=function(){this.group.removeAll()},r.prototype.eachRendered=function(e){gi(this._progressiveEls||this.group,e)},r.prototype._doAdd=function(e,t,a){var i=e.getItemLayout(t);if(sm(i)){var n=new this._LineCtor(e,t,a);e.setItemGraphicEl(t,n),this.group.add(n)}},r.prototype._doUpdate=function(e,t,a,i,n){var o=e.getItemGraphicEl(a);if(!sm(t.getItemLayout(i))){this.group.remove(o);return}o?o.updateData(t,i,n):o=new this._LineCtor(t,i,n),t.setItemGraphicEl(i,o),this.group.add(o)},r}();function OW(r){return r.animators&&r.animators.length>0}function zD(r){var e=r.hostModel,t=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:t.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:t.get("disabled"),blurScope:t.get("blurScope"),focus:t.get("focus"),labelStatesModels:ce(e)}}function VD(r){return isNaN(r[0])||isNaN(r[1])}function sm(r){return r&&!VD(r[0])&&!VD(r[1])}var lm=[],um=[],hm=[],cs=be,fm=Ui,GD=Math.abs;function FD(r,e,t){for(var a=r[0],i=r[1],n=r[2],o=1/0,s,l=t*t,u=.1,h=.1;h<=.9;h+=.1){lm[0]=cs(a[0],i[0],n[0],h),lm[1]=cs(a[1],i[1],n[1],h);var f=GD(fm(lm,e)-l);f<o&&(o=f,s=h)}for(var v=0;v<32;v++){var c=s+u;um[0]=cs(a[0],i[0],n[0],s),um[1]=cs(a[1],i[1],n[1],s),hm[0]=cs(a[0],i[0],n[0],c),hm[1]=cs(a[1],i[1],n[1],c);var f=fm(um,e)-l;if(GD(f)<.01)break;var d=fm(hm,e)-l;u/=2,f<0?d>=0?s=s+u:s=s-u:d>=0?s=s-u:s=s+u}return s}function vm(r,e){var t=[],a=Vs,i=[[],[],[]],n=[[],[]],o=[];e/=2,r.eachEdge(function(s,l){var u=s.getLayout(),h=s.getVisual("fromSymbol"),f=s.getVisual("toSymbol");u.__original||(u.__original=[Ma(u[0]),Ma(u[1])],u[2]&&u.__original.push(Ma(u[2])));var v=u.__original;if(u[2]!=null){if(Ge(i[0],v[0]),Ge(i[1],v[2]),Ge(i[2],v[1]),h&&h!=="none"){var c=cu(s.node1),d=FD(i,v[0],c*e);a(i[0][0],i[1][0],i[2][0],d,t),i[0][0]=t[3],i[1][0]=t[4],a(i[0][1],i[1][1],i[2][1],d,t),i[0][1]=t[3],i[1][1]=t[4]}if(f&&f!=="none"){var c=cu(s.node2),d=FD(i,v[1],c*e);a(i[0][0],i[1][0],i[2][0],d,t),i[1][0]=t[1],i[2][0]=t[2],a(i[0][1],i[1][1],i[2][1],d,t),i[1][1]=t[1],i[2][1]=t[2]}Ge(u[0],i[0]),Ge(u[1],i[2]),Ge(u[2],i[1])}else{if(Ge(n[0],v[0]),Ge(n[1],v[1]),Wi(o,n[1],n[0]),ho(o,o),h&&h!=="none"){var c=cu(s.node1);dc(n[0],n[0],o,c*e)}if(f&&f!=="none"){var c=cu(s.node2);dc(n[1],n[1],o,-c*e)}Ge(u[0],n[0]),Ge(u[1],n[1])}})}var HD=St();function NW(r){if(r)return HD(r).bridge}function WD(r,e){r&&(HD(r).bridge=e)}function UD(r){return r.type==="view"}var BW=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a){var i=new Ul,n=new om,o=this.group,s=new et;this._controller=new $n(a.getZr()),this._controllerHost={target:s},s.add(i.group),s.add(n.group),o.add(s),this._symbolDraw=i,this._lineDraw=n,this._mainGroup=s,this._firstRender=!0},e.prototype.render=function(t,a,i){var n=this,o=t.coordinateSystem,s=!1;this._model=t,this._api=i,this._active=!0;var l=this._getThumbnailInfo();l&&l.bridge.reset(i);var u=this._symbolDraw,h=this._lineDraw;if(UD(o)){var f={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?this._mainGroup.attr(f):It(this._mainGroup,f,t)}vm(t.getGraph(),vu(t));var v=t.getData();u.updateData(v);var c=t.getEdgeData();h.updateData(c),this._updateNodeAndLinkScale(),this._updateController(null,t,i),clearTimeout(this._layoutTimeout);var d=t.forceLayout,p=t.get(["force","layoutAnimation"]);d&&(s=!0,this._startForceLayoutIteration(d,i,p));var g=t.get("layout");v.graph.eachNode(function(x){var b=x.dataIndex,S=x.getGraphicEl(),w=x.getModel();if(S){S.off("drag").off("dragend");var T=w.get("draggable");T&&S.on("drag",function(A){switch(g){case"force":d.warmUp(),!n._layouting&&n._startForceLayoutIteration(d,i,p),d.setFixed(b),v.setItemLayout(b,[S.x,S.y]);break;case"circular":v.setItemLayout(b,[S.x,S.y]),x.setLayout({fixed:!0},!0),tm(t,"symbolSize",x,[A.offsetX,A.offsetY]),n.updateLayout(t);break;case"none":default:v.setItemLayout(b,[S.x,S.y]),Jy(t.getGraph(),t),n.updateLayout(t);break}}).on("dragend",function(){d&&d.setUnfixed(b)}),S.setDraggable(T,!!w.get("cursor"));var C=w.get(["emphasis","focus"]);C==="adjacency"&&(vt(S).focus=x.getAdjacentDataIndices())}}),v.graph.eachEdge(function(x){var b=x.getGraphicEl(),S=x.getModel().get(["emphasis","focus"]);b&&S==="adjacency"&&(vt(b).focus={edge:[x.dataIndex],node:[x.node1.dataIndex,x.node2.dataIndex]})});var y=t.get("layout")==="circular"&&t.get(["circular","rotateLabel"]),m=v.getLayout("cx"),_=v.getLayout("cy");v.graph.eachNode(function(x){PD(x,y,m,_)}),this._firstRender=!1,s||this._renderThumbnail(t,i,this._symbolDraw,this._lineDraw)},e.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(t,a,i){var n=this,o=!1;(function s(){t.step(function(l){n.updateLayout(n._model),(l||!o)&&(o=!0,n._renderThumbnail(n._model,a,n._symbolDraw,n._lineDraw)),(n._layouting=!l)&&(i?n._layoutTimeout=setTimeout(s,16):s())})})()},e.prototype._updateController=function(t,a,i){var n=this._controller,o=this._controllerHost,s=a.coordinateSystem;if(!UD(s)){n.disable();return}n.enable(a.get("roam"),{api:i,zInfo:{component:a},triggerInfo:{roamTrigger:a.get("roamTrigger"),isInSelf:function(l,u,h){return s.containPoint([u,h])},isInClip:function(l,u,h){return!t||t.contain(u,h)}}}),o.zoomLimit=a.get("scaleLimit"),o.zoom=s.getZoom(),n.off("pan").off("zoom").on("pan",function(l){i.dispatchAction({seriesId:a.id,type:"graphRoam",dx:l.dx,dy:l.dy})}).on("zoom",function(l){i.dispatchAction({seriesId:a.id,type:"graphRoam",zoom:l.scale,originX:l.originX,originY:l.originY})})},e.prototype.updateViewOnPan=function(t,a,i){this._active&&(My(this._controllerHost,i.dx,i.dy),this._updateThumbnailWindow())},e.prototype.updateViewOnZoom=function(t,a,i){this._active&&(Dy(this._controllerHost,i.zoom,i.originX,i.originY),this._updateNodeAndLinkScale(),vm(t.getGraph(),vu(t)),this._lineDraw.updateLayout(),a.updateLabelLayout(),this._updateThumbnailWindow())},e.prototype._updateNodeAndLinkScale=function(){var t=this._model,a=t.getData(),i=vu(t);a.eachItemGraphicEl(function(n,o){n&&n.setSymbolScale(i)})},e.prototype.updateLayout=function(t){this._active&&(vm(t.getGraph(),vu(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout())},e.prototype.remove=function(){this._active=!1,clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove(),this._controller&&this._controller.disable()},e.prototype._getThumbnailInfo=function(){var t=this._model,a=t.coordinateSystem;if(a.type==="view"){var i=NW(t);if(i)return{bridge:i,coordSys:a}}},e.prototype._updateThumbnailWindow=function(){var t=this._getThumbnailInfo();t&&t.bridge.updateWindow(t.coordSys.transform,this._api)},e.prototype._renderThumbnail=function(t,a,i,n){var o=this._getThumbnailInfo();if(o){var s=new et,l=i.group.children(),u=n.group.children(),h=new et,f=new et;s.add(f),s.add(h);for(var v=0;v<l.length;v++){var c=l[v],d=c.children()[0],p=c.x,g=c.y,y=at(d.shape),m=F(y,{width:d.scaleX,height:d.scaleY,x:p-d.scaleX/2,y:g-d.scaleY/2}),_=at(d.style),x=new d.constructor({shape:m,style:_,z2:151});f.add(x)}for(var v=0;v<u.length;v++){var c=u[v],b=c.children()[0],_=at(b.style),m=at(b.shape),S=new ED({style:_,shape:m,z2:151});h.add(S)}o.bridge.renderContent({api:a,roamType:t.get("roam"),viewportRect:null,group:s,targetTrans:o.coordSys.transform})}},e.type="graph",e}(zt);function ds(r){return"_EC_"+r}var zW=function(){function r(e){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=e||!1}return r.prototype.isDirected=function(){return this._directed},r.prototype.addNode=function(e,t){e=e==null?""+t:""+e;var a=this._nodesMap;if(!a[ds(e)]){var i=new Qn(e,t);return i.hostGraph=this,this.nodes.push(i),a[ds(e)]=i,i}},r.prototype.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},r.prototype.getNodeById=function(e){return this._nodesMap[ds(e)]},r.prototype.addEdge=function(e,t,a){var i=this._nodesMap,n=this._edgesMap;if(Dt(e)&&(e=this.nodes[e]),Dt(t)&&(t=this.nodes[t]),e instanceof Qn||(e=i[ds(e)]),t instanceof Qn||(t=i[ds(t)]),!(!e||!t)){var o=e.id+"-"+t.id,s=new YD(e,t,a);return s.hostGraph=this,this._directed&&(e.outEdges.push(s),t.inEdges.push(s)),e.edges.push(s),e!==t&&t.edges.push(s),this.edges.push(s),n[o]=s,s}},r.prototype.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},r.prototype.getEdge=function(e,t){e instanceof Qn&&(e=e.id),t instanceof Qn&&(t=t.id);var a=this._edgesMap;return this._directed?a[e+"-"+t]:a[e+"-"+t]||a[t+"-"+e]},r.prototype.eachNode=function(e,t){for(var a=this.nodes,i=a.length,n=0;n<i;n++)a[n].dataIndex>=0&&e.call(t,a[n],n)},r.prototype.eachEdge=function(e,t){for(var a=this.edges,i=a.length,n=0;n<i;n++)a[n].dataIndex>=0&&a[n].node1.dataIndex>=0&&a[n].node2.dataIndex>=0&&e.call(t,a[n],n)},r.prototype.breadthFirstTraverse=function(e,t,a,i){if(t instanceof Qn||(t=this._nodesMap[ds(t)]),!!t){for(var n=a==="out"?"outEdges":a==="in"?"inEdges":"edges",o=0;o<this.nodes.length;o++)this.nodes[o].__visited=!1;if(!e.call(i,t,null))for(var s=[t];s.length;)for(var l=s.shift(),u=l[n],o=0;o<u.length;o++){var h=u[o],f=h.node1===l?h.node2:h.node1;if(!f.__visited){if(e.call(i,f,l))return;s.push(f),f.__visited=!0}}}},r.prototype.update=function(){for(var e=this.data,t=this.edgeData,a=this.nodes,i=this.edges,n=0,o=a.length;n<o;n++)a[n].dataIndex=-1;for(var n=0,o=e.count();n<o;n++)a[e.getRawIndex(n)].dataIndex=n;t.filterSelf(function(s){var l=i[t.getRawIndex(s)];return l.node1.dataIndex>=0&&l.node2.dataIndex>=0});for(var n=0,o=i.length;n<o;n++)i[n].dataIndex=-1;for(var n=0,o=t.count();n<o;n++)i[t.getRawIndex(n)].dataIndex=n},r.prototype.clone=function(){for(var e=new r(this._directed),t=this.nodes,a=this.edges,i=0;i<t.length;i++)e.addNode(t[i].id,t[i].dataIndex);for(var i=0;i<a.length;i++){var n=a[i];e.addEdge(n.node1.id,n.node2.id,n.dataIndex)}return e},r}(),Qn=function(){function r(e,t){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=e??"",this.dataIndex=t??-1}return r.prototype.degree=function(){return this.edges.length},r.prototype.inDegree=function(){return this.inEdges.length},r.prototype.outDegree=function(){return this.outEdges.length},r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostGraph,a=t.data.getItemModel(this.dataIndex);return a.getModel(e)}},r.prototype.getAdjacentDataIndices=function(){for(var e={edge:[],node:[]},t=0;t<this.edges.length;t++){var a=this.edges[t];a.dataIndex<0||(e.edge.push(a.dataIndex),e.node.push(a.node1.dataIndex,a.node2.dataIndex))}return e},r.prototype.getTrajectoryDataIndices=function(){for(var e=J(),t=J(),a=0,i=this.edges.length;a<i;a++){var n=this.edges[a];if(!(n.dataIndex<0)){e.set(n.dataIndex,!0);for(var o=[n.node1],s=[n.node2],l=0;l<o.length;){var u=o[l];l++,t.set(u.dataIndex,!0);for(var h=u.inEdges,f=0,v=h.length,c=void 0,d=void 0;f<v;f++)c=h[f],d=c.dataIndex,d>=0&&!e.hasKey(d)&&(e.set(d,!0),o.push(c.node1))}for(l=0;l<s.length;){var p=s[l];l++,t.set(p.dataIndex,!0);for(var g=p.outEdges,f=0,y=g.length,m=void 0,_=void 0;f<y;f++)m=g[f],_=m.dataIndex,_>=0&&!e.hasKey(_)&&(e.set(_,!0),s.push(m.node2))}}}return{edge:e.keys(),node:t.keys()}},r}(),YD=function(){function r(e,t,a){this.dataIndex=-1,this.node1=e,this.node2=t,this.dataIndex=a??-1}return r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostGraph,a=t.edgeData.getItemModel(this.dataIndex);return a.getModel(e)}},r.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},r.prototype.getTrajectoryDataIndices=function(){var e=J(),t=J();e.set(this.dataIndex,!0);for(var a=[this.node1],i=[this.node2],n=0;n<a.length;){var o=a[n];n++,t.set(o.dataIndex,!0);for(var s=o.inEdges,l=0,u=s.length,h=void 0,f=void 0;l<u;l++)h=o.inEdges[l],f=h.dataIndex,f>=0&&!e.hasKey(f)&&(e.set(f,!0),a.push(h.node1))}for(n=0;n<i.length;){var v=i[n];n++,t.set(v.dataIndex,!0);for(var c=v.outEdges,l=0,u=c.length,d=void 0,p=void 0;l<u;l++)d=v.outEdges[l],p=d.dataIndex,p>=0&&!e.hasKey(p)&&(e.set(p,!0),i.push(d.node2))}return{edge:e.keys(),node:t.keys()}},r}();function ZD(r,e){return{getValue:function(t){var a=this[r][e];return a.getStore().get(a.getDimensionIndex(t||"value"),this.dataIndex)},setVisual:function(t,a){this.dataIndex>=0&&this[r][e].setItemVisual(this.dataIndex,t,a)},getVisual:function(t){return this[r][e].getItemVisual(this.dataIndex,t)},setLayout:function(t,a){this.dataIndex>=0&&this[r][e].setItemLayout(this.dataIndex,t,a)},getLayout:function(){return this[r][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[r][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[r][e].getRawIndex(this.dataIndex)}}}ie(Qn,ZD("hostGraph","data")),ie(YD,ZD("hostGraph","edgeData"));function cm(r,e,t,a,i){for(var n=new zW(a),o=0;o<r.length;o++)n.addNode(Ae(r[o].id,r[o].name,o),o);for(var s=[],l=[],u=0,o=0;o<e.length;o++){var h=e[o],f=h.source,v=h.target;n.addEdge(f,v,u)&&(l.push(h),s.push(Ae(fe(h.id,null),f+" > "+v)),u++)}var c=t.get("coordinateSystem"),d;if(c==="cartesian2d"||c==="polar"||c==="matrix")d=Ha(r,t);else{var p=fl.get(c),g=p?p.dimensions||[]:[];gt(g,"value")<0&&g.concat(["value"]);var y=kl(r,{coordDimensions:g,encodeDefine:t.getEncode()}).dimensions;d=new Ue(y,t),d.initData(r)}var m=new Ue(["value"],t);return m.initData(l,s),i&&i(d,m),iD({mainData:d,struct:n,structAttr:"graph",datas:{node:d,edge:m},datasAttr:{node:"data",edge:"edgeData"}}),n.update(),n}var VW=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments);var a=this;function i(){return a._categoriesData}this.legendVisualProvider=new ls(i,i),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(t){r.prototype.mergeDefaultAndTheme.apply(this,arguments),tn(t,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,a){var i=t.edges||t.links||[],n=t.data||t.nodes||[],o=this;if(n&&i){CW(this);var s=cm(n,i,this,!0,l);return M(s.edges,function(u){AW(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,h){u.wrapMethod("getItemModel",function(d){var p=o._categoriesModels,g=d.getShallow("category"),y=p[g];return y&&(y.parentModel=d.parentModel,d.parentModel=y),d});var f=Ct.prototype.getModel;function v(d,p){var g=f.call(this,d,p);return g.resolveParentPath=c,g}h.wrapMethod("getItemModel",function(d){return d.resolveParentPath=c,d.getModel=v,d});function c(d){if(d&&(d[0]==="label"||d[1]==="label")){var p=d.slice();return d[0]==="label"?p[0]="edgeLabel":d[1]==="label"&&(p[1]="edgeLabel"),p}return d}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(t,a,i){if(i==="edge"){var n=this.getData(),o=this.getDataParams(t,i),s=n.graph.getEdgeByIndex(t),l=n.getName(s.node1.dataIndex),u=n.getName(s.node2.dataIndex),h=[];return l!=null&&h.push(l),u!=null&&h.push(u),ue("nameValue",{name:h.join(" > "),value:o.value,noValue:o.value==null})}var f=fw({series:this,dataIndex:t,multipleSeries:a});return f},e.prototype._updateCategoriesData=function(){var t=U(this.option.categories||[],function(i){return i.value!=null?i:F({value:0},i)}),a=new Ue(["value"],this);a.initData(t),this._categoriesData=a,this._categoriesModels=a.mapArray(function(i){return a.getItemModel(i)})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return r.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:B.color.neutral50,width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:B.color.primary}}},e}(Ht);function GW(r){r.registerChartView(BW),r.registerSeriesModel(VW),r.registerProcessor(xW),r.registerVisual(SW),r.registerVisual(bW),r.registerLayout(MW),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,LW),r.registerLayout(PW),r.registerCoordinateSystem("graphView",{dimensions:Kn.dimensions,create:RW}),r.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},Qt),r.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},Qt),r.registerAction({type:"graphRoam",event:"graphRoam",update:"none"},function(e,t,a){t.eachComponent({mainType:"series",query:e},function(i){var n=a.getViewOfSeriesModel(i);n&&(e.dx!=null&&e.dy!=null&&n.updateViewOnPan(i,a,e),e.zoom!=null&&e.originX!=null&&e.originY!=null&&n.updateViewOnZoom(i,a,e));var o=i.coordinateSystem,s=av(o,e,i.get("scaleLimit"));i.setCenter&&i.setCenter(s.center),i.setZoom&&i.setZoom(s.zoom)})})}var $D=function(r){z(e,r);function e(t,a,i){var n=r.call(this)||this;vt(n).dataType="node",n.z2=2;var o=new Lt;return n.setTextContent(o),n.updateData(t,a,i,!0),n}return e.prototype.updateData=function(t,a,i,n){var o=this,s=t.graph.getNodeByIndex(a),l=t.hostModel,u=s.getModel(),h=u.getModel("emphasis"),f=t.getItemLayout(a),v=F(_a(u.getModel("itemStyle"),f,!0),f),c=this;if(isNaN(v.startAngle)){c.setShape(v);return}n?c.setShape(v):It(c,{shape:v},l,a);var d=F(_a(u.getModel("itemStyle"),f,!0),f);o.setShape(d),o.useStyle(t.getItemVisual(a,"style")),ve(o,u),this._updateLabel(l,u,s),t.setItemGraphicEl(a,c),ve(c,u,"itemStyle");var p=h.get("focus");Xt(this,p==="adjacency"?s.getAdjacentDataIndices():p,h.get("blurScope"),h.get("disabled"))},e.prototype._updateLabel=function(t,a,i){var n=this.getTextContent(),o=i.getLayout(),s=(o.startAngle+o.endAngle)/2,l=Math.cos(s),u=Math.sin(s),h=a.getModel("label");n.ignore=!h.get("show");var f=ce(a),v=i.getVisual("style");ye(n,f,{labelFetcher:{getFormattedLabel:function(m,_,x,b,S,w){return t.getFormattedLabel(m,_,"node",b,er(S,f.normal&&f.normal.get("formatter"),a.get("name")),w)}},labelDataIndex:i.dataIndex,defaultText:i.dataIndex+"",inheritColor:v.fill,defaultOpacity:v.opacity,defaultOutsidePosition:"startArc"});var c=h.get("position")||"outside",d=h.get("distance")||0,p;c==="outside"?p=o.r+d:p=(o.r+o.r0)/2,this.textConfig={inside:c!=="outside"};var g=c!=="outside"?h.get("align")||"center":l>0?"left":"right",y=c!=="outside"?h.get("verticalAlign")||"middle":u>0?"top":"bottom";n.attr({x:l*p+o.cx,y:u*p+o.cy,rotation:0,style:{align:g,verticalAlign:y}})},e}(We),FW=function(r){z(e,r);function e(t,a,i,n){var o=r.call(this)||this;return vt(o).dataType="edge",o.updateData(t,a,i,n,!0),o}return e.prototype.buildPath=function(t,a){t.moveTo(a.s1[0],a.s1[1]);var i=.7,n=a.clockwise;t.arc(a.cx,a.cy,a.r,a.sStartAngle,a.sEndAngle,!n),t.bezierCurveTo((a.cx-a.s2[0])*i+a.s2[0],(a.cy-a.s2[1])*i+a.s2[1],(a.cx-a.t1[0])*i+a.t1[0],(a.cy-a.t1[1])*i+a.t1[1],a.t1[0],a.t1[1]),t.arc(a.cx,a.cy,a.r,a.tStartAngle,a.tEndAngle,!n),t.bezierCurveTo((a.cx-a.t2[0])*i+a.t2[0],(a.cy-a.t2[1])*i+a.t2[1],(a.cx-a.s1[0])*i+a.s1[0],(a.cy-a.s1[1])*i+a.s1[1],a.s1[0],a.s1[1]),t.closePath()},e.prototype.updateData=function(t,a,i,n,o){var s=t.hostModel,l=a.graph.getEdgeByIndex(i),u=l.getLayout(),h=l.node1.getModel(),f=a.getItemModel(l.dataIndex),v=f.getModel("lineStyle"),c=f.getModel("emphasis"),d=c.get("focus"),p=F(_a(h.getModel("itemStyle"),u,!0),u),g=this;if(isNaN(p.sStartAngle)||isNaN(p.tStartAngle)){g.setShape(p);return}o?(g.setShape(p),XD(g,l,t,v)):(br(g),XD(g,l,t,v),It(g,{shape:p},s,i)),Xt(this,d==="adjacency"?l.getAdjacentDataIndices():d,c.get("blurScope"),c.get("disabled")),ve(g,f,"lineStyle"),a.setItemGraphicEl(l.dataIndex,g)},e}(bt);function XD(r,e,t,a){var i=e.node1,n=e.node2,o=r.style;r.setStyle(a.getLineStyle());var s=a.get("color");switch(s){case"source":o.fill=t.getItemVisual(i.dataIndex,"style").fill,o.decal=i.getVisual("style").decal;break;case"target":o.fill=t.getItemVisual(n.dataIndex,"style").fill,o.decal=n.getVisual("style").decal;break;case"gradient":var l=t.getItemVisual(i.dataIndex,"style").fill,u=t.getItemVisual(n.dataIndex,"style").fill;if($(l)&&$(u)){var h=r.shape,f=(h.s1[0]+h.s2[0])/2,v=(h.s1[1]+h.s2[1])/2,c=(h.t1[0]+h.t2[0])/2,d=(h.t1[1]+h.t2[1])/2;o.fill=new Po(f,v,c,d,[{offset:0,color:l},{offset:1,color:u}],!0)}break}}var HW=Math.PI/180,WW=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a){},e.prototype.render=function(t,a,i){var n=t.getData(),o=this._data,s=this.group,l=-t.get("startAngle")*HW;if(n.diff(o).add(function(h){var f=n.getItemLayout(h);if(f){var v=new $D(n,h,l);vt(v).dataIndex=h,s.add(v)}}).update(function(h,f){var v=o.getItemGraphicEl(f),c=n.getItemLayout(h);if(!c){v&&Ba(v,t,f);return}v?v.updateData(n,h,l):v=new $D(n,h,l),s.add(v)}).remove(function(h){var f=o.getItemGraphicEl(h);f&&Ba(f,t,h)}).execute(),!o){var u=t.get("center");this.group.scaleX=.01,this.group.scaleY=.01,this.group.originX=Z(u[0],i.getWidth()),this.group.originY=Z(u[1],i.getHeight()),Yt(this.group,{scaleX:1,scaleY:1},t)}this._data=n,this.renderEdges(t,l)},e.prototype.renderEdges=function(t,a){var i=t.getData(),n=t.getEdgeData(),o=this._edgeData,s=this.group;n.diff(o).add(function(l){var u=new FW(i,n,l,a);vt(u).dataIndex=l,s.add(u)}).update(function(l,u){var h=o.getItemGraphicEl(u);h.updateData(i,n,l,a),s.add(h)}).remove(function(l){var u=o.getItemGraphicEl(l);u&&Ba(u,t,l)}).execute(),this._edgeData=n},e.prototype.dispose=function(){},e.type="chord",e}(zt),UW=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this.legendVisualProvider=new ls(X(this.getData,this),X(this.getRawData,this))},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links)},e.prototype.getInitialData=function(t,a){var i=t.edges||t.links||[],n=t.data||t.nodes||[];if(n&&i){var o=cm(n,i,this,!0,s);return o.data}function s(l,u){var h=Ct.prototype.getModel;function f(c,d){var p=h.call(this,c,d);return p.resolveParentPath=v,p}u.wrapMethod("getItemModel",function(c){return c.resolveParentPath=v,c.getModel=f,c});function v(c){if(c&&(c[0]==="label"||c[1]==="label")){var d=c.slice();return c[0]==="label"?d[0]="edgeLabel":c[1]==="label"&&(d[1]="edgeLabel"),d}return c}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,a,i){var n=this.getDataParams(t,i);if(i==="edge"){var o=this.getData(),s=o.graph.getEdgeByIndex(t),l=o.getName(s.node1.dataIndex),u=o.getName(s.node2.dataIndex),h=[];return l!=null&&h.push(l),u!=null&&h.push(u),ue("nameValue",{name:h.join(" > "),value:n.value,noValue:n.value==null})}return ue("nameValue",{name:n.name,value:n.value,noValue:n.value==null})},e.prototype.getDataParams=function(t,a){var i=r.prototype.getDataParams.call(this,t,a);if(a==="node"){var n=this.getData(),o=this.getGraph().getNodeByIndex(t);if(i.name==null&&(i.name=n.getName(t)),i.value==null){var s=o.getLayout().value;i.value=s}}return i},e.type="series.chord",e.defaultOption={z:2,coordinateSystem:"none",legendHoverLink:!0,colorBy:"data",left:0,top:0,right:0,bottom:0,width:null,height:null,center:["50%","50%"],radius:["70%","80%"],clockwise:!0,startAngle:90,endAngle:"auto",minAngle:0,padAngle:3,itemStyle:{borderRadius:[0,0,5,5]},lineStyle:{width:0,color:"source",opacity:.2},label:{show:!0,position:"outside",distance:5},emphasis:{focus:"adjacency",lineStyle:{opacity:.5}}},e}(Ht),dm=Math.PI/180;function YW(r,e){r.eachSeriesByType("chord",function(t){ZW(t,e)})}function ZW(r,e){var t=r.getData(),a=t.graph,i=r.getEdgeData(),n=i.count();if(n){var o=nb(r,e),s=o.cx,l=o.cy,u=o.r,h=o.r0,f=Math.max((r.get("padAngle")||0)*dm,0),v=Math.max((r.get("minAngle")||0)*dm,0),c=-r.get("startAngle")*dm,d=c+Math.PI*2,p=r.get("clockwise"),g=p?1:-1,y=[c,d];xh(y,!p);var m=y[0],_=y[1],x=_-m,b=t.getSum("value")===0&&i.getSum("value")===0,S=[],w=0;a.eachEdge(function(E){var N=b?1:E.getValue("value");b&&(N>0||v)&&(w+=2);var V=E.node1.dataIndex,G=E.node2.dataIndex;S[V]=(S[V]||0)+N,S[G]=(S[G]||0)+N});var T=0;if(a.eachNode(function(E){var N=E.getValue("value");isNaN(N)||(S[E.dataIndex]=Math.max(N,S[E.dataIndex]||0)),!b&&(S[E.dataIndex]>0||v)&&w++,T+=S[E.dataIndex]||0}),!(w===0||T===0)){f*w>=Math.abs(x)&&(f=Math.max(0,(Math.abs(x)-v*w)/w)),(f+v)*w>=Math.abs(x)&&(v=(Math.abs(x)-f*w)/w);var C=(x-f*w*g)/T,A=0,D=0,I=0;a.eachNode(function(E){var N=S[E.dataIndex]||0,V=C*(T?N:1)*g;Math.abs(V)<v?A+=v-Math.abs(V):(D+=Math.abs(V)-v,I+=Math.abs(V)),E.setLayout({angle:V,value:N})});var L=!1;if(A>D){var P=A/D;a.eachNode(function(E){var N=E.getLayout().angle;Math.abs(N)>=v?E.setLayout({angle:N*P,ratio:P},!0):E.setLayout({angle:v,ratio:v===0?1:N/v},!0)})}else a.eachNode(function(E){if(!L){var N=E.getLayout().angle,V=Math.min(N/I,1),G=V*A;N-G<v&&(L=!0)}});var k=A;a.eachNode(function(E){if(!(k<=0)){var N=E.getLayout().angle;if(N>v&&v>0){var V=L?1:Math.min(N/I,1),G=N-v,H=Math.min(G,Math.min(k,A*V));k-=H,E.setLayout({angle:N-H,ratio:(N-H)/N},!0)}else v>0&&E.setLayout({angle:v,ratio:N===0?1:v/N},!0)}});var R=m,O=[];a.eachNode(function(E){var N=Math.max(E.getLayout().angle,v);E.setLayout({cx:s,cy:l,r0:h,r:u,startAngle:R,endAngle:R+N*g,clockwise:p},!0),O[E.dataIndex]=R,R+=(N+f)*g}),a.eachEdge(function(E){var N=b?1:E.getValue("value"),V=C*(T?N:1)*g,G=E.node1.dataIndex,H=O[G]||0,Y=Math.abs((E.node1.getLayout().ratio||1)*V),q=H+Y*g,it=[s+h*Math.cos(H),l+h*Math.sin(H)],xt=[s+h*Math.cos(q),l+h*Math.sin(q)],At=E.node2.dataIndex,ut=O[At]||0,tt=Math.abs((E.node2.getLayout().ratio||1)*V),ct=ut+tt*g,j=[s+h*Math.cos(ut),l+h*Math.sin(ut)],ft=[s+h*Math.cos(ct),l+h*Math.sin(ct)];E.setLayout({s1:it,s2:xt,sStartAngle:H,sEndAngle:q,t1:j,t2:ft,tStartAngle:ut,tEndAngle:ct,cx:s,cy:l,r:h,value:N,clockwise:p}),O[G]=q,O[At]=ct})}}}function $W(r){r.registerChartView(WW),r.registerSeriesModel(UW),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,YW),r.registerProcessor(os("chord"))}var XW=function(){function r(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return r}(),qW=function(r){z(e,r);function e(t){var a=r.call(this,t)||this;return a.type="pointer",a}return e.prototype.getDefaultShape=function(){return new XW},e.prototype.buildPath=function(t,a){var i=Math.cos,n=Math.sin,o=a.r,s=a.width,l=a.angle,u=a.x-i(l)*s*(s>=o/3?1:2),h=a.y-n(l)*s*(s>=o/3?1:2);l=a.angle-Math.PI/2,t.moveTo(u,h),t.lineTo(a.x+i(l)*s,a.y+n(l)*s),t.lineTo(a.x+i(a.angle)*o,a.y+n(a.angle)*o),t.lineTo(a.x-i(l)*s,a.y-n(l)*s),t.lineTo(u,h)},e}(bt);function KW(r,e){var t=r.get("center"),a=e.getWidth(),i=e.getHeight(),n=Math.min(a,i),o=Z(t[0],e.getWidth()),s=Z(t[1],e.getHeight()),l=Z(r.get("radius"),n/2);return{cx:o,cy:s,r:l}}function gv(r,e){var t=r==null?"":r+"";return e&&($(e)?t=e.replace("{value}",t):rt(e)&&(t=e(r))),t}var jW=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,i){this.group.removeAll();var n=t.get(["axisLine","lineStyle","color"]),o=KW(t,i);this._renderMain(t,a,i,n,o),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,a,i,n,o){var s=this.group,l=t.get("clockwise"),u=-t.get("startAngle")/180*Math.PI,h=-t.get("endAngle")/180*Math.PI,f=t.getModel("axisLine"),v=f.get("roundCap"),c=v?Yf:We,d=f.get("show"),p=f.getModel("lineStyle"),g=p.get("width"),y=[u,h];xh(y,!l),u=y[0],h=y[1];for(var m=h-u,_=u,x=[],b=0;d&&b<n.length;b++){var S=Math.min(Math.max(n[b][0],0),1);h=u+m*S;var w=new c({shape:{startAngle:_,endAngle:h,cx:o.cx,cy:o.cy,clockwise:l,r0:o.r-g,r:o.r},silent:!0});w.setStyle({fill:n[b][1]}),w.setStyle(p.getLineStyle(["color","width"])),x.push(w),_=h}x.reverse(),M(x,function(C){return s.add(C)});var T=function(C){if(C<=0)return n[0][1];var A;for(A=0;A<n.length;A++)if(n[A][0]>=C&&(A===0?0:n[A-1][0])<C)return n[A][1];return n[A-1][1]};this._renderTicks(t,a,i,T,o,u,h,l,g),this._renderTitleAndDetail(t,a,i,T,o),this._renderAnchor(t,o),this._renderPointer(t,a,i,T,o,u,h,l,g)},e.prototype._renderTicks=function(t,a,i,n,o,s,l,u,h){for(var f=this.group,v=o.cx,c=o.cy,d=o.r,p=+t.get("min"),g=+t.get("max"),y=t.getModel("splitLine"),m=t.getModel("axisTick"),_=t.getModel("axisLabel"),x=t.get("splitNumber"),b=m.get("splitNumber"),S=Z(y.get("length"),d),w=Z(m.get("length"),d),T=s,C=(l-s)/x,A=C/b,D=y.getModel("lineStyle").getLineStyle(),I=m.getModel("lineStyle").getLineStyle(),L=y.get("distance"),P,k,R=0;R<=x;R++){if(P=Math.cos(T),k=Math.sin(T),y.get("show")){var O=L?L+h:h,E=new Kt({shape:{x1:P*(d-O)+v,y1:k*(d-O)+c,x2:P*(d-S-O)+v,y2:k*(d-S-O)+c},style:D,silent:!0});D.stroke==="auto"&&E.setStyle({stroke:n(R/x)}),f.add(E)}if(_.get("show")){var O=_.get("distance")+L,N=gv(ne(R/x*(g-p)+p),_.get("formatter")),V=n(R/x),G=P*(d-S-O)+v,H=k*(d-S-O)+c,Y=_.get("rotate"),q=0;Y==="radial"?(q=-T+2*Math.PI,q>Math.PI/2&&(q+=Math.PI)):Y==="tangential"?q=-T-Math.PI/2:Dt(Y)&&(q=Y*Math.PI/180),q===0?f.add(new Lt({style:Ft(_,{text:N,x:G,y:H,verticalAlign:k<-.8?"top":k>.8?"bottom":"middle",align:P<-.4?"left":P>.4?"right":"center"},{inheritColor:V}),silent:!0})):f.add(new Lt({style:Ft(_,{text:N,x:G,y:H,verticalAlign:"middle",align:"center"},{inheritColor:V}),silent:!0,originX:G,originY:H,rotation:q}))}if(m.get("show")&&R!==x){var O=m.get("distance");O=O?O+h:h;for(var it=0;it<=b;it++){P=Math.cos(T),k=Math.sin(T);var xt=new Kt({shape:{x1:P*(d-O)+v,y1:k*(d-O)+c,x2:P*(d-w-O)+v,y2:k*(d-w-O)+c},silent:!0,style:I});I.stroke==="auto"&&xt.setStyle({stroke:n((R+it/b)/x)}),f.add(xt),T+=A}T-=A}else T+=C}},e.prototype._renderPointer=function(t,a,i,n,o,s,l,u,h){var f=this.group,v=this._data,c=this._progressEls,d=[],p=t.get(["pointer","show"]),g=t.getModel("progress"),y=g.get("show"),m=t.getData(),_=m.mapDimension("value"),x=+t.get("min"),b=+t.get("max"),S=[x,b],w=[s,l];function T(A,D){var I=m.getItemModel(A),L=I.getModel("pointer"),P=Z(L.get("width"),o.r),k=Z(L.get("length"),o.r),R=t.get(["pointer","icon"]),O=L.get("offsetCenter"),E=Z(O[0],o.r),N=Z(O[1],o.r),V=L.get("keepAspect"),G;return R?G=he(R,E-P/2,N-k,P,k,null,V):G=new qW({shape:{angle:-Math.PI/2,width:P,r:k,x:E,y:N}}),G.rotation=-(D+Math.PI/2),G.x=o.cx,G.y=o.cy,G}function C(A,D){var I=g.get("roundCap"),L=I?Yf:We,P=g.get("overlap"),k=P?g.get("width"):h/m.count(),R=P?o.r-k:o.r-(A+1)*k,O=P?o.r:o.r-A*k,E=new L({shape:{startAngle:s,endAngle:D,cx:o.cx,cy:o.cy,clockwise:u,r0:R,r:O}});return P&&(E.z2=Ot(m.get(_,A),[x,b],[100,0],!0)),E}(y||p)&&(m.diff(v).add(function(A){var D=m.get(_,A);if(p){var I=T(A,s);Yt(I,{rotation:-((isNaN(+D)?w[0]:Ot(D,S,w,!0))+Math.PI/2)},t),f.add(I),m.setItemGraphicEl(A,I)}if(y){var L=C(A,s),P=g.get("clip");Yt(L,{shape:{endAngle:Ot(D,S,w,P)}},t),f.add(L),zd(t.seriesIndex,m.dataType,A,L),d[A]=L}}).update(function(A,D){var I=m.get(_,A);if(p){var L=v.getItemGraphicEl(D),P=L?L.rotation:s,k=T(A,P);k.rotation=P,It(k,{rotation:-((isNaN(+I)?w[0]:Ot(I,S,w,!0))+Math.PI/2)},t),f.add(k),m.setItemGraphicEl(A,k)}if(y){var R=c[D],O=R?R.shape.endAngle:s,E=C(A,O),N=g.get("clip");It(E,{shape:{endAngle:Ot(I,S,w,N)}},t),f.add(E),zd(t.seriesIndex,m.dataType,A,E),d[A]=E}}).execute(),m.each(function(A){var D=m.getItemModel(A),I=D.getModel("emphasis"),L=I.get("focus"),P=I.get("blurScope"),k=I.get("disabled");if(p){var R=m.getItemGraphicEl(A),O=m.getItemVisual(A,"style"),E=O.fill;if(R instanceof Me){var N=R.style;R.useStyle(F({image:N.image,x:N.x,y:N.y,width:N.width,height:N.height},O))}else R.useStyle(O),R.type!=="pointer"&&R.setColor(E);R.setStyle(D.getModel(["pointer","itemStyle"]).getItemStyle()),R.style.fill==="auto"&&R.setStyle("fill",n(Ot(m.get(_,A),S,[0,1],!0))),R.z2EmphasisLift=0,ve(R,D),Xt(R,L,P,k)}if(y){var V=d[A];V.useStyle(m.getItemVisual(A,"style")),V.setStyle(D.getModel(["progress","itemStyle"]).getItemStyle()),V.z2EmphasisLift=0,ve(V,D),Xt(V,L,P,k)}}),this._progressEls=d)},e.prototype._renderAnchor=function(t,a){var i=t.getModel("anchor"),n=i.get("show");if(n){var o=i.get("size"),s=i.get("icon"),l=i.get("offsetCenter"),u=i.get("keepAspect"),h=he(s,a.cx-o/2+Z(l[0],a.r),a.cy-o/2+Z(l[1],a.r),o,o,null,u);h.z2=i.get("showAbove")?1:0,h.setStyle(i.getModel("itemStyle").getItemStyle()),this.group.add(h)}},e.prototype._renderTitleAndDetail=function(t,a,i,n,o){var s=this,l=t.getData(),u=l.mapDimension("value"),h=+t.get("min"),f=+t.get("max"),v=new et,c=[],d=[],p=t.isAnimationEnabled(),g=t.get(["pointer","showAbove"]);l.diff(this._data).add(function(y){c[y]=new Lt({silent:!0}),d[y]=new Lt({silent:!0})}).update(function(y,m){c[y]=s._titleEls[m],d[y]=s._detailEls[m]}).execute(),l.each(function(y){var m=l.getItemModel(y),_=l.get(u,y),x=new et,b=n(Ot(_,[h,f],[0,1],!0)),S=m.getModel("title");if(S.get("show")){var w=S.get("offsetCenter"),T=o.cx+Z(w[0],o.r),C=o.cy+Z(w[1],o.r),A=c[y];A.attr({z2:g?0:2,style:Ft(S,{x:T,y:C,text:l.getName(y),align:"center",verticalAlign:"middle"},{inheritColor:b})}),x.add(A)}var D=m.getModel("detail");if(D.get("show")){var I=D.get("offsetCenter"),L=o.cx+Z(I[0],o.r),P=o.cy+Z(I[1],o.r),k=Z(D.get("width"),o.r),R=Z(D.get("height"),o.r),O=t.get(["progress","show"])?l.getItemVisual(y,"style").fill:b,A=d[y],E=D.get("formatter");A.attr({z2:g?0:2,style:Ft(D,{x:L,y:P,text:gv(_,E),width:isNaN(k)?null:k,height:isNaN(R)?null:R,align:"center",verticalAlign:"middle"},{inheritColor:O})}),OS(A,{normal:D},_,function(V){return gv(V,E)}),p&&NS(A,y,l,t,{getFormattedLabel:function(V,G,H,Y,q,it){return gv(it?it.interpolatedValue:_,E)}}),x.add(A)}v.add(x)}),this.group.add(v),this._titleEls=c,this._detailEls=d},e.type="gauge",e}(zt),JW=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="itemStyle",t}return e.prototype.getInitialData=function(t,a){return ss(this,["value"])},e.type="series.gauge",e.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,B.color.neutral10]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:B.color.axisTick,width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:B.color.axisTickMinor,width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:B.color.axisLabel,fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:B.color.neutral00,borderWidth:0,borderColor:B.color.theme[0]}},title:{show:!0,offsetCenter:[0,"20%"],color:B.color.secondary,fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:B.color.transparent,borderWidth:0,borderColor:B.color.neutral40,width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:B.color.primary,fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(Ht);function QW(r){r.registerChartView(jW),r.registerSeriesModel(JW)}var t6=["itemStyle","opacity"],e6=function(r){z(e,r);function e(t,a){var i=r.call(this)||this,n=i,o=new Be,s=new Lt;return n.setTextContent(s),i.setTextGuideLine(o),i.updateData(t,a,!0),i}return e.prototype.updateData=function(t,a,i){var n=this,o=t.hostModel,s=t.getItemModel(a),l=t.getItemLayout(a),u=s.getModel("emphasis"),h=s.get(t6);h=h??1,i||br(n),n.useStyle(t.getItemVisual(a,"style")),n.style.lineJoin="round",i?(n.setShape({points:l.points}),n.style.opacity=0,Yt(n,{style:{opacity:h}},o,a)):It(n,{style:{opacity:h},shape:{points:l.points}},o,a),ve(n,s),this._updateLabel(t,a),Xt(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t,a){var i=this,n=this.getTextGuideLine(),o=i.getTextContent(),s=t.hostModel,l=t.getItemModel(a),u=t.getItemLayout(a),h=u.label,f=t.getItemVisual(a,"style"),v=f.fill;ye(o,ce(l),{labelFetcher:t.hostModel,labelDataIndex:a,defaultOpacity:f.opacity,defaultText:t.getName(a)},{normal:{align:h.textAlign,verticalAlign:h.verticalAlign}});var c=l.getModel("label"),d=c.get("color"),p=d==="inherit"?v:null;i.setTextConfig({local:!0,inside:!!h.inside,insideStroke:p,outsideFill:p});var g=h.linePoints;n.setShape({points:g}),i.textGuideLineConfig={anchor:g?new nt(g[0][0],g[0][1]):null},It(o,{style:{x:h.x,y:h.y}},s,a),o.attr({rotation:h.rotation,originX:h.x,originY:h.y,z2:10}),Vg(i,Gg(l),{stroke:v})},e}(De),r6=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.ignoreLabelLineUpdate=!0,t}return e.prototype.render=function(t,a,i){var n=t.getData(),o=this._data,s=this.group;n.diff(o).add(function(l){var u=new e6(n,l);n.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var h=o.getItemGraphicEl(u);h.updateData(n,l),s.add(h),n.setItemGraphicEl(l,h)}).remove(function(l){var u=o.getItemGraphicEl(l);Ba(u,t,l)}).execute(),this._data=n},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(zt),a6=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new ls(X(this.getData,this),X(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.getInitialData=function(t,a){return ss(this,{coordDimensions:["value"],encodeDefaulter:pt(kp,this)})},e.prototype._defaultLabelLine=function(t){tn(t,"labelLine",["show"]);var a=t.labelLine,i=t.emphasis.labelLine;a.show=a.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},e.prototype.getDataParams=function(t){var a=this.getData(),i=r.prototype.getDataParams.call(this,t),n=a.mapDimension("value"),o=a.getSum(n);return i.percent=o?+(a.get(n,t)/o*100).toFixed(2):0,i.$vars.push("percent"),i},e.type="series.funnel",e.defaultOption={coordinateSystemUsage:"box",z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:65,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:B.color.neutral00,borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:B.color.primary}}},e}(Ht);function i6(r,e){for(var t=r.mapDimension("value"),a=r.mapArray(t,function(l){return l}),i=[],n=e==="ascending",o=0,s=r.count();o<s;o++)i[o]=o;return rt(e)?i.sort(e):e!=="none"&&i.sort(function(l,u){return n?a[l]-a[u]:a[u]-a[l]}),i}function n6(r){var e=r.hostModel,t=e.get("orient");r.each(function(a){var i=r.getItemModel(a),n=i.getModel("label"),o=n.get("position"),s=i.getModel("labelLine"),l=r.getItemLayout(a),u=l.points,h=o==="inner"||o==="inside"||o==="center"||o==="insideLeft"||o==="insideRight",f,v,c,d;if(h)o==="insideLeft"?(v=(u[0][0]+u[3][0])/2+5,c=(u[0][1]+u[3][1])/2,f="left"):o==="insideRight"?(v=(u[1][0]+u[2][0])/2-5,c=(u[1][1]+u[2][1])/2,f="right"):(v=(u[0][0]+u[1][0]+u[2][0]+u[3][0])/4,c=(u[0][1]+u[1][1]+u[2][1]+u[3][1])/4,f="center"),d=[[v,c],[v,c]];else{var p=void 0,g=void 0,y=void 0,m=void 0,_=s.get("length");o==="left"?(p=(u[3][0]+u[0][0])/2,g=(u[3][1]+u[0][1])/2,y=p-_,v=y-5,f="right"):o==="right"?(p=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,y=p+_,v=y+5,f="left"):o==="top"?(p=(u[3][0]+u[0][0])/2,g=(u[3][1]+u[0][1])/2,m=g-_,c=m-5,f="center"):o==="bottom"?(p=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,m=g+_,c=m+5,f="center"):o==="rightTop"?(p=t==="horizontal"?u[3][0]:u[1][0],g=t==="horizontal"?u[3][1]:u[1][1],t==="horizontal"?(m=g-_,c=m-5,f="center"):(y=p+_,v=y+5,f="top")):o==="rightBottom"?(p=u[2][0],g=u[2][1],t==="horizontal"?(m=g+_,c=m+5,f="center"):(y=p+_,v=y+5,f="bottom")):o==="leftTop"?(p=u[0][0],g=t==="horizontal"?u[0][1]:u[1][1],t==="horizontal"?(m=g-_,c=m-5,f="center"):(y=p-_,v=y-5,f="right")):o==="leftBottom"?(p=t==="horizontal"?u[1][0]:u[3][0],g=t==="horizontal"?u[1][1]:u[2][1],t==="horizontal"?(m=g+_,c=m+5,f="center"):(y=p-_,v=y-5,f="right")):(p=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,t==="horizontal"?(m=g+_,c=m+5,f="center"):(y=p+_,v=y+5,f="left")),t==="horizontal"?(y=p,v=y):(m=g,c=m),d=[[p,g],[y,m]]}l.label={linePoints:d,x:v,y:c,verticalAlign:"middle",textAlign:f,inside:h}})}function o6(r,e){r.eachSeriesByType("funnel",function(t){var a=t.getData(),i=a.mapDimension("value"),n=t.get("sort"),o=de(t,e),s=qt(t.getBoxLayoutParams(),o.refContainer),l=t.get("orient"),u=s.width,h=s.height,f=i6(a,n),v=s.x,c=s.y,d=l==="horizontal"?[Z(t.get("minSize"),h),Z(t.get("maxSize"),h)]:[Z(t.get("minSize"),u),Z(t.get("maxSize"),u)],p=a.getDataExtent(i),g=t.get("min"),y=t.get("max");g==null&&(g=Math.min(p[0],0)),y==null&&(y=p[1]);var m=t.get("funnelAlign"),_=t.get("gap"),x=l==="horizontal"?u:h,b=(x-_*(a.count()-1))/a.count(),S=function(k,R){if(l==="horizontal"){var O=a.get(i,k)||0,E=Ot(O,[g,y],d,!0),N=void 0;switch(m){case"top":N=c;break;case"center":N=c+(h-E)/2;break;case"bottom":N=c+(h-E);break}return[[R,N],[R,N+E]]}var V=a.get(i,k)||0,G=Ot(V,[g,y],d,!0),H;switch(m){case"left":H=v;break;case"center":H=v+(u-G)/2;break;case"right":H=v+u-G;break}return[[H,R],[H+G,R]]};n==="ascending"&&(b=-b,_=-_,l==="horizontal"?v+=u:c+=h,f=f.reverse());for(var w=0;w<f.length;w++){var T=f[w],C=f[w+1],A=a.getItemModel(T);if(l==="horizontal"){var D=A.get(["itemStyle","width"]);D==null?D=b:(D=Z(D,u),n==="ascending"&&(D=-D));var I=S(T,v),L=S(C,v+D);v+=D+_,a.setItemLayout(T,{points:I.concat(L.slice().reverse())})}else{var P=A.get(["itemStyle","height"]);P==null?P=b:(P=Z(P,h),n==="ascending"&&(P=-P));var I=S(T,c),L=S(C,c+P);c+=P+_,a.setItemLayout(T,{points:I.concat(L.slice().reverse())})}}n6(a)})}function s6(r){r.registerChartView(r6),r.registerSeriesModel(a6),r.registerLayout(o6),r.registerProcessor(os("funnel"))}var l6=.3,u6=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._dataGroup=new et,t._initialized=!1,t}return e.prototype.init=function(){this.group.add(this._dataGroup)},e.prototype.render=function(t,a,i,n){this._progressiveEls=null;var o=this._dataGroup,s=t.getData(),l=this._data,u=t.coordinateSystem,h=u.dimensions,f=jD(t);s.diff(l).add(v).update(c).remove(d).execute();function v(g){var y=KD(s,o,g,h,u);pm(y,s,g,f)}function c(g,y){var m=l.getItemGraphicEl(y),_=qD(s,g,h,u);s.setItemGraphicEl(g,m),It(m,{shape:{points:_}},t,g),br(m),pm(m,s,g,f)}function d(g){var y=l.getItemGraphicEl(g);o.remove(y)}if(!this._initialized){this._initialized=!0;var p=h6(u,t,function(){setTimeout(function(){o.removeClipPath()})});o.setClipPath(p)}this._data=s},e.prototype.incrementalPrepareRender=function(t,a,i){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},e.prototype.incrementalRender=function(t,a,i){for(var n=a.getData(),o=a.coordinateSystem,s=o.dimensions,l=jD(a),u=this._progressiveEls=[],h=t.start;h<t.end;h++){var f=KD(n,this._dataGroup,h,s,o);f.incremental=!0,pm(f,n,h,l),u.push(f)}},e.prototype.remove=function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null},e.type="parallel",e}(zt);function h6(r,e,t){var a=r.model,i=r.getRect(),n=new _t({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),Yt(n,{shape:{width:i.width,height:i.height}},e,t),n}function qD(r,e,t,a){for(var i=[],n=0;n<t.length;n++){var o=t[n],s=r.get(r.mapDimension(o),e);f6(s,a.getAxis(o).type)||i.push(a.dataToPoint(s,o))}return i}function KD(r,e,t,a,i){var n=qD(r,t,a,i),o=new Be({shape:{points:n},z2:10});return e.add(o),r.setItemGraphicEl(t,o),o}function jD(r){var e=r.get("smooth",!0);return e===!0&&(e=l6),e=Pa(e),Re(e)&&(e=0),{smooth:e}}function pm(r,e,t,a){r.useStyle(e.getItemVisual(t,"style")),r.style.fill=null,r.setShape("smooth",a.smooth);var i=e.getItemModel(t),n=i.getModel("emphasis");ve(r,i,"lineStyle"),Xt(r,n.get("focus"),n.get("blurScope"),n.get("disabled"))}function f6(r,e){return e==="category"?r==null:r==null||isNaN(r)}var v6=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="lineStyle",t.visualDrawType="stroke",t}return e.prototype.getInitialData=function(t,a){return Ha(null,this,{useEncodeDefaulter:X(c6,null,this)})},e.prototype.getRawIndicesByActiveState=function(t){var a=this.coordinateSystem,i=this.getData(),n=[];return a.eachActiveState(i,function(o,s){t===o&&n.push(i.getRawIndex(s))}),n},e.type="series.parallel",e.dependencies=["parallel"],e.defaultOption={z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"},e}(Ht);function c6(r){var e=r.ecModel.getComponent("parallel",r.get("parallelIndex"));if(e){var t={};return M(e.dimensions,function(a){var i=d6(a);t[a]=i}),t}}function d6(r){return+r.replace("dim","")}var p6=["lineStyle","opacity"],g6={seriesType:"parallel",reset:function(r,e){var t=r.coordinateSystem,a={normal:r.get(["lineStyle","opacity"]),active:r.get("activeOpacity"),inactive:r.get("inactiveOpacity")};return{progress:function(i,n){t.eachActiveState(n,function(o,s){var l=a[o];if(o==="normal"&&n.hasItemOption){var u=n.getItemModel(s).get(p6,!0);u!=null&&(l=u)}var h=n.ensureUniqueItemVisual(s,"style");h.opacity=l},i.start,i.end)}}}};function y6(r){m6(r),_6(r)}function m6(r){if(!r.parallel){var e=!1;M(r.series,function(t){t&&t.type==="parallel"&&(e=!0)}),e&&(r.parallel=[{}])}}function _6(r){var e=Vt(r.parallelAxis);M(e,function(t){if(lt(t)){var a=t.parallelIndex||0,i=Vt(r.parallel)[a];i&&i.parallelAxisDefault&&yt(t,i.parallelAxisDefault,!1)}})}var x6=5,S6=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,i){this._model=t,this._api=i,this._handlers||(this._handlers={},M(b6,function(n,o){i.getZr().on(o,this._handlers[o]=X(n,this))},this)),Yo(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},e.prototype.dispose=function(t,a){xl(this,"_throttledDispatchExpand"),M(this._handlers,function(i,n){a.getZr().off(n,i)}),this._handlers=null},e.prototype._throttledDispatchExpand=function(t){this._dispatchExpand(t)},e.prototype._dispatchExpand=function(t){t&&this._api.dispatchAction(F({type:"parallelAxisExpand"},t))},e.type="parallel",e}(Zt),b6={mousedown:function(r){gm(this,"click")&&(this._mouseDownPoint=[r.offsetX,r.offsetY])},mouseup:function(r){var e=this._mouseDownPoint;if(gm(this,"click")&&e){var t=[r.offsetX,r.offsetY],a=Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2);if(a>x6)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]);i.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(r){if(!(this._mouseDownPoint||!gm(this,"mousemove"))){var e=this._model,t=e.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]),a=t.behavior;a==="jump"&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand(a==="none"?null:{axisExpandWindow:t.axisExpandWindow,animation:a==="jump"?null:{duration:0}})}}};function gm(r,e){var t=r._model;return t.get("axisExpandable")&&t.get("axisExpandTriggerOn")===e}var w6=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){r.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(t){var a=this.option;t&&yt(a,t,!0),this._initDimensions()},e.prototype.contains=function(t,a){var i=t.get("parallelIndex");return i!=null&&a.getComponent("parallel",i)===this},e.prototype.setAxisExpand=function(t){M(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(a){t.hasOwnProperty(a)&&(this.option[a]=t[a])},this)},e.prototype._initDimensions=function(){var t=this.dimensions=[],a=this.parallelAxisIndex=[],i=Et(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(n){return(n.get("parallelIndex")||0)===this.componentIndex},this);M(i,function(n){t.push("dim"+n.get("dim")),a.push(n.componentIndex)})},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e}(Tt),T6=function(r){z(e,r);function e(t,a,i,n,o){var s=r.call(this,t,a,i)||this;return s.type=n||"value",s.axisIndex=o,s}return e.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},e}(Yr);function Pi(r,e,t,a,i,n){r=r||0;var o=t[1]-t[0];if(i!=null&&(i=ps(i,[0,o])),n!=null&&(n=Math.max(n,i??0)),a==="all"){var s=Math.abs(e[1]-e[0]);s=ps(s,[0,o]),i=n=ps(s,[i,n]),a=0}e[0]=ps(e[0],t),e[1]=ps(e[1],t);var l=ym(e,a);e[a]+=r;var u=i||0,h=t.slice();l.sign<0?h[0]+=u:h[1]-=u,e[a]=ps(e[a],h);var f;return f=ym(e,a),i!=null&&(f.sign!==l.sign||f.span<i)&&(e[1-a]=e[a]+l.sign*i),f=ym(e,a),n!=null&&f.span>n&&(e[1-a]=e[a]+f.sign*n),e}function ym(r,e){var t=r[e]-r[1-e];return{span:Math.abs(t),sign:t>0?-1:t<0?1:e?-1:1}}function ps(r,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,r))}var mm=M,JD=Math.min,QD=Math.max,tL=Math.floor,C6=Math.ceil,eL=ne,A6=Math.PI,M6=function(){function r(e,t,a){this.type="parallel",this._axesMap=J(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,t,a)}return r.prototype._init=function(e,t,a){var i=e.dimensions,n=e.parallelAxisIndex;mm(i,function(o,s){var l=n[s],u=t.getComponent("parallelAxis",l),h=this._axesMap.set(o,new T6(o,Pf(u),[0,0],u.get("type"),l)),f=h.type==="category";h.onBand=f&&u.get("boundaryGap"),h.inverse=u.get("inverse"),u.axis=h,h.model=u,h.coordinateSystem=u.coordinateSystem=this},this)},r.prototype.update=function(e,t){this._updateAxesFromSeries(this._model,e)},r.prototype.containPoint=function(e){var t=this._makeLayoutInfo(),a=t.axisBase,i=t.layoutBase,n=t.pixelDimIndex,o=e[1-n],s=e[n];return o>=a&&o<=a+t.axisLength&&s>=i&&s<=i+t.layoutLength},r.prototype.getModel=function(){return this._model},r.prototype._updateAxesFromSeries=function(e,t){t.eachSeries(function(a){if(e.contains(a,t)){var i=a.getData();mm(this.dimensions,function(n){var o=this._axesMap.get(n);o.scale.unionExtentFromData(i,i.mapDimension(n)),es(o.scale,o.model)},this)}},this)},r.prototype.resize=function(e,t){var a=de(e,t).refContainer;this._rect=qt(e.getBoxLayoutParams(),a),this._layoutAxes()},r.prototype.getRect=function(){return this._rect},r.prototype._makeLayoutInfo=function(){var e=this._model,t=this._rect,a=["x","y"],i=["width","height"],n=e.get("layout"),o=n==="horizontal"?0:1,s=t[i[o]],l=[0,s],u=this.dimensions.length,h=yv(e.get("axisExpandWidth"),l),f=yv(e.get("axisExpandCount")||0,[0,u]),v=e.get("axisExpandable")&&u>3&&u>f&&f>1&&h>0&&s>0,c=e.get("axisExpandWindow"),d;if(c)d=yv(c[1]-c[0],l),c[1]=c[0]+d;else{d=yv(h*(f-1),l);var p=e.get("axisExpandCenter")||tL(u/2);c=[h*p-d/2],c[1]=c[0]+d}var g=(s-d)/(u-f);g<3&&(g=0);var y=[tL(eL(c[0]/h,1))+1,C6(eL(c[1]/h,1))-1],m=g/h*c[0];return{layout:n,pixelDimIndex:o,layoutBase:t[a[o]],layoutLength:s,axisBase:t[a[1-o]],axisLength:t[i[1-o]],axisExpandable:v,axisExpandWidth:h,axisCollapseWidth:g,axisExpandWindow:c,axisCount:u,winInnerIndices:y,axisExpandWindow0Pos:m}},r.prototype._layoutAxes=function(){var e=this._rect,t=this._axesMap,a=this.dimensions,i=this._makeLayoutInfo(),n=i.layout;t.each(function(o){var s=[0,i.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),mm(a,function(o,s){var l=(i.axisExpandable?L6:D6)(s,i),u={horizontal:{x:l.position,y:i.axisLength},vertical:{x:0,y:l.position}},h={horizontal:A6/2,vertical:0},f=[u[n].x+e.x,u[n].y+e.y],v=h[n],c=Se();ri(c,c,v),Kr(c,c,f),this._axesLayout[o]={position:f,rotation:v,transform:c,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},r.prototype.getAxis=function(e){return this._axesMap.get(e)},r.prototype.dataToPoint=function(e,t){return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e),t)},r.prototype.eachActiveState=function(e,t,a,i){a==null&&(a=0),i==null&&(i=e.count());var n=this._axesMap,o=this.dimensions,s=[],l=[];M(o,function(g){s.push(e.mapDimension(g)),l.push(n.get(g).model)});for(var u=this.hasAxisBrushed(),h=a;h<i;h++){var f=void 0;if(!u)f="normal";else{f="active";for(var v=e.getValues(s,h),c=0,d=o.length;c<d;c++){var p=l[c].getActiveState(v[c]);if(p==="inactive"){f="inactive";break}}}t(f,h)}},r.prototype.hasAxisBrushed=function(){for(var e=this.dimensions,t=this._axesMap,a=!1,i=0,n=e.length;i<n;i++)t.get(e[i]).model.getActiveState()!=="normal"&&(a=!0);return a},r.prototype.axisCoordToPoint=function(e,t){var a=this._axesLayout[t];return Vr([e,0],a.transform)},r.prototype.getAxisLayout=function(e){return at(this._axesLayout[e])},r.prototype.getSlidedAxisExpandWindow=function(e){var t=this._makeLayoutInfo(),a=t.pixelDimIndex,i=t.axisExpandWindow.slice(),n=i[1]-i[0],o=[0,t.axisExpandWidth*(t.axisCount-1)];if(!this.containPoint(e))return{behavior:"none",axisExpandWindow:i};var s=e[a]-t.layoutBase-t.axisExpandWindow0Pos,l,u="slide",h=t.axisCollapseWidth,f=this._model.get("axisExpandSlideTriggerArea"),v=f[0]!=null;if(h)v&&h&&s<n*f[0]?(u="jump",l=s-n*f[2]):v&&h&&s>n*(1-f[0])?(u="jump",l=s-n*(1-f[2])):(l=s-n*f[1])>=0&&(l=s-n*(1-f[1]))<=0&&(l=0),l*=t.axisExpandWidth/h,l?Pi(l,i,o,"all"):u="none";else{var c=i[1]-i[0],d=o[1]*s/c;i=[QD(0,d-c/2)],i[1]=JD(o[1],i[0]+c),i[0]=i[1]-c}return{axisExpandWindow:i,behavior:u}},r}();function yv(r,e){return JD(QD(r,e[0]),e[1])}function D6(r,e){var t=e.layoutLength/(e.axisCount-1);return{position:t*r,axisNameAvailableWidth:t,axisLabelShow:!0}}function L6(r,e){var t=e.layoutLength,a=e.axisExpandWidth,i=e.axisCount,n=e.axisCollapseWidth,o=e.winInnerIndices,s,l=n,u=!1,h;return r<o[0]?(s=r*n,h=n):r<=o[1]?(s=e.axisExpandWindow0Pos+r*a-e.axisExpandWindow[0],l=a,u=!0):(s=t-(i-1-r)*n,h=n),{position:s,axisNameAvailableWidth:l,axisLabelShow:u,nameTruncateMaxWidth:h}}function I6(r,e){var t=[];return r.eachComponent("parallel",function(a,i){var n=new M6(a,r,e);n.name="parallel_"+i,n.resize(a,e),a.coordinateSystem=n,n.model=a,t.push(n)}),r.eachSeries(function(a){if(a.get("coordinateSystem")==="parallel"){var i=a.getReferringComponents("parallel",Jt).models[0];a.coordinateSystem=i.coordinateSystem}}),t}var P6={create:I6},_m=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.activeIntervals=[],t}return e.prototype.getAreaSelectStyle=function(){return an([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},e.prototype.setActiveIntervals=function(t){var a=this.activeIntervals=at(t);if(a)for(var i=a.length-1;i>=0;i--)mr(a[i])},e.prototype.getActiveState=function(t){var a=this.activeIntervals;if(!a.length)return"normal";if(t==null||isNaN(+t))return"inactive";if(a.length===1){var i=a[0];if(i[0]<=t&&t<=i[1])return"active"}else for(var n=0,o=a.length;n<o;n++)if(a[n][0]<=t&&t<=a[n][1])return"active";return"inactive"},e}(Tt);ie(_m,Nl);var to=!0,du=Math.min,gs=Math.max,k6=Math.pow,R6=1e4,E6=6,O6=6,rL="globalPan",N6={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},B6={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},aL={brushStyle:{lineWidth:2,stroke:B.color.backgroundTint,fill:B.color.borderTint},transformable:!0,brushMode:"single",removeOnClick:!1},z6=0,xm=function(r){z(e,r);function e(t){var a=r.call(this)||this;return a._track=[],a._covers=[],a._handlers={},a._zr=t,a.group=new et,a._uid="brushController_"+z6++,M(Y6,function(i,n){this._handlers[n]=X(i,this)},a),a}return e.prototype.enableBrush=function(t){return this._brushType&&this._doDisableBrush(),t.brushType&&this._doEnableBrush(t),this},e.prototype._doEnableBrush=function(t){var a=this._zr;this._enableGlobalPan||SH(a,rL,this._uid),M(this._handlers,function(i,n){a.on(n,i)}),this._brushType=t.brushType,this._brushOption=yt(at(aL),t,!0)},e.prototype._doDisableBrush=function(){var t=this._zr;bH(t,rL,this._uid),M(this._handlers,function(a,i){t.off(i,a)}),this._brushType=this._brushOption=null},e.prototype.setPanels=function(t){if(t&&t.length){var a=this._panels={};M(t,function(i){a[i.panelId]=at(i)})}else this._panels=null;return this},e.prototype.mount=function(t){t=t||{},this._enableGlobalPan=t.enableGlobalPan;var a=this.group;return this._zr.add(a),a.attr({x:t.x||0,y:t.y||0,rotation:t.rotation||0,scaleX:t.scaleX||1,scaleY:t.scaleY||1}),this._transform=a.getLocalTransform(),this},e.prototype.updateCovers=function(t){t=U(t,function(v){return yt(at(aL),v,!0)});var a="\0-brush-index-",i=this._covers,n=this._covers=[],o=this,s=this._creatingCover;return new Fa(i,t,u,l).add(h).update(h).remove(f).execute(),this;function l(v,c){return(v.id!=null?v.id:a+c)+"-"+v.brushType}function u(v,c){return l(v.__brushOption,c)}function h(v,c){var d=t[v];if(c!=null&&i[c]===s)n[v]=i[c];else{var p=n[v]=c!=null?(i[c].__brushOption=d,i[c]):nL(o,iL(o,d));Sm(o,p)}}function f(v){i[v]!==s&&o.group.remove(i[v])}},e.prototype.unmount=function(){return this.enableBrush(!1),Tm(this),this._zr.remove(this.group),this},e.prototype.dispose=function(){this.unmount(),this.off()},e}(dr);function iL(r,e){var t=mv[e.brushType].createCover(r,e);return t.__brushOption=e,sL(t,e),r.group.add(t),t}function nL(r,e){var t=bm(e);return t.endCreating&&(t.endCreating(r,e),sL(e,e.__brushOption)),e}function oL(r,e){var t=e.__brushOption;bm(e).updateCoverShape(r,e,t.range,t)}function sL(r,e){var t=e.z;t==null&&(t=R6),r.traverse(function(a){a.z=t,a.z2=t})}function Sm(r,e){bm(e).updateCommon(r,e),oL(r,e)}function bm(r){return mv[r.__brushOption.brushType]}function wm(r,e,t){var a=r._panels;if(!a)return to;var i,n=r._transform;return M(a,function(o){o.isTargetByCursor(e,t,n)&&(i=o)}),i}function lL(r,e){var t=r._panels;if(!t)return to;var a=e.__brushOption.panelId;return a!=null?t[a]:to}function Tm(r){var e=r._covers,t=e.length;return M(e,function(a){r.group.remove(a)},r),e.length=0,!!t}function eo(r,e){var t=U(r._covers,function(a){var i=a.__brushOption,n=at(i.range);return{brushType:i.brushType,panelId:i.panelId,range:n}});r.trigger("brush",{areas:t,isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function V6(r){var e=r._track;if(!e.length)return!1;var t=e[e.length-1],a=e[0],i=t[0]-a[0],n=t[1]-a[1],o=k6(i*i+n*n,.5);return o>E6}function uL(r){var e=r.length-1;return e<0&&(e=0),[r[0],r[e]]}function hL(r,e,t,a){var i=new et;return i.add(new _t({name:"main",style:Am(t),silent:!0,draggable:!0,cursor:"move",drift:pt(cL,r,e,i,["n","s","w","e"]),ondragend:pt(eo,e,{isEnd:!0})})),M(a,function(n){i.add(new _t({name:n.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:pt(cL,r,e,i,n),ondragend:pt(eo,e,{isEnd:!0})}))}),i}function fL(r,e,t,a){var i=a.brushStyle.lineWidth||0,n=gs(i,O6),o=t[0][0],s=t[1][0],l=o-i/2,u=s-i/2,h=t[0][1],f=t[1][1],v=h-n+i/2,c=f-n+i/2,d=h-o,p=f-s,g=d+i,y=p+i;Za(r,e,"main",o,s,d,p),a.transformable&&(Za(r,e,"w",l,u,n,y),Za(r,e,"e",v,u,n,y),Za(r,e,"n",l,u,g,n),Za(r,e,"s",l,c,g,n),Za(r,e,"nw",l,u,n,n),Za(r,e,"ne",v,u,n,n),Za(r,e,"sw",l,c,n,n),Za(r,e,"se",v,c,n,n))}function Cm(r,e){var t=e.__brushOption,a=t.transformable,i=e.childAt(0);i.useStyle(Am(t)),i.attr({silent:!a,cursor:a?"move":"default"}),M([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(n){var o=e.childOfName(n.join("")),s=n.length===1?Mm(r,n[0]):F6(r,n);o&&o.attr({silent:!a,invisible:!a,cursor:a?B6[s]+"-resize":null})})}function Za(r,e,t,a,i,n,o){var s=e.childOfName(t);s&&s.setShape(W6(Dm(r,e,[[a,i],[a+n,i+o]])))}function Am(r){return st({strokeNoScale:!0},r.brushStyle)}function vL(r,e,t,a){var i=[du(r,t),du(e,a)],n=[gs(r,t),gs(e,a)];return[[i[0],n[0]],[i[1],n[1]]]}function G6(r){return _n(r.group)}function Mm(r,e){var t={w:"left",e:"right",n:"top",s:"bottom"},a={left:"w",right:"e",top:"n",bottom:"s"},i=Gh(t[e],G6(r));return a[i]}function F6(r,e){var t=[Mm(r,e[0]),Mm(r,e[1])];return(t[0]==="e"||t[0]==="w")&&t.reverse(),t.join("")}function cL(r,e,t,a,i,n){var o=t.__brushOption,s=r.toRectRange(o.range),l=dL(e,i,n);M(a,function(u){var h=N6[u];s[h[0]][h[1]]+=l[h[0]]}),o.range=r.fromRectRange(vL(s[0][0],s[1][0],s[0][1],s[1][1])),Sm(e,t),eo(e,{isEnd:!1})}function H6(r,e,t,a){var i=e.__brushOption.range,n=dL(r,t,a);M(i,function(o){o[0]+=n[0],o[1]+=n[1]}),Sm(r,e),eo(r,{isEnd:!1})}function dL(r,e,t){var a=r.group,i=a.transformCoordToLocal(e,t),n=a.transformCoordToLocal(0,0);return[i[0]-n[0],i[1]-n[1]]}function Dm(r,e,t){var a=lL(r,e);return a&&a!==to?a.clipPath(t,r._transform):at(t)}function W6(r){var e=du(r[0][0],r[1][0]),t=du(r[0][1],r[1][1]),a=gs(r[0][0],r[1][0]),i=gs(r[0][1],r[1][1]);return{x:e,y:t,width:a-e,height:i-t}}function U6(r,e,t){if(!(!r._brushType||Z6(r,e.offsetX,e.offsetY))){var a=r._zr,i=r._covers,n=wm(r,e,t);if(!r._dragging)for(var o=0;o<i.length;o++){var s=i[o].__brushOption;if(n&&(n===to||s.panelId===n.panelId)&&mv[s.brushType].contain(i[o],t[0],t[1]))return}n&&a.setCursorStyle("crosshair")}}function Lm(r){var e=r.event;e.preventDefault&&e.preventDefault()}function Im(r,e,t){return r.childOfName("main").contain(e,t)}function pL(r,e,t,a){var i=r._creatingCover,n=r._creatingPanel,o=r._brushOption,s;if(r._track.push(t.slice()),V6(r)||i){if(n&&!i){o.brushMode==="single"&&Tm(r);var l=at(o);l.brushType=gL(l.brushType,n),l.panelId=n===to?null:n.panelId,i=r._creatingCover=iL(r,l),r._covers.push(i)}if(i){var u=mv[gL(r._brushType,n)],h=i.__brushOption;h.range=u.getCreatingRange(Dm(r,i,r._track)),a&&(nL(r,i),u.updateCommon(r,i)),oL(r,i),s={isEnd:a}}}else a&&o.brushMode==="single"&&o.removeOnClick&&wm(r,e,t)&&Tm(r)&&(s={isEnd:a,removeOnClick:!0});return s}function gL(r,e){return r==="auto"?e.defaultBrushType:r}var Y6={mousedown:function(r){if(this._dragging)yL(this,r);else if(!r.target||!r.target.draggable){Lm(r);var e=this.group.transformCoordToLocal(r.offsetX,r.offsetY);this._creatingCover=null;var t=this._creatingPanel=wm(this,r,e);t&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(r){var e=r.offsetX,t=r.offsetY,a=this.group.transformCoordToLocal(e,t);if(U6(this,r,a),this._dragging){Lm(r);var i=pL(this,r,a,!1);i&&eo(this,i)}},mouseup:function(r){yL(this,r)}};function yL(r,e){if(r._dragging){Lm(e);var t=e.offsetX,a=e.offsetY,i=r.group.transformCoordToLocal(t,a),n=pL(r,e,i,!0);r._dragging=!1,r._track=[],r._creatingCover=null,n&&eo(r,n)}}function Z6(r,e,t){var a=r._zr;return e<0||e>a.getWidth()||t<0||t>a.getHeight()}var mv={lineX:mL(0),lineY:mL(1),rect:{createCover:function(r,e){function t(a){return a}return hL({toRectRange:t,fromRectRange:t},r,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(r){var e=uL(r);return vL(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(r,e,t,a){fL(r,e,t,a)},updateCommon:Cm,contain:Im},polygon:{createCover:function(r,e){var t=new et;return t.add(new Be({name:"main",style:Am(e),silent:!0})),t},getCreatingRange:function(r){return r},endCreating:function(r,e){e.remove(e.childAt(0)),e.add(new De({name:"main",draggable:!0,drift:pt(H6,r,e),ondragend:pt(eo,r,{isEnd:!0})}))},updateCoverShape:function(r,e,t,a){e.childAt(0).setShape({points:Dm(r,e,t)})},updateCommon:Cm,contain:Im}};function mL(r){return{createCover:function(e,t){return hL({toRectRange:function(a){var i=[a,[0,100]];return r&&i.reverse(),i},fromRectRange:function(a){return a[r]}},e,t,[[["w"],["e"]],[["n"],["s"]]][r])},getCreatingRange:function(e){var t=uL(e),a=du(t[0][r],t[1][r]),i=gs(t[0][r],t[1][r]);return[a,i]},updateCoverShape:function(e,t,a,i){var n,o=lL(e,t);if(o!==to&&o.getLinearBrushOtherExtent)n=o.getLinearBrushOtherExtent(r);else{var s=e._zr;n=[0,[s.getWidth(),s.getHeight()][1-r]]}var l=[a,n];r&&l.reverse(),fL(e,t,l,i)},updateCommon:Cm,contain:Im}}function _L(r){return r=Pm(r),function(e){return CS(e,r)}}function xL(r,e){return r=Pm(r),function(t){var a=e??t,i=a?r.width:r.height,n=a?r.x:r.y;return[n,n+(i||0)]}}function SL(r,e,t){var a=Pm(r);return function(i,n){return a.contain(n[0],n[1])&&!_M(i,e,t)}}function Pm(r){return ht.create(r)}var $6=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a){r.prototype.init.apply(this,arguments),(this._brushController=new xm(a.getZr())).on("brush",X(this._onBrush,this))},e.prototype.render=function(t,a,i,n){if(!X6(t,a,n)){this.axisModel=t,this.api=i,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new et,this.group.add(this._axisGroup),!!t.get("show")){var s=K6(t,a),l=s.coordinateSystem,u=t.getAreaSelectStyle(),h=u.width,f=t.axis.dim,v=l.getAxisLayout(f),c=F({strokeContainThreshold:h},v),d=new $e(t,i,c);d.build(),this._axisGroup.add(d.group),this._refreshBrushController(c,u,t,s,h,i),il(o,this._axisGroup,t)}}},e.prototype._refreshBrushController=function(t,a,i,n,o,s){var l=i.axis.getExtent(),u=l[1]-l[0],h=Math.min(30,Math.abs(u)*.1),f=ht.create({x:l[0],y:-o/2,width:u,height:o});f.x-=h,f.width+=2*h,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,x:t.position[0],y:t.position[1]}).setPanels([{panelId:"pl",clipPath:_L(f),isTargetByCursor:SL(f,s,n),getLinearBrushOtherExtent:xL(f,0)}]).enableBrush({brushType:"lineX",brushStyle:a,removeOnClick:!0}).updateCovers(q6(i))},e.prototype._onBrush=function(t){var a=t.areas,i=this.axisModel,n=i.axis,o=U(a,function(s){return[n.coordToData(s.range[0],!0),n.coordToData(s.range[1],!0)]});(!i.option.realtime===t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:i.id,intervals:o})},e.prototype.dispose=function(){this._brushController.dispose()},e.type="parallelAxis",e}(Zt);function X6(r,e,t){return t&&t.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:t})[0]===r}function q6(r){var e=r.axis;return U(r.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(t[0],!0),e.dataToCoord(t[1],!0)]}})}function K6(r,e){return e.getComponent("parallel",r.get("parallelIndex"))}var j6={type:"axisAreaSelect",event:"axisAreaSelected"};function J6(r){r.registerAction(j6,function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},function(a){a.axis.model.setActiveIntervals(e.intervals)})}),r.registerAction("parallelAxisExpand",function(e,t){t.eachComponent({mainType:"parallel",query:e},function(a){a.setAxisExpand(e)})})}var Q6={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function bL(r){r.registerComponentView(S6),r.registerComponentModel(w6),r.registerCoordinateSystem("parallel",P6),r.registerPreprocessor(y6),r.registerComponentModel(_m),r.registerComponentView($6),us(r,"parallel",_m,Q6),J6(r)}function t8(r){mt(bL),r.registerChartView(u6),r.registerSeriesModel(v6),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,g6)}var e8=function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return r}(),r8=function(r){z(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new e8},e.prototype.buildPath=function(t,a){var i=a.extent;t.moveTo(a.x1,a.y1),t.bezierCurveTo(a.cpx1,a.cpy1,a.cpx2,a.cpy2,a.x2,a.y2),a.orient==="vertical"?(t.lineTo(a.x2+i,a.y2),t.bezierCurveTo(a.cpx2+i,a.cpy2,a.cpx1+i,a.cpy1,a.x1+i,a.y1)):(t.lineTo(a.x2,a.y2+i),t.bezierCurveTo(a.cpx2,a.cpy2+i,a.cpx1,a.cpy1+i,a.x1,a.y1+i)),t.closePath()},e.prototype.highlight=function(){Oa(this)},e.prototype.downplay=function(){Na(this)},e}(bt),a8=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._mainGroup=new et,t._focusAdjacencyDisabled=!1,t}return e.prototype.init=function(t,a){this._controller=new $n(a.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},e.prototype.render=function(t,a,i){var n=this,o=t.getGraph(),s=this._mainGroup,l=t.layoutInfo,u=l.width,h=l.height,f=t.getData(),v=t.getData("edge"),c=t.get("orient");this._model=t,s.removeAll(),s.x=l.x,s.y=l.y,this._updateViewCoordSys(t,i),SM(t,i,s,this._controller,this._controllerHost,null),o.eachEdge(function(d){var p=new r8,g=vt(p);g.dataIndex=d.dataIndex,g.seriesIndex=t.seriesIndex,g.dataType="edge";var y=d.getModel(),m=y.getModel("lineStyle"),_=m.get("curveness"),x=d.node1.getLayout(),b=d.node1.getModel(),S=b.get("localX"),w=b.get("localY"),T=d.node2.getLayout(),C=d.node2.getModel(),A=C.get("localX"),D=C.get("localY"),I=d.getLayout(),L,P,k,R,O,E,N,V;p.shape.extent=Math.max(1,I.dy),p.shape.orient=c,c==="vertical"?(L=(S!=null?S*u:x.x)+I.sy,P=(w!=null?w*h:x.y)+x.dy,k=(A!=null?A*u:T.x)+I.ty,R=D!=null?D*h:T.y,O=L,E=P*(1-_)+R*_,N=k,V=P*_+R*(1-_)):(L=(S!=null?S*u:x.x)+x.dx,P=(w!=null?w*h:x.y)+I.sy,k=A!=null?A*u:T.x,R=(D!=null?D*h:T.y)+I.ty,O=L*(1-_)+k*_,E=P,N=L*_+k*(1-_),V=R),p.setShape({x1:L,y1:P,x2:k,y2:R,cpx1:O,cpy1:E,cpx2:N,cpy2:V}),p.useStyle(m.getItemStyle()),wL(p.style,c,d);var G=""+y.get("value"),H=ce(y,"edgeLabel");ye(p,H,{labelFetcher:{getFormattedLabel:function(it,xt,At,ut,tt,ct){return t.getFormattedLabel(it,xt,"edge",ut,er(tt,H.normal&&H.normal.get("formatter"),G),ct)}},labelDataIndex:d.dataIndex,defaultText:G}),p.setTextConfig({position:"inside"});var Y=y.getModel("emphasis");ve(p,y,"lineStyle",function(it){var xt=it.getItemStyle();return wL(xt,c,d),xt}),s.add(p),v.setItemGraphicEl(d.dataIndex,p);var q=Y.get("focus");Xt(p,q==="adjacency"?d.getAdjacentDataIndices():q==="trajectory"?d.getTrajectoryDataIndices():q,Y.get("blurScope"),Y.get("disabled"))}),o.eachNode(function(d){var p=d.getLayout(),g=d.getModel(),y=g.get("localX"),m=g.get("localY"),_=g.getModel("emphasis"),x=g.get(["itemStyle","borderRadius"])||0,b=new _t({shape:{x:y!=null?y*u:p.x,y:m!=null?m*h:p.y,width:p.dx,height:p.dy,r:x},style:g.getModel("itemStyle").getItemStyle(),z2:10});ye(b,ce(g),{labelFetcher:{getFormattedLabel:function(w,T){return t.getFormattedLabel(w,T,"node")}},labelDataIndex:d.dataIndex,defaultText:d.id}),b.disableLabelAnimation=!0,b.setStyle("fill",d.getVisual("color")),b.setStyle("decal",d.getVisual("style").decal),ve(b,g),s.add(b),f.setItemGraphicEl(d.dataIndex,b),vt(b).dataType="node";var S=_.get("focus");Xt(b,S==="adjacency"?d.getAdjacentDataIndices():S==="trajectory"?d.getTrajectoryDataIndices():S,_.get("blurScope"),_.get("disabled"))}),f.eachItemGraphicEl(function(d,p){var g=f.getItemModel(p);g.get("draggable")&&(d.drift=function(y,m){n._focusAdjacencyDisabled=!0,this.shape.x+=y,this.shape.y+=m,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:f.getRawIndex(p),localX:this.shape.x/u,localY:this.shape.y/h})},d.ondragend=function(){n._focusAdjacencyDisabled=!1},d.draggable=!0,d.cursor="move")}),!this._data&&t.isAnimationEnabled()&&s.setClipPath(i8(s.getBoundingRect(),t,function(){s.removeClipPath()})),this._data=t.getData()},e.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._updateViewCoordSys=function(t,a){var i=t.layoutInfo,n=i.width,o=i.height,s=t.coordinateSystem=new Kn(null,{api:a,ecModel:t.ecModel});s.zoomLimit=t.get("scaleLimit"),s.setBoundingRect(0,0,n,o),s.setCenter(t.get("center")),s.setZoom(t.get("zoom")),this._controllerHost.target.attr({x:s.x,y:s.y,scaleX:s.scaleX,scaleY:s.scaleY})},e.type="sankey",e}(zt);function wL(r,e,t){switch(r.fill){case"source":r.fill=t.node1.getVisual("color"),r.decal=t.node1.getVisual("style").decal;break;case"target":r.fill=t.node2.getVisual("color"),r.decal=t.node2.getVisual("style").decal;break;case"gradient":var a=t.node1.getVisual("color"),i=t.node2.getVisual("color");$(a)&&$(i)&&(r.fill=new Po(0,0,+(e==="horizontal"),+(e==="vertical"),[{color:a,offset:0},{color:i,offset:1}]))}}function i8(r,e,t){var a=new _t({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return Yt(a,{shape:{width:r.width+20}},e,t),a}var n8=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,a){var i=t.edges||t.links||[],n=t.data||t.nodes||[],o=t.levels||[];this.levelModels=[];for(var s=this.levelModels,l=0;l<o.length;l++)o[l].depth!=null&&o[l].depth>=0&&(s[o[l].depth]=new Ct(o[l],this,a));var u=cm(n,i,this,!0,h);return u.data;function h(f,v){f.wrapMethod("getItemModel",function(c,d){var p=c.parentModel,g=p.getData().getItemLayout(d);if(g){var y=g.depth,m=p.levelModels[y];m&&(c.parentModel=m)}return c}),v.wrapMethod("getItemModel",function(c,d){var p=c.parentModel,g=p.getGraph().getEdgeByIndex(d),y=g.node1.getLayout();if(y){var m=y.depth,_=p.levelModels[m];_&&(c.parentModel=_)}return c})}},e.prototype.setNodePosition=function(t,a){var i=this.option.data||this.option.nodes,n=i[t];n.localX=a[0],n.localY=a[1]},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,a,i){function n(c){return isNaN(c)||c==null}if(i==="edge"){var o=this.getDataParams(t,i),s=o.data,l=o.value,u=s.source+" -- "+s.target;return ue("nameValue",{name:u,value:l,noValue:n(l)})}else{var h=this.getGraph().getNodeByIndex(t),f=h.getLayout().value,v=this.getDataParams(t,i).data.name;return ue("nameValue",{name:v!=null?v+"":null,value:f,noValue:n(f)})}},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(t,a){var i=r.prototype.getDataParams.call(this,t,a);if(i.value==null&&a==="node"){var n=this.getGraph().getNodeByIndex(t),o=n.getLayout().value;i.value=o}return i},e.type="series.sankey",e.layoutMode="box",e.defaultOption={z:2,coordinateSystemUsage:"box",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,roam:!1,roamTrigger:"global",center:null,zoom:1,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:B.color.neutral50,opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:B.color.primary}},animationEasing:"linear",animationDuration:1e3},e}(Ht);function o8(r,e){r.eachSeriesByType("sankey",function(t){var a=t.get("nodeWidth"),i=t.get("nodeGap"),n=de(t,e).refContainer,o=qt(t.getBoxLayoutParams(),n);t.layoutInfo=o;var s=o.width,l=o.height,u=t.getGraph(),h=u.nodes,f=u.edges;l8(h);var v=Et(h,function(g){return g.getLayout().value===0}),c=v.length!==0?0:t.get("layoutIterations"),d=t.get("orient"),p=t.get("nodeAlign");s8(h,f,a,i,s,l,c,d,p)})}function s8(r,e,t,a,i,n,o,s,l){u8(r,e,t,i,n,s,l),c8(r,e,n,i,a,o,s),b8(r,s)}function l8(r){M(r,function(e){var t=Ri(e.outEdges,_v),a=Ri(e.inEdges,_v),i=e.getValue()||0,n=Math.max(t,a,i);e.setLayout({value:n},!0)})}function u8(r,e,t,a,i,n,o){for(var s=[],l=[],u=[],h=[],f=0,v=0;v<e.length;v++)s[v]=1;for(var v=0;v<r.length;v++)l[v]=r[v].inEdges.length,l[v]===0&&u.push(r[v]);for(var c=-1;u.length;){for(var d=0;d<u.length;d++){var p=u[d],g=p.hostGraph.data.getRawDataItem(p.dataIndex),y=g.depth!=null&&g.depth>=0;y&&g.depth>c&&(c=g.depth),p.setLayout({depth:y?g.depth:f},!0),n==="vertical"?p.setLayout({dy:t},!0):p.setLayout({dx:t},!0);for(var m=0;m<p.outEdges.length;m++){var _=p.outEdges[m],x=e.indexOf(_);s[x]=0;var b=_.node2,S=r.indexOf(b);--l[S]===0&&h.indexOf(b)<0&&h.push(b)}}++f,u=h,h=[]}for(var v=0;v<s.length;v++)if(s[v]===1)throw new Error("Sankey is a DAG, the original data has cycle!");var w=c>f-1?c:f-1;o&&o!=="left"&&h8(r,o,n,w);var T=n==="vertical"?(i-t)/w:(a-t)/w;v8(r,T,n)}function TL(r){var e=r.hostGraph.data.getRawDataItem(r.dataIndex);return e.depth!=null&&e.depth>=0}function h8(r,e,t,a){if(e==="right"){for(var i=[],n=r,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(r,function(f){TL(f)||f.setLayout({depth:Math.max(0,a-f.getLayout().skNodeHeight)},!0)})}else e==="justify"&&f8(r,a)}function f8(r,e){M(r,function(t){!TL(t)&&!t.outEdges.length&&t.setLayout({depth:e},!0)})}function v8(r,e,t){M(r,function(a){var i=a.getLayout().depth*e;t==="vertical"?a.setLayout({y:i},!0):a.setLayout({x:i},!0)})}function c8(r,e,t,a,i,n,o){var s=d8(r,o);p8(s,e,t,a,i,o),km(s,i,t,a,o);for(var l=1;n>0;n--)l*=.99,g8(s,l,o),km(s,i,t,a,o),S8(s,l,o),km(s,i,t,a,o)}function d8(r,e){var t=[],a=e==="vertical"?"y":"x",i=yd(r,function(n){return n.getLayout()[a]});return i.keys.sort(function(n,o){return n-o}),M(i.keys,function(n){t.push(i.buckets.get(n))}),t}function p8(r,e,t,a,i,n){var o=1/0;M(r,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:(t-(l-1)*i)/u;h<o&&(o=h)}),M(r,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 km(r,e,t,a,i){var n=i==="vertical"?"x":"y";M(r,function(o){o.sort(function(p,g){return p.getLayout()[n]-g.getLayout()[n]});for(var s,l,u,h=0,f=o.length,v=i==="vertical"?"dx":"dy",c=0;c<f;c++)l=o[c],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()[v]+e;var d=i==="vertical"?a:t;if(u=h-e-d,u>0){s=l.getLayout()[n]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),h=s;for(var c=f-2;c>=0;--c)l=o[c],u=l.getLayout()[n]+l.getLayout()[v]+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 g8(r,e,t){M(r.slice().reverse(),function(a){M(a,function(i){if(i.outEdges.length){var n=Ri(i.outEdges,y8,t)/Ri(i.outEdges,_v);if(isNaN(n)){var o=i.outEdges.length;n=o?Ri(i.outEdges,m8,t)/o:0}if(t==="vertical"){var s=i.getLayout().x+(n-ki(i,t))*e;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(n-ki(i,t))*e;i.setLayout({y:l},!0)}}})})}function y8(r,e){return ki(r.node2,e)*r.getValue()}function m8(r,e){return ki(r.node2,e)}function _8(r,e){return ki(r.node1,e)*r.getValue()}function x8(r,e){return ki(r.node1,e)}function ki(r,e){return e==="vertical"?r.getLayout().x+r.getLayout().dx/2:r.getLayout().y+r.getLayout().dy/2}function _v(r){return r.getValue()}function Ri(r,e,t){for(var a=0,i=r.length,n=-1;++n<i;){var o=+e(r[n],t);isNaN(o)||(a+=o)}return a}function S8(r,e,t){M(r,function(a){M(a,function(i){if(i.inEdges.length){var n=Ri(i.inEdges,_8,t)/Ri(i.inEdges,_v);if(isNaN(n)){var o=i.inEdges.length;n=o?Ri(i.inEdges,x8,t)/o:0}if(t==="vertical"){var s=i.getLayout().x+(n-ki(i,t))*e;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(n-ki(i,t))*e;i.setLayout({y:l},!0)}}})})}function b8(r,e){var t=e==="vertical"?"x":"y";M(r,function(a){a.outEdges.sort(function(i,n){return i.node2.getLayout()[t]-n.node2.getLayout()[t]}),a.inEdges.sort(function(i,n){return i.node1.getLayout()[t]-n.node1.getLayout()[t]})}),M(r,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})})}function w8(r){r.eachSeriesByType("sankey",function(e){var t=e.getGraph(),a=t.nodes,i=t.edges;if(a.length){var n=1/0,o=-1/0;M(a,function(s){var l=s.getLayout().value;l<n&&(n=l),l>o&&(o=l)}),M(a,function(s){var l=new _e({type:"color",mappingMethod:"linear",dataExtent:[n,o],visual:e.get("color")}),u=l.mapValueToVisual(s.getLayout().value),h=s.getModel().get(["itemStyle","color"]);h!=null?(s.setVisual("color",h),s.setVisual("style",{fill:h})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}i.length&&M(i,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function T8(r){r.registerChartView(a8),r.registerSeriesModel(n8),r.registerLayout(o8),r.registerVisual(w8),r.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(a){a.setNodePosition(e.dataIndex,[e.localX,e.localY])})}),r.registerAction({type:"sankeyRoam",event:"sankeyRoam",update:"none"},function(e,t,a){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(i){var n=i.coordinateSystem,o=av(n,e,i.get("scaleLimit"));i.setCenter(o.center),i.setZoom(o.zoom)})})}var CL=function(){function r(){}return r.prototype._hasEncodeRule=function(e){var t=this.getEncode();return t&&t.get(e)!=null},r.prototype.getInitialData=function(e,t){var a,i=t.getComponent("xAxis",this.get("xAxisIndex")),n=t.getComponent("yAxis",this.get("yAxisIndex")),o=i.get("type"),s=n.get("type"),l;o==="category"?(e.layout="horizontal",a=i.getOrdinalMeta(),l=!this._hasEncodeRule("x")):s==="category"?(e.layout="vertical",a=n.getOrdinalMeta(),l=!this._hasEncodeRule("y")):e.layout=e.layout||"horizontal";var u=["x","y"],h=e.layout==="horizontal"?0:1,f=this._baseAxisDim=u[h],v=u[1-h],c=[i,n],d=c[h].get("type"),p=c[1-h].get("type"),g=e.data;if(g&&l){var y=[];M(g,function(x,b){var S;W(x)?(S=x.slice(),x.unshift(b)):W(x.value)?(S=F({},x),S.value=S.value.slice(),x.value.unshift(b)):S=x,y.push(S)}),e.data=y}var m=this.defaultValueDimensions,_=[{name:f,type:wf(d),ordinalMeta:a,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:v,type:wf(p),dimsDef:m.slice()}];return ss(this,{coordDimensions:_,dimensionsCount:m.length+1,encodeDefaulter:pt(db,_,this)})},r.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},r}(),AL=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],t.visualDrawType="stroke",t}return e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:B.color.neutral00,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:B.color.shadow}},animationDuration:800},e}(Ht);ie(AL,CL,!0);var C8=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,i){var n=t.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=t.get("layout")==="horizontal"?1:0;n.diff(s).add(function(u){if(n.hasValue(u)){var h=n.getItemLayout(u),f=ML(h,n,u,l,!0);n.setItemGraphicEl(u,f),o.add(f)}}).update(function(u,h){var f=s.getItemGraphicEl(h);if(!n.hasValue(u)){o.remove(f);return}var v=n.getItemLayout(u);f?(br(f),DL(v,f,n,u)):f=ML(v,n,u,l),o.add(f),n.setItemGraphicEl(u,f)}).remove(function(u){var h=s.getItemGraphicEl(u);h&&o.remove(h)}).execute(),this._data=n},e.prototype.remove=function(t){var a=this.group,i=this._data;this._data=null,i&&i.eachItemGraphicEl(function(n){n&&a.remove(n)})},e.type="boxplot",e}(zt),A8=function(){function r(){}return r}(),M8=function(r){z(e,r);function e(t){var a=r.call(this,t)||this;return a.type="boxplotBoxPath",a}return e.prototype.getDefaultShape=function(){return new A8},e.prototype.buildPath=function(t,a){var i=a.points,n=0;for(t.moveTo(i[n][0],i[n][1]),n++;n<4;n++)t.lineTo(i[n][0],i[n][1]);for(t.closePath();n<i.length;n++)t.moveTo(i[n][0],i[n][1]),n++,t.lineTo(i[n][0],i[n][1])},e}(bt);function ML(r,e,t,a,i){var n=r.ends,o=new M8({shape:{points:i?D8(n,a,r):n}});return DL(r,o,e,t,i),o}function DL(r,e,t,a,i){var n=t.hostModel,o=bn[i?"initProps":"updateProps"];o(e,{shape:{points:r.ends}},n,a),e.useStyle(t.getItemVisual(a,"style")),e.style.strokeNoScale=!0,e.z2=100;var s=t.getItemModel(a),l=s.getModel("emphasis");ve(e,s),Xt(e,l.get("focus"),l.get("blurScope"),l.get("disabled"))}function D8(r,e,t){return U(r,function(a){return a=a.slice(),a[e]=t.initBaseline,a})}var pu=M;function L8(r){var e=I8(r);pu(e,function(t){var a=t.seriesModels;a.length&&(P8(t),pu(a,function(i,n){k8(i,t.boxOffsetList[n],t.boxWidthList[n])}))})}function I8(r){var e=[],t=[];return r.eachSeriesByType("boxplot",function(a){var i=a.getBaseAxis(),n=gt(t,i);n<0&&(n=t.length,t[n]=i,e[n]={axis:i,seriesModels:[]}),e[n].seriesModels.push(a)}),e}function P8(r){var e=r.axis,t=r.seriesModels,a=t.length,i=r.boxWidthList=[],n=r.boxOffsetList=[],o=[],s;if(e.type==="category")s=e.getBandWidth();else{var l=0;pu(t,function(d){l=Math.max(l,d.getData().count())});var u=e.getExtent();s=Math.abs(u[1]-u[0])/l}pu(t,function(d){var p=d.get("boxWidth");W(p)||(p=[p,p]),o.push([Z(p[0],s)||0,Z(p[1],s)||0])});var h=s*.8-2,f=h/a*.3,v=(h-f*(a-1))/a,c=v/2-h/2;pu(t,function(d,p){n.push(c),c+=f+v,i.push(Math.min(Math.max(v,o[p][0]),o[p][1]))})}function k8(r,e,t){var a=r.coordinateSystem,i=r.getData(),n=t/2,o=r.get("layout")==="horizontal"?0:1,s=1-o,l=["x","y"],u=i.mapDimension(l[o]),h=i.mapDimensionsAll(l[s]);if(u==null||h.length<5)return;for(var f=0;f<i.count();f++){var v=i.get(u,f),c=_(v,h[2],f),d=_(v,h[0],f),p=_(v,h[1],f),g=_(v,h[3],f),y=_(v,h[4],f),m=[];x(m,p,!1),x(m,g,!0),m.push(d,p,y,g),b(m,d),b(m,y),b(m,c),i.setItemLayout(f,{initBaseline:c[s],ends:m})}function _(S,w,T){var C=i.get(w,T),A=[];A[o]=S,A[s]=C;var D;return isNaN(S)||isNaN(C)?D=[NaN,NaN]:(D=a.dataToPoint(A),D[o]+=e),D}function x(S,w,T){var C=w.slice(),A=w.slice();C[o]+=n,A[o]-=n,T?S.push(C,A):S.push(A,C)}function b(S,w){var T=w.slice(),C=w.slice();T[o]-=n,C[o]+=n,S.push(T,C)}}function R8(r,e){e=e||{};for(var t=[],a=[],i=e.boundIQR,n=i==="none"||i===0,o=0;o<r.length;o++){var s=mr(r[o].slice()),l=dd(s,.25),u=dd(s,.5),h=dd(s,.75),f=s[0],v=s[s.length-1],c=(i??1.5)*(h-l),d=n?f:Math.max(f,l-c),p=n?v:Math.min(v,h+c),g=e.itemNameFormatter,y=rt(g)?g({value:o}):$(g)?g.replace("{value}",o+""):o+"";t.push([y,d,l,u,h,p]);for(var m=0;m<s.length;m++){var _=s[m];if(_<d||_>p){var x=[y,_];a.push(x)}}}return{boxData:t,outliers:a}}var E8={type:"echarts:boxplot",transform:function(e){var t=e.upstream;if(t.sourceFormat!==Te){var a="";Rt(a)}var i=R8(t.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:i.boxData},{data:i.outliers}]}};function O8(r){r.registerSeriesModel(AL),r.registerChartView(C8),r.registerLayout(L8),r.registerTransform(E8)}var N8=["itemStyle","borderColor"],B8=["itemStyle","borderColor0"],z8=["itemStyle","borderColorDoji"],V8=["itemStyle","color"],G8=["itemStyle","color0"];function Rm(r,e){return e.get(r>0?V8:G8)}function Em(r,e){return e.get(r===0?z8:r>0?N8:B8)}var F8={seriesType:"candlestick",plan:Uo(),performRawSeries:!0,reset:function(r,e){if(!e.isSeriesFiltered(r)){var t=r.pipelineContext.large;return!t&&{progress:function(a,i){for(var n;(n=a.next())!=null;){var o=i.getItemModel(n),s=i.getItemLayout(n).sign,l=o.getItemStyle();l.fill=Rm(s,o),l.stroke=Em(s,o)||l.fill;var u=i.ensureUniqueItemVisual(n,"style");F(u,l)}}}}}},H8=["color","borderColor"],W8=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,i){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,a,i){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,a,i,n){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,a):this._incrementalRenderNormal(t,a)},e.prototype.eachRendered=function(t){gi(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var a=t.pipelineContext.large;(this._isLargeDraw==null||a!==this._isLargeDraw)&&(this._isLargeDraw=a,this._clear())},e.prototype._renderNormal=function(t){var a=t.getData(),i=this._data,n=this.group,o=a.getLayout("isSimpleBox"),s=t.get("clip",!0),l=t.coordinateSystem,u=l.getArea&&l.getArea();this._data||n.removeAll(),a.diff(i).add(function(h){if(a.hasValue(h)){var f=a.getItemLayout(h);if(s&&LL(u,f))return;var v=Om(f,h,!0);Yt(v,{shape:{points:f.ends}},t,h),Nm(v,a,h,o),n.add(v),a.setItemGraphicEl(h,v)}}).update(function(h,f){var v=i.getItemGraphicEl(f);if(!a.hasValue(h)){n.remove(v);return}var c=a.getItemLayout(h);if(s&&LL(u,c)){n.remove(v);return}v?(It(v,{shape:{points:c.ends}},t,h),br(v)):v=Om(c),Nm(v,a,h,o),n.add(v),a.setItemGraphicEl(h,v)}).remove(function(h){var f=i.getItemGraphicEl(h);f&&n.remove(f)}).execute(),this._data=a},e.prototype._renderLarge=function(t){this._clear(),IL(t,this.group);var a=t.get("clip",!0)?Yl(t.coordinateSystem,!1,t):null;a?this.group.setClipPath(a):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,a){for(var i=a.getData(),n=i.getLayout("isSimpleBox"),o;(o=t.next())!=null;){var s=i.getItemLayout(o),l=Om(s);Nm(l,i,o,n),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},e.prototype._incrementalRenderLarge=function(t,a){IL(a,this.group,this._progressiveEls,!0)},e.prototype.remove=function(t){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(zt),U8=function(){function r(){}return r}(),Y8=function(r){z(e,r);function e(t){var a=r.call(this,t)||this;return a.type="normalCandlestickBox",a}return e.prototype.getDefaultShape=function(){return new U8},e.prototype.buildPath=function(t,a){var i=a.points;this.__simpleBox?(t.moveTo(i[4][0],i[4][1]),t.lineTo(i[6][0],i[6][1])):(t.moveTo(i[0][0],i[0][1]),t.lineTo(i[1][0],i[1][1]),t.lineTo(i[2][0],i[2][1]),t.lineTo(i[3][0],i[3][1]),t.closePath(),t.moveTo(i[4][0],i[4][1]),t.lineTo(i[5][0],i[5][1]),t.moveTo(i[6][0],i[6][1]),t.lineTo(i[7][0],i[7][1]))},e}(bt);function Om(r,e,t){var a=r.ends;return new Y8({shape:{points:t?Z8(a,r):a},z2:100})}function LL(r,e){for(var t=!0,a=0;a<e.ends.length;a++)if(r.contain(e.ends[a][0],e.ends[a][1])){t=!1;break}return t}function Nm(r,e,t,a){var i=e.getItemModel(t);r.useStyle(e.getItemVisual(t,"style")),r.style.strokeNoScale=!0,r.__simpleBox=a,ve(r,i);var n=e.getItemLayout(t).sign;M(r.states,function(s,l){var u=i.getModel(l),h=Rm(n,u),f=Em(n,u)||h,v=s.style||(s.style={});h&&(v.fill=h),f&&(v.stroke=f)});var o=i.getModel("emphasis");Xt(r,o.get("focus"),o.get("blurScope"),o.get("disabled"))}function Z8(r,e){return U(r,function(t){return t=t.slice(),t[1]=e.initBaseline,t})}var $8=function(){function r(){}return r}(),Bm=function(r){z(e,r);function e(t){var a=r.call(this,t)||this;return a.type="largeCandlestickBox",a}return e.prototype.getDefaultShape=function(){return new $8},e.prototype.buildPath=function(t,a){for(var i=a.points,n=0;n<i.length;)if(this.__sign===i[n++]){var o=i[n++];t.moveTo(o,i[n++]),t.lineTo(o,i[n++])}else n+=3},e}(bt);function IL(r,e,t,a){var i=r.getData(),n=i.getLayout("largePoints"),o=new Bm({shape:{points:n},__sign:1,ignoreCoarsePointer:!0});e.add(o);var s=new Bm({shape:{points:n},__sign:-1,ignoreCoarsePointer:!0});e.add(s);var l=new Bm({shape:{points:n},__sign:0,ignoreCoarsePointer:!0});e.add(l),zm(1,o,r),zm(-1,s,r),zm(0,l,r),a&&(o.incremental=!0,s.incremental=!0),t&&t.push(o,s)}function zm(r,e,t,a){var i=Em(r,t)||Rm(r,t),n=t.getModel("itemStyle").getItemStyle(H8);e.useStyle(n),e.style.fill=null,e.style.stroke=i}var PL=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],t}return e.prototype.getShadowDim=function(){return"open"},e.prototype.brushSelector=function(t,a,i){var n=a.getItemLayout(t);return n&&i.rect(n.brushRect)},e.type="series.candlestick",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderColorDoji:null,borderWidth:1},emphasis:{itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},e}(Ht);ie(PL,CL,!0);function X8(r){!r||!W(r.series)||M(r.series,function(e){lt(e)&&e.type==="k"&&(e.type="candlestick")})}var q8={seriesType:"candlestick",plan:Uo(),reset:function(r){var e=r.coordinateSystem,t=r.getData(),a=K8(r,t),i=0,n=1,o=["x","y"],s=t.getDimensionIndex(t.mapDimension(o[i])),l=U(t.mapDimensionsAll(o[n]),t.getDimensionIndex,t),u=l[0],h=l[1],f=l[2],v=l[3];if(t.setLayout({candleWidth:a,isSimpleBox:a<=1.3}),s<0||l.length<4)return;return{progress:r.pipelineContext.large?d:c};function c(p,g){for(var y,m=g.getStore();(y=p.next())!=null;){var _=m.get(s,y),x=m.get(u,y),b=m.get(h,y),S=m.get(f,y),w=m.get(v,y),T=Math.min(x,b),C=Math.max(x,b),A=O(T,_),D=O(C,_),I=O(S,_),L=O(w,_),P=[];E(P,D,0),E(P,A,1),P.push(V(L),V(D),V(I),V(A));var k=g.getItemModel(y),R=!!k.get(["itemStyle","borderColorDoji"]);g.setItemLayout(y,{sign:kL(m,y,x,b,h,R),initBaseline:x>b?D[n]:A[n],ends:P,brushRect:N(S,w,_)})}function O(G,H){var Y=[];return Y[i]=H,Y[n]=G,isNaN(H)||isNaN(G)?[NaN,NaN]:e.dataToPoint(Y)}function E(G,H,Y){var q=H.slice(),it=H.slice();q[i]=Vh(q[i]+a/2,1,!1),it[i]=Vh(it[i]-a/2,1,!0),Y?G.push(q,it):G.push(it,q)}function N(G,H,Y){var q=O(G,Y),it=O(H,Y);return q[i]-=a/2,it[i]-=a/2,{x:q[0],y:q[1],width:a,height:it[1]-q[1]}}function V(G){return G[i]=Vh(G[i],1),G}}function d(p,g){for(var y=da(p.count*4),m=0,_,x=[],b=[],S,w=g.getStore(),T=!!r.get(["itemStyle","borderColorDoji"]);(S=p.next())!=null;){var C=w.get(s,S),A=w.get(u,S),D=w.get(h,S),I=w.get(f,S),L=w.get(v,S);if(isNaN(C)||isNaN(I)||isNaN(L)){y[m++]=NaN,m+=3;continue}y[m++]=kL(w,S,A,D,h,T),x[i]=C,x[n]=I,_=e.dataToPoint(x,null,b),y[m++]=_?_[0]:NaN,y[m++]=_?_[1]:NaN,x[n]=L,_=e.dataToPoint(x,null,b),y[m++]=_?_[1]:NaN}g.setLayout("largePoints",y)}}};function kL(r,e,t,a,i,n){var o;return t>a?o=-1:t<a?o=1:o=n?0:e>0?r.get(i,e-1)<=a?1:-1:1,o}function K8(r,e){var t=r.getBaseAxis(),a,i=t.type==="category"?t.getBandWidth():(a=t.getExtent(),Math.abs(a[1]-a[0])/e.count()),n=Z(Q(r.get("barMaxWidth"),i),i),o=Z(Q(r.get("barMinWidth"),1),i),s=r.get("barWidth");return s!=null?Z(s,i):Math.max(Math.min(i/2,n),o)}function j8(r){r.registerChartView(W8),r.registerSeriesModel(PL),r.registerPreprocessor(X8),r.registerVisual(F8),r.registerLayout(q8)}function RL(r,e){var t=e.rippleEffectColor||e.color;r.eachChild(function(a){a.attr({z:e.z,zlevel:e.zlevel,style:{stroke:e.brushType==="stroke"?t:null,fill:e.brushType==="fill"?t:null}})})}var J8=function(r){z(e,r);function e(t,a){var i=r.call(this)||this,n=new Wl(t,a),o=new et;return i.add(n),i.add(o),i.updateData(t,a),i}return e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var a=t.symbolType,i=t.color,n=t.rippleNumber,o=this.childAt(1),s=0;s<n;s++){var l=he(a,-1,-1,2,2,i);l.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var u=-s/n*t.period+t.effectOffset;l.animate("",!0).when(t.period,{scaleX:t.rippleScale/2,scaleY:t.rippleScale/2}).delay(u).start(),l.animateStyle(!0).when(t.period,{opacity:0}).delay(u).start(),o.add(l)}RL(o,t)},e.prototype.updateEffectAnimation=function(t){for(var a=this._effectCfg,i=this.childAt(1),n=["symbolType","period","rippleScale","rippleNumber"],o=0;o<n.length;o++){var s=n[o];if(a[s]!==t[s]){this.stopEffectAnimation(),this.startEffectAnimation(t);return}}RL(i,t)},e.prototype.highlight=function(){Oa(this)},e.prototype.downplay=function(){Na(this)},e.prototype.getSymbolType=function(){var t=this.childAt(0);return t&&t.getSymbolType()},e.prototype.updateData=function(t,a){var i=this,n=t.hostModel;this.childAt(0).updateData(t,a);var o=this.childAt(1),s=t.getItemModel(a),l=t.getItemVisual(a,"symbol"),u=$o(t.getItemVisual(a,"symbolSize")),h=t.getItemVisual(a,"style"),f=h&&h.fill,v=s.getModel("emphasis");o.setScale(u),o.traverse(function(g){g.setStyle("fill",f)});var c=En(t.getItemVisual(a,"symbolOffset"),u);c&&(o.x=c[0],o.y=c[1]);var d=t.getItemVisual(a,"symbolRotate");o.rotation=(d||0)*Math.PI/180||0;var p={};p.showEffectOn=n.get("showEffectOn"),p.rippleScale=s.get(["rippleEffect","scale"]),p.brushType=s.get(["rippleEffect","brushType"]),p.period=s.get(["rippleEffect","period"])*1e3,p.effectOffset=a/t.count(),p.z=n.getShallow("z")||0,p.zlevel=n.getShallow("zlevel")||0,p.symbolType=l,p.color=f,p.rippleEffectColor=s.get(["rippleEffect","color"]),p.rippleNumber=s.get(["rippleEffect","number"]),p.showEffectOn==="render"?(this._effectCfg?this.updateEffectAnimation(p):this.startEffectAnimation(p),this._effectCfg=p):(this._effectCfg=null,this.stopEffectAnimation(),this.onHoverStateChange=function(g){g==="emphasis"?p.showEffectOn!=="render"&&i.startEffectAnimation(p):g==="normal"&&p.showEffectOn!=="render"&&i.stopEffectAnimation()}),this._effectCfg=p,Xt(this,v.get("focus"),v.get("blurScope"),v.get("disabled"))},e.prototype.fadeOut=function(t){t&&t()},e}(et),Q8=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this._symbolDraw=new Ul(J8)},e.prototype.render=function(t,a,i){var n=t.getData(),o=this._symbolDraw;o.updateData(n,{clipShape:this._getClipShape(t)}),this.group.add(o.group)},e.prototype._getClipShape=function(t){var a=t.coordinateSystem,i=a&&a.getArea&&a.getArea();return t.get("clip",!0)?i:null},e.prototype.updateTransform=function(t,a,i){var n=t.getData();this.group.dirty();var o=Zl("").reset(t,a,i);o.progress&&o.progress({start:0,end:n.count(),count:n.count()},n),this._symbolDraw.updateLayout()},e.prototype._updateGroupTransform=function(t){var a=t.coordinateSystem;a&&a.getRoamTransform&&(this.group.transform=fR(a.getRoamTransform()),this.group.decomposeTransform())},e.prototype.remove=function(t,a){this._symbolDraw&&this._symbolDraw.remove(!0)},e.type="effectScatter",e}(zt),tU=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t,a){return Ha(null,this,{useEncodeDefaulter:!0})},e.prototype.brushSelector=function(t,a,i){return i.point(a.getItemLayout(t))},e.type="series.effectScatter",e.dependencies=["grid","polar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",clip:!0,rippleEffect:{period:4,scale:2.5,brushType:"fill",number:3},universalTransition:{divideShape:"clone"},symbolSize:10},e}(Ht);function eU(r){r.registerChartView(Q8),r.registerSeriesModel(tU),r.registerLayout(Zl("effectScatter"))}var EL=function(r){z(e,r);function e(t,a,i){var n=r.call(this)||this;return n.add(n.createLine(t,a,i)),n._updateEffectSymbol(t,a),n}return e.prototype.createLine=function(t,a,i){return new nm(t,a,i)},e.prototype._updateEffectSymbol=function(t,a){var i=t.getItemModel(a),n=i.getModel("effect"),o=n.get("symbolSize"),s=n.get("symbol");W(o)||(o=[o,o]);var l=t.getItemVisual(a,"style"),u=n.get("color")||l&&l.stroke,h=this.childAt(1);this._symbolType!==s&&(this.remove(h),h=he(s,-.5,-.5,1,1,u),h.z2=100,h.culling=!0,this.add(h)),h&&(h.setStyle("shadowColor",u),h.setStyle(n.getItemStyle(["color"])),h.scaleX=o[0],h.scaleY=o[1],h.setColor(u),this._symbolType=s,this._symbolScale=o,this._updateEffectAnimation(t,n,a))},e.prototype._updateEffectAnimation=function(t,a,i){var n=this.childAt(1);if(n){var o=t.getItemLayout(i),s=a.get("period")*1e3,l=a.get("loop"),u=a.get("roundTrip"),h=a.get("constantSpeed"),f=Ae(a.get("delay"),function(c){return c/t.count()*s/3});if(n.ignore=!0,this._updateAnimationPoints(n,o),h>0&&(s=this._getLineLength(n)/h*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){n.stopAnimation();var v=void 0;rt(f)?v=f(i):v=f,n.__t>0&&(v=-s*n.__t),this._animateSymbol(n,s,v,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},e.prototype._animateSymbol=function(t,a,i,n,o){if(a>0){t.__t=0;var s=this,l=t.animate("",n).when(o?a*2:a,{__t:o?2:1}).delay(i).during(function(){s._updateSymbolPosition(t)});n||l.done(function(){s.remove(t)}),l.start()}},e.prototype._getLineLength=function(t){return Qa(t.__p1,t.__cp1)+Qa(t.__cp1,t.__p2)},e.prototype._updateAnimationPoints=function(t,a){t.__p1=a[0],t.__p2=a[1],t.__cp1=a[2]||[(a[0][0]+a[1][0])/2,(a[0][1]+a[1][1])/2]},e.prototype.updateData=function(t,a,i){this.childAt(0).updateData(t,a,i),this._updateEffectSymbol(t,a)},e.prototype._updateSymbolPosition=function(t){var a=t.__p1,i=t.__p2,n=t.__cp1,o=t.__t<1?t.__t:2-t.__t,s=[t.x,t.y],l=s.slice(),u=be,h=Ec;s[0]=u(a[0],n[0],i[0],o),s[1]=u(a[1],n[1],i[1],o);var f=t.__t<1?h(a[0],n[0],i[0],o):h(i[0],n[0],a[0],1-o),v=t.__t<1?h(a[1],n[1],i[1],o):h(i[1],n[1],a[1],1-o);t.rotation=-Math.atan2(v,f)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(t.__lastT!==void 0&&t.__lastT<t.__t?(t.scaleY=Qa(l,s)*1.05,o===1&&(s[0]=l[0]+(s[0]-l[0])/2,s[1]=l[1]+(s[1]-l[1])/2)):t.__lastT===1?t.scaleY=2*Qa(a,s):t.scaleY=this._symbolScale[1]),t.__lastT=t.__t,t.ignore=!1,t.x=s[0],t.y=s[1]},e.prototype.updateLayout=function(t,a){this.childAt(0).updateLayout(t,a);var i=t.getItemModel(a).getModel("effect");this._updateEffectAnimation(t,i,a)},e}(et),OL=function(r){z(e,r);function e(t,a,i){var n=r.call(this)||this;return n._createPolyline(t,a,i),n}return e.prototype._createPolyline=function(t,a,i){var n=t.getItemLayout(a),o=new Be({shape:{points:n}});this.add(o),this._updateCommonStl(t,a,i)},e.prototype.updateData=function(t,a,i){var n=t.hostModel,o=this.childAt(0),s={shape:{points:t.getItemLayout(a)}};It(o,s,n,a),this._updateCommonStl(t,a,i)},e.prototype._updateCommonStl=function(t,a,i){var n=this.childAt(0),o=t.getItemModel(a),s=i&&i.emphasisLineStyle,l=i&&i.focus,u=i&&i.blurScope,h=i&&i.emphasisDisabled;if(!i||t.hasItemOption){var f=o.getModel("emphasis");s=f.getModel("lineStyle").getLineStyle(),h=f.get("disabled"),l=f.get("focus"),u=f.get("blurScope")}n.useStyle(t.getItemVisual(a,"style")),n.style.fill=null,n.style.strokeNoScale=!0;var v=n.ensureState("emphasis");v.style=s,Xt(this,l,u,h)},e.prototype.updateLayout=function(t,a){var i=this.childAt(0);i.setShape("points",t.getItemLayout(a))},e}(et),rU=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t._lastFrame=0,t._lastFramePercent=0,t}return e.prototype.createLine=function(t,a,i){return new OL(t,a,i)},e.prototype._updateAnimationPoints=function(t,a){this._points=a;for(var i=[0],n=0,o=1;o<a.length;o++){var s=a[o-1],l=a[o];n+=Qa(s,l),i.push(n)}if(n===0){this._length=0;return}for(var o=0;o<i.length;o++)i[o]/=n;this._offsets=i,this._length=n},e.prototype._getLineLength=function(){return this._length},e.prototype._updateSymbolPosition=function(t){var a=t.__t<1?t.__t:2-t.__t,i=this._points,n=this._offsets,o=i.length;if(n){var s=this._lastFrame,l;if(a<this._lastFramePercent){var u=Math.min(s+1,o-1);for(l=u;l>=0&&!(n[l]<=a);l--);l=Math.min(l,o-2)}else{for(l=s;l<o&&!(n[l]>a);l++);l=Math.min(l-1,o-2)}var h=(a-n[l])/(n[l+1]-n[l]),f=i[l],v=i[l+1];t.x=f[0]*(1-h)+h*v[0],t.y=f[1]*(1-h)+h*v[1];var c=t.__t<1?v[0]-f[0]:f[0]-v[0],d=t.__t<1?v[1]-f[1]:f[1]-v[1];t.rotation=-Math.atan2(d,c)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=a,t.ignore=!1}},e}(EL),aU=function(){function r(){this.polyline=!1,this.curveness=0,this.segs=[]}return r}(),iU=function(r){z(e,r);function e(t){var a=r.call(this,t)||this;return a._off=0,a.hoverDataIdx=-1,a}return e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:B.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new aU},e.prototype.buildPath=function(t,a){var i=a.segs,n=a.curveness,o;if(a.polyline)for(o=this._off;o<i.length;){var s=i[o++];if(s>0){t.moveTo(i[o++],i[o++]);for(var l=1;l<s;l++)t.lineTo(i[o++],i[o++])}}else for(o=this._off;o<i.length;){var u=i[o++],h=i[o++],f=i[o++],v=i[o++];if(t.moveTo(u,h),n>0){var c=(u+f)/2-(h-v)*n,d=(h+v)/2-(f-u)*n;t.quadraticCurveTo(c,d,f,v)}else t.lineTo(f,v)}this.incremental&&(this._off=o,this.notClear=!0)},e.prototype.findDataIndex=function(t,a){var i=this.shape,n=i.segs,o=i.curveness,s=this.style.lineWidth;if(i.polyline)for(var l=0,u=0;u<n.length;){var h=n[u++];if(h>0)for(var f=n[u++],v=n[u++],c=1;c<h;c++){var d=n[u++],p=n[u++];if(ci(f,v,d,p,s,t,a))return l}l++}else for(var l=0,u=0;u<n.length;){var f=n[u++],v=n[u++],d=n[u++],p=n[u++];if(o>0){var g=(f+d)/2-(v-p)*o,y=(v+p)/2-(d-f)*o;if(vx(f,v,g,y,d,p,s,t,a))return l}else if(ci(f,v,d,p,s,t,a))return l;l++}return-1},e.prototype.contain=function(t,a){var i=this.transformCoordToLocal(t,a),n=this.getBoundingRect();if(t=i[0],a=i[1],n.contain(t,a)){var o=this.hoverDataIdx=this.findDataIndex(t,a);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var a=this.shape,i=a.segs,n=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u<i.length;){var h=i[u++],f=i[u++];n=Math.min(h,n),s=Math.max(h,s),o=Math.min(f,o),l=Math.max(f,l)}t=this._rect=new ht(n,o,s,l)}return t},e}(bt),nU=function(){function r(){this.group=new et}return r.prototype.updateData=function(e){this._clear();var t=this._create();t.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(t,e)},r.prototype.incrementalPrepareUpdate=function(e){this.group.removeAll(),this._clear()},r.prototype.incrementalUpdate=function(e,t){var a=this._newAdded[0],i=t.getLayout("linesPoints"),n=a&&a.shape.segs;if(n&&n.length<2e4){var o=n.length,s=new Float32Array(o+i.length);s.set(n),s.set(i,o),a.setShape({segs:s})}else{this._newAdded=[];var l=this._create();l.incremental=!0,l.setShape({segs:i}),this._setCommon(l,t),l.__startIndex=e.start}},r.prototype.remove=function(){this._clear()},r.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},r.prototype._create=function(){var e=new iU({cursor:"default",ignoreCoarsePointer:!0});return this._newAdded.push(e),this.group.add(e),e},r.prototype._setCommon=function(e,t,a){var i=t.hostModel;e.setShape({polyline:i.get("polyline"),curveness:i.get(["lineStyle","curveness"])}),e.useStyle(i.getModel("lineStyle").getLineStyle()),e.style.strokeNoScale=!0;var n=t.getVisual("style");n&&n.stroke&&e.setStyle("stroke",n.stroke),e.setStyle("fill",null);var o=vt(e);o.seriesIndex=i.seriesIndex,e.on("mousemove",function(s){o.dataIndex=null;var l=e.hoverDataIdx;l>0&&(o.dataIndex=l+e.__startIndex)})},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}(),NL={seriesType:"lines",plan:Uo(),reset:function(r){var e=r.coordinateSystem;if(e){var t=r.get("polyline"),a=r.pipelineContext.large;return{progress:function(i,n){var o=[];if(a){var s=void 0,l=i.end-i.start;if(t){for(var u=0,h=i.start;h<i.end;h++)u+=r.getLineCoordsCount(h);s=new Float32Array(l+u*2)}else s=new Float32Array(l*4);for(var f=0,v=[],h=i.start;h<i.end;h++){var c=r.getLineCoords(h,o);t&&(s[f++]=c);for(var d=0;d<c;d++)v=e.dataToPoint(o[d],!1,v),s[f++]=v[0],s[f++]=v[1]}n.setLayout("linesPoints",s)}else for(var h=i.start;h<i.end;h++){var p=n.getItemModel(h),c=r.getLineCoords(h,o),g=[];if(t)for(var y=0;y<c;y++)g.push(e.dataToPoint(o[y]));else{g[0]=e.dataToPoint(o[0]),g[1]=e.dataToPoint(o[1]);var m=p.get(["lineStyle","curveness"]);+m&&(g[2]=[(g[0][0]+g[1][0])/2-(g[0][1]-g[1][1])*m,(g[0][1]+g[1][1])/2-(g[1][0]-g[0][0])*m])}n.setItemLayout(h,g)}}}}}},oU=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,i){var n=t.getData(),o=this._updateLineDraw(n,t),s=t.get("zlevel"),l=t.get(["effect","trailLength"]),u=i.getZr(),h=u.painter.getType()==="svg";h||u.painter.getLayer(s).clear(!0),this._lastZlevel!=null&&!h&&u.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(t)&&l>0&&(h||u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(n);var f=t.get("clip",!0)&&Yl(t.coordinateSystem,!1,t);f?this.group.setClipPath(f):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},e.prototype.incrementalPrepareRender=function(t,a,i){var n=t.getData(),o=this._updateLineDraw(n,t);o.incrementalPrepareUpdate(n),this._clearLayer(i),this._finished=!1},e.prototype.incrementalRender=function(t,a,i){this._lineDraw.incrementalUpdate(t,a.getData()),this._finished=t.end===a.getData().count()},e.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},e.prototype.updateTransform=function(t,a,i){var n=t.getData(),o=t.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=NL.reset(t,a,i);s.progress&&s.progress({start:0,end:n.count(),count:n.count()},n),this._lineDraw.updateLayout(),this._clearLayer(i)},e.prototype._updateLineDraw=function(t,a){var i=this._lineDraw,n=this._showEffect(a),o=!!a.get("polyline"),s=a.pipelineContext,l=s.large;return(!i||n!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(i&&i.remove(),i=this._lineDraw=l?new nU:new om(o?n?rU:OL:n?EL:nm),this._hasEffet=n,this._isPolyline=o,this._isLargeDraw=l),this.group.add(i.group),i},e.prototype._showEffect=function(t){return!!t.get(["effect","show"])},e.prototype._clearLayer=function(t){var a=t.getZr(),i=a.painter.getType()==="svg";!i&&this._lastZlevel!=null&&a.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(t,a){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(a)},e.prototype.dispose=function(t,a){this.remove(t,a)},e.type="lines",e}(zt),sU=typeof Uint32Array>"u"?Array:Uint32Array,lU=typeof Float64Array>"u"?Array:Float64Array;function BL(r){var e=r.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(r.data=U(e,function(t){var a=[t[0].coord,t[1].coord],i={coords:a};return t[0].name&&(i.fromName=t[0].name),t[1].name&&(i.toName=t[1].name),uc([i,t[0],t[1]])}))}var uU=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="lineStyle",t.visualDrawType="stroke",t}return e.prototype.init=function(t){t.data=t.data||[],BL(t);var a=this._processFlatCoordsArray(t.data);this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset,a.flatCoords&&(t.data=new Float32Array(a.count)),r.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(t){if(BL(t),t.data){var a=this._processFlatCoordsArray(t.data);this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset,a.flatCoords&&(t.data=new Float32Array(a.count))}r.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(t){var a=this._processFlatCoordsArray(t.data);a.flatCoords&&(this._flatCoords?(this._flatCoords=ks(this._flatCoords,a.flatCoords),this._flatCoordsOffset=ks(this._flatCoordsOffset,a.flatCoordsOffset)):(this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset),t.data=new Float32Array(a.count)),this.getRawData().appendData(t.data)},e.prototype._getCoordsFromItemModel=function(t){var a=this.getData().getItemModel(t),i=a.option instanceof Array?a.option:a.getShallow("coords");return i},e.prototype.getLineCoordsCount=function(t){return this._flatCoordsOffset?this._flatCoordsOffset[t*2+1]:this._getCoordsFromItemModel(t).length},e.prototype.getLineCoords=function(t,a){if(this._flatCoordsOffset){for(var i=this._flatCoordsOffset[t*2],n=this._flatCoordsOffset[t*2+1],o=0;o<n;o++)a[o]=a[o]||[],a[o][0]=this._flatCoords[i+o*2],a[o][1]=this._flatCoords[i+o*2+1];return n}else{for(var s=this._getCoordsFromItemModel(t),o=0;o<s.length;o++)a[o]=a[o]||[],a[o][0]=s[o][0],a[o][1]=s[o][1];return s.length}},e.prototype._processFlatCoordsArray=function(t){var a=0;if(this._flatCoords&&(a=this._flatCoords.length),Dt(t[0])){for(var i=t.length,n=new sU(i),o=new lU(i),s=0,l=0,u=0,h=0;h<i;){u++;var f=t[h++];n[l++]=s+a,n[l++]=f;for(var v=0;v<f;v++){var c=t[h++],d=t[h++];o[s++]=c,o[s++]=d}}return{flatCoordsOffset:new Uint32Array(n.buffer,0,l),flatCoords:o,count:u}}return{flatCoordsOffset:null,flatCoords:null,count:t.length}},e.prototype.getInitialData=function(t,a){var i=new Ue(["value"],this);return i.hasItemOption=!1,i.initData(t.data,[],function(n,o,s,l){if(n instanceof Array)return NaN;i.hasItemOption=!0;var u=n.value;if(u!=null)return u instanceof Array?u[l]:u}),i},e.prototype.formatTooltip=function(t,a,i){var n=this.getData(),o=n.getItemModel(t),s=o.get("name");if(s)return s;var l=o.get("fromName"),u=o.get("toName"),h=[];return l!=null&&h.push(l),u!=null&&h.push(u),ue("nameValue",{name:h.join(" > ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return t??(this.option.large?1e4:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t??(this.option.large?2e4:this.get("progressiveThreshold"))},e.prototype.getZLevelKey=function(){var t=this.getModel("effect"),a=t.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:t.get("show")&&a>0?a+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e}(Ht);function xv(r){return r instanceof Array||(r=[r,r]),r}var hU={seriesType:"lines",reset:function(r){var e=xv(r.get("symbol")),t=xv(r.get("symbolSize")),a=r.getData();a.setVisual("fromSymbol",e&&e[0]),a.setVisual("toSymbol",e&&e[1]),a.setVisual("fromSymbolSize",t&&t[0]),a.setVisual("toSymbolSize",t&&t[1]);function i(n,o){var s=n.getItemModel(o),l=xv(s.getShallow("symbol",!0)),u=xv(s.getShallow("symbolSize",!0));l[0]&&n.setItemVisual(o,"fromSymbol",l[0]),l[1]&&n.setItemVisual(o,"toSymbol",l[1]),u[0]&&n.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&n.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:a.hasItemOption?i:null}}};function fU(r){r.registerChartView(oU),r.registerSeriesModel(uU),r.registerLayout(NL),r.registerVisual(hU)}var vU=256,cU=function(){function r(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=kr.createCanvas();this.canvas=e}return r.prototype.update=function(e,t,a,i,n,o){var s=this._getBrush(),l=this._getGradient(n,"inRange"),u=this._getGradient(n,"outOfRange"),h=this.pointSize+this.blurSize,f=this.canvas,v=f.getContext("2d"),c=e.length;f.width=t,f.height=a;for(var d=0;d<c;++d){var p=e[d],g=p[0],y=p[1],m=p[2],_=i(m);v.globalAlpha=_,v.drawImage(s,g-h,y-h)}if(!f.width||!f.height)return f;for(var x=v.getImageData(0,0,f.width,f.height),b=x.data,S=0,w=b.length,T=this.minOpacity,C=this.maxOpacity,A=C-T;S<w;){var _=b[S+3]/256,D=Math.floor(_*(vU-1))*4;if(_>0){var I=o(_)?l:u;_>0&&(_=_*A+T),b[S++]=I[D],b[S++]=I[D+1],b[S++]=I[D+2],b[S++]=I[D+3]*_*256}else S+=4}return v.putImageData(x,0,0),f},r.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=kr.createCanvas()),t=this.pointSize+this.blurSize,a=t*2;e.width=a,e.height=a;var i=e.getContext("2d");return i.clearRect(0,0,a,a),i.shadowOffsetX=a,i.shadowBlur=this.blurSize,i.shadowColor=B.color.neutral99,i.beginPath(),i.arc(-t,t,this.pointSize,0,Math.PI*2,!0),i.closePath(),i.fill(),e},r.prototype._getGradient=function(e,t){for(var a=this._gradientPixels,i=a[t]||(a[t]=new Uint8ClampedArray(256*4)),n=[0,0,0,0],o=0,s=0;s<256;s++)e[t](s/255,!0,n),i[o++]=n[0],i[o++]=n[1],i[o++]=n[2],i[o++]=n[3];return i},r}();function dU(r,e,t){var a=r[1]-r[0];e=U(e,function(o){return{interval:[(o.interval[0]-r[0])/a,(o.interval[1]-r[0])/a]}});var i=e.length,n=0;return function(o){var s;for(s=n;s<i;s++){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){n=s;break}}if(s===i)for(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&&t[s]}}function pU(r,e){var t=r[1]-r[0];return e=[(e[0]-r[0])/t,(e[1]-r[0])/t],function(a){return a>=e[0]&&a<=e[1]}}function zL(r){var e=r.dimensions;return e[0]==="lng"&&e[1]==="lat"}var gU=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,i){var n;a.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===t&&(n=s)})}),this._progressiveEls=null,this.group.removeAll();var o=t.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"||o.type==="matrix"?this._renderOnGridLike(t,i,0,t.getData().count()):zL(o)&&this._renderOnGeo(o,t,n,i)},e.prototype.incrementalPrepareRender=function(t,a,i){this.group.removeAll()},e.prototype.incrementalRender=function(t,a,i,n){var o=a.coordinateSystem;o&&(zL(o)?this.render(a,i,n):(this._progressiveEls=[],this._renderOnGridLike(a,n,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){gi(this._progressiveEls||this.group,t)},e.prototype._renderOnGridLike=function(t,a,i,n,o){var s=t.coordinateSystem,l=Di(s,"cartesian2d"),u=Di(s,"matrix"),h,f,v,c;if(l){var d=s.getAxis("x"),p=s.getAxis("y");h=d.getBandWidth()+.5,f=p.getBandWidth()+.5,v=d.scale.getExtent(),c=p.scale.getExtent()}for(var g=this.group,y=t.getData(),m=t.getModel(["emphasis","itemStyle"]).getItemStyle(),_=t.getModel(["blur","itemStyle"]).getItemStyle(),x=t.getModel(["select","itemStyle"]).getItemStyle(),b=t.get(["itemStyle","borderRadius"]),S=ce(t),w=t.getModel("emphasis"),T=w.get("focus"),C=w.get("blurScope"),A=w.get("disabled"),D=l||u?[y.mapDimension("x"),y.mapDimension("y"),y.mapDimension("value")]:[y.mapDimension("time"),y.mapDimension("value")],I=i;I<n;I++){var L=void 0,P=y.getItemVisual(I,"style");if(l){var k=y.get(D[0],I),R=y.get(D[1],I);if(isNaN(y.get(D[2],I))||isNaN(k)||isNaN(R)||k<v[0]||k>v[1]||R<c[0]||R>c[1])continue;var O=s.dataToPoint([k,R]);L=new _t({shape:{x:O[0]-h/2,y:O[1]-f/2,width:h,height:f},style:P})}else if(u){var E=s.dataToLayout([y.get(D[0],I),y.get(D[1],I)]).rect;if(Re(E.x))continue;L=new _t({z2:1,shape:E,style:P})}else{if(isNaN(y.get(D[1],I)))continue;var N=s.dataToLayout([y.get(D[0],I)]),E=N.contentRect||N.rect;if(Re(E.x)||Re(E.y))continue;L=new _t({z2:1,shape:E,style:P})}if(y.hasItemOption){var V=y.getItemModel(I),G=V.getModel("emphasis");m=G.getModel("itemStyle").getItemStyle(),_=V.getModel(["blur","itemStyle"]).getItemStyle(),x=V.getModel(["select","itemStyle"]).getItemStyle(),b=V.get(["itemStyle","borderRadius"]),T=G.get("focus"),C=G.get("blurScope"),A=G.get("disabled"),S=ce(V)}L.shape.r=b;var H=t.getRawValue(I),Y="-";H&&H[2]!=null&&(Y=H[2]+""),ye(L,S,{labelFetcher:t,labelDataIndex:I,defaultOpacity:P.opacity,defaultText:Y}),L.ensureState("emphasis").style=m,L.ensureState("blur").style=_,L.ensureState("select").style=x,Xt(L,T,C,A),L.incremental=o,o&&(L.states.emphasis.hoverLayer=!0),g.add(L),y.setItemGraphicEl(I,L),this._progressiveEls&&this._progressiveEls.push(L)}},e.prototype._renderOnGeo=function(t,a,i,n){var o=i.targetVisuals.inRange,s=i.targetVisuals.outOfRange,l=a.getData(),u=this._hmLayer||this._hmLayer||new cU;u.blurSize=a.get("blurSize"),u.pointSize=a.get("pointSize"),u.minOpacity=a.get("minOpacity"),u.maxOpacity=a.get("maxOpacity");var h=t.getViewRect().clone(),f=t.getRoamTransform();h.applyTransform(f);var v=Math.max(h.x,0),c=Math.max(h.y,0),d=Math.min(h.width+h.x,n.getWidth()),p=Math.min(h.height+h.y,n.getHeight()),g=d-v,y=p-c,m=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],_=l.mapArray(m,function(w,T,C){var A=t.dataToPoint([w,T]);return A[0]-=v,A[1]-=c,A.push(C),A}),x=i.getExtent(),b=i.type==="visualMap.continuous"?pU(x,i.option.range):dU(x,i.getPieceList(),i.option.selected);u.update(_,g,y,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},b);var S=new Me({style:{width:g,height:y,x:v,y:c,image:u.canvas},silent:!0});this.group.add(S)},e.type="heatmap",e}(zt),yU=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,a){return Ha(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var t=fl.get(this.get("coordinateSystem"));if(t&&t.dimensions)return t.dimensions[0]==="lng"&&t.dimensions[1]==="lat"},e.type="series.heatmap",e.dependencies=["grid","geo","calendar","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:B.color.primary}}},e}(Ht);function mU(r){r.registerChartView(gU),r.registerSeriesModel(yU)}var _U=["itemStyle","borderWidth"],VL=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],Vm=new Sr,xU=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,i){var n=this.group,o=t.getData(),s=this._data,l=t.coordinateSystem,u=l.getBaseAxis(),h=u.isHorizontal(),f=l.master.getRect(),v={ecSize:{width:i.getWidth(),height:i.getHeight()},seriesModel:t,coordSys:l,coordSysExtent:[[f.x,f.x+f.width],[f.y,f.y+f.height]],isHorizontal:h,valueDim:VL[+h],categoryDim:VL[1-+h]};o.diff(s).add(function(d){if(o.hasValue(d)){var p=ZL(o,d),g=GL(o,d,p,v),y=$L(o,v,g);o.setItemGraphicEl(d,y),n.add(y),KL(y,v,g)}}).update(function(d,p){var g=s.getItemGraphicEl(p);if(!o.hasValue(d)){n.remove(g);return}var y=ZL(o,d),m=GL(o,d,y,v),_=qL(o,m);g&&_!==g.__pictorialShapeStr&&(n.remove(g),o.setItemGraphicEl(d,null),g=null),g?MU(g,v,m):g=$L(o,v,m,!0),o.setItemGraphicEl(d,g),g.__pictorialSymbolMeta=m,n.add(g),KL(g,v,m)}).remove(function(d){var p=s.getItemGraphicEl(d);p&&XL(s,d,p.__pictorialSymbolMeta.animationModel,p)}).execute();var c=t.get("clip",!0)?Yl(t.coordinateSystem,!1,t):null;return c?n.setClipPath(c):n.removeClipPath(),this._data=o,this.group},e.prototype.remove=function(t,a){var i=this.group,n=this._data;t.get("animation")?n&&n.eachItemGraphicEl(function(o){XL(n,vt(o).dataIndex,t,o)}):i.removeAll()},e.type="pictorialBar",e}(zt);function GL(r,e,t,a){var i=r.getItemLayout(e),n=t.get("symbolRepeat"),o=t.get("symbolClip"),s=t.get("symbolPosition")||"start",l=t.get("symbolRotate"),u=(l||0)*Math.PI/180||0,h=t.get("symbolPatternSize")||2,f=t.isAnimationEnabled(),v={dataIndex:e,layout:i,itemModel:t,symbolType:r.getItemVisual(e,"symbol")||"circle",style:r.getItemVisual(e,"style"),symbolClip:o,symbolRepeat:n,symbolRepeatDirection:t.get("symbolRepeatDirection"),symbolPatternSize:h,rotation:u,animationModel:f?t:null,hoverScale:f&&t.get(["emphasis","scale"]),z2:t.getShallow("z",!0)||0};SU(t,n,i,a,v),bU(r,e,i,n,o,v.boundingLength,v.pxSign,h,a,v),wU(t,v.symbolScale,u,a,v);var c=v.symbolSize,d=En(t.get("symbolOffset"),c);return TU(t,c,i,n,o,d,s,v.valueLineWidth,v.boundingLength,v.repeatCutLength,a,v),v}function SU(r,e,t,a,i){var n=a.valueDim,o=r.get("symbolBoundingData"),s=a.coordSys.getOtherAxis(a.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(t[n.wh]<=0),h;if(W(o)){var f=[Gm(s,o[0])-l,Gm(s,o[1])-l];f[1]<f[0]&&f.reverse(),h=f[u]}else o!=null?h=Gm(s,o)-l:e?h=a.coordSysExtent[n.index][u]-l:h=t[n.wh];i.boundingLength=h,e&&(i.repeatCutLength=t[n.wh]);var v=n.xy==="x",c=s.inverse;i.pxSign=v&&!c||!v&&c?h>=0?1:-1:h>0?1:-1}function Gm(r,e){return r.toGlobalCoord(r.dataToCoord(r.scale.parse(e)))}function bU(r,e,t,a,i,n,o,s,l,u){var h=l.valueDim,f=l.categoryDim,v=Math.abs(t[f.wh]),c=r.getItemVisual(e,"symbolSize"),d;W(c)?d=c.slice():c==null?d=["100%","100%"]:d=[c,c],d[f.index]=Z(d[f.index],v),d[h.index]=Z(d[h.index],a?v:Math.abs(n)),u.symbolSize=d;var p=u.symbolScale=[d[0]/s,d[1]/s];p[h.index]*=(l.isHorizontal?-1:1)*o}function wU(r,e,t,a,i){var n=r.get(_U)||0;n&&(Vm.attr({scaleX:e[0],scaleY:e[1],rotation:t}),Vm.updateTransform(),n/=Vm.getLineScale(),n*=e[a.valueDim.index]),i.valueLineWidth=n||0}function TU(r,e,t,a,i,n,o,s,l,u,h,f){var v=h.categoryDim,c=h.valueDim,d=f.pxSign,p=Math.max(e[c.index]+s,0),g=p;if(a){var y=Math.abs(l),m=Ae(r.get("symbolMargin"),"15%")+"",_=!1;m.lastIndexOf("!")===m.length-1&&(_=!0,m=m.slice(0,m.length-1));var x=Z(m,e[c.index]),b=Math.max(p+x*2,0),S=_?0:x*2,w=N1(a),T=w?a:jL((y+S)/b),C=y-T*p;x=C/2/(_?T:Math.max(T-1,1)),b=p+x*2,S=_?0:x*2,!w&&a!=="fixed"&&(T=u?jL((Math.abs(u)+S)/b):0),g=T*b-S,f.repeatTimes=T,f.symbolMargin=x}var A=d*(g/2),D=f.pathPosition=[];D[v.index]=t[v.wh]/2,D[c.index]=o==="start"?A:o==="end"?l-A:l/2,n&&(D[0]+=n[0],D[1]+=n[1]);var I=f.bundlePosition=[];I[v.index]=t[v.xy],I[c.index]=t[c.xy];var L=f.barRectShape=F({},t);L[c.wh]=d*Math.max(Math.abs(t[c.wh]),Math.abs(D[c.index]+A)),L[v.wh]=t[v.wh];var P=f.clipShape={};P[v.xy]=-t[v.xy],P[v.wh]=h.ecSize[v.wh],P[c.xy]=0,P[c.wh]=t[c.wh]}function FL(r){var e=r.symbolPatternSize,t=he(r.symbolType,-e/2,-e/2,e,e);return t.attr({culling:!0}),t.type!=="image"&&t.setStyle({strokeNoScale:!0}),t}function HL(r,e,t,a){var i=r.__pictorialBundle,n=t.symbolSize,o=t.valueLineWidth,s=t.pathPosition,l=e.valueDim,u=t.repeatTimes||0,h=0,f=n[e.valueDim.index]+o+t.symbolMargin*2;for(Fm(r,function(p){p.__pictorialAnimationIndex=h,p.__pictorialRepeatTimes=u,h<u?ys(p,null,d(h),t,a):ys(p,null,{scaleX:0,scaleY:0},t,a,function(){i.remove(p)}),h++});h<u;h++){var v=FL(t);v.__pictorialAnimationIndex=h,v.__pictorialRepeatTimes=u,i.add(v);var c=d(h);ys(v,{x:c.x,y:c.y,scaleX:0,scaleY:0},{scaleX:c.scaleX,scaleY:c.scaleY,rotation:c.rotation},t,a)}function d(p){var g=s.slice(),y=t.pxSign,m=p;return(t.symbolRepeatDirection==="start"?y>0:y<0)&&(m=u-1-p),g[l.index]=f*(m-u/2+.5)+s[l.index],{x:g[0],y:g[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation}}}function WL(r,e,t,a){var i=r.__pictorialBundle,n=r.__pictorialMainPath;n?ys(n,null,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation},t,a):(n=r.__pictorialMainPath=FL(t),i.add(n),ys(n,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:0,scaleY:0,rotation:t.rotation},{scaleX:t.symbolScale[0],scaleY:t.symbolScale[1]},t,a))}function UL(r,e,t){var a=F({},e.barRectShape),i=r.__pictorialBarRect;i?ys(i,null,{shape:a},e,t):(i=r.__pictorialBarRect=new _t({z2:2,shape:a,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),i.disableMorphing=!0,r.add(i))}function YL(r,e,t,a){if(t.symbolClip){var i=r.__pictorialClipPath,n=F({},t.clipShape),o=e.valueDim,s=t.animationModel,l=t.dataIndex;if(i)It(i,{shape:n},s,l);else{n[o.wh]=0,i=new _t({shape:n}),r.__pictorialBundle.setClipPath(i),r.__pictorialClipPath=i;var u={};u[o.wh]=t.clipShape[o.wh],bn[a?"updateProps":"initProps"](i,{shape:u},s,l)}}}function ZL(r,e){var t=r.getItemModel(e);return t.getAnimationDelayParams=CU,t.isAnimationEnabled=AU,t}function CU(r){return{index:r.__pictorialAnimationIndex,count:r.__pictorialRepeatTimes}}function AU(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function $L(r,e,t,a){var i=new et,n=new et;return i.add(n),i.__pictorialBundle=n,n.x=t.bundlePosition[0],n.y=t.bundlePosition[1],t.symbolRepeat?HL(i,e,t):WL(i,e,t),UL(i,t,a),YL(i,e,t,a),i.__pictorialShapeStr=qL(r,t),i.__pictorialSymbolMeta=t,i}function MU(r,e,t){var a=t.animationModel,i=t.dataIndex,n=r.__pictorialBundle;It(n,{x:t.bundlePosition[0],y:t.bundlePosition[1]},a,i),t.symbolRepeat?HL(r,e,t,!0):WL(r,e,t,!0),UL(r,t,!0),YL(r,e,t,!0)}function XL(r,e,t,a){var i=a.__pictorialBarRect;i&&i.removeTextContent();var n=[];Fm(a,function(o){n.push(o)}),a.__pictorialMainPath&&n.push(a.__pictorialMainPath),a.__pictorialClipPath&&(t=null),M(n,function(o){pi(o,{scaleX:0,scaleY:0},t,e,function(){a.parent&&a.parent.remove(a)})}),r.setItemGraphicEl(e,null)}function qL(r,e){return[r.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function Fm(r,e,t){M(r.__pictorialBundle.children(),function(a){a!==r.__pictorialBarRect&&e.call(t,a)})}function ys(r,e,t,a,i,n){e&&r.attr(e),a.symbolClip&&!i?t&&r.attr(t):t&&bn[i?"updateProps":"initProps"](r,t,a.animationModel,a.dataIndex,n)}function KL(r,e,t){var a=t.dataIndex,i=t.itemModel,n=i.getModel("emphasis"),o=n.getModel("itemStyle").getItemStyle(),s=i.getModel(["blur","itemStyle"]).getItemStyle(),l=i.getModel(["select","itemStyle"]).getItemStyle(),u=i.getShallow("cursor"),h=n.get("focus"),f=n.get("blurScope"),v=n.get("scale");Fm(r,function(p){if(p instanceof Me){var g=p.style;p.useStyle(F({image:g.image,x:g.x,y:g.y,width:g.width,height:g.height},t.style))}else p.useStyle(t.style);var y=p.ensureState("emphasis");y.style=o,v&&(y.scaleX=p.scaleX*1.1,y.scaleY=p.scaleY*1.1),p.ensureState("blur").style=s,p.ensureState("select").style=l,u&&(p.cursor=u),p.z2=t.z2});var c=e.valueDim.posDesc[+(t.boundingLength>0)],d=r.__pictorialBarRect;d.ignoreClip=!0,ye(d,ce(i),{labelFetcher:e.seriesModel,labelDataIndex:a,defaultText:ns(e.seriesModel.getData(),a),inheritColor:t.style.fill,defaultOpacity:t.style.opacity,defaultOutsidePosition:c}),Xt(r,h,f,n.get("disabled"))}function jL(r){var e=Math.round(r);return Math.abs(r-e)<1e-4?e:Math.ceil(r)}var DU=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t.defaultSymbol="roundRect",t}return e.prototype.getInitialData=function(t){return t.stack=null,r.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=yi($l.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:B.color.primary}}}),e}($l);function LU(r){r.registerChartView(xU),r.registerSeriesModel(DU),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,pt(VT,"pictorialBar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,GT("pictorialBar"))}var IU=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._layers=[],t}return e.prototype.render=function(t,a,i){var n=t.getData(),o=this,s=this.group,l=t.getLayerSeries(),u=n.getLayout("layoutInfo"),h=u.rect,f=u.boundaryGap;s.x=0,s.y=h.y+f[0];function v(g){return g.name}var c=new Fa(this._layersSeries||[],l,v,v),d=[];c.add(X(p,this,"add")).update(X(p,this,"update")).remove(X(p,this,"remove")).execute();function p(g,y,m){var _=o._layers;if(g==="remove"){s.remove(_[y]);return}for(var x=[],b=[],S,w=l[y].indices,T=0;T<w.length;T++){var C=n.getItemLayout(w[T]),A=C.x,D=C.y0,I=C.y;x.push(A,D),b.push(A,D+I),S=n.getItemVisual(w[T],"style")}var L,P=n.getItemLayout(w[0]),k=t.getModel("label"),R=k.get("margin"),O=t.getModel("emphasis");if(g==="add"){var E=d[y]=new et;L=new oA({shape:{points:x,stackedOnPoints:b,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),E.add(L),s.add(E),t.isAnimationEnabled()&&L.setClipPath(PU(L.getBoundingRect(),t,function(){L.removeClipPath()}))}else{var E=_[m];L=E.childAt(0),s.add(E),d[y]=E,It(L,{shape:{points:x,stackedOnPoints:b}},t),br(L)}ye(L,ce(t),{labelDataIndex:w[T-1],defaultText:n.getName(w[T-1]),inheritColor:S.fill},{normal:{verticalAlign:"middle"}}),L.setTextConfig({position:null,local:!0});var N=L.getTextContent();N&&(N.x=P.x-R,N.y=P.y0+P.y/2),L.useStyle(S),n.setItemGraphicEl(y,L),ve(L,t),Xt(L,O.get("focus"),O.get("blurScope"),O.get("disabled"))}this._layersSeries=l,this._layers=d},e.type="themeRiver",e}(zt);function PU(r,e,t){var a=new _t({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return Yt(a,{shape:{x:r.x-50,width:r.width+100,height:r.height+20}},e,t),a}var Hm=2,kU=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new ls(X(this.getData,this),X(this.getRawData,this))},e.prototype.fixData=function(t){var a=t.length,i={},n=yd(t,function(v){return i.hasOwnProperty(v[0]+"")||(i[v[0]+""]=-1),v[2]}),o=[];n.buckets.each(function(v,c){o.push({name:c,dataList:v})});for(var s=o.length,l=0;l<s;++l){for(var u=o[l].name,h=0;h<o[l].dataList.length;++h){var f=o[l].dataList[h][0]+"";i[f]=l}for(var f in i)i.hasOwnProperty(f)&&i[f]!==l&&(i[f]=l,t[a]=[f,0,u],a++)}return t},e.prototype.getInitialData=function(t,a){for(var i=this.getReferringComponents("singleAxis",Jt).models[0],n=i.get("type"),o=Et(t.data,function(d){return d[2]!==void 0}),s=this.fixData(o||[]),l=[],u=this.nameMap=J(),h=0,f=0;f<s.length;++f)l.push(s[f][Hm]),u.get(s[f][Hm])||(u.set(s[f][Hm],h),h++);var v=kl(s,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:wf(n)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}).dimensions,c=new Ue(v,this);return c.initData(s),c},e.prototype.getLayerSeries=function(){for(var t=this.getData(),a=t.count(),i=[],n=0;n<a;++n)i[n]=n;var o=t.mapDimension("single"),s=yd(i,function(u){return t.get("name",u)}),l=[];return s.buckets.each(function(u,h){u.sort(function(f,v){return t.get(o,f)-t.get(o,v)}),l.push({name:h,indices:u})}),l},e.prototype.getAxisTooltipData=function(t,a,i){W(t)||(t=t?[t]:[]);for(var n=this.getData(),o=this.getLayerSeries(),s=[],l=o.length,u,h=0;h<l;++h){for(var f=Number.MAX_VALUE,v=-1,c=o[h].indices.length,d=0;d<c;++d){var p=n.get(t[0],o[h].indices[d]),g=Math.abs(p-a);g<=f&&(u=p,f=g,v=o[h].indices[d])}s.push(v)}return{dataIndices:s,nestestValue:u}},e.prototype.formatTooltip=function(t,a,i){var n=this.getData(),o=n.getName(t),s=n.get(n.mapDimension("value"),t);return ue("nameValue",{name:o,value:s})},e.type="series.themeRiver",e.dependencies=["singleAxis"],e.defaultOption={z:2,colorBy:"data",coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",fontSize:11},emphasis:{label:{show:!0}}},e}(Ht);function RU(r,e){r.eachSeriesByType("themeRiver",function(t){var a=t.getData(),i=t.coordinateSystem,n={},o=i.getRect();n.rect=o;var s=t.get("boundaryGap"),l=i.getAxis();if(n.boundaryGap=s,l.orient==="horizontal"){s[0]=Z(s[0],o.height),s[1]=Z(s[1],o.height);var u=o.height-s[0]-s[1];JL(a,t,u)}else{s[0]=Z(s[0],o.width),s[1]=Z(s[1],o.width);var h=o.width-s[0]-s[1];JL(a,t,h)}a.setLayout("layoutInfo",n)})}function JL(r,e,t){if(r.count())for(var a=e.coordinateSystem,i=e.getLayerSeries(),n=r.mapDimension("single"),o=r.mapDimension("value"),s=U(i,function(g){return U(g.indices,function(y){var m=a.dataToPoint(r.get(n,y));return m[1]=r.get(o,y),m})}),l=EU(s),u=l.y0,h=t/l.max,f=i.length,v=i[0].indices.length,c,d=0;d<v;++d){c=u[d]*h,r.setItemLayout(i[0].indices[d],{layerIndex:0,x:s[0][d][0],y0:c,y:s[0][d][1]*h});for(var p=1;p<f;++p)c+=s[p-1][d][1]*h,r.setItemLayout(i[p].indices[d],{layerIndex:p,x:s[p][d][0],y0:c,y:s[p][d][1]*h})}}function EU(r){for(var e=r.length,t=r[0].length,a=[],i=[],n=0,o=0;o<t;++o){for(var s=0,l=0;l<e;++l)s+=r[l][o][1];s>n&&(n=s),a.push(s)}for(var u=0;u<t;++u)i[u]=(n-a[u])/2;n=0;for(var h=0;h<t;++h){var f=a[h]+i[h];f>n&&(n=f)}return{y0:i,max:n}}function OU(r){r.registerChartView(IU),r.registerSeriesModel(kU),r.registerLayout(RU),r.registerProcessor(os("themeRiver"))}var NU=2,BU=4,QL=function(r){z(e,r);function e(t,a,i,n){var o=r.call(this)||this;o.z2=NU,o.textConfig={inside:!0},vt(o).seriesIndex=a.seriesIndex;var s=new Lt({z2:BU,silent:t.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,t,a,i,n),o}return e.prototype.updateData=function(t,a,i,n,o){this.node=a,a.piece=this,i=i||this._seriesModel,n=n||this._ecModel;var s=this;vt(s).dataIndex=a.dataIndex;var l=a.getModel(),u=l.getModel("emphasis"),h=a.getLayout(),f=F({},h);f.label=null;var v=a.getVisual("style");v.lineJoin="bevel";var c=a.getVisual("decal");c&&(v.decal=qo(c,o));var d=_a(l.getModel("itemStyle"),f,!0);F(f,d),M(He,function(m){var _=s.ensureState(m),x=l.getModel([m,"itemStyle"]);_.style=x.getItemStyle();var b=_a(x,f);b&&(_.shape=b)}),t?(s.setShape(f),s.shape.r=h.r0,Yt(s,{shape:{r:h.r}},i,a.dataIndex)):(It(s,{shape:f},i),br(s)),s.useStyle(v),this._updateLabel(i);var p=l.getShallow("cursor");p&&s.attr("cursor",p),this._seriesModel=i||this._seriesModel,this._ecModel=n||this._ecModel;var g=u.get("focus"),y=g==="relative"?ks(a.getAncestorsIndices(),a.getDescendantIndices()):g==="ancestor"?a.getAncestorsIndices():g==="descendant"?a.getDescendantIndices():g;Xt(this,y,u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t){var a=this,i=this.node.getModel(),n=i.getModel("label"),o=this.node.getLayout(),s=o.endAngle-o.startAngle,l=(o.startAngle+o.endAngle)/2,u=Math.cos(l),h=Math.sin(l),f=this,v=f.getTextContent(),c=this.node.dataIndex,d=n.get("minAngle")/180*Math.PI,p=n.get("show")&&!(d!=null&&Math.abs(s)<d);v.ignore=!p,M(Js,function(y){var m=y==="normal"?i.getModel("label"):i.getModel([y,"label"]),_=y==="normal",x=_?v:v.ensureState(y),b=t.getFormattedLabel(c,y);_&&(b=b||a.node.name),x.style=Ft(m,{},null,y!=="normal",!0),b&&(x.style.text=b);var S=m.get("show");S!=null&&!_&&(x.ignore=!S);var w=g(m,"position"),T=_?f:f.states[y],C=T.style.fill;T.textConfig={outsideFill:m.get("color")==="inherit"?C:null,inside:w!=="outside"};var A,D=g(m,"distance")||0,I=g(m,"align"),L=g(m,"rotate"),P=Math.PI*.5,k=Math.PI*1.5,R=nr(L==="tangential"?Math.PI/2-l:l),O=R>P&&!Zs(R-P)&&R<k;w==="outside"?(A=o.r+D,I=O?"right":"left"):!I||I==="center"?(s===2*Math.PI&&o.r0===0?A=0:A=(o.r+o.r0)/2,I="center"):I==="left"?(A=o.r0+D,I=O?"right":"left"):I==="right"&&(A=o.r-D,I=O?"left":"right"),x.style.align=I,x.style.verticalAlign=g(m,"verticalAlign")||"middle",x.x=A*u+o.cx,x.y=A*h+o.cy;var E=0;L==="radial"?E=nr(-l)+(O?Math.PI:0):L==="tangential"?E=nr(Math.PI/2-l)+(O?Math.PI:0):Dt(L)&&(E=L*Math.PI/180),x.rotation=nr(E)});function g(y,m){var _=y.get(m);return _??n.get(m)}v.dirtyStyle()},e}(We),Wm="sunburstRootToNode",tI="sunburstHighlight",zU="sunburstUnhighlight";function VU(r){r.registerAction({type:Wm,update:"updateView"},function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},a);function a(i,n){var o=iu(e,[Wm],i);if(o){var s=i.getViewRoot();s&&(e.direction=Gy(s,o.node)?"rollUp":"drillDown"),i.resetViewRoot(o.node)}}}),r.registerAction({type:tI,update:"none"},function(e,t,a){e=F({},e),t.eachComponent({mainType:"series",subType:"sunburst",query:e},i);function i(n){var o=iu(e,[tI],n);o&&(e.dataIndex=o.node.dataIndex)}a.dispatchAction(F(e,{type:"highlight"}))}),r.registerAction({type:zU,update:"updateView"},function(e,t,a){e=F({},e),a.dispatchAction(F(e,{type:"downplay"}))})}var GU=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,i,n){var o=this;this.seriesModel=t,this.api=i,this.ecModel=a;var s=t.getData(),l=s.tree.root,u=t.getViewRoot(),h=this.group,f=t.get("renderLabelForZeroData"),v=[];u.eachNode(function(m){v.push(m)});var c=this._oldChildren||[];d(v,c),y(l,u),this._initEvents(),this._oldChildren=v;function d(m,_){if(m.length===0&&_.length===0)return;new Fa(_,m,x,x).add(b).update(b).remove(pt(b,null)).execute();function x(S){return S.getId()}function b(S,w){var T=S==null?null:m[S],C=w==null?null:_[w];p(T,C)}}function p(m,_){if(!f&&m&&!m.getValue()&&(m=null),m!==l&&_!==l){if(_&&_.piece)m?(_.piece.updateData(!1,m,t,a,i),s.setItemGraphicEl(m.dataIndex,_.piece)):g(_);else if(m){var x=new QL(m,t,a,i);h.add(x),s.setItemGraphicEl(m.dataIndex,x)}}}function g(m){m&&m.piece&&(h.remove(m.piece),m.piece=null)}function y(m,_){_.depth>0?(o.virtualPiece?o.virtualPiece.updateData(!1,m,t,a,i):(o.virtualPiece=new QL(m,t,a,i),h.add(o.virtualPiece)),_.piece.off("click"),o.virtualPiece.on("click",function(x){o._rootToNode(_.parentNode)})):o.virtualPiece&&(h.remove(o.virtualPiece),o.virtualPiece=null)}},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",function(a){var i=!1,n=t.seriesModel.getViewRoot();n.eachNode(function(o){if(!i&&o.piece&&o.piece===a.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")t._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var h=l.get("target",!0)||"_blank";Kh(u,h)}}i=!0}})})},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:Wm,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,a){var i=a.getData(),n=i.getItemLayout(0);if(n){var o=t[0]-n.cx,s=t[1]-n.cy,l=Math.sqrt(o*o+s*s);return l<=n.r&&l>=n.r0}},e.type="sunburst",e}(zt),FU=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t,a){var i={name:t.name,children:t.data};eI(i);var n=this._levelModels=U(t.levels||[],function(l){return new Ct(l,this,a)},this),o=Vy.createTree(i,this,s);function s(l){l.wrapMethod("getItemModel",function(u,h){var f=o.getNodeByDataIndex(h),v=n[f.depth];return v&&(u.parentModel=v),u})}return o.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(t){var a=r.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return a.treePathInfo=lv(i,this),a},e.prototype.getLevelModel=function(t){return this._levelModels&&this._levelModels[t.depth]},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var a=this.getRawData().tree.root;(!t||t!==a&&!a.contains(t))&&(this._viewRoot=a)},e.prototype.enableAriaDecal=function(){lD(this)},e.type="series.sunburst",e.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},e}(Ht);function eI(r){var e=0;M(r.children,function(a){eI(a);var i=a.value;W(i)&&(i=i[0]),e+=i});var t=r.value;W(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),W(r.value)?r.value[0]=t:r.value=t}var rI=Math.PI/180;function HU(r,e,t){e.eachSeriesByType(r,function(a){var i=a.get("center"),n=a.get("radius");W(n)||(n=[0,n]),W(i)||(i=[i,i]);var o=t.getWidth(),s=t.getHeight(),l=Math.min(o,s),u=Z(i[0],o),h=Z(i[1],s),f=Z(n[0],l/2),v=Z(n[1],l/2),c=-a.get("startAngle")*rI,d=a.get("minAngle")*rI,p=a.getData().tree.root,g=a.getViewRoot(),y=g.depth,m=a.get("sort");m!=null&&aI(g,m);var _=0;M(g.children,function(R){!isNaN(R.getValue())&&_++});var x=g.getValue(),b=Math.PI/(x||_)*2,S=g.depth>0,w=g.height-(S?-1:1),T=(v-f)/(w||1),C=a.get("clockwise"),A=a.get("stillShowZeroSum"),D=C?1:-1,I=function(R,O){if(R){var E=O;if(R!==p){var N=R.getValue(),V=x===0&&A?b:N*b;V<d&&(V=d),E=O+D*V;var G=R.depth-y-(S?-1:1),H=f+T*G,Y=f+T*(G+1),q=a.getLevelModel(R);if(q){var it=q.get("r0",!0),xt=q.get("r",!0),At=q.get("radius",!0);At!=null&&(it=At[0],xt=At[1]),it!=null&&(H=Z(it,l/2)),xt!=null&&(Y=Z(xt,l/2))}R.setLayout({angle:V,startAngle:O,endAngle:E,clockwise:C,cx:u,cy:h,r0:H,r:Y})}if(R.children&&R.children.length){var ut=0;M(R.children,function(tt){ut+=I(tt,O+ut)})}return E-O}};if(S){var L=f,P=f+T,k=Math.PI*2;p.setLayout({angle:k,startAngle:c,endAngle:c+k,clockwise:C,cx:u,cy:h,r0:L,r:P})}I(g,c)})}function aI(r,e){var t=r.children||[];r.children=WU(t,e),t.length&&M(r.children,function(a){aI(a,e)})}function WU(r,e){if(rt(e)){var t=U(r,function(i,n){var o=i.getValue();return{params:{depth:i.depth,height:i.height,dataIndex:i.dataIndex,getValue:function(){return o}},index:n}});return t.sort(function(i,n){return e(i.params,n.params)}),U(t,function(i){return r[i.index]})}else{var a=e==="asc";return r.sort(function(i,n){var o=(i.getValue()-n.getValue())*(a?1:-1);return o===0?(i.dataIndex-n.dataIndex)*(a?-1:1):o})}}function UU(r){var e={};function t(a,i,n){if(a.depth===0)return B.color.neutral50;for(var o=a;o&&o.depth>1;)o=o.parentNode;var s=i.getColorFromPalette(o.name||o.dataIndex+"",e);return a.depth>1&&$(s)&&(s=Gc(s,(a.depth-1)/(n-1)*.5)),s}r.eachSeriesByType("sunburst",function(a){var i=a.getData(),n=i.tree;n.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=t(o,a,n.root.height));var u=i.ensureUniqueItemVisual(o.dataIndex,"style");F(u,l)})})}function YU(r){r.registerChartView(GU),r.registerSeriesModel(FU),r.registerLayout(pt(HU,"sunburst")),r.registerProcessor(pt(os,"sunburst")),r.registerVisual(UU),VU(r)}var iI={color:"fill",borderColor:"stroke"},ZU={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},$a=St(),$U=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(t,a){return Ha(null,this)},e.prototype.getDataParams=function(t,a,i){var n=r.prototype.getDataParams.call(this,t,a);return i&&(n.info=$a(i).info),n},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(Ht);function XU(r,e){return e=e||[0,0],U(["x","y"],function(t,a){var i=this.getAxis(t),n=e[a],o=r[a]/2;return i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(n-o)-i.dataToCoord(n+o))},this)}function qU(r){var e=r.master.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:X(XU,r)}}}function KU(r,e){return e=e||[0,0],U([0,1],function(t){var a=e[t],i=r[t]/2,n=[],o=[];return n[t]=a-i,o[t]=a+i,n[1-t]=o[1-t]=e[1-t],Math.abs(this.dataToPoint(n)[t]-this.dataToPoint(o)[t])},this)}function jU(r){var e=r.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:r.getZoom()},api:{coord:function(t){return r.dataToPoint(t)},size:X(KU,r)}}}function JU(r,e){var t=this.getAxis(),a=e instanceof Array?e[0]:e,i=(r instanceof Array?r[0]:r)/2;return t.type==="category"?t.getBandWidth():Math.abs(t.dataToCoord(a-i)-t.dataToCoord(a+i))}function QU(r){var e=r.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:X(JU,r)}}}function tY(r,e){return e=e||[0,0],U(["Radius","Angle"],function(t,a){var i="get"+t+"Axis",n=this[i](),o=e[a],s=r[a]/2,l=n.type==="category"?n.getBandWidth():Math.abs(n.dataToCoord(o-s)-n.dataToCoord(o+s));return t==="Angle"&&(l=l*Math.PI/180),l},this)}function eY(r){var e=r.getRadiusAxis(),t=r.getAngleAxis(),a=e.getExtent();return a[0]>a[1]&&a.reverse(),{coordSys:{type:"polar",cx:r.cx,cy:r.cy,r:a[1],r0:a[0]},api:{coord:function(i){var n=e.dataToRadius(i[0]),o=t.dataToAngle(i[1]),s=r.coordToPoint([n,o]);return s.push(n,o*Math.PI/180),s},size:X(tY,r)}}}function rY(r){var e=r.getRect(),t=r.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:r.getCellWidth(),cellHeight:r.getCellHeight(),rangeInfo:{start:t.start,end:t.end,weeks:t.weeks,dayCount:t.allDay}},api:{coord:function(a,i){return r.dataToPoint(a,i)},layout:function(a,i){return r.dataToLayout(a,i)}}}}function aY(r){var e=r.getRect();return{coordSys:{type:"matrix",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t,a){return r.dataToPoint(t,a)},layout:function(t,a){return r.dataToLayout(t,a)}}}}function nI(r,e,t,a){return r&&(r.legacy||r.legacy!==!1&&!t&&!a&&e!=="tspan"&&(e==="text"||K(r,"text")))}function oI(r,e,t){var a=r,i,n,o;if(e==="text")o=a;else{o={},K(a,"text")&&(o.text=a.text),K(a,"rich")&&(o.rich=a.rich),K(a,"textFill")&&(o.fill=a.textFill),K(a,"textStroke")&&(o.stroke=a.textStroke),K(a,"fontFamily")&&(o.fontFamily=a.fontFamily),K(a,"fontSize")&&(o.fontSize=a.fontSize),K(a,"fontStyle")&&(o.fontStyle=a.fontStyle),K(a,"fontWeight")&&(o.fontWeight=a.fontWeight),n={type:"text",style:o,silent:!0},i={};var s=K(a,"textPosition");t?i.position=s?a.textPosition:"inside":s&&(i.position=a.textPosition),K(a,"textPosition")&&(i.position=a.textPosition),K(a,"textOffset")&&(i.offset=a.textOffset),K(a,"textRotation")&&(i.rotation=a.textRotation),K(a,"textDistance")&&(i.distance=a.textDistance)}return sI(o,r),M(o.rich,function(l){sI(l,l)}),{textConfig:i,textContent:n}}function sI(r,e){e&&(e.font=e.textFont||e.font,K(e,"textStrokeWidth")&&(r.lineWidth=e.textStrokeWidth),K(e,"textAlign")&&(r.align=e.textAlign),K(e,"textVerticalAlign")&&(r.verticalAlign=e.textVerticalAlign),K(e,"textLineHeight")&&(r.lineHeight=e.textLineHeight),K(e,"textWidth")&&(r.width=e.textWidth),K(e,"textHeight")&&(r.height=e.textHeight),K(e,"textBackgroundColor")&&(r.backgroundColor=e.textBackgroundColor),K(e,"textPadding")&&(r.padding=e.textPadding),K(e,"textBorderColor")&&(r.borderColor=e.textBorderColor),K(e,"textBorderWidth")&&(r.borderWidth=e.textBorderWidth),K(e,"textBorderRadius")&&(r.borderRadius=e.textBorderRadius),K(e,"textBoxShadowColor")&&(r.shadowColor=e.textBoxShadowColor),K(e,"textBoxShadowBlur")&&(r.shadowBlur=e.textBoxShadowBlur),K(e,"textBoxShadowOffsetX")&&(r.shadowOffsetX=e.textBoxShadowOffsetX),K(e,"textBoxShadowOffsetY")&&(r.shadowOffsetY=e.textBoxShadowOffsetY))}function lI(r,e,t){var a=r;a.textPosition=a.textPosition||t.position||"inside",t.offset!=null&&(a.textOffset=t.offset),t.rotation!=null&&(a.textRotation=t.rotation),t.distance!=null&&(a.textDistance=t.distance);var i=a.textPosition.indexOf("inside")>=0,n=r.fill||B.color.neutral99;uI(a,e);var o=a.textFill==null;return i?o&&(a.textFill=t.insideFill||B.color.neutral00,!a.textStroke&&t.insideStroke&&(a.textStroke=t.insideStroke),!a.textStroke&&(a.textStroke=n),a.textStrokeWidth==null&&(a.textStrokeWidth=2)):(o&&(a.textFill=r.fill||t.outsideFill||B.color.neutral00),!a.textStroke&&t.outsideStroke&&(a.textStroke=t.outsideStroke)),a.text=e.text,a.rich=e.rich,M(e.rich,function(s){uI(s,s)}),a}function uI(r,e){e&&(K(e,"fill")&&(r.textFill=e.fill),K(e,"stroke")&&(r.textStroke=e.fill),K(e,"lineWidth")&&(r.textStrokeWidth=e.lineWidth),K(e,"font")&&(r.font=e.font),K(e,"fontStyle")&&(r.fontStyle=e.fontStyle),K(e,"fontWeight")&&(r.fontWeight=e.fontWeight),K(e,"fontSize")&&(r.fontSize=e.fontSize),K(e,"fontFamily")&&(r.fontFamily=e.fontFamily),K(e,"align")&&(r.textAlign=e.align),K(e,"verticalAlign")&&(r.textVerticalAlign=e.verticalAlign),K(e,"lineHeight")&&(r.textLineHeight=e.lineHeight),K(e,"width")&&(r.textWidth=e.width),K(e,"height")&&(r.textHeight=e.height),K(e,"backgroundColor")&&(r.textBackgroundColor=e.backgroundColor),K(e,"padding")&&(r.textPadding=e.padding),K(e,"borderColor")&&(r.textBorderColor=e.borderColor),K(e,"borderWidth")&&(r.textBorderWidth=e.borderWidth),K(e,"borderRadius")&&(r.textBorderRadius=e.borderRadius),K(e,"shadowColor")&&(r.textBoxShadowColor=e.shadowColor),K(e,"shadowBlur")&&(r.textBoxShadowBlur=e.shadowBlur),K(e,"shadowOffsetX")&&(r.textBoxShadowOffsetX=e.shadowOffsetX),K(e,"shadowOffsetY")&&(r.textBoxShadowOffsetY=e.shadowOffsetY),K(e,"textShadowColor")&&(r.textShadowColor=e.textShadowColor),K(e,"textShadowBlur")&&(r.textShadowBlur=e.textShadowBlur),K(e,"textShadowOffsetX")&&(r.textShadowOffsetX=e.textShadowOffsetX),K(e,"textShadowOffsetY")&&(r.textShadowOffsetY=e.textShadowOffsetY))}var hI={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},fI=Mt(hI);Xr(Qr,function(r,e){return r[e]=1,r},{}),Qr.join(", ");var Sv=["","style","shape","extra"],ms=St();function Um(r,e,t,a,i){var n=r+"Animation",o=ko(r,a,i)||{},s=ms(e).userDuring;return o.duration>0&&(o.during=s?X(lY,{el:e,userDuring:s}):null,o.setToFinal=!0,o.scope=r),F(o,t[n]),o}function bv(r,e,t,a){a=a||{};var i=a.dataIndex,n=a.isInit,o=a.clearStyle,s=t.isAnimationEnabled(),l=ms(r),u=e.style;l.userDuring=e.during;var h={},f={};if(hY(r,e,f),r.type==="compound")for(var v=r.shape.paths,c=e.shape.paths,d=0;d<c.length;d++){var p=c[d];Ym("shape",p,v[d])}else Ym("shape",e,f),Ym("extra",e,f);if(!n&&s&&(uY(r,e,h),cI("shape",r,e,h),cI("extra",r,e,h),fY(r,e,u,h)),f.style=u,iY(r,f,o),oY(r,e),s)if(n){var g={};M(Sv,function(m){var _=m?e[m]:e;_&&_.enterFrom&&(m&&(g[m]=g[m]||{}),F(m?g[m]:g,_.enterFrom))});var y=Um("enter",r,e,t,i);y.duration>0&&r.animateFrom(g,y)}else nY(r,e,i||0,t,h);vI(r,e),u?r.dirty():r.markRedraw()}function vI(r,e){for(var t=ms(r).leaveToProps,a=0;a<Sv.length;a++){var i=Sv[a],n=i?e[i]:e;n&&n.leaveTo&&(t||(t=ms(r).leaveToProps={}),i&&(t[i]=t[i]||{}),F(i?t[i]:t,n.leaveTo))}}function wv(r,e,t,a){if(r){var i=r.parent,n=ms(r).leaveToProps;if(n){var o=Um("update",r,e,t,0);o.done=function(){i&&i.remove(r),a&&a()},r.animateTo(n,o)}else i&&i.remove(r),a&&a()}}function ro(r){return r==="all"}function iY(r,e,t){var a=e.style;if(!r.isGroup&&a){if(t){r.useStyle({});for(var i=r.animators,n=0;n<i.length;n++){var o=i[n];o.targetName==="style"&&o.changeTarget(r.style)}}r.setStyle(a)}e&&(e.style=null,e&&r.attr(e),e.style=a)}function nY(r,e,t,a,i){if(i){var n=Um("update",r,e,a,t);n.duration>0&&r.animateFrom(i,n)}}function oY(r,e){K(e,"silent")&&(r.silent=e.silent),K(e,"ignore")&&(r.ignore=e.ignore),r instanceof _r&&K(e,"invisible")&&(r.invisible=e.invisible),r instanceof bt&&K(e,"autoBatch")&&(r.autoBatch=e.autoBatch)}var xa={},sY={setTransform:function(r,e){return xa.el[r]=e,this},getTransform:function(r){return xa.el[r]},setShape:function(r,e){var t=xa.el,a=t.shape||(t.shape={});return a[r]=e,t.dirtyShape&&t.dirtyShape(),this},getShape:function(r){var e=xa.el.shape;if(e)return e[r]},setStyle:function(r,e){var t=xa.el,a=t.style;return a&&(a[r]=e,t.dirtyStyle&&t.dirtyStyle()),this},getStyle:function(r){var e=xa.el.style;if(e)return e[r]},setExtra:function(r,e){var t=xa.el.extra||(xa.el.extra={});return t[r]=e,this},getExtra:function(r){var e=xa.el.extra;if(e)return e[r]}};function lY(){var r=this,e=r.el;if(e){var t=ms(e).userDuring,a=r.userDuring;if(t!==a){r.el=r.userDuring=null;return}xa.el=e,a(sY)}}function cI(r,e,t,a){var i=t[r];if(i){var n=e[r],o;if(n){var s=t.transition,l=i.transition;if(l)if(!o&&(o=a[r]={}),ro(l))F(o,n);else for(var u=Vt(l),h=0;h<u.length;h++){var f=u[h],v=n[f];o[f]=v}else if(ro(s)||gt(s,r)>=0){!o&&(o=a[r]={});for(var c=Mt(n),h=0;h<c.length;h++){var f=c[h],v=n[f];vY(i[f],v)&&(o[f]=v)}}}}}function Ym(r,e,t){var a=e[r];if(a)for(var i=t[r]={},n=Mt(a),o=0;o<n.length;o++){var s=n[o];i[s]=Hs(a[s])}}function uY(r,e,t){for(var a=e.transition,i=ro(a)?Qr:Vt(a||[]),n=0;n<i.length;n++){var o=i[n];if(!(o==="style"||o==="shape"||o==="extra")){var s=r[o];t[o]=s}}}function hY(r,e,t){for(var a=0;a<fI.length;a++){var i=fI[a],n=hI[i],o=e[i];o&&(t[n[0]]=o[0],t[n[1]]=o[1])}for(var a=0;a<Qr.length;a++){var s=Qr[a];e[s]!=null&&(t[s]=e[s])}}function fY(r,e,t,a){if(t){var i=r.style,n;if(i){var o=t.transition,s=e.transition;if(o&&!ro(o)){var l=Vt(o);!n&&(n=a.style={});for(var u=0;u<l.length;u++){var h=l[u],f=i[h];n[h]=f}}else if(r.getAnimationStyleProps&&(ro(s)||ro(o)||gt(s,"style")>=0)){var v=r.getAnimationStyleProps(),c=v?v.style:null;if(c){!n&&(n=a.style={});for(var d=Mt(t),u=0;u<d.length;u++){var h=d[u];if(c[h]){var f=i[h];n[h]=f}}}}}}}function vY(r,e){return ke(r)?r!==e:r!=null&&isFinite(r)}var dI=St(),cY=["percent","easing","shape","style","extra"];function pI(r){r.stopAnimation("keyframe"),r.attr(dI(r))}function Tv(r,e,t){if(!(!t.isAnimationEnabled()||!e)){if(W(e)){M(e,function(s){Tv(r,s,t)});return}var a=e.keyframes,i=e.duration;if(t&&i==null){var n=ko("enter",t,0);i=n&&n.duration}if(!(!a||!i)){var o=dI(r);M(Sv,function(s){if(!(s&&!r[s])){var l;a.sort(function(u,h){return u.percent-h.percent}),M(a,function(u){var h=r.animators,f=s?u[s]:u;if(f){var v=Mt(f);if(s||(v=Et(v,function(p){return gt(cY,p)<0})),!!v.length){l||(l=r.animate(s,e.loop,!0),l.scope="keyframe");for(var c=0;c<h.length;c++)h[c]!==l&&h[c].targetName===l.targetName&&h[c].stopTracks(v);s&&(o[s]=o[s]||{});var d=s?o[s]:o;M(v,function(p){d[p]=((s?r[s]:r)||{})[p]}),l.whenWithKeys(i*u.percent,f,v,u.easing)}}}),l&&l.delay(e.delay||0).duration(i).start(e.easing)}})}}}var Xa="emphasis",Ei="normal",Zm="blur",$m="select",Oi=[Ei,Xa,Zm,$m],Xm={normal:["itemStyle"],emphasis:[Xa,"itemStyle"],blur:[Zm,"itemStyle"],select:[$m,"itemStyle"]},qm={normal:["label"],emphasis:[Xa,"label"],blur:[Zm,"label"],select:[$m,"label"]},dY=["x","y"],pY="e\0\0",Lr={normal:{},emphasis:{},blur:{},select:{}},gY={cartesian2d:qU,geo:jU,single:QU,polar:eY,calendar:rY,matrix:aY};function Km(r){return r instanceof bt}function jm(r){return r instanceof _r}function yY(r,e){e.copyTransform(r),jm(e)&&jm(r)&&(e.setStyle(r.style),e.z=r.z,e.z2=r.z2,e.zlevel=r.zlevel,e.invisible=r.invisible,e.ignore=r.ignore,Km(e)&&Km(r)&&e.setShape(r.shape))}var mY=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,i,n){this._progressiveEls=null;var o=this._data,s=t.getData(),l=this.group,u=yI(t,s,a,i);o||l.removeAll(),s.diff(o).add(function(f){t0(i,null,f,u(f,n),t,l,s)}).remove(function(f){var v=o.getItemGraphicEl(f);v&&wv(v,$a(v).option,t)}).update(function(f,v){var c=o.getItemGraphicEl(v);t0(i,c,f,u(f,n),t,l,s)}).execute();var h=t.get("clip",!0)?Yl(t.coordinateSystem,!1,t):null;h?l.setClipPath(h):l.removeClipPath(),this._data=s},e.prototype.incrementalPrepareRender=function(t,a,i){this.group.removeAll(),this._data=null},e.prototype.incrementalRender=function(t,a,i,n,o){var s=a.getData(),l=yI(a,s,i,n),u=this._progressiveEls=[];function h(c){c.isGroup||(c.incremental=!0,c.ensureState("emphasis").hoverLayer=!0)}for(var f=t.start;f<t.end;f++){var v=t0(null,null,f,l(f,o),a,this.group,s);v&&(v.traverse(h),u.push(v))}},e.prototype.eachRendered=function(t){gi(this._progressiveEls||this.group,t)},e.prototype.filterForExposedEvent=function(t,a,i,n){var o=a.element;if(o==null||i.name===o)return!0;for(;(i=i.__hostTarget||i.parent)&&i!==this.group;)if(i.name===o)return!0;return!1},e.type="custom",e}(zt);function Jm(r){var e=r.type,t;if(e==="path"){var a=r.shape,i=a.width!=null&&a.height!=null?{x:a.x||0,y:a.y||0,width:a.width,height:a.height}:null,n=bI(a);t=al(n,null,i,a.layout||"center"),$a(t).customPathData=n}else if(e==="image")t=new Me({}),$a(t).customImagePath=r.style.image;else if(e==="text")t=new Lt({});else if(e==="group")t=new et;else if(e==="compoundPath"){var a=r.shape;if(!a||!a.paths){var o="";Rt(o)}var s=U(a.paths,function(h){if(h.type==="path")return al(h.shape.pathData,h,null);var f=zh(h.type);if(!f){var v="";Rt(v)}return new f});t=new Eh({shape:{paths:s}})}else{var l=zh(e);if(!l){var o="";Rt(o)}t=new l}return $a(t).customGraphicType=e,t.name=r.name,t.z2EmphasisLift=1,t.z2SelectLift=1,t}function Qm(r,e,t,a,i,n,o){pI(e);var s=i&&i.normal.cfg;s&&e.setTextConfig(s),a&&a.transition==null&&(a.transition=dY);var l=a&&a.style;if(l){if(e.type==="text"){var u=l;K(u,"textFill")&&(u.fill=u.textFill),K(u,"textStroke")&&(u.stroke=u.textStroke)}var h=void 0,f=Km(e)?l.decal:null;r&&f&&(f.dirty=!0,h=qo(f,r)),l.__decalPattern=h}if(jm(e)&&l){var h=l.__decalPattern;h&&(l.decal=h)}bv(e,a,n,{dataIndex:t,isInit:o,clearStyle:!0}),Tv(e,a.keyframeAnimation,n)}function gI(r,e,t,a,i){var n=e.isGroup?null:e,o=i&&i[r].cfg;if(n){var s=n.ensureState(r);if(a===!1){var l=n.getState(r);l&&(l.style=null)}else s.style=a||null;o&&(s.textConfig=o),cn(n)}}function _Y(r,e,t){if(!r.isGroup){var a=r,i=t.currentZ,n=t.currentZLevel;a.z=i,a.zlevel=n;var o=e.z2;o!=null&&(a.z2=o||0);for(var s=0;s<Oi.length;s++)xY(a,e,Oi[s])}}function xY(r,e,t){var a=t===Ei,i=a?e:Cv(e,t),n=i?i.z2:null,o;n!=null&&(o=a?r:r.ensureState(t),o.z2=n||0)}function yI(r,e,t,a){var i=r.get("renderItem");if(typeof i=="string"){var n=I5(i);n&&(i=n)}var o=r.coordinateSystem,s={};o&&(s=o.prepareCustoms?o.prepareCustoms(o):gY[o.type](o));for(var l=st({getWidth:a.getWidth,getHeight:a.getHeight,getZr:a.getZr,getDevicePixelRatio:a.getDevicePixelRatio,value:b,style:w,ordinalRawValue:S,styleEmphasis:T,visual:D,barLayout:I,currentSeriesIndices:L,font:P},s.api||{}),u={context:{},seriesId:r.id,seriesName:r.name,seriesIndex:r.seriesIndex,coordSys:s.coordSys,dataInsideLength:e.count(),encode:SY(r.getData()),itemPayload:r.get("itemPayload")||{}},h,f,v={},c={},d={},p={},g=0;g<Oi.length;g++){var y=Oi[g];d[y]=r.getModel(Xm[y]),p[y]=r.getModel(qm[y])}function m(k){return k===h?f||(f=e.getItemModel(k)):e.getItemModel(k)}function _(k,R){return e.hasItemOption?k===h?v[R]||(v[R]=m(k).getModel(Xm[R])):m(k).getModel(Xm[R]):d[R]}function x(k,R){return e.hasItemOption?k===h?c[R]||(c[R]=m(k).getModel(qm[R])):m(k).getModel(qm[R]):p[R]}return function(k,R){return h=k,f=null,v={},c={},i&&i(st({dataIndexInside:k,dataIndex:e.getRawIndex(k),actionType:R?R.type:null},u),l)};function b(k,R){return R==null&&(R=h),e.getStore().get(e.getDimensionIndex(k||0),R)}function S(k,R){R==null&&(R=h),k=k||0;var O=e.getDimensionInfo(k);if(!O){var E=e.getDimensionIndex(k);return E>=0?e.getStore().get(E,R):void 0}var N=e.get(O.name,R),V=O&&O.ordinalMeta;return V?V.categories[N]:N}function w(k,R){R==null&&(R=h);var O=e.getItemVisual(R,"style"),E=O&&O.fill,N=O&&O.opacity,V=_(R,Ei).getItemStyle();E!=null&&(V.fill=E),N!=null&&(V.opacity=N);var G={inheritColor:$(E)?E:B.color.neutral99},H=x(R,Ei),Y=Ft(H,null,G,!1,!0);Y.text=H.getShallow("show")?Q(r.getFormattedLabel(R,Ei),ns(e,R)):null;var q=Uh(H,G,!1);return A(k,V),V=lI(V,Y,q),k&&C(V,k),V.legacy=!0,V}function T(k,R){R==null&&(R=h);var O=_(R,Xa).getItemStyle(),E=x(R,Xa),N=Ft(E,null,null,!0,!0);N.text=E.getShallow("show")?er(r.getFormattedLabel(R,Xa),r.getFormattedLabel(R,Ei),ns(e,R)):null;var V=Uh(E,null,!0);return A(k,O),O=lI(O,N,V),k&&C(O,k),O.legacy=!0,O}function C(k,R){for(var O in R)K(R,O)&&(k[O]=R[O])}function A(k,R){k&&(k.textFill&&(R.textFill=k.textFill),k.textPosition&&(R.textPosition=k.textPosition))}function D(k,R){if(R==null&&(R=h),K(iI,k)){var O=e.getItemVisual(R,"style");return O?O[iI[k]]:null}if(K(ZU,k))return e.getItemVisual(R,k)}function I(k){if(o.type==="cartesian2d"){var R=o.getBaseAxis();return LV(st({axis:R},k))}}function L(){return t.getCurrentSeriesIndices()}function P(k){return fp(k,t)}}function SY(r){var e={};return M(r.dimensions,function(t){var a=r.getDimensionInfo(t);if(!a.isExtraCoord){var i=a.coordDim,n=e[i]=e[i]||[];n[a.coordDimIndex]=r.getDimensionIndex(t)}}),e}function t0(r,e,t,a,i,n,o){if(!a){n.remove(e);return}var s=e0(r,e,t,a,i,n);return s&&o.setItemGraphicEl(t,s),s&&Xt(s,a.focus,a.blurScope,a.emphasisDisabled),s}function e0(r,e,t,a,i,n){var o=-1,s=e;e&&mI(e,a,i)&&(o=gt(n.childrenRef(),e),e=null);var l=!e,u=e;u?u.clearStates():(u=Jm(a),s&&yY(s,u)),a.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),a.tooltipDisabled&&(u.tooltipDisabled=!0),Lr.normal.cfg=Lr.normal.conOpt=Lr.emphasis.cfg=Lr.emphasis.conOpt=Lr.blur.cfg=Lr.blur.conOpt=Lr.select.cfg=Lr.select.conOpt=null,Lr.isLegacy=!1,wY(u,t,a,i,l,Lr),bY(u,t,a,i,l),Qm(r,u,t,a,Lr,i,l),K(a,"info")&&($a(u).info=a.info);for(var h=0;h<Oi.length;h++){var f=Oi[h];if(f!==Ei){var v=Cv(a,f),c=r0(a,v,f);gI(f,u,v,c,Lr)}}return _Y(u,a,i),a.type==="group"&&TY(r,u,t,a,i),o>=0?n.replaceAt(u,o):n.add(u),u}function mI(r,e,t){var a=$a(r),i=e.type,n=e.shape,o=e.style;return t.isUniversalTransitionEnabled()||i!=null&&i!==a.customGraphicType||i==="path"&&DY(n)&&bI(n)!==a.customPathData||i==="image"&&K(o,"image")&&o.image!==a.customImagePath}function bY(r,e,t,a,i){var n=t.clipPath;if(n===!1)r&&r.getClipPath()&&r.removeClipPath();else if(n){var o=r.getClipPath();o&&mI(o,n,a)&&(o=null),o||(o=Jm(n),r.setClipPath(o)),Qm(null,o,e,n,null,a,i)}}function wY(r,e,t,a,i,n){if(!(r.isGroup||r.type==="compoundPath")){_I(t,null,n),_I(t,Xa,n);var o=n.normal.conOpt,s=n.emphasis.conOpt,l=n.blur.conOpt,u=n.select.conOpt;if(o!=null||s!=null||u!=null||l!=null){var h=r.getTextContent();if(o===!1)h&&r.removeTextContent();else{o=n.normal.conOpt=o||{type:"text"},h?h.clearStates():(h=Jm(o),r.setTextContent(h)),Qm(null,h,e,o,null,a,i);for(var f=o&&o.style,v=0;v<Oi.length;v++){var c=Oi[v];if(c!==Ei){var d=n[c].conOpt;gI(c,h,d,r0(o,d,c),null)}}f?h.dirty():h.markRedraw()}}}}function _I(r,e,t){var a=e?Cv(r,e):r,i=e?r0(r,a,Xa):r.style,n=r.type,o=a?a.textConfig:null,s=r.textContent,l=s?e?Cv(s,e):s:null;if(i&&(t.isLegacy||nI(i,n,!!o,!!l))){t.isLegacy=!0;var u=oI(i,n,!e);!o&&u.textConfig&&(o=u.textConfig),!l&&u.textContent&&(l=u.textContent)}if(!e&&l){var h=l;!h.type&&(h.type="text")}var f=e?t[e]:t.normal;f.cfg=o,f.conOpt=l}function Cv(r,e){return e?r?r[e]:null:r}function r0(r,e,t){var a=e&&e.style;return a==null&&t===Xa&&r&&(a=r.styleEmphasis),a}function TY(r,e,t,a,i){var n=a.children,o=n?n.length:0,s=a.$mergeChildren,l=s==="byName"||a.diffChildrenByName,u=s===!1;if(!(!o&&!l&&!u)){if(l){AY({api:r,oldChildren:e.children()||[],newChildren:n||[],dataIndex:t,seriesModel:i,group:e});return}u&&e.removeAll();for(var h=0;h<o;h++){var f=n[h],v=e.childAt(h);f?(f.ignore==null&&(f.ignore=!1),e0(r,v,t,f,i,e)):v.ignore=!0}for(var c=e.childCount()-1;c>=h;c--){var d=e.childAt(c);CY(e,d,i)}}}function CY(r,e,t){e&&wv(e,$a(r).option,t)}function AY(r){new Fa(r.oldChildren,r.newChildren,xI,xI,r).add(SI).update(SI).remove(MY).execute()}function xI(r,e){var t=r&&r.name;return t??pY+e}function SI(r,e){var t=this.context,a=r!=null?t.newChildren[r]:null,i=e!=null?t.oldChildren[e]:null;e0(t.api,i,t.dataIndex,a,t.seriesModel,t.group)}function MY(r){var e=this.context,t=e.oldChildren[r];t&&wv(t,$a(t).option,e.seriesModel)}function bI(r){return r&&(r.pathData||r.d)}function DY(r){return r&&(K(r,"pathData")||K(r,"d"))}function LY(r){r.registerChartView(mY),r.registerSeriesModel($U)}var ao=St(),wI=at,a0=X,i0=function(){function r(){this._dragging=!1,this.animationThreshold=15}return r.prototype.render=function(e,t,a,i){var n=t.get("value"),o=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=a,!(!i&&this._lastValue===n&&this._lastStatus===o)){this._lastValue=n,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,n,e,t,a);var h=u.graphicKey;h!==this._lastGraphicKey&&this.clear(a),this._lastGraphicKey=h;var f=this._moveAnimation=this.determineAnimation(e,t);if(!s)s=this._group=new et,this.createPointerEl(s,u,e,t),this.createLabelEl(s,u,e,t),a.getZr().add(s);else{var v=pt(TI,t,f);this.updatePointerEl(s,u,v),this.updateLabelEl(s,u,v,t)}MI(s,t,!0),this._renderHandle(n)}},r.prototype.remove=function(e){this.clear(e)},r.prototype.dispose=function(e){this.clear(e)},r.prototype.determineAnimation=function(e,t){var a=t.get("animation"),i=e.axis,n=i.type==="category",o=t.get("snap");if(!o&&!n)return!1;if(a==="auto"||a==null){var s=this.animationThreshold;if(n&&i.getBandWidth()>s)return!0;if(o){var l=wy(e).seriesDataCount,u=i.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return a===!0},r.prototype.makeElOption=function(e,t,a,i,n){},r.prototype.createPointerEl=function(e,t,a,i){var n=t.pointer;if(n){var o=ao(e).pointerEl=new bn[n.type](wI(t.pointer));e.add(o)}},r.prototype.createLabelEl=function(e,t,a,i){if(t.label){var n=ao(e).labelEl=new Lt(wI(t.label));e.add(n),AI(n,i)}},r.prototype.updatePointerEl=function(e,t,a){var i=ao(e).pointerEl;i&&t.pointer&&(i.setStyle(t.pointer.style),a(i,{shape:t.pointer.shape}))},r.prototype.updateLabelEl=function(e,t,a,i){var n=ao(e).labelEl;n&&(n.setStyle(t.label.style),a(n,{x:t.label.x,y:t.label.y}),AI(n,i))},r.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var t=this._axisPointerModel,a=this._api.getZr(),i=this._handle,n=t.getModel("handle"),o=t.get("status");if(!n.get("show")||!o||o==="hide"){i&&a.remove(i),this._handle=null;return}var s;this._handle||(s=!0,i=this._handle=nl(n.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){Da(u.event)},onmousedown:a0(this._onHandleDragMove,this,0,0),drift:a0(this._onHandleDragMove,this),ondragend:a0(this._onHandleDragEnd,this)}),a.add(i)),MI(i,t,!1),i.setStyle(n.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=n.get("size");W(l)||(l=[l,l]),i.scaleX=l[0]/2,i.scaleY=l[1]/2,Yo(this,"_doDispatchAxisPointer",n.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,s)}},r.prototype._moveHandleToValue=function(e,t){TI(this._axisPointerModel,!t&&this._moveAnimation,this._handle,n0(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},r.prototype._onHandleDragMove=function(e,t){var a=this._handle;if(a){this._dragging=!0;var i=this.updateHandleTransform(n0(a),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=i,a.stopAnimation(),a.attr(n0(i)),ao(a).lastProp=null,this._doDispatchAxisPointer()}},r.prototype._doDispatchAxisPointer=function(){var e=this._handle;if(e){var t=this._payloadInfo,a=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:a.axis.dim,axisIndex:a.componentIndex}]})}},r.prototype._onHandleDragEnd=function(){this._dragging=!1;var e=this._handle;if(e){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},r.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),a=this._group,i=this._handle;t&&a&&(this._lastGraphicKey=null,a&&t.remove(a),i&&t.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),xl(this,"_doDispatchAxisPointer")},r.prototype.doClear=function(){},r.prototype.buildLabel=function(e,t,a){return a=a||0,{x:e[a],y:e[1-a],width:t[a],height:t[1-a]}},r}();function TI(r,e,t,a){CI(ao(t).lastProp,a)||(ao(t).lastProp=a,e?It(t,a,r):(t.stopAnimation(),t.attr(a)))}function CI(r,e){if(lt(r)&&lt(e)){var t=!0;return M(e,function(a,i){t=t&&CI(r[i],a)}),!!t}else return r===e}function AI(r,e){r[e.get(["label","show"])?"show":"hide"]()}function n0(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function MI(r,e,t){var a=e.get("z"),i=e.get("zlevel");r&&r.traverse(function(n){n.type!=="group"&&(a!=null&&(n.z=a),i!=null&&(n.zlevel=i),n.silent=t)})}function o0(r){var e=r.get("type"),t=r.getModel(e+"Style"),a;return e==="line"?(a=t.getLineStyle(),a.fill=null):e==="shadow"&&(a=t.getAreaStyle(),a.stroke=null),a}function DI(r,e,t,a,i){var n=t.get("value"),o=LI(n,e.axis,e.ecModel,t.get("seriesDataIndices"),{precision:t.get(["label","precision"]),formatter:t.get(["label","formatter"])}),s=t.getModel("label"),l=hl(s.get("padding")||0),u=s.getFont(),h=sh(o,u),f=i.position,v=h.width+l[1]+l[3],c=h.height+l[0]+l[2],d=i.align;d==="right"&&(f[0]-=v),d==="center"&&(f[0]-=v/2);var p=i.verticalAlign;p==="bottom"&&(f[1]-=c),p==="middle"&&(f[1]-=c/2),IY(f,v,c,a);var g=s.get("backgroundColor");(!g||g==="auto")&&(g=e.get(["axisLine","lineStyle","color"])),r.label={x:f[0],y:f[1],style:Ft(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:g}),z2:10}}function IY(r,e,t,a){var i=a.getWidth(),n=a.getHeight();r[0]=Math.min(r[0]+e,i)-e,r[1]=Math.min(r[1]+t,n)-t,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0)}function LI(r,e,t,a,i){r=e.scale.parse(r);var n=e.scale.getLabel({value:r},{precision:i.precision}),o=i.formatter;if(o){var s={value:kf(e,{value:r}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};M(a,function(l){var u=t.getSeriesByIndex(l.seriesIndex),h=l.dataIndexInside,f=u&&u.getDataParams(h);f&&s.seriesData.push(f)}),$(o)?n=o.replace("{value}",n):rt(o)&&(n=o(s))}return n}function s0(r,e,t){var a=Se();return ri(a,a,t.rotation),Kr(a,a,t.position),Vr([r.dataToCoord(e),(t.labelOffset||0)+(t.labelDirection||1)*(t.labelMargin||0)],a)}function II(r,e,t,a,i,n){var o=$e.innerTextLayout(t.rotation,0,t.labelDirection);t.labelMargin=i.get(["label","margin"]),DI(e,a,i,n,{position:s0(a.axis,r,t),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function l0(r,e,t){return t=t||0,{x1:r[t],y1:r[1-t],x2:e[t],y2:e[1-t]}}function PI(r,e,t){return t=t||0,{x:r[t],y:r[1-t],width:e[t],height:e[1-t]}}function kI(r,e,t,a,i,n){return{cx:r,cy:e,r0:t,r:a,startAngle:i,endAngle:n,clockwise:!0}}var PY=function(r){z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,a,i,n,o){var s=i.axis,l=s.grid,u=n.get("type"),h=RI(l,s).getOtherAxis(s).getGlobalExtent(),f=s.toGlobalCoord(s.dataToCoord(a,!0));if(u&&u!=="none"){var v=o0(n),c=kY[u](s,f,h);c.style=v,t.graphicKey=c.type,t.pointer=c}var d=Qf(l.getRect(),i);II(a,t,d,i,n,o)},e.prototype.getHandleTransform=function(t,a,i){var n=Qf(a.axis.grid.getRect(),a,{labelInside:!1});n.labelMargin=i.get(["handle","margin"]);var o=s0(a.axis,t,n);return{x:o[0],y:o[1],rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,a,i,n){var o=i.axis,s=o.grid,l=o.getGlobalExtent(!0),u=RI(s,o).getOtherAxis(o).getGlobalExtent(),h=o.dim==="x"?0:1,f=[t.x,t.y];f[h]+=a[h],f[h]=Math.min(l[1],f[h]),f[h]=Math.max(l[0],f[h]);var v=(u[1]+u[0])/2,c=[v,v];c[h]=f[h];var d=[{verticalAlign:"middle"},{align:"center"}];return{x:f[0],y:f[1],rotation:t.rotation,cursorPoint:c,tooltipOption:d[h]}},e}(i0);function RI(r,e){var t={};return t[e.dim+"AxisIndex"]=e.index,r.getCartesian(t)}var kY={line:function(r,e,t){var a=l0([e,t[0]],[e,t[1]],EI(r));return{type:"Line",subPixelOptimize:!0,shape:a}},shadow:function(r,e,t){var a=Math.max(1,r.getBandWidth()),i=t[1]-t[0];return{type:"Rect",shape:PI([e-a/2,t[0]],[a,i],EI(r))}}};function EI(r){return r.dim==="x"?0:1}var RY=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:B.color.border,width:1,type:"dashed"},shadowStyle:{color:B.color.shadowTint},label:{show:!0,formatter:null,precision:"auto",margin:3,color:B.color.neutral00,padding:[5,7,5,7],backgroundColor:B.color.accent60,borderColor:null,borderWidth:0,borderRadius:3},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:B.color.accent40,throttle:40}},e}(Tt),qa=St(),EY=M;function OI(r,e,t){if(!Pt.node){var a=e.getZr();qa(a).records||(qa(a).records={}),OY(a,e);var i=qa(a).records[r]||(qa(a).records[r]={});i.handler=t}}function OY(r,e){if(qa(r).initialized)return;qa(r).initialized=!0,t("click",pt(NI,"click")),t("mousemove",pt(NI,"mousemove")),t("globalout",BY);function t(a,i){r.on(a,function(n){var o=zY(e);EY(qa(r).records,function(s){s&&i(s,n,o.dispatchAction)}),NY(o.pendings,e)})}}function NY(r,e){var t=r.showTip.length,a=r.hideTip.length,i;t?i=r.showTip[t-1]:a&&(i=r.hideTip[a-1]),i&&(i.dispatchAction=null,e.dispatchAction(i))}function BY(r,e,t){r.handler("leave",null,t)}function NI(r,e,t,a){e.handler(r,t,a)}function zY(r){var e={showTip:[],hideTip:[]},t=function(a){var i=e[a.type];i?i.push(a):(a.dispatchAction=t,r.dispatchAction(a))};return{dispatchAction:t,pendings:e}}function u0(r,e){if(!Pt.node){var t=e.getZr(),a=(qa(t).records||{})[r];a&&(qa(t).records[r]=null)}}var VY=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,i){var n=a.getComponent("tooltip"),o=t.get("triggerOn")||n&&n.get("triggerOn")||"mousemove|click";OI("axisPointer",i,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},e.prototype.remove=function(t,a){u0("axisPointer",a)},e.prototype.dispose=function(t,a){u0("axisPointer",a)},e.type="axisPointer",e}(Zt);function BI(r,e){var t=[],a=r.seriesIndex,i;if(a==null||!(i=e.getSeriesByIndex(a)))return{point:[]};var n=i.getData(),o=en(n,r);if(o==null||o<0||W(o))return{point:[]};var s=n.getItemGraphicEl(o),l=i.coordinateSystem;if(i.getTooltipPosition)t=i.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(r.isStacked){var u=l.getBaseAxis(),h=l.getOtherAxis(u),f=h.dim,v=u.dim,c=f==="x"||f==="radius"?1:0,d=n.mapDimension(v),p=[];p[c]=n.get(d,o),p[1-c]=n.get(n.getCalculationInfo("stackResultDimension"),o),t=l.dataToPoint(p)||[]}else t=l.dataToPoint(n.getValues(U(l.dimensions,function(y){return n.mapDimension(y)}),o))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),t=[g.x+g.width/2,g.y+g.height/2]}return{point:t,el:s}}var zI=St();function GY(r,e,t){var a=r.currTrigger,i=[r.x,r.y],n=r,o=r.dispatchAction||X(t.dispatchAction,t),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){Av(i)&&(i=BI({seriesIndex:n.seriesIndex,dataIndex:n.dataIndex},e).point);var l=Av(i),u=n.axesInfo,h=s.axesInfo,f=a==="leave"||Av(i),v={},c={},d={list:[],map:{}},p={showPointer:pt(HY,c),showTooltip:pt(WY,d)};M(s.coordSysMap,function(y,m){var _=l||y.containPoint(i);M(s.coordSysAxesInfo[m],function(x,b){var S=x.axis,w=$Y(u,x);if(!f&&_&&(!u||w)){var T=w&&w.value;T==null&&!l&&(T=S.pointToData(i)),T!=null&&VI(x,T,p,!1,v)}})});var g={};return M(h,function(y,m){var _=y.linkGroup;_&&!c[m]&&M(_.axesInfo,function(x,b){var S=c[b];if(x!==y&&S){var w=S.value;_.mapper&&(w=y.axis.scale.parse(_.mapper(w,GI(x),GI(y)))),g[y.key]=w}})}),M(g,function(y,m){VI(h[m],y,p,!0,v)}),UY(c,h,v),YY(d,i,r,o),ZY(h,o,t),v}}function VI(r,e,t,a,i){var n=r.axis;if(!(n.scale.isBlank()||!n.containData(e))){if(!r.involveSeries){t.showPointer(r,e);return}var o=FY(e,r),s=o.payloadBatch,l=o.snapToValue;s[0]&&i.seriesIndex==null&&F(i,s[0]),!a&&r.snap&&n.containData(l)&&l!=null&&(e=l),t.showPointer(r,e,s),t.showTooltip(r,o,l)}}function FY(r,e){var t=e.axis,a=t.dim,i=r,n=[],o=Number.MAX_VALUE,s=-1;return M(e.seriesModels,function(l,u){var h=l.getData().mapDimensionsAll(a),f,v;if(l.getAxisTooltipData){var c=l.getAxisTooltipData(h,r,t);v=c.dataIndices,f=c.nestestValue}else{if(v=l.indicesOfNearest(a,h[0],r,t.type==="category"?.5:null),!v.length)return;f=l.getData().get(h[0],v[0])}if(!(f==null||!isFinite(f))){var d=r-f,p=Math.abs(d);p<=o&&((p<o||d>=0&&s<0)&&(o=p,s=d,i=f,n.length=0),M(v,function(g){n.push({seriesIndex:l.seriesIndex,dataIndexInside:g,dataIndex:l.getData().getRawIndex(g)})}))}}),{payloadBatch:n,snapToValue:i}}function HY(r,e,t,a){r[e.key]={value:t,payloadBatch:a}}function WY(r,e,t,a){var i=t.payloadBatch,n=e.axis,o=n.model,s=e.axisPointerModel;if(!(!e.triggerTooltip||!i.length)){var l=e.coordSys.model,u=jl(l),h=r.map[u];h||(h=r.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},r.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 UY(r,e,t){var a=t.axesInfo=[];M(e,function(i,n){var o=i.axisPointerModel.option,s=r[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 YY(r,e,t,a){if(Av(e)||!r.list.length){a({type:"hideTip"});return}var i=((r.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};a({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:t.tooltipOption,position:t.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:r.list})}function ZY(r,e,t){var a=t.getZr(),i="axisPointerLastHighlights",n=zI(a)[i]||{},o=zI(a)[i]={};M(r,function(u,h){var f=u.axisPointerModel.option;f.status==="show"&&u.triggerEmphasis&&M(f.seriesDataIndices,function(v){var c=v.seriesIndex+" | "+v.dataIndex;o[c]=v})});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&&t.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&t.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function $Y(r,e){for(var t=0;t<(r||[]).length;t++){var a=r[t];if(e.axis.dim===a.axisDim&&e.axis.model.componentIndex===a.axisIndex)return a}}function GI(r){var e=r.axis.model,t={},a=t.axisDim=r.axis.dim;return t.axisIndex=t[a+"AxisIndex"]=e.componentIndex,t.axisName=t[a+"AxisName"]=e.name,t.axisId=t[a+"AxisId"]=e.id,t}function Av(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function gu(r){Zn.registerAxisPointerClass("CartesianAxisPointer",PY),r.registerComponentModel(RY),r.registerComponentView(VY),r.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!W(t)&&(e.axisPointer.link=[t])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=XF(e,t)}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},GY)}function XY(r){mt(vM),mt(gu)}var qY=function(r){z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,a,i,n,o){var s=i.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),h=u.getExtent(),f=s.dataToCoord(a),v=n.get("type");if(v&&v!=="none"){var c=o0(n),d=jY[v](s,l,f,h);d.style=c,t.graphicKey=d.type,t.pointer=d}var p=n.get(["label","margin"]),g=KY(a,i,n,l,p);DI(t,i,n,o,g)},e}(i0);function KY(r,e,t,a,i){var n=e.axis,o=n.dataToCoord(r),s=a.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=a.getRadiusAxis().getExtent(),u,h,f;if(n.dim==="radius"){var v=Se();ri(v,v,s),Kr(v,v,[a.cx,a.cy]),u=Vr([o,-i],v);var c=e.getModel("axisLabel").get("rotate")||0,d=$e.innerTextLayout(s,c*Math.PI/180,-1);h=d.textAlign,f=d.textVerticalAlign}else{var p=l[1];u=a.coordToPoint([p+i,o]);var g=a.cx,y=a.cy;h=Math.abs(u[0]-g)/p<.3?"center":u[0]>g?"left":"right",f=Math.abs(u[1]-y)/p<.3?"middle":u[1]>y?"top":"bottom"}return{position:u,align:h,verticalAlign:f}}var jY={line:function(r,e,t,a){return r.dim==="angle"?{type:"Line",shape:l0(e.coordToPoint([a[0],t]),e.coordToPoint([a[1],t]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:t}}},shadow:function(r,e,t,a){var i=Math.max(1,r.getBandWidth()),n=Math.PI/180;return r.dim==="angle"?{type:"Sector",shape:kI(e.cx,e.cy,a[0],a[1],(-t-i/2)*n,(-t+i/2)*n)}:{type:"Sector",shape:kI(e.cx,e.cy,t-i/2,t+i/2,0,Math.PI*2)}}},JY=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.findAxisModel=function(t){var a,i=this.ecModel;return i.eachComponent(t,function(n){n.getCoordSysModel()===this&&(a=n)},this),a},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e}(Tt),h0=function(r){z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",Jt).models[0]},e.type="polarAxis",e}(Tt);ie(h0,Nl);var QY=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="angleAxis",e}(h0),tZ=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="radiusAxis",e}(h0),f0=function(r){z(e,r);function e(t,a){return r.call(this,"radius",t,a)||this}return e.prototype.pointToData=function(t,a){return this.polar.pointToData(t,a)[this.dim==="radius"?0:1]},e}(Yr);f0.prototype.dataToRadius=Yr.prototype.dataToCoord,f0.prototype.radiusToData=Yr.prototype.coordToData;var eZ=St(),v0=function(r){z(e,r);function e(t,a){return r.call(this,"angle",t,a||[0,360])||this}return e.prototype.pointToData=function(t,a){return this.polar.pointToData(t,a)[this.dim==="radius"?0:1]},e.prototype.calculateCategoryInterval=function(){var t=this,a=t.getLabelModel(),i=t.scale,n=i.getExtent(),o=i.count();if(n[1]-n[0]<1)return 0;var s=n[0],l=t.dataToCoord(s+1)-t.dataToCoord(s),u=Math.abs(l),h=sh(s==null?"":s+"",a.getFont(),"center","top"),f=Math.max(h.height,7),v=f/u;isNaN(v)&&(v=1/0);var c=Math.max(0,Math.floor(v)),d=eZ(t.model),p=d.lastAutoInterval,g=d.lastTickCount;return p!=null&&g!=null&&Math.abs(p-c)<=1&&Math.abs(g-o)<=1&&p>c?c=p:(d.lastTickCount=o,d.lastAutoInterval=c),c},e}(Yr);v0.prototype.dataToAngle=Yr.prototype.dataToCoord,v0.prototype.angleToData=Yr.prototype.coordToData;var FI=["radius","angle"],rZ=function(){function r(e){this.dimensions=FI,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new f0,this._angleAxis=new v0,this.axisPointerEnabled=!0,this.name=e||"",this._radiusAxis.polar=this._angleAxis.polar=this}return r.prototype.containPoint=function(e){var t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},r.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},r.prototype.getAxis=function(e){var t="_"+e+"Axis";return this[t]},r.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},r.prototype.getAxesByScale=function(e){var t=[],a=this._angleAxis,i=this._radiusAxis;return a.scale.type===e&&t.push(a),i.scale.type===e&&t.push(i),t},r.prototype.getAngleAxis=function(){return this._angleAxis},r.prototype.getRadiusAxis=function(){return this._radiusAxis},r.prototype.getOtherAxis=function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},r.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},r.prototype.getTooltipAxes=function(e){var t=e!=null&&e!=="auto"?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},r.prototype.dataToPoint=function(e,t,a){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)],a)},r.prototype.pointToData=function(e,t,a){a=a||[];var i=this.pointToCoord(e);return a[0]=this._radiusAxis.radiusToData(i[0],t),a[1]=this._angleAxis.angleToData(i[1],t),a},r.prototype.pointToCoord=function(e){var t=e[0]-this.cx,a=e[1]-this.cy,i=this.getAngleAxis(),n=i.getExtent(),o=Math.min(n[0],n[1]),s=Math.max(n[0],n[1]);i.inverse?o=s-360:s=o+360;var l=Math.sqrt(t*t+a*a);t/=l,a/=l;for(var u=Math.atan2(-a,t)/Math.PI*180,h=u<o?1:-1;u<o||u>s;)u+=h*360;return[l,u]},r.prototype.coordToPoint=function(e,t){t=t||[];var a=e[0],i=e[1]/180*Math.PI;return t[0]=Math.cos(i)*a+this.cx,t[1]=-Math.sin(i)*a+this.cy,t},r.prototype.getArea=function(){var e=this.getAngleAxis(),t=this.getRadiusAxis(),a=t.getExtent().slice();a[0]>a[1]&&a.reverse();var i=e.getExtent(),n=Math.PI/180,o=1e-4;return{cx:this.cx,cy:this.cy,r0:a[0],r:a[1],startAngle:-i[0]*n,endAngle:-i[1]*n,clockwise:e.inverse,contain:function(s,l){var u=s-this.cx,h=l-this.cy,f=u*u+h*h,v=this.r,c=this.r0;return v!==c&&f-o<=v*v&&f+o>=c*c},x:this.cx-a[1],y:this.cy-a[1],width:a[1]*2,height:a[1]*2}},r.prototype.convertToPixel=function(e,t,a){var i=HI(t);return i===this?this.dataToPoint(a):null},r.prototype.convertFromPixel=function(e,t,a){var i=HI(t);return i===this?this.pointToData(a):null},r}();function HI(r){var e=r.seriesModel,t=r.polarModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function aZ(r,e,t){var a=e.get("center"),i=de(e,t).refContainer;r.cx=Z(a[0],i.width)+i.x,r.cy=Z(a[1],i.height)+i.y;var n=r.getRadiusAxis(),o=Math.min(i.width,i.height)/2,s=e.get("radius");s==null?s=[0,"100%"]:W(s)||(s=[0,s]);var l=[Z(s[0],o),Z(s[1],o)];n.inverse?n.setExtent(l[1],l[0]):n.setExtent(l[0],l[1])}function iZ(r,e){var t=this,a=t.getAngleAxis(),i=t.getRadiusAxis();if(a.scale.setExtent(1/0,-1/0),i.scale.setExtent(1/0,-1/0),r.eachSeries(function(s){if(s.coordinateSystem===t){var l=s.getData();M(Rf(l,"radius"),function(u){i.scale.unionExtentFromData(l,u)}),M(Rf(l,"angle"),function(u){a.scale.unionExtentFromData(l,u)})}}),es(a.scale,a.model),es(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 nZ(r){return r.mainType==="angleAxis"}function WI(r,e){var t;if(r.type=e.get("type"),r.scale=Pf(e),r.onBand=e.get("boundaryGap")&&r.type==="category",r.inverse=e.get("inverse"),nZ(e)){r.inverse=r.inverse!==e.get("clockwise");var a=e.get("startAngle"),i=(t=e.get("endAngle"))!==null&&t!==void 0?t:a+(r.inverse?-360:360);r.setExtent(a,i)}e.axis=r,r.model=e}var oZ={dimensions:FI,create:function(r,e){var t=[];return r.eachComponent("polar",function(a,i){var n=new rZ(i+"");n.update=iZ;var o=n.getRadiusAxis(),s=n.getAngleAxis(),l=a.findAxisModel("radiusAxis"),u=a.findAxisModel("angleAxis");WI(o,l),WI(s,u),aZ(n,a,e),t.push(n),a.coordinateSystem=n,n.model=a}),r.eachSeries(function(a){if(a.get("coordinateSystem")==="polar"){var i=a.getReferringComponents("polar",Jt).models[0];a.coordinateSystem=i.coordinateSystem}}),t}},sZ=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function Mv(r,e,t){e[1]>e[0]&&(e=e.slice().reverse());var a=r.coordToPoint([e[0],t]),i=r.coordToPoint([e[1],t]);return{x1:a[0],y1:a[1],x2:i[0],y2:i[1]}}function Dv(r){var e=r.getRadiusAxis();return e.inverse?0:1}function UI(r){var e=r[0],t=r[r.length-1];e&&t&&Math.abs(Math.abs(e.coord-t.coord)-360)<1e-4&&r.pop()}var lZ=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="PolarAxisPointer",t}return e.prototype.render=function(t,a){if(this.group.removeAll(),!!t.get("show")){var i=t.axis,n=i.polar,o=n.getRadiusAxis().getExtent(),s=i.getTicksCoords({breakTicks:"none"}),l=i.getMinorTicksCoords(),u=U(i.getViewLabels(),function(h){h=at(h);var f=i.scale,v=f.type==="ordinal"?f.getRawOrdinalNumber(h.tickValue):h.tickValue;return h.coord=i.dataToCoord(v),h});UI(u),UI(s),M(sZ,function(h){t.get([h,"show"])&&(!i.scale.isBlank()||h==="axisLine")&&uZ[h](this.group,t,n,s,l,o,u)},this)}},e.type="angleAxis",e}(Zn),uZ={axisLine:function(r,e,t,a,i,n){var o=e.getModel(["axisLine","lineStyle"]),s=t.getAngleAxis(),l=Math.PI/180,u=s.getExtent(),h=Dv(t),f=h?0:1,v,c=Math.abs(u[1]-u[0])===360?"Circle":"Arc";n[f]===0?v=new bn[c]({shape:{cx:t.cx,cy:t.cy,r:n[h],startAngle:-u[0]*l,endAngle:-u[1]*l,clockwise:s.inverse},style:o.getLineStyle(),z2:1,silent:!0}):v=new kh({shape:{cx:t.cx,cy:t.cy,r:n[h],r0:n[f]},style:o.getLineStyle(),z2:1,silent:!0}),v.style.fill=null,r.add(v)},axisTick:function(r,e,t,a,i,n){var o=e.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=n[Dv(t)],u=U(a,function(h){return new Kt({shape:Mv(t,[l,l+s],h.coord)})});r.add(wr(u,{style:st(o.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(r,e,t,a,i,n){if(i.length){for(var o=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=n[Dv(t)],h=[],f=0;f<i.length;f++)for(var v=0;v<i[f].length;v++)h.push(new Kt({shape:Mv(t,[u,u+l],i[f][v].coord)}));r.add(wr(h,{style:st(s.getModel("lineStyle").getLineStyle(),st(o.getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])}))}))}},axisLabel:function(r,e,t,a,i,n,o){var s=e.getCategories(!0),l=e.getModel("axisLabel"),u=l.get("margin"),h=e.get("triggerEvent");M(o,function(f,v){var c=l,d=f.tickValue,p=n[Dv(t)],g=t.coordToPoint([p+u,f.coord]),y=t.cx,m=t.cy,_=Math.abs(g[0]-y)/p<.3?"center":g[0]>y?"left":"right",x=Math.abs(g[1]-m)/p<.3?"middle":g[1]>m?"top":"bottom";if(s&&s[d]){var b=s[d];lt(b)&&b.textStyle&&(c=new Ct(b.textStyle,l,l.ecModel))}var S=new Lt({silent:$e.isLabelSilent(e),style:Ft(c,{x:g[0],y:g[1],fill:c.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:f.formattedLabel,align:_,verticalAlign:x})});if(r.add(S),za({el:S,componentModel:e,itemName:f.formattedLabel,formatterParamsExtra:{isTruncated:function(){return S.isTruncated},value:f.rawLabel,tickIndex:v}}),h){var w=$e.makeAxisEventDataBase(e);w.targetType="axisLabel",w.value=f.rawLabel,vt(S).eventData=w}},this)},splitLine:function(r,e,t,a,i,n){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var h=[],f=0;f<a.length;f++){var v=u++%l.length;h[v]=h[v]||[],h[v].push(new Kt({shape:Mv(t,n,a[f].coord)}))}for(var f=0;f<h.length;f++)r.add(wr(h[f],{style:st({stroke:l[f%l.length]},s.getLineStyle()),silent:!0,z:e.get("z")}))},minorSplitLine:function(r,e,t,a,i,n){if(i.length){for(var o=e.getModel("minorSplitLine"),s=o.getModel("lineStyle"),l=[],u=0;u<i.length;u++)for(var h=0;h<i[u].length;h++)l.push(new Kt({shape:Mv(t,n,i[u][h].coord)}));r.add(wr(l,{style:s.getLineStyle(),silent:!0,z:e.get("z")}))}},splitArea:function(r,e,t,a,i,n){if(a.length){var o=e.getModel("splitArea"),s=o.getModel("areaStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var h=[],f=Math.PI/180,v=-a[0].coord*f,c=Math.min(n[0],n[1]),d=Math.max(n[0],n[1]),p=e.get("clockwise"),g=1,y=a.length;g<=y;g++){var m=g===y?a[0].coord:a[g].coord,_=u++%l.length;h[_]=h[_]||[],h[_].push(new We({shape:{cx:t.cx,cy:t.cy,r0:c,r:d,startAngle:v,endAngle:-m*f,clockwise:p},silent:!0})),v=-m*f}for(var g=0;g<h.length;g++)r.add(wr(h[g],{style:st({fill:l[g%l.length]},s.getAreaStyle()),silent:!0}))}}},hZ=["splitLine","splitArea","minorSplitLine"],fZ=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="PolarAxisPointer",t}return e.prototype.render=function(t,a,i){if(this.group.removeAll(),!!t.get("show")){var n=this._axisGroup,o=this._axisGroup=new et;this.group.add(o);var s=t.axis,l=s.polar,u=l.getAngleAxis(),h=s.getTicksCoords(),f=s.getMinorTicksCoords(),v=u.getExtent()[0],c=s.getExtent(),d=cZ(l,t,v),p=new $e(t,i,d);p.build(),o.add(p.group),il(n,o,t),M(hZ,function(g){t.get([g,"show"])&&!s.scale.isBlank()&&vZ[g](this.group,t,l,v,c,h,f)},this)}},e.type="radiusAxis",e}(Zn),vZ={splitLine:function(r,e,t,a,i,n){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0,h=t.getAngleAxis(),f=Math.PI/180,v=h.getExtent(),c=Math.abs(v[1]-v[0])===360?"Circle":"Arc";l=l instanceof Array?l:[l];for(var d=[],p=0;p<n.length;p++){var g=u++%l.length;d[g]=d[g]||[],d[g].push(new bn[c]({shape:{cx:t.cx,cy:t.cy,r:Math.max(n[p].coord,0),startAngle:-v[0]*f,endAngle:-v[1]*f,clockwise:h.inverse}}))}for(var p=0;p<d.length;p++)r.add(wr(d[p],{style:st({stroke:l[p%l.length],fill:null},s.getLineStyle()),silent:!0}))},minorSplitLine:function(r,e,t,a,i,n,o){if(o.length){for(var s=e.getModel("minorSplitLine"),l=s.getModel("lineStyle"),u=[],h=0;h<o.length;h++)for(var f=0;f<o[h].length;f++)u.push(new Sr({shape:{cx:t.cx,cy:t.cy,r:o[h][f].coord}}));r.add(wr(u,{style:st({fill:null},l.getLineStyle()),silent:!0}))}},splitArea:function(r,e,t,a,i,n){if(n.length){var o=e.getModel("splitArea"),s=o.getModel("areaStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var h=[],f=n[0].coord,v=1;v<n.length;v++){var c=u++%l.length;h[c]=h[c]||[],h[c].push(new We({shape:{cx:t.cx,cy:t.cy,r0:f,r:n[v].coord,startAngle:0,endAngle:Math.PI*2},silent:!0})),f=n[v].coord}for(var v=0;v<h.length;v++)r.add(wr(h[v],{style:st({fill:l[v%l.length]},s.getAreaStyle()),silent:!0}))}}};function cZ(r,e,t){return{position:[r.cx,r.cy],rotation:t/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:e.getModel("axisLabel").get("rotate"),z2:1}}function YI(r){return r.get("stack")||"__ec_stack_"+r.seriesIndex}function ZI(r,e){return e.dim+r.model.componentIndex}function dZ(r,e,t){var a={},i=pZ(Et(e.getSeriesByType(r),function(n){return!e.isSeriesFiltered(n)&&n.coordinateSystem&&n.coordinateSystem.type==="polar"}));e.eachSeriesByType(r,function(n){if(n.coordinateSystem.type==="polar"){var o=n.getData(),s=n.coordinateSystem,l=s.getBaseAxis(),u=ZI(s,l),h=YI(n),f=i[u][h],v=f.offset,c=f.width,d=s.getOtherAxis(l),p=n.coordinateSystem.cx,g=n.coordinateSystem.cy,y=n.get("barMinHeight")||0,m=n.get("barMinAngle")||0;a[h]=a[h]||[];for(var _=o.mapDimension(d.dim),x=o.mapDimension(l.dim),b=wi(o,_),S=l.dim!=="radius"||!n.get("roundCap",!0),w=d.model,T=w.get("startValue"),C=d.dataToCoord(T||0),A=0,D=o.count();A<D;A++){var I=o.get(_,A),L=o.get(x,A),P=I>=0?"p":"n",k=C;b&&(a[h][L]||(a[h][L]={p:C,n:C}),k=a[h][L][P]);var R=void 0,O=void 0,E=void 0,N=void 0;if(d.dim==="radius"){var V=d.dataToCoord(I)-C,G=l.dataToCoord(L);Math.abs(V)<y&&(V=(V<0?-1:1)*y),R=k,O=k+V,E=G-v,N=E-c,b&&(a[h][L][P]=O)}else{var H=d.dataToCoord(I,S)-C,Y=l.dataToCoord(L);Math.abs(H)<m&&(H=(H<0?-1:1)*m),R=Y+v,O=R+c,E=k,N=k+H,b&&(a[h][L][P]=N)}o.setItemLayout(A,{cx:p,cy:g,r0:R,r:O,startAngle:-E*Math.PI/180,endAngle:-N*Math.PI/180,clockwise:E>=N})}}})}function pZ(r){var e={};M(r,function(a,i){var n=a.getData(),o=a.coordinateSystem,s=o.getBaseAxis(),l=ZI(o,s),u=s.getExtent(),h=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/n.count(),f=e[l]||{bandWidth:h,remainedWidth:h,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},v=f.stacks;e[l]=f;var c=YI(a);v[c]||f.autoWidthCount++,v[c]=v[c]||{width:0,maxWidth:0};var d=Z(a.get("barWidth"),h),p=Z(a.get("barMaxWidth"),h),g=a.get("barGap"),y=a.get("barCategoryGap");d&&!v[c].width&&(d=Math.min(f.remainedWidth,d),v[c].width=d,f.remainedWidth-=d),p&&(v[c].maxWidth=p),g!=null&&(f.gap=g),y!=null&&(f.categoryGap=y)});var t={};return M(e,function(a,i){t[i]={};var n=a.stacks,o=a.bandWidth,s=Z(a.categoryGap,o),l=Z(a.gap,1),u=a.remainedWidth,h=a.autoWidthCount,f=(u-s)/(h+(h-1)*l);f=Math.max(f,0),M(n,function(p,g){var y=p.maxWidth;y&&y<f&&(y=Math.min(y,u),p.width&&(y=Math.min(y,p.width)),u-=y,p.width=y,h--)}),f=(u-s)/(h+(h-1)*l),f=Math.max(f,0);var v=0,c;M(n,function(p,g){p.width||(p.width=f),c=p,v+=p.width*(1+l)}),c&&(v-=c.width*l);var d=-v/2;M(n,function(p,g){t[i][g]=t[i][g]||{offset:d,width:p.width},d+=p.width*(1+l)})}),t}var gZ={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},yZ={splitNumber:5},mZ=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="polar",e}(Zt);function _Z(r){mt(gu),Zn.registerAxisPointerClass("PolarAxisPointer",qY),r.registerCoordinateSystem("polar",oZ),r.registerComponentModel(JY),r.registerComponentView(mZ),us(r,"angle",QY,gZ),us(r,"radius",tZ,yZ),r.registerComponentView(lZ),r.registerComponentView(fZ),r.registerLayout(pt(dZ,"bar"))}function c0(r,e){e=e||{};var t=r.coordinateSystem,a=r.axis,i={},n=a.position,o=a.orient,s=t.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};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],r.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),Ae(e.labelInside,r.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var v=r.get(["axisLabel","rotate"]);return i.labelRotate=n==="top"?-v:v,i.z2=1,i}var xZ=["splitArea","splitLine","breakArea"],SZ=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="SingleAxisPointer",t}return e.prototype.render=function(t,a,i,n){var o=this.group;o.removeAll();var s=this._axisGroup;this._axisGroup=new et;var l=c0(t),u=new $e(t,i,l);u.build(),o.add(this._axisGroup),o.add(u.group),M(xZ,function(h){t.get([h,"show"])&&bZ[h](this,this.group,this._axisGroup,t,i)},this),il(s,this._axisGroup,t),r.prototype.render.call(this,t,a,i,n)},e.prototype.remove=function(){lM(this)},e.type="singleAxis",e}(Zn),bZ={splitLine:function(r,e,t,a,i){var n=a.axis;if(!n.scale.isBlank()){var o=a.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color");l=l instanceof Array?l:[l];for(var u=s.get("width"),h=a.coordinateSystem.getRect(),f=n.isHorizontal(),v=[],c=0,d=n.getTicksCoords({tickModel:o,breakTicks:"none",pruneByBreak:"preserve_extent_bound"}),p=[],g=[],y=0;y<d.length;++y){var m=n.toGlobalCoord(d[y].coord);f?(p[0]=m,p[1]=h.y,g[0]=m,g[1]=h.y+h.height):(p[0]=h.x,p[1]=m,g[0]=h.x+h.width,g[1]=m);var _=new Kt({shape:{x1:p[0],y1:p[1],x2:g[0],y2:g[1]},silent:!0});Eo(_.shape,u);var x=c++%l.length;v[x]=v[x]||[],v[x].push(_)}for(var b=s.getLineStyle(["color"]),y=0;y<v.length;++y)e.add(wr(v[y],{style:st({stroke:l[y%l.length]},b),silent:!0}))}},splitArea:function(r,e,t,a,i){sM(r,t,a,a)},breakArea:function(r,e,t,a,i){var n=Xl(),o=a.axis.scale;n&&o.type!=="ordinal"&&n.rectCoordBuildBreakAxis(e,r,a,a.coordinateSystem.getRect(),i)}},Lv=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getCoordSysModel=function(){return this},e.type="singleAxis",e.layoutMode="box",e.defaultOption={left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:1,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}},jitter:0,jitterOverlap:!0,jitterMargin:2},e}(Tt);ie(Lv,Nl.prototype);var wZ=function(r){z(e,r);function e(t,a,i,n,o){var s=r.call(this,t,a,i)||this;return s.type=n||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var t=this.position;return t==="top"||t==="bottom"},e.prototype.pointToData=function(t,a){return this.coordinateSystem.pointToData(t)[0]},e}(Yr),$I=["single"],TZ=function(){function r(e,t,a){this.type="single",this.dimension="single",this.dimensions=$I,this.axisPointerEnabled=!0,this.model=e,this._init(e,t,a)}return r.prototype._init=function(e,t,a){var i=this.dimension,n=new wZ(i,Pf(e),[0,0],e.get("type"),e.get("position")),o=n.type==="category";n.onBand=o&&e.get("boundaryGap"),n.inverse=e.get("inverse"),n.orient=e.get("orient"),e.axis=n,n.model=e,n.coordinateSystem=this,this._axis=n},r.prototype.update=function(e,t){e.eachSeries(function(a){if(a.coordinateSystem===this){var i=a.getData();M(i.mapDimensionsAll(this.dimension),function(n){this._axis.scale.unionExtentFromData(i,n)},this),es(this._axis.scale,this._axis.model)}},this)},r.prototype.resize=function(e,t){var a=de(e,t).refContainer;this._rect=qt(e.getBoxLayoutParams(),a),this._adjustAxis()},r.prototype.getRect=function(){return this._rect},r.prototype._adjustAxis=function(){var e=this._rect,t=this._axis,a=t.isHorizontal(),i=a?[0,e.width]:[0,e.height],n=t.inverse?1:0;t.setExtent(i[n],i[1-n]),this._updateAxisTransform(t,a?e.x:e.y)},r.prototype._updateAxisTransform=function(e,t){var a=e.getExtent(),i=a[0]+a[1],n=e.isHorizontal();e.toGlobalCoord=n?function(o){return o+t}:function(o){return i-o+t},e.toLocalCoord=n?function(o){return o-t}:function(o){return i-o+t}},r.prototype.getAxis=function(){return this._axis},r.prototype.getBaseAxis=function(){return this._axis},r.prototype.getAxes=function(){return[this._axis]},r.prototype.getTooltipAxes=function(){return{baseAxes:[this.getAxis()],otherAxes:[]}},r.prototype.containPoint=function(e){var t=this.getRect(),a=this.getAxis(),i=a.orient;return i==="horizontal"?a.contain(a.toLocalCoord(e[0]))&&e[1]>=t.y&&e[1]<=t.y+t.height:a.contain(a.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},r.prototype.pointToData=function(e,t,a){a=a||[];var i=this.getAxis();return a[0]=i.coordToData(i.toLocalCoord(e[i.orient==="horizontal"?0:1])),a},r.prototype.dataToPoint=function(e,t,a){var i=this.getAxis(),n=this.getRect();a=a||[];var o=i.orient==="horizontal"?0:1;return e instanceof Array&&(e=e[0]),a[o]=i.toGlobalCoord(i.dataToCoord(+e)),a[1-o]=o===0?n.y+n.height/2:n.x+n.width/2,a},r.prototype.convertToPixel=function(e,t,a){var i=XI(t);return i===this?this.dataToPoint(a):null},r.prototype.convertFromPixel=function(e,t,a){var i=XI(t);return i===this?this.pointToData(a):null},r}();function XI(r){var e=r.seriesModel,t=r.singleAxisModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function CZ(r,e){var t=[];return r.eachComponent("singleAxis",function(a,i){var n=new TZ(a,r,e);n.name="single_"+i,n.resize(a,e),a.coordinateSystem=n,t.push(n)}),r.eachSeries(function(a){if(a.get("coordinateSystem")==="singleAxis"){var i=a.getReferringComponents("singleAxis",Jt).models[0];a.coordinateSystem=i&&i.coordinateSystem}}),t}var AZ={create:CZ,dimensions:$I},qI=["x","y"],MZ=["width","height"],DZ=function(r){z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,a,i,n,o){var s=i.axis,l=s.coordinateSystem,u=d0(l,1-Iv(s)),h=l.dataToPoint(a)[0],f=n.get("type");if(f&&f!=="none"){var v=o0(n),c=LZ[f](s,h,u);c.style=v,t.graphicKey=c.type,t.pointer=c}var d=c0(i);II(a,t,d,i,n,o)},e.prototype.getHandleTransform=function(t,a,i){var n=c0(a,{labelInside:!1});n.labelMargin=i.get(["handle","margin"]);var o=s0(a.axis,t,n);return{x:o[0],y:o[1],rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,a,i,n){var o=i.axis,s=o.coordinateSystem,l=Iv(o),u=d0(s,l),h=[t.x,t.y];h[l]+=a[l],h[l]=Math.min(u[1],h[l]),h[l]=Math.max(u[0],h[l]);var f=d0(s,1-l),v=(f[1]+f[0])/2,c=[v,v];return c[l]=h[l],{x:h[0],y:h[1],rotation:t.rotation,cursorPoint:c,tooltipOption:{verticalAlign:"middle"}}},e}(i0),LZ={line:function(r,e,t){var a=l0([e,t[0]],[e,t[1]],Iv(r));return{type:"Line",subPixelOptimize:!0,shape:a}},shadow:function(r,e,t){var a=r.getBandWidth(),i=t[1]-t[0];return{type:"Rect",shape:PI([e-a/2,t[0]],[a,i],Iv(r))}}};function Iv(r){return r.isHorizontal()?0:1}function d0(r,e){var t=r.getRect();return[t[qI[e]],t[qI[e]]+t[MZ[e]]]}var IZ=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="single",e}(Zt);function PZ(r){mt(gu),Zn.registerAxisPointerClass("SingleAxisPointer",DZ),r.registerComponentView(IZ),r.registerComponentView(SZ),r.registerComponentModel(Lv),us(r,"single",Lv,Lv.defaultOption),r.registerCoordinateSystem("single",AZ)}var kZ=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a,i){var n=An(t);r.prototype.init.apply(this,arguments),KI(t,n)},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),KI(this.option,t)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.layoutMode="box",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:B.color.axisLine,width:1,type:"solid"}},itemStyle:{color:B.color.neutral00,borderWidth:1,borderColor:B.color.neutral10},dayLabel:{show:!0,firstDay:0,position:"start",margin:B.size.s,color:B.color.secondary},monthLabel:{show:!0,position:"start",margin:B.size.s,align:"center",formatter:null,color:B.color.secondary},yearLabel:{show:!0,position:null,margin:B.size.xl,formatter:null,color:B.color.quaternary,fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e}(Tt);function KI(r,e){var t=r.cellSize,a;W(t)?a=t:a=r.cellSize=[t,t],a.length===1&&(a[1]=a[0]);var i=U([0,1],function(n){return dB(e,n)&&(a[n]="auto"),a[n]!=null&&a[n]!=="auto"});va(r,e,{type:"box",ignoreSize:i})}var RZ=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,i){var n=this.group;n.removeAll();var o=t.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=a.getLocaleModel();this._renderDayRect(t,s,n),this._renderLines(t,s,l,n),this._renderYearText(t,s,l,n),this._renderMonthText(t,u,l,n),this._renderWeekText(t,u,s,l,n)},e.prototype._renderDayRect=function(t,a,i){for(var n=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),s=n.getCellWidth(),l=n.getCellHeight(),u=a.start.time;u<=a.end.time;u=n.getNextNDay(u,1).time){var h=n.dataToCalendarLayout([u],!1).tl,f=new _t({shape:{x:h[0],y:h[1],width:s,height:l},cursor:"default",style:o});i.add(f)}},e.prototype._renderLines=function(t,a,i,n){var o=this,s=t.coordinateSystem,l=t.getModel(["splitLine","lineStyle"]).getLineStyle(),u=t.get(["splitLine","show"]),h=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var f=a.start,v=0;f.time<=a.end.time;v++){d(f.formatedDate),v===0&&(f=s.getDateInfo(a.start.y+"-"+a.start.m));var c=f.date;c.setMonth(c.getMonth()+1),f=s.getDateInfo(c)}d(s.getNextNDay(a.end.time,1).formatedDate);function d(p){o._firstDayOfMonth.push(s.getDateInfo(p)),o._firstDayPoints.push(s.dataToCalendarLayout([p],!1).tl);var g=o._getLinePointsOfOneWeek(t,p,i);o._tlpoints.push(g[0]),o._blpoints.push(g[g.length-1]),u&&o._drawSplitline(g,l,n)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,h,i),l,n),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,h,i),l,n)},e.prototype._getEdgesPoints=function(t,a,i){var n=[t[0].slice(),t[t.length-1].slice()],o=i==="horizontal"?0:1;return n[0][o]=n[0][o]-a/2,n[1][o]=n[1][o]+a/2,n},e.prototype._drawSplitline=function(t,a,i){var n=new Be({z2:20,shape:{points:t},style:a});i.add(n)},e.prototype._getLinePointsOfOneWeek=function(t,a,i){for(var n=t.coordinateSystem,o=n.getDateInfo(a),s=[],l=0;l<7;l++){var u=n.getNextNDay(o.time,l),h=n.dataToCalendarLayout([u.time],!1);s[2*u.day]=h.tl,s[2*u.day+1]=h[i==="horizontal"?"bl":"tr"]}return s},e.prototype._formatterLabel=function(t,a){return $(t)&&t?lB(t,a):rt(t)?t(a):a.nameMap},e.prototype._yearTextPositionControl=function(t,a,i,n,o){var s=a[0],l=a[1],u=["center","bottom"];n==="bottom"?(l+=o,u=["center","top"]):n==="left"?s-=o:n==="right"?(s+=o,u=["center","top"]):l-=o;var h=0;return(n==="left"||n==="right")&&(h=Math.PI/2),{rotation:h,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},e.prototype._renderYearText=function(t,a,i,n){var o=t.getModel("yearLabel");if(o.get("show")){var s=o.get("margin"),l=o.get("position");l||(l=i!=="horizontal"?"top":"left");var u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],h=(u[0][0]+u[1][0])/2,f=(u[0][1]+u[1][1])/2,v=i==="horizontal"?0:1,c={top:[h,u[v][1]],bottom:[h,u[1-v][1]],left:[u[1-v][0],f],right:[u[v][0],f]},d=a.start.y;+a.end.y>+a.start.y&&(d=d+"-"+a.end.y);var p=o.get("formatter"),g={start:a.start.y,end:a.end.y,nameMap:d},y=this._formatterLabel(p,g),m=new Lt({z2:30,style:Ft(o,{text:y}),silent:o.get("silent")});m.attr(this._yearTextPositionControl(m,c[l],i,l,s)),n.add(m)}},e.prototype._monthTextPositionControl=function(t,a,i,n,o){var s="left",l="top",u=t[0],h=t[1];return i==="horizontal"?(h=h+o,a&&(s="center"),n==="start"&&(l="bottom")):(u=u+o,a&&(l="middle"),n==="start"&&(s="right")),{x:u,y:h,align:s,verticalAlign:l}},e.prototype._renderMonthText=function(t,a,i,n){var o=t.getModel("monthLabel");if(o.get("show")){var s=o.get("nameMap"),l=o.get("margin"),u=o.get("position"),h=o.get("align"),f=[this._tlpoints,this._blpoints];(!s||$(s))&&(s&&(a=gp(s)||a),s=a.get(["time","monthAbbr"])||[]);var v=u==="start"?0:1,c=i==="horizontal"?0:1;l=u==="start"?-l:l;for(var d=h==="center",p=o.get("silent"),g=0;g<f[v].length-1;g++){var y=f[v][g].slice(),m=this._firstDayOfMonth[g];if(d){var _=this._firstDayPoints[g];y[c]=(_[c]+f[0][g+1][c])/2}var x=o.get("formatter"),b=s[+m.m-1],S={yyyy:m.y,yy:(m.y+"").slice(2),MM:m.m,M:+m.m,nameMap:b},w=this._formatterLabel(x,S),T=new Lt({z2:30,style:F(Ft(o,{text:w}),this._monthTextPositionControl(y,d,i,u,l)),silent:p});n.add(T)}}},e.prototype._weekTextPositionControl=function(t,a,i,n,o){var s="center",l="middle",u=t[0],h=t[1],f=i==="start";return a==="horizontal"?(u=u+n+(f?1:-1)*o[0]/2,s=f?"right":"left"):(h=h+n+(f?1:-1)*o[1]/2,l=f?"bottom":"top"),{x:u,y:h,align:s,verticalAlign:l}},e.prototype._renderWeekText=function(t,a,i,n,o){var s=t.getModel("dayLabel");if(s.get("show")){var l=t.coordinateSystem,u=s.get("position"),h=s.get("nameMap"),f=s.get("margin"),v=l.getFirstDayOfWeek();if(!h||$(h)){h&&(a=gp(h)||a);var c=a.get(["time","dayOfWeekShort"]);h=c||U(a.get(["time","dayOfWeekAbbr"]),function(S){return S[0]})}var d=l.getNextNDay(i.end.time,7-i.lweek).time,p=[l.getCellWidth(),l.getCellHeight()];f=Z(f,Math.min(p[1],p[0])),u==="start"&&(d=l.getNextNDay(i.start.time,-(7+i.fweek)).time,f=-f);for(var g=s.get("silent"),y=0;y<7;y++){var m=l.getNextNDay(d,y),_=l.dataToCalendarLayout([m.time],!1).center,x=y;x=Math.abs((y+v)%7);var b=new Lt({z2:30,style:F(Ft(s,{text:h[x]}),this._weekTextPositionControl(_,n,u,f,p)),silent:g});o.add(b)}}},e.type="calendar",e}(Zt),p0=864e5,EZ=function(){function r(e,t,a){this.type="calendar",this.dimensions=r.dimensions,this.getDimensionsInfo=r.getDimensionsInfo,this._model=e,this._update(t,a)}return r.getDimensionsInfo=function(){return[{name:"time",type:"time"},"value"]},r.prototype.getRangeInfo=function(){return this._rangeInfo},r.prototype.getModel=function(){return this._model},r.prototype.getRect=function(){return this._rect},r.prototype.getCellWidth=function(){return this._sw},r.prototype.getCellHeight=function(){return this._sh},r.prototype.getOrient=function(){return this._orient},r.prototype.getFirstDayOfWeek=function(){return this._firstDayOfWeek},r.prototype.getDateInfo=function(e){e=Qi(e);var t=e.getFullYear(),a=e.getMonth()+1,i=a<10?"0"+a:""+a,n=e.getDate(),o=n<10?"0"+n:""+n,s=e.getDay();return s=Math.abs((s+7-this.getFirstDayOfWeek())%7),{y:t+"",m:i,d:o,day:s,time:e.getTime(),formatedDate:t+"-"+i+"-"+o,date:e}},r.prototype.getNextNDay=function(e,t){return t=t||0,t===0?this.getDateInfo(e):(e=new Date(this.getDateInfo(e).time),e.setDate(e.getDate()+t),this.getDateInfo(e))},r.prototype._update=function(e,t){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 a=this._rangeInfo.weeks||1,i=["width","height"],n=this._model.getCellSize().slice(),o=this._model.getBoxLayoutParams(),s=this._orient==="horizontal"?[a,7]:[7,a];M([0,1],function(f){h(n,f)&&(o[i[f]]=n[f]*s[f])});var l={width:t.getWidth(),height:t.getHeight()},u=this._rect=qt(o,l);M([0,1],function(f){h(n,f)||(n[f]=u[i[f]]/s[f])});function h(f,v){return f[v]!=null&&f[v]!=="auto"}this._sw=n[0],this._sh=n[1]},r.prototype.dataToPoint=function(e,t,a){a=a||[],W(e)&&(e=e[0]),t==null&&(t=!0);var i=this.getDateInfo(e),n=this._rangeInfo,o=i.formatedDate;if(t&&!(i.time>=n.start.time&&i.time<n.end.time+p0))return a[0]=a[1]=NaN,a;var s=i.day,l=this._getRangeInfo([n.start.time,o]).nthWeek;return this._orient==="vertical"?(a[0]=this._rect.x+s*this._sw+this._sw/2,a[1]=this._rect.y+l*this._sh+this._sh/2):(a[0]=this._rect.x+l*this._sw+this._sw/2,a[1]=this._rect.y+s*this._sh+this._sh/2),a},r.prototype.pointToData=function(e){var t=this.pointToDate(e);return t&&t.time},r.prototype.dataToLayout=function(e,t,a){a=a||{};var i=a.rect=a.rect||{},n=a.contentRect=a.contentRect||{},o=this.dataToPoint(e,t);return i.x=o[0]-this._sw/2,i.y=o[1]-this._sh/2,i.width=this._sw,i.height=this._sh,ht.copy(n,i),xn(n,this._lineWidth/2,!0,!0),a},r.prototype.dataToCalendarLayout=function(e,t){var a=this.dataToPoint(e,t);return{center:a,tl:[a[0]-this._sw/2,a[1]-this._sh/2],tr:[a[0]+this._sw/2,a[1]-this._sh/2],br:[a[0]+this._sw/2,a[1]+this._sh/2],bl:[a[0]-this._sw/2,a[1]+this._sh/2]}},r.prototype.pointToDate=function(e){var t=Math.floor((e[0]-this._rect.x)/this._sw)+1,a=Math.floor((e[1]-this._rect.y)/this._sh)+1,i=this._rangeInfo.range;return this._orient==="vertical"?this._getDateByWeeksAndDay(a,t-1,i):this._getDateByWeeksAndDay(t,a-1,i)},r.prototype.convertToPixel=function(e,t,a){var i=g0(t);return i===this?i.dataToPoint(a):null},r.prototype.convertToLayout=function(e,t,a){var i=g0(t);return i===this?i.dataToLayout(a):null},r.prototype.convertFromPixel=function(e,t,a){var i=g0(t);return i===this?i.pointToData(a):null},r.prototype.containPoint=function(e){return console.warn("Not implemented."),!1},r.prototype._initRangeOption=function(){var e=this._model.get("range"),t;if(W(e)&&e.length===1&&(e=e[0]),W(e))t=e;else{var a=e.toString();if(/^\d{4}$/.test(a)&&(t=[a+"-01-01",a+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(a)){var i=this.getDateInfo(a),n=i.date;n.setMonth(n.getMonth()+1);var o=this.getNextNDay(n,-1);t=[i.formatedDate,o.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(a)&&(t=[a,a])}if(!t)return e;var s=this._getRangeInfo(t);return s.start.time>s.end.time&&t.reverse(),t},r.prototype._getRangeInfo=function(e){var t=[this.getDateInfo(e[0]),this.getDateInfo(e[1])],a;t[0].time>t[1].time&&(a=!0,t.reverse());var i=Math.floor(t[1].time/p0)-Math.floor(t[0].time/p0)+1,n=new Date(t[0].time),o=n.getDate(),s=t[1].date.getDate();n.setDate(o+i-1);var l=n.getDate();if(l!==s)for(var u=n.getTime()-t[1].time>0?1:-1;(l=n.getDate())!==s&&(n.getTime()-t[1].time)*u>0;)i-=u,n.setDate(l-u);var h=Math.floor((i+t[0].day+6)/7),f=a?-h+1:h-1;return a&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:i,weeks:h,nthWeek:f,fweek:t[0].day,lweek:t[1].day}},r.prototype._getDateByWeeksAndDay=function(e,t,a){var i=this._getRangeInfo(a);if(e>i.weeks||e===0&&t<i.fweek||e===i.weeks&&t>i.lweek)return null;var n=(e-1)*7-i.fweek+t,o=new Date(i.start.time);return o.setDate(+i.start.d+n),this.getDateInfo(o)},r.create=function(e,t){var a=[];return e.eachComponent("calendar",function(i){var n=new r(i,e,t);a.push(n),i.coordinateSystem=n}),e.eachComponent(function(i,n){vl({targetModel:n,coordSysType:"calendar",coordSysProvider:rb})}),a},r.dimensions=["time","value"],r}();function g0(r){var e=r.calendarModel,t=r.seriesModel,a=e?e.coordinateSystem:t?t.coordinateSystem:null;return a}function OZ(r){r.registerComponentModel(kZ),r.registerComponentView(RZ),r.registerCoordinateSystem("calendar",EZ)}var Ka={level:1,leaf:2,nonLeaf:3},ja={none:0,all:1,body:2,corner:3};function y0(r,e,t){var a=e[dt[t]].getCell(r);return!a&&Dt(r)&&r<0&&(a=e[dt[1-t]].getUnitLayoutInfo(t,Math.round(r))),a}function jI(r){var e=r||[];return e[0]=e[0]||[],e[1]=e[1]||[],e[0][0]=e[0][1]=e[1][0]=e[1][1]=NaN,e}function JI(r,e,t,a,i){QI(r[0],e,i,t,a,0),QI(r[1],e,i,t,a,1)}function QI(r,e,t,a,i,n){r[0]=1/0,r[1]=-1/0;var o=a[n],s=W(o)?o:[o],l=s.length,u=!!t;if(l>=1?(t2(r,e,s,u,i,n,0),l>1&&t2(r,e,s,u,i,n,l-1)):r[0]=r[1]=NaN,u){var h=-i[dt[1-n]].getLocatorCount(n),f=i[dt[n]].getLocatorCount(n)-1;t===ja.body?h=ee(0,h):t===ja.corner&&(f=ir(-1,f)),f<h&&(h=f=NaN),Re(r[0])&&(r[0]=h),Re(r[1])&&(r[1]=f),r[0]=ee(ir(r[0],f),h),r[1]=ee(ir(r[1],f),h)}}function t2(r,e,t,a,i,n,o){var s=y0(t[o],i,n);if(!s){r[0]=r[1]=NaN;return}var l=s.id[dt[n]],u=l,h=VZ(s);h&&(u+=h.span[dt[n]]-1),r[0]=ir(r[0],l,u),r[1]=ee(r[1],l,u)}function Pv(r,e){return Re(r[e][0])||Re(r[e][1])}function e2(r,e,t,a){e=e||NZ;for(var i=0;i<a;i++)e[i]=!1;for(;;){for(var n=!1,i=0;i<a;i++){var o=t[i];!e[i]&&o.cellMergeOwner&&BZ(r,o.locatorRange)&&(e[i]=!0,n=!0)}if(!n)break}}var NZ=[];function BZ(r,e){return!r2(r[0],e[0])||!r2(r[1],e[1])?!1:(r[0][0]=ir(r[0][0],e[0][0]),r[0][1]=ee(r[0][1],e[0][1]),r[1][0]=ir(r[1][0],e[1][0]),r[1][1]=ee(r[1][1],e[1][1]),!0)}function r2(r,e){return r[1]>=e[0]&&r[0]<=e[1]}function a2(r,e){r.id.set(e[0][0],e[1][0]),r.span.set(e[0][1]-r.id.x+1,e[1][1]-r.id.y+1)}function zZ(r,e){r[0][0]=e[0][0],r[0][1]=e[0][1],r[1][0]=e[1][0],r[1][1]=e[1][1]}function i2(r,e,t,a){var i=y0(e[a][0],t,a),n=y0(e[a][1],t,a);r[dt[a]]=r[oe[a]]=NaN,i&&n&&(r[dt[a]]=i.xy,r[oe[a]]=n.xy+n.wh-i.xy)}function yu(r,e,t,a){return r[dt[e]]=t,r[dt[1-e]]=a,r}function VZ(r){return r&&(r.type===Ka.leaf||r.type===Ka.nonLeaf)?r:null}function kv(){return{x:NaN,y:NaN,width:NaN,height:NaN}}var n2=function(){function r(e,t){this._cells=[],this._levels=[],this.dim=e,this.dimIdx=e==="x"?0:1,this._model=t,this._uniqueValueGen=GZ(e);var a=t.get("data",!0);a!=null&&!W(a)&&(a=[]),a?this._initByDimModelData(a):this._initBySeriesData()}return r.prototype._initByDimModelData=function(e){var t=this,a=t._cells,i=t._levels,n=[],o=0;t._leavesCount=s(e,0,0),l();return;function s(u,h,f){var v=0;return u&&M(u,function(c,d){var p;$(c)?p={value:c}:lt(c)?(p=c,c.value!=null&&!$(c.value)&&(p={value:null})):p={value:null};var g={type:Ka.nonLeaf,ordinal:NaN,level:f,firstLeafLocator:h,id:new nt,span:yu(new nt,t.dimIdx,1,1),option:p,xy:NaN,wh:NaN,dim:t,rect:kv()};o++,(n[h]||(n[h]=[])).push(g),i[f]||(i[f]={type:Ka.level,xy:NaN,wh:NaN,option:null,id:new nt,dim:t});var y=s(p.children,h,f+1),m=Math.max(1,y);g.span[dt[t.dimIdx]]=m,v+=m,h+=m}),v}function l(){for(var u=[];a.length<o;)for(var h=0;h<n.length;h++){var f=n[h].pop();if(f){f.ordinal=u.length;var v=f.option.value;u.push(v),a.push(f),t._uniqueValueGen.calcDupBase(v)}}t._uniqueValueGen.ensureValueUnique(u,a);var c=t._ordinalMeta=new El({categories:u,needCollect:!1,deduplication:!1});t._scale=new ts({ordinalMeta:c});for(var d=0;d<t._leavesCount;d++){var p=t._cells[d];p.type=Ka.leaf,p.span[dt[1-t.dimIdx]]=t._levels.length-p.level}t._initCellsId(),t._initLevelIdOptions()}},r.prototype._initBySeriesData=function(){var e=this;e._leavesCount=0,e._levels=[{type:Ka.level,xy:NaN,wh:NaN,option:null,id:new nt,dim:e}],e._initLevelIdOptions();var t=e._ordinalMeta=new El({needCollect:!0,deduplication:!0,onCollect:function(a,i){var n=e._cells[i]={type:Ka.leaf,ordinal:i,level:0,firstLeafLocator:i,id:new nt,span:yu(new nt,e.dimIdx,1,1),option:{value:a+""},xy:NaN,wh:NaN,dim:e,rect:kv()};e._leavesCount++,e._setCellId(n)}});e._scale=new ts({ordinalMeta:t})},r.prototype._setCellId=function(e){var t=this._levels.length,a=this.dimIdx;yu(e.id,a,e.firstLeafLocator,e.level-t)},r.prototype._initCellsId=function(){var e=this._levels.length,t=this.dimIdx;M(this._cells,function(a){yu(a.id,t,a.firstLeafLocator,a.level-e)})},r.prototype._initLevelIdOptions=function(){var e=this._levels.length,t=this.dimIdx,a=this._model.get("levels",!0);a=W(a)?a:[],M(this._levels,function(i,n){yu(i.id,t,0,n-e),i.option=a[n]})},r.prototype.shouldShow=function(){return!!this._model.getShallow("show",!0)},r.prototype.resetLayoutIterator=function(e,t,a,i){if(e=e||new hi,t===this.dimIdx){var n=this._leavesCount,o=a!=null?Math.max(0,a):0;i=i!=null?Math.min(i,n):n,e.reset(this._cells,o,o+i)}else{var n=this._levels.length,o=a!=null?Math.max(0,a+n):0;i=i!=null?Math.min(i,n):n,e.reset(this._levels,o,o+i)}return e},r.prototype.resetCellIterator=function(e){return(e||new hi).reset(this._cells,0)},r.prototype.resetLevelIterator=function(e){return(e||new hi).reset(this._levels,0)},r.prototype.getLayout=function(e,t,a){var i=this.getUnitLayoutInfo(t,a);e[dt[t]]=i?i.xy:NaN,e[oe[t]]=i?i.wh:NaN},r.prototype.getUnitLayoutInfo=function(e,t){return e===this.dimIdx?t<this._leavesCount?this._cells[t]:void 0:this._levels[t+this._levels.length]},r.prototype.getCell=function(e){var t=this._scale.parse(e);return Re(t)?void 0:this._cells[t]},r.prototype.getLocatorCount=function(e){return e===this.dimIdx?this._leavesCount:this._levels.length},r.prototype.getOrdinalMeta=function(){return this._ordinalMeta},r}();function GZ(r){var e=r.toUpperCase(),t=new RegExp("^"+e+"([0-9]+)$"),a=0;function i(s){var l;s!=null&&(l=s.match(t))&&(a=ee(a,+l[1]+1))}function n(){return""+e+a++}function o(s,l){for(var u=J(),h=0;h<s.length;h++){var f=s[h];(f==null||u.get(f)!=null)&&(s[h]=f=n(),l[h].option=st({value:f},l[h].option)),u.set(f,!0)}}return{calcDupBase:i,ensureValueUnique:o}}var o2=function(){function r(e,t,a){this._model=t,this._dims=a,this._kind=e,this._cellMergeOwnerList=[]}return r.prototype._ensureCellMap=function(){var e=this,t=e._cellMap;return t||(t=e._cellMap=J(),a()),t;function a(){var n=[],o=e._model.getShallow("data");o&&!W(o)&&(o=null),M(o,function(d,p){if(!(!lt(d)||!W(d.coord))){var g=jI([]),y=null;if(JI(g,y,d.coord,e._dims,d.coordClamp?ja[e._kind]:ja.none),!(Pv(g,0)||Pv(g,1))){var m=d&&d.mergeCells,_={id:new nt,span:new nt,locatorRange:g,option:d,cellMergeOwner:m};a2(_,g),n.push(_)}}});for(var s=[],l=0;l<n.length;l++){var u=n[l];if(u.cellMergeOwner){var h=u.locatorRange;e2(h,s,n,l);for(var f=0;f<l;f++)s[f]&&(n[f].cellMergeOwner=!1);if(h[0][0]!==u.id.x||h[1][0]!==u.id.y){u.cellMergeOwner=!1;var v=F({},u.option);v.coord=null;var c={id:new nt,span:new nt,locatorRange:h,option:v,cellMergeOwner:!0};a2(c,h),n.push(c)}}}M(n,function(d){var p=i(d.id.x,d.id.y);if(d.cellMergeOwner&&(p.cellMergeOwner=!0,p.span=d.span,p.locatorRange=d.locatorRange,p.spanRect=kv(),e._cellMergeOwnerList.push(p)),!(!d.cellMergeOwner&&!d.option))for(var g=0;g<d.span.y;g++)for(var y=0;y<d.span.x;y++){var m=i(d.id.x+y,d.id.y+g);m.option=d.option,d.cellMergeOwner&&(m.inSpanOf=p)}})}function i(n,o){var s=s2(n,o),l=t.get(s);return l||(l=t.set(s,{id:new nt(n,o),option:null,inSpanOf:null,span:null,spanRect:null,locatorRange:null,cellMergeOwner:!1})),l}},r.prototype.getCell=function(e){return this._ensureCellMap().get(s2(e[0],e[1]))},r.prototype.travelExistingCells=function(e){this._ensureCellMap().each(e)},r.prototype.expandRangeByCellMerge=function(e){if(!Pv(e,0)&&!Pv(e,1)&&e[0][0]===e[0][1]&&e[1][0]===e[1][1]){m0[0]=e[0][0],m0[1]=e[1][0];var t=this.getCell(m0),a=t&&t.inSpanOf;if(a){zZ(e,a.locatorRange);return}}var i=this._cellMergeOwnerList;e2(e,null,i,i.length)},r}(),m0=[];function s2(r,e){return r+"|"+e}var _0={show:!0,color:B.color.secondary,overflow:"break",lineOverflow:"truncate",padding:[2,3,2,3],distance:0};function x0(r){return{color:"none",borderWidth:1,borderColor:r?"none":B.color.borderTint}}var l2={show:!0,label:_0,itemStyle:x0(!1),silent:void 0,dividerLineStyle:{width:1,color:B.color.border}},FZ={label:_0,itemStyle:x0(!1),silent:void 0},HZ={label:_0,itemStyle:x0(!0),silent:void 0},WZ={z:-50,left:"10%",top:"10%",right:"10%",bottom:"10%",x:l2,y:l2,body:FZ,corner:HZ,backgroundStyle:{color:"none",borderColor:B.color.axisLine,borderWidth:1}},UZ=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){var t=this._dimModels={x:new u2(this.get("x",!0)||{}),y:new u2(this.get("y",!0)||{})};t.x.option.type=t.y.option.type="category";var a=t.x.dim=new n2("x",t.x),i=t.y.dim=new n2("y",t.y),n={x:a,y:i};this._body=new o2("body",new Ct(this.getShallow("body")),n),this._corner=new o2("corner",new Ct(this.getShallow("corner")),n)},e.prototype.getDimensionModel=function(t){return this._dimModels[t]},e.prototype.getBody=function(){return this._body},e.prototype.getCorner=function(){return this._corner},e.type="matrix",e.layoutMode="box",e.defaultOption=WZ,e}(Tt),u2=function(r){z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getOrdinalMeta=function(){return this.dim.getOrdinalMeta()},e}(Ct),Rv=Math.round,YZ=0,ZZ=99,$Z={normal:25,special:100},XZ={normal:50,special:125},qZ=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a){this.group.removeAll();var i=this.group,n=t.coordinateSystem,o=n.getRect(),s=t.getDimensionModel("x"),l=t.getDimensionModel("y"),u=s.dim,h=l.dim;KZ(i,t,a),jZ(i,t,u,h,a);var f=t.getShallow("borderZ2",!0),v=Q(f,ZZ),c=v-1,d=t.getModel("backgroundStyle").getItemStyle(["borderWidth"]);d.lineWidth=0;var p=t.getModel("backgroundStyle").getItemStyle(["color","decal","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]);p.fill="none";var g=S0(o.clone(),d,YZ),y=S0(o.clone(),p,v);g.silent=!0,y.silent=!0,i.add(g),i.add(y);var m=u.getUnitLayoutInfo(0,0),_=h.getUnitLayoutInfo(1,0);m&&_&&(u.shouldShow()&&i.add(f2({x1:o.x,y1:_.xy,x2:o.x+o.width,y2:_.xy},s.getModel("dividerLineStyle").getLineStyle(),c)),h.shouldShow()&&i.add(f2({x1:m.xy,y1:o.y,x2:m.xy,y2:o.y+o.height},l.getModel("dividerLineStyle").getLineStyle(),c)))},e.type="matrix",e}(Zt);function KZ(r,e,t){a(0),a(1);function a(i){var n=e.getDimensionModel(dt[i]),o=n.dim;if(o.shouldShow())for(var s=n.getModel("itemStyle"),l=n.getModel("label"),u=e.getShallow("tooltip",!0),h=[],f=o.resetCellIterator();f.next();){var v=f.item,c={};ht.copy(c,v.rect),cc(h,v.id.x,v.id.y),h2(h,e,r,t,v.option,s,l,n,c,v.option.value,XZ,u)}}}function jZ(r,e,t,a,i){n("body",e.getBody(),t,a),t.shouldShow()&&a.shouldShow()&&n("corner",e.getCorner(),a,t);function n(o,s,l,u){var h=new Ct(e.getShallow(o,!0)),f=h.getModel("itemStyle"),v=h.getModel("label"),c=new hi,d=new hi,p=[],g=e.getShallow("tooltip",!0);for(u.resetLayoutIterator(d,1);d.next();)for(l.resetLayoutIterator(c,0);c.next();){var y=c.item,m=d.item;cc(p,y.id.x,m.id.y);var _=s.getCell(p);if(!(_&&_.inSpanOf&&_.inSpanOf!==_)){var x={};_&&_.span?ht.copy(x,_.spanRect):(y.dim.getLayout(x,0,p[0]),m.dim.getLayout(x,1,p[1]));var b=_?_.option:null;h2(p,e,r,i,b,f,v,h,x,b?b.value:null,$Z,g)}}}}function h2(r,e,t,a,i,n,o,s,l,u,h,f){var v;Ev.option=i?i.itemStyle:null,Ev.parentModel=n,_s.option=i,_s.parentModel=s;var c=Q(_s.getShallow("z2"),i&&i.itemStyle?h.special:h.normal),d=f&&f.show,p=S0(l,Ev.getItemStyle(),c);t.add(p);var g=_s.get("cursor");g!=null&&p.attr("cursor",g);var y;if(u!=null){var m=u+"";if(xs.option=i?i.label:null,xs.parentModel=o,xs.ecModel=a,ye(p,{normal:xs},{defaultText:m,autoOverflowArea:!0,layoutRect:at(p.shape)}),y=p.getTextContent(),y){y.z2=c+1;var _=y.style;if(_&&_.overflow&&_.overflow!=="none"&&_.lineOverflow){var x={};ht.copy(x,l),xn(x,(((v=p.style)===null||v===void 0?void 0:v.lineWidth)||0)/2,!0,!0),p.updateInnerText(),y.getLocalTransform(Ov),Rr(Ov,Ov),ht.applyTransform(x,x,Ov),y.setClipPath(new _t({shape:x}))}}za({el:p,componentModel:e,itemName:m,itemTooltipOption:f,formatterParamsExtra:{xyLocator:r.slice()}})}if(y){var b=xs.get("silent");b==null&&(b=!d),y.silent=b,y.ignoreHostSilent=!0}var S=_s.get("silent");S==null&&(S=!p.style||p.style.fill==="none"||!p.style.fill),p.silent=S,md(_s),md(Ev),md(xs)}var _s=new Ct,Ev=new Ct,xs=new Ct,Ov=[];function S0(r,e,t){var a=e.lineWidth;if(a){var i=r.x+r.width,n=r.y+r.height;r.x=or(r.x,a,!0),r.y=or(r.y,a,!0),r.width=or(i,a,!0)-r.x,r.height=or(n,a,!0)-r.y}return new _t({shape:r,style:e,z2:t})}function f2(r,e,t){var a=e.lineWidth;return a&&(Rv(r.x1*2)===Rv(r.x2*2)&&(r.x1=r.x2=or(r.x1,a,!0)),Rv(r.y1*2)===Rv(r.y2*2)&&(r.y1=r.y2=or(r.y1,a,!0))),new Kt({shape:r,style:e,silent:!0,z2:t})}var JZ=function(){function r(e,t,a){this.dimensions=r.dimensions,this.type="matrix",this._model=e;var i=this._dimModels={x:e.getDimensionModel("x"),y:e.getDimensionModel("y")};this._dims={x:i.x.dim,y:i.y.dim},this._resize(e,a)}return r.getDimensionsInfo=function(){return[{name:"x",type:"ordinal"},{name:"y",type:"ordinal"},{name:"value"}]},r.create=function(e,t){var a=[];return e.eachComponent("matrix",function(i){var n=new r(i,e,t);a.push(n),i.coordinateSystem=n}),e.eachComponent(function(i,n){vl({targetModel:n,coordSysType:"matrix",coordSysProvider:rb})}),a},r.prototype.getRect=function(){return this._rect},r.prototype._resize=function(e,t){var a=this._dims,i=this._dimModels,n=this._rect=qt(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()});v2(i,a,n,0),v2(i,a,n,1),c2(0,a),c2(1,a),d2(this._model.getBody(),a),d2(this._model.getCorner(),a)},r.prototype.dataToPoint=function(e,t,a){return a=a||[],this.dataToLayout(e,t,mu),a[0]=mu.rect.x+mu.rect.width/2,a[1]=mu.rect.y+mu.rect.height/2,a},r.prototype.dataToLayout=function(e,t,a){var i=this._dims;a=a||{};var n=a.rect=a.rect||{};n.x=n.y=n.width=n.height=NaN;var o=a.matrixXYLocatorRange=jI(a.matrixXYLocatorRange);return W(e)&&(JI(o,null,e,i,Q(t&&t.clamp,ja.none)),(!t||!t.ignoreMergeCells)&&((!t||t.clamp!==ja.corner)&&this._model.getBody().expandRangeByCellMerge(o),(!t||t.clamp!==ja.body)&&this._model.getCorner().expandRangeByCellMerge(o)),i2(n,o,i,0),i2(n,o,i,1)),a},r.prototype.pointToData=function(e,t,a){var i=this._dims;return p2(Sa,0,i,e,t&&t.clamp),p2(Sa,1,i,e,t&&t.clamp),a=a||[],a[0]=a[1]=NaN,Sa.y===Ie.inCorner&&Sa.x===Ie.inBody?g2(Sa,a,0,i):Sa.x===Ie.inCorner&&Sa.y===Ie.inBody?g2(Sa,a,1,i):(y2(Sa,a,0,i),y2(Sa,a,1,i)),a},r.prototype.convertToPixel=function(e,t,a,i){var n=T0(t);return n===this?n.dataToPoint(a,i):void 0},r.prototype.convertToLayout=function(e,t,a,i){var n=T0(t);return n===this?n.dataToLayout(a,i):void 0},r.prototype.convertFromPixel=function(e,t,a,i){var n=T0(t);return n===this?n.pointToData(a,i):void 0},r.prototype.containPoint=function(e){return this._rect.contain(e[0],e[1])},r.dimensions=["x","y","value"],r}(),mu={rect:kv()},Nv=new hi,b0=new hi;function v2(r,e,t,a){for(var i=1-a,n=e[dt[a]],o=e[dt[i]],s=o.shouldShow(),l=n.resetCellIterator();l.next();)l.item.wh=l.item.xy=NaN;for(var u=o.resetLayoutIterator(null,a);u.next();)u.item.wh=u.item.xy=NaN;for(var h=t[oe[a]],f=n.getLocatorCount(a)+o.getLocatorCount(a),v=new Ct,c=o.resetLevelIterator();c.next();)v.option=c.item.option,v.parentModel=r[dt[i]],g(c.item,s?v.get("levelSize"):0);for(var d=new Ct,p=n.resetCellIterator();p.next();)p.item.type===Ka.leaf&&(d.option=p.item.option,d.parentModel=void 0,g(p.item,d.get("size")));function g(w,T){var C=QZ(T,a,t);Re(C)||(w.wh=w0(C,h),h=w0(h-w.wh),f--)}var y=f?h/f:0,m=!f&&h>=1,_=t[dt[a]],x=n.getLocatorCount(a)-1,b=new hi;for(o.resetLayoutIterator(b,a);b.next();)S(b.item);for(n.resetLayoutIterator(b,a);b.next();)S(b.item);function S(w){Re(w.wh)&&(w.wh=y),w.xy=_,w.id[dt[a]]===x&&!m&&(w.wh=t[dt[a]]+t[oe[a]]-w.xy),_+=w.wh}}function c2(r,e){for(var t=e[dt[r]].resetCellIterator();t.next();){var a=t.item;Bv(a.rect,r,a.id,a.span,e),Bv(a.rect,1-r,a.id,a.span,e),a.type===Ka.nonLeaf&&(a.xy=a.rect[dt[r]],a.wh=a.rect[oe[r]])}}function d2(r,e){r.travelExistingCells(function(t){var a=t.span;if(a){var i=t.spanRect,n=t.id;Bv(i,0,n,a,e),Bv(i,1,n,a,e)}})}function Bv(r,e,t,a,i){r[oe[e]]=0;var n=t[dt[e]],o=n<0?i[dt[1-e]]:i[dt[e]],s=o.getUnitLayoutInfo(e,t[dt[e]]);if(r[dt[e]]=s.xy,r[oe[e]]=s.wh,a[dt[e]]>1){var l=o.getUnitLayoutInfo(e,t[dt[e]]+a[dt[e]]-1);r[oe[e]]=l.xy+l.wh-s.xy}}function QZ(r,e,t){var a=vh(r,t[oe[e]]);return w0(a,t[oe[e]])}function w0(r,e){return Math.max(Math.min(r,Q(e,1/0)),0)}function T0(r){var e=r.matrixModel,t=r.seriesModel,a=e?e.coordinateSystem:t?t.coordinateSystem:null;return a}var Ie={inBody:1,inCorner:2,outside:3},Sa={x:null,y:null,point:[]};function p2(r,e,t,a,i){var n=t[dt[e]],o=t[dt[1-e]],s=n.getUnitLayoutInfo(e,n.getLocatorCount(e)-1),l=n.getUnitLayoutInfo(e,0),u=o.getUnitLayoutInfo(e,-o.getLocatorCount(e)),h=o.shouldShow()?o.getUnitLayoutInfo(e,-1):null,f=r.point[e]=a[e];if(!l&&!h){r[dt[e]]=Ie.outside;return}if(i===ja.body){l?(r[dt[e]]=Ie.inBody,f=ir(s.xy+s.wh,ee(l.xy,f)),r.point[e]=f):r[dt[e]]=Ie.outside;return}else if(i===ja.corner){h?(r[dt[e]]=Ie.inCorner,f=ir(h.xy+h.wh,ee(u.xy,f)),r.point[e]=f):r[dt[e]]=Ie.outside;return}var v=l?l.xy:h?h.xy+h.wh:NaN,c=u?u.xy:v,d=s?s.xy+s.wh:v;if(f<c){if(!i){r[dt[e]]=Ie.outside;return}f=c}else if(f>d){if(!i){r[dt[e]]=Ie.outside;return}f=d}r.point[e]=f,r[dt[e]]=v<=f&&f<=d?Ie.inBody:c<=f&&f<=v?Ie.inCorner:Ie.outside}function g2(r,e,t,a){var i=1-t;if(r[dt[t]]!==Ie.outside)for(a[dt[t]].resetCellIterator(b0);b0.next();){var n=b0.item;if(m2(r.point[t],n.rect,t)&&m2(r.point[i],n.rect,i)){e[t]=n.ordinal,e[i]=n.id[dt[i]];return}}}function y2(r,e,t,a){if(r[dt[t]]!==Ie.outside){var i=r[dt[t]]===Ie.inCorner?a[dt[1-t]]:a[dt[t]];for(i.resetLayoutIterator(Nv,t);Nv.next();)if(t7(r.point[t],Nv.item)){e[t]=Nv.item.id[dt[t]];return}}}function t7(r,e){return e.xy<=r&&r<=e.xy+e.wh}function m2(r,e,t){return e[dt[t]]<=r&&r<=e[dt[t]]+e[oe[t]]}function e7(r){r.registerComponentModel(UZ),r.registerComponentView(qZ),r.registerCoordinateSystem("matrix",JZ)}function r7(r,e){var t=r.existing;if(e.id=r.keyInfo.id,!e.type&&t&&(e.type=t.type),e.parentId==null){var a=e.parentOption;a?e.parentId=a.id:t&&(e.parentId=t.parentId)}e.parentOption=null}function _2(r,e){var t;return M(e,function(a){r[a]!=null&&r[a]!=="auto"&&(t=!0)}),t}function a7(r,e,t){var a=F({},t),i=r[e],n=t.$action||"merge";n==="merge"?i?(yt(i,a,!0),va(i,a,{ignoreSize:!0}),sb(t,i),zv(t,i),zv(t,i,"shape"),zv(t,i,"style"),zv(t,i,"extra"),t.clipPath=i.clipPath):r[e]=a:n==="replace"?r[e]=a:n==="remove"&&i&&(r[e]=null)}var x2=["transition","enterFrom","leaveTo"],i7=x2.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function zv(r,e,t){if(t&&(!r[t]&&e[t]&&(r[t]={}),r=r[t],e=e[t]),!(!r||!e))for(var a=t?x2:i7,i=0;i<a.length;i++){var n=a[i];r[n]==null&&e[n]!=null&&(r[n]=e[n])}}function n7(r,e){if(r&&(r.hv=e.hv=[_2(e,["left","right"]),_2(e,["top","bottom"])],r.type==="group")){var t=r,a=e;t.width==null&&(t.width=a.width=0),t.height==null&&(t.height=a.height=0)}}var o7=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.preventAutoZ=!0,t}return e.prototype.mergeOption=function(t,a){var i=this.option.elements;this.option.elements=null,r.prototype.mergeOption.call(this,t,a),this.option.elements=i},e.prototype.optionUpdated=function(t,a){var i=this.option,n=(a?i:t).elements,o=i.elements=a?[]:i.elements,s=[];this._flatten(n,s,null);var l=$1(o,s,"normalMerge"),u=this._elOptionsToUpdate=[];M(l,function(h,f){var v=h.newOption;v&&(u.push(v),r7(h,v),a7(o,f,v),n7(o[f],v))},this),i.elements=Et(o,function(h){return h&&delete h.$action,h!=null})},e.prototype._flatten=function(t,a,i){M(t,function(n){if(n){i&&(n.parentOption=i),a.push(n);var o=n.children;o&&o.length&&this._flatten(o,a,n),delete n.children}},this)},e.prototype.useElOptionsToUpdate=function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t},e.type="graphic",e.defaultOption={elements:[]},e}(Tt),S2={path:null,compoundPath:null,group:et,image:Me,text:Lt},Ir=St(),s7=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this._elMap=J()},e.prototype.render=function(t,a,i){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,i)},e.prototype._updateElements=function(t){var a=t.useElOptionsToUpdate();if(a){var i=this._elMap,n=this.group,o=t.get("z"),s=t.get("zlevel");M(a,function(l){var u=fe(l.id,null),h=u!=null?i.get(u):null,f=fe(l.parentId,null),v=f!=null?i.get(f):n,c=l.type,d=l.style;c==="text"&&d&&l.hv&&l.hv[1]&&(d.textVerticalAlign=d.textBaseline=d.verticalAlign=d.align=null);var p=l.textContent,g=l.textConfig;if(d&&nI(d,c,!!g,!!p)){var y=oI(d,c,!0);!g&&y.textConfig&&(g=l.textConfig=y.textConfig),!p&&y.textContent&&(p=y.textContent)}var m=l7(l),_=l.$action||"merge",x=_==="merge",b=_==="replace";if(x){var S=!h,w=h;S?w=b2(u,v,l.type,i):(w&&(Ir(w).isNew=!1),pI(w)),w&&(bv(w,m,t,{isInit:S}),w2(w,l,o,s))}else if(b){Vv(h,l,i,t);var T=b2(u,v,l.type,i);T&&(bv(T,m,t,{isInit:!0}),w2(T,l,o,s))}else _==="remove"&&(vI(h,l),Vv(h,l,i,t));var C=i.get(u);if(C&&p)if(x){var A=C.getTextContent();A?A.attr(p):C.setTextContent(new Lt(p))}else b&&C.setTextContent(new Lt(p));if(C){var D=l.clipPath;if(D){var I=D.type,L=void 0,S=!1;if(x){var P=C.getClipPath();S=!P||Ir(P).type!==I,L=S?C0(I):P}else b&&(S=!0,L=C0(I));C.setClipPath(L),bv(L,D,t,{isInit:S}),Tv(L,D.keyframeAnimation,t)}var k=Ir(C);C.setTextConfig(g),k.option=l,u7(C,t,l),za({el:C,componentModel:t,itemName:C.name,itemTooltipOption:l.tooltip}),Tv(C,l.keyframeAnimation,t)}})}},e.prototype._relocate=function(t,a){for(var i=t.option.elements,n=this.group,o=this._elMap,s=a.getWidth(),l=a.getHeight(),u=["x","y"],h=0;h<i.length;h++){var f=i[h],v=fe(f.id,null),c=v!=null?o.get(v):null;if(!(!c||!c.isGroup)){var d=c.parent,p=d===n,g=Ir(c),y=Ir(d);g.width=Z(g.option.width,p?s:y.width)||0,g.height=Z(g.option.height,p?l:y.height)||0}}for(var h=i.length-1;h>=0;h--){var f=i[h],v=fe(f.id,null),c=v!=null?o.get(v):null;if(c){var d=c.parent,y=Ir(d),m=d===n?{width:s,height:l}:{width:y.width,height:y.height},_={},x=Qh(c,f,m,null,{hv:f.hv,boundingMode:f.bounding},_);if(!Ir(c).isNew&&x){for(var b=f.transition,S={},w=0;w<u.length;w++){var T=u[w],C=_[T];b&&(ro(b)||gt(b,T)>=0)?S[T]=C:c[T]=C}It(c,S,t,0)}else c.attr(_)}}},e.prototype._clear=function(){var t=this,a=this._elMap;a.each(function(i){Vv(i,Ir(i).option,a,t._lastGraphicModel)}),this._elMap=J()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(Zt);function C0(r){var e=K(S2,r)?S2[r]:zh(r),t=new e({});return Ir(t).type=r,t}function b2(r,e,t,a){var i=C0(t);return e.add(i),a.set(r,i),Ir(i).id=r,Ir(i).isNew=!0,i}function Vv(r,e,t,a){var i=r&&r.parent;i&&(r.type==="group"&&r.traverse(function(n){Vv(n,e,t,a)}),wv(r,e,a),t.removeKey(Ir(r).id))}function w2(r,e,t,a){r.isGroup||M([["cursor",_r.prototype.cursor],["zlevel",a||0],["z",t||0],["z2",0]],function(i){var n=i[0];K(e,n)?r[n]=Q(e[n],i[1]):r[n]==null&&(r[n]=i[1])}),M(Mt(e),function(i){if(i.indexOf("on")===0){var n=e[i];r[i]=rt(n)?n:null}}),K(e,"draggable")&&(r.draggable=e.draggable),e.name!=null&&(r.name=e.name),e.id!=null&&(r.id=e.id)}function l7(r){return r=F({},r),M(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(ab),function(e){delete r[e]}),r}function u7(r,e,t){var a=vt(r).eventData;!r.silent&&!r.ignore&&!a&&(a=vt(r).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:r.name}),a&&(a.info=t.info)}function h7(r){r.registerComponentModel(o7),r.registerComponentView(s7),r.registerPreprocessor(function(e){var t=e.graphic;W(t)?!t[0]||!t[0].elements?e.graphic=[{elements:t}]:e.graphic=[e.graphic[0]]:t&&!t.elements&&(e.graphic=[{elements:[t]}])})}var T2=["x","y","radius","angle","single"],f7=["cartesian2d","polar","singleAxis"];function v7(r){var e=r.get("coordinateSystem");return gt(f7,e)>=0}function Ni(r){return r+"Axis"}function c7(r,e){var t=J(),a=[],i=J();r.eachComponent({mainType:"dataZoom",query:e},function(h){i.get(h.uid)||s(h)});var n;do n=!1,r.eachComponent("dataZoom",o);while(n);function o(h){!i.get(h.uid)&&l(h)&&(s(h),n=!0)}function s(h){i.set(h.uid,!0),a.push(h),u(h)}function l(h){var f=!1;return h.eachTargetAxis(function(v,c){var d=t.get(v);d&&d[c]&&(f=!0)}),f}function u(h){h.eachTargetAxis(function(f,v){(t.get(f)||t.set(f,[]))[v]=!0})}return a}function C2(r){var e=r.ecModel,t={infoList:[],infoMap:J()};return r.eachTargetAxis(function(a,i){var n=e.getComponent(Ni(a),i);if(n){var o=n.getCoordSysModel();if(o){var s=o.uid,l=t.infoMap.get(s);l||(l={model:o,axisModels:[]},t.infoList.push(l),t.infoMap.set(s,l)),l.axisModels.push(n)}}}),t}var A0=function(){function r(){this.indexList=[],this.indexMap=[]}return r.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},r}(),_u=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._autoThrottle=!0,t._noTarget=!0,t._rangePropMode=["percent","percent"],t}return e.prototype.init=function(t,a,i){var n=A2(t);this.settledOption=n,this.mergeDefaultAndTheme(t,i),this._doInit(n)},e.prototype.mergeOption=function(t){var a=A2(t);yt(this.option,t,!0),yt(this.settledOption,a,!0),this._doInit(a)},e.prototype._doInit=function(t){var a=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var i=this.settledOption;M([["start","startValue"],["end","endValue"]],function(n,o){this._rangePropMode[o]==="value"&&(a[n[0]]=i[n[0]]=null)},this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),a=this._targetAxisInfoMap=J(),i=this._fillSpecifiedTargetAxis(a);i?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(a,this._orient)),this._noTarget=!0,a.each(function(n){n.indexList.length&&(this._noTarget=!1)},this)},e.prototype._fillSpecifiedTargetAxis=function(t){var a=!1;return M(T2,function(i){var n=this.getReferringComponents(Ni(i),NE);if(n.specified){a=!0;var o=new A0;M(n.models,function(s){o.add(s.componentIndex)}),t.set(i,o)}},this),a},e.prototype._fillAutoTargetAxisByOrient=function(t,a){var i=this.ecModel,n=!0;if(n){var o=a==="vertical"?"y":"x",s=i.findComponents({mainType:o+"Axis"});l(s,o)}if(n){var s=i.findComponents({mainType:"singleAxis",filter:function(h){return h.get("orient",!0)===a}});l(s,"single")}function l(u,h){var f=u[0];if(f){var v=new A0;if(v.add(f.componentIndex),t.set(h,v),n=!1,h==="x"||h==="y"){var c=f.getReferringComponents("grid",Jt).models[0];c&&M(u,function(d){f.componentIndex!==d.componentIndex&&c===d.getReferringComponents("grid",Jt).models[0]&&v.add(d.componentIndex)})}}}n&&M(T2,function(u){if(n){var h=i.findComponents({mainType:Ni(u),filter:function(v){return v.get("type",!0)==="category"}});if(h[0]){var f=new A0;f.add(h[0].componentIndex),t.set(u,f),n=!1}}},this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis(function(a){!t&&(t=a)},this),t==="y"?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var a=this.ecModel.option;this.option.throttle=a.animation&&a.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(t){var a=this._rangePropMode,i=this.get("rangeMode");M([["start","startValue"],["end","endValue"]],function(n,o){var s=t[n[0]]!=null,l=t[n[1]]!=null;s&&!l?a[o]="percent":!s&&l?a[o]="value":i?a[o]=i[o]:s&&(a[o]="percent")})},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis(function(a,i){t==null&&(t=this.ecModel.getComponent(Ni(a),i))},this),t},e.prototype.eachTargetAxis=function(t,a){this._targetAxisInfoMap.each(function(i,n){M(i.indexList,function(o){t.call(a,n,o)})})},e.prototype.getAxisProxy=function(t,a){var i=this.getAxisModel(t,a);if(i)return i.__dzAxisProxy},e.prototype.getAxisModel=function(t,a){var i=this._targetAxisInfoMap.get(t);if(i&&i.indexMap[a])return this.ecModel.getComponent(Ni(t),a)},e.prototype.setRawRange=function(t){var a=this.option,i=this.settledOption;M([["start","startValue"],["end","endValue"]],function(n){(t[n[0]]!=null||t[n[1]]!=null)&&(a[n[0]]=i[n[0]]=t[n[0]],a[n[1]]=i[n[1]]=t[n[1]])},this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var a=this.option;M(["start","startValue","end","endValue"],function(i){a[i]=t[i]})},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,a){if(t==null&&a==null){var i=this.findRepresentativeAxisProxy();if(i)return i.getDataValueWindow()}else return this.getAxisProxy(t,a).getDataValueWindow()},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var a,i=this._targetAxisInfoMap.keys(),n=0;n<i.length;n++)for(var o=i[n],s=this._targetAxisInfoMap.get(o),l=0;l<s.indexList.length;l++){var u=this.getAxisProxy(o,s.indexList[l]);if(u.hostedBy(this))return u;a||(a=u)}return a},e.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},e.prototype.getOrient=function(){return this._orient},e.type="dataZoom",e.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],e.defaultOption={z:4,filterMode:"filter",start:0,end:100},e}(Tt);function A2(r){var e={};return M(["start","end","startValue","endValue","throttle"],function(t){r.hasOwnProperty(t)&&(e[t]=r[t])}),e}var d7=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.select",e}(_u),M0=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,i,n){this.dataZoomModel=t,this.ecModel=a,this.api=i},e.type="dataZoom",e}(Zt),p7=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.select",e}(M0),Ss=M,M2=mr,g7=function(){function r(e,t,a,i){this._dimName=e,this._axisIndex=t,this.ecModel=i,this._dataZoomModel=a}return r.prototype.hostedBy=function(e){return this._dataZoomModel===e},r.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},r.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},r.prototype.getTargetSeriesModels=function(){var e=[];return this.ecModel.eachSeries(function(t){if(v7(t)){var a=Ni(this._dimName),i=t.getReferringComponents(a,Jt).models[0];i&&this._axisIndex===i.componentIndex&&e.push(t)}},this),e},r.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},r.prototype.getMinMaxSpan=function(){return at(this._minMaxSpan)},r.prototype.calculateDataWindow=function(e){var t=this._dataExtent,a=this.getAxisModel(),i=a.axis.scale,n=this._dataZoomModel.getRangePropMode(),o=[0,100],s=[],l=[],u;Ss(["start","end"],function(v,c){var d=e[v],p=e[v+"Value"];n[c]==="percent"?(d==null&&(d=o[c]),p=i.parse(Ot(d,o,t))):(u=!0,p=p==null?t[c]:i.parse(p),d=Ot(p,t,o)),l[c]=p==null||isNaN(p)?t[c]:p,s[c]=d==null||isNaN(d)?o[c]:d}),M2(l),M2(s);var h=this._minMaxSpan;u?f(l,s,t,o,!1):f(s,l,o,t,!0);function f(v,c,d,p,g){var y=g?"Span":"ValueSpan";Pi(0,v,d,"all",h["min"+y],h["max"+y]);for(var m=0;m<2;m++)c[m]=Ot(v[m],d,p,!0),g&&(c[m]=i.parse(c[m]))}return{valueWindow:l,percentWindow:s}},r.prototype.reset=function(e){if(e===this._dataZoomModel){var t=this.getTargetSeriesModels();this._dataExtent=y7(this,this._dimName,t),this._updateMinMaxSpan();var a=this.calculateDataWindow(e.settledOption);this._valueWindow=a.valueWindow,this._percentWindow=a.percentWindow,this._setAxisModel()}},r.prototype.filterData=function(e,t){if(e!==this._dataZoomModel)return;var a=this._dimName,i=this.getTargetSeriesModels(),n=e.get("filterMode"),o=this._valueWindow;if(n==="none")return;Ss(i,function(l){var u=l.getData(),h=u.mapDimensionsAll(a);if(h.length){if(n==="weakFilter"){var f=u.getStore(),v=U(h,function(c){return u.getDimensionIndex(c)},u);u.filterSelf(function(c){for(var d,p,g,y=0;y<h.length;y++){var m=f.get(v[y],c),_=!isNaN(m),x=m<o[0],b=m>o[1];if(_&&!x&&!b)return!0;_&&(g=!0),x&&(d=!0),b&&(p=!0)}return g&&d&&p})}else Ss(h,function(c){if(n==="empty")l.setData(u=u.map(c,function(p){return s(p)?p:NaN}));else{var d={};d[c]=o,u.selectRange(d)}});Ss(h,function(c){u.setApproximateExtent(o,c)})}});function s(l){return l>=o[0]&&l<=o[1]}},r.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,a=this._dataExtent;Ss(["min","max"],function(i){var n=t.get(i+"Span"),o=t.get(i+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?n=Ot(a[0]+o,a,[0,100],!0):n!=null&&(o=Ot(n,[0,100],a,!0)-a[0]),e[i+"Span"]=n,e[i+"ValueSpan"]=o},this)},r.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,a=this._valueWindow;if(t){var i=P1(a,[0,500]);i=Math.min(i,20);var n=e.axis.scale.rawExtentInfo;t[0]!==0&&n.setDeterminedMinMax("min",+a[0].toFixed(i)),t[1]!==100&&n.setDeterminedMinMax("max",+a[1].toFixed(i)),n.freeze()}},r}();function y7(r,e,t){var a=[1/0,-1/0];Ss(t,function(o){XV(a,o.getData(),e)});var i=r.getAxisModel(),n=ZT(i.axis.scale,i,a).calculate();return[n.min,n.max]}var m7={getTargetSeries:function(r){function e(i){r.eachComponent("dataZoom",function(n){n.eachTargetAxis(function(o,s){var l=r.getComponent(Ni(o),s);i(o,s,l,n)})})}e(function(i,n,o,s){o.__dzAxisProxy=null});var t=[];e(function(i,n,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new g7(i,n,s,r),t.push(o.__dzAxisProxy))});var a=J();return M(t,function(i){M(i.getTargetSeriesModels(),function(n){a.set(n.uid,n)})}),a},overallReset:function(r,e){r.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(a,i){t.getAxisProxy(a,i).reset(t)}),t.eachTargetAxis(function(a,i){t.getAxisProxy(a,i).filterData(t,e)})}),r.eachComponent("dataZoom",function(t){var a=t.findRepresentativeAxisProxy();if(a){var i=a.getDataPercentWindow(),n=a.getDataValueWindow();t.setCalculatedRange({start:i[0],end:i[1],startValue:n[0],endValue:n[1]})}})}};function _7(r){r.registerAction("dataZoom",function(e,t){var a=c7(t,e);M(a,function(i){i.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var D2=!1;function D0(r){D2||(D2=!0,r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,m7),_7(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function x7(r){r.registerComponentModel(d7),r.registerComponentView(p7),D0(r)}var Pr=function(){function r(){}return r}(),L2={};function bs(r,e){L2[r]=e}function I2(r){return L2[r]}var S7=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){r.prototype.optionUpdated.apply(this,arguments);var t=this.ecModel;M(this.option.feature,function(a,i){var n=I2(i);n&&(n.getDefaultOption&&(n.defaultOption=n.getDefaultOption(t)),yt(a,n.defaultOption))})},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:B.color.border,borderRadius:0,borderWidth:0,padding:B.size.m,itemSize:15,itemGap:B.size.s,showTitle:!0,iconStyle:{borderColor:B.color.accent50,color:"none"},emphasis:{iconStyle:{borderColor:B.color.accent50}},tooltip:{show:!1,position:"bottom"}},e}(Tt);function P2(r,e){var t=hl(e.get("padding")),a=e.getItemStyle(["color","opacity"]);a.fill=e.get("backgroundColor");var i=new _t({shape:{x:r.x-t[3],y:r.y-t[0],width:r.width+t[1]+t[3],height:r.height+t[0]+t[2],r:e.get("borderRadius")},style:a,silent:!0,z2:-1});return i}var b7=function(r){z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,a,i,n){var o=this.group;if(o.removeAll(),!t.get("show"))return;var s=+t.get("itemSize"),l=t.get("orient")==="vertical",u=t.get("feature")||{},h=this._features||(this._features={}),f=[];M(u,function(m,_){f.push(_)}),new Fa(this._featureNames||[],f).add(v).update(v).remove(pt(v,null)).execute(),this._featureNames=f;function v(m,_){var x=f[m],b=f[_],S=u[x],w=new Ct(S,t,t.ecModel),T;if(n&&n.newTitle!=null&&n.featureName===x&&(S.title=n.newTitle),x&&!b){if(w7(x))T={onclick:w.option.onclick,featureName:x};else{var C=I2(x);if(!C)return;T=new C}h[x]=T}else if(T=h[b],!T)return;T.uid=Bo("toolbox-feature"),T.model=w,T.ecModel=a,T.api=i;var A=T instanceof Pr;if(!x&&b){A&&T.dispose&&T.dispose(a,i);return}if(!w.get("show")||A&&T.unusable){A&&T.remove&&T.remove(a,i);return}c(w,T,x),w.setIconStatus=function(D,I){var L=this.option,P=this.iconPaths;L.iconStatus=L.iconStatus||{},L.iconStatus[D]=I,P[D]&&(I==="emphasis"?Oa:Na)(P[D])},T instanceof Pr&&T.render&&T.render(w,a,i,n)}function c(m,_,x){var b=m.getModel("iconStyle"),S=m.getModel(["emphasis","iconStyle"]),w=_ instanceof Pr&&_.getIcons?_.getIcons():m.get("icon"),T=m.get("title")||{},C,A;$(w)?(C={},C[x]=w):C=w,$(T)?(A={},A[x]=T):A=T;var D=m.iconPaths={};M(C,function(I,L){var P=nl(I,{},{x:-s/2,y:-s/2,width:s,height:s});P.setStyle(b.getItemStyle());var k=P.ensureState("emphasis");k.style=S.getItemStyle();var R=new Lt({style:{text:A[L],align:S.get("textAlign"),borderRadius:S.get("textBorderRadius"),padding:S.get("textPadding"),fill:null,font:fp({fontStyle:S.get("textFontStyle"),fontFamily:S.get("textFontFamily"),fontSize:S.get("textFontSize"),fontWeight:S.get("textFontWeight")},a)},ignore:!0});P.setTextContent(R),za({el:P,componentModel:t,itemName:L,formatterParamsExtra:{title:A[L]}}),P.__title=A[L],P.on("mouseover",function(){var O=S.getItemStyle(),E=l?t.get("right")==null&&t.get("left")!=="right"?"right":"left":t.get("bottom")==null&&t.get("top")!=="bottom"?"bottom":"top";R.setStyle({fill:S.get("textFill")||O.fill||O.stroke||B.color.neutral99,backgroundColor:S.get("textBackgroundColor")}),P.setTextConfig({position:S.get("textPosition")||E}),R.ignore=!t.get("showTitle"),i.enterEmphasis(this)}).on("mouseout",function(){m.get(["iconStatus",L])!=="emphasis"&&i.leaveEmphasis(this),R.hide()}),(m.get(["iconStatus",L])==="emphasis"?Oa:Na)(P),o.add(P),P.on("click",X(_.onclick,_,a,i,L)),D[L]=P})}var d=de(t,i).refContainer,p=t.getBoxLayoutParams(),g=t.get("padding"),y=qt(p,d,g);Cn(t.get("orient"),o,t.get("itemGap"),y.width,y.height),Qh(o,p,d,g),o.add(P2(o.getBoundingRect(),t)),l||o.eachChild(function(m){var _=m.__title,x=m.ensureState("emphasis"),b=x.textConfig||(x.textConfig={}),S=m.getTextContent(),w=S&&S.ensureState("emphasis");if(w&&!rt(w)&&_){var T=w.style||(w.style={}),C=sh(_,Lt.makeFont(T)),A=m.x+o.x,D=m.y+o.y+s,I=!1;D+C.height>i.getHeight()&&(b.position="top",I=!0);var L=I?-5-C.height:s+10;A+C.width/2>i.getWidth()?(b.position=["100%",L],T.align="right"):A-C.width/2<0&&(b.position=[0,L],T.align="left")}})},e.prototype.updateView=function(t,a,i,n){M(this._features,function(o){o instanceof Pr&&o.updateView&&o.updateView(o.model,a,i,n)})},e.prototype.remove=function(t,a){M(this._features,function(i){i instanceof Pr&&i.remove&&i.remove(t,a)}),this.group.removeAll()},e.prototype.dispose=function(t,a){M(this._features,function(i){i instanceof Pr&&i.dispose&&i.dispose(t,a)})},e.type="toolbox",e}(Zt);function w7(r){return r.indexOf("my")===0}var T7=function(r){z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,a){var i=this.model,n=i.get("name")||t.get("title.0.text")||"echarts",o=a.getZr().painter.getType()==="svg",s=o?"svg":i.get("type",!0)||"png",l=a.getConnectedDataURL({type:s,backgroundColor:i.get("backgroundColor",!0)||t.get("backgroundColor")||B.color.neutral00,connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")}),u=Pt.browser;if(typeof MouseEvent=="function"&&(u.newEdge||!u.ie&&!u.edge)){var h=document.createElement("a");h.download=n+"."+s,h.target="_blank",h.href=l;var f=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});h.dispatchEvent(f)}else if(window.navigator.msSaveOrOpenBlob||o){var v=l.split(","),c=v[0].indexOf("base64")>-1,d=o?decodeURIComponent(v[1]):v[1];c&&(d=window.atob(d));var p=n+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var g=d.length,y=new Uint8Array(g);g--;)y[g]=d.charCodeAt(g);var m=new Blob([y]);window.navigator.msSaveOrOpenBlob(m,p)}else{var _=document.createElement("iframe");document.body.appendChild(_);var x=_.contentWindow,b=x.document;b.open("image/svg+xml","replace"),b.write(d),b.close(),x.focus(),b.execCommand("SaveAs",!0,p),document.body.removeChild(_)}}else{var S=i.get("lang"),w='<body style="margin:0;"><img src="'+l+'" style="max-width:100%;" title="'+(S&&S[0]||"")+'" /></body>',T=window.open();T.document.write(w),T.document.title=n}},e.getDefaultOption=function(t){var a={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:t.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:B.color.neutral00,name:"",excludeComponents:["toolbox"],lang:t.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return a},e}(Pr),k2="__ec_magicType_stack__",C7=[["line","bar"],["stack"]],A7=function(r){z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getIcons=function(){var t=this.model,a=t.get("icon"),i={};return M(t.get("type"),function(n){a[n]&&(i[n]=a[n])}),i},e.getDefaultOption=function(t){var a={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:t.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return a},e.prototype.onclick=function(t,a,i){var n=this.model,o=n.get(["seriesIndex",i]);if(R2[i]){var s={series:[]},l=function(f){var v=f.subType,c=f.id,d=R2[i](v,c,f,n);d&&(st(d,f.option),s.series.push(d));var p=f.coordinateSystem;if(p&&p.type==="cartesian2d"&&(i==="line"||i==="bar")){var g=p.getAxesByScale("ordinal")[0];if(g){var y=g.dim,m=y+"Axis",_=f.getReferringComponents(m,Jt).models[0],x=_.componentIndex;s[m]=s[m]||[];for(var b=0;b<=x;b++)s[m][x]=s[m][x]||{};s[m][x].boundaryGap=i==="bar"}}};M(C7,function(f){gt(f,i)>=0&&M(f,function(v){n.setIconStatus(v,"normal")})}),n.setIconStatus(i,"emphasis"),t.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,h=i;i==="stack"&&(u=yt({stack:n.option.title.tiled,tiled:n.option.title.stack},n.option.title),n.get(["iconStatus",i])!=="emphasis"&&(h="tiled")),a.dispatchAction({type:"changeMagicType",currentType:h,newOption:s,newTitle:u,featureName:"magicType"})}},e}(Pr),R2={line:function(r,e,t,a){if(r==="bar")return yt({id:e,type:"line",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},a.get(["option","line"])||{},!0)},bar:function(r,e,t,a){if(r==="line")return yt({id:e,type:"bar",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},a.get(["option","bar"])||{},!0)},stack:function(r,e,t,a){var i=t.get("stack")===k2;if(r==="line"||r==="bar")return a.setIconStatus("stack",i?"normal":"emphasis"),yt({id:e,stack:i?"":k2},a.get(["option","stack"])||{},!0)}};ca({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(r,e){e.mergeOption(r.newOption)});var Gv=new Array(60).join("-"),ws=" ";function M7(r){var e={},t=[],a=[];return r.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 t.push(i)}else t.push(i)}),{seriesGroupByCategoryAxis:e,other:t,meta:a}}function D7(r){var e=[];return M(r,function(t,a){var i=t.categoryAxis,n=t.valueAxis,o=n.dim,s=[" "].concat(U(t.series,function(c){return c.name})),l=[i.model.getCategories()];M(t.series,function(c){var d=c.getRawData();l.push(c.getRawData().mapArray(d.mapDimension(o),function(p){return p}))});for(var u=[s.join(ws)],h=0;h<l[0].length;h++){for(var f=[],v=0;v<l.length;v++)f.push(l[v][h]);u.push(f.join(ws))}e.push(u.join(`
69
+ `))}),e.join(`
70
+
71
+ `+Gv+`
72
+
73
+ `)}function L7(r){return U(r,function(e){var t=e.getRawData(),a=[e.name],i=[];return t.each(t.dimensions,function(){for(var n=arguments.length,o=arguments[n-1],s=t.getName(o),l=0;l<n-1;l++)i[l]=arguments[l];a.push((s?s+ws:"")+i.join(ws))}),a.join(`
74
+ `)}).join(`
75
+
76
+ `+Gv+`
77
+
78
+ `)}function I7(r){var e=M7(r);return{value:Et([D7(e.seriesGroupByCategoryAxis),L7(e.other)],function(t){return!!t.replace(/[\n\t\s]/g,"")}).join(`
79
+
80
+ `+Gv+`
81
+
82
+ `),meta:e.meta}}function Fv(r){return r.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function P7(r){var e=r.slice(0,r.indexOf(`
83
+ `));if(e.indexOf(ws)>=0)return!0}var L0=new RegExp("["+ws+"]+","g");function k7(r){for(var e=r.split(/\n+/g),t=Fv(e.shift()).split(L0),a=[],i=U(t,function(l){return{name:l,data:[]}}),n=0;n<e.length;n++){var o=Fv(e[n]).split(L0);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 R7(r){for(var e=r.split(/\n+/g),t=Fv(e.shift()),a=[],i=0;i<e.length;i++){var n=Fv(e[i]);if(n){var o=n.split(L0),s="",l=void 0,u=!1;isNaN(o[0])?(u=!0,s=o[0],o=o.slice(1),a[i]={name:s,value:[]},l=a[i].value):l=a[i]=[];for(var h=0;h<o.length;h++)l.push(+o[h]);l.length===1&&(u?a[i].value=l[0]:a[i]=l[0])}}return{name:t,data:a}}function E7(r,e){var t=r.split(new RegExp(`
84
+ *`+Gv+`
85
+ *`,"g")),a={series:[]};return M(t,function(i,n){if(P7(i)){var o=k7(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=R7(i);a.series.push(o)}}),a}var O7=function(r){z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,a){setTimeout(function(){a.dispatchAction({type:"hideTip"})});var i=a.getDom(),n=this.model;this._dom&&i.removeChild(this._dom);var o=document.createElement("div");o.style.cssText="position:absolute;top:0;bottom:0;left:0;right:0;padding:5px",o.style.backgroundColor=n.get("backgroundColor")||B.color.neutral00;var s=document.createElement("h4"),l=n.get("lang")||[];s.innerHTML=l[0]||n.get("title"),s.style.cssText="margin:10px 20px",s.style.color=n.get("textColor");var u=document.createElement("div"),h=document.createElement("textarea");u.style.cssText="overflow:auto";var f=n.get("optionToContent"),v=n.get("contentToOption"),c=I7(t);if(rt(f)){var d=f(a.getOption());$(d)?u.innerHTML=d:uo(d)&&u.appendChild(d)}else{h.readOnly=n.get("readOnly");var p=h.style;p.cssText="display:block;width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;resize:none;box-sizing:border-box;outline:none",p.color=n.get("textColor"),p.borderColor=n.get("textareaBorderColor"),p.backgroundColor=n.get("textareaColor"),h.value=c.value,u.appendChild(h)}var g=c.meta,y=document.createElement("div");y.style.cssText="position:absolute;bottom:5px;left:0;right:0";var m="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",_=document.createElement("div"),x=document.createElement("div");m+=";background-color:"+n.get("buttonColor"),m+=";color:"+n.get("buttonTextColor");var b=this;function S(){i.removeChild(o),b._dom=null}wc(_,"click",S),wc(x,"click",function(){if(v==null&&f!=null||v!=null&&f==null){S();return}var w;try{rt(v)?w=v(u,a.getOption()):w=E7(h.value,g)}catch(T){throw S(),new Error("Data view format error "+T)}w&&a.dispatchAction({type:"changeDataView",newOption:w}),S()}),_.innerHTML=l[1],x.innerHTML=l[2],x.style.cssText=_.style.cssText=m,!n.get("readOnly")&&y.appendChild(x),y.appendChild(_),o.appendChild(s),o.appendChild(u),o.appendChild(y),u.style.height=i.clientHeight-80+"px",i.appendChild(o),this._dom=o},e.prototype.remove=function(t,a){this._dom&&a.getDom().removeChild(this._dom)},e.prototype.dispose=function(t,a){this.remove(t,a)},e.getDefaultOption=function(t){var a={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:t.getLocaleModel().get(["toolbox","dataView","title"]),lang:t.getLocaleModel().get(["toolbox","dataView","lang"]),backgroundColor:B.color.background,textColor:B.color.primary,textareaColor:B.color.background,textareaBorderColor:B.color.border,buttonColor:B.color.accent50,buttonTextColor:B.color.neutral00};return a},e}(Pr);function N7(r,e){return U(r,function(t,a){var i=e&&e[a];if(lt(i)&&!W(i)){var n=lt(t)&&!W(t);n||(t={value:t});var o=i.name!=null&&t.name==null;return t=st(t,i),o&&delete t.name,t}else return t})}ca({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(r,e){var t=[];M(r.newOption.series,function(a){var i=e.getSeriesByName(a.name)[0];if(!i)t.push(F({type:"scatter"},a));else{var n=i.get("data");t.push({name:a.name,data:N7(a.data,n)})}}),e.mergeOption(st({series:t},r.newOption))});var E2=M,O2=St();function B7(r,e){var t=I0(r);E2(e,function(a,i){for(var n=t.length-1;n>=0;n--){var o=t[n];if(o[i])break}if(n<0){var s=r.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(s){var l=s.getPercentRange();t[0][i]={dataZoomId:i,start:l[0],end:l[1]}}}}),t.push(e)}function z7(r){var e=I0(r),t=e[e.length-1];e.length>1&&e.pop();var a={};return E2(t,function(i,n){for(var o=e.length-1;o>=0;o--)if(i=e[o][n],i){a[n]=i;break}}),a}function V7(r){O2(r).snapshots=null}function G7(r){return I0(r).length}function I0(r){var e=O2(r);return e.snapshots||(e.snapshots=[{}]),e.snapshots}var F7=function(r){z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,a){V7(t),a.dispatchAction({type:"restore",from:this.uid})},e.getDefaultOption=function(t){var a={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:t.getLocaleModel().get(["toolbox","restore","title"])};return a},e}(Pr);ca({type:"restore",event:"restore",update:"prepareAndUpdate"},function(r,e){e.resetOption("recreate")});var H7=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],P0=function(){function r(e,t,a){var i=this;this._targetInfoList=[];var n=N2(t,e);M(W7,function(o,s){(!a||!a.include||gt(a.include,s)>=0)&&o(n,i._targetInfoList)})}return r.prototype.setOutputRanges=function(e,t){return this.matchOutputRanges(e,t,function(a,i,n){if((a.coordRanges||(a.coordRanges=[])).push(i),!a.coordRange){a.coordRange=i;var o=R0[a.brushType](0,n,i);a.__rangeOffset={offset:G2[a.brushType](o.values,a.range,[1,1]),xyMinMax:o.xyMinMax}}}),e},r.prototype.matchOutputRanges=function(e,t,a){M(e,function(i){var n=this.findTargetInfo(i,t);n&&n!==!0&&M(n.coordSyses,function(o){var s=R0[i.brushType](1,o,i.range,!0);a(i,s.values,o,t)})},this)},r.prototype.setInputRanges=function(e,t){M(e,function(a){var i=this.findTargetInfo(a,t);if(a.range=a.range||[],i&&i!==!0){a.panelId=i.panelId;var n=R0[a.brushType](0,i.coordSys,a.coordRange),o=a.__rangeOffset;a.range=o?G2[a.brushType](n.values,o.offset,U7(n.xyMinMax,o.xyMinMax)):n.values}},this)},r.prototype.makePanelOpts=function(e,t){return U(this._targetInfoList,function(a){var i=a.getPanelRect();return{panelId:a.panelId,defaultBrushType:t?t(a):null,clipPath:_L(i),isTargetByCursor:SL(i,e,a.coordSysModel),getLinearBrushOtherExtent:xL(i)}})},r.prototype.controlSeries=function(e,t,a){var i=this.findTargetInfo(e,a);return i===!0||i&&gt(i.coordSyses,t.coordinateSystem)>=0},r.prototype.findTargetInfo=function(e,t){for(var a=this._targetInfoList,i=N2(t,e),n=0;n<a.length;n++){var o=a[n],s=e.panelId;if(s){if(o.panelId===s)return o}else for(var l=0;l<B2.length;l++)if(B2[l](i,o))return o}return!0},r}();function k0(r){return r[0]>r[1]&&r.reverse(),r}function N2(r,e){return wo(r,e,{includeMainTypes:H7})}var W7={grid:function(r,e){var t=r.xAxisModels,a=r.yAxisModels,i=r.gridModels,n=J(),o={},s={};!t&&!a&&!i||(M(t,function(l){var u=l.axis.grid.model;n.set(u.id,u),o[u.id]=!0}),M(a,function(l){var u=l.axis.grid.model;n.set(u.id,u),s[u.id]=!0}),M(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=[];M(u.getCartesians(),function(f,v){(gt(t,f.getAxis("x").model)>=0||gt(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:z2.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(r,e){M(r.geoModels,function(t){var a=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:a,coordSyses:[a],getPanelRect:z2.geo})})}},B2=[function(r,e){var t=r.xAxisModel,a=r.yAxisModel,i=r.gridModel;return!i&&t&&(i=t.axis.grid.model),!i&&a&&(i=a.axis.grid.model),i&&i===e.gridModel},function(r,e){var t=r.geoModel;return t&&t===e.geoModel}],z2={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var r=this.coordSys,e=r.getBoundingRect().clone();return e.applyTransform(_n(r)),e}},R0={lineX:pt(V2,0),lineY:pt(V2,1),rect:function(r,e,t,a){var i=r?e.pointToData([t[0][0],t[1][0]],a):e.dataToPoint([t[0][0],t[1][0]],a),n=r?e.pointToData([t[0][1],t[1][1]],a):e.dataToPoint([t[0][1],t[1][1]],a),o=[k0([i[0],n[0]]),k0([i[1],n[1]])];return{values:o,xyMinMax:o}},polygon:function(r,e,t,a){var i=[[1/0,-1/0],[1/0,-1/0]],n=U(t,function(o){var s=r?e.pointToData(o,a):e.dataToPoint(o,a);return i[0][0]=Math.min(i[0][0],s[0]),i[1][0]=Math.min(i[1][0],s[1]),i[0][1]=Math.max(i[0][1],s[0]),i[1][1]=Math.max(i[1][1],s[1]),s});return{values:n,xyMinMax:i}}};function V2(r,e,t,a){var i=t.getAxis(["x","y"][r]),n=k0(U([0,1],function(s){return e?i.coordToData(i.toLocalCoord(a[s]),!0):i.toGlobalCoord(i.dataToCoord(a[s]))})),o=[];return o[r]=n,o[1-r]=[NaN,NaN],{values:n,xyMinMax:o}}var G2={lineX:pt(F2,0),lineY:pt(F2,1),rect:function(r,e,t){return[[r[0][0]-t[0]*e[0][0],r[0][1]-t[0]*e[0][1]],[r[1][0]-t[1]*e[1][0],r[1][1]-t[1]*e[1][1]]]},polygon:function(r,e,t){return U(r,function(a,i){return[a[0]-t[0]*e[i][0],a[1]-t[1]*e[i][1]]})}};function F2(r,e,t,a){return[e[0]-a[r]*t[0],e[1]-a[r]*t[1]]}function U7(r,e){var t=H2(r),a=H2(e),i=[t[0]/a[0],t[1]/a[1]];return isNaN(i[0])&&(i[0]=1),isNaN(i[1])&&(i[1]=1),i}function H2(r){return r?[r[0][1]-r[0][0],r[1][1]-r[1][0]]:[NaN,NaN]}var E0=M,Y7=PE("toolbox-dataZoom_"),Z7=function(r){z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,a,i,n){this._brushController||(this._brushController=new xm(i.getZr()),this._brushController.on("brush",X(this._onBrush,this)).mount()),q7(t,a,this,n,i),X7(t,a)},e.prototype.onclick=function(t,a,i){$7[i].call(this)},e.prototype.remove=function(t,a){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(t,a){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(t){var a=t.areas;if(!t.isEnd||!a.length)return;var i={},n=this.ecModel;this._brushController.updateCovers([]);var o=new P0(O0(this.model),n,{include:["grid"]});o.matchOutputRanges(a,n,function(u,h,f){if(f.type==="cartesian2d"){var v=u.brushType;v==="rect"?(s("x",f,h[0]),s("y",f,h[1])):s({lineX:"x",lineY:"y"}[v],f,h)}}),B7(n,i),this._dispatchZoomAction(i);function s(u,h,f){var v=h.getAxis(u),c=v.model,d=l(u,c,n),p=d.findRepresentativeAxisProxy(c).getMinMaxSpan();(p.minValueSpan!=null||p.maxValueSpan!=null)&&(f=Pi(0,f.slice(),v.scale.getExtent(),0,p.minValueSpan,p.maxValueSpan)),d&&(i[d.id]={dataZoomId:d.id,startValue:f[0],endValue:f[1]})}function l(u,h,f){var v;return f.eachComponent({mainType:"dataZoom",subType:"select"},function(c){var d=c.getAxisModel(u,h.componentIndex);d&&(v=c)}),v}},e.prototype._dispatchZoomAction=function(t){var a=[];E0(t,function(i,n){a.push(at(i))}),a.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:a})},e.getDefaultOption=function(t){var a={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:t.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:B.color.backgroundTint}};return a},e}(Pr),$7={zoom:function(){var r=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:r})},back:function(){this._dispatchZoomAction(z7(this.ecModel))}};function O0(r){var e={xAxisIndex:r.get("xAxisIndex",!0),yAxisIndex:r.get("yAxisIndex",!0),xAxisId:r.get("xAxisId",!0),yAxisId:r.get("yAxisId",!0)};return e.xAxisIndex==null&&e.xAxisId==null&&(e.xAxisIndex="all"),e.yAxisIndex==null&&e.yAxisId==null&&(e.yAxisIndex="all"),e}function X7(r,e){r.setIconStatus("back",G7(e)>1?"emphasis":"normal")}function q7(r,e,t,a,i){var n=t._isZoomActive;a&&a.type==="takeGlobalCursor"&&(n=a.key==="dataZoomSelect"?a.dataZoomSelectActive:!1),t._isZoomActive=n,r.setIconStatus("zoom",n?"emphasis":"normal");var o=new P0(O0(r),e,{include:["grid"]}),s=o.makePanelOpts(i,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});t._brushController.setPanels(s).enableBrush(n&&s.length?{brushType:"auto",brushStyle:r.getModel("brushStyle").getItemStyle()}:!1)}SB("dataZoom",function(r){var e=r.getComponent("toolbox",0),t=["feature","dataZoom"];if(!e||e.get(t)==null)return;var a=e.getModel(t),i=[],n=O0(a),o=wo(r,n);E0(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),E0(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,h){var f=l.componentIndex,v={type:"select",$fromToolbox:!0,filterMode:a.get("filterMode",!0)||"filter",id:Y7+u+f};v[h]=f,i.push(v)}return i});function K7(r){r.registerComponentModel(S7),r.registerComponentView(b7),bs("saveAsImage",T7),bs("magicType",A7),bs("dataView",O7),bs("dataZoom",Z7),bs("restore",F7),mt(x7)}var j7=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:B.color.neutral00,shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:B.color.border,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:B.color.borderShade,width:1,type:"dashed",textStyle:{}}},textStyle:{color:B.color.tertiary,fontSize:14}},e}(Tt);function W2(r){var e=r.get("confine");return e!=null?!!e:r.get("renderMode")==="richText"}function U2(r){if(Pt.domSupported){for(var e=document.documentElement.style,t=0,a=r.length;t<a;t++)if(r[t]in e)return r[t]}}var Y2=U2(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),J7=U2(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);function Z2(r,e){if(!r)return e;e=jS(e,!0);var t=r.indexOf(e);return r=t===-1?e:"-"+r.slice(0,t)+"-"+e,r.toLowerCase()}function Q7(r,e){var t=r.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(r);return t?e?t[e]:t:null}var t9=Z2(J7,"transition"),N0=Z2(Y2,"transform"),e9="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(Pt.transform3dSupported?"will-change:transform;":"");function r9(r){return r=r==="left"?"right":r==="right"?"left":r==="top"?"bottom":"top",r}function a9(r,e,t){if(!$(t)||t==="inside")return"";var a=r.get("backgroundColor"),i=r.get("borderWidth");e=wn(e);var n=r9(t),o=Math.max(Math.round(i)*1.5,6),s="",l=N0+":",u;gt(["left","right"],n)>-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=n==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=n==="top"?225:45)+"deg)");var h=u*Math.PI/180,f=o+i,v=f*Math.abs(Math.cos(h))+f*Math.abs(Math.sin(h)),c=Math.round(((v-Math.SQRT2*i)/2+Math.SQRT2*i-(v-f)/2)*100)/100;s+=";"+n+":-"+c+"px";var d=e+" solid "+i+"px;",p=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+d,"border-right:"+d,"background-color:"+a+";"];return'<div style="'+p.join("")+'"></div>'}function i9(r,e,t){var a="cubic-bezier(0.23,1,0.32,1)",i="",n="";return t&&(i=" "+r/2+"s "+a,n="opacity"+i+",visibility"+i),e||(i=" "+r+"s "+a,n+=(n.length?",":"")+(Pt.transformSupported?""+N0+i:",left"+i+",top"+i)),t9+":"+n}function $2(r,e,t){var a=r.toFixed(0)+"px",i=e.toFixed(0)+"px";if(!Pt.transformSupported)return t?"top:"+i+";left:"+a+";":[["top",i],["left",a]];var n=Pt.transform3dSupported,o="translate"+(n?"3d":"")+"("+a+","+i+(n?",0":"")+")";return t?"top:0;left:0;"+N0+":"+o+";":[["top",0],["left",0],[Y2,o]]}function n9(r){var e=[],t=r.get("fontSize"),a=r.getTextColor();a&&e.push("color:"+a),e.push("font:"+r.getFont());var i=Q(r.get("lineHeight"),Math.round(t*3/2));t&&e.push("line-height:"+i+"px");var n=r.get("textShadowColor"),o=r.get("textShadowBlur")||0,s=r.get("textShadowOffsetX")||0,l=r.get("textShadowOffsetY")||0;return n&&o&&e.push("text-shadow:"+s+"px "+l+"px "+o+"px "+n),M(["decoration","align"],function(u){var h=r.get(u);h&&e.push("text-"+u+":"+h)}),e.join(";")}function o9(r,e,t,a){var i=[],n=r.get("transitionDuration"),o=r.get("backgroundColor"),s=r.get("shadowBlur"),l=r.get("shadowColor"),u=r.get("shadowOffsetX"),h=r.get("shadowOffsetY"),f=r.getModel("textStyle"),v=hw(r,"html"),c=u+"px "+h+"px "+s+"px "+l;return i.push("box-shadow:"+c),e&&n>0&&i.push(i9(n,t,a)),o&&i.push("background-color:"+o),M(["width","color","radius"],function(d){var p="border-"+d,g=jS(p),y=r.get(g);y!=null&&i.push(p+":"+y+(d==="color"?"":"px"))}),i.push(n9(f)),v!=null&&i.push("padding:"+hl(v).join("px ")+"px"),i.join(";")+";"}function X2(r,e,t,a,i){var n=e&&e.painter;if(t){var o=n&&n.getViewportRoot();o&&Qk(r,o,t,a,i)}else{r[0]=a,r[1]=i;var s=n&&n.getViewportRootOffset();s&&(r[0]+=s.offsetLeft,r[1]+=s.offsetTop)}r[2]=r[0]/e.getWidth(),r[3]=r[1]/e.getHeight()}var s9=function(){function r(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,Pt.wxa)return null;var a=document.createElement("div");a.domBelongToZr=!0,this.el=a;var i=this._zr=e.getZr(),n=t.appendTo,o=n&&($(n)?document.querySelector(n):uo(n)?n:rt(n)&&n(e.getDom()));X2(this._styleCoord,i,o,e.getWidth()/2,e.getHeight()/2),(o||e.getDom()).appendChild(a),this._api=e,this._container=o;var s=this;a.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},a.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=i.handler,h=i.painter.getViewportRoot();pr(h,l,!0),u.dispatch("mousemove",l)}},a.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return r.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),a=Q7(t,"position"),i=t.style;i.position!=="absolute"&&a!=="absolute"&&(i.position="relative")}var n=e.get("alwaysShowContent");n&&this._moveIfResized(),this._alwaysShowContent=n,this._enableDisplayTransition=e.get("displayTransition")&&e.get("transitionDuration")>0,this.el.className=e.get("className")||""},r.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var a=this.el,i=a.style,n=this._styleCoord;a.innerHTML?i.cssText=e9+o9(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+$2(n[0],n[1],!0)+("border-color:"+wn(t)+";")+(e.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):i.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},r.prototype.setContent=function(e,t,a,i,n){var o=this.el;if(e==null){o.innerHTML="";return}var s="";if($(n)&&a.get("trigger")==="item"&&!W2(a)&&(s=a9(a,i,n)),$(e))o.innerHTML=e+s;else if(e){o.innerHTML="",W(e)||(e=[e]);for(var l=0;l<e.length;l++)uo(e[l])&&e[l].parentNode!==o&&o.appendChild(e[l]);if(s&&o.childNodes.length){var u=document.createElement("div");u.innerHTML=s,o.appendChild(u)}}},r.prototype.setEnterable=function(e){this._enterable=e},r.prototype.getSize=function(){var e=this.el;return e?[e.offsetWidth,e.offsetHeight]:[0,0]},r.prototype.moveTo=function(e,t){if(this.el){var a=this._styleCoord;if(X2(a,this._zr,this._container,e,t),a[0]!=null&&a[1]!=null){var i=this.el.style,n=$2(a[0],a[1]);M(n,function(o){i[o[0]]=o[1]})}}},r.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},r.prototype.hide=function(){var e=this,t=this.el.style;this._enableDisplayTransition?(t.visibility="hidden",t.opacity="0"):t.display="none",Pt.transform3dSupported&&(t.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return e._longHide=!0},500)},r.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(X(this.hide,this),e)):this.hide())},r.prototype.isShow=function(){return this._show},r.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var e=this._zr;tR(e&&e.painter&&e.painter.getViewportRoot(),this._container);var t=this.el;if(t){t.onmouseenter=t.onmousemove=t.onmouseleave=null;var a=t.parentNode;a&&a.removeChild(t)}this.el=this._container=null},r}(),l9=function(){function r(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),K2(this._styleCoord,this._zr,e.getWidth()/2,e.getHeight()/2)}return r.prototype.update=function(e){var t=e.get("alwaysShowContent");t&&this._moveIfResized(),this._alwaysShowContent=t},r.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},r.prototype.setContent=function(e,t,a,i,n){var o=this;lt(e)&&Rt(""),this.el&&this._zr.remove(this.el);var s=a.getModel("textStyle");this.el=new Lt({style:{rich:t.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:i,textShadowColor:s.get("textShadowColor"),fill:a.get(["textStyle","color"]),padding:hw(a,"richText"),verticalAlign:"top",align:"left"},z:a.get("z")}),M(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(u){o.el.style[u]=a.get(u)}),M(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],function(u){o.el.style[u]=s.get(u)||0}),this._zr.add(this.el);var l=this;this.el.on("mouseover",function(){l._enterable&&(clearTimeout(l._hideTimeout),l._show=!0),l._inContent=!0}),this.el.on("mouseout",function(){l._enterable&&l._show&&l.hideLater(l._hideDelay),l._inContent=!1})},r.prototype.setEnterable=function(e){this._enterable=e},r.prototype.getSize=function(){var e=this.el,t=this.el.getBoundingRect(),a=q2(e.style);return[t.width+a.left+a.right,t.height+a.top+a.bottom]},r.prototype.moveTo=function(e,t){var a=this.el;if(a){var i=this._styleCoord;K2(i,this._zr,e,t),e=i[0],t=i[1];var n=a.style,o=Bi(n.borderWidth||0),s=q2(n);a.x=e+o+s.left,a.y=t+o+s.top,a.markRedraw()}},r.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},r.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},r.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(X(this.hide,this),e)):this.hide())},r.prototype.isShow=function(){return this._show},r.prototype.dispose=function(){this._zr.remove(this.el)},r}();function Bi(r){return Math.max(0,r)}function q2(r){var e=Bi(r.shadowBlur||0),t=Bi(r.shadowOffsetX||0),a=Bi(r.shadowOffsetY||0);return{left:Bi(e-t),right:Bi(e+t),top:Bi(e-a),bottom:Bi(e+a)}}function K2(r,e,t,a){r[0]=t,r[1]=a,r[2]=r[0]/e.getWidth(),r[3]=r[1]/e.getHeight()}var u9=new _t({shape:{x:-1,y:-1,width:2,height:2}}),h9=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a){if(!(Pt.node||!a.getDom())){var i=t.getComponent("tooltip"),n=this._renderMode=zE(i.get("renderMode"));this._tooltipContent=n==="richText"?new l9(a):new s9(a,{appendTo:i.get("appendToBody",!0)?"body":i.get("appendTo",!0)})}},e.prototype.render=function(t,a,i){if(!(Pt.node||!i.getDom())){this.group.removeAll(),this._tooltipModel=t,this._ecModel=a,this._api=i;var n=this._tooltipContent;n.update(t),n.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow(),this._renderMode!=="richText"&&t.get("transitionDuration")?Yo(this,"_updatePosition",50,"fixRate"):xl(this,"_updatePosition")}},e.prototype._initGlobalListener=function(){var t=this._tooltipModel,a=t.get("triggerOn");OI("itemTooltip",this._api,X(function(i,n,o){a!=="none"&&(a.indexOf(i)>=0?this._tryShow(n,o):i==="leave"&&this._hide(o))},this))},e.prototype._keepShow=function(){var t=this._tooltipModel,a=this._ecModel,i=this._api,n=t.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&n!=="none"&&n!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!i.isDisposed()&&o.manuallyShowTip(t,a,i,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},e.prototype.manuallyShowTip=function(t,a,i,n){if(!(n.from===this.uid||Pt.node||!i.getDom())){var o=j2(n,i);this._ticket="";var s=n.dataByCoordSys,l=d9(n,a,i);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:n.position,positionDefault:"bottom"},o)}else if(n.tooltip&&n.x!=null&&n.y!=null){var h=u9;h.x=n.x,h.y=n.y,h.update(),vt(h).tooltipConfig={name:null,option:n.tooltip},this._tryShow({offsetX:n.x,offsetY:n.y,target:h},o)}else if(s)this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,dataByCoordSys:s,tooltipOption:n.tooltipOption},o);else if(n.seriesIndex!=null){if(this._manuallyAxisShowTip(t,a,i,n))return;var f=BI(n,a),v=f.point[0],c=f.point[1];v!=null&&c!=null&&this._tryShow({offsetX:v,offsetY:c,target:f.el,position:n.position,positionDefault:"bottom"},o)}else n.x!=null&&n.y!=null&&(i.dispatchAction({type:"updateAxisPointer",x:n.x,y:n.y}),this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,target:i.getZr().findHover(n.x,n.y).target},o))}},e.prototype.manuallyHideTip=function(t,a,i,n){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,n.from!==this.uid&&this._hide(j2(n,i))},e.prototype._manuallyAxisShowTip=function(t,a,i,n){var o=n.seriesIndex,s=n.dataIndex,l=a.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=a.getSeriesByIndex(o);if(u){var h=u.getData(),f=xu([h.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(f.get("trigger")==="axis")return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:n.position}),!0}}},e.prototype._tryShow=function(t,a){var i=t.target,n=this._tooltipModel;if(n){this._lastX=t.offsetX,this._lastY=t.offsetY;var o=t.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,t);else if(i){var s=vt(i);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;Rn(i,function(h){if(h.tooltipDisabled)return l=u=null,!0;l||u||(vt(h).dataIndex!=null?l=h:vt(h).tooltipConfig!=null&&(u=h))},!0),l?this._showSeriesItemTooltip(t,l,a):u?this._showComponentItemTooltip(t,u,a):this._hide(a)}else this._lastDataByCoordSys=null,this._hide(a)}},e.prototype._showOrMove=function(t,a){var i=t.get("showDelay");a=X(a,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(a,i):a()},e.prototype._showAxisTooltip=function(t,a){var i=this._ecModel,n=this._tooltipModel,o=[a.offsetX,a.offsetY],s=xu([a.tooltipOption],n),l=this._renderMode,u=[],h=ue("section",{blocks:[],noHeader:!0}),f=[],v=new Kp;M(t,function(m){M(m.dataByAxis,function(_){var x=i.getComponent(_.axisDim+"Axis",_.axisIndex),b=_.value;if(!(!x||b==null)){var S=LI(b,x.axis,i,_.seriesDataIndices,_.valueLabelOpt),w=ue("section",{header:S,noHeader:!cr(S),sortBlocks:!0,blocks:[]});h.blocks.push(w),M(_.seriesDataIndices,function(T){var C=i.getSeriesByIndex(T.seriesIndex),A=T.dataIndexInside,D=C.getDataParams(A);if(!(D.dataIndex<0)){D.axisDim=_.axisDim,D.axisIndex=_.axisIndex,D.axisType=_.axisType,D.axisId=_.axisId,D.axisValue=kf(x.axis,{value:b}),D.axisValueLabel=S,D.marker=v.makeTooltipMarker("item",wn(D.color),l);var I=Ub(C.formatTooltip(A,!0,null)),L=I.frag;if(L){var P=xu([C],n).get("valueFormatter");w.blocks.push(P?F({valueFormatter:P},L):L)}I.text&&f.push(I.text),u.push(D)}})}})}),h.blocks.reverse(),f.reverse();var c=a.position,d=s.get("order"),p=sw(h,v,l,d,i.get("useUTC"),s.get("textStyle"));p&&f.unshift(p);var g=l==="richText"?`
86
+
87
+ `:"<br/>",y=f.join(g);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(t,u)?this._updatePosition(s,c,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,y,u,Math.random()+"",o[0],o[1],c,null,v)})},e.prototype._showSeriesItemTooltip=function(t,a,i){var n=this._ecModel,o=vt(a),s=o.seriesIndex,l=n.getSeriesByIndex(s),u=o.dataModel||l,h=o.dataIndex,f=o.dataType,v=u.getData(f),c=this._renderMode,d=t.positionDefault,p=xu([v.getItemModel(h),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,d?{position:d}:null),g=p.get("trigger");if(!(g!=null&&g!=="item")){var y=u.getDataParams(h,f),m=new Kp;y.marker=m.makeTooltipMarker("item",wn(y.color),c);var _=Ub(u.formatTooltip(h,!1,f)),x=p.get("order"),b=p.get("valueFormatter"),S=_.frag,w=S?sw(b?F({valueFormatter:b},S):S,m,c,x,n.get("useUTC"),p.get("textStyle")):_.text,T="item_"+u.name+"_"+h;this._showOrMove(p,function(){this._showTooltipContent(p,w,y,T,t.offsetX,t.offsetY,t.position,t.target,m)}),i({type:"showTip",dataIndexInside:h,dataIndex:v.getRawIndex(h),seriesIndex:s,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,a,i){var n=this._renderMode==="html",o=vt(a),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if($(l)){var h=l;l={content:h,formatter:h},u=!0}u&&n&&l.content&&(l=at(l),l.content=Oe(l.content));var f=[l],v=this._ecModel.getComponent(o.componentMainType,o.componentIndex);v&&f.push(v),f.push({formatter:l.content});var c=t.positionDefault,d=xu(f,this._tooltipModel,c?{position:c}:null),p=d.get("content"),g=Math.random()+"",y=new Kp;this._showOrMove(d,function(){var m=at(d.get("formatterParams")||{});this._showTooltipContent(d,p,m,g,t.offsetX,t.offsetY,t.position,a,y)}),i({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,a,i,n,o,s,l,u,h){if(this._ticket="",!(!t.get("showContent")||!t.get("show"))){var f=this._tooltipContent;f.setEnterable(t.get("enterable"));var v=t.get("formatter");l=l||t.get("position");var c=a,d=this._getNearestPoint([o,s],i,t.get("trigger"),t.get("borderColor"),t.get("defaultBorderColor",!0)),p=d.color;if(v)if($(v)){var g=t.ecModel.get("useUTC"),y=W(i)?i[0]:i,m=y&&y.axisType&&y.axisType.indexOf("time")>=0;c=v,m&&(c=qh(y.axisValue,c,g)),c=QS(c,i,!0)}else if(rt(v)){var _=X(function(x,b){x===this._ticket&&(f.setContent(b,h,t,p,l),this._updatePosition(t,l,o,s,f,i,u))},this);this._ticket=n,c=v(i,n,_)}else c=v;f.setContent(c,h,t,p,l),f.show(t,p),this._updatePosition(t,l,o,s,f,i,u)}},e.prototype._getNearestPoint=function(t,a,i,n,o){if(i==="axis"||W(a))return{color:n||o};if(!W(a))return{color:n||a.color||a.borderColor}},e.prototype._updatePosition=function(t,a,i,n,o,s,l){var u=this._api.getWidth(),h=this._api.getHeight();a=a||t.get("position");var f=o.getSize(),v=t.get("align"),c=t.get("verticalAlign"),d=l&&l.getBoundingRect().clone();if(l&&d.applyTransform(l.transform),rt(a)&&(a=a([i,n],s,o.el,d,{viewSize:[u,h],contentSize:f.slice()})),W(a))i=Z(a[0],u),n=Z(a[1],h);else if(lt(a)){var p=a;p.width=f[0],p.height=f[1];var g=qt(p,{width:u,height:h});i=g.x,n=g.y,v=null,c=null}else if($(a)&&l){var y=c9(a,d,f,t.get("borderWidth"));i=y[0],n=y[1]}else{var y=f9(i,n,o,u,h,v?null:20,c?null:20);i=y[0],n=y[1]}if(v&&(i-=J2(v)?f[0]/2:v==="right"?f[0]:0),c&&(n-=J2(c)?f[1]/2:c==="bottom"?f[1]:0),W2(t)){var y=v9(i,n,o,u,h);i=y[0],n=y[1]}o.moveTo(i,n)},e.prototype._updateContentNotChangedOnAxis=function(t,a){var i=this._lastDataByCoordSys,n=this._cbParamsList,o=!!i&&i.length===t.length;return o&&M(i,function(s,l){var u=s.dataByAxis||[],h=t[l]||{},f=h.dataByAxis||[];o=o&&u.length===f.length,o&&M(u,function(v,c){var d=f[c]||{},p=v.seriesDataIndices||[],g=d.seriesDataIndices||[];o=o&&v.value===d.value&&v.axisType===d.axisType&&v.axisId===d.axisId&&p.length===g.length,o&&M(p,function(y,m){var _=g[m];o=o&&y.seriesIndex===_.seriesIndex&&y.dataIndex===_.dataIndex}),n&&M(v.seriesDataIndices,function(y){var m=y.seriesIndex,_=a[m],x=n[m];_&&x&&x.data!==_.data&&(o=!1)})})}),this._lastDataByCoordSys=t,this._cbParamsList=a,!!o},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,a){Pt.node||!a.getDom()||(xl(this,"_updatePosition"),this._tooltipContent.dispose(),u0("itemTooltip",a))},e.type="tooltip",e}(Zt);function xu(r,e,t){var a=e.ecModel,i;t?(i=new Ct(t,a,a),i=new Ct(e.option,i,a)):i=e;for(var n=r.length-1;n>=0;n--){var o=r[n];o&&(o instanceof Ct&&(o=o.get("tooltip",!0)),$(o)&&(o={formatter:o}),o&&(i=new Ct(o,i,a)))}return i}function j2(r,e){return r.dispatchAction||X(e.dispatchAction,e)}function f9(r,e,t,a,i,n,o){var s=t.getSize(),l=s[0],u=s[1];return n!=null&&(r+l+n+2>a?r-=l+n:r+=n),o!=null&&(e+u+o>i?e-=u+o:e+=o),[r,e]}function v9(r,e,t,a,i){var n=t.getSize(),o=n[0],s=n[1];return r=Math.min(r+o,a)-o,e=Math.min(e+s,i)-s,r=Math.max(r,0),e=Math.max(e,0),[r,e]}function c9(r,e,t,a){var i=t[0],n=t[1],o=Math.ceil(Math.SQRT2*a)+8,s=0,l=0,u=e.width,h=e.height;switch(r){case"inside":s=e.x+u/2-i/2,l=e.y+h/2-n/2;break;case"top":s=e.x+u/2-i/2,l=e.y-n-o;break;case"bottom":s=e.x+u/2-i/2,l=e.y+h+o;break;case"left":s=e.x-i-o,l=e.y+h/2-n/2;break;case"right":s=e.x+u+o,l=e.y+h/2-n/2}return[s,l]}function J2(r){return r==="center"||r==="middle"}function d9(r,e,t){var a=gd(r).queryOptionMap,i=a.keys()[0];if(!(!i||i==="series")){var n=To(e,i,a.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),o=n.models[0];if(o){var s=t.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var h=vt(u).tooltipConfig;if(h&&h.name===r.name)return l=u,!0}),l)return{componentMainType:i,componentIndex:o.componentIndex,el:l}}}}function p9(r){mt(gu),r.registerComponentModel(j7),r.registerComponentView(h9),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Qt),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Qt)}var g9=["rect","polygon","keep","clear"];function y9(r,e){var t=Vt(r?r.brush:[]);if(t.length){var a=[];M(t,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(a=a.concat(u))});var i=r&&r.toolbox;W(i)&&(i=i[0]),i||(i={feature:{}},r.toolbox=[i]);var n=i.feature||(i.feature={}),o=n.brush||(n.brush={}),s=o.type||(o.type=[]);s.push.apply(s,a),m9(s),e&&!s.length&&s.push.apply(s,g9)}}function m9(r){var e={};M(r,function(t){e[t]=1}),r.length=0,M(e,function(t,a){r.push(a)})}var Q2=M;function tP(r){if(r){for(var e in r)if(r.hasOwnProperty(e))return!0}}function B0(r,e,t){var a={};return Q2(e,function(n){var o=a[n]=i();Q2(r[n],function(s,l){if(_e.isValidType(l)){var u={type:l,visual:s};t&&t(u,n),o[l]=new _e(u),l==="opacity"&&(u=at(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new _e(u))}})}),a;function i(){var n=function(){};n.prototype.__hidden=n.prototype;var o=new n;return o}}function eP(r,e,t){var a;M(t,function(i){e.hasOwnProperty(i)&&tP(e[i])&&(a=!0)}),a&&M(t,function(i){e.hasOwnProperty(i)&&tP(e[i])?r[i]=at(e[i]):delete r[i]})}function _9(r,e,t,a,i,n){var o={};M(r,function(f){var v=_e.prepareVisualTypes(e[f]);o[f]=v});var s;function l(f){return tg(t,s,f)}function u(f,v){Iw(t,s,f,v)}n==null?t.each(h):t.each([n],h);function h(f,v){s=n==null?f:v;var c=t.getRawDataItem(s);if(!(c&&c.visualMap===!1))for(var d=a.call(i,f),p=e[d],g=o[d],y=0,m=g.length;y<m;y++){var _=g[y];p[_]&&p[_].applyVisual(f,l,u)}}}function x9(r,e,t,a){var i={};return M(r,function(n){var o=_e.prepareVisualTypes(e[n]);i[n]=o}),{progress:function(o,s){var l;a!=null&&(l=s.getDimensionIndex(a));function u(b){return tg(s,f,b)}function h(b,S){Iw(s,f,b,S)}for(var f,v=s.getStore();(f=o.next())!=null;){var c=s.getRawDataItem(f);if(!(c&&c.visualMap===!1))for(var d=a!=null?v.get(l,f):f,p=t(d),g=e[p],y=i[p],m=0,_=y.length;m<_;m++){var x=y[m];g[x]&&g[x].applyVisual(d,u,h)}}}}}function S9(r){var e=r.brushType,t={point:function(a){return rP[e].point(a,t,r)},rect:function(a){return rP[e].rect(a,t,r)}};return t}var rP={lineX:aP(0),lineY:aP(1),rect:{point:function(r,e,t){return r&&t.boundingRect.contain(r[0],r[1])},rect:function(r,e,t){return r&&t.boundingRect.intersect(r)}},polygon:{point:function(r,e,t){return r&&t.boundingRect.contain(r[0],r[1])&&Vn(t.range,r[0],r[1])},rect:function(r,e,t){var a=t.range;if(!r||a.length<=1)return!1;var i=r.x,n=r.y,o=r.width,s=r.height,l=a[0];if(Vn(a,i,n)||Vn(a,i+o,n)||Vn(a,i,n+s)||Vn(a,i+o,n+s)||ht.create(r).contain(l[0],l[1])||ol(i,n,i+o,n,a)||ol(i,n,i,n+s,a)||ol(i+o,n,i+o,n+s,a)||ol(i,n+s,i+o,n+s,a))return!0}}};function aP(r){var e=["x","y"],t=["width","height"];return{point:function(a,i,n){if(a){var o=n.range,s=a[r];return Su(s,o)}},rect:function(a,i,n){if(a){var o=n.range,s=[a[e[r]],a[e[r]]+a[t[r]]];return s[1]<s[0]&&s.reverse(),Su(s[0],o)||Su(s[1],o)||Su(o[0],s)||Su(o[1],s)}}}}function Su(r,e){return e[0]<=r&&r<=e[1]}var iP=["inBrush","outOfBrush"],z0="__ecBrushSelect",V0="__ecInBrushSelectEvent";function nP(r){r.eachComponent({mainType:"brush"},function(e){var t=e.brushTargetManager=new P0(e.option,r);t.setInputRanges(e.areas,r)})}function b9(r,e,t){var a=[],i,n;r.eachComponent({mainType:"brush"},function(o){t&&t.type==="takeGlobalCursor"&&o.setBrushOption(t.key==="brush"?t.brushOption:{brushType:!1})}),nP(r),r.eachComponent({mainType:"brush"},function(o,s){var l={brushId:o.id,brushIndex:s,brushName:o.name,areas:at(o.areas),selected:[]};a.push(l);var u=o.option,h=u.brushLink,f=[],v=[],c=[],d=!1;s||(i=u.throttleType,n=u.throttleDelay);var p=U(o.areas,function(b){var S=A9[b.brushType],w=st({boundingRect:S?S(b):void 0},b);return w.selectors=S9(w),w}),g=B0(o.option,iP,function(b){b.mappingMethod="fixed"});W(h)&&M(h,function(b){f[b]=1});function y(b){return h==="all"||!!f[b]}function m(b){return!!b.length}r.eachSeries(function(b,S){var w=c[S]=[];b.subType==="parallel"?_(b,S):x(b,S,w)});function _(b,S){var w=b.coordinateSystem;d=d||w.hasAxisBrushed(),y(S)&&w.eachActiveState(b.getData(),function(T,C){T==="active"&&(v[C]=1)})}function x(b,S,w){if(!(!b.brushSelector||C9(o,S))&&(M(p,function(C){o.brushTargetManager.controlSeries(C,b,r)&&w.push(C),d=d||m(w)}),y(S)&&m(w))){var T=b.getData();T.each(function(C){oP(b,w,T,C)&&(v[C]=1)})}}r.eachSeries(function(b,S){var w={seriesId:b.id,seriesIndex:S,seriesName:b.name,dataIndex:[]};l.selected.push(w);var T=c[S],C=b.getData(),A=y(S)?function(D){return v[D]?(w.dataIndex.push(C.getRawIndex(D)),"inBrush"):"outOfBrush"}:function(D){return oP(b,T,C,D)?(w.dataIndex.push(C.getRawIndex(D)),"inBrush"):"outOfBrush"};(y(S)?d:m(T))&&_9(iP,g,C,A)})}),w9(e,i,n,a,t)}function w9(r,e,t,a,i){if(i){var n=r.getZr();if(!n[V0]){n[z0]||(n[z0]=T9);var o=Yo(n,z0,t,e);o(r,a)}}}function T9(r,e){if(!r.isDisposed()){var t=r.getZr();t[V0]=!0,r.dispatchAction({type:"brushSelect",batch:e}),t[V0]=!1}}function oP(r,e,t,a){for(var i=0,n=e.length;i<n;i++){var o=e[i];if(r.brushSelector(a,t,o.selectors,o))return!0}}function C9(r,e){var t=r.option.seriesIndex;return t!=null&&t!=="all"&&(W(t)?gt(t,e)<0:e!==t)}var A9={rect:function(r){return sP(r.range)},polygon:function(r){for(var e,t=r.range,a=0,i=t.length;a<i;a++){e=e||[[1/0,-1/0],[1/0,-1/0]];var n=t[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&&sP(e)}};function sP(r){return new ht(r[0][0],r[1][0],r[0][1]-r[0][0],r[1][1]-r[1][0])}var M9=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a){this.ecModel=t,this.api=a,this.model,(this._brushController=new xm(a.getZr())).on("brush",X(this._onBrush,this)).mount()},e.prototype.render=function(t,a,i,n){this.model=t,this._updateController(t,a,i,n)},e.prototype.updateTransform=function(t,a,i,n){nP(a),this._updateController(t,a,i,n)},e.prototype.updateVisual=function(t,a,i,n){this.updateTransform(t,a,i,n)},e.prototype.updateView=function(t,a,i,n){this._updateController(t,a,i,n)},e.prototype._updateController=function(t,a,i,n){(!n||n.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(i)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var a=this.model.id,i=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:a,areas:at(i),$from:a}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:a,areas:at(i),$from:a})},e.type="brush",e}(Zt),D9=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.areas=[],t.brushOption={},t}return e.prototype.optionUpdated=function(t,a){var i=this.option;!a&&eP(i,t,["inBrush","outOfBrush"]);var n=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:this.option.defaultOutOfBrushColor},n.hasOwnProperty("liftZ")||(n.liftZ=5)},e.prototype.setAreas=function(t){t&&(this.areas=U(t,function(a){return lP(this.option,a)},this))},e.prototype.setBrushOption=function(t){this.brushOption=lP(this.option,t),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:B.color.backgroundTint,borderColor:B.color.borderTint},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4,defaultOutOfBrushColor:B.color.disabled},e}(Tt);function lP(r,e){return yt({brushType:r.brushType,brushMode:r.brushMode,transformable:r.transformable,brushStyle:new Ct(r.brushStyle).getItemStyle(),removeOnClick:r.removeOnClick,z:r.z},e,!0)}var L9=["rect","polygon","lineX","lineY","keep","clear"],I9=function(r){z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,a,i){var n,o,s;a.eachComponent({mainType:"brush"},function(l){n=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=n,this._brushMode=o,M(t.get("type",!0),function(l){t.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===n)?"emphasis":"normal")})},e.prototype.updateView=function(t,a,i){this.render(t,a,i)},e.prototype.getIcons=function(){var t=this.model,a=t.get("icon",!0),i={};return M(t.get("type",!0),function(n){a[n]&&(i[n]=a[n])}),i},e.prototype.onclick=function(t,a,i){var n=this._brushType,o=this._brushMode;i==="clear"?(a.dispatchAction({type:"axisAreaSelect",intervals:[]}),a.dispatchAction({type:"brush",command:"clear",areas:[]})):a.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:i==="keep"?n:n===i?!1:i,brushMode:i==="keep"?o==="multiple"?"single":"multiple":o}})},e.getDefaultOption=function(t){var a={show:!0,type:L9.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:t.getLocaleModel().get(["toolbox","brush","title"])};return a},e}(Pr);function P9(r){r.registerComponentView(M9),r.registerComponentModel(D9),r.registerPreprocessor(y9),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,b9),r.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(a){a.setAreas(e.areas)})}),r.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},Qt),r.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},Qt),bs("brush",I9)}var k9=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode={type:"box",ignoreSize:!0},t}return e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:"center",top:B.size.m,backgroundColor:B.color.transparent,borderColor:B.color.primary,borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:B.color.primary},subtextStyle:{fontSize:12,color:B.color.quaternary}},e}(Tt),R9=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,i){if(this.group.removeAll(),!!t.get("show")){var n=this.group,o=t.getModel("textStyle"),s=t.getModel("subtextStyle"),l=t.get("textAlign"),u=Q(t.get("textBaseline"),t.get("textVerticalAlign")),h=new Lt({style:Ft(o,{text:t.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),f=h.getBoundingRect(),v=t.get("subtext"),c=new Lt({style:Ft(s,{text:v,fill:s.getTextColor(),y:f.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),d=t.get("link"),p=t.get("sublink"),g=t.get("triggerEvent",!0);h.silent=!d&&!g,c.silent=!p&&!g,d&&h.on("click",function(){Kh(d,"_"+t.get("target"))}),p&&c.on("click",function(){Kh(p,"_"+t.get("subtarget"))}),vt(h).eventData=vt(c).eventData=g?{componentType:"title",componentIndex:t.componentIndex}:null,n.add(h),v&&n.add(c);var y=n.getBoundingRect(),m=t.getBoxLayoutParams();m.width=y.width,m.height=y.height;var _=de(t,i),x=qt(m,_.refContainer,t.get("padding"));l||(l=t.get("left")||t.get("right"),l==="middle"&&(l="center"),l==="right"?x.x+=x.width:l==="center"&&(x.x+=x.width/2)),u||(u=t.get("top")||t.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?x.y+=x.height:u==="middle"&&(x.y+=x.height/2),u=u||"top"),n.x=x.x,n.y=x.y,n.markRedraw();var b={align:l,verticalAlign:u};h.setStyle(b),c.setStyle(b),y=n.getBoundingRect();var S=x.margin,w=t.getItemStyle(["color","opacity"]);w.fill=t.get("backgroundColor");var T=new _t({shape:{x:y.x-S[3],y:y.y-S[0],width:y.width+S[1]+S[3],height:y.height+S[0]+S[2],r:t.get("borderRadius")},style:w,subPixelOptimize:!0,silent:!0});n.add(T)}},e.type="title",e}(Zt);function E9(r){r.registerComponentModel(k9),r.registerComponentView(R9)}var uP=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode="box",t}return e.prototype.init=function(t,a,i){this.mergeDefaultAndTheme(t,i),this._initData()},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(t){t==null&&(t=this.option.currentIndex);var a=this._data.count();this.option.loop?t=(t%a+a)%a:(t>=a&&(t=a-1),t<0&&(t=0)),this.option.currentIndex=t},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(t){this.option.autoPlay=!!t},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var t=this.option,a=t.data||[],i=t.axisType,n=this._names=[],o;i==="category"?(o=[],M(a,function(u,h){var f=fe(bo(u),""),v;lt(u)?(v=at(u),v.value=h):v=h,o.push(v),n.push(f)})):o=a;var s={category:"ordinal",time:"time",value:"number"}[i]||"number",l=this._data=new Ue([{name:"value",type:s}],this);l.initData(o,n)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:B.size.m,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:B.color.secondary},data:[]},e}(Tt),hP=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline.slider",e.defaultOption=yi(uP.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:B.color.border,borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:B.color.accent10},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:B.color.tertiary},itemStyle:{color:B.color.accent20,borderWidth:0},checkpointStyle:{symbol:"circle",symbolSize:15,color:B.color.accent50,borderColor:B.color.accent50,borderWidth:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"rgba(0, 0, 0, 0)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10.6699C11.5 9.90014 12.3333 9.41887 13 9.80371L20.5 14.1338C21.1667 14.5187 21.1667 15.4813 20.5 15.8662L13 20.1963C12.3333 20.5811 11.5 20.0999 11.5 19.3301V10.6699Z",stopIcon:"path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10C12.3284 10 13 10.6716 13 11.5V18.5C13 19.3284 12.3284 20 11.5 20C10.6716 20 10 19.3284 10 18.5V11.5C10 10.6716 10.6716 10 11.5 10ZM18.5 10C19.3284 10 20 10.6716 20 11.5V18.5C20 19.3284 19.3284 20 18.5 20C17.6716 20 17 19.3284 17 18.5V11.5C17 10.6716 17.6716 10 18.5 10Z",nextIcon:"path://M0.838834 18.7383C0.253048 18.1525 0.253048 17.2028 0.838834 16.617L7.55635 9.89949L0.838834 3.18198C0.253048 2.59619 0.253048 1.64645 0.838834 1.06066C1.42462 0.474874 2.37437 0.474874 2.96015 1.06066L10.7383 8.83883L10.8412 8.95277C11.2897 9.50267 11.2897 10.2963 10.8412 10.8462L10.7383 10.9602L2.96015 18.7383C2.37437 19.3241 1.42462 19.3241 0.838834 18.7383Z",prevIcon:"path://M10.9602 1.06066C11.5459 1.64645 11.5459 2.59619 10.9602 3.18198L4.24264 9.89949L10.9602 16.617C11.5459 17.2028 11.5459 18.1525 10.9602 18.7383C10.3744 19.3241 9.42462 19.3241 8.83883 18.7383L1.06066 10.9602L0.957771 10.8462C0.509245 10.2963 0.509245 9.50267 0.957771 8.95277L1.06066 8.83883L8.83883 1.06066C9.42462 0.474874 10.3744 0.474874 10.9602 1.06066Z",prevBtnSize:18,nextBtnSize:18,color:B.color.accent50,borderColor:B.color.accent50,borderWidth:0},emphasis:{label:{show:!0,color:B.color.accent60},itemStyle:{color:B.color.accent60,borderColor:B.color.accent60},controlStyle:{color:B.color.accent70,borderColor:B.color.accent70}},progress:{lineStyle:{color:B.color.accent30},itemStyle:{color:B.color.accent40}},data:[]}),e}(uP);ie(hP,af.prototype);var O9=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline",e}(Zt),N9=function(r){z(e,r);function e(t,a,i,n){var o=r.call(this,t,a,i)||this;return o.type=n||"value",o}return e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},e}(Yr),G0=Math.PI,fP=St(),B9=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a){this.api=a},e.prototype.render=function(t,a,i){if(this.model=t,this.api=i,this.ecModel=a,this.group.removeAll(),t.get("show",!0)){var n=this._layout(t,i),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(n,t);t.formatTooltip=function(u){var h=l.scale.getLabel({value:u});return ue("nameValue",{noName:!0,value:h})},M(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](n,o,l,t)},this),this._renderAxisLabel(n,s,l,t),this._position(n,t)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(t,a){var i=t.get(["label","position"]),n=t.get("orient"),o=V9(t,a),s;i==null||i==="auto"?s=n==="horizontal"?o.y+o.height/2<a.getHeight()/2?"-":"+":o.x+o.width/2<a.getWidth()/2?"+":"-":$(i)?s={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[n][i]:s=i;var l={horizontal:"center",vertical:s>=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},h={horizontal:0,vertical:G0/2},f=n==="vertical"?o.height:o.width,v=t.getModel("controlStyle"),c=v.get("show",!0),d=c?v.get("itemSize"):0,p=c?v.get("itemGap"):0,g=d+p,y=t.get(["label","rotate"])||0;y=y*G0/180;var m,_,x,b=v.get("position",!0),S=c&&v.get("showPlayBtn",!0),w=c&&v.get("showPrevBtn",!0),T=c&&v.get("showNextBtn",!0),C=0,A=f;b==="left"||b==="bottom"?(S&&(m=[0,0],C+=g),w&&(_=[C,0],C+=g),T&&(x=[A-d,0],A-=g)):(S&&(m=[A-d,0],A-=g),w&&(_=[0,0],C+=g),T&&(x=[A-d,0],A-=g));var D=[C,A];return t.get("inverse")&&D.reverse(),{viewRect:o,mainLength:f,orient:n,rotation:h[n],labelRotation:y,labelPosOpt:s,labelAlign:t.get(["label","align"])||l[n],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||u[n],playPosition:m,prevBtnPosition:_,nextBtnPosition:x,axisExtent:D,controlSize:d,controlGap:p}},e.prototype._position=function(t,a){var i=this._mainGroup,n=this._labelGroup,o=t.viewRect;if(t.orient==="vertical"){var s=Se(),l=o.x,u=o.y+o.height;Kr(s,s,[-l,-u]),ri(s,s,-G0/2),Kr(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var h=m(o),f=m(i.getBoundingRect()),v=m(n.getBoundingRect()),c=[i.x,i.y],d=[n.x,n.y];d[0]=c[0]=h[0][0];var p=t.labelPosOpt;if(p==null||$(p)){var g=p==="+"?0:1;_(c,f,h,1,g),_(d,v,h,1,1-g)}else{var g=p>=0?0:1;_(c,f,h,1,g),d[1]=c[1]+p}i.setPosition(c),n.setPosition(d),i.rotation=n.rotation=t.rotation,y(i),y(n);function y(x){x.originX=h[0][0]-x.x,x.originY=h[1][0]-x.y}function m(x){return[[x.x,x.x+x.width],[x.y,x.y+x.height]]}function _(x,b,S,w,T){x[w]+=S[w][T]-b[w][T]}},e.prototype._createAxis=function(t,a){var i=a.getData(),n=a.get("axisType"),o=z9(a,n);o.getTicks=function(){return i.mapArray(["value"],function(u){return{value:u}})};var s=i.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new N9("value",o,t.axisExtent,n);return l.model=a,l},e.prototype._createGroup=function(t){var a=this[t]=new et;return this.group.add(a),a},e.prototype._renderAxisLine=function(t,a,i,n){var o=i.getExtent();if(n.get(["lineStyle","show"])){var s=new Kt({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:F({lineCap:"round"},n.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});a.add(s);var l=this._progressLine=new Kt({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:st({lineCap:"round",lineWidth:s.style.lineWidth},n.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});a.add(l)}},e.prototype._renderAxisTick=function(t,a,i,n){var o=this,s=n.getData(),l=i.scale.getTicks();this._tickSymbols=[],M(l,function(u){var h=i.dataToCoord(u.value),f=s.getItemModel(u.value),v=f.getModel("itemStyle"),c=f.getModel(["emphasis","itemStyle"]),d=f.getModel(["progress","itemStyle"]),p={x:h,y:0,onclick:X(o._changeTimeline,o,u.value)},g=vP(f,v,a,p);g.ensureState("emphasis").style=c.getItemStyle(),g.ensureState("progress").style=d.getItemStyle(),dn(g);var y=vt(g);f.get("tooltip")?(y.dataIndex=u.value,y.dataModel=n):y.dataIndex=y.dataModel=null,o._tickSymbols.push(g)})},e.prototype._renderAxisLabel=function(t,a,i,n){var o=this,s=i.getLabelModel();if(s.get("show")){var l=n.getData(),u=i.getViewLabels();this._tickLabels=[],M(u,function(h){var f=h.tickValue,v=l.getItemModel(f),c=v.getModel("label"),d=v.getModel(["emphasis","label"]),p=v.getModel(["progress","label"]),g=i.dataToCoord(h.tickValue),y=new Lt({x:g,y:0,rotation:t.labelRotation-t.rotation,onclick:X(o._changeTimeline,o,f),silent:!1,style:Ft(c,{text:h.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});y.ensureState("emphasis").style=Ft(d),y.ensureState("progress").style=Ft(p),a.add(y),dn(y),fP(y).dataIndex=f,o._tickLabels.push(y)})}},e.prototype._renderControl=function(t,a,i,n){var o=t.controlSize,s=t.rotation,l=n.getModel("controlStyle").getItemStyle(),u=n.getModel(["emphasis","controlStyle"]).getItemStyle(),h=n.getPlayState(),f=n.get("inverse",!0);v(t.nextBtnPosition,"next",X(this._changeTimeline,this,f?"-":"+")),v(t.prevBtnPosition,"prev",X(this._changeTimeline,this,f?"+":"-")),v(t.playPosition,h?"stop":"play",X(this._handlePlayClick,this,!h),!0);function v(c,d,p,g){if(c){var y=Nr(Q(n.get(["controlStyle",d+"BtnSize"]),o),o),m=[0,-y/2,y,y],_=G9(n,d+"Icon",m,{x:c[0],y:c[1],originX:o/2,originY:0,rotation:g?-s:0,rectHover:!0,style:l,onclick:p});_.ensureState("emphasis").style=u,a.add(_),dn(_)}}},e.prototype._renderCurrentPointer=function(t,a,i,n){var o=n.getData(),s=n.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,h={onCreate:function(f){f.draggable=!0,f.drift=X(u._handlePointerDrag,u),f.ondragend=X(u._handlePointerDragend,u),cP(f,u._progressLine,s,i,n,!0)},onUpdate:function(f){cP(f,u._progressLine,s,i,n)}};this._currentPointer=vP(l,l,this._mainGroup,{},this._currentPointer,h)},e.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},e.prototype._handlePointerDrag=function(t,a,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,a){var i=this._toAxisCoord(t)[0],n=this._axis,o=mr(n.getExtent().slice());i>o[1]&&(i=o[1]),i<o[0]&&(i=o[0]),this._currentPointer.x=i,this._currentPointer.markRedraw();var s=this._progressLine;s&&(s.shape.x2=i,s.dirty());var l=this._findNearestTick(i),u=this.model;(a||l!==u.getCurrentIndex()&&u.get("realtime"))&&this._changeTimeline(l)},e.prototype._doPlayStop=function(){var t=this;this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(function(){var a=t.model;t._changeTimeline(a.getCurrentIndex()+(a.get("rewind",!0)?-1:1))},this.model.get("playInterval")))},e.prototype._toAxisCoord=function(t){var a=this._mainGroup.getLocalTransform();return Vr(t,a,!0)},e.prototype._findNearestTick=function(t){var a=this.model.getData(),i=1/0,n,o=this._axis;return a.each(["value"],function(s,l){var u=o.dataToCoord(s),h=Math.abs(u-t);h<i&&(i=h,n=l)}),n},e.prototype._clearTimer=function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},e.prototype._changeTimeline=function(t){var a=this.model.getCurrentIndex();t==="+"?t=a+1:t==="-"&&(t=a-1),this.api.dispatchAction({type:"timelineChange",currentIndex:t,from:this.uid})},e.prototype._updateTicksStatus=function(){var t=this.model.getCurrentIndex(),a=this._tickSymbols,i=this._tickLabels;if(a)for(var n=0;n<a.length;n++)a&&a[n]&&a[n].toggleState("progress",n<t);if(i)for(var n=0;n<i.length;n++)i&&i[n]&&i[n].toggleState("progress",fP(i[n]).dataIndex<=t)},e.type="timeline.slider",e}(O9);function z9(r,e){if(e=e||r.get("type"),e)switch(e){case"category":return new ts({ordinalMeta:r.getCategories(),extent:[1/0,-1/0]});case"time":return new kg({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new Wa}}function V9(r,e){return qt(r.getBoxLayoutParams(),de(r,e).refContainer,r.get("padding"))}function G9(r,e,t,a){var i=a.style,n=nl(r.get(["controlStyle",e]),a||{},new ht(t[0],t[1],t[2],t[3]));return i&&n.setStyle(i),n}function vP(r,e,t,a,i,n){var o=e.get("color");if(i)i.setColor(o),t.add(i),n&&n.onUpdate(i);else{var s=r.get("symbol");i=he(s,-1,-1,2,2,o),i.setStyle("strokeNoScale",!0),t.add(i),n&&n.onCreate(i)}var l=e.getItemStyle(["color"]);i.setStyle(l),a=yt({rectHover:!0,z2:100},a,!0);var u=$o(r.get("symbolSize"));a.scaleX=u[0]/2,a.scaleY=u[1]/2;var h=En(r.get("symbolOffset"),u);h&&(a.x=(a.x||0)+h[0],a.y=(a.y||0)+h[1]);var f=r.get("symbolRotate");return a.rotation=(f||0)*Math.PI/180||0,i.attr(a),i.updateTransform(),i}function cP(r,e,t,a,i,n){if(!r.dragging){var o=i.getModel("checkpointStyle"),s=a.dataToCoord(i.getData().get("value",t));if(n||!o.get("animation",!0))r.attr({x:s,y:0}),e&&e.attr({shape:{x2:s}});else{var l={duration:o.get("animationDuration",!0),easing:o.get("animationEasing",!0)};r.stopAnimation(null,!0),r.animateTo({x:s,y:0},l),e&&e.animateTo({shape:{x2:s}},l)}}}function F9(r){r.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(e,t,a){var i=t.getComponent("timeline");return i&&e.currentIndex!=null&&(i.setCurrentIndex(e.currentIndex),!i.get("loop",!0)&&i.isIndexMax()&&i.getPlayState()&&(i.setPlayState(!1),a.dispatchAction({type:"timelinePlayChange",playState:!1,from:e.from}))),t.resetOption("timeline",{replaceMerge:i.get("replaceMerge",!0)}),st({currentIndex:i.option.currentIndex},e)}),r.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(e,t){var a=t.getComponent("timeline");a&&e.playState!=null&&a.setPlayState(e.playState)})}function H9(r){var e=r&&r.timeline;W(e)||(e=e?[e]:[]),M(e,function(t){t&&W9(t)})}function W9(r){var e=r.type,t={number:"value",time:"time"};if(t[e]&&(r.axisType=t[e],delete r.type),dP(r),io(r,"controlPosition")){var a=r.controlStyle||(r.controlStyle={});io(a,"position")||(a.position=r.controlPosition),a.position==="none"&&!io(a,"show")&&(a.show=!1,delete a.position),delete r.controlPosition}M(r.data||[],function(i){lt(i)&&!W(i)&&(!io(i,"value")&&io(i,"name")&&(i.value=i.name),dP(i))})}function dP(r){var e=r.itemStyle||(r.itemStyle={}),t=e.emphasis||(e.emphasis={}),a=r.label||r.label||{},i=a.normal||(a.normal={}),n={normal:1,emphasis:1};M(a,function(o,s){!n[s]&&!io(i,s)&&(i[s]=o)}),t.label&&!io(a,"emphasis")&&(a.emphasis=t.label,delete t.label)}function io(r,e){return r.hasOwnProperty(e)}function U9(r){r.registerComponentModel(hP),r.registerComponentView(B9),r.registerSubTypeDefaulter("timeline",function(){return"slider"}),F9(r),r.registerPreprocessor(H9)}function F0(r,e){if(!r)return!1;for(var t=W(r)?r:[r],a=0;a<t.length;a++)if(t[a]&&t[a][e])return!0;return!1}function Hv(r){tn(r,"label",["show"])}var Wv=St(),ba=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.createdBySelf=!1,t.preventAutoZ=!0,t}return e.prototype.init=function(t,a,i){this.mergeDefaultAndTheme(t,i),this._mergeOption(t,i,!1,!0)},e.prototype.isAnimationEnabled=function(){if(Pt.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},e.prototype.mergeOption=function(t,a){this._mergeOption(t,a,!1,!1)},e.prototype._mergeOption=function(t,a,i,n){var o=this.mainType;i||a.eachSeries(function(s){var l=s.get(this.mainType,!0),u=Wv(s)[o];if(!l||!l.data){Wv(s)[o]=null;return}u?u._mergeOption(l,a,!0):(n&&Hv(l),M(l.data,function(h){h instanceof Array?(Hv(h[0]),Hv(h[1])):Hv(h)}),u=this.createMarkerModelFromSeries(l,this,a),F(u,{mainType:this.mainType,seriesIndex:s.seriesIndex,name:s.name,createdBySelf:!0}),u.__hostSeries=s),Wv(s)[o]=u},this)},e.prototype.formatTooltip=function(t,a,i){var n=this.getData(),o=this.getRawValue(t),s=n.getName(t);return ue("section",{header:this.name,blocks:[ue("nameValue",{name:s,value:o,noName:!s,noValue:o==null})]})},e.prototype.getData=function(){return this._data},e.prototype.setData=function(t){this._data=t},e.prototype.getDataParams=function(t,a){var i=af.prototype.getDataParams.call(this,t,a),n=this.__hostSeries;return n&&(i.seriesId=n.id,i.seriesName=n.name,i.seriesType=n.subType),i},e.getMarkerModelFromSeries=function(t,a){return Wv(t)[a]},e.type="marker",e.dependencies=["series","grid","polar","geo"],e}(Tt);ie(ba,af.prototype);var Y9=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,a,i){return new e(t,a,i)},e.type="markPoint",e.defaultOption={z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},e}(ba);function H0(r){return!(isNaN(parseFloat(r.x))&&isNaN(parseFloat(r.y)))}function Z9(r){return!isNaN(parseFloat(r.x))&&!isNaN(parseFloat(r.y))}function Uv(r,e,t,a,i,n,o){var s=[],l=wi(e,i),u=l?e.getCalculationInfo("stackResultDimension"):i,h=Zv(e,u,r),f=e.hostModel,v=f.indicesOfNearest(t,u,h)[0];s[n]=e.get(a,v),s[o]=e.get(u,v);var c=e.get(i,v),d=aa(e.get(i,v));return d=Math.min(d,20),d>=0&&(s[o]=+s[o].toFixed(d)),[s,c]}var Yv={min:pt(Uv,"min"),max:pt(Uv,"max"),average:pt(Uv,"average"),median:pt(Uv,"median")};function bu(r,e){if(e){var t=r.getData(),a=r.coordinateSystem,i=a&&a.dimensions;if(!Z9(e)&&!W(e.coord)&&W(i)){var n=pP(e,t,a,r);if(e=at(e),e.type&&Yv[e.type]&&n.baseAxis&&n.valueAxis){var o=gt(i,n.baseAxis.dim),s=gt(i,n.valueAxis.dim),l=Yv[e.type](t,n.valueAxis.dim,n.baseDataDim,n.valueDataDim,o,s);e.coord=l[0],e.value=l[1]}else e.coord=[e.xAxis!=null?e.xAxis:e.radiusAxis,e.yAxis!=null?e.yAxis:e.angleAxis]}if(e.coord==null||!W(i)){e.coord=[];var u=r.getBaseAxis();if(u&&e.type&&Yv[e.type]){var h=a.getOtherAxis(u);h&&(e.value=Zv(t,t.mapDimension(h.dim),e.type))}}else for(var f=e.coord,v=0;v<2;v++)Yv[f[v]]&&(f[v]=Zv(t,t.mapDimension(i[v]),f[v]));return e}}function pP(r,e,t,a){var i={};return r.valueIndex!=null||r.valueDim!=null?(i.valueDataDim=r.valueIndex!=null?e.getDimension(r.valueIndex):r.valueDim,i.valueAxis=t.getAxis($9(a,i.valueDataDim)),i.baseAxis=t.getOtherAxis(i.valueAxis),i.baseDataDim=e.mapDimension(i.baseAxis.dim)):(i.baseAxis=a.getBaseAxis(),i.valueAxis=t.getOtherAxis(i.baseAxis),i.baseDataDim=e.mapDimension(i.baseAxis.dim),i.valueDataDim=e.mapDimension(i.valueAxis.dim)),i}function $9(r,e){var t=r.getData().getDimensionInfo(e);return t&&t.coordDim}function wu(r,e){return r&&r.containData&&e.coord&&!H0(e)?r.containData(e.coord):!0}function X9(r,e,t){return r&&r.containZone&&e.coord&&t.coord&&!H0(e)&&!H0(t)?r.containZone(e.coord,t.coord):!0}function gP(r,e){return r?function(t,a,i,n){var o=n<2?t.coord&&t.coord[n]:t.value;return xi(o,e[n])}:function(t,a,i,n){return xi(t.value,e[n])}}function Zv(r,e,t){if(t==="average"){var a=0,i=0;return r.each(e,function(n,o){isNaN(n)||(a+=n,i++)}),a/i}else return t==="median"?r.getMedian(e):r.getDataExtent(e)[t==="max"?1:0]}var W0=St(),U0=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this.markerGroupMap=J()},e.prototype.render=function(t,a,i){var n=this,o=this.markerGroupMap;o.each(function(s){W0(s).keep=!1}),a.eachSeries(function(s){var l=ba.getMarkerModelFromSeries(s,n.type);l&&n.renderSeries(s,l,a,i)}),o.each(function(s){!W0(s).keep&&n.group.remove(s.group)}),q9(a,o,this.type)},e.prototype.markKeep=function(t){W0(t).keep=!0},e.prototype.toggleBlurSeries=function(t,a){var i=this;M(t,function(n){var o=ba.getMarkerModelFromSeries(n,i.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(a?Gx(l):Yd(l))})}})},e.type="marker",e}(Zt);function q9(r,e,t){r.eachSeries(function(a){var i=ba.getMarkerModelFromSeries(a,t),n=e.get(a.id);if(i&&n&&n.group){var o=Sn(i),s=o.z,l=o.zlevel;Hh(n.group,s,l)}})}function yP(r,e,t){var a=e.coordinateSystem,i=t.getWidth(),n=t.getHeight(),o=a&&a.getArea&&a.getArea();r.each(function(s){var l=r.getItemModel(s),u=l.get("relativeTo")==="coordinate",h=u?o?o.width:0:i,f=u?o?o.height:0:n,v=u&&o?o.x:0,c=u&&o?o.y:0,d,p=Z(l.get("x"),h)+v,g=Z(l.get("y"),f)+c;if(!isNaN(p)&&!isNaN(g))d=[p,g];else if(e.getMarkerPosition)d=e.getMarkerPosition(r.getValues(r.dimensions,s));else if(a){var y=r.get(a.dimensions[0],s),m=r.get(a.dimensions[1],s);d=a.dataToPoint([y,m])}isNaN(p)||(d[0]=p),isNaN(g)||(d[1]=g),r.setItemLayout(s,d)})}var K9=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,a,i){a.eachSeries(function(n){var o=ba.getMarkerModelFromSeries(n,"markPoint");o&&(yP(o.getData(),n,i),this.markerGroupMap.get(n.id).updateLayout())},this)},e.prototype.renderSeries=function(t,a,i,n){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,h=u.get(s)||u.set(s,new Ul),f=j9(o,t,a);a.setData(f),yP(a.getData(),t,n),f.each(function(v){var c=f.getItemModel(v),d=c.getShallow("symbol"),p=c.getShallow("symbolSize"),g=c.getShallow("symbolRotate"),y=c.getShallow("symbolOffset"),m=c.getShallow("symbolKeepAspect");if(rt(d)||rt(p)||rt(g)||rt(y)){var _=a.getRawValue(v),x=a.getDataParams(v);rt(d)&&(d=d(_,x)),rt(p)&&(p=p(_,x)),rt(g)&&(g=g(_,x)),rt(y)&&(y=y(_,x))}var b=c.getModel("itemStyle").getItemStyle(),S=c.get("z2"),w=Tl(l,"color");b.fill||(b.fill=w),f.setItemVisual(v,{z2:Q(S,0),symbol:d,symbolSize:p,symbolRotate:g,symbolOffset:y,symbolKeepAspect:m,style:b})}),h.updateData(f),this.group.add(h.group),f.eachItemGraphicEl(function(v){v.traverse(function(c){vt(c).dataModel=a})}),this.markKeep(h),h.group.silent=a.get("silent")||t.get("silent")},e.type="markPoint",e}(U0);function j9(r,e,t){var a;r?a=U(r&&r.dimensions,function(s){var l=e.getData().getDimensionInfo(e.getData().mapDimension(s))||{};return F(F({},l),{name:s,ordinalMeta:null})}):a=[{name:"value",type:"float"}];var i=new Ue(a,t),n=U(t.get("data"),pt(bu,e));r&&(n=Et(n,pt(wu,r)));var o=gP(!!r,a);return i.initData(n,null,o),i}function J9(r){r.registerComponentModel(Y9),r.registerComponentView(K9),r.registerPreprocessor(function(e){F0(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var Q9=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,a,i){return new e(t,a,i)},e.type="markLine",e.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},e}(ba),$v=St(),t$=function(r,e,t,a){var i=r.getData(),n;if(W(a))n=a;else{var o=a.type;if(o==="min"||o==="max"||o==="average"||o==="median"||a.xAxis!=null||a.yAxis!=null){var s=void 0,l=void 0;if(a.yAxis!=null||a.xAxis!=null)s=e.getAxis(a.yAxis!=null?"y":"x"),l=Ae(a.yAxis,a.xAxis);else{var u=pP(a,i,e,r);s=u.valueAxis;var h=PT(i,u.valueDataDim);l=Zv(i,h,o)}var f=s.dim==="x"?0:1,v=1-f,c=at(a),d={coord:[]};c.type=null,c.coord=[],c.coord[v]=-1/0,d.coord[v]=1/0;var p=t.get("precision");p>=0&&Dt(l)&&(l=+l.toFixed(Math.min(p,20))),c.coord[f]=d.coord[f]=l,n=[c,d,{type:o,valueIndex:a.valueIndex,value:l}]}else n=[]}var g=[bu(r,n[0]),bu(r,n[1]),F({},n[2])];return g[2].type=g[2].type||null,yt(g[2],g[0]),yt(g[2],g[1]),g};function Xv(r){return!isNaN(r)&&!isFinite(r)}function mP(r,e,t,a){var i=1-r,n=a.dimensions[r];return Xv(e[i])&&Xv(t[i])&&e[r]===t[r]&&a.getAxis(n).containData(e[r])}function e$(r,e){if(r.type==="cartesian2d"){var t=e[0].coord,a=e[1].coord;if(t&&a&&(mP(1,t,a,r)||mP(0,t,a,r)))return!0}return wu(r,e[0])&&wu(r,e[1])}function Y0(r,e,t,a,i){var n=a.coordinateSystem,o=r.getItemModel(e),s,l=Z(o.get("x"),i.getWidth()),u=Z(o.get("y"),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(a.getMarkerPosition)s=a.getMarkerPosition(r.getValues(r.dimensions,e));else{var h=n.dimensions,f=r.get(h[0],e),v=r.get(h[1],e);s=n.dataToPoint([f,v])}if(Di(n,"cartesian2d")){var c=n.getAxis("x"),d=n.getAxis("y"),h=n.dimensions;Xv(r.get(h[0],e))?s[0]=c.toGlobalCoord(c.getExtent()[t?0:1]):Xv(r.get(h[1],e))&&(s[1]=d.toGlobalCoord(d.getExtent()[t?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}r.setItemLayout(e,s)}var r$=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,a,i){a.eachSeries(function(n){var o=ba.getMarkerModelFromSeries(n,"markLine");if(o){var s=o.getData(),l=$v(o).from,u=$v(o).to;l.each(function(h){Y0(l,h,!0,n,i),Y0(u,h,!1,n,i)}),s.each(function(h){s.setItemLayout(h,[l.getItemLayout(h),u.getItemLayout(h)])}),this.markerGroupMap.get(n.id).updateLayout()}},this)},e.prototype.renderSeries=function(t,a,i,n){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,h=u.get(s)||u.set(s,new om);this.group.add(h.group);var f=a$(o,t,a),v=f.from,c=f.to,d=f.line;$v(a).from=v,$v(a).to=c,a.setData(d);var p=a.get("symbol"),g=a.get("symbolSize"),y=a.get("symbolRotate"),m=a.get("symbolOffset");W(p)||(p=[p,p]),W(g)||(g=[g,g]),W(y)||(y=[y,y]),W(m)||(m=[m,m]),f.from.each(function(x){_(v,x,!0),_(c,x,!1)}),d.each(function(x){var b=d.getItemModel(x),S=b.getModel("lineStyle").getLineStyle();d.setItemLayout(x,[v.getItemLayout(x),c.getItemLayout(x)]);var w=b.get("z2");S.stroke==null&&(S.stroke=v.getItemVisual(x,"style").fill),d.setItemVisual(x,{z2:Q(w,0),fromSymbolKeepAspect:v.getItemVisual(x,"symbolKeepAspect"),fromSymbolOffset:v.getItemVisual(x,"symbolOffset"),fromSymbolRotate:v.getItemVisual(x,"symbolRotate"),fromSymbolSize:v.getItemVisual(x,"symbolSize"),fromSymbol:v.getItemVisual(x,"symbol"),toSymbolKeepAspect:c.getItemVisual(x,"symbolKeepAspect"),toSymbolOffset:c.getItemVisual(x,"symbolOffset"),toSymbolRotate:c.getItemVisual(x,"symbolRotate"),toSymbolSize:c.getItemVisual(x,"symbolSize"),toSymbol:c.getItemVisual(x,"symbol"),style:S})}),h.updateData(d),f.line.eachItemGraphicEl(function(x){vt(x).dataModel=a,x.traverse(function(b){vt(b).dataModel=a})});function _(x,b,S){var w=x.getItemModel(b);Y0(x,b,S,t,n);var T=w.getModel("itemStyle").getItemStyle();T.fill==null&&(T.fill=Tl(l,"color")),x.setItemVisual(b,{symbolKeepAspect:w.get("symbolKeepAspect"),symbolOffset:Q(w.get("symbolOffset",!0),m[S?0:1]),symbolRotate:Q(w.get("symbolRotate",!0),y[S?0:1]),symbolSize:Q(w.get("symbolSize"),g[S?0:1]),symbol:Q(w.get("symbol",!0),p[S?0:1]),style:T})}this.markKeep(h),h.group.silent=a.get("silent")||t.get("silent")},e.type="markLine",e}(U0);function a$(r,e,t){var a;r?a=U(r&&r.dimensions,function(u){var h=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return F(F({},h),{name:u,ordinalMeta:null})}):a=[{name:"value",type:"float"}];var i=new Ue(a,t),n=new Ue(a,t),o=new Ue([],t),s=U(t.get("data"),pt(t$,e,r,t));r&&(s=Et(s,pt(e$,r)));var l=gP(!!r,a);return i.initData(U(s,function(u){return u[0]}),null,l),n.initData(U(s,function(u){return u[1]}),null,l),o.initData(U(s,function(u){return u[2]})),o.hasItemOption=!0,{from:i,to:n,line:o}}function i$(r){r.registerComponentModel(Q9),r.registerComponentView(r$),r.registerPreprocessor(function(e){F0(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var n$=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,a,i){return new e(t,a,i)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(ba),qv=St(),o$=function(r,e,t,a){var i=a[0],n=a[1];if(!(!i||!n)){var o=bu(r,i),s=bu(r,n),l=o.coord,u=s.coord;l[0]=Ae(l[0],-1/0),l[1]=Ae(l[1],-1/0),u[0]=Ae(u[0],1/0),u[1]=Ae(u[1],1/0);var h=uc([{},o,s]);return h.coord=[o.coord,s.coord],h.x0=o.x,h.y0=o.y,h.x1=s.x,h.y1=s.y,h}};function Kv(r){return!isNaN(r)&&!isFinite(r)}function _P(r,e,t,a){var i=1-r;return Kv(e[i])&&Kv(t[i])}function s$(r,e){var t=e.coord[0],a=e.coord[1],i={coord:t,x:e.x0,y:e.y0},n={coord:a,x:e.x1,y:e.y1};return Di(r,"cartesian2d")?t&&a&&(_P(1,t,a)||_P(0,t,a))?!0:X9(r,i,n):wu(r,i)||wu(r,n)}function xP(r,e,t,a,i){var n=a.coordinateSystem,o=r.getItemModel(e),s,l=Z(o.get(t[0]),i.getWidth()),u=Z(o.get(t[1]),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(a.getMarkerPosition){var h=r.getValues(["x0","y0"],e),f=r.getValues(["x1","y1"],e),v=n.clampData(h),c=n.clampData(f),d=[];t[0]==="x0"?d[0]=v[0]>c[0]?f[0]:h[0]:d[0]=v[0]>c[0]?h[0]:f[0],t[1]==="y0"?d[1]=v[1]>c[1]?f[1]:h[1]:d[1]=v[1]>c[1]?h[1]:f[1],s=a.getMarkerPosition(d,t,!0)}else{var p=r.get(t[0],e),g=r.get(t[1],e),y=[p,g];n.clampData&&n.clampData(y,y),s=n.dataToPoint(y,!0)}if(Di(n,"cartesian2d")){var m=n.getAxis("x"),_=n.getAxis("y"),p=r.get(t[0],e),g=r.get(t[1],e);Kv(p)?s[0]=m.toGlobalCoord(m.getExtent()[t[0]==="x0"?0:1]):Kv(g)&&(s[1]=_.toGlobalCoord(_.getExtent()[t[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var SP=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],l$=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,a,i){a.eachSeries(function(n){var o=ba.getMarkerModelFromSeries(n,"markArea");if(o){var s=o.getData();s.each(function(l){var u=U(SP,function(f){return xP(s,l,f,n,i)});s.setItemLayout(l,u);var h=s.getItemGraphicEl(l);h.setShape("points",u)})}},this)},e.prototype.renderSeries=function(t,a,i,n){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,h=u.get(s)||u.set(s,{group:new et});this.group.add(h.group),this.markKeep(h);var f=u$(o,t,a);a.setData(f),f.each(function(v){var c=U(SP,function(A){return xP(f,v,A,t,n)}),d=o.getAxis("x").scale,p=o.getAxis("y").scale,g=d.getExtent(),y=p.getExtent(),m=[d.parse(f.get("x0",v)),d.parse(f.get("x1",v))],_=[p.parse(f.get("y0",v)),p.parse(f.get("y1",v))];mr(m),mr(_);var x=!(g[0]>m[1]||g[1]<m[0]||y[0]>_[1]||y[1]<_[0]),b=!x;f.setItemLayout(v,{points:c,allClipped:b});var S=f.getItemModel(v),w=S.getModel("itemStyle").getItemStyle(),T=S.get("z2"),C=Tl(l,"color");w.fill||(w.fill=C,$(w.fill)&&(w.fill=$u(w.fill,.4))),w.stroke||(w.stroke=C),f.setItemVisual(v,"style",w),f.setItemVisual(v,"z2",Q(T,0))}),f.diff(qv(h).data).add(function(v){var c=f.getItemLayout(v),d=f.getItemVisual(v,"z2");if(!c.allClipped){var p=new De({z2:Q(d,0),shape:{points:c.points}});f.setItemGraphicEl(v,p),h.group.add(p)}}).update(function(v,c){var d=qv(h).data.getItemGraphicEl(c),p=f.getItemLayout(v),g=f.getItemVisual(v,"z2");p.allClipped?d&&h.group.remove(d):(d?It(d,{z2:Q(g,0),shape:{points:p.points}},a,v):d=new De({shape:{points:p.points}}),f.setItemGraphicEl(v,d),h.group.add(d))}).remove(function(v){var c=qv(h).data.getItemGraphicEl(v);h.group.remove(c)}).execute(),f.eachItemGraphicEl(function(v,c){var d=f.getItemModel(c),p=f.getItemVisual(c,"style");v.useStyle(f.getItemVisual(c,"style")),ye(v,ce(d),{labelFetcher:a,labelDataIndex:c,defaultText:f.getName(c)||"",inheritColor:$(p.fill)?$u(p.fill,1):B.color.neutral99}),ve(v,d),Xt(v,null,null,d.get(["emphasis","disabled"])),vt(v).dataModel=a}),qv(h).data=f,h.group.silent=a.get("silent")||t.get("silent")},e.type="markArea",e}(U0);function u$(r,e,t){var a,i,n=["x0","y0","x1","y1"];if(r){var o=U(r&&r.dimensions,function(u){var h=e.getData(),f=h.getDimensionInfo(h.mapDimension(u))||{};return F(F({},f),{name:u,ordinalMeta:null})});i=U(n,function(u,h){return{name:u,type:o[h%2].type}}),a=new Ue(i,t)}else i=[{name:"value",type:"float"}],a=new Ue(i,t);var s=U(t.get("data"),pt(o$,e,r,t));r&&(s=Et(s,pt(s$,r)));var l=r?function(u,h,f,v){var c=u.coord[Math.floor(v/2)][v%2];return xi(c,i[v])}:function(u,h,f,v){return xi(u.value,i[v])};return a.initData(s,null,l),a.hasItemOption=!0,a}function h$(r){r.registerComponentModel(n$),r.registerComponentView(l$),r.registerPreprocessor(function(e){F0(e.series,"markArea")&&(e.markArea=e.markArea||{})})}var f$=function(r,e){if(e==="all")return{type:"all",title:r.getLocaleModel().get(["legend","selector","all"])};if(e==="inverse")return{type:"inverse",title:r.getLocaleModel().get(["legend","selector","inverse"])}},Z0=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode={type:"box",ignoreSize:!0},t}return e.prototype.init=function(t,a,i){this.mergeDefaultAndTheme(t,i),t.selected=t.selected||{},this._updateSelector(t)},e.prototype.mergeOption=function(t,a){r.prototype.mergeOption.call(this,t,a),this._updateSelector(t)},e.prototype._updateSelector=function(t){var a=t.selector,i=this.ecModel;a===!0&&(a=t.selector=["all","inverse"]),W(a)&&M(a,function(n,o){$(n)&&(n={type:n}),a[o]=yt(n,f$(i,n.type))})},e.prototype.optionUpdated=function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&this.get("selectedMode")==="single"){for(var a=!1,i=0;i<t.length;i++){var n=t[i].get("name");if(this.isSelected(n)){this.select(n),a=!0;break}}!a&&this.select(t[0].get("name"))}},e.prototype._updateData=function(t){var a=[],i=[];t.eachRawSeries(function(l){var u=l.name;i.push(u);var h;if(l.legendVisualProvider){var f=l.legendVisualProvider,v=f.getAllNames();t.isSeriesFiltered(l)||(i=i.concat(v)),v.length?a=a.concat(v):h=!0}else h=!0;h&&pd(l)&&a.push(l.name)}),this._availableNames=i;var n=this.get("data")||a,o=J(),s=U(n,function(l){return($(l)||Dt(l))&&(l={name:l}),o.get(l.name)?null:(o.set(l.name,!0),new Ct(l,this,this.ecModel))},this);this._data=Et(s,function(l){return!!l})},e.prototype.getData=function(){return this._data},e.prototype.select=function(t){var a=this.option.selected,i=this.get("selectedMode");if(i==="single"){var n=this._data;M(n,function(o){a[o.get("name")]=!1})}a[t]=!0},e.prototype.unSelect=function(t){this.get("selectedMode")!=="single"&&(this.option.selected[t]=!1)},e.prototype.toggleSelected=function(t){var a=this.option.selected;a.hasOwnProperty(t)||(a[t]=!0),this[a[t]?"unSelect":"select"](t)},e.prototype.allSelect=function(){var t=this._data,a=this.option.selected;M(t,function(i){a[i.get("name",!0)]=!0})},e.prototype.inverseSelect=function(){var t=this._data,a=this.option.selected;M(t,function(i){var n=i.get("name",!0);a.hasOwnProperty(n)||(a[n]=!0),a[n]=!a[n]})},e.prototype.isSelected=function(t){var a=this.option.selected;return!(a.hasOwnProperty(t)&&!a[t])&&gt(this._availableNames,t)>=0},e.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",bottom:B.size.m,align:"auto",backgroundColor:B.color.transparent,borderColor:B.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:B.color.disabled,inactiveBorderColor:B.color.disabled,inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:B.color.disabled,inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:B.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:B.color.tertiary,borderWidth:1,borderColor:B.color.border},emphasis:{selectorLabel:{show:!0,color:B.color.quaternary}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},e}(Tt),Ts=pt,$0=M,jv=et,bP=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.newlineDisabled=!1,t}return e.prototype.init=function(){this.group.add(this._contentGroup=new jv),this.group.add(this._selectorGroup=new jv),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(t,a,i){var n=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!t.get("show",!0)){var o=t.get("align"),s=t.get("orient");(!o||o==="auto")&&(o=t.get("left")==="right"&&s==="vertical"?"right":"left");var l=t.get("selector",!0),u=t.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,t,a,i,l,s,u);var h=de(t,i).refContainer,f=t.getBoxLayoutParams(),v=t.get("padding"),c=qt(f,h,v),d=this.layoutInner(t,o,c,n,l,u),p=qt(st({width:d.width,height:d.height},f),h,v);this.group.x=p.x-d.x,this.group.y=p.y-d.y,this.group.markRedraw(),this.group.add(this._backgroundEl=P2(d,t))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(t,a,i,n,o,s,l){var u=this.getContentGroup(),h=J(),f=a.get("selectedMode"),v=a.get("triggerEvent"),c=[];i.eachRawSeries(function(d){!d.get("legendHoverLink")&&c.push(d.id)}),$0(a.getData(),function(d,p){var g=this,y=d.get("name");if(!this.newlineDisabled&&(y===""||y===`
88
+ `)){var m=new jv;m.newline=!0,u.add(m);return}var _=i.getSeriesByName(y)[0];if(!h.get(y))if(_){var x=_.getData(),b=x.getVisual("legendLineStyle")||{},S=x.getVisual("legendIcon"),w=x.getVisual("style"),T=this._createItem(_,y,p,d,a,t,b,w,S,f,n);T.on("click",Ts(wP,y,null,n,c)).on("mouseover",Ts(X0,_.name,null,n,c)).on("mouseout",Ts(q0,_.name,null,n,c)),i.ssr&&T.eachChild(function(C){var A=vt(C);A.seriesIndex=_.seriesIndex,A.dataIndex=p,A.ssrType="legend"}),v&&T.eachChild(function(C){g.packEventData(C,a,_,p,y)}),h.set(y,!0)}else i.eachRawSeries(function(C){var A=this;if(!h.get(y)&&C.legendVisualProvider){var D=C.legendVisualProvider;if(!D.containName(y))return;var I=D.indexOfName(y),L=D.getItemVisual(I,"style"),P=D.getItemVisual(I,"legendIcon"),k=qe(L.fill);k&&k[3]===0&&(k[3]=.2,L=F(F({},L),{fill:Jr(k,"rgba")}));var R=this._createItem(C,y,p,d,a,t,{},L,P,f,n);R.on("click",Ts(wP,null,y,n,c)).on("mouseover",Ts(X0,null,y,n,c)).on("mouseout",Ts(q0,null,y,n,c)),i.ssr&&R.eachChild(function(O){var E=vt(O);E.seriesIndex=C.seriesIndex,E.dataIndex=p,E.ssrType="legend"}),v&&R.eachChild(function(O){A.packEventData(O,a,C,p,y)}),h.set(y,!0)}},this)},this),o&&this._createSelector(o,a,n,s,l)},e.prototype.packEventData=function(t,a,i,n,o){var s={componentType:"legend",componentIndex:a.componentIndex,dataIndex:n,value:o,seriesIndex:i.seriesIndex};vt(t).eventData=s},e.prototype._createSelector=function(t,a,i,n,o){var s=this.getSelectorGroup();$0(t,function(u){var h=u.type,f=new Lt({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:h==="all"?"legendAllSelect":"legendInverseSelect",legendId:a.id})}});s.add(f);var v=a.getModel("selectorLabel"),c=a.getModel(["emphasis","selectorLabel"]);ye(f,{normal:v,emphasis:c},{defaultText:u.title}),dn(f)})},e.prototype._createItem=function(t,a,i,n,o,s,l,u,h,f,v){var c=t.visualDrawType,d=o.get("itemWidth"),p=o.get("itemHeight"),g=o.isSelected(a),y=n.get("symbolRotate"),m=n.get("symbolKeepAspect"),_=n.get("icon");h=_||h||"roundRect";var x=v$(h,n,l,u,c,g,v),b=new jv,S=n.getModel("textStyle");if(rt(t.getLegendIcon)&&(!_||_==="inherit"))b.add(t.getLegendIcon({itemWidth:d,itemHeight:p,icon:h,iconRotate:y,itemStyle:x.itemStyle,lineStyle:x.lineStyle,symbolKeepAspect:m}));else{var w=_==="inherit"&&t.getData().getVisual("symbol")?y==="inherit"?t.getData().getVisual("symbolRotate"):y:0;b.add(c$({itemWidth:d,itemHeight:p,icon:h,iconRotate:w,itemStyle:x.itemStyle,lineStyle:x.lineStyle,symbolKeepAspect:m}))}var T=s==="left"?d+5:-5,C=s,A=o.get("formatter"),D=a;$(A)&&A?D=A.replace("{name}",a??""):rt(A)&&(D=A(a));var I=g?S.getTextColor():n.get("inactiveColor");b.add(new Lt({style:Ft(S,{text:D,x:T,y:p/2,fill:I,align:C,verticalAlign:"middle"},{inheritColor:I})}));var L=new _t({shape:b.getBoundingRect(),style:{fill:"transparent"}}),P=n.getModel("tooltip");return P.get("show")&&za({el:L,componentModel:o,itemName:a,itemTooltipOption:P.option}),b.add(L),b.eachChild(function(k){k.silent=!0}),L.silent=!f,this.getContentGroup().add(b),dn(b),b.__legendDataIndex=i,b},e.prototype.layoutInner=function(t,a,i,n,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();Cn(t.get("orient"),l,t.get("itemGap"),i.width,i.height);var h=l.getBoundingRect(),f=[-h.x,-h.y];if(u.markRedraw(),l.markRedraw(),o){Cn("horizontal",u,t.get("selectorItemGap",!0));var v=u.getBoundingRect(),c=[-v.x,-v.y],d=t.get("selectorButtonGap",!0),p=t.getOrient().index,g=p===0?"width":"height",y=p===0?"height":"width",m=p===0?"y":"x";s==="end"?c[p]+=h[g]+d:f[p]+=v[g]+d,c[1-p]+=h[y]/2-v[y]/2,u.x=c[0],u.y=c[1],l.x=f[0],l.y=f[1];var _={x:0,y:0};return _[g]=h[g]+d+v[g],_[y]=Math.max(h[y],v[y]),_[m]=Math.min(0,v[m]+c[1-p]),_}else return l.x=f[0],l.y=f[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(Zt);function v$(r,e,t,a,i,n,o){function s(g,y){g.lineWidth==="auto"&&(g.lineWidth=y.lineWidth>0?2:0),$0(g,function(m,_){g[_]==="inherit"&&(g[_]=y[_])})}var l=e.getModel("itemStyle"),u=l.getItemStyle(),h=r.lastIndexOf("empty",0)===0?"fill":"stroke",f=l.getShallow("decal");u.decal=!f||f==="inherit"?a.decal:qo(f,o),u.fill==="inherit"&&(u.fill=a[i]),u.stroke==="inherit"&&(u.stroke=a[h]),u.opacity==="inherit"&&(u.opacity=(i==="fill"?a:t).opacity),s(u,a);var v=e.getModel("lineStyle"),c=v.getLineStyle();if(s(c,t),u.fill==="auto"&&(u.fill=a.fill),u.stroke==="auto"&&(u.stroke=a.fill),c.stroke==="auto"&&(c.stroke=a.fill),!n){var d=e.get("inactiveBorderWidth"),p=u[h];u.lineWidth=d==="auto"?a.lineWidth>0&&p?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),c.stroke=v.get("inactiveColor"),c.lineWidth=v.get("inactiveWidth")}return{itemStyle:u,lineStyle:c}}function c$(r){var e=r.icon||"roundRect",t=he(e,0,0,r.itemWidth,r.itemHeight,r.itemStyle.fill,r.symbolKeepAspect);return t.setStyle(r.itemStyle),t.rotation=(r.iconRotate||0)*Math.PI/180,t.setOrigin([r.itemWidth/2,r.itemHeight/2]),e.indexOf("empty")>-1&&(t.style.stroke=t.style.fill,t.style.fill=B.color.neutral00,t.style.lineWidth=2),t}function wP(r,e,t,a){q0(r,e,t,a),t.dispatchAction({type:"legendToggleSelect",name:r??e}),X0(r,e,t,a)}function TP(r){for(var e=r.getZr().storage.getDisplayList(),t,a=0,i=e.length;a<i&&!(t=e[a].states.emphasis);)a++;return t&&t.hoverLayer}function X0(r,e,t,a){TP(t)||t.dispatchAction({type:"highlight",seriesName:r,name:e,excludeSeriesId:a})}function q0(r,e,t,a){TP(t)||t.dispatchAction({type:"downplay",seriesName:r,name:e,excludeSeriesId:a})}function d$(r){var e=r.findComponents({mainType:"legend"});e&&e.length&&r.filterSeries(function(t){for(var a=0;a<e.length;a++)if(!e[a].isSelected(t.name))return!1;return!0})}function Tu(r,e,t){var a=r==="allSelect"||r==="inverseSelect",i={},n=[];t.eachComponent({mainType:"legend",query:e},function(s){a?s[r]():s[r](e.name),CP(s,i),n.push(s.componentIndex)});var o={};return t.eachComponent("legend",function(s){M(i,function(l,u){s[l?"select":"unSelect"](u)}),CP(s,o)}),a?{selected:o,legendIndex:n}:{name:e.name,selected:o}}function CP(r,e){var t=e||{};return M(r.getData(),function(a){var i=a.get("name");if(!(i===`
89
+ `||i==="")){var n=r.isSelected(i);K(t,i)?t[i]=t[i]&&n:t[i]=n}}),t}function p$(r){r.registerAction("legendToggleSelect","legendselectchanged",pt(Tu,"toggleSelected")),r.registerAction("legendAllSelect","legendselectall",pt(Tu,"allSelect")),r.registerAction("legendInverseSelect","legendinverseselect",pt(Tu,"inverseSelect")),r.registerAction("legendSelect","legendselected",pt(Tu,"select")),r.registerAction("legendUnSelect","legendunselected",pt(Tu,"unSelect"))}function AP(r){r.registerComponentModel(Z0),r.registerComponentView(bP),r.registerProcessor(r.PRIORITY.PROCESSOR.SERIES_FILTER,d$),r.registerSubTypeDefaulter("legend",function(){return"plain"}),p$(r)}var g$=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.setScrollDataIndex=function(t){this.option.scrollDataIndex=t},e.prototype.init=function(t,a,i){var n=An(t);r.prototype.init.call(this,t,a,i),MP(this,t,n)},e.prototype.mergeOption=function(t,a){r.prototype.mergeOption.call(this,t,a),MP(this,this.option,t)},e.type="legend.scroll",e.defaultOption=yi(Z0.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:B.color.accent50,pageIconInactiveColor:B.color.accent10,pageIconSize:15,pageTextStyle:{color:B.color.tertiary},animationDurationUpdate:800}),e}(Z0);function MP(r,e,t){var a=r.getOrient(),i=[1,1];i[a.index]=0,va(e,t,{type:"box",ignoreSize:!!i})}var DP=et,K0=["width","height"],j0=["x","y"],y$=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.newlineDisabled=!0,t._currentIndex=0,t}return e.prototype.init=function(){r.prototype.init.call(this),this.group.add(this._containerGroup=new DP),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new DP)},e.prototype.resetInner=function(){r.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},e.prototype.renderInner=function(t,a,i,n,o,s,l){var u=this;r.prototype.renderInner.call(this,t,a,i,n,o,s,l);var h=this._controllerGroup,f=a.get("pageIconSize",!0),v=W(f)?f:[f,f];d("pagePrev",0);var c=a.getModel("pageTextStyle");h.add(new Lt({name:"pageText",style:{text:"xx/xx",fill:c.getTextColor(),font:c.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),d("pageNext",1);function d(p,g){var y=p+"DataIndex",m=nl(a.get("pageIcons",!0)[a.getOrient().name][g],{onclick:X(u._pageGo,u,y,a,n)},{x:-v[0]/2,y:-v[1]/2,width:v[0],height:v[1]});m.name=p,h.add(m)}},e.prototype.layoutInner=function(t,a,i,n,o,s){var l=this.getSelectorGroup(),u=t.getOrient().index,h=K0[u],f=j0[u],v=K0[1-u],c=j0[1-u];o&&Cn("horizontal",l,t.get("selectorItemGap",!0));var d=t.get("selectorButtonGap",!0),p=l.getBoundingRect(),g=[-p.x,-p.y],y=at(i);o&&(y[h]=i[h]-p[h]-d);var m=this._layoutContentAndController(t,n,y,u,h,v,c,f);if(o){if(s==="end")g[u]+=m[h]+d;else{var _=p[h]+d;g[u]-=_,m[f]-=_}m[h]+=p[h]+d,g[1-u]+=m[c]+m[v]/2-p[v]/2,m[v]=Math.max(m[v],p[v]),m[c]=Math.min(m[c],p[c]+g[1-u]),l.x=g[0],l.y=g[1],l.markRedraw()}return m},e.prototype._layoutContentAndController=function(t,a,i,n,o,s,l,u){var h=this.getContentGroup(),f=this._containerGroup,v=this._controllerGroup;Cn(t.get("orient"),h,t.get("itemGap"),n?i.width:null,n?null:i.height),Cn("horizontal",v,t.get("pageButtonItemGap",!0));var c=h.getBoundingRect(),d=v.getBoundingRect(),p=this._showController=c[o]>i[o],g=[-c.x,-c.y];a||(g[n]=h[u]);var y=[0,0],m=[-d.x,-d.y],_=Q(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(p){var x=t.get("pageButtonPosition",!0);x==="end"?m[n]+=i[o]-d[o]:y[n]+=d[o]+_}m[1-n]+=c[s]/2-d[s]/2,h.setPosition(g),f.setPosition(y),v.setPosition(m);var b={x:0,y:0};if(b[o]=p?i[o]:c[o],b[s]=Math.max(c[s],d[s]),b[l]=Math.min(0,d[l]+m[1-n]),f.__rectSize=i[o],p){var S={x:0,y:0};S[o]=Math.max(i[o]-d[o]-_,0),S[s]=b[s],f.setClipPath(new _t({shape:S})),f.__rectSize=S[o]}else v.eachChild(function(T){T.attr({invisible:!0,silent:!0})});var w=this._getPageInfo(t);return w.pageIndex!=null&&It(h,{x:w.contentPosition[0],y:w.contentPosition[1]},p?t:null),this._updatePageInfoView(t,w),b},e.prototype._pageGo=function(t,a,i){var n=this._getPageInfo(a)[t];n!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:n,legendId:a.id})},e.prototype._updatePageInfoView=function(t,a){var i=this._controllerGroup;M(["pagePrev","pageNext"],function(h){var f=h+"DataIndex",v=a[f]!=null,c=i.childOfName(h);c&&(c.setStyle("fill",v?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),c.cursor=v?"pointer":"default")});var n=i.childOfName("pageText"),o=t.get("pageFormatter"),s=a.pageIndex,l=s!=null?s+1:0,u=a.pageCount;n&&o&&n.setStyle("text",$(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},e.prototype._getPageInfo=function(t){var a=t.get("scrollDataIndex",!0),i=this.getContentGroup(),n=this._containerGroup.__rectSize,o=t.getOrient().index,s=K0[o],l=j0[o],u=this._findTargetItemIndex(a),h=i.children(),f=h[u],v=h.length,c=v?1:0,d={contentPosition:[i.x,i.y],pageCount:c,pageIndex:c-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!f)return d;var p=x(f);d.contentPosition[o]=-p.s;for(var g=u+1,y=p,m=p,_=null;g<=v;++g)_=x(h[g]),(!_&&m.e>y.s+n||_&&!b(_,y.s))&&(m.i>y.i?y=m:y=_,y&&(d.pageNextDataIndex==null&&(d.pageNextDataIndex=y.i),++d.pageCount)),m=_;for(var g=u-1,y=p,m=p,_=null;g>=-1;--g)_=x(h[g]),(!_||!b(m,_.s))&&y.i<m.i&&(m=y,d.pagePrevDataIndex==null&&(d.pagePrevDataIndex=y.i),++d.pageCount,++d.pageIndex),y=_;return d;function x(S){if(S){var w=S.getBoundingRect(),T=w[l]+S[l];return{s:T,e:T+w[s],i:S.__legendDataIndex}}}function b(S,w){return S.e>=w&&S.s<=w+n}},e.prototype._findTargetItemIndex=function(t){if(!this._showController)return 0;var a,i=this.getContentGroup(),n;return i.eachChild(function(o,s){var l=o.__legendDataIndex;n==null&&l!=null&&(n=s),l===t&&(a=s)}),a??n},e.type="legend.scroll",e}(bP);function m$(r){r.registerAction("legendScroll","legendscroll",function(e,t){var a=e.scrollDataIndex;a!=null&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},function(i){i.setScrollDataIndex(a)})})}function _$(r){mt(AP),r.registerComponentModel(g$),r.registerComponentView(y$),m$(r)}function x$(r){mt(AP),mt(_$)}var S$=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.inside",e.defaultOption=yi(_u.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(_u),J0=St();function b$(r,e,t){J0(r).coordSysRecordMap.each(function(a){var i=a.dataZoomInfoMap.get(e.uid);i&&(i.getRange=t)})}function w$(r,e){for(var t=J0(r).coordSysRecordMap,a=t.keys(),i=0;i<a.length;i++){var n=a[i],o=t.get(n),s=o.dataZoomInfoMap;if(s){var l=e.uid,u=s.get(l);u&&(s.removeKey(l),s.keys().length||LP(t,o))}}}function LP(r,e){if(e){r.removeKey(e.model.uid);var t=e.controller;t&&t.dispose()}}function T$(r,e){var t={model:e,containsPoint:pt(A$,e),dispatchAction:pt(C$,r),dataZoomInfoMap:null,controller:null},a=t.controller=new $n(r.getZr());return M(["pan","zoom","scrollMove"],function(i){a.on(i,function(n){var o=[];t.dataZoomInfoMap.each(function(s){if(n.isAvailableBehavior(s.model.option)){var l=(s.getRange||{})[i],u=l&&l(s.dzReferCoordSysInfo,t.model.mainType,t.controller,n);!s.model.get("disabled",!0)&&u&&o.push({dataZoomId:s.model.id,start:u[0],end:u[1]})}}),o.length&&t.dispatchAction(o)})}),t}function C$(r,e){r.isDisposed()||r.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:e})}function A$(r,e,t,a){return r.coordinateSystem.containPoint([t,a])}function M$(r,e,t){var a,i="type_",n={type_true:2,type_move:1,type_false:0,type_undefined:-1},o=!0;return r.each(function(s){var l=s.model,u=l.get("disabled",!0)?!1:l.get("zoomLock",!0)?"move":!0;n[i+u]>n[i+a]&&(a=u),o=o&&l.get("preventDefaultMouseMove",!0)}),{controlType:a,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o,api:t,zInfo:{component:e.model},triggerInfo:{roamTrigger:null,isInSelf:e.containsPoint}}}}function D$(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(e,t){var a=J0(t),i=a.coordSysRecordMap||(a.coordSysRecordMap=J());i.each(function(n){n.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(n){var o=C2(n);M(o.infoList,function(s){var l=s.model.uid,u=i.get(l)||i.set(l,T$(t,s.model)),h=u.dataZoomInfoMap||(u.dataZoomInfoMap=J());h.set(n.uid,{dzReferCoordSysInfo:s,model:n,getRange:null})})}),i.each(function(n){var o=n.controller,s,l=n.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){LP(i,n);return}var h=M$(l,n,t);o.enable(h.controlType,h.opt),Yo(n,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var L$=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return e.prototype.render=function(t,a,i){if(r.prototype.render.apply(this,arguments),t.noTarget()){this._clear();return}this.range=t.getPercentRange(),b$(i,t,{pan:X(Q0.pan,this),zoom:X(Q0.zoom,this),scrollMove:X(Q0.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){w$(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e}(M0),Q0={zoom:function(r,e,t,a){var i=this.range,n=i.slice(),o=r.axisModels[0];if(o){var s=t_[e](null,[a.originX,a.originY],o,t,r),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(n[1]-n[0])+n[0],u=Math.max(1/a.scale,0);n[0]=(n[0]-l)*u+l,n[1]=(n[1]-l)*u+l;var h=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(Pi(0,n,[0,100],0,h.minSpan,h.maxSpan),this.range=n,i[0]!==n[0]||i[1]!==n[1])return n}},pan:IP(function(r,e,t,a,i,n){var o=t_[a]([n.oldX,n.oldY],[n.newX,n.newY],e,i,t);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:IP(function(r,e,t,a,i,n){var o=t_[a]([0,0],[n.scrollDelta,n.scrollDelta],e,i,t);return o.signal*(r[1]-r[0])*n.scrollDelta})};function IP(r){return function(e,t,a,i){var n=this.range,o=n.slice(),s=e.axisModels[0];if(s){var l=r(o,s,e,t,a,i);if(Pi(l,o,[0,100],"all"),this.range=o,n[0]!==o[0]||n[1]!==o[1])return o}}}var t_={grid:function(r,e,t,a,i){var n=t.axis,o={},s=i.model.coordinateSystem.getRect();return r=r||[0,0],n.dim==="x"?(o.pixel=e[0]-r[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=n.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=n.inverse?-1:1),o},polar:function(r,e,t,a,i){var n=t.axis,o={},s=i.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return r=r?s.pointToCoord(r):[0,0],e=s.pointToCoord(e),t.mainType==="radiusAxis"?(o.pixel=e[0]-r[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=n.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=n.inverse?-1:1),o},singleAxis:function(r,e,t,a,i){var n=t.axis,o=i.model.coordinateSystem.getRect(),s={};return r=r||[0,0],n.orient==="horizontal"?(s.pixel=e[0]-r[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=n.inverse?1:-1):(s.pixel=e[1]-r[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=n.inverse?-1:1),s}};function PP(r){D0(r),r.registerComponentModel(S$),r.registerComponentView(L$),D$(r)}var I$=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=yi(_u.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:B.color.accent10,borderRadius:0,backgroundColor:B.color.transparent,dataBackground:{lineStyle:{color:B.color.accent30,width:.5},areaStyle:{color:B.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:B.color.accent40,width:.5},areaStyle:{color:B.color.accent20,opacity:.3}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:B.color.neutral00,borderColor:B.color.accent20},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:B.color.accent40,opacity:.5},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:B.color.tertiary},brushSelect:!0,brushStyle:{color:B.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:B.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),e}(_u),Cu=_t,P$=1,e_=30,k$=7,Au="horizontal",kP="vertical",R$=5,E$=["line","bar","candlestick","scatter"],O$={easing:"cubicOut",duration:100,delay:0},N$=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._displayables={},t}return e.prototype.init=function(t,a){this.api=a,this._onBrush=X(this._onBrush,this),this._onBrushEnd=X(this._onBrushEnd,this)},e.prototype.render=function(t,a,i,n){if(r.prototype.render.apply(this,arguments),Yo(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),t.get("show")===!1){this.group.removeAll();return}if(t.noTarget()){this._clear(),this.group.removeAll();return}(!n||n.type!=="dataZoom"||n.from!==this.uid)&&this._buildView(),this._updateView()},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){xl(this,"_dispatchZoomAction");var t=this.api.getZr();t.off("mousemove",this._onBrush),t.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var a=this._displayables.sliderGroup=new et;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(a),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,a=this.api,i=t.get("brushSelect"),n=i?k$:0,o=de(t,a).refContainer,s=this._findCoordRect(),l=t.get("defaultLocationEdgeGap",!0)||0,u=this._orient===Au?{right:o.width-s.x-s.width,top:o.height-e_-l-n,width:s.width,height:e_}:{right:l,top:s.y,width:e_,height:s.height},h=An(t.option);M(["right","top","width","height"],function(v){h[v]==="ph"&&(h[v]=u[v])});var f=qt(h,o);this._location={x:f.x,y:f.y},this._size=[f.width,f.height],this._orient===kP&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,a=this._location,i=this._orient,n=this.dataZoomModel.getFirstTargetAxisModel(),o=n&&n.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(i===Au&&!o?{scaleY:l?1:-1,scaleX:1}:i===Au&&o?{scaleY:l?1:-1,scaleX:-1}:i===kP&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=t.getBoundingRect([s]);t.x=a.x-u.x,t.y=a.y-u.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,a=this._size,i=this._displayables.sliderGroup,n=t.get("brushSelect");i.add(new Cu({silent:!0,shape:{x:0,y:0,width:a[0],height:a[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var o=new Cu({shape:{x:0,y:0,width:a[0],height:a[1]},style:{fill:"transparent"},z2:0,onclick:X(this._onClickPanel,this)}),s=this.api.getZr();n?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),i.add(o)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!t)return;var a=this._size,i=this._shadowSize||[],n=t.series,o=n.getRawData(),s=n.getShadowDim&&n.getShadowDim(),l=s&&o.getDimensionInfo(s)?n.getShadowDim():t.otherDim;if(l==null)return;var u=this._shadowPolygonPts,h=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||a[0]!==i[0]||a[1]!==i[1]){var f=o.getDataExtent(t.thisDim),v=o.getDataExtent(l),c=(v[1]-v[0])*.3;v=[v[0]-c,v[1]+c];var d=[0,a[1]],p=[0,a[0]],g=[[a[0],0],[0,0]],y=[],m=p[1]/Math.max(1,o.count()-1),_=a[0]/(f[1]-f[0]),x=t.thisAxis.type==="time",b=-m,S=Math.round(o.count()/a[0]),w;o.each([t.thisDim,l],function(I,L,P){if(S>0&&P%S){x||(b+=m);return}b=x?(+I-f[0])*_:b+m;var k=L==null||isNaN(L)||L==="",R=k?0:Ot(L,v,d,!0);k&&!w&&P?(g.push([g[g.length-1][0],0]),y.push([y[y.length-1][0],0])):!k&&w&&(g.push([b,0]),y.push([b,0])),k||(g.push([b,R]),y.push([b,R])),w=k}),u=this._shadowPolygonPts=g,h=this._shadowPolylinePts=y}this._shadowData=o,this._shadowDim=l,this._shadowSize=[a[0],a[1]];var T=this.dataZoomModel;function C(I){var L=T.getModel(I?"selectedDataBackground":"dataBackground"),P=new et,k=new De({shape:{points:u},segmentIgnoreThreshold:1,style:L.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),R=new Be({shape:{points:h},segmentIgnoreThreshold:1,style:L.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return P.add(k),P.add(R),P}for(var A=0;A<3;A++){var D=C(A===1);this._displayables.sliderGroup.add(D),this._displayables.dataShadowSegs.push(D)}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,a=t.get("showDataShadow");if(a!==!1){var i,n=this.ecModel;return t.eachTargetAxis(function(o,s){var l=t.getAxisProxy(o,s).getTargetSeriesModels();M(l,function(u){if(!i&&!(a!==!0&&gt(E$,u.get("type"))<0)){var h=n.getComponent(Ni(o),s).axis,f=B$(o),v,c=u.coordinateSystem;f!=null&&c.getOtherAxis&&(v=c.getOtherAxis(h).inverse),f=u.getData().mapDimension(f);var d=u.getData().mapDimension(o);i={thisAxis:h,series:u,thisDim:d,otherDim:f,otherAxisInverse:v}}},this)},this),i}},e.prototype._renderHandle=function(){var t=this.group,a=this._displayables,i=a.handles=[null,null],n=a.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,h=l.get("borderRadius")||0,f=l.get("brushSelect"),v=a.filler=new Cu({silent:f,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(v),o.add(new Cu({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:h},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:P$,fill:B.color.transparent}})),M([0,1],function(_){var x=l.get("handleIcon");!vf[x]&&x.indexOf("path://")<0&&x.indexOf("image://")<0&&(x="path://"+x);var b=he(x,-1,0,2,2,null,!0);b.attr({cursor:z$(this._orient),draggable:!0,drift:X(this._onDragMove,this,_),ondragend:X(this._onDragEnd,this),onmouseover:X(this._showDataInfo,this,!0),onmouseout:X(this._showDataInfo,this,!1),z2:5});var S=b.getBoundingRect(),w=l.get("handleSize");this._handleHeight=Z(w,this._size[1]),this._handleWidth=S.width/S.height*this._handleHeight,b.setStyle(l.getModel("handleStyle").getItemStyle()),b.style.strokeNoScale=!0,b.rectHover=!0,b.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),dn(b);var T=l.get("handleColor");T!=null&&(b.style.fill=T),o.add(i[_]=b);var C=l.getModel("textStyle"),A=l.get("handleLabel")||{},D=A.show||!1;t.add(n[_]=new Lt({silent:!0,invisible:!D,style:Ft(C,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:C.getTextColor(),font:C.getFont()}),z2:10}))},this);var c=v;if(f){var d=Z(l.get("moveHandleSize"),s[1]),p=a.moveHandle=new _t({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:d}}),g=d*.8,y=a.moveHandleIcon=he(l.get("moveHandleIcon"),-g/2,-g/2,g,g,B.color.neutral00,!0);y.silent=!0,y.y=s[1]+d/2-.5,p.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var m=Math.min(s[1]/2,Math.max(d,10));c=a.moveZone=new _t({invisible:!0,shape:{y:s[1]-m,height:d+m}}),c.on("mouseover",function(){u.enterEmphasis(p)}).on("mouseout",function(){u.leaveEmphasis(p)}),o.add(p),o.add(y),o.add(c)}c.attr({draggable:!0,cursor:"default",drift:X(this._onDragMove,this,"all"),ondragstart:X(this._showDataInfo,this,!0),ondragend:X(this._onDragEnd,this),onmouseover:X(this._showDataInfo,this,!0),onmouseout:X(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),a=this._getViewExtent();this._handleEnds=[Ot(t[0],[0,100],a,!0),Ot(t[1],[0,100],a,!0)]},e.prototype._updateInterval=function(t,a){var i=this.dataZoomModel,n=this._handleEnds,o=this._getViewExtent(),s=i.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];Pi(a,n,o,i.get("zoomLock")?"all":t,s.minSpan!=null?Ot(s.minSpan,l,o,!0):null,s.maxSpan!=null?Ot(s.maxSpan,l,o,!0):null);var u=this._range,h=this._range=mr([Ot(n[0],o,l,!0),Ot(n[1],o,l,!0)]);return!u||u[0]!==h[0]||u[1]!==h[1]},e.prototype._updateView=function(t){var a=this._displayables,i=this._handleEnds,n=mr(i.slice()),o=this._size;M([0,1],function(c){var d=a.handles[c],p=this._handleHeight;d.attr({scaleX:p/2,scaleY:p/2,x:i[c]+(c?-1:1),y:o[1]/2-p/2})},this),a.filler.setShape({x:n[0],y:0,width:n[1]-n[0],height:o[1]});var s={x:n[0],width:n[1]-n[0]};a.moveHandle&&(a.moveHandle.setShape(s),a.moveZone.setShape(s),a.moveZone.getBoundingRect(),a.moveHandleIcon&&a.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=a.dataShadowSegs,u=[0,n[0],n[1],o[0]],h=0;h<l.length;h++){var f=l[h],v=f.getClipPath();v||(v=new _t,f.setClipPath(v)),v.setShape({x:u[h],y:0,width:u[h+1]-u[h],height:o[1]})}this._updateDataInfo(t)},e.prototype._updateDataInfo=function(t){var a=this.dataZoomModel,i=this._displayables,n=i.handleLabels,o=this._orient,s=["",""];if(a.get("showDetail")){var l=a.findRepresentativeAxisProxy();if(l){var u=l.getAxisModel().axis,h=this._range,f=t?l.calculateDataWindow({start:h[0],end:h[1]}).valueWindow:l.getDataValueWindow();s=[this._formatLabel(f[0],u),this._formatLabel(f[1],u)]}}var v=mr(this._handleEnds.slice());c.call(this,0),c.call(this,1);function c(d){var p=_n(i.handles[d].parent,this.group),g=Gh(d===0?"right":"left",p),y=this._handleWidth/2+R$,m=Vr([v[d]+(d===0?-y:y),this._size[1]/2],p);n[d].setStyle({x:m[0],y:m[1],verticalAlign:o===Au?"middle":g,align:o===Au?g:"center",text:s[d]})}},e.prototype._formatLabel=function(t,a){var i=this.dataZoomModel,n=i.get("labelFormatter"),o=i.get("labelPrecision");(o==null||o==="auto")&&(o=a.getPixelPrecision());var s=t==null||isNaN(t)?"":a.type==="category"||a.type==="time"?a.scale.getLabel({value:Math.round(t)}):t.toFixed(Math.min(o,20));return rt(n)?n(t,s):$(n)?n.replace("{value}",s):s},e.prototype._showDataInfo=function(t){var a=this.dataZoomModel.get("handleLabel")||{},i=a.show||!1,n=this.dataZoomModel.getModel(["emphasis","handleLabel"]),o=n.get("show")||!1,s=t||this._dragging?o:i,l=this._displayables,u=l.handleLabels;u[0].attr("invisible",!s),u[1].attr("invisible",!s),l.moveHandle&&this.api[s?"enterEmphasis":"leaveEmphasis"](l.moveHandle,1)},e.prototype._onDragMove=function(t,a,i,n){this._dragging=!0,Da(n.event);var o=this._displayables.sliderGroup.getLocalTransform(),s=Vr([a,i],o,!0),l=this._updateInterval(t,s[0]),u=this.dataZoomModel.get("realtime");this._updateView(!u),l&&u&&this._dispatchZoomAction(!0)},e.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1);var t=this.dataZoomModel.get("realtime");!t&&this._dispatchZoomAction(!1)},e.prototype._onClickPanel=function(t){var a=this._size,i=this._displayables.sliderGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(i[0]<0||i[0]>a[0]||i[1]<0||i[1]>a[1])){var n=this._handleEnds,o=(n[0]+n[1])/2,s=this._updateInterval("all",i[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var a=t.offsetX,i=t.offsetY;this._brushStart=new nt(a,i),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(this._brushing){var a=this._displayables.brushRect;if(this._brushing=!1,!!a){a.attr("ignore",!0);var i=a.shape,n=+new Date;if(!(n-this._brushStartTime<200&&Math.abs(i.width)<5)){var o=this._getViewExtent(),s=[0,100],l=this._handleEnds=[i.x,i.x+i.width],u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();Pi(0,l,o,0,u.minSpan!=null?Ot(u.minSpan,s,o,!0):null,u.maxSpan!=null?Ot(u.maxSpan,s,o,!0):null),this._range=mr([Ot(l[0],o,s,!0),Ot(l[1],o,s,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(Da(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,a){var i=this._displayables,n=this.dataZoomModel,o=i.brushRect;o||(o=i.brushRect=new Cu({silent:!0,style:n.getModel("brushStyle").getItemStyle()}),i.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(t,a),h=l.transformCoordToLocal(s.x,s.y),f=this._size;u[0]=Math.max(Math.min(f[0],u[0]),0),o.setShape({x:h[0],y:0,width:u[0]-h[0],height:f[1]})},e.prototype._dispatchZoomAction=function(t){var a=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?O$:null,start:a[0],end:a[1]})},e.prototype._findCoordRect=function(){var t,a=C2(this.dataZoomModel).infoList;if(!t&&a.length){var i=a[0].model.coordinateSystem;t=i.getRect&&i.getRect()}if(!t){var n=this.api.getWidth(),o=this.api.getHeight();t={x:n*.2,y:o*.2,width:n*.6,height:o*.6}}return t},e.type="dataZoom.slider",e}(M0);function B$(r){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[r]}function z$(r){return r==="vertical"?"ns-resize":"ew-resize"}function RP(r){r.registerComponentModel(I$),r.registerComponentView(N$),D0(r)}function V$(r){mt(PP),mt(RP)}var EP={get:function(r,e,t){var a=at((G$[r]||{})[e]);return t&&W(a)?a[a.length-1]:a}},G$={color:{active:["#006edd","#e0ffff"],inactive:[B.color.transparent]},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]}},OP=_e.mapVisual,F$=_e.eachVisual,H$=W,NP=M,W$=mr,U$=Ot,Jv=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.stateList=["inRange","outOfRange"],t.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],t.layoutMode={type:"box",ignoreSize:!0},t.dataBound=[-1/0,1/0],t.targetVisuals={},t.controllerVisuals={},t}return e.prototype.init=function(t,a,i){this.mergeDefaultAndTheme(t,i)},e.prototype.optionUpdated=function(t,a){var i=this.option;!a&&eP(i,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var a=this.stateList;t=X(t,this),this.controllerVisuals=B0(this.option.controller,a,t),this.targetVisuals=B0(this.option.target,a,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesId,a=this.option.seriesIndex;a==null&&t==null&&(a="all");var i=To(this.ecModel,"series",{index:a,id:t},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return U(i,function(n){return n.componentIndex})},e.prototype.eachTargetSeries=function(t,a){M(this.getTargetSeriesIndices(),function(i){var n=this.ecModel.getSeriesByIndex(i);n&&t.call(a,n)},this)},e.prototype.isTargetSeries=function(t){var a=!1;return this.eachTargetSeries(function(i){i===t&&(a=!0)}),a},e.prototype.formatValueText=function(t,a,i){var n=this.option,o=n.precision,s=this.dataBound,l=n.formatter,u;i=i||["<",">"],W(t)&&(t=t.slice(),u=!0);var h=a?t:u?[f(t[0]),f(t[1])]:f(t);if($(l))return l.replace("{value}",u?h[0]:h).replace("{value2}",u?h[1]:h);if(rt(l))return u?l(t[0],t[1]):l(t);if(u)return t[0]===s[0]?i[0]+" "+h[1]:t[1]===s[1]?i[1]+" "+h[0]:h[0]+" - "+h[1];return h;function f(v){return v===s[0]?"min":v===s[1]?"max":(+v).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var t=this.option,a=W$([t.min,t.max]);this._dataExtent=a},e.prototype.getDataDimensionIndex=function(t){var a=this.option.dimension;if(a!=null)return t.getDimensionIndex(a);for(var i=t.dimensions,n=i.length-1;n>=0;n--){var o=i[n],s=t.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var t=this.ecModel,a=this.option,i={inRange:a.inRange,outOfRange:a.outOfRange},n=a.target||(a.target={}),o=a.controller||(a.controller={});yt(n,i),yt(o,i);var s=this.isCategory();l.call(this,n),l.call(this,o),u.call(this,n,"inRange","outOfRange"),h.call(this,o);function l(f){H$(a.color)&&!f.inRange&&(f.inRange={color:a.color.slice().reverse()}),f.inRange=f.inRange||{color:t.get("gradientColor")}}function u(f,v,c){var d=f[v],p=f[c];d&&!p&&(p=f[c]={},NP(d,function(g,y){if(_e.isValidType(y)){var m=EP.get(y,"inactive",s);m!=null&&(p[y]=m,y==="color"&&!p.hasOwnProperty("opacity")&&!p.hasOwnProperty("colorAlpha")&&(p.opacity=[0,0]))}}))}function h(f){var v=(f.inRange||{}).symbol||(f.outOfRange||{}).symbol,c=(f.inRange||{}).symbolSize||(f.outOfRange||{}).symbolSize,d=this.get("inactiveColor"),p=this.getItemSymbol(),g=p||"roundRect";NP(this.stateList,function(y){var m=this.itemSize,_=f[y];_||(_=f[y]={color:s?d:[d]}),_.symbol==null&&(_.symbol=v&&at(v)||(s?g:[g])),_.symbolSize==null&&(_.symbolSize=c&&at(c)||(s?m[0]:[m[0],m[0]])),_.symbol=OP(_.symbol,function(S){return S==="none"?g:S});var x=_.symbolSize;if(x!=null){var b=-1/0;F$(x,function(S){S>b&&(b=S)}),_.symbolSize=OP(x,function(S){return U$(S,[0,b],[0,m[0]],!0)})}},this)}},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(t){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(t){return null},e.prototype.getVisualMeta=function(t){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:B.color.transparent,borderColor:B.color.borderTint,contentColor:B.color.theme[0],inactiveColor:B.color.disabled,borderWidth:0,padding:B.size.m,textGap:10,precision:0,textStyle:{color:B.color.secondary}},e}(Tt),BP=[20,140],Y$=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(t,a){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(i){i.mappingMethod="linear",i.dataExtent=this.getExtent()}),this._resetRange()},e.prototype.resetItemSize=function(){r.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=BP[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=BP[1])},e.prototype._resetRange=function(){var t=this.getExtent(),a=this.option.range;!a||a.auto?(t.auto=1,this.option.range=t):W(a)&&(a[0]>a[1]&&a.reverse(),a[0]=Math.max(a[0],t[0]),a[1]=Math.min(a[1],t[1]))},e.prototype.completeVisualOption=function(){r.prototype.completeVisualOption.apply(this,arguments),M(this.stateList,function(t){var a=this.option.controller[t].symbolSize;a&&a[0]!==a[1]&&(a[0]=a[1]/3)},this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),a=mr((this.get("range")||[]).slice());return a[0]>t[1]&&(a[0]=t[1]),a[1]>t[1]&&(a[1]=t[1]),a[0]<t[0]&&(a[0]=t[0]),a[1]<t[0]&&(a[1]=t[0]),a},e.prototype.getValueState=function(t){var a=this.option.range,i=this.getExtent(),n=Q(this.option.unboundedRange,!0);return(n&&a[0]<=i[0]||a[0]<=t)&&(n&&a[1]>=i[1]||t<=a[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var a=[];return this.eachTargetSeries(function(i){var n=[],o=i.getData();o.each(this.getDataDimensionIndex(o),function(s,l){t[0]<=s&&s<=t[1]&&n.push(l)},this),a.push({seriesId:i.id,dataIndex:n})},this),a},e.prototype.getVisualMeta=function(t){var a=zP(this,"outOfRange",this.getExtent()),i=zP(this,"inRange",this.option.range.slice()),n=[];function o(c,d){n.push({value:c,color:t(c,d)})}for(var s=0,l=0,u=i.length,h=a.length;l<h&&(!i.length||a[l]<=i[0]);l++)a[l]<i[s]&&o(a[l],"outOfRange");for(var f=1;s<u;s++,f=0)f&&n.length&&o(i[s],"outOfRange"),o(i[s],"inRange");for(var f=1;l<h;l++)(!i.length||i[i.length-1]<a[l])&&(f&&(n.length&&o(n[n.length-1].value,"outOfRange"),f=0),o(a[l],"outOfRange"));var v=n.length;return{stops:n,outerColors:[v?n[0].color:"transparent",v?n[v-1].color:"transparent"]}},e.type="visualMap.continuous",e.defaultOption=yi(Jv.defaultOption,{align:"auto",calculable:!1,hoverLink:!0,realtime:!0,handleIcon:"path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z",handleSize:"120%",handleStyle:{borderColor:B.color.neutral00,borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:B.color.neutral00,borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:B.color.shadow}}),e}(Jv);function zP(r,e,t){if(t[0]===t[1])return t.slice();for(var a=200,i=(t[1]-t[0])/a,n=t[0],o=[],s=0;s<=a&&n<t[1];s++)o.push(n),n+=i;return o.push(t[1]),o}var VP=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.autoPositionValues={left:1,right:1,top:1,bottom:1},t}return e.prototype.init=function(t,a){this.ecModel=t,this.api=a},e.prototype.render=function(t,a,i,n){if(this.visualMapModel=t,t.get("show")===!1){this.group.removeAll();return}this.doRender(t,a,i,n)},e.prototype.renderBackground=function(t){var a=this.visualMapModel,i=hl(a.get("padding")||0),n=t.getBoundingRect();t.add(new _t({z2:-1,silent:!0,shape:{x:n.x-i[3],y:n.y-i[0],width:n.width+i[3]+i[1],height:n.height+i[0]+i[2]},style:{fill:a.get("backgroundColor"),stroke:a.get("borderColor"),lineWidth:a.get("borderWidth")}}))},e.prototype.getControllerVisual=function(t,a,i){i=i||{};var n=i.forceState,o=this.visualMapModel,s={};if(a==="color"){var l=o.get("contentColor");s.color=l}function u(c){return s[c]}function h(c,d){s[c]=d}var f=o.controllerVisuals[n||o.getValueState(t)],v=_e.prepareVisualTypes(f);return M(v,function(c){var d=f[c];i.convertOpacityToAlpha&&c==="opacity"&&(c="colorAlpha",d=f.__alphaForOpacity),_e.dependsOn(c,a)&&d&&d.applyVisual(t,u,h)}),s[a]},e.prototype.positionGroup=function(t){var a=this.visualMapModel,i=this.api,n=de(a,i).refContainer;Qh(t,a.getBoxLayoutParams(),n)},e.prototype.doRender=function(t,a,i,n){},e.type="visualMap",e}(Zt),GP=[["left","right","width"],["top","bottom","height"]];function FP(r,e,t){var a=r.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=GP[o],l=[0,null,10],u={},h=0;h<3;h++)u[GP[1-o][h]]=l[h],u[s[h]]=h===2?t[0]:a[s[h]];var f=[["x","width",3],["y","height",0]][o],v=qt(u,n,a.padding);return s[(v.margin[f[2]]||0)+v[f[0]]+v[f[1]]*.5<n[f[1]]*.5?0:1]}function Qv(r,e){return M(r||[],function(t){t.dataIndex!=null&&(t.dataIndexInside=t.dataIndex,t.dataIndex=null),t.highlightKey="visualMap"+(e?e.componentIndex:"")}),r}var wa=Ot,Z$=M,HP=Math.min,r_=Math.max,$$=12,X$=6,q$=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._shapes={},t._dataInterval=[],t._handleEnds=[],t._hoverLinkDataIndices=[],t}return e.prototype.init=function(t,a){r.prototype.init.call(this,t,a),this._hoverLinkFromSeriesMouseOver=X(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=X(this._hideIndicator,this)},e.prototype.doRender=function(t,a,i,n){(!n||n.type!=="selectDataRange"||n.from!==this.uid)&&this._buildView()},e.prototype._buildView=function(){this.group.removeAll();var t=this.visualMapModel,a=this.group;this._orient=t.get("orient"),this._useHandle=t.get("calculable"),this._resetInterval(),this._renderBar(a);var i=t.get("text");this._renderEndsText(a,i,0),this._renderEndsText(a,i,1),this._updateView(!0),this.renderBackground(a),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(a)},e.prototype._renderEndsText=function(t,a,i){if(a){var n=a[1-i];n=n!=null?n+"":"";var o=this.visualMapModel,s=o.get("textGap"),l=o.itemSize,u=this._shapes.mainGroup,h=this._applyTransform([l[0]/2,i===0?-s:l[1]+s],u),f=this._applyTransform(i===0?"bottom":"top",u),v=this._orient,c=this.visualMapModel.textStyleModel;this.group.add(new Lt({style:Ft(c,{x:h[0],y:h[1],verticalAlign:c.get("verticalAlign")||(v==="horizontal"?"middle":f),align:c.get("align")||(v==="horizontal"?f:"center"),text:n})}))}},e.prototype._renderBar=function(t){var a=this.visualMapModel,i=this._shapes,n=a.itemSize,o=this._orient,s=this._useHandle,l=FP(a,this.api,n),u=i.mainGroup=this._createBarGroup(l),h=new et;u.add(h),h.add(i.outOfRange=WP()),h.add(i.inRange=WP(null,s?YP(this._orient):null,X(this._dragHandle,this,"all",!1),X(this._dragHandle,this,"all",!0))),h.setClipPath(new _t({shape:{x:0,y:0,width:n[0],height:n[1],r:3}}));var f=a.textStyleModel.getTextRect("\u56FD"),v=r_(f.width,f.height);s&&(i.handleThumbs=[],i.handleLabels=[],i.handleLabelPoints=[],this._createHandle(a,u,0,n,v,o),this._createHandle(a,u,1,n,v,o)),this._createIndicator(a,u,n,v,o),t.add(u)},e.prototype._createHandle=function(t,a,i,n,o,s){var l=X(this._dragHandle,this,i,!1),u=X(this._dragHandle,this,i,!0),h=Nr(t.get("handleSize"),n[0]),f=he(t.get("handleIcon"),-h/2,-h/2,h,h,null,!0),v=YP(this._orient);f.attr({cursor:v,draggable:!0,drift:l,ondragend:u,onmousemove:function(y){Da(y.event)}}),f.x=n[0]/2,f.useStyle(t.getModel("handleStyle").getItemStyle()),f.setStyle({strokeNoScale:!0,strokeFirst:!0}),f.style.lineWidth*=2,f.ensureState("emphasis").style=t.getModel(["emphasis","handleStyle"]).getItemStyle(),pn(f,!0),a.add(f);var c=this.visualMapModel.textStyleModel,d=new Lt({cursor:v,draggable:!0,drift:l,onmousemove:function(y){Da(y.event)},ondragend:u,style:Ft(c,{x:0,y:0,text:""})});d.ensureState("blur").style={opacity:.1},d.stateTransition={duration:200},this.group.add(d);var p=[h,0],g=this._shapes;g.handleThumbs[i]=f,g.handleLabelPoints[i]=p,g.handleLabels[i]=d},e.prototype._createIndicator=function(t,a,i,n,o){var s=Nr(t.get("indicatorSize"),i[0]),l=he(t.get("indicatorIcon"),-s/2,-s/2,s,s,null,!0);l.attr({cursor:"move",invisible:!0,silent:!0,x:i[0]/2});var u=t.getModel("indicatorStyle").getItemStyle();if(l instanceof Me){var h=l.style;l.useStyle(F({image:h.image,x:h.x,y:h.y,width:h.width,height:h.height},u))}else l.useStyle(u);a.add(l);var f=this.visualMapModel.textStyleModel,v=new Lt({silent:!0,invisible:!0,style:Ft(f,{x:0,y:0,text:""})});this.group.add(v);var c=[(o==="horizontal"?n/2:X$)+i[0]/2,0],d=this._shapes;d.indicator=l,d.indicatorLabel=v,d.indicatorLabelPoint=c,this._firstShowIndicator=!0},e.prototype._dragHandle=function(t,a,i,n){if(this._useHandle){if(this._dragging=!a,!a){var o=this._applyTransform([i,n],this._shapes.mainGroup,!0);this._updateInterval(t,o[1]),this._hideIndicator(),this._updateView()}a===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),a?!this._hovering&&this._clearHoverLinkToSeries():UP(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[t],!1)}},e.prototype._resetInterval=function(){var t=this.visualMapModel,a=this._dataInterval=t.getSelected(),i=t.getExtent(),n=[0,t.itemSize[1]];this._handleEnds=[wa(a[0],i,n,!0),wa(a[1],i,n,!0)]},e.prototype._updateInterval=function(t,a){a=a||0;var i=this.visualMapModel,n=this._handleEnds,o=[0,i.itemSize[1]];Pi(a,n,o,t,0);var s=i.getExtent();this._dataInterval=[wa(n[0],o,s,!0),wa(n[1],o,s,!0)]},e.prototype._updateView=function(t){var a=this.visualMapModel,i=a.getExtent(),n=this._shapes,o=[0,a.itemSize[1]],s=t?o:this._handleEnds,l=this._createBarVisual(this._dataInterval,i,s,"inRange"),u=this._createBarVisual(i,i,o,"outOfRange");n.inRange.setStyle({fill:l.barColor}).setShape("points",l.barPoints),n.outOfRange.setStyle({fill:u.barColor}).setShape("points",u.barPoints),this._updateHandle(s,l)},e.prototype._createBarVisual=function(t,a,i,n){var o={forceState:n,convertOpacityToAlpha:!0},s=this._makeColorGradient(t,o),l=[this.getControllerVisual(t[0],"symbolSize",o),this.getControllerVisual(t[1],"symbolSize",o)],u=this._createBarPoints(i,l);return{barColor:new Po(0,0,0,1,s),barPoints:u,handlesColor:[s[0].color,s[s.length-1].color]}},e.prototype._makeColorGradient=function(t,a){var i=100,n=[],o=(t[1]-t[0])/i;n.push({color:this.getControllerVisual(t[0],"color",a),offset:0});for(var s=1;s<i;s++){var l=t[0]+o*s;if(l>t[1])break;n.push({color:this.getControllerVisual(l,"color",a),offset:s/i})}return n.push({color:this.getControllerVisual(t[1],"color",a),offset:1}),n},e.prototype._createBarPoints=function(t,a){var i=this.visualMapModel.itemSize;return[[i[0]-a[0],t[0]],[i[0],t[0]],[i[0],t[1]],[i[0]-a[1],t[1]]]},e.prototype._createBarGroup=function(t){var a=this._orient,i=this.visualMapModel.get("inverse");return new et(a==="horizontal"&&!i?{scaleX:t==="bottom"?1:-1,rotation:Math.PI/2}:a==="horizontal"&&i?{scaleX:t==="bottom"?-1:1,rotation:-Math.PI/2}:a==="vertical"&&!i?{scaleX:t==="left"?1:-1,scaleY:-1}:{scaleX:t==="left"?1:-1})},e.prototype._updateHandle=function(t,a){if(this._useHandle){var i=this._shapes,n=this.visualMapModel,o=i.handleThumbs,s=i.handleLabels,l=n.itemSize,u=n.getExtent(),h=this._applyTransform("left",i.mainGroup);Z$([0,1],function(f){var v=o[f];v.setStyle("fill",a.handlesColor[f]),v.y=t[f];var c=wa(t[f],[0,l[1]],u,!0),d=this.getControllerVisual(c,"symbolSize");v.scaleX=v.scaleY=d/l[0],v.x=l[0]-d/2;var p=Vr(i.handleLabelPoints[f],_n(v,this.group));if(this._orient==="horizontal"){var g=h==="left"||h==="top"?(l[0]-d)/2:(l[0]-d)/-2;p[1]+=g}s[f].setStyle({x:p[0],y:p[1],text:n.formatValueText(this._dataInterval[f]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",i.mainGroup):"center"})},this)}},e.prototype._showIndicator=function(t,a,i,n){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],h=this._shapes,f=h.indicator;if(f){f.attr("invisible",!1);var v={convertOpacityToAlpha:!0},c=this.getControllerVisual(t,"color",v),d=this.getControllerVisual(t,"symbolSize"),p=wa(t,s,u,!0),g=l[0]-d/2,y={x:f.x,y:f.y};f.y=p,f.x=g;var m=Vr(h.indicatorLabelPoint,_n(f,this.group)),_=h.indicatorLabel;_.attr("invisible",!1);var x=this._applyTransform("left",h.mainGroup),b=this._orient,S=b==="horizontal";_.setStyle({text:(i||"")+o.formatValueText(a),verticalAlign:S?x:"middle",align:S?"center":x});var w={x:g,y:p,style:{fill:c}},T={style:{x:m[0],y:m[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var C={duration:100,easing:"cubicInOut",additive:!0};f.x=y.x,f.y=y.y,f.animateTo(w,C),_.animateTo(T,C)}else f.attr(w),_.attr(T);this._firstShowIndicator=!1;var A=this._shapes.handleLabels;if(A)for(var D=0;D<A.length;D++)this.api.enterBlur(A[D])}},e.prototype._enableHoverLinkToSeries=function(){var t=this;this._shapes.mainGroup.on("mousemove",function(a){if(t._hovering=!0,!t._dragging){var i=t.visualMapModel.itemSize,n=t._applyTransform([a.offsetX,a.offsetY],t._shapes.mainGroup,!0,!0);n[1]=HP(r_(0,n[1]),i[1]),t._doHoverLinkToSeries(n[1],0<=n[0]&&n[0]<=i[0])}}).on("mouseout",function(){t._hovering=!1,!t._dragging&&t._clearHoverLinkToSeries()})},e.prototype._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()},e.prototype._doHoverLinkToSeries=function(t,a){var i=this.visualMapModel,n=i.itemSize;if(i.option.hoverLink){var o=[0,n[1]],s=i.getExtent();t=HP(r_(o[0],t),o[1]);var l=K$(i,s,o),u=[t-l,t+l],h=wa(t,o,s,!0),f=[wa(u[0],o,s,!0),wa(u[1],o,s,!0)];u[0]<o[0]&&(f[0]=-1/0),u[1]>o[1]&&(f[1]=1/0),a&&(f[0]===-1/0?this._showIndicator(h,f[1],"< ",l):f[1]===1/0?this._showIndicator(h,f[0],"> ",l):this._showIndicator(h,h,"\u2248 ",l));var v=this._hoverLinkDataIndices,c=[];(a||UP(i))&&(c=this._hoverLinkDataIndices=i.findTargetDataIndices(f));var d=EE(v,c);this._dispatchHighDown("downplay",Qv(d[0],i)),this._dispatchHighDown("highlight",Qv(d[1],i))}},e.prototype._hoverLinkFromSeriesMouseOver=function(t){var a;if(Rn(t.target,function(l){var u=vt(l);if(u.dataIndex!=null)return a=u,!0},!0),!!a){var i=this.ecModel.getSeriesByIndex(a.seriesIndex),n=this.visualMapModel;if(n.isTargetSeries(i)){var o=i.getData(a.dataType),s=o.getStore().get(n.getDataDimensionIndex(o),a.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},e.prototype._hideIndicator=function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0);var a=this._shapes.handleLabels;if(a)for(var i=0;i<a.length;i++)this.api.leaveBlur(a[i])},e.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",Qv(t,this.visualMapModel)),t.length=0},e.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},e.prototype._applyTransform=function(t,a,i,n){var o=_n(a,n?null:this.group);return W(t)?Vr(t,o,i):Gh(t,o,i)},e.prototype._dispatchHighDown=function(t,a){a&&a.length&&this.api.dispatchAction({type:t,batch:a})},e.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},e.type="visualMap.continuous",e}(VP);function WP(r,e,t,a){return new De({shape:{points:r},draggable:!!t,cursor:e,drift:t,onmousemove:function(i){Da(i.event)},ondragend:a})}function K$(r,e,t){var a=$$/2,i=r.get("hoverLinkDataSize");return i&&(a=wa(i,e,t,!0)/2),a}function UP(r){var e=r.get("hoverLinkOnHandle");return!!(e??r.get("realtime"))}function YP(r){return r==="vertical"?"ns-resize":"ew-resize"}var j$={type:"selectDataRange",event:"dataRangeSelected",update:"update"},J$=function(r,e){e.eachComponent({mainType:"visualMap",query:r},function(t){t.setSelected(r.selected)})},Q$=[{createOnAllSeries:!0,reset:function(r,e){var t=[];return e.eachComponent("visualMap",function(a){var i=r.pipelineContext;!a.isTargetSeries(r)||i&&i.large||t.push(x9(a.stateList,a.targetVisuals,X(a.getValueState,a),a.getDataDimensionIndex(r.getData())))}),t}},{createOnAllSeries:!0,reset:function(r,e){var t=r.getData(),a=[];e.eachComponent("visualMap",function(i){if(i.isTargetSeries(r)){var n=i.getVisualMeta(X(tX,null,r,i))||{stops:[],outerColors:[]},o=i.getDataDimensionIndex(t);o>=0&&(n.dimension=o,a.push(n))}}),r.getData().setVisual("visualMeta",a)}}];function tX(r,e,t,a){for(var i=e.targetVisuals[a],n=_e.prepareVisualTypes(i),o={color:Tl(r.getData(),"color")},s=0,l=n.length;s<l;s++){var u=n[s],h=i[u==="opacity"?"__alphaForOpacity":u];h&&h.applyVisual(t,f,v)}return o.color;function f(c){return o[c]}function v(c,d){o[c]=d}}var ZP=M;function eX(r){var e=r&&r.visualMap;W(e)||(e=e?[e]:[]),ZP(e,function(t){if(t){Cs(t,"splitList")&&!Cs(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var a=t.pieces;a&&W(a)&&ZP(a,function(i){lt(i)&&(Cs(i,"start")&&!Cs(i,"min")&&(i.min=i.start),Cs(i,"end")&&!Cs(i,"max")&&(i.max=i.end))})}})}function Cs(r,e){return r&&r.hasOwnProperty&&r.hasOwnProperty(e)}var $P=!1;function XP(r){$P||($P=!0,r.registerSubTypeDefaulter("visualMap",function(e){return!e.categories&&(!(e.pieces?e.pieces.length>0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),r.registerAction(j$,J$),M(Q$,function(e){r.registerVisual(r.PRIORITY.VISUAL.COMPONENT,e)}),r.registerPreprocessor(eX))}function qP(r){r.registerComponentModel(Y$),r.registerComponentView(q$),XP(r)}var rX=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._pieceList=[],t}return e.prototype.optionUpdated=function(t,a){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var i=this._mode=this._determineMode();this._pieceList=[],aX[this._mode].call(this,this._pieceList),this._resetSelected(t,a);var n=this.option.categories;this.resetVisual(function(o,s){i==="categories"?(o.mappingMethod="category",o.categories=at(n)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=U(this._pieceList,function(l){return l=at(l),s!=="inRange"&&(l.visual=null),l}))})},e.prototype.completeVisualOption=function(){var t=this.option,a={},i=_e.listVisualTypes(),n=this.isCategory();M(t.pieces,function(s){M(i,function(l){s.hasOwnProperty(l)&&(a[l]=1)})}),M(a,function(s,l){var u=!1;M(this.stateList,function(h){u=u||o(t,h,l)||o(t.target,h,l)},this),!u&&M(this.stateList,function(h){(t[h]||(t[h]={}))[l]=EP.get(l,h==="inRange"?"active":"inactive",n)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}r.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,a){var i=this.option,n=this._pieceList,o=(a?i:t).selected||{};if(i.selected=o,M(n,function(l,u){var h=this.getSelectedMapKey(l);o.hasOwnProperty(h)||(o[h]=!0)},this),i.selectedMode==="single"){var s=!1;M(n,function(l,u){var h=this.getSelectedMapKey(l);o[h]&&(s?o[h]=!1:s=!0)},this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(t){return this._mode==="categories"?t.value+"":t.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(t){this.option.selected=at(t)},e.prototype.getValueState=function(t){var a=_e.findPieceIndex(t,this._pieceList);return a!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[a])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var a=[],i=this._pieceList;return this.eachTargetSeries(function(n){var o=[],s=n.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var h=_e.findPieceIndex(l,i);h===t&&o.push(u)},this),a.push({seriesId:n.id,dataIndex:o})},this),a},e.prototype.getRepresentValue=function(t){var a;if(this.isCategory())a=t.value;else if(t.value!=null)a=t.value;else{var i=t.interval||[];a=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return a},e.prototype.getVisualMeta=function(t){if(this.isCategory())return;var a=[],i=["",""],n=this;function o(h,f){var v=n.getRepresentValue({interval:h});f||(f=n.getValueState(v));var c=t(v,f);h[0]===-1/0?i[0]=c:h[1]===1/0?i[1]=c:a.push({value:h[0],color:c},{value:h[1],color:c})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return M(s,function(h){var f=h.interval;f&&(f[0]>u&&o([u,f[0]],"outOfRange"),o(f.slice()),u=f[1])},this),{stops:a,outerColors:i}},e.type="visualMap.piecewise",e.defaultOption=yi(Jv.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e}(Jv),aX={splitNumber:function(r){var e=this.option,t=Math.min(e.precision,20),a=this.getExtent(),i=e.splitNumber;i=Math.max(parseInt(i,10),1),e.splitNumber=i;for(var n=(a[1]-a[0])/i;+n.toFixed(t)!==n&&t<5;)t++;e.precision=t,n=+n.toFixed(t),e.minOpen&&r.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;r.push({interval:[s,l],close:[1,1]})}e.maxOpen&&r.push({interval:[a[1],1/0],close:[0,0]}),O1(r),M(r,function(u,h){u.index=h,u.text=this.formatValueText(u.interval)},this)},categories:function(r){var e=this.option;M(e.categories,function(t){r.push({text:this.formatValueText(t,!0),value:t})},this),KP(e,r)},pieces:function(r){var e=this.option;M(e.pieces,function(t,a){lt(t)||(t={value:t});var i={text:"",index:a};if(t.label!=null&&(i.text=t.label),t.hasOwnProperty("value")){var n=i.value=t.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 v=[["gte","gt","min"],["lte","lt","max"]][f],c=0;c<3&&o[f]==null;c++)o[f]=t[v[c]],s[f]=l[c],h[f]=c===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),o[0]===o[1]&&s[0]&&s[1]&&(i.value=o[0])}i.visual=_e.retrieveVisuals(t),r.push(i)},this),KP(e,r),O1(r),M(r,function(t){var a=t.close,i=[["<","\u2264"][a[1]],[">","\u2265"][a[0]]];t.text=t.text||this.formatValueText(t.value!=null?t.value:t.interval,!1,i)},this)}};function KP(r,e){var t=r.inverse;(r.orient==="vertical"?!t:t)&&e.reverse()}var iX=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.doRender=function(){var t=this.group;t.removeAll();var a=this.visualMapModel,i=a.get("textGap"),n=a.textStyleModel,o=this._getItemAlign(),s=a.itemSize,l=this._getViewData(),u=l.endsText,h=Ae(a.get("showLabel",!0),!u),f=!a.get("selectedMode");u&&this._renderEndsText(t,u[0],s,h,o),M(l.viewPieceList,function(v){var c=v.piece,d=new et;d.onclick=X(this._onItemClick,this,c),this._enableHoverLink(d,v.indexInModelPieceList);var p=a.getRepresentValue(c);if(this._createItemSymbol(d,p,[0,0,s[0],s[1]],f),h){var g=this.visualMapModel.getValueState(p),y=n.get("align")||o;d.add(new Lt({style:Ft(n,{x:y==="right"?-i:s[0]+i,y:s[1]/2,text:c.text,verticalAlign:n.get("verticalAlign")||"middle",align:y,opacity:Q(n.get("opacity"),g==="outOfRange"?.5:1)}),silent:f}))}t.add(d)},this),u&&this._renderEndsText(t,u[1],s,h,o),Cn(a.get("orient"),t,a.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,a){var i=this;t.on("mouseover",function(){return n("highlight")}).on("mouseout",function(){return n("downplay")});var n=function(o){var s=i.visualMapModel;s.option.hoverLink&&i.api.dispatchAction({type:o,batch:Qv(s.findTargetDataIndices(a),s)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,a=t.option;if(a.orient==="vertical")return FP(t,this.api,t.itemSize);var i=a.align;return(!i||i==="auto")&&(i="left"),i},e.prototype._renderEndsText=function(t,a,i,n,o){if(a){var s=new et,l=this.visualMapModel.textStyleModel;s.add(new Lt({style:Ft(l,{x:n?o==="right"?i[0]:0:i[0]/2,y:i[1]/2,verticalAlign:"middle",align:n?o:"center",text:a})})),t.add(s)}},e.prototype._getViewData=function(){var t=this.visualMapModel,a=U(t.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),i=t.get("text"),n=t.get("orient"),o=t.get("inverse");return(n==="horizontal"?o:!o)?a.reverse():i&&(i=i.slice().reverse()),{viewPieceList:a,endsText:i}},e.prototype._createItemSymbol=function(t,a,i,n){var o=he(this.getControllerVisual(a,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(a,"color"));o.silent=n,t.add(o)},e.prototype._onItemClick=function(t){var a=this.visualMapModel,i=a.option,n=i.selectedMode;if(n){var o=at(i.selected),s=a.getSelectedMapKey(t);n==="single"||n===!0?(o[s]=!0,M(o,function(l,u){o[u]=u===s})):o[s]=!o[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},e.type="visualMap.piecewise",e}(VP);function jP(r){r.registerComponentModel(rX),r.registerComponentView(iX),XP(r)}function nX(r){mt(qP),mt(jP)}var oX=function(){function r(e){this._thumbnailModel=e}return r.prototype.reset=function(e){this._renderVersion=e.getMainProcessVersion()},r.prototype.renderContent=function(e){var t=e.api.getViewOfComponentModel(this._thumbnailModel);t&&(e.group.silent=!0,t.renderContent({group:e.group,targetTrans:e.targetTrans,z2Range:DS(e.group),roamType:e.roamType,viewportRect:e.viewportRect,renderVersion:this._renderVersion}))},r.prototype.updateWindow=function(e,t){var a=t.getViewOfComponentModel(this._thumbnailModel);a&&a.updateWindow({targetTrans:e,renderVersion:this._renderVersion})},r}(),sX=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.preventAutoZ=!0,t}return e.prototype.optionUpdated=function(t,a){this._updateBridge()},e.prototype._updateBridge=function(){var t=this._birdge=this._birdge||new oX(this);if(this._target=null,this.ecModel.eachSeries(function(i){WD(i,null)}),this.shouldShow()){var a=this.getTarget();WD(a.baseMapProvider,t)}},e.prototype.shouldShow=function(){return this.getShallow("show",!0)},e.prototype.getBridge=function(){return this._birdge},e.prototype.getTarget=function(){if(this._target)return this._target;var t=this.getReferringComponents("series",{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];return t?t.subType!=="graph"&&(t=null):t=this.ecModel.queryComponents({mainType:"series",subType:"graph"})[0],this._target={baseMapProvider:t},this._target},e.type="thumbnail",e.layoutMode="box",e.dependencies=["series","geo"],e.defaultOption={show:!0,right:1,bottom:1,height:"25%",width:"25%",itemStyle:{borderColor:B.color.border,borderWidth:2},windowStyle:{borderWidth:1,color:B.color.neutral30,borderColor:B.color.neutral40,opacity:.3},z:10},e}(Tt),lX=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,i){if(this._api=i,this._model=t,this._coordSys||(this._coordSys=new Kn),!this._isEnabled()){this._clear();return}this._renderVersion=i.getMainProcessVersion();var n=this.group;n.removeAll();var o=t.getModel("itemStyle"),s=o.getItemStyle();s.fill==null&&(s.fill=a.get("backgroundColor")||B.color.neutral00);var l=de(t,i).refContainer,u=qt(ib(t,!0),l),h=s.lineWidth||0,f=this._contentRect=xn(u.clone(),h/2,!0,!0),v=new et;n.add(v),v.setClipPath(new _t({shape:f.plain()}));var c=this._targetGroup=new et;v.add(c);var d=u.plain();d.r=o.getShallow("borderRadius",!0),n.add(this._bgRect=new _t({style:s,shape:d,silent:!1,cursor:"grab"}));var p=t.getModel("windowStyle"),g=p.getShallow("borderRadius",!0);v.add(this._windowRect=new _t({shape:{x:0,y:0,width:0,height:0,r:g},style:p.getItemStyle(),silent:!1,cursor:"grab"})),this._dealRenderContent(),this._dealUpdateWindow(),QP(t,this)},e.prototype.renderContent=function(t){this._bridgeRendered=t,this._isEnabled()&&(this._dealRenderContent(),this._dealUpdateWindow(),QP(this._model,this))},e.prototype._dealRenderContent=function(){var t=this._bridgeRendered;if(!(!t||t.renderVersion!==this._renderVersion)){var a=this._targetGroup,i=this._coordSys,n=this._contentRect;if(a.removeAll(),!!t){var o=t.group,s=o.getBoundingRect();a.add(o),this._bgRect.z2=t.z2Range.min-10,i.setBoundingRect(s.x,s.y,s.width,s.height);var l=qt({left:"center",top:"center",aspect:s.width/s.height},n);i.setViewRect(l.x,l.y,l.width,l.height),o.attr(i.getTransformInfo().raw),this._windowRect.z2=t.z2Range.max+10,this._resetRoamController(t.roamType)}}},e.prototype.updateWindow=function(t){var a=this._bridgeRendered;a&&a.renderVersion===t.renderVersion&&(a.targetTrans=t.targetTrans),this._isEnabled()&&this._dealUpdateWindow()},e.prototype._dealUpdateWindow=function(){var t=this._bridgeRendered;if(!(!t||t.renderVersion!==this._renderVersion)){var a=Rr([],t.targetTrans),i=qr([],this._coordSys.transform,a);this._transThisToTarget=Rr([],i);var n=t.viewportRect;n?n=n.clone():n=new ht(0,0,this._api.getWidth(),this._api.getHeight()),n.applyTransform(i);var o=this._windowRect,s=o.shape.r;o.setShape(st({r:s},n))}},e.prototype._resetRoamController=function(t){var a=this,i=this._api,n=this._roamController;if(n||(n=this._roamController=new $n(i.getZr())),!t||!this._isEnabled()){n.disable();return}n.enable(t,{api:i,zInfo:{component:this._model},triggerInfo:{roamTrigger:null,isInSelf:function(o,s,l){return a._contentRect.contain(s,l)}}}),n.off("pan").off("zoom").on("pan",X(this._onPan,this)).on("zoom",X(this._onZoom,this))},e.prototype._onPan=function(t){var a=this._transThisToTarget;if(!(!this._isEnabled()||!a)){var i=te([],[t.oldX,t.oldY],a),n=te([],[t.oldX-t.dx,t.oldY-t.dy],a);this._api.dispatchAction(JP(this._model.getTarget().baseMapProvider,{dx:n[0]-i[0],dy:n[1]-i[1]}))}},e.prototype._onZoom=function(t){var a=this._transThisToTarget;if(!(!this._isEnabled()||!a)){var i=te([],[t.originX,t.originY],a);this._api.dispatchAction(JP(this._model.getTarget().baseMapProvider,{zoom:1/t.scale,originX:i[0],originY:i[1]}))}},e.prototype._isEnabled=function(){var t=this._model;if(!t||!t.shouldShow())return!1;var a=t.getTarget().baseMapProvider;return!!a},e.prototype._clear=function(){this.group.removeAll(),this._bridgeRendered=null,this._roamController&&this._roamController.disable()},e.prototype.remove=function(){this._clear()},e.prototype.dispose=function(){this._clear()},e.type="thumbnail",e}(Zt);function JP(r,e){var t=r.mainType==="series"?r.subType+"Roam":r.mainType+"Roam",a={type:t};return a[r.mainType+"Id"]=r.id,F(a,e),a}function QP(r,e){var t=Sn(r);Hh(e.group,t.z,t.zlevel)}function uX(r){r.registerComponentModel(sX),r.registerComponentView(lX)}var hX={label:{enabled:!0},decal:{show:!1}},tk=St(),fX={};function vX(r,e){var t=r.getModel("aria");if(!t.get("enabled"))return;var a=at(hX);yt(a.label,r.getLocaleModel().get("aria"),!1),yt(t.option,a,!1),i(),n();function i(){var u=t.getModel("decal"),h=u.get("show");if(h){var f=J();r.eachSeries(function(v){if(!v.isColorBySeries()){var c=f.get(v.type);c||(c={},f.set(v.type,c)),tk(v).scope=c}}),r.eachRawSeries(function(v){if(r.isSeriesFiltered(v))return;if(rt(v.enableAriaDecal)){v.enableAriaDecal();return}var c=v.getData();if(v.isColorBySeries()){var m=Np(v.ecModel,v.name,fX,r.getSeriesCount()),_=c.getVisual("decal");c.setVisual("decal",x(_,m))}else{var d=v.getRawData(),p={},g=tk(v).scope;c.each(function(b){var S=c.getRawIndex(b);p[S]=b});var y=d.count();d.each(function(b){var S=p[b],w=d.getName(b)||b+"",T=Np(v.ecModel,w,g,y),C=c.getItemVisual(S,"decal");c.setItemVisual(S,"decal",x(C,T))})}function x(b,S){var w=b?F(F({},S),b):S;return w.dirty=!0,w}})}}function n(){var u=e.getZr().dom;if(u){var h=r.getLocaleModel().get("aria"),f=t.getModel("label");if(f.option=st(f.option,h),!!f.get("enabled")){if(u.setAttribute("role","img"),f.get("description")){u.setAttribute("aria-label",f.get("description"));return}var v=r.getSeriesCount(),c=f.get(["data","maxCount"])||10,d=f.get(["series","maxCount"])||10,p=Math.min(v,d),g;if(!(v<1)){var y=s();if(y){var m=f.get(["general","withTitle"]);g=o(m,{title:y})}else g=f.get(["general","withoutTitle"]);var _=[],x=v>1?f.get(["series","multiple","prefix"]):f.get(["series","single","prefix"]);g+=o(x,{seriesCount:v}),r.eachSeries(function(T,C){if(C<p){var A=void 0,D=T.get("name"),I=D?"withName":"withoutName";A=v>1?f.get(["series","multiple",I]):f.get(["series","single",I]),A=o(A,{seriesId:T.seriesIndex,seriesName:T.get("name"),seriesType:l(T.subType)});var L=T.getData();if(L.count()>c){var P=f.get(["data","partialData"]);A+=o(P,{displayCnt:c})}else A+=f.get(["data","allData"]);for(var k=f.get(["data","separator","middle"]),R=f.get(["data","separator","end"]),O=f.get(["data","excludeDimensionId"]),E=[],N=0;N<L.count();N++)if(N<c){var V=L.getName(N),G=O?Et(L.getValues(N),function(Y,q){return gt(O,q)===-1}):L.getValues(N),H=f.get(["data",V?"withName":"withoutName"]);E.push(o(H,{name:V,value:G.join(k)}))}A+=E.join(k)+R,_.push(A)}});var b=f.getModel(["series","multiple","separator"]),S=b.get("middle"),w=b.get("end");g+=_.join(S)+w,u.setAttribute("aria-label",g)}}}}function o(u,h){if(!$(u))return u;var f=u;return M(h,function(v,c){f=f.replace(new RegExp("\\{\\s*"+c+"\\s*\\}","g"),v)}),f}function s(){var u=r.get("title");return u&&u.length&&(u=u[0]),u&&u.text}function l(u){var h=r.getLocaleModel().get(["series","typeNames"]);return h[u]||h.chart}}function cX(r){if(!(!r||!r.aria)){var e=r.aria;e.show!=null&&(e.enabled=e.show),e.label=e.label||{},M(["description","general","series","data"],function(t){e[t]!=null&&(e.label[t]=e[t])})}}function dX(r){r.registerPreprocessor(cX),r.registerVisual(r.PRIORITY.VISUAL.ARIA,vX)}var ek={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},pX=function(){function r(e){var t=this._condVal=$(e)?new RegExp(e):Uk(e)?e:null;if(t==null){var a="";Rt(a)}}return r.prototype.evaluate=function(e){var t=typeof e;return $(t)?this._condVal.test(e):Dt(t)?this._condVal.test(e+""):!1},r}(),gX=function(){function r(){}return r.prototype.evaluate=function(){return this.value},r}(),yX=function(){function r(){}return r.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(!e[t].evaluate())return!1;return!0},r}(),mX=function(){function r(){}return r.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(e[t].evaluate())return!0;return!1},r}(),_X=function(){function r(){}return r.prototype.evaluate=function(){return!this.child.evaluate()},r}(),xX=function(){function r(){}return r.prototype.evaluate=function(){for(var e=!!this.valueParser,t=this.getValue,a=t(this.valueGetterParam),i=e?this.valueParser(a):null,n=0;n<this.subCondList.length;n++)if(!this.subCondList[n].evaluate(e?i:a))return!1;return!0},r}();function a_(r,e){if(r===!0||r===!1){var t=new gX;return t.value=r,t}var a="";return ak(r)||Rt(a),r.and?rk("and",r,e):r.or?rk("or",r,e):r.not?SX(r,e):bX(r,e)}function rk(r,e,t){var a=e[r],i="";W(a)||Rt(i),a.length||Rt(i);var n=r==="and"?new yX:new mX;return n.children=U(a,function(o){return a_(o,t)}),n.children.length||Rt(i),n}function SX(r,e){var t=r.not,a="";ak(t)||Rt(a);var i=new _X;return i.child=a_(t,e),i.child||Rt(a),i}function bX(r,e){for(var t="",a=e.prepareGetValue(r),i=[],n=Mt(r),o=r.parser,s=o?Zb(o):null,l=0;l<n.length;l++){var u=n[l];if(!(u==="parser"||e.valueGetterAttrMap.get(u))){var h=K(ek,u)?ek[u]:u,f=r[u],v=s?s(f):f,c=rz(h,v)||h==="reg"&&new pX(v);c||Rt(t),i.push(c)}}i.length||Rt(t);var d=new xX;return d.valueGetterParam=a,d.valueParser=s,d.getValue=e.getValue,d.subCondList=i,d}function ak(r){return lt(r)&&!ke(r)}var wX=function(){function r(e,t){this._cond=a_(e,t)}return r.prototype.evaluate=function(){return this._cond.evaluate()},r}();function TX(r,e){return new wX(r,e)}var CX={type:"echarts:filter",transform:function(r){for(var e=r.upstream,t,a=TX(r.config,{valueGetterAttrMap:J({dimension:!0}),prepareGetValue:function(s){var l="",u=s.dimension;K(s,"dimension")||Rt(l);var h=e.getDimensionInfo(u);return h||Rt(l),{dimIdx:h.index}},getValue:function(s){return e.retrieveValueFromItem(t,s.dimIdx)}}),i=[],n=0,o=e.count();n<o;n++)t=e.getRawDataItem(n),a.evaluate()&&i.push(t);return{data:i}}},AX={type:"echarts:sort",transform:function(r){var e=r.upstream,t=r.config,a="",i=Vt(t);i.length||Rt(a);var n=[];M(i,function(h){var f=h.dimension,v=h.order,c=h.parser,d=h.incomparable;if(f==null&&Rt(a),v!=="asc"&&v!=="desc"&&Rt(a),d&&d!=="min"&&d!=="max"){var p="";Rt(p)}if(v!=="asc"&&v!=="desc"){var g="";Rt(g)}var y=e.getDimensionInfo(f);y||Rt(a);var m=c?Zb(c):null;c&&!m&&Rt(a),n.push({dimIdx:y.index,parser:m,comparator:new Xb(v,d)})});var o=e.sourceFormat;o!==Te&&o!==ur&&Rt(a);for(var s=[],l=0,u=e.count();l<u;l++)s.push(e.getRawDataItem(l));return s.sort(function(h,f){for(var v=0;v<n.length;v++){var c=n[v],d=e.retrieveValueFromItem(h,c.dimIdx),p=e.retrieveValueFromItem(f,c.dimIdx);c.parser&&(d=c.parser(d),p=c.parser(p));var g=c.comparator.evaluate(d,p);if(g!==0)return g}return 0}),{data:s}}};function MX(r){r.registerTransform(CX),r.registerTransform(AX)}var DX=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataset",t}return e.prototype.init=function(t,a,i){r.prototype.init.call(this,t,a,i),this._sourceManager=new tw(this),ew(this)},e.prototype.mergeOption=function(t,a){r.prototype.mergeOption.call(this,t,a),ew(this)},e.prototype.optionUpdated=function(){this._sourceManager.dirty()},e.prototype.getSourceManager=function(){return this._sourceManager},e.type="dataset",e.defaultOption={seriesLayoutBy:Fr},e}(Tt),LX=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataset",t}return e.type="dataset",e}(Zt);function IX(r){r.registerComponentModel(DX),r.registerComponentView(LX)}var Ta=la.CMD;function As(r,e){return Math.abs(r-e)<1e-5}function i_(r){var e=r.data,t=r.len(),a=[],i,n=0,o=0,s=0,l=0;function u(L,P){i&&i.length>2&&a.push(i),i=[L,P]}function h(L,P,k,R){As(L,k)&&As(P,R)||i.push(L,P,k,R,k,R)}function f(L,P,k,R,O,E){var N=Math.abs(P-L),V=Math.tan(N/4)*4/3,G=P<L?-1:1,H=Math.cos(L),Y=Math.sin(L),q=Math.cos(P),it=Math.sin(P),xt=H*O+k,At=Y*E+R,ut=q*O+k,tt=it*E+R,ct=O*V*G,j=E*V*G;i.push(xt-ct*Y,At+j*H,ut+ct*it,tt-j*q,ut,tt)}for(var v,c,d,p,g=0;g<t;){var y=e[g++],m=g===1;switch(m&&(n=e[g],o=e[g+1],s=n,l=o,(y===Ta.L||y===Ta.C||y===Ta.Q)&&(i=[s,l])),y){case Ta.M:n=s=e[g++],o=l=e[g++],u(s,l);break;case Ta.L:v=e[g++],c=e[g++],h(n,o,v,c),n=v,o=c;break;case Ta.C:i.push(e[g++],e[g++],e[g++],e[g++],n=e[g++],o=e[g++]);break;case Ta.Q:v=e[g++],c=e[g++],d=e[g++],p=e[g++],i.push(n+2/3*(v-n),o+2/3*(c-o),d+2/3*(v-d),p+2/3*(c-p),d,p),n=d,o=p;break;case Ta.A:var _=e[g++],x=e[g++],b=e[g++],S=e[g++],w=e[g++],T=e[g++]+w;g+=1;var C=!e[g++];v=Math.cos(w)*b+_,c=Math.sin(w)*S+x,m?(s=v,l=c,u(s,l)):h(n,o,v,c),n=Math.cos(T)*b+_,o=Math.sin(T)*S+x;for(var A=(C?-1:1)*Math.PI/2,D=w;C?D>T:D<T;D+=A){var I=C?Math.max(D+A,T):Math.min(D+A,T);f(D,I,_,x,b,S)}break;case Ta.R:s=n=e[g++],l=o=e[g++],v=s+e[g++],c=l+e[g++],u(v,l),h(v,l,v,c),h(v,c,s,c),h(s,c,s,l),h(s,l,v,l);break;case Ta.Z:i&&h(n,o,s,l),n=s,o=l;break}}return i&&i.length>2&&a.push(i),a}function n_(r,e,t,a,i,n,o,s,l,u){if(As(r,t)&&As(e,a)&&As(i,o)&&As(n,s)){l.push(o,s);return}var h=2/u,f=h*h,v=o-r,c=s-e,d=Math.sqrt(v*v+c*c);v/=d,c/=d;var p=t-r,g=a-e,y=i-o,m=n-s,_=p*p+g*g,x=y*y+m*m;if(_<f&&x<f){l.push(o,s);return}var b=v*p+c*g,S=-v*y-c*m,w=_-b*b,T=x-S*S;if(w<f&&b>=0&&T<f&&S>=0){l.push(o,s);return}var C=[],A=[];ni(r,t,i,o,.5,C),ni(e,a,n,s,.5,A),n_(C[0],A[0],C[1],A[1],C[2],A[2],C[3],A[3],l,u),n_(C[4],A[4],C[5],A[5],C[6],A[6],C[7],A[7],l,u)}function PX(r,e){var t=i_(r),a=[];e=e||1;for(var i=0;i<t.length;i++){var n=t[i],o=[],s=n[0],l=n[1];o.push(s,l);for(var u=2;u<n.length;){var h=n[u++],f=n[u++],v=n[u++],c=n[u++],d=n[u++],p=n[u++];n_(s,l,h,f,v,c,d,p,o,e),s=d,l=p}a.push(o)}return a}function ik(r,e,t){var a=r[e],i=r[1-e],n=Math.abs(a/i),o=Math.ceil(Math.sqrt(n*t)),s=Math.floor(t/o);s===0&&(s=1,o=t);for(var l=[],u=0;u<o;u++)l.push(s);var h=o*s,f=t-h;if(f>0)for(var u=0;u<f;u++)l[u%o]+=1;return l}function nk(r,e,t){for(var a=r.r0,i=r.r,n=r.startAngle,o=r.endAngle,s=Math.abs(o-n),l=s*i,u=i-a,h=l>Math.abs(u),f=ik([l,u],h?0:1,e),v=(h?s:u)/f.length,c=0;c<f.length;c++)for(var d=(h?u:s)/f[c],p=0;p<f[c];p++){var g={};h?(g.startAngle=n+v*c,g.endAngle=n+v*(c+1),g.r0=a+d*p,g.r=a+d*(p+1)):(g.startAngle=n+d*p,g.endAngle=n+d*(p+1),g.r0=a+v*c,g.r=a+v*(c+1)),g.clockwise=r.clockwise,g.cx=r.cx,g.cy=r.cy,t.push(g)}}function kX(r,e,t){for(var a=r.width,i=r.height,n=a>i,o=ik([a,i],n?0:1,e),s=n?"width":"height",l=n?"height":"width",u=n?"x":"y",h=n?"y":"x",f=r[s]/o.length,v=0;v<o.length;v++)for(var c=r[l]/o[v],d=0;d<o[v];d++){var p={};p[u]=v*f,p[h]=d*c,p[s]=f,p[l]=c,p.x+=r.x,p.y+=r.y,t.push(p)}}function ok(r,e,t,a){return r*a-t*e}function RX(r,e,t,a,i,n,o,s){var l=t-r,u=a-e,h=o-i,f=s-n,v=ok(h,f,l,u);if(Math.abs(v)<1e-6)return null;var c=r-i,d=e-n,p=ok(c,d,h,f)/v;return p<0||p>1?null:new nt(p*l+r,p*u+e)}function EX(r,e,t){var a=new nt;nt.sub(a,t,e),a.normalize();var i=new nt;nt.sub(i,r,e);var n=i.dot(a);return n}function Ms(r,e){var t=r[r.length-1];t&&t[0]===e[0]&&t[1]===e[1]||r.push(e)}function OX(r,e,t){for(var a=r.length,i=[],n=0;n<a;n++){var o=r[n],s=r[(n+1)%a],l=RX(o[0],o[1],s[0],s[1],e.x,e.y,t.x,t.y);l&&i.push({projPt:EX(l,e,t),pt:l,idx:n})}if(i.length<2)return[{points:r},{points:r}];i.sort(function(g,y){return g.projPt-y.projPt});var u=i[0],h=i[i.length-1];if(h.idx<u.idx){var f=u;u=h,h=f}for(var v=[u.pt.x,u.pt.y],c=[h.pt.x,h.pt.y],d=[v],p=[c],n=u.idx+1;n<=h.idx;n++)Ms(d,r[n].slice());Ms(d,c),Ms(d,v);for(var n=h.idx+1;n<=u.idx+a;n++)Ms(p,r[n%a].slice());return Ms(p,v),Ms(p,c),[{points:d},{points:p}]}function sk(r){var e=r.points,t=[],a=[];_h(e,t,a);var i=new ht(t[0],t[1],a[0]-t[0],a[1]-t[1]),n=i.width,o=i.height,s=i.x,l=i.y,u=new nt,h=new nt;return n>o?(u.x=h.x=s+n/2,u.y=l,h.y=l+o):(u.y=h.y=l+o/2,u.x=s,h.x=s+n),OX(e,u,h)}function tc(r,e,t,a){if(t===1)a.push(e);else{var i=Math.floor(t/2),n=r(e);tc(r,n[0],i,a),tc(r,n[1],t-i,a)}return a}function NX(r,e){for(var t=[],a=0;a<e;a++)t.push(Qd(r));return t}function BX(r,e){e.setStyle(r.style),e.z=r.z,e.z2=r.z2,e.zlevel=r.zlevel}function zX(r){for(var e=[],t=0;t<r.length;)e.push([r[t++],r[t++]]);return e}function VX(r,e){var t=[],a=r.shape,i;switch(r.type){case"rect":kX(a,e,t),i=_t;break;case"sector":nk(a,e,t),i=We;break;case"circle":nk({r0:0,r:a.r,startAngle:0,endAngle:Math.PI*2,cx:a.cx,cy:a.cy},e,t),i=We;break;default:var n=r.getComputedTransform(),o=n?Math.sqrt(Math.max(n[0]*n[0]+n[1]*n[1],n[2]*n[2]+n[3]*n[3])):1,s=U(PX(r.getUpdatedPathProxy(),o),function(y){return zX(y)}),l=s.length;if(l===0)tc(sk,{points:s[0]},e,t);else if(l===e)for(var u=0;u<l;u++)t.push({points:s[u]});else{var h=0,f=U(s,function(y){var m=[],_=[];_h(y,m,_);var x=(_[1]-m[1])*(_[0]-m[0]);return h+=x,{poly:y,area:x}});f.sort(function(y,m){return m.area-y.area});for(var v=e,u=0;u<l;u++){var c=f[u];if(v<=0)break;var d=u===l-1?v:Math.ceil(c.area/h*e);d<0||(tc(sk,{points:c.poly},d,t),v-=d)}}i=De;break}if(!i)return NX(r,e);for(var p=[],u=0;u<t.length;u++){var g=new i;g.setShape(t[u]),BX(r,g),p.push(g)}return p}function GX(r,e){var t=r.length,a=e.length;if(t===a)return[r,e];for(var i=[],n=[],o=t<a?r:e,s=Math.min(t,a),l=Math.abs(a-t)/6,u=(s-2)/6,h=Math.ceil(l/u)+1,f=[o[0],o[1]],v=l,c=2;c<s;){var d=o[c-2],p=o[c-1],g=o[c++],y=o[c++],m=o[c++],_=o[c++],x=o[c++],b=o[c++];if(v<=0){f.push(g,y,m,_,x,b);continue}for(var S=Math.min(v,h-1)+1,w=1;w<=S;w++){var T=w/S;ni(d,g,m,x,T,i),ni(p,y,_,b,T,n),d=i[3],p=n[3],f.push(i[1],n[1],i[2],n[2],d,p),g=i[5],y=n[5],m=i[6],_=n[6]}v-=S-1}return o===r?[f,e]:[r,f]}function lk(r,e){for(var t=r.length,a=r[t-2],i=r[t-1],n=[],o=0;o<e.length;)n[o++]=a,n[o++]=i;return n}function FX(r,e){for(var t,a,i,n=[],o=[],s=0;s<Math.max(r.length,e.length);s++){var l=r[s],u=e[s],h=void 0,f=void 0;l?u?(t=GX(l,u),h=t[0],f=t[1],a=h,i=f):(f=lk(i||l,l),h=l):(h=lk(a||u,u),f=u),n.push(h),o.push(f)}return[n,o]}function uk(r){for(var e=0,t=0,a=0,i=r.length,n=0,o=i-2;n<i;o=n,n+=2){var s=r[o],l=r[o+1],u=r[n],h=r[n+1],f=s*h-u*l;e+=f,t+=(s+u)*f,a+=(l+h)*f}return e===0?[r[0]||0,r[1]||0]:[t/e/3,a/e/3,e]}function HX(r,e,t,a){for(var i=(r.length-2)/6,n=1/0,o=0,s=r.length,l=s-2,u=0;u<i;u++){for(var h=u*6,f=0,v=0;v<s;v+=2){var c=v===0?h:(h+v-2)%l+2,d=r[c]-t[0],p=r[c+1]-t[1],g=e[v]-a[0],y=e[v+1]-a[1],m=g-d,_=y-p;f+=m*m+_*_}f<n&&(n=f,o=u)}return o}function WX(r){for(var e=[],t=r.length,a=0;a<t;a+=2)e[a]=r[t-a-2],e[a+1]=r[t-a-1];return e}function UX(r,e,t,a){for(var i=[],n,o=0;o<r.length;o++){var s=r[o],l=e[o],u=uk(s),h=uk(l);n==null&&(n=u[2]<0!=h[2]<0);var f=[],v=[],c=0,d=1/0,p=[],g=s.length;n&&(s=WX(s));for(var y=HX(s,l,u,h)*6,m=g-2,_=0;_<m;_+=2){var x=(y+_)%m+2;f[_+2]=s[x]-u[0],f[_+3]=s[x+1]-u[1]}if(f[0]=s[y]-u[0],f[1]=s[y+1]-u[1],t>0)for(var b=a/t,S=-a/2;S<=a/2;S+=b){for(var w=Math.sin(S),T=Math.cos(S),C=0,_=0;_<s.length;_+=2){var A=f[_],D=f[_+1],I=l[_]-h[0],L=l[_+1]-h[1],P=I*T-L*w,k=I*w+L*T;p[_]=P,p[_+1]=k;var R=P-A,O=k-D;C+=R*R+O*O}if(C<d){d=C,c=S;for(var E=0;E<p.length;E++)v[E]=p[E]}}else for(var N=0;N<g;N+=2)v[N]=l[N]-h[0],v[N+1]=l[N+1]-h[1];i.push({from:f,to:v,fromCp:u,toCp:h,rotation:-c})}return i}function ec(r){return r.__isCombineMorphing}var hk="__mOriginal_";function rc(r,e,t){var a=hk+e,i=r[a]||r[e];r[a]||(r[a]=r[e]);var n=t.replace,o=t.after,s=t.before;r[e]=function(){var l=arguments,u;return s&&s.apply(this,l),n?u=n.apply(this,l):u=i.apply(this,l),o&&o.apply(this,l),u}}function Mu(r,e){var t=hk+e;r[t]&&(r[e]=r[t],r[t]=null)}function fk(r,e){for(var t=0;t<r.length;t++)for(var a=r[t],i=0;i<a.length;){var n=a[i],o=a[i+1];a[i++]=e[0]*n+e[2]*o+e[4],a[i++]=e[1]*n+e[3]*o+e[5]}}function vk(r,e){var t=r.getUpdatedPathProxy(),a=e.getUpdatedPathProxy(),i=FX(i_(t),i_(a)),n=i[0],o=i[1],s=r.getComputedTransform(),l=e.getComputedTransform();function u(){this.transform=null}s&&fk(n,s),l&&fk(o,l),rc(e,"updateTransform",{replace:u}),e.transform=null;var h=UX(n,o,10,Math.PI),f=[];rc(e,"buildPath",{replace:function(v){for(var c=e.__morphT,d=1-c,p=[],g=0;g<h.length;g++){var y=h[g],m=y.from,_=y.to,x=y.rotation*c,b=y.fromCp,S=y.toCp,w=Math.sin(x),T=Math.cos(x);Bu(p,b,S,c);for(var C=0;C<m.length;C+=2){var A=m[C],D=m[C+1],I=_[C],L=_[C+1],P=A*d+I*c,k=D*d+L*c;f[C]=P*T-k*w+p[0],f[C+1]=P*w+k*T+p[1]}var R=f[0],O=f[1];v.moveTo(R,O);for(var C=2;C<m.length;){var I=f[C++],L=f[C++],E=f[C++],N=f[C++],V=f[C++],G=f[C++];R===I&&O===L&&E===V&&N===G?v.lineTo(V,G):v.bezierCurveTo(I,L,E,N,V,G),R=V,O=G}}}})}function o_(r,e,t){if(!r||!e)return e;var a=t.done,i=t.during;vk(r,e),e.__morphT=0;function n(){Mu(e,"buildPath"),Mu(e,"updateTransform"),e.__morphT=-1,e.createPathProxy(),e.dirtyShape()}return e.animateTo({__morphT:1},st({during:function(o){e.dirtyShape(),i&&i(o)},done:function(){n(),a&&a()}},t)),e}function YX(r,e,t,a,i,n){var o=16;r=i===t?0:Math.round(32767*(r-t)/(i-t)),e=n===a?0:Math.round(32767*(e-a)/(n-a));for(var s=0,l,u=(1<<o)/2;u>0;u/=2){var h=0,f=0;(r&u)>0&&(h=1),(e&u)>0&&(f=1),s+=u*u*(3*h^f),f===0&&(h===1&&(r=u-1-r,e=u-1-e),l=r,r=e,e=l)}return s}function ac(r){var e=1/0,t=1/0,a=-1/0,i=-1/0,n=U(r,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),h=l.x+l.width/2+(u?u[4]:0),f=l.y+l.height/2+(u?u[5]:0);return e=Math.min(h,e),t=Math.min(f,t),a=Math.max(h,a),i=Math.max(f,i),[h,f]}),o=U(n,function(s,l){return{cp:s,z:YX(s[0],s[1],e,t,a,i),path:r[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function ck(r){return VX(r.path,r.count)}function s_(){return{fromIndividuals:[],toIndividuals:[],count:0}}function ZX(r,e,t){var a=[];function i(b){for(var S=0;S<b.length;S++){var w=b[S];ec(w)?i(w.childrenRef()):w instanceof bt&&a.push(w)}}i(r);var n=a.length;if(!n)return s_();var o=t.dividePath||ck,s=o({path:e,count:n});if(s.length!==n)return console.error("Invalid morphing: unmatched splitted path"),s_();a=ac(a),s=ac(s);for(var l=t.done,u=t.during,h=t.individualDelay,f=new Ia,v=0;v<n;v++){var c=a[v],d=s[v];d.parent=e,d.copyTransform(f),h||vk(c,d)}e.__isCombineMorphing=!0,e.childrenRef=function(){return s};function p(b){for(var S=0;S<s.length;S++)s[S].addSelfToZr(b)}rc(e,"addSelfToZr",{after:function(b){p(b)}}),rc(e,"removeSelfFromZr",{after:function(b){for(var S=0;S<s.length;S++)s[S].removeSelfFromZr(b)}});function g(){e.__isCombineMorphing=!1,e.__morphT=-1,e.childrenRef=null,Mu(e,"addSelfToZr"),Mu(e,"removeSelfFromZr")}var y=s.length;if(h)for(var m=y,_=function(){m--,m===0&&(g(),l&&l())},v=0;v<y;v++){var x=h?st({delay:(t.delay||0)+h(v,y,a[v],s[v]),done:_},t):t;o_(a[v],s[v],x)}else e.__morphT=0,e.animateTo({__morphT:1},st({during:function(b){for(var S=0;S<y;S++){var w=s[S];w.__morphT=e.__morphT,w.dirtyShape()}u&&u(b)},done:function(){g();for(var b=0;b<r.length;b++)Mu(r[b],"updateTransform");l&&l()}},t));return e.__zr&&p(e.__zr),{fromIndividuals:a,toIndividuals:s,count:y}}function $X(r,e,t){var a=e.length,i=[],n=t.dividePath||ck;function o(c){for(var d=0;d<c.length;d++){var p=c[d];ec(p)?o(p.childrenRef()):p instanceof bt&&i.push(p)}}if(ec(r)){o(r.childrenRef());var s=i.length;if(s<a)for(var l=0,u=s;u<a;u++)i.push(Qd(i[l++%s]));i.length=a}else{i=n({path:r,count:a});for(var h=r.getComputedTransform(),u=0;u<i.length;u++)i[u].setLocalTransform(h);if(i.length!==a)return console.error("Invalid morphing: unmatched splitted path"),s_()}i=ac(i),e=ac(e);for(var f=t.individualDelay,u=0;u<a;u++){var v=f?st({delay:(t.delay||0)+f(u,a,i[u],e[u])},t):t;o_(i[u],e[u],v)}return{fromIndividuals:i,toIndividuals:e,count:e.length}}function dk(r){return W(r[0])}function pk(r,e){for(var t=[],a=r.length,i=0;i<a;i++)t.push({one:r[i],many:[]});for(var i=0;i<e.length;i++){var n=e[i].length,o=void 0;for(o=0;o<n;o++)t[o%a].many.push(e[i][o])}for(var s=0,i=a-1;i>=0;i--)if(!t[i].many.length){var l=t[s].many;if(l.length<=1)if(s)s=0;else return t;var n=l.length,u=Math.ceil(n/2);t[i].many=l.slice(u,n),t[s].many=l.slice(0,u),s++}return t}var XX={clone:function(r){for(var e=[],t=1-Math.pow(1-r.path.style.opacity,1/r.count),a=0;a<r.count;a++){var i=Qd(r.path);i.setStyle("opacity",t),e.push(i)}return e},split:null};function l_(r,e,t,a,i,n){if(!r.length||!e.length)return;var o=ko("update",a,i);if(!(o&&o.duration>0))return;var s=a.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,h;dk(r)&&(u=r,h=e),dk(e)&&(u=e,h=r);function f(y,m,_,x,b){var S=y.many,w=y.one;if(S.length===1&&!b){var T=m?S[0]:w,C=m?w:S[0];if(ec(T))f({many:[T],one:C},!0,_,x,!0);else{var A=s?st({delay:s(_,x)},l):l;o_(T,C,A),n(T,C,T,C,A)}}else for(var D=st({dividePath:XX[t],individualDelay:s&&function(O,E,N,V){return s(O+_,x)}},l),I=m?ZX(S,w,D):$X(w,S,D),L=I.fromIndividuals,P=I.toIndividuals,k=L.length,R=0;R<k;R++){var A=s?st({delay:s(R,k)},l):l;n(L[R],P[R],m?S[R]:y.one,m?y.one:S[R],A)}}for(var v=u?u===r:r.length>e.length,c=u?pk(h,u):pk(v?e:r,[v?r:e]),d=0,p=0;p<c.length;p++)d+=c[p].many.length;for(var g=0,p=0;p<c.length;p++)f(c[p],v,g,d),g+=c[p].many.length}function no(r){if(!r)return[];if(W(r)){for(var e=[],t=0;t<r.length;t++)e.push(no(r[t]));return e}var a=[];return r.traverse(function(i){i instanceof bt&&!i.disableMorphing&&!i.invisible&&!i.ignore&&a.push(i)}),a}var gk=1e4,qX=0,yk=1,mk=2,KX=St();function jX(r,e){for(var t=r.dimensions,a=0;a<t.length;a++){var i=r.getDimensionInfo(t[a]);if(i&&i.otherDims[e]===0)return t[a]}}function JX(r,e,t){var a=r.getDimensionInfo(t),i=a&&a.ordinalMeta;if(a){var n=r.get(a.name,e);return i&&i.categories[n]||n+""}}function _k(r,e,t,a){var i=a?"itemChildGroupId":"itemGroupId",n=jX(r,i);if(n){var o=JX(r,e,n);return o}var s=r.getRawDataItem(e),l=a?"childGroupId":"groupId";if(s&&s[l])return s[l]+"";if(!a)return t||r.getId(e)}function xk(r){var e=[];return M(r,function(t){var a=t.data,i=t.dataGroupId;if(!(a.count()>gk))for(var n=a.getIndices(),o=0;o<n.length;o++)e.push({data:a,groupId:_k(a,o,i,!1),childGroupId:_k(a,o,i,!0),divide:t.divide,dataIndex:o})}),e}function u_(r,e,t){r.traverse(function(a){a instanceof bt&&Yt(a,{style:{opacity:0}},e,{dataIndex:t,isFrom:!0})})}function h_(r){if(r.parent){var e=r.getComputedTransform();r.setLocalTransform(e),r.parent.remove(r)}}function Ds(r){r.stopAnimation(),r.isGroup&&r.traverse(function(e){e.stopAnimation()})}function QX(r,e,t){var a=ko("update",t,e);a&&r.traverse(function(i){if(i instanceof _r){var n=LN(i);n&&i.animateFrom({style:n},a)}})}function tq(r,e){var t=r.length;if(t!==e.length)return!1;for(var a=0;a<t;a++){var i=r[a],n=e[a];if(i.data.getId(i.dataIndex)!==n.data.getId(n.dataIndex))return!1}return!0}function Sk(r,e,t){var a=xk(r),i=xk(e);function n(_,x,b,S,w){(b||_)&&x.animateFrom({style:b&&b!==_?F(F({},b.style),_.style):_.style},w)}var o=!1,s=qX,l=J(),u=J();a.forEach(function(_){_.groupId&&l.set(_.groupId,!0),_.childGroupId&&u.set(_.childGroupId,!0)});for(var h=0;h<i.length;h++){var f=i[h].groupId;if(u.get(f)){s=yk;break}var v=i[h].childGroupId;if(v&&l.get(v)){s=mk;break}}function c(_,x){return function(b){var S=b.data,w=b.dataIndex;return x?S.getId(w):_?s===yk?b.childGroupId:b.groupId:s===mk?b.childGroupId:b.groupId}}var d=tq(a,i),p={};if(!d)for(var h=0;h<i.length;h++){var g=i[h],y=g.data.getItemGraphicEl(g.dataIndex);y&&(p[y.id]=!0)}function m(_,x){var b=a[x],S=i[_],w=S.data.hostModel,T=b.data.getItemGraphicEl(b.dataIndex),C=S.data.getItemGraphicEl(S.dataIndex);if(T===C){C&&QX(C,S.dataIndex,w);return}T&&p[T.id]||C&&(Ds(C),T?(Ds(T),h_(T),o=!0,l_(no(T),no(C),S.divide,w,_,n)):u_(C,w,_))}new Fa(a,i,c(!0,d),c(!1,d),null,"multiple").update(m).updateManyToOne(function(_,x){var b=i[_],S=b.data,w=S.hostModel,T=S.getItemGraphicEl(b.dataIndex),C=Et(U(x,function(A){return a[A].data.getItemGraphicEl(a[A].dataIndex)}),function(A){return A&&A!==T&&!p[A.id]});T&&(Ds(T),C.length?(M(C,function(A){Ds(A),h_(A)}),o=!0,l_(no(C),no(T),b.divide,w,_,n)):u_(T,w,b.dataIndex))}).updateOneToMany(function(_,x){var b=a[x],S=b.data.getItemGraphicEl(b.dataIndex);if(!(S&&p[S.id])){var w=Et(U(_,function(C){return i[C].data.getItemGraphicEl(i[C].dataIndex)}),function(C){return C&&C!==S}),T=i[_[0]].data.hostModel;w.length&&(M(w,function(C){return Ds(C)}),S?(Ds(S),h_(S),o=!0,l_(no(S),no(w),b.divide,T,_[0],n)):M(w,function(C){return u_(C,T,_[0])}))}}).updateManyToMany(function(_,x){new Fa(x,_,function(b){return a[b].data.getId(a[b].dataIndex)},function(b){return i[b].data.getId(i[b].dataIndex)}).update(function(b,S){m(_[b],x[S])}).execute()}).execute(),o&&M(e,function(_){var x=_.data,b=x.hostModel,S=b&&t.getViewOfSeriesModel(b),w=ko("update",b,0);S&&b.isAnimationEnabled()&&w&&w.duration>0&&S.group.traverse(function(T){T instanceof bt&&!T.animators.length&&T.animateFrom({style:{opacity:0}},w)})})}function bk(r){var e=r.getModel("universalTransition").get("seriesKey");return e||r.id}function wk(r){return W(r)?r.sort().join(","):r}function zi(r){if(r.hostModel)return r.hostModel.getModel("universalTransition").get("divideShape")}function eq(r,e){var t=J(),a=J(),i=J();return M(r.oldSeries,function(n,o){var s=r.oldDataGroupIds[o],l=r.oldData[o],u=bk(n),h=wk(u);a.set(h,{dataGroupId:s,data:l}),W(u)&&M(u,function(f){i.set(f,{key:h,dataGroupId:s,data:l})})}),M(e.updatedSeries,function(n){if(n.isUniversalTransitionEnabled()&&n.isAnimationEnabled()){var o=n.get("dataGroupId"),s=n.getData(),l=bk(n),u=wk(l),h=a.get(u);if(h)t.set(u,{oldSeries:[{dataGroupId:h.dataGroupId,divide:zi(h.data),data:h.data}],newSeries:[{dataGroupId:o,divide:zi(s),data:s}]});else if(W(l)){var f=[];M(l,function(d){var p=a.get(d);p.data&&f.push({dataGroupId:p.dataGroupId,divide:zi(p.data),data:p.data})}),f.length&&t.set(u,{oldSeries:f,newSeries:[{dataGroupId:o,data:s,divide:zi(s)}]})}else{var v=i.get(l);if(v){var c=t.get(v.key);c||(c={oldSeries:[{dataGroupId:v.dataGroupId,data:v.data,divide:zi(v.data)}],newSeries:[]},t.set(v.key,c)),c.newSeries.push({dataGroupId:o,data:s,divide:zi(s)})}}}}),t}function Tk(r,e){for(var t=0;t<r.length;t++){var a=e.seriesIndex!=null&&e.seriesIndex===r[t].seriesIndex||e.seriesId!=null&&e.seriesId===r[t].id;if(a)return t}}function rq(r,e,t,a){var i=[],n=[];M(Vt(r.from),function(o){var s=Tk(e.oldSeries,o);s>=0&&i.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:zi(e.oldData[s]),groupIdDim:o.dimension})}),M(Vt(r.to),function(o){var s=Tk(t.updatedSeries,o);if(s>=0){var l=t.updatedSeries[s].getData();n.push({dataGroupId:e.oldDataGroupIds[s],data:l,divide:zi(l),groupIdDim:o.dimension})}}),i.length>0&&n.length>0&&Sk(i,n,a)}function aq(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,a){M(Vt(a.seriesTransition),function(i){M(Vt(i.to),function(n){for(var o=a.updatedSeries,s=0;s<o.length;s++)(n.seriesIndex!=null&&n.seriesIndex===o[s].seriesIndex||n.seriesId!=null&&n.seriesId===o[s].id)&&(o[s][lf]=!0)})})}),r.registerUpdateLifecycle("series:transition",function(e,t,a){var i=KX(t);if(i.oldSeries&&a.updatedSeries&&a.optionChanged){var n=a.seriesTransition;if(n)M(Vt(n),function(c){rq(c,i,a,t)});else{var o=eq(i,a);M(o.keys(),function(c){var d=o.get(c);Sk(d.oldSeries,d.newSeries,t)})}M(a.updatedSeries,function(c){c[lf]&&(c[lf]=!1)})}for(var s=e.getSeries(),l=i.oldSeries=[],u=i.oldDataGroupIds=[],h=i.oldData=[],f=0;f<s.length;f++){var v=s[f].getData();v.count()<gk&&(l.push(s[f]),u.push(s[f].get("dataGroupId")),h.push(v))}})}var iq=function(){function r(){this.breaks=[],this._elapsedExtent=[1/0,-1/0]}return r.prototype.setBreaks=function(e){this.breaks=e.breaks},r.prototype.update=function(e){oq(this,e);var t=this._elapsedExtent;t[0]=this.elapse(e[0]),t[1]=this.elapse(e[1])},r.prototype.hasBreaks=function(){return!!this.breaks.length},r.prototype.calcNiceTickMultiple=function(e,t){for(var a=0;a<this.breaks.length;a++){var i=this.breaks[a];if(i.vmin<e&&e<i.vmax){var n=t(e,i.vmax);return n}}return 0},r.prototype.getExtentSpan=function(){return this._elapsedExtent[1]-this._elapsedExtent[0]},r.prototype.normalize=function(e){var t=this._elapsedExtent[1]-this._elapsedExtent[0];return t===0?.5:(this.elapse(e)-this._elapsedExtent[0])/t},r.prototype.scale=function(e){return this.unelapse(e*(this._elapsedExtent[1]-this._elapsedExtent[0])+this._elapsedExtent[0])},r.prototype.elapse=function(e){for(var t=Ck,a=Ak,i=!0,n=0;n<this.breaks.length;n++){var o=this.breaks[n];if(e<=o.vmax){e>o.vmin?t+=o.vmin-a+(e-o.vmin)/(o.vmax-o.vmin)*o.gapReal:t+=e-a,a=o.vmax,i=!1;break}t+=o.vmin-a+o.gapReal,a=o.vmax}return i&&(t+=e-a),t},r.prototype.unelapse=function(e){for(var t=Ck,a=Ak,i=!0,n=0,o=0;o<this.breaks.length;o++){var s=this.breaks[o],l=t+s.vmin-a,u=l+s.gapReal;if(e<=u){e>l?n=s.vmin+(e-l)/(u-l)*(s.vmax-s.vmin):n=a+e-t,a=s.vmax,i=!1;break}t=u,a=s.vmax}return i&&(n=a+e-t),n},r}();function nq(){return new iq}var Ck=0,Ak=0;function oq(r,e){var t=0,a={tpAbs:{span:0,val:0},tpPrct:{span:0,val:0}},i=function(){return{has:!1,span:NaN,inExtFrac:NaN,val:NaN}},n={S:{tpAbs:i(),tpPrct:i()},E:{tpAbs:i(),tpPrct:i()}};M(r.breaks,function(s){var l=s.gapParsed;l.type==="tpPrct"&&(t+=l.val);var u=f_(s,e);if(u){var h=u.vmin!==s.vmin,f=u.vmax!==s.vmax,v=u.vmax-u.vmin;if(!(h&&f))if(h||f){var c=h?"S":"E";n[c][l.type].has=!0,n[c][l.type].span=v,n[c][l.type].inExtFrac=v/(s.vmax-s.vmin),n[c][l.type].val=l.val}else a[l.type].span+=v,a[l.type].val+=l.val}});var o=t*(0+(e[1]-e[0])+(a.tpAbs.val-a.tpAbs.span)+(n.S.tpAbs.has?(n.S.tpAbs.val-n.S.tpAbs.span)*n.S.tpAbs.inExtFrac:0)+(n.E.tpAbs.has?(n.E.tpAbs.val-n.E.tpAbs.span)*n.E.tpAbs.inExtFrac:0)-a.tpPrct.span-(n.S.tpPrct.has?n.S.tpPrct.span*n.S.tpPrct.inExtFrac:0)-(n.E.tpPrct.has?n.E.tpPrct.span*n.E.tpPrct.inExtFrac:0))/(1-a.tpPrct.val-(n.S.tpPrct.has?n.S.tpPrct.val*n.S.tpPrct.inExtFrac:0)-(n.E.tpPrct.has?n.E.tpPrct.val*n.E.tpPrct.inExtFrac:0));M(r.breaks,function(s){var l=s.gapParsed;l.type==="tpPrct"&&(s.gapReal=t!==0?Math.max(o,0)*l.val/t:0),l.type==="tpAbs"&&(s.gapReal=l.val),s.gapReal==null&&(s.gapReal=0)})}function sq(r,e,t,a,i,n){r!=="no"&&M(t,function(o){var s=f_(o,n);if(s)for(var l=e.length-1;l>=0;l--){var u=e[l],h=a(u),f=i*3/4;h>s.vmin-f&&h<s.vmax+f&&(r!=="preserve_extent_bound"||h!==n[0]&&h!==n[1])&&e.splice(l,1)}})}function lq(r,e,t,a){M(e,function(i){var n=f_(i,t);n&&(r.push({value:n.vmin,break:{type:"vmin",parsedBreak:n},time:a?a(n):void 0}),r.push({value:n.vmax,break:{type:"vmax",parsedBreak:n},time:a?a(n):void 0}))}),e.length&&r.sort(function(i,n){return i.value-n.value})}function f_(r,e){var t=Math.max(r.vmin,e[0]),a=Math.min(r.vmax,e[1]);return t<a||t===a&&t>e[0]&&t<e[1]?{vmin:t,vmax:a,breakOption:r.breakOption,gapParsed:r.gapParsed,gapReal:r.gapReal}:null}function v_(r,e,t){var a=[];if(!r)return{breaks:a};function i(o,s){return o>=0&&o<1-1e-5}M(r,function(o){if(!(!o||o.start==null||o.end==null)&&!o.isExpanded){var s={breakOption:at(o),vmin:e(o.start),vmax:e(o.end),gapParsed:{type:"tpAbs",val:0},gapReal:null};if(o.gap!=null){var l=!1;if($(o.gap)){var u=cr(o.gap);if(u.match(/%$/)){var h=parseFloat(u)/100;i(h)||(h=0),s.gapParsed.type="tpPrct",s.gapParsed.val=h,l=!0}}if(!l){var f=e(o.gap);(!isFinite(f)||f<0)&&(f=0),s.gapParsed.type="tpAbs",s.gapParsed.val=f}}if(s.vmin===s.vmax&&(s.gapParsed.type="tpAbs",s.gapParsed.val=0),t&&t.noNegative&&M(["vmin","vmax"],function(c){s[c]<0&&(s[c]=0)}),s.vmin>s.vmax){var v=s.vmax;s.vmax=s.vmin,s.vmin=v}a.push(s)}}),a.sort(function(o,s){return o.vmin-s.vmin});var n=-1/0;return M(a,function(o,s){n>o.vmin&&(a[s]=null),n=o.vmax}),{breaks:a.filter(function(o){return!!o})}}function c_(r,e){return d_(e)===d_(r)}function d_(r){return r.start+"_\0_"+r.end}function uq(r,e,t){var a=[];M(r,function(n,o){var s=e(n);s&&s.type==="vmin"&&a.push([o])}),M(r,function(n,o){var s=e(n);if(s&&s.type==="vmax"){var l=Fi(a,function(u){return c_(e(r[u[0]]).parsedBreak.breakOption,s.parsedBreak.breakOption)});l&&l.push(o)}});var i=[];return M(a,function(n){n.length===2&&i.push(t?n:[r[n[0]],r[n[1]]])}),i}function hq(r,e,t,a){var i,n;if(r.break){var o=r.break.parsedBreak,s=Fi(t,function(f){return c_(f.breakOption,r.break.parsedBreak.breakOption)}),l=a(Math.pow(e,o.vmin),s.vmin),u=a(Math.pow(e,o.vmax),s.vmax),h={type:o.gapParsed.type,val:o.gapParsed.type==="tpAbs"?ne(Math.pow(e,o.vmin+o.gapParsed.val))-l:o.gapParsed.val};i={type:r.break.type,parsedBreak:{breakOption:o.breakOption,vmin:l,vmax:u,gapParsed:h,gapReal:o.gapReal}},n=s[r.break.type]}return{brkRoundingCriterion:n,vBreak:i}}function fq(r,e,t){var a={noNegative:!0},i=v_(r,t,a),n=v_(r,t,a),o=Math.log(e);return n.breaks=U(n.breaks,function(s){var l=Math.log(s.vmin)/o,u=Math.log(s.vmax)/o,h={type:s.gapParsed.type,val:s.gapParsed.type==="tpAbs"?Math.log(s.vmin+s.gapParsed.val)/o-l:s.gapParsed.val};return{vmin:l,vmax:u,gapParsed:h,gapReal:s.gapReal,breakOption:s.breakOption}}),{parsedOriginal:i,parsedLogged:n}}var vq={vmin:"start",vmax:"end"};function cq(r,e){return e&&(r=r||{},r.break={type:vq[e.type],start:e.parsedBreak.vmin,end:e.parsedBreak.vmax}),r}function dq(){JN({createScaleBreakContext:nq,pruneTicksByBreak:sq,addBreaksToTicks:lq,parseAxisBreakOption:v_,identifyAxisBreak:c_,serializeAxisBreakIdentifier:d_,retrieveAxisBreakPairs:uq,getTicksLogTransformBreak:hq,logarithmicParseBreaksFromOption:fq,makeAxisLabelFormatterParamBreak:cq})}var Mk=St();function pq(r,e){var t=Fi(r,function(a){return se().identifyAxisBreak(a.parsedBreak.breakOption,e.breakOption)});return t||r.push(t={zigzagRandomList:[],parsedBreak:e,shouldRemove:!1}),t}function gq(r){M(r,function(e){return e.shouldRemove=!0})}function yq(r){for(var e=r.length-1;e>=0;e--)r[e].shouldRemove&&r.splice(e,1)}function mq(r,e,t,a,i){var n=t.axis;if(n.scale.isBlank()||!se())return;var o=se().retrieveAxisBreakPairs(n.scale.getTicks({breakTicks:"only_break"}),function(C){return C.break},!1);if(!o.length)return;var s=t.getModel("breakArea"),l=s.get("zigzagAmplitude"),u=s.get("zigzagMinSpan"),h=s.get("zigzagMaxSpan");u=Math.max(2,u||0),h=Math.max(u,h||0);var f=s.get("expandOnClick"),v=s.get("zigzagZ"),c=s.getModel("itemStyle"),d=c.getItemStyle(),p=d.stroke,g=d.lineWidth,y=d.lineDash,m=d.fill,_=new et({ignoreModelZ:!0}),x=n.isHorizontal(),b=Mk(e).visualList||(Mk(e).visualList=[]);gq(b);for(var S=function(C){var A=o[C][0].break.parsedBreak,D=[];D[0]=n.toGlobalCoord(n.dataToCoord(A.vmin,!0)),D[1]=n.toGlobalCoord(n.dataToCoord(A.vmax,!0)),D[1]<D[0]&&D.reverse();var I=pq(b,A);I.shouldRemove=!1;var L=new et;T(I.zigzagRandomList,L,D[0],D[1],x,A),f&&L.on("click",function(){var P={type:jf,breaks:[{start:A.breakOption.start,end:A.breakOption.end}]};P[n.dim+"AxisIndex"]=t.componentIndex,i.dispatchAction(P)}),L.silent=!f,_.add(L)},w=0;w<o.length;w++)S(w);r.add(_),yq(b);function T(C,A,D,I,L,P){var k={stroke:p,lineWidth:g,lineDash:y,fill:"none"},R=L?0:1,O=1-R,E=a[dt[O]]+a[oe[O]];function N(Nt){var wt=[],kt=[];wt[R]=kt[R]=Nt,wt[O]=a[dt[O]],kt[O]=E;var Bt={x1:wt[0],y1:wt[1],x2:kt[0],y2:kt[1]};return bh(Bt,Bt,{lineWidth:1}),wt[0]=Bt.x1,wt[1]=Bt.y1,wt[R]}D=N(D),I=N(I);for(var V=[],G=[],H=!0,Y=a[dt[O]],q=0;;q++){var it=Y===a[dt[O]],xt=Y>=E;xt&&(Y=E);var At=[],ut=[];At[R]=D,ut[R]=I,!it&&!xt&&(At[R]+=H?-l:l,ut[R]-=H?l:-l),At[O]=Y,ut[O]=Y,V.push(At),G.push(ut);var tt=void 0;if(q<C.length?tt=C[q]:(tt=Math.random(),C.push(tt)),Y+=tt*(h-u)+u,H=!H,xt)break}var ct=se().serializeAxisBreakIdentifier(P.breakOption);if(A.add(new Be({anid:"break_a_"+ct,shape:{points:V},style:k,z:v})),P.gapReal!==0){A.add(new Be({anid:"break_b_"+ct,shape:{points:G},style:k,z:v}));var j=G.slice();j.reverse();var ft=V.concat(j);A.add(new De({anid:"break_c_"+ct,shape:{points:ft},style:{fill:m,opacity:d.opacity},z:v}))}}}function _q(r,e,t,a){var i=r.axis,n=t.transform;Ee(a.style);var o=i.getExtent();i.inverse&&(o=o.slice(),o.reverse());var s=se().retrieveAxisBreakPairs(i.scale.getTicks({breakTicks:"only_break"}),function(g){return g.break},!1),l=U(s,function(g){var y=g[0].break.parsedBreak,m=[i.dataToCoord(y.vmin,!0),i.dataToCoord(y.vmax,!0)];return m[0]>m[1]&&m.reverse(),{coordPair:m,brkId:se().serializeAxisBreakIdentifier(y.breakOption)}});l.sort(function(g,y){return g.coordPair[0]-y.coordPair[0]});for(var u=o[0],h=null,f=0;f<l.length;f++){var v=l[f],c=Math.max(v.coordPair[0],o[0]),d=Math.min(v.coordPair[1],o[1]);u<=c&&p(u,c,h,v),u=d,h=v}u<=o[1]&&p(u,o[1],h,null);function p(g,y,m,_){function x(D,I){n&&(te(D,D,n),te(I,I,n))}function b(D,I){var L={x1:D[0],y1:D[1],x2:I[0],y2:I[1]};bh(L,L,a.style),D[0]=L.x1,D[1]=L.y1,I[0]=L.x2,I[1]=L.y2}var S=[g,0],w=[y,0],T=[g,5],C=[y,5];x(S,T),b(S,T),x(w,C),b(w,C),b(S,w);var A=new Kt(F({shape:{x1:S[0],y1:S[1],x2:w[0],y2:w[1]}},a));e.add(A),A.anid="breakLine_"+(m?m.brkId:"\0")+"_\0_"+(_?_.brkId:"\0")}}function xq(r,e,t){if(Fi(t,function(m){return!m}))return;var a=new nt;if(!Vf(t[0],t[1],a,{direction:-(r?e+Math.PI:e),touchThreshold:0,bidirectional:!1}))return;var i=Se();ri(i,i,-e);var n=U(t,function(m){return m.transform?qr(Se(),i,m.transform):i});function o(m){var _=t[0].localRect,x=new nt(_[oe[m]]*n[0][0],_[oe[m]]*n[0][1]);return Math.abs(x.y)<1e-5}var s=.5;if(o(0)||o(1)){var l=U(t,function(m,_){var x=m.localRect.clone();return x.applyTransform(n[_]),x}),u=new nt;u.copy(t[0].label).add(t[1].label).scale(.5),u.transform(i);var h=a.clone().transform(i),f=l[0].x+l[1].x+(h.x>=0?l[0].width:l[1].width),v=(f+h.x)/2-u.x,c=Math.min(v,v-h.x),d=Math.max(v,v-h.x),p=d<0?d:c>0?c:0;s=(v-p)/h.x}var g=new nt,y=new nt;nt.scale(g,a,-s),nt.scale(y,a,1-s),Hg(t[0],g),Hg(t[1],y)}function Sq(r,e){var t={breaks:[]};return M(e.breaks,function(a){if(a){var i=Fi(r.get("breaks",!0),function(s){return se().identifyAxisBreak(s,a)});if(i){var n=e.type,o={isExpanded:!!i.isExpanded};i.isExpanded=n===jf?!0:n===FA?!1:n===HA?!i.isExpanded:i.isExpanded,t.breaks.push({start:i.start,end:i.end,isExpanded:!!i.isExpanded,old:o})}}}),t}function bq(){yF({adjustBreakLabelPair:xq,buildAxisBreakLine:_q,rectCoordBuildBreakAxis:mq,updateModelAxisBreak:Sq})}function wq(r){wF(r),dq(),bq()}function Tq(){UF(Cq)}function Cq(r,e){M(r,function(t){if(!t.model.get(["axisLabel","inside"])){var a=Aq(t);if(a){var i=t.isHorizontal()?"height":"width",n=t.model.get(["axisLabel","margin"]);e[i]-=a[i]+n,t.position==="top"?e.y+=a.height+n:t.position==="left"&&(e.x+=a.width+n)}}})}function Aq(r){var e=r.model,t=r.scale;if(!e.get(["axisLabel","show"])||t.isBlank())return;var a,i,n=t.getExtent();t instanceof ts?i=t.count():(a=t.getTicks(),i=a.length);var o=r.getLabelModel(),s=rs(r),l,u=1;i>40&&(u=Math.ceil(i/40));for(var h=0;h<i;h+=u){var f=a?a[h]:{value:n[0]+h},v=s(f,h),c=o.getTextRect(v),d=p(c,o.get("rotate")||0);l?l.union(d):l=d}return l;function p(g,y){var m=y*Math.PI/180,_=g.width,x=g.height,b=_*Math.abs(Math.cos(m))+Math.abs(x*Math.sin(m)),S=_*Math.abs(Math.sin(m))+Math.abs(x*Math.cos(m)),w=new ht(g.x,g.y,b,S);return w}}mt([p3]),mt([u3]),mt([O3,K3,oF,uH,xH,u4,N4,_W,GW,$W,QW,s6,t8,T8,O8,j8,eU,fU,mU,LU,OU,YU,LY]),mt(XY),mt(_Z),mt(jM),mt(PZ),mt(bL),mt(OZ),mt(e7),mt(h7),mt(K7),mt(p9),mt(gu),mt(P9),mt(E9),mt(U9),mt(J9),mt(i$),mt(h$),mt(x$),mt(V$),mt(PP),mt(RP),mt(nX),mt(qP),mt(jP),mt(uX),mt(dX),mt(MX),mt(IX),mt(aq),mt(bC),mt(wq),mt(Tq),mt(hH);var Mq=Object.defineProperty,Dq=(r,e,t)=>e in r?Mq(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,oo=(r,e,t)=>(Dq(r,typeof e!="symbol"?e+"":e,t),t);class Lq{constructor(e,t,a,i={}){oo(this,"id"),oo(this,"plots"),oo(this,"paneIndex"),oo(this,"height"),oo(this,"collapsed"),oo(this,"titleColor"),oo(this,"controls"),this.id=e,this.plots=t,this.paneIndex=a,this.height=i.height,this.collapsed=i.collapsed||!1,this.titleColor=i.titleColor,this.controls=i.controls}toggleCollapse(){this.collapsed=!this.collapsed}isVisible(){return!this.collapsed}updateData(e){Object.keys(e).forEach(t=>{if(!this.plots[t])this.plots[t]=e[t];else{const a=this.plots[t],i=e[t];i.options&&(a.options={...a.options,...i.options});const n=new Map;a.data.forEach(o=>{n.set(o.time,o)}),i.data.forEach(o=>{n.set(o.time,o)}),a.data=Array.from(n.values()).sort((o,s)=>o.time-s.time)}})}}class Dk{static calculate(e,t,a,i=!1,n=null){let o=0;e>0&&(o=1/e*100);const s=Array.from(t.values()).map(A=>A.paneIndex).filter(A=>A>0).sort((A,D)=>A-D).filter((A,D,I)=>I.indexOf(A)===D),l=s.length>0,u=a.dataZoom?.visible??!0,h=a.dataZoom?.position??"top",f=a.dataZoom?.height??6,v=a.dataZoom?.start??0,c=a.dataZoom?.end??100;let d=8,p=92,g=-1;if(n)if(n==="main")g=0;else{const A=t.get(n);A&&(g=A.paneIndex)}if(g!==-1){const A=[],D=[],I=[],L=[],P=a.dataZoom?.start??50,k=a.dataZoom?.end??100;L.push({type:"inside",xAxisIndex:"all",start:P,end:k});const R=l?Math.max(...s):0,O=[];for(let E=0;E<=R;E++){const N=E===g;if(A.push({left:"10%",right:"10%",top:N?"5%":"0%",height:N?"90%":"0%",show:N,containLabel:!1}),D.push({type:"category",gridIndex:E,data:[],show:N,axisLabel:{show:N,color:"#94a3b8",fontFamily:a.fontFamily},axisLine:{show:N,lineStyle:{color:"#334155"}},splitLine:{show:N,lineStyle:{color:"#334155",opacity:.5}}}),I.push({position:"right",gridIndex:E,show:N,scale:!0,axisLabel:{show:N,color:"#94a3b8",fontFamily:a.fontFamily},splitLine:{show:N,lineStyle:{color:"#334155",opacity:.5}}}),E>0){const V=Array.from(t.values()).find(G=>G.paneIndex===E);V&&O.push({index:E,height:N?90:0,top:N?5:0,isCollapsed:!1,indicatorId:V.id,titleColor:V.titleColor,controls:V.controls})}}return{grid:A,xAxis:D,yAxis:I,dataZoom:L,paneLayout:O,mainPaneHeight:g===0?90:0,mainPaneTop:g===0?5:0,pixelToPercent:o}}u?h==="top"?(d=f+4,p=95):(p=100-f-2,d=8):(d=5,p=95);let y=5;e>0&&(y=20/e*100);let m=75,_=[];if(l){const A=s.map(k=>{const R=Array.from(t.values()).find(O=>O.paneIndex===k);return{index:k,requestedHeight:R?.height,isCollapsed:R?.collapsed??!1,indicatorId:R?.id,titleColor:R?.titleColor,controls:R?.controls}}).map(k=>({...k,height:k.isCollapsed?3:k.requestedHeight!==void 0?k.requestedHeight:15})),D=A.reduce((k,R)=>k+R.height,0),I=A.length*y,L=D+I;m=p-d-L,i?m=3:m<20&&(m=Math.max(m,10));let P=d+m+y;_=A.map(k=>{const R={index:k.index,height:k.height,top:P,isCollapsed:k.isCollapsed,indicatorId:k.indicatorId,titleColor:k.titleColor,controls:k.controls};return P+=k.height+y,R})}else m=p-d,i&&(m=3);const x=[];x.push({left:"10%",right:"10%",top:d+"%",height:m+"%",containLabel:!1}),_.forEach(A=>{x.push({left:"10%",right:"10%",top:A.top+"%",height:A.height+"%",containLabel:!1})});const b=[0,..._.map((A,D)=>D+1)],S=[],w=_.length===0;S.push({type:"category",data:[],gridIndex:0,scale:!0,axisLine:{onZero:!1,show:!i,lineStyle:{color:"#334155"}},splitLine:{show:!i,lineStyle:{color:"#334155",opacity:.5}},axisLabel:{show:!i,color:"#94a3b8",fontFamily:a.fontFamily||"sans-serif"},axisTick:{show:!i},axisPointer:{label:{show:w,fontSize:11,backgroundColor:"#475569"}}}),_.forEach((A,D)=>{const I=D===_.length-1;S.push({type:"category",gridIndex:D+1,data:[],axisLabel:{show:!1},axisLine:{show:!A.isCollapsed,lineStyle:{color:"#334155"}},axisTick:{show:!1},splitLine:{show:!1},axisPointer:{label:{show:I,fontSize:11,backgroundColor:"#475569"}}})});const T=[];T.push({position:"right",scale:!0,gridIndex:0,splitLine:{show:!i,lineStyle:{color:"#334155",opacity:.5}},axisLine:{show:!i,lineStyle:{color:"#334155"}},axisLabel:{show:!i,color:"#94a3b8",fontFamily:a.fontFamily||"sans-serif"}}),_.forEach((A,D)=>{T.push({position:"right",scale:!0,gridIndex:D+1,splitLine:{show:!A.isCollapsed,lineStyle:{color:"#334155",opacity:.3}},axisLabel:{show:!A.isCollapsed,color:"#94a3b8",fontFamily:a.fontFamily||"sans-serif",fontSize:10},axisLine:{show:!A.isCollapsed,lineStyle:{color:"#334155"}}})});const C=[];return u&&(C.push({type:"inside",xAxisIndex:b,start:v,end:c}),h==="top"?C.push({type:"slider",xAxisIndex:b,top:"1%",height:f+"%",start:v,end:c,borderColor:"#334155",textStyle:{color:"#cbd5e1"},brushSelect:!1}):C.push({type:"slider",xAxisIndex:b,bottom:"1%",height:f+"%",start:v,end:c,borderColor:"#334155",textStyle:{color:"#cbd5e1"},brushSelect:!1})),{grid:x,xAxis:S,yAxis:T,dataZoom:C,paneLayout:_,mainPaneHeight:m,mainPaneTop:d,pixelToPercent:o}}static calculateMaximized(e,t,a){return{grid:[],xAxis:[],yAxis:[],dataZoom:[],paneLayout:[],mainPaneHeight:0,mainPaneTop:0,pixelToPercent:0}}}const p_=new Map;function Iq(r,e="#00da3c",t="64px"){if(typeof document>"u")return"";const a=`${r}-${e}-${t}`;if(p_.has(a))return p_.get(a);const i=document.createElement("canvas"),n=i.getContext("2d");if(i.width=32,i.height=32,n){n.font="bold "+t+" Arial",n.fillStyle=e,n.textAlign="center",n.textBaseline="middle",n.fillText(r,16,16);const o=i.toDataURL("image/png");return p_.set(a,o),o}return""}class g_{static buildCandlestickSeries(e,t,a){const i=t.upColor||"#00da3c",n=t.downColor||"#ec0000",o=e.map(s=>[s.open,s.close,s.low,s.high]);if(a&&a>o.length){const s=a-o.length;for(let l=0;l<s;l++)o.push(null)}return{type:"candlestick",name:t.title||"Market",data:o,itemStyle:{color:i,color0:n,borderColor:i,borderColor0:n},xAxisIndex:0,yAxisIndex:0,z:5}}static buildIndicatorSeries(e,t,a,i,n=0){const o=[];return e.forEach((s,l)=>{if(s.collapsed)return;let u=0,h=0;if(s.paneIndex>0){const f=a.findIndex(v=>v.index===s.paneIndex);f!==-1&&(u=f+1,h=f+1)}Object.keys(s.plots).forEach(f=>{const v=s.plots[f],c=`${l}::${f}`,d=new Array(i).fill(null),p=new Array(i).fill(null);switch(v.data.forEach(g=>{const y=t.get(g.time);if(y!==void 0){const m=y+n;d[m]=g.value,p[m]=g.options?.color||v.options.color}}),v.options.style){case"histogram":case"columns":o.push({name:c,type:"bar",xAxisIndex:u,yAxisIndex:h,data:d.map((y,m)=>({value:y,itemStyle:p[m]?{color:p[m]}:void 0})),itemStyle:{color:v.options.color}});break;case"circles":case"cross":const g=d.map((y,m)=>{if(y===null)return null;const _=p[m]||v.options.color,x={value:[m,y],itemStyle:{color:_}};return v.options.style==="cross"?(x.symbol=`image://${Iq("+",_,"24px")}`,x.symbolSize=16):(x.symbol="circle",x.symbolSize=6),x}).filter(y=>y!==null);o.push({name:c,type:"scatter",xAxisIndex:u,yAxisIndex:h,data:g});break;case"background":o.push({name:c,type:"custom",xAxisIndex:u,yAxisIndex:h,z:-10,renderItem:(y,m)=>{const _=m.value(0);if(isNaN(_))return;const x=m.coord([_,0]),b=m.size([1,0])[0],S=y.coordSys,w=x[0]-b/2,T=p[y.dataIndex],C=m.value(1);if(!(!T||!C))return{type:"rect",shape:{x:w,y:S.y,width:b,height:S.height},style:{fill:T,opacity:.3},silent:!0}},data:d.map((y,m)=>[m,y])});break;case"line":default:o.push({name:c,type:"line",xAxisIndex:u,yAxisIndex:h,smooth:!0,showSymbol:!1,data:d.map((y,m)=>({value:y,itemStyle:p[m]?{color:p[m]}:void 0})),itemStyle:{color:v.options.color},lineStyle:{width:v.options.linewidth||1,color:v.options.color}});break}})}),o}}class Pq{static build(e,t,a,i=!1,n=null){const o=[],s=e.pixelToPercent,l=e.mainPaneTop;if(!n||n==="main"){const u=10*s;if(o.push({type:"text",left:"8.5%",top:l+u+"%",z:10,style:{text:t.title||"Market",fill:t.titleColor||"#fff",font:`bold 16px ${t.fontFamily||"sans-serif"}`,textVerticalAlign:"top"}}),t.watermark!==!1){const f=e.mainPaneTop+e.mainPaneHeight;o.push({type:"text",right:"11%",top:f-3+"%",z:10,style:{text:"QFChart",fill:t.fontColor||"#cbd5e1",font:"bold 16px sans-serif",opacity:.1},cursor:"pointer",onclick:()=>{window.open("https://quantforge.org","_blank")}})}const h=[];if(t.controls?.collapse&&h.push({type:"group",children:[{type:"rect",shape:{width:20,height:20,r:2},style:{fill:"#334155",stroke:"#475569",lineWidth:1},onclick:()=>a("main","collapse")},{type:"text",style:{text:i?"+":"\u2212",fill:"#cbd5e1",font:`bold 14px ${t.fontFamily}`,x:10,y:10,textAlign:"center",textVerticalAlign:"middle"},silent:!0}]}),t.controls?.maximize){const f=n==="main",v=t.controls?.collapse?25:0;h.push({type:"group",x:v,children:[{type:"rect",shape:{width:20,height:20,r:2},style:{fill:"#334155",stroke:"#475569",lineWidth:1},onclick:()=>a("main","maximize")},{type:"text",style:{text:f?"\u2750":"\u25A1",fill:"#cbd5e1",font:`14px ${t.fontFamily}`,x:10,y:10,textAlign:"center",textVerticalAlign:"middle"},silent:!0}]})}if(t.controls?.fullscreen){let f=0;t.controls?.collapse&&(f+=25),t.controls?.maximize&&(f+=25),h.push({type:"group",x:f,children:[{type:"rect",shape:{width:20,height:20,r:2},style:{fill:"#334155",stroke:"#475569",lineWidth:1},onclick:()=>a("main","fullscreen")},{type:"text",style:{text:"\u26F6",fill:"#cbd5e1",font:`14px ${t.fontFamily}`,x:10,y:10,textAlign:"center",textVerticalAlign:"middle"},silent:!0}]})}h.length>0&&o.push({type:"group",right:"10.5%",top:l+"%",children:h})}return e.paneLayout.forEach(u=>{if(n&&u.indicatorId!==n)return;o.push({type:"text",left:"8.5%",top:u.top+10*s+"%",z:10,style:{text:u.indicatorId||"",fill:u.titleColor||"#fff",font:`bold 12px ${t.fontFamily||"sans-serif"}`,textVerticalAlign:"top"}});const h=[];if(u.controls?.collapse&&h.push({type:"group",children:[{type:"rect",shape:{width:20,height:20,r:2},style:{fill:"#334155",stroke:"#475569",lineWidth:1},onclick:()=>u.indicatorId&&a(u.indicatorId,"collapse")},{type:"text",style:{text:u.isCollapsed?"+":"\u2212",fill:"#cbd5e1",font:`bold 14px ${t.fontFamily}`,x:10,y:10,textAlign:"center",textVerticalAlign:"middle"},silent:!0}]}),u.controls?.maximize){const f=n===u.indicatorId,v=u.controls?.collapse?25:0;h.push({type:"group",x:v,children:[{type:"rect",shape:{width:20,height:20,r:2},style:{fill:"#334155",stroke:"#475569",lineWidth:1},onclick:()=>u.indicatorId&&a(u.indicatorId,"maximize")},{type:"text",style:{text:f?"\u2750":"\u25A1",fill:"#cbd5e1",font:`14px ${t.fontFamily}`,x:10,y:10,textAlign:"center",textVerticalAlign:"middle"},silent:!0}]})}h.length>0&&o.push({type:"group",right:"10.5%",top:u.top+"%",children:h})}),o}}class kq{static format(e,t){if(!e||e.length===0)return"";const a=t.title||"Market",i=t.upColor||"#00da3c",n=t.downColor||"#ec0000",o=t.fontFamily||"sans-serif",s=e[0].axisValue;let l=`<div style="font-weight: bold; margin-bottom: 5px; color: #cbd5e1; font-family: ${o};">${s}</div>`;const u=e.find(f=>f.seriesType==="candlestick"),h=e.filter(f=>f.seriesType!=="candlestick");if(u){const[f,v,c,d,p]=u.value,g=c>=v?i:n;l+=`
90
+ <div style="margin-bottom: 8px; font-family: ${o};">
91
+ <div style="display:flex; justify-content:space-between; color:${g}; font-weight:bold;">
92
+ <span>${a}</span>
93
+ </div>
94
+ <div style="display: grid; grid-template-columns: auto auto; gap: 2px 15px; font-size: 0.9em; color: #cbd5e1;">
95
+ <span>Open:</span> <span style="text-align: right; color: ${c>=v?i:n}">${v}</span>
96
+ <span>High:</span> <span style="text-align: right; color: ${i}">${p}</span>
97
+ <span>Low:</span> <span style="text-align: right; color: ${n}">${d}</span>
98
+ <span>Close:</span> <span style="text-align: right; color: ${c>=v?i:n}">${c}</span>
99
+ </div>
100
+ </div>
101
+ `}if(h.length>0){l+='<div style="border-top: 1px solid #334155; margin: 5px 0; padding-top: 5px;"></div>';const f={};h.forEach(v=>{const c=v.seriesName.split("::"),d=c.length>1?c[0]:"Unknown",p=c.length>1?c[1]:v.seriesName;f[d]||(f[d]=[]),f[d].push({...v,displayName:p})}),Object.keys(f).forEach(v=>{l+=`
102
+ <div style="margin-top: 8px; font-family: ${o};">
103
+ <div style="font-weight:bold; color: #fff; margin-bottom: 2px;">${v}</div>
104
+ `,f[v].forEach(c=>{let d=c.value;if(Array.isArray(d)&&(d=d[1]),d==null)return;const p=typeof d=="number"?d.toLocaleString(void 0,{maximumFractionDigits:4}):d;l+=`
105
+ <div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px; padding-left: 8px;">
106
+ <div>${c.marker} <span style="color: #cbd5e1;">${c.displayName}</span></div>
107
+ <div style="font-size: 10px; color: #fff;padding-left:10px;">${p}</div>
108
+ </div>`}),l+="</div>"})}return l}}var Rq=Object.defineProperty,Eq=(r,e,t)=>e in r?Rq(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Ls=(r,e,t)=>(Eq(r,typeof e!="symbol"?e+"":e,t),t);class Oq{constructor(e,t){Ls(this,"plugins",new Map),Ls(this,"activePluginId",null),Ls(this,"context"),Ls(this,"toolbarContainer"),Ls(this,"tooltipElement",null),Ls(this,"hideTimeout",null),this.context=e,this.toolbarContainer=t,this.createTooltip(),this.renderToolbar()}createTooltip(){this.tooltipElement=document.createElement("div"),Object.assign(this.tooltipElement.style,{position:"fixed",display:"none",backgroundColor:"#1e293b",color:"#e2e8f0",padding:"6px 10px",borderRadius:"6px",fontSize:"13px",lineHeight:"1.4",fontWeight:"500",border:"1px solid #334155",zIndex:"9999",pointerEvents:"none",whiteSpace:"nowrap",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.15)",fontFamily:this.context.getOptions().fontFamily||"sans-serif",transition:"opacity 0.15s ease-in-out, transform 0.15s ease-in-out",opacity:"0",transform:"translateX(-5px)"}),document.body.appendChild(this.tooltipElement)}destroy(){this.tooltipElement&&this.tooltipElement.parentNode&&this.tooltipElement.parentNode.removeChild(this.tooltipElement),this.tooltipElement=null}showTooltip(e,t){if(!this.tooltipElement)return;this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=null);const a=e.getBoundingClientRect();this.tooltipElement.textContent=t,this.tooltipElement.style.display="block";const i=this.tooltipElement.getBoundingClientRect(),n=a.top+(a.height-i.height)/2,o=a.right+10;this.tooltipElement.style.top=`${n}px`,this.tooltipElement.style.left=`${o}px`,requestAnimationFrame(()=>{this.tooltipElement&&(this.tooltipElement.style.opacity="1",this.tooltipElement.style.transform="translateX(0)")})}hideTooltip(){this.tooltipElement&&(this.tooltipElement.style.opacity="0",this.tooltipElement.style.transform="translateX(-5px)",this.hideTimeout&&clearTimeout(this.hideTimeout),this.hideTimeout=setTimeout(()=>{this.tooltipElement&&(this.tooltipElement.style.display="none"),this.hideTimeout=null},150))}register(e){if(this.plugins.has(e.id)){console.warn(`Plugin with id ${e.id} is already registered.`);return}this.plugins.set(e.id,e),e.init(this.context),this.addButton(e)}unregister(e){const t=this.plugins.get(e);t&&(this.activePluginId===e&&this.deactivatePlugin(),t.destroy?.(),this.plugins.delete(e),this.removeButton(e))}activatePlugin(e){if(this.activePluginId===e){this.deactivatePlugin();return}this.activePluginId&&this.deactivatePlugin();const t=this.plugins.get(e);t&&(this.activePluginId=e,this.setButtonActive(e,!0),t.activate?.())}deactivatePlugin(){this.activePluginId&&(this.plugins.get(this.activePluginId)?.deactivate?.(),this.setButtonActive(this.activePluginId,!1),this.activePluginId=null)}renderToolbar(){this.toolbarContainer.innerHTML="",this.toolbarContainer.style.display="flex",this.toolbarContainer.style.flexDirection="column",this.toolbarContainer.style.width="40px",this.toolbarContainer.style.backgroundColor=this.context.getOptions().backgroundColor||"#1e293b",this.toolbarContainer.style.borderRight="1px solid #334155",this.toolbarContainer.style.padding="5px",this.toolbarContainer.style.boxSizing="border-box",this.toolbarContainer.style.gap="5px",this.toolbarContainer.style.flexShrink="0"}addButton(e){const t=document.createElement("button");t.id=`qfchart-plugin-btn-${e.id}`,t.style.width="30px",t.style.height="30px",t.style.padding="4px",t.style.border="1px solid transparent",t.style.borderRadius="4px",t.style.backgroundColor="transparent",t.style.cursor="pointer",t.style.color=this.context.getOptions().fontColor||"#cbd5e1",t.style.display="flex",t.style.alignItems="center",t.style.justifyContent="center",e.icon?t.innerHTML=e.icon:t.innerText=(e.name||e.id).substring(0,2).toUpperCase(),t.addEventListener("mouseenter",()=>{this.activePluginId!==e.id&&(t.style.backgroundColor="rgba(255, 255, 255, 0.1)"),this.showTooltip(t,e.name||e.id)}),t.addEventListener("mouseleave",()=>{this.activePluginId!==e.id&&(t.style.backgroundColor="transparent"),this.hideTooltip()}),t.onclick=()=>this.activatePlugin(e.id),this.toolbarContainer.appendChild(t)}removeButton(e){const t=this.toolbarContainer.querySelector(`#qfchart-plugin-btn-${e}`);t&&t.remove()}setButtonActive(e,t){const a=this.toolbarContainer.querySelector(`#qfchart-plugin-btn-${e}`);a&&(t?(a.style.backgroundColor="#2563eb",a.style.color="#ffffff"):(a.style.backgroundColor="transparent",a.style.color=this.context.getOptions().fontColor||"#cbd5e1"))}}var Nq=Object.defineProperty,Bq=(r,e,t)=>e in r?Nq(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Ve=(r,e,t)=>(Bq(r,typeof e!="symbol"?e+"":e,t),t);class zq{constructor(e){Ve(this,"context"),Ve(this,"isEditing",!1),Ve(this,"currentDrawing",null),Ve(this,"editingPointIndex",null),Ve(this,"zr"),Ve(this,"editGroup",null),Ve(this,"editLine",null),Ve(this,"editStartPoint",null),Ve(this,"editEndPoint",null),Ve(this,"isMovingShape",!1),Ve(this,"dragStart",null),Ve(this,"initialPixelPoints",[]),Ve(this,"onDrawingMouseDown",t=>{if(this.isEditing)return;const a=this.context.getDrawing(t.id);a&&(this.isEditing=!0,this.isMovingShape=!0,this.currentDrawing=JSON.parse(JSON.stringify(a)),this.dragStart={x:t.x,y:t.y},this.initialPixelPoints=a.points.map(i=>{const n=this.context.coordinateConversion.dataToPixel(i);return n?{x:n.x,y:n.y}:{x:0,y:0}}),this.context.lockChart(),this.createEditGraphic(),this.zr.on("mousemove",this.onMouseMove),this.zr.on("mouseup",this.onMouseUp))}),Ve(this,"onPointMouseDown",t=>{if(this.isEditing)return;const a=this.context.getDrawing(t.id);a&&(this.isEditing=!0,this.currentDrawing=JSON.parse(JSON.stringify(a)),this.editingPointIndex=t.pointIndex,this.context.lockChart(),this.createEditGraphic(),this.zr.on("mousemove",this.onMouseMove),this.zr.on("mouseup",this.onMouseUp))}),Ve(this,"onMouseMove",t=>{if(!this.isEditing||!this.currentDrawing)return;const a=t.offsetX,i=t.offsetY;if(this.isMovingShape&&this.dragStart){const n=a-this.dragStart.x,o=i-this.dragStart.y,s={x:this.initialPixelPoints[0].x+n,y:this.initialPixelPoints[0].y+o},l={x:this.initialPixelPoints[1].x+n,y:this.initialPixelPoints[1].y+o};this.editLine.setShape({x1:s.x,y1:s.y,x2:l.x,y2:l.y}),this.editStartPoint.setShape({cx:s.x,cy:s.y}),this.editEndPoint.setShape({cx:l.x,cy:l.y})}else this.editingPointIndex!==null&&(this.editingPointIndex===0?(this.editLine.setShape({x1:a,y1:i}),this.editStartPoint.setShape({cx:a,cy:i})):(this.editLine.setShape({x2:a,y2:i}),this.editEndPoint.setShape({cx:a,cy:i})))}),Ve(this,"onMouseUp",t=>{this.isEditing&&this.finishEditing(t.offsetX,t.offsetY)}),this.context=e,this.zr=this.context.getChart().getZr(),this.bindEvents()}bindEvents(){this.context.events.on("drawing:point:mousedown",this.onPointMouseDown),this.context.events.on("drawing:mousedown",this.onDrawingMouseDown)}createEditGraphic(){if(!this.currentDrawing)return;this.editGroup=new et;const e=this.currentDrawing.points[0],t=this.currentDrawing.points[1],a=this.context.coordinateConversion.dataToPixel(e),i=this.context.coordinateConversion.dataToPixel(t);!a||!i||(this.editLine=new Kt({shape:{x1:a.x,y1:a.y,x2:i.x,y2:i.y},style:{stroke:this.currentDrawing.style?.color||"#3b82f6",lineWidth:this.currentDrawing.style?.lineWidth||2,lineDash:[4,4]},silent:!0}),this.editStartPoint=new Sr({shape:{cx:a.x,cy:a.y,r:5},style:{fill:"#fff",stroke:"#3b82f6",lineWidth:2},z:1e3}),this.editEndPoint=new Sr({shape:{cx:i.x,cy:i.y,r:5},style:{fill:"#fff",stroke:"#3b82f6",lineWidth:2},z:1e3}),this.editGroup.add(this.editLine),this.editGroup.add(this.editStartPoint),this.editGroup.add(this.editEndPoint),this.zr.add(this.editGroup))}finishEditing(e,t){if(this.currentDrawing){if(this.isMovingShape&&this.dragStart){const a=e-this.dragStart.x,i=t-this.dragStart.y,n=this.initialPixelPoints.map((o,s)=>{const l=o.x+a,u=o.y+i;return this.context.coordinateConversion.pixelToData({x:l,y:u})});n.every(o=>o!==null)&&n[0]&&n[1]&&(this.currentDrawing.points[0]=n[0],this.currentDrawing.points[1]=n[1],n[0].paneIndex!==void 0&&(this.currentDrawing.paneIndex=n[0].paneIndex),this.context.updateDrawing(this.currentDrawing))}else if(this.editingPointIndex!==null){const a=this.context.coordinateConversion.pixelToData({x:e,y:t});a&&(this.currentDrawing.points[this.editingPointIndex]=a,this.editingPointIndex===0&&a.paneIndex!==void 0&&(this.currentDrawing.paneIndex=a.paneIndex),this.context.updateDrawing(this.currentDrawing))}this.isEditing=!1,this.isMovingShape=!1,this.dragStart=null,this.initialPixelPoints=[],this.currentDrawing=null,this.editingPointIndex=null,this.editGroup&&(this.zr.remove(this.editGroup),this.editGroup=null),this.zr.off("mousemove",this.onMouseMove),this.zr.off("mouseup",this.onMouseUp),this.context.unlockChart()}}}var Vq=Object.defineProperty,Gq=(r,e,t)=>e in r?Vq(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Fq=(r,e,t)=>(Gq(r,typeof e!="symbol"?e+"":e,t),t);class Hq{constructor(){Fq(this,"handlers",new Map)}on(e,t){this.handlers.has(e)||this.handlers.set(e,new Set),this.handlers.get(e).add(t)}off(e,t){const a=this.handlers.get(e);a&&a.delete(t)}emit(e,t){const a=this.handlers.get(e);a&&a.forEach(i=>{try{i(t)}catch(n){console.error(`Error in EventBus handler for ${e}:`,n)}})}clear(){this.handlers.clear()}}var Wq=Object.defineProperty,Uq=(r,e,t)=>e in r?Wq(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,$t=(r,e,t)=>(Uq(r,typeof e!="symbol"?e+"":e,t),t);class Yq{constructor(e,t={}){$t(this,"chart"),$t(this,"options"),$t(this,"marketData",[]),$t(this,"indicators",new Map),$t(this,"timeToIndex",new Map),$t(this,"pluginManager"),$t(this,"drawingEditor"),$t(this,"events",new Hq),$t(this,"isMainCollapsed",!1),$t(this,"maximizedPaneId",null),$t(this,"selectedDrawingId",null),$t(this,"drawings",[]),$t(this,"coordinateConversion",{pixelToData:n=>{const o=this.chart.getOption();if(!o||!o.grid)return null;const s=o.grid.length;for(let l=0;l<s;l++)if(this.chart.containPixel({gridIndex:l},[n.x,n.y])){this.chart.convertFromPixel({seriesIndex:l},[n.x,n.y]);const u=this.chart.convertFromPixel({gridIndex:l},[n.x,n.y]);if(u)return{timeIndex:Math.round(u[0]),value:u[1],paneIndex:l}}return null},dataToPixel:n=>{const o=n.paneIndex||0,s=this.chart.convertToPixel({gridIndex:o},[n.timeIndex,n.value]);return s?{x:s[0],y:s[1]}:null}}),$t(this,"upColor","#00da3c"),$t(this,"downColor","#ec0000"),$t(this,"defaultPadding",0),$t(this,"padding"),$t(this,"dataIndexOffset",0),$t(this,"rootContainer"),$t(this,"layoutContainer"),$t(this,"toolbarContainer"),$t(this,"leftSidebar"),$t(this,"rightSidebar"),$t(this,"chartContainer"),$t(this,"onKeyDown",n=>{(n.key==="Delete"||n.key==="Backspace")&&this.selectedDrawingId&&(this.removeDrawing(this.selectedDrawingId),this.selectedDrawingId=null,this.render())}),$t(this,"onFullscreenChange",()=>{this.render()}),$t(this,"isLocked",!1),$t(this,"lockedState",null),this.rootContainer=e,this.options={title:"Market",height:"600px",backgroundColor:"#1e293b",upColor:"#00da3c",downColor:"#ec0000",fontColor:"#cbd5e1",fontFamily:"sans-serif",padding:.01,dataZoom:{visible:!0,position:"top",height:6},layout:{mainPaneHeight:"50%",gap:13},watermark:!0,...t},this.options.upColor&&(this.upColor=this.options.upColor),this.options.downColor&&(this.downColor=this.options.downColor),this.padding=this.options.padding!==void 0?this.options.padding:this.defaultPadding,this.options.height&&(typeof this.options.height=="number"?this.rootContainer.style.height=`${this.options.height}px`:this.rootContainer.style.height=this.options.height),this.rootContainer.innerHTML="",this.layoutContainer=document.createElement("div"),this.layoutContainer.style.display="flex",this.layoutContainer.style.width="100%",this.layoutContainer.style.height="100%",this.layoutContainer.style.overflow="hidden",this.rootContainer.appendChild(this.layoutContainer),this.leftSidebar=document.createElement("div"),this.leftSidebar.style.display="none",this.leftSidebar.style.width="250px",this.leftSidebar.style.flexShrink="0",this.leftSidebar.style.overflowY="auto",this.leftSidebar.style.backgroundColor=this.options.backgroundColor||"#1e293b",this.leftSidebar.style.borderRight="1px solid #334155",this.leftSidebar.style.padding="10px",this.leftSidebar.style.boxSizing="border-box",this.leftSidebar.style.color="#cbd5e1",this.leftSidebar.style.fontSize="12px",this.leftSidebar.style.fontFamily=this.options.fontFamily||"sans-serif",this.layoutContainer.appendChild(this.leftSidebar),this.toolbarContainer=document.createElement("div"),this.layoutContainer.appendChild(this.toolbarContainer),this.chartContainer=document.createElement("div"),this.chartContainer.style.flexGrow="1",this.chartContainer.style.height="100%",this.chartContainer.style.overflow="hidden",this.layoutContainer.appendChild(this.chartContainer),this.rightSidebar=document.createElement("div"),this.rightSidebar.style.display="none",this.rightSidebar.style.width="250px",this.rightSidebar.style.flexShrink="0",this.rightSidebar.style.overflowY="auto",this.rightSidebar.style.backgroundColor=this.options.backgroundColor||"#1e293b",this.rightSidebar.style.borderLeft="1px solid #334155",this.rightSidebar.style.padding="10px",this.rightSidebar.style.boxSizing="border-box",this.rightSidebar.style.color="#cbd5e1",this.rightSidebar.style.fontSize="12px",this.rightSidebar.style.fontFamily=this.options.fontFamily||"sans-serif",this.layoutContainer.appendChild(this.rightSidebar),this.chart=$5(this.chartContainer),this.pluginManager=new Oq(this,this.toolbarContainer),this.drawingEditor=new zq(this),this.chart.on("dataZoom",n=>this.events.emit("chart:dataZoom",n)),this.chart.on("finished",n=>this.events.emit("chart:updated",n)),this.chart.getZr().on("mousedown",n=>this.events.emit("mouse:down",n)),this.chart.getZr().on("mousemove",n=>this.events.emit("mouse:move",n)),this.chart.getZr().on("mouseup",n=>this.events.emit("mouse:up",n)),this.chart.getZr().on("click",n=>this.events.emit("mouse:click",n));const a=this.chart.getZr(),i=a.setCursorStyle;a.setCursorStyle=function(n){n==="grab"&&(n="crosshair"),i.call(this,n)},this.bindDrawingEvents(),window.addEventListener("resize",this.resize.bind(this)),document.addEventListener("fullscreenchange",this.onFullscreenChange),document.addEventListener("keydown",this.onKeyDown)}bindDrawingEvents(){let e=null;const t=a=>{if(!a||a.componentType!=="series"||!a.seriesName?.startsWith("drawings"))return null;a.seriesIndex;const i=a.seriesName.match(/drawings-pane-(\d+)/);if(!i)return null;const n=parseInt(i[1]),o=this.drawings.filter(l=>(l.paneIndex||0)===n)[a.dataIndex];if(!o)return null;const s=a.event?.target?.name;return{drawing:o,targetName:s,paneIdx:n}};this.chart.on("mouseover",a=>{const i=t(a);if(!i)return;const n=a.event?.target?.parent;if(n){const o=i.drawing.id===this.selectedDrawingId;e&&(clearTimeout(e),e=null),o||n.children().forEach(s=>{s.name&&s.name.startsWith("point")&&s.attr("style",{opacity:1})})}if(i.targetName==="line")this.events.emit("drawing:hover",{id:i.drawing.id,type:i.drawing.type}),this.chart.getZr().setCursorStyle("move");else if(i.targetName?.startsWith("point")){const o=i.targetName==="point-start"?0:1;this.events.emit("drawing:point:hover",{id:i.drawing.id,pointIndex:o}),this.chart.getZr().setCursorStyle("pointer")}}),this.chart.on("mouseout",a=>{const i=t(a);if(!i)return;const n=a.event?.target?.parent;if(i.drawing.id!==this.selectedDrawingId){if(e=setTimeout(()=>{if(n){if(this.selectedDrawingId===i.drawing.id)return;n.children().forEach(o=>{o.name&&o.name.startsWith("point")&&o.attr("style",{opacity:0})})}},50),i.targetName==="line")this.events.emit("drawing:mouseout",{id:i.drawing.id});else if(i.targetName?.startsWith("point")){const o=i.targetName==="point-start"?0:1;this.events.emit("drawing:point:mouseout",{id:i.drawing.id,pointIndex:o})}this.chart.getZr().setCursorStyle("default")}}),this.chart.on("mousedown",a=>{const i=t(a);if(!i)return;const n=a.event?.event||a.event,o=n?.offsetX,s=n?.offsetY;if(i.targetName==="line")this.events.emit("drawing:mousedown",{id:i.drawing.id,x:o,y:s});else if(i.targetName?.startsWith("point")){const l=i.targetName==="point-start"?0:1;this.events.emit("drawing:point:mousedown",{id:i.drawing.id,pointIndex:l,x:o,y:s})}}),this.chart.on("click",a=>{const i=t(a);if(i){if(this.selectedDrawingId!==i.drawing.id&&(this.selectedDrawingId=i.drawing.id,this.events.emit("drawing:selected",{id:i.drawing.id}),this.render()),i.targetName==="line")this.events.emit("drawing:click",{id:i.drawing.id});else if(i.targetName?.startsWith("point")){const n=i.targetName==="point-start"?0:1;this.events.emit("drawing:point:click",{id:i.drawing.id,pointIndex:n})}}}),this.chart.getZr().on("click",a=>{a.target||this.selectedDrawingId&&(this.events.emit("drawing:deselected",{id:this.selectedDrawingId}),this.selectedDrawingId=null,this.render())})}getChart(){return this.chart}getMarketData(){return this.marketData}getTimeToIndex(){return this.timeToIndex}getOptions(){return this.options}disableTools(){this.pluginManager.deactivatePlugin()}registerPlugin(e){this.pluginManager.register(e)}addDrawing(e){this.drawings.push(e),this.render()}removeDrawing(e){const t=this.drawings.findIndex(a=>a.id===e);if(t!==-1){const a=this.drawings[t];this.drawings.splice(t,1),this.events.emit("drawing:deleted",{id:a.id}),this.render()}}getDrawing(e){return this.drawings.find(t=>t.id===e)}updateDrawing(e){const t=this.drawings.findIndex(a=>a.id===e.id);t!==-1&&(this.drawings[t]=e,this.render())}lockChart(){if(this.isLocked)return;this.isLocked=!0;const e=this.chart.getOption();this.chart.setOption({dataZoom:e.dataZoom.map(t=>({...t,disabled:!0})),tooltip:{show:!1}})}unlockChart(){if(!this.isLocked)return;this.isLocked=!1;const e=this.chart.getOption();(this.options.dataZoom||{}).visible,e.dataZoom&&this.chart.setOption({dataZoom:e.dataZoom.map(t=>({...t,disabled:!1})),tooltip:{show:!0}})}setZoom(e,t){this.chart.dispatchAction({type:"dataZoom",start:e,end:t})}setMarketData(e){this.marketData=e,this.rebuildTimeIndex(),this.render()}updateData(e){if(e.length===0)return;const t=new Map;this.marketData.forEach(v=>{t.set(v.time,v)}),e.forEach(v=>{t.has(v.time),t.set(v.time,v)}),this.marketData=Array.from(t.values()).sort((v,c)=>v.time-c.time),this.rebuildTimeIndex();const a=this.dataIndexOffset,i=this.marketData.map(v=>[v.open,v.close,v.low,v.high]),n={value:[NaN,NaN,NaN,NaN],itemStyle:{opacity:0}},o=[...Array(a).fill(n),...i,...Array(a).fill(n)],s=[...Array(a).fill(""),...this.marketData.map(v=>new Date(v.time).toLocaleString()),...Array(a).fill("")],l=this.chart.getOption(),u=Dk.calculate(this.chart.getHeight(),this.indicators,this.options,this.isMainCollapsed,this.maximizedPaneId),h=g_.buildIndicatorSeries(this.indicators,this.timeToIndex,u.paneLayout,s.length,a),f={xAxis:l.xAxis.map((v,c)=>({data:s})),series:[{data:o},...h.map(v=>({data:v.data}))]};this.chart.setOption(f,{notMerge:!1})}addIndicator(e,t,a={isOverlay:!1}){const i=a.isOverlay??!1;let n=0;if(!i){let s=0;this.indicators.forEach(l=>{l.paneIndex>s&&(s=l.paneIndex)}),n=s+1}const o=new Lq(e,t,n,{height:a.height,collapsed:!1,titleColor:a.titleColor,controls:a.controls});return this.indicators.set(e,o),this.render(),o}setIndicator(e,t,a=!1){this.addIndicator(e,{[e]:t},{isOverlay:a})}removeIndicator(e){this.indicators.delete(e),this.render()}toggleIndicator(e,t="collapse"){if(t==="fullscreen"){document.fullscreenElement?document.exitFullscreen():this.rootContainer.requestFullscreen();return}if(t==="maximize"){this.maximizedPaneId===e?this.maximizedPaneId=null:this.maximizedPaneId=e,this.render();return}if(e==="main"){this.isMainCollapsed=!this.isMainCollapsed,this.render();return}const a=this.indicators.get(e);a&&(a.toggleCollapse(),this.render())}resize(){this.chart.resize()}destroy(){window.removeEventListener("resize",this.resize.bind(this)),document.removeEventListener("fullscreenchange",this.onFullscreenChange),document.removeEventListener("keydown",this.onKeyDown),this.pluginManager.deactivatePlugin(),this.pluginManager.destroy(),this.chart.dispose()}rebuildTimeIndex(){this.timeToIndex.clear(),this.marketData.forEach((a,i)=>{this.timeToIndex.set(a.time,i)});const e=this.marketData.length,t=Math.ceil(e*this.padding);this.dataIndexOffset=t}render(){if(this.marketData.length===0)return;let e=null;try{const m=this.chart.getOption();if(m&&m.dataZoom&&m.dataZoom.length>0){const _=m.dataZoom.find(x=>x.type==="slider"||x.type==="inside");_&&(e={start:_.start,end:_.end})}}catch{}const t=this.options.databox?.position,a=this.leftSidebar.style.display,i=this.rightSidebar.style.display,n=t==="left"?"block":"none",o=t==="right"?"block":"none";(a!==n||i!==o)&&(this.leftSidebar.style.display=n,this.rightSidebar.style.display=o,this.chart.resize());const s=this.dataIndexOffset,l=[...Array(s).fill(""),...this.marketData.map(m=>new Date(m.time).toLocaleString()),...Array(s).fill("")],u=Dk.calculate(this.chart.getHeight(),this.indicators,this.options,this.isMainCollapsed,this.maximizedPaneId);e&&u.dataZoom&&u.dataZoom.forEach(m=>{m.start=e.start,m.end=e.end}),u.xAxis.forEach(m=>{m.data=l,m.boundaryGap=!1});const h=g_.buildCandlestickSeries(this.marketData,this.options),f={value:[NaN,NaN,NaN,NaN],itemStyle:{opacity:0}};h.data=[...Array(s).fill(f),...h.data,...Array(s).fill(f)];const v=g_.buildIndicatorSeries(this.indicators,this.timeToIndex,u.paneLayout,l.length,s),c=Pq.build(u,this.options,this.toggleIndicator.bind(this),this.isMainCollapsed,this.maximizedPaneId),d=new Map;this.drawings.forEach(m=>{const _=m.paneIndex||0;d.has(_)||d.set(_,[]),d.get(_).push(m)});const p=[];d.forEach((m,_)=>{p.push({type:"custom",name:`drawings-pane-${_}`,xAxisIndex:_,yAxisIndex:_,clip:!0,renderItem:(x,b)=>{const S=m[x.dataIndex];if(!S)return;const w=S.points[0],T=S.points[1];if(!w||!T)return;const C=b.coord([w.timeIndex,w.value]),A=b.coord([T.timeIndex,T.value]),D=S.id===this.selectedDrawingId;if(S.type==="line")return{type:"group",children:[{type:"line",name:"line",shape:{x1:C[0],y1:C[1],x2:A[0],y2:A[1]},style:{stroke:S.style?.color||"#3b82f6",lineWidth:S.style?.lineWidth||2}},{type:"circle",name:"point-start",shape:{cx:C[0],cy:C[1],r:4},style:{fill:"#fff",stroke:S.style?.color||"#3b82f6",lineWidth:1,opacity:D?1:0}},{type:"circle",name:"point-end",shape:{cx:A[0],cy:A[1],r:4},style:{fill:"#fff",stroke:S.style?.color||"#3b82f6",lineWidth:1,opacity:D?1:0}}]};if(S.type==="fibonacci"){const I=C[0],L=C[1],P=A[0],k=A[1],R=Math.min(I,P),O=Math.max(I,P),E=O-R,N=k-L,V=[0,.236,.382,.5,.618,.786,1],G=["#787b86","#f44336","#ff9800","#4caf50","#2196f3","#00bcd4","#787b86"],H=[];H.push({type:"line",name:"line",shape:{x1:I,y1:L,x2:P,y2:k},style:{stroke:"#999",lineWidth:1,lineDash:[4,4]}}),H.push({type:"circle",name:"point-start",shape:{cx:I,cy:L,r:4},style:{fill:"#fff",stroke:S.style?.color||"#3b82f6",lineWidth:1,opacity:D?1:0},z:100}),H.push({type:"circle",name:"point-end",shape:{cx:P,cy:k,r:4},style:{fill:"#fff",stroke:S.style?.color||"#3b82f6",lineWidth:1,opacity:D?1:0},z:100}),V.forEach((it,xt)=>{const At=k-N*it,ut=G[xt%G.length];H.push({type:"line",name:"fib-line",shape:{x1:R,y1:At,x2:O,y2:At},style:{stroke:ut,lineWidth:1},silent:!0});const tt=S.points[0].value,ct=S.points[1].value,j=ct-tt,ft=ct-j*it;if(H.push({type:"text",style:{text:`${it} (${ft.toFixed(2)})`,x:R+5,y:At-10,fill:ut,fontSize:10},silent:!0}),xt<V.length-1){const Nt=V[xt+1],wt=k-N*Nt,kt=Math.abs(wt-At),Bt=Math.min(At,wt);H.push({type:"rect",shape:{x:R,y:Bt,width:E,height:kt},style:{fill:G[(xt+1)%G.length],opacity:.1},silent:!0})}});const Y=[],q=[];return V.forEach((it,xt)=>{const At=k-N*it,ut=G[xt%G.length];q.push({type:"line",shape:{x1:R,y1:At,x2:O,y2:At},style:{stroke:ut,lineWidth:1},silent:!0});const tt=S.points[0].value,ct=S.points[1].value,j=ct-tt,ft=ct-j*it;if(q.push({type:"text",style:{text:`${it} (${ft.toFixed(2)})`,x:R+5,y:At-10,fill:ut,fontSize:10},silent:!0}),xt<V.length-1){const Nt=V[xt+1],wt=k-N*Nt,kt=Math.abs(wt-At),Bt=Math.min(At,wt);Y.push({type:"rect",name:"line",shape:{x:R,y:Bt,width:E,height:kt},style:{fill:G[(xt+1)%G.length],opacity:.1}})}}),{type:"group",children:[...Y,...q,{type:"line",name:"line",shape:{x1:I,y1:L,x2:P,y2:k},style:{stroke:"#999",lineWidth:1,lineDash:[4,4]}},{type:"circle",name:"point-start",shape:{cx:I,cy:L,r:4},style:{fill:"#fff",stroke:S.style?.color||"#3b82f6",lineWidth:1,opacity:D?1:0},z:100},{type:"circle",name:"point-end",shape:{cx:P,cy:k,r:4},style:{fill:"#fff",stroke:S.style?.color||"#3b82f6",lineWidth:1,opacity:D?1:0},z:100}]}}},data:m.map(x=>[x.points[0].timeIndex,x.points[0].value,x.points[1].timeIndex,x.points[1].value]),z:100,silent:!1})});const g=m=>{const _=kq.format(m,this.options),x=this.options.databox?.position;return x==="left"?(this.leftSidebar.innerHTML=_,""):x==="right"?(this.rightSidebar.innerHTML=_,""):this.options.databox?`<div style="min-width: 200px;">${_}</div>`:""},y={backgroundColor:this.options.backgroundColor,animation:!1,legend:{show:!1},tooltip:{show:!0,showContent:!!this.options.databox,trigger:"axis",axisPointer:{type:"cross",label:{backgroundColor:"#475569"}},backgroundColor:"rgba(30, 41, 59, 0.9)",borderWidth:1,borderColor:"#334155",padding:10,textStyle:{color:"#fff",fontFamily:this.options.fontFamily||"sans-serif"},formatter:g,extraCssText:t!=="floating"&&t!==void 0?"display: none !important;":void 0,position:(m,_,x,b,S)=>{if(this.options.databox?.position==="floating"){const w={top:10};return w[["left","right"][+(m[0]<S.viewSize[0]/2)]]=30,w}return null}},axisPointer:{link:{xAxisIndex:"all"},label:{backgroundColor:"#475569"}},graphic:c,grid:u.grid,xAxis:u.xAxis,yAxis:u.yAxis,dataZoom:u.dataZoom,series:[h,...v,...p]};this.chart.setOption(y,!0)}}var Zq=Object.defineProperty,$q=(r,e,t)=>e in r?Zq(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Du=(r,e,t)=>($q(r,typeof e!="symbol"?e+"":e,t),t);class ic{constructor(e){Du(this,"id"),Du(this,"name"),Du(this,"icon"),Du(this,"context"),Du(this,"eventListeners",[]),this.id=e.id,this.name=e.name,this.icon=e.icon}init(e){this.context=e,this.onInit()}onInit(){}activate(){this.onActivate(),this.context.events.emit("plugin:activated",this.id)}onActivate(){}deactivate(){this.onDeactivate(),this.context.events.emit("plugin:deactivated",this.id)}onDeactivate(){}destroy(){this.removeAllListeners(),this.onDestroy()}onDestroy(){}on(e,t){this.context.events.on(e,t),this.eventListeners.push({event:e,handler:t})}off(e,t){this.context.events.off(e,t),this.eventListeners=this.eventListeners.filter(a=>a.event!==e||a.handler!==t)}removeAllListeners(){this.eventListeners.forEach(({event:e,handler:t})=>{this.context.events.off(e,t)}),this.eventListeners=[]}get chart(){return this.context.getChart()}get marketData(){return this.context.getMarketData()}}var Xq=Object.defineProperty,qq=(r,e,t)=>e in r?Xq(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Pe=(r,e,t)=>(qq(r,typeof e!="symbol"?e+"":e,t),t);class Kq extends ic{constructor(e){super({id:"measure",name:e?.name||"Measure",icon:e?.icon||'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#e3e3e3"><path d="M160-240q-33 0-56.5-23.5T80-320v-320q0-33 23.5-56.5T160-720h640q33 0 56.5 23.5T880-640v320q0 33-23.5 56.5T800-240H160Zm0-80h640v-320H680v160h-80v-160h-80v160h-80v-160h-80v160h-80v-160H160v320Zm120-160h80-80Zm160 0h80-80Zm160 0h80-80Zm-120 0Z"/></svg>'}),Pe(this,"zr"),Pe(this,"state","idle"),Pe(this,"startPoint",null),Pe(this,"endPoint",null),Pe(this,"group",null),Pe(this,"rect",null),Pe(this,"labelRect",null),Pe(this,"labelText",null),Pe(this,"lineV",null),Pe(this,"lineH",null),Pe(this,"arrowStart",null),Pe(this,"arrowEnd",null),Pe(this,"onMouseDown",()=>{this.state==="finished"&&this.removeGraphic()}),Pe(this,"onChartInteraction",()=>{this.group&&this.removeGraphic()}),Pe(this,"onClick",t=>{this.state==="idle"?(this.state="drawing",this.startPoint=[t.offsetX,t.offsetY],this.endPoint=[t.offsetX,t.offsetY],this.initGraphic(),this.updateGraphic()):this.state==="drawing"&&(this.state="finished",this.endPoint=[t.offsetX,t.offsetY],this.updateGraphic(),this.context.disableTools(),this.enableClearListeners())}),Pe(this,"clearHandlers",{}),Pe(this,"onMouseMove",t=>{this.state==="drawing"&&(this.endPoint=[t.offsetX,t.offsetY],this.updateGraphic())})}onInit(){this.zr=this.chart.getZr()}onActivate(){this.state="idle",this.chart.getZr().setCursorStyle("crosshair"),this.zr.on("click",this.onClick),this.zr.on("mousemove",this.onMouseMove)}onDeactivate(){this.state="idle",this.chart.getZr().setCursorStyle("default"),this.zr.off("click",this.onClick),this.zr.off("mousemove",this.onMouseMove),this.disableClearListeners(),this.state==="drawing"&&this.removeGraphic()}onDestroy(){this.removeGraphic()}enableClearListeners(){const e=()=>{this.removeGraphic()};setTimeout(()=>{this.zr.on("click",e)},10),this.zr.on("mousedown",this.onMouseDown),this.context.events.on("chart:dataZoom",this.onChartInteraction),this.clearHandlers={click:e,mousedown:this.onMouseDown,dataZoom:this.onChartInteraction}}disableClearListeners(){this.clearHandlers.click&&this.zr.off("click",this.clearHandlers.click),this.clearHandlers.mousedown&&this.zr.off("mousedown",this.clearHandlers.mousedown),this.clearHandlers.dataZoom&&this.context.events.off("chart:dataZoom",this.clearHandlers.dataZoom),this.clearHandlers={}}initGraphic(){this.group||(this.group=new et,this.rect=new _t({shape:{x:0,y:0,width:0,height:0},style:{fill:"rgba(0,0,0,0)",stroke:"transparent",lineWidth:0},z:100}),this.lineV=new Kt({shape:{x1:0,y1:0,x2:0,y2:0},style:{stroke:"#fff",lineWidth:1,lineDash:[4,4]},z:101}),this.lineH=new Kt({shape:{x1:0,y1:0,x2:0,y2:0},style:{stroke:"#fff",lineWidth:1,lineDash:[4,4]},z:101}),this.arrowStart=new De({shape:{points:[[0,0],[-5,10],[5,10]]},style:{fill:"#fff"},z:102}),this.arrowEnd=new De({shape:{points:[[0,0],[-5,-10],[5,-10]]},style:{fill:"#fff"},z:102}),this.labelRect=new _t({shape:{x:0,y:0,width:0,height:0,r:4},style:{fill:"transparent",stroke:"transparent",lineWidth:0,shadowBlur:5,shadowColor:"rgba(0,0,0,0.3)"},z:102}),this.labelText=new Lt({style:{x:0,y:0,text:"",fill:"#fff",font:"12px sans-serif",align:"center",verticalAlign:"middle"},z:103}),this.group.add(this.rect),this.group.add(this.lineV),this.group.add(this.lineH),this.group.add(this.arrowStart),this.group.add(this.arrowEnd),this.group.add(this.labelRect),this.group.add(this.labelText),this.zr.add(this.group))}removeGraphic(){this.group&&(this.zr.remove(this.group),this.group=null,this.disableClearListeners())}updateGraphic(){if(!this.startPoint||!this.endPoint||!this.group)return;const[e,t]=this.startPoint,[a,i]=this.endPoint,n=this.context.coordinateConversion.pixelToData({x:e,y:t}),o=this.context.coordinateConversion.pixelToData({x:a,y:i});if(!n||!o)return;const s=Math.round(n.timeIndex),l=Math.round(o.timeIndex),u=n.value,h=o.value,f=l-s,v=h-u,c=v/u*100,d=v>=0,p=d?"rgba(33, 150, 243, 0.2)":"rgba(236, 0, 0, 0.2)",g=d?"#2196F3":"#ec0000";this.rect.setShape({x:Math.min(e,a),y:Math.min(t,i),width:Math.abs(a-e),height:Math.abs(i-t)}),this.rect.setStyle({fill:p});const y=(e+a)/2,m=(t+i)/2;this.lineV.setShape({x1:y,y1:t,x2:y,y2:i}),this.lineV.setStyle({stroke:g}),this.lineH.setShape({x1:e,y1:m,x2:a,y2:m}),this.lineH.setStyle({stroke:g});const _=Math.min(t,i),x=Math.max(t,i);this.arrowStart.setStyle({fill:"none"}),this.arrowEnd.setStyle({fill:"none"}),d?(this.arrowStart.setShape({points:[[y,_],[y-4,_+6],[y+4,_+6]]}),this.arrowStart.setStyle({fill:g})):(this.arrowEnd.setShape({points:[[y,x],[y-4,x-6],[y+4,x-6]]}),this.arrowEnd.setStyle({fill:g}));const b=[`${v.toFixed(2)} (${c.toFixed(2)}%)`,`${f} bars, ${(f*0).toFixed(0)}d`].join(`
109
+ `),S=140,w=40,T=Math.max(t,i),C=Math.min(t,i);let A=(e+a)/2-S/2,D=T+10;const I=this.chart.getHeight();D+w>I&&(D=C-w-10),this.labelRect.setShape({x:A,y:D,width:S,height:w}),this.labelRect.setStyle({fill:"#1e293b",stroke:g,lineWidth:1}),this.labelText.setStyle({x:A+S/2,y:D+w/2,text:b,fill:"#fff"})}}var jq=Object.defineProperty,Jq=(r,e,t)=>e in r?jq(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,fr=(r,e,t)=>(Jq(r,typeof e!="symbol"?e+"":e,t),t);class Qq extends ic{constructor(e){super({id:"trend-line",name:e?.name||"Trend Line",icon:e?.icon||'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="2" y1="22" x2="22" y2="2" /></svg>'}),fr(this,"zr"),fr(this,"state","idle"),fr(this,"startPoint",null),fr(this,"endPoint",null),fr(this,"group",null),fr(this,"line",null),fr(this,"startCircle",null),fr(this,"endCircle",null),fr(this,"onMouseDown",()=>{}),fr(this,"onChartInteraction",()=>{}),fr(this,"onClick",t=>{if(this.state==="idle")this.state="drawing",this.startPoint=[t.offsetX,t.offsetY],this.endPoint=[t.offsetX,t.offsetY],this.initGraphic(),this.updateGraphic();else if(this.state==="drawing"){if(this.state="finished",this.endPoint=[t.offsetX,t.offsetY],this.updateGraphic(),this.startPoint&&this.endPoint){const a=this.context.coordinateConversion.pixelToData({x:this.startPoint[0],y:this.startPoint[1]}),i=this.context.coordinateConversion.pixelToData({x:this.endPoint[0],y:this.endPoint[1]});if(a&&i){const n=a.paneIndex||0;this.context.addDrawing({id:`line-${Date.now()}`,type:"line",points:[a,i],paneIndex:n,style:{color:"#3b82f6",lineWidth:2}})}}this.removeGraphic(),this.context.disableTools()}}),fr(this,"clearHandlers",{}),fr(this,"onMouseMove",t=>{this.state==="drawing"&&(this.endPoint=[t.offsetX,t.offsetY],this.updateGraphic())})}onInit(){this.zr=this.chart.getZr()}onActivate(){this.state="idle",this.chart.getZr().setCursorStyle("crosshair"),this.zr.on("click",this.onClick),this.zr.on("mousemove",this.onMouseMove)}onDeactivate(){this.state="idle",this.chart.getZr().setCursorStyle("default"),this.zr.off("click",this.onClick),this.zr.off("mousemove",this.onMouseMove),this.disableClearListeners(),this.state==="drawing"&&this.removeGraphic()}onDestroy(){this.removeGraphic()}saveDataCoordinates(){}updateGraphicFromData(){}enableClearListeners(){}disableClearListeners(){}initGraphic(){this.group||(this.group=new et,this.line=new Kt({shape:{x1:0,y1:0,x2:0,y2:0},style:{stroke:"#3b82f6",lineWidth:2},z:100}),this.startCircle=new Sr({shape:{cx:0,cy:0,r:4},style:{fill:"#fff",stroke:"#3b82f6",lineWidth:1},z:101}),this.endCircle=new Sr({shape:{cx:0,cy:0,r:4},style:{fill:"#fff",stroke:"#3b82f6",lineWidth:1},z:101}),this.group.add(this.line),this.group.add(this.startCircle),this.group.add(this.endCircle),this.zr.add(this.group))}removeGraphic(){this.group&&(this.zr.remove(this.group),this.group=null,this.disableClearListeners())}updateGraphic(){if(!this.startPoint||!this.endPoint||!this.group)return;const[e,t]=this.startPoint,[a,i]=this.endPoint;this.line.setShape({x1:e,y1:t,x2:a,y2:i}),this.startCircle.setShape({cx:e,cy:t}),this.endCircle.setShape({cx:a,cy:i})}}var tK=Object.defineProperty,eK=(r,e,t)=>e in r?tK(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Vi=(r,e,t)=>(eK(r,typeof e!="symbol"?e+"":e,t),t);class rK extends ic{constructor(e={}){super({id:"fibonacci-tool",name:e.name||"Fibonacci Retracement",icon:e.icon||'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#e3e3e3"><path d="M120-80v-80h720v80H120Zm0-240v-80h720v80H120Zm0-240v-80h720v80H120Zm0-240v-80h720v80H120Z"/></svg>'}),Vi(this,"startPoint",null),Vi(this,"endPoint",null),Vi(this,"state","idle"),Vi(this,"graphicGroup",null),Vi(this,"levels",[0,.236,.382,.5,.618,.786,1]),Vi(this,"colors",["#787b86","#f44336","#ff9800","#4caf50","#2196f3","#00bcd4","#787b86"]),Vi(this,"onClick",t=>{this.state==="idle"?(this.state="drawing",this.startPoint=[t.offsetX,t.offsetY],this.endPoint=[t.offsetX,t.offsetY],this.initGraphic(),this.updateGraphic()):this.state==="drawing"&&(this.state="finished",this.endPoint=[t.offsetX,t.offsetY],this.updateGraphic(),this.saveDrawing(),this.removeGraphic(),this.context.disableTools())}),Vi(this,"onMouseMove",t=>{this.state==="drawing"&&(this.endPoint=[t.offsetX,t.offsetY],this.updateGraphic())})}onActivate(){this.state="idle",this.startPoint=null,this.endPoint=null,this.context.getChart().getZr().setCursorStyle("crosshair"),this.bindEvents()}onDeactivate(){this.state="idle",this.startPoint=null,this.endPoint=null,this.removeGraphic(),this.unbindEvents(),this.context.getChart().getZr().setCursorStyle("default")}bindEvents(){const e=this.context.getChart().getZr();e.on("click",this.onClick),e.on("mousemove",this.onMouseMove)}unbindEvents(){const e=this.context.getChart().getZr();e.off("click",this.onClick),e.off("mousemove",this.onMouseMove)}initGraphic(){this.graphicGroup=new et,this.context.getChart().getZr().add(this.graphicGroup)}removeGraphic(){this.graphicGroup&&(this.context.getChart().getZr().remove(this.graphicGroup),this.graphicGroup=null)}updateGraphic(){if(!this.graphicGroup||!this.startPoint||!this.endPoint)return;this.graphicGroup.removeAll();const e=this.startPoint[0],t=this.startPoint[1],a=this.endPoint[0],i=this.endPoint[1],n=new Kt({shape:{x1:e,y1:t,x2:a,y2:i},style:{stroke:"#999",lineWidth:1,lineDash:[4,4]},silent:!0});this.graphicGroup.add(n);const o=Math.min(e,a),s=Math.max(e,a),l=s-o,u=i-t;this.levels.forEach((h,f)=>{const v=i-u*h,c=this.colors[f%this.colors.length],d=new Kt({shape:{x1:o,y1:v,x2:s,y2:v},style:{stroke:c,lineWidth:1},silent:!0});if(this.graphicGroup.add(d),f<this.levels.length-1){const p=this.levels[f+1],g=i-u*p,y=Math.abs(g-v),m=Math.min(v,g),_=new _t({shape:{x:o,y:m,width:l,height:y},style:{fill:this.colors[(f+1)%this.colors.length],opacity:.1},silent:!0});this.graphicGroup.add(_)}})}saveDrawing(){if(!this.startPoint||!this.endPoint)return;const e=this.context.coordinateConversion.pixelToData({x:this.startPoint[0],y:this.startPoint[1]}),t=this.context.coordinateConversion.pixelToData({x:this.endPoint[0],y:this.endPoint[1]});if(e&&t){const a=e.paneIndex||0;this.context.addDrawing({id:`fib-${Date.now()}`,type:"fibonacci",points:[e,t],paneIndex:a,style:{color:"#3b82f6",lineWidth:1}})}}}Ca.AbstractPlugin=ic,Ca.FibonacciTool=rK,Ca.LineTool=Qq,Ca.MeasureTool=Kq,Ca.QFChart=Yq});