@wildo-ai/application-creation-workbench 1.1.5 → 1.1.7
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.
- package/bin/wildo-workbench-serve.mjs +0 -0
- package/dist/.vite/manifest.json +399 -392
- package/dist/assets/ChartEmptyState-BP_Yq5V7.js +1 -0
- package/dist/assets/ChartView-07Vh3EtV.js +56 -0
- package/dist/assets/{_basePickBy-Br6YuOAk.js → _basePickBy-C0TWefH3.js} +1 -1
- package/dist/assets/{_baseUniq-K10bxMjs.js → _baseUniq-aBjj_hOi.js} +1 -1
- package/dist/assets/{arc-hTvUi_Jd.js → arc-B7pBcXhk.js} +1 -1
- package/dist/assets/architectureDiagram-VXUJARFQ-CxaR1SOK.js +36 -0
- package/dist/assets/{blockDiagram-VD42YOAC-CMGydNsH.js → blockDiagram-VD42YOAC-FQ6rpl1q.js} +1 -1
- package/dist/assets/{c4Diagram-YG6GDRKO-CTiIMIz5.js → c4Diagram-YG6GDRKO-MBotlECZ.js} +1 -1
- package/dist/assets/channel-BihP_0tn.js +1 -0
- package/dist/assets/{chunk-4BX2VUAB-CBDMQNPS.js → chunk-4BX2VUAB-DH3JjsZf.js} +1 -1
- package/dist/assets/{chunk-55IACEB6-CEmaVN-l.js → chunk-55IACEB6-B-1eMtsJ.js} +1 -1
- package/dist/assets/{chunk-B4BG7PRW-BuRJMfnQ.js → chunk-B4BG7PRW-DjqjS8Nd.js} +1 -1
- package/dist/assets/{chunk-DI55MBZ5-DTEvZEyn.js → chunk-DI55MBZ5-CNDJpkHu.js} +1 -1
- package/dist/assets/{chunk-FMBD7UC4-CQL6IezS.js → chunk-FMBD7UC4-C_LJMr3H.js} +1 -1
- package/dist/assets/{chunk-QN33PNHL-DIt1i8tt.js → chunk-QN33PNHL-DOWhVFKY.js} +1 -1
- package/dist/assets/{chunk-QZHKN3VN-C8CdhpgW.js → chunk-QZHKN3VN-BqSJxIuw.js} +1 -1
- package/dist/assets/{chunk-TZMSLE5B-2nOqyQPZ.js → chunk-TZMSLE5B-CnGhg192.js} +1 -1
- package/dist/assets/classDiagram-2ON5EDUG-DmlHswhx.js +1 -0
- package/dist/assets/classDiagram-v2-WZHVMYZB-DmlHswhx.js +1 -0
- package/dist/assets/clone-H3FbKF9K.js +1 -0
- package/dist/assets/{cm6-editor-C1am2PUt.js → cm6-editor-DpZrV-bm.js} +3 -3
- package/dist/assets/code-block-IT6T5CEO-CJXyw75w.js +3 -0
- package/dist/assets/{context-CjDY9wk7.js → context-CYZBYFJH.js} +1 -1
- package/dist/assets/cose-bilkent-S5V4N54A-BV1r6KdQ.js +1 -0
- package/dist/assets/dagre-6UL2VRFP-xo5kvHqM.js +4 -0
- package/dist/assets/diagram-PSM6KHXK-yWnIouwj.js +24 -0
- package/dist/assets/diagram-QEK2KX5R-7PaiBPsn.js +43 -0
- package/dist/assets/diagram-S2PKOQOG-CLb_cZaK.js +24 -0
- package/dist/assets/{dropbox-picker-BcRq4q-0.js → dropbox-picker-dJzRo9BP.js} +1 -1
- package/dist/assets/{erDiagram-Q2GNP2WA-Dg-rHIsN.js → erDiagram-Q2GNP2WA-C7zQODGQ.js} +1 -1
- package/dist/assets/{flowDiagram-NV44I4VS-BP-XXSqP.js → flowDiagram-NV44I4VS-CU90-nPK.js} +1 -1
- package/dist/assets/flows-actors-graph-runtime-I8VIayGy.js +1 -0
- package/dist/assets/ganttDiagram-JELNMOA3-QChqch-L.js +267 -0
- package/dist/assets/gitGraphDiagram-V2S2FVAM-C9TJLfq4.js +65 -0
- package/dist/assets/{google-drive-picker-B7-UtQYR.js → google-drive-picker-DP0pskfD.js} +1 -1
- package/dist/assets/{graph-C0dMcX0W.js → graph-BSonitmV.js} +1 -1
- package/dist/assets/{graph-runtime-CWiE-wtz.js → graph-runtime-8-ugTIpe.js} +1 -1
- package/dist/assets/{index-DPnXh7rr.js → index-B3f48X5_.js} +1 -1
- package/dist/assets/{index-Be7Kt732.js → index-B5SFUruu.js} +1 -1
- package/dist/assets/{index-D9v8TSci.js → index-BAj7bJQ9.js} +1 -1
- package/dist/assets/{index-Dq_EnMVo.js → index-BVEXkCPp.js} +1 -1
- package/dist/assets/{index-Cey0RnOC.js → index-BZyZXiVP.js} +1 -1
- package/dist/assets/{index-DvFC4HED.js → index-BkfsYGDI.js} +1 -1
- package/dist/assets/{index-Dq0jp-Om.js → index-Bzi4leGz.js} +1 -1
- package/dist/assets/{index-9s27iSag.js → index-CFS2kf4X.js} +1 -1
- package/dist/assets/{index-t42UNDS6.js → index-CTGTArYi.js} +1 -1
- package/dist/assets/{index-DKCAweKx.js → index-CZfKMV0S.js} +1 -1
- package/dist/assets/{index-Bgs_pC_Y.js → index-CclRN4na.js} +1 -1
- package/dist/assets/index-CpNjptBT.js +347 -0
- package/dist/assets/{index-D5kqp6s0.js → index-CqAJwEb9.js} +1 -1
- package/dist/assets/{index-DZopo5F6.js → index-Cx98Z3Ta.js} +1 -1
- package/dist/assets/index-D-9PKSn4.js +1 -0
- package/dist/assets/index-D-THewyc.css +1 -0
- package/dist/assets/{index-Df0eJHBm.js → index-D12-fzIP.js} +1 -1
- package/dist/assets/index-D8dkqP85.js +1094 -0
- package/dist/assets/{index-ZpEoSVCX.js → index-DL_hDFJK.js} +1 -1
- package/dist/assets/{index-D7UJLb5I.js → index-DNdNQX3_.js} +1 -1
- package/dist/assets/{index-BOiBO34F.js → index-DRrfjJvh.js} +1 -1
- package/dist/assets/{index-BOxxilol.js → index-D_QZLEQq.js} +1 -1
- package/dist/assets/{index-BkvM_lMh.js → index-Dl0klRA0.js} +1 -1
- package/dist/assets/{index-DlJDBjRm.js → index-DwafvHBM.js} +1 -1
- package/dist/assets/{index-COFqdHy-.js → index-dEth1qer.js} +1 -1
- package/dist/assets/{index-B4dr2goB.js → index-jiRPxWhK.js} +1 -1
- package/dist/assets/{index-DrKP8dhg.js → index-tJ39cHN5.js} +1 -1
- package/dist/assets/{index-Cl_eCn7w.js → index-vvv2MPol.js} +1 -1
- package/dist/assets/{index.es-OTtV-Qaj.js → index.es-BIyJxiiZ.js} +1 -1
- package/dist/assets/infoDiagram-HS3SLOUP-Beor-41t.js +2 -0
- package/dist/assets/{journeyDiagram-XKPGCS4Q-C5l-W_D3.js → journeyDiagram-XKPGCS4Q-TTxuStRy.js} +1 -1
- package/dist/assets/{kanban-definition-3W4ZIXB7-B__BbWoq.js → kanban-definition-3W4ZIXB7-BYqFfkjy.js} +1 -1
- package/dist/assets/{layout-Ct3mCMS9.js → layout-DrzykIoN.js} +1 -1
- package/dist/assets/{linear-Dz3rN3XM.js → linear-D86elEgL.js} +1 -1
- package/dist/assets/maximize-2-zJKkDRK0.js +11 -0
- package/dist/assets/{mermaid-VLURNSYL-C4UDY296.js → mermaid-VLURNSYL-BAygRTK6.js} +7 -7
- package/dist/assets/{mermaid.core-CRNTw-K2.js → mermaid.core-bwWKwscf.js} +5 -5
- package/dist/assets/{mindmap-definition-VGOIOE7T-Dns6Jp-h.js → mindmap-definition-VGOIOE7T-DmkSZj5s.js} +1 -1
- package/dist/assets/module-DUSXqJtA.js +3 -0
- package/dist/assets/{onedrive-picker-ClfxORZE.js → onedrive-picker-CyXOFDsr.js} +1 -1
- package/dist/assets/{pdf-viewer-BSApg-uG.js → pdf-viewer-BSy3edho.js} +1 -1
- package/dist/assets/{pieDiagram-ADFJNKIX-B8Jsapz3.js → pieDiagram-ADFJNKIX-BoqRK1Nj.js} +1 -1
- package/dist/assets/{quadrantDiagram-AYHSOK5B-C-kQhqve.js → quadrantDiagram-AYHSOK5B-iVG56kyl.js} +1 -1
- package/dist/assets/{requirementDiagram-UZGBJVZJ-CCFa12OF.js → requirementDiagram-UZGBJVZJ-BlfhbQSa.js} +1 -1
- package/dist/assets/sankeyDiagram-TZEHDZUN-CIqchrnr.js +10 -0
- package/dist/assets/{sequenceDiagram-WL72ISMW-B6sTQliE.js → sequenceDiagram-WL72ISMW-D98Lehfv.js} +1 -1
- package/dist/assets/{shiki-highlighter-runtime-D7okHLco.js → shiki-highlighter-runtime-CUsH9pAI.js} +1 -1
- package/dist/assets/stateDiagram-FKZM4ZOC-DKCmtDHk.js +1 -0
- package/dist/assets/stateDiagram-v2-4FDKWEC3-BExRj50s.js +1 -0
- package/dist/assets/{timeline-definition-IT6M3QCI-DZBb9YJX.js → timeline-definition-IT6M3QCI-DeDxHecT.js} +1 -1
- package/dist/assets/treemap-GDKQZRPO-DIQh1NSx.js +160 -0
- package/dist/assets/useQuickActionButtonBehavior-BpISdruD.js +1 -0
- package/dist/assets/{xychartDiagram-PRI3JC2R-BhTbi7nd.js → xychartDiagram-PRI3JC2R-DeAMabcI.js} +1 -1
- package/dist/index.html +2 -2
- package/package.json +8 -8
- package/dist/assets/ApplicationLevel_Toolbar-BddtfgIS.js +0 -1
- package/dist/assets/ChartEmptyState-lsMuirLh.js +0 -1
- package/dist/assets/ChartView-BTIzMUoU.js +0 -56
- package/dist/assets/architectureDiagram-VXUJARFQ-DTNeQb21.js +0 -36
- package/dist/assets/channel-DlvOdQcG.js +0 -1
- package/dist/assets/classDiagram-2ON5EDUG-CJonpGbc.js +0 -1
- package/dist/assets/classDiagram-v2-WZHVMYZB-CJonpGbc.js +0 -1
- package/dist/assets/clone-B5BftoQk.js +0 -1
- package/dist/assets/code-block-IT6T5CEO-rvNI7Npg.js +0 -3
- package/dist/assets/cose-bilkent-S5V4N54A-Bs72jpo-.js +0 -1
- package/dist/assets/dagre-6UL2VRFP-e0N82ZeJ.js +0 -4
- package/dist/assets/diagram-PSM6KHXK-Wp6Xds16.js +0 -24
- package/dist/assets/diagram-QEK2KX5R-DrkkEGhC.js +0 -43
- package/dist/assets/diagram-S2PKOQOG-C3M-VMYn.js +0 -24
- package/dist/assets/flows-actors-graph-runtime-C8pD81-m.js +0 -1
- package/dist/assets/ganttDiagram-JELNMOA3-CroPqWYF.js +0 -267
- package/dist/assets/gitGraphDiagram-V2S2FVAM-DC9FCbno.js +0 -65
- package/dist/assets/index-Cn1WDMib.js +0 -1
- package/dist/assets/index-D2Lcurso.js +0 -994
- package/dist/assets/index-nHF1ekZC.css +0 -1
- package/dist/assets/index-wtSklh0n.js +0 -367
- package/dist/assets/infoDiagram-HS3SLOUP-BumgayY_.js +0 -2
- package/dist/assets/sankeyDiagram-TZEHDZUN-COr9DFuT.js +0 -10
- package/dist/assets/stateDiagram-FKZM4ZOC-Dpg3xi0D.js +0 -1
- package/dist/assets/stateDiagram-v2-4FDKWEC3-CK1yFthu.js +0 -1
- package/dist/assets/treemap-GDKQZRPO-Oo1I1edJ.js +0 -160
- package/dist/assets/x-CHMqFUz-.js +0 -21
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import{r as Zt,it as Vl,wl as Z_,wm as X_,En as mT,Js as _T,y9 as ST,uO as bT,AP as zi,Jt as kp,Ju as Br,Jv as st,j as nn,aQ as xT,ag as wT,u as Op,F as TT,yf as CT,cx as MT,up as AT,hl as DT,c as LT}from"./index-D8dkqP85.js";import{u as IT,a as PT,b as RT,C as ET}from"./ChartEmptyState-BP_Yq5V7.js";/*! *****************************************************************************
|
|
2
|
+
Copyright (c) Microsoft Corporation.
|
|
3
|
+
|
|
4
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
5
|
+
purpose with or without fee is hereby granted.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
8
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
9
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
10
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
11
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
12
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
13
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
14
|
+
***************************************************************************** */var nc=function(r,t){return nc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])},nc(r,t)};function B(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");nc(r,t);function e(){this.constructor=r}r.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var kT=(function(){function r(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return r})(),OT=(function(){function r(){this.browser=new kT,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})(),ct=new OT;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(ct.wxa=!0,ct.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?ct.worker=!0:!ct.hasGlobalWindow||"Deno"in window||typeof navigator<"u"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Node.js")>-1?(ct.node=!0,ct.svgSupported=!0):BT(navigator.userAgent,ct);function BT(r,t){var e=t.browser,a=r.match(/Firefox\/([\d.]+)/),n=r.match(/MSIE\s([\d.]+)/)||r.match(/Trident\/.+?rv:(([\d.]+))/),i=r.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(r);a&&(e.firefox=!0,e.version=a[1]),n&&(e.ie=!0,e.version=n[1]),i&&(e.edge=!0,e.version=i[1],e.newEdge=+i[1].split(".")[0]>18),o&&(e.weChat=!0),t.svgSupported=typeof SVGRect<"u",t.touchEventsSupported="ontouchstart"in window&&!e.ie&&!e.edge,t.pointerEventsSupported="onpointerdown"in window&&(e.edge||e.ie&&+e.version>=11);var s=t.domSupported=typeof document<"u";if(s){var l=document.documentElement.style;t.transform3dSupported=(e.ie&&"transition"in l||e.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in l)&&!("OTransition"in l),t.transformSupported=t.transform3dSupported||e.ie&&+e.version>=9}}var Yv=12,NT="sans-serif",xa=Yv+"px "+NT,zT=20,VT=100,FT="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function GT(r){var t={};if(typeof JSON>"u")return t;for(var e=0;e<r.length;e++){var a=String.fromCharCode(e+32),n=(r.charCodeAt(e)-zT)/VT;t[a]=n}return t}var HT=GT(FT),ir={createCanvas:function(){return typeof document<"u"&&document.createElement("canvas")},measureText:(function(){var r,t;return function(e,a){if(!r){var n=ir.createCanvas();r=n&&n.getContext("2d")}if(r)return t!==a&&(t=r.font=a||xa),r.measureText(e);e=e||"",a=a||xa;var i=/((?:\d+)?\.?\d*)px/.exec(a),o=i&&+i[1]||Yv,s=0;if(a.indexOf("mono")>=0)s=o*e.length;else for(var l=0;l<e.length;l++){var u=HT[e[l]];s+=u==null?o:u*o}return{width:s}}})(),loadImage:function(r,t,e){var a=new Image;return a.onload=t,a.onerror=e,a.src=r,a}},$_=wa(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(r,t){return r["[object "+t+"]"]=!0,r},{}),K_=wa(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(r,t){return r["[object "+t+"Array]"]=!0,r},{}),fs=Object.prototype.toString,Ru=Array.prototype,WT=Ru.forEach,UT=Ru.filter,Zv=Ru.slice,YT=Ru.map,Bp=function(){}.constructor,Ts=Bp?Bp.prototype:null,Xv="__proto__",ZT=2311;function q_(){return ZT++}function $v(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];typeof console<"u"&&console.error.apply(console,r)}function J(r){if(r==null||typeof r!="object")return r;var t=r,e=fs.call(r);if(e==="[object Array]"){if(!bo(r)){t=[];for(var a=0,n=r.length;a<n;a++)t[a]=J(r[a])}}else if(K_[e]){if(!bo(r)){var i=r.constructor;if(i.from)t=i.from(r);else{t=new i(r.length);for(var a=0,n=r.length;a<n;a++)t[a]=r[a]}}}else if(!$_[e]&&!bo(r)&&!yi(r)){t={};for(var o in r)r.hasOwnProperty(o)&&o!==Xv&&(t[o]=J(r[o]))}return t}function ft(r,t,e){if(!j(t)||!j(r))return e?J(t):r;for(var a in t)if(t.hasOwnProperty(a)&&a!==Xv){var n=r[a],i=t[a];j(i)&&j(n)&&!H(i)&&!H(n)&&!yi(i)&&!yi(n)&&!Np(i)&&!Np(n)&&!bo(i)&&!bo(n)?ft(n,i,e):(e||!(a in r))&&(r[a]=J(t[a]))}return r}function F(r,t){if(Object.assign)Object.assign(r,t);else for(var e in t)t.hasOwnProperty(e)&&e!==Xv&&(r[e]=t[e]);return r}function gt(r,t,e){for(var a=Pt(t),n=0,i=a.length;n<i;n++){var o=a[n];(e?t[o]!=null:r[o]==null)&&(r[o]=t[o])}return r}function dt(r,t){if(r){if(r.indexOf)return r.indexOf(t);for(var e=0,a=r.length;e<a;e++)if(r[e]===t)return e}return-1}function XT(r,t){var e=r.prototype;function a(){}a.prototype=t.prototype,r.prototype=new a;for(var n in e)e.hasOwnProperty(n)&&(r.prototype[n]=e[n]);r.prototype.constructor=r,r.superClass=t}function fe(r,t,e){if(r="prototype"in r?r.prototype:r,t="prototype"in t?t.prototype:t,Object.getOwnPropertyNames)for(var a=Object.getOwnPropertyNames(t),n=0;n<a.length;n++){var i=a[n];i!=="constructor"&&(e?t[i]!=null:r[i]==null)&&(r[i]=t[i])}else gt(r,t,e)}function xe(r){return!r||typeof r=="string"?!1:typeof r.length=="number"}function M(r,t,e){if(r&&t)if(r.forEach&&r.forEach===WT)r.forEach(t,e);else if(r.length===+r.length)for(var a=0,n=r.length;a<n;a++)t.call(e,r[a],a,r);else for(var i in r)r.hasOwnProperty(i)&&t.call(e,r[i],i,r)}function U(r,t,e){if(!r)return[];if(!t)return Kv(r);if(r.map&&r.map===YT)return r.map(t,e);for(var a=[],n=0,i=r.length;n<i;n++)a.push(t.call(e,r[n],n,r));return a}function wa(r,t,e,a){if(r&&t){for(var n=0,i=r.length;n<i;n++)e=t.call(a,e,r[n],n,r);return e}}function kt(r,t,e){if(!r)return[];if(!t)return Kv(r);if(r.filter&&r.filter===UT)return r.filter(t,e);for(var a=[],n=0,i=r.length;n<i;n++)t.call(e,r[n],n,r)&&a.push(r[n]);return a}function Q_(r,t,e){if(r&&t){for(var a=0,n=r.length;a<n;a++)if(t.call(e,r[a],a,r))return r[a]}}function Pt(r){if(!r)return[];if(Object.keys)return Object.keys(r);var t=[];for(var e in r)r.hasOwnProperty(e)&&t.push(e);return t}function $T(r,t){for(var e=[],a=2;a<arguments.length;a++)e[a-2]=arguments[a];return function(){return r.apply(t,e.concat(Zv.call(arguments)))}}var Y=Ts&&Q(Ts.bind)?Ts.call.bind(Ts.bind):$T;function it(r){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];return function(){return r.apply(this,t.concat(Zv.call(arguments)))}}function H(r){return Array.isArray?Array.isArray(r):fs.call(r)==="[object Array]"}function Q(r){return typeof r=="function"}function X(r){return typeof r=="string"}function ic(r){return fs.call(r)==="[object String]"}function bt(r){return typeof r=="number"}function j(r){var t=typeof r;return t==="function"||!!r&&t==="object"}function Np(r){return!!$_[fs.call(r)]}function we(r){return!!K_[fs.call(r)]}function yi(r){return typeof r=="object"&&typeof r.nodeType=="number"&&typeof r.ownerDocument=="object"}function Eu(r){return r.colorStops!=null}function KT(r){return r.image!=null}function Hr(r){return r!==r}function Zr(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];for(var e=0,a=r.length;e<a;e++)if(r[e]!=null)return r[e]}function et(r,t){return r??t}function ya(r,t,e){return r??t??e}function Kv(r){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];return Zv.apply(r,t)}function ku(r){if(typeof r=="number")return[r,r,r,r];var t=r.length;return t===2?[r[0],r[1],r[0],r[1]]:t===3?[r[0],r[1],r[2],r[1]]:r}function We(r,t){if(!r)throw new Error(t)}function Sr(r){return r==null?null:typeof r.trim=="function"?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var j_="__ec_primitive__";function Fl(r){r[j_]=!0}function bo(r){return r[j_]}var qT=(function(){function r(){this.data={}}return r.prototype.delete=function(t){var e=this.has(t);return e&&delete this.data[t],e},r.prototype.has=function(t){return this.data.hasOwnProperty(t)},r.prototype.get=function(t){return this.data[t]},r.prototype.set=function(t,e){return this.data[t]=e,this},r.prototype.keys=function(){return Pt(this.data)},r.prototype.forEach=function(t){var e=this.data;for(var a in e)e.hasOwnProperty(a)&&t(e[a],a)},r})(),J_=typeof Map=="function";function QT(){return J_?new Map:new qT}var jT=(function(){function r(t){var e=H(t);this.data=QT();var a=this;t instanceof r?t.each(n):t&&M(t,n);function n(i,o){e?a.set(i,o):a.set(o,i)}}return r.prototype.hasKey=function(t){return this.data.has(t)},r.prototype.get=function(t){return this.data.get(t)},r.prototype.set=function(t,e){return this.data.set(t,e),e},r.prototype.each=function(t,e){this.data.forEach(function(a,n){t.call(e,a,n)})},r.prototype.keys=function(){var t=this.data.keys();return J_?Array.from(t):t},r.prototype.removeKey=function(t){this.data.delete(t)},r})();function nt(r){return new jT(r)}function tS(r,t){for(var e=new r.constructor(r.length+t.length),a=0;a<r.length;a++)e[a]=r[a];for(var n=r.length,a=0;a<t.length;a++)e[a+n]=t[a];return e}function Ou(r,t){var e;if(Object.create)e=Object.create(r);else{var a=function(){};a.prototype=r,e=new a}return t&&F(e,t),e}function eS(r){var t=r.style;t.webkitUserSelect="none",t.userSelect="none",t.webkitTapHighlightColor="rgba(0,0,0,0)",t["-webkit-touch-callout"]="none"}function rr(r,t){return r.hasOwnProperty(t)}function re(){}var JT=180/Math.PI;function Li(r,t){return r==null&&(r=0),t==null&&(t=0),[r,t]}function tC(r,t){return r[0]=t[0],r[1]=t[1],r}function eC(r){return[r[0],r[1]]}function zp(r,t,e){return r[0]=t[0]+e[0],r[1]=t[1]+e[1],r}function rS(r,t,e){return r[0]=t[0]-e[0],r[1]=t[1]-e[1],r}function rC(r){return Math.sqrt(aC(r))}function aC(r){return r[0]*r[0]+r[1]*r[1]}function df(r,t,e){return r[0]=t[0]*e,r[1]=t[1]*e,r}function qv(r,t){var e=rC(t);return e===0?(r[0]=0,r[1]=0):(r[0]=t[0]/e,r[1]=t[1]/e),r}function oc(r,t){return Math.sqrt((r[0]-t[0])*(r[0]-t[0])+(r[1]-t[1])*(r[1]-t[1]))}var sc=oc;function nC(r,t){return(r[0]-t[0])*(r[0]-t[0])+(r[1]-t[1])*(r[1]-t[1])}var ci=nC;function pf(r,t,e,a){return r[0]=t[0]+a*(e[0]-t[0]),r[1]=t[1]+a*(e[1]-t[1]),r}function pe(r,t,e){var a=t[0],n=t[1];return r[0]=e[0]*a+e[2]*n+e[4],r[1]=e[1]*a+e[3]*n+e[5],r}function ii(r,t,e){return r[0]=Math.min(t[0],e[0]),r[1]=Math.min(t[1],e[1]),r}function oi(r,t,e){return r[0]=Math.max(t[0],e[0]),r[1]=Math.max(t[1],e[1]),r}var Nn=(function(){function r(t,e){this.target=t,this.topTarget=e&&e.topTarget}return r})(),iC=(function(){function r(t){this.handler=t,t.on("mousedown",this._dragStart,this),t.on("mousemove",this._drag,this),t.on("mouseup",this._dragEnd,this)}return r.prototype._dragStart=function(t){for(var e=t.target;e&&!e.draggable;)e=e.parent||e.__hostTarget;e&&(this._draggingTarget=e,e.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.handler.dispatchToElement(new Nn(e,t),"dragstart",t.event))},r.prototype._drag=function(t){var e=this._draggingTarget;if(e){var a=t.offsetX,n=t.offsetY,i=a-this._x,o=n-this._y;this._x=a,this._y=n,e.drift(i,o,t),this.handler.dispatchToElement(new Nn(e,t),"drag",t.event);var s=this.handler.findHover(a,n,e).target,l=this._dropTarget;this._dropTarget=s,e!==s&&(l&&s!==l&&this.handler.dispatchToElement(new Nn(l,t),"dragleave",t.event),s&&s!==l&&this.handler.dispatchToElement(new Nn(s,t),"dragenter",t.event))}},r.prototype._dragEnd=function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.handler.dispatchToElement(new Nn(e,t),"dragend",t.event),this._dropTarget&&this.handler.dispatchToElement(new Nn(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null},r})(),Ze=(function(){function r(t){t&&(this._$eventProcessor=t)}return r.prototype.on=function(t,e,a,n){this._$handlers||(this._$handlers={});var i=this._$handlers;if(typeof e=="function"&&(n=a,a=e,e=null),!a||!t)return this;var o=this._$eventProcessor;e!=null&&o&&o.normalizeQuery&&(e=o.normalizeQuery(e)),i[t]||(i[t]=[]);for(var s=0;s<i[t].length;s++)if(i[t][s].h===a)return this;var l={h:a,query:e,ctx:n||this,callAtLast:a.zrEventfulCallAtLast},u=i[t].length-1,f=i[t][u];return f&&f.callAtLast?i[t].splice(u,0,l):i[t].push(l),this},r.prototype.isSilent=function(t){var e=this._$handlers;return!e||!e[t]||!e[t].length},r.prototype.off=function(t,e){var a=this._$handlers;if(!a)return this;if(!t)return this._$handlers={},this;if(e){if(a[t]){for(var n=[],i=0,o=a[t].length;i<o;i++)a[t][i].h!==e&&n.push(a[t][i]);a[t]=n}a[t]&&a[t].length===0&&delete a[t]}else delete a[t];return this},r.prototype.trigger=function(t){for(var e=[],a=1;a<arguments.length;a++)e[a-1]=arguments[a];if(!this._$handlers)return this;var n=this._$handlers[t],i=this._$eventProcessor;if(n)for(var o=e.length,s=n.length,l=0;l<s;l++){var u=n[l];if(!(i&&i.filter&&u.query!=null&&!i.filter(t,u.query)))switch(o){case 0:u.h.call(u.ctx);break;case 1:u.h.call(u.ctx,e[0]);break;case 2:u.h.call(u.ctx,e[0],e[1]);break;default:u.h.apply(u.ctx,e);break}}return i&&i.afterTrigger&&i.afterTrigger(t),this},r.prototype.triggerWithContext=function(t){for(var e=[],a=1;a<arguments.length;a++)e[a-1]=arguments[a];if(!this._$handlers)return this;var n=this._$handlers[t],i=this._$eventProcessor;if(n)for(var o=e.length,s=e[o-1],l=n.length,u=0;u<l;u++){var f=n[u];if(!(i&&i.filter&&f.query!=null&&!i.filter(t,f.query)))switch(o){case 0:f.h.call(s);break;case 1:f.h.call(s,e[0]);break;case 2:f.h.call(s,e[0],e[1]);break;default:f.h.apply(s,e.slice(1,o-1));break}}return i&&i.afterTrigger&&i.afterTrigger(t),this},r})(),oC=Math.log(2);function lc(r,t,e,a,n,i){var o=a+"-"+n,s=r.length;if(i.hasOwnProperty(o))return i[o];if(t===1){var l=Math.round(Math.log((1<<s)-1&~n)/oC);return r[e][l]}for(var u=a|1<<e,f=e+1;a&1<<f;)f++;for(var h=0,v=0,c=0;v<s;v++){var d=1<<v;d&n||(h+=(c%2?-1:1)*r[e][v]*lc(r,t-1,f,u,n|d,i),c++)}return i[o]=h,h}function Vp(r,t){var e=[[r[0],r[1],1,0,0,0,-t[0]*r[0],-t[0]*r[1]],[0,0,0,r[0],r[1],1,-t[1]*r[0],-t[1]*r[1]],[r[2],r[3],1,0,0,0,-t[2]*r[2],-t[2]*r[3]],[0,0,0,r[2],r[3],1,-t[3]*r[2],-t[3]*r[3]],[r[4],r[5],1,0,0,0,-t[4]*r[4],-t[4]*r[5]],[0,0,0,r[4],r[5],1,-t[5]*r[4],-t[5]*r[5]],[r[6],r[7],1,0,0,0,-t[6]*r[6],-t[6]*r[7]],[0,0,0,r[6],r[7],1,-t[7]*r[6],-t[7]*r[7]]],a={},n=lc(e,8,0,0,0,a);if(n!==0){for(var i=[],o=0;o<8;o++)for(var s=0;s<8;s++)i[s]==null&&(i[s]=0),i[s]+=((o+s)%2?-1:1)*lc(e,7,o===0?1:0,1<<o,1<<s,a)/n*t[o];return function(l,u,f){var h=u*i[6]+f*i[7]+1;l[0]=(u*i[0]+f*i[1]+i[2])/h,l[1]=(u*i[3]+f*i[4]+i[5])/h}}}var Gl="___zrEVENTSAVED",gf=[];function sC(r,t,e,a,n){return uc(gf,t,a,n,!0)&&uc(r,e,gf[0],gf[1])}function lC(r,t){r&&e(r),t&&e(t);function e(a){var n=a[Gl];n&&(n.clearMarkers&&n.clearMarkers(),delete a[Gl])}}function uc(r,t,e,a,n){if(t.getBoundingClientRect&&ct.domSupported&&!aS(t)){var i=t[Gl]||(t[Gl]={}),o=uC(t,i),s=fC(o,i,n);if(s)return s(r,e,a),!0}return!1}function uC(r,t){var e=t.markers;if(e)return e;e=t.markers=[];for(var a=["left","right"],n=["top","bottom"],i=0;i<4;i++){var o=document.createElement("div"),s=o.style,l=i%2,u=(i>>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",n[u]+":0",a[1-l]+":auto",n[1-u]+":auto",""].join("!important;"),r.appendChild(o),e.push(o)}return t.clearMarkers=function(){M(e,function(f){f.parentNode&&f.parentNode.removeChild(f)})},e}function fC(r,t,e){for(var a=e?"invTrans":"trans",n=t[a],i=t.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var f=r[u].getBoundingClientRect(),h=2*u,v=f.left,c=f.top;o.push(v,c),l=l&&i&&v===i[h]&&c===i[h+1],s.push(r[u].offsetLeft,r[u].offsetTop)}return l&&n?n:(t.srcCoords=o,t[a]=e?Vp(s,o):Vp(o,s))}function aS(r){return r.nodeName.toUpperCase()==="CANVAS"}var hC=/([&<>"'])/g,cC={"&":"&","<":"<",">":">",'"':""","'":"'"};function _e(r){return r==null?"":(r+"").replace(hC,function(t,e){return cC[e]})}var vC=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,yf=[],dC=ct.browser.firefox&&+ct.browser.version.split(".")[0]<39;function fc(r,t,e,a){return e=e||{},a?Fp(r,t,e):dC&&t.layerX!=null&&t.layerX!==t.offsetX?(e.zrX=t.layerX,e.zrY=t.layerY):t.offsetX!=null?(e.zrX=t.offsetX,e.zrY=t.offsetY):Fp(r,t,e),e}function Fp(r,t,e){if(ct.domSupported&&r.getBoundingClientRect){var a=t.clientX,n=t.clientY;if(aS(r)){var i=r.getBoundingClientRect();e.zrX=a-i.left,e.zrY=n-i.top;return}else if(uc(yf,r,a,n)){e.zrX=yf[0],e.zrY=yf[1];return}}e.zrX=e.zrY=0}function Qv(r){return r||window.event}function Ee(r,t,e){if(t=Qv(t),t.zrX!=null)return t;var a=t.type,n=a&&a.indexOf("touch")>=0;if(n){var o=a!=="touchend"?t.targetTouches[0]:t.changedTouches[0];o&&fc(r,o,t,e)}else{fc(r,t,t,e);var i=pC(t);t.zrDelta=i?i/120:-(t.detail||0)/3}var s=t.button;return t.which==null&&s!==void 0&&vC.test(t.type)&&(t.which=s&1?1:s&2?3:s&4?2:0),t}function pC(r){var t=r.wheelDelta;if(t)return t;var e=r.deltaX,a=r.deltaY;if(e==null||a==null)return t;var n=Math.abs(a!==0?a:e),i=a>0?-1:a<0?1:e>0?-1:1;return 3*n*i}function hc(r,t,e,a){r.addEventListener(t,e,a)}function gC(r,t,e,a){r.removeEventListener(t,e,a)}var Xr=function(r){r.preventDefault(),r.stopPropagation(),r.cancelBubble=!0};function Gp(r){return r.which===2||r.which===3}var yC=(function(){function r(){this._track=[]}return r.prototype.recognize=function(t,e,a){return this._doTrack(t,e,a),this._recognize(t)},r.prototype.clear=function(){return this._track.length=0,this},r.prototype._doTrack=function(t,e,a){var n=t.touches;if(n){for(var i={points:[],touches:[],target:e,event:t},o=0,s=n.length;o<s;o++){var l=n[o],u=fc(a,l,{});i.points.push([u.zrX,u.zrY]),i.touches.push(l)}this._track.push(i)}},r.prototype._recognize=function(t){for(var e in mf)if(mf.hasOwnProperty(e)){var a=mf[e](this._track,t);if(a)return a}},r})();function Hp(r){var t=r[1][0]-r[0][0],e=r[1][1]-r[0][1];return Math.sqrt(t*t+e*e)}function mC(r){return[(r[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2]}var mf={pinch:function(r,t){var e=r.length;if(e){var a=(r[e-1]||{}).points,n=(r[e-2]||{}).points||a;if(n&&n.length>1&&a&&a.length>1){var i=Hp(a)/Hp(n);!isFinite(i)&&(i=1),t.pinchScale=i;var o=mC(a);return t.pinchX=o[0],t.pinchY=o[1],{type:"pinch",target:r[0].target,event:t}}}}};function Fe(){return[1,0,0,1,0,0]}function jv(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r}function Jv(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4],r[5]=t[5],r}function xo(r,t,e){var a=t[0]*e[0]+t[2]*e[1],n=t[1]*e[0]+t[3]*e[1],i=t[0]*e[2]+t[2]*e[3],o=t[1]*e[2]+t[3]*e[3],s=t[0]*e[4]+t[2]*e[5]+t[4],l=t[1]*e[4]+t[3]*e[5]+t[5];return r[0]=a,r[1]=n,r[2]=i,r[3]=o,r[4]=s,r[5]=l,r}function mi(r,t,e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4]+e[0],r[5]=t[5]+e[1],r}function Bu(r,t,e,a){a===void 0&&(a=[0,0]);var n=t[0],i=t[2],o=t[4],s=t[1],l=t[3],u=t[5],f=Math.sin(e),h=Math.cos(e);return r[0]=n*h+s*f,r[1]=-n*f+s*h,r[2]=i*h+l*f,r[3]=-i*f+h*l,r[4]=h*(o-a[0])+f*(u-a[1])+a[0],r[5]=h*(u-a[1])-f*(o-a[0])+a[1],r}function nS(r,t,e){var a=e[0],n=e[1];return r[0]=t[0]*a,r[1]=t[1]*n,r[2]=t[2]*a,r[3]=t[3]*n,r[4]=t[4]*a,r[5]=t[5]*n,r}function Ii(r,t){var e=t[0],a=t[2],n=t[4],i=t[1],o=t[3],s=t[5],l=e*o-i*a;return l?(l=1/l,r[0]=o*l,r[1]=-i*l,r[2]=-a*l,r[3]=e*l,r[4]=(a*s-o*n)*l,r[5]=(i*n-e*s)*l,r):null}var ht=(function(){function r(t,e){this.x=t||0,this.y=e||0}return r.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},r.prototype.clone=function(){return new r(this.x,this.y)},r.prototype.set=function(t,e){return this.x=t,this.y=e,this},r.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},r.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},r.prototype.scale=function(t){this.x*=t,this.y*=t},r.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},r.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},r.prototype.dot=function(t){return this.x*t.x+this.y*t.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 t=this.len();return this.x/=t,this.y/=t,this},r.prototype.distance=function(t){var e=this.x-t.x,a=this.y-t.y;return Math.sqrt(e*e+a*a)},r.prototype.distanceSquare=function(t){var e=this.x-t.x,a=this.y-t.y;return e*e+a*a},r.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},r.prototype.transform=function(t){if(t){var e=this.x,a=this.y;return this.x=t[0]*e+t[2]*a+t[4],this.y=t[1]*e+t[3]*a+t[5],this}},r.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},r.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},r.set=function(t,e,a){t.x=e,t.y=a},r.copy=function(t,e){t.x=e.x,t.y=e.y},r.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},r.lenSquare=function(t){return t.x*t.x+t.y*t.y},r.dot=function(t,e){return t.x*e.x+t.y*e.y},r.add=function(t,e,a){t.x=e.x+a.x,t.y=e.y+a.y},r.sub=function(t,e,a){t.x=e.x-a.x,t.y=e.y-a.y},r.scale=function(t,e,a){t.x=e.x*a,t.y=e.y*a},r.scaleAndAdd=function(t,e,a,n){t.x=e.x+a.x*n,t.y=e.y+a.y*n},r.lerp=function(t,e,a,n){var i=1-n;t.x=i*e.x+n*a.x,t.y=i*e.y+n*a.y},r})(),fn=Math.min,si=Math.max,cc=Math.abs,Wp=["x","y"],_C=["width","height"],ka=new ht,Oa=new ht,Ba=new ht,Na=new ht,Ce=iS(),co=Ce.minTv,vc=Ce.maxTv,wo=[0,0],ot=(function(){function r(t,e,a,n){r.set(this,t,e,a,n)}return r.set=function(t,e,a,n,i){return n<0&&(e=e+n,n=-n),i<0&&(a=a+i,i=-i),t.x=e,t.y=a,t.width=n,t.height=i,t},r.prototype.union=function(t){var e=fn(t.x,this.x),a=fn(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=si(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=si(t.y+t.height,this.y+this.height)-a:this.height=t.height,this.x=e,this.y=a},r.prototype.applyTransform=function(t){r.applyTransform(this,this,t)},r.prototype.calculateTransform=function(t){var e=this,a=t.width/e.width,n=t.height/e.height,i=Fe();return mi(i,i,[-e.x,-e.y]),nS(i,i,[a,n]),mi(i,i,[t.x,t.y]),i},r.prototype.intersect=function(t,e,a){return r.intersect(this,t,e,a)},r.intersect=function(t,e,a,n){a&&ht.set(a,0,0);var i=n&&n.outIntersectRect||null,o=n&&n.clamp;if(i&&(i.x=i.y=i.width=i.height=NaN),!t||!e)return!1;t instanceof r||(t=r.set(SC,t.x,t.y,t.width,t.height)),e instanceof r||(e=r.set(bC,e.x,e.y,e.width,e.height));var s=!!a;Ce.reset(n,s);var l=Ce.touchThreshold,u=t.x+l,f=t.x+t.width-l,h=t.y+l,v=t.y+t.height-l,c=e.x+l,d=e.x+e.width-l,p=e.y+l,g=e.y+e.height-l;if(u>f||h>v||c>d||p>g)return!1;var y=!(f<c||d<u||v<p||g<h);return(s||i)&&(wo[0]=1/0,wo[1]=0,Up(u,f,c,d,0,s,i,o),Up(h,v,p,g,1,s,i,o),s&&ht.copy(a,y?Ce.useDir?Ce.dirMinTv:co:vc)),y},r.contain=function(t,e,a){return e>=t.x&&e<=t.x+t.width&&a>=t.y&&a<=t.y+t.height},r.prototype.contain=function(t,e){return r.contain(this,t,e)},r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.copy=function(t){r.copy(this,t)},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(t){return new r(t.x,t.y,t.width,t.height)},r.copy=function(t,e){return t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height,t},r.applyTransform=function(t,e,a){if(!a){t!==e&&r.copy(t,e);return}if(a[1]<1e-5&&a[1]>-1e-5&&a[2]<1e-5&&a[2]>-1e-5){var n=a[0],i=a[3],o=a[4],s=a[5];t.x=e.x*n+o,t.y=e.y*i+s,t.width=e.width*n,t.height=e.height*i,t.width<0&&(t.x+=t.width,t.width=-t.width),t.height<0&&(t.y+=t.height,t.height=-t.height);return}ka.x=Ba.x=e.x,ka.y=Na.y=e.y,Oa.x=Na.x=e.x+e.width,Oa.y=Ba.y=e.y+e.height,ka.transform(a),Na.transform(a),Oa.transform(a),Ba.transform(a),t.x=fn(ka.x,Oa.x,Ba.x,Na.x),t.y=fn(ka.y,Oa.y,Ba.y,Na.y);var l=si(ka.x,Oa.x,Ba.x,Na.x),u=si(ka.y,Oa.y,Ba.y,Na.y);t.width=l-t.x,t.height=u-t.y},r})(),SC=new ot(0,0,0,0),bC=new ot(0,0,0,0);function Up(r,t,e,a,n,i,o,s){var l=cc(t-e),u=cc(a-r),f=fn(l,u),h=Wp[n],v=Wp[1-n],c=_C[n];t<e||a<r?l<u?(i&&(vc[h]=-l),s&&(o[h]=t,o[c]=0)):(i&&(vc[h]=u),s&&(o[h]=r,o[c]=0)):(o&&(o[h]=si(r,e),o[c]=fn(t,a)-o[h]),i&&(f<wo[0]||Ce.useDir)&&(wo[0]=fn(f,wo[0]),(l<u||!Ce.bidirectional)&&(co[h]=l,co[v]=0,Ce.useDir&&Ce.calcDirMTV()),(l>=u||!Ce.bidirectional)&&(co[h]=-u,co[v]=0,Ce.useDir&&Ce.calcDirMTV())))}function iS(){var r=0,t=new ht,e=new ht,a={minTv:new ht,maxTv:new ht,useDir:!1,dirMinTv:new ht,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(i,o){a.touchThreshold=0,i&&i.touchThreshold!=null&&(a.touchThreshold=si(0,i.touchThreshold)),a.negativeSize=!1,o&&(a.minTv.set(1/0,1/0),a.maxTv.set(0,0),a.useDir=!1,i&&i.direction!=null&&(a.useDir=!0,a.dirMinTv.copy(a.minTv),e.copy(a.minTv),r=i.direction,a.bidirectional=i.bidirectional==null||!!i.bidirectional,a.bidirectional||t.set(Math.cos(r),Math.sin(r))))},calcDirMTV:function(){var i=a.minTv,o=a.dirMinTv,s=i.y*i.y+i.x*i.x,l=Math.sin(r),u=Math.cos(r),f=l*i.y+u*i.x;if(n(f)){n(i.x)&&n(i.y)&&o.set(0,0);return}if(e.x=s*u/f,e.y=s*l/f,n(e.x)&&n(e.y)){o.set(0,0);return}(a.bidirectional||t.dot(e)>0)&&e.len()<o.len()&&o.copy(e)}};function n(i){return cc(i)<1e-10}return a}var oS="silent";function xC(r,t,e){return{type:r,event:e,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:e.zrX,offsetY:e.zrY,gestureEvent:e.gestureEvent,pinchX:e.pinchX,pinchY:e.pinchY,pinchScale:e.pinchScale,wheelDelta:e.zrDelta,zrByTouch:e.zrByTouch,which:e.which,stop:wC}}function wC(){Xr(this.event)}var TC=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.handler=null,e}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t})(Ze),Vi=(function(){function r(t,e){this.x=t,this.y=e}return r})(),CC=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],_f=new ot(0,0,0,0),sS=(function(r){B(t,r);function t(e,a,n,i,o){var s=r.call(this)||this;return s._hovered=new Vi(0,0),s.storage=e,s.painter=a,s.painterRoot=i,s._pointerSize=o,n=n||new TC,s.proxy=null,s.setHandlerProxy(n),s._draggingMgr=new iC(s),s}return t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(M(CC,function(a){e.on&&e.on(a,this[a],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var a=e.zrX,n=e.zrY,i=lS(this,a,n),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var l=this._hovered=i?new Vi(a,n):this.findHover(a,n),u=l.target,f=this.proxy;f.setCursor&&f.setCursor(u?u.cursor:"default"),s&&u!==s&&this.dispatchToElement(o,"mouseout",e),this.dispatchToElement(l,"mousemove",e),u&&u!==s&&this.dispatchToElement(l,"mouseover",e)},t.prototype.mouseout=function(e){var a=e.zrEventControl;a!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",e),a!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:e})},t.prototype.resize=function(){this._hovered=new Vi(0,0)},t.prototype.dispatch=function(e,a){var n=this[e];n&&n.call(this,a)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var a=this.proxy;a.setCursor&&a.setCursor(e)},t.prototype.dispatchToElement=function(e,a,n){e=e||{};var i=e.target;if(!(i&&i.silent)){for(var o="on"+a,s=xC(a,e,n);i&&(i[o]&&(s.cancelBubble=!!i[o].call(i,s)),i.trigger(a,s),i=i.__hostTarget?i.__hostTarget:i.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)}))}},t.prototype.findHover=function(e,a,n){var i=this.storage.getDisplayList(),o=new Vi(e,a);if(Yp(i,o,e,a,n),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,f=new ot(e-u,a-u,l,l),h=i.length-1;h>=0;h--){var v=i[h];v!==n&&!v.ignore&&!v.ignoreCoarsePointer&&(!v.parent||!v.parent.ignoreCoarsePointer)&&(_f.copy(v.getBoundingRect()),v.transform&&_f.applyTransform(v.transform),_f.intersect(f)&&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=e+g*Math.cos(y),_=a+g*Math.sin(y);if(Yp(s,o,m,_,n),o.target)return o}}return o},t.prototype.processGesture=function(e,a){this._gestureMgr||(this._gestureMgr=new yC);var n=this._gestureMgr;a==="start"&&n.clear();var i=n.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if(a==="end"&&n.clear(),i){var o=i.type;e.gestureEvent=o;var s=new Vi;s.target=i.target,this.dispatchToElement(s,o,i.event)}},t})(Ze);M(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(r){sS.prototype[r]=function(t){var e=t.zrX,a=t.zrY,n=lS(this,e,a),i,o;if((r!=="mouseup"||!n)&&(i=this.findHover(e,a),o=i.target),r==="mousedown")this._downEl=o,this._downPoint=[t.zrX,t.zrY],this._upEl=o;else if(r==="mouseup")this._upEl=o;else if(r==="click"){if(this._downEl!==this._upEl||!this._downPoint||sc(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(i,r,t)}});function MC(r,t,e){if(r[r.rectHover?"rectContain":"contain"](t,e)){for(var a=r,n=void 0,i=!1;a;){if(a.ignoreClip&&(i=!0),!i){var o=a.getClipPath();if(o&&!o.contain(t,e))return!1}a.silent&&(n=!0);var s=a.__hostTarget;a=s?a.ignoreHostSilent?null:s:a.parent}return n?oS:!0}return!1}function Yp(r,t,e,a,n){for(var i=r.length-1;i>=0;i--){var o=r[i],s=void 0;if(o!==n&&!o.ignore&&(s=MC(o,e,a))&&(!t.topTarget&&(t.topTarget=o),s!==oS)){t.target=o;break}}}function lS(r,t,e){var a=r.painter;return t<0||t>a.getWidth()||e<0||e>a.getHeight()}var uS=32,Fi=7;function AC(r){for(var t=0;r>=uS;)t|=r&1,r>>=1;return r+t}function Zp(r,t,e,a){var n=t+1;if(n===e)return 1;if(a(r[n++],r[t])<0){for(;n<e&&a(r[n],r[n-1])<0;)n++;DC(r,t,n)}else for(;n<e&&a(r[n],r[n-1])>=0;)n++;return n-t}function DC(r,t,e){for(e--;t<e;){var a=r[t];r[t++]=r[e],r[e--]=a}}function Xp(r,t,e,a,n){for(a===t&&a++;a<e;a++){for(var i=r[a],o=t,s=a,l;o<s;)l=o+s>>>1,n(i,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]=i}}function Sf(r,t,e,a,n,i){var o=0,s=0,l=1;if(i(r,t[e+n])>0){for(s=a-n;l<s&&i(r,t[e+n+l])>0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=n,l+=n}else{for(s=n+1;l<s&&i(r,t[e+n-l])<=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=n-l,l=n-u}for(o++;o<l;){var f=o+(l-o>>>1);i(r,t[e+f])>0?o=f+1:l=f}return l}function bf(r,t,e,a,n,i){var o=0,s=0,l=1;if(i(r,t[e+n])<0){for(s=n+1;l<s&&i(r,t[e+n-l])<0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=n-l,l=n-u}else{for(s=a-n;l<s&&i(r,t[e+n+l])>=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=n,l+=n}for(o++;o<l;){var f=o+(l-o>>>1);i(r,t[e+f])<0?l=f:o=f+1}return l}function LC(r,t){var e=Fi,a,n,i=0,o=[];a=[],n=[];function s(c,d){a[i]=c,n[i]=d,i+=1}function l(){for(;i>1;){var c=i-2;if(c>=1&&n[c-1]<=n[c]+n[c+1]||c>=2&&n[c-2]<=n[c]+n[c-1])n[c-1]<n[c+1]&&c--;else if(n[c]>n[c+1])break;f(c)}}function u(){for(;i>1;){var c=i-2;c>0&&n[c-1]<n[c+1]&&c--,f(c)}}function f(c){var d=a[c],p=n[c],g=a[c+1],y=n[c+1];n[c]=p+y,c===i-3&&(a[c+1]=a[c+2],n[c+1]=n[c+2]),i--;var m=bf(r[g],r,d,p,0,t);d+=m,p-=m,p!==0&&(y=Sf(r[d+p-1],r,g,y,y-1,t),y!==0&&(p<=y?h(d,p,g,y):v(d,p,g,y)))}function h(c,d,p,g){var y=0;for(y=0;y<d;y++)o[y]=r[c+y];var m=0,_=p,S=c;if(r[S++]=r[_++],--g===0){for(y=0;y<d;y++)r[S+y]=o[m+y];return}if(d===1){for(y=0;y<g;y++)r[S+y]=r[_+y];r[S+g]=o[m];return}for(var x=e,b,w,T;;){b=0,w=0,T=!1;do if(t(r[_],o[m])<0){if(r[S++]=r[_++],w++,b=0,--g===0){T=!0;break}}else if(r[S++]=o[m++],b++,w=0,--d===1){T=!0;break}while((b|w)<x);if(T)break;do{if(b=bf(r[_],o,m,d,0,t),b!==0){for(y=0;y<b;y++)r[S+y]=o[m+y];if(S+=b,m+=b,d-=b,d<=1){T=!0;break}}if(r[S++]=r[_++],--g===0){T=!0;break}if(w=Sf(o[m],r,_,g,0,t),w!==0){for(y=0;y<w;y++)r[S+y]=r[_+y];if(S+=w,_+=w,g-=w,g===0){T=!0;break}}if(r[S++]=o[m++],--d===1){T=!0;break}x--}while(b>=Fi||w>=Fi);if(T)break;x<0&&(x=0),x+=2}if(e=x,e<1&&(e=1),d===1){for(y=0;y<g;y++)r[S+y]=r[_+y];r[S+g]=o[m]}else{if(d===0)throw new Error;for(y=0;y<d;y++)r[S+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,S=p+g-1,x=0,b=0;if(r[S--]=r[m--],--d===0){for(x=S-(g-1),y=0;y<g;y++)r[x+y]=o[y];return}if(g===1){for(S-=d,m-=d,b=S+1,x=m+1,y=d-1;y>=0;y--)r[b+y]=r[x+y];r[S]=o[_];return}for(var w=e;;){var T=0,D=0,A=!1;do if(t(o[_],r[m])<0){if(r[S--]=r[m--],T++,D=0,--d===0){A=!0;break}}else if(r[S--]=o[_--],D++,T=0,--g===1){A=!0;break}while((T|D)<w);if(A)break;do{if(T=d-bf(o[_],r,c,d,d-1,t),T!==0){for(S-=T,m-=T,d-=T,b=S+1,x=m+1,y=T-1;y>=0;y--)r[b+y]=r[x+y];if(d===0){A=!0;break}}if(r[S--]=o[_--],--g===1){A=!0;break}if(D=g-Sf(r[m],o,0,g,g-1,t),D!==0){for(S-=D,_-=D,g-=D,b=S+1,x=_+1,y=0;y<D;y++)r[b+y]=o[x+y];if(g<=1){A=!0;break}}if(r[S--]=r[m--],--d===0){A=!0;break}w--}while(T>=Fi||D>=Fi);if(A)break;w<0&&(w=0),w+=2}if(e=w,e<1&&(e=1),g===1){for(S-=d,m-=d,b=S+1,x=m+1,y=d-1;y>=0;y--)r[b+y]=r[x+y];r[S]=o[_]}else{if(g===0)throw new Error;for(x=S-(g-1),y=0;y<g;y++)r[x+y]=o[y]}}return{mergeRuns:l,forceMergeRuns:u,pushRun:s}}function Tl(r,t,e,a){e||(e=0),a||(a=r.length);var n=a-e;if(!(n<2)){var i=0;if(n<uS){i=Zp(r,e,a,t),Xp(r,e,a,e+i,t);return}var o=LC(r,t),s=AC(n);do{if(i=Zp(r,e,a,t),i<s){var l=n;l>s&&(l=s),Xp(r,e,e+l,e+i,t),i=l}o.pushRun(e,i),o.mergeRuns(),n-=i,e+=i}while(n!==0);o.forceMergeRuns()}}var Me=1,vo=2,ai=4,$p=!1;function xf(){$p||($p=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function Kp(r,t){return r.zlevel===t.zlevel?r.z===t.z?r.z2-t.z2:r.z-t.z:r.zlevel-t.zlevel}var IC=(function(){function r(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=Kp}return r.prototype.traverse=function(t,e){for(var a=0;a<this._roots.length;a++)this._roots[a].traverse(t,e)},r.prototype.getDisplayList=function(t,e){e=e||!1;var a=this._displayList;return(t||!a.length)&&this.updateDisplayList(e),a},r.prototype.updateDisplayList=function(t){this._displayListLen=0;for(var e=this._roots,a=this._displayList,n=0,i=e.length;n<i;n++)this._updateAndAddDisplayable(e[n],null,t);a.length=this._displayListLen,Tl(a,Kp)},r.prototype._updateAndAddDisplayable=function(t,e,a){if(!(t.ignore&&!a)){t.beforeUpdate(),t.update(),t.afterUpdate();var n=t.getClipPath(),i=e&&e.length,o=0,s=t.__clipPaths;if(!t.ignoreClip&&(i||n)){if(s||(s=t.__clipPaths=[]),i)for(var l=0;l<e.length;l++)s[o++]=e[l];for(var u=n,f=t;u;)u.parent=f,u.updateTransform(),s[o++]=u,f=u,u=u.getClipPath()}if(s&&(s.length=o),t.childrenRef){for(var h=t.childrenRef(),v=0;v<h.length;v++){var c=h[v];t.__dirty&&(c.__dirty|=Me),this._updateAndAddDisplayable(c,s,a)}t.__dirty=0}else{var d=t;isNaN(d.z)&&(xf(),d.z=0),isNaN(d.z2)&&(xf(),d.z2=0),isNaN(d.zlevel)&&(xf(),d.zlevel=0),this._displayList[this._displayListLen++]=d}var p=t.getDecalElement&&t.getDecalElement();p&&this._updateAndAddDisplayable(p,s,a);var g=t.getTextGuideLine();g&&this._updateAndAddDisplayable(g,s,a);var y=t.getTextContent();y&&this._updateAndAddDisplayable(y,s,a)}},r.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},r.prototype.delRoot=function(t){if(t instanceof Array){for(var e=0,a=t.length;e<a;e++)this.delRoot(t[e]);return}var n=dt(this._roots,t);n>=0&&this._roots.splice(n,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})(),Hl;Hl=ct.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(r){return setTimeout(r,16)};var To={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 t,e=.1,a=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=a/4):t=a*Math.asin(1/e)/(2*Math.PI),-(e*Math.pow(2,10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/a)))},elasticOut:function(r){var t,e=.1,a=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=a/4):t=a*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*r)*Math.sin((r-t)*(2*Math.PI)/a)+1)},elasticInOut:function(r){var t,e=.1,a=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=a/4):t=a*Math.asin(1/e)/(2*Math.PI),(r*=2)<1?-.5*(e*Math.pow(2,10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/a)):e*Math.pow(2,-10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/a)*.5+1)},backIn:function(r){var t=1.70158;return r*r*((t+1)*r-t)},backOut:function(r){var t=1.70158;return--r*r*((t+1)*r+t)+1},backInOut:function(r){var t=2.5949095;return(r*=2)<1?.5*(r*r*((t+1)*r-t)):.5*((r-=2)*r*((t+1)*r+t)+2)},bounceIn:function(r){return 1-To.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?To.bounceIn(r*2)*.5:To.bounceOut(r*2-1)*.5+.5}},Cs=Math.pow,ma=Math.sqrt,Wl=1e-8,fS=1e-4,qp=ma(3),Ms=1/3,mr=Li(),Be=Li(),vi=Li();function fa(r){return r>-Wl&&r<Wl}function hS(r){return r>Wl||r<-Wl}function te(r,t,e,a,n){var i=1-n;return i*i*(i*r+3*n*t)+n*n*(n*a+3*i*e)}function Qp(r,t,e,a,n){var i=1-n;return 3*(((t-r)*i+2*(e-t)*n)*i+(a-e)*n*n)}function Ul(r,t,e,a,n,i){var o=a+3*(t-e)-r,s=3*(e-t*2+r),l=3*(t-r),u=r-n,f=s*s-3*o*l,h=s*l-9*o*u,v=l*l-3*s*u,c=0;if(fa(f)&&fa(h))if(fa(s))i[0]=0;else{var d=-l/s;d>=0&&d<=1&&(i[c++]=d)}else{var p=h*h-4*f*v;if(fa(p)){var g=h/f,d=-s/o+g,y=-g/2;d>=0&&d<=1&&(i[c++]=d),y>=0&&y<=1&&(i[c++]=y)}else if(p>0){var m=ma(p),_=f*s+1.5*o*(-h+m),S=f*s+1.5*o*(-h-m);_<0?_=-Cs(-_,Ms):_=Cs(_,Ms),S<0?S=-Cs(-S,Ms):S=Cs(S,Ms);var d=(-s-(_+S))/(3*o);d>=0&&d<=1&&(i[c++]=d)}else{var x=(2*f*s-3*o*h)/(2*ma(f*f*f)),b=Math.acos(x)/3,w=ma(f),T=Math.cos(b),d=(-s-2*w*T)/(3*o),y=(-s+w*(T+qp*Math.sin(b)))/(3*o),D=(-s+w*(T-qp*Math.sin(b)))/(3*o);d>=0&&d<=1&&(i[c++]=d),y>=0&&y<=1&&(i[c++]=y),D>=0&&D<=1&&(i[c++]=D)}}return c}function cS(r,t,e,a,n){var i=6*e-12*t+6*r,o=9*t+3*a-3*r-9*e,s=3*t-3*r,l=0;if(fa(o)){if(hS(i)){var u=-s/i;u>=0&&u<=1&&(n[l++]=u)}}else{var f=i*i-4*o*s;if(fa(f))n[0]=-i/(2*o);else if(f>0){var h=ma(f),u=(-i+h)/(2*o),v=(-i-h)/(2*o);u>=0&&u<=1&&(n[l++]=u),v>=0&&v<=1&&(n[l++]=v)}}return l}function Yl(r,t,e,a,n,i){var o=(t-r)*n+r,s=(e-t)*n+t,l=(a-e)*n+e,u=(s-o)*n+o,f=(l-s)*n+s,h=(f-u)*n+u;i[0]=r,i[1]=o,i[2]=u,i[3]=h,i[4]=h,i[5]=f,i[6]=l,i[7]=a}function PC(r,t,e,a,n,i,o,s,l,u,f){var h,v=.005,c=1/0,d,p,g,y;mr[0]=l,mr[1]=u;for(var m=0;m<1;m+=.05)Be[0]=te(r,e,n,o,m),Be[1]=te(t,a,i,s,m),g=ci(mr,Be),g<c&&(h=m,c=g);c=1/0;for(var _=0;_<32&&!(v<fS);_++)d=h-v,p=h+v,Be[0]=te(r,e,n,o,d),Be[1]=te(t,a,i,s,d),g=ci(Be,mr),d>=0&&g<c?(h=d,c=g):(vi[0]=te(r,e,n,o,p),vi[1]=te(t,a,i,s,p),y=ci(vi,mr),p<=1&&y<c?(h=p,c=y):v*=.5);return ma(c)}function RC(r,t,e,a,n,i,o,s,l){for(var u=r,f=t,h=0,v=1/l,c=1;c<=l;c++){var d=c*v,p=te(r,e,n,o,d),g=te(t,a,i,s,d),y=p-u,m=g-f;h+=Math.sqrt(y*y+m*m),u=p,f=g}return h}function Se(r,t,e,a){var n=1-a;return n*(n*r+2*a*t)+a*a*e}function jp(r,t,e,a){return 2*((1-a)*(t-r)+a*(e-t))}function EC(r,t,e,a,n){var i=r-2*t+e,o=2*(t-r),s=r-a,l=0;if(fa(i)){if(hS(o)){var u=-s/o;u>=0&&u<=1&&(n[l++]=u)}}else{var f=o*o-4*i*s;if(fa(f)){var u=-o/(2*i);u>=0&&u<=1&&(n[l++]=u)}else if(f>0){var h=ma(f),u=(-o+h)/(2*i),v=(-o-h)/(2*i);u>=0&&u<=1&&(n[l++]=u),v>=0&&v<=1&&(n[l++]=v)}}return l}function vS(r,t,e){var a=r+e-2*t;return a===0?.5:(r-t)/a}function Zl(r,t,e,a,n){var i=(t-r)*a+r,o=(e-t)*a+t,s=(o-i)*a+i;n[0]=r,n[1]=i,n[2]=s,n[3]=s,n[4]=o,n[5]=e}function kC(r,t,e,a,n,i,o,s,l){var u,f=.005,h=1/0;mr[0]=o,mr[1]=s;for(var v=0;v<1;v+=.05){Be[0]=Se(r,e,n,v),Be[1]=Se(t,a,i,v);var c=ci(mr,Be);c<h&&(u=v,h=c)}h=1/0;for(var d=0;d<32&&!(f<fS);d++){var p=u-f,g=u+f;Be[0]=Se(r,e,n,p),Be[1]=Se(t,a,i,p);var c=ci(Be,mr);if(p>=0&&c<h)u=p,h=c;else{vi[0]=Se(r,e,n,g),vi[1]=Se(t,a,i,g);var y=ci(vi,mr);g<=1&&y<h?(u=g,h=y):f*=.5}}return ma(h)}function OC(r,t,e,a,n,i,o){for(var s=r,l=t,u=0,f=1/o,h=1;h<=o;h++){var v=h*f,c=Se(r,e,n,v),d=Se(t,a,i,v),p=c-s,g=d-l;u+=Math.sqrt(p*p+g*g),s=c,l=d}return u}var BC=/cubic-bezier\(([0-9,\.e ]+)\)/;function dS(r){var t=r&&BC.exec(r);if(t){var e=t[1].split(","),a=+Sr(e[0]),n=+Sr(e[1]),i=+Sr(e[2]),o=+Sr(e[3]);if(isNaN(a+n+i+o))return;var s=[];return function(l){return l<=0?0:l>=1?1:Ul(0,a,i,1,l,s)&&te(0,n,o,1,s[0])}}}var NC=(function(){function r(t){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=t.loop||!1,this.onframe=t.onframe||re,this.ondestroy=t.ondestroy||re,this.onrestart=t.onrestart||re,t.easing&&this.setEasing(t.easing)}return r.prototype.step=function(t,e){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),this._paused){this._pausedTime+=e;return}var a=this._life,n=t-this._startTime-this._pausedTime,i=n/a;i<0&&(i=0),i=Math.min(i,1);var o=this.easingFunc,s=o?o(i):i;if(this.onframe(s),i===1)if(this.loop){var l=n%a;this._startTime=t-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(t){this.easing=t,this.easingFunc=Q(t)?t:To[t]||dS(t)},r})(),pS=(function(){function r(t){this.value=t}return r})(),zC=(function(){function r(){this._len=0}return r.prototype.insert=function(t){var e=new pS(t);return this.insertEntry(e),e},r.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},r.prototype.remove=function(t){var e=t.prev,a=t.next;e?e.next=a:this.head=a,a?a.prev=e:this.tail=e,t.next=t.prev=null,this._len--},r.prototype.len=function(){return this._len},r.prototype.clear=function(){this.head=this.tail=null,this._len=0},r})(),_i=(function(){function r(t){this._list=new zC,this._maxSize=10,this._map={},this._maxSize=t}return r.prototype.put=function(t,e){var a=this._list,n=this._map,i=null;if(n[t]==null){var o=a.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=a.head;a.remove(l),delete n[l.key],i=l.value,this._lastRemovedEntry=l}s?s.value=e:s=new pS(e),s.key=t,a.insertEntry(s),n[t]=s}return i},r.prototype.get=function(t){var e=this._map[t],a=this._list;if(e!=null)return e!==a.tail&&(a.remove(e),a.insertEntry(e)),e.value},r.prototype.clear=function(){this._list.clear(),this._map={}},r.prototype.len=function(){return this._list.len()},r})(),Jp={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 ar(r){return r=Math.round(r),r<0?0:r>255?255:r}function VC(r){return r=Math.round(r),r<0?0:r>360?360:r}function Oo(r){return r<0?0:r>1?1:r}function wf(r){var t=r;return t.length&&t.charAt(t.length-1)==="%"?ar(parseFloat(t)/100*255):ar(parseInt(t,10))}function yn(r){var t=r;return t.length&&t.charAt(t.length-1)==="%"?Oo(parseFloat(t)/100):Oo(parseFloat(t))}function Tf(r,t,e){return e<0?e+=1:e>1&&(e-=1),e*6<1?r+(t-r)*e*6:e*2<1?t:e*3<2?r+(t-r)*(2/3-e)*6:r}function ha(r,t,e){return r+(t-r)*e}function Re(r,t,e,a,n){return r[0]=t,r[1]=e,r[2]=a,r[3]=n,r}function dc(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r}var gS=new _i(20),As=null;function zn(r,t){As&&dc(As,t),As=gS.put(r,As||t.slice())}function Ge(r,t){if(r){t=t||[];var e=gS.get(r);if(e)return dc(t,e);r=r+"";var a=r.replace(/ /g,"").toLowerCase();if(a in Jp)return dc(t,Jp[a]),zn(r,t),t;var n=a.length;if(a.charAt(0)==="#"){if(n===4||n===5){var i=parseInt(a.slice(1,4),16);if(!(i>=0&&i<=4095)){Re(t,0,0,0,1);return}return Re(t,(i&3840)>>4|(i&3840)>>8,i&240|(i&240)>>4,i&15|(i&15)<<4,n===5?parseInt(a.slice(4),16)/15:1),zn(r,t),t}else if(n===7||n===9){var i=parseInt(a.slice(1,7),16);if(!(i>=0&&i<=16777215)){Re(t,0,0,0,1);return}return Re(t,(i&16711680)>>16,(i&65280)>>8,i&255,n===9?parseInt(a.slice(7),16)/255:1),zn(r,t),t}return}var o=a.indexOf("("),s=a.indexOf(")");if(o!==-1&&s+1===n){var l=a.substr(0,o),u=a.substr(o+1,s-(o+1)).split(","),f=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?Re(t,+u[0],+u[1],+u[2],1):Re(t,0,0,0,1);f=yn(u.pop());case"rgb":if(u.length>=3)return Re(t,wf(u[0]),wf(u[1]),wf(u[2]),u.length===3?f:yn(u[3])),zn(r,t),t;Re(t,0,0,0,1);return;case"hsla":if(u.length!==4){Re(t,0,0,0,1);return}return u[3]=yn(u[3]),pc(u,t),zn(r,t),t;case"hsl":if(u.length!==3){Re(t,0,0,0,1);return}return pc(u,t),zn(r,t),t;default:return}}Re(t,0,0,0,1)}}function pc(r,t){var e=(parseFloat(r[0])%360+360)%360/360,a=yn(r[1]),n=yn(r[2]),i=n<=.5?n*(a+1):n+a-n*a,o=n*2-i;return t=t||[],Re(t,ar(Tf(o,i,e+1/3)*255),ar(Tf(o,i,e)*255),ar(Tf(o,i,e-1/3)*255),1),r.length===4&&(t[3]=r[3]),t}function FC(r){if(r){var t=r[0]/255,e=r[1]/255,a=r[2]/255,n=Math.min(t,e,a),i=Math.max(t,e,a),o=i-n,s=(i+n)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(i+n):u=o/(2-i-n);var f=((i-t)/6+o/2)/o,h=((i-e)/6+o/2)/o,v=((i-a)/6+o/2)/o;t===i?l=v-h:e===i?l=1/3+f-v:a===i&&(l=2/3+h-f),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,t){var e=Ge(r);if(e){for(var a=0;a<3;a++)t<0?e[a]=e[a]*(1-t)|0:e[a]=(255-e[a])*t+e[a]|0,e[a]>255?e[a]=255:e[a]<0&&(e[a]=0);return Wr(e,e.length===4?"rgba":"rgb")}}function Cf(r,t,e){if(!(!(t&&t.length)||!(r>=0&&r<=1))){e=e||[];var a=r*(t.length-1),n=Math.floor(a),i=Math.ceil(a),o=t[n],s=t[i],l=a-n;return e[0]=ar(ha(o[0],s[0],l)),e[1]=ar(ha(o[1],s[1],l)),e[2]=ar(ha(o[2],s[2],l)),e[3]=Oo(ha(o[3],s[3],l)),e}}function GC(r,t,e){if(!(!(t&&t.length)||!(r>=0&&r<=1))){var a=r*(t.length-1),n=Math.floor(a),i=Math.ceil(a),o=Ge(t[n]),s=Ge(t[i]),l=a-n,u=Wr([ar(ha(o[0],s[0],l)),ar(ha(o[1],s[1],l)),ar(ha(o[2],s[2],l)),Oo(ha(o[3],s[3],l))],"rgba");return e?{color:u,leftIndex:n,rightIndex:i,value:a}:u}}function _a(r,t,e,a){var n=Ge(r);if(r)return n=FC(n),t!=null&&(n[0]=VC(Q(t)?t(n[0]):t)),e!=null&&(n[1]=yn(Q(e)?e(n[1]):e)),a!=null&&(n[2]=yn(Q(a)?a(n[2]):a)),Wr(pc(n),"rgba")}function yS(r,t){var e=Ge(r);if(e&&t!=null)return e[3]=Oo(t),Wr(e,"rgba")}function Wr(r,t){if(!(!r||!r.length)){var e=r[0]+","+r[1]+","+r[2];return(t==="rgba"||t==="hsva"||t==="hsla")&&(e+=","+r[3]),t+"("+e+")"}}function Xl(r,t){var e=Ge(r);return e?(.299*e[0]+.587*e[1]+.114*e[2])*e[3]/255+(1-e[3])*t:0}var tg=new _i(100);function eg(r){if(X(r)){var t=tg.get(r);return t||(t=gc(r,-.1),tg.put(r,t)),t}else if(Eu(r)){var e=F({},r);return e.colorStops=U(r.colorStops,function(a){return{offset:a.offset,color:gc(a.color,-.1)}}),e}return r}function HC(r){return r.type==="linear"}function WC(r){return r.type==="radial"}(function(){return ct.hasGlobalWindow&&Q(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}})();var yc=Array.prototype.slice;function Nr(r,t,e){return(t-r)*e+r}function Mf(r,t,e,a){for(var n=t.length,i=0;i<n;i++)r[i]=Nr(t[i],e[i],a);return r}function UC(r,t,e,a){for(var n=t.length,i=n&&t[0].length,o=0;o<n;o++){r[o]||(r[o]=[]);for(var s=0;s<i;s++)r[o][s]=Nr(t[o][s],e[o][s],a)}return r}function Ds(r,t,e,a){for(var n=t.length,i=0;i<n;i++)r[i]=t[i]+e[i]*a;return r}function rg(r,t,e,a){for(var n=t.length,i=n&&t[0].length,o=0;o<n;o++){r[o]||(r[o]=[]);for(var s=0;s<i;s++)r[o][s]=t[o][s]+e[o][s]*a}return r}function YC(r,t){for(var e=r.length,a=t.length,n=e>a?t:r,i=Math.min(e,a),o=n[i-1]||{color:[0,0,0,0],offset:0},s=i;s<Math.max(e,a);s++)n.push({offset:o.offset,color:o.color.slice()})}function ZC(r,t,e){var a=r,n=t;if(!(!a.push||!n.push)){var i=a.length,o=n.length;if(i!==o){var s=i>o;if(s)a.length=o;else for(var l=i;l<o;l++)a.push(e===1?n[l]:yc.call(n[l]))}for(var u=a[0]&&a[0].length,l=0;l<a.length;l++)if(e===1)isNaN(a[l])&&(a[l]=n[l]);else for(var f=0;f<u;f++)isNaN(a[l][f])&&(a[l][f]=n[l][f])}}function Cl(r){if(xe(r)){var t=r.length;if(xe(r[0])){for(var e=[],a=0;a<t;a++)e.push(yc.call(r[a]));return e}return yc.call(r)}return r}function Ml(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 XC(r){return xe(r&&r[0])?2:1}var Ls=0,Al=1,mS=2,po=3,mc=4,_c=5,ag=6;function ng(r){return r===mc||r===_c}function Is(r){return r===Al||r===mS}var Gi=[0,0,0,0],$C=(function(){function r(t){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=t}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(t,e,a){this._needsSort=!0;var n=this.keyframes,i=n.length,o=!1,s=ag,l=e;if(xe(e)){var u=XC(e);s=u,(u===1&&!bt(e[0])||u===2&&!bt(e[0][0]))&&(o=!0)}else if(bt(e)&&!Hr(e))s=Ls;else if(X(e))if(!isNaN(+e))s=Ls;else{var f=Ge(e);f&&(l=f,s=po)}else if(Eu(e)){var h=F({},l);h.colorStops=U(e.colorStops,function(c){return{offset:c.offset,color:Ge(c.color)}}),HC(e)?s=mc:WC(e)&&(s=_c),l=h}i===0?this.valType=s:(s!==this.valType||s===ag)&&(o=!0),this.discrete=this.discrete||o;var v={time:t,value:l,rawValue:e,percent:0};return a&&(v.easing=a,v.easingFunc=Q(a)?a:To[a]||dS(a)),n.push(v),v},r.prototype.prepare=function(t,e){var a=this.keyframes;this._needsSort&&a.sort(function(p,g){return p.time-g.time});for(var n=this.valType,i=a.length,o=a[i-1],s=this.discrete,l=Is(n),u=ng(n),f=0;f<i;f++){var h=a[f],v=h.value,c=o.value;h.percent=h.time/t,s||(l&&f!==i-1?ZC(v,c,n):u&&YC(v.colorStops,c.colorStops))}if(!s&&n!==_c&&e&&this.needsAnimate()&&e.needsAnimate()&&n===e.valType&&!e._finished){this._additiveTrack=e;for(var d=a[0].value,f=0;f<i;f++)n===Ls?a[f].additiveValue=a[f].value-d:n===po?a[f].additiveValue=Ds([],a[f].value,d,-1):Is(n)&&(a[f].additiveValue=n===Al?Ds([],a[f].value,d,-1):rg([],a[f].value,d,-1))}},r.prototype.step=function(t,e){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var a=this._additiveTrack!=null,n=a?"additiveValue":"value",i=this.valType,o=this.keyframes,s=o.length,l=this.propName,u=i===po,f,h=this._lastFr,v=Math.min,c,d;if(s===1)c=d=o[0];else{if(e<0)f=0;else if(e<this._lastFrP){var p=v(h+1,s-1);for(f=p;f>=0&&!(o[f].percent<=e);f--);f=v(f,s-2)}else{for(f=h;f<s&&!(o[f].percent>e);f++);f=v(f-1,s-2)}d=o[f+1],c=o[f]}if(c&&d){this._lastFr=f,this._lastFrP=e;var g=d.percent-c.percent,y=g===0?1:v((e-c.percent)/g,1);d.easingFunc&&(y=d.easingFunc(y));var m=a?this._additiveValue:u?Gi:t[l];if((Is(i)||u)&&!m&&(m=this._additiveValue=[]),this.discrete)t[l]=y<1?c.rawValue:d.rawValue;else if(Is(i))i===Al?Mf(m,c[n],d[n],y):UC(m,c[n],d[n],y);else if(ng(i)){var _=c[n],S=d[n],x=i===mc;t[l]={type:x?"linear":"radial",x:Nr(_.x,S.x,y),y:Nr(_.y,S.y,y),colorStops:U(_.colorStops,function(w,T){var D=S.colorStops[T];return{offset:Nr(w.offset,D.offset,y),color:Ml(Mf([],w.color,D.color,y))}}),global:S.global},x?(t[l].x2=Nr(_.x2,S.x2,y),t[l].y2=Nr(_.y2,S.y2,y)):t[l].r=Nr(_.r,S.r,y)}else if(u)Mf(m,c[n],d[n],y),a||(t[l]=Ml(m));else{var b=Nr(c[n],d[n],y);a?this._additiveValue=b:t[l]=b}a&&this._addToTarget(t)}}},r.prototype._addToTarget=function(t){var e=this.valType,a=this.propName,n=this._additiveValue;e===Ls?t[a]=t[a]+n:e===po?(Ge(t[a],Gi),Ds(Gi,Gi,n,1),t[a]=Ml(Gi)):e===Al?Ds(t[a],t[a],n,1):e===mS&&rg(t[a],t[a],n,1)},r})(),td=(function(){function r(t,e,a,n){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=t,this._loop=e,e&&n){$v("Can' use additive animation on looped animation.");return}this._additiveAnimators=n,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(t){this._target=t},r.prototype.when=function(t,e,a){return this.whenWithKeys(t,e,Pt(e),a)},r.prototype.whenWithKeys=function(t,e,a,n){for(var i=this._tracks,o=0;o<a.length;o++){var s=a[o],l=i[s];if(!l){l=i[s]=new $C(s);var u=void 0,f=this._getAdditiveTrack(s);if(f){var h=f.keyframes,v=h[h.length-1];u=v&&v.value,f.valType===po&&u&&(u=Ml(u))}else u=this._target[s];if(u==null)continue;t>0&&l.addKeyframe(0,Cl(u),n),this._trackKeys.push(s)}l.addKeyframe(t,Cl(e[s]),n)}return this._maxTime=Math.max(this._maxTime,t),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(t){return this._maxTime=t,this._force=!0,this},r.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var e=t.length,a=0;a<e;a++)t[a].call(this)},r.prototype._abortedCallback=function(){this._setTracksFinished();var t=this.animation,e=this._abortedCbs;if(t&&t.removeClip(this._clip),this._clip=null,e)for(var a=0;a<e.length;a++)e[a].call(this)},r.prototype._setTracksFinished=function(){for(var t=this._tracks,e=this._trackKeys,a=0;a<e.length;a++)t[e[a]].setFinished()},r.prototype._getAdditiveTrack=function(t){var e,a=this._additiveAnimators;if(a)for(var n=0;n<a.length;n++){var i=a[n].getTrack(t);i&&(e=i)}return e},r.prototype.start=function(t){if(!(this._started>0)){this._started=1;for(var e=this,a=[],n=this._maxTime||0,i=0;i<this._trackKeys.length;i++){var o=this._trackKeys[i],s=this._tracks[o],l=this._getAdditiveTrack(o),u=s.keyframes,f=u.length;if(s.prepare(n,l),s.needsAnimate())if(!this._allowDiscrete&&s.discrete){var h=u[f-1];h&&(e._target[s.propName]=h.rawValue),s.setFinished()}else a.push(s)}if(a.length||this._force){var v=new NC({life:n,loop:this._loop,delay:this._delay||0,onframe:function(c){e._started=2;var d=e._additiveAnimators;if(d){for(var p=!1,g=0;g<d.length;g++)if(d[g]._clip){p=!0;break}p||(e._additiveAnimators=null)}for(var g=0;g<a.length;g++)a[g].step(e._target,c);var y=e._onframeCbs;if(y)for(var g=0;g<y.length;g++)y[g](e._target,c)},ondestroy:function(){e._doneCallback()}});this._clip=v,this.animation&&this.animation.addClip(v),t&&v.setEasing(t)}else this._doneCallback();return this}},r.prototype.stop=function(t){if(this._clip){var e=this._clip;t&&e.onframe(1),this._abortedCallback()}},r.prototype.delay=function(t){return this._delay=t,this},r.prototype.during=function(t){return t&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(t)),this},r.prototype.done=function(t){return t&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(t)),this},r.prototype.aborted=function(t){return t&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(t)),this},r.prototype.getClip=function(){return this._clip},r.prototype.getTrack=function(t){return this._tracks[t]},r.prototype.getTracks=function(){var t=this;return U(this._trackKeys,function(e){return t._tracks[e]})},r.prototype.stopTracks=function(t,e){if(!t.length||!this._clip)return!0;for(var a=this._tracks,n=this._trackKeys,i=0;i<t.length;i++){var o=a[t[i]];o&&!o.isFinished()&&(e?o.step(this._target,1):this._started===1&&o.step(this._target,0),o.setFinished())}for(var s=!0,i=0;i<n.length;i++)if(!a[n[i]].isFinished()){s=!1;break}return s&&this._abortedCallback(),s},r.prototype.saveTo=function(t,e,a){if(t){e=e||this._trackKeys;for(var n=0;n<e.length;n++){var i=e[n],o=this._tracks[i];if(!(!o||o.isFinished())){var s=o.keyframes,l=s[a?0:s.length-1];l&&(t[i]=Cl(l.rawValue))}}}},r.prototype.__changeFinalValue=function(t,e){e=e||Pt(t);for(var a=0;a<e.length;a++){var n=e[a],i=this._tracks[n];if(i){var o=i.keyframes;if(o.length>1){var s=o.pop();i.addKeyframe(s.time,t[n]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},r})();function li(){return new Date().getTime()}var KC=(function(r){B(t,r);function t(e){var a=r.call(this)||this;return a._running=!1,a._time=0,a._pausedTime=0,a._pauseStart=0,a._paused=!1,e=e||{},a.stage=e.stage||{},a}return t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var a=e.getClip();a&&this.addClip(a)},t.prototype.removeClip=function(e){if(e.animation){var a=e.prev,n=e.next;a?a.next=n:this._head=n,n?n.prev=a:this._tail=a,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var a=e.getClip();a&&this.removeClip(a),e.animation=null},t.prototype.update=function(e){for(var a=li()-this._pausedTime,n=a-this._time,i=this._head;i;){var o=i.next,s=i.step(a,n);s&&(i.ondestroy(),this.removeClip(i)),i=o}this._time=a,e||(this.trigger("frame",n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function a(){e._running&&(Hl(a),!e._paused&&e.update())}Hl(a)},t.prototype.start=function(){this._running||(this._time=li(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=li(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=li()-this._pauseStart,this._paused=!1)},t.prototype.clear=function(){for(var e=this._head;e;){var a=e.next;e.prev=e.next=e.animation=null,e=a}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,a){a=a||{},this.start();var n=new td(e,a.loop);return this.addAnimator(n),n},t})(Ze),qC=300,Af=ct.domSupported,Df=(function(){var r=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],t=["touchstart","touchend","touchmove"],e={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},a=U(r,function(n){var i=n.replace("mouse","pointer");return e.hasOwnProperty(i)?i:n});return{mouse:r,touch:t,pointer:a}})(),ig={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},og=!1;function Sc(r){var t=r.pointerType;return t==="pen"||t==="touch"}function QC(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 Lf(r){r&&(r.zrByTouch=!0)}function jC(r,t){return Ee(r.dom,new JC(r,t),!0)}function _S(r,t){for(var e=t,a=!1;e&&e.nodeType!==9&&!(a=e.domBelongToZr||e!==t&&e===r.painterRoot);)e=e.parentNode;return a}var JC=(function(){function r(t,e){this.stopPropagation=re,this.stopImmediatePropagation=re,this.preventDefault=re,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY}return r})(),Je={mousedown:function(r){r=Ee(this.dom,r),this.__mayPointerCapture=[r.zrX,r.zrY],this.trigger("mousedown",r)},mousemove:function(r){r=Ee(this.dom,r);var t=this.__mayPointerCapture;t&&(r.zrX!==t[0]||r.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",r)},mouseup:function(r){r=Ee(this.dom,r),this.__togglePointerCapture(!1),this.trigger("mouseup",r)},mouseout:function(r){r=Ee(this.dom,r);var t=r.toElement||r.relatedTarget;_S(this,t)||(this.__pointerCapturing&&(r.zrEventControl="no_globalout"),this.trigger("mouseout",r))},wheel:function(r){og=!0,r=Ee(this.dom,r),this.trigger("mousewheel",r)},mousewheel:function(r){og||(r=Ee(this.dom,r),this.trigger("mousewheel",r))},touchstart:function(r){r=Ee(this.dom,r),Lf(r),this.__lastTouchMoment=new Date,this.handler.processGesture(r,"start"),Je.mousemove.call(this,r),Je.mousedown.call(this,r)},touchmove:function(r){r=Ee(this.dom,r),Lf(r),this.handler.processGesture(r,"change"),Je.mousemove.call(this,r)},touchend:function(r){r=Ee(this.dom,r),Lf(r),this.handler.processGesture(r,"end"),Je.mouseup.call(this,r),+new Date-+this.__lastTouchMoment<qC&&Je.click.call(this,r)},pointerdown:function(r){Je.mousedown.call(this,r)},pointermove:function(r){Sc(r)||Je.mousemove.call(this,r)},pointerup:function(r){Je.mouseup.call(this,r)},pointerout:function(r){Sc(r)||Je.mouseout.call(this,r)}};M(["click","dblclick","contextmenu"],function(r){Je[r]=function(t){t=Ee(this.dom,t),this.trigger(r,t)}});var bc={pointermove:function(r){Sc(r)||bc.mousemove.call(this,r)},pointerup:function(r){bc.mouseup.call(this,r)},mousemove:function(r){this.trigger("mousemove",r)},mouseup:function(r){var t=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",r),t&&(r.zrEventControl="only_globalout",this.trigger("mouseout",r))}};function tM(r,t){var e=t.domHandlers;ct.pointerEventsSupported?M(Df.pointer,function(a){Dl(t,a,function(n){e[a].call(r,n)})}):(ct.touchEventsSupported&&M(Df.touch,function(a){Dl(t,a,function(n){e[a].call(r,n),QC(t)})}),M(Df.mouse,function(a){Dl(t,a,function(n){n=Qv(n),t.touching||e[a].call(r,n)})}))}function eM(r,t){ct.pointerEventsSupported?M(ig.pointer,e):ct.touchEventsSupported||M(ig.mouse,e);function e(a){function n(i){i=Qv(i),_S(r,i.target)||(i=jC(r,i),t.domHandlers[a].call(r,i))}Dl(t,a,n,{capture:!0})}}function Dl(r,t,e,a){r.mounted[t]=e,r.listenerOpts[t]=a,hc(r.domTarget,t,e,a)}function If(r){var t=r.mounted;for(var e in t)t.hasOwnProperty(e)&&gC(r.domTarget,e,t[e],r.listenerOpts[e]);r.mounted={}}var sg=(function(){function r(t,e){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=t,this.domHandlers=e}return r})(),rM=(function(r){B(t,r);function t(e,a){var n=r.call(this)||this;return n.__pointerCapturing=!1,n.dom=e,n.painterRoot=a,n._localHandlerScope=new sg(e,Je),Af&&(n._globalHandlerScope=new sg(document,bc)),tM(n,n._localHandlerScope),n}return t.prototype.dispose=function(){If(this._localHandlerScope),Af&&If(this._globalHandlerScope)},t.prototype.setCursor=function(e){this.dom.style&&(this.dom.style.cursor=e||"default")},t.prototype.__togglePointerCapture=function(e){if(this.__mayPointerCapture=null,Af&&+this.__pointerCapturing^+e){this.__pointerCapturing=e;var a=this._globalHandlerScope;e?eM(this,a):If(a)}},t})(Ze),SS=1;ct.hasGlobalWindow&&(SS=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var $l=SS,xc=.4,wc="#333",Tc="#ccc",aM="#eee",lg=jv,ug=5e-5;function za(r){return r>ug||r<-ug}var Va=[],Vn=[],Pf=Fe(),Rf=Math.abs,hn=(function(){function r(){}return r.prototype.getLocalTransform=function(t){return r.getLocalTransform(this,t)},r.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},r.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},r.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},r.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},r.prototype.needLocalTransform=function(){return za(this.rotation)||za(this.x)||za(this.y)||za(this.scaleX-1)||za(this.scaleY-1)||za(this.skewX)||za(this.skewY)},r.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,e=this.needLocalTransform(),a=this.transform;if(!(e||t)){a&&(lg(a),this.invTransform=null);return}a=a||Fe(),e?this.getLocalTransform(a):lg(a),t&&(e?xo(a,t,a):Jv(a,t)),this.transform=a,this._resolveGlobalScaleRatio(a)},r.prototype._resolveGlobalScaleRatio=function(t){var e=this.globalScaleRatio;if(e!=null&&e!==1){this.getGlobalScale(Va);var a=Va[0]<0?-1:1,n=Va[1]<0?-1:1,i=((Va[0]-a)*e+a)/Va[0]||0,o=((Va[1]-n)*e+n)/Va[1]||0;t[0]*=i,t[1]*=i,t[2]*=o,t[3]*=o}this.invTransform=this.invTransform||Fe(),Ii(this.invTransform,t)},r.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},r.prototype.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],a=t[2]*t[2]+t[3]*t[3],n=Math.atan2(t[1],t[0]),i=Math.PI/2+n-Math.atan2(t[3],t[2]);a=Math.sqrt(a)*Math.cos(i),e=Math.sqrt(e),this.skewX=i,this.skewY=0,this.rotation=-n,this.x=+t[4],this.y=+t[5],this.scaleX=e,this.scaleY=a,this.originX=0,this.originY=0}},r.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(t.invTransform=t.invTransform||Fe(),xo(Vn,t.invTransform,e),e=Vn);var a=this.originX,n=this.originY;(a||n)&&(Pf[4]=a,Pf[5]=n,xo(Vn,e,Pf),Vn[4]-=a,Vn[5]-=n,e=Vn),this.setLocalTransform(e)}},r.prototype.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},r.prototype.transformCoordToLocal=function(t,e){var a=[t,e],n=this.invTransform;return n&&pe(a,a,n),a},r.prototype.transformCoordToGlobal=function(t,e){var a=[t,e],n=this.transform;return n&&pe(a,a,n),a},r.prototype.getLineScale=function(){var t=this.transform;return t&&Rf(t[0]-1)>1e-10&&Rf(t[3]-1)>1e-10?Math.sqrt(Rf(t[0]*t[3]-t[2]*t[1])):1},r.prototype.copyTransform=function(t){Cc(this,t)},r.getLocalTransform=function(t,e){e=e||[];var a=t.originX||0,n=t.originY||0,i=t.scaleX,o=t.scaleY,s=t.anchorX,l=t.anchorY,u=t.rotation||0,f=t.x,h=t.y,v=t.skewX?Math.tan(t.skewX):0,c=t.skewY?Math.tan(-t.skewY):0;if(a||n||s||l){var d=a+s,p=n+l;e[4]=-d*i-v*p*o,e[5]=-p*o-c*d*i}else e[4]=e[5]=0;return e[0]=i,e[3]=o,e[1]=c*i,e[2]=v*o,u&&Bu(e,e,u),e[4]+=a+f,e[5]+=n+h,e},r.initDefaultProps=(function(){var t=r.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0})(),r})(),Bo=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function Cc(r,t){for(var e=0;e<Bo.length;e++){var a=Bo[e];r[a]=t[a]}}function Tr(r){Ps||(Ps=new _i(100)),r=r||xa;var t=Ps.get(r);return t||(t={font:r,strWidthCache:new _i(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:ir.measureText("国",r).width,asciiCharWidth:ir.measureText("a",r).width},Ps.put(r,t)),t}var Ps;function nM(r){if(!(Ef>=fg)){r=r||xa;for(var t=[],e=+new Date,a=0;a<=127;a++)t[a]=ir.measureText(String.fromCharCode(a),r).width;var n=+new Date-e;return n>16?Ef=fg:n>2&&Ef++,t}}var Ef=0,fg=5;function bS(r,t){return r.asciiWidthMapTried||(r.asciiWidthMap=nM(r.font),r.asciiWidthMapTried=!0),0<=t&&t<=127?r.asciiWidthMap!=null?r.asciiWidthMap[t]:r.asciiCharWidth:r.stWideCharWidth}function Cr(r,t){var e=r.strWidthCache,a=e.get(t);return a==null&&(a=ir.measureText(t,r.font).width,e.put(t,a)),a}function hg(r,t,e,a){var n=Cr(Tr(t),r),i=Nu(t),o=Si(0,n,e),s=mn(0,i,a),l=new ot(o,s,n,i);return l}function ed(r,t,e,a){var n=((r||"")+"").split(`
|
|
15
|
+
`),i=n.length;if(i===1)return hg(n[0],t,e,a);for(var o=new ot(0,0,0,0),s=0;s<n.length;s++){var l=hg(n[s],t,e,a);s===0?o.copy(l):o.union(l)}return o}function Si(r,t,e,a){return e==="right"?a?r+=t:r-=t:e==="center"&&(a?r+=t/2:r-=t/2),r}function mn(r,t,e,a){return e==="middle"?a?r+=t/2:r-=t/2:e==="bottom"&&(a?r+=t:r-=t),r}function Nu(r){return Tr(r).stWideCharWidth}function Ar(r,t){return typeof r=="string"?r.lastIndexOf("%")>=0?parseFloat(r)/100*t:parseFloat(r):r}function Kl(r,t,e){var a=t.position||"inside",n=t.distance!=null?t.distance:5,i=e.height,o=e.width,s=i/2,l=e.x,u=e.y,f="left",h="top";if(a instanceof Array)l+=Ar(a[0],e.width),u+=Ar(a[1],e.height),f=null,h=null;else switch(a){case"left":l-=n,u+=s,f="right",h="middle";break;case"right":l+=n+o,u+=s,h="middle";break;case"top":l+=o/2,u-=n,f="center",h="bottom";break;case"bottom":l+=o/2,u+=i+n,f="center";break;case"inside":l+=o/2,u+=s,f="center",h="middle";break;case"insideLeft":l+=n,u+=s,h="middle";break;case"insideRight":l+=o-n,u+=s,f="right",h="middle";break;case"insideTop":l+=o/2,u+=n,f="center";break;case"insideBottom":l+=o/2,u+=i-n,f="center",h="bottom";break;case"insideTopLeft":l+=n,u+=n;break;case"insideTopRight":l+=o-n,u+=n,f="right";break;case"insideBottomLeft":l+=n,u+=i-n,h="bottom";break;case"insideBottomRight":l+=o-n,u+=i-n,f="right",h="bottom";break}return r=r||{},r.x=l,r.y=u,r.align=f,r.verticalAlign=h,r}var kf="__zr_normal__",Of=Bo.concat(["ignore"]),iM=wa(Bo,function(r,t){return r[t]=!0,r},{ignore:!1}),Fn={},oM=new ot(0,0,0,0),Rs=[],zu=(function(){function r(t){this.id=q_(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return r.prototype._init=function(t){this.attr(t)},r.prototype.drift=function(t,e,a){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0;break}var n=this.transform;n||(n=this.transform=[1,0,0,1,0,0]),n[4]+=t,n[5]+=e,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(t){var e=this._textContent;if(e&&(!e.ignore||t)){this.textConfig||(this.textConfig={});var a=this.textConfig,n=a.local,i=e.innerTransformable,o=void 0,s=void 0,l=!1;i.parent=n?this:null;var u=!1;i.copyTransform(e);var f=a.position!=null,h=a.autoOverflowArea,v=void 0;if((h||f)&&(v=oM,a.layoutRect?v.copy(a.layoutRect):v.copy(this.getBoundingRect()),n||v.applyTransform(this.transform)),f){this.calculateTextPosition?this.calculateTextPosition(Fn,a,v):Kl(Fn,a,v),i.x=Fn.x,i.y=Fn.y,o=Fn.align,s=Fn.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=Ar(c[0],v.width),p=Ar(c[1],v.height)),u=!0,i.originX=-i.x+d+(n?0:v.x),i.originY=-i.y+p+(n?0:v.y)}}a.rotation!=null&&(i.rotation=a.rotation);var g=a.offset;g&&(i.x+=g[0],i.y+=g[1],u||(i.originX=-g[0],i.originY=-g[1]));var y=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={});if(h){var m=y.overflowRect=y.overflowRect||new ot(0,0,0,0);i.getLocalTransform(Rs),Ii(Rs,Rs),ot.copy(m,v),m.applyTransform(Rs)}else y.overflowRect=null;var _=a.inside==null?typeof a.position=="string"&&a.position.indexOf("inside")>=0:a.inside,S=void 0,x=void 0,b=void 0;_&&this.canBeInsideText()?(S=a.insideFill,x=a.insideStroke,(S==null||S==="auto")&&(S=this.getInsideTextFill()),(x==null||x==="auto")&&(x=this.getInsideTextStroke(S),b=!0)):(S=a.outsideFill,x=a.outsideStroke,(S==null||S==="auto")&&(S=this.getOutsideFill()),(x==null||x==="auto")&&(x=this.getOutsideStroke(S),b=!0)),S=S||"#000",(S!==y.fill||x!==y.stroke||b!==y.autoStroke||o!==y.align||s!==y.verticalAlign)&&(l=!0,y.fill=S,y.stroke=x,y.autoStroke=b,y.align=o,y.verticalAlign=s,e.setDefaultTextStyle(y)),e.__dirty|=Me,l&&e.dirtyStyle(!0)}},r.prototype.canBeInsideText=function(){return!0},r.prototype.getInsideTextFill=function(){return"#fff"},r.prototype.getInsideTextStroke=function(t){return"#000"},r.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Tc:wc},r.prototype.getOutsideStroke=function(t){var e=this.__zr&&this.__zr.getBackgroundColor(),a=typeof e=="string"&&Ge(e);a||(a=[255,255,255,1]);for(var n=a[3],i=this.__zr.isDarkMode(),o=0;o<3;o++)a[o]=a[o]*n+(i?0:255)*(1-n);return a[3]=1,Wr(a,"rgba")},r.prototype.traverse=function(t,e){},r.prototype.attrKV=function(t,e){t==="textConfig"?this.setTextConfig(e):t==="textContent"?this.setTextContent(e):t==="clipPath"?this.setClipPath(e):t==="extra"?(this.extra=this.extra||{},F(this.extra,e)):this[t]=e},r.prototype.hide=function(){this.ignore=!0,this.markRedraw()},r.prototype.show=function(){this.ignore=!1,this.markRedraw()},r.prototype.attr=function(t,e){if(typeof t=="string")this.attrKV(t,e);else if(j(t))for(var a=t,n=Pt(a),i=0;i<n.length;i++){var o=n[i];this.attrKV(o,t[o])}return this.markRedraw(),this},r.prototype.saveCurrentToNormalState=function(t){this._innerSaveToNormal(t);for(var e=this._normalState,a=0;a<this.animators.length;a++){var n=this.animators[a],i=n.__fromStateTransition;if(!(n.getLoop()||i&&i!==kf)){var o=n.targetName,s=o?e[o]:e;n.saveTo(s)}}},r.prototype._innerSaveToNormal=function(t){var e=this._normalState;e||(e=this._normalState={}),t.textConfig&&!e.textConfig&&(e.textConfig=this.textConfig),this._savePrimaryToNormal(t,e,Of)},r.prototype._savePrimaryToNormal=function(t,e,a){for(var n=0;n<a.length;n++){var i=a[n];t[i]!=null&&!(i in e)&&(e[i]=this[i])}},r.prototype.hasState=function(){return this.currentStates.length>0},r.prototype.getState=function(t){return this.states[t]},r.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},r.prototype.clearStates=function(t){this.useState(kf,!1,t)},r.prototype.useState=function(t,e,a,n){var i=t===kf,o=this.hasState();if(!(!o&&i)){var s=this.currentStates,l=this.stateTransition;if(!(dt(s,t)>=0&&(e||s.length===1))){var u;if(this.stateProxy&&!i&&(u=this.stateProxy(t)),u||(u=this.states&&this.states[t]),!u&&!i){$v("State "+t+" not exists.");return}i||this.saveCurrentToNormalState(u);var f=!!(u&&u.hoverLayer||n);f&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,u,this._normalState,e,!a&&!this.__inHover&&l&&l.duration>0,l);var h=this._textContent,v=this._textGuide;return h&&h.useState(t,e,a,f),v&&v.useState(t,e,a,f),i?(this.currentStates=[],this._normalState={}):e?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!f&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Me),u}}},r.prototype.useStates=function(t,e,a){if(!t.length)this.clearStates();else{var n=[],i=this.currentStates,o=t.length,s=o===i.length;if(s){for(var l=0;l<o;l++)if(t[l]!==i[l]){s=!1;break}}if(s)return;for(var l=0;l<o;l++){var u=t[l],f=void 0;this.stateProxy&&(f=this.stateProxy(u,t)),f||(f=this.states[u]),f&&n.push(f)}var h=n[o-1],v=!!(h&&h.hoverLayer||a);v&&this._toggleHoverLayerFlag(!0);var c=this._mergeStates(n),d=this.stateTransition;this.saveCurrentToNormalState(c),this._applyStateObj(t.join(","),c,this._normalState,!1,!e&&!this.__inHover&&d&&d.duration>0,d);var p=this._textContent,g=this._textGuide;p&&p.useStates(t,e,v),g&&g.useStates(t,e,v),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!v&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Me)}},r.prototype.isSilent=function(){for(var t=this;t;){if(t.silent)return!0;var e=t.__hostTarget;t=e?t.ignoreHostSilent?null:e:t.parent}return!1},r.prototype._updateAnimationTargets=function(){for(var t=0;t<this.animators.length;t++){var e=this.animators[t];e.targetName&&e.changeTarget(this[e.targetName])}},r.prototype.removeState=function(t){var e=dt(this.currentStates,t);if(e>=0){var a=this.currentStates.slice();a.splice(e,1),this.useStates(a)}},r.prototype.replaceState=function(t,e,a){var n=this.currentStates.slice(),i=dt(n,t),o=dt(n,e)>=0;i>=0?o?n.splice(i,1):n[i]=e:a&&!o&&n.push(e),this.useStates(n)},r.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},r.prototype._mergeStates=function(t){for(var e={},a,n=0;n<t.length;n++){var i=t[n];F(e,i),i.textConfig&&(a=a||{},F(a,i.textConfig))}return a&&(e.textConfig=a),e},r.prototype._applyStateObj=function(t,e,a,n,i,o){var s=!(e&&n);e&&e.textConfig?(this.textConfig=F({},n?this.textConfig:a.textConfig),F(this.textConfig,e.textConfig)):s&&a.textConfig&&(this.textConfig=a.textConfig);for(var l={},u=!1,f=0;f<Of.length;f++){var h=Of[f],v=i&&iM[h];e&&e[h]!=null?v?(u=!0,l[h]=e[h]):this[h]=e[h]:s&&a[h]!=null&&(v?(u=!0,l[h]=a[h]):this[h]=a[h])}if(!i)for(var f=0;f<this.animators.length;f++){var c=this.animators[f],d=c.targetName;c.getLoop()||c.__changeFinalValue(d?(e||a)[d]:e||a)}u&&this._transitionState(t,l,o)},r.prototype._attachComponent=function(t){if(!(t.__zr&&!t.__hostTarget)&&t!==this){var e=this.__zr;e&&t.addSelfToZr(e),t.__zr=e,t.__hostTarget=this}},r.prototype._detachComponent=function(t){t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__hostTarget=null},r.prototype.getClipPath=function(){return this._clipPath},r.prototype.setClipPath=function(t){this._clipPath&&this._clipPath!==t&&this.removeClipPath(),this._attachComponent(t),this._clipPath=t,this.markRedraw()},r.prototype.removeClipPath=function(){var t=this._clipPath;t&&(this._detachComponent(t),this._clipPath=null,this.markRedraw())},r.prototype.getTextContent=function(){return this._textContent},r.prototype.setTextContent=function(t){var e=this._textContent;e!==t&&(e&&e!==t&&this.removeTextContent(),t.innerTransformable=new hn,this._attachComponent(t),this._textContent=t,this.markRedraw())},r.prototype.setTextConfig=function(t){this.textConfig||(this.textConfig={}),F(this.textConfig,t),this.markRedraw()},r.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},r.prototype.removeTextContent=function(){var t=this._textContent;t&&(t.innerTransformable=null,this._detachComponent(t),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},r.prototype.getTextGuideLine=function(){return this._textGuide},r.prototype.setTextGuideLine=function(t){this._textGuide&&this._textGuide!==t&&this.removeTextGuideLine(),this._attachComponent(t),this._textGuide=t,this.markRedraw()},r.prototype.removeTextGuideLine=function(){var t=this._textGuide;t&&(this._detachComponent(t),this._textGuide=null,this.markRedraw())},r.prototype.markRedraw=function(){this.__dirty|=Me;var t=this.__zr;t&&(this.__inHover?t.refreshHover():t.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},r.prototype.dirty=function(){this.markRedraw()},r.prototype._toggleHoverLayerFlag=function(t){this.__inHover=t;var e=this._textContent,a=this._textGuide;e&&(e.__inHover=t),a&&(a.__inHover=t)},r.prototype.addSelfToZr=function(t){if(this.__zr!==t){this.__zr=t;var e=this.animators;if(e)for(var a=0;a<e.length;a++)t.animation.addAnimator(e[a]);this._clipPath&&this._clipPath.addSelfToZr(t),this._textContent&&this._textContent.addSelfToZr(t),this._textGuide&&this._textGuide.addSelfToZr(t)}},r.prototype.removeSelfFromZr=function(t){if(this.__zr){this.__zr=null;var e=this.animators;if(e)for(var a=0;a<e.length;a++)t.animation.removeAnimator(e[a]);this._clipPath&&this._clipPath.removeSelfFromZr(t),this._textContent&&this._textContent.removeSelfFromZr(t),this._textGuide&&this._textGuide.removeSelfFromZr(t)}},r.prototype.animate=function(t,e,a){var n=t?this[t]:this,i=new td(n,e,a);return t&&(i.targetName=t),this.addAnimator(i,t),i},r.prototype.addAnimator=function(t,e){var a=this.__zr,n=this;t.during(function(){n.updateDuringAnimation(e)}).done(function(){var i=n.animators,o=dt(i,t);o>=0&&i.splice(o,1)}),this.animators.push(t),a&&a.animation.addAnimator(t),a&&a.wakeUp()},r.prototype.updateDuringAnimation=function(t){this.markRedraw()},r.prototype.stopAnimation=function(t,e){for(var a=this.animators,n=a.length,i=[],o=0;o<n;o++){var s=a[o];!t||t===s.scope?s.stop(e):i.push(s)}return this.animators=i,this},r.prototype.animateTo=function(t,e,a){Bf(this,t,e,a)},r.prototype.animateFrom=function(t,e,a){Bf(this,t,e,a,!0)},r.prototype._transitionState=function(t,e,a,n){for(var i=Bf(this,e,a,n),o=0;o<i.length;o++)i[o].__fromStateTransition=t},r.prototype.getBoundingRect=function(){return null},r.prototype.getPaintRect=function(){return null},r.initDefaultProps=(function(){var t=r.prototype;t.type="element",t.name="",t.ignore=t.silent=t.ignoreHostSilent=t.isGroup=t.draggable=t.dragging=t.ignoreClip=t.__inHover=!1,t.__dirty=Me;function e(a,n,i,o){Object.defineProperty(t,a,{get:function(){if(!this[n]){var l=this[n]=[];s(this,l)}return this[n]},set:function(l){this[i]=l[0],this[o]=l[1],this[n]=l,s(this,l)}});function s(l,u){Object.defineProperty(u,0,{get:function(){return l[i]},set:function(f){l[i]=f}}),Object.defineProperty(u,1,{get:function(){return l[o]},set:function(f){l[o]=f}})}}Object.defineProperty&&(e("position","_legacyPos","x","y"),e("scale","_legacyScale","scaleX","scaleY"),e("origin","_legacyOrigin","originX","originY"))})(),r})();fe(zu,Ze);fe(zu,hn);function Bf(r,t,e,a,n){e=e||{};var i=[];xS(r,"",r,t,e,a,i,n);var o=i.length,s=!1,l=e.done,u=e.aborted,f=function(){s=!0,o--,o<=0&&(s?l&&l():u&&u())},h=function(){o--,o<=0&&(s?l&&l():u&&u())};o||l&&l(),i.length>0&&e.during&&i[0].during(function(d,p){e.during(p)});for(var v=0;v<i.length;v++){var c=i[v];f&&c.done(f),h&&c.aborted(h),e.force&&c.duration(e.duration),c.start(e.easing)}return i}function Nf(r,t,e){for(var a=0;a<e;a++)r[a]=t[a]}function sM(r){return xe(r[0])}function lM(r,t,e){if(xe(t[e]))if(xe(r[e])||(r[e]=[]),we(t[e])){var a=t[e].length;r[e].length!==a&&(r[e]=new t[e].constructor(a),Nf(r[e],t[e],a))}else{var n=t[e],i=r[e],o=n.length;if(sM(n))for(var s=n[0].length,l=0;l<o;l++)i[l]?Nf(i[l],n[l],s):i[l]=Array.prototype.slice.call(n[l]);else Nf(i,n,o);i.length=n.length}else r[e]=t[e]}function uM(r,t){return r===t||xe(r)&&xe(t)&&fM(r,t)}function fM(r,t){var e=r.length;if(e!==t.length)return!1;for(var a=0;a<e;a++)if(r[a]!==t[a])return!1;return!0}function xS(r,t,e,a,n,i,o,s){for(var l=Pt(a),u=n.duration,f=n.delay,h=n.additive,v=n.setToFinal,c=!j(i),d=r.animators,p=[],g=0;g<l.length;g++){var y=l[g],m=a[y];if(m!=null&&e[y]!=null&&(c||i[y]))if(j(m)&&!xe(m)&&!Eu(m)){if(t){s||(e[y]=m,r.updateDuringAnimation(t));continue}xS(r,y,e[y],m,n,i&&i[y],o,s)}else p.push(y);else s||(e[y]=m,r.updateDuringAnimation(t),p.push(y))}var _=p.length;if(!h&&_)for(var S=0;S<d.length;S++){var x=d[S];if(x.targetName===t){var b=x.stopTracks(p);if(b){var w=dt(d,x);d.splice(w,1)}}}if(n.force||(p=kt(p,function(C){return!uM(a[C],e[C])}),_=p.length),_>0||n.force&&!o.length){var T=void 0,D=void 0,A=void 0;if(s){D={},v&&(T={});for(var S=0;S<_;S++){var y=p[S];D[y]=e[y],v?T[y]=a[y]:e[y]=a[y]}}else if(v){A={};for(var S=0;S<_;S++){var y=p[S];A[y]=Cl(e[y]),lM(e,a,y)}}var x=new td(e,!1,!1,h?kt(d,function(I){return I.targetName===t}):null);x.targetName=t,n.scope&&(x.scope=n.scope),v&&T&&x.whenWithKeys(0,T,p),A&&x.whenWithKeys(0,A,p),x.whenWithKeys(u??500,s?D:a,p).delay(f||0),r.addAnimator(x,t),o.push(x)}}var yt=(function(r){B(t,r);function t(e){var a=r.call(this)||this;return a.isGroup=!0,a._children=[],a.attr(e),a}return t.prototype.childrenRef=function(){return this._children},t.prototype.children=function(){return this._children.slice()},t.prototype.childAt=function(e){return this._children[e]},t.prototype.childOfName=function(e){for(var a=this._children,n=0;n<a.length;n++)if(a[n].name===e)return a[n]},t.prototype.childCount=function(){return this._children.length},t.prototype.add=function(e){return e&&e!==this&&e.parent!==this&&(this._children.push(e),this._doAdd(e)),this},t.prototype.addBefore=function(e,a){if(e&&e!==this&&e.parent!==this&&a&&a.parent===this){var n=this._children,i=n.indexOf(a);i>=0&&(n.splice(i,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,a){var n=dt(this._children,e);return n>=0&&this.replaceAt(a,n),this},t.prototype.replaceAt=function(e,a){var n=this._children,i=n[a];if(e&&e!==this&&e.parent!==this&&e!==i){n[a]=e,i.parent=null;var o=this.__zr;o&&i.removeSelfFromZr(o),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var a=this.__zr;a&&a!==e.__zr&&e.addSelfToZr(a),a&&a.refresh()},t.prototype.remove=function(e){var a=this.__zr,n=this._children,i=dt(n,e);return i<0?this:(n.splice(i,1),e.parent=null,a&&e.removeSelfFromZr(a),a&&a.refresh(),this)},t.prototype.removeAll=function(){for(var e=this._children,a=this.__zr,n=0;n<e.length;n++){var i=e[n];a&&i.removeSelfFromZr(a),i.parent=null}return e.length=0,this},t.prototype.eachChild=function(e,a){for(var n=this._children,i=0;i<n.length;i++){var o=n[i];e.call(a,o,i)}return this},t.prototype.traverse=function(e,a){for(var n=0;n<this._children.length;n++){var i=this._children[n],o=e.call(a,i);i.isGroup&&!o&&i.traverse(e,a)}return this},t.prototype.addSelfToZr=function(e){r.prototype.addSelfToZr.call(this,e);for(var a=0;a<this._children.length;a++){var n=this._children[a];n.addSelfToZr(e)}},t.prototype.removeSelfFromZr=function(e){r.prototype.removeSelfFromZr.call(this,e);for(var a=0;a<this._children.length;a++){var n=this._children[a];n.removeSelfFromZr(e)}},t.prototype.getBoundingRect=function(e){for(var a=new ot(0,0,0,0),n=e||this._children,i=[],o=null,s=0;s<n.length;s++){var l=n[s];if(!(l.ignore||l.invisible)){var u=l.getBoundingRect(),f=l.getLocalTransform(i);f?(ot.applyTransform(a,u,f),o=o||a.clone(),o.union(a)):(o=o||u.clone(),o.union(u))}}return o||a},t})(zu);yt.prototype.type="group";/*!
|
|
16
|
+
* ZRender, a high performance 2d drawing library.
|
|
17
|
+
*
|
|
18
|
+
* Copyright (c) 2013, Baidu Inc.
|
|
19
|
+
* All rights reserved.
|
|
20
|
+
*
|
|
21
|
+
* LICENSE
|
|
22
|
+
* https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
|
|
23
|
+
*/var Ll={},wS={};function hM(r){delete wS[r]}function cM(r){if(!r)return!1;if(typeof r=="string")return Xl(r,1)<xc;if(r.colorStops){for(var t=r.colorStops,e=0,a=t.length,n=0;n<a;n++)e+=Xl(t[n].color,1);return e/=a,e<xc}return!1}var vM=(function(){function r(t,e,a){var n=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,a=a||{},this.dom=e,this.id=t;var i=new IC,o=a.renderer||"canvas";Ll[o]||(o=Pt(Ll)[0]),a.useDirtyRect=a.useDirtyRect==null?!1:a.useDirtyRect;var s=new Ll[o](e,i,a,t),l=a.ssr||s.ssrOnly;this.storage=i,this.painter=s;var u=!ct.node&&!ct.worker&&!l?new rM(s.getViewportRoot(),s.root):null,f=a.useCoarsePointer,h=f==null||f==="auto"?ct.touchEventsSupported:!!f,v=44,c;h&&(c=et(a.pointerSize,v)),this.handler=new sS(i,s,u,s.root,c),this.animation=new KC({stage:{update:l?null:function(){return n._flush(!0)}}}),l||this.animation.start()}return r.prototype.add=function(t){this._disposed||!t||(this.storage.addRoot(t),t.addSelfToZr(this),this.refresh())},r.prototype.remove=function(t){this._disposed||!t||(this.storage.delRoot(t),t.removeSelfFromZr(this),this.refresh())},r.prototype.configLayer=function(t,e){this._disposed||(this.painter.configLayer&&this.painter.configLayer(t,e),this.refresh())},r.prototype.setBackgroundColor=function(t){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this.refresh(),this._backgroundColor=t,this._darkMode=cM(t))},r.prototype.getBackgroundColor=function(){return this._backgroundColor},r.prototype.setDarkMode=function(t){this._darkMode=t},r.prototype.isDarkMode=function(){return this._darkMode},r.prototype.refreshImmediately=function(t){this._disposed||(t||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(t){var e,a=li();this._needsRefresh&&(e=!0,this.refreshImmediately(t)),this._needsRefreshHover&&(e=!0,this.refreshHoverImmediately());var n=li();e?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:n-a})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},r.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},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(t){this._disposed||(t=t||{},this.painter.resize(t.width,t.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(t){this._disposed||this.handler.setCursorStyle(t)},r.prototype.findHover=function(t,e){if(!this._disposed)return this.handler.findHover(t,e)},r.prototype.on=function(t,e,a){return this._disposed||this.handler.on(t,e,a),this},r.prototype.off=function(t,e){this._disposed||this.handler.off(t,e)},r.prototype.trigger=function(t,e){this._disposed||this.handler.trigger(t,e)},r.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),e=0;e<t.length;e++)t[e]instanceof yt&&t[e].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,hM(this.id))},r})();function cg(r,t){var e=new vM(q_(),r,t);return wS[e.id]=e,e}function dM(r,t){Ll[r]=t}var vg=1e-4,TS=20;function pM(r){return r.replace(/^\s+|\s+$/g,"")}var No=Math.min,Ae=Math.max,br=Math.abs;function St(r,t,e,a){var n=t[0],i=t[1],o=e[0],s=e[1],l=i-n,u=s-o;if(l===0)return u===0?o:(o+s)/2;if(a)if(l>0){if(r<=n)return o;if(r>=i)return s}else{if(r>=n)return o;if(r<=i)return s}else{if(r===n)return o;if(r===i)return s}return(r-n)/l*u+o}var K=gM;function gM(r,t,e){switch(r){case"center":case"middle":r="50%";break;case"left":case"top":r="0%";break;case"right":case"bottom":r="100%";break}return Mc(r,t,e)}function Mc(r,t,e){return X(r)?pM(r).match(/%$/)?parseFloat(r)/100*t+(e||0):parseFloat(r):r==null?NaN:+r}function Xt(r,t,e){return t==null&&(t=10),t=Math.min(Math.max(0,t),TS),r=(+r).toFixed(t),e?r:+r}function Vr(r){return r.sort(function(t,e){return t-e}),r}function xr(r){if(r=+r,isNaN(r))return 0;if(r>1e-14){for(var t=1,e=0;e<15;e++,t*=10)if(Math.round(r*t)/t===r)return e}return yM(r)}function yM(r){var t=r.toString().toLowerCase(),e=t.indexOf("e"),a=e>0?+t.slice(e+1):0,n=e>0?e:t.length,i=t.indexOf("."),o=i<0?0:n-1-i;return Math.max(0,o-a)}function CS(r,t){var e=Math.log,a=Math.LN10,n=Math.floor(e(r[1]-r[0])/a),i=Math.round(e(br(t[1]-t[0]))/a),o=Math.min(Math.max(-n+i,0),20);return isFinite(o)?o:20}function mM(r,t){var e=wa(r,function(c,d){return c+(isNaN(d)?0:d)},0);if(e===0)return[];for(var a=Math.pow(10,t),n=U(r,function(c){return(isNaN(c)?0:c)/e*a*100}),i=a*100,o=U(n,function(c){return Math.floor(c)}),s=wa(o,function(c,d){return c+d},0),l=U(n,function(c,d){return c-o[d]});s<i;){for(var u=Number.NEGATIVE_INFINITY,f=null,h=0,v=l.length;h<v;++h)l[h]>u&&(u=l[h],f=h);++o[f],l[f]=0,++s}return U(o,function(c){return c/a})}function _M(r,t){var e=Math.max(xr(r),xr(t)),a=r+t;return e>TS?a:Xt(a,e)}var dg=9007199254740991;function MS(r){var t=Math.PI*2;return(r%t+t)%t}function zo(r){return r>-vg&&r<vg}var SM=/^(?:(\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 Pi(r){if(r instanceof Date)return r;if(X(r)){var t=SM.exec(r);if(!t)return new Date(NaN);if(t[8]){var e=+t[4]||0;return t[8].toUpperCase()!=="Z"&&(e-=+t[8].slice(0,3)),new Date(Date.UTC(+t[1],+(t[2]||1)-1,+t[3]||1,e,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0))}else return new Date(+t[1],+(t[2]||1)-1,+t[3]||1,+t[4]||0,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0)}else if(r==null)return new Date(NaN);return new Date(Math.round(r))}function bM(r){return Math.pow(10,rd(r))}function rd(r){if(r===0)return 0;var t=Math.floor(Math.log(r)/Math.LN10);return r/Math.pow(10,t)>=10&&t++,t}function AS(r,t){var e=rd(r),a=Math.pow(10,e),n=r/a,i;return n<1.5?i=1:n<2.5?i=2:n<4?i=3:n<7?i=5:i=10,r=i*a,e>=-20?+r.toFixed(e<0?-e:0):r}function zf(r,t){var e=(r.length-1)*t+1,a=Math.floor(e),n=+r[a-1],i=e-a;return i?n+i*(r[a]-n):n}function pg(r){r.sort(function(l,u){return s(l,u,0)?-1:1});for(var t=-1/0,e=1,a=0;a<r.length;){for(var n=r[a].interval,i=r[a].close,o=0;o<2;o++)n[o]<=t&&(n[o]=t,i[o]=o?1:1-e),t=n[o],e=i[o];n[0]===n[1]&&i[0]*i[1]!==1?r.splice(a,1):a++}return r;function s(l,u,f){return l.interval[f]<u.interval[f]||l.interval[f]===u.interval[f]&&(l.close[f]-u.close[f]===(f?-1:1)||!f&&s(l,u,1))}}function Vo(r){var t=parseFloat(r);return t==r&&(t!==0||!X(r)||r.indexOf("x")<=0)?t:NaN}function xM(r){return!isNaN(Vo(r))}function DS(){return Math.round(Math.random()*9)}function LS(r,t){return t===0?r:LS(t,r%t)}function gg(r,t){return r==null?t:t==null?r:r*t/LS(r,t)}var wM="[ECharts] ",TM=typeof console<"u"&&console.warn&&console.log;function CM(r,t,e){TM&&console[r](wM+t)}function IS(r,t){CM("error",r)}function de(r){throw new Error(r)}function yg(r,t,e){return(t-r)*e+r}var PS="series\0",RS="\0_ec_\0";function Wt(r){return r instanceof Array?r:r==null?[]:[r]}function Fo(r,t,e){if(r){r[t]=r[t]||{},r.emphasis=r.emphasis||{},r.emphasis[t]=r.emphasis[t]||{};for(var a=0,n=e.length;a<n;a++){var i=e[a];!r.emphasis[t].hasOwnProperty(i)&&r[t].hasOwnProperty(i)&&(r.emphasis[t][i]=r[t][i])}}}var mg=["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 hs(r){return j(r)&&!H(r)&&!(r instanceof Date)?r.value:r}function MM(r){return j(r)&&!(r instanceof Array)}function AM(r,t,e){var a=e==="normalMerge",n=e==="replaceMerge",i=e==="replaceAll";r=r||[],t=(t||[]).slice();var o=nt();M(t,function(l,u){if(!j(l)){t[u]=null;return}});var s=DM(r,o,e);return(a||n)&&LM(s,r,o,t),a&&IM(s,t),a||n?PM(s,t,n):i&&RM(s,t),EM(s),s}function DM(r,t,e){var a=[];if(e==="replaceAll")return a;for(var n=0;n<r.length;n++){var i=r[n];i&&i.id!=null&&t.set(i.id,n),a.push({existing:e==="replaceMerge"||Go(i)?null:i,newOption:null,keyInfo:null,brandNew:null})}return a}function LM(r,t,e,a){M(a,function(n,i){if(!(!n||n.id==null)){var o=Co(n.id),s=e.get(o);if(s!=null){var l=r[s];We(!l.newOption,'Duplicated option on id "'+o+'".'),l.newOption=n,l.existing=t[s],a[i]=null}}})}function IM(r,t){M(t,function(e,a){if(!(!e||e.name==null))for(var n=0;n<r.length;n++){var i=r[n].existing;if(!r[n].newOption&&i&&(i.id==null||e.id==null)&&!Go(e)&&!Go(i)&&ES("name",i,e)){r[n].newOption=e,t[a]=null;return}}})}function PM(r,t,e){M(t,function(a){if(a){for(var n,i=0;(n=r[i])&&(n.newOption||Go(n.existing)||n.existing&&a.id!=null&&!ES("id",a,n.existing));)i++;n?(n.newOption=a,n.brandNew=e):r.push({newOption:a,brandNew:e,existing:null,keyInfo:null}),i++}})}function RM(r,t){M(t,function(e){r.push({newOption:e,brandNew:!0,existing:null,keyInfo:null})})}function EM(r){var t=nt();M(r,function(e){var a=e.existing;a&&t.set(a.id,e)}),M(r,function(e){var a=e.newOption;We(!a||a.id==null||!t.get(a.id)||t.get(a.id)===e,"id duplicates: "+(a&&a.id)),a&&a.id!=null&&t.set(a.id,e),!e.keyInfo&&(e.keyInfo={})}),M(r,function(e,a){var n=e.existing,i=e.newOption,o=e.keyInfo;if(j(i)){if(o.name=i.name!=null?Co(i.name):n?n.name:PS+a,n)o.id=Co(n.id);else if(i.id!=null)o.id=Co(i.id);else{var s=0;do o.id="\0"+o.name+"\0"+s++;while(t.get(o.id))}t.set(o.id,e)}})}function ES(r,t,e){var a=ge(t[r],null),n=ge(e[r],null);return a!=null&&n!=null&&a===n}function Co(r){return ge(r,"")}function ge(r,t){return r==null?t:X(r)?r:bt(r)||ic(r)?r+"":t}function ad(r){var t=r.name;return!!(t&&t.indexOf(PS))}function Go(r){return r&&r.id!=null&&Co(r.id).indexOf(RS)===0}function kM(r){return RS+r}function OM(r,t,e){M(r,function(a){var n=a.newOption;j(n)&&(a.keyInfo.mainType=t,a.keyInfo.subType=BM(t,n,a.existing,e))})}function BM(r,t,e,a){var n=t.type?t.type:e?e.subType:a.determineSubType(r,t);return n}function NM(r,t){var e={},a={};return n(r||[],e),n(t||[],a,e),[i(e),i(a)];function n(o,s,l){for(var u=0,f=o.length;u<f;u++){var h=ge(o[u].seriesId,null);if(h==null)return;for(var v=Wt(o[u].dataIndex),c=l&&l[h],d=0,p=v.length;d<p;d++){var g=v[d];c&&c[g]?c[g]=null:(s[h]||(s[h]={}))[g]=1}}}function i(o,s){var l=[];for(var u in o)if(o.hasOwnProperty(u)&&o[u]!=null)if(s)l.push(+u);else{var f=i(o[u],!0);f.length&&l.push({seriesId:u,dataIndex:f})}return l}}function Mn(r,t){if(t.dataIndexInside!=null)return t.dataIndexInside;if(t.dataIndex!=null)return H(t.dataIndex)?U(t.dataIndex,function(e){return r.indexOfRawIndex(e)}):r.indexOfRawIndex(t.dataIndex);if(t.name!=null)return H(t.name)?U(t.name,function(e){return r.indexOfName(e)}):r.indexOfName(t.name)}function wt(){var r="__ec_inner_"+zM++;return function(t){return t[r]||(t[r]={})}}var zM=DS();function Mo(r,t,e){var a=nd(t,e),n=a.mainTypeSpecified,i=a.queryOptionMap,o=a.others,s=o,l=e?e.defaultMainType:null;return!n&&l&&i.set(l,{}),i.each(function(u,f){var h=Ri(r,f,u,{useDefault:l===f,enableAll:e&&e.enableAll!=null?e.enableAll:!0,enableNone:e&&e.enableNone!=null?e.enableNone:!0});s[f+"Models"]=h.models,s[f+"Model"]=h.models[0]}),s}function nd(r,t){var e;if(X(r)){var a={};a[r+"Index"]=0,e=a}else e=r;var n=nt(),i={},o=!1;return M(e,function(s,l){if(l==="dataIndex"||l==="dataIndexInside"){i[l]=s;return}var u=l.match(/^(\w+)(Index|Id|Name)$/)||[],f=u[1],h=(u[2]||"").toLowerCase();if(!(!f||!h||t&&t.includeMainTypes&&dt(t.includeMainTypes,f)<0)){o=o||!!f;var v=n.get(f)||n.set(f,{});v[h]=s}}),{mainTypeSpecified:o,queryOptionMap:n,others:i}}var ee={useDefault:!0,enableAll:!1,enableNone:!1},VM={useDefault:!1,enableAll:!0,enableNone:!0};function Ri(r,t,e,a){a=a||ee;var n=e.index,i=e.id,o=e.name,s={models:null,specified:n!=null||i!=null||o!=null};if(!s.specified){var l=void 0;return s.models=a.useDefault&&(l=r.getComponent(t))?[l]:[],s}if(n==="none"||n===!1){if(a.enableNone)return s.models=[],s;n=-1}return n==="all"&&(a.enableAll?n=i=o=null:n=-1),s.models=r.queryComponents({mainType:t,index:n,id:i,name:o}),s}function kS(r,t,e){r.setAttribute?r.setAttribute(t,e):r[t]=e}function FM(r,t){return r.getAttribute?r.getAttribute(t):r[t]}function GM(r){return r==="auto"?ct.domSupported?"html":"richText":r||"html"}function HM(r,t){var e=nt(),a=[];return M(r,function(n){var i=t(n);(e.get(i)||(a.push(i),e.set(i,[]))).push(n)}),{keys:a,buckets:e}}function OS(r,t,e,a,n){var i=t==null||t==="auto";if(a==null)return a;if(bt(a)){var o=yg(e||0,a,n);return Xt(o,i?Math.max(xr(e||0),xr(a)):t)}else{if(X(a))return n<1?e:a;for(var s=[],l=e,u=a,f=Math.max(l?l.length:0,u.length),h=0;h<f;++h){var v=r.getDimensionInfo(h);if(v&&v.type==="ordinal")s[h]=(n<1&&l?l:u)[h];else{var c=l&&l[h]?l[h]:0,d=u[h],o=yg(c,d,n);s[h]=Xt(o,i?Math.max(xr(c),xr(d)):t)}}return s}}var WM=".",Fa="___EC__COMPONENT__CONTAINER___",BS="___EC__EXTENDED_CLASS___";function wr(r){var t={main:"",sub:""};if(r){var e=r.split(WM);t.main=e[0]||"",t.sub=e[1]||""}return t}function UM(r){We(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(r),'componentType "'+r+'" illegal')}function YM(r){return!!(r&&r[BS])}function id(r,t){r.$constructor=r,r.extend=function(e){var a=this,n;return ZM(a)?n=(function(i){B(o,i);function o(){return i.apply(this,arguments)||this}return o})(a):(n=function(){(e.$constructor||a).apply(this,arguments)},XT(n,this)),F(n.prototype,e),n[BS]=!0,n.extend=this.extend,n.superCall=KM,n.superApply=qM,n.superClass=a,n}}function ZM(r){return Q(r)&&/^class\s/.test(Function.prototype.toString.call(r))}function NS(r,t){r.extend=t.extend}var XM=Math.round(Math.random()*10);function $M(r){var t=["__\0is_clz",XM++].join("_");r.prototype[t]=!0,r.isInstance=function(e){return!!(e&&e[t])}}function KM(r,t){for(var e=[],a=2;a<arguments.length;a++)e[a-2]=arguments[a];return this.superClass.prototype[t].apply(r,e)}function qM(r,t,e){return this.superClass.prototype[t].apply(r,e)}function Vu(r){var t={};r.registerClass=function(a){var n=a.type||a.prototype.type;if(n){UM(n),a.prototype.type=n;var i=wr(n);if(!i.sub)t[i.main]=a;else if(i.sub!==Fa){var o=e(i);o[i.sub]=a}}return a},r.getClass=function(a,n,i){var o=t[a];if(o&&o[Fa]&&(o=n?o[n]:null),i&&!o)throw new Error(n?"Component "+a+"."+(n||"")+" is used but not imported.":a+".type should be specified.");return o},r.getClassesByMainType=function(a){var n=wr(a),i=[],o=t[n.main];return o&&o[Fa]?M(o,function(s,l){l!==Fa&&i.push(s)}):i.push(o),i},r.hasClass=function(a){var n=wr(a);return!!t[n.main]},r.getAllClassMainTypes=function(){var a=[];return M(t,function(n,i){a.push(i)}),a},r.hasSubTypes=function(a){var n=wr(a),i=t[n.main];return i&&i[Fa]};function e(a){var n=t[a.main];return(!n||!n[Fa])&&(n=t[a.main]={},n[Fa]=!0),n}}function An(r,t){for(var e=0;e<r.length;e++)r[e][1]||(r[e][1]=r[e][0]);return t=t||!1,function(a,n,i){for(var o={},s=0;s<r.length;s++){var l=r[s][1];if(!(n&&dt(n,l)>=0||i&&dt(i,l)<0)){var u=a.getShallow(l,t);u!=null&&(o[r[s][0]]=u)}}return o}}var QM=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],jM=An(QM),JM=(function(){function r(){}return r.prototype.getAreaStyle=function(t,e){return jM(this,t,e)},r})(),Ac=new _i(50);function tA(r){if(typeof r=="string"){var t=Ac.get(r);return t&&t.image}else return r}function zS(r,t,e,a,n){if(r)if(typeof r=="string"){if(t&&t.__zrImageSrc===r||!e)return t;var i=Ac.get(r),o={hostEl:e,cb:a,cbPayload:n};return i?(t=i.image,!Fu(t)&&i.pending.push(o)):(t=ir.loadImage(r,_g,_g),t.__zrImageSrc=r,Ac.put(r,t.__cachedImgObj={image:t,pending:[o]})),t}else return r;else return t}function _g(){var r=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t<r.pending.length;t++){var e=r.pending[t],a=e.cb;a&&a(this,e.cbPayload),e.hostEl.dirty()}r.pending.length=0}function Fu(r){return r&&r.width&&r.height}var Vf=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function eA(r,t,e,a,n,i){if(!e){r.text="",r.isTruncated=!1;return}var o=(t+"").split(`
|
|
24
|
+
`);i=VS(e,a,n,i);for(var s=!1,l={},u=0,f=o.length;u<f;u++)FS(l,o[u],i),o[u]=l.textLine,s=s||l.isTruncated;r.text=o.join(`
|
|
25
|
+
`),r.isTruncated=s}function VS(r,t,e,a){a=a||{};var n=F({},a);e=et(e,"..."),n.maxIterations=et(a.maxIterations,2);var i=n.minChar=et(a.minChar,0),o=n.fontMeasureInfo=Tr(t),s=o.asciiCharWidth;n.placeholder=et(a.placeholder,"");for(var l=r=Math.max(0,r-1),u=0;u<i&&l>=s;u++)l-=s;var f=Cr(o,e);return f>l&&(e="",f=0),l=r-f,n.ellipsis=e,n.ellipsisWidth=f,n.contentWidth=l,n.containerWidth=r,n}function FS(r,t,e){var a=e.containerWidth,n=e.contentWidth,i=e.fontMeasureInfo;if(!a){r.textLine="",r.isTruncated=!1;return}var o=Cr(i,t);if(o<=a){r.textLine=t,r.isTruncated=!1;return}for(var s=0;;s++){if(o<=n||s>=e.maxIterations){t+=e.ellipsis;break}var l=s===0?rA(t,n,i):o>0?Math.floor(t.length*n/o):0;t=t.substr(0,l),o=Cr(i,t)}t===""&&(t=e.placeholder),r.textLine=t,r.isTruncated=!0}function rA(r,t,e){for(var a=0,n=0,i=r.length;n<i&&a<t;n++)a+=bS(e,r.charCodeAt(n));return n}function aA(r,t,e,a){var n=od(r),i=t.overflow,o=t.padding,s=o?o[1]+o[3]:0,l=o?o[0]+o[2]:0,u=t.font,f=i==="truncate",h=Nu(u),v=et(t.lineHeight,h),c=t.lineOverflow==="truncate",d=!1,p=t.width;p==null&&e!=null&&(p=e-s);var g=t.height;g==null&&a!=null&&(g=a-l);var y;p!=null&&(i==="break"||i==="breakAll")?y=n?GS(n,t.font,p,i==="breakAll",0).lines:[]:y=n?n.split(`
|
|
26
|
+
`):[];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(n&&f&&p!=null)for(var S=VS(p,u,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),x={},b=0;b<y.length;b++)FS(x,y[b],S),y[b]=x.textLine,d=d||x.isTruncated;for(var w=g,T=0,D=Tr(u),b=0;b<y.length;b++)T=Math.max(Cr(D,y[b]),T);p==null&&(p=T);var A=p;return w+=l,A+=s,{lines:y,height:g,outerWidth:A,outerHeight:w,lineHeight:v,calculatedLineHeight:h,contentWidth:T,contentHeight:m,width:p,isTruncated:d}}var nA=(function(){function r(){}return r})(),Sg=(function(){function r(t){this.tokens=[],t&&(this.tokens=t)}return r})(),iA=(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 oA(r,t,e,a,n){var i=new iA,o=od(r);if(!o)return i;var s=t.padding,l=s?s[1]+s[3]:0,u=s?s[0]+s[2]:0,f=t.width;f==null&&e!=null&&(f=e-l);var h=t.height;h==null&&a!=null&&(h=a-u);for(var v=t.overflow,c=(v==="break"||v==="breakAll")&&f!=null?{width:f,accumWidth:0,breakAll:v==="breakAll"}:null,d=Vf.lastIndex=0,p;(p=Vf.exec(o))!=null;){var g=p.index;g>d&&Ff(i,o.substring(d,g),t,c),Ff(i,p[2],t,c,p[1]),d=Vf.lastIndex}d<o.length&&Ff(i,o.substring(d,o.length),t,c);var y=[],m=0,_=0,S=v==="truncate",x=t.lineOverflow==="truncate",b={};function w(Ct,Ot,ut){Ct.width=Ot,Ct.lineHeight=ut,m+=ut,_=Math.max(_,Ot)}t:for(var T=0;T<i.lines.length;T++){for(var D=i.lines[T],A=0,C=0,I=0;I<D.tokens.length;I++){var L=D.tokens[I],P=L.styleName&&t.rich[L.styleName]||{},R=L.textPadding=P.padding,E=R?R[1]+R[3]:0,O=L.font=P.font||t.font;L.contentHeight=Nu(O);var k=et(P.height,L.contentHeight);if(L.innerHeight=k,R&&(k+=R[0]+R[2]),L.height=k,L.lineHeight=ya(P.lineHeight,t.lineHeight,k),L.align=P&&P.align||n,L.verticalAlign=P&&P.verticalAlign||"middle",x&&h!=null&&m+L.lineHeight>h){var z=i.lines.length;I>0?(D.tokens=D.tokens.slice(0,I),w(D,C,A),i.lines=i.lines.slice(0,T+1)):i.lines=i.lines.slice(0,T),i.isTruncated=i.isTruncated||i.lines.length<z;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=Cr(Tr(O),L.text);else{if(G){var W=P.backgroundColor,Z=W&&W.image;Z&&(Z=tA(Z),Fu(Z)&&(L.width=Math.max(L.width,Z.width*k/Z.height)))}var rt=S&&f!=null?f-C:null;rt!=null&&rt<L.width?!G||rt<E?(L.text="",L.width=L.contentWidth=0):(eA(b,L.text,rt-E,O,t.ellipsis,{minChar:t.truncateMinChar}),L.text=b.text,i.isTruncated=i.isTruncated||b.isTruncated,L.width=L.contentWidth=Cr(Tr(O),L.text)):L.contentWidth=Cr(Tr(O),L.text)}L.width+=E,C+=L.width,P&&(A=Math.max(A,L.lineHeight))}w(D,C,A)}i.outerWidth=i.width=et(f,_),i.outerHeight=i.height=et(h,m),i.contentHeight=m,i.contentWidth=_,i.outerWidth+=l,i.outerHeight+=u;for(var T=0;T<y.length;T++){var L=y[T],lt=L.percentWidth;L.width=parseInt(lt,10)/100*i.width}return i}function Ff(r,t,e,a,n){var i=t==="",o=n&&e.rich[n]||{},s=r.lines,l=o.font||e.font,u=!1,f,h;if(a){var v=o.padding,c=v?v[1]+v[3]:0;if(o.width!=null&&o.width!=="auto"){var d=Ar(o.width,a.width)+c;s.length>0&&d+a.accumWidth>a.width&&(f=t.split(`
|
|
27
|
+
`),u=!0),a.accumWidth=d}else{var p=GS(t,l,a.width,a.breakAll,a.accumWidth);a.accumWidth=p.accumWidth+c,h=p.linesWidths,f=p.lines}}f||(f=t.split(`
|
|
28
|
+
`));for(var g=Tr(l),y=0;y<f.length;y++){var m=f[y],_=new nA;if(_.styleName=n,_.text=m,_.isLineHolder=!m&&!i,typeof o.width=="number"?_.width=o.width:_.width=h?h[y]:Cr(g,m),!y&&!u){var S=(s[s.length-1]||(s[0]=new Sg)).tokens,x=S.length;x===1&&S[0].isLineHolder?S[0]=_:(m||!x||i)&&S.push(_)}else s.push(new Sg([_]))}}function sA(r){var t=r.charCodeAt(0);return t>=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var lA=wa(",&?/;] ".split(""),function(r,t){return r[t]=!0,r},{});function uA(r){return sA(r)?!!lA[r]:!0}function GS(r,t,e,a,n){for(var i=[],o=[],s="",l="",u=0,f=0,h=Tr(t),v=0;v<r.length;v++){var c=r.charAt(v);if(c===`
|
|
29
|
+
`){l&&(s+=l,f+=u),i.push(s),o.push(f),s="",l="",u=0,f=0;continue}var d=bS(h,c.charCodeAt(0)),p=a?!1:!uA(c);if(i.length?f+d>e:n+f+d>e){f?(s||l)&&(p?(s||(s=l,l="",u=0,f=u),i.push(s),o.push(f-u),l+=c,u+=d,s="",f=u):(l&&(s+=l,l="",u=0),i.push(s),o.push(f),s=c,f=d)):p?(i.push(l),o.push(u),l=c,u=d):(i.push(c),o.push(d));continue}f+=d,p?(l+=c,u+=d):(l&&(s+=l,l="",u=0),s+=c)}return l&&(s+=l),s&&(i.push(s),o.push(f)),i.length===1&&(f+=n),{accumWidth:f,lines:i,linesWidths:o}}function bg(r,t,e,a,n,i){if(r.baseX=e,r.baseY=a,r.outerWidth=r.outerHeight=null,!!t){var o=t.width*2,s=t.height*2;ot.set(xg,Si(e,o,n),mn(a,s,i),o,s),ot.intersect(t,xg,null,wg);var l=wg.outIntersectRect;r.outerWidth=l.width,r.outerHeight=l.height,r.baseX=Si(l.x,l.width,n,!0),r.baseY=mn(l.y,l.height,i,!0)}}var xg=new ot(0,0,0,0),wg={outIntersectRect:{},clamp:!0};function od(r){return r!=null?r+="":r=""}function fA(r){var t=od(r.text),e=r.font,a=Cr(Tr(e),t),n=Nu(e);return Dc(r,a,n,null)}function Dc(r,t,e,a){var n=new ot(Si(r.x||0,t,r.textAlign),mn(r.y||0,e,r.textBaseline),t,e),i=a??(HS(r)?r.lineWidth:0);return i>0&&(n.x-=i/2,n.y-=i/2,n.width+=i,n.height+=i),n}function HS(r){var t=r.stroke;return t!=null&&t!=="none"&&r.lineWidth>0}var Lc="__zr_style_"+Math.round(Math.random()*10),_n={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},Gu={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};_n[Lc]=!0;var Tg=["z","z2","invisible"],hA=["invisible"],Ei=(function(r){B(t,r);function t(e){return r.call(this,e)||this}return t.prototype._init=function(e){for(var a=Pt(e),n=0;n<a.length;n++){var i=a[n];i==="style"?this.useStyle(e[i]):r.prototype.attrKV.call(this,i,e[i])}this.style||this.useStyle({})},t.prototype.beforeBrush=function(){},t.prototype.afterBrush=function(){},t.prototype.innerBeforeBrush=function(){},t.prototype.innerAfterBrush=function(){},t.prototype.shouldBePainted=function(e,a,n,i){var o=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&cA(this,e,a)||o&&!o[0]&&!o[3])return!1;if(n&&this.__clipPaths&&this.__clipPaths.length){for(var s=0;s<this.__clipPaths.length;++s)if(this.__clipPaths[s].isZeroArea())return!1}if(i&&this.parent)for(var l=this.parent;l;){if(l.ignore)return!1;l=l.parent}return!0},t.prototype.contain=function(e,a){return this.rectContain(e,a)},t.prototype.traverse=function(e,a){e.call(a,this)},t.prototype.rectContain=function(e,a){var n=this.transformCoordToLocal(e,a),i=this.getBoundingRect();return i.contain(n[0],n[1])},t.prototype.getPaintRect=function(){var e=this._paintRect;if(!this._paintRect||this.__dirty){var a=this.transform,n=this.getBoundingRect(),i=this.style,o=i.shadowBlur||0,s=i.shadowOffsetX||0,l=i.shadowOffsetY||0;e=this._paintRect||(this._paintRect=new ot(0,0,0,0)),a?ot.applyTransform(e,n,a):e.copy(n),(o||s||l)&&(e.width+=o*2+Math.abs(s),e.height+=o*2+Math.abs(l),e.x=Math.min(e.x,e.x+s-o),e.y=Math.min(e.y,e.y+l-o));var u=this.dirtyRectTolerance;e.isZero()||(e.x=Math.floor(e.x-u),e.y=Math.floor(e.y-u),e.width=Math.ceil(e.width+1+u*2),e.height=Math.ceil(e.height+1+u*2))}return e},t.prototype.setPrevPaintRect=function(e){e?(this._prevPaintRect=this._prevPaintRect||new ot(0,0,0,0),this._prevPaintRect.copy(e)):this._prevPaintRect=null},t.prototype.getPrevPaintRect=function(){return this._prevPaintRect},t.prototype.animateStyle=function(e){return this.animate("style",e)},t.prototype.updateDuringAnimation=function(e){e==="style"?this.dirtyStyle():this.markRedraw()},t.prototype.attrKV=function(e,a){e!=="style"?r.prototype.attrKV.call(this,e,a):this.style?this.setStyle(a):this.useStyle(a)},t.prototype.setStyle=function(e,a){return typeof e=="string"?this.style[e]=a:F(this.style,e),this.dirtyStyle(),this},t.prototype.dirtyStyle=function(e){e||this.markRedraw(),this.__dirty|=vo,this._rect&&(this._rect=null)},t.prototype.dirty=function(){this.dirtyStyle()},t.prototype.styleChanged=function(){return!!(this.__dirty&vo)},t.prototype.styleUpdated=function(){this.__dirty&=~vo},t.prototype.createStyle=function(e){return Ou(_n,e)},t.prototype.useStyle=function(e){e[Lc]||(e=this.createStyle(e)),this.__inHover?this.__hoverStyle=e:this.style=e,this.dirtyStyle()},t.prototype.isStyleObject=function(e){return e[Lc]},t.prototype._innerSaveToNormal=function(e){r.prototype._innerSaveToNormal.call(this,e);var a=this._normalState;e.style&&!a.style&&(a.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(e,a,Tg)},t.prototype._applyStateObj=function(e,a,n,i,o,s){r.prototype._applyStateObj.call(this,e,a,n,i,o,s);var l=!(a&&i),u;if(a&&a.style?o?i?u=a.style:(u=this._mergeStyle(this.createStyle(),n.style),this._mergeStyle(u,a.style)):(u=this._mergeStyle(this.createStyle(),i?this.style:n.style),this._mergeStyle(u,a.style)):l&&(u=n.style),u)if(o){var f=this.style;if(this.style=this.createStyle(l?{}:f),l)for(var h=Pt(f),v=0;v<h.length;v++){var c=h[v];c in u&&(u[c]=u[c],this.style[c]=f[c])}for(var d=Pt(u),v=0;v<d.length;v++){var c=d[v];this.style[c]=this.style[c]}this._transitionState(e,{style:u},s,this.getAnimationStyleProps())}else this.useStyle(u);for(var p=this.__inHover?hA:Tg,v=0;v<p.length;v++){var c=p[v];a&&a[c]!=null?this[c]=a[c]:l&&n[c]!=null&&(this[c]=n[c])}},t.prototype._mergeStates=function(e){for(var a=r.prototype._mergeStates.call(this,e),n,i=0;i<e.length;i++){var o=e[i];o.style&&(n=n||{},this._mergeStyle(n,o.style))}return n&&(a.style=n),a},t.prototype._mergeStyle=function(e,a){return F(e,a),e},t.prototype.getAnimationStyleProps=function(){return Gu},t.initDefaultProps=(function(){var e=t.prototype;e.type="displayable",e.invisible=!1,e.z=0,e.z2=0,e.zlevel=0,e.culling=!1,e.cursor="pointer",e.rectHover=!1,e.incremental=!1,e._rect=null,e.dirtyRectTolerance=0,e.__dirty=Me|vo})(),t})(zu),Gf=new ot(0,0,0,0),Hf=new ot(0,0,0,0);function cA(r,t,e){return Gf.copy(r.getBoundingRect()),r.transform&&Gf.applyTransform(r.transform),Hf.width=t,Hf.height=e,!Gf.intersect(Hf)}var Ne=Math.min,ze=Math.max,Wf=Math.sin,Uf=Math.cos,Ga=Math.PI*2,Es=Li(),ks=Li(),Os=Li();function Cg(r,t,e,a,n,i){n[0]=Ne(r,e),n[1]=Ne(t,a),i[0]=ze(r,e),i[1]=ze(t,a)}var Mg=[],Ag=[];function vA(r,t,e,a,n,i,o,s,l,u){var f=cS,h=te,v=f(r,e,n,o,Mg);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=h(r,e,n,o,Mg[c]);l[0]=Ne(d,l[0]),u[0]=ze(d,u[0])}v=f(t,a,i,s,Ag);for(var c=0;c<v;c++){var p=h(t,a,i,s,Ag[c]);l[1]=Ne(p,l[1]),u[1]=ze(p,u[1])}l[0]=Ne(r,l[0]),u[0]=ze(r,u[0]),l[0]=Ne(o,l[0]),u[0]=ze(o,u[0]),l[1]=Ne(t,l[1]),u[1]=ze(t,u[1]),l[1]=Ne(s,l[1]),u[1]=ze(s,u[1])}function dA(r,t,e,a,n,i,o,s){var l=vS,u=Se,f=ze(Ne(l(r,e,n),1),0),h=ze(Ne(l(t,a,i),1),0),v=u(r,e,n,f),c=u(t,a,i,h);o[0]=Ne(r,n,v),o[1]=Ne(t,i,c),s[0]=ze(r,n,v),s[1]=ze(t,i,c)}function pA(r,t,e,a,n,i,o,s,l){var u=ii,f=oi,h=Math.abs(n-i);if(h%Ga<1e-4&&h>1e-4){s[0]=r-e,s[1]=t-a,l[0]=r+e,l[1]=t+a;return}if(Es[0]=Uf(n)*e+r,Es[1]=Wf(n)*a+t,ks[0]=Uf(i)*e+r,ks[1]=Wf(i)*a+t,u(s,Es,ks),f(l,Es,ks),n=n%Ga,n<0&&(n=n+Ga),i=i%Ga,i<0&&(i=i+Ga),n>i&&!o?i+=Ga:n<i&&o&&(n+=Ga),o){var v=i;i=n,n=v}for(var c=0;c<i;c+=Math.PI/2)c>n&&(Os[0]=Uf(c)*e+r,Os[1]=Wf(c)*a+t,u(s,Os,s),f(l,Os,l))}var At={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Ha=[],Wa=[],cr=[],Qr=[],vr=[],dr=[],Yf=Math.min,Zf=Math.max,Ua=Math.cos,Ya=Math.sin,Pr=Math.abs,Ic=Math.PI,oa=Ic*2,Xf=typeof Float32Array<"u",Hi=[];function $f(r){var t=Math.round(r/Ic*1e8)/1e8;return t%2*Ic}function sd(r,t){var e=$f(r[0]);e<0&&(e+=oa);var a=e-r[0],n=r[1];n+=a,!t&&n-e>=oa?n=e+oa:t&&e-n>=oa?n=e-oa:!t&&e>n?n=e+(oa-$f(e-n)):t&&e<n&&(n=e-(oa-$f(n-e))),r[0]=e,r[1]=n}var Dn=(function(){function r(t){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,t&&(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(t,e,a){a=a||0,a>0&&(this._ux=Pr(a/$l/t)||0,this._uy=Pr(a/$l/e)||0)},r.prototype.setDPR=function(t){this.dpr=t},r.prototype.setContext=function(t){this._ctx=t},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(t,e){return this._drawPendingPt(),this.addData(At.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},r.prototype.lineTo=function(t,e){var a=Pr(t-this._xi),n=Pr(e-this._yi),i=a>this._ux||n>this._uy;if(this.addData(At.L,t,e),this._ctx&&i&&this._ctx.lineTo(t,e),i)this._xi=t,this._yi=e,this._pendingPtDist=0;else{var o=a*a+n*n;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=o)}return this},r.prototype.bezierCurveTo=function(t,e,a,n,i,o){return this._drawPendingPt(),this.addData(At.C,t,e,a,n,i,o),this._ctx&&this._ctx.bezierCurveTo(t,e,a,n,i,o),this._xi=i,this._yi=o,this},r.prototype.quadraticCurveTo=function(t,e,a,n){return this._drawPendingPt(),this.addData(At.Q,t,e,a,n),this._ctx&&this._ctx.quadraticCurveTo(t,e,a,n),this._xi=a,this._yi=n,this},r.prototype.arc=function(t,e,a,n,i,o){this._drawPendingPt(),Hi[0]=n,Hi[1]=i,sd(Hi,o),n=Hi[0],i=Hi[1];var s=i-n;return this.addData(At.A,t,e,a,a,n,s,0,o?0:1),this._ctx&&this._ctx.arc(t,e,a,n,i,o),this._xi=Ua(i)*a+t,this._yi=Ya(i)*a+e,this},r.prototype.arcTo=function(t,e,a,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,e,a,n,i),this},r.prototype.rect=function(t,e,a,n){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,e,a,n),this.addData(At.R,t,e,a,n),this},r.prototype.closePath=function(){this._drawPendingPt(),this.addData(At.Z);var t=this._ctx,e=this._x0,a=this._y0;return t&&t.closePath(),this._xi=e,this._yi=a,this},r.prototype.fill=function(t){t&&t.fill(),this.toStatic()},r.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},r.prototype.len=function(){return this._len},r.prototype.setData=function(t){if(this._saveData){var e=t.length;!(this.data&&this.data.length===e)&&Xf&&(this.data=new Float32Array(e));for(var a=0;a<e;a++)this.data[a]=t[a];this._len=e}},r.prototype.appendPath=function(t){if(this._saveData){t instanceof Array||(t=[t]);for(var e=t.length,a=0,n=this._len,i=0;i<e;i++)a+=t[i].len();var o=this.data;if(Xf&&(o instanceof Float32Array||!o)&&(this.data=new Float32Array(n+a),n>0&&o))for(var s=0;s<n;s++)this.data[s]=o[s];for(var i=0;i<e;i++)for(var l=t[i].data,s=0;s<l.length;s++)this.data[n++]=l[s];this._len=n}},r.prototype.addData=function(t,e,a,n,i,o,s,l,u){if(this._saveData){var f=this.data;this._len+arguments.length>f.length&&(this._expandData(),f=this.data);for(var h=0;h<arguments.length;h++)f[this._len++]=arguments[h]}},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 t=[],e=0;e<this._len;e++)t[e]=this.data[e];this.data=t}},r.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var t=this.data;t instanceof Array&&(t.length=this._len,Xf&&this._len>11&&(this.data=new Float32Array(t)))}},r.prototype.getBoundingRect=function(){cr[0]=cr[1]=vr[0]=vr[1]=Number.MAX_VALUE,Qr[0]=Qr[1]=dr[0]=dr[1]=-Number.MAX_VALUE;var t=this.data,e=0,a=0,n=0,i=0,o;for(o=0;o<this._len;){var s=t[o++],l=o===1;switch(l&&(e=t[o],a=t[o+1],n=e,i=a),s){case At.M:e=n=t[o++],a=i=t[o++],vr[0]=n,vr[1]=i,dr[0]=n,dr[1]=i;break;case At.L:Cg(e,a,t[o],t[o+1],vr,dr),e=t[o++],a=t[o++];break;case At.C:vA(e,a,t[o++],t[o++],t[o++],t[o++],t[o],t[o+1],vr,dr),e=t[o++],a=t[o++];break;case At.Q:dA(e,a,t[o++],t[o++],t[o],t[o+1],vr,dr),e=t[o++],a=t[o++];break;case At.A:var u=t[o++],f=t[o++],h=t[o++],v=t[o++],c=t[o++],d=t[o++]+c;o+=1;var p=!t[o++];l&&(n=Ua(c)*h+u,i=Ya(c)*v+f),pA(u,f,h,v,c,d,p,vr,dr),e=Ua(d)*h+u,a=Ya(d)*v+f;break;case At.R:n=e=t[o++],i=a=t[o++];var g=t[o++],y=t[o++];Cg(n,i,n+g,i+y,vr,dr);break;case At.Z:e=n,a=i;break}ii(cr,cr,vr),oi(Qr,Qr,dr)}return o===0&&(cr[0]=cr[1]=Qr[0]=Qr[1]=0),new ot(cr[0],cr[1],Qr[0]-cr[0],Qr[1]-cr[1])},r.prototype._calculateLength=function(){var t=this.data,e=this._len,a=this._ux,n=this._uy,i=0,o=0,s=0,l=0;this._pathSegLen||(this._pathSegLen=[]);for(var u=this._pathSegLen,f=0,h=0,v=0;v<e;){var c=t[v++],d=v===1;d&&(i=t[v],o=t[v+1],s=i,l=o);var p=-1;switch(c){case At.M:i=s=t[v++],o=l=t[v++];break;case At.L:{var g=t[v++],y=t[v++],m=g-i,_=y-o;(Pr(m)>a||Pr(_)>n||v===e-1)&&(p=Math.sqrt(m*m+_*_),i=g,o=y);break}case At.C:{var S=t[v++],x=t[v++],g=t[v++],y=t[v++],b=t[v++],w=t[v++];p=RC(i,o,S,x,g,y,b,w,10),i=b,o=w;break}case At.Q:{var S=t[v++],x=t[v++],g=t[v++],y=t[v++];p=OC(i,o,S,x,g,y,10),i=g,o=y;break}case At.A:var T=t[v++],D=t[v++],A=t[v++],C=t[v++],I=t[v++],L=t[v++],P=L+I;v+=1,d&&(s=Ua(I)*A+T,l=Ya(I)*C+D),p=Zf(A,C)*Yf(oa,Math.abs(L)),i=Ua(P)*A+T,o=Ya(P)*C+D;break;case At.R:{s=i=t[v++],l=o=t[v++];var R=t[v++],E=t[v++];p=R*2+E*2;break}case At.Z:{var m=s-i,_=l-o;p=Math.sqrt(m*m+_*_),i=s,o=l;break}}p>=0&&(u[h++]=p,f+=p)}return this._pathLen=f,f},r.prototype.rebuildPath=function(t,e){var a=this.data,n=this._ux,i=this._uy,o=this._len,s,l,u,f,h,v,c=e<1,d,p,g=0,y=0,m,_=0,S,x;if(!(c&&(this._pathSegLen||this._calculateLength(),d=this._pathSegLen,p=this._pathLen,m=e*p,!m)))t:for(var b=0;b<o;){var w=a[b++],T=b===1;switch(T&&(u=a[b],f=a[b+1],s=u,l=f),w!==At.L&&_>0&&(t.lineTo(S,x),_=0),w){case At.M:s=u=a[b++],l=f=a[b++],t.moveTo(u,f);break;case At.L:{h=a[b++],v=a[b++];var D=Pr(h-u),A=Pr(v-f);if(D>n||A>i){if(c){var C=d[y++];if(g+C>m){var I=(m-g)/C;t.lineTo(u*(1-I)+h*I,f*(1-I)+v*I);break t}g+=C}t.lineTo(h,v),u=h,f=v,_=0}else{var L=D*D+A*A;L>_&&(S=h,x=v,_=L)}break}case At.C:{var P=a[b++],R=a[b++],E=a[b++],O=a[b++],k=a[b++],z=a[b++];if(c){var C=d[y++];if(g+C>m){var I=(m-g)/C;Yl(u,P,E,k,I,Ha),Yl(f,R,O,z,I,Wa),t.bezierCurveTo(Ha[1],Wa[1],Ha[2],Wa[2],Ha[3],Wa[3]);break t}g+=C}t.bezierCurveTo(P,R,E,O,k,z),u=k,f=z;break}case At.Q:{var P=a[b++],R=a[b++],E=a[b++],O=a[b++];if(c){var C=d[y++];if(g+C>m){var I=(m-g)/C;Zl(u,P,E,I,Ha),Zl(f,R,O,I,Wa),t.quadraticCurveTo(Ha[1],Wa[1],Ha[2],Wa[2]);break t}g+=C}t.quadraticCurveTo(P,R,E,O),u=E,f=O;break}case At.A:var V=a[b++],G=a[b++],W=a[b++],Z=a[b++],rt=a[b++],lt=a[b++],Ct=a[b++],Ot=!a[b++],ut=W>Z?W:Z,tt=Pr(W-Z)>.001,pt=rt+lt,q=!1;if(c){var C=d[y++];g+C>m&&(pt=rt+lt*(m-g)/C,q=!0),g+=C}if(tt&&t.ellipse?t.ellipse(V,G,W,Z,Ct,rt,pt,Ot):t.arc(V,G,ut,rt,pt,Ot),q)break t;T&&(s=Ua(rt)*W+V,l=Ya(rt)*Z+G),u=Ua(pt)*W+V,f=Ya(pt)*Z+G;break;case At.R:s=u=a[b],l=f=a[b+1],h=a[b++],v=a[b++];var at=a[b++],Rt=a[b++];if(c){var C=d[y++];if(g+C>m){var Mt=m-g;t.moveTo(h,v),t.lineTo(h+Yf(Mt,at),v),Mt-=at,Mt>0&&t.lineTo(h+at,v+Yf(Mt,Rt)),Mt-=Rt,Mt>0&&t.lineTo(h+Zf(at-Mt,0),v+Rt),Mt-=at,Mt>0&&t.lineTo(h,v+Zf(Rt-Mt,0));break t}g+=C}t.rect(h,v,at,Rt);break;case At.Z:if(c){var C=d[y++];if(g+C>m){var I=(m-g)/C;t.lineTo(u*(1-I)+s*I,f*(1-I)+l*I);break t}g+=C}t.closePath(),u=s,f=l}}},r.prototype.clone=function(){var t=new r,e=this.data;return t.data=e.slice?e.slice():Array.prototype.slice.call(e),t._len=this._len,t},r.prototype.canSave=function(){return!!this._saveData},r.CMD=At,r.initDefaultProps=(function(){var t=r.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0})(),r})();function Gn(r,t,e,a,n,i,o){if(n===0)return!1;var s=n,l=0,u=r;if(o>t+s&&o>a+s||o<t-s&&o<a-s||i>r+s&&i>e+s||i<r-s&&i<e-s)return!1;if(r!==e)l=(t-a)/(r-e),u=(r*a-e*t)/(r-e);else return Math.abs(i-r)<=s/2;var f=l*i-o+u,h=f*f/(l*l+1);return h<=s/2*s/2}function gA(r,t,e,a,n,i,o,s,l,u,f){if(l===0)return!1;var h=l;if(f>t+h&&f>a+h&&f>i+h&&f>s+h||f<t-h&&f<a-h&&f<i-h&&f<s-h||u>r+h&&u>e+h&&u>n+h&&u>o+h||u<r-h&&u<e-h&&u<n-h&&u<o-h)return!1;var v=PC(r,t,e,a,n,i,o,s,u,f);return v<=h/2}function yA(r,t,e,a,n,i,o,s,l){if(o===0)return!1;var u=o;if(l>t+u&&l>a+u&&l>i+u||l<t-u&&l<a-u&&l<i-u||s>r+u&&s>e+u&&s>n+u||s<r-u&&s<e-u&&s<n-u)return!1;var f=kC(r,t,e,a,n,i,s,l);return f<=u/2}var Dg=Math.PI*2;function ca(r){return r%=Dg,r<0&&(r+=Dg),r}var Wi=Math.PI*2;function mA(r,t,e,a,n,i,o,s,l){if(o===0)return!1;var u=o;s-=r,l-=t;var f=Math.sqrt(s*s+l*l);if(f-u>e||f+u<e)return!1;if(Math.abs(a-n)%Wi<1e-4)return!0;if(i){var h=a;a=ca(n),n=ca(h)}else a=ca(a),n=ca(n);a>n&&(n+=Wi);var v=Math.atan2(l,s);return v<0&&(v+=Wi),v>=a&&v<=n||v+Wi>=a&&v+Wi<=n}function Za(r,t,e,a,n,i){if(i>t&&i>a||i<t&&i<a||a===t)return 0;var o=(i-t)/(a-t),s=a<t?1:-1;(o===1||o===0)&&(s=a<t?.5:-.5);var l=o*(e-r)+r;return l===n?1/0:l>n?s:0}var jr=Dn.CMD,Xa=Math.PI*2,_A=1e-4;function SA(r,t){return Math.abs(r-t)<_A}var ce=[-1,-1,-1],Oe=[-1,-1];function bA(){var r=Oe[0];Oe[0]=Oe[1],Oe[1]=r}function xA(r,t,e,a,n,i,o,s,l,u){if(u>t&&u>a&&u>i&&u>s||u<t&&u<a&&u<i&&u<s)return 0;var f=Ul(t,a,i,s,u,ce);if(f===0)return 0;for(var h=0,v=-1,c=void 0,d=void 0,p=0;p<f;p++){var g=ce[p],y=g===0||g===1?.5:1,m=te(r,e,n,o,g);m<l||(v<0&&(v=cS(t,a,i,s,Oe),Oe[1]<Oe[0]&&v>1&&bA(),c=te(t,a,i,s,Oe[0]),v>1&&(d=te(t,a,i,s,Oe[1]))),v===2?g<Oe[0]?h+=c<t?y:-y:g<Oe[1]?h+=d<c?y:-y:h+=s<d?y:-y:g<Oe[0]?h+=c<t?y:-y:h+=s<c?y:-y)}return h}function wA(r,t,e,a,n,i,o,s){if(s>t&&s>a&&s>i||s<t&&s<a&&s<i)return 0;var l=EC(t,a,i,s,ce);if(l===0)return 0;var u=vS(t,a,i);if(u>=0&&u<=1){for(var f=0,h=Se(t,a,i,u),v=0;v<l;v++){var c=ce[v]===0||ce[v]===1?.5:1,d=Se(r,e,n,ce[v]);d<o||(ce[v]<u?f+=h<t?c:-c:f+=i<h?c:-c)}return f}else{var c=ce[0]===0||ce[0]===1?.5:1,d=Se(r,e,n,ce[0]);return d<o?0:i<t?c:-c}}function TA(r,t,e,a,n,i,o,s){if(s-=t,s>e||s<-e)return 0;var l=Math.sqrt(e*e-s*s);ce[0]=-l,ce[1]=l;var u=Math.abs(a-n);if(u<1e-4)return 0;if(u>=Xa-1e-4){a=0,n=Xa;var f=i?1:-1;return o>=ce[0]+r&&o<=ce[1]+r?f:0}if(a>n){var h=a;a=n,n=h}a<0&&(a+=Xa,n+=Xa);for(var v=0,c=0;c<2;c++){var d=ce[c];if(d+r>o){var p=Math.atan2(s,d),f=i?1:-1;p<0&&(p=Xa+p),(p>=a&&p<=n||p+Xa>=a&&p+Xa<=n)&&(p>Math.PI/2&&p<Math.PI*1.5&&(f=-f),v+=f)}}return v}function WS(r,t,e,a,n){for(var i=r.data,o=r.len(),s=0,l=0,u=0,f=0,h=0,v,c,d=0;d<o;){var p=i[d++],g=d===1;switch(p===jr.M&&d>1&&(e||(s+=Za(l,u,f,h,a,n))),g&&(l=i[d],u=i[d+1],f=l,h=u),p){case jr.M:f=i[d++],h=i[d++],l=f,u=h;break;case jr.L:if(e){if(Gn(l,u,i[d],i[d+1],t,a,n))return!0}else s+=Za(l,u,i[d],i[d+1],a,n)||0;l=i[d++],u=i[d++];break;case jr.C:if(e){if(gA(l,u,i[d++],i[d++],i[d++],i[d++],i[d],i[d+1],t,a,n))return!0}else s+=xA(l,u,i[d++],i[d++],i[d++],i[d++],i[d],i[d+1],a,n)||0;l=i[d++],u=i[d++];break;case jr.Q:if(e){if(yA(l,u,i[d++],i[d++],i[d],i[d+1],t,a,n))return!0}else s+=wA(l,u,i[d++],i[d++],i[d],i[d+1],a,n)||0;l=i[d++],u=i[d++];break;case jr.A:var y=i[d++],m=i[d++],_=i[d++],S=i[d++],x=i[d++],b=i[d++];d+=1;var w=!!(1-i[d++]);v=Math.cos(x)*_+y,c=Math.sin(x)*S+m,g?(f=v,h=c):s+=Za(l,u,v,c,a,n);var T=(a-y)*S/_+y;if(e){if(mA(y,m,S,x,x+b,w,t,T,n))return!0}else s+=TA(y,m,S,x,x+b,w,T,n);l=Math.cos(x+b)*_+y,u=Math.sin(x+b)*S+m;break;case jr.R:f=l=i[d++],h=u=i[d++];var D=i[d++],A=i[d++];if(v=f+D,c=h+A,e){if(Gn(f,h,v,h,t,a,n)||Gn(v,h,v,c,t,a,n)||Gn(v,c,f,c,t,a,n)||Gn(f,c,f,h,t,a,n))return!0}else s+=Za(v,h,v,c,a,n),s+=Za(f,c,f,h,a,n);break;case jr.Z:if(e){if(Gn(l,u,f,h,t,a,n))return!0}else s+=Za(l,u,f,h,a,n);l=f,u=h;break}}return!e&&!SA(u,h)&&(s+=Za(l,u,f,h,a,n)||0),s!==0}function CA(r,t,e){return WS(r,0,!1,t,e)}function MA(r,t,e,a){return WS(r,t,!0,e,a)}var US=gt({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},_n),AA={style:gt({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},Gu.style)},Kf=Bo.concat(["invisible","culling","z","z2","zlevel","parent"]),xt=(function(r){B(t,r);function t(e){return r.call(this,e)||this}return t.prototype.update=function(){var e=this;r.prototype.update.call(this);var a=this.style;if(a.decal){var n=this._decalEl=this._decalEl||new t;n.buildPath===t.prototype.buildPath&&(n.buildPath=function(l){e.buildPath(l,e.shape)}),n.silent=!0;var i=n.style;for(var o in a)i[o]!==a[o]&&(i[o]=a[o]);i.fill=a.fill?a.decal:null,i.decal=null,i.shadowColor=null,a.strokeFirst&&(i.stroke=null);for(var s=0;s<Kf.length;++s)n[Kf[s]]=this[Kf[s]];n.__dirty|=Me}else this._decalEl&&(this._decalEl=null)},t.prototype.getDecalElement=function(){return this._decalEl},t.prototype._init=function(e){var a=Pt(e);this.shape=this.getDefaultShape();var n=this.getDefaultStyle();n&&this.useStyle(n);for(var i=0;i<a.length;i++){var o=a[i],s=e[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({})},t.prototype.getDefaultStyle=function(){return null},t.prototype.getDefaultShape=function(){return{}},t.prototype.canBeInsideText=function(){return this.hasFill()},t.prototype.getInsideTextFill=function(){var e=this.style.fill;if(e!=="none"){if(X(e)){var a=Xl(e,0);return a>.5?wc:a>.2?aM:Tc}else if(e)return Tc}return wc},t.prototype.getInsideTextStroke=function(e){var a=this.style.fill;if(X(a)){var n=this.__zr,i=!!(n&&n.isDarkMode()),o=Xl(e,0)<xc;if(i===o)return a}},t.prototype.buildPath=function(e,a,n){},t.prototype.pathUpdated=function(){this.__dirty&=~ai},t.prototype.getUpdatedPathProxy=function(e){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,e),this.path},t.prototype.createPathProxy=function(){this.path=new Dn(!1)},t.prototype.hasStroke=function(){var e=this.style,a=e.stroke;return!(a==null||a==="none"||!(e.lineWidth>0))},t.prototype.hasFill=function(){var e=this.style,a=e.fill;return a!=null&&a!=="none"},t.prototype.getBoundingRect=function(){var e=this._rect,a=this.style,n=!e;if(n){var i=!1;this.path||(i=!0,this.createPathProxy());var o=this.path;(i||this.__dirty&ai)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),e=o.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=e.clone());if(this.__dirty||n){s.copy(e);var l=a.strokeNoScale?this.getLineScale():1,u=a.lineWidth;if(!this.hasFill()){var f=this.strokeContainThreshold;u=Math.max(u,f??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 e},t.prototype.contain=function(e,a){var n=this.transformCoordToLocal(e,a),i=this.getBoundingRect(),o=this.style;if(e=n[0],a=n[1],i.contain(e,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)),MA(s,l/u,e,a)))return!0}if(this.hasFill())return CA(s,e,a)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=ai,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(e){return this.animate("shape",e)},t.prototype.updateDuringAnimation=function(e){e==="style"?this.dirtyStyle():e==="shape"?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(e,a){e==="shape"?this.setShape(a):r.prototype.attrKV.call(this,e,a)},t.prototype.setShape=function(e,a){var n=this.shape;return n||(n=this.shape={}),typeof e=="string"?n[e]=a:F(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&ai)},t.prototype.createStyle=function(e){return Ou(US,e)},t.prototype._innerSaveToNormal=function(e){r.prototype._innerSaveToNormal.call(this,e);var a=this._normalState;e.shape&&!a.shape&&(a.shape=F({},this.shape))},t.prototype._applyStateObj=function(e,a,n,i,o,s){r.prototype._applyStateObj.call(this,e,a,n,i,o,s);var l=!(a&&i),u;if(a&&a.shape?o?i?u=a.shape:(u=F({},n.shape),F(u,a.shape)):(u=F({},i?this.shape:n.shape),F(u,a.shape)):l&&(u=n.shape),u)if(o){this.shape=F({},this.shape);for(var f={},h=Pt(u),v=0;v<h.length;v++){var c=h[v];typeof u[c]=="object"?this.shape[c]=u[c]:f[c]=u[c]}this._transitionState(e,{shape:f},s)}else this.shape=u,this.dirtyShape()},t.prototype._mergeStates=function(e){for(var a=r.prototype._mergeStates.call(this,e),n,i=0;i<e.length;i++){var o=e[i];o.shape&&(n=n||{},this._mergeStyle(n,o.shape))}return n&&(a.shape=n),a},t.prototype.getAnimationStyleProps=function(){return AA},t.prototype.isZeroArea=function(){return!1},t.extend=function(e){var a=(function(i){B(o,i);function o(s){var l=i.call(this,s)||this;return e.init&&e.init.call(l,s),l}return o.prototype.getDefaultStyle=function(){return J(e.style)},o.prototype.getDefaultShape=function(){return J(e.shape)},o})(t);for(var n in e)typeof e[n]=="function"&&(a.prototype[n]=e[n]);return a},t.initDefaultProps=(function(){var e=t.prototype;e.type="path",e.strokeContainThreshold=5,e.segmentIgnoreThreshold=0,e.subPixelOptimize=!1,e.autoBatch=!1,e.__dirty=Me|vo|ai})(),t})(Ei),DA=gt({strokeFirst:!0,font:xa,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},US),ql=(function(r){B(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.hasStroke=function(){return HS(this.style)},t.prototype.hasFill=function(){var e=this.style,a=e.fill;return a!=null&&a!=="none"},t.prototype.createStyle=function(e){return Ou(DA,e)},t.prototype.setBoundingRect=function(e){this._rect=e},t.prototype.getBoundingRect=function(){return this._rect||(this._rect=fA(this.style)),this._rect},t.initDefaultProps=(function(){var e=t.prototype;e.dirtyRectTolerance=10})(),t})(Ei);ql.prototype.type="tspan";var LA=gt({x:0,y:0},_n),IA={style:gt({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},Gu.style)};function PA(r){return!!(r&&typeof r!="string"&&r.width&&r.height)}var Xe=(function(r){B(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.createStyle=function(e){return Ou(LA,e)},t.prototype._getSize=function(e){var a=this.style,n=a[e];if(n!=null)return n;var i=PA(a.image)?a.image:this.__image;if(!i)return 0;var o=e==="width"?"height":"width",s=a[o];return s==null?i[e]:i[e]/i[o]*s},t.prototype.getWidth=function(){return this._getSize("width")},t.prototype.getHeight=function(){return this._getSize("height")},t.prototype.getAnimationStyleProps=function(){return IA},t.prototype.getBoundingRect=function(){var e=this.style;return this._rect||(this._rect=new ot(e.x||0,e.y||0,this.getWidth(),this.getHeight())),this._rect},t})(Ei);Xe.prototype.type="image";function RA(r,t){var e=t.x,a=t.y,n=t.width,i=t.height,o=t.r,s,l,u,f;n<0&&(e=e+n,n=-n),i<0&&(a=a+i,i=-i),typeof o=="number"?s=l=u=f=o:o instanceof Array?o.length===1?s=l=u=f=o[0]:o.length===2?(s=u=o[0],l=f=o[1]):o.length===3?(s=o[0],l=f=o[1],u=o[2]):(s=o[0],l=o[1],u=o[2],f=o[3]):s=l=u=f=0;var h;s+l>n&&(h=s+l,s*=n/h,l*=n/h),u+f>n&&(h=u+f,u*=n/h,f*=n/h),l+u>i&&(h=l+u,l*=i/h,u*=i/h),s+f>i&&(h=s+f,s*=i/h,f*=i/h),r.moveTo(e+s,a),r.lineTo(e+n-l,a),l!==0&&r.arc(e+n-l,a+l,l,-Math.PI/2,0),r.lineTo(e+n,a+i-u),u!==0&&r.arc(e+n-u,a+i-u,u,0,Math.PI/2),r.lineTo(e+f,a+i),f!==0&&r.arc(e+f,a+i-f,f,Math.PI/2,Math.PI),r.lineTo(e,a+s),s!==0&&r.arc(e+s,a+s,s,Math.PI,Math.PI*1.5)}var ui=Math.round;function YS(r,t,e){if(t){var a=t.x1,n=t.x2,i=t.y1,o=t.y2;r.x1=a,r.x2=n,r.y1=i,r.y2=o;var s=e&&e.lineWidth;return s&&(ui(a*2)===ui(n*2)&&(r.x1=r.x2=cn(a,s,!0)),ui(i*2)===ui(o*2)&&(r.y1=r.y2=cn(i,s,!0))),r}}function ZS(r,t,e){if(t){var a=t.x,n=t.y,i=t.width,o=t.height;r.x=a,r.y=n,r.width=i,r.height=o;var s=e&&e.lineWidth;return s&&(r.x=cn(a,s,!0),r.y=cn(n,s,!0),r.width=Math.max(cn(a+i,s,!1)-r.x,i===0?0:1),r.height=Math.max(cn(n+o,s,!1)-r.y,o===0?0:1)),r}}function cn(r,t,e){if(!t)return r;var a=ui(r*2);return(a+ui(t))%2===0?a/2:(a+(e?1:-1))/2}var EA=(function(){function r(){this.x=0,this.y=0,this.width=0,this.height=0}return r})(),kA={},_t=(function(r){B(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new EA},t.prototype.buildPath=function(e,a){var n,i,o,s;if(this.subPixelOptimize){var l=ZS(kA,a,this.style);n=l.x,i=l.y,o=l.width,s=l.height,l.r=a.r,a=l}else n=a.x,i=a.y,o=a.width,s=a.height;a.r?RA(e,a):e.rect(n,i,o,s)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t})(xt);_t.prototype.type="rect";var Lg={fill:"#000"},Ig=2,pr={},OA={style:gt({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},Gu.style)},Tt=(function(r){B(t,r);function t(e){var a=r.call(this)||this;return a.type="text",a._children=[],a._defaultStyle=Lg,a.attr(e),a}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){r.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var e=0;e<this._children.length;e++){var a=this._children[e];a.zlevel=this.zlevel,a.z=this.z,a.z2=this.z2,a.culling=this.culling,a.cursor=this.cursor,a.invisible=this.invisible}},t.prototype.updateTransform=function(){var e=this.innerTransformable;e?(e.updateTransform(),e.transform&&(this.transform=e.transform)):r.prototype.updateTransform.call(this)},t.prototype.getLocalTransform=function(e){var a=this.innerTransformable;return a?a.getLocalTransform(e):r.prototype.getLocalTransform.call(this,e)},t.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),r.prototype.getComputedTransform.call(this)},t.prototype._updateSubTexts=function(){this._childCursor=0,FA(this.style),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},t.prototype.addSelfToZr=function(e){r.prototype.addSelfToZr.call(this,e);for(var a=0;a<this._children.length;a++)this._children[a].__zr=e},t.prototype.removeSelfFromZr=function(e){r.prototype.removeSelfFromZr.call(this,e);for(var a=0;a<this._children.length;a++)this._children[a].__zr=null},t.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var e=new ot(0,0,0,0),a=this._children,n=[],i=null,o=0;o<a.length;o++){var s=a[o],l=s.getBoundingRect(),u=s.getLocalTransform(n);u?(e.copy(l),e.applyTransform(u),i=i||e.clone(),i.union(e)):(i=i||l.clone(),i.union(l))}this._rect=i||e}return this._rect},t.prototype.setDefaultTextStyle=function(e){this._defaultStyle=e||Lg},t.prototype.setTextContent=function(e){},t.prototype._mergeStyle=function(e,a){if(!a)return e;var n=a.rich,i=e.rich||n&&{};return F(e,a),n&&i?(this._mergeRich(i,n),e.rich=i):i&&(e.rich=i),e},t.prototype._mergeRich=function(e,a){for(var n=Pt(a),i=0;i<n.length;i++){var o=n[i];e[o]=e[o]||{},F(e[o],a[o])}},t.prototype.getAnimationStyleProps=function(){return OA},t.prototype._getOrCreateChild=function(e){var a=this._children[this._childCursor];return(!a||!(a instanceof e))&&(a=new e),this._children[this._childCursor++]=a,a.__zr=this.__zr,a.parent=this,a},t.prototype._updatePlainTexts=function(){var e=this.style,a=e.font||xa,n=e.padding,i=this._defaultStyle,o=e.x||0,s=e.y||0,l=e.align||i.align||"left",u=e.verticalAlign||i.verticalAlign||"top";bg(pr,i.overflowRect,o,s,l,u),o=pr.baseX,s=pr.baseY;var f=Ng(e),h=aA(f,e,pr.outerWidth,pr.outerHeight),v=qf(e),c=!!e.backgroundColor,d=h.outerHeight,p=h.outerWidth,g=h.lines,y=h.lineHeight;this.isTruncated=!!h.isTruncated;var m=o,_=mn(s,h.contentHeight,u);if(v||n){var S=Si(o,p,l),x=mn(s,d,u);v&&this._renderBackground(e,e,S,x,p,d)}_+=y/2,n&&(m=Bg(o,l,n),u==="top"?_+=n[0]:u==="bottom"&&(_-=n[2]));for(var b=0,w=!1,T=!1,D=Og("fill"in e?e.fill:(T=!0,i.fill)),A=kg("stroke"in e?e.stroke:!c&&(!i.autoStroke||T)?(b=Ig,w=!0,i.stroke):null),C=e.textShadowBlur>0,I=0;I<g.length;I++){var L=this._getOrCreateChild(ql),P=L.createStyle();L.useStyle(P),P.text=g[I],P.x=m,P.y=_,P.textAlign=l,P.textBaseline="middle",P.opacity=e.opacity,P.strokeFirst=!0,C&&(P.shadowBlur=e.textShadowBlur||0,P.shadowColor=e.textShadowColor||"transparent",P.shadowOffsetX=e.textShadowOffsetX||0,P.shadowOffsetY=e.textShadowOffsetY||0),P.stroke=A,P.fill=D,A&&(P.lineWidth=e.lineWidth||b,P.lineDash=e.lineDash,P.lineDashOffset=e.lineDashOffset||0),P.font=a,Rg(P,e),_+=y,L.setBoundingRect(Dc(P,h.contentWidth,h.calculatedLineHeight,w?0:null))}},t.prototype._updateRichTexts=function(){var e=this.style,a=this._defaultStyle,n=e.align||a.align,i=e.verticalAlign||a.verticalAlign,o=e.x||0,s=e.y||0;bg(pr,a.overflowRect,o,s,n,i),o=pr.baseX,s=pr.baseY;var l=Ng(e),u=oA(l,e,pr.outerWidth,pr.outerHeight,n),f=u.width,h=u.outerWidth,v=u.outerHeight,c=e.padding;this.isTruncated=!!u.isTruncated;var d=Si(o,h,n),p=mn(s,v,i),g=d,y=p;c&&(g+=c[3],y+=c[0]);var m=g+f;qf(e)&&this._renderBackground(e,e,d,p,h,v);for(var _=!!e.backgroundColor,S=0;S<u.lines.length;S++){for(var x=u.lines[S],b=x.tokens,w=b.length,T=x.lineHeight,D=x.width,A=0,C=g,I=m,L=w-1,P=void 0;A<w&&(P=b[A],!P.align||P.align==="left");)this._placeToken(P,e,T,y,C,"left",_),D-=P.width,C+=P.width,A++;for(;L>=0&&(P=b[L],P.align==="right");)this._placeToken(P,e,T,y,I,"right",_),D-=P.width,I-=P.width,L--;for(C+=(f-(C-g)-(m-I)-D)/2;A<=L;)P=b[A],this._placeToken(P,e,T,y,C+P.width/2,"center",_),C+=P.width,A++;y+=T}},t.prototype._placeToken=function(e,a,n,i,o,s,l){var u=a.rich[e.styleName]||{};u.text=e.text;var f=e.verticalAlign,h=i+n/2;f==="top"?h=i+e.height/2:f==="bottom"&&(h=i+n-e.height/2);var v=!e.isLineHolder&&qf(u);v&&this._renderBackground(u,a,s==="right"?o-e.width:s==="center"?o-e.width/2:o,h-e.height/2,e.width,e.height);var c=!!u.backgroundColor,d=e.textPadding;d&&(o=Bg(o,s,d),h-=e.height/2-d[0]-e.innerHeight/2);var p=this._getOrCreateChild(ql),g=p.createStyle();p.useStyle(g);var y=this._defaultStyle,m=!1,_=0,S=!1,x=Og("fill"in u?u.fill:"fill"in a?a.fill:(m=!0,y.fill)),b=kg("stroke"in u?u.stroke:"stroke"in a?a.stroke:!c&&!l&&(!y.autoStroke||m)?(_=Ig,S=!0,y.stroke):null),w=u.textShadowBlur>0||a.textShadowBlur>0;g.text=e.text,g.x=o,g.y=h,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=e.font||xa,g.opacity=ya(u.opacity,a.opacity,1),Rg(g,u),b&&(g.lineWidth=ya(u.lineWidth,a.lineWidth,_),g.lineDash=et(u.lineDash,a.lineDash),g.lineDashOffset=a.lineDashOffset||0,g.stroke=b),x&&(g.fill=x),p.setBoundingRect(Dc(g,e.contentWidth,e.contentHeight,S?0:null))},t.prototype._renderBackground=function(e,a,n,i,o,s){var l=e.backgroundColor,u=e.borderWidth,f=e.borderColor,h=l&&l.image,v=l&&!h,c=e.borderRadius,d=this,p,g;if(v||e.lineHeight||u&&f){p=this._getOrCreateChild(_t),p.useStyle(p.createStyle()),p.style.fill=null;var y=p.shape;y.x=n,y.y=i,y.width=o,y.height=s,y.r=c,p.dirtyShape()}if(v){var m=p.style;m.fill=l||null,m.fillOpacity=et(e.fillOpacity,1)}else if(h){g=this._getOrCreateChild(Xe),g.onload=function(){d.dirtyStyle()};var _=g.style;_.image=l.image,_.x=n,_.y=i,_.width=o,_.height=s}if(u&&f){var m=p.style;m.lineWidth=u,m.stroke=f,m.strokeOpacity=et(e.strokeOpacity,1),m.lineDash=e.borderDash,m.lineDashOffset=e.borderDashOffset||0,p.strokeContainThreshold=0,p.hasFill()&&p.hasStroke()&&(m.strokeFirst=!0,m.lineWidth*=2)}var S=(p||g).style;S.shadowBlur=e.shadowBlur||0,S.shadowColor=e.shadowColor||"transparent",S.shadowOffsetX=e.shadowOffsetX||0,S.shadowOffsetY=e.shadowOffsetY||0,S.opacity=ya(e.opacity,a.opacity,1)},t.makeFont=function(e){var a="";return VA(e)&&(a=[e.fontStyle,e.fontWeight,zA(e.fontSize),e.fontFamily||"sans-serif"].join(" ")),a&&Sr(a)||e.textFont||e.font},t})(Ei),BA={left:!0,right:1,center:1},NA={top:1,bottom:1,middle:1},Pg=["fontStyle","fontWeight","fontSize","fontFamily"];function zA(r){return typeof r=="string"&&(r.indexOf("px")!==-1||r.indexOf("rem")!==-1||r.indexOf("em")!==-1)?r:isNaN(+r)?Yv+"px":r+"px"}function Rg(r,t){for(var e=0;e<Pg.length;e++){var a=Pg[e],n=t[a];n!=null&&(r[a]=n)}}function VA(r){return r.fontSize!=null||r.fontFamily||r.fontWeight}function FA(r){return Eg(r),M(r.rich,Eg),r}function Eg(r){if(r){r.font=Tt.makeFont(r);var t=r.align;t==="middle"&&(t="center"),r.align=t==null||BA[t]?t:"left";var e=r.verticalAlign;e==="center"&&(e="middle"),r.verticalAlign=e==null||NA[e]?e:"top";var a=r.padding;a&&(r.padding=ku(r.padding))}}function kg(r,t){return r==null||t<=0||r==="transparent"||r==="none"?null:r.image||r.colorStops?"#000":r}function Og(r){return r==null||r==="none"?null:r.image||r.colorStops?"#000":r}function Bg(r,t,e){return t==="right"?r-e[1]:t==="center"?r+e[3]/2-e[1]/2:r+e[3]}function Ng(r){var t=r.text;return t!=null&&(t+=""),t}function qf(r){return!!(r.backgroundColor||r.lineHeight||r.borderWidth&&r.borderColor)}var vt=wt(),Pc=function(r,t,e,a){if(a){var n=vt(a);n.dataIndex=e,n.dataType=t,n.seriesIndex=r,n.ssrType="chart",a.type==="group"&&a.traverse(function(i){var o=vt(i);o.seriesIndex=r,o.dataIndex=e,o.dataType=t,o.ssrType="chart"})}},zg=1,Vg={},XS=wt(),ld=wt(),ud=0,Hu=1,Wu=2,ye=["emphasis","blur","select"],Ho=["normal","emphasis","blur","select"],cs=10,GA=9,Sn="highlight",Il="downplay",Ql="select",Rc="unselect",jl="toggleSelect",fd="selectchanged";function Hn(r){return r!=null&&r!=="none"}function Uu(r,t,e){r.onHoverStateChange&&(r.hoverState||0)!==e&&r.onHoverStateChange(t),r.hoverState=e}function $S(r){Uu(r,"emphasis",Wu)}function KS(r){r.hoverState===Wu&&Uu(r,"normal",ud)}function hd(r){Uu(r,"blur",Hu)}function qS(r){r.hoverState===Hu&&Uu(r,"normal",ud)}function HA(r){r.selected=!0}function WA(r){r.selected=!1}function Fg(r,t,e){t(r,e)}function Kr(r,t,e){Fg(r,t,e),r.isGroup&&r.traverse(function(a){Fg(a,t,e)})}function Gg(r,t){switch(t){case"emphasis":r.hoverState=Wu;break;case"normal":r.hoverState=ud;break;case"blur":r.hoverState=Hu;break;case"select":r.selected=!0}}function UA(r,t,e,a){for(var n=r.style,i={},o=0;o<t.length;o++){var s=t[o],l=n[s];i[s]=l??(a&&a[s])}for(var o=0;o<r.animators.length;o++){var u=r.animators[o];u.__fromStateTransition&&u.__fromStateTransition.indexOf(e)<0&&u.targetName==="style"&&u.saveTo(i,t)}return i}function YA(r,t,e,a){var n=e&&dt(e,"select")>=0,i=!1;if(r instanceof xt){var o=XS(r),s=n&&o.selectFill||o.normalFill,l=n&&o.selectStroke||o.normalStroke;if(Hn(s)||Hn(l)){a=a||{};var u=a.style||{};u.fill==="inherit"?(i=!0,a=F({},a),u=F({},u),u.fill=s):!Hn(u.fill)&&Hn(s)?(i=!0,a=F({},a),u=F({},u),u.fill=eg(s)):!Hn(u.stroke)&&Hn(l)&&(i||(a=F({},a),u=F({},u)),u.stroke=eg(l)),a.style=u}}if(a&&a.z2==null){i||(a=F({},a));var f=r.z2EmphasisLift;a.z2=r.z2+(f??cs)}return a}function ZA(r,t,e){if(e&&e.z2==null){e=F({},e);var a=r.z2SelectLift;e.z2=r.z2+(a??GA)}return e}function XA(r,t,e){var a=dt(r.currentStates,t)>=0,n=r.style.opacity,i=a?null:UA(r,["opacity"],t,{opacity:1});e=e||{};var o=e.style||{};return o.opacity==null&&(e=F({},e),o=F({opacity:a?n:i.opacity*.1},o),e.style=o),e}function Qf(r,t){var e=this.states[r];if(this.style){if(r==="emphasis")return YA(this,r,t,e);if(r==="blur")return XA(this,r,e);if(r==="select")return ZA(this,r,e)}return e}function Ec(r){r.stateProxy=Qf;var t=r.getTextContent(),e=r.getTextGuideLine();t&&(t.stateProxy=Qf),e&&(e.stateProxy=Qf)}function Hg(r,t){!tb(r,t)&&!r.__highByOuter&&Kr(r,$S)}function Wg(r,t){!tb(r,t)&&!r.__highByOuter&&Kr(r,KS)}function Ta(r,t){r.__highByOuter|=1<<(t||0),Kr(r,$S)}function Ca(r,t){!(r.__highByOuter&=~(1<<(t||0)))&&Kr(r,KS)}function QS(r){Kr(r,hd)}function cd(r){Kr(r,qS)}function jS(r){Kr(r,HA)}function JS(r){Kr(r,WA)}function tb(r,t){return r.__highDownSilentOnTouch&&t.zrByTouch}function eb(r){var t=r.getModel(),e=[],a=[];t.eachComponent(function(n,i){var o=ld(i),s=n==="series",l=s?r.getViewOfSeriesModel(i):r.getViewOfComponentModel(i);!s&&a.push(l),o.isBlured&&(l.group.traverse(function(u){qS(u)}),s&&e.push(i)),o.isBlured=!1}),M(a,function(n){n&&n.toggleBlurSeries&&n.toggleBlurSeries(e,!1,t)})}function kc(r,t,e,a){var n=a.getModel();e=e||"coordinateSystem";function i(u,f){for(var h=0;h<f.length;h++){var v=u.getItemGraphicEl(f[h]);v&&cd(v)}}if(r!=null&&!(!t||t==="none")){var o=n.getSeriesByIndex(r),s=o.coordinateSystem;s&&s.master&&(s=s.master);var l=[];n.eachSeries(function(u){var f=o===u,h=u.coordinateSystem;h&&h.master&&(h=h.master);var v=h&&s?h===s:f;if(!(e==="series"&&!f||e==="coordinateSystem"&&!v||t==="series"&&f)){var c=a.getViewOfSeriesModel(u);if(c.group.traverse(function(g){g.__highByOuter&&f&&t==="self"||hd(g)}),xe(t))i(u.getData(),t);else if(j(t))for(var d=Pt(t),p=0;p<d.length;p++)i(u.getData(d[p]),t[d[p]]);l.push(u),ld(u).isBlured=!0}}),n.eachComponent(function(u,f){if(u!=="series"){var h=a.getViewOfComponentModel(f);h&&h.toggleBlurSeries&&h.toggleBlurSeries(l,!0,n)}})}}function Oc(r,t,e){if(!(r==null||t==null)){var a=e.getModel().getComponent(r,t);if(a){ld(a).isBlured=!0;var n=e.getViewOfComponentModel(a);!n||!n.focusBlurEnabled||n.group.traverse(function(i){hd(i)})}}}function $A(r,t,e){var a=r.seriesIndex,n=r.getData(t.dataType);if(n){var i=Mn(n,t);i=(H(i)?i[0]:i)||0;var o=n.getItemGraphicEl(i);if(!o)for(var s=n.count(),l=0;!o&&l<s;)o=n.getItemGraphicEl(l++);if(o){var u=vt(o);kc(a,u.focus,u.blurScope,e)}else{var f=r.get(["emphasis","focus"]),h=r.get(["emphasis","blurScope"]);f!=null&&kc(a,f,h,e)}}}function vd(r,t,e,a){var n={focusSelf:!1,dispatchers:null};if(r==null||r==="series"||t==null||e==null)return n;var i=a.getModel().getComponent(r,t);if(!i)return n;var o=a.getViewOfComponentModel(i);if(!o||!o.findHighDownDispatchers)return n;for(var s=o.findHighDownDispatchers(e),l,u=0;u<s.length;u++)if(vt(s[u]).focus==="self"){l=!0;break}return{focusSelf:l,dispatchers:s}}function KA(r,t,e){var a=vt(r),n=vd(a.componentMainType,a.componentIndex,a.componentHighDownName,e),i=n.dispatchers,o=n.focusSelf;i?(o&&Oc(a.componentMainType,a.componentIndex,e),M(i,function(s){return Hg(s,t)})):(kc(a.seriesIndex,a.focus,a.blurScope,e),a.focus==="self"&&Oc(a.componentMainType,a.componentIndex,e),Hg(r,t))}function qA(r,t,e){eb(e);var a=vt(r),n=vd(a.componentMainType,a.componentIndex,a.componentHighDownName,e).dispatchers;n?M(n,function(i){return Wg(i,t)}):Wg(r,t)}function QA(r,t,e){if(Nc(t)){var a=t.dataType,n=r.getData(a),i=Mn(n,t);H(i)||(i=[i]),r[t.type===jl?"toggleSelect":t.type===Ql?"select":"unselect"](i,a)}}function Ug(r){var t=r.getAllData();M(t,function(e){var a=e.data,n=e.type;a.eachItemGraphicEl(function(i,o){r.isSelected(o,n)?jS(i):JS(i)})})}function jA(r){var t=[];return r.eachSeries(function(e){var a=e.getAllData();M(a,function(n){n.data;var i=n.type,o=e.getSelectedDataIndices();if(o.length>0){var s={dataIndex:o,seriesIndex:e.seriesIndex};i!=null&&(s.dataType=i),t.push(s)}})}),t}function Jl(r,t,e){vn(r,!0),Kr(r,Ec),Bc(r,t,e)}function JA(r){vn(r,!1)}function ae(r,t,e,a){a?JA(r):Jl(r,t,e)}function Bc(r,t,e){var a=vt(r);t!=null?(a.focus=t,a.blurScope=e):a.focus&&(a.focus=null)}var Yg=["emphasis","blur","select"],tD={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function De(r,t,e,a){e=e||"itemStyle";for(var n=0;n<Yg.length;n++){var i=Yg[n],o=t.getModel([i,e]),s=r.ensureState(i);s.style=a?a(o):o[tD[e]]()}}function vn(r,t){var e=t===!1,a=r;r.highDownSilentOnTouch&&(a.__highDownSilentOnTouch=r.highDownSilentOnTouch),(!e||a.__highDownDispatcher)&&(a.__highByOuter=a.__highByOuter||0,a.__highDownDispatcher=!e)}function Wo(r){return!!(r&&r.__highDownDispatcher)}function eD(r){var t=Vg[r];return t==null&&zg<=32&&(t=Vg[r]=zg++),t}function Nc(r){var t=r.type;return t===Ql||t===Rc||t===jl}function Zg(r){var t=r.type;return t===Sn||t===Il}function rD(r){var t=XS(r);t.normalFill=r.style.fill,t.normalStroke=r.style.stroke;var e=r.states.select||{};t.selectFill=e.style&&e.style.fill||null,t.selectStroke=e.style&&e.style.stroke||null}var Wn=Dn.CMD,aD=[[],[],[]],Xg=Math.sqrt,nD=Math.atan2;function iD(r,t){if(t){var e=r.data,a=r.len(),n,i,o,s,l,u,f=Wn.M,h=Wn.C,v=Wn.L,c=Wn.R,d=Wn.A,p=Wn.Q;for(o=0,s=0;o<a;){switch(n=e[o++],s=o,i=0,n){case f:i=1;break;case v:i=1;break;case h:i=3;break;case p:i=2;break;case d:var g=t[4],y=t[5],m=Xg(t[0]*t[0]+t[1]*t[1]),_=Xg(t[2]*t[2]+t[3]*t[3]),S=nD(-t[1]/_,t[0]/m);e[o]*=m,e[o++]+=g,e[o]*=_,e[o++]+=y,e[o++]*=m,e[o++]*=_,e[o++]+=S,e[o++]+=S,o+=2,s=o;break;case c:u[0]=e[o++],u[1]=e[o++],pe(u,u,t),e[s++]=u[0],e[s++]=u[1],u[0]+=e[o++],u[1]+=e[o++],pe(u,u,t),e[s++]=u[0],e[s++]=u[1]}for(l=0;l<i;l++){var x=aD[l];x[0]=e[o++],x[1]=e[o++],pe(x,x,t),e[s++]=x[0],e[s++]=x[1]}}r.increaseVersion()}}var jf=Math.sqrt,Bs=Math.sin,Ns=Math.cos,Ui=Math.PI;function $g(r){return Math.sqrt(r[0]*r[0]+r[1]*r[1])}function zc(r,t){return(r[0]*t[0]+r[1]*t[1])/($g(r)*$g(t))}function Kg(r,t){return(r[0]*t[1]<r[1]*t[0]?-1:1)*Math.acos(zc(r,t))}function qg(r,t,e,a,n,i,o,s,l,u,f){var h=l*(Ui/180),v=Ns(h)*(r-e)/2+Bs(h)*(t-a)/2,c=-1*Bs(h)*(r-e)/2+Ns(h)*(t-a)/2,d=v*v/(o*o)+c*c/(s*s);d>1&&(o*=jf(d),s*=jf(d));var p=(n===i?-1:1)*jf((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+e)/2+Ns(h)*g-Bs(h)*y,_=(t+a)/2+Bs(h)*g+Ns(h)*y,S=Kg([1,0],[(v-g)/o,(c-y)/s]),x=[(v-g)/o,(c-y)/s],b=[(-1*v-g)/o,(-1*c-y)/s],w=Kg(x,b);if(zc(x,b)<=-1&&(w=Ui),zc(x,b)>=1&&(w=0),w<0){var T=Math.round(w/Ui*1e6)/1e6;w=Ui*2+T%2*Ui}f.addData(u,m,_,o,s,S,w,h,i)}var oD=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,sD=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function lD(r){var t=new Dn;if(!r)return t;var e=0,a=0,n=e,i=a,o,s=Dn.CMD,l=r.match(oD);if(!l)return t;for(var u=0;u<l.length;u++){for(var f=l[u],h=f.charAt(0),v=void 0,c=f.match(sD)||[],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,S=void 0,x=void 0,b=void 0,w=void 0,T=e,D=a,A=void 0,C=void 0;switch(h){case"l":e+=c[g++],a+=c[g++],v=s.L,t.addData(v,e,a);break;case"L":e=c[g++],a=c[g++],v=s.L,t.addData(v,e,a);break;case"m":e+=c[g++],a+=c[g++],v=s.M,t.addData(v,e,a),n=e,i=a,h="l";break;case"M":e=c[g++],a=c[g++],v=s.M,t.addData(v,e,a),n=e,i=a,h="L";break;case"h":e+=c[g++],v=s.L,t.addData(v,e,a);break;case"H":e=c[g++],v=s.L,t.addData(v,e,a);break;case"v":a+=c[g++],v=s.L,t.addData(v,e,a);break;case"V":a=c[g++],v=s.L,t.addData(v,e,a);break;case"C":v=s.C,t.addData(v,c[g++],c[g++],c[g++],c[g++],c[g++],c[g++]),e=c[g-2],a=c[g-1];break;case"c":v=s.C,t.addData(v,c[g++]+e,c[g++]+a,c[g++]+e,c[g++]+a,c[g++]+e,c[g++]+a),e+=c[g-2],a+=c[g-1];break;case"S":y=e,m=a,A=t.len(),C=t.data,o===s.C&&(y+=e-C[A-4],m+=a-C[A-3]),v=s.C,T=c[g++],D=c[g++],e=c[g++],a=c[g++],t.addData(v,y,m,T,D,e,a);break;case"s":y=e,m=a,A=t.len(),C=t.data,o===s.C&&(y+=e-C[A-4],m+=a-C[A-3]),v=s.C,T=e+c[g++],D=a+c[g++],e+=c[g++],a+=c[g++],t.addData(v,y,m,T,D,e,a);break;case"Q":T=c[g++],D=c[g++],e=c[g++],a=c[g++],v=s.Q,t.addData(v,T,D,e,a);break;case"q":T=c[g++]+e,D=c[g++]+a,e+=c[g++],a+=c[g++],v=s.Q,t.addData(v,T,D,e,a);break;case"T":y=e,m=a,A=t.len(),C=t.data,o===s.Q&&(y+=e-C[A-4],m+=a-C[A-3]),e=c[g++],a=c[g++],v=s.Q,t.addData(v,y,m,e,a);break;case"t":y=e,m=a,A=t.len(),C=t.data,o===s.Q&&(y+=e-C[A-4],m+=a-C[A-3]),e+=c[g++],a+=c[g++],v=s.Q,t.addData(v,y,m,e,a);break;case"A":_=c[g++],S=c[g++],x=c[g++],b=c[g++],w=c[g++],T=e,D=a,e=c[g++],a=c[g++],v=s.A,qg(T,D,e,a,b,w,_,S,x,v,t);break;case"a":_=c[g++],S=c[g++],x=c[g++],b=c[g++],w=c[g++],T=e,D=a,e+=c[g++],a+=c[g++],v=s.A,qg(T,D,e,a,b,w,_,S,x,v,t);break}}(h==="z"||h==="Z")&&(v=s.Z,t.addData(v),e=n,a=i),o=v}return t.toStatic(),t}var rb=(function(r){B(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.applyTransform=function(e){},t})(xt);function ab(r){return r.setData!=null}function nb(r,t){var e=lD(r),a=F({},t);return a.buildPath=function(n){var i=ab(n);if(i&&n.canSave()){n.appendPath(e);var o=n.getContext();o&&n.rebuildPath(o,1)}else{var o=i?n.getContext():n;o&&e.rebuildPath(o,1)}},a.applyTransform=function(n){iD(e,n),this.dirtyShape()},a}function uD(r,t){return new rb(nb(r,t))}function fD(r,t){var e=nb(r,t),a=(function(n){B(i,n);function i(o){var s=n.call(this,o)||this;return s.applyTransform=e.applyTransform,s.buildPath=e.buildPath,s}return i})(rb);return a}function hD(r,t){for(var e=[],a=r.length,n=0;n<a;n++){var i=r[n];e.push(i.getUpdatedPathProxy(!0))}var o=new xt(t);return o.createPathProxy(),o.buildPath=function(s){if(ab(s)){s.appendPath(e);var l=s.getContext();l&&s.rebuildPath(l,1)}},o}var cD=(function(){function r(){this.cx=0,this.cy=0,this.r=0}return r})(),vs=(function(r){B(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new cD},t.prototype.buildPath=function(e,a){e.moveTo(a.cx+a.r,a.cy),e.arc(a.cx,a.cy,a.r,0,Math.PI*2)},t})(xt);vs.prototype.type="circle";var vD=(function(){function r(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return r})(),dd=(function(r){B(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new vD},t.prototype.buildPath=function(e,a){var n=.5522848,i=a.cx,o=a.cy,s=a.rx,l=a.ry,u=s*n,f=l*n;e.moveTo(i-s,o),e.bezierCurveTo(i-s,o-f,i-u,o-l,i,o-l),e.bezierCurveTo(i+u,o-l,i+s,o-f,i+s,o),e.bezierCurveTo(i+s,o+f,i+u,o+l,i,o+l),e.bezierCurveTo(i-u,o+l,i-s,o+f,i-s,o),e.closePath()},t})(xt);dd.prototype.type="ellipse";var ib=Math.PI,Jf=ib*2,$a=Math.sin,Un=Math.cos,dD=Math.acos,oe=Math.atan2,Qg=Math.abs,Ao=Math.sqrt,go=Math.max,gr=Math.min,Qe=1e-4;function pD(r,t,e,a,n,i,o,s){var l=e-r,u=a-t,f=o-n,h=s-i,v=h*l-f*u;if(!(v*v<Qe))return v=(f*(t-i)-h*(r-n))/v,[r+v*l,t+v*u]}function zs(r,t,e,a,n,i,o){var s=r-e,l=t-a,u=(o?i:-i)/Ao(s*s+l*l),f=u*l,h=-u*s,v=r+f,c=t+h,d=e+f,p=a+h,g=(v+d)/2,y=(c+p)/2,m=d-v,_=p-c,S=m*m+_*_,x=n-i,b=v*p-d*c,w=(_<0?-1:1)*Ao(go(0,x*x*S-b*b)),T=(b*_-m*w)/S,D=(-b*m-_*w)/S,A=(b*_+m*w)/S,C=(-b*m+_*w)/S,I=T-g,L=D-y,P=A-g,R=C-y;return I*I+L*L>P*P+R*R&&(T=A,D=C),{cx:T,cy:D,x0:-f,y0:-h,x1:T*(n/x-1),y1:D*(n/x-1)}}function gD(r){var t;if(H(r)){var e=r.length;if(!e)return r;e===1?t=[r[0],r[0],0,0]:e===2?t=[r[0],r[0],r[1],r[1]]:e===3?t=r.concat(r[2]):t=r}else t=[r,r,r,r];return t}function yD(r,t){var e,a=go(t.r,0),n=go(t.r0||0,0),i=a>0,o=n>0;if(!(!i&&!o)){if(i||(a=n,n=0),n>a){var s=a;a=n,n=s}var l=t.startAngle,u=t.endAngle;if(!(isNaN(l)||isNaN(u))){var f=t.cx,h=t.cy,v=!!t.clockwise,c=Qg(u-l),d=c>Jf&&c%Jf;if(d>Qe&&(c=d),!(a>Qe))r.moveTo(f,h);else if(c>Jf-Qe)r.moveTo(f+a*Un(l),h+a*$a(l)),r.arc(f,h,a,l,u,!v),n>Qe&&(r.moveTo(f+n*Un(u),h+n*$a(u)),r.arc(f,h,n,u,l,v));else{var p=void 0,g=void 0,y=void 0,m=void 0,_=void 0,S=void 0,x=void 0,b=void 0,w=void 0,T=void 0,D=void 0,A=void 0,C=void 0,I=void 0,L=void 0,P=void 0,R=a*Un(l),E=a*$a(l),O=n*Un(u),k=n*$a(u),z=c>Qe;if(z){var V=t.cornerRadius;V&&(e=gD(V),p=e[0],g=e[1],y=e[2],m=e[3]);var G=Qg(a-n)/2;if(_=gr(G,y),S=gr(G,m),x=gr(G,p),b=gr(G,g),D=w=go(_,S),A=T=go(x,b),(w>Qe||T>Qe)&&(C=a*Un(u),I=a*$a(u),L=n*Un(l),P=n*$a(l),c<ib)){var W=pD(R,E,L,P,C,I,O,k);if(W){var Z=R-W[0],rt=E-W[1],lt=C-W[0],Ct=I-W[1],Ot=1/$a(dD((Z*lt+rt*Ct)/(Ao(Z*Z+rt*rt)*Ao(lt*lt+Ct*Ct)))/2),ut=Ao(W[0]*W[0]+W[1]*W[1]);D=gr(w,(a-ut)/(Ot+1)),A=gr(T,(n-ut)/(Ot-1))}}}if(!z)r.moveTo(f+R,h+E);else if(D>Qe){var tt=gr(y,D),pt=gr(m,D),q=zs(L,P,R,E,a,tt,v),at=zs(C,I,O,k,a,pt,v);r.moveTo(f+q.cx+q.x0,h+q.cy+q.y0),D<w&&tt===pt?r.arc(f+q.cx,h+q.cy,D,oe(q.y0,q.x0),oe(at.y0,at.x0),!v):(tt>0&&r.arc(f+q.cx,h+q.cy,tt,oe(q.y0,q.x0),oe(q.y1,q.x1),!v),r.arc(f,h,a,oe(q.cy+q.y1,q.cx+q.x1),oe(at.cy+at.y1,at.cx+at.x1),!v),pt>0&&r.arc(f+at.cx,h+at.cy,pt,oe(at.y1,at.x1),oe(at.y0,at.x0),!v))}else r.moveTo(f+R,h+E),r.arc(f,h,a,l,u,!v);if(!(n>Qe)||!z)r.lineTo(f+O,h+k);else if(A>Qe){var tt=gr(p,A),pt=gr(g,A),q=zs(O,k,C,I,n,-pt,v),at=zs(R,E,L,P,n,-tt,v);r.lineTo(f+q.cx+q.x0,h+q.cy+q.y0),A<T&&tt===pt?r.arc(f+q.cx,h+q.cy,A,oe(q.y0,q.x0),oe(at.y0,at.x0),!v):(pt>0&&r.arc(f+q.cx,h+q.cy,pt,oe(q.y0,q.x0),oe(q.y1,q.x1),!v),r.arc(f,h,n,oe(q.cy+q.y1,q.cx+q.x1),oe(at.cy+at.y1,at.cx+at.x1),v),tt>0&&r.arc(f+at.cx,h+at.cy,tt,oe(at.y1,at.x1),oe(at.y0,at.x0),!v))}else r.lineTo(f+O,h+k),r.arc(f,h,n,u,l,v)}r.closePath()}}}var mD=(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})(),or=(function(r){B(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new mD},t.prototype.buildPath=function(e,a){yD(e,a)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t})(xt);or.prototype.type="sector";var _D=(function(){function r(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return r})(),Yu=(function(r){B(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new _D},t.prototype.buildPath=function(e,a){var n=a.cx,i=a.cy,o=Math.PI*2;e.moveTo(n+a.r,i),e.arc(n,i,a.r,0,o,!1),e.moveTo(n+a.r0,i),e.arc(n,i,a.r0,0,o,!0)},t})(xt);Yu.prototype.type="ring";function SD(r,t,e,a){var n=[],i=[],o=[],s=[],l,u,f,h;if(a){f=[1/0,1/0],h=[-1/0,-1/0];for(var v=0,c=r.length;v<c;v++)ii(f,f,r[v]),oi(h,h,r[v]);ii(f,f,a[0]),oi(h,h,a[1])}for(var v=0,c=r.length;v<c;v++){var d=r[v];if(e)l=r[v?v-1:c-1],u=r[(v+1)%c];else if(v===0||v===c-1){n.push(eC(r[v]));continue}else l=r[v-1],u=r[v+1];rS(i,u,l),df(i,i,t);var p=oc(d,l),g=oc(d,u),y=p+g;y!==0&&(p/=y,g/=y),df(o,i,-p),df(s,i,g);var m=zp([],d,o),_=zp([],d,s);a&&(oi(m,m,f),ii(m,m,h),oi(_,_,f),ii(_,_,h)),n.push(m),n.push(_)}return e&&n.push(n.shift()),n}function ob(r,t,e){var a=t.smooth,n=t.points;if(n&&n.length>=2){if(a){var i=SD(n,a,e,t.smoothConstraint);r.moveTo(n[0][0],n[0][1]);for(var o=n.length,s=0;s<(e?o:o-1);s++){var l=i[s*2],u=i[s*2+1],f=n[(s+1)%o];r.bezierCurveTo(l[0],l[1],u[0],u[1],f[0],f[1])}}else{r.moveTo(n[0][0],n[0][1]);for(var s=1,h=n.length;s<h;s++)r.lineTo(n[s][0],n[s][1])}e&&r.closePath()}}var bD=(function(){function r(){this.points=null,this.smooth=0,this.smoothConstraint=null}return r})(),Dr=(function(r){B(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new bD},t.prototype.buildPath=function(e,a){ob(e,a,!0)},t})(xt);Dr.prototype.type="polygon";var xD=(function(){function r(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return r})(),ur=(function(r){B(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new xD},t.prototype.buildPath=function(e,a){ob(e,a,!1)},t})(xt);ur.prototype.type="polyline";var wD={},TD=(function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return r})(),sr=(function(r){B(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new TD},t.prototype.buildPath=function(e,a){var n,i,o,s;if(this.subPixelOptimize){var l=YS(wD,a,this.style);n=l.x1,i=l.y1,o=l.x2,s=l.y2}else n=a.x1,i=a.y1,o=a.x2,s=a.y2;var u=a.percent;u!==0&&(e.moveTo(n,i),u<1&&(o=n*(1-u)+o*u,s=i*(1-u)+s*u),e.lineTo(o,s))},t.prototype.pointAt=function(e){var a=this.shape;return[a.x1*(1-e)+a.x2*e,a.y1*(1-e)+a.y2*e]},t})(xt);sr.prototype.type="line";var me=[],CD=(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 jg(r,t,e){var a=r.cpx2,n=r.cpy2;return a!=null||n!=null?[(e?Qp:te)(r.x1,r.cpx1,r.cpx2,r.x2,t),(e?Qp:te)(r.y1,r.cpy1,r.cpy2,r.y2,t)]:[(e?jp:Se)(r.x1,r.cpx1,r.x2,t),(e?jp:Se)(r.y1,r.cpy1,r.y2,t)]}var Zu=(function(r){B(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new CD},t.prototype.buildPath=function(e,a){var n=a.x1,i=a.y1,o=a.x2,s=a.y2,l=a.cpx1,u=a.cpy1,f=a.cpx2,h=a.cpy2,v=a.percent;v!==0&&(e.moveTo(n,i),f==null||h==null?(v<1&&(Zl(n,l,o,v,me),l=me[1],o=me[2],Zl(i,u,s,v,me),u=me[1],s=me[2]),e.quadraticCurveTo(l,u,o,s)):(v<1&&(Yl(n,l,f,o,v,me),l=me[1],f=me[2],o=me[3],Yl(i,u,h,s,v,me),u=me[1],h=me[2],s=me[3]),e.bezierCurveTo(l,u,f,h,o,s)))},t.prototype.pointAt=function(e){return jg(this.shape,e,!1)},t.prototype.tangentAt=function(e){var a=jg(this.shape,e,!0);return qv(a,a)},t})(xt);Zu.prototype.type="bezier-curve";var MD=(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})(),Xu=(function(r){B(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new MD},t.prototype.buildPath=function(e,a){var n=a.cx,i=a.cy,o=Math.max(a.r,0),s=a.startAngle,l=a.endAngle,u=a.clockwise,f=Math.cos(s),h=Math.sin(s);e.moveTo(f*o+n,h*o+i),e.arc(n,i,o,s,l,!u)},t})(xt);Xu.prototype.type="arc";var AD=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="compound",e}return t.prototype._updatePathDirty=function(){for(var e=this.shape.paths,a=this.shapeChanged(),n=0;n<e.length;n++)a=a||e[n].shapeChanged();a&&this.dirtyShape()},t.prototype.beforeBrush=function(){this._updatePathDirty();for(var e=this.shape.paths||[],a=this.getGlobalScale(),n=0;n<e.length;n++)e[n].path||e[n].createPathProxy(),e[n].path.setScale(a[0],a[1],e[n].segmentIgnoreThreshold)},t.prototype.buildPath=function(e,a){for(var n=a.paths||[],i=0;i<n.length;i++)n[i].buildPath(e,n[i].shape,!0)},t.prototype.afterBrush=function(){for(var e=this.shape.paths||[],a=0;a<e.length;a++)e[a].pathUpdated()},t.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),xt.prototype.getBoundingRect.call(this)},t})(xt),sb=(function(){function r(t){this.colorStops=t||[]}return r.prototype.addColorStop=function(t,e){this.colorStops.push({offset:t,color:e})},r})(),$u=(function(r){B(t,r);function t(e,a,n,i,o,s){var l=r.call(this,o)||this;return l.x=e??0,l.y=a??0,l.x2=n??1,l.y2=i??0,l.type="linear",l.global=s||!1,l}return t})(sb),DD=(function(r){B(t,r);function t(e,a,n,i,o){var s=r.call(this,i)||this;return s.x=e??.5,s.y=a??.5,s.r=n??.5,s.type="radial",s.global=o||!1,s}return t})(sb),th=Math.min,LD=Math.max,Vs=Math.abs,Ka=[0,0],qa=[0,0],qt=iS(),Fs=qt.minTv,Gs=qt.maxTv,lb=(function(){function r(t,e){this._corners=[],this._axes=[],this._origin=[0,0];for(var a=0;a<4;a++)this._corners[a]=new ht;for(var a=0;a<2;a++)this._axes[a]=new ht;t&&this.fromBoundingRect(t,e)}return r.prototype.fromBoundingRect=function(t,e){var a=this._corners,n=this._axes,i=t.x,o=t.y,s=i+t.width,l=o+t.height;if(a[0].set(i,o),a[1].set(s,o),a[2].set(s,l),a[3].set(i,l),e)for(var u=0;u<4;u++)a[u].transform(e);ht.sub(n[0],a[1],a[0]),ht.sub(n[1],a[3],a[0]),n[0].normalize(),n[1].normalize();for(var u=0;u<2;u++)this._origin[u]=n[u].dot(a[0])},r.prototype.intersect=function(t,e,a){var n=!0,i=!e;return e&&ht.set(e,0,0),qt.reset(a,!i),!this._intersectCheckOneSide(this,t,i,1)&&(n=!1,i)||!this._intersectCheckOneSide(t,this,i,-1)&&(n=!1,i)||!i&&!qt.negativeSize&&ht.copy(e,n?qt.useDir?qt.dirMinTv:Fs:Gs),n},r.prototype._intersectCheckOneSide=function(t,e,a,n){for(var i=!0,o=0;o<2;o++){var s=t._axes[o];if(t._getProjMinMaxOnAxis(o,t._corners,Ka),t._getProjMinMaxOnAxis(o,e._corners,qa),qt.negativeSize||Ka[1]<qa[0]||Ka[0]>qa[1]){if(i=!1,qt.negativeSize||a)return i;var l=Vs(qa[0]-Ka[1]),u=Vs(Ka[0]-qa[1]);th(l,u)>Gs.len()&&(l<u?ht.scale(Gs,s,-l*n):ht.scale(Gs,s,u*n))}else if(!a){var l=Vs(qa[0]-Ka[1]),u=Vs(Ka[0]-qa[1]);(qt.useDir||th(l,u)<Fs.len())&&((l<u||!qt.bidirectional)&&(ht.scale(Fs,s,l*n),qt.useDir&&qt.calcDirMTV()),(l>=u||!qt.bidirectional)&&(ht.scale(Fs,s,-u*n),qt.useDir&&qt.calcDirMTV()))}}return i},r.prototype._getProjMinMaxOnAxis=function(t,e,a){for(var n=this._axes[t],i=this._origin,o=e[0].dot(n)+i[t],s=o,l=o,u=1;u<e.length;u++){var f=e[u].dot(n)+i[t];s=th(f,s),l=LD(f,l)}a[0]=s+qt.touchThreshold,a[1]=l-qt.touchThreshold,qt.negativeSize=a[1]<a[0]},r})(),ID=[],PD=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.notClear=!0,e.incremental=!0,e._displayables=[],e._temporaryDisplayables=[],e._cursor=0,e}return t.prototype.traverse=function(e,a){e.call(a,this)},t.prototype.useStyle=function(){this.style={}},t.prototype.getCursor=function(){return this._cursor},t.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},t.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},t.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},t.prototype.addDisplayable=function(e,a){a?this._temporaryDisplayables.push(e):this._displayables.push(e),this.markRedraw()},t.prototype.addDisplayables=function(e,a){a=a||!1;for(var n=0;n<e.length;n++)this.addDisplayable(e[n],a)},t.prototype.getDisplayables=function(){return this._displayables},t.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},t.prototype.eachPendingDisplayable=function(e){for(var a=this._cursor;a<this._displayables.length;a++)e&&e(this._displayables[a]);for(var a=0;a<this._temporaryDisplayables.length;a++)e&&e(this._temporaryDisplayables[a])},t.prototype.update=function(){this.updateTransform();for(var e=this._cursor;e<this._displayables.length;e++){var a=this._displayables[e];a.parent=this,a.update(),a.parent=null}for(var e=0;e<this._temporaryDisplayables.length;e++){var a=this._temporaryDisplayables[e];a.parent=this,a.update(),a.parent=null}},t.prototype.getBoundingRect=function(){if(!this._rect){for(var e=new ot(1/0,1/0,-1/0,-1/0),a=0;a<this._displayables.length;a++){var n=this._displayables[a],i=n.getBoundingRect().clone();n.needLocalTransform()&&i.applyTransform(n.getLocalTransform(ID)),e.union(i)}this._rect=e}return this._rect},t.prototype.contain=function(e,a){var n=this.transformCoordToLocal(e,a),i=this.getBoundingRect();if(i.contain(n[0],n[1]))for(var o=0;o<this._displayables.length;o++){var s=this._displayables[o];if(s.contain(e,a))return!0}return!1},t})(Ei),RD=wt();function ED(r,t,e,a,n){var i;if(t&&t.ecModel){var o=t.ecModel.getUpdatePayload();i=o&&o.animation}var s=t&&t.isAnimationEnabled(),l=r==="update";if(s){var u=void 0,f=void 0,h=void 0;a?(u=et(a.duration,200),f=et(a.easing,"cubicOut"),h=0):(u=t.getShallow(l?"animationDurationUpdate":"animationDuration"),f=t.getShallow(l?"animationEasingUpdate":"animationEasing"),h=t.getShallow(l?"animationDelayUpdate":"animationDelay")),i&&(i.duration!=null&&(u=i.duration),i.easing!=null&&(f=i.easing),i.delay!=null&&(h=i.delay)),Q(h)&&(h=h(e,n)),Q(u)&&(u=u(e));var v={duration:u||0,delay:h,easing:f};return v}else return null}function pd(r,t,e,a,n,i,o){var s=!1,l;Q(n)?(o=i,i=n,n=null):j(n)&&(i=n.cb,o=n.during,s=n.isFrom,l=n.removeOpt,n=n.dataIndex);var u=r==="leave";u||t.stopAnimation("leave");var f=ED(r,a,n,u?l||{}:null,a&&a.getAnimationDelayParams?a.getAnimationDelayParams(t,n):null);if(f&&f.duration>0){var h=f.duration,v=f.delay,c=f.easing,d={duration:h,delay:v||0,easing:c,done:i,force:!!i||!!o,setToFinal:!u,scope:r,during:o};s?t.animateFrom(e,d):t.animateTo(e,d)}else t.stopAnimation(),!s&&t.attr(e),o&&o(1),i&&i()}function Et(r,t,e,a,n,i){pd("update",r,t,e,a,n,i)}function zt(r,t,e,a,n,i){pd("enter",r,t,e,a,n,i)}function Do(r){if(!r.__zr)return!0;for(var t=0;t<r.animators.length;t++){var e=r.animators[t];if(e.scope==="leave")return!0}return!1}function tu(r,t,e,a,n,i){Do(r)||pd("leave",r,t,e,a,n,i)}function Jg(r,t,e,a){r.removeTextContent(),r.removeTextGuideLine(),tu(r,{style:{opacity:0}},t,e,a)}function di(r,t,e){function a(){r.parent&&r.parent.remove(r)}r.isGroup?r.traverse(function(n){n.isGroup||Jg(n,t,e,a)}):Jg(r,t,e,a)}function $r(r){RD(r).oldStyle=r.style}var Vc={},ua=["x","y"],bi=["width","height"];function kD(r){return xt.extend(r)}var OD=fD;function BD(r,t){return OD(r,t)}function fr(r,t){Vc[r]=t}function ND(r){if(Vc.hasOwnProperty(r))return Vc[r]}function gd(r,t,e,a){var n=uD(r,t);return e&&(a==="center"&&(e=fb(e,n.getBoundingRect())),hb(n,e)),n}function ub(r,t,e){var a=new Xe({style:{image:r,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(n){if(e==="center"){var i={width:n.width,height:n.height};a.setStyle(fb(t,i))}}});return a}function fb(r,t){var e=t.width/t.height,a=r.height*e,n;a<=r.width?n=r.height:(a=r.width,n=a/e);var i=r.x+r.width/2,o=r.y+r.height/2;return{x:i-a/2,y:o-n/2,width:a,height:n}}var Fc=hD;function hb(r,t){if(r.applyTransform){var e=r.getBoundingRect(),a=e.calculateTransform(t);r.applyTransform(a)}}function Uo(r,t){return YS(r,r,{lineWidth:t}),r}function zD(r,t){return ZS(r,r,t),r}var VD=cn;function bn(r,t){for(var e=jv([]);r&&r!==t;)xo(e,r.getLocalTransform(),e),r=r.parent;return e}function Ur(r,t,e){return t&&!xe(t)&&(t=hn.getLocalTransform(t)),e&&(t=Ii([],t)),pe([],r,t)}function Ku(r,t,e){var a=t[4]===0||t[5]===0||t[0]===0?1:br(2*t[4]/t[0]),n=t[4]===0||t[5]===0||t[2]===0?1:br(2*t[4]/t[2]),i=[r==="left"?-a:r==="right"?a:0,r==="top"?-n:r==="bottom"?n:0];return i=Ur(i,t,e),br(i[0])>br(i[1])?i[0]>0?"right":"left":i[1]>0?"bottom":"top"}function ty(r){return!r.isGroup}function FD(r){return r.shape!=null}function yd(r,t,e){if(!r||!t)return;function a(o){var s={};return o.traverse(function(l){ty(l)&&l.anid&&(s[l.anid]=l)}),s}function n(o){var s={x:o.x,y:o.y,rotation:o.rotation};return FD(o)&&(s.shape=J(o.shape)),s}var i=a(r);t.traverse(function(o){if(ty(o)&&o.anid){var s=i[o.anid];if(s){var l=n(o);o.attr(n(s)),Et(o,l,e,vt(o).dataIndex)}}})}function cb(r,t){return U(r,function(e){var a=e[0];a=Ae(a,t.x),a=No(a,t.x+t.width);var n=e[1];return n=Ae(n,t.y),n=No(n,t.y+t.height),[a,n]})}function GD(r,t){var e=Ae(r.x,t.x),a=No(r.x+r.width,t.x+t.width),n=Ae(r.y,t.y),i=No(r.y+r.height,t.y+t.height);if(a>=e&&i>=n)return{x:e,y:n,width:a-e,height:i-n}}function qu(r,t,e){var a=F({rectHover:!0},t),n=a.style={strokeNoScale:!0};if(e=e||{x:-1,y:-1,width:2,height:2},r)return r.indexOf("image://")===0?(n.image=r.slice(8),gt(n,e),new Xe(a)):gd(r.replace("path://",""),a,e,"center")}function HD(r,t,e,a,n){for(var i=0,o=n[n.length-1];i<n.length;i++){var s=n[i];if(vb(r,t,e,a,s[0],s[1],o[0],o[1]))return!0;o=s}}function vb(r,t,e,a,n,i,o,s){var l=e-r,u=a-t,f=o-n,h=s-i,v=eh(f,h,l,u);if(WD(v))return!1;var c=r-n,d=t-i,p=eh(c,d,l,u)/v;if(p<0||p>1)return!1;var g=eh(c,d,f,h)/v;return!(g<0||g>1)}function eh(r,t,e,a){return r*a-e*t}function WD(r){return r<=1e-6&&r>=-1e-6}function eu(r,t,e,a,n){return t==null||(bt(t)?It[0]=It[1]=It[2]=It[3]=t:(It[0]=t[0],It[1]=t[1],It[2]=t[2],It[3]=t[3]),a&&(It[0]=Ae(0,It[0]),It[1]=Ae(0,It[1]),It[2]=Ae(0,It[2]),It[3]=Ae(0,It[3])),e&&(It[0]=-It[0],It[1]=-It[1],It[2]=-It[2],It[3]=-It[3]),ey(r,It,"x","width",3,1,n&&n[0]||0),ey(r,It,"y","height",0,2,n&&n[1]||0)),r}var It=[0,0,0,0];function ey(r,t,e,a,n,i,o){var s=t[i]+t[n],l=r[a];r[a]+=s,o=Ae(0,No(o,l)),r[a]<o?(r[a]=o,r[e]+=t[n]>=0?-t[n]:t[i]>=0?l+t[i]:br(s)>1e-8?(l-o)*t[n]/s:0):r[e]-=t[n]}function ds(r){var t=r.itemTooltipOption,e=r.componentModel,a=r.itemName,n=X(t)?{formatter:t}:t,i=e.mainType,o=e.componentIndex,s={componentType:i,name:a,$vars:["name"]};s[i+"Index"]=o;var l=r.formatterParamsExtra;l&&M(Pt(l),function(f){rr(s,f)||(s[f]=l[f],s.$vars.push(f))});var u=vt(r.el);u.componentMainType=i,u.componentIndex=o,u.tooltipConfig={name:a,option:gt({content:a,encodeHTMLContent:!0,formatterParams:s},n)}}function Gc(r,t){var e;r.isGroup&&(e=t(r)),e||r.traverse(t)}function ki(r,t){if(r)if(H(r))for(var e=0;e<r.length;e++)Gc(r[e],t);else Gc(r,t)}function md(r){return!r||br(r[1])<Hs&&br(r[2])<Hs||br(r[0])<Hs&&br(r[3])<Hs}var Hs=1e-5;function Yo(r,t){return r?ot.copy(r,t):t.clone()}function _d(r,t){return t?Jv(r||Fe(),t):void 0}function xi(r){return{z:r.get("z")||0,zlevel:r.get("zlevel")||0}}function UD(r){var t=-1/0,e=1/0;Gc(r,function(i){a(i),a(i.getTextContent()),a(i.getTextGuideLine())});function a(i){if(!(!i||i.isGroup)){var o=i.currentStates;if(o.length)for(var s=0;s<o.length;s++)n(i.states[o[s]]);n(i)}}function n(i){if(i){var o=i.z2;o>t&&(t=o),o<e&&(e=o)}}return e>t&&(e=t=0),{min:e,max:t}}function Sd(r,t,e){db(r,t,e,-1/0)}function db(r,t,e,a){if(r.ignoreModelZ)return a;var n=r.getTextContent(),i=r.getTextGuideLine(),o=r.isGroup;if(o)for(var s=r.childrenRef(),l=0;l<s.length;l++)a=Ae(db(s[l],t,e,a),a);else r.z=t,r.zlevel=e,a=Ae(r.z2||0,a);if(n&&(n.z=t,n.zlevel=e,isFinite(a)&&(n.z2=a+2)),i){var u=r.textGuideLineConfig;i.z=t,i.zlevel=e,isFinite(a)&&(i.z2=a+(u&&u.showAbove?1:-1))}return a}fr("circle",vs);fr("ellipse",dd);fr("sector",or);fr("ring",Yu);fr("polygon",Dr);fr("polyline",ur);fr("rect",_t);fr("line",sr);fr("bezierCurve",Zu);fr("arc",Xu);const bd=Object.freeze(Object.defineProperty({__proto__:null,Arc:Xu,BezierCurve:Zu,BoundingRect:ot,Circle:vs,CompoundPath:AD,Ellipse:dd,Group:yt,Image:Xe,IncrementalDisplayable:PD,Line:sr,LinearGradient:$u,OrientedBoundingRect:lb,Path:xt,Point:ht,Polygon:Dr,Polyline:ur,RadialGradient:DD,Rect:_t,Ring:Yu,Sector:or,Text:Tt,WH:bi,XY:ua,applyTransform:Ur,calcZ2Range:UD,clipPointsByRect:cb,clipRectByRect:GD,createIcon:qu,ensureCopyRect:Yo,ensureCopyTransform:_d,expandOrShrinkRect:eu,extendPath:BD,extendShape:kD,getShapeClass:ND,getTransform:bn,groupTransition:yd,initProps:zt,isBoundingRectAxisAligned:md,isElementRemoved:Do,lineLineIntersect:vb,linePolygonIntersect:HD,makeImage:ub,makePath:gd,mergePath:Fc,registerShape:fr,removeElement:tu,removeElementWithFadeOut:di,resizePath:hb,retrieveZInfo:xi,setTooltipConfig:ds,subPixelOptimize:VD,subPixelOptimizeLine:Uo,subPixelOptimizeRect:zD,transformDirection:Ku,traverseElements:ki,traverseUpdateZ:Sd,updateProps:Et},Symbol.toStringTag,{value:"Module"}));var Qu={};function pb(r,t){for(var e=0;e<ye.length;e++){var a=ye[e],n=t[a],i=r.ensureState(a);i.style=i.style||{},i.style.text=n}var o=r.currentStates.slice();r.clearStates(!0),r.setStyle({text:t.normal}),r.useStates(o,!0)}function Hc(r,t,e){var a=r.labelFetcher,n=r.labelDataIndex,i=r.labelDimIndex,o=t.normal,s;a&&(s=a.getFormattedLabel(n,"normal",null,i,o&&o.get("formatter"),e!=null?{interpolatedValue:e}:null)),s==null&&(s=Q(r.defaultText)?r.defaultText(n,r,e):r.defaultText);for(var l={normal:s},u=0;u<ye.length;u++){var f=ye[u],h=t[f];l[f]=et(a?a.getFormattedLabel(n,f,null,i,h&&h.get("formatter")):null,s)}return l}function Ue(r,t,e,a){e=e||Qu;for(var n=r instanceof Tt,i=!1,o=0;o<Ho.length;o++){var s=t[Ho[o]];if(s&&s.getShallow("show")){i=!0;break}}var l=n?r:r.getTextContent();if(i){n||(l||(l=new Tt,r.setTextContent(l)),r.stateProxy&&(l.stateProxy=r.stateProxy));var u=Hc(e,t),f=t.normal,h=!!f.getShallow("show"),v=Ht(f,a&&a.normal,e,!1,!n);v.text=u.normal,n||r.setTextConfig(ry(f,e,!1));for(var o=0;o<ye.length;o++){var c=ye[o],s=t[c];if(s){var d=l.ensureState(c),p=!!et(s.getShallow("show"),h);if(p!==h&&(d.ignore=!p),d.style=Ht(s,a&&a[c],e,!0,!n),d.style.text=u[c],!n){var g=r.ensureState(c);g.textConfig=ry(s,e,!0)}}}l.silent=!!f.getShallow("silent"),l.style.x!=null&&(v.x=l.style.x),l.style.y!=null&&(v.y=l.style.y),l.ignore=!h,l.useStyle(v),l.dirty(),e.enableTextSetter&&(ps(l).setLabelText=function(y){var m=Hc(e,t,y);pb(l,m)})}else l&&(l.ignore=!0);r.dirty()}function Te(r,t){t=t||"label";for(var e={normal:r.getModel(t)},a=0;a<ye.length;a++){var n=ye[a];e[n]=r.getModel([n,t])}return e}function Ht(r,t,e,a,n){var i={};return YD(i,r,e,a,n),t&&F(i,t),i}function ry(r,t,e){t=t||{};var a={},n,i=r.getShallow("rotate"),o=et(r.getShallow("distance"),e?null:5),s=r.getShallow("offset");return n=r.getShallow("position")||(e?null:"inside"),n==="outside"&&(n=t.defaultOutsidePosition||"top"),n!=null&&(a.position=n),s!=null&&(a.offset=s),i!=null&&(i*=Math.PI/180,a.rotation=i),o!=null&&(a.distance=o),a.outsideFill=r.get("color")==="inherit"?t.inheritColor||null:"auto",t.autoOverflowArea!=null&&(a.autoOverflowArea=t.autoOverflowArea),t.layoutRect!=null&&(a.layoutRect=t.layoutRect),a}function YD(r,t,e,a,n){e=e||Qu;var i=t.ecModel,o=i&&i.option.textStyle,s=ZD(t),l;if(s){l={};var u="richInheritPlainLabel",f=et(t.get(u),i?i.get(u):void 0);for(var h in s)if(s.hasOwnProperty(h)){var v=t.getModel(["rich",h]);oy(l[h]={},v,o,t,f,e,a,n,!1,!0)}}l&&(r.rich=l);var c=t.get("overflow");c&&(r.overflow=c);var d=t.get("lineOverflow");d&&(r.lineOverflow=d);var p=r,g=t.get("minMargin");if(g!=null)g=bt(g)?g/2:0,p.margin=[g,g,g,g],p.__marginType=fi.minMargin;else{var y=t.get("textMargin");y!=null&&(p.margin=ku(y),p.__marginType=fi.textMargin)}oy(r,t,o,null,null,e,a,n,!0,!1)}function ZD(r){for(var t;r&&r!==r.ecModel;){var e=(r.option||Qu).rich;if(e){t=t||{};for(var a=Pt(e),n=0;n<a.length;n++){var i=a[n];t[i]=1}}r=r.parentModel}return t}var ay=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],ny=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],iy=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function oy(r,t,e,a,n,i,o,s,l,u){e=!o&&e||Qu;var f=i&&i.inheritColor,h=t.getShallow("color"),v=t.getShallow("textBorderColor"),c=et(t.getShallow("opacity"),e.opacity);(h==="inherit"||h==="auto")&&(f?h=f:h=null),(v==="inherit"||v==="auto")&&(f?v=f:v=null),s||(h=h||e.color,v=v||e.textBorderColor),h!=null&&(r.fill=h),v!=null&&(r.stroke=v);var d=et(t.getShallow("textBorderWidth"),e.textBorderWidth);d!=null&&(r.lineWidth=d);var p=et(t.getShallow("textBorderType"),e.textBorderType);p!=null&&(r.lineDash=p);var g=et(t.getShallow("textBorderDashOffset"),e.textBorderDashOffset);g!=null&&(r.lineDashOffset=g),!o&&c==null&&!u&&(c=i&&i.defaultOpacity),c!=null&&(r.opacity=c),!o&&!s&&r.fill==null&&i.inheritColor&&(r.fill=i.inheritColor);for(var y=0;y<ay.length;y++){var m=ay[y],_=n!==!1&&a?ya(t.getShallow(m),a.getShallow(m),e[m]):et(t.getShallow(m),e[m]);_!=null&&(r[m]=_)}for(var y=0;y<ny.length;y++){var m=ny[y],_=t.getShallow(m);_!=null&&(r[m]=_)}if(r.verticalAlign==null){var S=t.getShallow("baseline");S!=null&&(r.verticalAlign=S)}if(!l||!i.disableBox){for(var y=0;y<iy.length;y++){var m=iy[y],_=t.getShallow(m);_!=null&&(r[m]=_)}var x=t.getShallow("borderType");x!=null&&(r.borderDash=x),(r.backgroundColor==="auto"||r.backgroundColor==="inherit")&&f&&(r.backgroundColor=f),(r.borderColor==="auto"||r.borderColor==="inherit")&&f&&(r.borderColor=f)}}function gb(r,t){var e=t&&t.getModel("textStyle");return Sr([r.fontStyle||e&&e.getShallow("fontStyle")||"",r.fontWeight||e&&e.getShallow("fontWeight")||"",(r.fontSize||e&&e.getShallow("fontSize")||12)+"px",r.fontFamily||e&&e.getShallow("fontFamily")||"sans-serif"].join(" "))}var ps=wt();function yb(r,t,e,a){if(r){var n=ps(r);n.prevValue=n.value,n.value=e;var i=t.normal;n.valueAnimation=i.get("valueAnimation"),n.valueAnimation&&(n.precision=i.get("precision"),n.defaultInterpolatedText=a,n.statesModels=t)}}function XD(r,t,e,a,n){var i=ps(r);if(!i.valueAnimation||i.prevValue===i.value)return;var o=i.defaultInterpolatedText,s=et(i.interpolatedValue,i.prevValue),l=i.value;function u(f){var h=OS(e,i.precision,s,l,f);i.interpolatedValue=f===1?null:h;var v=Hc({labelDataIndex:t,labelFetcher:n,defaultText:o?o(h):h+""},i.statesModels,h);pb(r,v)}r.percent=0,(i.prevValue==null?zt:Et)(r,{percent:1},a,t,null,u)}var fi={minMargin:1,textMargin:2},$D=["textStyle","color"],rh=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],ah=new Tt,KD=(function(){function r(){}return r.prototype.getTextColor=function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get($D):null)},r.prototype.getFont=function(){return gb({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},r.prototype.getTextRect=function(t){for(var e={text:t,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},a=0;a<rh.length;a++)e[rh[a]]=this.getShallow(rh[a]);return ah.useStyle(e),ah.update(),ah.getBoundingRect()},r})(),mb=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],qD=An(mb),QD=(function(){function r(){}return r.prototype.getLineStyle=function(t){return qD(this,t)},r})(),_b=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],jD=An(_b),JD=(function(){function r(){}return r.prototype.getItemStyle=function(t,e){return jD(this,t,e)},r})(),Dt=(function(){function r(t,e,a){this.parentModel=e,this.ecModel=a,this.option=t}return r.prototype.init=function(t,e,a){},r.prototype.mergeOption=function(t,e){ft(this.option,t,!0)},r.prototype.get=function(t,e){return t==null?this.option:this._doGet(this.parsePath(t),!e&&this.parentModel)},r.prototype.getShallow=function(t,e){var a=this.option,n=a==null?a:a[t];if(n==null&&!e){var i=this.parentModel;i&&(n=i.getShallow(t))}return n},r.prototype.getModel=function(t,e){var a=t!=null,n=a?this.parsePath(t):null,i=a?this._doGet(n):this.option;return e=e||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(n)),new r(i,e,this.ecModel)},r.prototype.isEmpty=function(){return this.option==null},r.prototype.restoreData=function(){},r.prototype.clone=function(){var t=this.constructor;return new t(J(this.option))},r.prototype.parsePath=function(t){return typeof t=="string"?t.split("."):t},r.prototype.resolveParentPath=function(t){return t},r.prototype.isAnimationEnabled=function(){if(!ct.node&&this.option){if(this.option.animation!=null)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},r.prototype._doGet=function(t,e){var a=this.option;if(!t)return a;for(var n=0;n<t.length&&!(t[n]&&(a=a&&typeof a=="object"?a[t[n]]:null,a==null));n++);return a==null&&e&&(a=e._doGet(this.resolveParentPath(t),e.parentModel)),a},r})();id(Dt);$M(Dt);fe(Dt,QD);fe(Dt,JD);fe(Dt,JM);fe(Dt,KD);var tL=Math.round(Math.random()*10);function gs(r){return[r||"",tL++].join("_")}function eL(r){var t={};r.registerSubTypeDefaulter=function(e,a){var n=wr(e);t[n.main]=a},r.determineSubType=function(e,a){var n=a.type;if(!n){var i=wr(e).main;r.hasSubTypes(e)&&t[i]&&(n=t[i](a))}return n}}function rL(r,t){r.topologicalTravel=function(i,o,s,l){if(!i.length)return;var u=e(o),f=u.graph,h=u.noEntryList,v={};for(M(i,function(m){v[m]=!0});h.length;){var c=h.pop(),d=f[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){f[m].entryCount--,f[m].entryCount===0&&h.push(m)}function y(m){v[m]=!0,g(m)}};function e(i){var o={},s=[];return M(i,function(l){var u=a(o,l),f=u.originalDeps=t(l),h=n(f,i);u.entryCount=h.length,u.entryCount===0&&s.push(l),M(h,function(v){dt(u.predecessor,v)<0&&u.predecessor.push(v);var c=a(o,v);dt(c.successor,v)<0&&c.successor.push(l)})}),{graph:o,noEntryList:s}}function a(i,o){return i[o]||(i[o]={predecessor:[],successor:[]}),i[o]}function n(i,o){var s=[];return M(i,function(l){dt(o,l)>=0&&s.push(l)}),s}}function Oi(r,t){return ft(ft({},r,!0),t,!0)}const aL={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:". "}}}},nL={time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图",custom:"自定义图表",chart:"图表"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}};var ru="ZH",xd="EN",pi=xd,Pl={},wd={},Sb=ct.domSupported?(function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage||pi).toUpperCase();return r.indexOf(ru)>-1?ru:pi})():pi;function bb(r,t){r=r.toUpperCase(),wd[r]=new Dt(t),Pl[r]=t}function iL(r){if(X(r)){var t=Pl[r.toUpperCase()]||{};return r===ru||r===xd?J(t):ft(J(t),J(Pl[pi]),!1)}else return ft(J(r),J(Pl[pi]),!1)}function oL(r){return wd[r]}function sL(){return wd[pi]}bb(xd,aL);bb(ru,nL);var lL=null;function au(){return lL}var Td=1e3,Cd=Td*60,Lo=Cd*60,Ve=Lo*24,sy=Ve*365,uL={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})/},Rl={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}"},fL="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}",Ws="{yyyy}-{MM}-{dd}",ly={year:"{yyyy}",month:"{yyyy}-{MM}",day:Ws,hour:Ws+" "+Rl.hour,minute:Ws+" "+Rl.minute,second:Ws+" "+Rl.second,millisecond:fL},xn=["year","month","day","hour","minute","second","millisecond"],hL=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function cL(r){return!X(r)&&!Q(r)?vL(r):r}function vL(r){r=r||{};var t={},e=!0;return M(xn,function(a){e&&(e=r[a]==null)}),M(xn,function(a,n){var i=r[a];t[a]={};for(var o=null,s=n;s>=0;s--){var l=xn[s],u=j(i)&&!H(i)?i[l]:i,f=void 0;H(u)?(f=u.slice(),o=f[0]||""):X(u)?(o=u,f=[o]):(o==null?o=Rl[a]:uL[l].test(o)||(o=t[l][l][0]+" "+o),f=[o],e&&(f[1]="{primary|"+o+"}")),t[a][l]=f}}),t}function Jr(r,t){return r+="","0000".substr(0,t-r.length)+r}function Io(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 dL(r){return r===Io(r)}function pL(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function ju(r,t,e,a){var n=Pi(r),i=n[xb(e)](),o=n[Md(e)]()+1,s=Math.floor((o-1)/3)+1,l=n[Ad(e)](),u=n["get"+(e?"UTC":"")+"Day"](),f=n[Dd(e)](),h=(f-1)%12+1,v=n[Ld(e)](),c=n[Id(e)](),d=n[Pd(e)](),p=f>=12?"pm":"am",g=p.toUpperCase(),y=a instanceof Dt?a:oL(a||Sb)||sL(),m=y.getModel("time"),_=m.get("month"),S=m.get("monthAbbr"),x=m.get("dayOfWeek"),b=m.get("dayOfWeekAbbr");return(t||"").replace(/{a}/g,p+"").replace(/{A}/g,g+"").replace(/{yyyy}/g,i+"").replace(/{yy}/g,Jr(i%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,_[o-1]).replace(/{MMM}/g,S[o-1]).replace(/{MM}/g,Jr(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,Jr(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,x[u]).replace(/{ee}/g,b[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Jr(f,2)).replace(/{H}/g,f+"").replace(/{hh}/g,Jr(h+"",2)).replace(/{h}/g,h+"").replace(/{mm}/g,Jr(v,2)).replace(/{m}/g,v+"").replace(/{ss}/g,Jr(c,2)).replace(/{s}/g,c+"").replace(/{SSS}/g,Jr(d,3)).replace(/{S}/g,d+"")}function gL(r,t,e,a,n){var i=null;if(X(e))i=e;else if(Q(e)){var o={time:r.time,level:r.time.level},s=au();s&&s.makeAxisLabelFormatterParamBreak(o,r.break),i=e(r.value,t,o)}else{var l=r.time;if(l){var u=e[l.lowerTimeUnit][l.upperTimeUnit];i=u[Math.min(l.level,u.length-1)]||""}else{var f=nu(r.value,n);i=e[f][f][0]}}return ju(new Date(r.value),i,n,a)}function nu(r,t){var e=Pi(r),a=e[Md(t)]()+1,n=e[Ad(t)](),i=e[Dd(t)](),o=e[Ld(t)](),s=e[Id(t)](),l=e[Pd(t)](),u=l===0,f=u&&s===0,h=f&&o===0,v=h&&i===0,c=v&&n===1,d=c&&a===1;return d?"year":c?"month":v?"day":h?"hour":f?"minute":u?"second":"millisecond"}function Wc(r,t,e){switch(t){case"year":r[wb(e)](0);case"month":r[Tb(e)](1);case"day":r[Cb(e)](0);case"hour":r[Mb(e)](0);case"minute":r[Ab(e)](0);case"second":r[Db(e)](0)}return r}function xb(r){return r?"getUTCFullYear":"getFullYear"}function Md(r){return r?"getUTCMonth":"getMonth"}function Ad(r){return r?"getUTCDate":"getDate"}function Dd(r){return r?"getUTCHours":"getHours"}function Ld(r){return r?"getUTCMinutes":"getMinutes"}function Id(r){return r?"getUTCSeconds":"getSeconds"}function Pd(r){return r?"getUTCMilliseconds":"getMilliseconds"}function yL(r){return r?"setUTCFullYear":"setFullYear"}function wb(r){return r?"setUTCMonth":"setMonth"}function Tb(r){return r?"setUTCDate":"setDate"}function Cb(r){return r?"setUTCHours":"setHours"}function Mb(r){return r?"setUTCMinutes":"setMinutes"}function Ab(r){return r?"setUTCSeconds":"setSeconds"}function Db(r){return r?"setUTCMilliseconds":"setMilliseconds"}function Lb(r){if(!xM(r))return X(r)?r:"-";var t=(r+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function Ib(r,t){return r=(r||"").toLowerCase().replace(/-(.)/g,function(e,a){return a.toUpperCase()}),t&&r&&(r=r.charAt(0).toUpperCase()+r.slice(1)),r}var ys=ku;function Uc(r,t,e){var a="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function n(f){return f&&Sr(f)?f:"-"}function i(f){return!!(f!=null&&!isNaN(f)&&isFinite(f))}var o=t==="time",s=r instanceof Date;if(o||s){var l=o?Pi(r):r;if(isNaN(+l)){if(s)return"-"}else return ju(l,a,e)}if(t==="ordinal")return ic(r)?n(r):bt(r)&&i(r)?r+"":"-";var u=Vo(r);return i(u)?Lb(u):ic(r)?n(r):typeof r=="boolean"?r+"":"-"}var uy=["a","b","c","d","e","f","g"],nh=function(r,t){return"{"+r+(t??"")+"}"};function Pb(r,t,e){H(t)||(t=[t]);var a=t.length;if(!a)return"";for(var n=t[0].$vars||[],i=0;i<n.length;i++){var o=uy[i];r=r.replace(nh(o),nh(o,0))}for(var s=0;s<a;s++)for(var l=0;l<n.length;l++){var u=t[s][n[l]];r=r.replace(nh(uy[l],s),e?_e(u):u)}return r}function mL(r,t){var e=X(r)?{color:r,extraCssText:t}:r||{},a=e.color,n=e.type;t=e.extraCssText;var i=e.renderMode||"html";if(!a)return"";if(i==="html")return n==="subItem"?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+_e(a)+";"+(t||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+_e(a)+";"+(t||"")+'"></span>';var o=e.markerId||"markerX";return{renderMode:i,content:"{"+o+"|} ",style:n==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:a}:{width:10,height:10,borderRadius:5,backgroundColor:a}}}function Ln(r,t){return t=t||"transparent",X(r)?r:j(r)&&r.colorStops&&(r.colorStops[0]||{}).color||t}function iu(r,t){if(t==="_blank"||t==="blank"){var e=window.open();e.opener=null,e.location.href=r}else window.open(r,t)}var El={},ih={},ms=(function(){function r(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return r.prototype.create=function(t,e){this._nonSeriesBoxMasterList=a(El),this._normalMasterList=a(ih);function a(n,i){var o=[];return M(n,function(s,l){var u=s.create(t,e);o=o.concat(u||[])}),o}},r.prototype.update=function(t,e){M(this._normalMasterList,function(a){a.update&&a.update(t,e)})},r.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},r.register=function(t,e){if(t==="matrix"||t==="calendar"){El[t]=e;return}ih[t]=e},r.get=function(t){return ih[t]||El[t]},r})();function _L(r){return!!El[r]}var Yc={coord:1,coord2:2};function SL(r){Rb.set(r.fullType,{getCoord2:void 0}).getCoord2=r.getCoord2}var Rb=nt();function bL(r){var t=r.getShallow("coord",!0),e=Yc.coord;if(t==null){var a=Rb.get(r.type);a&&a.getCoord2&&(e=Yc.coord2,t=a.getCoord2(r))}return{coord:t,from:e}}var zr={none:0,dataCoordSys:1,boxCoordSys:2};function xL(r,t){var e=r.getShallow("coordinateSystem"),a=r.getShallow("coordinateSystemUsage",!0),n=zr.none;if(e){var i=r.mainType==="series";a==null&&(a=i?"data":"box"),a==="data"?(n=zr.dataCoordSys,i||(n=zr.none)):a==="box"&&(n=zr.boxCoordSys,!i&&!_L(e)&&(n=zr.none))}return{coordSysType:e,kind:n}}function wL(r){var t=r.targetModel,e=r.coordSysType,a=r.coordSysProvider,n=r.isDefaultDataCoordSys,i=xL(t),o=i.kind,s=i.coordSysType;if(n&&o!==zr.dataCoordSys&&(o=zr.dataCoordSys,s=e),o===zr.none||s!==e)return!1;var l=a(e,t);return l?(o===zr.dataCoordSys?t.coordinateSystem=l:t.boxCoordinateSystem=l,!0):!1}var kl=M,TL=["left","right","top","bottom","width","height"],Us=[["width","left","right"],["height","top","bottom"]];function Rd(r,t,e,a,n){var i=0,o=0;a==null&&(a=1/0),n==null&&(n=1/0);var s=0;t.eachChild(function(l,u){var f=l.getBoundingRect(),h=t.childAt(u+1),v=h&&h.getBoundingRect(),c,d;if(r==="horizontal"){var p=f.width+(v?-v.x+f.x:0);c=i+p,c>a||l.newline?(i=0,c=p,o+=s+e,s=f.height):s=Math.max(s,f.height)}else{var g=f.height+(v?-v.y+f.y:0);d=o+g,d>n||l.newline?(i+=s+e,o=0,d=g,s=f.width):s=Math.max(s,f.width)}l.newline||(l.x=i,l.y=o,l.markRedraw(),r==="horizontal"?i=c+e:o=d+e)})}var wn=Rd;it(Rd,"vertical");it(Rd,"horizontal");function CL(r,t){return{left:r.getShallow("left",t),top:r.getShallow("top",t),right:r.getShallow("right",t),bottom:r.getShallow("bottom",t),width:r.getShallow("width",t),height:r.getShallow("height",t)}}function ML(r,t){var e=Le(r,t,{enableLayoutOnlyByCenter:!0}),a=r.getBoxLayoutParams(),n,i;if(e.type===yo.point)i=e.refPoint,n=ne(a,{width:t.getWidth(),height:t.getHeight()});else{var o=r.get("center"),s=H(o)?o:[o,o];n=ne(a,e.refContainer),i=e.boxCoordFrom===Yc.coord2?e.refPoint:[K(s[0],n.width)+n.x,K(s[1],n.height)+n.y]}return{viewRect:n,center:i}}function AL(r,t){var e=ML(r,t),a=e.viewRect,n=e.center,i=r.get("radius");H(i)||(i=[0,i]);var o=K(a.width,t.getWidth()),s=K(a.height,t.getHeight()),l=Math.min(o,s),u=K(i[0],l/2),f=K(i[1],l/2);return{cx:n[0],cy:n[1],r0:u,r:f,viewRect:a}}function ne(r,t,e){e=ys(e||0);var a=t.width,n=t.height,i=K(r.left,a),o=K(r.top,n),s=K(r.right,a),l=K(r.bottom,n),u=K(r.width,a),f=K(r.height,n),h=e[2]+e[0],v=e[1]+e[3],c=r.aspect;switch(isNaN(u)&&(u=a-s-v-i),isNaN(f)&&(f=n-l-h-o),c!=null&&(isNaN(u)&&isNaN(f)&&(c>a/n?u=a*.8:f=n*.8),isNaN(u)&&(u=c*f),isNaN(f)&&(f=u/c)),isNaN(i)&&(i=a-s-u-v),isNaN(o)&&(o=n-l-f-h),r.left||r.right){case"center":i=a/2-u/2-e[3];break;case"right":i=a-u-v;break}switch(r.top||r.bottom){case"middle":case"center":o=n/2-f/2-e[0];break;case"bottom":o=n-f-h;break}i=i||0,o=o||0,isNaN(u)&&(u=a-v-i-(s||0)),isNaN(f)&&(f=n-h-o-(l||0));var d=new ot((t.x||0)+i+e[3],(t.y||0)+o+e[0],u,f);return d.margin=e,d}var yo={rect:1,point:2};function Le(r,t,e){var a,n,i,o=r.boxCoordinateSystem,s;if(o){var l=bL(r),u=l.coord,f=l.from;if(o.dataToLayout){i=yo.rect,s=f;var h=o.dataToLayout(u);a=h.contentRect||h.rect}else e&&e.enableLayoutOnlyByCenter&&o.dataToPoint&&(i=yo.point,s=f,n=o.dataToPoint(u))}return i==null&&(i=yo.rect),i===yo.rect&&(a||(a={x:0,y:0,width:t.getWidth(),height:t.getHeight()}),n=[a.x+a.width/2,a.y+a.height/2]),{type:i,refContainer:a,refPoint:n,boxCoordFrom:s}}function Ed(r,t,e,a,n,i){i=i||r,i.x=r.x,i.y=r.y;var o;if(o=r.getBoundingRect(),r.needLocalTransform()){var s=r.getLocalTransform();o=o.clone(),o.applyTransform(s)}var l=ne(gt({width:o.width,height:o.height},t),e,a),u=l.x-o.x,f=l.y-o.y;return i.x+=u,i.y+=f,i===r&&r.markRedraw(),!0}function Zo(r){var t=r.layoutMode||r.constructor.layoutMode;return j(t)?t:t?{type:t}:null}function Ma(r,t,e){var a=e&&e.ignoreSize;!H(a)&&(a=[a,a]);var n=o(Us[0],0),i=o(Us[1],1);l(Us[0],r,n),l(Us[1],r,i);function o(u,f){var h={},v=0,c={},d=0,p=2;if(kl(u,function(m){c[m]=r[m]}),kl(u,function(m){rr(t,m)&&(h[m]=c[m]=t[m]),s(h,m)&&v++,s(c,m)&&d++}),a[f])return s(t,u[1])?c[u[2]]=null:s(t,u[2])&&(c[u[1]]=null),c;if(d===p||!v)return c;if(v>=p)return h;for(var g=0;g<u.length;g++){var y=u[g];if(!rr(h,y)&&rr(r,y)){h[y]=r[y];break}}return h}function s(u,f){return u[f]!=null&&u[f]!=="auto"}function l(u,f,h){kl(u,function(v){f[v]=h[v]})}}function Bi(r){return DL({},r)}function DL(r,t){return t&&r&&kl(TL,function(e){rr(t,e)&&(r[e]=t[e])}),r}var LL=wt(),mt=(function(r){B(t,r);function t(e,a,n){var i=r.call(this,e,a,n)||this;return i.uid=gs("ec_cpt_model"),i}return t.prototype.init=function(e,a,n){this.mergeDefaultAndTheme(e,n)},t.prototype.mergeDefaultAndTheme=function(e,a){var n=Zo(this),i=n?Bi(e):{},o=a.getTheme();ft(e,o.get(this.mainType)),ft(e,this.getDefaultOption()),n&&Ma(e,i,n)},t.prototype.mergeOption=function(e,a){ft(this.option,e,!0);var n=Zo(this);n&&Ma(this.option,e,n)},t.prototype.optionUpdated=function(e,a){},t.prototype.getDefaultOption=function(){var e=this.constructor;if(!YM(e))return e.defaultOption;var a=LL(this);if(!a.defaultOption){for(var n=[],i=e;i;){var o=i.prototype.defaultOption;o&&n.push(o),i=i.superClass}for(var s={},l=n.length-1;l>=0;l--)s=ft(s,n[l],!0);a.defaultOption=s}return a.defaultOption},t.prototype.getReferringComponents=function(e,a){var n=e+"Index",i=e+"Id";return Ri(this.ecModel,e,{index:this.get(n,!0),id:this.get(i,!0)},a)},t.prototype.getBoxLayoutParams=function(){return CL(this,!1)},t.prototype.getZLevelKey=function(){return""},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=(function(){var e=t.prototype;e.type="component",e.id="",e.name="",e.mainType="",e.subType="",e.componentIndex=0})(),t})(Dt);NS(mt,Dt);Vu(mt);eL(mt);rL(mt,IL);function IL(r){var t=[];return M(mt.getClassesByMainType(r),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=U(t,function(e){return wr(e).main}),r!=="dataset"&&dt(t,"dataset")<=0&&t.unshift("dataset"),t}var N={color:{},darkColor:{},size:{}},Bt=N.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(Bt,{primary:Bt.neutral80,secondary:Bt.neutral70,tertiary:Bt.neutral60,quaternary:Bt.neutral50,disabled:Bt.neutral20,border:Bt.neutral30,borderTint:Bt.neutral20,borderShade:Bt.neutral40,background:Bt.neutral05,backgroundTint:"rgba(234,237,245,0.5)",backgroundTransparent:"rgba(255,255,255,0)",backgroundShade:Bt.neutral10,shadow:"rgba(0,0,0,0.2)",shadowTint:"rgba(129,130,136,0.2)",axisLine:Bt.neutral70,axisLineTint:Bt.neutral40,axisTick:Bt.neutral70,axisTickMinor:Bt.neutral60,axisLabel:Bt.neutral70,axisSplitLine:Bt.neutral15,axisMinorSplitLine:Bt.neutral05});for(var Qa in Bt)if(Bt.hasOwnProperty(Qa)){var fy=Bt[Qa];Qa==="theme"?N.darkColor.theme=Bt.theme.slice():Qa==="highlight"?N.darkColor.highlight="rgba(255,231,130,0.4)":Qa.indexOf("accent")===0?N.darkColor[Qa]=_a(fy,null,function(r){return r*.5},function(r){return Math.min(1,1.3-r)}):N.darkColor[Qa]=_a(fy,null,function(r){return r*.9},function(r){return 1-Math.pow(r,1.5)})}N.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var Eb="";typeof navigator<"u"&&(Eb=navigator.platform||"");var Yn="rgba(0, 0, 0, 0.2)",kb=N.color.theme[0],PL=_a(kb,null,null,.9);const RL={darkMode:"auto",colorBy:"series",color:N.color.theme,gradientColor:[PL,kb],aria:{decal:{decals:[{color:Yn,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Yn,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Yn,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Yn,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Yn,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Yn,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:Eb.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};var Ob=nt(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),Ie="original",ie="arrayRows",$e="objectRows",hr="keyedColumns",Sa="typedArray",Bb="unknown",nr="column",kn="row",jt={Must:1,Might:2,Not:3},Nb=wt();function EL(r){Nb(r).datasetMap=nt()}function zb(r,t,e){var a={},n=kd(t);if(!n||!r)return a;var i=[],o=[],s=t.ecModel,l=Nb(s).datasetMap,u=n.uid+"_"+e.seriesLayoutBy,f,h;r=r.slice(),M(r,function(p,g){var y=j(p)?p:r[g]={name:p};y.type==="ordinal"&&f==null&&(f=g,h=d(y)),a[y.name]=[]});var v=l.get(u)||l.set(u,{categoryWayDim:h,valueWayDim:0});M(r,function(p,g){var y=p.name,m=d(p);if(f==null){var _=v.valueWayDim;c(a[y],_,m),c(o,_,m),v.valueWayDim+=m}else if(f===g)c(a[y],0,m),c(i,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 i.length&&(a.itemName=i),o.length&&(a.seriesName=o),a}function Vb(r,t,e){var a={},n=kd(r);if(!n)return a;var i=t.sourceFormat,o=t.dimensionsDefine,s;(i===$e||i===hr)&&M(o,function(f,h){(j(f)?f.name:f)==="name"&&(s=h)});var l=(function(){for(var f={},h={},v=[],c=0,d=Math.min(5,e);c<d;c++){var p=Gb(t.data,i,t.seriesLayoutBy,o,t.startIndex,c);v.push(p);var g=p===jt.Not;if(g&&f.v==null&&c!==s&&(f.v=c),(f.n==null||f.n===f.v||!g&&v[f.n]===jt.Not)&&(f.n=c),y(f)&&v[f.n]!==jt.Not)return f;g||(p===jt.Might&&h.v==null&&c!==s&&(h.v=c),(h.n==null||h.n===h.v)&&(h.n=c))}function y(m){return m.v!=null&&m.n!=null}return y(f)?f:y(h)?h:null})();if(l){a.value=[l.v];var u=s??l.n;a.itemName=[u],a.seriesName=[u]}return a}function kd(r){var t=r.get("data",!0);if(!t)return Ri(r.ecModel,"dataset",{index:r.get("datasetIndex",!0),id:r.get("datasetId",!0)},ee).models[0]}function kL(r){return!r.get("transform",!0)&&!r.get("fromTransformResult",!0)?[]:Ri(r.ecModel,"dataset",{index:r.get("fromDatasetIndex",!0),id:r.get("fromDatasetId",!0)},ee).models}function Fb(r,t){return Gb(r.data,r.sourceFormat,r.seriesLayoutBy,r.dimensionsDefine,r.startIndex,t)}function Gb(r,t,e,a,n,i){var o,s=5;if(we(r))return jt.Not;var l,u;if(a){var f=a[i];j(f)?(l=f.name,u=f.type):X(f)&&(l=f)}if(u!=null)return u==="ordinal"?jt.Must:jt.Not;if(t===ie){var h=r;if(e===kn){for(var v=h[i],c=0;c<(v||[]).length&&c<s;c++)if((o=S(v[n+c]))!=null)return o}else for(var c=0;c<h.length&&c<s;c++){var d=h[n+c];if(d&&(o=S(d[i]))!=null)return o}}else if(t===$e){var p=r;if(!l)return jt.Not;for(var c=0;c<p.length&&c<s;c++){var g=p[c];if(g&&(o=S(g[l]))!=null)return o}}else if(t===hr){var y=r;if(!l)return jt.Not;var v=y[l];if(!v||we(v))return jt.Not;for(var c=0;c<v.length&&c<s;c++)if((o=S(v[c]))!=null)return o}else if(t===Ie)for(var m=r,c=0;c<m.length&&c<s;c++){var g=m[c],_=hs(g);if(!H(_))return jt.Not;if((o=S(_[i]))!=null)return o}function S(x){var b=X(x);if(x!=null&&Number.isFinite(Number(x))&&x!=="")return b?jt.Might:jt.Not;if(b&&x!=="-")return jt.Must}return jt.Not}var Zc=nt();function OL(r,t){We(Zc.get(r)==null&&t),Zc.set(r,t)}function BL(r,t,e){var a=Zc.get(t);if(!a)return e;var n=a(r);return n?e.concat(n):e}var hy=wt(),NL=wt(),Od=(function(){function r(){}return r.prototype.getColorFromPalette=function(t,e,a){var n=Wt(this.get("color",!0)),i=this.get("colorLayer",!0);return Hb(this,hy,n,i,t,e,a)},r.prototype.clearColorPalette=function(){FL(this,hy)},r})();function zL(r,t,e,a){var n=Wt(r.get(["aria","decal","decals"]));return Hb(r,NL,n,null,t,e,a)}function VL(r,t){for(var e=r.length,a=0;a<e;a++)if(r[a].length>t)return r[a];return r[e-1]}function Hb(r,t,e,a,n,i,o){i=i||r;var s=t(i),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(n))return u[n];var f=o==null||!a?e:VL(a,o);if(f=f||e,!(!f||!f.length)){var h=f[l];return n&&(u[n]=h),s.paletteIdx=(l+1)%f.length,h}}function FL(r,t){t(r).paletteIdx=0,t(r).paletteNameMap={}}var Ys,Yi,cy,vy="\0_ec_inner",GL=1,Bd=(function(r){B(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.init=function(e,a,n,i,o,s){i=i||{},this.option=null,this._theme=new Dt(i),this._locale=new Dt(o),this._optionManager=s},t.prototype.setOption=function(e,a,n){var i=gy(a);this._optionManager.setOption(e,n,i),this._resetOption(null,i)},t.prototype.resetOption=function(e,a){return this._resetOption(e,gy(a))},t.prototype._resetOption=function(e,a){var n=!1,i=this._optionManager;if(!e||e==="recreate"){var o=i.mountOption(e==="recreate");!this.option||e==="recreate"?cy(this,o):(this.restoreData(),this._mergeOption(o,a)),n=!0}if((e==="timeline"||e==="media")&&this.restoreData(),!e||e==="recreate"||e==="timeline"){var s=i.getTimelineOption(this);s&&(n=!0,this._mergeOption(s,a))}if(!e||e==="recreate"||e==="media"){var l=i.getMediaOption(this);l.length&&M(l,function(u){n=!0,this._mergeOption(u,a)},this)}return n},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,a){var n=this.option,i=this._componentsMap,o=this._componentsCount,s=[],l=nt(),u=a&&a.replaceMergeMainTypeMap;EL(this),M(e,function(h,v){h!=null&&(mt.hasClass(v)?v&&(s.push(v),l.set(v,!0)):n[v]=n[v]==null?J(h):ft(n[v],h,!0))}),u&&u.each(function(h,v){mt.hasClass(v)&&!l.get(v)&&(s.push(v),l.set(v,!0))}),mt.topologicalTravel(s,mt.getAllClassMainTypes(),f,this);function f(h){var v=BL(this,h,Wt(e[h])),c=i.get(h),d=c?u&&u.get(h)?"replaceMerge":"normalMerge":"replaceAll",p=AM(c,v,d);OM(p,h,mt),n[h]=null,i.set(h,null),o.set(h,0);var g=[],y=[],m=0,_;M(p,function(S,x){var b=S.existing,w=S.newOption;if(!w)b&&(b.mergeOption({},this),b.optionUpdated({},!1));else{var T=h==="series",D=mt.getClass(h,S.keyInfo.subType,!T);if(!D)return;if(h==="tooltip"){if(_)return;_=!0}if(b&&b.constructor===D)b.name=S.keyInfo.name,b.mergeOption(w,this),b.optionUpdated(w,!1);else{var A=F({componentIndex:x},S.keyInfo);b=new D(w,this,this,A),F(b,A),S.brandNew&&(b.__requireNewView=!0),b.init(w,this,this),b.optionUpdated(null,!0)}}b?(g.push(b.option),y.push(b),m++):(g.push(void 0),y.push(void 0))},this),n[h]=g,i.set(h,y),o.set(h,m),h==="series"&&Ys(this)}this._seriesIndices||Ys(this)},t.prototype.getOption=function(){var e=J(this.option);return M(e,function(a,n){if(mt.hasClass(n)){for(var i=Wt(a),o=i.length,s=!1,l=o-1;l>=0;l--)i[l]&&!Go(i[l])?s=!0:(i[l]=null,!s&&o--);i.length=o,e[n]=i}}),delete e[vy],e},t.prototype.setTheme=function(e){this._theme=new Dt(e),this._resetOption("recreate",null)},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,a){var n=this._componentsMap.get(e);if(n){var i=n[a||0];if(i)return i;if(a==null){for(var o=0;o<n.length;o++)if(n[o])return n[o]}}},t.prototype.queryComponents=function(e){var a=e.mainType;if(!a)return[];var n=e.index,i=e.id,o=e.name,s=this._componentsMap.get(a);if(!s||!s.length)return[];var l;return n!=null?(l=[],M(Wt(n),function(u){s[u]&&l.push(s[u])})):i!=null?l=dy("id",i,s):o!=null?l=dy("name",o,s):l=kt(s,function(u){return!!u}),py(l,e)},t.prototype.findComponents=function(e){var a=e.query,n=e.mainType,i=s(a),o=i?this.queryComponents(i):kt(this._componentsMap.get(n),function(u){return!!u});return l(py(o,e));function s(u){var f=n+"Index",h=n+"Id",v=n+"Name";return u&&(u[f]!=null||u[h]!=null||u[v]!=null)?{mainType:n,index:u[f],id:u[h],name:u[v]}:null}function l(u){return e.filter?kt(u,e.filter):u}},t.prototype.eachComponent=function(e,a,n){var i=this._componentsMap;if(Q(e)){var o=a,s=e;i.each(function(h,v){for(var c=0;h&&c<h.length;c++){var d=h[c];d&&s.call(o,v,d,d.componentIndex)}})}else for(var l=X(e)?i.get(e):j(e)?this.findComponents(e):null,u=0;l&&u<l.length;u++){var f=l[u];f&&a.call(n,f,f.componentIndex)}},t.prototype.getSeriesByName=function(e){var a=ge(e,null);return kt(this._componentsMap.get("series"),function(n){return!!n&&a!=null&&n.name===a})},t.prototype.getSeriesByIndex=function(e){return this._componentsMap.get("series")[e]},t.prototype.getSeriesByType=function(e){return kt(this._componentsMap.get("series"),function(a){return!!a&&a.subType===e})},t.prototype.getSeries=function(){return kt(this._componentsMap.get("series"),function(e){return!!e})},t.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},t.prototype.eachSeries=function(e,a){Yi(this),M(this._seriesIndices,function(n){var i=this._componentsMap.get("series")[n];e.call(a,i,n)},this)},t.prototype.eachRawSeries=function(e,a){M(this._componentsMap.get("series"),function(n){n&&e.call(a,n,n.componentIndex)})},t.prototype.eachSeriesByType=function(e,a,n){Yi(this),M(this._seriesIndices,function(i){var o=this._componentsMap.get("series")[i];o.subType===e&&a.call(n,o,i)},this)},t.prototype.eachRawSeriesByType=function(e,a,n){return M(this.getSeriesByType(e),a,n)},t.prototype.isSeriesFiltered=function(e){return Yi(this),this._seriesIndicesMap.get(e.componentIndex)==null},t.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},t.prototype.filterSeries=function(e,a){Yi(this);var n=[];M(this._seriesIndices,function(i){var o=this._componentsMap.get("series")[i];e.call(a,o,i)&&n.push(i)},this),this._seriesIndices=n,this._seriesIndicesMap=nt(n)},t.prototype.restoreData=function(e){Ys(this);var a=this._componentsMap,n=[];a.each(function(i,o){mt.hasClass(o)&&n.push(o)}),mt.topologicalTravel(n,mt.getAllClassMainTypes(),function(i){M(a.get(i),function(o){o&&(i!=="series"||!HL(o,e))&&o.restoreData()})})},t.internalField=(function(){Ys=function(e){var a=e._seriesIndices=[];M(e._componentsMap.get("series"),function(n){n&&a.push(n.componentIndex)}),e._seriesIndicesMap=nt(a)},Yi=function(e){},cy=function(e,a){e.option={},e.option[vy]=GL,e._componentsMap=nt({series:[]}),e._componentsCount=nt();var n=a.aria;j(n)&&n.enabled==null&&(n.enabled=!0),WL(a,e._theme.option),ft(a,RL,!1),e._mergeOption(a,null)}})(),t})(Dt);function HL(r,t){if(t){var e=t.seriesIndex,a=t.seriesId,n=t.seriesName;return e!=null&&r.componentIndex!==e||a!=null&&r.id!==a||n!=null&&r.name!==n}}function WL(r,t){var e=r.color&&!r.colorLayer;M(t,function(a,n){n==="colorLayer"&&e||n==="color"&&r.color||mt.hasClass(n)||(typeof a=="object"?r[n]=r[n]?ft(r[n],a,!1):J(a):r[n]==null&&(r[n]=a))})}function dy(r,t,e){if(H(t)){var a=nt();return M(t,function(i){if(i!=null){var o=ge(i,null);o!=null&&a.set(i,!0)}}),kt(e,function(i){return i&&a.get(i[r])})}else{var n=ge(t,null);return kt(e,function(i){return i&&n!=null&&i[r]===n})}}function py(r,t){return t.hasOwnProperty("subType")?kt(r,function(e){return e&&e.subType===t.subType}):r}function gy(r){var t=nt();return r&&M(Wt(r.replaceMerge),function(e){t.set(e,!0)}),{replaceMergeMainTypeMap:t}}fe(Bd,Od);var UL=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],Wb=(function(){function r(t){M(UL,function(e){this[e]=Y(t[e],t)},this)}return r})(),YL=/^(min|max)?(.+)$/,ZL=(function(){function r(t){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=t}return r.prototype.setOption=function(t,e,a){t&&(M(Wt(t.series),function(o){o&&o.data&&we(o.data)&&Fl(o.data)}),M(Wt(t.dataset),function(o){o&&o.source&&we(o.source)&&Fl(o.source)})),t=J(t);var n=this._optionBackup,i=XL(t,e,!n);this._newBaseOption=i.baseOption,n?(i.timelineOptions.length&&(n.timelineOptions=i.timelineOptions),i.mediaList.length&&(n.mediaList=i.mediaList),i.mediaDefault&&(n.mediaDefault=i.mediaDefault)):this._optionBackup=i},r.prototype.mountOption=function(t){var e=this._optionBackup;return this._timelineOptions=e.timelineOptions,this._mediaList=e.mediaList,this._mediaDefault=e.mediaDefault,this._currentMediaIndices=[],J(t?e.baseOption:this._newBaseOption)},r.prototype.getTimelineOption=function(t){var e,a=this._timelineOptions;if(a.length){var n=t.getComponent("timeline");n&&(e=J(a[n.getCurrentIndex()]))}return e},r.prototype.getMediaOption=function(t){var e=this._api.getWidth(),a=this._api.getHeight(),n=this._mediaList,i=this._mediaDefault,o=[],s=[];if(!n.length&&!i)return s;for(var l=0,u=n.length;l<u;l++)$L(n[l].query,e,a)&&o.push(l);return!o.length&&i&&(o=[-1]),o.length&&!qL(o,this._currentMediaIndices)&&(s=U(o,function(f){return J(f===-1?i.option:n[f].option)})),this._currentMediaIndices=o,s},r})();function XL(r,t,e){var a=[],n,i,o=r.baseOption,s=r.timeline,l=r.options,u=r.media,f=!!r.media,h=!!(l||s||o&&o.timeline);o?(i=o,i.timeline||(i.timeline=s)):((h||f)&&(r.options=r.media=null),i=r),f&&H(u)&&M(u,function(c){c&&c.option&&(c.query?a.push(c):n||(n=c))}),v(i),M(l,function(c){return v(c)}),M(a,function(c){return v(c.option)});function v(c){M(t,function(d){d(c,e)})}return{baseOption:i,timelineOptions:l||[],mediaDefault:n,mediaList:a}}function $L(r,t,e){var a={width:t,height:e,aspectratio:t/e},n=!0;return M(r,function(i,o){var s=o.match(YL);if(!(!s||!s[1]||!s[2])){var l=s[1],u=s[2].toLowerCase();KL(a[u],i,l)||(n=!1)}}),n}function KL(r,t,e){return e==="min"?r>=t:e==="max"?r<=t:r===t}function qL(r,t){return r.join(",")===t.join(",")}var qe=M,Xo=j,yy=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function oh(r){var t=r&&r.itemStyle;if(t)for(var e=0,a=yy.length;e<a;e++){var n=yy[e],i=t.normal,o=t.emphasis;i&&i[n]&&(r[n]=r[n]||{},r[n].normal?ft(r[n].normal,i[n]):r[n].normal=i[n],i[n]=null),o&&o[n]&&(r[n]=r[n]||{},r[n].emphasis?ft(r[n].emphasis,o[n]):r[n].emphasis=o[n],o[n]=null)}}function se(r,t,e){if(r&&r[t]&&(r[t].normal||r[t].emphasis)){var a=r[t].normal,n=r[t].emphasis;a&&(e?(r[t].normal=r[t].emphasis=null,gt(r[t],a)):r[t]=a),n&&(r.emphasis=r.emphasis||{},r.emphasis[t]=n,n.focus&&(r.emphasis.focus=n.focus),n.blurScope&&(r.emphasis.blurScope=n.blurScope))}}function mo(r){se(r,"itemStyle"),se(r,"lineStyle"),se(r,"areaStyle"),se(r,"label"),se(r,"labelLine"),se(r,"upperLabel"),se(r,"edgeLabel")}function Gt(r,t){var e=Xo(r)&&r[t],a=Xo(e)&&e.textStyle;if(a)for(var n=0,i=mg.length;n<i;n++){var o=mg[n];a.hasOwnProperty(o)&&(e[o]=a[o])}}function ke(r){r&&(mo(r),Gt(r,"label"),r.emphasis&&Gt(r.emphasis,"label"))}function QL(r){if(Xo(r)){oh(r),mo(r),Gt(r,"label"),Gt(r,"upperLabel"),Gt(r,"edgeLabel"),r.emphasis&&(Gt(r.emphasis,"label"),Gt(r.emphasis,"upperLabel"),Gt(r.emphasis,"edgeLabel"));var t=r.markPoint;t&&(oh(t),ke(t));var e=r.markLine;e&&(oh(e),ke(e));var a=r.markArea;a&&ke(a);var n=r.data;if(r.type==="graph"){n=n||r.nodes;var i=r.links||r.edges;if(i&&!we(i))for(var o=0;o<i.length;o++)ke(i[o]);M(r.categories,function(u){mo(u)})}if(n&&!we(n))for(var o=0;o<n.length;o++)ke(n[o]);if(t=r.markPoint,t&&t.data)for(var s=t.data,o=0;o<s.length;o++)ke(s[o]);if(e=r.markLine,e&&e.data)for(var l=e.data,o=0;o<l.length;o++)H(l[o])?(ke(l[o][0]),ke(l[o][1])):ke(l[o]);r.type==="gauge"?(Gt(r,"axisLabel"),Gt(r,"title"),Gt(r,"detail")):r.type==="treemap"?(se(r.breadcrumb,"itemStyle"),M(r.levels,function(u){mo(u)})):r.type==="tree"&&mo(r.leaves)}}function Rr(r){return H(r)?r:r?[r]:[]}function my(r){return(H(r)?r[0]:r)||{}}function jL(r,t){qe(Rr(r.series),function(a){Xo(a)&&QL(a)});var e=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&e.push("valueAxis","categoryAxis","logAxis","timeAxis"),qe(e,function(a){qe(Rr(r[a]),function(n){n&&(Gt(n,"axisLabel"),Gt(n.axisPointer,"label"))})}),qe(Rr(r.parallel),function(a){var n=a&&a.parallelAxisDefault;Gt(n,"axisLabel"),Gt(n&&n.axisPointer,"label")}),qe(Rr(r.calendar),function(a){se(a,"itemStyle"),Gt(a,"dayLabel"),Gt(a,"monthLabel"),Gt(a,"yearLabel")}),qe(Rr(r.radar),function(a){Gt(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)}),qe(Rr(r.geo),function(a){Xo(a)&&(ke(a),qe(Rr(a.regions),function(n){ke(n)}))}),qe(Rr(r.timeline),function(a){ke(a),se(a,"label"),se(a,"itemStyle"),se(a,"controlStyle",!0);var n=a.data;H(n)&&M(n,function(i){j(i)&&(se(i,"label"),se(i,"itemStyle"))})}),qe(Rr(r.toolbox),function(a){se(a,"iconStyle"),qe(a.feature,function(n){se(n,"iconStyle")})}),Gt(my(r.axisPointer),"label"),Gt(my(r.tooltip).axisPointer,"label")}function JL(r,t){for(var e=t.split(","),a=r,n=0;n<e.length&&(a=a&&a[e[n]],a!=null);n++);return a}function tI(r,t,e,a){for(var n=t.split(","),i=r,o,s=0;s<n.length-1;s++)o=n[s],i[o]==null&&(i[o]={}),i=i[o];i[n[s]]==null&&(i[n[s]]=e)}function _y(r){r&&M(eI,function(t){t[0]in r&&!(t[1]in r)&&(r[t[1]]=r[t[0]])})}var eI=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],rI=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],sh=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function Zi(r){var t=r&&r.itemStyle;if(t)for(var e=0;e<sh.length;e++){var a=sh[e][1],n=sh[e][0];t[a]!=null&&(t[n]=t[a])}}function Sy(r){r&&r.alignTo==="edge"&&r.margin!=null&&r.edgeDistance==null&&(r.edgeDistance=r.margin)}function by(r){r&&r.downplay&&!r.blur&&(r.blur=r.downplay)}function aI(r){r&&r.focusNodeAdjacency!=null&&(r.emphasis=r.emphasis||{},r.emphasis.focus==null&&(r.emphasis.focus="adjacency"))}function Ub(r,t){if(r)for(var e=0;e<r.length;e++)t(r[e]),r[e]&&Ub(r[e].children,t)}function Yb(r,t){jL(r,t),r.series=Wt(r.series),M(r.series,function(e){if(j(e)){var a=e.type;if(a==="line")e.clipOverflow!=null&&(e.clip=e.clipOverflow);else if(a==="pie"||a==="gauge"){e.clockWise!=null&&(e.clockwise=e.clockWise),Sy(e.label);var n=e.data;if(n&&!we(n))for(var i=0;i<n.length;i++)Sy(n[i]);e.hoverOffset!=null&&(e.emphasis=e.emphasis||{},(e.emphasis.scaleSize=null)&&(e.emphasis.scaleSize=e.hoverOffset))}else if(a==="gauge"){var o=JL(e,"pointer.color");o!=null&&tI(e,"itemStyle.color",o)}else if(a==="bar"){Zi(e),Zi(e.backgroundStyle),Zi(e.emphasis);var n=e.data;if(n&&!we(n))for(var i=0;i<n.length;i++)typeof n[i]=="object"&&(Zi(n[i]),Zi(n[i]&&n[i].emphasis))}else if(a==="sunburst"){var s=e.highlightPolicy;s&&(e.emphasis=e.emphasis||{},e.emphasis.focus||(e.emphasis.focus=s)),by(e),Ub(e.data,by)}else a==="graph"||a==="sankey"?aI(e):a==="map"&&(e.mapType&&!e.map&&(e.map=e.mapType),e.mapLocation&>(e,e.mapLocation));e.hoverAnimation!=null&&(e.emphasis=e.emphasis||{},e.emphasis&&e.emphasis.scale==null&&(e.emphasis.scale=e.hoverAnimation)),_y(e)}}),r.dataRange&&(r.visualMap=r.dataRange),M(rI,function(e){var a=r[e];a&&(H(a)||(a=[a]),M(a,function(n){_y(n)}))})}function nI(r){var t=nt();r.eachSeries(function(e){var a=e.get("stack");if(a){var n=t.get(a)||t.set(a,[]),i=e.getData(),o={stackResultDimension:i.getCalculationInfo("stackResultDimension"),stackedOverDimension:i.getCalculationInfo("stackedOverDimension"),stackedDimension:i.getCalculationInfo("stackedDimension"),stackedByDimension:i.getCalculationInfo("stackedByDimension"),isStackedByIndex:i.getCalculationInfo("isStackedByIndex"),data:i,seriesModel:e};if(!o.stackedDimension||!(o.isStackedByIndex||o.stackedByDimension))return;n.push(o)}}),t.each(function(e){if(e.length!==0){var a=e[0].seriesModel,n=a.get("stackOrder")||"seriesAsc";n==="seriesDesc"&&e.reverse(),M(e,function(i,o){i.data.setCalculationInfo("stackedOnSeries",o>0?e[o-1].seriesModel:null)}),iI(e)}})}function iI(r){M(r,function(t,e){var a=[],n=[NaN,NaN],i=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,l=t.seriesModel.get("stackStrategy")||"samesign";o.modify(i,function(u,f,h){var v=o.get(t.stackedDimension,h);if(isNaN(v))return n;var c,d;s?d=o.getRawIndex(h):c=o.get(t.stackedByDimension,h);for(var p=NaN,g=e-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=_M(v,m),p=m;break}}}return a[0]=v,a[1]=p,a})})}var Ju=(function(){function r(t){this.data=t.data||(t.sourceFormat===hr?{}:[]),this.sourceFormat=t.sourceFormat||Bb,this.seriesLayoutBy=t.seriesLayoutBy||nr,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var e=this.dimensionsDefine=t.dimensionsDefine;if(e)for(var a=0;a<e.length;a++){var n=e[a];n.type==null&&Fb(this,a)===jt.Must&&(n.type="ordinal")}}return r})();function Nd(r){return r instanceof Ju}function Xc(r,t,e){e=e||Zb(r);var a=t.seriesLayoutBy,n=sI(r,e,a,t.sourceHeader,t.dimensions),i=new Ju({data:r,sourceFormat:e,seriesLayoutBy:a,dimensionsDefine:n.dimensionsDefine,startIndex:n.startIndex,dimensionsDetectedCount:n.dimensionsDetectedCount,metaRawOption:J(t)});return i}function zd(r){return new Ju({data:r,sourceFormat:we(r)?Sa:Ie})}function oI(r){return new Ju({data:r.data,sourceFormat:r.sourceFormat,seriesLayoutBy:r.seriesLayoutBy,dimensionsDefine:J(r.dimensionsDefine),startIndex:r.startIndex,dimensionsDetectedCount:r.dimensionsDetectedCount})}function Zb(r){var t=Bb;if(we(r))t=Sa;else if(H(r)){r.length===0&&(t=ie);for(var e=0,a=r.length;e<a;e++){var n=r[e];if(n!=null){if(H(n)||we(n)){t=ie;break}else if(j(n)){t=$e;break}}}}else if(j(r)){for(var i in r)if(rr(r,i)&&xe(r[i])){t=hr;break}}return t}function sI(r,t,e,a,n){var i,o;if(!r)return{dimensionsDefine:xy(n),startIndex:o,dimensionsDetectedCount:i};if(t===ie){var s=r;a==="auto"||a==null?wy(function(u){u!=null&&u!=="-"&&(X(u)?o==null&&(o=1):o=0)},e,s,10):o=bt(a)?a:a?1:0,!n&&o===1&&(n=[],wy(function(u,f){n[f]=u!=null?u+"":""},e,s,1/0)),i=n?n.length:e===kn?s.length:s[0]?s[0].length:null}else if(t===$e)n||(n=lI(r));else if(t===hr)n||(n=[],M(r,function(u,f){n.push(f)}));else if(t===Ie){var l=hs(r[0]);i=H(l)&&l.length||1}return{startIndex:o,dimensionsDefine:xy(n),dimensionsDetectedCount:i}}function lI(r){for(var t=0,e;t<r.length&&!(e=r[t++]););if(e)return Pt(e)}function xy(r){if(r){var t=nt();return U(r,function(e,a){e=j(e)?e:{name:e};var n={name:e.name,displayName:e.displayName,type:e.type};if(n.name==null)return n;n.name+="",n.displayName==null&&(n.displayName=n.name);var i=t.get(n.name);return i?n.name+="-"+i.count++:t.set(n.name,{count:1}),n})}}function wy(r,t,e,a){if(t===kn)for(var n=0;n<e.length&&n<a;n++)r(e[n]?e[n][0]:null,n);else for(var i=e[0]||[],n=0;n<i.length&&n<a;n++)r(i[n],n)}function Xb(r){var t=r.sourceFormat;return t===$e||t===hr}var ja,Ja,tn,en,Ty,Cy,$b=(function(){function r(t,e){var a=Nd(t)?t:zd(t);this._source=a;var n=this._data=a.data,i=a.sourceFormat;a.seriesLayoutBy,i===Sa&&(this._offset=0,this._dimSize=e,this._data=n),Cy(this,n,a)}return r.prototype.getSource=function(){return this._source},r.prototype.count=function(){return 0},r.prototype.getItem=function(t,e){},r.prototype.appendData=function(t){},r.prototype.clean=function(){},r.protoInitialize=(function(){var t=r.prototype;t.pure=!1,t.persistent=!0})(),r.internalField=(function(){var t;Cy=function(o,s,l){var u=l.sourceFormat,f=l.seriesLayoutBy,h=l.startIndex,v=l.dimensionsDefine,c=Ty[Vd(u,f)];if(F(o,c),u===Sa)o.getItem=e,o.count=n,o.fillStorage=a;else{var d=Kb(u,f);o.getItem=Y(d,null,s,h,v);var p=qb(u,f);o.count=Y(p,null,s,h,v)}};var e=function(o,s){o=o-this._offset,s=s||[];for(var l=this._data,u=this._dimSize,f=u*o,h=0;h<u;h++)s[h]=l[f+h];return s},a=function(o,s,l,u){for(var f=this._data,h=this._dimSize,v=0;v<h;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 _=f[m*h+v];y[o+m]=_,_<d&&(d=_),_>p&&(p=_)}c[0]=d,c[1]=p}},n=function(){return this._data?this._data.length/this._dimSize:0};Ty=(t={},t[ie+"_"+nr]={pure:!0,appendData:i},t[ie+"_"+kn]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},t[$e]={pure:!0,appendData:i},t[hr]={pure:!0,appendData:function(o){var s=this._data;M(o,function(l,u){for(var f=s[u]||(s[u]=[]),h=0;h<(l||[]).length;h++)f.push(l[h])})}},t[Ie]={appendData:i},t[Sa]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},t);function i(o){for(var s=0;s<o.length;s++)this._data.push(o[s])}})(),r})(),Zs=function(r){H(r)||IS("series.data or dataset.source must be an array.")};ja={},ja[ie+"_"+nr]=Zs,ja[ie+"_"+kn]=Zs,ja[$e]=Zs,ja[hr]=function(r,t){for(var e=0;e<t.length;e++){var a=t[e].name;a==null&&IS("dimension name must not be null/undefined.")}},ja[Ie]=Zs;var My=function(r,t,e,a){return r[a]},uI=(Ja={},Ja[ie+"_"+nr]=function(r,t,e,a){return r[a+t]},Ja[ie+"_"+kn]=function(r,t,e,a,n){a+=t;for(var i=n||[],o=r,s=0;s<o.length;s++){var l=o[s];i[s]=l?l[a]:null}return i},Ja[$e]=My,Ja[hr]=function(r,t,e,a,n){for(var i=n||[],o=0;o<e.length;o++){var s=e[o].name,l=s!=null?r[s]:null;i[o]=l?l[a]:null}return i},Ja[Ie]=My,Ja);function Kb(r,t){var e=uI[Vd(r,t)];return e}var Ay=function(r,t,e){return r.length},fI=(tn={},tn[ie+"_"+nr]=function(r,t,e){return Math.max(0,r.length-t)},tn[ie+"_"+kn]=function(r,t,e){var a=r[0];return a?Math.max(0,a.length-t):0},tn[$e]=Ay,tn[hr]=function(r,t,e){var a=e[0].name,n=a!=null?r[a]:null;return n?n.length:0},tn[Ie]=Ay,tn);function qb(r,t){var e=fI[Vd(r,t)];return e}var lh=function(r,t,e){return r[t]},hI=(en={},en[ie]=lh,en[$e]=function(r,t,e){return r[e]},en[hr]=lh,en[Ie]=function(r,t,e){var a=hs(r);return a instanceof Array?a[t]:a},en[Sa]=lh,en);function Qb(r){var t=hI[r];return t}function Vd(r,t){return r===ie?r+"_"+t:r}function wi(r,t,e){if(r){var a=r.getRawDataItem(t);if(a!=null){var n=r.getStore(),i=n.getSource().sourceFormat;if(e!=null){var o=r.getDimensionIndex(e),s=n.getDimensionProperty(o);return Qb(i)(a,o,s)}else{var l=a;return i===Ie&&(l=hs(a)),l}}}}var cI=/\{@(.+?)\}/g,Fd=(function(){function r(){}return r.prototype.getDataParams=function(t,e){var a=this.getData(e),n=this.getRawValue(t,e),i=a.getRawIndex(t),o=a.getName(t),s=a.getRawDataItem(t),l=a.getItemVisual(t,"style"),u=l&&l[a.getItemVisual(t,"drawType")||"fill"],f=l&&l.stroke,h=this.mainType,v=h==="series",c=a.userOutput&&a.userOutput.get();return{componentType:h,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:i,data:s,dataType:e,value:n,color:u,borderColor:f,dimensionNames:c?c.fullDimensions:null,encode:c?c.encode:null,$vars:["seriesName","name","value"]}},r.prototype.getFormattedLabel=function(t,e,a,n,i,o){e=e||"normal";var s=this.getData(a),l=this.getDataParams(t,a);if(o&&(l.value=o.interpolatedValue),n!=null&&H(l.value)&&(l.value=l.value[n]),!i){var u=s.getItemModel(t);i=u.get(e==="normal"?["label","formatter"]:[e,"label","formatter"])}if(Q(i))return l.status=e,l.dimensionIndex=n,i(l);if(X(i)){var f=Pb(i,l);return f.replace(cI,function(h,v){var c=v.length,d=v;d.charAt(0)==="["&&d.charAt(c-1)==="]"&&(d=+d.slice(1,c-1));var p=wi(s,t,d);if(o&&H(o.interpolatedValue)){var g=s.getDimensionIndex(d);g>=0&&(p=o.interpolatedValue[g])}return p!=null?p+"":""})}},r.prototype.getRawValue=function(t,e){return wi(this.getData(e),t)},r.prototype.formatTooltip=function(t,e,a){},r})();function Dy(r){var t,e;return j(r)?r.type&&(e=r):t=r,{text:t,frag:e}}function Po(r){return new vI(r)}var vI=(function(){function r(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return r.prototype.perform=function(t){var e=this._upstream,a=t&&t.skip;if(this._dirty&&e){var n=this.context;n.data=n.outputData=e.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var i;this._plan&&!a&&(i=this._plan(this.context));var o=f(this._modBy),s=this._modDataCount||0,l=f(t&&t.modBy),u=t&&t.modDataCount||0;(o!==l||s!==u)&&(i="reset");function f(m){return!(m>=1)&&(m=1),m}var h;(this._dirty||i==="reset")&&(this._dirty=!1,h=this._doReset(a)),this._modBy=l,this._modDataCount=u;var v=t&&t.step;if(e?this._dueEnd=e._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&&(h||c<d)){var p=this._progress;if(H(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(t,e,a,n,i){Ly.reset(e,a,n,i),this._callingProgress=t,this._callingProgress({start:e,end:a,count:a-e,next:Ly.next},this.context)},r.prototype._doReset=function(t){this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null;var e,a;!t&&this._reset&&(e=this._reset(this.context),e&&e.progress&&(a=e.forceFirstProgress,e=e.progress),H(e)&&!e.length&&(e=null)),this._progress=e,this._modBy=this._modDataCount=null;var n=this._downstream;return n&&n.dirty(),a},r.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},r.prototype.pipe=function(t){(this._downstream!==t||this._dirty)&&(this._downstream=t,t._upstream=this,t.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(t){this._outputDueEnd=this._settedOutputEnd=t},r})(),Ly=(function(){var r,t,e,a,n,i={reset:function(l,u,f,h){t=l,r=u,e=f,a=h,n=Math.ceil(a/e),i.next=e>1&&a>0?s:o}};return i;function o(){return t<r?t++:null}function s(){var l=t%n*e+Math.ceil(t/n),u=t>=r?null:l<a?l:t;return t++,u}})();function gi(r,t){var e=t&&t.type;return e==="ordinal"?r:(e==="time"&&!bt(r)&&r!=null&&r!=="-"&&(r=+Pi(r)),r==null||r===""?NaN:Number(r))}nt({number:function(r){return parseFloat(r)},time:function(r){return+Pi(r)},trim:function(r){return X(r)?Sr(r):r}});var dI=(function(){function r(t,e){var a=t==="desc";this._resultLT=a?1:-1,e==null&&(e=a?"min":"max"),this._incomparable=e==="min"?-1/0:1/0}return r.prototype.evaluate=function(t,e){var a=bt(t)?t:Vo(t),n=bt(e)?e:Vo(e),i=isNaN(a),o=isNaN(n);if(i&&(a=this._incomparable),o&&(n=this._incomparable),i&&o){var s=X(t),l=X(e);s&&(a=l?t:0),l&&(n=s?e:0)}return a<n?this._resultLT:a>n?-this._resultLT:0},r})(),pI=(function(){function r(){}return r.prototype.getRawData=function(){throw new Error("not supported")},r.prototype.getRawDataItem=function(t){throw new Error("not supported")},r.prototype.cloneRawData=function(){},r.prototype.getDimensionInfo=function(t){},r.prototype.cloneAllDimensionInfo=function(){},r.prototype.count=function(){},r.prototype.retrieveValue=function(t,e){},r.prototype.retrieveValueFromItem=function(t,e){},r.prototype.convertValue=function(t,e){return gi(t,e)},r})();function gI(r,t){var e=new pI,a=r.data,n=e.sourceFormat=r.sourceFormat,i=r.startIndex,o="";r.seriesLayoutBy!==nr&&de(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 _="";rr(l,y)&&de(_),l[y]=m}});else for(var f=0;f<r.dimensionsDetectedCount;f++)s.push({index:f});var h=Kb(n,nr);t.__isBuiltIn&&(e.getRawDataItem=function(p){return h(a,i,s,p)},e.getRawData=Y(yI,null,r)),e.cloneRawData=Y(mI,null,r);var v=qb(n,nr);e.count=Y(v,null,a,i,s);var c=Qb(n);e.retrieveValue=function(p,g){var y=h(a,i,s,p);return d(y,g)};var d=e.retrieveValueFromItem=function(p,g){if(p!=null){var y=s[g];if(y)return c(p,g,y.name)}};return e.getDimensionInfo=Y(_I,null,s,l),e.cloneAllDimensionInfo=Y(SI,null,s),e}function yI(r){var t=r.sourceFormat;if(!Gd(t)){var e="";de(e)}return r.data}function mI(r){var t=r.sourceFormat,e=r.data;if(!Gd(t)){var a="";de(a)}if(t===ie){for(var n=[],i=0,o=e.length;i<o;i++)n.push(e[i].slice());return n}else if(t===$e){for(var n=[],i=0,o=e.length;i<o;i++)n.push(F({},e[i]));return n}}function _I(r,t,e){if(e!=null){if(bt(e)||!isNaN(e)&&!rr(t,e))return r[e];if(rr(t,e))return t[e]}}function SI(r){return J(r)}var jb=nt();function bI(r){r=J(r);var t=r.type,e="";t||de(e);var a=t.split(":");a.length!==2&&de(e);var n=!1;a[0]==="echarts"&&(t=a[1],n=!0),r.__isBuiltIn=n,jb.set(t,r)}function xI(r,t,e){var a=Wt(r),n=a.length,i="";n||de(i);for(var o=0,s=n;o<s;o++){var l=a[o];t=wI(l,t),o!==s-1&&(t.length=Math.max(t.length,1))}return t}function wI(r,t,e,a){var n="";t.length||de(n),j(r)||de(n);var i=r.type,o=jb.get(i);o||de(n);var s=U(t,function(u){return gI(u,o)}),l=Wt(o.transform({upstream:s[0],upstreamList:s,config:J(r.config)}));return U(l,function(u,f){var h="";j(u)||de(h),u.data||de(h);var v=Zb(u.data);Gd(v)||de(h);var c,d=t[0];if(d&&f===0&&!u.dimensions){var p=d.startIndex;p&&(u.data=d.data.slice(0,p).concat(u.data)),c={seriesLayoutBy:nr,sourceHeader:p,dimensions:d.metaRawOption.dimensions}}else c={seriesLayoutBy:nr,sourceHeader:0,dimensions:u.dimensions};return Xc(u.data,c,null)})}function Gd(r){return r===ie||r===$e}var tf="undefined",TI=typeof Uint32Array===tf?Array:Uint32Array,CI=typeof Uint16Array===tf?Array:Uint16Array,Jb=typeof Int32Array===tf?Array:Int32Array,Iy=typeof Float64Array===tf?Array:Float64Array,tx={float:Iy,int:Jb,ordinal:Array,number:Array,time:Iy},uh;function Zn(r){return r>65535?TI:CI}function Xn(){return[1/0,-1/0]}function MI(r){var t=r.constructor;return t===Array?r.slice():new t(r)}function Py(r,t,e,a,n){var i=tx[e||"float"];if(n){var o=r[t],s=o&&o.length;if(s!==a){for(var l=new i(a),u=0;u<s;u++)l[u]=o[u];r[t]=l}}else r[t]=new i(a)}var $c=(function(){function r(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=nt()}return r.prototype.initData=function(t,e,a){this._provider=t,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var n=t.getSource(),i=this.defaultDimValueGetter=uh[n.sourceFormat];this._dimValueGetter=a||i,this._rawExtent=[],Xb(n),this._dimensions=U(e,function(o){return{type:o.type,property:o.property}}),this._initDataFromProvider(0,t.count())},r.prototype.getProvider=function(){return this._provider},r.prototype.getSource=function(){return this._provider.getSource()},r.prototype.ensureCalculationDimension=function(t,e){var a=this._calcDimNameToIdx,n=this._dimensions,i=a.get(t);if(i!=null){if(n[i].type===e)return i}else i=n.length;return n[i]={type:e},a.set(t,i),this._chunks[i]=new tx[e||"float"](this._rawCount),this._rawExtent[i]=Xn(),i},r.prototype.collectOrdinalMeta=function(t,e){var a=this._chunks[t],n=this._dimensions[t],i=this._rawExtent,o=n.ordinalOffset||0,s=a.length;o===0&&(i[t]=Xn());for(var l=i[t],u=o;u<s;u++){var f=a[u]=e.parseAndCollect(a[u]);isNaN(f)||(l[0]=Math.min(f,l[0]),l[1]=Math.max(f,l[1]))}n.ordinalMeta=e,n.ordinalOffset=s,n.type="ordinal"},r.prototype.getOrdinalMeta=function(t){var e=this._dimensions[t],a=e.ordinalMeta;return a},r.prototype.getDimensionProperty=function(t){var e=this._dimensions[t];return e&&e.property},r.prototype.appendData=function(t){var e=this._provider,a=this.count();e.appendData(t);var n=e.count();return e.persistent||(n+=a),a<n&&this._initDataFromProvider(a,n,!0),[a,n]},r.prototype.appendValues=function(t,e){for(var a=this._chunks,n=this._dimensions,i=n.length,o=this._rawExtent,s=this.count(),l=s+Math.max(t.length,e||0),u=0;u<i;u++){var f=n[u];Py(a,u,f.type,l,!0)}for(var h=[],v=s;v<l;v++)for(var c=v-s,d=0;d<i;d++){var f=n[d],p=uh.arrayRows.call(this,t[c]||h,f.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(t,e,a){for(var n=this._provider,i=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=U(o,function(m){return m.property}),f=0;f<s;f++){var h=o[f];l[f]||(l[f]=Xn()),Py(i,f,h.type,e,a)}if(n.fillStorage)n.fillStorage(t,e,i,l);else for(var v=[],c=t;c<e;c++){v=n.getItem(c,v);for(var d=0;d<s;d++){var p=i[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)}}!n.persistent&&n.clean&&n.clean(),this._rawCount=this._count=e,this._extent=[]},r.prototype.count=function(){return this._count},r.prototype.get=function(t,e){if(!(e>=0&&e<this._count))return NaN;var a=this._chunks[t];return a?a[this.getRawIndex(e)]:NaN},r.prototype.getValues=function(t,e){var a=[],n=[];if(e==null){e=t,t=[];for(var i=0;i<this._dimensions.length;i++)n.push(i)}else n=t;for(var i=0,o=n.length;i<o;i++)a.push(this.get(n[i],e));return a},r.prototype.getByRawIndex=function(t,e){if(!(e>=0&&e<this._rawCount))return NaN;var a=this._chunks[t];return a?a[e]:NaN},r.prototype.getSum=function(t){var e=this._chunks[t],a=0;if(e)for(var n=0,i=this.count();n<i;n++){var o=this.get(t,n);isNaN(o)||(a+=o)}return a},r.prototype.getMedian=function(t){var e=[];this.each([t],function(i){isNaN(i)||e.push(i)});var a=e.sort(function(i,o){return i-o}),n=this.count();return n===0?0:n%2===1?a[(n-1)/2]:(a[n/2]+a[n/2-1])/2},r.prototype.indexOfRawIndex=function(t){if(t>=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,a=e[t];if(a!=null&&a<this._count&&a===t)return t;for(var n=0,i=this._count-1;n<=i;){var o=(n+i)/2|0;if(e[o]<t)n=o+1;else if(e[o]>t)i=o-1;else return o}return-1},r.prototype.getIndices=function(){var t,e=this._indices;if(e){var a=e.constructor,n=this._count;if(a===Array){t=new a(n);for(var i=0;i<n;i++)t[i]=e[i]}else t=new a(e.buffer,0,n)}else{var a=Zn(this._rawCount);t=new a(this.count());for(var i=0;i<t.length;i++)t[i]=i}return t},r.prototype.filter=function(t,e){if(!this._count)return this;for(var a=this.clone(),n=a.count(),i=Zn(a._rawCount),o=new i(n),s=[],l=t.length,u=0,f=t[0],h=a._chunks,v=0;v<n;v++){var c=void 0,d=a.getRawIndex(v);if(l===0)c=e(v);else if(l===1){var p=h[f][d];c=e(p,v)}else{for(var g=0;g<l;g++)s[g]=h[t[g]][d];s[g]=v,c=e.apply(null,s)}c&&(o[u++]=d)}return u<n&&(a._indices=o),a._count=u,a._extent=[],a._updateGetRawIdx(),a},r.prototype.selectRange=function(t){var e=this.clone(),a=e._count;if(!a)return this;var n=Pt(t),i=n.length;if(!i)return this;var o=e.count(),s=Zn(e._rawCount),l=new s(o),u=0,f=n[0],h=t[f][0],v=t[f][1],c=e._chunks,d=!1;if(!e._indices){var p=0;if(i===1){for(var g=c[n[0]],y=0;y<a;y++){var m=g[y];(m>=h&&m<=v||isNaN(m))&&(l[u++]=p),p++}d=!0}else if(i===2){for(var g=c[n[0]],_=c[n[1]],S=t[n[1]][0],x=t[n[1]][1],y=0;y<a;y++){var m=g[y],b=_[y];(m>=h&&m<=v||isNaN(m))&&(b>=S&&b<=x||isNaN(b))&&(l[u++]=p),p++}d=!0}}if(!d)if(i===1)for(var y=0;y<o;y++){var w=e.getRawIndex(y),m=c[n[0]][w];(m>=h&&m<=v||isNaN(m))&&(l[u++]=w)}else for(var y=0;y<o;y++){for(var T=!0,w=e.getRawIndex(y),D=0;D<i;D++){var A=n[D],m=c[A][w];(m<t[A][0]||m>t[A][1])&&(T=!1)}T&&(l[u++]=e.getRawIndex(y))}return u<o&&(e._indices=l),e._count=u,e._extent=[],e._updateGetRawIdx(),e},r.prototype.map=function(t,e){var a=this.clone(t);return this._updateDims(a,t,e),a},r.prototype.modify=function(t,e){this._updateDims(this,t,e)},r.prototype._updateDims=function(t,e,a){for(var n=t._chunks,i=[],o=e.length,s=t.count(),l=[],u=t._rawExtent,f=0;f<e.length;f++)u[e[f]]=Xn();for(var h=0;h<s;h++){for(var v=t.getRawIndex(h),c=0;c<o;c++)l[c]=n[e[c]][v];l[o]=h;var d=a&&a.apply(null,l);if(d!=null){typeof d!="object"&&(i[0]=d,d=i);for(var f=0;f<d.length;f++){var p=e[f],g=d[f],y=u[p],m=n[p];m&&(m[v]=g),g<y[0]&&(y[0]=g),g>y[1]&&(y[1]=g)}}}},r.prototype.lttbDownSample=function(t,e){var a=this.clone([t],!0),n=a._chunks,i=n[t],o=this.count(),s=0,l=Math.floor(1/e),u=this.getRawIndex(0),f,h,v,c=new(Zn(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 S=this.getRawIndex(_),x=i[S];isNaN(x)||(m+=x)}m/=g-p;var b=d,w=Math.min(d+l,o),T=d-1,D=i[u];f=-1,v=b;for(var A=-1,C=0,_=b;_<w;_++){var S=this.getRawIndex(_),x=i[S];if(isNaN(x)){C++,A<0&&(A=S);continue}h=Math.abs((T-y)*(x-D)-(T-_)*(m-D)),h>f&&(f=h,v=S)}C>0&&C<w-b&&(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(t,e){for(var a=this.clone([t],!0),n=a._chunks,i=Math.floor(1/e),o=n[t],s=this.count(),l=new(Zn(this._rawCount))(Math.ceil(s/i)*2),u=0,f=0;f<s;f+=i){var h=f,v=o[this.getRawIndex(h)],c=f,d=o[this.getRawIndex(c)],p=i;f+i>s&&(p=s-f);for(var g=0;g<p;g++){var y=this.getRawIndex(f+g),m=o[y];m<v&&(v=m,h=f+g),m>d&&(d=m,c=f+g)}var _=this.getRawIndex(h),S=this.getRawIndex(c);h<c?(l[u++]=_,l[u++]=S):(l[u++]=S,l[u++]=_)}return a._count=u,a._indices=l,a._updateGetRawIdx(),a},r.prototype.downSample=function(t,e,a,n){for(var i=this.clone([t],!0),o=i._chunks,s=[],l=Math.floor(1/e),u=o[t],f=this.count(),h=i._rawExtent[t]=Xn(),v=new(Zn(this._rawCount))(Math.ceil(f/l)),c=0,d=0;d<f;d+=l){l>f-d&&(l=f-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+n(s,y)||0,f-1));u[m]=y,y<h[0]&&(h[0]=y),y>h[1]&&(h[1]=y),v[c++]=m}return i._count=c,i._indices=v,i._updateGetRawIdx(),i},r.prototype.each=function(t,e){if(this._count)for(var a=t.length,n=this._chunks,i=0,o=this.count();i<o;i++){var s=this.getRawIndex(i);switch(a){case 0:e(i);break;case 1:e(n[t[0]][s],i);break;case 2:e(n[t[0]][s],n[t[1]][s],i);break;default:for(var l=0,u=[];l<a;l++)u[l]=n[t[l]][s];u[l]=i,e.apply(null,u)}}},r.prototype.getDataExtent=function(t){var e=this._chunks[t],a=Xn();if(!e)return a;var n=this.count(),i=!this._indices,o;if(i)return this._rawExtent[t].slice();if(o=this._extent[t],o)return o.slice();o=a;for(var s=o[0],l=o[1],u=0;u<n;u++){var f=this.getRawIndex(u),h=e[f];h<s&&(s=h),h>l&&(l=h)}return o=[s,l],this._extent[t]=o,o},r.prototype.getRawDataItem=function(t){var e=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(e);for(var a=[],n=this._chunks,i=0;i<n.length;i++)a.push(n[i][e]);return a},r.prototype.clone=function(t,e){var a=new r,n=this._chunks,i=t&&wa(t,function(s,l){return s[l]=!0,s},{});if(i)for(var o=0;o<n.length;o++)a._chunks[o]=i[o]?MI(n[o]):n[o];else a._chunks=n;return this._copyCommonProps(a),e||(a._indices=this._cloneIndices()),a._updateGetRawIdx(),a},r.prototype._copyCommonProps=function(t){t._count=this._count,t._rawCount=this._rawCount,t._provider=this._provider,t._dimensions=this._dimensions,t._extent=J(this._extent),t._rawExtent=J(this._rawExtent)},r.prototype._cloneIndices=function(){if(this._indices){var t=this._indices.constructor,e=void 0;if(t===Array){var a=this._indices.length;e=new t(a);for(var n=0;n<a;n++)e[n]=this._indices[n]}else e=new t(this._indices);return e}return null},r.prototype._getRawIdxIdentity=function(t){return t},r.prototype._getRawIdx=function(t){return t<this._count&&t>=0?this._indices[t]:-1},r.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},r.internalField=(function(){function t(e,a,n,i){return gi(e[i],this._dimensions[i])}uh={arrayRows:t,objectRows:function(e,a,n,i){return gi(e[a],this._dimensions[i])},keyedColumns:t,original:function(e,a,n,i){var o=e&&(e.value==null?e:e.value);return gi(o instanceof Array?o[i]:o,this._dimensions[i])},typedArray:function(e,a,n,i){return e[i]}}})(),r})(),ex=(function(){function r(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return r.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},r.prototype._setLocalSource=function(t,e){this._sourceList=t,this._upstreamSignList=e,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 t=this._sourceHost,e=this._getUpstreamSourceManagers(),a=!!e.length,n,i;if(Xs(t)){var o=t,s=void 0,l=void 0,u=void 0;if(a){var f=e[0];f.prepareSource(),u=f.getSource(),s=u.data,l=u.sourceFormat,i=[f._getVersionSign()]}else s=o.get("data",!0),l=we(s)?Sa:Ie,i=[];var h=this._getSourceMetaRawOption()||{},v=u&&u.metaRawOption||{},c=et(h.seriesLayoutBy,v.seriesLayoutBy)||null,d=et(h.sourceHeader,v.sourceHeader),p=et(h.dimensions,v.dimensions),g=c!==v.seriesLayoutBy||!!d!=!!v.sourceHeader||p;n=g?[Xc(s,{seriesLayoutBy:c,sourceHeader:d,dimensions:p},l)]:[]}else{var y=t;if(a){var m=this._applyTransform(e);n=m.sourceList,i=m.upstreamSignList}else{var _=y.get("source",!0);n=[Xc(_,this._getSourceMetaRawOption(),null)],i=[]}}this._setLocalSource(n,i)},r.prototype._applyTransform=function(t){var e=this._sourceHost,a=e.get("transform",!0),n=e.get("fromTransformResult",!0);if(n!=null){var i="";t.length!==1&&Ey(i)}var o,s=[],l=[];return M(t,function(u){u.prepareSource();var f=u.getSource(n||0),h="";n!=null&&!f&&Ey(h),s.push(f),l.push(u._getVersionSign())}),a?o=xI(a,s,{datasetIndex:e.componentIndex}):n!=null&&(o=[oI(s[0])]),{sourceList:o,upstreamSignList:l}},r.prototype._isDirty=function(){if(this._dirty)return!0;for(var t=this._getUpstreamSourceManagers(),e=0;e<t.length;e++){var a=t[e];if(a._isDirty()||this._upstreamSignList[e]!==a._getVersionSign())return!0}},r.prototype.getSource=function(t){t=t||0;var e=this._sourceList[t];if(!e){var a=this._getUpstreamSourceManagers();return a[0]&&a[0].getSource(t)}return e},r.prototype.getSharedDataStore=function(t){var e=t.makeStoreSchema();return this._innerGetDataStore(e.dimensions,t.source,e.hash)},r.prototype._innerGetDataStore=function(t,e,a){var n=0,i=this._storeList,o=i[n];o||(o=i[n]={});var s=o[a];if(!s){var l=this._getUpstreamSourceManagers()[0];Xs(this._sourceHost)&&l?s=l._innerGetDataStore(t,e,a):(s=new $c,s.initData(new $b(e,t.length),t)),o[a]=s}return s},r.prototype._getUpstreamSourceManagers=function(){var t=this._sourceHost;if(Xs(t)){var e=kd(t);return e?[e.getSourceManager()]:[]}else return U(kL(t),function(a){return a.getSourceManager()})},r.prototype._getSourceMetaRawOption=function(){var t=this._sourceHost,e,a,n;if(Xs(t))e=t.get("seriesLayoutBy",!0),a=t.get("sourceHeader",!0),n=t.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var i=t;e=i.get("seriesLayoutBy",!0),a=i.get("sourceHeader",!0),n=i.get("dimensions",!0)}return{seriesLayoutBy:e,sourceHeader:a,dimensions:n}},r})();function Ry(r){var t=r.option.transform;t&&Fl(r.option.transform)}function Xs(r){return r.mainType==="series"}function Ey(r){throw new Error(r)}var AI="line-height:1";function rx(r){var t=r.lineHeight;return t==null?AI:"line-height:"+_e(t+"")+"px"}function ax(r,t){var e=r.color||N.color.tertiary,a=r.fontSize||12,n=r.fontWeight||"400",i=r.color||N.color.secondary,o=r.fontSize||14,s=r.fontWeight||"900";return t==="html"?{nameStyle:"font-size:"+_e(a+"")+"px;color:"+_e(e)+";font-weight:"+_e(n+""),valueStyle:"font-size:"+_e(o+"")+"px;color:"+_e(i)+";font-weight:"+_e(s+"")}:{nameStyle:{fontSize:a,fill:e,fontWeight:n},valueStyle:{fontSize:o,fill:i,fontWeight:s}}}var DI=[0,10,20,30],LI=["",`
|
|
30
|
+
`,`
|
|
31
|
+
|
|
32
|
+
`,`
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
`];function Ye(r,t){return t.type=r,t}function Kc(r){return r.type==="section"}function nx(r){return Kc(r)?II:PI}function ix(r){if(Kc(r)){var t=0,e=r.blocks.length,a=e>1||e>0&&!r.noHeader;return M(r.blocks,function(n){var i=ix(n);i>=t&&(t=i+ +(a&&(!i||Kc(n)&&!n.noHeader)))}),t}return 0}function II(r,t,e,a){var n=t.noHeader,i=RI(ix(t)),o=[],s=t.blocks||[];We(!s||H(s)),s=s||[];var l=r.orderMode;if(t.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(rr(u,l)){var f=new dI(u[l],null);s.sort(function(p,g){return f.evaluate(p.sortParam,g.sortParam)})}else l==="seriesDesc"&&s.reverse()}M(s,function(p,g){var y=t.valueFormatter,m=nx(p)(y?F(F({},r),{valueFormatter:y}):r,p,g>0?i.html:0,a);m!=null&&o.push(m)});var h=r.renderMode==="richText"?o.join(i.richText):qc(a,o.join(""),n?e:i.html);if(n)return h;var v=Uc(t.header,"ordinal",r.useUTC),c=ax(a,r.renderMode).nameStyle,d=rx(a);return r.renderMode==="richText"?ox(r,v,c)+i.richText+h:qc(a,'<div style="'+c+";"+d+';">'+_e(v)+"</div>"+h,e)}function PI(r,t,e,a){var n=r.renderMode,i=t.noName,o=t.noValue,s=!t.markerType,l=t.name,u=r.useUTC,f=t.valueFormatter||r.valueFormatter||function(S){return S=H(S)?S:[S],U(S,function(x,b){return Uc(x,H(c)?c[b]:c,u)})};if(!(i&&o)){var h=s?"":r.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||N.color.secondary,n),v=i?"":Uc(l,"ordinal",u),c=t.valueType,d=o?[]:f(t.value,t.dataIndex),p=!s||!i,g=!s&&i,y=ax(a,n),m=y.nameStyle,_=y.valueStyle;return n==="richText"?(s?"":h)+(i?"":ox(r,v,m))+(o?"":OI(r,d,p,g,_)):qc(a,(s?"":h)+(i?"":EI(v,!s,m))+(o?"":kI(d,p,g,_)),e)}}function ky(r,t,e,a,n,i){if(r){var o=nx(r),s={useUTC:n,renderMode:e,orderMode:a,markupStyleCreator:t,valueFormatter:r.valueFormatter};return o(s,r,0,i)}}function RI(r){return{html:DI[r],richText:LI[r]}}function qc(r,t,e){var a='<div style="clear:both"></div>',n="margin: "+e+"px 0 0",i=rx(r);return'<div style="'+n+";"+i+';">'+t+a+"</div>"}function EI(r,t,e){var a=t?"margin-left:2px":"";return'<span style="'+e+";"+a+'">'+_e(r)+"</span>"}function kI(r,t,e,a){var n=e?"10px":"20px",i=t?"float:right;margin-left:"+n:"";return r=H(r)?r:[r],'<span style="'+i+";"+a+'">'+U(r,function(o){return _e(o)}).join(" ")+"</span>"}function ox(r,t,e){return r.markupStyleCreator.wrapRichTextStyle(t,e)}function OI(r,t,e,a,n){var i=[n],o=a?10:20;return e&&i.push({padding:[0,0,0,o],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(H(t)?t.join(" "):t,i)}function sx(r,t){var e=r.getData().getItemVisual(t,"style"),a=e[r.visualDrawType];return Ln(a)}function lx(r,t){var e=r.get("padding");return e??(t==="richText"?[8,10]:10)}var fh=(function(){function r(){this.richTextStyles={},this._nextStyleNameId=DS()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(t,e,a){var n=a==="richText"?this._generateStyleName():null,i=mL({color:e,type:t,renderMode:a,markerId:n});return X(i)?i:(this.richTextStyles[n]=i.style,i.content)},r.prototype.wrapRichTextStyle=function(t,e){var a={};H(e)?M(e,function(i){return F(a,i)}):F(a,e);var n=this._generateStyleName();return this.richTextStyles[n]=a,"{"+n+"|"+t+"}"},r})();function BI(r){var t=r.series,e=r.dataIndex,a=r.multipleSeries,n=t.getData(),i=n.mapDimensionsAll("defaultedTooltip"),o=i.length,s=t.getRawValue(e),l=H(s),u=sx(t,e),f,h,v,c;if(o>1||l&&!o){var d=NI(s,t,e,i,u);f=d.inlineValues,h=d.inlineValueTypes,v=d.blocks,c=d.inlineValues[0]}else if(o){var p=n.getDimensionInfo(i[0]);c=f=wi(n,e,i[0]),h=p.type}else c=f=l?s[0]:s;var g=ad(t),y=g&&t.name||"",m=n.getName(e),_=a?y:m;return Ye("section",{header:y,noHeader:a||!g,sortParam:c,blocks:[Ye("nameValue",{markerType:"item",markerColor:u,name:_,noName:!Sr(_),value:f,valueType:h,dataIndex:e})].concat(v||[])})}function NI(r,t,e,a,n){var i=t.getData(),o=wa(r,function(h,v,c){var d=i.getDimensionInfo(c);return h=h||d&&d.tooltip!==!1&&d.displayName!=null},!1),s=[],l=[],u=[];a.length?M(a,function(h){f(wi(i,e,h),h)}):M(r,f);function f(h,v){var c=i.getDimensionInfo(v);!c||c.otherDims.tooltip===!1||(o?u.push(Ye("nameValue",{markerType:"subItem",markerColor:n,name:c.displayName,value:h,valueType:c.type})):(s.push(h),l.push(c.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var ta=wt();function $s(r,t){return r.getName(t)||r.getId(t)}var zI="__universalTransitionEnabled",Ut=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}return t.prototype.init=function(e,a,n){this.seriesIndex=this.componentIndex,this.dataTask=Po({count:FI,reset:GI}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n);var i=ta(this).sourceManager=new ex(this);i.prepareSource();var o=this.getInitialData(e,n);By(o,this),this.dataTask.context.data=o,ta(this).dataBeforeProcessed=o,Oy(this),this._initSelectedMapFromData(o)},t.prototype.mergeDefaultAndTheme=function(e,a){var n=Zo(this),i=n?Bi(e):{},o=this.subType;mt.hasClass(o)&&(o+="Series"),ft(e,a.getTheme().get(this.subType)),ft(e,this.getDefaultOption()),Fo(e,"label",["show"]),this.fillDataTextStyle(e.data),n&&Ma(e,i,n)},t.prototype.mergeOption=function(e,a){e=ft(this.option,e,!0),this.fillDataTextStyle(e.data);var n=Zo(this);n&&Ma(this.option,e,n);var i=ta(this).sourceManager;i.dirty(),i.prepareSource();var o=this.getInitialData(e,a);By(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,ta(this).dataBeforeProcessed=o,Oy(this),this._initSelectedMapFromData(o)},t.prototype.fillDataTextStyle=function(e){if(e&&!we(e))for(var a=["show"],n=0;n<e.length;n++)e[n]&&e[n].label&&Fo(e[n],"label",a)},t.prototype.getInitialData=function(e,a){},t.prototype.appendData=function(e){var a=this.getRawData();a.appendData(e.data)},t.prototype.getData=function(e){var a=Qc(this);if(a){var n=a.context.data;return e==null||!n.getLinkedData?n:n.getLinkedData(e)}else return ta(this).data},t.prototype.getAllData=function(){var e=this.getData();return e&&e.getLinkedDataAll?e.getLinkedDataAll():[{data:e}]},t.prototype.setData=function(e){var a=Qc(this);if(a){var n=a.context;n.outputData=e,a!==this.dataTask&&(n.data=e)}ta(this).data=e},t.prototype.getEncode=function(){var e=this.get("encode",!0);if(e)return nt(e)},t.prototype.getSourceManager=function(){return ta(this).sourceManager},t.prototype.getSource=function(){return this.getSourceManager().getSource()},t.prototype.getRawData=function(){return ta(this).dataBeforeProcessed},t.prototype.getColorBy=function(){var e=this.get("colorBy");return e||"series"},t.prototype.isColorBySeries=function(){return this.getColorBy()==="series"},t.prototype.getBaseAxis=function(){var e=this.coordinateSystem;return e&&e.getBaseAxis&&e.getBaseAxis()},t.prototype.indicesOfNearest=function(e,a,n,i){var o=this.getData(),s=this.coordinateSystem,l=s&&s.getAxis(e);if(!s||!l)return[];var u=l.dataToCoord(n);i==null&&(i=1/0);var f=[],h=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<=i&&((m<h||m===h&&y>=0&&v<0)&&(h=m,v=y,c=0),y===v&&(f[c++]=p))}),f.length=c,f},t.prototype.formatTooltip=function(e,a,n){return BI({series:this,dataIndex:e,multipleSeries:a})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(ct.node&&!(e&&e.ssr))return!1;var a=this.getShallow("animation");return a&&this.getData().count()>this.getShallow("animationThreshold")&&(a=!1),!!a},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,a,n){var i=this.ecModel,o=Od.prototype.getColorFromPalette.call(this,e,a,n);return o||(o=i.getColorFromPalette(e,a,n)),o},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get("progressive")},t.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},t.prototype.select=function(e,a){this._innerSelect(this.getData(a),e)},t.prototype.unselect=function(e,a){var n=this.option.selectedMap;if(n){var i=this.option.selectedMode,o=this.getData(a);if(i==="series"||n==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s<e.length;s++){var l=e[s],u=$s(o,l);n[u]=!1,this._selectedDataIndicesMap[u]=-1}}},t.prototype.toggleSelect=function(e,a){for(var n=[],i=0;i<e.length;i++)n[0]=e[i],this.isSelected(e[i],a)?this.unselect(n,a):this.select(n,a)},t.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap==="all")return[].slice.call(this.getData().getIndices());for(var e=this._selectedDataIndicesMap,a=Pt(e),n=[],i=0;i<a.length;i++){var o=e[a[i]];o>=0&&n.push(o)}return n},t.prototype.isSelected=function(e,a){var n=this.option.selectedMap;if(!n)return!1;var i=this.getData(a);return(n==="all"||n[$s(i,e)])&&!i.getItemModel(e).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this[zI])return!0;var e=this.option.universalTransition;return e?e===!0?!0:e&&e.enabled:!1},t.prototype._innerSelect=function(e,a){var n,i,o=this.option,s=o.selectedMode,l=a.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){j(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,f=0;f<l;f++){var h=a[f],v=$s(e,h);u[v]=!0,this._selectedDataIndicesMap[v]=e.getRawIndex(h)}}else if(s==="single"||s===!0){var c=a[l-1],v=$s(e,c);o.selectedMap=(n={},n[v]=!0,n),this._selectedDataIndicesMap=(i={},i[v]=e.getRawIndex(c),i)}}},t.prototype._initSelectedMapFromData=function(e){if(!this.option.selectedMap){var a=[];e.hasItemOption&&e.each(function(n){var i=e.getRawDataItem(n);i&&i.selected&&a.push(n)}),a.length>0&&this._innerSelect(e,a)}},t.registerClass=function(e){return mt.registerClass(e)},t.protoInitialize=(function(){var e=t.prototype;e.type="series.__base__",e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol="circle",e.visualStyleAccessPath="itemStyle",e.visualDrawType="fill"})(),t})(mt);fe(Ut,Fd);fe(Ut,Od);NS(Ut,mt);function Oy(r){var t=r.name;ad(r)||(r.name=VI(r)||t)}function VI(r){var t=r.getRawData(),e=t.mapDimensionsAll("seriesName"),a=[];return M(e,function(n){var i=t.getDimensionInfo(n);i.displayName&&a.push(i.displayName)}),a.join(" ")}function FI(r){return r.model.getRawData().count()}function GI(r){var t=r.model;return t.setData(t.getRawData().cloneShallow()),HI}function HI(r,t){t.outputData&&r.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function By(r,t){M(tS(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(e){r.wrapMethod(e,it(WI,t))})}function WI(r,t){var e=Qc(r);return e&&e.setOutputEnd((t||this).count()),t}function Qc(r){var t=(r.ecModel||{}).scheduler,e=t&&t.getPipeline(r.uid);if(e){var a=e.currentTask;if(a){var n=a.agentStubMap;n&&(a=n.get(r.uid))}return a}}var $t=(function(){function r(){this.group=new yt,this.uid=gs("viewComponent")}return r.prototype.init=function(t,e){},r.prototype.render=function(t,e,a,n){},r.prototype.dispose=function(t,e){},r.prototype.updateView=function(t,e,a,n){},r.prototype.updateLayout=function(t,e,a,n){},r.prototype.updateVisual=function(t,e,a,n){},r.prototype.toggleBlurSeries=function(t,e,a){},r.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)},r})();id($t);Vu($t);function Hd(){var r=wt();return function(t){var e=r(t),a=t.pipelineContext,n=!!e.large,i=!!e.progressiveRender,o=e.large=!!(a&&a.large),s=e.progressiveRender=!!(a&&a.progressiveRender);return(n!==o||i!==s)&&"reset"}}var ux=wt(),UI=Hd(),Vt=(function(){function r(){this.group=new yt,this.uid=gs("viewChart"),this.renderTask=Po({plan:YI,reset:ZI}),this.renderTask.context={view:this}}return r.prototype.init=function(t,e){},r.prototype.render=function(t,e,a,n){},r.prototype.highlight=function(t,e,a,n){var i=t.getData(n&&n.dataType);i&&zy(i,n,"emphasis")},r.prototype.downplay=function(t,e,a,n){var i=t.getData(n&&n.dataType);i&&zy(i,n,"normal")},r.prototype.remove=function(t,e){this.group.removeAll()},r.prototype.dispose=function(t,e){},r.prototype.updateView=function(t,e,a,n){this.render(t,e,a,n)},r.prototype.updateLayout=function(t,e,a,n){this.render(t,e,a,n)},r.prototype.updateVisual=function(t,e,a,n){this.render(t,e,a,n)},r.prototype.eachRendered=function(t){ki(this.group,t)},r.markUpdateMethod=function(t,e){ux(t).updateMethod=e},r.protoInitialize=(function(){var t=r.prototype;t.type="chart"})(),r})();function Ny(r,t,e){r&&Wo(r)&&(t==="emphasis"?Ta:Ca)(r,e)}function zy(r,t,e){var a=Mn(r,t),n=t&&t.highlightKey!=null?eD(t.highlightKey):null;a!=null?M(Wt(a),function(i){Ny(r.getItemGraphicEl(i),e,n)}):r.eachItemGraphicEl(function(i){Ny(i,e,n)})}id(Vt);Vu(Vt);function YI(r){return UI(r.model)}function ZI(r){var t=r.model,e=r.ecModel,a=r.api,n=r.payload,i=t.pipelineContext.progressiveRender,o=r.view,s=n&&ux(n).updateMethod,l=i?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](t,e,a,n),XI[l]}var XI={incrementalPrepareRender:{progress:function(r,t){t.view.incrementalRender(r,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(r,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}},ou="\0__throttleOriginMethod",Vy="\0__throttleRate",Fy="\0__throttleType";function Wd(r,t,e){var a,n=0,i=0,o=null,s,l,u,f;t=t||0;function h(){i=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=f||t,g=f||e;f=null,s=a-(g?n:i)-p,clearTimeout(o),g?o=setTimeout(h,p):s>=0?h():o=setTimeout(h,-s),n=a};return v.clear=function(){o&&(clearTimeout(o),o=null)},v.debounceNextCall=function(c){f=c},v}function _s(r,t,e,a){var n=r[t];if(n){var i=n[ou]||n,o=n[Fy],s=n[Vy];if(s!==e||o!==a){if(e==null||!a)return r[t]=i;n=r[t]=Wd(i,e,a==="debounce"),n[ou]=i,n[Fy]=a,n[Vy]=e}return n}}function $o(r,t){var e=r[t];e&&e[ou]&&(e.clear&&e.clear(),r[t]=e[ou])}var Gy=wt(),Hy={itemStyle:An(_b,!0),lineStyle:An(mb,!0)},$I={lineStyle:"stroke",itemStyle:"fill"};function fx(r,t){var e=r.visualStyleMapper||Hy[t];return e||(console.warn("Unknown style type '"+t+"'."),Hy.itemStyle)}function hx(r,t){var e=r.visualDrawType||$I[t];return e||(console.warn("Unknown style type '"+t+"'."),"fill")}var KI={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){var e=r.getData(),a=r.visualStyleAccessPath||"itemStyle",n=r.getModel(a),i=fx(r,a),o=i(n),s=n.getShallow("decal");s&&(e.setVisual("decal",s),s.dirty=!0);var l=hx(r,a),u=o[l],f=Q(u)?u:null,h=o.fill==="auto"||o.stroke==="auto";if(!o[l]||f||h){var v=r.getColorFromPalette(r.name,null,t.getSeriesCount());o[l]||(o[l]=v,e.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||Q(o.fill)?v:o.fill,o.stroke=o.stroke==="auto"||Q(o.stroke)?v:o.stroke}if(e.setVisual("style",o),e.setVisual("drawType",l),!t.isSeriesFiltered(r)&&f)return e.setVisual("colorFromPalette",!1),{dataEach:function(c,d){var p=r.getDataParams(d),g=F({},o);g[l]=f(p),c.setItemVisual(d,"style",g)}}}},Xi=new Dt,qI={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){if(!(r.ignoreStyleOnData||t.isSeriesFiltered(r))){var e=r.getData(),a=r.visualStyleAccessPath||"itemStyle",n=fx(r,a),i=e.getVisual("drawType");return{dataEach:e.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[a]){Xi.option=l[a];var u=n(Xi),f=o.ensureUniqueItemVisual(s,"style");F(f,u),Xi.option.decal&&(o.setItemVisual(s,"decal",Xi.option.decal),Xi.option.decal.dirty=!0),i in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},QI={performRawSeries:!0,overallReset:function(r){var t=nt();r.eachSeries(function(e){var a=e.getColorBy();if(!e.isColorBySeries()){var n=e.type+"-"+a,i=t.get(n);i||(i={},t.set(n,i)),Gy(e).scope=i}}),r.eachSeries(function(e){if(!(e.isColorBySeries()||r.isSeriesFiltered(e))){var a=e.getRawData(),n={},i=e.getData(),o=Gy(e).scope,s=e.visualStyleAccessPath||"itemStyle",l=hx(e,s);i.each(function(u){var f=i.getRawIndex(u);n[f]=u}),a.each(function(u){var f=n[u],h=i.getItemVisual(f,"colorFromPalette");if(h){var v=i.ensureUniqueItemVisual(f,"style"),c=a.getName(u)||u+"",d=a.count();v[l]=e.getColorFromPalette(c,o,d)}})}})}},Ks=Math.PI;function jI(r,t){t=t||{},gt(t,{text:"loading",textColor:N.color.primary,fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255,255,255,0.8)",showSpinner:!0,color:N.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var e=new yt,a=new _t({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});e.add(a);var n=new Tt({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),i=new _t({style:{fill:"none"},textContent:n,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});e.add(i);var o;return t.showSpinner&&(o=new Xu({shape:{startAngle:-Ks/2,endAngle:-Ks/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:Ks*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:Ks*3/2}).delay(300).start("circularInOut"),e.add(o)),e.resize=function(){var s=n.getBoundingRect().width,l=t.showSpinner?t.spinnerRadius:0,u=(r.getWidth()-l*2-(t.showSpinner&&s?10:0)-s)/2-(t.showSpinner&&s?0:5+s/2)+(t.showSpinner?0:s/2)+(s?0:l),f=r.getHeight()/2;t.showSpinner&&o.setShape({cx:u,cy:f}),i.setShape({x:u-l,y:f-l,width:l*2,height:l*2}),a.setShape({x:0,y:0,width:r.getWidth(),height:r.getHeight()})},e.resize(),e}var cx=(function(){function r(t,e,a,n){this._stageTaskMap=nt(),this.ecInstance=t,this.api=e,a=this._dataProcessorHandlers=a.slice(),n=this._visualHandlers=n.slice(),this._allHandlers=a.concat(n)}return r.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(a){var n=a.overallTask;n&&n.dirty()})},r.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var a=this._pipelineMap.get(t.__pipeline.id),n=a.context,i=!e&&a.progressiveEnabled&&(!n||n.progressiveRender)&&t.__idxInPipeline>a.blockIndex,o=i?a.step:null,s=n&&n.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},r.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},r.prototype.updateStreamModes=function(t,e){var a=this._pipelineMap.get(t.uid),n=t.getData(),i=n.count(),o=a.progressiveEnabled&&e.incrementalPrepareRender&&i>=a.threshold,s=t.get("large")&&i>=t.get("largeThreshold"),l=t.get("progressiveChunkMode")==="mod"?i:null;t.pipelineContext=a.context={progressiveRender:o,modDataCount:l,large:s}},r.prototype.restorePipelines=function(t){var e=this,a=e._pipelineMap=nt();t.eachSeries(function(n){var i=n.getProgressive(),o=n.uid;a.set(o,{id:o,head:null,tail:null,threshold:n.getProgressiveThreshold(),progressiveEnabled:i&&!(n.preventIncremental&&n.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),e._pipe(n,n.dataTask)})},r.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),a=this.api;M(this._allHandlers,function(n){var i=t.get(n.uid)||t.set(n.uid,{}),o="";We(!(n.reset&&n.overallReset),o),n.reset&&this._createSeriesStageTask(n,i,e,a),n.overallReset&&this._createOverallStageTask(n,i,e,a)},this)},r.prototype.prepareView=function(t,e,a,n){var i=t.renderTask,o=i.context;o.model=e,o.ecModel=a,o.api=n,i.__block=!t.incrementalPrepareRender,this._pipe(e,i)},r.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},r.prototype.performVisualTasks=function(t,e,a){this._performStageTasks(this._visualHandlers,t,e,a)},r.prototype._performStageTasks=function(t,e,a,n){n=n||{};var i=!1,o=this;M(t,function(l,u){if(!(n.visualType&&n.visualType!==l.visualType)){var f=o._stageTaskMap.get(l.uid),h=f.seriesTaskMap,v=f.overallTask;if(v){var c,d=v.agentStubMap;d.each(function(g){s(n,g)&&(g.dirty(),c=!0)}),c&&v.dirty(),o.updatePayload(v,a);var p=o.getPerformArgs(v,n.block);d.each(function(g){g.perform(p)}),v.perform(p)&&(i=!0)}else h&&h.each(function(g,y){s(n,g)&&g.dirty();var m=o.getPerformArgs(g,n.block);m.skip=!l.performRawSeries&&e.isSeriesFiltered(g.context.model),o.updatePayload(g,a),g.perform(m)&&(i=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=i||this.unfinished},r.prototype.performSeriesTasks=function(t){var e;t.eachSeries(function(a){e=a.dataTask.perform()||e}),this.unfinished=e||this.unfinished},r.prototype.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})},r.prototype.updatePayload=function(t,e){e!=="remain"&&(t.context.payload=e)},r.prototype._createSeriesStageTask=function(t,e,a,n){var i=this,o=e.seriesTaskMap,s=e.seriesTaskMap=nt(),l=t.seriesType,u=t.getTargetSeries;t.createOnAllSeries?a.eachRawSeries(f):l?a.eachRawSeriesByType(l,f):u&&u(a,n).each(f);function f(h){var v=h.uid,c=s.set(v,o&&o.get(v)||Po({plan:a2,reset:n2,count:o2}));c.context={model:h,ecModel:a,api:n,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:i},i._pipe(h,c)}},r.prototype._createOverallStageTask=function(t,e,a,n){var i=this,o=e.overallTask=e.overallTask||Po({reset:JI});o.context={ecModel:a,api:n,overallReset:t.overallReset,scheduler:i};var s=o.agentStubMap,l=o.agentStubMap=nt(),u=t.seriesType,f=t.getTargetSeries,h=!0,v=!1,c="";We(!t.createOnAllSeries,c),u?a.eachRawSeriesByType(u,d):f?f(a,n).each(d):(h=!1,M(a.getSeries(),d));function d(p){var g=p.uid,y=l.set(g,s&&s.get(g)||(v=!0,Po({reset:t2,onDirty:r2})));y.context={model:p,overallProgress:h},y.agent=o,y.__block=h,i._pipe(p,y)}v&&o.dirty()},r.prototype._pipe=function(t,e){var a=t.uid,n=this._pipelineMap.get(a);!n.head&&(n.head=e),n.tail&&n.tail.pipe(e),n.tail=e,e.__idxInPipeline=n.count++,e.__pipeline=n},r.wrapStageHandler=function(t,e){return Q(t)&&(t={overallReset:t,seriesType:s2(t)}),t.uid=gs("stageHandler"),e&&(t.visualType=e),t},r})();function JI(r){r.overallReset(r.ecModel,r.api,r.payload)}function t2(r){return r.overallProgress&&e2}function e2(){this.agent.dirty(),this.getDownstream().dirty()}function r2(){this.agent&&this.agent.dirty()}function a2(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function n2(r){r.useClearVisual&&r.data.clearAllVisual();var t=r.resetDefines=Wt(r.reset(r.model,r.ecModel,r.api,r.payload));return t.length>1?U(t,function(e,a){return vx(a)}):i2}var i2=vx(0);function vx(r){return function(t,e){var a=e.data,n=e.resetDefines[r];if(n&&n.dataEach)for(var i=t.start;i<t.end;i++)n.dataEach(a,i);else n&&n.progress&&n.progress(t,a)}}function o2(r){return r.data.count()}function s2(r){su=null;try{r(Ko,dx)}catch{}return su}var Ko={},dx={},su;px(Ko,Bd);px(dx,Wb);Ko.eachSeriesByType=Ko.eachRawSeriesByType=function(r){su=r};Ko.eachComponent=function(r){r.mainType==="series"&&r.subType&&(su=r.subType)};function px(r,t){for(var e in t.prototype)r[e]=re}var $=N.darkColor,l2=$.background,$i=function(){return{axisLine:{lineStyle:{color:$.axisLine}},splitLine:{lineStyle:{color:$.axisSplitLine}},splitArea:{areaStyle:{color:[$.backgroundTint,$.backgroundTransparent]}},minorSplitLine:{lineStyle:{color:$.axisMinorSplitLine}},axisLabel:{color:$.axisLabel},axisName:{}}},Wy={label:{color:$.secondary},itemStyle:{borderColor:$.borderTint},dividerLineStyle:{color:$.border}},gx={darkMode:!0,color:$.theme,backgroundColor:l2,axisPointer:{lineStyle:{color:$.border},crossStyle:{color:$.borderShade},label:{color:$.tertiary}},legend:{textStyle:{color:$.secondary},pageTextStyle:{color:$.tertiary}},textStyle:{color:$.secondary},title:{textStyle:{color:$.primary},subtextStyle:{color:$.quaternary}},toolbox:{iconStyle:{borderColor:$.accent50}},tooltip:{backgroundColor:$.neutral20,defaultBorderColor:$.border,textStyle:{color:$.tertiary}},dataZoom:{borderColor:$.accent10,textStyle:{color:$.tertiary},brushStyle:{color:$.backgroundTint},handleStyle:{color:$.neutral00,borderColor:$.accent20},moveHandleStyle:{color:$.accent40},emphasis:{handleStyle:{borderColor:$.accent50}},dataBackground:{lineStyle:{color:$.accent30},areaStyle:{color:$.accent20}},selectedDataBackground:{lineStyle:{color:$.accent50},areaStyle:{color:$.accent30}}},visualMap:{textStyle:{color:$.secondary},handleStyle:{borderColor:$.neutral30}},timeline:{lineStyle:{color:$.accent10},label:{color:$.tertiary},controlStyle:{color:$.accent30,borderColor:$.accent30}},calendar:{itemStyle:{color:$.neutral00,borderColor:$.neutral20},dayLabel:{color:$.tertiary},monthLabel:{color:$.secondary},yearLabel:{color:$.secondary}},matrix:{x:Wy,y:Wy,backgroundColor:{borderColor:$.axisLine},body:{itemStyle:{borderColor:$.borderTint}}},timeAxis:$i(),logAxis:$i(),valueAxis:$i(),categoryAxis:$i(),line:{symbol:"circle"},graph:{color:$.theme},gauge:{title:{color:$.secondary},axisLine:{lineStyle:{color:[[1,$.neutral05]]}},axisLabel:{color:$.axisLabel},detail:{color:$.primary}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}},funnel:{itemStyle:{borderColor:$.background}},radar:(function(){var r=$i();return r.axisName={color:$.axisLabel},r.axisLine.lineStyle.color=$.neutral20,r})(),treemap:{breadcrumb:{itemStyle:{color:$.neutral20,textStyle:{color:$.secondary}},emphasis:{itemStyle:{color:$.neutral30}}}},sunburst:{itemStyle:{borderColor:$.background}},map:{itemStyle:{borderColor:$.border,areaColor:$.neutral10},label:{color:$.tertiary},emphasis:{label:{color:$.primary},itemStyle:{areaColor:$.highlight}},select:{label:{color:$.primary},itemStyle:{areaColor:$.highlight}}},geo:{itemStyle:{borderColor:$.border,areaColor:$.neutral10},emphasis:{label:{color:$.primary},itemStyle:{areaColor:$.highlight}},select:{label:{color:$.primary},itemStyle:{color:$.highlight}}}};gx.categoryAxis.splitLine.show=!1;var u2=(function(){function r(){}return r.prototype.normalizeQuery=function(t){var e={},a={},n={};if(X(t)){var i=wr(t);e.mainType=i.main||null,e.subType=i.sub||null}else{var o=["Index","Name","Id"],s={name:1,dataIndex:1,dataType:1};M(t,function(l,u){for(var f=!1,h=0;h<o.length;h++){var v=o[h],c=u.lastIndexOf(v);if(c>0&&c===u.length-v.length){var d=u.slice(0,c);d!=="data"&&(e.mainType=d,e[v.toLowerCase()]=l,f=!0)}}s.hasOwnProperty(u)&&(a[u]=l,f=!0),f||(n[u]=l)})}return{cptQuery:e,dataQuery:a,otherQuery:n}},r.prototype.filter=function(t,e){var a=this.eventInfo;if(!a)return!0;var n=a.targetEl,i=a.packedEvent,o=a.model,s=a.view;if(!o||!s)return!0;var l=e.cptQuery,u=e.dataQuery;return f(l,o,"mainType")&&f(l,o,"subType")&&f(l,o,"index","componentIndex")&&f(l,o,"name")&&f(l,o,"id")&&f(u,i,"name")&&f(u,i,"dataIndex")&&f(u,i,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,n,i));function f(h,v,c,d){return h[c]==null||v[d||c]===h[c]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r})(),jc=["symbol","symbolSize","symbolRotate","symbolOffset"],Uy=jc.concat(["symbolKeepAspect"]),f2={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){var e=r.getData();if(r.legendIcon&&e.setVisual("legendIcon",r.legendIcon),!r.hasSymbolVisual)return;for(var a={},n={},i=!1,o=0;o<jc.length;o++){var s=jc[o],l=r.get(s);Q(l)?(i=!0,n[s]=l):a[s]=l}if(a.symbol=a.symbol||r.defaultSymbol,e.setVisual(F({legendIcon:r.legendIcon||a.symbol,symbolKeepAspect:r.get("symbolKeepAspect")},a)),t.isSeriesFiltered(r))return;var u=Pt(n);function f(h,v){for(var c=r.getRawValue(v),d=r.getDataParams(v),p=0;p<u.length;p++){var g=u[p];h.setItemVisual(v,g,n[g](c,d))}}return{dataEach:i?f:null}}},h2={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){if(!r.hasSymbolVisual||t.isSeriesFiltered(r))return;var e=r.getData();function a(n,i){for(var o=n.getItemModel(i),s=0;s<Uy.length;s++){var l=Uy[s],u=o.getShallow(l,!0);u!=null&&n.setItemVisual(i,l,u)}}return{dataEach:e.hasItemOption?a:null}}};function yx(r,t,e){switch(e){case"color":var a=r.getItemVisual(t,"style");return a[r.getVisual("drawType")];case"opacity":return r.getItemVisual(t,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return r.getItemVisual(t,e)}}function ef(r,t){switch(t){case"color":var e=r.getVisual("style");return e[r.getVisual("drawType")];case"opacity":return r.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return r.getVisual(t)}}function c2(r,t,e,a){switch(e){case"color":var n=r.ensureUniqueItemVisual(t,"style");n[r.getVisual("drawType")]=a,r.setItemVisual(t,"colorFromPalette",!1);break;case"opacity":r.ensureUniqueItemVisual(t,"style").opacity=a;break;case"symbol":case"symbolSize":case"liftZ":r.setItemVisual(t,e,a);break}}function v2(r,t){function e(a,n){var i=[];return a.eachComponent({mainType:"series",subType:r,query:n},function(o){i.push(o.seriesIndex)}),i}M([[r+"ToggleSelect","toggleSelect"],[r+"Select","select"],[r+"UnSelect","unselect"]],function(a){t(a[0],function(n,i,o){n=F({},n),o.dispatchAction(F(n,{type:a[1],seriesIndex:e(i,n)}))})})}function $n(r,t,e,a,n){var i=r+t;e.isSilent(i)||a.eachComponent({mainType:"series",subType:"pie"},function(o){for(var s=o.seriesIndex,l=o.option.selectedMap,u=n.selected,f=0;f<u.length;f++)if(u[f].seriesIndex===s){var h=o.getData(),v=Mn(h,n.fromActionPayload);e.trigger(i,{type:i,seriesId:o.id,name:H(v)?h.getName(v[0]):h.getName(v),selected:X(l)?l:F({},l)})}})}function d2(r,t,e){r.on("selectchanged",function(a){var n=e.getModel();a.isFromClick?($n("map","selectchanged",t,n,a),$n("pie","selectchanged",t,n,a)):a.fromAction==="select"?($n("map","selected",t,n,a),$n("pie","selected",t,n,a)):a.fromAction==="unselect"&&($n("map","unselected",t,n,a),$n("pie","unselected",t,n,a))})}function hi(r,t,e){for(var a;r&&!(t(r)&&(a=r,e));)r=r.__hostTarget||r.parent;return a}var p2=Math.round(Math.random()*9),g2=typeof Object.defineProperty=="function",y2=(function(){function r(){this._id="__ec_inner_"+p2++}return r.prototype.get=function(t){return this._guard(t)[this._id]},r.prototype.set=function(t,e){var a=this._guard(t);return g2?Object.defineProperty(a,this._id,{value:e,enumerable:!1,configurable:!0}):a[this._id]=e,this},r.prototype.delete=function(t){return this.has(t)?(delete this._guard(t)[this._id],!0):!1},r.prototype.has=function(t){return!!this._guard(t)[this._id]},r.prototype._guard=function(t){if(t!==Object(t))throw TypeError("Value of WeakMap is not a non-null object.");return t},r})(),m2=xt.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(r,t){var e=t.cx,a=t.cy,n=t.width/2,i=t.height/2;r.moveTo(e,a-i),r.lineTo(e+n,a+i),r.lineTo(e-n,a+i),r.closePath()}}),_2=xt.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(r,t){var e=t.cx,a=t.cy,n=t.width/2,i=t.height/2;r.moveTo(e,a-i),r.lineTo(e+n,a),r.lineTo(e,a+i),r.lineTo(e-n,a),r.closePath()}}),S2=xt.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(r,t){var e=t.x,a=t.y,n=t.width/5*3,i=Math.max(n,t.height),o=n/2,s=o*o/(i-o),l=a-i+o+s,u=Math.asin(s/o),f=Math.cos(u)*o,h=Math.sin(u),v=Math.cos(u),c=o*.6,d=o*.7;r.moveTo(e-f,l+s),r.arc(e,l,o,Math.PI-u,Math.PI*2+u),r.bezierCurveTo(e+f-h*c,l+s+v*c,e,a-d,e,a),r.bezierCurveTo(e,a-d,e-f+h*c,l+s+v*c,e-f,l+s),r.closePath()}}),b2=xt.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(r,t){var e=t.height,a=t.width,n=t.x,i=t.y,o=a/3*2;r.moveTo(n,i),r.lineTo(n+o,i+e),r.lineTo(n,i+e/4*3),r.lineTo(n-o,i+e),r.lineTo(n,i),r.closePath()}}),x2={line:sr,rect:_t,roundRect:_t,square:_t,circle:vs,diamond:_2,pin:S2,arrow:b2,triangle:m2},w2={line:function(r,t,e,a,n){n.x1=r,n.y1=t+a/2,n.x2=r+e,n.y2=t+a/2},rect:function(r,t,e,a,n){n.x=r,n.y=t,n.width=e,n.height=a},roundRect:function(r,t,e,a,n){n.x=r,n.y=t,n.width=e,n.height=a,n.r=Math.min(e,a)/4},square:function(r,t,e,a,n){var i=Math.min(e,a);n.x=r,n.y=t,n.width=i,n.height=i},circle:function(r,t,e,a,n){n.cx=r+e/2,n.cy=t+a/2,n.r=Math.min(e,a)/2},diamond:function(r,t,e,a,n){n.cx=r+e/2,n.cy=t+a/2,n.width=e,n.height=a},pin:function(r,t,e,a,n){n.x=r+e/2,n.y=t+a/2,n.width=e,n.height=a},arrow:function(r,t,e,a,n){n.x=r+e/2,n.y=t+a/2,n.width=e,n.height=a},triangle:function(r,t,e,a,n){n.cx=r+e/2,n.cy=t+a/2,n.width=e,n.height=a}},lu={};M(x2,function(r,t){lu[t]=new r});var T2=xt.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(r,t,e){var a=Kl(r,t,e),n=this.shape;return n&&n.symbolType==="pin"&&t.position==="inside"&&(a.y=e.y+e.height*.4),a},buildPath:function(r,t,e){var a=t.symbolType;if(a!=="none"){var n=lu[a];n||(a="rect",n=lu[a]),w2[a](t.x,t.y,t.width,t.height,n.shape),n.buildPath(r,n.shape,e)}}});function C2(r,t){if(this.type!=="image"){var e=this.style;this.__isEmptyBrush?(e.stroke=r,e.fill=t||N.color.neutral00,e.lineWidth=2):this.shape.symbolType==="line"?e.stroke=r:e.fill=r,this.markRedraw()}}function le(r,t,e,a,n,i,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=ub(r.slice(8),new ot(t,e,a,n),o?"center":"cover"):r.indexOf("path://")===0?l=gd(r.slice(7),{},new ot(t,e,a,n),o?"center":"cover"):l=new T2({shape:{symbolType:r,x:t,y:e,width:a,height:n}}),l.__isEmptyBrush=s,l.setColor=C2,i&&l.setColor(i),l}function rf(r){return H(r)||(r=[+r,+r]),[r[0]||0,r[1]||0]}function af(r,t){if(r!=null)return H(r)||(r=[r,r]),[K(r[0],t[0])||0,K(et(r[1],r[0]),t[1])||0]}function dn(r){return isFinite(r)}function M2(r,t,e){var a=t.x==null?0:t.x,n=t.x2==null?1:t.x2,i=t.y==null?0:t.y,o=t.y2==null?0:t.y2;t.global||(a=a*e.width+e.x,n=n*e.width+e.x,i=i*e.height+e.y,o=o*e.height+e.y),a=dn(a)?a:0,n=dn(n)?n:1,i=dn(i)?i:0,o=dn(o)?o:0;var s=r.createLinearGradient(a,i,n,o);return s}function A2(r,t,e){var a=e.width,n=e.height,i=Math.min(a,n),o=t.x==null?.5:t.x,s=t.y==null?.5:t.y,l=t.r==null?.5:t.r;t.global||(o=o*a+e.x,s=s*n+e.y,l=l*i),o=dn(o)?o:.5,s=dn(s)?s:.5,l=l>=0&&dn(l)?l:.5;var u=r.createRadialGradient(o,s,0,o,s,l);return u}function Jc(r,t,e){for(var a=t.type==="radial"?A2(r,t,e):M2(r,t,e),n=t.colorStops,i=0;i<n.length;i++)a.addColorStop(n[i].offset,n[i].color);return a}function D2(r,t){if(r===t||!r&&!t)return!1;if(!r||!t||r.length!==t.length)return!0;for(var e=0;e<r.length;e++)if(r[e]!==t[e])return!0;return!1}function qs(r){return parseInt(r,10)}function Qs(r,t,e){var a=["width","height"][t],n=["clientWidth","clientHeight"][t],i=["paddingLeft","paddingTop"][t],o=["paddingRight","paddingBottom"][t];if(e[a]!=null&&e[a]!=="auto")return parseFloat(e[a]);var s=document.defaultView.getComputedStyle(r);return(r[n]||qs(s[a])||qs(r.style[a]))-(qs(s[i])||0)-(qs(s[o])||0)|0}function L2(r,t){return!r||r==="solid"||!(t>0)?null:r==="dashed"?[4*t,2*t]:r==="dotted"?[t]:bt(r)?[r]:H(r)?r:null}function mx(r){var t=r.style,e=t.lineDash&&t.lineWidth>0&&L2(t.lineDash,t.lineWidth),a=t.lineDashOffset;if(e){var n=t.strokeNoScale&&r.getLineScale?r.getLineScale():1;n&&n!==1&&(e=U(e,function(i){return i/n}),a/=n)}return[e,a]}var I2=new Dn(!0);function uu(r){var t=r.stroke;return!(t==null||t==="none"||!(r.lineWidth>0))}function Yy(r){return typeof r=="string"&&r!=="none"}function fu(r){var t=r.fill;return t!=null&&t!=="none"}function Zy(r,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var e=r.globalAlpha;r.globalAlpha=t.fillOpacity*t.opacity,r.fill(),r.globalAlpha=e}else r.fill()}function Xy(r,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var e=r.globalAlpha;r.globalAlpha=t.strokeOpacity*t.opacity,r.stroke(),r.globalAlpha=e}else r.stroke()}function tv(r,t,e){var a=zS(t.image,t.__image,e);if(Fu(a)){var n=r.createPattern(a,t.repeat||"repeat");if(typeof DOMMatrix=="function"&&n&&n.setTransform){var i=new DOMMatrix;i.translateSelf(t.x||0,t.y||0),i.rotateSelf(0,0,(t.rotation||0)*JT),i.scaleSelf(t.scaleX||1,t.scaleY||1),n.setTransform(i)}return n}}function P2(r,t,e,a){var n,i=uu(e),o=fu(e),s=e.strokePercent,l=s<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var f=t.path||I2,h=t.__dirty;if(!a){var v=e.fill,c=e.stroke,d=o&&!!v.colorStops,p=i&&!!c.colorStops,g=o&&!!v.image,y=i&&!!c.image,m=void 0,_=void 0,S=void 0,x=void 0,b=void 0;(d||p)&&(b=t.getBoundingRect()),d&&(m=h?Jc(r,v,b):t.__canvasFillGradient,t.__canvasFillGradient=m),p&&(_=h?Jc(r,c,b):t.__canvasStrokeGradient,t.__canvasStrokeGradient=_),g&&(S=h||!t.__canvasFillPattern?tv(r,v,t):t.__canvasFillPattern,t.__canvasFillPattern=S),y&&(x=h||!t.__canvasStrokePattern?tv(r,c,t):t.__canvasStrokePattern,t.__canvasStrokePattern=x),d?r.fillStyle=m:g&&(S?r.fillStyle=S:o=!1),p?r.strokeStyle=_:y&&(x?r.strokeStyle=x:i=!1)}var w=t.getGlobalScale();f.setScale(w[0],w[1],t.segmentIgnoreThreshold);var T,D;r.setLineDash&&e.lineDash&&(n=mx(t),T=n[0],D=n[1]);var A=!0;(u||h&ai)&&(f.setDPR(r.dpr),l?f.setContext(null):(f.setContext(r),A=!1),f.reset(),t.buildPath(f,t.shape,a),f.toStatic(),t.pathUpdated()),A&&f.rebuildPath(r,l?s:1),T&&(r.setLineDash(T),r.lineDashOffset=D),a||(e.strokeFirst?(i&&Xy(r,e),o&&Zy(r,e)):(o&&Zy(r,e),i&&Xy(r,e))),T&&r.setLineDash([])}function R2(r,t,e){var a=t.__image=zS(e.image,t.__image,t,t.onload);if(!(!a||!Fu(a))){var n=e.x||0,i=e.y||0,o=t.getWidth(),s=t.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),e.sWidth&&e.sHeight){var u=e.sx||0,f=e.sy||0;r.drawImage(a,u,f,e.sWidth,e.sHeight,n,i,o,s)}else if(e.sx&&e.sy){var u=e.sx,f=e.sy,h=o-u,v=s-f;r.drawImage(a,u,f,h,v,n,i,o,s)}else r.drawImage(a,n,i,o,s)}}function E2(r,t,e){var a,n=e.text;if(n!=null&&(n+=""),n){r.font=e.font||xa,r.textAlign=e.textAlign,r.textBaseline=e.textBaseline;var i=void 0,o=void 0;r.setLineDash&&e.lineDash&&(a=mx(t),i=a[0],o=a[1]),i&&(r.setLineDash(i),r.lineDashOffset=o),e.strokeFirst?(uu(e)&&r.strokeText(n,e.x,e.y),fu(e)&&r.fillText(n,e.x,e.y)):(fu(e)&&r.fillText(n,e.x,e.y),uu(e)&&r.strokeText(n,e.x,e.y)),i&&r.setLineDash([])}}var $y=["shadowBlur","shadowOffsetX","shadowOffsetY"],Ky=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function _x(r,t,e,a,n){var i=!1;if(!a&&(e=e||{},t===e))return!1;if(a||t.opacity!==e.opacity){be(r,n),i=!0;var o=Math.max(Math.min(t.opacity,1),0);r.globalAlpha=isNaN(o)?_n.opacity:o}(a||t.blend!==e.blend)&&(i||(be(r,n),i=!0),r.globalCompositeOperation=t.blend||_n.blend);for(var s=0;s<$y.length;s++){var l=$y[s];(a||t[l]!==e[l])&&(i||(be(r,n),i=!0),r[l]=r.dpr*(t[l]||0))}return(a||t.shadowColor!==e.shadowColor)&&(i||(be(r,n),i=!0),r.shadowColor=t.shadowColor||_n.shadowColor),i}function qy(r,t,e,a,n){var i=qo(t,n.inHover),o=a?null:e&&qo(e,n.inHover)||{};if(i===o)return!1;var s=_x(r,i,o,a,n);if((a||i.fill!==o.fill)&&(s||(be(r,n),s=!0),Yy(i.fill)&&(r.fillStyle=i.fill)),(a||i.stroke!==o.stroke)&&(s||(be(r,n),s=!0),Yy(i.stroke)&&(r.strokeStyle=i.stroke)),(a||i.opacity!==o.opacity)&&(s||(be(r,n),s=!0),r.globalAlpha=i.opacity==null?1:i.opacity),t.hasStroke()){var l=i.lineWidth,u=l/(i.strokeNoScale&&t.getLineScale?t.getLineScale():1);r.lineWidth!==u&&(s||(be(r,n),s=!0),r.lineWidth=u)}for(var f=0;f<Ky.length;f++){var h=Ky[f],v=h[0];(a||i[v]!==o[v])&&(s||(be(r,n),s=!0),r[v]=i[v]||h[1])}return s}function k2(r,t,e,a,n){return _x(r,qo(t,n.inHover),e&&qo(e,n.inHover),a,n)}function Sx(r,t){var e=t.transform,a=r.dpr||1;e?r.setTransform(a*e[0],a*e[1],a*e[2],a*e[3],a*e[4],a*e[5]):r.setTransform(a,0,0,a,0,0)}function O2(r,t,e){for(var a=!1,n=0;n<r.length;n++){var i=r[n];a=a||i.isZeroArea(),Sx(t,i),t.beginPath(),i.buildPath(t,i.shape),t.clip()}e.allClipped=a}function B2(r,t){return r&&t?r[0]!==t[0]||r[1]!==t[1]||r[2]!==t[2]||r[3]!==t[3]||r[4]!==t[4]||r[5]!==t[5]:!(!r&&!t)}var Qy=1,jy=2,Jy=3,tm=4;function N2(r){var t=fu(r),e=uu(r);return!(r.lineDash||!(+t^+e)||t&&typeof r.fill!="string"||e&&typeof r.stroke!="string"||r.strokePercent<1||r.strokeOpacity<1||r.fillOpacity<1)}function be(r,t){t.batchFill&&r.fill(),t.batchStroke&&r.stroke(),t.batchFill="",t.batchStroke=""}function qo(r,t){return t&&r.__hoverStyle||r.style}function bx(r,t){pn(r,t,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function pn(r,t,e,a){var n=t.transform;if(!t.shouldBePainted(e.viewWidth,e.viewHeight,!1,!1)){t.__dirty&=~Me,t.__isRendered=!1;return}var i=t.__clipPaths,o=e.prevElClipPaths,s=!1,l=!1;if((!o||D2(i,o))&&(o&&o.length&&(be(r,e),r.restore(),l=s=!0,e.prevElClipPaths=null,e.allClipped=!1,e.prevEl=null),i&&i.length&&(be(r,e),r.save(),O2(i,r,e),s=!0),e.prevElClipPaths=i),e.allClipped){t.__isRendered=!1;return}t.beforeBrush&&t.beforeBrush(),t.innerBeforeBrush();var u=e.prevEl;u||(l=s=!0);var f=t instanceof xt&&t.autoBatch&&N2(t.style);s||B2(n,u.transform)?(be(r,e),Sx(r,t)):f||be(r,e);var h=qo(t,e.inHover);t instanceof xt?(e.lastDrawType!==Qy&&(l=!0,e.lastDrawType=Qy),qy(r,t,u,l,e),(!f||!e.batchFill&&!e.batchStroke)&&r.beginPath(),P2(r,t,h,f),f&&(e.batchFill=h.fill||"",e.batchStroke=h.stroke||"")):t instanceof ql?(e.lastDrawType!==Jy&&(l=!0,e.lastDrawType=Jy),qy(r,t,u,l,e),E2(r,t,h)):t instanceof Xe?(e.lastDrawType!==jy&&(l=!0,e.lastDrawType=jy),k2(r,t,u,l,e),R2(r,t,h)):t.getTemporalDisplayables&&(e.lastDrawType!==tm&&(l=!0,e.lastDrawType=tm),z2(r,t,e)),f&&a&&be(r,e),t.innerAfterBrush(),t.afterBrush&&t.afterBrush(),e.prevEl=t,t.__dirty=0,t.__isRendered=!0}function z2(r,t,e){var a=t.getDisplayables(),n=t.getTemporalDisplayables();r.save();var i={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:e.viewWidth,viewHeight:e.viewHeight,inHover:e.inHover},o,s;for(o=t.getCursor(),s=a.length;o<s;o++){var l=a[o];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),pn(r,l,i,o===s-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),i.prevEl=l}for(var u=0,f=n.length;u<f;u++){var l=n[u];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),pn(r,l,i,u===f-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),i.prevEl=l}t.clearTemporalDisplayables(),t.notClear=!0,r.restore()}var hh=new y2,em=new _i(100),rm=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function hu(r,t){if(r==="none")return null;var e=t.getDevicePixelRatio(),a=t.getZr(),n=a.painter.type==="svg";r.dirty&&hh.delete(r);var i=hh.get(r);if(i)return i;var o=gt(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=n?1:1/e,hh.set(r,s),r.dirty=!1,s;function l(u){for(var f=[e],h=!0,v=0;v<rm.length;++v){var c=o[rm[v]];if(c!=null&&!H(c)&&!X(c)&&!bt(c)&&typeof c!="boolean"){h=!1;break}f.push(c)}var d;if(h){d=f.join(",")+(n?"-svg":"");var p=em.get(d);p&&(n?u.svgElement=p:u.image=p)}var g=Tx(o.dashArrayX),y=V2(o.dashArrayY),m=xx(o.symbol),_=F2(g),S=Cx(y),x=!n&&ir.createCanvas(),b=n&&{tag:"g",attrs:{},key:"dcl",children:[]},w=D(),T;x&&(x.width=w.width*e,x.height=w.height*e,T=x.getContext("2d")),A(),h&&em.put(d,x||b),u.image=x,u.svgElement=b,u.svgWidth=w.width,u.svgHeight=w.height;function D(){for(var C=1,I=0,L=_.length;I<L;++I)C=gg(C,_[I]);for(var P=1,I=0,L=m.length;I<L;++I)P=gg(P,m[I].length);C*=P;var R=S*_.length*m.length;return{width:Math.max(1,Math.min(C,o.maxTileWidth)),height:Math.max(1,Math.min(R,o.maxTileHeight))}}function A(){T&&(T.clearRect(0,0,x.width,x.height),o.backgroundColor&&(T.fillStyle=o.backgroundColor,T.fillRect(0,0,x.width,x.height)));for(var C=0,I=0;I<y.length;++I)C+=y[I];if(C<=0)return;for(var L=-S,P=0,R=0,E=0;L<w.height;){if(P%2===0){for(var O=R/2%m.length,k=0,z=0,V=0;k<w.width*2;){for(var G=0,I=0;I<g[E].length;++I)G+=g[E][I];if(G<=0)break;if(z%2===0){var W=(1-o.symbolSize)*.5,Z=k+g[E][z]*W,rt=L+y[P]*W,lt=g[E][z]*o.symbolSize,Ct=y[P]*o.symbolSize,Ot=V/2%m[O].length;ut(Z,rt,lt,Ct,m[O][Ot])}k+=g[E][z],++V,++z,z===g[E].length&&(z=0)}++E,E===g.length&&(E=0)}L+=y[P],++R,++P,P===y.length&&(P=0)}function ut(tt,pt,q,at,Rt){var Mt=n?1:e,Lt=le(Rt,tt*Mt,pt*Mt,q*Mt,at*Mt,o.color,o.symbolKeepAspect);if(n){var Ft=a.painter.renderOneToVNode(Lt);Ft&&b.children.push(Ft)}else bx(T,Lt)}}}}function xx(r){if(!r||r.length===0)return[["rect"]];if(X(r))return[[r]];for(var t=!0,e=0;e<r.length;++e)if(!X(r[e])){t=!1;break}if(t)return xx([r]);for(var a=[],e=0;e<r.length;++e)X(r[e])?a.push([r[e]]):a.push(r[e]);return a}function Tx(r){if(!r||r.length===0)return[[0,0]];if(bt(r)){var t=Math.ceil(r);return[[t,t]]}for(var e=!0,a=0;a<r.length;++a)if(!bt(r[a])){e=!1;break}if(e)return Tx([r]);for(var n=[],a=0;a<r.length;++a)if(bt(r[a])){var t=Math.ceil(r[a]);n.push([t,t])}else{var t=U(r[a],function(s){return Math.ceil(s)});t.length%2===1?n.push(t.concat(t)):n.push(t)}return n}function V2(r){if(!r||typeof r=="object"&&r.length===0)return[0,0];if(bt(r)){var t=Math.ceil(r);return[t,t]}var e=U(r,function(a){return Math.ceil(a)});return r.length%2?e.concat(e):e}function F2(r){return U(r,function(t){return Cx(t)})}function Cx(r){for(var t=0,e=0;e<r.length;++e)t+=r[e];return r.length%2===1?t*2:t}function G2(r,t){r.eachRawSeries(function(e){if(!r.isSeriesFiltered(e)){var a=e.getData();a.hasItemVisual()&&a.each(function(o){var s=a.getItemVisual(o,"decal");if(s){var l=a.ensureUniqueItemVisual(o,"style");l.decal=hu(s,t)}});var n=a.getVisual("decal");if(n){var i=a.getVisual("style");i.decal=hu(n,t)}}})}var tr=new Ze,Mx={};function H2(r,t){Mx[r]=t}function W2(r){return Mx[r]}var U2=1,Y2=800,Z2=900,X2=1e3,$2=2e3,K2=5e3,Ax=1e3,q2=1100,Ud=2e3,Dx=3e3,Q2=4e3,nf=4500,j2=4600,J2=5e3,tP=6e3,Lx=7e3,eP={PROCESSOR:{FILTER:X2,SERIES_FILTER:Y2,STATISTIC:K2},VISUAL:{LAYOUT:Ax,PROGRESSIVE_LAYOUT:q2,GLOBAL:Ud,CHART:Dx,POST_CHART_LAYOUT:j2,COMPONENT:Q2,BRUSH:J2,CHART_ITEM:nf,ARIA:tP,DECAL:Lx}},Yt="__flagInMainProcess",js="__mainProcessVersion",Kt="__pendingUpdate",ch="__needsUpdateStatus",am=/^[a-zA-Z0-9_]+$/,vh="__connectUpdateStatus",nm=0,rP=1,aP=2;function Ix(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(this.isDisposed()){this.id;return}return Rx(this,r,t)}}function Px(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Rx(this,r,t)}}function Rx(r,t,e){return e[0]=e[0]&&e[0].toLowerCase(),Ze.prototype[t].apply(r,e)}var Ex=(function(r){B(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t})(Ze),kx=Ex.prototype;kx.on=Px("on");kx.off=Px("off");var rn,dh,Js,Er,tl,ph,gh,Kn,qn,im,om,yh,sm,el,lm,Ox,Pe,um,Qn,Bx=(function(r){B(t,r);function t(e,a,n){var i=r.call(this,new u2)||this;i._chartsViews=[],i._chartsMap={},i._componentsViews=[],i._componentsMap={},i._pendingActions=[],n=n||{},i._dom=e;var o="canvas",s="auto",l=!1;i[js]=1,n.ssr;var u=i._zr=cg(e,{renderer:n.renderer||o,devicePixelRatio:n.devicePixelRatio,width:n.width,height:n.height,ssr:n.ssr,useDirtyRect:et(n.useDirtyRect,l),useCoarsePointer:et(n.useCoarsePointer,s),pointerSize:n.pointerSize});i._ssr=n.ssr,i._throttledZrFlush=Wd(Y(u.flush,u),17),i._updateTheme(a),i._locale=iL(n.locale||Sb),i._coordSysMgr=new ms;var f=i._api=lm(i);function h(v,c){return v.__prio-c.__prio}return Tl(vu,h),Tl(av,h),i._scheduler=new cx(i,f,av,vu),i._messageCenter=new Ex,i._initEvents(),i.resize=Y(i.resize,i),u.animation.on("frame",i._onframe,i),im(u,i),om(u,i),Fl(i),i}return t.prototype._onframe=function(){if(!this._disposed){um(this);var e=this._scheduler;if(this[Kt]){var a=this[Kt].silent;this[Yt]=!0,Qn(this);try{rn(this),Er.update.call(this,null,this[Kt].updateParams)}catch(l){throw this[Yt]=!1,this[Kt]=null,l}this._zr.flush(),this[Yt]=!1,this[Kt]=null,Kn.call(this,a),qn.call(this,a)}else if(e.unfinished){var n=U2,i=this._model,o=this._api;e.unfinished=!1;do{var s=+new Date;e.performSeriesTasks(i),e.performDataProcessorTasks(i),ph(this,i),e.performVisualTasks(i),el(this,this._model,o,"remain",{}),n-=+new Date-s}while(n>0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,a,n){if(!this[Yt]){if(this._disposed){this.id;return}var i,o,s;if(j(a)&&(n=a.lazyUpdate,i=a.silent,o=a.replaceMerge,s=a.transition,a=a.notMerge),this[Yt]=!0,Qn(this),!this._model||a){var l=new ZL(this._api),u=this._theme,f=this._model=new Bd;f.scheduler=this._scheduler,f.ssr=this._ssr,f.init(null,null,null,u,this._locale,l)}this._model.setOption(e,{replaceMerge:o},nv);var h={seriesTransition:s,optionChanged:!0};if(n)this[Kt]={silent:i,updateParams:h},this[Yt]=!1,this.getZr().wakeUp();else{try{rn(this),Er.update.call(this,null,h)}catch(v){throw this[Kt]=null,this[Yt]=!1,v}this._ssr||this._zr.flush(),this[Kt]=null,this[Yt]=!1,Kn.call(this,i),qn.call(this,i)}}},t.prototype.setTheme=function(e,a){if(!this[Yt]){if(this._disposed){this.id;return}var n=this._model;if(n){var i=a&&a.silent,o=null;this[Kt]&&(i==null&&(i=this[Kt].silent),o=this[Kt].updateParams,this[Kt]=null),this[Yt]=!0,Qn(this);try{this._updateTheme(e),n.setTheme(this._theme),rn(this),Er.update.call(this,{type:"setTheme"},o)}catch(s){throw this[Yt]=!1,s}this[Yt]=!1,Kn.call(this,i),qn.call(this,i)}}},t.prototype._updateTheme=function(e){X(e)&&(e=Nx[e]),e&&(e=J(e),e&&Yb(e,!0),this._theme=e)},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||ct.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){e=e||{};var a=this._zr.painter;return a.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get("backgroundColor"),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){e=e||{};var a=this._zr.painter;return a.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){var e=this._zr,a=e.storage.getDisplayList();return M(a,function(n){n.stopAnimation(null,!0)}),e.painter.toDataURL()},t.prototype.getDataURL=function(e){if(this._disposed){this.id;return}e=e||{};var a=e.excludeComponents,n=this._model,i=[],o=this;M(a,function(l){n.eachComponent({mainType:l},function(u){var f=o._componentsMap[u.__viewId];f.group.ignore||(i.push(f),f.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(e).toDataURL("image/"+(e&&e.type||"png"));return M(i,function(l){l.group.ignore=!1}),s},t.prototype.getConnectedDataURL=function(e){if(this._disposed){this.id;return}var a=e.type==="svg",n=this.group,i=Math.min,o=Math.max,s=1/0;if(fm[n]){var l=s,u=s,f=-s,h=-s,v=[],c=e&&e.pixelRatio||this.getDevicePixelRatio();M(Ro,function(_,S){if(_.group===n){var x=a?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(J(e)),b=_.getDom().getBoundingClientRect();l=i(b.left,l),u=i(b.top,u),f=o(b.right,f),h=o(b.bottom,h),v.push({dom:x,left:b.left,top:b.top})}}),l*=c,u*=c,f*=c,h*=c;var d=f-l,p=h-u,g=ir.createCanvas(),y=cg(g,{renderer:a?"svg":"canvas"});if(y.resize({width:d,height:p}),a){var m="";return M(v,function(_){var S=_.left-l,x=_.top-u;m+='<g transform="translate('+S+","+x+')">'+_.dom+"</g>"}),y.painter.getSvgRoot().innerHTML=m,e.connectedBackgroundColor&&y.painter.setBackgroundColor(e.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}else return e.connectedBackgroundColor&&y.add(new _t({shape:{x:0,y:0,width:d,height:p},style:{fill:e.connectedBackgroundColor}})),M(v,function(_){var S=new Xe({style:{x:_.left*c-l,y:_.top*c-u,image:_.dom}});y.add(S)}),y.refreshImmediately(),g.toDataURL("image/"+(e&&e.type||"png"))}else return this.getDataURL(e)},t.prototype.convertToPixel=function(e,a,n){return tl(this,"convertToPixel",e,a,n)},t.prototype.convertToLayout=function(e,a,n){return tl(this,"convertToLayout",e,a,n)},t.prototype.convertFromPixel=function(e,a,n){return tl(this,"convertFromPixel",e,a,n)},t.prototype.containPixel=function(e,a){if(this._disposed){this.id;return}var n=this._model,i,o=Mo(n,e);return M(o,function(s,l){l.indexOf("Models")>=0&&M(s,function(u){var f=u.coordinateSystem;if(f&&f.containPoint)i=i||!!f.containPoint(a);else if(l==="seriesModels"){var h=this._chartsMap[u.__viewId];h&&h.containPoint&&(i=i||h.containPoint(a,u))}},this)},this),!!i},t.prototype.getVisual=function(e,a){var n=this._model,i=Mo(n,e,{defaultMainType:"series"}),o=i.seriesModel,s=o.getData(),l=i.hasOwnProperty("dataIndexInside")?i.dataIndexInside:i.hasOwnProperty("dataIndex")?s.indexOfRawIndex(i.dataIndex):null;return l!=null?yx(s,l,a):ef(s,a)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e=this;M(nP,function(n){var i=function(o){var s=e.getModel(),l=o.target,u,f=n==="globalout";if(f?u={}:l&&hi(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 h=u.componentType,v=u.componentIndex;(h==="markLine"||h==="markPoint"||h==="markArea")&&(h="series",v=u.seriesIndex);var c=h&&v!=null&&s.getComponent(h,v),d=c&&e[c.mainType==="series"?"_chartsMap":"_componentsMap"][c.__viewId];u.event=o,u.type=n,e._$eventProcessor.eventInfo={targetEl:l,packedEvent:u,model:c,view:d},e.trigger(n,u)}};i.zrEventfulCallAtLast=!0,e._zr.on(n,i,e)});var a=this._messageCenter;M(rv,function(n,i){a.on(i,function(o){e.trigger(i,o)})}),d2(a,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var e=this.getDom();e&&kS(this.getDom(),Zd,"");var a=this,n=a._api,i=a._model;M(a._componentsViews,function(o){o.dispose(i,n)}),M(a._chartsViews,function(o){o.dispose(i,n)}),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 Ro[a.id]},t.prototype.resize=function(e){if(!this[Yt]){if(this._disposed){this.id;return}this._zr.resize(e);var a=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!a){var n=a.resetOption("media"),i=e&&e.silent;this[Kt]&&(i==null&&(i=this[Kt].silent),n=!0,this[Kt]=null),this[Yt]=!0,Qn(this);try{n&&rn(this),Er.update.call(this,{type:"resize",animation:F({duration:0},e&&e.animation)})}catch(o){throw this[Yt]=!1,o}this[Yt]=!1,Kn.call(this,i),qn.call(this,i)}}},t.prototype.showLoading=function(e,a){if(this._disposed){this.id;return}if(j(e)&&(a=e,e=""),e=e||"default",this.hideLoading(),!!iv[e]){var n=iv[e](this._api,a),i=this._zr;this._loadingFX=n,i.add(n)}},t.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(e){var a=F({},e);return a.type=ev[e.type],a},t.prototype.dispatchAction=function(e,a){if(this._disposed){this.id;return}if(j(a)||(a={silent:!!a}),!!cu[e.type]&&this._model){if(this[Yt]){this._pendingActions.push(e);return}var n=a.silent;gh.call(this,e,n);var i=a.flush;i?this._zr.flush():i!==!1&&ct.browser.weChat&&this._throttledZrFlush(),Kn.call(this,n),qn.call(this,n)}},t.prototype.updateLabelLayout=function(){tr.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed){this.id;return}var a=e.seriesIndex,n=this.getModel(),i=n.getSeriesByIndex(a);i.appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=(function(){rn=function(h){var v=h._scheduler;v.restorePipelines(h._model),v.prepareStageTasks(),dh(h,!0),dh(h,!1),v.plan()},dh=function(h,v){for(var c=h._model,d=h._scheduler,p=v?h._componentsViews:h._chartsViews,g=v?h._componentsMap:h._chartsMap,y=h._zr,m=h._api,_=0;_<p.length;_++)p[_].__alive=!1;v?c.eachComponent(function(b,w){b!=="series"&&S(w)}):c.eachSeries(S);function S(b){var w=b.__requireNewView;b.__requireNewView=!1;var T="_ec_"+b.id+"_"+b.type,D=!w&&g[T];if(!D){var A=wr(b.type),C=v?$t.getClass(A.main,A.sub):Vt.getClass(A.sub);D=new C,D.init(c,m),g[T]=D,p.push(D),y.add(D.group)}b.__viewId=D.__id=T,D.__alive=!0,D.__model=b,D.group.__ecComponentInfo={mainType:b.mainType,index:b.componentIndex},!v&&d.prepareView(D,b,c,m)}for(var _=0;_<p.length;){var x=p[_];x.__alive?_++:(!v&&x.renderTask.dispose(),y.remove(x.group),x.dispose(c,m),p.splice(_,1),g[x.__id]===x&&delete g[x.__id],x.__id=x.group.__ecComponentInfo=null)}},Js=function(h,v,c,d,p){var g=h._model;if(g.setUpdatePayload(c),!d){M([].concat(h._componentsViews).concat(h._chartsViews),x);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,S;_!=null&&(S=nt(),M(Wt(_),function(b){var w=ge(b,null);w!=null&&S.set(w,!0)})),g&&g.eachComponent(m,function(b){var w=S&&S.get(b.id)!=null;if(!w)if(Zg(c))if(b instanceof Ut)c.type===Sn&&!c.notBlur&&!b.get(["emphasis","disabled"])&&$A(b,c,h._api);else{var T=vd(b.mainType,b.componentIndex,c.name,h._api),D=T.focusSelf,A=T.dispatchers;c.type===Sn&&D&&!c.notBlur&&Oc(b.mainType,b.componentIndex,h._api),A&&M(A,function(C){c.type===Sn?Ta(C):Ca(C)})}else Nc(c)&&b instanceof Ut&&(QA(b,c,h._api),Ug(b),Pe(h))},h),g&&g.eachComponent(m,function(b){var w=S&&S.get(b.id)!=null;w||x(h[d==="series"?"_chartsMap":"_componentsMap"][b.__viewId])},h);function x(b){b&&b.__alive&&b[v]&&b[v](b.__model,g,h._api,c)}},Er={prepareAndUpdate:function(h){rn(this),Er.update.call(this,h,h&&{optionChanged:h.newOption!=null})},update:function(h,v){var c=this._model,d=this._api,p=this._zr,g=this._coordSysMgr,y=this._scheduler;if(c){c.setUpdatePayload(h),y.restoreData(c,h),y.performSeriesTasks(c),g.create(c,d),y.performDataProcessorTasks(c,h),ph(this,c),g.update(c,d),a(c),y.performVisualTasks(c,h);var m=c.get("backgroundColor")||"transparent";p.setBackgroundColor(m);var _=c.get("darkMode");_!=null&&_!=="auto"&&p.setDarkMode(_),yh(this,c,d,h,v),tr.trigger("afterupdate",c,d)}},updateTransform:function(h){var v=this,c=this._model,d=this._api;if(c){c.setUpdatePayload(h);var p=[];c.eachComponent(function(y,m){if(y!=="series"){var _=v.getViewOfComponentModel(m);if(_&&_.__alive)if(_.updateTransform){var S=_.updateTransform(m,c,d,h);S&&S.update&&p.push(_)}else p.push(_)}});var g=nt();c.eachSeries(function(y){var m=v._chartsMap[y.__viewId];if(m.updateTransform){var _=m.updateTransform(y,c,d,h);_&&_.update&&g.set(y.uid,1)}else g.set(y.uid,1)}),a(c),this._scheduler.performVisualTasks(c,h,{setDirty:!0,dirtyMap:g}),el(this,c,d,h,{},g),tr.trigger("afterupdate",c,d)}},updateView:function(h){var v=this._model;v&&(v.setUpdatePayload(h),Vt.markUpdateMethod(h,"updateView"),a(v),this._scheduler.performVisualTasks(v,h,{setDirty:!0}),yh(this,v,this._api,h,{}),tr.trigger("afterupdate",v,this._api))},updateVisual:function(h){var v=this,c=this._model;c&&(c.setUpdatePayload(h),c.eachSeries(function(d){d.getData().clearAllVisual()}),Vt.markUpdateMethod(h,"updateVisual"),a(c),this._scheduler.performVisualTasks(c,h,{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,h)}}),c.eachSeries(function(d){var p=v._chartsMap[d.__viewId];p.updateVisual(d,c,v._api,h)}),tr.trigger("afterupdate",c,this._api))},updateLayout:function(h){Er.update.call(this,h)}};function e(h,v,c,d,p){if(h._disposed){h.id;return}for(var g=h._model,y=h._coordSysMgr.getCoordinateSystems(),m,_=Mo(g,c),S=0;S<y.length;S++){var x=y[S];if(x[v]&&(m=x[v](g,_,d,p))!=null)return m}}tl=e,ph=function(h,v){var c=h._chartsMap,d=h._scheduler;v.eachSeries(function(p){d.updateStreamModes(p,c[p.__viewId])})},gh=function(h,v){var c=this,d=this.getModel(),p=h.type,g=h.escapeConnect,y=cu[p],m=(y.update||"update").split(":"),_=m.pop(),S=m[0]!=null&&wr(m[0]);this[Yt]=!0,Qn(this);var x=[h],b=!1;h.batch&&(b=!0,x=U(h.batch,function(E){return E=gt(F({},E),h),E.batch=null,E}));var w=[],T,D=[],A=y.nonRefinedEventType,C=Nc(h),I=Zg(h);if(I&&eb(this._api),M(x,function(E){var O=y.action(E,d,c._api);if(y.refineEvent?D.push(O):T=O,T=T||F({},E),T.type=A,w.push(T),I){var k=nd(h),z=k.queryOptionMap,V=k.mainTypeSpecified,G=V?z.keys()[0]:"series";Js(c,_,E,G),Pe(c)}else C?(Js(c,_,E,"series"),Pe(c)):S&&Js(c,_,E,S.main,S.sub)}),_!=="none"&&!I&&!C&&!S)try{this[Kt]?(rn(this),Er.update.call(this,h),this[Kt]=null):Er[_].call(this,h)}catch(E){throw this[Yt]=!1,E}if(b?T={type:A,escapeConnect:g,batch:w}:T=w[0],this[Yt]=!1,!v){var L=void 0;if(y.refineEvent){var P=y.refineEvent(D,h,d,this._api).eventContent;We(j(P)),L=gt({type:y.refinedEventType},P),L.fromAction=h.type,L.fromActionPayload=h,L.escapeConnect=!0}var R=this._messageCenter;R.trigger(T.type,T),L&&R.trigger(L.type,L)}},Kn=function(h){for(var v=this._pendingActions;v.length;){var c=v.shift();gh.call(this,c,h)}},qn=function(h){!h&&this.trigger("updated")},im=function(h,v){h.on("rendered",function(c){v.trigger("rendered",c),h.animation.isFinished()&&!v[Kt]&&!v._scheduler.unfinished&&!v._pendingActions.length&&v.trigger("finished")})},om=function(h,v){h.on("mouseover",function(c){var d=c.target,p=hi(d,Wo);p&&(KA(p,c,v._api),Pe(v))}).on("mouseout",function(c){var d=c.target,p=hi(d,Wo);p&&(qA(p,c,v._api),Pe(v))}).on("click",function(c){var d=c.target,p=hi(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(h){h.clearColorPalette(),h.eachSeries(function(v){v.clearColorPalette()})}function n(h){var v=[],c=[],d=!1;if(h.eachComponent(function(m,_){var S=_.get("zlevel")||0,x=_.get("z")||0,b=_.getZLevelKey();d=d||!!b,(m==="series"?c:v).push({zlevel:S,z:x,idx:_.componentIndex,type:m,key:b})}),d){var p=v.concat(c),g,y;Tl(p,function(m,_){return m.zlevel===_.zlevel?m.z-_.z:m.zlevel-_.zlevel}),M(p,function(m){var _=h.getComponent(m.type,m.idx),S=m.zlevel,x=m.key;g!=null&&(S=Math.max(g,S)),x?(S===g&&x!==y&&S++,y=x):y&&(S===g&&S++,y=""),g=S,_.setZLevel(S)})}}yh=function(h,v,c,d,p){n(v),sm(h,v,c,d,p),M(h._chartsViews,function(g){g.__alive=!1}),el(h,v,c,d,p),M(h._chartsViews,function(g){g.__alive||g.remove(v,c)})},sm=function(h,v,c,d,p,g){M(g||h._componentsViews,function(y){var m=y.__model;u(m,y),y.render(m,v,c,d),l(m,y),f(m,y)})},el=function(h,v,c,d,p,g){var y=h._scheduler;p=F(p||{},{updatedSeries:v.getSeries()}),tr.trigger("series:beforeupdate",v,c,p);var m=!1;v.eachSeries(function(_){var S=h._chartsMap[_.__viewId];S.__alive=!0;var x=S.renderTask;y.updatePayload(x,d),u(_,S),g&&g.get(_.uid)&&x.dirty(),x.perform(y.getPerformArgs(x))&&(m=!0),S.group.silent=!!_.get("silent"),s(_,S),Ug(_)}),y.unfinished=m||y.unfinished,tr.trigger("series:layoutlabels",v,c,p),tr.trigger("series:transition",v,c,p),v.eachSeries(function(_){var S=h._chartsMap[_.__viewId];l(_,S),f(_,S)}),o(h,v),tr.trigger("series:afterupdate",v,c,p)},Pe=function(h){h[ch]=!0,h.getZr().wakeUp()},Qn=function(h){h[js]=(h[js]+1)%1e3},um=function(h){h[ch]&&(h.getZr().storage.traverse(function(v){Do(v)||i(v)}),h[ch]=!1)};function i(h){for(var v=[],c=h.currentStates,d=0;d<c.length;d++){var p=c[d];p==="emphasis"||p==="blur"||p==="select"||v.push(p)}h.selected&&h.states.select&&v.push("select"),h.hoverState===Wu&&h.states.emphasis?v.push("emphasis"):h.hoverState===Hu&&h.states.blur&&v.push("blur"),h.useStates(v)}function o(h,v){var c=h._zr,d=c.storage,p=0;d.traverse(function(g){g.isGroup||p++}),p>v.get("hoverLayerThreshold")&&!ct.node&&!ct.worker&&v.eachSeries(function(g){if(!g.preventUsingHoverLayer){var y=h._chartsMap[g.__viewId];y.__alive&&y.eachRendered(function(m){m.states.emphasis&&(m.states.emphasis.hoverLayer=!0)})}})}function s(h,v){var c=h.get("blendMode")||null;v.eachRendered(function(d){d.isGroup||(d.style.blend=c)})}function l(h,v){if(!h.preventAutoZ){var c=xi(h);v.eachRendered(function(d){return Sd(d,c.z,c.zlevel),!0})}}function u(h,v){v.eachRendered(function(c){if(!Do(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 f(h,v){var c=h.getModel("stateAnimation"),d=h.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(Do(y))return;if(y instanceof xt&&rD(y),y.__dirty){var m=y.prevStates;m&&y.useStates(m)}if(d){y.stateTransition=g;var _=y.getTextContent(),S=y.getTextGuideLine();_&&(_.stateTransition=g),S&&(S.stateTransition=g)}y.__dirty&&i(y)}})}lm=function(h){return new((function(v){B(c,v);function c(){return v!==null&&v.apply(this,arguments)||this}return c.prototype.getCoordinateSystems=function(){return h._coordSysMgr.getCoordinateSystems()},c.prototype.getComponentByElement=function(d){for(;d;){var p=d.__ecComponentInfo;if(p!=null)return h._model.getComponent(p.mainType,p.index);d=d.parent}},c.prototype.enterEmphasis=function(d,p){Ta(d,p),Pe(h)},c.prototype.leaveEmphasis=function(d,p){Ca(d,p),Pe(h)},c.prototype.enterBlur=function(d){QS(d),Pe(h)},c.prototype.leaveBlur=function(d){cd(d),Pe(h)},c.prototype.enterSelect=function(d){jS(d),Pe(h)},c.prototype.leaveSelect=function(d){JS(d),Pe(h)},c.prototype.getModel=function(){return h.getModel()},c.prototype.getViewOfComponentModel=function(d){return h.getViewOfComponentModel(d)},c.prototype.getViewOfSeriesModel=function(d){return h.getViewOfSeriesModel(d)},c.prototype.getMainProcessVersion=function(){return h[js]},c})(Wb))(h)},Ox=function(h){function v(c,d){for(var p=0;p<c.length;p++){var g=c[p];g[vh]=d}}M(ev,function(c,d){h._messageCenter.on(d,function(p){if(fm[h.group]&&h[vh]!==nm){if(p&&p.escapeConnect)return;var g=h.makeActionFromEvent(p),y=[];M(Ro,function(m){m!==h&&m.group===h.group&&y.push(m)}),v(y,nm),M(y,function(m){m[vh]!==rP&&m.dispatchAction(g)}),v(y,aP)}})})}})(),t})(Ze),Yd=Bx.prototype;Yd.on=Ix("on");Yd.off=Ix("off");Yd.one=function(r,t,e){var a=this;function n(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];t&&t.apply&&t.apply(this,i),a.off(r,n)}this.on.call(this,r,n,e)};var nP=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];var cu={},ev={},rv={},av=[],nv=[],vu=[],Nx={},iv={},Ro={},fm={},iP=+new Date-0,Zd="_echarts_instance_";function oP(r,t,e){{var a=sP(r);if(a)return a}var n=new Bx(r,t,e);return n.id="ec_"+iP++,Ro[n.id]=n,kS(r,Zd,n.id),Ox(n),tr.trigger("afterinit",n),n}function sP(r){return Ro[FM(r,Zd)]}function Xd(r,t){Nx[r]=t}function zx(r){dt(nv,r)<0&&nv.push(r)}function Vx(r,t){Kd(av,r,t,$2)}function lP(r){$d("afterinit",r)}function uP(r){$d("afterupdate",r)}function $d(r,t){tr.on(r,t)}function Lr(r,t,e){var a,n,i,o,s;Q(t)&&(e=t,t=""),j(r)?(a=r.type,n=r.event,o=r.update,s=r.publishNonRefinedEvent,e||(e=r.action),i=r.refineEvent):(a=r,n=t);function l(f){return f.toLowerCase()}n=l(n||a);var u=i?l(a):n;cu[a]||(We(am.test(a)&&am.test(n)),i&&We(n!==a),cu[a]={actionType:a,refinedEventType:n,nonRefinedEventType:u,update:o,action:e,refineEvent:i},rv[n]=1,i&&s&&(rv[u]=1),ev[u]=a)}function fP(r,t){ms.register(r,t)}function hP(r,t){Kd(vu,r,t,Ax,"layout")}function On(r,t){Kd(vu,r,t,Dx,"visual")}var hm=[];function Kd(r,t,e,a,n){if((Q(t)||j(t))&&(e=t,t=a),!(dt(hm,e)>=0)){hm.push(e);var i=cx.wrapStageHandler(e,n);i.__prio=t,i.__raw=e,r.push(i)}}function Fx(r,t){iv[r]=t}function cP(r,t,e){var a=W2("registerMap");a&&a(r,t,e)}var vP=bI;On(Ud,KI);On(nf,qI);On(nf,QI);On(Ud,f2);On(nf,h2);On(Lx,G2);zx(Yb);Vx(Z2,nI);Fx("default",jI);Lr({type:Sn,event:Sn,update:Sn},re);Lr({type:Il,event:Il,update:Il},re);Lr({type:Ql,event:fd,update:Ql,action:re,refineEvent:qd,publishNonRefinedEvent:!0});Lr({type:Rc,event:fd,update:Rc,action:re,refineEvent:qd,publishNonRefinedEvent:!0});Lr({type:jl,event:fd,update:jl,action:re,refineEvent:qd,publishNonRefinedEvent:!0});function qd(r,t,e,a){return{eventContent:{selected:jA(e),isFromClick:t.isFromClick||!1}}}Xd("default",{});Xd("dark",gx);function Ki(r){return r==null?0:r.length||1}function cm(r){return r}var Ss=(function(){function r(t,e,a,n,i,o){this._old=t,this._new=e,this._oldKeyGetter=a||cm,this._newKeyGetter=n||cm,this.context=i,this._diffModeMultiple=o==="multiple"}return r.prototype.add=function(t){return this._add=t,this},r.prototype.update=function(t){return this._update=t,this},r.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},r.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},r.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},r.prototype.remove=function(t){return this._remove=t,this},r.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},r.prototype._executeOneToOne=function(){var t=this._old,e=this._new,a={},n=new Array(t.length),i=new Array(e.length);this._initIndexMap(t,null,n,"_oldKeyGetter"),this._initIndexMap(e,a,i,"_newKeyGetter");for(var o=0;o<t.length;o++){var s=n[o],l=a[s],u=Ki(l);if(u>1){var f=l.shift();l.length===1&&(a[s]=l[0]),this._update&&this._update(f,o)}else u===1?(a[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(i,a)},r.prototype._executeMultiple=function(){var t=this._old,e=this._new,a={},n={},i=[],o=[];this._initIndexMap(t,a,i,"_oldKeyGetter"),this._initIndexMap(e,n,o,"_newKeyGetter");for(var s=0;s<i.length;s++){var l=i[s],u=a[l],f=n[l],h=Ki(u),v=Ki(f);if(h>1&&v===1)this._updateManyToOne&&this._updateManyToOne(f,u),n[l]=null;else if(h===1&&v>1)this._updateOneToMany&&this._updateOneToMany(f,u),n[l]=null;else if(h===1&&v===1)this._update&&this._update(f,u),n[l]=null;else if(h>1&&v>1)this._updateManyToMany&&this._updateManyToMany(f,u),n[l]=null;else if(h>1)for(var c=0;c<h;c++)this._remove&&this._remove(u[c]);else this._remove&&this._remove(u)}this._performRestAdd(o,n)},r.prototype._performRestAdd=function(t,e){for(var a=0;a<t.length;a++){var n=t[a],i=e[n],o=Ki(i);if(o>1)for(var s=0;s<o;s++)this._add&&this._add(i[s]);else o===1&&this._add&&this._add(i);e[n]=null}},r.prototype._initIndexMap=function(t,e,a,n){for(var i=this._diffModeMultiple,o=0;o<t.length;o++){var s="_ec_"+this[n](t[o],o);if(i||(a[o]=s),!!e){var l=e[s],u=Ki(l);u===0?(e[s]=o,i&&a.push(s)):u===1?e[s]=[l,o]:l.push(o)}}},r})(),dP=(function(){function r(t,e){this._encode=t,this._schema=e}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 pP(r,t){var e={},a=e.encode={},n=nt(),i=[],o=[],s={};M(r.dimensions,function(v){var c=r.getDimensionInfo(v),d=c.coordDim;if(d){var p=c.coordDimIndex;mh(a,d)[p]=v,c.isExtraCoord||(n.set(d,1),gP(c.type)&&(i[0]=v),mh(s,d)[p]=r.getDimensionIndex(c.name)),c.defaultTooltip&&o.push(v)}Ob.each(function(g,y){var m=mh(a,y),_=c.otherDims[y];_!=null&&_!==!1&&(m[_]=c.name)})});var l=[],u={};n.each(function(v,c){var d=a[c];u[c]=d[0],l=l.concat(d)}),e.dataDimsOnCoord=l,e.dataDimIndicesOnCoord=U(l,function(v){return r.getDimensionInfo(v).storeDimIndex}),e.encodeFirstDimNotExtra=u;var f=a.label;f&&f.length&&(i=f.slice());var h=a.tooltip;return h&&h.length?o=h.slice():o.length||(o=i.slice()),a.defaultedLabel=i,a.defaultedTooltip=o,e.userOutput=new dP(s,t),e}function mh(r,t){return r.hasOwnProperty(t)||(r[t]=[]),r[t]}function ov(r){return r==="category"?"ordinal":r==="time"?"time":"float"}function gP(r){return!(r==="ordinal"||r==="time")}var Ol=(function(){function r(t){this.otherDims={},t!=null&&F(this,t)}return r})(),yP=wt(),mP={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},Gx=(function(){function r(t){this.dimensions=t.dimensions,this._dimOmitted=t.dimensionOmitted,this.source=t.source,this._fullDimCount=t.fullDimensionCount,this._updateDimOmitted(t.dimensionOmitted)}return r.prototype.isDimensionOmitted=function(){return this._dimOmitted},r.prototype._updateDimOmitted=function(t){this._dimOmitted=t,t&&(this._dimNameMap||(this._dimNameMap=Ux(this.source)))},r.prototype.getSourceDimensionIndex=function(t){return et(this._dimNameMap.get(t),-1)},r.prototype.getSourceDimension=function(t){var e=this.source.dimensionsDefine;if(e)return e[t]},r.prototype.makeStoreSchema=function(){for(var t=this._fullDimCount,e=Xb(this.source),a=!Yx(t),n="",i=[],o=0,s=0;o<t;o++){var l=void 0,u=void 0,f=void 0,h=this.dimensions[s];if(h&&h.storeDimIndex===o)l=e?h.name:null,u=h.type,f=h.ordinalMeta,s++;else{var v=this.getSourceDimension(o);v&&(l=e?v.name:null,u=v.type)}i.push({property:l,type:u,ordinalMeta:f}),e&&l!=null&&(!h||!h.isCalculationCoord)&&(n+=a?l.replace(/\`/g,"`1").replace(/\$/g,"`2"):l),n+="$",n+=mP[u]||"f",f&&(n+=f.uid),n+="$"}var c=this.source,d=[c.seriesLayoutBy,c.startIndex,n].join("$$");return{dimensions:i,hash:d}},r.prototype.makeOutputDimensionNames=function(){for(var t=[],e=0,a=0;e<this._fullDimCount;e++){var n=void 0,i=this.dimensions[a];if(i&&i.storeDimIndex===e)i.isCalculationCoord||(n=i.name),a++;else{var o=this.getSourceDimension(e);o&&(n=o.name)}t.push(n)}return t},r.prototype.appendCalculationDimension=function(t){this.dimensions.push(t),t.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},r})();function Hx(r){return r instanceof Gx}function Wx(r){for(var t=nt(),e=0;e<(r||[]).length;e++){var a=r[e],n=j(a)?a.name:a;n!=null&&t.get(n)==null&&t.set(n,e)}return t}function Ux(r){var t=yP(r);return t.dimNameMap||(t.dimNameMap=Wx(r.dimensionsDefine))}function Yx(r){return r>30}var qi=j,ea=U,_P=typeof Int32Array>"u"?Array:Int32Array,SP="e\0\0",vm=-1,bP=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],xP=["_approximateExtent"],dm,rl,Qi,ji,_h,Ji,Sh,Yr=(function(){function r(t,e){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,n=!1;Hx(t)?(a=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(n=!0,a=t),a=a||["x","y"];for(var i={},o=[],s={},l=!1,u={},f=0;f<a.length;f++){var h=a[f],v=X(h)?new Ol({name:h}):h instanceof Ol?h:new Ol(h),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),i[c]=v,u[c]!=null&&(l=!0),v.createInvertedIndices&&(s[c]=[]);var p=f;bt(v.storeDimIndex)&&(p=v.storeDimIndex),d.itemName===0&&(this._nameDimIdx=p),d.itemId===0&&(this._idDimIdx=p),n&&(v.storeDimIndex=f)}if(this.dimensions=o,this._dimInfos=i,this._initGetDimensionInfo(l),this.hostModel=e,this._invertedIndicesMap=s,this._dimOmitted){var g=this._dimIdxToName=nt();M(o,function(y){g.set(i[y].storeDimIndex,y)})}}return r.prototype.getDimension=function(t){var e=this._recognizeDimIndex(t);if(e==null)return t;if(e=t,!this._dimOmitted)return this.dimensions[e];var a=this._dimIdxToName.get(e);if(a!=null)return a;var n=this._schema.getSourceDimension(e);if(n)return n.name},r.prototype.getDimensionIndex=function(t){var e=this._recognizeDimIndex(t);if(e!=null)return e;if(t==null)return-1;var a=this._getDimInfo(t);return a?a.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(t):-1},r.prototype._recognizeDimIndex=function(t){if(bt(t)||t!=null&&!isNaN(t)&&!this._getDimInfo(t)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(t)<0))return+t},r.prototype._getStoreDimIndex=function(t){var e=this.getDimensionIndex(t);return e},r.prototype.getDimensionInfo=function(t){return this._getDimInfo(this.getDimension(t))},r.prototype._initGetDimensionInfo=function(t){var e=this._dimInfos;this._getDimInfo=t?function(a){return e.hasOwnProperty(a)?e[a]:void 0}:function(a){return e[a]}},r.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},r.prototype.mapDimension=function(t,e){var a=this._dimSummary;if(e==null)return a.encodeFirstDimNotExtra[t];var n=a.encode[t];return n?n[e]:null},r.prototype.mapDimensionsAll=function(t){var e=this._dimSummary,a=e.encode[t];return(a||[]).slice()},r.prototype.getStore=function(){return this._store},r.prototype.initData=function(t,e,a){var n=this,i;if(t instanceof $c&&(i=t),!i){var o=this.dimensions,s=Nd(t)||xe(t)?new $b(t,o.length):t;i=new $c;var l=ea(o,function(u){return{type:n._dimInfos[u].type,property:u}});i.initData(s,l,a)}this._store=i,this._nameList=(e||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,i.count()),this._dimSummary=pP(this,this._schema),this.userOutput=this._dimSummary.userOutput},r.prototype.appendData=function(t){var e=this._store.appendData(t);this._doInit(e[0],e[1])},r.prototype.appendValues=function(t,e){var a=this._store.appendValues(t,e&&e.length),n=a.start,i=a.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),e)for(var s=n;s<i;s++){var l=s-n;this._nameList[s]=e[l],o&&Sh(this,s)}},r.prototype._updateOrdinalMeta=function(){for(var t=this._store,e=this.dimensions,a=0;a<e.length;a++){var n=this._dimInfos[e[a]];n.ordinalMeta&&t.collectOrdinalMeta(n.storeDimIndex,n.ordinalMeta)}},r.prototype._shouldMakeIdFromName=function(){var t=this._store.getProvider();return this._idDimIdx==null&&t.getSource().sourceFormat!==Sa&&!t.fillStorage},r.prototype._doInit=function(t,e){if(!(t>=e)){var a=this._store,n=a.getProvider();this._updateOrdinalMeta();var i=this._nameList,o=this._idList,s=n.getSource().sourceFormat,l=s===Ie;if(l&&!n.pure)for(var u=[],f=t;f<e;f++){var h=n.getItem(f,u);if(!this.hasItemOption&&MM(h)&&(this.hasItemOption=!0),h){var v=h.name;i[f]==null&&v!=null&&(i[f]=ge(v,null));var c=h.id;o[f]==null&&c!=null&&(o[f]=ge(c,null))}}if(this._shouldMakeIdFromName())for(var f=t;f<e;f++)Sh(this,f);dm(this)}},r.prototype.getApproximateExtent=function(t){return this._approximateExtent[t]||this._store.getDataExtent(this._getStoreDimIndex(t))},r.prototype.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},r.prototype.getCalculationInfo=function(t){return this._calculationInfo[t]},r.prototype.setCalculationInfo=function(t,e){qi(t)?F(this._calculationInfo,t):this._calculationInfo[t]=e},r.prototype.getName=function(t){var e=this.getRawIndex(t),a=this._nameList[e];return a==null&&this._nameDimIdx!=null&&(a=Qi(this,this._nameDimIdx,e)),a==null&&(a=""),a},r.prototype._getCategory=function(t,e){var a=this._store.get(t,e),n=this._store.getOrdinalMeta(t);return n?n.categories[a]:a},r.prototype.getId=function(t){return rl(this,this.getRawIndex(t))},r.prototype.count=function(){return this._store.count()},r.prototype.get=function(t,e){var a=this._store,n=this._dimInfos[t];if(n)return a.get(n.storeDimIndex,e)},r.prototype.getByRawIndex=function(t,e){var a=this._store,n=this._dimInfos[t];if(n)return a.getByRawIndex(n.storeDimIndex,e)},r.prototype.getIndices=function(){return this._store.getIndices()},r.prototype.getDataExtent=function(t){return this._store.getDataExtent(this._getStoreDimIndex(t))},r.prototype.getSum=function(t){return this._store.getSum(this._getStoreDimIndex(t))},r.prototype.getMedian=function(t){return this._store.getMedian(this._getStoreDimIndex(t))},r.prototype.getValues=function(t,e){var a=this,n=this._store;return H(t)?n.getValues(ea(t,function(i){return a._getStoreDimIndex(i)}),e):n.getValues(t)},r.prototype.hasValue=function(t){for(var e=this._dimSummary.dataDimIndicesOnCoord,a=0,n=e.length;a<n;a++)if(isNaN(this._store.get(e[a],t)))return!1;return!0},r.prototype.indexOfName=function(t){for(var e=0,a=this._store.count();e<a;e++)if(this.getName(e)===t)return e;return-1},r.prototype.getRawIndex=function(t){return this._store.getRawIndex(t)},r.prototype.indexOfRawIndex=function(t){return this._store.indexOfRawIndex(t)},r.prototype.rawIndexOf=function(t,e){var a=t&&this._invertedIndicesMap[t],n=a&&a[e];return n==null||isNaN(n)?vm:n},r.prototype.each=function(t,e,a){Q(t)&&(a=e,e=t,t=[]);var n=a||this,i=ea(ji(t),this._getStoreDimIndex,this);this._store.each(i,n?Y(e,n):e)},r.prototype.filterSelf=function(t,e,a){Q(t)&&(a=e,e=t,t=[]);var n=a||this,i=ea(ji(t),this._getStoreDimIndex,this);return this._store=this._store.filter(i,n?Y(e,n):e),this},r.prototype.selectRange=function(t){var e=this,a={},n=Pt(t);return M(n,function(i){var o=e._getStoreDimIndex(i);a[o]=t[i]}),this._store=this._store.selectRange(a),this},r.prototype.mapArray=function(t,e,a){Q(t)&&(a=e,e=t,t=[]),a=a||this;var n=[];return this.each(t,function(){n.push(e&&e.apply(this,arguments))},a),n},r.prototype.map=function(t,e,a,n){var i=a||n||this,o=ea(ji(t),this._getStoreDimIndex,this),s=Ji(this);return s._store=this._store.map(o,i?Y(e,i):e),s},r.prototype.modify=function(t,e,a,n){var i=a||n||this,o=ea(ji(t),this._getStoreDimIndex,this);this._store.modify(o,i?Y(e,i):e)},r.prototype.downSample=function(t,e,a,n){var i=Ji(this);return i._store=this._store.downSample(this._getStoreDimIndex(t),e,a,n),i},r.prototype.minmaxDownSample=function(t,e){var a=Ji(this);return a._store=this._store.minmaxDownSample(this._getStoreDimIndex(t),e),a},r.prototype.lttbDownSample=function(t,e){var a=Ji(this);return a._store=this._store.lttbDownSample(this._getStoreDimIndex(t),e),a},r.prototype.getRawDataItem=function(t){return this._store.getRawDataItem(t)},r.prototype.getItemModel=function(t){var e=this.hostModel,a=this.getRawDataItem(t);return new Dt(a,e,e&&e.ecModel)},r.prototype.diff=function(t){var e=this;return new Ss(t?t.getStore().getIndices():[],this.getStore().getIndices(),function(a){return rl(t,a)},function(a){return rl(e,a)})},r.prototype.getVisual=function(t){var e=this._visual;return e&&e[t]},r.prototype.setVisual=function(t,e){this._visual=this._visual||{},qi(t)?F(this._visual,t):this._visual[t]=e},r.prototype.getItemVisual=function(t,e){var a=this._itemVisuals[t],n=a&&a[e];return n??this.getVisual(e)},r.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},r.prototype.ensureUniqueItemVisual=function(t,e){var a=this._itemVisuals,n=a[t];n||(n=a[t]={});var i=n[e];return i==null&&(i=this.getVisual(e),H(i)?i=i.slice():qi(i)&&(i=F({},i)),n[e]=i),i},r.prototype.setItemVisual=function(t,e,a){var n=this._itemVisuals[t]||{};this._itemVisuals[t]=n,qi(e)?F(n,e):n[e]=a},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(t,e){qi(t)?F(this._layout,t):this._layout[t]=e},r.prototype.getLayout=function(t){return this._layout[t]},r.prototype.getItemLayout=function(t){return this._itemLayouts[t]},r.prototype.setItemLayout=function(t,e,a){this._itemLayouts[t]=a?F(this._itemLayouts[t]||{},e):e},r.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},r.prototype.setItemGraphicEl=function(t,e){var a=this.hostModel&&this.hostModel.seriesIndex;Pc(a,this.dataType,t,e),this._graphicEls[t]=e},r.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},r.prototype.eachItemGraphicEl=function(t,e){M(this._graphicEls,function(a,n){a&&t&&t.call(e,a,n)})},r.prototype.cloneShallow=function(t){return t||(t=new r(this._schema?this._schema:ea(this.dimensions,this._getDimInfo,this),this.hostModel)),_h(t,this),t._store=this._store,t},r.prototype.wrapMethod=function(t,e){var a=this[t];Q(a)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var n=a.apply(this,arguments);return e.apply(this,[n].concat(Kv(arguments)))})},r.internalField=(function(){dm=function(t){var e=t._invertedIndicesMap;M(e,function(a,n){var i=t._dimInfos[n],o=i.ordinalMeta,s=t._store;if(o){a=e[n]=new _P(o.categories.length);for(var l=0;l<a.length;l++)a[l]=vm;for(var l=0;l<s.count();l++)a[s.get(i.storeDimIndex,l)]=l}})},Qi=function(t,e,a){return ge(t._getCategory(e,a),null)},rl=function(t,e){var a=t._idList[e];return a==null&&t._idDimIdx!=null&&(a=Qi(t,t._idDimIdx,e)),a==null&&(a=SP+e),a},ji=function(t){return H(t)||(t=t!=null?[t]:[]),t},Ji=function(t){var e=new r(t._schema?t._schema:ea(t.dimensions,t._getDimInfo,t),t.hostModel);return _h(e,t),e},_h=function(t,e){M(bP.concat(e.__wrappedMethods||[]),function(a){e.hasOwnProperty(a)&&(t[a]=e[a])}),t.__wrappedMethods=e.__wrappedMethods,M(xP,function(a){t[a]=J(e[a])}),t._calculationInfo=F({},e._calculationInfo)},Sh=function(t,e){var a=t._nameList,n=t._idList,i=t._nameDimIdx,o=t._idDimIdx,s=a[e],l=n[e];if(s==null&&i!=null&&(a[e]=s=Qi(t,i,e)),l==null&&o!=null&&(n[e]=l=Qi(t,o,e)),l==null&&s!=null){var u=t._nameRepeatCount,f=u[s]=(u[s]||0)+1;l=s,f>1&&(l+="__ec__"+f),n[e]=l}}})(),r})();function of(r,t){Nd(r)||(r=zd(r)),t=t||{};var e=t.coordDimensions||[],a=t.dimensionsDefine||r.dimensionsDefine||[],n=nt(),i=[],o=TP(r,e,a,t.dimensionsCount),s=t.canOmitUnusedDimensions&&Yx(o),l=a===r.dimensionsDefine,u=l?Ux(r):Wx(a),f=t.encodeDefine;!f&&t.encodeDefaulter&&(f=t.encodeDefaulter(r,o));for(var h=nt(f),v=new Jb(o),c=0;c<v.length;c++)v[c]=-1;function d(D){var A=v[D];if(A<0){var C=a[D],I=j(C)?C:{name:C},L=new Ol,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 R=i.length;return v[D]=R,L.storeDimIndex=D,i.push(L),L}return i[A]}if(!s)for(var c=0;c<o;c++)d(c);h.each(function(D,A){var C=Wt(D).slice();if(C.length===1&&!X(C[0])&&C[0]<0){h.set(A,!1);return}var I=h.set(A,[]);M(C,function(L,P){var R=X(L)?u.get(L):L;R!=null&&R<o&&(I[P]=R,g(d(R),A,P))})});var p=0;M(e,function(D){var A,C,I,L;if(X(D))A=D,L={};else{L=D,A=L.name;var P=L.ordinalMeta;L.ordinalMeta=null,L=F({},L),L.ordinalMeta=P,C=L.dimsDef,I=L.otherDims,L.name=L.coordDim=L.coordDimIndex=L.dimsDef=L.otherDims=null}var R=h.get(A);if(R!==!1){if(R=Wt(R),!R.length)for(var E=0;E<(C&&C.length||1);E++){for(;p<o&&d(p).coordDim!=null;)p++;p<o&&R.push(p++)}M(R,function(O,k){var z=d(O);if(l&&L.type!=null&&(z.type=L.type),g(gt(z,L),A,k),z.name==null&&C){var V=C[k];!j(V)&&(V={name:V}),z.name=z.displayName=V.name,z.defaultTooltip=V.defaultTooltip}I&>(z.otherDims,I)})}});function g(D,A,C){Ob.get(A)!=null?D.otherDims[A]=C:(D.coordDim=A,D.coordDimIndex=C,n.set(A,!0))}var y=t.generateCoord,m=t.generateCoordCount,_=m!=null;m=y?m||1:0;var S=y||"value";function x(D){D.name==null&&(D.name=D.coordDim)}if(s)M(i,function(D){x(D)}),i.sort(function(D,A){return D.storeDimIndex-A.storeDimIndex});else for(var b=0;b<o;b++){var w=d(b),T=w.coordDim;T==null&&(w.coordDim=CP(S,n,_),w.coordDimIndex=0,(!y||m<=0)&&(w.isExtraCoord=!0),m--),x(w),w.type==null&&(Fb(r,b)===jt.Must||w.isExtraCoord&&(w.otherDims.itemName!=null||w.otherDims.seriesName!=null))&&(w.type="ordinal")}return wP(i),new Gx({source:r,dimensions:i,fullDimensionCount:o,dimensionOmitted:s})}function wP(r){for(var t=nt(),e=0;e<r.length;e++){var a=r[e],n=a.name,i=t.get(n)||0;i>0&&(a.name=n+(i-1)),i++,t.set(n,i)}}function TP(r,t,e,a){var n=Math.max(r.dimensionsDetectedCount||1,t.length,e.length,a||0);return M(t,function(i){var o;j(i)&&(o=i.dimsDef)&&(n=Math.max(n,o.length))}),n}function CP(r,t,e){if(e||t.hasKey(r)){for(var a=0;t.hasKey(r+a);)a++;r+=a}return t.set(r,!0),r}var MP=(function(){function r(t){this.coordSysDims=[],this.axisMap=nt(),this.categoryAxisMap=nt(),this.coordSysName=t}return r})();function AP(r){var t=r.get("coordinateSystem"),e=new MP(t),a=DP[t];if(a)return a(r,e,e.axisMap,e.categoryAxisMap),e}var DP={cartesian2d:function(r,t,e,a){var n=r.getReferringComponents("xAxis",ee).models[0],i=r.getReferringComponents("yAxis",ee).models[0];t.coordSysDims=["x","y"],e.set("x",n),e.set("y",i),jn(n)&&(a.set("x",n),t.firstCategoryDimIndex=0),jn(i)&&(a.set("y",i),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},singleAxis:function(r,t,e,a){var n=r.getReferringComponents("singleAxis",ee).models[0];t.coordSysDims=["single"],e.set("single",n),jn(n)&&(a.set("single",n),t.firstCategoryDimIndex=0)},polar:function(r,t,e,a){var n=r.getReferringComponents("polar",ee).models[0],i=n.findAxisModel("radiusAxis"),o=n.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],e.set("radius",i),e.set("angle",o),jn(i)&&(a.set("radius",i),t.firstCategoryDimIndex=0),jn(o)&&(a.set("angle",o),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},geo:function(r,t,e,a){t.coordSysDims=["lng","lat"]},parallel:function(r,t,e,a){var n=r.ecModel,i=n.getComponent("parallel",r.get("parallelIndex")),o=t.coordSysDims=i.dimensions.slice();M(i.parallelAxisIndex,function(s,l){var u=n.getComponent("parallelAxis",s),f=o[l];e.set(f,u),jn(u)&&(a.set(f,u),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=l))})},matrix:function(r,t,e,a){var n=r.getReferringComponents("matrix",ee).models[0];t.coordSysDims=["x","y"];var i=n.getDimensionModel("x"),o=n.getDimensionModel("y");e.set("x",i),e.set("y",o),a.set("x",i),a.set("y",o)}};function jn(r){return r.get("type")==="category"}function LP(r,t,e){e=e||{};var a=e.byIndex,n=e.stackedCoordDimension,i,o,s;IP(t)?i=t:(o=t.schema,i=o.dimensions,s=t.store);var l=!!(r&&r.get("stack")),u,f,h,v;if(M(i,function(m,_){X(m)&&(i[_]=m={name:m}),l&&!m.isExtraCoord&&(!a&&!u&&m.ordinalMeta&&(u=m),!f&&m.type!=="ordinal"&&m.type!=="time"&&(!n||n===m.coordDim)&&(f=m))}),f&&!a&&!u&&(a=!0),f){h="__\0ecstackresult_"+r.id,v="__\0ecstackedover_"+r.id,u&&(u.createInvertedIndices=!0);var c=f.coordDim,d=f.type,p=0;M(i,function(m){m.coordDim===c&&p++});var g={name:h,coordDim:c,coordDimIndex:p,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length},y={name:v,coordDim:v,coordDimIndex:p+1,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length+1};o?(s&&(g.storeDimIndex=s.ensureCalculationDimension(v,d),y.storeDimIndex=s.ensureCalculationDimension(h,d)),o.appendCalculationDimension(g),o.appendCalculationDimension(y)):(i.push(g),i.push(y))}return{stackedDimension:f&&f.name,stackedByDimension:u&&u.name,isStackedByIndex:a,stackedOverDimension:v,stackResultDimension:h}}function IP(r){return!Hx(r.schema)}function In(r,t){return!!t&&t===r.getCalculationInfo("stackedDimension")}function Zx(r,t){return In(r,t)?r.getCalculationInfo("stackResultDimension"):t}function PP(r,t){var e=r.get("coordinateSystem"),a=ms.get(e),n;return t&&t.coordSysDims&&(n=U(t.coordSysDims,function(i){var o={name:i},s=t.axisMap.get(i);if(s){var l=s.get("type");o.type=ov(l)}return o})),n||(n=a&&(a.getDimensionsInfo?a.getDimensionsInfo():a.dimensions.slice())||["x","y"]),n}function RP(r,t,e){var a,n;return e&&M(r,function(i,o){var s=i.coordDim,l=e.categoryAxisMap.get(s);l&&(a==null&&(a=o),i.ordinalMeta=l.getOrdinalMeta(),t&&(i.createInvertedIndices=!0)),i.otherDims.itemName!=null&&(n=!0)}),!n&&a!=null&&(r[a].otherDims.itemName=0),a}function Bn(r,t,e){e=e||{};var a=t.getSourceManager(),n,i=!1;r?(i=!0,n=zd(r)):(n=a.getSource(),i=n.sourceFormat===Ie);var o=AP(t),s=PP(t,o),l=e.useEncodeDefaulter,u=Q(l)?l:l?it(zb,s,t):null,f={coordDimensions:s,generateCoord:e.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!i},h=of(n,f),v=RP(h.dimensions,e.createInvertedIndices,o),c=i?null:a.getSharedDataStore(h),d=LP(t,{schema:h,store:c}),p=new Yr(h,t);p.setCalculationInfo(d);var g=v!=null&&EP(n)?function(y,m,_,S){return S===v?_:this.defaultDimValueGetter(y,m,_,S)}:null;return p.hasItemOption=!1,p.initData(i?n:c,null,g),p}function EP(r){if(r.sourceFormat===Ie){var t=kP(r.data||[]);return!H(hs(t))}}function kP(r){for(var t=0;t<r.length&&r[t]==null;)t++;return r[t]}function sv(r){return r.type==="interval"||r.type==="log"}function OP(r,t,e,a,n){var i={},o=i.interval=AS(t/e);a!=null&&o<a&&(o=i.interval=a),n!=null&&o>n&&(o=i.interval=n);var s=i.intervalPrecision=Qo(o),l=i.niceTickExtent=[Xt(Math.ceil(r[0]/o)*o,s),Xt(Math.floor(r[1]/o)*o,s)];return BP(l,r),i}function bh(r){var t=Math.pow(10,rd(r)),e=r/t;return e?e===2?e=3:e===3?e=5:e*=2:e=1,Xt(e*t)}function Qo(r){return xr(r)+2}function pm(r,t,e){r[t]=Math.max(Math.min(r[t],e[1]),e[0])}function BP(r,t){!isFinite(r[0])&&(r[0]=t[0]),!isFinite(r[1])&&(r[1]=t[1]),pm(r,0,t),pm(r,1,t),r[0]>r[1]&&(r[0]=r[1])}function Qd(r,t){return r>=t[0]&&r<=t[1]}var NP=(function(){function r(){this.normalize=gm,this.scale=ym}return r.prototype.updateMethods=function(t){t.hasBreaks()?(this.normalize=Y(t.normalize,t),this.scale=Y(t.scale,t)):(this.normalize=gm,this.scale=ym)},r})();function gm(r,t){return t[1]===t[0]?.5:(r-t[0])/(t[1]-t[0])}function ym(r,t){return r*(t[1]-t[0])+t[0]}function lv(r,t,e){var a=Math.log(r);return[Math.log(e?t[0]:Math.max(0,t[0]))/a,Math.log(e?t[1]:Math.max(0,t[1]))/a]}var Ra=(function(){function r(t){this._calculator=new NP,this._setting=t||{},this._extent=[1/0,-1/0]}return r.prototype.getSetting=function(t){return this._setting[t]},r.prototype._innerUnionExtent=function(t){var e=this._extent;this._innerSetExtent(t[0]<e[0]?t[0]:e[0],t[1]>e[1]?t[1]:e[1])},r.prototype.unionExtentFromData=function(t,e){this._innerUnionExtent(t.getApproximateExtent(e))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(t,e){this._innerSetExtent(t,e)},r.prototype._innerSetExtent=function(t,e){var a=this._extent;isNaN(t)||(a[0]=t),isNaN(e)||(a[1]=e),this._brkCtx&&this._brkCtx.update(a)},r.prototype.setBreaksFromOption=function(t){},r.prototype._innerSetBreak=function(t){this._brkCtx&&(this._brkCtx.setBreaks(t),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(t){return this._extent[0]<=t&&this._extent[1]>=t},r.prototype.isBlank=function(){return this._isBlank},r.prototype.setBlank=function(t){this._isBlank=t},r})();Vu(Ra);var zP=0,uv=(function(){function r(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++zP,this._onCollect=t.onCollect}return r.createByAxisModel=function(t){var e=t.option,a=e.data,n=a&&U(a,VP);return new r({categories:n,needCollect:!n,deduplication:e.dedplication!==!1})},r.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},r.prototype.parseAndCollect=function(t){var e,a=this._needCollect;if(!X(t)&&!a)return t;if(a&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,this._onCollect&&this._onCollect(t,e),e;var n=this._getOrCreateMap();return e=n.get(t),e==null&&(a?(e=this.categories.length,this.categories[e]=t,n.set(t,e),this._onCollect&&this._onCollect(t,e)):e=NaN),e},r.prototype._getOrCreateMap=function(){return this._map||(this._map=nt(this.categories))},r})();function VP(r){return j(r)&&r.value!=null?r.value:r+""}var jd=(function(r){B(t,r);function t(e){var a=r.call(this,e)||this;a.type="ordinal";var n=a.getSetting("ordinalMeta");return n||(n=new uv({})),H(n)&&(n=new uv({categories:U(n,function(i){return j(i)?i.value:i})})),a._ordinalMeta=n,a._extent=a.getSetting("extent")||[0,n.categories.length-1],a}return t.prototype.parse=function(e){return e==null?NaN:X(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},t.prototype.contain=function(e){return Qd(e,this._extent)&&e>=0&&e<this._ordinalMeta.categories.length},t.prototype.normalize=function(e){return e=this._getTickNumber(e),this._calculator.normalize(e,this._extent)},t.prototype.scale=function(e){return e=Math.round(this._calculator.scale(e,this._extent)),this.getRawOrdinalNumber(e)},t.prototype.getTicks=function(){for(var e=[],a=this._extent,n=a[0];n<=a[1];)e.push({value:n}),n++;return e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(e==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var a=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Math.min(s,a.length);o<l;++o){var u=a[o];n[o]=u,i[u]=o}for(var f=0;o<s;++o){for(;i[f]!=null;)f++;n.push(f),i[f]=o}},t.prototype._getTickNumber=function(e){var a=this._ticksByOrdinalNumber;return a&&e>=0&&e<a.length?a[e]:e},t.prototype.getRawOrdinalNumber=function(e){var a=this._ordinalNumbersByTick;return a&&e>=0&&e<a.length?a[e]:e},t.prototype.getLabel=function(e){if(!this.isBlank()){var a=this.getRawOrdinalNumber(e.value),n=this._ordinalMeta.categories[a];return n==null?"":n+""}},t.prototype.count=function(){return this._extent[1]-this._extent[0]+1},t.prototype.isInExtentRange=function(e){return e=this._getTickNumber(e),this._extent[0]<=e&&this._extent[1]>=e},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t})(Ra);Ra.registerClass(jd);var ra=Xt,Aa=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalPrecision=2,e}return t.prototype.parse=function(e){return e==null||e===""?NaN:Number(e)},t.prototype.contain=function(e){return Qd(e,this._extent)},t.prototype.normalize=function(e){return this._calculator.normalize(e,this._extent)},t.prototype.scale=function(e){return this._calculator.scale(e,this._extent)},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(e){this._interval=e,this._niceExtent=this._extent.slice(),this._intervalPrecision=Qo(e)},t.prototype.getTicks=function(e){e=e||{};var a=this._interval,n=this._extent,i=this._niceExtent,o=this._intervalPrecision,s=au(),l=[];if(!a)return l;e.breakTicks;var u=1e4;n[0]<i[0]&&(e.expandToNicedExtent?l.push({value:ra(i[0]-a,o)}):l.push({value:n[0]}));for(var f=function(d,p){return Math.round((p-d)/a)},h=i[0];h<=i[1];){if(l.push({value:h}),h=ra(h+a,o),this._brkCtx){var v=this._brkCtx.calcNiceTickMultiple(h,f);v>=0&&(h=ra(h+v*a,o))}if(l.length>0&&h===l[l.length-1].value)break;if(l.length>u)return[]}var c=l.length?l[l.length-1].value:i[1];return n[1]>c&&(e.expandToNicedExtent?l.push({value:ra(c+a,o)}):l.push({value:n[1]})),e.breakTicks,l},t.prototype.getMinorTicks=function(e){for(var a=this.getTicks({expandToNicedExtent:!0}),n=[],i=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,f=[],h=s.value-l.value,v=h/e,c=Qo(v);u<e-1;){var d=ra(l.value+(u+1)*v,c);d>i[0]&&d<i[1]&&f.push(d),u++}var p=au();p&&p.pruneTicksByBreak("auto",f,this._getNonTransBreaks(),function(g){return g},this._interval,i),n.push(f)}}return n},t.prototype._getNonTransBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},t.prototype.getLabel=function(e,a){if(e==null)return"";var n=a&&a.precision;n==null?n=xr(e.value)||0:n==="auto"&&(n=this._intervalPrecision);var i=ra(e.value,n,!0);return Lb(i)},t.prototype.calcNiceTicks=function(e,a,n){e=e||5;var i=this._extent.slice(),o=this._getExtentSpanWithBreaks();if(isFinite(o)){o<0&&(o=-o,i.reverse(),this._innerSetExtent(i[0],i[1]),i=this._extent.slice());var s=OP(i,o,e,a,n);this._intervalPrecision=s.intervalPrecision,this._interval=s.interval,this._niceExtent=s.niceTickExtent}},t.prototype.calcNiceExtent=function(e){var a=this._extent.slice();if(a[0]===a[1])if(a[0]!==0){var n=Math.abs(a[0]);e.fixMax||(a[1]+=n/2),a[0]-=n/2}else a[1]=1;var i=a[1]-a[0];isFinite(i)||(a[0]=0,a[1]=1),this._innerSetExtent(a[0],a[1]),a=this._extent.slice(),this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval);var o=this._interval,s=this._intervalPrecision;e.fixMin||(a[0]=ra(Math.floor(a[0]/o)*o,s)),e.fixMax||(a[1]=ra(Math.ceil(a[1]/o)*o,s)),this._innerSetExtent(a[0],a[1])},t.prototype.setNiceExtent=function(e,a){this._niceExtent=[e,a]},t.type="interval",t})(Ra);Ra.registerClass(Aa);var Xx=typeof Float32Array<"u",FP=Xx?Float32Array:Array;function Fr(r){return H(r)?Xx?new Float32Array(r):r:new FP(r)}var GP="__ec_stack_";function $x(r){return r.get("stack")||GP+r.seriesIndex}function Jd(r){return r.dim+r.index}function Kx(r,t){var e=[];return t.eachSeriesByType(r,function(a){Qx(a)&&e.push(a)}),e}function HP(r){var t={};M(r,function(l){var u=l.coordinateSystem,f=u.getBaseAxis();if(!(f.type!=="time"&&f.type!=="value"))for(var h=l.getData(),v=f.dim+"_"+f.index,c=h.getDimensionIndex(h.mapDimension(f.dim)),d=h.getStore(),p=0,g=d.count();p<g;++p){var y=d.get(c,p);t[v]?t[v].push(y):t[v]=[y]}});var e={};for(var a in t)if(t.hasOwnProperty(a)){var n=t[a];if(n){n.sort(function(l,u){return l-u});for(var i=null,o=1;o<n.length;++o){var s=n[o]-n[o-1];s>0&&(i=i===null?s:Math.min(i,s))}e[a]=i}}return e}function qx(r){var t=HP(r),e=[];return M(r,function(a){var n=a.coordinateSystem,i=n.getBaseAxis(),o=i.getExtent(),s;if(i.type==="category")s=i.getBandWidth();else if(i.type==="value"||i.type==="time"){var l=i.dim+"_"+i.index,u=t[l],f=Math.abs(o[1]-o[0]),h=i.scale.getExtent(),v=Math.abs(h[1]-h[0]);s=u?f/v*u:f}else{var c=a.getData();s=Math.abs(o[1]-o[0])/c.count()}var d=K(a.get("barWidth"),s),p=K(a.get("barMaxWidth"),s),g=K(a.get("barMinWidth")||(jx(a)?.5:1),s),y=a.get("barGap"),m=a.get("barCategoryGap"),_=a.get("defaultBarGap");e.push({bandWidth:s,barWidth:d,barMaxWidth:p,barMinWidth:g,barGap:y,barCategoryGap:m,defaultBarGap:_,axisKey:Jd(i),stackId:$x(a)})}),WP(e)}function WP(r){var t={};M(r,function(a,n){var i=a.axisKey,o=a.bandWidth,s=t[i]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:a.defaultBarGap||0,stacks:{}},l=s.stacks;t[i]=s;var u=a.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var f=a.barWidth;f&&!l[u].width&&(l[u].width=f,f=Math.min(s.remainedWidth,f),s.remainedWidth-=f);var h=a.barMaxWidth;h&&(l[u].maxWidth=h);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 e={};return M(t,function(a,n){e[n]={};var i=a.stacks,o=a.bandWidth,s=a.categoryGap;if(s==null){var l=Pt(i).length;s=Math.max(35-l*4,15)+"%"}var u=K(s,o),f=K(a.gap,1),h=a.remainedWidth,v=a.autoWidthCount,c=(h-u)/(v+(v-1)*f);c=Math.max(c,0),M(i,function(y){var m=y.maxWidth,_=y.minWidth;if(y.width){var S=y.width;m&&(S=Math.min(S,m)),_&&(S=Math.max(S,_)),y.width=S,h-=S+f*S,v--}else{var S=c;m&&m<S&&(S=Math.min(m,h)),_&&_>S&&(S=_),S!==c&&(y.width=S,h-=S+f*S,v--)}}),c=(h-u)/(v+(v-1)*f),c=Math.max(c,0);var d=0,p;M(i,function(y,m){y.width||(y.width=c),p=y,d+=y.width*(1+f)}),p&&(d-=p.width*f);var g=-d/2;M(i,function(y,m){e[n][m]=e[n][m]||{bandWidth:o,offset:g,width:y.width},g+=y.width*(1+f)})}),e}function UP(r,t,e){if(r&&t){var a=r[Jd(t)];return a}}function YP(r,t){var e=Kx(r,t),a=qx(e);M(e,function(n){var i=n.getData(),o=n.coordinateSystem,s=o.getBaseAxis(),l=$x(n),u=a[Jd(s)][l],f=u.offset,h=u.width;i.setLayout({bandWidth:u.bandWidth,offset:f,size:h})})}function ZP(r){return{seriesType:r,plan:Hd(),reset:function(t){if(Qx(t)){var e=t.getData(),a=t.coordinateSystem,n=a.getBaseAxis(),i=a.getOtherAxis(n),o=e.getDimensionIndex(e.mapDimension(i.dim)),s=e.getDimensionIndex(e.mapDimension(n.dim)),l=t.get("showBackground",!0),u=e.mapDimension(i.dim),f=e.getCalculationInfo("stackResultDimension"),h=In(e,u)&&!!e.getCalculationInfo("stackedOnSeries"),v=i.isHorizontal(),c=XP(n,i),d=jx(t),p=t.get("barMinHeight")||0,g=f&&e.getDimensionIndex(f),y=e.getLayout("size"),m=e.getLayout("offset");return{progress:function(_,S){for(var x=_.count,b=d&&Fr(x*3),w=d&&l&&Fr(x*3),T=d&&Fr(x),D=a.master.getRect(),A=v?D.width:D.height,C,I=S.getStore(),L=0;(C=_.next())!=null;){var P=I.get(h?g:o,C),R=I.get(s,C),E=c,O=void 0;h&&(O=+P-I.get(o,C));var k=void 0,z=void 0,V=void 0,G=void 0;if(v){var W=a.dataToPoint([P,R]);if(h){var Z=a.dataToPoint([O,R]);E=Z[0]}k=E,z=W[1]+m,V=W[0]-E,G=y,Math.abs(V)<p&&(V=(V<0?-1:1)*p)}else{var W=a.dataToPoint([R,P]);if(h){var Z=a.dataToPoint([R,O]);E=Z[1]}k=W[0]+m,z=E,V=y,G=W[1]-E,Math.abs(G)<p&&(G=(G<=0?-1:1)*p)}d?(b[L]=k,b[L+1]=z,b[L+2]=v?V:G,w&&(w[L]=v?D.x:k,w[L+1]=v?z:D.y,w[L+2]=A),T[C]=C):S.setItemLayout(C,{x:k,y:z,width:V,height:G}),L+=3}d&&S.setLayout({largePoints:b,largeDataIndices:T,largeBackgroundPoints:w,valueAxisHorizontal:v})}}}}}}function Qx(r){return r.coordinateSystem&&r.coordinateSystem.type==="cartesian2d"}function jx(r){return r.pipelineContext&&r.pipelineContext.large}function XP(r,t){var e=t.model.get("startValue");return e||(e=0),t.toGlobalCoord(t.dataToCoord(t.type==="log"?e>0?e:1:e))}var $P=function(r,t,e,a){for(;e<a;){var n=e+a>>>1;r[n][1]<t?e=n+1:a=n}return e},Jx=(function(r){B(t,r);function t(e){var a=r.call(this,e)||this;return a.type="time",a}return t.prototype.getLabel=function(e){var a=this.getSetting("useUTC");return ju(e.value,ly[pL(Io(this._minLevelUnit))]||ly.second,a,this.getSetting("locale"))},t.prototype.getFormattedLabel=function(e,a,n){var i=this.getSetting("useUTC"),o=this.getSetting("locale");return gL(e,a,n,o,i)},t.prototype.getTicks=function(e){var a=this._interval,n=this._extent,i=[];if(!a)return i;var o=this.getSetting("useUTC"),s=nu(n[1],o);i.push({value:n[0],time:{level:0,upperTimeUnit:s,lowerTimeUnit:s}});var l=rR(this._minLevelUnit,this._approxInterval,o,n,this._getExtentSpanWithBreaks(),this._brkCtx);i=i.concat(l);var u=nu(n[1],o);i.push({value:n[1],time:{level:0,upperTimeUnit:u,lowerTimeUnit:u}}),this.getSetting("useUTC");var f=xn.length-1,h=0;return M(i,function(v){f=Math.min(f,dt(xn,v.time.upperTimeUnit)),h=Math.max(h,v.time.level)}),i},t.prototype.calcNiceExtent=function(e){var a=this.getExtent();if(a[0]===a[1]&&(a[0]-=Ve,a[1]+=Ve),a[1]===-1/0&&a[0]===1/0){var n=new Date;a[1]=+new Date(n.getFullYear(),n.getMonth(),n.getDate()),a[0]=a[1]-Ve}this._innerSetExtent(a[0],a[1]),this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval)},t.prototype.calcNiceTicks=function(e,a,n){e=e||10;var i=this._getExtentSpanWithBreaks();this._approxInterval=i/e,a!=null&&this._approxInterval<a&&(this._approxInterval=a),n!=null&&this._approxInterval>n&&(this._approxInterval=n);var o=al.length,s=Math.min($P(al,this._approxInterval,0,o),o-1);this._interval=al[s][1],this._intervalPrecision=Qo(this._interval),this._minLevelUnit=al[Math.max(s-1,0)][0]},t.prototype.parse=function(e){return bt(e)?e:+Pi(e)},t.prototype.contain=function(e){return Qd(e,this._extent)},t.prototype.normalize=function(e){return this._calculator.normalize(e,this._extent)},t.prototype.scale=function(e){return this._calculator.scale(e,this._extent)},t.type="time",t})(Aa),al=[["second",Td],["minute",Cd],["hour",Lo],["quarter-day",Lo*6],["half-day",Lo*12],["day",Ve*1.2],["half-week",Ve*3.5],["week",Ve*7],["month",Ve*31],["quarter",Ve*95],["half-year",sy/2],["year",sy]];function KP(r,t,e,a){return Wc(new Date(t),r,a).getTime()===Wc(new Date(e),r,a).getTime()}function qP(r,t){return r/=Ve,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function QP(r){var t=30*Ve;return r/=t,r>6?6:r>3?3:r>2?2:1}function jP(r){return r/=Lo,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function mm(r,t){return r/=t?Cd:Td,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function JP(r){return AS(r)}function tR(r,t,e){var a=Math.max(0,dt(xn,t)-1);return Wc(new Date(r),xn[a],e).getTime()}function eR(r,t){var e=new Date(0);e[r](1);var a=e.getTime();e[r](1+t);var n=e.getTime()-a;return function(i,o){return Math.max(0,Math.round((o-i)/n))}}function rR(r,t,e,a,n,i){var o=1e4,s=hL,l=0;function u(L,P,R,E,O,k,z){for(var V=eR(O,L),G=P,W=new Date(G);G<R&&G<=a[1]&&(z.push({value:G}),!(l++>o));)if(W[O](W[E]()+L),G=W.getTime(),i){var Z=i.calcNiceTickMultiple(G,V);Z>0&&(W[O](W[E]()+Z*L),G=W.getTime())}z.push({value:G,notAdd:!0})}function f(L,P,R){var E=[],O=!P.length;if(!KP(Io(L),a[0],a[1],e)){O&&(P=[{value:tR(a[0],L,e)},{value:a[1]}]);for(var k=0;k<P.length-1;k++){var z=P[k].value,V=P[k+1].value;if(z!==V){var G=void 0,W=void 0,Z=void 0,rt=!1;switch(L){case"year":G=Math.max(1,Math.round(t/Ve/365)),W=xb(e),Z=yL(e);break;case"half-year":case"quarter":case"month":G=QP(t),W=Md(e),Z=wb(e);break;case"week":case"half-week":case"day":G=qP(t),W=Ad(e),Z=Tb(e),rt=!0;break;case"half-day":case"quarter-day":case"hour":G=jP(t),W=Dd(e),Z=Cb(e);break;case"minute":G=mm(t,!0),W=Ld(e),Z=Mb(e);break;case"second":G=mm(t,!1),W=Id(e),Z=Ab(e);break;case"millisecond":G=JP(t),W=Pd(e),Z=Db(e);break}V>=a[0]&&z<=a[1]&&u(G,z,V,W,Z,rt,E),L==="year"&&R.length>1&&k===0&&R.unshift({value:R[0].value-G})}}for(var k=0;k<E.length;k++)R.push(E[k])}}for(var h=[],v=[],c=0,d=0,p=0;p<s.length;++p){var g=Io(s[p]);if(dL(s[p])){f(s[p],h[h.length-1]||[],v);var y=s[p+1]?Io(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 S=v[_].value;(_===0||v[_-1].value!==S)&&(m.push(v[_]),S>=a[0]&&S<=a[1]&&c++)}var x=n/t;if(c>x*1.5&&d>x/1.5||(h.push(m),c>x||r===s[p]))break}v=[]}}}for(var b=kt(U(h,function(L){return kt(L,function(P){return P.value>=a[0]&&P.value<=a[1]&&!P.notAdd})}),function(L){return L.length>0}),w=[],T=b.length-1,p=0;p<b.length;++p)for(var D=b[p],A=0;A<D.length;++A){var C=nu(D[A].value,e);w.push({value:D[A].value,time:{level:T-p,upperTimeUnit:C,lowerTimeUnit:C}})}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}Ra.registerClass(Jx);var fv=Xt,aR=Math.floor,nR=Math.ceil,nl=Math.pow,il=Math.log,t1=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="log",e.base=10,e._originalScale=new Aa,e}return t.prototype.getTicks=function(e){e=e||{};var a=this._extent.slice(),n=this._originalScale.getExtent(),i=r.prototype.getTicks.call(this,e),o=this.base;return this._originalScale._innerGetBreaks(),U(i,function(s){var l=s.value,u=null,f=nl(o,l);l===a[0]&&this._fixMin?u=n[0]:l===a[1]&&this._fixMax&&(u=n[1]);var h;return u!=null&&(f=xh(f,u)),{value:f,break:h}},this)},t.prototype._getNonTransBreaks=function(){return this._originalScale._innerGetBreaks()},t.prototype.setExtent=function(e,a){this._originalScale.setExtent(e,a);var n=lv(this.base,[e,a]);r.prototype.setExtent.call(this,n[0],n[1])},t.prototype.getExtent=function(){var e=this.base,a=r.prototype.getExtent.call(this);a[0]=nl(e,a[0]),a[1]=nl(e,a[1]);var n=this._originalScale.getExtent();return this._fixMin&&(a[0]=xh(a[0],n[0])),this._fixMax&&(a[1]=xh(a[1],n[1])),a},t.prototype.unionExtentFromData=function(e,a){this._originalScale.unionExtentFromData(e,a);var n=lv(this.base,e.getApproximateExtent(a),!0);this._innerUnionExtent(n)},t.prototype.calcNiceTicks=function(e){e=e||10;var a=this._extent.slice(),n=this._getExtentSpanWithBreaks();if(!(!isFinite(n)||n<=0)){var i=bM(n),o=e/n*i;for(o<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var s=[fv(nR(a[0]/i)*i),fv(aR(a[1]/i)*i)];this._interval=i,this._intervalPrecision=Qo(i),this._niceExtent=s}},t.prototype.calcNiceExtent=function(e){r.prototype.calcNiceExtent.call(this,e),this._fixMin=e.fixMin,this._fixMax=e.fixMax},t.prototype.contain=function(e){return e=il(e)/il(this.base),r.prototype.contain.call(this,e)},t.prototype.normalize=function(e){return e=il(e)/il(this.base),r.prototype.normalize.call(this,e)},t.prototype.scale=function(e){return e=r.prototype.scale.call(this,e),nl(this.base,e)},t.prototype.setBreaksFromOption=function(e){},t.type="log",t})(Aa);function xh(r,t){return fv(r,xr(t))}Ra.registerClass(t1);var iR=(function(){function r(t,e,a){this._prepareParams(t,e,a)}return r.prototype._prepareParams=function(t,e,a){a[1]<a[0]&&(a=[NaN,NaN]),this._dataMin=a[0],this._dataMax=a[1];var n=this._isOrdinal=t.type==="ordinal";this._needCrossZero=t.type==="interval"&&e.getNeedCrossZero&&e.getNeedCrossZero();var i=e.get("min",!0);i==null&&(i=e.get("startValue",!0));var o=this._modelMinRaw=i;Q(o)?this._modelMinNum=ol(t,o({min:a[0],max:a[1]})):o!=="dataMin"&&(this._modelMinNum=ol(t,o));var s=this._modelMaxRaw=e.get("max",!0);if(Q(s)?this._modelMaxNum=ol(t,s({min:a[0],max:a[1]})):s!=="dataMax"&&(this._modelMaxNum=ol(t,s)),n)this._axisDataLen=e.getCategories().length;else{var l=e.get("boundaryGap"),u=H(l)?l:[l||0,l||0];typeof u[0]=="boolean"||typeof u[1]=="boolean"?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[Ar(u[0],1),Ar(u[1],1)]}},r.prototype.calculate=function(){var t=this._isOrdinal,e=this._dataMin,a=this._dataMax,n=this._axisDataLen,i=this._boundaryGapInner,o=t?null:a-e||Math.abs(e),s=this._modelMinRaw==="dataMin"?e:this._modelMinNum,l=this._modelMaxRaw==="dataMax"?a:this._modelMaxNum,u=s!=null,f=l!=null;s==null&&(s=t?n?0:NaN:e-i[0]*o),l==null&&(l=t?n?n-1:NaN:a+i[1]*o),(s==null||!isFinite(s))&&(s=NaN),(l==null||!isFinite(l))&&(l=NaN);var h=Hr(s)||Hr(l)||t&&!n;this._needCrossZero&&(s>0&&l>0&&!u&&(s=0),s<0&&l<0&&!f&&(l=0));var v=this._determinedMin,c=this._determinedMax;return v!=null&&(s=v,u=!0),c!=null&&(l=c,f=!0),{min:s,max:l,minFixed:u,maxFixed:f,isBlank:h}},r.prototype.modifyDataMinMax=function(t,e){this[sR[t]]=e},r.prototype.setDeterminedMinMax=function(t,e){var a=oR[t];this[a]=e},r.prototype.freeze=function(){this.frozen=!0},r})(),oR={min:"_determinedMin",max:"_determinedMax"},sR={min:"_dataMin",max:"_dataMax"};function e1(r,t,e){var a=r.rawExtentInfo;return a||(a=new iR(r,t,e),r.rawExtentInfo=a,a)}function ol(r,t){return t==null?null:Hr(t)?NaN:r.parse(t)}function r1(r,t){var e=r.type,a=e1(r,t,r.getExtent()).calculate();r.setBlank(a.isBlank);var n=a.min,i=a.max,o=t.ecModel;if(o&&e==="time"){var s=Kx("bar",o),l=!1;if(M(s,function(h){l=l||h.getBaseAxis()===t.axis}),l){var u=qx(s),f=lR(n,i,t,u);n=f.min,i=f.max}}return{extent:[n,i],fixMin:a.minFixed,fixMax:a.maxFixed}}function lR(r,t,e,a){var n=e.axis.getExtent(),i=Math.abs(n[1]-n[0]),o=UP(a,e.axis);if(o===void 0)return{min:r,max:t};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,f=t-r,h=1-(s+l)/i,v=f/h-f;return t+=v*(l/u),r-=v*(s/u),{min:r,max:t}}function hv(r,t){var e=t,a=r1(r,e),n=a.extent,i=e.get("splitNumber");r instanceof t1&&(r.base=e.get("logBase"));var o=r.type,s=e.get("interval"),l=o==="interval"||o==="time";r.setBreaksFromOption(o1(e)),r.setExtent(n[0],n[1]),r.calcNiceExtent({splitNumber:i,fixMin:a.fixMin,fixMax:a.fixMax,minInterval:l?e.get("minInterval"):null,maxInterval:l?e.get("maxInterval"):null}),s!=null&&r.setInterval&&r.setInterval(s)}function a1(r,t){if(t=t||r.get("type"),t)switch(t){case"category":return new jd({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:[1/0,-1/0]});case"time":return new Jx({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new(Ra.getClass(t)||Aa)}}function uR(r){var t=r.scale.getExtent(),e=t[0],a=t[1];return!(e>0&&a>0||e<0&&a<0)}function Ni(r){var t=r.getLabelModel().get("formatter");if(r.type==="time"){var e=cL(t);return function(n,i){return r.scale.getFormattedLabel(n,i,e)}}else{if(X(t))return function(n){var i=r.scale.getLabel(n),o=t.replace("{value}",i??"");return o};if(Q(t)){if(r.type==="category")return function(n,i){return t(du(r,n),n.value-r.scale.getExtent()[0],null)};var a=au();return function(n,i){var o=null;return a&&(o=a.makeAxisLabelFormatterParamBreak(o,n.break)),t(du(r,n),i,o)}}else return function(n){return r.scale.getLabel(n)}}}function du(r,t){return r.type==="category"?r.scale.getLabel(t):t.value}function tp(r){var t=r.get("interval");return t??"auto"}function n1(r){return r.type==="category"&&tp(r.getLabelModel())===0}function i1(r,t){var e={};return M(r.mapDimensionsAll(t),function(a){e[Zx(r,a)]=!0}),Pt(e)}function fR(r,t,e){t&&M(i1(t,e),function(a){var n=t.getApproximateExtent(a);n[0]<r[0]&&(r[0]=n[0]),n[1]>r[1]&&(r[1]=n[1])})}function Ti(r){return r==="middle"||r==="center"}function jo(r){return r.getShallow("show")}function o1(r){var t=r.get("breaks",!0);t==null}var ep=(function(){function r(){}return r.prototype.getNeedCrossZero=function(){var t=this.option;return!t.scale},r.prototype.getCoordSysModel=function(){},r})(),_m=[],hR={registerPreprocessor:zx,registerProcessor:Vx,registerPostInit:lP,registerPostUpdate:uP,registerUpdateLifecycle:$d,registerAction:Lr,registerCoordinateSystem:fP,registerLayout:hP,registerVisual:On,registerTransform:vP,registerLoading:Fx,registerMap:cP,registerImpl:H2,PRIORITY:eP,ComponentModel:mt,ComponentView:$t,SeriesModel:Ut,ChartView:Vt,registerComponentModel:function(r){mt.registerClass(r)},registerComponentView:function(r){$t.registerClass(r)},registerSeriesModel:function(r){Ut.registerClass(r)},registerChartView:function(r){Vt.registerClass(r)},registerCustomSeries:function(r,t){},registerSubTypeDefaulter:function(r,t){mt.registerSubTypeDefaulter(r,t)},registerPainter:function(r,t){dM(r,t)}};function ue(r){if(H(r)){M(r,function(t){ue(t)});return}dt(_m,r)>=0||(_m.push(r),Q(r)&&(r={install:r}),r.install(hR))}var cR=wt(),Eo=wt(),lr={estimate:1,determine:2};function pu(r){return{out:{noPxChangeTryDetermine:[]},kind:r}}function s1(r,t){var e=U(t,function(a){return r.scale.parse(a)});return r.type==="time"&&e.length>0&&(e.sort(),e.unshift(e[0]),e.push(e[e.length-1])),e}function vR(r,t){var e=r.getLabelModel().get("customValues");if(e){var a=Ni(r),n=r.scale.getExtent(),i=s1(r,e),o=kt(i,function(s){return s>=n[0]&&s<=n[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"?pR(r,t):yR(r)}function dR(r,t,e){var a=r.getTickModel().get("customValues");if(a){var n=r.scale.getExtent(),i=s1(r,a);return{ticks:kt(i,function(o){return o>=n[0]&&o<=n[1]})}}return r.type==="category"?gR(r,t):{ticks:U(r.scale.getTicks(e),function(o){return o.value})}}function pR(r,t){var e=r.getLabelModel(),a=l1(r,e,t);return!e.get("show")||r.scale.isBlank()?{labels:[]}:a}function l1(r,t,e){var a=_R(r),n=tp(t),i=e.kind===lr.estimate;if(!i){var o=f1(a,n);if(o)return o}var s,l;Q(n)?s=v1(r,n):(l=n==="auto"?SR(r,e):n,s=c1(r,l));var u={labels:s,labelCategoryInterval:l};return i?e.out.noPxChangeTryDetermine.push(function(){return cv(a,n,u),!0}):cv(a,n,u),u}function gR(r,t){var e=mR(r),a=tp(t),n=f1(e,a);if(n)return n;var i,o;if((!t.get("show")||r.scale.isBlank())&&(i=[]),Q(a))i=v1(r,a,!0);else if(a==="auto"){var s=l1(r,r.getLabelModel(),pu(lr.determine));o=s.labelCategoryInterval,i=U(s.labels,function(l){return l.tickValue})}else o=a,i=c1(r,o,!0);return cv(e,a,{ticks:i,tickCategoryInterval:o})}function yR(r){var t=r.scale.getTicks(),e=Ni(r);return{labels:U(t,function(a,n){return{formattedLabel:e(a,n),rawLabel:r.scale.getLabel(a),tickValue:a.value,time:a.time,break:a.break}})}}var mR=u1("axisTick"),_R=u1("axisLabel");function u1(r){return function(e){return Eo(e)[r]||(Eo(e)[r]={list:[]})}}function f1(r,t){for(var e=0;e<r.list.length;e++)if(r.list[e].key===t)return r.list[e].value}function cv(r,t,e){return r.list.push({key:t,value:e}),e}function SR(r,t){if(t.kind===lr.estimate){var e=r.calculateCategoryInterval(t);return t.out.noPxChangeTryDetermine.push(function(){return Eo(r).autoInterval=e,!0}),e}var a=Eo(r).autoInterval;return a??(Eo(r).autoInterval=r.calculateCategoryInterval(t))}function bR(r,t){var e=t.kind,a=wR(r),n=Ni(r),i=(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,f=40;l>f&&(u=Math.max(1,Math.floor(l/f)));for(var h=s[0],v=r.dataToCoord(h+1)-r.dataToCoord(h),c=Math.abs(v*Math.cos(i)),d=Math.abs(v*Math.sin(i)),p=0,g=0;h<=s[1];h+=u){var y=0,m=0,_=ed(n({value:h}),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 S=p/c,x=g/d;isNaN(S)&&(S=1/0),isNaN(x)&&(x=1/0);var b=Math.max(0,Math.floor(Math.min(S,x)));if(e===lr.estimate)return t.out.noPxChangeTryDetermine.push(Y(xR,null,r,b,l)),b;var w=h1(r,b,l);return w??b}function xR(r,t,e){return h1(r,t,e)==null}function h1(r,t,e){var a=cR(r.model),n=r.getExtent(),i=a.lastAutoInterval,o=a.lastTickCount;if(i!=null&&o!=null&&Math.abs(i-t)<=1&&Math.abs(o-e)<=1&&i>t&&a.axisExtent0===n[0]&&a.axisExtent1===n[1])return i;a.lastTickCount=e,a.lastAutoInterval=t,a.axisExtent0=n[0],a.axisExtent1=n[1]}function wR(r){var t=r.getLabelModel();return{axisRotate:r.getRotate?r.getRotate():r.isHorizontal&&!r.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}function c1(r,t,e){var a=Ni(r),n=r.scale,i=n.getExtent(),o=r.getLabelModel(),s=[],l=Math.max((t||0)+1,1),u=i[0],f=n.count();u!==0&&l>1&&f/l>2&&(u=Math.round(Math.ceil(u/l)*l));var h=n1(r),v=o.get("showMinLabel")||h,c=o.get("showMaxLabel")||h;v&&u!==i[0]&&p(i[0]);for(var d=u;d<=i[1];d+=l)p(d);c&&d-l!==i[1]&&p(i[1]);function p(g){var y={value:g};s.push(e?g:{formattedLabel:a(y),rawLabel:n.getLabel(y),tickValue:g,time:void 0,break:void 0})}return s}function v1(r,t,e){var a=r.scale,n=Ni(r),i=[];return M(a.getTicks(),function(o){var s=a.getLabel(o),l=o.value;t(o.value,s)&&i.push(e?l:{formattedLabel:n(o),rawLabel:s,tickValue:l,time:void 0,break:void 0})}),i}var Sm=[0,1],rp=(function(){function r(t,e,a){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=a||[0,0]}return r.prototype.contain=function(t){var e=this._extent,a=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]);return t>=a&&t<=n},r.prototype.containData=function(t){return this.scale.contain(this.scale.parse(t))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.getPixelPrecision=function(t){return CS(t||this.scale.getExtent(),this._extent)},r.prototype.setExtent=function(t,e){var a=this._extent;a[0]=t,a[1]=e},r.prototype.dataToCoord=function(t,e){var a=this._extent,n=this.scale;return t=n.normalize(n.parse(t)),this.onBand&&n.type==="ordinal"&&(a=a.slice(),bm(a,n.count())),St(t,Sm,a,e)},r.prototype.coordToData=function(t,e){var a=this._extent,n=this.scale;this.onBand&&n.type==="ordinal"&&(a=a.slice(),bm(a,n.count()));var i=St(t,a,Sm,e);return this.scale.scale(i)},r.prototype.pointToData=function(t,e){},r.prototype.getTicksCoords=function(t){t=t||{};var e=t.tickModel||this.getTickModel(),a=dR(this,e,{breakTicks:t.breakTicks,pruneByBreak:t.pruneByBreak}),n=a.ticks,i=U(n,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=e.get("alignWithLabel");return TR(this,i,o,t.clamp),i},r.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var t=this.model.getModel("minorTick"),e=t.get("splitNumber");e>0&&e<100||(e=5);var a=this.scale.getMinorTicks(e),n=U(a,function(i){return U(i,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return n},r.prototype.getViewLabels=function(t){return t=t||pu(lr.determine),vR(this,t).labels},r.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},r.prototype.getTickModel=function(){return this.model.getModel("axisTick")},r.prototype.getBandWidth=function(){var t=this._extent,e=this.scale.getExtent(),a=e[1]-e[0]+(this.onBand?1:0);a===0&&(a=1);var n=Math.abs(t[1]-t[0]);return Math.abs(n)/a},r.prototype.calculateCategoryInterval=function(t){return t=t||pu(lr.determine),bR(this,t)},r})();function bm(r,t){var e=r[1]-r[0],a=t,n=e/a/2;r[0]+=n,r[1]-=n}function TR(r,t,e,a){var n=t.length;if(!r.onBand||e||!n)return;var i=r.getExtent(),o,s;if(n===1)t[0].coord=i[0],t[0].onBand=!0,o=t[1]={coord:i[1],tickValue:t[0].tickValue,onBand:!0};else{var l=t[n-1].tickValue-t[0].tickValue,u=(t[n-1].coord-t[0].coord)/l;M(t,function(c){c.coord-=u/2,c.onBand=!0});var f=r.scale.getExtent();s=1+f[1]-t[n-1].tickValue,o={coord:t[n-1].coord+u*s,tickValue:f[1]+1,onBand:!0},t.push(o)}var h=i[0]>i[1];v(t[0].coord,i[0])&&(a?t[0].coord=i[0]:t.shift()),a&&v(i[0],t[0].coord)&&t.unshift({coord:i[0],onBand:!0}),v(i[1],o.coord)&&(a?o.coord=i[1]:t.pop()),a&&v(o.coord,i[1])&&t.push({coord:i[1],onBand:!0});function v(c,d){return c=Xt(c),d=Xt(d),h?c>d:c<d}}function d1(r,t,e,a,n,i,o,s){var l=n-r,u=i-t,f=e-r,h=a-t,v=Math.sqrt(f*f+h*h);f/=v,h/=v;var c=l*f+u*h,d=c/v;d*=v;var p=o[0]=r+d*f,g=o[1]=t+d*h;return Math.sqrt((p-n)*(p-n)+(g-i)*(g-i))}var va=new ht,Nt=new ht,Jt=new ht,da=new ht,_r=new ht,gu=[],ve=new ht;function CR(r,t){if(t<=180&&t>0){t=t/180*Math.PI,va.fromArray(r[0]),Nt.fromArray(r[1]),Jt.fromArray(r[2]),ht.sub(da,va,Nt),ht.sub(_r,Jt,Nt);var e=da.len(),a=_r.len();if(!(e<.001||a<.001)){da.scale(1/e),_r.scale(1/a);var n=da.dot(_r),i=Math.cos(t);if(i<n){var o=d1(Nt.x,Nt.y,Jt.x,Jt.y,va.x,va.y,gu);ve.fromArray(gu),ve.scaleAndAdd(_r,o/Math.tan(Math.PI-t));var s=Jt.x!==Nt.x?(ve.x-Nt.x)/(Jt.x-Nt.x):(ve.y-Nt.y)/(Jt.y-Nt.y);if(isNaN(s))return;s<0?ht.copy(ve,Nt):s>1&&ht.copy(ve,Jt),ve.toArray(r[1])}}}}function MR(r,t,e){if(e<=180&&e>0){e=e/180*Math.PI,va.fromArray(r[0]),Nt.fromArray(r[1]),Jt.fromArray(r[2]),ht.sub(da,Nt,va),ht.sub(_r,Jt,Nt);var a=da.len(),n=_r.len();if(!(a<.001||n<.001)){da.scale(1/a),_r.scale(1/n);var i=da.dot(t),o=Math.cos(e);if(i<o){var s=d1(Nt.x,Nt.y,Jt.x,Jt.y,va.x,va.y,gu);ve.fromArray(gu);var l=Math.PI/2,u=Math.acos(_r.dot(t)),f=l+u-e;if(f>=l)ht.copy(ve,Jt);else{ve.scaleAndAdd(_r,s/Math.tan(Math.PI/2-f));var h=Jt.x!==Nt.x?(ve.x-Nt.x)/(Jt.x-Nt.x):(ve.y-Nt.y)/(Jt.y-Nt.y);if(isNaN(h))return;h<0?ht.copy(ve,Nt):h>1&&ht.copy(ve,Jt)}ve.toArray(r[1])}}}}function wh(r,t,e,a){var n=e==="normal",i=n?r:r.ensureState(e);i.ignore=t;var o=a.get("smooth");o&&o===!0&&(o=.3),i.shape=i.shape||{},o>0&&(i.shape.smooth=o);var s=a.getModel("lineStyle").getLineStyle();n?r.useStyle(s):i.style=s}function AR(r,t){var e=t.smooth,a=t.points;if(a)if(r.moveTo(a[0][0],a[0][1]),e>0&&a.length>=3){var n=sc(a[0],a[1]),i=sc(a[1],a[2]);if(!n||!i){r.lineTo(a[1][0],a[1][1]),r.lineTo(a[2][0],a[2][1]);return}var o=Math.min(n,i)*e,s=pf([],a[1],a[0],o/n),l=pf([],a[1],a[2],o/i),u=pf([],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 f=1;f<a.length;f++)r.lineTo(a[f][0],a[f][1])}function p1(r,t,e){var a=r.getTextGuideLine(),n=r.getTextContent();if(!n){a&&r.removeTextGuideLine();return}for(var i=t.normal,o=i.get("show"),s=n.ignore,l=0;l<Ho.length;l++){var u=Ho[l],f=t[u],h=u==="normal";if(f){var v=f.get("show"),c=h?s:et(n.states[u]&&n.states[u].ignore,s);if(c||!et(v,o)){var d=h?a:a&&a.states[u];d&&(d.ignore=!0),a&&wh(a,!0,u,f);continue}a||(a=new ur,r.setTextGuideLine(a),!h&&(s||!o)&&wh(a,!0,"normal",t.normal),r.stateProxy&&(a.stateProxy=r.stateProxy)),wh(a,!1,u,f)}}if(a){gt(a.style,e),a.style.fill=null;var p=i.get("showAbove"),g=r.textGuideLineConfig=r.textGuideLineConfig||{};g.showAbove=p||!1,a.buildPath=AR}}function g1(r,t){t=t||"labelLine";for(var e={normal:r.getModel(t)},a=0;a<ye.length;a++){var n=ye[a];e[n]=r.getModel([n,t])}return e}var xm=["label","labelLine","layoutOption","priority","defaultAttr","marginForce","minMarginForce","marginDefault","suggestIgnore"],DR=1,yu=2,y1=DR|yu;function mu(r,t,e){e=e||y1,t?r.dirty|=e:r.dirty&=~e}function m1(r,t){return t=t||y1,r.dirty==null||!!(r.dirty&t)}function Da(r){if(r)return m1(r)&&_1(r,r.label,r),r}function _1(r,t,e){var a=t.getComputedTransform();r.transform=_d(r.transform,a);var n=r.localRect=Yo(r.localRect,t.getBoundingRect()),i=t.style,o=i.margin,s=e&&e.marginForce,l=e&&e.minMarginForce,u=e&&e.marginDefault,f=i.__marginType;f==null&&u&&(o=u,f=fi.textMargin);for(var h=0;h<4;h++)Th[h]=f===fi.minMargin&&l&&l[h]!=null?l[h]:s&&s[h]!=null?s[h]:o?o[h]:0;f===fi.textMargin&&eu(n,Th,!1,!1);var v=r.rect=Yo(r.rect,n);return a&&v.applyTransform(a),f===fi.minMargin&&eu(v,Th,!1,!1),r.axisAligned=md(a),(r.label=r.label||{}).ignore=t.ignore,mu(r,!1),mu(r,!0,yu),r}var Th=[0,0,0,0];function LR(r,t,e){return r.transform=_d(r.transform,e),r.localRect=Yo(r.localRect,t),r.rect=Yo(r.rect,t),e&&r.rect.applyTransform(e),r.axisAligned=md(e),r.obb=void 0,(r.label=r.label||{}).ignore=!1,r}function IR(r,t){if(r){r.label.x+=t.x,r.label.y+=t.y,r.label.markRedraw();var e=r.transform;e&&(e[4]+=t.x,e[5]+=t.y);var a=r.rect;a&&(a.x+=t.x,a.y+=t.y);var n=r.obb;n&&n.fromBoundingRect(r.localRect,e)}}function wm(r,t){for(var e=0;e<xm.length;e++){var a=xm[e];r[a]==null&&(r[a]=t[a])}return Da(r)}function Tm(r){var t=r.obb;return(!t||m1(r,yu))&&(r.obb=t=t||new lb,t.fromBoundingRect(r.localRect,r.transform),mu(r,!1,yu)),t}function PR(r,t,e,a,n){var i=r.length,o=ua[t],s=bi[t];if(i<2)return!1;r.sort(function(w,T){return w.rect[o]-T.rect[o]});for(var l=0,u,f=!1,h=0;h<i;h++){var v=r[h],c=v.rect;u=c[o]-l,u<0&&(c[o]-=u,v.label[o]-=u,f=!0),l=c[o]+c[s]}var d=r[0],p=r[i-1],g,y;m(),g<0&&x(-g,.8),y<0&&x(y,.8),m(),_(g,y,1),_(y,g,-1),m(),g<0&&b(-g),y<0&&b(y);function m(){g=d.rect[o]-e,y=a-p.rect[o]-p.rect[s]}function _(w,T,D){if(w<0){var A=Math.min(T,-w);if(A>0){S(A*D,0,i);var C=A+w;C<0&&x(-C*D,1)}else x(-w*D,1)}}function S(w,T,D){w!==0&&(f=!0);for(var A=T;A<D;A++){var C=r[A],I=C.rect;I[o]+=w,C.label[o]+=w}}function x(w,T){for(var D=[],A=0,C=1;C<i;C++){var I=r[C-1].rect,L=Math.max(r[C].rect[o]-I[o]-I[s],0);D.push(L),A+=L}if(A){var P=Math.min(Math.abs(w)/A,T);if(w>0)for(var C=0;C<i-1;C++){var R=D[C]*P;S(R,0,C+1)}else for(var C=i-1;C>0;C--){var R=D[C-1]*P;S(-R,C,i)}}}function b(w){var T=w<0?-1:1;w=Math.abs(w);for(var D=Math.ceil(w/(i-1)),A=0;A<i-1;A++)if(T>0?S(D,0,A+1):S(-D,i-A-1,i),w-=D,w<=0)return}return f}function RR(r){var t=[];r.sort(function(u,f){return(f.suggestIgnore?1:0)-(u.suggestIgnore?1:0)||f.priority-u.priority});function e(u){if(!u.ignore){var f=u.ensureState("emphasis");f.ignore==null&&(f.ignore=!1)}u.ignore=!0}for(var a=0;a<r.length;a++){var n=Da(r[a]);if(!n.label.ignore){for(var i=n.label,o=n.labelLine,s=!1,l=0;l<t.length;l++)if(ap(n,t[l],null,{touchThreshold:.05})){s=!0;break}s?(e(i),o&&e(o)):t.push(n)}}}function ap(r,t,e,a){return!r||!t||r.label&&r.label.ignore||t.label&&t.label.ignore||!r.rect.intersect(t.rect,e,a)?!1:r.axisAligned&&t.axisAligned?!0:Tm(r).intersect(Tm(t),e,a)}function Cm(r,t,e){var a=ir.createCanvas(),n=t.getWidth(),i=t.getHeight(),o=a.style;return o&&(o.position="absolute",o.left="0",o.top="0",o.width=n+"px",o.height=i+"px",a.setAttribute("data-zr-dom-id",r)),a.width=n*e,a.height=i*e,a}var Ch=(function(r){B(t,r);function t(e,a,n){var i=r.call(this)||this;i.motionBlur=!1,i.lastFrameAlpha=.7,i.dpr=1,i.virtual=!1,i.config={},i.incremental=!1,i.zlevel=0,i.maxRepaintRectCount=5,i.__dirty=!0,i.__firstTimePaint=!0,i.__used=!1,i.__drawIndex=0,i.__startIndex=0,i.__endIndex=0,i.__prevStartIndex=null,i.__prevEndIndex=null;var o;n=n||$l,typeof e=="string"?o=Cm(e,a,n):j(e)&&(o=e,e=o.id),i.id=e,i.dom=o;var s=o.style;return s&&(eS(o),o.onselectstart=function(){return!1},s.padding="0",s.margin="0",s.borderWidth="0"),i.painter=a,i.dpr=n,i}return t.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},t.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},t.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},t.prototype.setUnpainted=function(){this.__firstTimePaint=!0},t.prototype.createBackBuffer=function(){var e=this.dpr;this.domBack=Cm("back-"+this.id,this.painter,e),this.ctxBack=this.domBack.getContext("2d"),e!==1&&this.ctxBack.scale(e,e)},t.prototype.createRepaintRects=function(e,a,n,i){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var o=[],s=this.maxRepaintRectCount,l=!1,u=new ot(0,0,0,0);function f(m){if(!(!m.isFinite()||m.isZero()))if(o.length===0){var _=new ot(0,0,0,0);_.copy(m),o.push(_)}else{for(var S=!1,x=1/0,b=0,w=0;w<o.length;++w){var T=o[w];if(T.intersect(m)){var D=new ot(0,0,0,0);D.copy(T),D.union(m),o[w]=D,S=!0;break}else if(l){u.copy(m),u.union(T);var A=m.width*m.height,C=T.width*T.height,I=u.width*u.height,L=I-A-C;L<x&&(x=L,b=w)}}if(l&&(o[b].union(m),S=!0),!S){var _=new ot(0,0,0,0);_.copy(m),o.push(_)}l||(l=o.length>=s)}}for(var h=this.__startIndex;h<this.__endIndex;++h){var v=e[h];if(v){var c=v.shouldBePainted(n,i,!0,!0),d=v.__isRendered&&(v.__dirty&Me||!c)?v.getPrevPaintRect():null;d&&f(d);var p=c&&(v.__dirty&Me||!v.__isRendered)?v.getPaintRect():null;p&&f(p)}}for(var h=this.__prevStartIndex;h<this.__prevEndIndex;++h){var v=a[h],c=v&&v.shouldBePainted(n,i,!0,!0);if(v&&(!c||!v.__zr)&&v.__isRendered){var d=v.getPrevPaintRect();d&&f(d)}}var g;do{g=!1;for(var h=0;h<o.length;){if(o[h].isZero()){o.splice(h,1);continue}for(var y=h+1;y<o.length;)o[h].intersect(o[y])?(g=!0,o[h].union(o[y]),o.splice(y,1)):y++;h++}}while(g);return this._paintRects=o,o},t.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},t.prototype.resize=function(e,a){var n=this.dpr,i=this.dom,o=i.style,s=this.domBack;o&&(o.width=e+"px",o.height=a+"px"),i.width=e*n,i.height=a*n,s&&(s.width=e*n,s.height=a*n,n!==1&&this.ctxBack.scale(n,n))},t.prototype.clear=function(e,a,n){var i=this.dom,o=this.ctx,s=i.width,l=i.height;a=a||this.clearColor;var u=this.motionBlur&&!e,f=this.lastFrameAlpha,h=this.dpr,v=this;u&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(i,0,0,s/h,l/h));var c=this.domBack;function d(p,g,y,m){if(o.clearRect(p,g,y,m),a&&a!=="transparent"){var _=void 0;if(Eu(a)){var S=a.global||a.__width===y&&a.__height===m;_=S&&a.__canvasGradient||Jc(o,a,{x:0,y:0,width:y,height:m}),a.__canvasGradient=_,a.__width=y,a.__height=m}else KT(a)&&(a.scaleX=a.scaleX||h,a.scaleY=a.scaleY||h,_=tv(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=f,o.drawImage(c,p,g,y,m),o.restore())}!n||u?d(0,0,s,l):n.length&&M(n,function(p){d(p.x*h,p.y*h,p.width*h,p.height*h)})},t})(Ze),Mm=1e5,an=314159,sl=.01,ER=.001;function kR(r){return r?r.__builtin__?!0:!(typeof r.resize!="function"||typeof r.refresh!="function"):!1}function OR(r,t){var e=document.createElement("div");return e.style.cssText=["position:relative","width:"+r+"px","height:"+t+"px","padding:0","margin:0","border-width:0"].join(";")+";",e}var BR=(function(){function r(t,e,a,n){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var i=!t.nodeName||t.nodeName.toUpperCase()==="CANVAS";this._opts=a=F({},a||{}),this.dpr=a.devicePixelRatio||$l,this._singleCanvas=i,this.root=t;var o=t.style;o&&(eS(t),t.innerHTML=""),this.storage=e;var s=this._zlevelList;this._prevDisplayList=[];var l=this._layers;if(i){var f=t,h=f.width,v=f.height;a.width!=null&&(h=a.width),a.height!=null&&(v=a.height),this.dpr=a.devicePixelRatio||1,f.width=h*this.dpr,f.height=v*this.dpr,this._width=h,this._height=v;var c=new Ch(f,this,this.dpr);c.__builtin__=!0,c.initContext(),l[an]=c,c.zlevel=an,s.push(an),this._domRoot=t}else{this._width=Qs(t,0,a),this._height=Qs(t,1,a);var u=this._domRoot=OR(this._width,this._height);t.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 t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},r.prototype.refresh=function(t){var e=this.storage.getDisplayList(!0),a=this._prevDisplayList,n=this._zlevelList;this._redrawId=Math.random(),this._paintList(e,a,t,this._redrawId);for(var i=0;i<n.length;i++){var o=n[i],s=this._layers[o];if(!s.__builtin__&&s.refresh){var l=i===0?this._backgroundColor:null;s.refresh(l)}}return this._opts.useDirtyRect&&(this._prevDisplayList=e.slice()),this},r.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},r.prototype._paintHoverList=function(t){var e=t.length,a=this._hoverlayer;if(a&&a.clear(),!!e){for(var n={inHover:!0,viewWidth:this._width,viewHeight:this._height},i,o=0;o<e;o++){var s=t[o];s.__inHover&&(a||(a=this._hoverlayer=this.getLayer(Mm)),i||(i=a.ctx,i.save()),pn(i,s,n,o===e-1))}i&&i.restore()}},r.prototype.getHoverLayer=function(){return this.getLayer(Mm)},r.prototype.paintOne=function(t,e){bx(t,e)},r.prototype._paintList=function(t,e,a,n){if(this._redrawId===n){a=a||!1,this._updateLayerStatus(t);var i=this._doPaintList(t,e,a),o=i.finished,s=i.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),s&&this._paintHoverList(t),o)this.eachLayer(function(u){u.afterBrush&&u.afterBrush()});else{var l=this;Hl(function(){l._paintList(t,e,a,n)})}}},r.prototype._compositeManually=function(){var t=this.getLayer(an).ctx,e=this._domRoot.width,a=this._domRoot.height;t.clearRect(0,0,e,a),this.eachBuiltinLayer(function(n){n.virtual&&t.drawImage(n.dom,0,0,e,a)})},r.prototype._doPaintList=function(t,e,a){for(var n=this,i=[],o=this._opts.useDirtyRect,s=0;s<this._zlevelList.length;s++){var l=this._zlevelList[s],u=this._layers[l];u.__builtin__&&u!==this._hoverlayer&&(u.__dirty||a)&&i.push(u)}for(var f=!0,h=!1,v=function(p){var g=i[p],y=g.ctx,m=o&&g.createRepaintRects(t,e,c._width,c._height),_=a?g.__startIndex:g.__drawIndex,S=!a&&g.incremental&&Date.now,x=S&&Date.now(),b=g.zlevel===c._zlevelList[0]?c._backgroundColor:null;if(g.__startIndex===g.__endIndex)g.clear(!1,b,m);else if(_===g.__startIndex){var w=t[_];(!w.incremental||!w.notClear||a)&&g.clear(!1,b,m)}_===-1&&(console.error("For some unknown reason. drawIndex is -1"),_=g.__startIndex);var T,D=function(L){var P={inHover:!1,allClipped:!1,prevEl:null,viewWidth:n._width,viewHeight:n._height};for(T=_;T<g.__endIndex;T++){var R=t[T];if(R.__inHover&&(h=!0),n._doPaintEl(R,g,o,L,P,T===g.__endIndex-1),S){var E=Date.now()-x;if(E>15)break}}P.prevElClipPaths&&y.restore()};if(m)if(m.length===0)T=g.__endIndex;else for(var A=c.dpr,C=0;C<m.length;++C){var I=m[C];y.save(),y.beginPath(),y.rect(I.x*A,I.y*A,I.width*A,I.height*A),y.clip(),D(I),y.restore()}else y.save(),D(),y.restore();g.__drawIndex=T,g.__drawIndex<g.__endIndex&&(f=!1)},c=this,d=0;d<i.length;d++)v(d);return ct.wxa&&M(this._layers,function(p){p&&p.ctx&&p.ctx.draw&&p.ctx.draw()}),{finished:f,needsRefreshHover:h}},r.prototype._doPaintEl=function(t,e,a,n,i,o){var s=e.ctx;if(a){var l=t.getPaintRect();(!n||l&&l.intersect(n))&&(pn(s,t,i,o),t.setPrevPaintRect(l))}else pn(s,t,i,o)},r.prototype.getLayer=function(t,e){this._singleCanvas&&!this._needsManuallyCompositing&&(t=an);var a=this._layers[t];return a||(a=new Ch("zr_"+t,this,this.dpr),a.zlevel=t,a.__builtin__=!0,this._layerConfig[t]?ft(a,this._layerConfig[t],!0):this._layerConfig[t-sl]&&ft(a,this._layerConfig[t-sl],!0),e&&(a.virtual=e),this.insertLayer(t,a),a.initContext()),a},r.prototype.insertLayer=function(t,e){var a=this._layers,n=this._zlevelList,i=n.length,o=this._domRoot,s=null,l=-1;if(!a[t]&&kR(e)){if(i>0&&t>n[0]){for(l=0;l<i-1&&!(n[l]<t&&n[l+1]>t);l++);s=a[n[l]]}if(n.splice(l+1,0,t),a[t]=e,!e.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(e.dom,u.nextSibling):o.appendChild(e.dom)}else o.firstChild?o.insertBefore(e.dom,o.firstChild):o.appendChild(e.dom);e.painter||(e.painter=this)}},r.prototype.eachLayer=function(t,e){for(var a=this._zlevelList,n=0;n<a.length;n++){var i=a[n];t.call(e,this._layers[i],i)}},r.prototype.eachBuiltinLayer=function(t,e){for(var a=this._zlevelList,n=0;n<a.length;n++){var i=a[n],o=this._layers[i];o.__builtin__&&t.call(e,o,i)}},r.prototype.eachOtherLayer=function(t,e){for(var a=this._zlevelList,n=0;n<a.length;n++){var i=a[n],o=this._layers[i];o.__builtin__||t.call(e,o,i)}},r.prototype.getLayers=function(){return this._layers},r.prototype._updateLayerStatus=function(t){this.eachBuiltinLayer(function(h,v){h.__dirty=h.__used=!1});function e(h){i&&(i.__endIndex!==h&&(i.__dirty=!0),i.__endIndex=h)}if(this._singleCanvas)for(var a=1;a<t.length;a++){var n=t[a];if(n.zlevel!==t[a-1].zlevel||n.incremental){this._needsManuallyCompositing=!0;break}}var i=null,o=0,s,l;for(l=0;l<t.length;l++){var n=t[l],u=n.zlevel,f=void 0;s!==u&&(s=u,o=0),n.incremental?(f=this.getLayer(u+ER,this._needsManuallyCompositing),f.incremental=!0,o=1):f=this.getLayer(u+(o>0?sl:0),this._needsManuallyCompositing),f.__builtin__||$v("ZLevel "+u+" has been used by unkown layer "+f.id),f!==i&&(f.__used=!0,f.__startIndex!==l&&(f.__dirty=!0),f.__startIndex=l,f.incremental?f.__drawIndex=-1:f.__drawIndex=l,e(l),i=f),n.__dirty&Me&&!n.__inHover&&(f.__dirty=!0,f.incremental&&f.__drawIndex<0&&(f.__drawIndex=l))}e(l),this.eachBuiltinLayer(function(h,v){!h.__used&&h.getElementCount()>0&&(h.__dirty=!0,h.__startIndex=h.__endIndex=h.__drawIndex=0),h.__dirty&&h.__drawIndex<0&&(h.__drawIndex=h.__startIndex)})},r.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},r.prototype._clearLayer=function(t){t.clear()},r.prototype.setBackgroundColor=function(t){this._backgroundColor=t,M(this._layers,function(e){e.setUnpainted()})},r.prototype.configLayer=function(t,e){if(e){var a=this._layerConfig;a[t]?ft(a[t],e,!0):a[t]=e;for(var n=0;n<this._zlevelList.length;n++){var i=this._zlevelList[n];if(i===t||i===t+sl){var o=this._layers[i];ft(o,a[t],!0)}}}},r.prototype.delLayer=function(t){var e=this._layers,a=this._zlevelList,n=e[t];n&&(n.dom.parentNode.removeChild(n.dom),delete e[t],a.splice(dt(a,t),1))},r.prototype.resize=function(t,e){if(this._domRoot.style){var a=this._domRoot;a.style.display="none";var n=this._opts,i=this.root;if(t!=null&&(n.width=t),e!=null&&(n.height=e),t=Qs(i,0,n),e=Qs(i,1,n),a.style.display="",this._width!==t||e!==this._height){a.style.width=t+"px",a.style.height=e+"px";for(var o in this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(t,e);this.refresh(!0)}this._width=t,this._height=e}else{if(t==null||e==null)return;this._width=t,this._height=e,this.getLayer(an).resize(t,e)}return this},r.prototype.clearLayer=function(t){var e=this._layers[t];e&&e.clear()},r.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},r.prototype.getRenderedCanvas=function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._layers[an].dom;var e=new Ch("image",this,t.pixelRatio||this.dpr);e.initContext(),e.clear(!1,t.backgroundColor||this._backgroundColor);var a=e.ctx;if(t.pixelRatio<=this.dpr){this.refresh();var n=e.dom.width,i=e.dom.height;this.eachLayer(function(h){h.__builtin__?a.drawImage(h.dom,0,0,n,i):h.renderToCanvas&&(a.save(),h.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 f=s[l];pn(a,f,o,l===u-1)}return e.dom},r.prototype.getWidth=function(){return this._width},r.prototype.getHeight=function(){return this._height},r})();function NR(r){r.registerPainter("canvas",BR)}var zR="expandAxisBreak",VR=null;function FR(){return VR}var GR=(function(){function r(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return r.prototype.getAxis=function(t){return this._axes[t]},r.prototype.getAxes=function(){return U(this._dimList,function(t){return this._axes[t]},this)},r.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),kt(this.getAxes(),function(e){return e.scale.type===t})},r.prototype.addAxis=function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},r})(),vv=["x","y"];function Am(r){return(r.type==="interval"||r.type==="time")&&!r.hasBreaks()}var HR=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="cartesian2d",e.dimensions=vv,e}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,a=this.getAxis("y").scale;if(!(!Am(e)||!Am(a))){var n=e.getExtent(),i=a.getExtent(),o=this.dataToPoint([n[0],i[0]]),s=this.dataToPoint([n[1],i[1]]),l=n[1]-n[0],u=i[1]-i[0];if(!(!l||!u)){var f=(s[0]-o[0])/l,h=(s[1]-o[1])/u,v=o[0]-n[0]*f,c=o[1]-i[0]*h,d=this._transform=[f,0,0,h,v,c];this._invTransform=Ii([],d)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(e){var a=this.getAxis("x"),n=this.getAxis("y");return a.contain(a.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis("x").containData(e[0])&&this.getAxis("y").containData(e[1])},t.prototype.containZone=function(e,a){var n=this.dataToPoint(e),i=this.dataToPoint(a),o=this.getArea(),s=new ot(n[0],n[1],i[0]-n[0],i[1]-n[1]);return o.intersect(s)},t.prototype.dataToPoint=function(e,a,n){n=n||[];var i=e[0],o=e[1];if(this._transform&&i!=null&&isFinite(i)&&o!=null&&isFinite(o))return pe(n,e,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return n[0]=s.toGlobalCoord(s.dataToCoord(i,a)),n[1]=l.toGlobalCoord(l.dataToCoord(o,a)),n},t.prototype.clampData=function(e,a){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,o=n.getExtent(),s=i.getExtent(),l=n.parse(e[0]),u=i.parse(e[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},t.prototype.pointToData=function(e,a,n){if(n=n||[],this._invTransform)return pe(n,e,this._invTransform);var i=this.getAxis("x"),o=this.getAxis("y");return n[0]=i.coordToData(i.toLocalCoord(e[0]),a),n[1]=o.coordToData(o.toLocalCoord(e[1]),a),n},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim==="x"?"y":"x")},t.prototype.getArea=function(e){e=e||0;var a=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),i=Math.min(a[0],a[1])-e,o=Math.min(n[0],n[1])-e,s=Math.max(a[0],a[1])-i+e,l=Math.max(n[0],n[1])-o+e;return new ot(i,o,s,l)},t})(GR),WR=(function(r){B(t,r);function t(e,a,n,i,o){var s=r.call(this,e,a,n)||this;return s.index=0,s.type=i||"value",s.position=o||"bottom",s}return t.prototype.isHorizontal=function(){var e=this.position;return e==="top"||e==="bottom"},t.prototype.getGlobalExtent=function(e){var a=this.getExtent();return a[0]=this.toGlobalCoord(a[0]),a[1]=this.toGlobalCoord(a[1]),e&&a[0]>a[1]&&a.reverse(),a},t.prototype.pointToData=function(e,a){return this.coordToData(this.toLocalCoord(e[this.dim==="x"?0:1]),a)},t.prototype.setCategorySortInfo=function(e){if(this.type!=="category")return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t})(rp),S1={left:0,right:0,top:0,bottom:0},_u=["25%","25%"],UR=(function(r){B(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.mergeDefaultAndTheme=function(e,a){var n=Bi(e.outerBounds);r.prototype.mergeDefaultAndTheme.apply(this,arguments),n&&e.outerBounds&&Ma(e.outerBounds,n)},t.prototype.mergeOption=function(e,a){r.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&e.outerBounds&&Ma(this.option.outerBounds,e.outerBounds)},t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.defaultOption={show:!1,z:0,left:"15%",top:65,right:"10%",bottom:80,containLabel:!1,outerBoundsMode:"auto",outerBounds:S1,outerBoundsContain:"all",outerBoundsClampWidth:_u[0],outerBoundsClampHeight:_u[1],backgroundColor:N.color.transparent,borderWidth:1,borderColor:N.color.neutral30},t})(mt),pa=Math.PI,YR=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],ZR=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],Jo=wt(),b1=wt(),x1=(function(){function r(t){this.recordMap={},this.resolveAxisNameOverlap=t}return r.prototype.ensureRecord=function(t){var e=t.axis.dim,a=t.componentIndex,n=this.recordMap,i=n[e]||(n[e]=[]);return i[a]||(i[a]={ready:{}})},r})();function XR(r,t,e,a){var n=e.axis,i=t.ensureRecord(e),o=[],s,l=np(r.axisName)&&Ti(r.nameLocation);M(a,function(d){var p=Da(d);if(!(!p||p.label.ignore)){o.push(p);var g=i.transGroup;l&&(g.transform?Ii(to,g.transform):jv(to),p.transform&&xo(to,to,p.transform),ot.copy(ll,p.localRect),ll.applyTransform(to),s?s.union(ll):ot.copy(s=new ot(0,0,0,0),ll))}});var u=Math.abs(i.dirVec.x)>.1?"x":"y",f=i.transGroup[u];if(o.sort(function(d,p){return Math.abs(d.label[u]-f)-Math.abs(p.label[u]-f)}),l&&s){var h=n.getExtent(),v=Math.min(h[0],h[1]),c=Math.max(h[0],h[1])-v;s.union(new ot(v,0,c,1))}i.stOccupiedRect=s,i.labelInfoList=o}var to=Fe(),ll=new ot(0,0,0,0),w1=function(r,t,e,a,n,i){if(Ti(r.nameLocation)){var o=i.stOccupiedRect;o&&T1(LR({},o,i.transGroup.transform),a,n)}else C1(i.labelInfoList,i.dirVec,a,n)};function T1(r,t,e){var a=new ht;ap(r,t,a,{direction:Math.atan2(e.y,e.x),bidirectional:!1,touchThreshold:.05})&&IR(t,a)}function C1(r,t,e,a){for(var n=ht.dot(a,t)>=0,i=0,o=r.length;i<o;i++){var s=r[n?i:o-1-i];s.label.ignore||T1(s,e,a)}}var Mr=(function(){function r(t,e,a,n){this.group=new yt,this._axisModel=t,this._api=e,this._local={},this._shared=n||new x1(w1),this._resetCfgDetermined(a)}return r.prototype.updateCfg=function(t){var e=this._cfg.raw;e.position=t.position,e.labelOffset=t.labelOffset,this._resetCfgDetermined(e)},r.prototype.__getRawCfg=function(){return this._cfg.raw},r.prototype._resetCfgDetermined=function(t){var e=this._axisModel,a=e.getDefaultOption?e.getDefaultOption():{},n=et(t.axisName,e.get("name")),i=e.get("nameMoveOverlap");(i==null||i==="auto")&&(i=et(t.defaultNameMoveOverlap,!0));var o={raw:t,position:t.position,rotation:t.rotation,nameDirection:et(t.nameDirection,1),tickDirection:et(t.tickDirection,1),labelDirection:et(t.labelDirection,1),labelOffset:et(t.labelOffset,0),silent:et(t.silent,!0),axisName:n,nameLocation:ya(e.get("nameLocation"),a.nameLocation,"end"),shouldNameMoveOverlap:np(n)&&i,optionHideOverlap:e.get(["axisLabel","hideOverlap"]),showMinorTicks:e.get(["minorTick","show"])};this._cfg=o;var s=new yt({x:o.position[0],y:o.position[1],rotation:o.rotation});s.updateTransform(),this._transformGroup=s;var l=this._shared.ensureRecord(e);l.transGroup=this._transformGroup,l.dirVec=new ht(Math.cos(-o.rotation),Math.sin(-o.rotation))},r.prototype.build=function(t,e){var a=this;return t||(t={axisLine:!0,axisTickLabelEstimate:!1,axisTickLabelDetermine:!0,axisName:!0}),M($R,function(n){t[n]&&KR[n](a._cfg,a._local,a._shared,a._axisModel,a.group,a._transformGroup,a._api,e||{})}),this},r.innerTextLayout=function(t,e,a){var n=MS(e-t),i,o;return zo(n)?(o=a>0?"top":"bottom",i="center"):zo(n-pa)?(o=a>0?"bottom":"top",i="center"):(o="middle",n>0&&n<pa?i=a>0?"right":"left":i=a>0?"left":"right"),{rotation:n,textAlign:i,textVerticalAlign:o}},r.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},r.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},r})(),$R=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],KR={axisLine:function(r,t,e,a,n,i,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=i.transform,f=[l[0],0],h=[l[1],0],v=f[0]>h[0];u&&(pe(f,f,u),pe(h,h,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())FR().buildAxisBreakLine(a,n,i,d);else{var p=new sr(F({shape:{x1:f[0],y1:f[1],x2:h[0],y2:h[1]}},d));Uo(p.shape,p.style.lineWidth),p.anid="line",n.add(p)}var g=a.get(["axisLine","symbol"]);if(g!=null){var y=a.get(["axisLine","symbolSize"]);X(g)&&(g=[g,g]),(X(y)||bt(y))&&(y=[y,y]);var m=af(a.get(["axisLine","symbolOffset"])||0,y),_=y[0],S=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((f[0]-h[0])*(f[0]-h[0])+(f[1]-h[1])*(f[1]-h[1]))}],function(x,b){if(g[b]!=="none"&&g[b]!=null){var w=le(g[b],-_/2,-S/2,_,S,c.stroke,!0),T=x.r+x.offset,D=v?h:f;w.attr({rotation:x.rotate,x:D[0]+T*Math.cos(r.rotation),y:D[1]-T*Math.sin(r.rotation),silent:!0,z2:11}),n.add(w)}})}}},axisTickLabelEstimate:function(r,t,e,a,n,i,o,s){var l=Lm(t,n,s);l&&Dm(r,t,e,a,n,i,o,lr.estimate)},axisTickLabelDetermine:function(r,t,e,a,n,i,o,s){var l=Lm(t,n,s);l&&Dm(r,t,e,a,n,i,o,lr.determine);var u=JR(r,n,i,a);jR(r,t.labelLayoutList,u),tE(r,n,i,a,r.tickDirection)},axisName:function(r,t,e,a,n,i,o,s){var l=e.ensureRecord(a);t.nameEl&&(n.remove(t.nameEl),t.nameEl=l.nameLayout=l.nameLocation=null);var u=r.axisName;if(np(u)){var f=r.nameLocation,h=r.nameDirection,v=a.getModel("nameTextStyle"),c=a.get("nameGap")||0,d=a.axis.getExtent(),p=a.axis.inverse?-1:1,g=new ht(0,0),y=new ht(0,0);f==="start"?(g.x=d[0]-p*c,y.x=-p):f==="end"?(g.x=d[1]+p*c,y.x=p):(g.x=(d[0]+d[1])/2,g.y=r.labelOffset+h*c,y.y=h);var m=Fe();y.transform(Bu(m,m,r.rotation));var _=a.get("nameRotate");_!=null&&(_=_*pa/180);var S,x;Ti(f)?S=Mr.innerTextLayout(r.rotation,_??r.rotation,h):(S=qR(r.rotation,f,_||0,d),x=r.raw.axisNameAvailableWidth,x!=null&&(x=Math.abs(x/Math.sin(S.rotation)),!isFinite(x)&&(x=null)));var b=v.getFont(),w=a.get("nameTruncate",!0)||{},T=w.ellipsis,D=Zr(r.raw.nameTruncateMaxWidth,w.maxWidth,x),A=s.nameMarginLevel||0,C=new Tt({x:g.x,y:g.y,rotation:S.rotation,silent:Mr.isLabelSilent(a),style:Ht(v,{text:u,font:b,overflow:"truncate",width:D,ellipsis:T,fill:v.getTextColor()||a.get(["axisLine","lineStyle","color"]),align:v.get("align")||S.textAlign,verticalAlign:v.get("verticalAlign")||S.textVerticalAlign}),z2:1});if(ds({el:C,componentModel:a,itemName:u}),C.__fullText=u,C.anid="name",a.get("triggerEvent")){var I=Mr.makeAxisEventDataBase(a);I.targetType="axisName",I.name=u,vt(C).eventData=I}i.add(C),C.updateTransform(),t.nameEl=C;var L=l.nameLayout=Da({label:C,priority:C.z2,defaultAttr:{ignore:C.ignore},marginDefault:Ti(f)?YR[A]:ZR[A]});if(l.nameLocation=f,n.add(C),C.decomposeTransform(),r.shouldNameMoveOverlap&&L){var P=e.ensureRecord(a);e.resolveAxisNameOverlap(r,e,a,L,y,P)}}}};function Dm(r,t,e,a,n,i,o,s){A1(t)||eE(r,t,n,s,a,o);var l=t.labelLayoutList;rE(r,a,l,i),r.rotation;var u=r.optionHideOverlap;QR(a,l,u),u&&RR(kt(l,function(f){return f&&!f.label.ignore})),XR(r,e,a,l)}function qR(r,t,e,a){var n=MS(e-r),i,o,s=a[0]>a[1],l=t==="start"&&!s||t!=="start"&&s;return zo(n-pa/2)?(o=l?"bottom":"top",i="center"):zo(n-pa*1.5)?(o=l?"top":"bottom",i="center"):(o="middle",n<pa*1.5&&n>pa/2?i=l?"left":"right":i=l?"right":"left"),{rotation:n,textAlign:i,textVerticalAlign:o}}function QR(r,t,e){if(n1(r.axis))return;function a(s,l,u){var f=Da(t[l]),h=Da(t[u]);if(!(!f||!h)){if(s===!1||f.suggestIgnore){_o(f.label);return}if(h.suggestIgnore){_o(h.label);return}var v=.1;if(!e){var c=[0,0,0,0];f=wm({marginForce:c},f),h=wm({marginForce:c},h)}ap(f,h,null,{touchThreshold:v})&&_o(s?h.label:f.label)}}var n=r.get(["axisLabel","showMinLabel"]),i=r.get(["axisLabel","showMaxLabel"]),o=t.length;a(n,0,1),a(i,o-1,o-2)}function jR(r,t,e){r.showMinorTicks||M(t,function(a){if(a&&a.label.ignore)for(var n=0;n<e.length;n++){var i=e[n],o=b1(i),s=Jo(a.label);if(o.tickValue!=null&&!o.onBand&&o.tickValue===s.tickValue){_o(i);return}}})}function _o(r){r&&(r.ignore=!0)}function M1(r,t,e,a,n){for(var i=[],o=[],s=[],l=0;l<r.length;l++){var u=r[l].coord;o[0]=u,o[1]=0,s[0]=u,s[1]=e,t&&(pe(o,o,t),pe(s,s,t));var f=new sr({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:a,z2:2,autoBatch:!0,silent:!0});Uo(f.shape,f.style.lineWidth),f.anid=n+"_"+r[l].tickValue,i.push(f);var h=b1(f);h.onBand=!!r[l].onBand,h.tickValue=r[l].tickValue}return i}function JR(r,t,e,a){var n=a.axis,i=a.getModel("axisTick"),o=i.get("show");if(o==="auto"&&(o=!0,r.raw.axisTickAutoShow!=null&&(o=!!r.raw.axisTickAutoShow)),!o||n.scale.isBlank())return[];for(var s=i.getModel("lineStyle"),l=r.tickDirection*i.get("length"),u=n.getTicksCoords(),f=M1(u,e.transform,l,gt(s.getLineStyle(),{stroke:a.get(["axisLine","lineStyle","color"])}),"ticks"),h=0;h<f.length;h++)t.add(f[h]);return f}function tE(r,t,e,a,n){var i=a.axis,o=a.getModel("minorTick");if(!(!r.showMinorTicks||i.scale.isBlank())){var s=i.getMinorTicksCoords();if(s.length)for(var l=o.getModel("lineStyle"),u=n*o.get("length"),f=gt(l.getLineStyle(),gt(a.getModel("axisTick").getLineStyle(),{stroke:a.get(["axisLine","lineStyle","color"])})),h=0;h<s.length;h++)for(var v=M1(s[h],e.transform,u,f,"minorticks_"+h),c=0;c<v.length;c++)t.add(v[c])}}function Lm(r,t,e){if(A1(r)){var a=r.axisLabelsCreationContext,n=a.out.noPxChangeTryDetermine;if(e.noPxChange){for(var i=!0,o=0;o<n.length;o++)i=i&&n[o]();if(i)return!1}n.length&&(t.remove(r.labelGroup),dv(r,null,null,null))}return!0}function eE(r,t,e,a,n,i){var o=n.axis,s=Zr(r.raw.axisLabelShow,n.get(["axisLabel","show"])),l=new yt;e.add(l);var u=pu(a);if(!s||o.scale.isBlank()){dv(t,[],l,u);return}var f=n.getModel("axisLabel"),h=o.getViewLabels(u),v=(Zr(r.raw.labelRotate,f.get("rotate"))||0)*pa/180,c=Mr.innerTextLayout(r.rotation,v,r.labelDirection),d=n.getCategories&&n.getCategories(!0),p=[],g=n.get("triggerEvent"),y=1/0,m=-1/0;M(h,function(S,x){var b,w=o.scale.type==="ordinal"?o.scale.getRawOrdinalNumber(S.tickValue):S.tickValue,T=S.formattedLabel,D=S.rawLabel,A=f;if(d&&d[w]){var C=d[w];j(C)&&C.textStyle&&(A=new Dt(C.textStyle,f,n.ecModel))}var I=A.getTextColor()||n.get(["axisLine","lineStyle","color"]),L=A.getShallow("align",!0)||c.textAlign,P=et(A.getShallow("alignMinLabel",!0),L),R=et(A.getShallow("alignMaxLabel",!0),L),E=A.getShallow("verticalAlign",!0)||A.getShallow("baseline",!0)||c.textVerticalAlign,O=et(A.getShallow("verticalAlignMinLabel",!0),E),k=et(A.getShallow("verticalAlignMaxLabel",!0),E),z=10+(((b=S.time)===null||b===void 0?void 0:b.level)||0);y=Math.min(y,z),m=Math.max(m,z);var V=new Tt({x:0,y:0,rotation:0,silent:Mr.isLabelSilent(n),z2:z,style:Ht(A,{text:T,align:x===0?P:x===h.length-1?R:L,verticalAlign:x===0?O:x===h.length-1?k:E,fill:Q(I)?I(o.type==="category"?D:o.type==="value"?w+"":w,x):I})});V.anid="label_"+w;var G=Jo(V);if(G.break=S.break,G.tickValue=w,G.layoutRotation=c.rotation,ds({el:V,componentModel:n,itemName:T,formatterParamsExtra:{isTruncated:function(){return V.isTruncated},value:D,tickIndex:x}}),g){var W=Mr.makeAxisEventDataBase(n);W.targetType="axisLabel",W.value=D,W.tickIndex=x,S.break&&(W.break={start:S.break.parsedBreak.vmin,end:S.break.parsedBreak.vmax}),o.type==="category"&&(W.dataIndex=w),vt(V).eventData=W,S.break&&nE(n,i,V,S.break)}p.push(V),l.add(V)});var _=U(p,function(S){return{label:S,priority:Jo(S).break?S.z2+(m-y+1):S.z2,defaultAttr:{ignore:S.ignore}}});dv(t,_,l,u)}function A1(r){return!!r.labelLayoutList}function dv(r,t,e,a){r.labelLayoutList=t,r.labelGroup=e,r.axisLabelsCreationContext=a}function rE(r,t,e,a){var n=t.get(["axisLabel","margin"]);M(e,function(i,o){var s=Da(i);if(s){var l=s.label,u=Jo(l);s.suggestIgnore=l.ignore,l.ignore=!1,Cc(kr,aE),kr.x=t.axis.dataToCoord(u.tickValue),kr.y=r.labelOffset+r.labelDirection*n,kr.rotation=u.layoutRotation,a.add(kr),kr.updateTransform(),a.remove(kr),kr.decomposeTransform(),Cc(l,kr),l.markRedraw(),mu(s,!0),Da(s)}})}var kr=new _t,aE=new _t;function np(r){return!!r}function nE(r,t,e,a){e.on("click",function(n){var i={type:zR,breaks:[{start:a.parsedBreak.breakOption.start,end:a.parsedBreak.breakOption.end}]};i[r.axis.dim+"AxisIndex"]=r.componentIndex,t.dispatchAction(i)})}function Su(r,t,e){e=e||{};var a=t.axis,n={},i=a.getAxesOnZeroOf()[0],o=a.position,s=i?"onZero":o,l=a.dim,u=[r.x,r.x+r.width,r.y,r.y+r.height],f={left:0,right:1,top:0,bottom:1,onZero:2},h=t.get("offset")||0,v=l==="x"?[u[2]-h,u[3]+h]:[u[0]-h,u[1]+h];if(i){var c=i.toGlobalCoord(i.dataToCoord(0));v[f.onZero]=Math.max(Math.min(c,v[1]),v[0])}n.position=[l==="y"?v[f[s]]:u[0],l==="x"?v[f[s]]:u[3]],n.rotation=Math.PI/2*(l==="x"?0:1);var d={top:-1,bottom:1,left:-1,right:1};n.labelDirection=n.tickDirection=n.nameDirection=d[o],n.labelOffset=i?v[f[o]]-v[f.onZero]:0,t.get(["axisTick","inside"])&&(n.tickDirection=-n.tickDirection),Zr(e.labelInside,t.get(["axisLabel","inside"]))&&(n.labelDirection=-n.labelDirection);var p=t.get(["axisLabel","rotate"]);return n.labelRotate=s==="top"?-p:p,n.z2=1,n}function iE(r){return r.coordinateSystem&&r.coordinateSystem.type==="cartesian2d"}function Im(r){var t={xAxisModel:null,yAxisModel:null};return M(t,function(e,a){var n=a.replace(/Model$/,""),i=r.getReferringComponents(n,ee).models[0];t[a]=i}),t}function oE(r,t,e,a,n,i){for(var o=Su(r,e),s=!1,l=!1,u=0;u<t.length;u++)sv(t[u].getOtherAxis(e.axis).scale)&&(s=l=!0,e.axis.type==="category"&&e.axis.onBand&&(l=!1));return o.axisLineAutoShow=s,o.axisTickAutoShow=l,o.defaultNameMoveOverlap=i,new Mr(e,a,o,n)}function sE(r,t,e){var a=Su(t,e);r.updateCfg(a)}function D1(r,t,e){var a=Aa.prototype,n=a.getTicks.call(e),i=a.getTicks.call(e,{expandToNicedExtent:!0}),o=n.length-1,s=a.getInterval.call(e),l=r1(r,t),u=l.extent,f=l.fixMin,h=l.fixMax;r.type==="log"&&(u=lv(r.base,u,!0)),r.setBreaksFromOption(o1(t)),r.setExtent(u[0],u[1]),r.calcNiceExtent({splitNumber:o,fixMin:f,fixMax:h});var v=a.getExtent.call(r);f&&(u[0]=v[0]),h&&(u[1]=v[1]);var c=a.getInterval.call(r),d=u[0],p=u[1];if(f&&h)c=(p-d)/o;else if(f)for(p=u[0]+c*o;p<u[1]&&isFinite(p)&&isFinite(u[1]);)c=bh(c),p=u[0]+c*o;else if(h)for(d=u[1]-c*o;d>u[0]&&isFinite(d)&&isFinite(u[0]);)c=bh(c),d=u[1]-c*o;else{var g=r.getTicks().length-1;g>o&&(c=bh(c));var y=c*o;p=Math.ceil(u[1]/c)*c,d=Xt(p-y),d<0&&u[0]>=0?(d=0,p=Xt(y)):p>0&&u[1]<=0&&(p=0,d=-Xt(y))}var m=(n[0].value-i[0].value)/s,_=(n[o].value-i[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 Pm=[[3,1],[0,2]],lE=(function(){function r(t,e,a){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=vv,this._initCartesian(t,e,a),this.model=t}return r.prototype.getRect=function(){return this._rect},r.prototype.update=function(t,e){var a=this._axesMap;this._updateScale(t,this.model);function n(o){var s,l=Pt(o),u=l.length;if(u){for(var f=[],h=u-1;h>=0;h--){var v=+l[h],c=o[v],d=c.model,p=c.scale;sv(p)&&d.get("alignTicks")&&d.get("interval")==null?f.push(c):(hv(p,d),sv(p)&&(s=c))}f.length&&(s||(s=f.pop(),hv(s.scale,s.model)),M(f,function(g){D1(g.scale,g.model,s.scale)}))}}n(a.x),n(a.y);var i={};M(a.x,function(o){Rm(a,"y",o,i)}),M(a.y,function(o){Rm(a,"x",o,i)}),this.resize(this.model,e)},r.prototype.resize=function(t,e,a){var n=Le(t,e),i=this._rect=ne(t.getBoxLayoutParams(),n.refContainer),o=this._axesMap,s=this._coordsList,l=t.get("containLabel");if(pv(o,i),!a){var u=hE(i,s,o,l,e),f=void 0;if(l)gv?(gv(this._axesList,i),pv(o,i)):f=Om(i.clone(),"axisLabel",null,i,o,u,n);else{var h=cE(t,i,n),v=h.outerBoundsRect,c=h.parsedOuterBoundsContain,d=h.outerBoundsClamp;v&&(f=Om(v,c,d,i,o,u,n))}L1(i,o,lr.determine,null,f,n)}M(this._coordsList,function(p){p.calcAffineTransform()})},r.prototype.getAxis=function(t,e){var a=this._axesMap[t];if(a!=null)return a[e||0]},r.prototype.getAxes=function(){return this._axesList.slice()},r.prototype.getCartesian=function(t,e){if(t!=null&&e!=null){var a="x"+t+"y"+e;return this._coordsMap[a]}j(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var n=0,i=this._coordsList;n<i.length;n++)if(i[n].getAxis("x").index===t||i[n].getAxis("y").index===e)return i[n]},r.prototype.getCartesians=function(){return this._coordsList.slice()},r.prototype.convertToPixel=function(t,e,a){var n=this._findConvertTarget(e);return n.cartesian?n.cartesian.dataToPoint(a):n.axis?n.axis.toGlobalCoord(n.axis.dataToCoord(a)):null},r.prototype.convertFromPixel=function(t,e,a){var n=this._findConvertTarget(e);return n.cartesian?n.cartesian.pointToData(a):n.axis?n.axis.coordToData(n.axis.toLocalCoord(a)):null},r.prototype._findConvertTarget=function(t){var e=t.seriesModel,a=t.xAxisModel||e&&e.getReferringComponents("xAxis",ee).models[0],n=t.yAxisModel||e&&e.getReferringComponents("yAxis",ee).models[0],i=t.gridModel,o=this._coordsList,s,l;if(e)s=e.coordinateSystem,dt(o,s)<0&&(s=null);else if(a&&n)s=this.getCartesian(a.componentIndex,n.componentIndex);else if(a)l=this.getAxis("x",a.componentIndex);else if(n)l=this.getAxis("y",n.componentIndex);else if(i){var u=i.coordinateSystem;u===this&&(s=this._coordsList[0])}return{cartesian:s,axis:l}},r.prototype.containPoint=function(t){var e=this._coordsList[0];if(e)return e.containPoint(t)},r.prototype._initCartesian=function(t,e,a){var n=this,i=this,o={left:!1,right:!1,top:!1,bottom:!1},s={x:{},y:{}},l={x:0,y:0};if(e.eachComponent("xAxis",u("x"),this),e.eachComponent("yAxis",u("y"),this),!l.x||!l.y){this._axesMap={},this._axesList=[];return}this._axesMap=s,M(s.x,function(f,h){M(s.y,function(v,c){var d="x"+h+"y"+c,p=new HR(d);p.master=n,p.model=t,n._coordsMap[d]=p,n._coordsList.push(p),p.addAxis(f),p.addAxis(v)})});function u(f){return function(h,v){if(Mh(h,t)){var c=h.get("position");f==="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 WR(f,a1(h),[0,0],h.get("type"),c),p=d.type==="category";d.onBand=p&&h.get("boundaryGap"),d.inverse=h.get("inverse"),h.axis=d,d.model=h,d.grid=i,d.index=v,i._axesList.push(d),s[f][v]=d,l[f]++}}}},r.prototype._updateScale=function(t,e){M(this._axesList,function(n){if(n.scale.setExtent(1/0,-1/0),n.type==="category"){var i=n.model.get("categorySortInfo");n.scale.setSortInfo(i)}}),t.eachSeries(function(n){if(iE(n)){var i=Im(n),o=i.xAxisModel,s=i.yAxisModel;if(!Mh(o,e)||!Mh(s,e))return;var l=this.getCartesian(o.componentIndex,s.componentIndex),u=n.getData(),f=l.getAxis("x"),h=l.getAxis("y");a(u,f),a(u,h)}},this);function a(n,i){M(i1(n,i.dim),function(o){i.scale.unionExtentFromData(n,o)})}},r.prototype.getTooltipAxes=function(t){var e=[],a=[];return M(this.getCartesians(),function(n){var i=t!=null&&t!=="auto"?n.getAxis(t):n.getBaseAxis(),o=n.getOtherAxis(i);dt(e,i)<0&&e.push(i),dt(a,o)<0&&a.push(o)}),{baseAxes:e,otherAxes:a}},r.create=function(t,e){var a=[];return t.eachComponent("grid",function(n,i){var o=new r(n,t,e);o.name="grid_"+i,o.resize(n,e,!0),n.coordinateSystem=o,a.push(o)}),t.eachSeries(function(n){wL({targetModel:n,coordSysType:"cartesian2d",coordSysProvider:i});function i(){var o=Im(n),s=o.xAxisModel,l=o.yAxisModel,u=s.getCoordSysModel(),f=u.coordinateSystem;return f.getCartesian(s.componentIndex,l.componentIndex)}}),a},r.dimensions=vv,r})();function Mh(r,t){return r.getCoordSysModel()===t}function Rm(r,t,e,a){e.getAxesOnZeroOf=function(){return i?[i]:[]};var n=r[t],i,o=e.model,s=o.get(["axisLine","onZero"]),l=o.get(["axisLine","onZeroAxisIndex"]);if(!s)return;if(l!=null)Em(n[l])&&(i=n[l]);else for(var u in n)if(n.hasOwnProperty(u)&&Em(n[u])&&!a[f(n[u])]){i=n[u];break}i&&(a[f(i)]=!0);function f(h){return h.dim+"_"+h.index}}function Em(r){return r&&r.type!=="category"&&r.type!=="time"&&uR(r)}function uE(r,t){var e=r.getExtent(),a=e[0]+e[1];r.toGlobalCoord=r.dim==="x"?function(n){return n+t}:function(n){return a-n+t},r.toLocalCoord=r.dim==="x"?function(n){return n-t}:function(n){return a-n+t}}function pv(r,t){M(r.x,function(e){return km(e,t.x,t.width)}),M(r.y,function(e){return km(e,t.y,t.height)})}function km(r,t,e){var a=[0,e],n=r.inverse?1:0;r.setExtent(a[n],a[1-n]),uE(r,t)}var gv;function fE(r){gv=r}function Om(r,t,e,a,n,i,o){L1(a,n,lr.estimate,t,!1,o);var s=[0,0,0,0];u(0),u(1),f(a,0,NaN),f(a,1,NaN);var l=Q_(s,function(v){return v>0})==null;return eu(a,s,!0,!0,e),pv(n,a),l;function u(v){M(n[ua[v]],function(c){if(jo(c.model)){var d=i.ensureRecord(c.model),p=d.labelInfoList;if(p)for(var g=0;g<p.length;g++){var y=p[g],m=c.scale.normalize(Jo(y.label).tickValue);m=v===1?1-m:m,f(y.rect,v,m),f(y.rect,1-v,NaN)}var _=d.nameLayout;if(_){var m=Ti(d.nameLocation)?.5:NaN;f(_.rect,v,m),f(_.rect,1-v,NaN)}}})}function f(v,c,d){var p=r[ua[c]]-v[ua[c]],g=v[bi[c]]+v[ua[c]]-(r[bi[c]]+r[ua[c]]);p=h(p,1-d),g=h(g,d);var y=Pm[c][0],m=Pm[c][1];s[y]=Ae(s[y],p),s[m]=Ae(s[m],g)}function h(v,c){return v>0&&!Hr(c)&&c>1e-4&&(v/=c),v}}function hE(r,t,e,a,n){var i=new x1(vE);return M(e,function(o){return M(o,function(s){if(jo(s.model)){var l=!a;s.axisBuilder=oE(r,t,s.model,n,i,l)}})}),i}function L1(r,t,e,a,n,i){var o=e===lr.determine;M(t,function(u){return M(u,function(f){jo(f.model)&&(sE(f.axisBuilder,r,f.model),f.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:n}))})});var s={x:0,y:0};l(0),l(1);function l(u){s[ua[1-u]]=r[bi[u]]<=i.refContainer[bi[u]]*.5?0:1-u===1?2:1}M(t,function(u,f){return M(u,function(h){jo(h.model)&&((a==="all"||o)&&h.axisBuilder.build({axisName:!0},{nameMarginLevel:s[f]}),o&&h.axisBuilder.build({axisLine:!0}))})})}function cE(r,t,e){var a,n=r.get("outerBoundsMode",!0);n==="same"?a=t.clone():(n==null||n==="auto")&&(a=ne(r.get("outerBounds",!0)||S1,e.refContainer));var i=r.get("outerBoundsContain",!0),o;i==null||i==="auto"||dt(["all","axisLabel"],i)<0?o="all":o=i;var s=[Mc(et(r.get("outerBoundsClampWidth",!0),_u[0]),t.width),Mc(et(r.get("outerBoundsClampHeight",!0),_u[1]),t.height)];return{outerBoundsRect:a,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var vE=function(r,t,e,a,n,i){var o=e.axis.dim==="x"?"y":"x";w1(r,t,e,a,n,i),Ti(r.nameLocation)||M(t.recordMap[o],function(s){s&&s.labelInfoList&&s.dirVec&&C1(s.labelInfoList,s.dirVec,a,n)})};function dE(){fE(pE)}function pE(r,t){M(r,function(e){if(!e.model.get(["axisLabel","inside"])){var a=gE(e);if(a){var n=e.isHorizontal()?"height":"width",i=e.model.get(["axisLabel","margin"]);t[n]-=a[n]+i,e.position==="top"?t.y+=a.height+i:e.position==="left"&&(t.x+=a.width+i)}}})}function gE(r){var t=r.model,e=r.scale;if(!t.get(["axisLabel","show"])||e.isBlank())return;var a,n,i=e.getExtent();e instanceof jd?n=e.count():(a=e.getTicks(),n=a.length);var o=r.getLabelModel(),s=Ni(r),l,u=1;n>40&&(u=Math.ceil(n/40));for(var f=0;f<n;f+=u){var h=a?a[f]:{value:i[0]+f},v=s(h,f),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,S=g.height,x=_*Math.abs(Math.cos(m))+Math.abs(S*Math.sin(m)),b=_*Math.abs(Math.sin(m))+Math.abs(S*Math.cos(m)),w=new ot(g.x,g.y,x,b);return w}}var yE=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return t.prototype.getInitialData=function(e,a){return Bn(null,this,{useEncodeDefaulter:!0})},t.prototype.getProgressive=function(){var e=this.option.progressive;return e??(this.option.large?5e3:this.get("progressive"))},t.prototype.getProgressiveThreshold=function(){var e=this.option.progressiveThreshold;return e??(this.option.large?1e4:this.get("progressiveThreshold"))},t.prototype.brushSelector=function(e,a,n){return n.point(a.getItemLayout(e))},t.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},t.type="series.scatter",t.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:N.color.primary}},universalTransition:{divideShape:"clone"}},t})(Ut);function ip(r,t){var e=r.mapDimensionsAll("defaultedLabel"),a=e.length;if(a===1){var n=wi(r,t,e[0]);return n!=null?n+"":null}else if(a){for(var i=[],o=0;o<e.length;o++)i.push(wi(r,t,e[o]));return i.join(" ")}}function I1(r,t){var e=r.mapDimensionsAll("defaultedLabel");if(!H(t))return t+"";for(var a=[],n=0;n<e.length;n++){var i=r.getDimensionIndex(e[n]);i>=0&&a.push(t[i])}return a.join(" ")}var op=(function(r){B(t,r);function t(e,a,n,i){var o=r.call(this)||this;return o.updateData(e,a,n,i),o}return t.prototype._createSymbol=function(e,a,n,i,o,s){this.removeAll();var l=le(e,-1,-1,2,2,null,s);l.attr({z2:et(o,100),culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),l.drift=mE,this._symbolType=e,this.add(l)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){Ta(this.childAt(0))},t.prototype.downplay=function(){Ca(this.childAt(0))},t.prototype.setZ=function(e,a){var n=this.childAt(0);n.zlevel=e,n.z=a},t.prototype.setDraggable=function(e,a){var n=this.childAt(0);n.draggable=e,n.cursor=!a&&e?"move":n.cursor},t.prototype.updateData=function(e,a,n,i){this.silent=!1;var o=e.getItemVisual(a,"symbol")||"circle",s=e.hostModel,l=t.getSymbolSize(e,a),u=t.getSymbolZ2(e,a),f=o!==this._symbolType,h=i&&i.disableAnimation;if(f){var v=e.getItemVisual(a,"symbolKeepAspect");this._createSymbol(o,e,a,l,u,v)}else{var c=this.childAt(0);c.silent=!1;var d={scaleX:l[0]/2,scaleY:l[1]/2};h?c.attr(d):Et(c,d,s,a),$r(c)}if(this._updateCommon(e,a,l,n,i),f){var c=this.childAt(0);if(!h){var d={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:c.style.opacity}};c.scaleX=c.scaleY=0,c.style.opacity=0,zt(c,d,s,a)}}h&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(e,a,n,i,o){var s=this.childAt(0),l=e.hostModel,u,f,h,v,c,d,p,g,y;if(i&&(u=i.emphasisItemStyle,f=i.blurItemStyle,h=i.selectItemStyle,v=i.focus,c=i.blurScope,p=i.labelStatesModels,g=i.hoverScale,y=i.cursorStyle,d=i.emphasisDisabled),!i||e.hasItemOption){var m=i&&i.itemModel?i.itemModel:e.getItemModel(a),_=m.getModel("emphasis");u=_.getModel("itemStyle").getItemStyle(),h=m.getModel(["select","itemStyle"]).getItemStyle(),f=m.getModel(["blur","itemStyle"]).getItemStyle(),v=_.get("focus"),c=_.get("blurScope"),d=_.get("disabled"),p=Te(m),g=_.getShallow("scale"),y=m.getShallow("cursor")}var S=e.getItemVisual(a,"symbolRotate");s.attr("rotation",(S||0)*Math.PI/180||0);var x=af(e.getItemVisual(a,"symbolOffset"),n);x&&(s.x=x[0],s.y=x[1]),y&&s.attr("cursor",y);var b=e.getItemVisual(a,"style"),w=b.fill;if(s instanceof Xe){var T=s.style;s.useStyle(F({image:T.image,x:T.x,y:T.y,width:T.width,height:T.height},b))}else s.__isEmptyBrush?s.useStyle(F({},b)):s.useStyle(b),s.style.decal=null,s.setColor(w,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var D=e.getItemVisual(a,"liftZ"),A=this._z2;D!=null?A==null&&(this._z2=s.z2,s.z2+=D):A!=null&&(s.z2=A,this._z2=null);var C=o&&o.useNameLabel;Ue(s,p,{labelFetcher:l,labelDataIndex:a,defaultText:I,inheritColor:w,defaultOpacity:b.opacity});function I(R){return C?e.getName(R):ip(e,R)}this._sizeX=n[0]/2,this._sizeY=n[1]/2;var L=s.ensureState("emphasis");L.style=u,s.ensureState("select").style=h,s.ensureState("blur").style=f;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),ae(this,v,c,d)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,a,n){var i=this.childAt(0),o=vt(this).dataIndex,s=n&&n.animation;if(this.silent=i.silent=!0,n&&n.fadeLabel){var l=i.getTextContent();l&&tu(l,{style:{opacity:0}},a,{dataIndex:o,removeOpt:s,cb:function(){i.removeTextContent()}})}else i.removeTextContent();tu(i,{style:{opacity:0},scaleX:0,scaleY:0},a,{dataIndex:o,cb:e,removeOpt:s})},t.getSymbolSize=function(e,a){return rf(e.getItemVisual(a,"symbolSize"))},t.getSymbolZ2=function(e,a){return e.getItemVisual(a,"z2")},t})(yt);function mE(r,t){this.parent.drift(r,t)}function Ah(r,t,e,a){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(a.isIgnore&&a.isIgnore(e))&&!(a.clipShape&&!a.clipShape.contain(t[0],t[1]))&&r.getItemVisual(e,"symbol")!=="none"}function Bm(r){return r!=null&&!j(r)&&(r={isIgnore:r}),r||{}}function Nm(r){var t=r.hostModel,e=t.getModel("emphasis");return{emphasisItemStyle:e.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:e.get("focus"),blurScope:e.get("blurScope"),emphasisDisabled:e.get("disabled"),hoverScale:e.get("scale"),labelStatesModels:Te(t),cursorStyle:t.get("cursor")}}var sp=(function(){function r(t){this.group=new yt,this._SymbolCtor=t||op}return r.prototype.updateData=function(t,e){this._progressiveEls=null,e=Bm(e);var a=this.group,n=t.hostModel,i=this._data,o=this._SymbolCtor,s=e.disableAnimation,l=Nm(t),u={disableAnimation:s},f=e.getSymbolPoint||function(h){return t.getItemLayout(h)};i||a.removeAll(),t.diff(i).add(function(h){var v=f(h);if(Ah(t,v,h,e)){var c=new o(t,h,l,u);c.setPosition(v),t.setItemGraphicEl(h,c),a.add(c)}}).update(function(h,v){var c=i.getItemGraphicEl(v),d=f(h);if(!Ah(t,d,h,e)){a.remove(c);return}var p=t.getItemVisual(h,"symbol")||"circle",g=c&&c.getSymbolType&&c.getSymbolType();if(!c||g&&g!==p)a.remove(c),c=new o(t,h,l,u),c.setPosition(d);else{c.updateData(t,h,l,u);var y={x:d[0],y:d[1]};s?c.attr(y):Et(c,y,n)}a.add(c),t.setItemGraphicEl(h,c)}).remove(function(h){var v=i.getItemGraphicEl(h);v&&v.fadeOut(function(){a.remove(v)},n)}).execute(),this._getSymbolPoint=f,this._data=t},r.prototype.updateLayout=function(){var t=this,e=this._data;e&&e.eachItemGraphicEl(function(a,n){var i=t._getSymbolPoint(n);a.setPosition(i),a.markRedraw()})},r.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=Nm(t),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(t,e,a){this._progressiveEls=[],a=Bm(a);function n(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var i=t.start;i<t.end;i++){var o=e.getItemLayout(i);if(Ah(e,o,i,a)){var s=new this._SymbolCtor(e,i,this._seriesScope);s.traverse(n),s.setPosition(o),this.group.add(s),e.setItemGraphicEl(i,s),this._progressiveEls.push(s)}}},r.prototype.eachRendered=function(t){ki(this._progressiveEls||this.group,t)},r.prototype.remove=function(t){var e=this.group,a=this._data;a&&t?a.eachItemGraphicEl(function(n){n.fadeOut(function(){e.remove(n)},a.hostModel)}):e.removeAll()},r})(),P1=4,_E=(function(){function r(){}return r})(),SE=(function(r){B(t,r);function t(e){var a=r.call(this,e)||this;return a._off=0,a.hoverDataIdx=-1,a}return t.prototype.getDefaultShape=function(){return new _E},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.buildPath=function(e,a){var n=a.points,i=a.size,o=this.symbolProxy,s=o.shape,l=e.getContext?e.getContext():e,u=l&&i[0]<P1,f=this.softClipShape,h;if(u){this._ctx=l;return}for(this._ctx=null,h=this._off;h<n.length;){var v=n[h++],c=n[h++];isNaN(v)||isNaN(c)||f&&!f.contain(v,c)||(s.x=v-i[0]/2,s.y=c-i[1]/2,s.width=i[0],s.height=i[1],o.buildPath(e,s,!0))}this.incremental&&(this._off=h,this.notClear=!0)},t.prototype.afterBrush=function(){var e=this.shape,a=e.points,n=e.size,i=this._ctx,o=this.softClipShape,s;if(i){for(s=this._off;s<a.length;){var l=a[s++],u=a[s++];isNaN(l)||isNaN(u)||o&&!o.contain(l,u)||i.fillRect(l-n[0]/2,u-n[1]/2,n[0],n[1])}this.incremental&&(this._off=s,this.notClear=!0)}},t.prototype.findDataIndex=function(e,a){for(var n=this.shape,i=n.points,o=n.size,s=Math.max(o[0],4),l=Math.max(o[1],4),u=i.length/2-1;u>=0;u--){var f=u*2,h=i[f]-s/2,v=i[f+1]-l/2;if(e>=h&&a>=v&&e<=h+s&&a<=v+l)return u}return-1},t.prototype.contain=function(e,a){var n=this.transformCoordToLocal(e,a),i=this.getBoundingRect();if(e=n[0],a=n[1],i.contain(e,a)){var o=this.hoverDataIdx=this.findDataIndex(e,a);return o>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var a=this.shape,n=a.points,i=a.size,o=i[0],s=i[1],l=1/0,u=1/0,f=-1/0,h=-1/0,v=0;v<n.length;){var c=n[v++],d=n[v++];l=Math.min(c,l),f=Math.max(c,f),u=Math.min(d,u),h=Math.max(d,h)}e=this._rect=new ot(l-o/2,u-s/2,f-l+o,h-u+s)}return e},t})(xt),bE=(function(){function r(){this.group=new yt}return r.prototype.updateData=function(t,e){this._clear();var a=this._create();a.setShape({points:t.getLayout("points")}),this._setCommon(a,t,e)},r.prototype.updateLayout=function(t){var e=t.getLayout("points");this.group.eachChild(function(a){if(a.startIndex!=null){var n=(a.endIndex-a.startIndex)*2,i=a.startIndex*4*2;e=new Float32Array(e.buffer,i,n)}a.setShape("points",e),a.reset()})},r.prototype.incrementalPrepareUpdate=function(t){this._clear()},r.prototype.incrementalUpdate=function(t,e,a){var n=this._newAdded[0],i=e.getLayout("points"),o=n&&n.shape.points;if(o&&o.length<2e4){var s=o.length,l=new Float32Array(s+i.length);l.set(o),l.set(i,s),n.endIndex=t.end,n.setShape({points:l})}else{this._newAdded=[];var u=this._create();u.startIndex=t.start,u.endIndex=t.end,u.incremental=!0,u.setShape({points:i}),this._setCommon(u,e,a)}},r.prototype.eachRendered=function(t){this._newAdded[0]&&t(this._newAdded[0])},r.prototype._create=function(){var t=new SE({cursor:"default"});return t.ignoreCoarsePointer=!0,this.group.add(t),this._newAdded.push(t),t},r.prototype._setCommon=function(t,e,a){var n=e.hostModel;a=a||{};var i=e.getVisual("symbolSize");t.setShape("size",i instanceof Array?i:[i,i]),t.softClipShape=a.clipShape||null,t.symbolProxy=le(e.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var o=t.shape.size[0]<P1;t.useStyle(n.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var s=e.getVisual("style"),l=s&&s.fill;l&&t.setColor(l);var u=vt(t);u.seriesIndex=n.seriesIndex,t.on("mousemove",function(f){u.dataIndex=null;var h=t.hoverDataIdx;h>=0&&(u.dataIndex=h+(t.startIndex||0))})},r.prototype.remove=function(){this._clear()},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r})();function lp(r,t){return{seriesType:r,plan:Hd(),reset:function(e){var a=e.getData(),n=e.coordinateSystem,i=e.pipelineContext,o=t||i.large;if(n){var s=U(n.dimensions,function(c){return a.mapDimension(c)}).slice(0,2),l=s.length,u=a.getCalculationInfo("stackResultDimension");In(a,s[0])&&(s[0]=u),In(a,s[1])&&(s[1]=u);var f=a.getStore(),h=a.getDimensionIndex(s[0]),v=a.getDimensionIndex(s[1]);return l&&{progress:function(c,d){for(var p=c.end-c.start,g=o&&Fr(p*l),y=[],m=[],_=c.start,S=0;_<c.end;_++){var x=void 0;if(l===1){var b=f.get(h,_);x=n.dataToPoint(b,null,m)}else y[0]=f.get(h,_),y[1]=f.get(v,_),x=n.dataToPoint(y,null,m);o?(g[S++]=x[0],g[S++]=x[1]):d.setItemLayout(_,x.slice())}o&&d.setLayout("points",g)}}}}}}var xE=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){var i=e.getData(),o=this._updateSymbolDraw(i,e);o.updateData(i,{clipShape:this._getClipShape(e)}),this._finished=!0},t.prototype.incrementalPrepareRender=function(e,a,n){var i=e.getData(),o=this._updateSymbolDraw(i,e);o.incrementalPrepareUpdate(i),this._finished=!1},t.prototype.incrementalRender=function(e,a,n){this._symbolDraw.incrementalUpdate(e,a.getData(),{clipShape:this._getClipShape(a)}),this._finished=e.end===a.getData().count()},t.prototype.updateTransform=function(e,a,n){var i=e.getData();if(this.group.dirty(),!this._finished||i.count()>1e4)return{update:!0};var o=lp("").reset(e,a,n);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout(i)},t.prototype.eachRendered=function(e){this._symbolDraw&&this._symbolDraw.eachRendered(e)},t.prototype._getClipShape=function(e){if(e.get("clip",!0)){var a=e.coordinateSystem;return a&&a.getArea&&a.getArea(.1)}},t.prototype._updateSymbolDraw=function(e,a){var n=this._symbolDraw,i=a.pipelineContext,o=i.large;return(!n||o!==this._isLargeDraw)&&(n&&n.remove(),n=this._symbolDraw=o?new bE:new sp,this._isLargeDraw=o,this.group.removeAll()),this.group.add(n.group),n},t.prototype.remove=function(e,a){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type="scatter",t})(Vt),yv=(function(r){B(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",ee).models[0]},t.type="cartesian2dAxis",t})(mt);fe(yv,ep);var R1={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:N.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:N.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:N.color.axisSplitLine,width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:[N.color.backgroundTint,N.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:N.color.neutral00,borderColor:N.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:"auto"}},wE=ft({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},R1),up=ft({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:N.color.axisMinorSplitLine,width:1}}},R1),TE=ft({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},up),CE=gt({logBase:10},up);const E1={category:wE,value:up,time:TE,log:CE};var ME={value:1,category:1,time:1,log:1};function mv(r,t,e,a){M(ME,function(n,i){var o=ft(ft({},E1[i],!0),a,!0),s=(function(l){B(u,l);function u(){var f=l!==null&&l.apply(this,arguments)||this;return f.type=t+"Axis."+i,f}return u.prototype.mergeDefaultAndTheme=function(f,h){var v=Zo(this),c=v?Bi(f):{},d=h.getTheme();ft(f,d.get(i+"Axis")),ft(f,this.getDefaultOption()),f.type=zm(f),v&&Ma(f,c,v)},u.prototype.optionUpdated=function(){var f=this.option;f.type==="category"&&(this.__ordinalMeta=uv.createByAxisModel(this))},u.prototype.getCategories=function(f){var h=this.option;if(h.type==="category")return f?h.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.prototype.updateAxisBreaks=function(f){return{breaks:[]}},u.type=t+"Axis."+i,u.defaultOption=o,u})(e);r.registerComponentModel(s)}),r.registerSubTypeDefaulter(t+"Axis",zm)}function zm(r){return r.type||(r.data?"category":"value")}function AE(r,t){var e={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return DE(e,r,t),e.seriesInvolved&&IE(e,r),e}function DE(r,t,e){var a=t.getComponent("tooltip"),n=t.getComponent("axisPointer"),i=n.get("link",!0)||[],o=[];M(e.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var l=ts(s.model),u=r.coordSysAxesInfo[l]={};r.coordSysMap[l]=s;var f=s.model,h=f.getModel("tooltip",a);if(M(s.getAxes(),it(p,!1,null)),s.getTooltipAxes&&a&&h.get("show")){var v=h.get("trigger")==="axis",c=h.get(["axisPointer","type"])==="cross",d=s.getTooltipAxes(h.get(["axisPointer","axis"]));(v||c)&&M(d.baseAxes,it(p,c?"cross":!0,v)),c&&M(d.otherAxes,it(p,"cross",!1))}function p(g,y,m){var _=m.model.getModel("axisPointer",n),S=_.get("show");if(!(!S||S==="auto"&&!g&&!_v(_))){y==null&&(y=_.get("triggerTooltip")),_=g?LE(m,h,n,t,g,y):_;var x=_.get("snap"),b=_.get("triggerEmphasis"),w=ts(m.model),T=y||x||m.type==="category",D=r.axesInfo[w]={key:w,axis:m,coordSys:s,axisPointerModel:_,triggerTooltip:y,triggerEmphasis:b,involveSeries:T,snap:x,useHandle:_v(_),seriesModels:[],linkGroup:null};u[w]=D,r.seriesInvolved=r.seriesInvolved||T;var A=PE(i,m);if(A!=null){var C=o[A]||(o[A]={axesInfo:{}});C.axesInfo[w]=D,C.mapper=i[A].mapper,D.linkGroup=C}}}})}function LE(r,t,e,a,n,i){var o=t.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],l={};M(s,function(v){l[v]=J(o.get(v))}),l.snap=r.type!=="category"&&!!i,o.get("type")==="cross"&&(l.type="line");var u=l.label||(l.label={});if(u.show==null&&(u.show=!1),n==="cross"){var f=o.get(["label","show"]);if(u.show=f??!0,!i){var h=l.lineStyle=o.get("crossStyle");h&>(u,h.textStyle)}}return r.model.getModel("axisPointer",new Dt(l,e,a))}function IE(r,t){t.eachSeries(function(e){var a=e.coordinateSystem,n=e.get(["tooltip","trigger"],!0),i=e.get(["tooltip","show"],!0);!a||!a.model||n==="none"||n===!1||n==="item"||i===!1||e.get(["axisPointer","show"],!0)===!1||M(r.coordSysAxesInfo[ts(a.model)],function(o){var s=o.axis;a.getAxis(s.dim)===s&&(o.seriesModels.push(e),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=e.getData().count())})})}function PE(r,t){for(var e=t.model,a=t.dim,n=0;n<r.length;n++){var i=r[n]||{};if(Dh(i[a+"AxisId"],e.id)||Dh(i[a+"AxisIndex"],e.componentIndex)||Dh(i[a+"AxisName"],e.name))return n}}function Dh(r,t){return r==="all"||H(r)&&dt(r,t)>=0||r===t}function RE(r){var t=fp(r);if(t){var e=t.axisPointerModel,a=t.axis.scale,n=e.option,i=e.get("status"),o=e.get("value");o!=null&&(o=a.parse(o));var s=_v(e);i==null&&(n.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]),n.value=o,s&&(n.status=t.axis.scale.isBlank()?"hide":"show")}}function fp(r){var t=(r.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[ts(r)]}function EE(r){var t=fp(r);return t&&t.axisPointerModel}function _v(r){return!!r.get(["handle","show"])}function ts(r){return r.type+"||"+r.id}var Vm={},k1=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n,i){this.axisPointerClass&&RE(e),r.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(e,n,!0)},t.prototype.updateAxisPointer=function(e,a,n,i){this._doUpdateAxisPointerClass(e,n,!1)},t.prototype.remove=function(e,a){var n=this._axisPointer;n&&n.remove(a)},t.prototype.dispose=function(e,a){this._disposeAxisPointer(a),r.prototype.dispose.apply(this,arguments)},t.prototype._doUpdateAxisPointerClass=function(e,a,n){var i=t.getAxisPointerClass(this.axisPointerClass);if(i){var o=EE(e);o?(this._axisPointer||(this._axisPointer=new i)).render(e,o,a,n):this._disposeAxisPointer(a)}},t.prototype._disposeAxisPointer=function(e){this._axisPointer&&this._axisPointer.dispose(e),this._axisPointer=null},t.registerAxisPointerClass=function(e,a){Vm[e]=a},t.getAxisPointerClass=function(e){return e&&Vm[e]},t.type="axis",t})($t),Sv=wt();function kE(r,t,e,a){var n=e.axis;if(!n.scale.isBlank()){var i=e.getModel("splitArea"),o=i.getModel("areaStyle"),s=o.get("color"),l=a.coordinateSystem.getRect(),u=n.getTicksCoords({tickModel:i,clamp:!0,breakTicks:"none",pruneByBreak:"preserve_extent_bound"});if(u.length){var f=s.length,h=Sv(r).splitAreaColors,v=nt(),c=0;if(h)for(var d=0;d<u.length;d++){var p=h.get(u[d].tickValue);if(p!=null){c=(p+(f-1)*d)%f;break}}var g=n.toGlobalCoord(u[0].coord),y=o.getAreaStyle();s=H(s)?s:[s];for(var d=1;d<u.length;d++){var m=n.toGlobalCoord(u[d].coord),_=void 0,S=void 0,x=void 0,b=void 0;n.isHorizontal()?(_=g,S=l.y,x=m-_,b=l.height,g=_+x):(_=l.x,S=g,x=l.width,b=m-S,g=S+b);var w=u[d-1].tickValue;w!=null&&v.set(w,c),t.add(new _t({anid:w!=null?"area_"+w:null,shape:{x:_,y:S,width:x,height:b},style:gt({fill:s[c]},y),autoBatch:!0,silent:!0})),c=(c+1)%f}Sv(r).splitAreaColors=v}}}function OE(r){Sv(r).splitAreaColors=null}var BE=["splitArea","splitLine","minorSplitLine","breakArea"],O1=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.axisPointerClass="CartesianAxisPointer",e}return t.prototype.render=function(e,a,n,i){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new yt,this.group.add(this._axisGroup),!!jo(e)){this._axisGroup.add(e.axis.axisBuilder.group),M(BE,function(l){e.get([l,"show"])&&NE[l](this,this._axisGroup,e,e.getCoordSysModel(),n)},this);var s=i&&i.type==="changeAxisOrder"&&i.isInitSort;s||yd(o,this._axisGroup,e),r.prototype.render.call(this,e,a,n,i)}},t.prototype.remove=function(){OE(this)},t.type="cartesianAxis",t})(k1),NE={splitLine:function(r,t,e,a,n){var i=e.axis;if(!i.scale.isBlank()){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=o.get("showMinLine")!==!1,f=o.get("showMaxLine")!==!1;l=H(l)?l:[l];for(var h=a.coordinateSystem.getRect(),v=i.isHorizontal(),c=0,d=i.getTicksCoords({tickModel:o,breakTicks:"none",pruneByBreak:"preserve_extent_bound"}),p=[],g=[],y=s.getLineStyle(),m=0;m<d.length;m++){var _=i.toGlobalCoord(d[m].coord);if(!(m===0&&!u||m===d.length-1&&!f)){var S=d[m].tickValue;v?(p[0]=_,p[1]=h.y,g[0]=_,g[1]=h.y+h.height):(p[0]=h.x,p[1]=_,g[0]=h.x+h.width,g[1]=_);var x=c++%l.length,b=new sr({anid:S!=null?"line_"+S:null,autoBatch:!0,shape:{x1:p[0],y1:p[1],x2:g[0],y2:g[1]},style:gt({stroke:l[x]},y),silent:!0});Uo(b.shape,y.lineWidth),t.add(b)}}}},minorSplitLine:function(r,t,e,a,n){var i=e.axis,o=e.getModel("minorSplitLine"),s=o.getModel("lineStyle"),l=a.coordinateSystem.getRect(),u=i.isHorizontal(),f=i.getMinorTicksCoords();if(f.length)for(var h=[],v=[],c=s.getLineStyle(),d=0;d<f.length;d++)for(var p=0;p<f[d].length;p++){var g=i.toGlobalCoord(f[d][p].coord);u?(h[0]=g,h[1]=l.y,v[0]=g,v[1]=l.y+l.height):(h[0]=l.x,h[1]=g,v[0]=l.x+l.width,v[1]=g);var y=new sr({anid:"minor_line_"+f[d][p].tickValue,autoBatch:!0,shape:{x1:h[0],y1:h[1],x2:v[0],y2:v[1]},style:c,silent:!0});Uo(y.shape,c.lineWidth),t.add(y)}},splitArea:function(r,t,e,a,n){kE(r,t,e,a)},breakArea:function(r,t,e,a,n){e.axis.scale}},B1=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="xAxis",t})(O1),zE=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=B1.type,e}return t.type="yAxis",t})(O1),VE=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="grid",e}return t.prototype.render=function(e,a){this.group.removeAll(),e.get("show")&&this.group.add(new _t({shape:e.coordinateSystem.getRect(),style:gt({fill:e.get("backgroundColor")},e.getItemStyle()),silent:!0,z2:-1}))},t.type="grid",t})($t),Fm={offset:0};function N1(r){r.registerComponentView(VE),r.registerComponentModel(UR),r.registerCoordinateSystem("cartesian2d",lE),mv(r,"x",yv,Fm),mv(r,"y",yv,Fm),r.registerComponentView(B1),r.registerComponentView(zE),r.registerPreprocessor(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})})}function FE(r){ue(N1),r.registerSeriesModel(yE),r.registerChartView(xE),r.registerLayout(lp("scatter"))}var GE=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return t.prototype.getInitialData=function(e){return Bn(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var a=new yt,n=le("line",0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);a.add(n),n.setStyle(e.lineStyle);var i=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),s=i==="none"?"circle":i,l=e.itemHeight*.8,u=le(s,(e.itemWidth-l)/2,(e.itemHeight-l)/2,l,l,e.itemStyle.fill);a.add(u),u.setStyle(e.itemStyle);var f=e.iconRotate==="inherit"?o:e.iconRotate||0;return u.rotation=f*Math.PI/180,u.setOrigin([e.itemWidth/2,e.itemHeight/2]),s.indexOf("empty")>-1&&(u.style.stroke=u.style.fill,u.style.fill=N.color.neutral00,u.style.lineWidth=2),a},t.type="series.line",t.dependencies=["grid","polar"],t.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},t})(Ut);function z1(r,t,e){var a=r.getBaseAxis(),n=r.getOtherAxis(a),i=HE(n,e),o=a.dim,s=n.dim,l=t.mapDimension(s),u=t.mapDimension(o),f=s==="x"||s==="radius"?1:0,h=U(r.dimensions,function(d){return t.mapDimension(d)}),v=!1,c=t.getCalculationInfo("stackResultDimension");return In(t,h[0])&&(v=!0,h[0]=c),In(t,h[1])&&(v=!0,h[1]=c),{dataDimsForPoint:h,valueStart:i,valueAxisDim:s,baseAxisDim:o,stacked:!!v,valueDim:l,baseDim:u,baseDataOffset:f,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}}function HE(r,t){var e=0,a=r.scale.getExtent();return t==="start"?e=a[0]:t==="end"?e=a[1]:bt(t)&&!isNaN(t)?e=t:a[0]>0?e=a[0]:a[1]<0&&(e=a[1]),e}function V1(r,t,e,a){var n=NaN;r.stacked&&(n=e.get(e.getCalculationInfo("stackedOverDimension"),a)),isNaN(n)&&(n=r.valueStart);var i=r.baseDataOffset,o=[];return o[i]=e.get(r.baseDim,a),o[1-i]=n,t.dataToPoint(o)}function WE(r,t){var e=[];return t.diff(r).add(function(a){e.push({cmd:"+",idx:a})}).update(function(a,n){e.push({cmd:"=",idx:n,idx1:a})}).remove(function(a){e.push({cmd:"-",idx:a})}).execute(),e}function UE(r,t,e,a,n,i,o,s){for(var l=WE(r,t),u=[],f=[],h=[],v=[],c=[],d=[],p=[],g=z1(n,t,o),y=r.getLayout("points")||[],m=t.getLayout("points")||[],_=0;_<l.length;_++){var S=l[_],x=!0,b=void 0,w=void 0;switch(S.cmd){case"=":b=S.idx*2,w=S.idx1*2;var T=y[b],D=y[b+1],A=m[w],C=m[w+1];(isNaN(T)||isNaN(D))&&(T=A,D=C),u.push(T,D),f.push(A,C),h.push(e[b],e[b+1]),v.push(a[w],a[w+1]),p.push(t.getRawIndex(S.idx1));break;case"+":var I=S.idx,L=g.dataDimsForPoint,P=n.dataToPoint([t.get(L[0],I),t.get(L[1],I)]);w=I*2,u.push(P[0],P[1]),f.push(m[w],m[w+1]);var R=V1(g,n,t,I);h.push(R[0],R[1]),v.push(a[w],a[w+1]),p.push(t.getRawIndex(I));break;case"-":x=!1}x&&(c.push(S),d.push(d.length))}d.sort(function(lt,Ct){return p[lt]-p[Ct]});for(var E=u.length,O=Fr(E),k=Fr(E),z=Fr(E),V=Fr(E),G=[],_=0;_<d.length;_++){var W=d[_],Z=_*2,rt=W*2;O[Z]=u[rt],O[Z+1]=u[rt+1],k[Z]=f[rt],k[Z+1]=f[rt+1],z[Z]=h[rt],z[Z+1]=h[rt+1],V[Z]=v[rt],V[Z+1]=v[rt+1],G[_]=c[W]}return{current:O,next:k,stackedOnCurrent:z,stackedOnNext:V,status:G}}var aa=Math.min,na=Math.max;function Tn(r,t){return isNaN(r)||isNaN(t)}function bv(r,t,e,a,n,i,o,s,l){for(var u,f,h,v,c,d,p=e,g=0;g<a;g++){var y=t[p*2],m=t[p*2+1];if(p>=n||p<0)break;if(Tn(y,m)){if(l){p+=i;continue}break}if(p===e)r[i>0?"moveTo":"lineTo"](y,m),h=y,v=m;else{var _=y-u,S=m-f;if(_*_+S*S<.5){p+=i;continue}if(o>0){for(var x=p+i,b=t[x*2],w=t[x*2+1];b===y&&w===m&&g<a;)g++,x+=i,p+=i,b=t[x*2],w=t[x*2+1],y=t[p*2],m=t[p*2+1],_=y-u,S=m-f;var T=g+1;if(l)for(;Tn(b,w)&&T<a;)T++,x+=i,b=t[x*2],w=t[x*2+1];var D=.5,A=0,C=0,I=void 0,L=void 0;if(T>=a||Tn(b,w))c=y,d=m;else{A=b-u,C=w-f;var P=y-u,R=b-y,E=m-f,O=w-m,k=void 0,z=void 0;if(s==="x"){k=Math.abs(P),z=Math.abs(R);var V=A>0?1:-1;c=y-V*k*o,d=m,I=y+V*z*o,L=m}else if(s==="y"){k=Math.abs(E),z=Math.abs(O);var G=C>0?1:-1;c=y,d=m-G*k*o,I=y,L=m+G*z*o}else k=Math.sqrt(P*P+E*E),z=Math.sqrt(R*R+O*O),D=z/(z+k),c=y-A*o*(1-D),d=m-C*o*(1-D),I=y+A*o*D,L=m+C*o*D,I=aa(I,na(b,y)),L=aa(L,na(w,m)),I=na(I,aa(b,y)),L=na(L,aa(w,m)),A=I-y,C=L-m,c=y-A*k/z,d=m-C*k/z,c=aa(c,na(u,y)),d=aa(d,na(f,m)),c=na(c,aa(u,y)),d=na(d,aa(f,m)),A=y-c,C=m-d,I=y+A*z/k,L=m+C*z/k}r.bezierCurveTo(h,v,c,d,y,m),h=I,v=L}else r.lineTo(y,m)}u=y,f=m,p+=i}return g}var F1=(function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r})(),YE=(function(r){B(t,r);function t(e){var a=r.call(this,e)||this;return a.type="ec-polyline",a}return t.prototype.getDefaultStyle=function(){return{stroke:N.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new F1},t.prototype.buildPath=function(e,a){var n=a.points,i=0,o=n.length/2;if(a.connectNulls){for(;o>0&&Tn(n[o*2-2],n[o*2-1]);o--);for(;i<o&&Tn(n[i*2],n[i*2+1]);i++);}for(;i<o;)i+=bv(e,n,i,o,o,1,a.smooth,a.smoothMonotone,a.connectNulls)+1},t.prototype.getPointOn=function(e,a){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var n=this.path,i=n.data,o=Dn.CMD,s,l,u=a==="x",f=[],h=0;h<i.length;){var v=i[h++],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=i[h++],l=i[h++];break;case o.L:if(c=i[h++],d=i[h++],_=u?(e-s)/(c-s):(e-l)/(d-l),_<=1&&_>=0){var S=u?(d-l)*_+l:(c-s)*_+s;return u?[e,S]:[S,e]}s=c,l=d;break;case o.C:c=i[h++],d=i[h++],p=i[h++],g=i[h++],y=i[h++],m=i[h++];var x=u?Ul(s,c,p,y,e,f):Ul(l,d,g,m,e,f);if(x>0)for(var b=0;b<x;b++){var w=f[b];if(w<=1&&w>=0){var S=u?te(l,d,g,m,w):te(s,c,p,y,w);return u?[e,S]:[S,e]}}s=y,l=m;break}}},t})(xt),ZE=(function(r){B(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t})(F1),XE=(function(r){B(t,r);function t(e){var a=r.call(this,e)||this;return a.type="ec-polygon",a}return t.prototype.getDefaultShape=function(){return new ZE},t.prototype.buildPath=function(e,a){var n=a.points,i=a.stackedOnPoints,o=0,s=n.length/2,l=a.smoothMonotone;if(a.connectNulls){for(;s>0&&Tn(n[s*2-2],n[s*2-1]);s--);for(;o<s&&Tn(n[o*2],n[o*2+1]);o++);}for(;o<s;){var u=bv(e,n,o,s,s,1,a.smooth,l,a.connectNulls);bv(e,i,o+u-1,u,s,-1,a.stackedOnSmooth,l,a.connectNulls),o+=u+1,e.closePath()}},t})(xt);function G1(r,t,e,a,n){var i=r.getArea(),o=i.x,s=i.y,l=i.width,u=i.height,f=e.get(["lineStyle","width"])||0;o-=f/2,s-=f/2,l+=f,u+=f,l=Math.ceil(l),o!==Math.floor(o)&&(o=Math.floor(o),l++);var h=new _t({shape:{x:o,y:s,width:l,height:u}});if(t){var v=r.getBaseAxis(),c=v.isHorizontal(),d=v.inverse;c?(d&&(h.shape.x+=l),h.shape.width=0):(d||(h.shape.y+=u),h.shape.height=0);var p=Q(n)?function(g){n(g,h)}:null;zt(h,{shape:{width:l,height:u,x:o,y:s}},e,null,a,p)}return h}function H1(r,t,e){var a=r.getArea(),n=Xt(a.r0,1),i=Xt(a.r,1),o=new or({shape:{cx:Xt(r.cx,1),cy:Xt(r.cy,1),r0:n,r:i,startAngle:a.startAngle,endAngle:a.endAngle,clockwise:a.clockwise}});if(t){var s=r.getBaseAxis().dim==="angle";s?o.shape.endAngle=a.startAngle:o.shape.r=n,zt(o,{shape:{endAngle:a.endAngle,r:i}},e)}return o}function $E(r,t,e,a,n){if(r){if(r.type==="polar")return H1(r,t,e);if(r.type==="cartesian2d")return G1(r,t,e,a,n)}else return null;return null}function Ci(r,t){return r.type===t}function Gm(r,t){if(r.length===t.length){for(var e=0;e<r.length;e++)if(r[e]!==t[e])return;return!0}}function Hm(r){for(var t=1/0,e=1/0,a=-1/0,n=-1/0,i=0;i<r.length;){var o=r[i++],s=r[i++];isNaN(o)||(t=Math.min(o,t),a=Math.max(o,a)),isNaN(s)||(e=Math.min(s,e),n=Math.max(s,n))}return[[t,e],[a,n]]}function Wm(r,t){var e=Hm(r),a=e[0],n=e[1],i=Hm(t),o=i[0],s=i[1];return Math.max(Math.abs(a[0]-o[0]),Math.abs(a[1]-o[1]),Math.abs(n[0]-s[0]),Math.abs(n[1]-s[1]))}function Um(r){return bt(r)?r:r?.5:0}function KE(r,t,e){if(!e.valueDim)return[];for(var a=t.count(),n=Fr(a*2),i=0;i<a;i++){var o=V1(e,r,t,i);n[i*2]=o[0],n[i*2+1]=o[1]}return n}function ia(r,t,e,a,n){var i=e.getBaseAxis(),o=i.dim==="x"||i.dim==="radius"?0:1,s=[],l=0,u=[],f=[],h=[],v=[];if(n){for(l=0;l<r.length;l+=2){var c=t||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(h[0]=r[l+2],h[1]=r[l+3],f[0]=r[l],f[1]=r[l+1],s.push(f[0],f[1]),a){case"end":u[o]=h[o],u[1-o]=f[1-o],s.push(u[0],u[1]);break;case"middle":var d=(f[o]+h[o])/2,p=[];u[o]=p[o]=d,u[1-o]=f[1-o],p[1-o]=h[1-o],s.push(u[0],u[1]),s.push(p[0],p[1]);break;default:u[o]=f[o],u[1-o]=h[1-o],s.push(u[0],u[1])}return s.push(r[l++],r[l++]),s}function qE(r,t){var e=[],a=r.length,n,i;function o(f,h,v){var c=f.coord,d=(v-c)/(h.coord-c),p=GC(d,[f.color,h.color]);return{coord:v,color:p}}for(var s=0;s<a;s++){var l=r[s],u=l.coord;if(u<0)n=l;else if(u>t){i?e.push(o(i,l,t)):n&&e.push(o(n,l,0),o(n,l,t));break}else n&&(e.push(o(n,l,0)),n=null),e.push(l),i=l}return e}function QE(r,t,e){var a=r.getVisual("visualMeta");if(!(!a||!a.length||!r.count())&&t.type==="cartesian2d"){for(var n,i,o=a.length-1;o>=0;o--){var s=r.getDimensionInfo(a[o].dimension);if(n=s&&s.coordDim,n==="x"||n==="y"){i=a[o];break}}if(i){var l=t.getAxis(n),u=U(i.stops,function(_){return{coord:l.toGlobalCoord(l.dataToCoord(_.value)),color:_.color}}),f=u.length,h=i.outerColors.slice();f&&u[0].coord>u[f-1].coord&&(u.reverse(),h.reverse());var v=qE(u,n==="x"?e.getWidth():e.getHeight()),c=v.length;if(!c&&f)return u[0].coord<0?h[1]?h[1]:u[f-1].color:h[0]?h[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:h[1]||"transparent"}),v.unshift({offset:c?v[0].offset:.5,color:h[0]||"transparent"});var m=new $u(0,0,0,0,v,!0);return m[n]=p,m[n+"2"]=g,m}}}function jE(r,t,e){var a=r.get("showAllSymbol"),n=a==="auto";if(!(a&&!n)){var i=e.getAxesByScale("ordinal")[0];if(i&&!(n&&JE(i,t))){var o=t.mapDimension(i.dim),s={};return M(i.getViewLabels(),function(l){var u=i.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(t.get(o,l))}}}}function JE(r,t){var e=r.getExtent(),a=Math.abs(e[1]-e[0])/r.scale.count();isNaN(a)&&(a=0);for(var n=t.count(),i=Math.max(1,Math.round(n/5)),o=0;o<n;o+=i)if(op.getSymbolSize(t,o)[r.isHorizontal()?1:0]*1.5>a)return!1;return!0}function tk(r,t){return isNaN(r)||isNaN(t)}function ek(r){for(var t=r.length/2;t>0&&tk(r[t*2-2],r[t*2-1]);t--);return t-1}function Ym(r,t){return[r[t*2],r[t*2+1]]}function rk(r,t,e){for(var a=r.length/2,n=e==="x"?0:1,i,o,s=0,l=-1,u=0;u<a;u++)if(o=r[u*2+n],!(isNaN(o)||isNaN(r[u*2+1-n]))){if(u===0){i=o;continue}if(i<=t&&o>=t||i>=t&&o<=t){l=u;break}s=u,i=o}return{range:[s,l],t:(t-i)/(o-i)}}function W1(r){if(r.get(["endLabel","show"]))return!0;for(var t=0;t<ye.length;t++)if(r.get([ye[t],"endLabel","show"]))return!0;return!1}function Lh(r,t,e,a){if(Ci(t,"cartesian2d")){var n=a.getModel("endLabel"),i=n.get("valueAnimation"),o=a.getData(),s={lastFrameIndex:0},l=W1(a)?function(c,d){r._endLabelOnDuring(c,d,o,s,i,n,t)}:null,u=t.getBaseAxis().isHorizontal(),f=G1(t,e,a,function(){var c=r._endLabel;c&&e&&s.originalX!=null&&c.attr({x:s.originalX,y:s.originalY})},l);if(!a.get("clip",!0)){var h=f.shape,v=Math.max(h.width,h.height);u?(h.y-=v,h.height+=v*2):(h.x-=v,h.width+=v*2)}return l&&l(1,f),f}else return H1(t,e,a)}function ak(r,t){var e=t.getBaseAxis(),a=e.isHorizontal(),n=e.inverse,i=a?n?"right":"left":"center",o=a?"middle":n?"top":"bottom";return{normal:{align:r.get("align")||i,verticalAlign:r.get("verticalAlign")||o}}}var nk=(function(r){B(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.init=function(){var e=new yt,a=new sp;this.group.add(a.group),this._symbolDraw=a,this._lineGroup=e,this._changePolyState=Y(this._changePolyState,this)},t.prototype.render=function(e,a,n){var i=e.coordinateSystem,o=this.group,s=e.getData(),l=e.getModel("lineStyle"),u=e.getModel("areaStyle"),f=s.getLayout("points")||[],h=i.type==="polar",v=this._coordSys,c=this._symbolDraw,d=this._polyline,p=this._polygon,g=this._lineGroup,y=!a.ssr&&e.get("animation"),m=!u.isEmpty(),_=u.get("origin"),S=z1(i,s,_),x=m&&KE(i,s,S),b=e.get("showSymbol"),w=e.get("connectNulls"),T=b&&!h&&jE(e,s,i),D=this._data;D&&D.eachItemGraphicEl(function(lt,Ct){lt.__temp&&(o.remove(lt),D.setItemGraphicEl(Ct,null))}),b||c.remove(),o.add(g);var A=h?!1:e.get("step"),C;i&&i.getArea&&e.get("clip",!0)&&(C=i.getArea(),C.width!=null?(C.x-=.1,C.y-=.1,C.width+=.2,C.height+=.2):C.r0&&(C.r0-=.5,C.r+=.5)),this._clipShapeForSymbol=C;var I=QE(s,i,n)||s.getVisual("style")[s.getVisual("drawType")];if(!(d&&v.type===i.type&&A===this._step))b&&c.updateData(s,{isIgnore:T,clipShape:C,disableAnimation:!0,getSymbolPoint:function(lt){return[f[lt*2],f[lt*2+1]]}}),y&&this._initSymbolLabelAnimation(s,i,C),A&&(x&&(x=ia(x,f,i,A,w)),f=ia(f,null,i,A,w)),d=this._newPolyline(f),m?p=this._newPolygon(f,x):p&&(g.remove(p),p=this._polygon=null),h||this._initOrUpdateEndLabel(e,i,Ln(I)),g.setClipPath(Lh(this,i,!0,e));else{m&&!p?p=this._newPolygon(f,x):p&&!m&&(g.remove(p),p=this._polygon=null),h||this._initOrUpdateEndLabel(e,i,Ln(I));var L=g.getClipPath();if(L){var P=Lh(this,i,!1,e);zt(L,{shape:P.shape},e)}else g.setClipPath(Lh(this,i,!0,e));b&&c.updateData(s,{isIgnore:T,clipShape:C,disableAnimation:!0,getSymbolPoint:function(lt){return[f[lt*2],f[lt*2+1]]}}),(!Gm(this._stackedOnPoints,x)||!Gm(this._points,f))&&(y?this._doUpdateAnimation(s,x,i,n,A,_,w):(A&&(x&&(x=ia(x,f,i,A,w)),f=ia(f,null,i,A,w)),d.setShape({points:f}),p&&p.setShape({points:f,stackedOnPoints:x})))}var R=e.getModel("emphasis"),E=R.get("focus"),O=R.get("blurScope"),k=R.get("disabled");if(d.useStyle(gt(l.getLineStyle(),{fill:"none",stroke:I,lineJoin:"bevel"})),De(d,e,"lineStyle"),d.style.lineWidth>0&&e.get(["emphasis","lineStyle","width"])==="bolder"){var z=d.getState("emphasis").style;z.lineWidth=+d.style.lineWidth+1}vt(d).seriesIndex=e.seriesIndex,ae(d,E,O,k);var V=Um(e.get("smooth")),G=e.get("smoothMonotone");if(d.setShape({smooth:V,smoothMonotone:G,connectNulls:w}),p){var W=s.getCalculationInfo("stackedOnSeries"),Z=0;p.useStyle(gt(u.getAreaStyle(),{fill:I,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),W&&(Z=Um(W.get("smooth"))),p.setShape({smooth:V,stackedOnSmooth:Z,smoothMonotone:G,connectNulls:w}),De(p,e,"areaStyle"),vt(p).seriesIndex=e.seriesIndex,ae(p,E,O,k)}var rt=this._changePolyState;s.eachItemGraphicEl(function(lt){lt&&(lt.onHoverStateChange=rt)}),this._polyline.onHoverStateChange=rt,this._data=s,this._coordSys=i,this._stackedOnPoints=x,this._points=f,this._step=A,this._valueOrigin=_,e.get("triggerLineEvent")&&(this.packEventData(e,d),p&&this.packEventData(e,p))},t.prototype.packEventData=function(e,a){vt(a).eventData={componentType:"series",componentSubType:"line",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"line"}},t.prototype.highlight=function(e,a,n,i){var o=e.getData(),s=Mn(o,i);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var f=l[s*2],h=l[s*2+1];if(isNaN(f)||isNaN(h)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(f,h))return;var v=e.get("zlevel")||0,c=e.get("z")||0;u=new op(o,s),u.x=f,u.y=h,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 Vt.prototype.highlight.call(this,e,a,n,i)},t.prototype.downplay=function(e,a,n,i){var o=e.getData(),s=Mn(o,i);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 Vt.prototype.downplay.call(this,e,a,n,i)},t.prototype._changePolyState=function(e){var a=this._polygon;Gg(this._polyline,e),a&&Gg(a,e)},t.prototype._newPolyline=function(e){var a=this._polyline;return a&&this._lineGroup.remove(a),a=new YE({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(a),this._polyline=a,a},t.prototype._newPolygon=function(e,a){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new XE({shape:{points:e,stackedOnPoints:a},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.prototype._initSymbolLabelAnimation=function(e,a,n){var i,o,s=a.getBaseAxis(),l=s.inverse;a.type==="cartesian2d"?(i=s.isHorizontal(),o=!1):a.type==="polar"&&(i=s.dim==="angle",o=!0);var u=e.hostModel,f=u.get("animationDuration");Q(f)&&(f=f(null));var h=u.get("animationDelay")||0,v=Q(h)?h(null):h;e.eachItemGraphicEl(function(c,d){var p=c;if(p){var g=[c.x,c.y],y=void 0,m=void 0,_=void 0;if(n)if(o){var S=n,x=a.pointToCoord(g);i?(y=S.startAngle,m=S.endAngle,_=-x[1]/180*Math.PI):(y=S.r0,m=S.r,_=x[0])}else{var b=n;i?(y=b.x,m=b.x+b.width,_=c.x):(y=b.y+b.height,m=b.y,_=c.y)}var w=m===y?0:(_-y)/(m-y);l&&(w=1-w);var T=Q(h)?h(d):f*w+v,D=p.getSymbolPath(),A=D.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}),D.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,a,n){var i=e.getModel("endLabel");if(W1(e)){var o=e.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 Tt({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var f=ek(l);f>=0&&(Ue(s,Te(e,"endLabel"),{inheritColor:n,labelFetcher:e,labelDataIndex:f,defaultText:function(h,v,c){return c!=null?I1(o,c):ip(o,h)},enableTextSetter:!0},ak(i,a)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(e,a,n,i,o,s,l){var u=this._endLabel,f=this._polyline;if(u){e<1&&i.originalX==null&&(i.originalX=u.x,i.originalY=u.y);var h=n.getLayout("points"),v=n.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,S=m?y?_.x:_.y+_.height:y?_.x+_.width:_.y,x=(y?p:0)*(m?-1:1),b=(y?0:-p)*(m?-1:1),w=y?"x":"y",T=rk(h,S,w),D=T.range,A=D[1]-D[0],C=void 0;if(A>=1){if(A>1&&!c){var I=Ym(h,D[0]);u.attr({x:I[0]+x,y:I[1]+b}),o&&(C=v.getRawValue(D[0]))}else{var I=f.getPointOn(S,w);I&&u.attr({x:I[0]+x,y:I[1]+b});var L=v.getRawValue(D[0]),P=v.getRawValue(D[1]);o&&(C=OS(n,d,L,P,T.t))}i.lastFrameIndex=D[0]}else{var R=e===1||i.lastFrameIndex>0?D[0]:0,I=Ym(h,R);o&&(C=v.getRawValue(R)),u.attr({x:I[0]+x,y:I[1]+b})}if(o){var E=ps(u);typeof E.setLabelText=="function"&&E.setLabelText(C)}}},t.prototype._doUpdateAnimation=function(e,a,n,i,o,s,l){var u=this._polyline,f=this._polygon,h=e.hostModel,v=UE(this._data,e,this._stackedOnPoints,a,this._coordSys,n,this._valueOrigin),c=v.current,d=v.stackedOnCurrent,p=v.next,g=v.stackedOnNext;if(o&&(d=ia(v.stackedOnCurrent,v.current,n,o,l),c=ia(v.current,null,n,o,l),g=ia(v.stackedOnNext,v.next,n,o,l),p=ia(v.next,null,n,o,l)),Wm(c,p)>3e3||f&&Wm(d,g)>3e3){u.stopAnimation(),u.setShape({points:p}),f&&(f.stopAnimation(),f.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(),Et(u,y,h),f&&(f.setShape({points:c,stackedOnPoints:d}),f.stopAnimation(),Et(f,{shape:{stackedOnPoints:g}},h),u.shape.points!==f.shape.points&&(f.shape.points=u.shape.points));for(var m=[],_=v.status,S=0;S<_.length;S++){var x=_[S].cmd;if(x==="="){var b=e.getItemGraphicEl(_[S].idx1);b&&m.push({el:b,ptIdx:S})}}u.animators&&u.animators.length&&u.animators[0].during(function(){f&&f.dirtyShape();for(var w=u.shape.__points,T=0;T<m.length;T++){var D=m[T].el,A=m[T].ptIdx*2;D.x=w[A],D.y=w[A+1],D.markRedraw()}})},t.prototype.remove=function(e){var a=this.group,n=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),n&&n.eachItemGraphicEl(function(i,o){i.__temp&&(a.remove(i),n.setItemGraphicEl(o,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},t.type="line",t})(Vt),ik={average:function(r){for(var t=0,e=0,a=0;a<r.length;a++)isNaN(r[a])||(t+=r[a],e++);return e===0?NaN:t/e},sum:function(r){for(var t=0,e=0;e<r.length;e++)t+=r[e]||0;return t},max:function(r){for(var t=-1/0,e=0;e<r.length;e++)r[e]>t&&(t=r[e]);return isFinite(t)?t:NaN},min:function(r){for(var t=1/0,e=0;e<r.length;e++)r[e]<t&&(t=r[e]);return isFinite(t)?t:NaN},nearest:function(r){return r[0]}},ok=function(r){return Math.round(r.length/2)};function U1(r){return{seriesType:r,reset:function(t,e,a){var n=t.getData(),i=t.get("sampling"),o=t.coordinateSystem,s=n.count();if(s>10&&o.type==="cartesian2d"&&i){var l=o.getBaseAxis(),u=o.getOtherAxis(l),f=l.getExtent(),h=a.getDevicePixelRatio(),v=Math.abs(f[1]-f[0])*(h||1),c=Math.round(s/v);if(isFinite(c)&&c>1){i==="lttb"?t.setData(n.lttbDownSample(n.mapDimension(u.dim),1/c)):i==="minmax"&&t.setData(n.minmaxDownSample(n.mapDimension(u.dim),1/c));var d=void 0;X(i)?d=ik[i]:Q(i)&&(d=i),d&&t.setData(n.downSample(n.mapDimension(u.dim),1/c,d,ok))}}}}}function sk(r){r.registerChartView(nk),r.registerSeriesModel(GE),r.registerLayout(lp("line",!0)),r.registerVisual({seriesType:"line",reset:function(t){var e=t.getData(),a=t.getModel("lineStyle").getLineStyle();a&&!a.stroke&&(a.stroke=e.getVisual("style").fill),e.setVisual("legendLineStyle",a)}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,U1("line"))}var xv=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(e,a){return Bn(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,a,n){var i=this.coordinateSystem;if(i&&i.clampData){var o=i.clampData(e),s=i.dataToPoint(o);if(n)M(i.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,S=1,x=0;x<d.length;x++){var b=d[x].coord,w=x===d.length-1?d[x-1].tickValue+S:d[x].tickValue;if(w===g){_=b;break}else if(w<g)m=b;else if(m!=null&&w>g){_=(b+m)/2;break}x===1&&(S=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"),f=l.getLayout("size"),h=i.getBaseAxis().isHorizontal()?0:1;s[h]+=u+f/2}return s}return[NaN,NaN]},t.type="series.__base_bar__",t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",defaultBarGap:"10%"},t})(Ut);Ut.registerClass(xv);var lk=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(){return Bn(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},t.prototype.getProgressiveThreshold=function(){var e=this.get("progressiveThreshold"),a=this.get("largeThreshold");return a>e&&(e=a),e},t.prototype.brushSelector=function(e,a,n){return n.rect(a.getItemLayout(e))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=Oi(xv.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:N.color.primary,borderWidth:2}},realtimeSort:!1}),t})(xv),uk=(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})(),bu=(function(r){B(t,r);function t(e){var a=r.call(this,e)||this;return a.type="sausage",a}return t.prototype.getDefaultShape=function(){return new uk},t.prototype.buildPath=function(e,a){var n=a.cx,i=a.cy,o=Math.max(a.r0||0,0),s=Math.max(a.r,0),l=(s-o)*.5,u=o+l,f=a.startAngle,h=a.endAngle,v=a.clockwise,c=Math.PI*2,d=v?h-f<c:f-h<c;d||(f=h-(v?c:-c));var p=Math.cos(f),g=Math.sin(f),y=Math.cos(h),m=Math.sin(h);d?(e.moveTo(p*o+n,g*o+i),e.arc(p*u+n,g*u+i,l,-Math.PI+f,f,!v)):e.moveTo(p*s+n,g*s+i),e.arc(n,i,s,f,h,!v),e.arc(y*u+n,m*u+i,l,h-Math.PI*2,h-Math.PI,!v),o!==0&&e.arc(n,i,o,h,f,v)},t})(xt);function fk(r,t){t=t||{};var e=t.isRoundCap;return function(a,n,i){var o=n.position;if(!o||o instanceof Array)return Kl(a,n,i);var s=r(o),l=n.distance!=null?n.distance:5,u=this.shape,f=u.cx,h=u.cy,v=u.r,c=u.r0,d=(v+c)/2,p=u.startAngle,g=u.endAngle,y=(p+g)/2,m=e?Math.abs(v-c)/2:0,_=Math.cos,S=Math.sin,x=f+v*_(p),b=h+v*S(p),w="left",T="top";switch(s){case"startArc":x=f+(c-l)*_(y),b=h+(c-l)*S(y),w="center",T="top";break;case"insideStartArc":x=f+(c+l)*_(y),b=h+(c+l)*S(y),w="center",T="bottom";break;case"startAngle":x=f+d*_(p)+ul(p,l+m,!1),b=h+d*S(p)+fl(p,l+m,!1),w="right",T="middle";break;case"insideStartAngle":x=f+d*_(p)+ul(p,-l+m,!1),b=h+d*S(p)+fl(p,-l+m,!1),w="left",T="middle";break;case"middle":x=f+d*_(y),b=h+d*S(y),w="center",T="middle";break;case"endArc":x=f+(v+l)*_(y),b=h+(v+l)*S(y),w="center",T="bottom";break;case"insideEndArc":x=f+(v-l)*_(y),b=h+(v-l)*S(y),w="center",T="top";break;case"endAngle":x=f+d*_(g)+ul(g,l+m,!0),b=h+d*S(g)+fl(g,l+m,!0),w="left",T="middle";break;case"insideEndAngle":x=f+d*_(g)+ul(g,-l+m,!0),b=h+d*S(g)+fl(g,-l+m,!0),w="right",T="middle";break;default:return Kl(a,n,i)}return a=a||{},a.x=x,a.y=b,a.align=w,a.verticalAlign=T,a}}function hk(r,t,e,a){if(bt(a)){r.setTextConfig({rotation:a});return}else if(H(t)){r.setTextConfig({rotation:0});return}var n=r.shape,i=n.clockwise?n.startAngle:n.endAngle,o=n.clockwise?n.endAngle:n.startAngle,s=(i+o)/2,l,u=e(t);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":l=s;break;case"startAngle":case"insideStartAngle":l=i;break;case"endAngle":case"insideEndAngle":l=o;break;default:r.setTextConfig({rotation:0});return}var f=Math.PI*1.5-l;u==="middle"&&f>Math.PI/2&&f<Math.PI*1.5&&(f-=Math.PI),r.setTextConfig({rotation:f})}function ul(r,t,e){return t*Math.sin(r)*(e?-1:1)}function fl(r,t,e){return t*Math.cos(r)*(e?1:-1)}function gn(r,t,e){var a=r.get("borderRadius");if(a==null)return e?{cornerRadius:0}:null;H(a)||(a=[a,a,a,a]);var n=Math.abs(t.r||0-t.r0||0);return{cornerRadius:U(a,function(i){return Ar(i,n)})}}var Ih=Math.max,Ph=Math.min;function ck(r,t){var e=r.getArea&&r.getArea();if(Ci(r,"cartesian2d")){var a=r.getBaseAxis();if(a.type!=="category"||!a.onBand){var n=t.getLayout("bandWidth");a.isHorizontal()?(e.x-=n,e.width+=n*2):(e.y-=n,e.height+=n*2)}}return e}var vk=(function(r){B(t,r);function t(){var e=r.call(this)||this;return e.type=t.type,e._isFirstFrame=!0,e}return t.prototype.render=function(e,a,n,i){this._model=e,this._removeOnRenderedListener(n),this._updateDrawMode(e);var o=e.get("coordinateSystem");(o==="cartesian2d"||o==="polar")&&(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(e,a,n):this._renderNormal(e,a,n,i))},t.prototype.incrementalPrepareRender=function(e){this._clear(),this._updateDrawMode(e),this._updateLargeClip(e)},t.prototype.incrementalRender=function(e,a){this._progressiveEls=[],this._incrementalRenderLarge(e,a)},t.prototype.eachRendered=function(e){ki(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var a=e.pipelineContext.large;(this._isLargeDraw==null||a!==this._isLargeDraw)&&(this._isLargeDraw=a,this._clear())},t.prototype._renderNormal=function(e,a,n,i){var o=this.group,s=e.getData(),l=this._data,u=e.coordinateSystem,f=u.getBaseAxis(),h;u.type==="cartesian2d"?h=f.isHorizontal():u.type==="polar"&&(h=f.dim==="angle");var v=e.isAnimationEnabled()?e:null,c=dk(e,u);c&&this._enableRealtimeSort(c,s,n);var d=e.get("clip",!0)||c,p=ck(u,s);o.removeClipPath();var g=e.get("roundCap",!0),y=e.get("showBackground",!0),m=e.getModel("backgroundStyle"),_=m.get("borderRadius")||0,S=[],x=this._backgroundEls,b=i&&i.isInitSort,w=i&&i.type==="changeAxisOrder";function T(C){var I=hl[u.type](s,C);if(!I)return null;var L=bk(u,h,I);return L.useStyle(m.getItemStyle()),u.type==="cartesian2d"?L.setShape("r",_):L.setShape("cornerRadius",_),S[C]=L,L}s.diff(l).add(function(C){var I=s.getItemModel(C),L=hl[u.type](s,C,I);if(L&&(y&&T(C),!(!s.hasValue(C)||!qm[u.type](L)))){var P=!1;d&&(P=Zm[u.type](p,L));var R=Xm[u.type](e,s,C,L,h,v,f.model,!1,g);c&&(R.forceLabelAnimation=!0),Qm(R,s,C,I,L,e,h,u.type==="polar"),b?R.attr({shape:L}):c?$m(c,v,R,L,C,h,!1,!1):zt(R,{shape:L},e,C),s.setItemGraphicEl(C,R),o.add(R),R.ignore=P}}).update(function(C,I){var L=s.getItemModel(C),P=hl[u.type](s,C,L);if(P){if(y){var R=void 0;x.length===0?R=T(I):(R=x[I],R.useStyle(m.getItemStyle()),u.type==="cartesian2d"?R.setShape("r",_):R.setShape("cornerRadius",_),S[C]=R);var E=hl[u.type](s,C),O=Z1(h,E,u);Et(R,{shape:O},v,C)}var k=l.getItemGraphicEl(I);if(!s.hasValue(C)||!qm[u.type](P)){o.remove(k);return}var z=!1;d&&(z=Zm[u.type](p,P),z&&o.remove(k));var V=k&&(k.type==="sector"&&g||k.type==="sausage"&&!g);if(V&&(k&&di(k,e,I),k=null),k?$r(k):k=Xm[u.type](e,s,C,P,h,v,f.model,!0,g),c&&(k.forceLabelAnimation=!0),w){var G=k.getTextContent();if(G){var W=ps(G);W.prevValue!=null&&(W.prevValue=W.value)}}else Qm(k,s,C,L,P,e,h,u.type==="polar");b?k.attr({shape:P}):c?$m(c,v,k,P,C,h,!0,w):Et(k,{shape:P},e,C,null),s.setItemGraphicEl(C,k),k.ignore=z,o.add(k)}}).remove(function(C){var I=l.getItemGraphicEl(C);I&&di(I,e,C)}).execute();var D=this._backgroundGroup||(this._backgroundGroup=new yt);D.removeAll();for(var A=0;A<S.length;++A)D.add(S[A]);o.add(D),this._backgroundEls=S,this._data=s},t.prototype._renderLarge=function(e,a,n){this._clear(),Jm(e,this.group),this._updateLargeClip(e)},t.prototype._incrementalRenderLarge=function(e,a){this._removeBackground(),Jm(a,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(e){var a=e.get("clip",!0)&&$E(e.coordinateSystem,!1,e),n=this.group;a?n.setClipPath(a):n.removeClipPath()},t.prototype._enableRealtimeSort=function(e,a,n){var i=this;if(a.count()){var o=e.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(a,e,n),this._isFirstFrame=!1;else{var s=function(l){var u=a.getItemGraphicEl(l),f=u&&u.shape;return f&&Math.abs(o.isHorizontal()?f.height:f.width)||0};this._onRendered=function(){i._updateSortWithinSameData(a,s,o,n)},n.getZr().on("rendered",this._onRendered)}}},t.prototype._dataSort=function(e,a,n){var i=[];return e.each(e.mapDimension(a.dim),function(o,s){var l=n(s);l=l??NaN,i.push({dataIndex:s,mappedValue:l,ordinalNumber:o})}),i.sort(function(o,s){return s.mappedValue-o.mappedValue}),{ordinalNumbers:U(i,function(o){return o.ordinalNumber})}},t.prototype._isOrderChangedWithinSameData=function(e,a,n){for(var i=n.scale,o=e.mapDimension(n.dim),s=Number.MAX_VALUE,l=0,u=i.getOrdinalMeta().categories.length;l<u;++l){var f=e.rawIndexOf(o,i.getRawOrdinalNumber(l)),h=f<0?Number.MIN_VALUE:a(e.indexOfRawIndex(f));if(h>s)return!0;s=h}return!1},t.prototype._isOrderDifferentInView=function(e,a){for(var n=a.scale,i=n.getExtent(),o=Math.max(0,i[0]),s=Math.min(i[1],n.getOrdinalMeta().categories.length-1);o<=s;++o)if(e.ordinalNumbers[o]!==n.getRawOrdinalNumber(o))return!0},t.prototype._updateSortWithinSameData=function(e,a,n,i){if(this._isOrderChangedWithinSameData(e,a,n)){var o=this._dataSort(e,n,a);this._isOrderDifferentInView(o,n)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:o}))}},t.prototype._dispatchInitSort=function(e,a,n){var i=a.baseAxis,o=this._dataSort(e,i,function(s){return e.get(e.mapDimension(a.otherAxis.dim),s)});n.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:o})},t.prototype.remove=function(e,a){this._clear(this._model),this._removeOnRenderedListener(a)},t.prototype.dispose=function(e,a){this._removeOnRenderedListener(a)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&(e.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(e){var a=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(i){di(i,e,vt(i).dataIndex)})):a.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t})(Vt),Zm={cartesian2d:function(r,t){var e=t.width<0?-1:1,a=t.height<0?-1:1;e<0&&(t.x+=t.width,t.width=-t.width),a<0&&(t.y+=t.height,t.height=-t.height);var n=r.x+r.width,i=r.y+r.height,o=Ih(t.x,r.x),s=Ph(t.x+t.width,n),l=Ih(t.y,r.y),u=Ph(t.y+t.height,i),f=s<o,h=u<l;return t.x=f&&o>n?s:o,t.y=h&&l>i?u:l,t.width=f?0:s-o,t.height=h?0:u-l,e<0&&(t.x+=t.width,t.width=-t.width),a<0&&(t.y+=t.height,t.height=-t.height),f||h},polar:function(r,t){var e=t.r0<=t.r?1:-1;if(e<0){var a=t.r;t.r=t.r0,t.r0=a}var n=Ph(t.r,r.r),i=Ih(t.r0,r.r0);t.r=n,t.r0=i;var o=n-i<0;if(e<0){var a=t.r;t.r=t.r0,t.r0=a}return o}},Xm={cartesian2d:function(r,t,e,a,n,i,o,s,l){var u=new _t({shape:F({},a),z2:1});if(u.__dataIndex=e,u.name="item",i){var f=u.shape,h=n?"height":"width";f[h]=0}return u},polar:function(r,t,e,a,n,i,o,s,l){var u=!n&&l?bu:or,f=new u({shape:a,z2:1});f.name="item";var h=Y1(n);if(f.calculateTextPosition=fk(h,{isRoundCap:u===bu}),i){var v=f.shape,c=n?"r":"endAngle",d={};v[c]=n?a.r0:a.startAngle,d[c]=a[c],(s?Et:zt)(f,{shape:d},i)}return f}};function dk(r,t){var e=r.get("realtimeSort",!0),a=t.getBaseAxis();if(e&&a.type==="category"&&t.type==="cartesian2d")return{baseAxis:a,otherAxis:t.getOtherAxis(a)}}function $m(r,t,e,a,n,i,o,s){var l,u;i?(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?Et:zt)(e,{shape:l},t,n,null);var f=t?r.baseAxis.model:null;(o?Et:zt)(e,{shape:u},f,n)}function Km(r,t){for(var e=0;e<t.length;e++)if(!isFinite(r[t[e]]))return!0;return!1}var pk=["x","y","width","height"],gk=["cx","cy","r","startAngle","endAngle"],qm={cartesian2d:function(r){return!Km(r,pk)},polar:function(r){return!Km(r,gk)}},hl={cartesian2d:function(r,t,e){var a=r.getItemLayout(t);if(!a)return null;var n=e?mk(e,a):0,i=a.width>0?1:-1,o=a.height>0?1:-1;return{x:a.x+i*n/2,y:a.y+o*n/2,width:a.width-i*n,height:a.height-o*n}},polar:function(r,t,e){var a=r.getItemLayout(t);return{cx:a.cx,cy:a.cy,r0:a.r0,r:a.r,startAngle:a.startAngle,endAngle:a.endAngle,clockwise:a.clockwise}}};function yk(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function Y1(r){return(function(t){var e=t?"Arc":"Angle";return function(a){switch(a){case"start":case"insideStart":case"end":case"insideEnd":return a+e;default:return a}}})(r)}function Qm(r,t,e,a,n,i,o,s){var l=t.getItemVisual(e,"style");if(s){if(!i.get("roundCap")){var f=r.shape,h=gn(a.getModel("itemStyle"),f,!0);F(f,h),r.setShape(f)}}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?n.r>=n.r0?"endArc":"startArc":n.endAngle>=n.startAngle?"endAngle":"startAngle":o?n.height>=0?"bottom":"top":n.width>=0?"right":"left",d=Te(a);Ue(r,d,{labelFetcher:i,labelDataIndex:e,defaultText:ip(i.getData(),e),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,hk(r,g==="outside"?c:g,Y1(o),a.get(["label","rotate"]))}yb(p,d,i.getRawValue(e),function(m){return I1(t,m)});var y=a.getModel(["emphasis"]);ae(r,y.get("focus"),y.get("blurScope"),y.get("disabled")),De(r,a),yk(n)&&(r.style.fill="none",r.style.stroke="none",M(r.states,function(m){m.style&&(m.style.fill=m.style.stroke="none")}))}function mk(r,t){var e=r.get(["itemStyle","borderColor"]);if(!e||e==="none")return 0;var a=r.get(["itemStyle","borderWidth"])||0,n=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),i=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(a,n,i)}var _k=(function(){function r(){}return r})(),jm=(function(r){B(t,r);function t(e){var a=r.call(this,e)||this;return a.type="largeBar",a}return t.prototype.getDefaultShape=function(){return new _k},t.prototype.buildPath=function(e,a){for(var n=a.points,i=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,f=0;f<n.length;f+=3)l[i]=u,l[o]=n[f+2],s[i]=n[f+i],s[o]=n[f+o],e.rect(s[0],s[1],l[0],l[1])},t})(xt);function Jm(r,t,e,a){var n=r.getData(),i=n.getLayout("valueAxisHorizontal")?1:0,o=n.getLayout("largeDataIndices"),s=n.getLayout("size"),l=r.getModel("backgroundStyle"),u=n.getLayout("largeBackgroundPoints");if(u){var f=new jm({shape:{points:u},incremental:!!a,silent:!0,z2:0});f.baseDimIdx=i,f.largeDataIndices=o,f.barWidth=s,f.useStyle(l.getItemStyle()),t.add(f),e&&e.push(f)}var h=new jm({shape:{points:n.getLayout("largePoints")},incremental:!!a,ignoreCoarsePointer:!0,z2:1});h.baseDimIdx=i,h.largeDataIndices=o,h.barWidth=s,t.add(h),h.useStyle(n.getVisual("style")),h.style.stroke=null,vt(h).seriesIndex=r.seriesIndex,r.get("silent")||(h.on("mousedown",t0),h.on("mousemove",t0)),e&&e.push(h)}var t0=Wd(function(r){var t=this,e=Sk(t,r.offsetX,r.offsetY);vt(t).dataIndex=e>=0?e:null},30,!1);function Sk(r,t,e){for(var a=r.baseDimIdx,n=1-a,i=r.shape.points,o=r.largeDataIndices,s=[],l=[],u=r.barWidth,f=0,h=i.length/3;f<h;f++){var v=f*3;if(l[a]=u,l[n]=i[v+2],s[a]=i[v+a],s[n]=i[v+n],l[n]<0&&(s[n]+=l[n],l[n]=-l[n]),t>=s[0]&&t<=s[0]+l[0]&&e>=s[1]&&e<=s[1]+l[1])return o[f]}return-1}function Z1(r,t,e){if(Ci(e,"cartesian2d")){var a=t,n=e.getArea();return{x:r?a.x:n.x,y:r?n.y:a.y,width:r?a.width:n.width,height:r?n.height:a.height}}else{var n=e.getArea(),i=t;return{cx:n.cx,cy:n.cy,r0:r?n.r0:i.r0,r:r?n.r:i.r,startAngle:r?i.startAngle:0,endAngle:r?i.endAngle:Math.PI*2}}}function bk(r,t,e){var a=r.type==="polar"?or:_t;return new a({shape:Z1(t,e,r),silent:!0,z2:0})}function xk(r){r.registerChartView(vk),r.registerSeriesModel(lk),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,it(YP,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,ZP("bar")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,U1("bar")),r.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(t,e){var a=t.componentType||"series";e.eachComponent({mainType:a,query:t},function(n){t.sortInfo&&n.axis.setCategorySortInfo(t.sortInfo)})})}var e0=Math.PI*2,cl=Math.PI/180;function wk(r,t,e){t.eachSeriesByType(r,function(a){var n=a.getData(),i=n.mapDimension("value"),o=AL(a,e),s=o.cx,l=o.cy,u=o.r,f=o.r0,h=o.viewRect,v=-a.get("startAngle")*cl,c=a.get("endAngle"),d=a.get("padAngle")*cl;c=c==="auto"?v-e0:-c*cl;var p=a.get("minAngle")*cl,g=p+d,y=0;n.each(i,function(O){!isNaN(O)&&y++});var m=n.getSum(i),_=Math.PI/(m||y)*2,S=a.get("clockwise"),x=a.get("roseType"),b=a.get("stillShowZeroSum"),w=n.getDataExtent(i);w[0]=0;var T=S?1:-1,D=[v,c],A=T*d/2;sd(D,!S),v=D[0],c=D[1];var C=X1(a);C.startAngle=v,C.endAngle=c,C.clockwise=S,C.cx=s,C.cy=l,C.r=u,C.r0=f;var I=Math.abs(c-v),L=I,P=0,R=v;if(n.setLayout({viewRect:h,r:u}),n.each(i,function(O,k){var z;if(isNaN(O)){n.setItemLayout(k,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:S,cx:s,cy:l,r0:f,r:x?NaN:u});return}x!=="area"?z=m===0&&b?_:O*_:z=I/y,z<g?(z=g,L-=g):P+=O;var V=R+T*z,G=0,W=0;d>z?(G=R+T*z/2,W=G):(G=R+A,W=V-A),n.setItemLayout(k,{angle:z,startAngle:G,endAngle:W,clockwise:S,cx:s,cy:l,r0:f,r:x?St(O,w,[f,u]):u}),R=V}),L<e0&&y)if(L<=.001){var E=I/y;n.each(i,function(O,k){if(!isNaN(O)){var z=n.getItemLayout(k);z.angle=E;var V=0,G=0;E<d?(V=v+T*(k+1/2)*E,G=V):(V=v+T*k*E+A,G=v+T*(k+1)*E-A),z.startAngle=V,z.endAngle=G}})}else _=L/P,R=v,n.each(i,function(O,k){if(!isNaN(O)){var z=n.getItemLayout(k),V=z.angle===g?g:O*_,G=0,W=0;V<d?(G=R+T*V/2,W=G):(G=R+A,W=R+T*V-A),z.startAngle=G,z.endAngle=W,R+=T*V}})})}var X1=wt();function sf(r){return{seriesType:r,reset:function(t,e){var a=e.findComponents({mainType:"legend"});if(!(!a||!a.length)){var n=t.getData();n.filterSelf(function(i){for(var o=n.getName(i),s=0;s<a.length;s++)if(!a[s].isSelected(o))return!1;return!0})}}}}var Tk=Math.PI/180;function r0(r,t,e,a,n,i,o,s,l,u){if(r.length<2)return;function f(p){for(var g=p.rB,y=g*g,m=0;m<p.list.length;m++){var _=p.list[m],S=Math.abs(_.label.y-e),x=a+_.len,b=x*x,w=Math.sqrt(Math.abs((1-S*S/y)*b)),T=t+(w+_.len2)*n,D=T-_.label.x,A=_.targetTextWidth-D*n;$1(_,A,!0),_.label.x=T}}function h(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],S=_.label.y>e?y:g,x=Math.abs(_.label.y-e);if(x>=S.maxY){var b=_.label.x-t-_.len2*n,w=a+_.len,T=Math.abs(b)<w?Math.sqrt(x*x/(1-b*b/w/w)):w;S.rB=T,S.maxY=x}S.list.push(_)}f(g),f(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}PR(r,1,l,l+o)&&h(r)}function Ck(r,t,e,a,n,i,o,s){for(var l=[],u=[],f=Number.MAX_VALUE,h=-Number.MAX_VALUE,v=0;v<r.length;v++){var c=r[v].label;Rh(r[v])||(c.x<t?(f=Math.min(f,c.x),l.push(r[v])):(h=Math.max(h,c.x),u.push(r[v])))}for(var v=0;v<r.length;v++){var d=r[v];if(!Rh(d)&&d.linePoints){if(d.labelStyleWidth!=null)continue;var c=d.label,p=d.linePoints,g=void 0;d.labelAlignTo==="edge"?c.x<t?g=p[2][0]-d.labelDistance-o-d.edgeDistance:g=o+n-d.edgeDistance-p[2][0]-d.labelDistance:d.labelAlignTo==="labelLine"?c.x<t?g=f-o-d.bleedMargin:g=o+n-h-d.bleedMargin:c.x<t?g=c.x-o-d.bleedMargin:g=o+n-c.x-d.bleedMargin,d.targetTextWidth=g,$1(d,g,!1)}}r0(u,t,e,a,1,n,i,o,s,h),r0(l,t,e,a,-1,n,i,o,s,f);for(var v=0;v<r.length;v++){var d=r[v];if(!Rh(d)&&d.linePoints){var c=d.label,p=d.linePoints,y=d.labelAlignTo==="edge",m=c.style.padding,_=m?m[1]+m[3]:0,S=c.style.backgroundColor?0:_,x=d.rect.width+S,b=p[1][0]-p[2][0];y?c.x<t?p[2][0]=o+d.edgeDistance+x+d.labelDistance:p[2][0]=o+n-d.edgeDistance-x-d.labelDistance:(c.x<t?p[2][0]=c.x+d.labelDistance:p[2][0]=c.x-d.labelDistance,p[1][0]=p[2][0]+b),p[1][1]=p[2][1]=c.y}}}function $1(r,t,e){if(r.labelStyleWidth==null){var a=r.label,n=a.style,i=r.rect,o=n.backgroundColor,s=n.padding,l=s?s[1]+s[3]:0,u=n.overflow,f=i.width+(o?0:l);if(t<f||e){if(u&&u.match("break")){a.setStyle("backgroundColor",null),a.setStyle("width",t-l);var h=a.getBoundingRect();a.setStyle("width",Math.ceil(h.width)),a.setStyle("backgroundColor",o)}else{var v=t-l,c=t<f?v:e?v>r.unconstrainedWidth?null:v:null;a.setStyle("width",c)}K1(i,a)}}}function K1(r,t){a0.rect=r,_1(a0,t,Mk)}var Mk={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},a0={};function Rh(r){return r.position==="center"}function Ak(r){var t=r.getData(),e=[],a,n,i=!1,o=(r.get("minShowLabelAngle")||0)*Tk,s=t.getLayout("viewRect"),l=t.getLayout("r"),u=s.width,f=s.x,h=s.y,v=s.height;function c(b){b.ignore=!0}function d(b){if(!b.ignore)return!0;for(var w in b.states)if(b.states[w].ignore===!1)return!0;return!1}t.each(function(b){var w=t.getItemGraphicEl(b),T=w.shape,D=w.getTextContent(),A=w.getTextGuideLine(),C=t.getItemModel(b),I=C.getModel("label"),L=I.get("position")||C.get(["emphasis","label","position"]),P=I.get("distanceToLabelLine"),R=I.get("alignTo"),E=K(I.get("edgeDistance"),u),O=I.get("bleedMargin");O==null&&(O=Math.min(u,v)>200?10:2);var k=C.getModel("labelLine"),z=k.get("length");z=K(z,u);var V=k.get("length2");if(V=K(V,u),Math.abs(T.endAngle-T.startAngle)<o){M(D.states,c),D.ignore=!0,A&&(M(A.states,c),A.ignore=!0);return}if(d(D)){var G=(T.startAngle+T.endAngle)/2,W=Math.cos(G),Z=Math.sin(G),rt,lt,Ct,Ot;a=T.cx,n=T.cy;var ut=L==="inside"||L==="inner";if(L==="center")rt=T.cx,lt=T.cy,Ot="center";else{var tt=(ut?(T.r+T.r0)/2*W:T.r*W)+a,pt=(ut?(T.r+T.r0)/2*Z:T.r*Z)+n;if(rt=tt+W*3,lt=pt+Z*3,!ut){var q=tt+W*(z+l-T.r),at=pt+Z*(z+l-T.r),Rt=q+(W<0?-1:1)*V,Mt=at;R==="edge"?rt=W<0?f+E:f+u-E:rt=Rt+(W<0?-P:P),lt=Mt,Ct=[[tt,pt],[q,at],[Rt,Mt]]}Ot=ut?"center":R==="edge"?W>0?"right":"left":W>0?"left":"right"}var Lt=Math.PI,Ft=0,he=I.get("rotate");if(bt(he))Ft=he*(Lt/180);else if(L==="center")Ft=0;else if(he==="radial"||he===!0){var qr=W<0?-G+Lt:-G;Ft=qr}else if(he==="tangential"&&L!=="outside"&&L!=="outer"){var Ir=Math.atan2(W,Z);Ir<0&&(Ir=Lt*2+Ir);var ws=Z>0;ws&&(Ir=Lt+Ir),Ft=Ir-Lt}if(i=!!Ft,D.x=rt,D.y=lt,D.rotation=Ft,D.setStyle({verticalAlign:"middle"}),ut){D.setStyle({align:Ot});var vf=D.states.select;vf&&(vf.x+=D.x,vf.y+=D.y)}else{var cf=new ot(0,0,0,0);K1(cf,D),e.push({label:D,labelLine:A,position:L,len:z,len2:V,minTurnAngle:k.get("minTurnAngle"),maxSurfaceAngle:k.get("maxSurfaceAngle"),surfaceNormal:new ht(W,Z),linePoints:Ct,textAlign:Ot,labelDistance:P,labelAlignTo:R,edgeDistance:E,bleedMargin:O,rect:cf,unconstrainedWidth:cf.width,labelStyleWidth:D.style.width})}w.setTextConfig({inside:ut})}}),!i&&r.get("avoidLabelOverlap")&&Ck(e,a,n,l,u,v,f,h);for(var p=0;p<e.length;p++){var g=e[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 S=y.states.select;S&&(S.x+=y.x,S.y+=y.y)}if(m){var x=g.linePoints;_||!x?(M(m.states,c),m.ignore=!0):(CR(x,g.minTurnAngle),MR(x,g.surfaceNormal,g.maxSurfaceAngle),m.setShape({points:x}),y.__hostTarget.textGuideLineConfig={anchor:new ht(x[0][0],x[0][1])})}}}var Dk=(function(r){B(t,r);function t(e,a,n){var i=r.call(this)||this;i.z2=2;var o=new Tt;return i.setTextContent(o),i.updateData(e,a,n,!0),i}return t.prototype.updateData=function(e,a,n,i){var o=this,s=e.hostModel,l=e.getItemModel(a),u=l.getModel("emphasis"),f=e.getItemLayout(a),h=F(gn(l.getModel("itemStyle"),f,!0),f);if(isNaN(h.startAngle)){o.setShape(h);return}if(i){o.setShape(h);var v=s.getShallow("animationType");s.ecModel.ssr?(zt(o,{scaleX:0,scaleY:0},s,{dataIndex:a,isFrom:!0}),o.originX=h.cx,o.originY=h.cy):v==="scale"?(o.shape.r=f.r0,zt(o,{shape:{r:f.r}},s,a)):n!=null?(o.setShape({startAngle:n,endAngle:n}),zt(o,{shape:{startAngle:f.startAngle,endAngle:f.endAngle}},s,a)):(o.shape.endAngle=f.startAngle,Et(o,{shape:{endAngle:f.endAngle}},s,a))}else $r(o),Et(o,{shape:h},s,a);o.useStyle(e.getItemVisual(a,"style")),De(o,l);var c=(f.startAngle+f.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,e,a),o.ensureState("emphasis").shape=F({r:f.r+(u.get("scale")&&u.get("scaleSize")||0)},gn(u.getModel("itemStyle"),f)),F(o.ensureState("select"),{x:p,y:g,shape:gn(l.getModel(["select","itemStyle"]),f)}),F(o.ensureState("blur"),{shape:gn(l.getModel(["blur","itemStyle"]),f)});var m=o.getTextGuideLine(),_=o.getTextContent();m&&F(m.ensureState("select"),{x:p,y:g}),F(_.ensureState("select"),{x:p,y:g}),ae(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(e,a,n){var i=this,o=a.getItemModel(n),s=o.getModel("labelLine"),l=a.getItemVisual(n,"style"),u=l&&l.fill,f=l&&l.opacity;Ue(i,Te(o),{labelFetcher:a.hostModel,labelDataIndex:n,inheritColor:u,defaultOpacity:f,defaultText:e.getFormattedLabel(n,"normal")||a.getName(n)});var h=i.getTextContent();i.setTextConfig({position:null,rotation:null}),h.attr({z2:10});var v=o.get(["label","position"]);if(v!=="outside"&&v!=="outer")i.removeTextGuideLine();else{var c=this.getTextGuideLine();c||(c=new ur,this.setTextGuideLine(c)),p1(this,g1(o),{stroke:u,opacity:ya(s.get(["lineStyle","opacity"]),f,1)})}},t})(or),Lk=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.ignoreLabelLineUpdate=!0,e}return t.prototype.render=function(e,a,n,i){var o=e.getData(),s=this._data,l=this.group,u;if(!s&&o.count()>0){for(var f=o.getItemLayout(0),h=1;isNaN(f&&f.startAngle)&&h<o.count();++h)f=o.getItemLayout(h);f&&(u=f.startAngle)}if(this._emptyCircleSector&&l.remove(this._emptyCircleSector),o.count()===0&&e.get("showEmptyCircle")){var v=X1(e),c=new or({shape:J(v)});c.useStyle(e.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=c,l.add(c)}o.diff(s).add(function(d){var p=new Dk(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);di(p,e,d)}).execute(),Ak(e),e.get("animationTypeUpdate")!=="expansion"&&(this._data=o)},t.prototype.dispose=function(){},t.prototype.containPoint=function(e,a){var n=a.getData(),i=n.getItemLayout(0);if(i){var o=e[0]-i.cx,s=e[1]-i.cy,l=Math.sqrt(o*o+s*s);return l<=i.r&&l>=i.r0}},t.type="pie",t})(Vt);function bs(r,t,e){t=H(t)&&{coordDimensions:t}||F({encodeDefine:r.getEncode()},t);var a=r.getSource(),n=of(a,t).dimensions,i=new Yr(n,r);return i.initData(a,e),i}var hp=(function(){function r(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}return r.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},r.prototype.containName=function(t){var e=this._getRawData();return e.indexOfName(t)>=0},r.prototype.indexOfName=function(t){var e=this._getDataWithEncodedVisual();return e.indexOfName(t)},r.prototype.getItemVisual=function(t,e){var a=this._getDataWithEncodedVisual();return a.getItemVisual(t,e)},r})(),Ik=wt(),q1=(function(r){B(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.init=function(e){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new hp(Y(this.getData,this),Y(this.getRawData,this)),this._defaultLabelLine(e)},t.prototype.mergeOption=function(){r.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return bs(this,{coordDimensions:["value"],encodeDefaulter:it(Vb,this)})},t.prototype.getDataParams=function(e){var a=this.getData(),n=Ik(a),i=n.seats;if(!i){var o=[];a.each(a.mapDimension("value"),function(l){o.push(l)}),i=n.seats=mM(o,a.hostModel.get("percentPrecision"))}var s=r.prototype.getDataParams.call(this,e);return s.percent=i[e]||0,s.$vars.push("percent"),s},t.prototype._defaultLabelLine=function(e){Fo(e,"labelLine",["show"]);var a=e.labelLine,n=e.emphasis.labelLine;a.show=a.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.type="series.pie",t.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"},t})(Ut);SL({fullType:q1.type,getCoord2:function(r){return r.getShallow("center")}});function Pk(r){return{seriesType:r,reset:function(t,e){var a=t.getData();a.filterSelf(function(n){var i=a.mapDimension("value"),o=a.get(i,n);return!(bt(o)&&!isNaN(o)&&o<0)})}}}function Rk(r){r.registerChartView(Lk),r.registerSeriesModel(q1),v2("pie",r.registerAction),r.registerLayout(it(wk,"pie")),r.registerProcessor(sf("pie")),r.registerProcessor(Pk("pie"))}function Ek(r){r.eachSeriesByType("radar",function(t){var e=t.getData(),a=[],n=t.coordinateSystem;if(n){var i=n.getIndicatorAxes();M(i,function(o,s){e.each(e.mapDimension(i[s].dim),function(l,u){a[u]=a[u]||[];var f=n.dataToPoint(l,s);a[u][s]=n0(f)?f:i0(n)})}),e.each(function(o){var s=Q_(a[o],function(l){return n0(l)})||i0(n);a[o].push(s.slice()),e.setItemLayout(o,a[o])})}})}function n0(r){return!isNaN(r[0])&&!isNaN(r[1])}function i0(r){return[r.cx,r.cy]}function kk(r){var t=r.polar;if(t){H(t)||(t=[t]);var e=[];M(t,function(a,n){a.indicator?(a.type&&!a.shape&&(a.shape=a.type),r.radar=r.radar||[],H(r.radar)||(r.radar=[r.radar]),r.radar.push(a)):e.push(a)}),r.polar=e}M(r.series,function(a){a&&a.type==="radar"&&a.polarIndex&&(a.radarIndex=a.polarIndex)})}var Ok=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){var i=e.coordinateSystem,o=this.group,s=e.getData(),l=this._data;function u(v,c){var d=v.getItemVisual(c,"symbol")||"circle";if(d!=="none"){var p=rf(v.getItemVisual(c,"symbolSize")),g=le(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 f(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]),bd[y?"initProps":"updateProps"](_,{x:c[m][0],y:c[m][1]},e,g)):_.setPosition(c[m]),d.add(_))}}function h(v){return U(v,function(c){return[i.cx,i.cy]})}s.diff(l).add(function(v){var c=s.getItemLayout(v);if(c){var d=new Dr,p=new ur,g={shape:{points:c}};d.shape.points=h(c),p.shape.points=h(c),zt(d,g,e,v),zt(p,g,e,v);var y=new yt,m=new yt;y.add(p),y.add(d),y.add(m),f(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&&(f(p.shape.points,m.shape.points,y,s,v,!1),$r(g),$r(p),Et(p,m,e),Et(g,m,e),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(gt(d.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:_})),De(p,d,"lineStyle"),De(g,d,"areaStyle");var S=d.getModel("areaStyle"),x=S.isEmpty()&&S.parentModel.isEmpty();g.ignore=x,M(["emphasis","select","blur"],function(w){var T=d.getModel([w,"areaStyle"]),D=T.isEmpty()&&T.parentModel.isEmpty();g.ensureState(w).ignore=D&&x;var A=d.getModel([w,"lineStyle"]).getLineStyle();p.ensureState(w).style=A;var C=T.getAreaStyle();g.ensureState(w).style=C;var I=d.getModel([w,"itemStyle"]).getItemStyle();y.eachChild(function(L){L.ensureState(w).style=J(I)})}),g.useStyle(gt(d.getModel("areaStyle").getAreaStyle(),{fill:_,opacity:.7,decal:m.decal}));var b=d.getModel("emphasis");y.eachChild(function(w){if(w instanceof Xe){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 D=s.getStore().get(s.getDimensionIndex(w.__dimIdx),c);(D==null||isNaN(D))&&(D=""),Ue(w,Te(d),{labelFetcher:s.hostModel,labelDataIndex:c,labelDimIndex:w.__dimIdx,defaultText:D,inheritColor:_,defaultOpacity:m.opacity})}),ae(v,b.get("focus"),b.get("blurScope"),b.get("disabled"))}),this._data=s},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.type="radar",t})(Vt),Bk=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return t.prototype.init=function(e){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new hp(Y(this.getData,this),Y(this.getRawData,this))},t.prototype.getInitialData=function(e,a){return bs(this,{generateCoord:"indicator_",generateCoordCount:1/0})},t.prototype.formatTooltip=function(e,a,n){var i=this.getData(),o=this.coordinateSystem,s=o.getIndicatorAxes(),l=this.getData().getName(e),u=l===""?this.name:l,f=sx(this,e);return Ye("section",{header:u,sortBlocks:!0,blocks:U(s,function(h){var v=i.get(i.mapDimension(h.dim),e);return Ye("nameValue",{markerType:"subItem",markerColor:f,name:h.name,value:v,sortParam:v})})})},t.prototype.getTooltipPosition=function(e){if(e!=null){for(var a=this.getData(),n=this.coordinateSystem,i=a.getValues(U(n.dimensions,function(u){return a.mapDimension(u)}),e),o=0,s=i.length;o<s;o++)if(!isNaN(i[o])){var l=n.getIndicatorAxes();return n.coordToPoint(l[o].dataToCoord(i[o]),o)}}},t.type="series.radar",t.dependencies=["radar"],t.defaultOption={z:2,colorBy:"data",coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid",join:"round"},label:{position:"top"},symbolSize:8},t})(Ut),eo=E1.value;function vl(r,t){return gt({show:t},r)}var Nk=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.optionUpdated=function(){var e=this.get("boundaryGap"),a=this.get("splitNumber"),n=this.get("scale"),i=this.get("axisLine"),o=this.get("axisTick"),s=this.get("axisLabel"),l=this.get("axisName"),u=this.get(["axisName","show"]),f=this.get(["axisName","formatter"]),h=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=gt({color:d.color},l));var g=ft(J(d),{boundaryGap:e,splitNumber:a,scale:n,axisLine:i,axisTick:o,axisLabel:s,name:d.text,showName:u,nameLocation:"end",nameGap:h,nameTextStyle:p,triggerEvent:v},!1);if(X(f)){var y=g.name;g.name=f.replace("{value}",y??"")}else Q(f)&&(g.name=f(g.name,g));var m=new Dt(g,null,this.ecModel);return fe(m,ep.prototype),m.mainType="radar",m.componentIndex=this.componentIndex,m},this);this._indicatorModels=c},t.prototype.getIndicatorModels=function(){return this._indicatorModels},t.type="radar",t.defaultOption={z:0,center:["50%","50%"],radius:"50%",startAngle:90,axisName:{show:!0,color:N.color.axisLabel},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:ft({lineStyle:{color:N.color.neutral20}},eo.axisLine),axisLabel:vl(eo.axisLabel,!1),axisTick:vl(eo.axisTick,!1),splitLine:vl(eo.splitLine,!0),splitArea:vl(eo.splitArea,!0),indicator:[]},t})(mt),zk=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){var i=this.group;i.removeAll(),this._buildAxes(e,n),this._buildSplitLineAndArea(e)},t.prototype._buildAxes=function(e,a){var n=e.coordinateSystem,i=n.getIndicatorAxes(),o=U(i,function(s){var l=s.model.get("showName")?s.name:"",u=new Mr(s.model,a,{axisName:l,position:[n.cx,n.cy],rotation:s.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return u});M(o,function(s){s.build(),this.group.add(s.group)},this)},t.prototype._buildSplitLineAndArea=function(e){var a=e.coordinateSystem,n=a.getIndicatorAxes();if(!n.length)return;var i=e.get("shape"),o=e.getModel("splitLine"),s=e.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),f=o.get("show"),h=s.get("show"),v=l.get("color"),c=u.get("color"),d=H(v)?v:[v],p=H(c)?c:[c],g=[],y=[];function m(R,E,O){var k=O%E.length;return R[k]=R[k]||[],k}if(i==="circle")for(var _=n[0].getTicksCoords(),S=a.cx,x=a.cy,b=0;b<_.length;b++){if(f){var w=m(g,d,b);g[w].push(new vs({shape:{cx:S,cy:x,r:_[b].coord}}))}if(h&&b<_.length-1){var w=m(y,p,b);y[w].push(new Yu({shape:{cx:S,cy:x,r0:_[b].coord,r:_[b+1].coord}}))}}else for(var T,D=U(n,function(R,E){var O=R.getTicksCoords();return T=T==null?O.length-1:Math.min(O.length-1,T),U(O,function(k){return a.coordToPoint(k.coord,E)})}),A=[],b=0;b<=T;b++){for(var C=[],I=0;I<n.length;I++)C.push(D[I][b]);if(C[0]&&C.push(C[0].slice()),f){var w=m(g,d,b);g[w].push(new ur({shape:{points:C}}))}if(h&&A){var w=m(y,p,b-1);y[w].push(new Dr({shape:{points:C.concat(A)}}))}A=C.slice().reverse()}var L=l.getLineStyle(),P=u.getAreaStyle();M(y,function(R,E){this.group.add(Fc(R,{style:gt({stroke:"none",fill:p[E%p.length]},P),silent:!0}))},this),M(g,function(R,E){this.group.add(Fc(R,{style:gt({fill:"none",stroke:d[E%d.length]},L),silent:!0}))},this)},t.type="radar",t})($t),Vk=(function(r){B(t,r);function t(e,a,n){var i=r.call(this,e,a,n)||this;return i.type="value",i.angle=0,i.name="",i}return t})(rp),Fk=(function(){function r(t,e,a){this.dimensions=[],this._model=t,this._indicatorAxes=U(t.getIndicatorModels(),function(n,i){var o="indicator_"+i,s=new Vk(o,new Aa);return s.name=n.get("name"),s.model=n,n.axis=s,this.dimensions.push(o),s},this),this.resize(t,a)}return r.prototype.getIndicatorAxes=function(){return this._indicatorAxes},r.prototype.dataToPoint=function(t,e){var a=this._indicatorAxes[e];return this.coordToPoint(a.dataToCoord(t),e)},r.prototype.coordToPoint=function(t,e){var a=this._indicatorAxes[e],n=a.angle,i=this.cx+t*Math.cos(n),o=this.cy-t*Math.sin(n);return[i,o]},r.prototype.pointToData=function(t){var e=t[0]-this.cx,a=t[1]-this.cy,n=Math.sqrt(e*e+a*a);e/=n,a/=n;for(var i=Math.atan2(-a,e),o=1/0,s,l=-1,u=0;u<this._indicatorAxes.length;u++){var f=this._indicatorAxes[u],h=Math.abs(i-f.angle);h<o&&(s=f,l=u,o=h)}return[l,+(s&&s.coordToData(n))]},r.prototype.resize=function(t,e){var a=Le(t,e).refContainer,n=t.get("center"),i=Math.min(a.width,a.height)/2;this.cx=K(n[0],a.width)+a.x,this.cy=K(n[1],a.height)+a.y,this.startAngle=t.get("startAngle")*Math.PI/180;var o=t.get("radius");(X(o)||bt(o))&&(o=[0,o]),this.r0=K(o[0],i),this.r=K(o[1],i),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(t,e){var a=this._indicatorAxes,n=this._model;M(a,function(s){s.scale.setExtent(1/0,-1/0)}),t.eachSeriesByType("radar",function(s,l){if(!(s.get("coordinateSystem")!=="radar"||t.getComponent("radar",s.get("radarIndex"))!==n)){var u=s.getData();M(a,function(f){f.scale.unionExtentFromData(u,u.mapDimension(f.dim))})}},this);var i=n.get("splitNumber"),o=new Aa;o.setExtent(0,i),o.setInterval(1),M(a,function(s,l){D1(s.scale,s.model,o)})},r.prototype.convertToPixel=function(t,e,a){return console.warn("Not implemented."),null},r.prototype.convertFromPixel=function(t,e,a){return console.warn("Not implemented."),null},r.prototype.containPoint=function(t){return console.warn("Not implemented."),!1},r.create=function(t,e){var a=[];return t.eachComponent("radar",function(n){var i=new r(n,t,e);a.push(i),n.coordinateSystem=i}),t.eachSeriesByType("radar",function(n){n.get("coordinateSystem")==="radar"&&(n.coordinateSystem=a[n.get("radarIndex")||0])}),a},r.dimensions=[],r})();function Gk(r){r.registerCoordinateSystem("radar",Fk),r.registerComponentModel(Nk),r.registerComponentView(zk),r.registerVisual({seriesType:"radar",reset:function(t){var e=t.getData();e.each(function(a){e.setItemVisual(a,"legendIcon","roundRect")}),e.setVisual("legendIcon","roundRect")}})}function Hk(r){ue(Gk),r.registerChartView(Ok),r.registerSeriesModel(Bk),r.registerLayout(Ek),r.registerProcessor(sf("radar")),r.registerPreprocessor(kk)}var cp=wt();function Wk(r,t,e){cp(r)[t]=e}function Uk(r,t,e){var a=cp(r),n=a[t];n===e&&(a[t]=null)}function o0(r,t){return!!cp(r)[t]}Lr({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},re);var Yk={axisPointer:1,tooltip:1,brush:1};function Q1(r,t,e){var a=t.getComponentByElement(r.topTarget);if(!a||a===e||Yk.hasOwnProperty(a.mainType))return!1;var n=a.coordinateSystem;if(!n||n.model===e)return!1;var i=xi(a),o=xi(e);return!((i.zlevel-o.zlevel||i.z-o.z)<=0)}var vp=(function(r){B(t,r);function t(e){var a=r.call(this)||this;a._zr=e;var n=Y(a._mousedownHandler,a),i=Y(a._mousemoveHandler,a),o=Y(a._mouseupHandler,a),s=Y(a._mousewheelHandler,a),l=Y(a._pinchHandler,a);return a.enable=function(u,f){var h=f.zInfo,v=xi(h.component),c=v.z,d=v.zlevel,p={component:h.component,z:c,zlevel:d,z2:et(h.z2,-1/0)},g=F({},f.triggerInfo);this._opt=gt(F({},f),{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")&&(ao(e,"mousedown",n,p),ao(e,"mousemove",i,p),ao(e,"mouseup",o,p)),(u===!0||u==="scale"||u==="zoom")&&(ao(e,"mousewheel",s,p),ao(e,"pinch",l,p)))},a.disable=function(){this._enabled=!1,no(e,"mousedown",n),no(e,"mousemove",i),no(e,"mouseup",o),no(e,"mousewheel",s),no(e,"pinch",l)},a}return t.prototype.isDragging=function(){return this._dragging},t.prototype.isPinching=function(){return this._pinching},t.prototype._checkPointer=function(e,a,n){var i=this._opt,o=i.zInfoParsed;if(Q1(e,i.api,o.component))return!1;var s=i.triggerInfo,l=s.roamTrigger,u=!1;return l==="global"&&(u=!0),u||(u=s.isInSelf(e,a,n)),u&&s.isInClip&&!s.isInClip(e,a,n)&&(u=!1),u},t.prototype._decideCursorStyle=function(e,a,n,i){var o=e.target;if(!o&&this._checkPointer(e,a,n))return"grab";if(i)return o&&o.cursor||"default"},t.prototype.dispose=function(){this.disable()},t.prototype._mousedownHandler=function(e){if(!(Gp(e)||ro(e))){for(var a=e.target;a;){if(a.draggable)return;a=a.__hostTarget||a.parent}var n=e.offsetX,i=e.offsetY;this._checkPointer(e,n,i)&&(this._x=n,this._y=i,this._dragging=!0)}},t.prototype._mousemoveHandler=function(e){var a=this._zr;if(!(e.gestureEvent==="pinch"||o0(a,"globalPan")||ro(e))){var n=e.offsetX,i=e.offsetY;if(!this._dragging||!Bl("moveOnMouseMove",e,this._opt)){var o=this._decideCursorStyle(e,n,i,!1);o&&a.setCursorStyle(o);return}a.setCursorStyle("grabbing");var s=this._x,l=this._y,u=n-s,f=i-l;this._x=n,this._y=i,this._opt.preventDefaultMouseMove&&Xr(e.event),e.__ecRoamConsumed=!0,s0(this,"pan","moveOnMouseMove",e,{dx:u,dy:f,oldX:s,oldY:l,newX:n,newY:i,isAvailableBehavior:null})}},t.prototype._mouseupHandler=function(e){if(!ro(e)){var a=this._zr;if(!Gp(e)){this._dragging=!1;var n=this._decideCursorStyle(e,e.offsetX,e.offsetY,!0);n&&a.setCursorStyle(n)}}},t.prototype._mousewheelHandler=function(e){if(!ro(e)){var a=Bl("zoomOnMouseWheel",e,this._opt),n=Bl("moveOnMouseWheel",e,this._opt),i=e.wheelDelta,o=Math.abs(i),s=e.offsetX,l=e.offsetY;if(!(i===0||!a&&!n)){if(a){var u=o>3?1.4:o>1?1.2:1.1,f=i>0?u:1/u;this._checkTriggerMoveZoom(this,"zoom","zoomOnMouseWheel",e,{scale:f,originX:s,originY:l,isAvailableBehavior:null})}if(n){var h=Math.abs(i),v=(i>0?1:-1)*(h>3?.4:h>1?.15:.05);this._checkTriggerMoveZoom(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:v,originX:s,originY:l,isAvailableBehavior:null})}}}},t.prototype._pinchHandler=function(e){if(!(o0(this._zr,"globalPan")||ro(e))){var a=e.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,"zoom",null,e,{scale:a,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},t.prototype._checkTriggerMoveZoom=function(e,a,n,i,o){e._checkPointer(i,o.originX,o.originY)&&(Xr(i.event),i.__ecRoamConsumed=!0,s0(e,a,n,i,o))},t})(Ze);function ro(r){return r.__ecRoamConsumed}var Zk=wt();function lf(r){var t=Zk(r);return t.roam=t.roam||{},t.uniform=t.uniform||{},t}function ao(r,t,e,a){for(var n=lf(r),i=n.roam,o=i[t]=i[t]||[],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:e,zInfoParsed:a}),Xk(r,t)}function no(r,t,e){for(var a=lf(r),n=a.roam[t]||[],i=0;i<n.length;i++)if(n[i].listener===e){n.splice(i,1),n.length||$k(r,t);return}}function Xk(r,t){var e=lf(r);e.uniform[t]||r.on(t,e.uniform[t]=function(a){var n=e.roam[t];if(n)for(var i=0;i<n.length;i++)n[i].listener(a)})}function $k(r,t){var e=lf(r),a=e.uniform;a[t]&&(r.off(t,a[t]),a[t]=null)}function s0(r,t,e,a,n){n.isAvailableBehavior=Y(Bl,null,e,a),r.trigger(t,n)}function Bl(r,t,e){var a=e[r];return!r||a&&(!X(a)||t.event[a+"Key"])}function Kk(r,t,e){var a=r.target;a.x+=t,a.y+=e,a.dirty()}function qk(r,t,e,a){var n=r.target,i=r.zoomLimit,o=r.zoom=r.zoom||1;o*=t,o=dp(o,i);var s=o/r.zoom;r.zoom=o,j1(n,e,a,s),n.dirty()}function Qk(r,t,e,a,n,i){var o=new ot(0,0,0,0);a.enable(r.get("roam"),{api:t,zInfo:{component:r},triggerInfo:{roamTrigger:r.get("roamTrigger"),isInSelf:function(u,f,h){return o.copy(e.getBoundingRect()),o.applyTransform(e.getComputedTransform()),o.contain(f,h)},isInClip:function(u,f,h){return!0}}}),n.zoomLimit=r.get("scaleLimit");var s=r.coordinateSystem;n.zoom=s?s.getZoom():1;var l=r.subType+"Roam";a.off("pan").off("zoom").on("pan",function(u){Kk(n,u.dx,u.dy),t.dispatchAction({seriesId:r.id,type:l,dx:u.dx,dy:u.dy})}).on("zoom",function(u){qk(n,u.scale,u.originX,u.originY),t.dispatchAction({seriesId:r.id,type:l,zoom:u.scale,originX:u.originX,originY:u.originY}),t.updateLabelLayout()})}function l0(r,t){return r.pointToProjected?r.pointToProjected(t):r.pointToData(t)}function jk(r,t,e){var a=r.getZoom(),n=r.getCenter(),i=t.zoom,o=r.projectedToPoint?r.projectedToPoint(n):r.dataToPoint(n);return t.dx!=null&&t.dy!=null&&(o[0]-=t.dx,o[1]-=t.dy,r.setCenter(l0(r,o))),i!=null&&(i=dp(a*i,e)/a,j1(r,t.originX,t.originY,i),r.updateTransform(),r.setCenter(l0(r,o)),r.setZoom(i*a)),{center:r.getCenter(),zoom:r.getZoom()}}function j1(r,t,e,a){r.x-=(t-r.x)*(a-1),r.y-=(e-r.y)*(a-1),r.scaleX*=a,r.scaleY*=a}function dp(r,t){if(t){var e=t.min||0,a=t.max||1/0;r=Math.max(Math.min(a,r),e)}return r}var u0=pe,Jk=(function(r){B(t,r);function t(e,a){var n=r.call(this)||this;return n.type="view",n.dimensions=["x","y"],n._roamTransformable=new hn,n._rawTransformable=new hn,n.name=e,n._opt=a,n}return t.prototype.setBoundingRect=function(e,a,n,i){return this._rect=new ot(e,a,n,i),this._updateCenterAndZoom(),this._rect},t.prototype.getBoundingRect=function(){return this._rect},t.prototype.setViewRect=function(e,a,n,i){this._transformTo(e,a,n,i),this._viewRect=new ot(e,a,n,i)},t.prototype._transformTo=function(e,a,n,i){var o=this.getBoundingRect(),s=this._rawTransformable;s.transform=o.calculateTransform(new ot(e,a,n,i));var l=s.parent;s.parent=null,s.decomposeTransform(),s.parent=l,this._updateTransform()},t.prototype.setCenter=function(e){var a=this._opt;a&&a.api&&a.ecModel&&a.ecModel.getShallow("legacyViewCoordSysCenterBase")&&e&&(e=[K(e[0],a.api.getWidth()),K(e[1],a.api.getWidth())]),this._centerOption=J(e),this._updateCenterAndZoom()},t.prototype.setZoom=function(e){this._zoom=dp(e||1,this.zoomLimit),this._updateCenterAndZoom()},t.prototype.getDefaultCenter=function(){var e=this.getBoundingRect(),a=e.x+e.width/2,n=e.y+e.height/2;return[a,n]},t.prototype.getCenter=function(){return this._center||this.getDefaultCenter()},t.prototype.getZoom=function(){return this._zoom||1},t.prototype.getRoamTransform=function(){return this._roamTransformable.getLocalTransform()},t.prototype._updateCenterAndZoom=function(){var e=this._centerOption,a=this._rect;e&&a&&(this._center=[K(e[0],a.width,a.x),K(e[1],a.height,a.y)]);var n=this._rawTransformable.getLocalTransform(),i=this._roamTransformable,o=this.getDefaultCenter(),s=this.getCenter(),l=this.getZoom();s=pe([],s,n),o=pe([],o,n),i.originX=s[0],i.originY=s[1],i.x=o[0]-s[0],i.y=o[1]-s[1],i.scaleX=i.scaleY=l,this._updateTransform()},t.prototype._updateTransform=function(){var e=this._roamTransformable,a=this._rawTransformable;a.parent=e,e.updateTransform(),a.updateTransform(),Jv(this.transform||(this.transform=[]),a.transform||Fe()),this._rawTransform=a.getLocalTransform(),this.invTransform=this.invTransform||[],Ii(this.invTransform,this.transform),this.decomposeTransform()},t.prototype.getTransformInfo=function(){var e=this._rawTransformable,a=this._roamTransformable,n=new hn;return n.transform=a.transform,n.decomposeTransform(),{roam:{x:n.x,y:n.y,scaleX:n.scaleX,scaleY:n.scaleY},raw:{x:e.x,y:e.y,scaleX:e.scaleX,scaleY:e.scaleY}}},t.prototype.getViewRect=function(){return this._viewRect},t.prototype.getViewRectAfterRoam=function(){var e=this.getBoundingRect().clone();return e.applyTransform(this.transform),e},t.prototype.dataToPoint=function(e,a,n){var i=a?this._rawTransform:this.transform;return n=n||[],i?u0(n,e,i):tC(n,e)},t.prototype.pointToData=function(e,a,n){n=n||[];var i=this.invTransform;return i?u0(n,e,i):(n[0]=e[0],n[1]=e[1],n)},t.prototype.convertToPixel=function(e,a,n){var i=f0(a);return i===this?i.dataToPoint(n):null},t.prototype.convertFromPixel=function(e,a,n){var i=f0(a);return i===this?i.pointToData(n):null},t.prototype.containPoint=function(e){return this.getViewRectAfterRoam().contain(e[0],e[1])},t.dimensions=["x","y"],t})(hn);function f0(r){var t=r.seriesModel;return t?t.coordinateSystem:null}var He=wt();function J1(r){var t=r.mainData,e=r.datas;e||(e={main:t},r.datasAttr={main:"data"}),r.datas=r.mainData=null,tw(t,e,r),M(e,function(a){M(t.TRANSFERABLE_METHODS,function(n){a.wrapMethod(n,it(tO,r))})}),t.wrapMethod("cloneShallow",it(rO,r)),M(t.CHANGABLE_METHODS,function(a){t.wrapMethod(a,it(eO,r))}),We(e[t.dataType]===t)}function tO(r,t){if(iO(this)){var e=F({},He(this).datas);e[this.dataType]=t,tw(t,e,r)}else pp(t,this.dataType,He(this).mainData,r);return t}function eO(r,t){return r.struct&&r.struct.update(),t}function rO(r,t){return M(He(t).datas,function(e,a){e!==t&&pp(e.cloneShallow(),a,t,r)}),t}function aO(r){var t=He(this).mainData;return r==null||t==null?t:He(t).datas[r]}function nO(){var r=He(this).mainData;return r==null?[{data:r}]:U(Pt(He(r).datas),function(t){return{type:t,data:He(r).datas[t]}})}function iO(r){return He(r).mainData===r}function tw(r,t,e){He(r).datas={},M(t,function(a,n){pp(a,n,r,e)})}function pp(r,t,e,a){He(e).datas[t]=r,He(r).mainData=e,r.dataType=t,a.struct&&(r[a.structAttr]=a.struct,a.struct[a.datasAttr[t]]=r),r.getLinkedData=aO,r.getLinkedDataAll=nO}var oO=(function(){function r(t,e){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=t||"",this.hostTree=e}return r.prototype.isRemoved=function(){return this.dataIndex<0},r.prototype.eachNode=function(t,e,a){Q(t)&&(a=e,e=t,t=null),t=t||{},X(t)&&(t={order:t});var n=t.order||"preorder",i=this[t.attr||"children"],o;n==="preorder"&&(o=e.call(a,this));for(var s=0;!o&&s<i.length;s++)i[s].eachNode(t,e,a);n==="postorder"&&e.call(a,this)},r.prototype.updateDepthAndHeight=function(t){var e=0;this.depth=t;for(var a=0;a<this.children.length;a++){var n=this.children[a];n.updateDepthAndHeight(t+1),n.height>e&&(e=n.height)}this.height=e+1},r.prototype.getNodeById=function(t){if(this.getId()===t)return this;for(var e=0,a=this.children,n=a.length;e<n;e++){var i=a[e].getNodeById(t);if(i)return i}},r.prototype.contains=function(t){if(t===this)return!0;for(var e=0,a=this.children,n=a.length;e<n;e++){var i=a[e].contains(t);if(i)return i}},r.prototype.getAncestors=function(t){for(var e=[],a=t?this:this.parentNode;a;)e.push(a),a=a.parentNode;return e.reverse(),e},r.prototype.getAncestorsIndices=function(){for(var t=[],e=this;e;)t.push(e.dataIndex),e=e.parentNode;return t.reverse(),t},r.prototype.getDescendantIndices=function(){var t=[];return this.eachNode(function(e){t.push(e.dataIndex)}),t},r.prototype.getValue=function(t){var e=this.hostTree.data;return e.getStore().get(e.getDimensionIndex(t||"value"),this.dataIndex)},r.prototype.setLayout=function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},r.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},r.prototype.getModel=function(t){if(!(this.dataIndex<0)){var e=this.hostTree,a=e.data.getItemModel(this.dataIndex);return a.getModel(t)}},r.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},r.prototype.setVisual=function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},r.prototype.getVisual=function(t){return this.hostTree.data.getItemVisual(this.dataIndex,t)},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 t=this.parentNode.children,e=0;e<t.length;++e)if(t[e]===this)return e;return-1}return-1},r.prototype.isAncestorOf=function(t){for(var e=t.parentNode;e;){if(e===this)return!0;e=e.parentNode}return!1},r.prototype.isDescendantOf=function(t){return t!==this&&t.isAncestorOf(this)},r})(),ew=(function(){function r(t){this.type="tree",this._nodes=[],this.hostModel=t}return r.prototype.eachNode=function(t,e,a){this.root.eachNode(t,e,a)},r.prototype.getNodeByDataIndex=function(t){var e=this.data.getRawIndex(t);return this._nodes[e]},r.prototype.getNodeById=function(t){return this.root.getNodeById(t)},r.prototype.update=function(){for(var t=this.data,e=this._nodes,a=0,n=e.length;a<n;a++)e[a].dataIndex=-1;for(var a=0,n=t.count();a<n;a++)e[t.getRawIndex(a)].dataIndex=a},r.prototype.clearLayouts=function(){this.data.clearItemLayouts()},r.createTree=function(t,e,a){var n=new r(e),i=[],o=1;s(t);function s(f,h){var v=f.value;o=Math.max(o,H(v)?v.length:1),i.push(f);var c=new oO(ge(f.name,""),n);h?sO(c,h):n.root=c,n._nodes.push(c);var d=f.children;if(d)for(var p=0;p<d.length;p++)s(d[p],c)}n.root.updateDepthAndHeight(0);var l=of(i,{coordDimensions:["value"],dimensionsCount:o}).dimensions,u=new Yr(l,e);return u.initData(i),a&&a(u),J1({mainData:u,struct:n,structAttr:"tree"}),n.update(),n},r})();function sO(r,t){var e=t.children;r.parentNode!==t&&(e.push(r),r.parentNode=t)}function es(r,t,e){if(r&&dt(t,r.type)>=0){var a=e.getData().tree.root,n=r.targetNode;if(X(n)&&(n=a.getNodeById(n)),n&&a.contains(n))return{node:n};var i=r.targetNodeId;if(i!=null&&(n=a.getNodeById(i)))return{node:n}}}function rw(r){for(var t=[];r;)r=r.parentNode,r&&t.push(r);return t.reverse()}function gp(r,t){var e=rw(r);return dt(e,t)>=0}function yp(r,t){for(var e=[];r;){var a=r.dataIndex;e.push({name:r.name,dataIndex:a,value:t.getRawValue(a)}),r=r.parentNode}return e.reverse(),e}var h0=["treemapZoomToNode","treemapRender","treemapMove"];function lO(r){for(var t=0;t<h0.length;t++)r.registerAction({type:h0[t],update:"updateView"},re);r.registerAction({type:"treemapRootToNode",update:"updateView"},function(e,a){a.eachComponent({mainType:"series",subType:"treemap",query:e},n);function n(i,o){var s=["treemapZoomToNode","treemapRootToNode"],l=es(e,s,i);if(l){var u=i.getViewRoot();u&&(e.direction=gp(u,l.node)?"rollUp":"drillDown"),i.resetViewRoot(l.node)}}})}function aw(r){var t=r.getData(),e=t.tree,a={};e.eachNode(function(n){for(var i=n;i&&i.depth>1;)i=i.parentNode;var o=zL(r.ecModel,i.name||i.dataIndex+"",a);n.setVisual("decal",o)})}var uO=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.preventUsingHoverLayer=!0,e}return t.prototype.getInitialData=function(e,a){var n={name:e.name,children:e.data};nw(n);var i=e.levels||[],o=this.designatedVisualItemStyle={},s=new Dt({itemStyle:o},this,a);i=e.levels=fO(i,a);var l=U(i||[],function(h){return new Dt(h,s,a)},this),u=ew.createTree(n,this,f);function f(h){h.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},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.formatTooltip=function(e,a,n){var i=this.getData(),o=this.getRawValue(e),s=i.getName(e);return Ye("nameValue",{name:s,value:o})},t.prototype.getDataParams=function(e){var a=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(e);return a.treeAncestors=yp(n,this),a.treePathInfo=a.treeAncestors,a},t.prototype.setLayoutInfo=function(e){this.layoutInfo=this.layoutInfo||{},F(this.layoutInfo,e)},t.prototype.mapIdToIndex=function(e){var a=this._idIndexMap;a||(a=this._idIndexMap=nt(),this._idIndexMapCount=0);var n=a.get(e);return n==null&&a.set(e,n=this._idIndexMapCount++),n},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var a=this.getRawData().tree.root;(!e||e!==a&&!a.contains(e))&&(this._viewRoot=a)},t.prototype.enableAriaDecal=function(){aw(this)},t.type="series.treemap",t.layoutMode="box",t.defaultOption={progressive:0,coordinateSystemUsage:"box",left:N.size.l,top:N.size.xxxl,right:N.size.l,bottom:N.size.xxxl,sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",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:N.size.m,emptyItemWidth:25,itemStyle:{color:N.color.backgroundShade,textStyle:{color:N.color.secondary}},emphasis:{itemStyle:{color:N.color.background}}},label:{show:!0,distance:0,padding:5,position:"inside",color:N.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:N.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:[]},t})(Ut);function nw(r){var t=0;M(r.children,function(a){nw(a);var n=a.value;H(n)&&(n=n[0]),t+=n});var e=r.value;H(e)&&(e=e[0]),(e==null||isNaN(e))&&(e=t),e<0&&(e=0),H(r.value)?r.value[0]=e:r.value=e}function fO(r,t){var e=Wt(t.get("color")),a=Wt(t.get(["aria","decal","decals"]));if(e){r=r||[];var n,i;M(r,function(s){var l=new Dt(s),u=l.get("color"),f=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(n=!0),(l.get(["itemStyle","decal"])||f&&f!=="none")&&(i=!0)});var o=r[0]||(r[0]={});return n||(o.color=e.slice()),!i&&a&&(o.decal=a.slice()),r}}var hO=8,c0=8,Eh=5,cO=(function(){function r(t){this.group=new yt,t.add(this.group)}return r.prototype.render=function(t,e,a,n){var i=t.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!i.get("show")||!a)){var s=i.getModel("itemStyle"),l=i.getModel("emphasis"),u=s.getModel("textStyle"),f=l.getModel(["itemStyle","textStyle"]),h=Le(t,e).refContainer,v={left:i.get("left"),right:i.get("right"),top:i.get("top"),bottom:i.get("bottom")},c={emptyItemWidth:i.get("emptyItemWidth"),totalWidth:0,renderList:[]},d=ne(v,h);this._prepare(a,c,u),this._renderContent(t,c,d,s,l,u,f,n),Ed(o,v,h)}},r.prototype._prepare=function(t,e,a){for(var n=t;n;n=n.parentNode){var i=ge(n.getModel().get("name"),""),o=a.getTextRect(i),s=Math.max(o.width+hO*2,e.emptyItemWidth);e.totalWidth+=s+c0,e.renderList.push({node:n,text:i,width:s})}},r.prototype._renderContent=function(t,e,a,n,i,o,s,l){for(var u=0,f=e.emptyItemWidth,h=t.get(["breadcrumb","height"]),v=e.totalWidth,c=e.renderList,d=i.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-f,m=f,_=null);var S=new Dr({shape:{points:vO(u,0,m,h,p===c.length-1,p===0)},style:gt(n.getItemStyle(),{lineJoin:"bevel"}),textContent:new Tt({style:Ht(o,{text:_})}),textConfig:{position:"inside"},z2:cs*1e4,onclick:it(l,y)});S.disableLabelAnimation=!0,S.getTextContent().ensureState("emphasis").style=Ht(s,{text:_}),S.ensureState("emphasis").style=d,ae(S,i.get("focus"),i.get("blurScope"),i.get("disabled")),this.group.add(S),dO(S,t,y),u+=m+c0}},r.prototype.remove=function(){this.group.removeAll()},r})();function vO(r,t,e,a,n,i){var o=[[n?r:r-Eh,t],[r+e,t],[r+e,t+a],[n?r:r-Eh,t+a]];return!i&&o.splice(2,0,[r+e+Eh,t+a/2]),!n&&o.push([r,t+a/2]),o}function dO(r,t,e){vt(r).eventData={componentType:"series",componentSubType:"treemap",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:e&&e.dataIndex,name:e&&e.name},treePathInfo:e&&yp(e,t)}}var pO=(function(){function r(){this._storage=[],this._elExistsMap={}}return r.prototype.add=function(t,e,a,n,i){return this._elExistsMap[t.id]?!1:(this._elExistsMap[t.id]=!0,this._storage.push({el:t,target:e,duration:a,delay:n,easing:i}),!0)},r.prototype.finished=function(t){return this._finishedCallback=t,this},r.prototype.start=function(){for(var t=this,e=this._storage.length,a=function(){e--,e<=0&&(t._storage.length=0,t._elExistsMap={},t._finishedCallback&&t._finishedCallback())},n=0,i=this._storage.length;n<i;n++){var o=this._storage[n];o.el.animateTo(o.target,{duration:o.duration,delay:o.delay,easing:o.easing,setToFinal:!0,done:a,aborted:a})}return this},r})();function gO(){return new pO}var wv=yt,v0=_t,d0=3,p0="label",g0="upperLabel",yO=cs*10,mO=cs*2,_O=cs*3,on=An([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),y0=function(r){var t=on(r);return t.stroke=t.fill=t.lineWidth=null,t},xu=wt(),SO=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._state="ready",e._storage=io(),e}return t.prototype.render=function(e,a,n,i){var o=a.findComponents({mainType:"series",subType:"treemap",query:i});if(!(dt(o,e)<0)){this.seriesModel=e,this.api=n,this.ecModel=a;var s=["treemapZoomToNode","treemapRootToNode"],l=es(i,s,e),u=i&&i.type,f=e.layoutInfo,h=!this._oldTree,v=this._storage,c=u==="treemapRootToNode"&&l&&v?{rootNodeGroup:v.nodeGroup[l.node.getRawIndex()],direction:i.direction}:null,d=this._giveContainerGroup(f),p=e.get("animation"),g=this._doRender(d,e,c);p&&!h&&(!u||u==="treemapZoomToNode"||u==="treemapRootToNode")?this._doAnimation(d,g,e,c):g.renderFinally(),this._resetController(n),this._renderBreadcrumb(e,n,l)}},t.prototype._giveContainerGroup=function(e){var a=this._containerGroup;return a||(a=this._containerGroup=new wv,this._initEvents(a),this.group.add(a)),a.x=e.x,a.y=e.y,a},t.prototype._doRender=function(e,a,n){var i=a.getData().tree,o=this._oldTree,s=io(),l=io(),u=this._storage,f=[];function h(m,_,S,x){return bO(a,l,u,n,s,f,m,_,S,x)}p(i.root?[i.root]:[],o&&o.root?[o.root]:[],e,i===o||!o,0);var v=g(u);if(this._oldTree=i,this._storage=l,this._controllerHost){var c=this.seriesModel.layoutInfo,d=i.root.getLayout();d.width===c.width&&d.height===c.height&&(this._controllerHost.zoom=1)}return{lastsForAnimation:s,willDeleteEls:v,renderFinally:y};function p(m,_,S,x,b){x?(_=m,M(m,function(D,A){!D.isRemoved()&&T(A,A)})):new Ss(_,m,w,w).add(T).update(T).remove(it(T,null)).execute();function w(D){return D.getId()}function T(D,A){var C=D!=null?m[D]:null,I=A!=null?_[A]:null,L=h(C,I,S,b);L&&p(C&&C.viewChildren||[],I&&I.viewChildren||[],L,x,b+1)}}function g(m){var _=io();return m&&M(m,function(S,x){var b=_[x];M(S,function(w){w&&(b.push(w),xu(w).willDelete=!0)})}),_}function y(){M(v,function(m){M(m,function(_){_.parent&&_.parent.remove(_)})}),M(f,function(m){m.invisible=!0,m.dirty()})}},t.prototype._doAnimation=function(e,a,n,i){var o=n.get("animationDurationUpdate"),s=n.get("animationEasing"),l=(Q(o)?0:o)||0,u=(Q(s)?null:s)||"cubicOut",f=gO();M(a.willDeleteEls,function(h,v){M(h,function(c,d){if(!c.invisible){var p=c.parent,g,y=xu(p);if(i&&i.direction==="drillDown")g=p===i.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&&f.add(c,g,l,0,u)}})}),M(this._storage,function(h,v){M(h,function(c,d){var p=a.lastsForAnimation[v][d],g={};p&&(c instanceof yt?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})),f.add(c,g,l,0,u))})},this),this._state="animating",f.finished(Y(function(){this._state="ready",a.renderFinally()},this)).start()},t.prototype._resetController=function(e){var a=this,n=this._controller,i=this._controllerHost;i||(this._controllerHost={target:this.group},i=this._controllerHost);var o=this.seriesModel;n||(n=this._controller=new vp(e.getZr()),n.on("pan",Y(this._onPan,this)),n.on("zoom",Y(this._onZoom,this))),n.enable(o.get("roam"),{api:e,zInfo:{component:o},triggerInfo:{roamTrigger:o.get("roamTrigger"),isInSelf:function(s,l,u){var f=a._containerGroup;return f?f.getBoundingRect().contain(l-f.x,u-f.y):!1}}}),i.zoomLimit=o.get("scaleLimit"),i.zoom=o.get("zoom")},t.prototype._clearController=function(){var e=this._controller;this._controllerHost=null,e&&(e.dispose(),e=null)},t.prototype._onPan=function(e){if(this._state!=="animating"&&(Math.abs(e.dx)>d0||Math.abs(e.dy)>d0)){var a=this.seriesModel.getData().tree.root;if(!a)return;var n=a.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+e.dx,y:n.y+e.dy,width:n.width,height:n.height}})}},t.prototype._onZoom=function(e){var a=e.originX,n=e.originY,i=e.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 ot(s.x,s.y,s.width,s.height),u=null,f=this._controllerHost;u=f.zoomLimit;var h=f.zoom=f.zoom||1;if(h*=i,u){var v=u.min||0,c=u.max||1/0;h=Math.max(Math.min(c,h),v)}var d=h/f.zoom;f.zoom=h;var p=this.seriesModel.layoutInfo;a-=p.x,n-=p.y;var g=Fe();mi(g,g,[-a,-n]),nS(g,g,[d,d]),mi(g,g,[a,n]),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}})}},t.prototype._initEvents=function(e){var a=this;e.on("click",function(n){if(a._state==="ready"){var i=a.seriesModel.get("nodeClick",!0);if(i){var o=a.findTarget(n.offsetX,n.offsetY);if(o){var s=o.node;if(s.getLayout().isLeafRoot)a._rootToNode(o);else if(i==="zoomToNode")a._zoomToNode(o);else if(i==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),f=l.get("target",!0)||"blank";u&&iu(u,f)}}}}},this)},t.prototype._renderBreadcrumb=function(e,a,n){var i=this;n||(n=e.get("leafDepth",!0)!=null?{node:e.getViewRoot()}:this.findTarget(a.getWidth()/2,a.getHeight()/2),n||(n={node:e.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new cO(this.group))).render(e,a,n.node,function(o){i._state!=="animating"&&(gp(e.getViewRoot(),o)?i._rootToNode({node:o}):i._zoomToNode({node:o}))})},t.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=io(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},t.prototype.dispose=function(){this._clearController()},t.prototype._zoomToNode=function(e){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype._rootToNode=function(e){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype.findTarget=function(e,a){var n,i=this.seriesModel.getViewRoot();return i.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(e,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)n={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),n},t.type="treemap",t})(Vt);function io(){return{nodeGroup:[],background:[],content:[]}}function bO(r,t,e,a,n,i,o,s,l,u){if(!o)return;var f=o.getLayout(),h=r.getData(),v=o.getModel();if(h.setItemGraphicEl(o.dataIndex,null),!f||!f.isInView)return;var c=f.width,d=f.height,p=f.borderWidth,g=f.invisible,y=o.getRawIndex(),m=s&&s.getRawIndex(),_=o.viewChildren,S=f.upperHeight,x=_&&_.length,b=v.getModel("itemStyle"),w=v.getModel(["emphasis","itemStyle"]),T=v.getModel(["blur","itemStyle"]),D=v.getModel(["select","itemStyle"]),A=b.get("borderRadius")||0,C=lt("nodeGroup",wv);if(!C)return;if(l.add(C),C.x=f.x||0,C.y=f.y||0,C.markRedraw(),xu(C).nodeWidth=c,xu(C).nodeHeight=d,f.isAboveViewRoot)return C;var I=lt("background",v0,u,mO);I&&V(C,I,x&&f.upperLabelHeight);var L=v.getModel("emphasis"),P=L.get("focus"),R=L.get("blurScope"),E=L.get("disabled"),O=P==="ancestor"?o.getAncestorsIndices():P==="descendant"?o.getDescendantIndices():P;if(x)Wo(C)&&vn(C,!1),I&&(vn(I,!E),h.setItemGraphicEl(o.dataIndex,I),Bc(I,O,R));else{var k=lt("content",v0,u,_O);k&&G(C,k),I.disableMorphing=!0,I&&Wo(I)&&vn(I,!1),vn(C,!E),h.setItemGraphicEl(o.dataIndex,C);var z=v.getShallow("cursor");z&&k.attr("cursor",z),Bc(C,O,R)}return C;function V(ut,tt,pt){var q=vt(tt);if(q.dataIndex=o.dataIndex,q.seriesIndex=r.seriesIndex,tt.setShape({x:0,y:0,width:c,height:d,r:A}),g)W(tt);else{tt.invisible=!1;var at=o.getVisual("style"),Rt=at.stroke,Mt=y0(b);Mt.fill=Rt;var Lt=on(w);Lt.fill=w.get("borderColor");var Ft=on(T);Ft.fill=T.get("borderColor");var he=on(D);if(he.fill=D.get("borderColor"),pt){var qr=c-2*p;Z(tt,Rt,at.opacity,{x:p,y:0,width:qr,height:S})}else tt.removeTextContent();tt.setStyle(Mt),tt.ensureState("emphasis").style=Lt,tt.ensureState("blur").style=Ft,tt.ensureState("select").style=he,Ec(tt)}ut.add(tt)}function G(ut,tt){var pt=vt(tt);pt.dataIndex=o.dataIndex,pt.seriesIndex=r.seriesIndex;var q=Math.max(c-2*p,0),at=Math.max(d-2*p,0);if(tt.culling=!0,tt.setShape({x:p,y:p,width:q,height:at,r:A}),g)W(tt);else{tt.invisible=!1;var Rt=o.getVisual("style"),Mt=Rt.fill,Lt=y0(b);Lt.fill=Mt,Lt.decal=Rt.decal;var Ft=on(w),he=on(T),qr=on(D);Z(tt,Mt,Rt.opacity,null),tt.setStyle(Lt),tt.ensureState("emphasis").style=Ft,tt.ensureState("blur").style=he,tt.ensureState("select").style=qr,Ec(tt)}ut.add(tt)}function W(ut){!ut.invisible&&i.push(ut)}function Z(ut,tt,pt,q){var at=v.getModel(q?g0:p0),Rt=ge(v.get("name"),null),Mt=at.getShallow("show");Ue(ut,Te(v,q?g0:p0),{defaultText:Mt?Rt:null,inheritColor:tt,defaultOpacity:pt,labelFetcher:r,labelDataIndex:o.dataIndex});var Lt=ut.getTextContent();if(Lt){var Ft=Lt.style,he=ku(Ft.padding||0);q&&(ut.setTextConfig({layoutRect:q}),Lt.disableLabelLayout=!0),Lt.beforeUpdate=function(){var Ir=Math.max((q?q.width:ut.shape.width)-he[1]-he[3],0),ws=Math.max((q?q.height:ut.shape.height)-he[0]-he[2],0);(Ft.width!==Ir||Ft.height!==ws)&&Lt.setStyle({width:Ir,height:ws})},Ft.truncateMinChar=2,Ft.lineOverflow="truncate",rt(Ft,q,f);var qr=Lt.getState("emphasis");rt(qr?qr.style:null,q,f)}}function rt(ut,tt,pt){var q=ut?ut.text:null;if(!tt&&pt.isLeafRoot&&q!=null){var at=r.get("drillDownIcon",!0);ut.text=at?at+" "+q:q}}function lt(ut,tt,pt,q){var at=m!=null&&e[ut][m],Rt=n[ut];return at?(e[ut][m]=null,Ct(Rt,at)):g||(at=new tt,at instanceof Ei&&(at.z2=xO(pt,q)),Ot(Rt,at)),t[ut][y]=at}function Ct(ut,tt){var pt=ut[y]={};tt instanceof wv?(pt.oldX=tt.x,pt.oldY=tt.y):pt.oldShape=F({},tt.shape)}function Ot(ut,tt){var pt=ut[y]={},q=o.parentNode,at=tt instanceof yt;if(q&&(!a||a.direction==="drillDown")){var Rt=0,Mt=0,Lt=n.background[q.getRawIndex()];!a&&Lt&&Lt.oldShape&&(Rt=Lt.oldShape.width,Mt=Lt.oldShape.height),at?(pt.oldX=0,pt.oldY=Mt):pt.oldShape={x:Rt,y:Mt,width:0,height:0}}pt.fadein=!at}}function xO(r,t){return r*yO+t}var rs=M,wO=j,wu=-1,Qt=(function(){function r(t){var e=t.mappingMethod,a=t.type,n=this.option=J(t);this.type=a,this.mappingMethod=e,this._normalizeData=MO[e];var i=r.visualHandlers[a];this.applyVisual=i.applyVisual,this.getColorMapper=i.getColorMapper,this._normalizedToVisual=i._normalizedToVisual[e],e==="piecewise"?(kh(n),TO(n)):e==="category"?n.categories?CO(n):kh(n,!0):(We(e!=="linear"||n.dataExtent),kh(n))}return r.prototype.mapValueToVisual=function(t){var e=this._normalizeData(t);return this._normalizedToVisual(e,t)},r.prototype.getNormalizer=function(){return Y(this._normalizeData,this)},r.listVisualTypes=function(){return Pt(r.visualHandlers)},r.isValidType=function(t){return r.visualHandlers.hasOwnProperty(t)},r.eachVisual=function(t,e,a){j(t)?M(t,e,a):e.call(a,t)},r.mapVisual=function(t,e,a){var n,i=H(t)?[]:j(t)?{}:(n=!0,null);return r.eachVisual(t,function(o,s){var l=e.call(a,o,s);n?i=l:i[s]=l}),i},r.retrieveVisuals=function(t){var e={},a;return t&&rs(r.visualHandlers,function(n,i){t.hasOwnProperty(i)&&(e[i]=t[i],a=!0)}),a?e:null},r.prepareVisualTypes=function(t){if(H(t))t=t.slice();else if(wO(t)){var e=[];rs(t,function(a,n){e.push(n)}),t=e}else return[];return t.sort(function(a,n){return n==="color"&&a!=="color"&&a.indexOf("color")===0?1:-1}),t},r.dependsOn=function(t,e){return e==="color"?!!(t&&t.indexOf(e)===0):t===e},r.findPieceIndex=function(t,e,a){for(var n,i=1/0,o=0,s=e.length;o<s;o++){var l=e[o].value;if(l!=null){if(l===t||X(l)&&l===t+"")return o;a&&v(l,o)}}for(var o=0,s=e.length;o<s;o++){var u=e[o],f=u.interval,h=u.close;if(f){if(f[0]===-1/0){if(pl(h[1],t,f[1]))return o}else if(f[1]===1/0){if(pl(h[0],f[0],t))return o}else if(pl(h[0],f[0],t)&&pl(h[1],t,f[1]))return o;a&&v(f[0],o),a&&v(f[1],o)}}if(a)return t===1/0?e.length-1:t===-1/0?0:n;function v(c,d){var p=Math.abs(c-t);p<i&&(i=p,n=d)}},r.visualHandlers={color:{applyVisual:oo("color"),getColorMapper:function(){var t=this.option;return Y(t.mappingMethod==="category"?function(e,a){return!a&&(e=this._normalizeData(e)),So.call(this,e)}:function(e,a,n){var i=!!n;return!a&&(e=this._normalizeData(e)),n=Cf(e,t.parsedVisual,n),i?n:Wr(n,"rgba")},this)},_normalizedToVisual:{linear:function(t){return Wr(Cf(t,this.option.parsedVisual),"rgba")},category:So,piecewise:function(t,e){var a=Cv.call(this,e);return a==null&&(a=Wr(Cf(t,this.option.parsedVisual),"rgba")),a},fixed:sn}},colorHue:dl(function(t,e){return _a(t,e)}),colorSaturation:dl(function(t,e){return _a(t,null,e)}),colorLightness:dl(function(t,e){return _a(t,null,null,e)}),colorAlpha:dl(function(t,e){return yS(t,e)}),decal:{applyVisual:oo("decal"),_normalizedToVisual:{linear:null,category:So,piecewise:null,fixed:null}},opacity:{applyVisual:oo("opacity"),_normalizedToVisual:Tv([0,1])},liftZ:{applyVisual:oo("liftZ"),_normalizedToVisual:{linear:sn,category:sn,piecewise:sn,fixed:sn}},symbol:{applyVisual:function(t,e,a){var n=this.mapValueToVisual(t);a("symbol",n)},_normalizedToVisual:{linear:m0,category:So,piecewise:function(t,e){var a=Cv.call(this,e);return a==null&&(a=m0.call(this,t)),a},fixed:sn}},symbolSize:{applyVisual:oo("symbolSize"),_normalizedToVisual:Tv([0,1])}},r})();function TO(r){var t=r.pieceList;r.hasSpecialVisual=!1,M(t,function(e,a){e.originIndex=a,e.visual!=null&&(r.hasSpecialVisual=!0)})}function CO(r){var t=r.categories,e=r.categoryMap={},a=r.visual;if(rs(t,function(o,s){e[o]=s}),!H(a)){var n=[];j(a)?rs(a,function(o,s){var l=e[s];n[l??wu]=o}):n[wu]=a,a=iw(r,n)}for(var i=t.length-1;i>=0;i--)a[i]==null&&(delete e[t[i]],t.pop())}function kh(r,t){var e=r.visual,a=[];j(e)?rs(e,function(i){a.push(i)}):e!=null&&a.push(e);var n={color:1,symbol:1};!t&&a.length===1&&!n.hasOwnProperty(r.type)&&(a[1]=a[0]),iw(r,a)}function dl(r){return{applyVisual:function(t,e,a){var n=this.mapValueToVisual(t);a("color",r(e("color"),n))},_normalizedToVisual:Tv([0,1])}}function m0(r){var t=this.option.visual;return t[Math.round(St(r,[0,1],[0,t.length-1],!0))]||{}}function oo(r){return function(t,e,a){a(r,this.mapValueToVisual(t))}}function So(r){var t=this.option.visual;return t[this.option.loop&&r!==wu?r%t.length:r]}function sn(){return this.option.visual[0]}function Tv(r){return{linear:function(t){return St(t,r,this.option.visual,!0)},category:So,piecewise:function(t,e){var a=Cv.call(this,e);return a==null&&(a=St(t,r,this.option.visual,!0)),a},fixed:sn}}function Cv(r){var t=this.option,e=t.pieceList;if(t.hasSpecialVisual){var a=Qt.findPieceIndex(r,e),n=e[a];if(n&&n.visual)return n.visual[this.type]}}function iw(r,t){return r.visual=t,r.type==="color"&&(r.parsedVisual=U(t,function(e){var a=Ge(e);return a||[0,0,0,1]})),t}var MO={linear:function(r){return St(r,this.option.dataExtent,[0,1],!0)},piecewise:function(r){var t=this.option.pieceList,e=Qt.findPieceIndex(r,t,!0);if(e!=null)return St(e,[0,t.length-1],[0,1],!0)},category:function(r){var t=this.option.categories?this.option.categoryMap[r]:r;return t??wu},fixed:re};function pl(r,t,e){return r?t<=e:t<e}var AO="itemStyle",ow=wt();const DO={seriesType:"treemap",reset:function(r){var t=r.getData().tree,e=t.root;e.isRemoved()||sw(e,{},r.getViewRoot().getAncestors(),r)}};function sw(r,t,e,a){var n=r.getModel(),i=r.getLayout(),o=r.hostTree.data;if(!(!i||i.invisible||!i.isInView)){var s=n.getModel(AO),l=LO(s,t,a),u=o.ensureUniqueItemVisual(r.dataIndex,"style"),f=s.get("borderColor"),h=s.get("borderColorSaturation"),v;h!=null&&(v=_0(l),f=IO(h,v)),u.stroke=f;var c=r.viewChildren;if(!c||!c.length)v=_0(l),u.fill=v;else{var d=PO(r,n,i,s,l,c);M(c,function(p,g){if(p.depth>=e.length||p===e[p.depth]){var y=RO(n,l,p,g,d,a);sw(p,y,e,a)}})}}}function LO(r,t,e){var a=F({},t),n=e.designatedVisualItemStyle;return M(["color","colorAlpha","colorSaturation"],function(i){n[i]=t[i];var o=r.get(i);n[i]=null,o!=null&&(a[i]=o)}),a}function _0(r){var t=Oh(r,"color");if(t){var e=Oh(r,"colorAlpha"),a=Oh(r,"colorSaturation");return a&&(t=_a(t,null,null,a)),e&&(t=yS(t,e)),t}}function IO(r,t){return t!=null?_a(t,null,null,r):null}function Oh(r,t){var e=r[t];if(e!=null&&e!=="none")return e}function PO(r,t,e,a,n,i){if(!(!i||!i.length)){var o=Bh(t,"color")||n.color!=null&&n.color!=="none"&&(Bh(t,"colorAlpha")||Bh(t,"colorSaturation"));if(o){var s=t.get("visualMin"),l=t.get("visualMax"),u=e.dataExtent.slice();s!=null&&s<u[0]&&(u[0]=s),l!=null&&l>u[1]&&(u[1]=l);var f=t.get("colorMappingBy"),h={type:o.name,dataExtent:u,visual:o.range};h.type==="color"&&(f==="index"||f==="id")?(h.mappingMethod="category",h.loop=!0):h.mappingMethod="linear";var v=new Qt(h);return ow(v).drColorMappingBy=f,v}}}function Bh(r,t){var e=r.get(t);return H(e)&&e.length?{name:t,range:e}:null}function RO(r,t,e,a,n,i){var o=F({},t);if(n){var s=n.type,l=s==="color"&&ow(n).drColorMappingBy,u=l==="index"?a:l==="id"?i.mapIdToIndex(e.getId()):e.getValue(r.get("visualDimension"));o[s]=n.mapValueToVisual(u)}return o}var as=Math.max,Tu=Math.min,S0=Zr,mp=M,lw=["itemStyle","borderWidth"],EO=["itemStyle","gapWidth"],kO=["upperLabel","show"],OO=["upperLabel","height"];const BO={seriesType:"treemap",reset:function(r,t,e,a){var n=r.option,i=Le(r,e).refContainer,o=ne(r.getBoxLayoutParams(),i),s=n.size||[],l=K(S0(o.width,s[0]),i.width),u=K(S0(o.height,s[1]),i.height),f=a&&a.type,h=["treemapZoomToNode","treemapRootToNode"],v=es(a,h,r),c=f==="treemapRender"||f==="treemapMove"?a.rootRect:null,d=r.getViewRoot(),p=rw(d);if(f!=="treemapMove"){var g=f==="treemapZoomToNode"?HO(r,v,d,l,u):c?[c.width,c.height]:[l,u],y=n.sort;y&&y!=="asc"&&y!=="desc"&&(y="desc");var m={squareRatio:n.squareRatio,sort:y,leafDepth:n.leafDepth};d.hostTree.clearLayouts();var _={x:0,y:0,width:g[0],height:g[1],area:g[0]*g[1]};d.setLayout(_),uw(d,m,!1,0),_=d.getLayout(),mp(p,function(x,b){var w=(p[b+1]||d).getValue();x.setLayout(F({dataExtent:[w,w],borderWidth:0,upperHeight:0},_))})}var S=r.getData().tree.root;S.setLayout(WO(o,c,v),!0),r.setLayoutInfo(o),fw(S,new ot(-o.x,-o.y,e.getWidth(),e.getHeight()),p,d,0)}};function uw(r,t,e,a){var n,i;if(!r.isRemoved()){var o=r.getLayout();n=o.width,i=o.height;var s=r.getModel(),l=s.get(lw),u=s.get(EO)/2,f=hw(s),h=Math.max(l,f),v=l-u,c=h-u;r.setLayout({borderWidth:l,upperHeight:h,upperLabelHeight:f},!0),n=as(n-2*v,0),i=as(i-v-c,0);var d=n*i,p=NO(r,s,d,t,e,a);if(p.length){var g={x:v,y:c,width:n,height:i},y=Tu(n,i),m=1/0,_=[];_.area=0;for(var S=0,x=p.length;S<x;){var b=p[S];_.push(b),_.area+=b.getLayout().area;var w=GO(_,y,t.squareRatio);w<=m?(S++,m=w):(_.area-=_.pop().getLayout().area,b0(_,y,g,u,!1),y=Tu(g.width,g.height),_.length=_.area=0,m=1/0)}if(_.length&&b0(_,y,g,u,!0),!e){var T=s.get("childrenVisibleMin");T!=null&&d<T&&(e=!0)}for(var S=0,x=p.length;S<x;S++)uw(p[S],t,e,a+1)}}}function NO(r,t,e,a,n,i){var o=r.children||[],s=a.sort;s!=="asc"&&s!=="desc"&&(s=null);var l=a.leafDepth!=null&&a.leafDepth<=i;if(n&&!l)return r.viewChildren=[];o=kt(o,function(c){return!c.isRemoved()}),VO(o,s);var u=FO(t,o,s);if(u.sum===0)return r.viewChildren=[];if(u.sum=zO(t,e,u.sum,s,o),u.sum===0)return r.viewChildren=[];for(var f=0,h=o.length;f<h;f++){var v=o[f].getValue()/u.sum*e;o[f].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 zO(r,t,e,a,n){if(!a)return e;for(var i=r.get("visibleMin"),o=n.length,s=o,l=o-1;l>=0;l--){var u=n[a==="asc"?o-l-1:l].getValue();u/e*t<i&&(s=l,e-=u)}return a==="asc"?n.splice(0,o-s):n.splice(s,o-s),e}function VO(r,t){return t&&r.sort(function(e,a){var n=t==="asc"?e.getValue()-a.getValue():a.getValue()-e.getValue();return n===0?t==="asc"?e.dataIndex-a.dataIndex:a.dataIndex-e.dataIndex:n}),r}function FO(r,t,e){for(var a=0,n=0,i=t.length;n<i;n++)a+=t[n].getValue();var o=r.get("visualDimension"),s;return!t||!t.length?s=[NaN,NaN]:o==="value"&&e?(s=[t[t.length-1].getValue(),t[0].getValue()],e==="asc"&&s.reverse()):(s=[1/0,-1/0],mp(t,function(l){var u=l.getValue(o);u<s[0]&&(s[0]=u),u>s[1]&&(s[1]=u)})),{sum:a,dataExtent:s}}function GO(r,t,e){for(var a=0,n=1/0,i=0,o=void 0,s=r.length;i<s;i++)o=r[i].getLayout().area,o&&(o<n&&(n=o),o>a&&(a=o));var l=r.area*r.area,u=t*t*e;return l?as(u*a/l,l/(u*n)):1/0}function b0(r,t,e,a,n){var i=t===e.width?0:1,o=1-i,s=["x","y"],l=["width","height"],u=e[s[i]],f=t?r.area/t:0;(n||f>e[l[o]])&&(f=e[l[o]]);for(var h=0,v=r.length;h<v;h++){var c=r[h],d={},p=f?c.getLayout().area/f:0,g=d[l[o]]=as(f-2*a,0),y=e[s[i]]+e[l[i]]-u,m=h===v-1||y<p?y:p,_=d[l[i]]=as(m-2*a,0);d[s[o]]=e[s[o]]+Tu(a,g/2),d[s[i]]=u+Tu(a,_/2),u+=m,c.setLayout(d,!0)}e[s[o]]+=f,e[l[o]]-=f}function HO(r,t,e,a,n){var i=(t||{}).node,o=[a,n];if(!i||i===e)return o;for(var s,l=a*n,u=l*r.option.zoomToNodeRatio;s=i.parentNode;){for(var f=0,h=s.children,v=0,c=h.length;v<c;v++)f+=h[v].getValue();var d=i.getValue();if(d===0)return o;u*=f/d;var p=s.getModel(),g=p.get(lw),y=Math.max(g,hw(p));u+=4*g*g+(3*g+y)*Math.pow(u,.5),u>dg&&(u=dg),i=s}u<l&&(u=l);var m=Math.pow(u/l,.5);return[a*m,n*m]}function WO(r,t,e){if(t)return{x:t.x,y:t.y};var a={x:0,y:0};if(!e)return a;var n=e.node,i=n.getLayout();if(!i)return a;for(var o=[i.width/2,i.height/2],s=n;s;){var l=s.getLayout();o[0]+=l.x,o[1]+=l.y,s=s.parentNode}return{x:r.width/2-o[0],y:r.height/2-o[1]}}function fw(r,t,e,a,n){var i=r.getLayout(),o=e[n],s=o&&o===r;if(!(o&&!s||n===e.length&&r!==a)){r.setLayout({isInView:!0,invisible:!s&&!t.intersect(i),isAboveViewRoot:s},!0);var l=new ot(t.x-i.x,t.y-i.y,t.width,t.height);mp(r.viewChildren||[],function(u){fw(u,l,e,a,n+1)})}}function hw(r){return r.get(kO)?r.get(OO):0}function UO(r){r.registerSeriesModel(uO),r.registerChartView(SO),r.registerVisual(DO),r.registerLayout(BO),lO(r)}var x0=sr.prototype,Nh=Zu.prototype,cw=(function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return r})();(function(r){B(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t})(cw);function zh(r){return isNaN(+r.cpx1)||isNaN(+r.cpy1)}var YO=(function(r){B(t,r);function t(e){var a=r.call(this,e)||this;return a.type="ec-line",a}return t.prototype.getDefaultStyle=function(){return{stroke:N.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new cw},t.prototype.buildPath=function(e,a){zh(a)?x0.buildPath.call(this,e,a):Nh.buildPath.call(this,e,a)},t.prototype.pointAt=function(e){return zh(this.shape)?x0.pointAt.call(this,e):Nh.pointAt.call(this,e)},t.prototype.tangentAt=function(e){var a=this.shape,n=zh(a)?[a.x2-a.x1,a.y2-a.y1]:Nh.tangentAt.call(this,e);return qv(n,n)},t})(xt),Vh=["fromSymbol","toSymbol"];function w0(r){return"_"+r+"Type"}function T0(r,t,e){var a=t.getItemVisual(e,r);if(!a||a==="none")return a;var n=t.getItemVisual(e,r+"Size"),i=t.getItemVisual(e,r+"Rotate"),o=t.getItemVisual(e,r+"Offset"),s=t.getItemVisual(e,r+"KeepAspect"),l=rf(n),u=af(o||0,l);return a+l+u+(i||"")+(s||"")}function C0(r,t,e){var a=t.getItemVisual(e,r);if(!(!a||a==="none")){var n=t.getItemVisual(e,r+"Size"),i=t.getItemVisual(e,r+"Rotate"),o=t.getItemVisual(e,r+"Offset"),s=t.getItemVisual(e,r+"KeepAspect"),l=rf(n),u=af(o||0,l),f=le(a,-l[0]/2+u[0],-l[1]/2+u[1],l[0],l[1],null,s);return f.__specifiedRotation=i==null||isNaN(i)?void 0:+i*Math.PI/180||0,f.name=r,f}}function ZO(r){var t=new YO({name:"line",subPixelOptimize:!0});return Mv(t.shape,r),t}function Mv(r,t){r.x1=t[0][0],r.y1=t[0][1],r.x2=t[1][0],r.y2=t[1][1],r.percent=1;var e=t[2];e?(r.cpx1=e[0],r.cpy1=e[1]):(r.cpx1=NaN,r.cpy1=NaN)}var XO=(function(r){B(t,r);function t(e,a,n){var i=r.call(this)||this;return i._createLine(e,a,n),i}return t.prototype._createLine=function(e,a,n){var i=e.hostModel,o=e.getItemLayout(a),s=e.getItemVisual(a,"z2"),l=ZO(o);l.shape.percent=0,zt(l,{z2:et(s,0),shape:{percent:1}},i,a),this.add(l),M(Vh,function(u){var f=C0(u,e,a);this.add(f),this[w0(u)]=T0(u,e,a)},this),this._updateCommonStl(e,a,n)},t.prototype.updateData=function(e,a,n){var i=e.hostModel,o=this.childOfName("line"),s=e.getItemLayout(a),l={shape:{}};Mv(l.shape,s),Et(o,l,i,a),M(Vh,function(u){var f=T0(u,e,a),h=w0(u);if(this[h]!==f){this.remove(this.childOfName(u));var v=C0(u,e,a);this.add(v)}this[h]=f},this),this._updateCommonStl(e,a,n)},t.prototype.getLinePath=function(){return this.childAt(0)},t.prototype._updateCommonStl=function(e,a,n){var i=e.hostModel,o=this.childOfName("line"),s=n&&n.emphasisLineStyle,l=n&&n.blurLineStyle,u=n&&n.selectLineStyle,f=n&&n.labelStatesModels,h=n&&n.emphasisDisabled,v=n&&n.focus,c=n&&n.blurScope;if(!n||e.hasItemOption){var d=e.getItemModel(a),p=d.getModel("emphasis");s=p.getModel("lineStyle").getLineStyle(),l=d.getModel(["blur","lineStyle"]).getLineStyle(),u=d.getModel(["select","lineStyle"]).getLineStyle(),h=p.get("disabled"),v=p.get("focus"),c=p.get("blurScope"),f=Te(d)}var g=e.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(Vh,function(b){var w=this.childOfName(b);if(w){w.setColor(y),w.style.opacity=g.opacity;for(var T=0;T<ye.length;T++){var D=ye[T],A=o.getState(D);if(A){var C=A.style||{},I=w.ensureState(D),L=I.style||(I.style={});C.stroke!=null&&(L[w.__isEmptyBrush?"stroke":"fill"]=C.stroke),C.opacity!=null&&(L.opacity=C.opacity)}}w.markRedraw()}},this);var m=i.getRawValue(a);Ue(this,f,{labelDataIndex:a,labelFetcher:{getFormattedLabel:function(b,w){return i.getFormattedLabel(b,w,e.dataType)}},inheritColor:y||N.color.neutral99,defaultOpacity:g.opacity,defaultText:(m==null?e.getName(a):isFinite(m)?Xt(m):m)+""});var _=this.getTextContent();if(_){var S=f.normal;_.__align=_.style.align,_.__verticalAlign=_.style.verticalAlign,_.__position=S.get("position")||"middle";var x=S.get("distance");H(x)||(x=[x,x]),_.__labelDistance=x}this.setTextConfig({position:null,local:!0,inside:!1}),ae(this,v,c,h)},t.prototype.highlight=function(){Ta(this)},t.prototype.downplay=function(){Ca(this)},t.prototype.updateLayout=function(e,a){this.setLinePoints(e.getItemLayout(a))},t.prototype.setLinePoints=function(e){var a=this.childOfName("line");Mv(a.shape,e),a.dirty()},t.prototype.beforeUpdate=function(){var e=this,a=e.childOfName("fromSymbol"),n=e.childOfName("toSymbol"),i=e.getTextContent();if(!a&&!n&&(!i||i.ignore))return;for(var o=1,s=this.parent;s;)s.scaleX&&(o/=s.scaleX),s=s.parent;var l=e.childOfName("line");if(!this.__dirty&&!l.__dirty)return;var u=l.shape.percent,f=l.pointAt(0),h=l.pointAt(u),v=rS([],h,f);qv(v,v);function c(A,C){var I=A.__specifiedRotation;if(I==null){var L=l.tangentAt(C);A.attr("rotation",(C===1?-1:1)*Math.PI/2-Math.atan2(L[1],L[0]))}else A.attr("rotation",I)}if(a&&(a.setPosition(f),c(a,0),a.scaleX=a.scaleY=o*u,a.markRedraw()),n&&(n.setPosition(h),c(n,1),n.scaleX=n.scaleY=o*u,n.markRedraw()),i&&!i.ignore){i.x=i.y=0,i.originX=i.originY=0;var d=void 0,p=void 0,g=i.__labelDistance,y=g[0]*o,m=g[1]*o,_=u/2,S=l.tangentAt(_),x=[S[1],-S[0]],b=l.pointAt(_);x[1]>0&&(x[0]=-x[0],x[1]=-x[1]);var w=S[0]<0?-1:1;if(i.__position!=="start"&&i.__position!=="end"){var T=-Math.atan2(S[1],S[0]);h[0]<f[0]&&(T=Math.PI+T),i.rotation=T}var D=void 0;switch(i.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":D=-m,p="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":D=m,p="top";break;default:D=0,p="middle"}switch(i.__position){case"end":i.x=v[0]*y+h[0],i.y=v[1]*m+h[1],d=v[0]>.8?"left":v[0]<-.8?"right":"center",p=v[1]>.8?"top":v[1]<-.8?"bottom":"middle";break;case"start":i.x=-v[0]*y+f[0],i.y=-v[1]*m+f[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":i.x=y*w+f[0],i.y=f[1]+D,d=S[0]<0?"right":"left",i.originX=-y*w,i.originY=-D;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=b[0],i.y=b[1]+D,d="center",i.originY=-D;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-y*w+h[0],i.y=h[1]+D,d=S[0]>=0?"right":"left",i.originX=y*w,i.originY=-D;break}i.scaleX=i.scaleY=o,i.setStyle({verticalAlign:i.__verticalAlign||p,align:i.__align||d})}},t})(yt),$O=(function(){function r(t){this.group=new yt,this._LineCtor=t||XO}return r.prototype.updateData=function(t){var e=this;this._progressiveEls=null;var a=this,n=a.group,i=a._lineData;a._lineData=t,i||n.removeAll();var o=M0(t);t.diff(i).add(function(s){e._doAdd(t,s,o)}).update(function(s,l){e._doUpdate(i,t,l,s,o)}).remove(function(s){n.remove(i.getItemGraphicEl(s))}).execute()},r.prototype.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl(function(e,a){e.updateLayout(t,a)},this)},r.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=M0(t),this._lineData=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(t,e){this._progressiveEls=[];function a(s){!s.isGroup&&!KO(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var n=t.start;n<t.end;n++){var i=e.getItemLayout(n);if(Fh(i)){var o=new this._LineCtor(e,n,this._seriesScope);o.traverse(a),this.group.add(o),e.setItemGraphicEl(n,o),this._progressiveEls.push(o)}}},r.prototype.remove=function(){this.group.removeAll()},r.prototype.eachRendered=function(t){ki(this._progressiveEls||this.group,t)},r.prototype._doAdd=function(t,e,a){var n=t.getItemLayout(e);if(Fh(n)){var i=new this._LineCtor(t,e,a);t.setItemGraphicEl(e,i),this.group.add(i)}},r.prototype._doUpdate=function(t,e,a,n,i){var o=t.getItemGraphicEl(a);if(!Fh(e.getItemLayout(n))){this.group.remove(o);return}o?o.updateData(e,n,i):o=new this._LineCtor(e,n,i),e.setItemGraphicEl(n,o),this.group.add(o)},r})();function KO(r){return r.animators&&r.animators.length>0}function M0(r){var t=r.hostModel,e=t.getModel("emphasis");return{lineStyle:t.getModel("lineStyle").getLineStyle(),emphasisLineStyle:e.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:t.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:t.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:e.get("disabled"),blurScope:e.get("blurScope"),focus:e.get("focus"),labelStatesModels:Te(t)}}function A0(r){return isNaN(r[0])||isNaN(r[1])}function Fh(r){return r&&!A0(r[0])&&!A0(r[1])}function Jn(r){return"_EC_"+r}var qO=(function(){function r(t){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=t||!1}return r.prototype.isDirected=function(){return this._directed},r.prototype.addNode=function(t,e){t=t==null?""+e:""+t;var a=this._nodesMap;if(!a[Jn(t)]){var n=new ln(t,e);return n.hostGraph=this,this.nodes.push(n),a[Jn(t)]=n,n}},r.prototype.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},r.prototype.getNodeById=function(t){return this._nodesMap[Jn(t)]},r.prototype.addEdge=function(t,e,a){var n=this._nodesMap,i=this._edgesMap;if(bt(t)&&(t=this.nodes[t]),bt(e)&&(e=this.nodes[e]),t instanceof ln||(t=n[Jn(t)]),e instanceof ln||(e=n[Jn(e)]),!(!t||!e)){var o=t.id+"-"+e.id,s=new vw(t,e,a);return s.hostGraph=this,this._directed&&(t.outEdges.push(s),e.inEdges.push(s)),t.edges.push(s),t!==e&&e.edges.push(s),this.edges.push(s),i[o]=s,s}},r.prototype.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},r.prototype.getEdge=function(t,e){t instanceof ln&&(t=t.id),e instanceof ln&&(e=e.id);var a=this._edgesMap;return this._directed?a[t+"-"+e]:a[t+"-"+e]||a[e+"-"+t]},r.prototype.eachNode=function(t,e){for(var a=this.nodes,n=a.length,i=0;i<n;i++)a[i].dataIndex>=0&&t.call(e,a[i],i)},r.prototype.eachEdge=function(t,e){for(var a=this.edges,n=a.length,i=0;i<n;i++)a[i].dataIndex>=0&&a[i].node1.dataIndex>=0&&a[i].node2.dataIndex>=0&&t.call(e,a[i],i)},r.prototype.breadthFirstTraverse=function(t,e,a,n){if(e instanceof ln||(e=this._nodesMap[Jn(e)]),!!e){for(var i=a==="out"?"outEdges":a==="in"?"inEdges":"edges",o=0;o<this.nodes.length;o++)this.nodes[o].__visited=!1;if(!t.call(n,e,null))for(var s=[e];s.length;)for(var l=s.shift(),u=l[i],o=0;o<u.length;o++){var f=u[o],h=f.node1===l?f.node2:f.node1;if(!h.__visited){if(t.call(n,h,l))return;s.push(h),h.__visited=!0}}}},r.prototype.update=function(){for(var t=this.data,e=this.edgeData,a=this.nodes,n=this.edges,i=0,o=a.length;i<o;i++)a[i].dataIndex=-1;for(var i=0,o=t.count();i<o;i++)a[t.getRawIndex(i)].dataIndex=i;e.filterSelf(function(s){var l=n[e.getRawIndex(s)];return l.node1.dataIndex>=0&&l.node2.dataIndex>=0});for(var i=0,o=n.length;i<o;i++)n[i].dataIndex=-1;for(var i=0,o=e.count();i<o;i++)n[e.getRawIndex(i)].dataIndex=i},r.prototype.clone=function(){for(var t=new r(this._directed),e=this.nodes,a=this.edges,n=0;n<e.length;n++)t.addNode(e[n].id,e[n].dataIndex);for(var n=0;n<a.length;n++){var i=a[n];t.addEdge(i.node1.id,i.node2.id,i.dataIndex)}return t},r})(),ln=(function(){function r(t,e){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=t??"",this.dataIndex=e??-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(t){if(!(this.dataIndex<0)){var e=this.hostGraph,a=e.data.getItemModel(this.dataIndex);return a.getModel(t)}},r.prototype.getAdjacentDataIndices=function(){for(var t={edge:[],node:[]},e=0;e<this.edges.length;e++){var a=this.edges[e];a.dataIndex<0||(t.edge.push(a.dataIndex),t.node.push(a.node1.dataIndex,a.node2.dataIndex))}return t},r.prototype.getTrajectoryDataIndices=function(){for(var t=nt(),e=nt(),a=0,n=this.edges.length;a<n;a++){var i=this.edges[a];if(!(i.dataIndex<0)){t.set(i.dataIndex,!0);for(var o=[i.node1],s=[i.node2],l=0;l<o.length;){var u=o[l];l++,e.set(u.dataIndex,!0);for(var f=u.inEdges,h=0,v=f.length,c=void 0,d=void 0;h<v;h++)c=f[h],d=c.dataIndex,d>=0&&!t.hasKey(d)&&(t.set(d,!0),o.push(c.node1))}for(l=0;l<s.length;){var p=s[l];l++,e.set(p.dataIndex,!0);for(var g=p.outEdges,h=0,y=g.length,m=void 0,_=void 0;h<y;h++)m=g[h],_=m.dataIndex,_>=0&&!t.hasKey(_)&&(t.set(_,!0),s.push(m.node2))}}}return{edge:t.keys(),node:e.keys()}},r})(),vw=(function(){function r(t,e,a){this.dataIndex=-1,this.node1=t,this.node2=e,this.dataIndex=a??-1}return r.prototype.getModel=function(t){if(!(this.dataIndex<0)){var e=this.hostGraph,a=e.edgeData.getItemModel(this.dataIndex);return a.getModel(t)}},r.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},r.prototype.getTrajectoryDataIndices=function(){var t=nt(),e=nt();t.set(this.dataIndex,!0);for(var a=[this.node1],n=[this.node2],i=0;i<a.length;){var o=a[i];i++,e.set(o.dataIndex,!0);for(var s=o.inEdges,l=0,u=s.length,f=void 0,h=void 0;l<u;l++)f=o.inEdges[l],h=f.dataIndex,h>=0&&!t.hasKey(h)&&(t.set(h,!0),a.push(f.node1))}for(i=0;i<n.length;){var v=n[i];i++,e.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&&!t.hasKey(p)&&(t.set(p,!0),n.push(d.node2))}return{edge:t.keys(),node:e.keys()}},r})();function dw(r,t){return{getValue:function(e){var a=this[r][t];return a.getStore().get(a.getDimensionIndex(e||"value"),this.dataIndex)},setVisual:function(e,a){this.dataIndex>=0&&this[r][t].setItemVisual(this.dataIndex,e,a)},getVisual:function(e){return this[r][t].getItemVisual(this.dataIndex,e)},setLayout:function(e,a){this.dataIndex>=0&&this[r][t].setItemLayout(this.dataIndex,e,a)},getLayout:function(){return this[r][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[r][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[r][t].getRawIndex(this.dataIndex)}}}fe(ln,dw("hostGraph","data"));fe(vw,dw("hostGraph","edgeData"));function QO(r,t,e,a,n){for(var i=new qO(a),o=0;o<r.length;o++)i.addNode(Zr(r[o].id,r[o].name,o),o);for(var s=[],l=[],u=0,o=0;o<t.length;o++){var f=t[o],h=f.source,v=f.target;i.addEdge(h,v,u)&&(l.push(f),s.push(Zr(ge(f.id,null),h+" > "+v)),u++)}var c=e.get("coordinateSystem"),d;if(c==="cartesian2d"||c==="polar"||c==="matrix")d=Bn(r,e);else{var p=ms.get(c),g=p?p.dimensions||[]:[];dt(g,"value")<0&&g.concat(["value"]);var y=of(r,{coordDimensions:g,encodeDefine:e.getEncode()}).dimensions;d=new Yr(y,e),d.initData(r)}var m=new Yr(["value"],e);return m.initData(l,s),n&&n(d,m),J1({mainData:d,struct:i,structAttr:"graph",datas:{node:d,edge:m},datasAttr:{node:"data",edge:"edgeData"}}),i.update(),i}var jO=(function(){function r(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return r})(),JO=(function(r){B(t,r);function t(e){var a=r.call(this,e)||this;return a.type="pointer",a}return t.prototype.getDefaultShape=function(){return new jO},t.prototype.buildPath=function(e,a){var n=Math.cos,i=Math.sin,o=a.r,s=a.width,l=a.angle,u=a.x-n(l)*s*(s>=o/3?1:2),f=a.y-i(l)*s*(s>=o/3?1:2);l=a.angle-Math.PI/2,e.moveTo(u,f),e.lineTo(a.x+n(l)*s,a.y+i(l)*s),e.lineTo(a.x+n(a.angle)*o,a.y+i(a.angle)*o),e.lineTo(a.x-n(l)*s,a.y-i(l)*s),e.lineTo(u,f)},t})(xt);function tB(r,t){var e=r.get("center"),a=t.getWidth(),n=t.getHeight(),i=Math.min(a,n),o=K(e[0],t.getWidth()),s=K(e[1],t.getHeight()),l=K(r.get("radius"),i/2);return{cx:o,cy:s,r:l}}function gl(r,t){var e=r==null?"":r+"";return t&&(X(t)?e=t.replace("{value}",e):Q(t)&&(e=t(r))),e}var eB=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){this.group.removeAll();var i=e.get(["axisLine","lineStyle","color"]),o=tB(e,n);this._renderMain(e,a,n,i,o),this._data=e.getData()},t.prototype.dispose=function(){},t.prototype._renderMain=function(e,a,n,i,o){var s=this.group,l=e.get("clockwise"),u=-e.get("startAngle")/180*Math.PI,f=-e.get("endAngle")/180*Math.PI,h=e.getModel("axisLine"),v=h.get("roundCap"),c=v?bu:or,d=h.get("show"),p=h.getModel("lineStyle"),g=p.get("width"),y=[u,f];sd(y,!l),u=y[0],f=y[1];for(var m=f-u,_=u,S=[],x=0;d&&x<i.length;x++){var b=Math.min(Math.max(i[x][0],0),1);f=u+m*b;var w=new c({shape:{startAngle:_,endAngle:f,cx:o.cx,cy:o.cy,clockwise:l,r0:o.r-g,r:o.r},silent:!0});w.setStyle({fill:i[x][1]}),w.setStyle(p.getLineStyle(["color","width"])),S.push(w),_=f}S.reverse(),M(S,function(D){return s.add(D)});var T=function(D){if(D<=0)return i[0][1];var A;for(A=0;A<i.length;A++)if(i[A][0]>=D&&(A===0?0:i[A-1][0])<D)return i[A][1];return i[A-1][1]};this._renderTicks(e,a,n,T,o,u,f,l,g),this._renderTitleAndDetail(e,a,n,T,o),this._renderAnchor(e,o),this._renderPointer(e,a,n,T,o,u,f,l,g)},t.prototype._renderTicks=function(e,a,n,i,o,s,l,u,f){for(var h=this.group,v=o.cx,c=o.cy,d=o.r,p=+e.get("min"),g=+e.get("max"),y=e.getModel("splitLine"),m=e.getModel("axisTick"),_=e.getModel("axisLabel"),S=e.get("splitNumber"),x=m.get("splitNumber"),b=K(y.get("length"),d),w=K(m.get("length"),d),T=s,D=(l-s)/S,A=D/x,C=y.getModel("lineStyle").getLineStyle(),I=m.getModel("lineStyle").getLineStyle(),L=y.get("distance"),P,R,E=0;E<=S;E++){if(P=Math.cos(T),R=Math.sin(T),y.get("show")){var O=L?L+f:f,k=new sr({shape:{x1:P*(d-O)+v,y1:R*(d-O)+c,x2:P*(d-b-O)+v,y2:R*(d-b-O)+c},style:C,silent:!0});C.stroke==="auto"&&k.setStyle({stroke:i(E/S)}),h.add(k)}if(_.get("show")){var O=_.get("distance")+L,z=gl(Xt(E/S*(g-p)+p),_.get("formatter")),V=i(E/S),G=P*(d-b-O)+v,W=R*(d-b-O)+c,Z=_.get("rotate"),rt=0;Z==="radial"?(rt=-T+2*Math.PI,rt>Math.PI/2&&(rt+=Math.PI)):Z==="tangential"?rt=-T-Math.PI/2:bt(Z)&&(rt=Z*Math.PI/180),rt===0?h.add(new Tt({style:Ht(_,{text:z,x:G,y:W,verticalAlign:R<-.8?"top":R>.8?"bottom":"middle",align:P<-.4?"left":P>.4?"right":"center"},{inheritColor:V}),silent:!0})):h.add(new Tt({style:Ht(_,{text:z,x:G,y:W,verticalAlign:"middle",align:"center"},{inheritColor:V}),silent:!0,originX:G,originY:W,rotation:rt}))}if(m.get("show")&&E!==S){var O=m.get("distance");O=O?O+f:f;for(var lt=0;lt<=x;lt++){P=Math.cos(T),R=Math.sin(T);var Ct=new sr({shape:{x1:P*(d-O)+v,y1:R*(d-O)+c,x2:P*(d-w-O)+v,y2:R*(d-w-O)+c},silent:!0,style:I});I.stroke==="auto"&&Ct.setStyle({stroke:i((E+lt/x)/S)}),h.add(Ct),T+=A}T-=A}else T+=D}},t.prototype._renderPointer=function(e,a,n,i,o,s,l,u,f){var h=this.group,v=this._data,c=this._progressEls,d=[],p=e.get(["pointer","show"]),g=e.getModel("progress"),y=g.get("show"),m=e.getData(),_=m.mapDimension("value"),S=+e.get("min"),x=+e.get("max"),b=[S,x],w=[s,l];function T(A,C){var I=m.getItemModel(A),L=I.getModel("pointer"),P=K(L.get("width"),o.r),R=K(L.get("length"),o.r),E=e.get(["pointer","icon"]),O=L.get("offsetCenter"),k=K(O[0],o.r),z=K(O[1],o.r),V=L.get("keepAspect"),G;return E?G=le(E,k-P/2,z-R,P,R,null,V):G=new JO({shape:{angle:-Math.PI/2,width:P,r:R,x:k,y:z}}),G.rotation=-(C+Math.PI/2),G.x=o.cx,G.y=o.cy,G}function D(A,C){var I=g.get("roundCap"),L=I?bu:or,P=g.get("overlap"),R=P?g.get("width"):f/m.count(),E=P?o.r-R:o.r-(A+1)*R,O=P?o.r:o.r-A*R,k=new L({shape:{startAngle:s,endAngle:C,cx:o.cx,cy:o.cy,clockwise:u,r0:E,r:O}});return P&&(k.z2=St(m.get(_,A),[S,x],[100,0],!0)),k}(y||p)&&(m.diff(v).add(function(A){var C=m.get(_,A);if(p){var I=T(A,s);zt(I,{rotation:-((isNaN(+C)?w[0]:St(C,b,w,!0))+Math.PI/2)},e),h.add(I),m.setItemGraphicEl(A,I)}if(y){var L=D(A,s),P=g.get("clip");zt(L,{shape:{endAngle:St(C,b,w,P)}},e),h.add(L),Pc(e.seriesIndex,m.dataType,A,L),d[A]=L}}).update(function(A,C){var I=m.get(_,A);if(p){var L=v.getItemGraphicEl(C),P=L?L.rotation:s,R=T(A,P);R.rotation=P,Et(R,{rotation:-((isNaN(+I)?w[0]:St(I,b,w,!0))+Math.PI/2)},e),h.add(R),m.setItemGraphicEl(A,R)}if(y){var E=c[C],O=E?E.shape.endAngle:s,k=D(A,O),z=g.get("clip");Et(k,{shape:{endAngle:St(I,b,w,z)}},e),h.add(k),Pc(e.seriesIndex,m.dataType,A,k),d[A]=k}}).execute(),m.each(function(A){var C=m.getItemModel(A),I=C.getModel("emphasis"),L=I.get("focus"),P=I.get("blurScope"),R=I.get("disabled");if(p){var E=m.getItemGraphicEl(A),O=m.getItemVisual(A,"style"),k=O.fill;if(E instanceof Xe){var z=E.style;E.useStyle(F({image:z.image,x:z.x,y:z.y,width:z.width,height:z.height},O))}else E.useStyle(O),E.type!=="pointer"&&E.setColor(k);E.setStyle(C.getModel(["pointer","itemStyle"]).getItemStyle()),E.style.fill==="auto"&&E.setStyle("fill",i(St(m.get(_,A),b,[0,1],!0))),E.z2EmphasisLift=0,De(E,C),ae(E,L,P,R)}if(y){var V=d[A];V.useStyle(m.getItemVisual(A,"style")),V.setStyle(C.getModel(["progress","itemStyle"]).getItemStyle()),V.z2EmphasisLift=0,De(V,C),ae(V,L,P,R)}}),this._progressEls=d)},t.prototype._renderAnchor=function(e,a){var n=e.getModel("anchor"),i=n.get("show");if(i){var o=n.get("size"),s=n.get("icon"),l=n.get("offsetCenter"),u=n.get("keepAspect"),f=le(s,a.cx-o/2+K(l[0],a.r),a.cy-o/2+K(l[1],a.r),o,o,null,u);f.z2=n.get("showAbove")?1:0,f.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(f)}},t.prototype._renderTitleAndDetail=function(e,a,n,i,o){var s=this,l=e.getData(),u=l.mapDimension("value"),f=+e.get("min"),h=+e.get("max"),v=new yt,c=[],d=[],p=e.isAnimationEnabled(),g=e.get(["pointer","showAbove"]);l.diff(this._data).add(function(y){c[y]=new Tt({silent:!0}),d[y]=new Tt({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),S=new yt,x=i(St(_,[f,h],[0,1],!0)),b=m.getModel("title");if(b.get("show")){var w=b.get("offsetCenter"),T=o.cx+K(w[0],o.r),D=o.cy+K(w[1],o.r),A=c[y];A.attr({z2:g?0:2,style:Ht(b,{x:T,y:D,text:l.getName(y),align:"center",verticalAlign:"middle"},{inheritColor:x})}),S.add(A)}var C=m.getModel("detail");if(C.get("show")){var I=C.get("offsetCenter"),L=o.cx+K(I[0],o.r),P=o.cy+K(I[1],o.r),R=K(C.get("width"),o.r),E=K(C.get("height"),o.r),O=e.get(["progress","show"])?l.getItemVisual(y,"style").fill:x,A=d[y],k=C.get("formatter");A.attr({z2:g?0:2,style:Ht(C,{x:L,y:P,text:gl(_,k),width:isNaN(R)?null:R,height:isNaN(E)?null:E,align:"center",verticalAlign:"middle"},{inheritColor:O})}),yb(A,{normal:C},_,function(V){return gl(V,k)}),p&&XD(A,y,l,e,{getFormattedLabel:function(V,G,W,Z,rt,lt){return gl(lt?lt.interpolatedValue:_,k)}}),S.add(A)}v.add(S)}),this.group.add(v),this._titleEls=c,this._detailEls=d},t.type="gauge",t})(Vt),rB=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.visualStyleAccessPath="itemStyle",e}return t.prototype.getInitialData=function(e,a){return bs(this,["value"])},t.type="series.gauge",t.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,N.color.neutral10]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:N.color.axisTick,width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:N.color.axisTickMinor,width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:N.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:N.color.neutral00,borderWidth:0,borderColor:N.color.theme[0]}},title:{show:!0,offsetCenter:[0,"20%"],color:N.color.secondary,fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:N.color.transparent,borderWidth:0,borderColor:N.color.neutral40,width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:N.color.primary,fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},t})(Ut);function aB(r){r.registerChartView(eB),r.registerSeriesModel(rB)}var nB=["itemStyle","opacity"],iB=(function(r){B(t,r);function t(e,a){var n=r.call(this)||this,i=n,o=new ur,s=new Tt;return i.setTextContent(s),n.setTextGuideLine(o),n.updateData(e,a,!0),n}return t.prototype.updateData=function(e,a,n){var i=this,o=e.hostModel,s=e.getItemModel(a),l=e.getItemLayout(a),u=s.getModel("emphasis"),f=s.get(nB);f=f??1,n||$r(i),i.useStyle(e.getItemVisual(a,"style")),i.style.lineJoin="round",n?(i.setShape({points:l.points}),i.style.opacity=0,zt(i,{style:{opacity:f}},o,a)):Et(i,{style:{opacity:f},shape:{points:l.points}},o,a),De(i,s),this._updateLabel(e,a),ae(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(e,a){var n=this,i=this.getTextGuideLine(),o=n.getTextContent(),s=e.hostModel,l=e.getItemModel(a),u=e.getItemLayout(a),f=u.label,h=e.getItemVisual(a,"style"),v=h.fill;Ue(o,Te(l),{labelFetcher:e.hostModel,labelDataIndex:a,defaultOpacity:h.opacity,defaultText:e.getName(a)},{normal:{align:f.textAlign,verticalAlign:f.verticalAlign}});var c=l.getModel("label"),d=c.get("color"),p=d==="inherit"?v:null;n.setTextConfig({local:!0,inside:!!f.inside,insideStroke:p,outsideFill:p});var g=f.linePoints;i.setShape({points:g}),n.textGuideLineConfig={anchor:g?new ht(g[0][0],g[0][1]):null},Et(o,{style:{x:f.x,y:f.y}},s,a),o.attr({rotation:f.rotation,originX:f.x,originY:f.y,z2:10}),p1(n,g1(l),{stroke:v})},t})(Dr),oB=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.ignoreLabelLineUpdate=!0,e}return t.prototype.render=function(e,a,n){var i=e.getData(),o=this._data,s=this.group;i.diff(o).add(function(l){var u=new iB(i,l);i.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var f=o.getItemGraphicEl(u);f.updateData(i,l),s.add(f),i.setItemGraphicEl(l,f)}).remove(function(l){var u=o.getItemGraphicEl(l);di(u,e,l)}).execute(),this._data=i},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.prototype.dispose=function(){},t.type="funnel",t})(Vt),sB=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new hp(Y(this.getData,this),Y(this.getRawData,this)),this._defaultLabelLine(e)},t.prototype.getInitialData=function(e,a){return bs(this,{coordDimensions:["value"],encodeDefaulter:it(Vb,this)})},t.prototype._defaultLabelLine=function(e){Fo(e,"labelLine",["show"]);var a=e.labelLine,n=e.emphasis.labelLine;a.show=a.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.prototype.getDataParams=function(e){var a=this.getData(),n=r.prototype.getDataParams.call(this,e),i=a.mapDimension("value"),o=a.getSum(i);return n.percent=o?+(a.get(i,e)/o*100).toFixed(2):0,n.$vars.push("percent"),n},t.type="series.funnel",t.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:N.color.neutral00,borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:N.color.primary}}},t})(Ut);function lB(r,t){for(var e=r.mapDimension("value"),a=r.mapArray(e,function(l){return l}),n=[],i=t==="ascending",o=0,s=r.count();o<s;o++)n[o]=o;return Q(t)?n.sort(t):t!=="none"&&n.sort(function(l,u){return i?a[l]-a[u]:a[u]-a[l]}),n}function uB(r){var t=r.hostModel,e=t.get("orient");r.each(function(a){var n=r.getItemModel(a),i=n.getModel("label"),o=i.get("position"),s=n.getModel("labelLine"),l=r.getItemLayout(a),u=l.points,f=o==="inner"||o==="inside"||o==="center"||o==="insideLeft"||o==="insideRight",h,v,c,d;if(f)o==="insideLeft"?(v=(u[0][0]+u[3][0])/2+5,c=(u[0][1]+u[3][1])/2,h="left"):o==="insideRight"?(v=(u[1][0]+u[2][0])/2-5,c=(u[1][1]+u[2][1])/2,h="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,h="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,h="right"):o==="right"?(p=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,y=p+_,v=y+5,h="left"):o==="top"?(p=(u[3][0]+u[0][0])/2,g=(u[3][1]+u[0][1])/2,m=g-_,c=m-5,h="center"):o==="bottom"?(p=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,m=g+_,c=m+5,h="center"):o==="rightTop"?(p=e==="horizontal"?u[3][0]:u[1][0],g=e==="horizontal"?u[3][1]:u[1][1],e==="horizontal"?(m=g-_,c=m-5,h="center"):(y=p+_,v=y+5,h="top")):o==="rightBottom"?(p=u[2][0],g=u[2][1],e==="horizontal"?(m=g+_,c=m+5,h="center"):(y=p+_,v=y+5,h="bottom")):o==="leftTop"?(p=u[0][0],g=e==="horizontal"?u[0][1]:u[1][1],e==="horizontal"?(m=g-_,c=m-5,h="center"):(y=p-_,v=y-5,h="right")):o==="leftBottom"?(p=e==="horizontal"?u[1][0]:u[3][0],g=e==="horizontal"?u[1][1]:u[2][1],e==="horizontal"?(m=g+_,c=m+5,h="center"):(y=p-_,v=y-5,h="right")):(p=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,e==="horizontal"?(m=g+_,c=m+5,h="center"):(y=p+_,v=y+5,h="left")),e==="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:h,inside:f}})}function fB(r,t){r.eachSeriesByType("funnel",function(e){var a=e.getData(),n=a.mapDimension("value"),i=e.get("sort"),o=Le(e,t),s=ne(e.getBoxLayoutParams(),o.refContainer),l=e.get("orient"),u=s.width,f=s.height,h=lB(a,i),v=s.x,c=s.y,d=l==="horizontal"?[K(e.get("minSize"),f),K(e.get("maxSize"),f)]:[K(e.get("minSize"),u),K(e.get("maxSize"),u)],p=a.getDataExtent(n),g=e.get("min"),y=e.get("max");g==null&&(g=Math.min(p[0],0)),y==null&&(y=p[1]);var m=e.get("funnelAlign"),_=e.get("gap"),S=l==="horizontal"?u:f,x=(S-_*(a.count()-1))/a.count(),b=function(R,E){if(l==="horizontal"){var O=a.get(n,R)||0,k=St(O,[g,y],d,!0),z=void 0;switch(m){case"top":z=c;break;case"center":z=c+(f-k)/2;break;case"bottom":z=c+(f-k);break}return[[E,z],[E,z+k]]}var V=a.get(n,R)||0,G=St(V,[g,y],d,!0),W;switch(m){case"left":W=v;break;case"center":W=v+(u-G)/2;break;case"right":W=v+u-G;break}return[[W,E],[W+G,E]]};i==="ascending"&&(x=-x,_=-_,l==="horizontal"?v+=u:c+=f,h=h.reverse());for(var w=0;w<h.length;w++){var T=h[w],D=h[w+1],A=a.getItemModel(T);if(l==="horizontal"){var C=A.get(["itemStyle","width"]);C==null?C=x:(C=K(C,u),i==="ascending"&&(C=-C));var I=b(T,v),L=b(D,v+C);v+=C+_,a.setItemLayout(T,{points:I.concat(L.slice().reverse())})}else{var P=A.get(["itemStyle","height"]);P==null?P=x:(P=K(P,f),i==="ascending"&&(P=-P));var I=b(T,c),L=b(D,c+P);c+=P+_,a.setItemLayout(T,{points:I.concat(L.slice().reverse())})}}uB(a)})}function hB(r){r.registerChartView(oB),r.registerSeriesModel(sB),r.registerLayout(fB),r.registerProcessor(sf("funnel"))}var cB=.3,vB=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._dataGroup=new yt,e._initialized=!1,e}return t.prototype.init=function(){this.group.add(this._dataGroup)},t.prototype.render=function(e,a,n,i){this._progressiveEls=null;var o=this._dataGroup,s=e.getData(),l=this._data,u=e.coordinateSystem,f=u.dimensions,h=L0(e);s.diff(l).add(v).update(c).remove(d).execute();function v(g){var y=D0(s,o,g,f,u);Gh(y,s,g,h)}function c(g,y){var m=l.getItemGraphicEl(y),_=pw(s,g,f,u);s.setItemGraphicEl(g,m),Et(m,{shape:{points:_}},e,g),$r(m),Gh(m,s,g,h)}function d(g){var y=l.getItemGraphicEl(g);o.remove(y)}if(!this._initialized){this._initialized=!0;var p=dB(u,e,function(){setTimeout(function(){o.removeClipPath()})});o.setClipPath(p)}this._data=s},t.prototype.incrementalPrepareRender=function(e,a,n){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},t.prototype.incrementalRender=function(e,a,n){for(var i=a.getData(),o=a.coordinateSystem,s=o.dimensions,l=L0(a),u=this._progressiveEls=[],f=e.start;f<e.end;f++){var h=D0(i,this._dataGroup,f,s,o);h.incremental=!0,Gh(h,i,f,l),u.push(h)}},t.prototype.remove=function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null},t.type="parallel",t})(Vt);function dB(r,t,e){var a=r.model,n=r.getRect(),i=new _t({shape:{x:n.x,y:n.y,width:n.width,height:n.height}}),o=a.get("layout")==="horizontal"?"width":"height";return i.setShape(o,0),zt(i,{shape:{width:n.width,height:n.height}},t,e),i}function pw(r,t,e,a){for(var n=[],i=0;i<e.length;i++){var o=e[i],s=r.get(r.mapDimension(o),t);pB(s,a.getAxis(o).type)||n.push(a.dataToPoint(s,o))}return n}function D0(r,t,e,a,n){var i=pw(r,e,a,n),o=new ur({shape:{points:i},z2:10});return t.add(o),r.setItemGraphicEl(e,o),o}function L0(r){var t=r.get("smooth",!0);return t===!0&&(t=cB),t=Vo(t),Hr(t)&&(t=0),{smooth:t}}function Gh(r,t,e,a){r.useStyle(t.getItemVisual(e,"style")),r.style.fill=null,r.setShape("smooth",a.smooth);var n=t.getItemModel(e),i=n.getModel("emphasis");De(r,n,"lineStyle"),ae(r,i.get("focus"),i.get("blurScope"),i.get("disabled"))}function pB(r,t){return t==="category"?r==null:r==null||isNaN(r)}var gB=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.visualStyleAccessPath="lineStyle",e.visualDrawType="stroke",e}return t.prototype.getInitialData=function(e,a){return Bn(null,this,{useEncodeDefaulter:Y(yB,null,this)})},t.prototype.getRawIndicesByActiveState=function(e){var a=this.coordinateSystem,n=this.getData(),i=[];return a.eachActiveState(n,function(o,s){e===o&&i.push(n.getRawIndex(s))}),i},t.type="series.parallel",t.dependencies=["parallel"],t.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"},t})(Ut);function yB(r){var t=r.ecModel.getComponent("parallel",r.get("parallelIndex"));if(t){var e={};return M(t.dimensions,function(a){var n=mB(a);e[a]=n}),e}}function mB(r){return+r.replace("dim","")}var _B=["lineStyle","opacity"],SB={seriesType:"parallel",reset:function(r,t){var e=r.coordinateSystem,a={normal:r.get(["lineStyle","opacity"]),active:r.get("activeOpacity"),inactive:r.get("inactiveOpacity")};return{progress:function(n,i){e.eachActiveState(i,function(o,s){var l=a[o];if(o==="normal"&&i.hasItemOption){var u=i.getItemModel(s).get(_B,!0);u!=null&&(l=u)}var f=i.ensureUniqueItemVisual(s,"style");f.opacity=l},n.start,n.end)}}}};function bB(r){xB(r),wB(r)}function xB(r){if(!r.parallel){var t=!1;M(r.series,function(e){e&&e.type==="parallel"&&(t=!0)}),t&&(r.parallel=[{}])}}function wB(r){var t=Wt(r.parallelAxis);M(t,function(e){if(j(e)){var a=e.parallelIndex||0,n=Wt(r.parallel)[a];n&&n.parallelAxisDefault&&ft(e,n.parallelAxisDefault,!1)}})}var TB=5,CB=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){this._model=e,this._api=n,this._handlers||(this._handlers={},M(MB,function(i,o){n.getZr().on(o,this._handlers[o]=Y(i,this))},this)),_s(this,"_throttledDispatchExpand",e.get("axisExpandRate"),"fixRate")},t.prototype.dispose=function(e,a){$o(this,"_throttledDispatchExpand"),M(this._handlers,function(n,i){a.getZr().off(i,n)}),this._handlers=null},t.prototype._throttledDispatchExpand=function(e){this._dispatchExpand(e)},t.prototype._dispatchExpand=function(e){e&&this._api.dispatchAction(F({type:"parallelAxisExpand"},e))},t.type="parallel",t})($t),MB={mousedown:function(r){Hh(this,"click")&&(this._mouseDownPoint=[r.offsetX,r.offsetY])},mouseup:function(r){var t=this._mouseDownPoint;if(Hh(this,"click")&&t){var e=[r.offsetX,r.offsetY],a=Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2);if(a>TB)return;var n=this._model.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]);n.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:n.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(r){if(!(this._mouseDownPoint||!Hh(this,"mousemove"))){var t=this._model,e=t.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]),a=e.behavior;a==="jump"&&this._throttledDispatchExpand.debounceNextCall(t.get("axisExpandDebounce")),this._throttledDispatchExpand(a==="none"?null:{axisExpandWindow:e.axisExpandWindow,animation:a==="jump"?null:{duration:0}})}}};function Hh(r,t){var e=r._model;return e.get("axisExpandable")&&e.get("axisExpandTriggerOn")===t}var AB=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(){r.prototype.init.apply(this,arguments),this.mergeOption({})},t.prototype.mergeOption=function(e){var a=this.option;e&&ft(a,e,!0),this._initDimensions()},t.prototype.contains=function(e,a){var n=e.get("parallelIndex");return n!=null&&a.getComponent("parallel",n)===this},t.prototype.setAxisExpand=function(e){M(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(a){e.hasOwnProperty(a)&&(this.option[a]=e[a])},this)},t.prototype._initDimensions=function(){var e=this.dimensions=[],a=this.parallelAxisIndex=[],n=kt(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(i){return(i.get("parallelIndex")||0)===this.componentIndex},this);M(n,function(i){e.push("dim"+i.get("dim")),a.push(i.componentIndex)})},t.type="parallel",t.dependencies=["parallelAxis"],t.layoutMode="box",t.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},t})(mt),DB=(function(r){B(t,r);function t(e,a,n,i,o){var s=r.call(this,e,a,n)||this;return s.type=i||"value",s.axisIndex=o,s}return t.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},t})(rp);function La(r,t,e,a,n,i){r=r||0;var o=e[1]-e[0];if(n!=null&&(n=ti(n,[0,o])),i!=null&&(i=Math.max(i,n??0)),a==="all"){var s=Math.abs(t[1]-t[0]);s=ti(s,[0,o]),n=i=ti(s,[n,i]),a=0}t[0]=ti(t[0],e),t[1]=ti(t[1],e);var l=Wh(t,a);t[a]+=r;var u=n||0,f=e.slice();l.sign<0?f[0]+=u:f[1]-=u,t[a]=ti(t[a],f);var h;return h=Wh(t,a),n!=null&&(h.sign!==l.sign||h.span<n)&&(t[1-a]=t[a]+l.sign*n),h=Wh(t,a),i!=null&&h.span>i&&(t[1-a]=t[a]+h.sign*i),t}function Wh(r,t){var e=r[t]-r[1-t];return{span:Math.abs(e),sign:e>0?-1:e<0?1:t?-1:1}}function ti(r,t){return Math.min(t[1]!=null?t[1]:1/0,Math.max(t[0]!=null?t[0]:-1/0,r))}var Uh=M,gw=Math.min,yw=Math.max,I0=Math.floor,LB=Math.ceil,P0=Xt,IB=Math.PI,PB=(function(){function r(t,e,a){this.type="parallel",this._axesMap=nt(),this._axesLayout={},this.dimensions=t.dimensions,this._model=t,this._init(t,e,a)}return r.prototype._init=function(t,e,a){var n=t.dimensions,i=t.parallelAxisIndex;Uh(n,function(o,s){var l=i[s],u=e.getComponent("parallelAxis",l),f=this._axesMap.set(o,new DB(o,a1(u),[0,0],u.get("type"),l)),h=f.type==="category";f.onBand=h&&u.get("boundaryGap"),f.inverse=u.get("inverse"),u.axis=f,f.model=u,f.coordinateSystem=u.coordinateSystem=this},this)},r.prototype.update=function(t,e){this._updateAxesFromSeries(this._model,t)},r.prototype.containPoint=function(t){var e=this._makeLayoutInfo(),a=e.axisBase,n=e.layoutBase,i=e.pixelDimIndex,o=t[1-i],s=t[i];return o>=a&&o<=a+e.axisLength&&s>=n&&s<=n+e.layoutLength},r.prototype.getModel=function(){return this._model},r.prototype._updateAxesFromSeries=function(t,e){e.eachSeries(function(a){if(t.contains(a,e)){var n=a.getData();Uh(this.dimensions,function(i){var o=this._axesMap.get(i);o.scale.unionExtentFromData(n,n.mapDimension(i)),hv(o.scale,o.model)},this)}},this)},r.prototype.resize=function(t,e){var a=Le(t,e).refContainer;this._rect=ne(t.getBoxLayoutParams(),a),this._layoutAxes()},r.prototype.getRect=function(){return this._rect},r.prototype._makeLayoutInfo=function(){var t=this._model,e=this._rect,a=["x","y"],n=["width","height"],i=t.get("layout"),o=i==="horizontal"?0:1,s=e[n[o]],l=[0,s],u=this.dimensions.length,f=yl(t.get("axisExpandWidth"),l),h=yl(t.get("axisExpandCount")||0,[0,u]),v=t.get("axisExpandable")&&u>3&&u>h&&h>1&&f>0&&s>0,c=t.get("axisExpandWindow"),d;if(c)d=yl(c[1]-c[0],l),c[1]=c[0]+d;else{d=yl(f*(h-1),l);var p=t.get("axisExpandCenter")||I0(u/2);c=[f*p-d/2],c[1]=c[0]+d}var g=(s-d)/(u-h);g<3&&(g=0);var y=[I0(P0(c[0]/f,1))+1,LB(P0(c[1]/f,1))-1],m=g/f*c[0];return{layout:i,pixelDimIndex:o,layoutBase:e[a[o]],layoutLength:s,axisBase:e[a[1-o]],axisLength:e[n[1-o]],axisExpandable:v,axisExpandWidth:f,axisCollapseWidth:g,axisExpandWindow:c,axisCount:u,winInnerIndices:y,axisExpandWindow0Pos:m}},r.prototype._layoutAxes=function(){var t=this._rect,e=this._axesMap,a=this.dimensions,n=this._makeLayoutInfo(),i=n.layout;e.each(function(o){var s=[0,n.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),Uh(a,function(o,s){var l=(n.axisExpandable?EB:RB)(s,n),u={horizontal:{x:l.position,y:n.axisLength},vertical:{x:0,y:l.position}},f={horizontal:IB/2,vertical:0},h=[u[i].x+t.x,u[i].y+t.y],v=f[i],c=Fe();Bu(c,c,v),mi(c,c,h),this._axesLayout[o]={position:h,rotation:v,transform:c,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},r.prototype.getAxis=function(t){return this._axesMap.get(t)},r.prototype.dataToPoint=function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},r.prototype.eachActiveState=function(t,e,a,n){a==null&&(a=0),n==null&&(n=t.count());var i=this._axesMap,o=this.dimensions,s=[],l=[];M(o,function(g){s.push(t.mapDimension(g)),l.push(i.get(g).model)});for(var u=this.hasAxisBrushed(),f=a;f<n;f++){var h=void 0;if(!u)h="normal";else{h="active";for(var v=t.getValues(s,f),c=0,d=o.length;c<d;c++){var p=l[c].getActiveState(v[c]);if(p==="inactive"){h="inactive";break}}}e(h,f)}},r.prototype.hasAxisBrushed=function(){for(var t=this.dimensions,e=this._axesMap,a=!1,n=0,i=t.length;n<i;n++)e.get(t[n]).model.getActiveState()!=="normal"&&(a=!0);return a},r.prototype.axisCoordToPoint=function(t,e){var a=this._axesLayout[e];return Ur([t,0],a.transform)},r.prototype.getAxisLayout=function(t){return J(this._axesLayout[t])},r.prototype.getSlidedAxisExpandWindow=function(t){var e=this._makeLayoutInfo(),a=e.pixelDimIndex,n=e.axisExpandWindow.slice(),i=n[1]-n[0],o=[0,e.axisExpandWidth*(e.axisCount-1)];if(!this.containPoint(t))return{behavior:"none",axisExpandWindow:n};var s=t[a]-e.layoutBase-e.axisExpandWindow0Pos,l,u="slide",f=e.axisCollapseWidth,h=this._model.get("axisExpandSlideTriggerArea"),v=h[0]!=null;if(f)v&&f&&s<i*h[0]?(u="jump",l=s-i*h[2]):v&&f&&s>i*(1-h[0])?(u="jump",l=s-i*(1-h[2])):(l=s-i*h[1])>=0&&(l=s-i*(1-h[1]))<=0&&(l=0),l*=e.axisExpandWidth/f,l?La(l,n,o,"all"):u="none";else{var c=n[1]-n[0],d=o[1]*s/c;n=[yw(0,d-c/2)],n[1]=gw(o[1],n[0]+c),n[0]=n[1]-c}return{axisExpandWindow:n,behavior:u}},r})();function yl(r,t){return gw(yw(r,t[0]),t[1])}function RB(r,t){var e=t.layoutLength/(t.axisCount-1);return{position:e*r,axisNameAvailableWidth:e,axisLabelShow:!0}}function EB(r,t){var e=t.layoutLength,a=t.axisExpandWidth,n=t.axisCount,i=t.axisCollapseWidth,o=t.winInnerIndices,s,l=i,u=!1,f;return r<o[0]?(s=r*i,f=i):r<=o[1]?(s=t.axisExpandWindow0Pos+r*a-t.axisExpandWindow[0],l=a,u=!0):(s=e-(n-1-r)*i,f=i),{position:s,axisNameAvailableWidth:l,axisLabelShow:u,nameTruncateMaxWidth:f}}function kB(r,t){var e=[];return r.eachComponent("parallel",function(a,n){var i=new PB(a,r,t);i.name="parallel_"+n,i.resize(a,t),a.coordinateSystem=i,i.model=a,e.push(i)}),r.eachSeries(function(a){if(a.get("coordinateSystem")==="parallel"){var n=a.getReferringComponents("parallel",ee).models[0];a.coordinateSystem=n.coordinateSystem}}),e}var OB={create:kB},Av=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.activeIntervals=[],e}return t.prototype.getAreaSelectStyle=function(){return An([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},t.prototype.setActiveIntervals=function(e){var a=this.activeIntervals=J(e);if(a)for(var n=a.length-1;n>=0;n--)Vr(a[n])},t.prototype.getActiveState=function(e){var a=this.activeIntervals;if(!a.length)return"normal";if(e==null||isNaN(+e))return"inactive";if(a.length===1){var n=a[0];if(n[0]<=e&&e<=n[1])return"active"}else for(var i=0,o=a.length;i<o;i++)if(a[i][0]<=e&&e<=a[i][1])return"active";return"inactive"},t})(mt);fe(Av,ep);var Pn=!0,ns=Math.min,Mi=Math.max,BB=Math.pow,NB=1e4,zB=6,VB=6,R0="globalPan",FB={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},GB={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},E0={brushStyle:{lineWidth:2,stroke:N.color.backgroundTint,fill:N.color.borderTint},transformable:!0,brushMode:"single",removeOnClick:!1},HB=0,mw=(function(r){B(t,r);function t(e){var a=r.call(this)||this;return a._track=[],a._covers=[],a._handlers={},a._zr=e,a.group=new yt,a._uid="brushController_"+HB++,M(KB,function(n,i){this._handlers[i]=Y(n,this)},a),a}return t.prototype.enableBrush=function(e){return this._brushType&&this._doDisableBrush(),e.brushType&&this._doEnableBrush(e),this},t.prototype._doEnableBrush=function(e){var a=this._zr;this._enableGlobalPan||Wk(a,R0,this._uid),M(this._handlers,function(n,i){a.on(i,n)}),this._brushType=e.brushType,this._brushOption=ft(J(E0),e,!0)},t.prototype._doDisableBrush=function(){var e=this._zr;Uk(e,R0,this._uid),M(this._handlers,function(a,n){e.off(n,a)}),this._brushType=this._brushOption=null},t.prototype.setPanels=function(e){if(e&&e.length){var a=this._panels={};M(e,function(n){a[n.panelId]=J(n)})}else this._panels=null;return this},t.prototype.mount=function(e){e=e||{},this._enableGlobalPan=e.enableGlobalPan;var a=this.group;return this._zr.add(a),a.attr({x:e.x||0,y:e.y||0,rotation:e.rotation||0,scaleX:e.scaleX||1,scaleY:e.scaleY||1}),this._transform=a.getLocalTransform(),this},t.prototype.updateCovers=function(e){e=U(e,function(v){return ft(J(E0),v,!0)});var a="\0-brush-index-",n=this._covers,i=this._covers=[],o=this,s=this._creatingCover;return new Ss(n,e,u,l).add(f).update(f).remove(h).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 f(v,c){var d=e[v];if(c!=null&&n[c]===s)i[v]=n[c];else{var p=i[v]=c!=null?(n[c].__brushOption=d,n[c]):Sw(o,_w(o,d));_p(o,p)}}function h(v){n[v]!==s&&o.group.remove(n[v])}},t.prototype.unmount=function(){return this.enableBrush(!1),Dv(this),this._zr.remove(this.group),this},t.prototype.dispose=function(){this.unmount(),this.off()},t})(Ze);function _w(r,t){var e=uf[t.brushType].createCover(r,t);return e.__brushOption=t,xw(e,t),r.group.add(e),e}function Sw(r,t){var e=Sp(t);return e.endCreating&&(e.endCreating(r,t),xw(t,t.__brushOption)),t}function bw(r,t){var e=t.__brushOption;Sp(t).updateCoverShape(r,t,e.range,e)}function xw(r,t){var e=t.z;e==null&&(e=NB),r.traverse(function(a){a.z=e,a.z2=e})}function _p(r,t){Sp(t).updateCommon(r,t),bw(r,t)}function Sp(r){return uf[r.__brushOption.brushType]}function bp(r,t,e){var a=r._panels;if(!a)return Pn;var n,i=r._transform;return M(a,function(o){o.isTargetByCursor(t,e,i)&&(n=o)}),n}function ww(r,t){var e=r._panels;if(!e)return Pn;var a=t.__brushOption.panelId;return a!=null?e[a]:Pn}function Dv(r){var t=r._covers,e=t.length;return M(t,function(a){r.group.remove(a)},r),t.length=0,!!e}function Rn(r,t){var e=U(r._covers,function(a){var n=a.__brushOption,i=J(n.range);return{brushType:n.brushType,panelId:n.panelId,range:i}});r.trigger("brush",{areas:e,isEnd:!!t.isEnd,removeOnClick:!!t.removeOnClick})}function WB(r){var t=r._track;if(!t.length)return!1;var e=t[t.length-1],a=t[0],n=e[0]-a[0],i=e[1]-a[1],o=BB(n*n+i*i,.5);return o>zB}function Tw(r){var t=r.length-1;return t<0&&(t=0),[r[0],r[t]]}function Cw(r,t,e,a){var n=new yt;return n.add(new _t({name:"main",style:xp(e),silent:!0,draggable:!0,cursor:"move",drift:it(k0,r,t,n,["n","s","w","e"]),ondragend:it(Rn,t,{isEnd:!0})})),M(a,function(i){n.add(new _t({name:i.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:it(k0,r,t,n,i),ondragend:it(Rn,t,{isEnd:!0})}))}),n}function Mw(r,t,e,a){var n=a.brushStyle.lineWidth||0,i=Mi(n,VB),o=e[0][0],s=e[1][0],l=o-n/2,u=s-n/2,f=e[0][1],h=e[1][1],v=f-i+n/2,c=h-i+n/2,d=f-o,p=h-s,g=d+n,y=p+n;Or(r,t,"main",o,s,d,p),a.transformable&&(Or(r,t,"w",l,u,i,y),Or(r,t,"e",v,u,i,y),Or(r,t,"n",l,u,g,i),Or(r,t,"s",l,c,g,i),Or(r,t,"nw",l,u,i,i),Or(r,t,"ne",v,u,i,i),Or(r,t,"sw",l,c,i,i),Or(r,t,"se",v,c,i,i))}function Lv(r,t){var e=t.__brushOption,a=e.transformable,n=t.childAt(0);n.useStyle(xp(e)),n.attr({silent:!a,cursor:a?"move":"default"}),M([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(i){var o=t.childOfName(i.join("")),s=i.length===1?Iv(r,i[0]):YB(r,i);o&&o.attr({silent:!a,invisible:!a,cursor:a?GB[s]+"-resize":null})})}function Or(r,t,e,a,n,i,o){var s=t.childOfName(e);s&&s.setShape(XB(wp(r,t,[[a,n],[a+i,n+o]])))}function xp(r){return gt({strokeNoScale:!0},r.brushStyle)}function Aw(r,t,e,a){var n=[ns(r,e),ns(t,a)],i=[Mi(r,e),Mi(t,a)];return[[n[0],i[0]],[n[1],i[1]]]}function UB(r){return bn(r.group)}function Iv(r,t){var e={w:"left",e:"right",n:"top",s:"bottom"},a={left:"w",right:"e",top:"n",bottom:"s"},n=Ku(e[t],UB(r));return a[n]}function YB(r,t){var e=[Iv(r,t[0]),Iv(r,t[1])];return(e[0]==="e"||e[0]==="w")&&e.reverse(),e.join("")}function k0(r,t,e,a,n,i){var o=e.__brushOption,s=r.toRectRange(o.range),l=Dw(t,n,i);M(a,function(u){var f=FB[u];s[f[0]][f[1]]+=l[f[0]]}),o.range=r.fromRectRange(Aw(s[0][0],s[1][0],s[0][1],s[1][1])),_p(t,e),Rn(t,{isEnd:!1})}function ZB(r,t,e,a){var n=t.__brushOption.range,i=Dw(r,e,a);M(n,function(o){o[0]+=i[0],o[1]+=i[1]}),_p(r,t),Rn(r,{isEnd:!1})}function Dw(r,t,e){var a=r.group,n=a.transformCoordToLocal(t,e),i=a.transformCoordToLocal(0,0);return[n[0]-i[0],n[1]-i[1]]}function wp(r,t,e){var a=ww(r,t);return a&&a!==Pn?a.clipPath(e,r._transform):J(e)}function XB(r){var t=ns(r[0][0],r[1][0]),e=ns(r[0][1],r[1][1]),a=Mi(r[0][0],r[1][0]),n=Mi(r[0][1],r[1][1]);return{x:t,y:e,width:a-t,height:n-e}}function $B(r,t,e){if(!(!r._brushType||qB(r,t.offsetX,t.offsetY))){var a=r._zr,n=r._covers,i=bp(r,t,e);if(!r._dragging)for(var o=0;o<n.length;o++){var s=n[o].__brushOption;if(i&&(i===Pn||s.panelId===i.panelId)&&uf[s.brushType].contain(n[o],e[0],e[1]))return}i&&a.setCursorStyle("crosshair")}}function Pv(r){var t=r.event;t.preventDefault&&t.preventDefault()}function Rv(r,t,e){return r.childOfName("main").contain(t,e)}function Lw(r,t,e,a){var n=r._creatingCover,i=r._creatingPanel,o=r._brushOption,s;if(r._track.push(e.slice()),WB(r)||n){if(i&&!n){o.brushMode==="single"&&Dv(r);var l=J(o);l.brushType=O0(l.brushType,i),l.panelId=i===Pn?null:i.panelId,n=r._creatingCover=_w(r,l),r._covers.push(n)}if(n){var u=uf[O0(r._brushType,i)],f=n.__brushOption;f.range=u.getCreatingRange(wp(r,n,r._track)),a&&(Sw(r,n),u.updateCommon(r,n)),bw(r,n),s={isEnd:a}}}else a&&o.brushMode==="single"&&o.removeOnClick&&bp(r,t,e)&&Dv(r)&&(s={isEnd:a,removeOnClick:!0});return s}function O0(r,t){return r==="auto"?t.defaultBrushType:r}var KB={mousedown:function(r){if(this._dragging)B0(this,r);else if(!r.target||!r.target.draggable){Pv(r);var t=this.group.transformCoordToLocal(r.offsetX,r.offsetY);this._creatingCover=null;var e=this._creatingPanel=bp(this,r,t);e&&(this._dragging=!0,this._track=[t.slice()])}},mousemove:function(r){var t=r.offsetX,e=r.offsetY,a=this.group.transformCoordToLocal(t,e);if($B(this,r,a),this._dragging){Pv(r);var n=Lw(this,r,a,!1);n&&Rn(this,n)}},mouseup:function(r){B0(this,r)}};function B0(r,t){if(r._dragging){Pv(t);var e=t.offsetX,a=t.offsetY,n=r.group.transformCoordToLocal(e,a),i=Lw(r,t,n,!0);r._dragging=!1,r._track=[],r._creatingCover=null,i&&Rn(r,i)}}function qB(r,t,e){var a=r._zr;return t<0||t>a.getWidth()||e<0||e>a.getHeight()}var uf={lineX:N0(0),lineY:N0(1),rect:{createCover:function(r,t){function e(a){return a}return Cw({toRectRange:e,fromRectRange:e},r,t,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(r){var t=Tw(r);return Aw(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(r,t,e,a){Mw(r,t,e,a)},updateCommon:Lv,contain:Rv},polygon:{createCover:function(r,t){var e=new yt;return e.add(new ur({name:"main",style:xp(t),silent:!0})),e},getCreatingRange:function(r){return r},endCreating:function(r,t){t.remove(t.childAt(0)),t.add(new Dr({name:"main",draggable:!0,drift:it(ZB,r,t),ondragend:it(Rn,r,{isEnd:!0})}))},updateCoverShape:function(r,t,e,a){t.childAt(0).setShape({points:wp(r,t,e)})},updateCommon:Lv,contain:Rv}};function N0(r){return{createCover:function(t,e){return Cw({toRectRange:function(a){var n=[a,[0,100]];return r&&n.reverse(),n},fromRectRange:function(a){return a[r]}},t,e,[[["w"],["e"]],[["n"],["s"]]][r])},getCreatingRange:function(t){var e=Tw(t),a=ns(e[0][r],e[1][r]),n=Mi(e[0][r],e[1][r]);return[a,n]},updateCoverShape:function(t,e,a,n){var i,o=ww(t,e);if(o!==Pn&&o.getLinearBrushOtherExtent)i=o.getLinearBrushOtherExtent(r);else{var s=t._zr;i=[0,[s.getWidth(),s.getHeight()][1-r]]}var l=[a,i];r&&l.reverse(),Mw(t,e,l,n)},updateCommon:Lv,contain:Rv}}function Iw(r){return r=Tp(r),function(t){return cb(t,r)}}function Pw(r,t){return r=Tp(r),function(e){var a=t??e,n=a?r.width:r.height,i=a?r.x:r.y;return[i,i+(n||0)]}}function Rw(r,t,e){var a=Tp(r);return function(n,i){return a.contain(i[0],i[1])&&!Q1(n,t,e)}}function Tp(r){return ot.create(r)}var QB=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,a){r.prototype.init.apply(this,arguments),(this._brushController=new mw(a.getZr())).on("brush",Y(this._onBrush,this))},t.prototype.render=function(e,a,n,i){if(!jB(e,a,i)){this.axisModel=e,this.api=n,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new yt,this.group.add(this._axisGroup),!!e.get("show")){var s=tN(e,a),l=s.coordinateSystem,u=e.getAreaSelectStyle(),f=u.width,h=e.axis.dim,v=l.getAxisLayout(h),c=F({strokeContainThreshold:f},v),d=new Mr(e,n,c);d.build(),this._axisGroup.add(d.group),this._refreshBrushController(c,u,e,s,f,n),yd(o,this._axisGroup,e)}}},t.prototype._refreshBrushController=function(e,a,n,i,o,s){var l=n.axis.getExtent(),u=l[1]-l[0],f=Math.min(30,Math.abs(u)*.1),h=ot.create({x:l[0],y:-o/2,width:u,height:o});h.x-=f,h.width+=2*f,this._brushController.mount({enableGlobalPan:!0,rotation:e.rotation,x:e.position[0],y:e.position[1]}).setPanels([{panelId:"pl",clipPath:Iw(h),isTargetByCursor:Rw(h,s,i),getLinearBrushOtherExtent:Pw(h,0)}]).enableBrush({brushType:"lineX",brushStyle:a,removeOnClick:!0}).updateCovers(JB(n))},t.prototype._onBrush=function(e){var a=e.areas,n=this.axisModel,i=n.axis,o=U(a,function(s){return[i.coordToData(s.range[0],!0),i.coordToData(s.range[1],!0)]});(!n.option.realtime===e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:n.id,intervals:o})},t.prototype.dispose=function(){this._brushController.dispose()},t.type="parallelAxis",t})($t);function jB(r,t,e){return e&&e.type==="axisAreaSelect"&&t.findComponents({mainType:"parallelAxis",query:e})[0]===r}function JB(r){var t=r.axis;return U(r.activeIntervals,function(e){return{brushType:"lineX",panelId:"pl",range:[t.dataToCoord(e[0],!0),t.dataToCoord(e[1],!0)]}})}function tN(r,t){return t.getComponent("parallel",r.get("parallelIndex"))}var eN={type:"axisAreaSelect",event:"axisAreaSelected"};function rN(r){r.registerAction(eN,function(t,e){e.eachComponent({mainType:"parallelAxis",query:t},function(a){a.axis.model.setActiveIntervals(t.intervals)})}),r.registerAction("parallelAxisExpand",function(t,e){e.eachComponent({mainType:"parallel",query:t},function(a){a.setAxisExpand(t)})})}var aN={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function Ew(r){r.registerComponentView(CB),r.registerComponentModel(AB),r.registerCoordinateSystem("parallel",OB),r.registerPreprocessor(bB),r.registerComponentModel(Av),r.registerComponentView(QB),mv(r,"parallel",Av,aN),rN(r)}function nN(r){ue(Ew),r.registerChartView(vB),r.registerSeriesModel(gB),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,SB)}var iN=(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})(),oN=(function(r){B(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new iN},t.prototype.buildPath=function(e,a){var n=a.extent;e.moveTo(a.x1,a.y1),e.bezierCurveTo(a.cpx1,a.cpy1,a.cpx2,a.cpy2,a.x2,a.y2),a.orient==="vertical"?(e.lineTo(a.x2+n,a.y2),e.bezierCurveTo(a.cpx2+n,a.cpy2,a.cpx1+n,a.cpy1,a.x1+n,a.y1)):(e.lineTo(a.x2,a.y2+n),e.bezierCurveTo(a.cpx2,a.cpy2+n,a.cpx1,a.cpy1+n,a.x1,a.y1+n)),e.closePath()},t.prototype.highlight=function(){Ta(this)},t.prototype.downplay=function(){Ca(this)},t})(xt),sN=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._mainGroup=new yt,e._focusAdjacencyDisabled=!1,e}return t.prototype.init=function(e,a){this._controller=new vp(a.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},t.prototype.render=function(e,a,n){var i=this,o=e.getGraph(),s=this._mainGroup,l=e.layoutInfo,u=l.width,f=l.height,h=e.getData(),v=e.getData("edge"),c=e.get("orient");this._model=e,s.removeAll(),s.x=l.x,s.y=l.y,this._updateViewCoordSys(e,n),Qk(e,n,s,this._controller,this._controllerHost),o.eachEdge(function(d){var p=new oN,g=vt(p);g.dataIndex=d.dataIndex,g.seriesIndex=e.seriesIndex,g.dataType="edge";var y=d.getModel(),m=y.getModel("lineStyle"),_=m.get("curveness"),S=d.node1.getLayout(),x=d.node1.getModel(),b=x.get("localX"),w=x.get("localY"),T=d.node2.getLayout(),D=d.node2.getModel(),A=D.get("localX"),C=D.get("localY"),I=d.getLayout(),L,P,R,E,O,k,z,V;p.shape.extent=Math.max(1,I.dy),p.shape.orient=c,c==="vertical"?(L=(b!=null?b*u:S.x)+I.sy,P=(w!=null?w*f:S.y)+S.dy,R=(A!=null?A*u:T.x)+I.ty,E=C!=null?C*f:T.y,O=L,k=P*(1-_)+E*_,z=R,V=P*_+E*(1-_)):(L=(b!=null?b*u:S.x)+S.dx,P=(w!=null?w*f:S.y)+I.sy,R=A!=null?A*u:T.x,E=(C!=null?C*f:T.y)+I.ty,O=L*(1-_)+R*_,k=P,z=L*_+R*(1-_),V=E),p.setShape({x1:L,y1:P,x2:R,y2:E,cpx1:O,cpy1:k,cpx2:z,cpy2:V}),p.useStyle(m.getItemStyle()),z0(p.style,c,d);var G=""+y.get("value"),W=Te(y,"edgeLabel");Ue(p,W,{labelFetcher:{getFormattedLabel:function(lt,Ct,Ot,ut,tt,pt){return e.getFormattedLabel(lt,Ct,"edge",ut,ya(tt,W.normal&&W.normal.get("formatter"),G),pt)}},labelDataIndex:d.dataIndex,defaultText:G}),p.setTextConfig({position:"inside"});var Z=y.getModel("emphasis");De(p,y,"lineStyle",function(lt){var Ct=lt.getItemStyle();return z0(Ct,c,d),Ct}),s.add(p),v.setItemGraphicEl(d.dataIndex,p);var rt=Z.get("focus");ae(p,rt==="adjacency"?d.getAdjacentDataIndices():rt==="trajectory"?d.getTrajectoryDataIndices():rt,Z.get("blurScope"),Z.get("disabled"))}),o.eachNode(function(d){var p=d.getLayout(),g=d.getModel(),y=g.get("localX"),m=g.get("localY"),_=g.getModel("emphasis"),S=g.get(["itemStyle","borderRadius"])||0,x=new _t({shape:{x:y!=null?y*u:p.x,y:m!=null?m*f:p.y,width:p.dx,height:p.dy,r:S},style:g.getModel("itemStyle").getItemStyle(),z2:10});Ue(x,Te(g),{labelFetcher:{getFormattedLabel:function(w,T){return e.getFormattedLabel(w,T,"node")}},labelDataIndex:d.dataIndex,defaultText:d.id}),x.disableLabelAnimation=!0,x.setStyle("fill",d.getVisual("color")),x.setStyle("decal",d.getVisual("style").decal),De(x,g),s.add(x),h.setItemGraphicEl(d.dataIndex,x),vt(x).dataType="node";var b=_.get("focus");ae(x,b==="adjacency"?d.getAdjacentDataIndices():b==="trajectory"?d.getTrajectoryDataIndices():b,_.get("blurScope"),_.get("disabled"))}),h.eachItemGraphicEl(function(d,p){var g=h.getItemModel(p);g.get("draggable")&&(d.drift=function(y,m){i._focusAdjacencyDisabled=!0,this.shape.x+=y,this.shape.y+=m,this.dirty(),n.dispatchAction({type:"dragNode",seriesId:e.id,dataIndex:h.getRawIndex(p),localX:this.shape.x/u,localY:this.shape.y/f})},d.ondragend=function(){i._focusAdjacencyDisabled=!1},d.draggable=!0,d.cursor="move")}),!this._data&&e.isAnimationEnabled()&&s.setClipPath(lN(s.getBoundingRect(),e,function(){s.removeClipPath()})),this._data=e.getData()},t.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype._updateViewCoordSys=function(e,a){var n=e.layoutInfo,i=n.width,o=n.height,s=e.coordinateSystem=new Jk(null,{api:a,ecModel:e.ecModel});s.zoomLimit=e.get("scaleLimit"),s.setBoundingRect(0,0,i,o),s.setCenter(e.get("center")),s.setZoom(e.get("zoom")),this._controllerHost.target.attr({x:s.x,y:s.y,scaleX:s.scaleX,scaleY:s.scaleY})},t.type="sankey",t})(Vt);function z0(r,t,e){switch(r.fill){case"source":r.fill=e.node1.getVisual("color"),r.decal=e.node1.getVisual("style").decal;break;case"target":r.fill=e.node2.getVisual("color"),r.decal=e.node2.getVisual("style").decal;break;case"gradient":var a=e.node1.getVisual("color"),n=e.node2.getVisual("color");X(a)&&X(n)&&(r.fill=new $u(0,0,+(t==="horizontal"),+(t==="vertical"),[{color:a,offset:0},{color:n,offset:1}]))}}function lN(r,t,e){var a=new _t({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return zt(a,{shape:{width:r.width+20}},t,e),a}var uN=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(e,a){var n=e.edges||e.links||[],i=e.data||e.nodes||[],o=e.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 Dt(o[l],this,a));var u=QO(i,n,this,!0,f);return u.data;function f(h,v){h.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})}},t.prototype.setNodePosition=function(e,a){var n=this.option.data||this.option.nodes,i=n[e];i.localX=a[0],i.localY=a[1]},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.formatTooltip=function(e,a,n){function i(c){return isNaN(c)||c==null}if(n==="edge"){var o=this.getDataParams(e,n),s=o.data,l=o.value,u=s.source+" -- "+s.target;return Ye("nameValue",{name:u,value:l,noValue:i(l)})}else{var f=this.getGraph().getNodeByIndex(e),h=f.getLayout().value,v=this.getDataParams(e,n).data.name;return Ye("nameValue",{name:v!=null?v+"":null,value:h,noValue:i(h)})}},t.prototype.optionUpdated=function(){},t.prototype.getDataParams=function(e,a){var n=r.prototype.getDataParams.call(this,e,a);if(n.value==null&&a==="node"){var i=this.getGraph().getNodeByIndex(e),o=i.getLayout().value;n.value=o}return n},t.type="series.sankey",t.layoutMode="box",t.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:N.color.neutral50,opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:N.color.primary}},animationEasing:"linear",animationDuration:1e3},t})(Ut);function fN(r,t){r.eachSeriesByType("sankey",function(e){var a=e.get("nodeWidth"),n=e.get("nodeGap"),i=Le(e,t).refContainer,o=ne(e.getBoxLayoutParams(),i);e.layoutInfo=o;var s=o.width,l=o.height,u=e.getGraph(),f=u.nodes,h=u.edges;cN(f);var v=kt(f,function(g){return g.getLayout().value===0}),c=v.length!==0?0:e.get("layoutIterations"),d=e.get("orient"),p=e.get("nodeAlign");hN(f,h,a,n,s,l,c,d,p)})}function hN(r,t,e,a,n,i,o,s,l){vN(r,t,e,n,i,s,l),yN(r,t,i,n,a,o,s),MN(r,s)}function cN(r){M(r,function(t){var e=ba(t.outEdges,Cu),a=ba(t.inEdges,Cu),n=t.getValue()||0,i=Math.max(e,a,n);t.setLayout({value:i},!0)})}function vN(r,t,e,a,n,i,o){for(var s=[],l=[],u=[],f=[],h=0,v=0;v<t.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:h},!0),i==="vertical"?p.setLayout({dy:e},!0):p.setLayout({dx:e},!0);for(var m=0;m<p.outEdges.length;m++){var _=p.outEdges[m],S=t.indexOf(_);s[S]=0;var x=_.node2,b=r.indexOf(x);--l[b]===0&&f.indexOf(x)<0&&f.push(x)}}++h,u=f,f=[]}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>h-1?c:h-1;o&&o!=="left"&&dN(r,o,i,w);var T=i==="vertical"?(n-e)/w:(a-e)/w;gN(r,T,i)}function kw(r){var t=r.hostGraph.data.getRawDataItem(r.dataIndex);return t.depth!=null&&t.depth>=0}function dN(r,t,e,a){if(t==="right"){for(var n=[],i=r,o=0;i.length;){for(var s=0;s<i.length;s++){var l=i[s];l.setLayout({skNodeHeight:o},!0);for(var u=0;u<l.inEdges.length;u++){var f=l.inEdges[u];n.indexOf(f.node1)<0&&n.push(f.node1)}}i=n,n=[],++o}M(r,function(h){kw(h)||h.setLayout({depth:Math.max(0,a-h.getLayout().skNodeHeight)},!0)})}else t==="justify"&&pN(r,a)}function pN(r,t){M(r,function(e){!kw(e)&&!e.outEdges.length&&e.setLayout({depth:t},!0)})}function gN(r,t,e){M(r,function(a){var n=a.getLayout().depth*t;e==="vertical"?a.setLayout({y:n},!0):a.setLayout({x:n},!0)})}function yN(r,t,e,a,n,i,o){var s=mN(r,o);_N(s,t,e,a,n,o),Yh(s,n,e,a,o);for(var l=1;i>0;i--)l*=.99,SN(s,l,o),Yh(s,n,e,a,o),CN(s,l,o),Yh(s,n,e,a,o)}function mN(r,t){var e=[],a=t==="vertical"?"y":"x",n=HM(r,function(i){return i.getLayout()[a]});return n.keys.sort(function(i,o){return i-o}),M(n.keys,function(i){e.push(n.buckets.get(i))}),e}function _N(r,t,e,a,n,i){var o=1/0;M(r,function(s){var l=s.length,u=0;M(s,function(h){u+=h.getLayout().value});var f=i==="vertical"?(a-(l-1)*n)/u:(e-(l-1)*n)/u;f<o&&(o=f)}),M(r,function(s){M(s,function(l,u){var f=l.getLayout().value*o;i==="vertical"?(l.setLayout({x:u},!0),l.setLayout({dx:f},!0)):(l.setLayout({y:u},!0),l.setLayout({dy:f},!0))})}),M(t,function(s){var l=+s.getValue()*o;s.setLayout({dy:l},!0)})}function Yh(r,t,e,a,n){var i=n==="vertical"?"x":"y";M(r,function(o){o.sort(function(p,g){return p.getLayout()[i]-g.getLayout()[i]});for(var s,l,u,f=0,h=o.length,v=n==="vertical"?"dx":"dy",c=0;c<h;c++)l=o[c],u=f-l.getLayout()[i],u>0&&(s=l.getLayout()[i]+u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),f=l.getLayout()[i]+l.getLayout()[v]+t;var d=n==="vertical"?a:e;if(u=f-t-d,u>0){s=l.getLayout()[i]-u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),f=s;for(var c=h-2;c>=0;--c)l=o[c],u=l.getLayout()[i]+l.getLayout()[v]+t-f,u>0&&(s=l.getLayout()[i]-u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),f=l.getLayout()[i]}})}function SN(r,t,e){M(r.slice().reverse(),function(a){M(a,function(n){if(n.outEdges.length){var i=ba(n.outEdges,bN,e)/ba(n.outEdges,Cu);if(isNaN(i)){var o=n.outEdges.length;i=o?ba(n.outEdges,xN,e)/o:0}if(e==="vertical"){var s=n.getLayout().x+(i-Ia(n,e))*t;n.setLayout({x:s},!0)}else{var l=n.getLayout().y+(i-Ia(n,e))*t;n.setLayout({y:l},!0)}}})})}function bN(r,t){return Ia(r.node2,t)*r.getValue()}function xN(r,t){return Ia(r.node2,t)}function wN(r,t){return Ia(r.node1,t)*r.getValue()}function TN(r,t){return Ia(r.node1,t)}function Ia(r,t){return t==="vertical"?r.getLayout().x+r.getLayout().dx/2:r.getLayout().y+r.getLayout().dy/2}function Cu(r){return r.getValue()}function ba(r,t,e){for(var a=0,n=r.length,i=-1;++i<n;){var o=+t(r[i],e);isNaN(o)||(a+=o)}return a}function CN(r,t,e){M(r,function(a){M(a,function(n){if(n.inEdges.length){var i=ba(n.inEdges,wN,e)/ba(n.inEdges,Cu);if(isNaN(i)){var o=n.inEdges.length;i=o?ba(n.inEdges,TN,e)/o:0}if(e==="vertical"){var s=n.getLayout().x+(i-Ia(n,e))*t;n.setLayout({x:s},!0)}else{var l=n.getLayout().y+(i-Ia(n,e))*t;n.setLayout({y:l},!0)}}})})}function MN(r,t){var e=t==="vertical"?"x":"y";M(r,function(a){a.outEdges.sort(function(n,i){return n.node2.getLayout()[e]-i.node2.getLayout()[e]}),a.inEdges.sort(function(n,i){return n.node1.getLayout()[e]-i.node1.getLayout()[e]})}),M(r,function(a){var n=0,i=0;M(a.outEdges,function(o){o.setLayout({sy:n},!0),n+=o.getLayout().dy}),M(a.inEdges,function(o){o.setLayout({ty:i},!0),i+=o.getLayout().dy})})}function AN(r){r.eachSeriesByType("sankey",function(t){var e=t.getGraph(),a=e.nodes,n=e.edges;if(a.length){var i=1/0,o=-1/0;M(a,function(s){var l=s.getLayout().value;l<i&&(i=l),l>o&&(o=l)}),M(a,function(s){var l=new Qt({type:"color",mappingMethod:"linear",dataExtent:[i,o],visual:t.get("color")}),u=l.mapValueToVisual(s.getLayout().value),f=s.getModel().get(["itemStyle","color"]);f!=null?(s.setVisual("color",f),s.setVisual("style",{fill:f})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}n.length&&M(n,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function DN(r){r.registerChartView(sN),r.registerSeriesModel(uN),r.registerLayout(fN),r.registerVisual(AN),r.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(t,e){e.eachComponent({mainType:"series",subType:"sankey",query:t},function(a){a.setNodePosition(t.dataIndex,[t.localX,t.localY])})}),r.registerAction({type:"sankeyRoam",event:"sankeyRoam",update:"none"},function(t,e,a){e.eachComponent({mainType:"series",subType:"sankey",query:t},function(n){var i=n.coordinateSystem,o=jk(i,t,n.get("scaleLimit"));n.setCenter(o.center),n.setZoom(o.zoom)})})}var LN=(function(){function r(){}return r.prototype._hasEncodeRule=function(t){var e=this.getEncode();return e&&e.get(t)!=null},r.prototype.getInitialData=function(t,e){var a,n=e.getComponent("xAxis",this.get("xAxisIndex")),i=e.getComponent("yAxis",this.get("yAxisIndex")),o=n.get("type"),s=i.get("type"),l;o==="category"?(t.layout="horizontal",a=n.getOrdinalMeta(),l=!this._hasEncodeRule("x")):s==="category"?(t.layout="vertical",a=i.getOrdinalMeta(),l=!this._hasEncodeRule("y")):t.layout=t.layout||"horizontal";var u=["x","y"],f=t.layout==="horizontal"?0:1,h=this._baseAxisDim=u[f],v=u[1-f],c=[n,i],d=c[f].get("type"),p=c[1-f].get("type"),g=t.data;if(g&&l){var y=[];M(g,function(S,x){var b;H(S)?(b=S.slice(),S.unshift(x)):H(S.value)?(b=F({},S),b.value=b.value.slice(),S.value.unshift(x)):b=S,y.push(b)}),t.data=y}var m=this.defaultValueDimensions,_=[{name:h,type:ov(d),ordinalMeta:a,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:v,type:ov(p),dimsDef:m.slice()}];return bs(this,{coordDimensions:_,dimensionsCount:m.length+1,encodeDefaulter:it(zb,_,this)})},r.prototype.getBaseAxis=function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis},r})(),Ow=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],e.visualDrawType="stroke",e}return t.type="series.boxplot",t.dependencies=["xAxis","yAxis","grid"],t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:N.color.neutral00,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:N.color.shadow}},animationDuration:800},t})(Ut);fe(Ow,LN,!0);var IN=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){var i=e.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=e.get("layout")==="horizontal"?1:0;i.diff(s).add(function(u){if(i.hasValue(u)){var f=i.getItemLayout(u),h=V0(f,i,u,l,!0);i.setItemGraphicEl(u,h),o.add(h)}}).update(function(u,f){var h=s.getItemGraphicEl(f);if(!i.hasValue(u)){o.remove(h);return}var v=i.getItemLayout(u);h?($r(h),Bw(v,h,i,u)):h=V0(v,i,u,l),o.add(h),i.setItemGraphicEl(u,h)}).remove(function(u){var f=s.getItemGraphicEl(u);f&&o.remove(f)}).execute(),this._data=i},t.prototype.remove=function(e){var a=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl(function(i){i&&a.remove(i)})},t.type="boxplot",t})(Vt),PN=(function(){function r(){}return r})(),RN=(function(r){B(t,r);function t(e){var a=r.call(this,e)||this;return a.type="boxplotBoxPath",a}return t.prototype.getDefaultShape=function(){return new PN},t.prototype.buildPath=function(e,a){var n=a.points,i=0;for(e.moveTo(n[i][0],n[i][1]),i++;i<4;i++)e.lineTo(n[i][0],n[i][1]);for(e.closePath();i<n.length;i++)e.moveTo(n[i][0],n[i][1]),i++,e.lineTo(n[i][0],n[i][1])},t})(xt);function V0(r,t,e,a,n){var i=r.ends,o=new RN({shape:{points:n?EN(i,a,r):i}});return Bw(r,o,t,e,n),o}function Bw(r,t,e,a,n){var i=e.hostModel,o=bd[n?"initProps":"updateProps"];o(t,{shape:{points:r.ends}},i,a),t.useStyle(e.getItemVisual(a,"style")),t.style.strokeNoScale=!0,t.z2=100;var s=e.getItemModel(a),l=s.getModel("emphasis");De(t,s),ae(t,l.get("focus"),l.get("blurScope"),l.get("disabled"))}function EN(r,t,e){return U(r,function(a){return a=a.slice(),a[t]=e.initBaseline,a})}var ko=M;function kN(r){var t=ON(r);ko(t,function(e){var a=e.seriesModels;a.length&&(BN(e),ko(a,function(n,i){NN(n,e.boxOffsetList[i],e.boxWidthList[i])}))})}function ON(r){var t=[],e=[];return r.eachSeriesByType("boxplot",function(a){var n=a.getBaseAxis(),i=dt(e,n);i<0&&(i=e.length,e[i]=n,t[i]={axis:n,seriesModels:[]}),t[i].seriesModels.push(a)}),t}function BN(r){var t=r.axis,e=r.seriesModels,a=e.length,n=r.boxWidthList=[],i=r.boxOffsetList=[],o=[],s;if(t.type==="category")s=t.getBandWidth();else{var l=0;ko(e,function(d){l=Math.max(l,d.getData().count())});var u=t.getExtent();s=Math.abs(u[1]-u[0])/l}ko(e,function(d){var p=d.get("boxWidth");H(p)||(p=[p,p]),o.push([K(p[0],s)||0,K(p[1],s)||0])});var f=s*.8-2,h=f/a*.3,v=(f-h*(a-1))/a,c=v/2-f/2;ko(e,function(d,p){i.push(c),c+=h+v,n.push(Math.min(Math.max(v,o[p][0]),o[p][1]))})}function NN(r,t,e){var a=r.coordinateSystem,n=r.getData(),i=e/2,o=r.get("layout")==="horizontal"?0:1,s=1-o,l=["x","y"],u=n.mapDimension(l[o]),f=n.mapDimensionsAll(l[s]);if(u==null||f.length<5)return;for(var h=0;h<n.count();h++){var v=n.get(u,h),c=_(v,f[2],h),d=_(v,f[0],h),p=_(v,f[1],h),g=_(v,f[3],h),y=_(v,f[4],h),m=[];S(m,p,!1),S(m,g,!0),m.push(d,p,y,g),x(m,d),x(m,y),x(m,c),n.setItemLayout(h,{initBaseline:c[s],ends:m})}function _(b,w,T){var D=n.get(w,T),A=[];A[o]=b,A[s]=D;var C;return isNaN(b)||isNaN(D)?C=[NaN,NaN]:(C=a.dataToPoint(A),C[o]+=t),C}function S(b,w,T){var D=w.slice(),A=w.slice();D[o]+=i,A[o]-=i,T?b.push(D,A):b.push(A,D)}function x(b,w){var T=w.slice(),D=w.slice();T[o]-=i,D[o]+=i,b.push(T,D)}}function zN(r,t){t=t||{};for(var e=[],a=[],n=t.boundIQR,i=n==="none"||n===0,o=0;o<r.length;o++){var s=Vr(r[o].slice()),l=zf(s,.25),u=zf(s,.5),f=zf(s,.75),h=s[0],v=s[s.length-1],c=(n??1.5)*(f-l),d=i?h:Math.max(h,l-c),p=i?v:Math.min(v,f+c),g=t.itemNameFormatter,y=Q(g)?g({value:o}):X(g)?g.replace("{value}",o+""):o+"";e.push([y,d,l,u,f,p]);for(var m=0;m<s.length;m++){var _=s[m];if(_<d||_>p){var S=[y,_];a.push(S)}}}return{boxData:e,outliers:a}}var VN={type:"echarts:boxplot",transform:function(t){var e=t.upstream;if(e.sourceFormat!==ie){var a="";de(a)}var n=zN(e.getRawData(),t.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:n.boxData},{data:n.outliers}]}};function FN(r){r.registerSeriesModel(Ow),r.registerChartView(IN),r.registerLayout(kN),r.registerTransform(VN)}var GN=256,HN=(function(){function r(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var t=ir.createCanvas();this.canvas=t}return r.prototype.update=function(t,e,a,n,i,o){var s=this._getBrush(),l=this._getGradient(i,"inRange"),u=this._getGradient(i,"outOfRange"),f=this.pointSize+this.blurSize,h=this.canvas,v=h.getContext("2d"),c=t.length;h.width=e,h.height=a;for(var d=0;d<c;++d){var p=t[d],g=p[0],y=p[1],m=p[2],_=n(m);v.globalAlpha=_,v.drawImage(s,g-f,y-f)}if(!h.width||!h.height)return h;for(var S=v.getImageData(0,0,h.width,h.height),x=S.data,b=0,w=x.length,T=this.minOpacity,D=this.maxOpacity,A=D-T;b<w;){var _=x[b+3]/256,C=Math.floor(_*(GN-1))*4;if(_>0){var I=o(_)?l:u;_>0&&(_=_*A+T),x[b++]=I[C],x[b++]=I[C+1],x[b++]=I[C+2],x[b++]=I[C+3]*_*256}else b+=4}return v.putImageData(S,0,0),h},r.prototype._getBrush=function(){var t=this._brushCanvas||(this._brushCanvas=ir.createCanvas()),e=this.pointSize+this.blurSize,a=e*2;t.width=a,t.height=a;var n=t.getContext("2d");return n.clearRect(0,0,a,a),n.shadowOffsetX=a,n.shadowBlur=this.blurSize,n.shadowColor=N.color.neutral99,n.beginPath(),n.arc(-e,e,this.pointSize,0,Math.PI*2,!0),n.closePath(),n.fill(),t},r.prototype._getGradient=function(t,e){for(var a=this._gradientPixels,n=a[e]||(a[e]=new Uint8ClampedArray(256*4)),i=[0,0,0,0],o=0,s=0;s<256;s++)t[e](s/255,!0,i),n[o++]=i[0],n[o++]=i[1],n[o++]=i[2],n[o++]=i[3];return n},r})();function WN(r,t,e){var a=r[1]-r[0];t=U(t,function(o){return{interval:[(o.interval[0]-r[0])/a,(o.interval[1]-r[0])/a]}});var n=t.length,i=0;return function(o){var s;for(s=i;s<n;s++){var l=t[s].interval;if(l[0]<=o&&o<=l[1]){i=s;break}}if(s===n)for(s=i-1;s>=0;s--){var l=t[s].interval;if(l[0]<=o&&o<=l[1]){i=s;break}}return s>=0&&s<n&&e[s]}}function UN(r,t){var e=r[1]-r[0];return t=[(t[0]-r[0])/e,(t[1]-r[0])/e],function(a){return a>=t[0]&&a<=t[1]}}function F0(r){var t=r.dimensions;return t[0]==="lng"&&t[1]==="lat"}var YN=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){var i;a.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===e&&(i=s)})}),this._progressiveEls=null,this.group.removeAll();var o=e.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"||o.type==="matrix"?this._renderOnGridLike(e,n,0,e.getData().count()):F0(o)&&this._renderOnGeo(o,e,i,n)},t.prototype.incrementalPrepareRender=function(e,a,n){this.group.removeAll()},t.prototype.incrementalRender=function(e,a,n,i){var o=a.coordinateSystem;o&&(F0(o)?this.render(a,n,i):(this._progressiveEls=[],this._renderOnGridLike(a,i,e.start,e.end,!0)))},t.prototype.eachRendered=function(e){ki(this._progressiveEls||this.group,e)},t.prototype._renderOnGridLike=function(e,a,n,i,o){var s=e.coordinateSystem,l=Ci(s,"cartesian2d"),u=Ci(s,"matrix"),f,h,v,c;if(l){var d=s.getAxis("x"),p=s.getAxis("y");f=d.getBandWidth()+.5,h=p.getBandWidth()+.5,v=d.scale.getExtent(),c=p.scale.getExtent()}for(var g=this.group,y=e.getData(),m=e.getModel(["emphasis","itemStyle"]).getItemStyle(),_=e.getModel(["blur","itemStyle"]).getItemStyle(),S=e.getModel(["select","itemStyle"]).getItemStyle(),x=e.get(["itemStyle","borderRadius"]),b=Te(e),w=e.getModel("emphasis"),T=w.get("focus"),D=w.get("blurScope"),A=w.get("disabled"),C=l||u?[y.mapDimension("x"),y.mapDimension("y"),y.mapDimension("value")]:[y.mapDimension("time"),y.mapDimension("value")],I=n;I<i;I++){var L=void 0,P=y.getItemVisual(I,"style");if(l){var R=y.get(C[0],I),E=y.get(C[1],I);if(isNaN(y.get(C[2],I))||isNaN(R)||isNaN(E)||R<v[0]||R>v[1]||E<c[0]||E>c[1])continue;var O=s.dataToPoint([R,E]);L=new _t({shape:{x:O[0]-f/2,y:O[1]-h/2,width:f,height:h},style:P})}else if(u){var k=s.dataToLayout([y.get(C[0],I),y.get(C[1],I)]).rect;if(Hr(k.x))continue;L=new _t({z2:1,shape:k,style:P})}else{if(isNaN(y.get(C[1],I)))continue;var z=s.dataToLayout([y.get(C[0],I)]),k=z.contentRect||z.rect;if(Hr(k.x)||Hr(k.y))continue;L=new _t({z2:1,shape:k,style:P})}if(y.hasItemOption){var V=y.getItemModel(I),G=V.getModel("emphasis");m=G.getModel("itemStyle").getItemStyle(),_=V.getModel(["blur","itemStyle"]).getItemStyle(),S=V.getModel(["select","itemStyle"]).getItemStyle(),x=V.get(["itemStyle","borderRadius"]),T=G.get("focus"),D=G.get("blurScope"),A=G.get("disabled"),b=Te(V)}L.shape.r=x;var W=e.getRawValue(I),Z="-";W&&W[2]!=null&&(Z=W[2]+""),Ue(L,b,{labelFetcher:e,labelDataIndex:I,defaultOpacity:P.opacity,defaultText:Z}),L.ensureState("emphasis").style=m,L.ensureState("blur").style=_,L.ensureState("select").style=S,ae(L,T,D,A),L.incremental=o,o&&(L.states.emphasis.hoverLayer=!0),g.add(L),y.setItemGraphicEl(I,L),this._progressiveEls&&this._progressiveEls.push(L)}},t.prototype._renderOnGeo=function(e,a,n,i){var o=n.targetVisuals.inRange,s=n.targetVisuals.outOfRange,l=a.getData(),u=this._hmLayer||this._hmLayer||new HN;u.blurSize=a.get("blurSize"),u.pointSize=a.get("pointSize"),u.minOpacity=a.get("minOpacity"),u.maxOpacity=a.get("maxOpacity");var f=e.getViewRect().clone(),h=e.getRoamTransform();f.applyTransform(h);var v=Math.max(f.x,0),c=Math.max(f.y,0),d=Math.min(f.width+f.x,i.getWidth()),p=Math.min(f.height+f.y,i.getHeight()),g=d-v,y=p-c,m=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],_=l.mapArray(m,function(w,T,D){var A=e.dataToPoint([w,T]);return A[0]-=v,A[1]-=c,A.push(D),A}),S=n.getExtent(),x=n.type==="visualMap.continuous"?UN(S,n.option.range):WN(S,n.getPieceList(),n.option.selected);u.update(_,g,y,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},x);var b=new Xe({style:{width:g,height:y,x:v,y:c,image:u.canvas},silent:!0});this.group.add(b)},t.type="heatmap",t})(Vt),ZN=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(e,a){return Bn(null,this,{generateCoord:"value"})},t.prototype.preventIncremental=function(){var e=ms.get(this.get("coordinateSystem"));if(e&&e.dimensions)return e.dimensions[0]==="lng"&&e.dimensions[1]==="lat"},t.type="series.heatmap",t.dependencies=["grid","geo","calendar","matrix"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:N.color.primary}}},t})(Ut);function XN(r){r.registerChartView(YN),r.registerSeriesModel(ZN)}var $N=2,KN=4,G0=(function(r){B(t,r);function t(e,a,n,i){var o=r.call(this)||this;o.z2=$N,o.textConfig={inside:!0},vt(o).seriesIndex=a.seriesIndex;var s=new Tt({z2:KN,silent:e.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,e,a,n,i),o}return t.prototype.updateData=function(e,a,n,i,o){this.node=a,a.piece=this,n=n||this._seriesModel,i=i||this._ecModel;var s=this;vt(s).dataIndex=a.dataIndex;var l=a.getModel(),u=l.getModel("emphasis"),f=a.getLayout(),h=F({},f);h.label=null;var v=a.getVisual("style");v.lineJoin="bevel";var c=a.getVisual("decal");c&&(v.decal=hu(c,o));var d=gn(l.getModel("itemStyle"),h,!0);F(h,d),M(ye,function(m){var _=s.ensureState(m),S=l.getModel([m,"itemStyle"]);_.style=S.getItemStyle();var x=gn(S,h);x&&(_.shape=x)}),e?(s.setShape(h),s.shape.r=f.r0,zt(s,{shape:{r:f.r}},n,a.dataIndex)):(Et(s,{shape:h},n),$r(s)),s.useStyle(v),this._updateLabel(n);var p=l.getShallow("cursor");p&&s.attr("cursor",p),this._seriesModel=n||this._seriesModel,this._ecModel=i||this._ecModel;var g=u.get("focus"),y=g==="relative"?tS(a.getAncestorsIndices(),a.getDescendantIndices()):g==="ancestor"?a.getAncestorsIndices():g==="descendant"?a.getDescendantIndices():g;ae(this,y,u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(e){var a=this,n=this.node.getModel(),i=n.getModel("label"),o=this.node.getLayout(),s=o.endAngle-o.startAngle,l=(o.startAngle+o.endAngle)/2,u=Math.cos(l),f=Math.sin(l),h=this,v=h.getTextContent(),c=this.node.dataIndex,d=i.get("minAngle")/180*Math.PI,p=i.get("show")&&!(d!=null&&Math.abs(s)<d);v.ignore=!p,M(Ho,function(y){var m=y==="normal"?n.getModel("label"):n.getModel([y,"label"]),_=y==="normal",S=_?v:v.ensureState(y),x=e.getFormattedLabel(c,y);_&&(x=x||a.node.name),S.style=Ht(m,{},null,y!=="normal",!0),x&&(S.style.text=x);var b=m.get("show");b!=null&&!_&&(S.ignore=!b);var w=g(m,"position"),T=_?h:h.states[y],D=T.style.fill;T.textConfig={outsideFill:m.get("color")==="inherit"?D:null,inside:w!=="outside"};var A,C=g(m,"distance")||0,I=g(m,"align"),L=g(m,"rotate"),P=Math.PI*.5,R=Math.PI*1.5,E=ca(L==="tangential"?Math.PI/2-l:l),O=E>P&&!zo(E-P)&&E<R;w==="outside"?(A=o.r+C,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+C,I=O?"right":"left"):I==="right"&&(A=o.r-C,I=O?"left":"right"),S.style.align=I,S.style.verticalAlign=g(m,"verticalAlign")||"middle",S.x=A*u+o.cx,S.y=A*f+o.cy;var k=0;L==="radial"?k=ca(-l)+(O?Math.PI:0):L==="tangential"?k=ca(Math.PI/2-l)+(O?Math.PI:0):bt(L)&&(k=L*Math.PI/180),S.rotation=ca(k)});function g(y,m){var _=y.get(m);return _??i.get(m)}v.dirtyStyle()},t})(or),Ev="sunburstRootToNode",H0="sunburstHighlight",qN="sunburstUnhighlight";function QN(r){r.registerAction({type:Ev,update:"updateView"},function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},a);function a(n,i){var o=es(t,[Ev],n);if(o){var s=n.getViewRoot();s&&(t.direction=gp(s,o.node)?"rollUp":"drillDown"),n.resetViewRoot(o.node)}}}),r.registerAction({type:H0,update:"none"},function(t,e,a){t=F({},t),e.eachComponent({mainType:"series",subType:"sunburst",query:t},n);function n(i){var o=es(t,[H0],i);o&&(t.dataIndex=o.node.dataIndex)}a.dispatchAction(F(t,{type:"highlight"}))}),r.registerAction({type:qN,update:"updateView"},function(t,e,a){t=F({},t),a.dispatchAction(F(t,{type:"downplay"}))})}var jN=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n,i){var o=this;this.seriesModel=e,this.api=n,this.ecModel=a;var s=e.getData(),l=s.tree.root,u=e.getViewRoot(),f=this.group,h=e.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 Ss(_,m,S,S).add(x).update(x).remove(it(x,null)).execute();function S(b){return b.getId()}function x(b,w){var T=b==null?null:m[b],D=w==null?null:_[w];p(T,D)}}function p(m,_){if(!h&&m&&!m.getValue()&&(m=null),m!==l&&_!==l){if(_&&_.piece)m?(_.piece.updateData(!1,m,e,a,n),s.setItemGraphicEl(m.dataIndex,_.piece)):g(_);else if(m){var S=new G0(m,e,a,n);f.add(S),s.setItemGraphicEl(m.dataIndex,S)}}}function g(m){m&&m.piece&&(f.remove(m.piece),m.piece=null)}function y(m,_){_.depth>0?(o.virtualPiece?o.virtualPiece.updateData(!1,m,e,a,n):(o.virtualPiece=new G0(m,e,a,n),f.add(o.virtualPiece)),_.piece.off("click"),o.virtualPiece.on("click",function(S){o._rootToNode(_.parentNode)})):o.virtualPiece&&(f.remove(o.virtualPiece),o.virtualPiece=null)}},t.prototype._initEvents=function(){var e=this;this.group.off("click"),this.group.on("click",function(a){var n=!1,i=e.seriesModel.getViewRoot();i.eachNode(function(o){if(!n&&o.piece&&o.piece===a.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")e._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var f=l.get("target",!0)||"_blank";iu(u,f)}}n=!0}})})},t.prototype._rootToNode=function(e){e!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:Ev,from:this.uid,seriesId:this.seriesModel.id,targetNode:e})},t.prototype.containPoint=function(e,a){var n=a.getData(),i=n.getItemLayout(0);if(i){var o=e[0]-i.cx,s=e[1]-i.cy,l=Math.sqrt(o*o+s*s);return l<=i.r&&l>=i.r0}},t.type="sunburst",t})(Vt),JN=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.ignoreStyleOnData=!0,e}return t.prototype.getInitialData=function(e,a){var n={name:e.name,children:e.data};Nw(n);var i=this._levelModels=U(e.levels||[],function(l){return new Dt(l,this,a)},this),o=ew.createTree(n,this,s);function s(l){l.wrapMethod("getItemModel",function(u,f){var h=o.getNodeByDataIndex(f),v=i[h.depth];return v&&(u.parentModel=v),u})}return o.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.getDataParams=function(e){var a=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(e);return a.treePathInfo=yp(n,this),a},t.prototype.getLevelModel=function(e){return this._levelModels&&this._levelModels[e.depth]},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var a=this.getRawData().tree.root;(!e||e!==a&&!a.contains(e))&&(this._viewRoot=a)},t.prototype.enableAriaDecal=function(){aw(this)},t.type="series.sunburst",t.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"},t})(Ut);function Nw(r){var t=0;M(r.children,function(a){Nw(a);var n=a.value;H(n)&&(n=n[0]),t+=n});var e=r.value;H(e)&&(e=e[0]),(e==null||isNaN(e))&&(e=t),e<0&&(e=0),H(r.value)?r.value[0]=e:r.value=e}var W0=Math.PI/180;function tz(r,t,e){t.eachSeriesByType(r,function(a){var n=a.get("center"),i=a.get("radius");H(i)||(i=[0,i]),H(n)||(n=[n,n]);var o=e.getWidth(),s=e.getHeight(),l=Math.min(o,s),u=K(n[0],o),f=K(n[1],s),h=K(i[0],l/2),v=K(i[1],l/2),c=-a.get("startAngle")*W0,d=a.get("minAngle")*W0,p=a.getData().tree.root,g=a.getViewRoot(),y=g.depth,m=a.get("sort");m!=null&&zw(g,m);var _=0;M(g.children,function(E){!isNaN(E.getValue())&&_++});var S=g.getValue(),x=Math.PI/(S||_)*2,b=g.depth>0,w=g.height-(b?-1:1),T=(v-h)/(w||1),D=a.get("clockwise"),A=a.get("stillShowZeroSum"),C=D?1:-1,I=function(E,O){if(E){var k=O;if(E!==p){var z=E.getValue(),V=S===0&&A?x:z*x;V<d&&(V=d),k=O+C*V;var G=E.depth-y-(b?-1:1),W=h+T*G,Z=h+T*(G+1),rt=a.getLevelModel(E);if(rt){var lt=rt.get("r0",!0),Ct=rt.get("r",!0),Ot=rt.get("radius",!0);Ot!=null&&(lt=Ot[0],Ct=Ot[1]),lt!=null&&(W=K(lt,l/2)),Ct!=null&&(Z=K(Ct,l/2))}E.setLayout({angle:V,startAngle:O,endAngle:k,clockwise:D,cx:u,cy:f,r0:W,r:Z})}if(E.children&&E.children.length){var ut=0;M(E.children,function(tt){ut+=I(tt,O+ut)})}return k-O}};if(b){var L=h,P=h+T,R=Math.PI*2;p.setLayout({angle:R,startAngle:c,endAngle:c+R,clockwise:D,cx:u,cy:f,r0:L,r:P})}I(g,c)})}function zw(r,t){var e=r.children||[];r.children=ez(e,t),e.length&&M(r.children,function(a){zw(a,t)})}function ez(r,t){if(Q(t)){var e=U(r,function(n,i){var o=n.getValue();return{params:{depth:n.depth,height:n.height,dataIndex:n.dataIndex,getValue:function(){return o}},index:i}});return e.sort(function(n,i){return t(n.params,i.params)}),U(e,function(n){return r[n.index]})}else{var a=t==="asc";return r.sort(function(n,i){var o=(n.getValue()-i.getValue())*(a?1:-1);return o===0?(n.dataIndex-i.dataIndex)*(a?-1:1):o})}}function rz(r){var t={};function e(a,n,i){if(a.depth===0)return N.color.neutral50;for(var o=a;o&&o.depth>1;)o=o.parentNode;var s=n.getColorFromPalette(o.name||o.dataIndex+"",t);return a.depth>1&&X(s)&&(s=gc(s,(a.depth-1)/(i-1)*.5)),s}r.eachSeriesByType("sunburst",function(a){var n=a.getData(),i=n.tree;i.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=e(o,a,i.root.height));var u=n.ensureUniqueItemVisual(o.dataIndex,"style");F(u,l)})})}function az(r){r.registerChartView(jN),r.registerSeriesModel(JN),r.registerLayout(it(tz,"sunburst")),r.registerProcessor(it(sf,"sunburst")),r.registerVisual(rz),QN(r)}var un=wt(),U0=J,Zh=Y,nz=(function(){function r(){this._dragging=!1,this.animationThreshold=15}return r.prototype.render=function(t,e,a,n){var i=e.get("value"),o=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=a,!(!n&&this._lastValue===i&&this._lastStatus===o)){this._lastValue=i,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,i,t,e,a);var f=u.graphicKey;f!==this._lastGraphicKey&&this.clear(a),this._lastGraphicKey=f;var h=this._moveAnimation=this.determineAnimation(t,e);if(!s)s=this._group=new yt,this.createPointerEl(s,u,t,e),this.createLabelEl(s,u,t,e),a.getZr().add(s);else{var v=it(Y0,e,h);this.updatePointerEl(s,u,v),this.updateLabelEl(s,u,v,e)}X0(s,e,!0),this._renderHandle(i)}},r.prototype.remove=function(t){this.clear(t)},r.prototype.dispose=function(t){this.clear(t)},r.prototype.determineAnimation=function(t,e){var a=e.get("animation"),n=t.axis,i=n.type==="category",o=e.get("snap");if(!o&&!i)return!1;if(a==="auto"||a==null){var s=this.animationThreshold;if(i&&n.getBandWidth()>s)return!0;if(o){var l=fp(t).seriesDataCount,u=n.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return a===!0},r.prototype.makeElOption=function(t,e,a,n,i){},r.prototype.createPointerEl=function(t,e,a,n){var i=e.pointer;if(i){var o=un(t).pointerEl=new bd[i.type](U0(e.pointer));t.add(o)}},r.prototype.createLabelEl=function(t,e,a,n){if(e.label){var i=un(t).labelEl=new Tt(U0(e.label));t.add(i),Z0(i,n)}},r.prototype.updatePointerEl=function(t,e,a){var n=un(t).pointerEl;n&&e.pointer&&(n.setStyle(e.pointer.style),a(n,{shape:e.pointer.shape}))},r.prototype.updateLabelEl=function(t,e,a,n){var i=un(t).labelEl;i&&(i.setStyle(e.label.style),a(i,{x:e.label.x,y:e.label.y}),Z0(i,n))},r.prototype._renderHandle=function(t){if(!(this._dragging||!this.updateHandleTransform)){var e=this._axisPointerModel,a=this._api.getZr(),n=this._handle,i=e.getModel("handle"),o=e.get("status");if(!i.get("show")||!o||o==="hide"){n&&a.remove(n),this._handle=null;return}var s;this._handle||(s=!0,n=this._handle=qu(i.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){Xr(u.event)},onmousedown:Zh(this._onHandleDragMove,this,0,0),drift:Zh(this._onHandleDragMove,this),ondragend:Zh(this._onHandleDragEnd,this)}),a.add(n)),X0(n,e,!1),n.setStyle(i.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=i.get("size");H(l)||(l=[l,l]),n.scaleX=l[0]/2,n.scaleY=l[1]/2,_s(this,"_doDispatchAxisPointer",i.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,s)}},r.prototype._moveHandleToValue=function(t,e){Y0(this._axisPointerModel,!e&&this._moveAnimation,this._handle,Xh(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},r.prototype._onHandleDragMove=function(t,e){var a=this._handle;if(a){this._dragging=!0;var n=this.updateHandleTransform(Xh(a),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=n,a.stopAnimation(),a.attr(Xh(n)),un(a).lastProp=null,this._doDispatchAxisPointer()}},r.prototype._doDispatchAxisPointer=function(){var t=this._handle;if(t){var e=this._payloadInfo,a=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:a.axis.dim,axisIndex:a.componentIndex}]})}},r.prototype._onHandleDragEnd=function(){this._dragging=!1;var t=this._handle;if(t){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},r.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),a=this._group,n=this._handle;e&&a&&(this._lastGraphicKey=null,a&&e.remove(a),n&&e.remove(n),this._group=null,this._handle=null,this._payloadInfo=null),$o(this,"_doDispatchAxisPointer")},r.prototype.doClear=function(){},r.prototype.buildLabel=function(t,e,a){return a=a||0,{x:t[a],y:t[1-a],width:e[a],height:e[1-a]}},r})();function Y0(r,t,e,a){Vw(un(e).lastProp,a)||(un(e).lastProp=a,t?Et(e,a,r):(e.stopAnimation(),e.attr(a)))}function Vw(r,t){if(j(r)&&j(t)){var e=!0;return M(t,function(a,n){e=e&&Vw(r[n],a)}),!!e}else return r===t}function Z0(r,t){r[t.get(["label","show"])?"show":"hide"]()}function Xh(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function X0(r,t,e){var a=t.get("z"),n=t.get("zlevel");r&&r.traverse(function(i){i.type!=="group"&&(a!=null&&(i.z=a),n!=null&&(i.zlevel=n),i.silent=e)})}function iz(r){var t=r.get("type"),e=r.getModel(t+"Style"),a;return t==="line"?(a=e.getLineStyle(),a.fill=null):t==="shadow"&&(a=e.getAreaStyle(),a.stroke=null),a}function oz(r,t,e,a,n){var i=e.get("value"),o=Fw(i,t.axis,t.ecModel,e.get("seriesDataIndices"),{precision:e.get(["label","precision"]),formatter:e.get(["label","formatter"])}),s=e.getModel("label"),l=ys(s.get("padding")||0),u=s.getFont(),f=ed(o,u),h=n.position,v=f.width+l[1]+l[3],c=f.height+l[0]+l[2],d=n.align;d==="right"&&(h[0]-=v),d==="center"&&(h[0]-=v/2);var p=n.verticalAlign;p==="bottom"&&(h[1]-=c),p==="middle"&&(h[1]-=c/2),sz(h,v,c,a);var g=s.get("backgroundColor");(!g||g==="auto")&&(g=t.get(["axisLine","lineStyle","color"])),r.label={x:h[0],y:h[1],style:Ht(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:g}),z2:10}}function sz(r,t,e,a){var n=a.getWidth(),i=a.getHeight();r[0]=Math.min(r[0]+t,n)-t,r[1]=Math.min(r[1]+e,i)-e,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0)}function Fw(r,t,e,a,n){r=t.scale.parse(r);var i=t.scale.getLabel({value:r},{precision:n.precision}),o=n.formatter;if(o){var s={value:du(t,{value:r}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};M(a,function(l){var u=e.getSeriesByIndex(l.seriesIndex),f=l.dataIndexInside,h=u&&u.getDataParams(f);h&&s.seriesData.push(h)}),X(o)?i=o.replace("{value}",i):Q(o)&&(i=o(s))}return i}function Gw(r,t,e){var a=Fe();return Bu(a,a,e.rotation),mi(a,a,e.position),Ur([r.dataToCoord(t),(e.labelOffset||0)+(e.labelDirection||1)*(e.labelMargin||0)],a)}function lz(r,t,e,a,n,i){var o=Mr.innerTextLayout(e.rotation,0,e.labelDirection);e.labelMargin=n.get(["label","margin"]),oz(t,a,n,i,{position:Gw(a.axis,r,e),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function uz(r,t,e){return e=e||0,{x1:r[e],y1:r[1-e],x2:t[e],y2:t[1-e]}}function fz(r,t,e){return e=e||0,{x:r[e],y:r[1-e],width:t[e],height:t[1-e]}}var hz=(function(r){B(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,a,n,i,o){var s=n.axis,l=s.grid,u=i.get("type"),f=$0(l,s).getOtherAxis(s).getGlobalExtent(),h=s.toGlobalCoord(s.dataToCoord(a,!0));if(u&&u!=="none"){var v=iz(i),c=cz[u](s,h,f);c.style=v,e.graphicKey=c.type,e.pointer=c}var d=Su(l.getRect(),n);lz(a,e,d,n,i,o)},t.prototype.getHandleTransform=function(e,a,n){var i=Su(a.axis.grid.getRect(),a,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var o=Gw(a.axis,e,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,a,n,i){var o=n.axis,s=o.grid,l=o.getGlobalExtent(!0),u=$0(s,o).getOtherAxis(o).getGlobalExtent(),f=o.dim==="x"?0:1,h=[e.x,e.y];h[f]+=a[f],h[f]=Math.min(l[1],h[f]),h[f]=Math.max(l[0],h[f]);var v=(u[1]+u[0])/2,c=[v,v];c[f]=h[f];var d=[{verticalAlign:"middle"},{align:"center"}];return{x:h[0],y:h[1],rotation:e.rotation,cursorPoint:c,tooltipOption:d[f]}},t})(nz);function $0(r,t){var e={};return e[t.dim+"AxisIndex"]=t.index,r.getCartesian(e)}var cz={line:function(r,t,e){var a=uz([t,e[0]],[t,e[1]],K0(r));return{type:"Line",subPixelOptimize:!0,shape:a}},shadow:function(r,t,e){var a=Math.max(1,r.getBandWidth()),n=e[1]-e[0];return{type:"Rect",shape:fz([t-a/2,e[0]],[a,n],K0(r))}}};function K0(r){return r.dim==="x"?0:1}var vz=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="axisPointer",t.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:N.color.border,width:1,type:"dashed"},shadowStyle:{color:N.color.shadowTint},label:{show:!0,formatter:null,precision:"auto",margin:3,color:N.color.neutral00,padding:[5,7,5,7],backgroundColor:N.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:N.color.accent40,throttle:40}},t})(mt),Gr=wt(),dz=M;function Hw(r,t,e){if(!ct.node){var a=t.getZr();Gr(a).records||(Gr(a).records={}),pz(a,t);var n=Gr(a).records[r]||(Gr(a).records[r]={});n.handler=e}}function pz(r,t){if(Gr(r).initialized)return;Gr(r).initialized=!0,e("click",it(q0,"click")),e("mousemove",it(q0,"mousemove")),e("globalout",yz);function e(a,n){r.on(a,function(i){var o=mz(t);dz(Gr(r).records,function(s){s&&n(s,i,o.dispatchAction)}),gz(o.pendings,t)})}}function gz(r,t){var e=r.showTip.length,a=r.hideTip.length,n;e?n=r.showTip[e-1]:a&&(n=r.hideTip[a-1]),n&&(n.dispatchAction=null,t.dispatchAction(n))}function yz(r,t,e){r.handler("leave",null,e)}function q0(r,t,e,a){t.handler(r,e,a)}function mz(r){var t={showTip:[],hideTip:[]},e=function(a){var n=t[a.type];n?n.push(a):(a.dispatchAction=e,r.dispatchAction(a))};return{dispatchAction:e,pendings:t}}function kv(r,t){if(!ct.node){var e=t.getZr(),a=(Gr(e).records||{})[r];a&&(Gr(e).records[r]=null)}}var _z=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){var i=a.getComponent("tooltip"),o=e.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";Hw("axisPointer",n,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})})},t.prototype.remove=function(e,a){kv("axisPointer",a)},t.prototype.dispose=function(e,a){kv("axisPointer",a)},t.type="axisPointer",t})($t);function Ww(r,t){var e=[],a=r.seriesIndex,n;if(a==null||!(n=t.getSeriesByIndex(a)))return{point:[]};var i=n.getData(),o=Mn(i,r);if(o==null||o<0||H(o))return{point:[]};var s=i.getItemGraphicEl(o),l=n.coordinateSystem;if(n.getTooltipPosition)e=n.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(r.isStacked){var u=l.getBaseAxis(),f=l.getOtherAxis(u),h=f.dim,v=u.dim,c=h==="x"||h==="radius"?1:0,d=i.mapDimension(v),p=[];p[c]=i.get(d,o),p[1-c]=i.get(i.getCalculationInfo("stackResultDimension"),o),e=l.dataToPoint(p)||[]}else e=l.dataToPoint(i.getValues(U(l.dimensions,function(y){return i.mapDimension(y)}),o))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),e=[g.x+g.width/2,g.y+g.height/2]}return{point:e,el:s}}var Q0=wt();function Sz(r,t,e){var a=r.currTrigger,n=[r.x,r.y],i=r,o=r.dispatchAction||Y(e.dispatchAction,e),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){Nl(n)&&(n=Ww({seriesIndex:i.seriesIndex,dataIndex:i.dataIndex},t).point);var l=Nl(n),u=i.axesInfo,f=s.axesInfo,h=a==="leave"||Nl(n),v={},c={},d={list:[],map:{}},p={showPointer:it(xz,c),showTooltip:it(wz,d)};M(s.coordSysMap,function(y,m){var _=l||y.containPoint(n);M(s.coordSysAxesInfo[m],function(S,x){var b=S.axis,w=Az(u,S);if(!h&&_&&(!u||w)){var T=w&&w.value;T==null&&!l&&(T=b.pointToData(n)),T!=null&&j0(S,T,p,!1,v)}})});var g={};return M(f,function(y,m){var _=y.linkGroup;_&&!c[m]&&M(_.axesInfo,function(S,x){var b=c[x];if(S!==y&&b){var w=b.value;_.mapper&&(w=y.axis.scale.parse(_.mapper(w,J0(S),J0(y)))),g[y.key]=w}})}),M(g,function(y,m){j0(f[m],y,p,!0,v)}),Tz(c,f,v),Cz(d,n,r,o),Mz(f,o,e),v}}function j0(r,t,e,a,n){var i=r.axis;if(!(i.scale.isBlank()||!i.containData(t))){if(!r.involveSeries){e.showPointer(r,t);return}var o=bz(t,r),s=o.payloadBatch,l=o.snapToValue;s[0]&&n.seriesIndex==null&&F(n,s[0]),!a&&r.snap&&i.containData(l)&&l!=null&&(t=l),e.showPointer(r,t,s),e.showTooltip(r,o,l)}}function bz(r,t){var e=t.axis,a=e.dim,n=r,i=[],o=Number.MAX_VALUE,s=-1;return M(t.seriesModels,function(l,u){var f=l.getData().mapDimensionsAll(a),h,v;if(l.getAxisTooltipData){var c=l.getAxisTooltipData(f,r,e);v=c.dataIndices,h=c.nestestValue}else{if(v=l.indicesOfNearest(a,f[0],r,e.type==="category"?.5:null),!v.length)return;h=l.getData().get(f[0],v[0])}if(!(h==null||!isFinite(h))){var d=r-h,p=Math.abs(d);p<=o&&((p<o||d>=0&&s<0)&&(o=p,s=d,n=h,i.length=0),M(v,function(g){i.push({seriesIndex:l.seriesIndex,dataIndexInside:g,dataIndex:l.getData().getRawIndex(g)})}))}}),{payloadBatch:i,snapToValue:n}}function xz(r,t,e,a){r[t.key]={value:e,payloadBatch:a}}function wz(r,t,e,a){var n=e.payloadBatch,i=t.axis,o=i.model,s=t.axisPointerModel;if(!(!t.triggerTooltip||!n.length)){var l=t.coordSys.model,u=ts(l),f=r.map[u];f||(f=r.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},r.list.push(f)),f.dataByAxis.push({axisDim:i.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:a,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:n.slice()})}}function Tz(r,t,e){var a=e.axesInfo=[];M(t,function(n,i){var o=n.axisPointerModel.option,s=r[i];s?(!n.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!n.useHandle&&(o.status="hide"),o.status==="show"&&a.push({axisDim:n.axis.dim,axisIndex:n.axis.model.componentIndex,value:o.value})})}function Cz(r,t,e,a){if(Nl(t)||!r.list.length){a({type:"hideTip"});return}var n=((r.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};a({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:e.tooltipOption,position:e.position,dataIndexInside:n.dataIndexInside,dataIndex:n.dataIndex,seriesIndex:n.seriesIndex,dataByCoordSys:r.list})}function Mz(r,t,e){var a=e.getZr(),n="axisPointerLastHighlights",i=Q0(a)[n]||{},o=Q0(a)[n]={};M(r,function(u,f){var h=u.axisPointerModel.option;h.status==="show"&&u.triggerEmphasis&&M(h.seriesDataIndices,function(v){var c=v.seriesIndex+" | "+v.dataIndex;o[c]=v})});var s=[],l=[];M(i,function(u,f){!o[f]&&l.push(u)}),M(o,function(u,f){!i[f]&&s.push(u)}),l.length&&e.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&e.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function Az(r,t){for(var e=0;e<(r||[]).length;e++){var a=r[e];if(t.axis.dim===a.axisDim&&t.axis.model.componentIndex===a.axisIndex)return a}}function J0(r){var t=r.axis.model,e={},a=e.axisDim=r.axis.dim;return e.axisIndex=e[a+"AxisIndex"]=t.componentIndex,e.axisName=e[a+"AxisName"]=t.name,e.axisId=e[a+"AxisId"]=t.id,e}function Nl(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function Uw(r){k1.registerAxisPointerClass("CartesianAxisPointer",hz),r.registerComponentModel(vz),r.registerComponentView(_z),r.registerPreprocessor(function(t){if(t){(!t.axisPointer||t.axisPointer.length===0)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!H(e)&&(t.axisPointer.link=[e])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=AE(t,e)}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},Sz)}function Dz(r){ue(N1),ue(Uw)}var t_=["x","y","radius","angle","single"],Lz=["cartesian2d","polar","singleAxis"];function Iz(r){var t=r.get("coordinateSystem");return dt(Lz,t)>=0}function ga(r){return r+"Axis"}function Pz(r,t){var e=nt(),a=[],n=nt();r.eachComponent({mainType:"dataZoom",query:t},function(f){n.get(f.uid)||s(f)});var i;do i=!1,r.eachComponent("dataZoom",o);while(i);function o(f){!n.get(f.uid)&&l(f)&&(s(f),i=!0)}function s(f){n.set(f.uid,!0),a.push(f),u(f)}function l(f){var h=!1;return f.eachTargetAxis(function(v,c){var d=e.get(v);d&&d[c]&&(h=!0)}),h}function u(f){f.eachTargetAxis(function(h,v){(e.get(h)||e.set(h,[]))[v]=!0})}return a}function Yw(r){var t=r.ecModel,e={infoList:[],infoMap:nt()};return r.eachTargetAxis(function(a,n){var i=t.getComponent(ga(a),n);if(i){var o=i.getCoordSysModel();if(o){var s=o.uid,l=e.infoMap.get(s);l||(l={model:o,axisModels:[]},e.infoList.push(l),e.infoMap.set(s,l)),l.axisModels.push(i)}}}),e}var $h=(function(){function r(){this.indexList=[],this.indexMap=[]}return r.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},r})(),is=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._autoThrottle=!0,e._noTarget=!0,e._rangePropMode=["percent","percent"],e}return t.prototype.init=function(e,a,n){var i=e_(e);this.settledOption=i,this.mergeDefaultAndTheme(e,n),this._doInit(i)},t.prototype.mergeOption=function(e){var a=e_(e);ft(this.option,e,!0),ft(this.settledOption,a,!0),this._doInit(a)},t.prototype._doInit=function(e){var a=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var n=this.settledOption;M([["start","startValue"],["end","endValue"]],function(i,o){this._rangePropMode[o]==="value"&&(a[i[0]]=n[i[0]]=null)},this),this._resetTarget()},t.prototype._resetTarget=function(){var e=this.get("orient",!0),a=this._targetAxisInfoMap=nt(),n=this._fillSpecifiedTargetAxis(a);n?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||"horizontal",this._fillAutoTargetAxisByOrient(a,this._orient)),this._noTarget=!0,a.each(function(i){i.indexList.length&&(this._noTarget=!1)},this)},t.prototype._fillSpecifiedTargetAxis=function(e){var a=!1;return M(t_,function(n){var i=this.getReferringComponents(ga(n),VM);if(i.specified){a=!0;var o=new $h;M(i.models,function(s){o.add(s.componentIndex)}),e.set(n,o)}},this),a},t.prototype._fillAutoTargetAxisByOrient=function(e,a){var n=this.ecModel,i=!0;if(i){var o=a==="vertical"?"y":"x",s=n.findComponents({mainType:o+"Axis"});l(s,o)}if(i){var s=n.findComponents({mainType:"singleAxis",filter:function(f){return f.get("orient",!0)===a}});l(s,"single")}function l(u,f){var h=u[0];if(h){var v=new $h;if(v.add(h.componentIndex),e.set(f,v),i=!1,f==="x"||f==="y"){var c=h.getReferringComponents("grid",ee).models[0];c&&M(u,function(d){h.componentIndex!==d.componentIndex&&c===d.getReferringComponents("grid",ee).models[0]&&v.add(d.componentIndex)})}}}i&&M(t_,function(u){if(i){var f=n.findComponents({mainType:ga(u),filter:function(v){return v.get("type",!0)==="category"}});if(f[0]){var h=new $h;h.add(f[0].componentIndex),e.set(u,h),i=!1}}},this)},t.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis(function(a){!e&&(e=a)},this),e==="y"?"vertical":"horizontal"},t.prototype._setDefaultThrottle=function(e){if(e.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var a=this.ecModel.option;this.option.throttle=a.animation&&a.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(e){var a=this._rangePropMode,n=this.get("rangeMode");M([["start","startValue"],["end","endValue"]],function(i,o){var s=e[i[0]]!=null,l=e[i[1]]!=null;s&&!l?a[o]="percent":!s&&l?a[o]="value":n?a[o]=n[o]:s&&(a[o]="percent")})},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis(function(a,n){e==null&&(e=this.ecModel.getComponent(ga(a),n))},this),e},t.prototype.eachTargetAxis=function(e,a){this._targetAxisInfoMap.each(function(n,i){M(n.indexList,function(o){e.call(a,i,o)})})},t.prototype.getAxisProxy=function(e,a){var n=this.getAxisModel(e,a);if(n)return n.__dzAxisProxy},t.prototype.getAxisModel=function(e,a){var n=this._targetAxisInfoMap.get(e);if(n&&n.indexMap[a])return this.ecModel.getComponent(ga(e),a)},t.prototype.setRawRange=function(e){var a=this.option,n=this.settledOption;M([["start","startValue"],["end","endValue"]],function(i){(e[i[0]]!=null||e[i[1]]!=null)&&(a[i[0]]=n[i[0]]=e[i[0]],a[i[1]]=n[i[1]]=e[i[1]])},this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var a=this.option;M(["start","startValue","end","endValue"],function(n){a[n]=e[n]})},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getDataPercentWindow()},t.prototype.getValueRange=function(e,a){if(e==null&&a==null){var n=this.findRepresentativeAxisProxy();if(n)return n.getDataValueWindow()}else return this.getAxisProxy(e,a).getDataValueWindow()},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return e.__dzAxisProxy;for(var a,n=this._targetAxisInfoMap.keys(),i=0;i<n.length;i++)for(var o=n[i],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},t.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},t.prototype.getOrient=function(){return this._orient},t.type="dataZoom",t.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],t.defaultOption={z:4,filterMode:"filter",start:0,end:100},t})(mt);function e_(r){var t={};return M(["start","end","startValue","endValue","throttle"],function(e){r.hasOwnProperty(e)&&(t[e]=r[e])}),t}var Rz=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.select",t})(is),Cp=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n,i){this.dataZoomModel=e,this.ecModel=a,this.api=n},t.type="dataZoom",t})($t),Ez=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.select",t})(Cp),ni=M,r_=Vr,kz=(function(){function r(t,e,a,n){this._dimName=t,this._axisIndex=e,this.ecModel=n,this._dataZoomModel=a}return r.prototype.hostedBy=function(t){return this._dataZoomModel===t},r.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},r.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},r.prototype.getTargetSeriesModels=function(){var t=[];return this.ecModel.eachSeries(function(e){if(Iz(e)){var a=ga(this._dimName),n=e.getReferringComponents(a,ee).models[0];n&&this._axisIndex===n.componentIndex&&t.push(e)}},this),t},r.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},r.prototype.getMinMaxSpan=function(){return J(this._minMaxSpan)},r.prototype.calculateDataWindow=function(t){var e=this._dataExtent,a=this.getAxisModel(),n=a.axis.scale,i=this._dataZoomModel.getRangePropMode(),o=[0,100],s=[],l=[],u;ni(["start","end"],function(v,c){var d=t[v],p=t[v+"Value"];i[c]==="percent"?(d==null&&(d=o[c]),p=n.parse(St(d,o,e))):(u=!0,p=p==null?e[c]:n.parse(p),d=St(p,e,o)),l[c]=p==null||isNaN(p)?e[c]:p,s[c]=d==null||isNaN(d)?o[c]:d}),r_(l),r_(s);var f=this._minMaxSpan;u?h(l,s,e,o,!1):h(s,l,o,e,!0);function h(v,c,d,p,g){var y=g?"Span":"ValueSpan";La(0,v,d,"all",f["min"+y],f["max"+y]);for(var m=0;m<2;m++)c[m]=St(v[m],d,p,!0),g&&(c[m]=n.parse(c[m]))}return{valueWindow:l,percentWindow:s}},r.prototype.reset=function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=Oz(this,this._dimName,e),this._updateMinMaxSpan();var a=this.calculateDataWindow(t.settledOption);this._valueWindow=a.valueWindow,this._percentWindow=a.percentWindow,this._setAxisModel()}},r.prototype.filterData=function(t,e){if(t!==this._dataZoomModel)return;var a=this._dimName,n=this.getTargetSeriesModels(),i=t.get("filterMode"),o=this._valueWindow;if(i==="none")return;ni(n,function(l){var u=l.getData(),f=u.mapDimensionsAll(a);if(f.length){if(i==="weakFilter"){var h=u.getStore(),v=U(f,function(c){return u.getDimensionIndex(c)},u);u.filterSelf(function(c){for(var d,p,g,y=0;y<f.length;y++){var m=h.get(v[y],c),_=!isNaN(m),S=m<o[0],x=m>o[1];if(_&&!S&&!x)return!0;_&&(g=!0),S&&(d=!0),x&&(p=!0)}return g&&d&&p})}else ni(f,function(c){if(i==="empty")l.setData(u=u.map(c,function(p){return s(p)?p:NaN}));else{var d={};d[c]=o,u.selectRange(d)}});ni(f,function(c){u.setApproximateExtent(o,c)})}});function s(l){return l>=o[0]&&l<=o[1]}},r.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},e=this._dataZoomModel,a=this._dataExtent;ni(["min","max"],function(n){var i=e.get(n+"Span"),o=e.get(n+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?i=St(a[0]+o,a,[0,100],!0):i!=null&&(o=St(i,[0,100],a,!0)-a[0]),t[n+"Span"]=i,t[n+"ValueSpan"]=o},this)},r.prototype._setAxisModel=function(){var t=this.getAxisModel(),e=this._percentWindow,a=this._valueWindow;if(e){var n=CS(a,[0,500]);n=Math.min(n,20);var i=t.axis.scale.rawExtentInfo;e[0]!==0&&i.setDeterminedMinMax("min",+a[0].toFixed(n)),e[1]!==100&&i.setDeterminedMinMax("max",+a[1].toFixed(n)),i.freeze()}},r})();function Oz(r,t,e){var a=[1/0,-1/0];ni(e,function(o){fR(a,o.getData(),t)});var n=r.getAxisModel(),i=e1(n.axis.scale,n,a).calculate();return[i.min,i.max]}var Bz={getTargetSeries:function(r){function t(n){r.eachComponent("dataZoom",function(i){i.eachTargetAxis(function(o,s){var l=r.getComponent(ga(o),s);n(o,s,l,i)})})}t(function(n,i,o,s){o.__dzAxisProxy=null});var e=[];t(function(n,i,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new kz(n,i,s,r),e.push(o.__dzAxisProxy))});var a=nt();return M(e,function(n){M(n.getTargetSeriesModels(),function(i){a.set(i.uid,i)})}),a},overallReset:function(r,t){r.eachComponent("dataZoom",function(e){e.eachTargetAxis(function(a,n){e.getAxisProxy(a,n).reset(e)}),e.eachTargetAxis(function(a,n){e.getAxisProxy(a,n).filterData(e,t)})}),r.eachComponent("dataZoom",function(e){var a=e.findRepresentativeAxisProxy();if(a){var n=a.getDataPercentWindow(),i=a.getDataValueWindow();e.setCalculatedRange({start:n[0],end:n[1],startValue:i[0],endValue:i[1]})}})}};function Nz(r){r.registerAction("dataZoom",function(t,e){var a=Pz(e,t);M(a,function(n){n.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})})}var a_=!1;function Mp(r){a_||(a_=!0,r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,Bz),Nz(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function zz(r){r.registerComponentModel(Rz),r.registerComponentView(Ez),Mp(r)}var er=(function(){function r(){}return r})(),Zw={};function so(r,t){Zw[r]=t}function Xw(r){return Zw[r]}var Vz=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.optionUpdated=function(){r.prototype.optionUpdated.apply(this,arguments);var e=this.ecModel;M(this.option.feature,function(a,n){var i=Xw(n);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(e)),ft(a,i.defaultOption))})},t.type="toolbox",t.layoutMode={type:"box",ignoreSize:!0},t.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:N.color.border,borderRadius:0,borderWidth:0,padding:N.size.m,itemSize:15,itemGap:N.size.s,showTitle:!0,iconStyle:{borderColor:N.color.accent50,color:"none"},emphasis:{iconStyle:{borderColor:N.color.accent50}},tooltip:{show:!1,position:"bottom"}},t})(mt);function $w(r,t){var e=ys(t.get("padding")),a=t.getItemStyle(["color","opacity"]);a.fill=t.get("backgroundColor");var n=new _t({shape:{x:r.x-e[3],y:r.y-e[0],width:r.width+e[1]+e[3],height:r.height+e[0]+e[2],r:t.get("borderRadius")},style:a,silent:!0,z2:-1});return n}var Fz=(function(r){B(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.render=function(e,a,n,i){var o=this.group;if(o.removeAll(),!e.get("show"))return;var s=+e.get("itemSize"),l=e.get("orient")==="vertical",u=e.get("feature")||{},f=this._features||(this._features={}),h=[];M(u,function(m,_){h.push(_)}),new Ss(this._featureNames||[],h).add(v).update(v).remove(it(v,null)).execute(),this._featureNames=h;function v(m,_){var S=h[m],x=h[_],b=u[S],w=new Dt(b,e,e.ecModel),T;if(i&&i.newTitle!=null&&i.featureName===S&&(b.title=i.newTitle),S&&!x){if(Gz(S))T={onclick:w.option.onclick,featureName:S};else{var D=Xw(S);if(!D)return;T=new D}f[S]=T}else if(T=f[x],!T)return;T.uid=gs("toolbox-feature"),T.model=w,T.ecModel=a,T.api=n;var A=T instanceof er;if(!S&&x){A&&T.dispose&&T.dispose(a,n);return}if(!w.get("show")||A&&T.unusable){A&&T.remove&&T.remove(a,n);return}c(w,T,S),w.setIconStatus=function(C,I){var L=this.option,P=this.iconPaths;L.iconStatus=L.iconStatus||{},L.iconStatus[C]=I,P[C]&&(I==="emphasis"?Ta:Ca)(P[C])},T instanceof er&&T.render&&T.render(w,a,n,i)}function c(m,_,S){var x=m.getModel("iconStyle"),b=m.getModel(["emphasis","iconStyle"]),w=_ instanceof er&&_.getIcons?_.getIcons():m.get("icon"),T=m.get("title")||{},D,A;X(w)?(D={},D[S]=w):D=w,X(T)?(A={},A[S]=T):A=T;var C=m.iconPaths={};M(D,function(I,L){var P=qu(I,{},{x:-s/2,y:-s/2,width:s,height:s});P.setStyle(x.getItemStyle());var R=P.ensureState("emphasis");R.style=b.getItemStyle();var E=new Tt({style:{text:A[L],align:b.get("textAlign"),borderRadius:b.get("textBorderRadius"),padding:b.get("textPadding"),fill:null,font:gb({fontStyle:b.get("textFontStyle"),fontFamily:b.get("textFontFamily"),fontSize:b.get("textFontSize"),fontWeight:b.get("textFontWeight")},a)},ignore:!0});P.setTextContent(E),ds({el:P,componentModel:e,itemName:L,formatterParamsExtra:{title:A[L]}}),P.__title=A[L],P.on("mouseover",function(){var O=b.getItemStyle(),k=l?e.get("right")==null&&e.get("left")!=="right"?"right":"left":e.get("bottom")==null&&e.get("top")!=="bottom"?"bottom":"top";E.setStyle({fill:b.get("textFill")||O.fill||O.stroke||N.color.neutral99,backgroundColor:b.get("textBackgroundColor")}),P.setTextConfig({position:b.get("textPosition")||k}),E.ignore=!e.get("showTitle"),n.enterEmphasis(this)}).on("mouseout",function(){m.get(["iconStatus",L])!=="emphasis"&&n.leaveEmphasis(this),E.hide()}),(m.get(["iconStatus",L])==="emphasis"?Ta:Ca)(P),o.add(P),P.on("click",Y(_.onclick,_,a,n,L)),C[L]=P})}var d=Le(e,n).refContainer,p=e.getBoxLayoutParams(),g=e.get("padding"),y=ne(p,d,g);wn(e.get("orient"),o,e.get("itemGap"),y.width,y.height),Ed(o,p,d,g),o.add($w(o.getBoundingRect(),e)),l||o.eachChild(function(m){var _=m.__title,S=m.ensureState("emphasis"),x=S.textConfig||(S.textConfig={}),b=m.getTextContent(),w=b&&b.ensureState("emphasis");if(w&&!Q(w)&&_){var T=w.style||(w.style={}),D=ed(_,Tt.makeFont(T)),A=m.x+o.x,C=m.y+o.y+s,I=!1;C+D.height>n.getHeight()&&(x.position="top",I=!0);var L=I?-5-D.height:s+10;A+D.width/2>n.getWidth()?(x.position=["100%",L],T.align="right"):A-D.width/2<0&&(x.position=[0,L],T.align="left")}})},t.prototype.updateView=function(e,a,n,i){M(this._features,function(o){o instanceof er&&o.updateView&&o.updateView(o.model,a,n,i)})},t.prototype.remove=function(e,a){M(this._features,function(n){n instanceof er&&n.remove&&n.remove(e,a)}),this.group.removeAll()},t.prototype.dispose=function(e,a){M(this._features,function(n){n instanceof er&&n.dispose&&n.dispose(e,a)})},t.type="toolbox",t})($t);function Gz(r){return r.indexOf("my")===0}var Hz=(function(r){B(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.onclick=function(e,a){var n=this.model,i=n.get("name")||e.get("title.0.text")||"echarts",o=a.getZr().painter.getType()==="svg",s=o?"svg":n.get("type",!0)||"png",l=a.getConnectedDataURL({type:s,backgroundColor:n.get("backgroundColor",!0)||e.get("backgroundColor")||N.color.neutral00,connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")}),u=ct.browser;if(typeof MouseEvent=="function"&&(u.newEdge||!u.ie&&!u.edge)){var f=document.createElement("a");f.download=i+"."+s,f.target="_blank",f.href=l;var h=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});f.dispatchEvent(h)}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=i+"."+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 S=_.contentWindow,x=S.document;x.open("image/svg+xml","replace"),x.write(d),x.close(),S.focus(),x.execCommand("SaveAs",!0,p),document.body.removeChild(_)}}else{var b=n.get("lang"),w='<body style="margin:0;"><img src="'+l+'" style="max-width:100%;" title="'+(b&&b[0]||"")+'" /></body>',T=window.open();T.document.write(w),T.document.title=i}},t.getDefaultOption=function(e){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:e.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:N.color.neutral00,name:"",excludeComponents:["toolbox"],lang:e.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return a},t})(er),n_="__ec_magicType_stack__",Wz=[["line","bar"],["stack"]],Uz=(function(r){B(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getIcons=function(){var e=this.model,a=e.get("icon"),n={};return M(e.get("type"),function(i){a[i]&&(n[i]=a[i])}),n},t.getDefaultOption=function(e){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:e.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return a},t.prototype.onclick=function(e,a,n){var i=this.model,o=i.get(["seriesIndex",n]);if(i_[n]){var s={series:[]},l=function(h){var v=h.subType,c=h.id,d=i_[n](v,c,h,i);d&&(gt(d,h.option),s.series.push(d));var p=h.coordinateSystem;if(p&&p.type==="cartesian2d"&&(n==="line"||n==="bar")){var g=p.getAxesByScale("ordinal")[0];if(g){var y=g.dim,m=y+"Axis",_=h.getReferringComponents(m,ee).models[0],S=_.componentIndex;s[m]=s[m]||[];for(var x=0;x<=S;x++)s[m][S]=s[m][S]||{};s[m][S].boundaryGap=n==="bar"}}};M(Wz,function(h){dt(h,n)>=0&&M(h,function(v){i.setIconStatus(v,"normal")})}),i.setIconStatus(n,"emphasis"),e.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,f=n;n==="stack"&&(u=ft({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title),i.get(["iconStatus",n])!=="emphasis"&&(f="tiled")),a.dispatchAction({type:"changeMagicType",currentType:f,newOption:s,newTitle:u,featureName:"magicType"})}},t})(er),i_={line:function(r,t,e,a){if(r==="bar")return ft({id:t,type:"line",data:e.get("data"),stack:e.get("stack"),markPoint:e.get("markPoint"),markLine:e.get("markLine")},a.get(["option","line"])||{},!0)},bar:function(r,t,e,a){if(r==="line")return ft({id:t,type:"bar",data:e.get("data"),stack:e.get("stack"),markPoint:e.get("markPoint"),markLine:e.get("markLine")},a.get(["option","bar"])||{},!0)},stack:function(r,t,e,a){var n=e.get("stack")===n_;if(r==="line"||r==="bar")return a.setIconStatus("stack",n?"normal":"emphasis"),ft({id:t,stack:n?"":n_},a.get(["option","stack"])||{},!0)}};Lr({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(r,t){t.mergeOption(r.newOption)});var ff=new Array(60).join("-"),Ai=" ";function Yz(r){var t={},e=[],a=[];return r.eachRawSeries(function(n){var i=n.coordinateSystem;if(i&&(i.type==="cartesian2d"||i.type==="polar")){var o=i.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;t[s]||(t[s]={categoryAxis:o,valueAxis:i.getOtherAxis(o),series:[]},a.push({axisDim:o.dim,axisIndex:o.index})),t[s].series.push(n)}else e.push(n)}else e.push(n)}),{seriesGroupByCategoryAxis:t,other:e,meta:a}}function Zz(r){var t=[];return M(r,function(e,a){var n=e.categoryAxis,i=e.valueAxis,o=i.dim,s=[" "].concat(U(e.series,function(c){return c.name})),l=[n.model.getCategories()];M(e.series,function(c){var d=c.getRawData();l.push(c.getRawData().mapArray(d.mapDimension(o),function(p){return p}))});for(var u=[s.join(Ai)],f=0;f<l[0].length;f++){for(var h=[],v=0;v<l.length;v++)h.push(l[v][f]);u.push(h.join(Ai))}t.push(u.join(`
|
|
36
|
+
`))}),t.join(`
|
|
37
|
+
|
|
38
|
+
`+ff+`
|
|
39
|
+
|
|
40
|
+
`)}function Xz(r){return U(r,function(t){var e=t.getRawData(),a=[t.name],n=[];return e.each(e.dimensions,function(){for(var i=arguments.length,o=arguments[i-1],s=e.getName(o),l=0;l<i-1;l++)n[l]=arguments[l];a.push((s?s+Ai:"")+n.join(Ai))}),a.join(`
|
|
41
|
+
`)}).join(`
|
|
42
|
+
|
|
43
|
+
`+ff+`
|
|
44
|
+
|
|
45
|
+
`)}function $z(r){var t=Yz(r);return{value:kt([Zz(t.seriesGroupByCategoryAxis),Xz(t.other)],function(e){return!!e.replace(/[\n\t\s]/g,"")}).join(`
|
|
46
|
+
|
|
47
|
+
`+ff+`
|
|
48
|
+
|
|
49
|
+
`),meta:t.meta}}function Mu(r){return r.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Kz(r){var t=r.slice(0,r.indexOf(`
|
|
50
|
+
`));if(t.indexOf(Ai)>=0)return!0}var Ov=new RegExp("["+Ai+"]+","g");function qz(r){for(var t=r.split(/\n+/g),e=Mu(t.shift()).split(Ov),a=[],n=U(e,function(l){return{name:l,data:[]}}),i=0;i<t.length;i++){var o=Mu(t[i]).split(Ov);a.push(o.shift());for(var s=0;s<o.length;s++)n[s]&&(n[s].data[i]=o[s])}return{series:n,categories:a}}function Qz(r){for(var t=r.split(/\n+/g),e=Mu(t.shift()),a=[],n=0;n<t.length;n++){var i=Mu(t[n]);if(i){var o=i.split(Ov),s="",l=void 0,u=!1;isNaN(o[0])?(u=!0,s=o[0],o=o.slice(1),a[n]={name:s,value:[]},l=a[n].value):l=a[n]=[];for(var f=0;f<o.length;f++)l.push(+o[f]);l.length===1&&(u?a[n].value=l[0]:a[n]=l[0])}}return{name:e,data:a}}function jz(r,t){var e=r.split(new RegExp(`
|
|
51
|
+
*`+ff+`
|
|
52
|
+
*`,"g")),a={series:[]};return M(e,function(n,i){if(Kz(n)){var o=qz(n),s=t[i],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=Qz(n);a.series.push(o)}}),a}var Jz=(function(r){B(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.onclick=function(e,a){setTimeout(function(){a.dispatchAction({type:"hideTip"})});var n=a.getDom(),i=this.model;this._dom&&n.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=i.get("backgroundColor")||N.color.neutral00;var s=document.createElement("h4"),l=i.get("lang")||[];s.innerHTML=l[0]||i.get("title"),s.style.cssText="margin:10px 20px",s.style.color=i.get("textColor");var u=document.createElement("div"),f=document.createElement("textarea");u.style.cssText="overflow:auto";var h=i.get("optionToContent"),v=i.get("contentToOption"),c=$z(e);if(Q(h)){var d=h(a.getOption());X(d)?u.innerHTML=d:yi(d)&&u.appendChild(d)}else{f.readOnly=i.get("readOnly");var p=f.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=i.get("textColor"),p.borderColor=i.get("textareaBorderColor"),p.backgroundColor=i.get("textareaColor"),f.value=c.value,u.appendChild(f)}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"),S=document.createElement("div");m+=";background-color:"+i.get("buttonColor"),m+=";color:"+i.get("buttonTextColor");var x=this;function b(){n.removeChild(o),x._dom=null}hc(_,"click",b),hc(S,"click",function(){if(v==null&&h!=null||v!=null&&h==null){b();return}var w;try{Q(v)?w=v(u,a.getOption()):w=jz(f.value,g)}catch(T){throw b(),new Error("Data view format error "+T)}w&&a.dispatchAction({type:"changeDataView",newOption:w}),b()}),_.innerHTML=l[1],S.innerHTML=l[2],S.style.cssText=_.style.cssText=m,!i.get("readOnly")&&y.appendChild(S),y.appendChild(_),o.appendChild(s),o.appendChild(u),o.appendChild(y),u.style.height=n.clientHeight-80+"px",n.appendChild(o),this._dom=o},t.prototype.remove=function(e,a){this._dom&&a.getDom().removeChild(this._dom)},t.prototype.dispose=function(e,a){this.remove(e,a)},t.getDefaultOption=function(e){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:e.getLocaleModel().get(["toolbox","dataView","title"]),lang:e.getLocaleModel().get(["toolbox","dataView","lang"]),backgroundColor:N.color.background,textColor:N.color.primary,textareaColor:N.color.background,textareaBorderColor:N.color.border,buttonColor:N.color.accent50,buttonTextColor:N.color.neutral00};return a},t})(er);function tV(r,t){return U(r,function(e,a){var n=t&&t[a];if(j(n)&&!H(n)){var i=j(e)&&!H(e);i||(e={value:e});var o=n.name!=null&&e.name==null;return e=gt(e,n),o&&delete e.name,e}else return e})}Lr({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(r,t){var e=[];M(r.newOption.series,function(a){var n=t.getSeriesByName(a.name)[0];if(!n)e.push(F({type:"scatter"},a));else{var i=n.get("data");e.push({name:a.name,data:tV(a.data,i)})}}),t.mergeOption(gt({series:e},r.newOption))});var Kw=M,qw=wt();function eV(r,t){var e=Ap(r);Kw(t,function(a,n){for(var i=e.length-1;i>=0;i--){var o=e[i];if(o[n])break}if(i<0){var s=r.queryComponents({mainType:"dataZoom",subType:"select",id:n})[0];if(s){var l=s.getPercentRange();e[0][n]={dataZoomId:n,start:l[0],end:l[1]}}}}),e.push(t)}function rV(r){var t=Ap(r),e=t[t.length-1];t.length>1&&t.pop();var a={};return Kw(e,function(n,i){for(var o=t.length-1;o>=0;o--)if(n=t[o][i],n){a[i]=n;break}}),a}function aV(r){qw(r).snapshots=null}function nV(r){return Ap(r).length}function Ap(r){var t=qw(r);return t.snapshots||(t.snapshots=[{}]),t.snapshots}var iV=(function(r){B(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.onclick=function(e,a){aV(e),a.dispatchAction({type:"restore",from:this.uid})},t.getDefaultOption=function(e){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:e.getLocaleModel().get(["toolbox","restore","title"])};return a},t})(er);Lr({type:"restore",event:"restore",update:"prepareAndUpdate"},function(r,t){t.resetOption("recreate")});var oV=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],Qw=(function(){function r(t,e,a){var n=this;this._targetInfoList=[];var i=o_(e,t);M(sV,function(o,s){(!a||!a.include||dt(a.include,s)>=0)&&o(i,n._targetInfoList)})}return r.prototype.setOutputRanges=function(t,e){return this.matchOutputRanges(t,e,function(a,n,i){if((a.coordRanges||(a.coordRanges=[])).push(n),!a.coordRange){a.coordRange=n;var o=Kh[a.brushType](0,i,n);a.__rangeOffset={offset:f_[a.brushType](o.values,a.range,[1,1]),xyMinMax:o.xyMinMax}}}),t},r.prototype.matchOutputRanges=function(t,e,a){M(t,function(n){var i=this.findTargetInfo(n,e);i&&i!==!0&&M(i.coordSyses,function(o){var s=Kh[n.brushType](1,o,n.range,!0);a(n,s.values,o,e)})},this)},r.prototype.setInputRanges=function(t,e){M(t,function(a){var n=this.findTargetInfo(a,e);if(a.range=a.range||[],n&&n!==!0){a.panelId=n.panelId;var i=Kh[a.brushType](0,n.coordSys,a.coordRange),o=a.__rangeOffset;a.range=o?f_[a.brushType](i.values,o.offset,lV(i.xyMinMax,o.xyMinMax)):i.values}},this)},r.prototype.makePanelOpts=function(t,e){return U(this._targetInfoList,function(a){var n=a.getPanelRect();return{panelId:a.panelId,defaultBrushType:e?e(a):null,clipPath:Iw(n),isTargetByCursor:Rw(n,t,a.coordSysModel),getLinearBrushOtherExtent:Pw(n)}})},r.prototype.controlSeries=function(t,e,a){var n=this.findTargetInfo(t,a);return n===!0||n&&dt(n.coordSyses,e.coordinateSystem)>=0},r.prototype.findTargetInfo=function(t,e){for(var a=this._targetInfoList,n=o_(e,t),i=0;i<a.length;i++){var o=a[i],s=t.panelId;if(s){if(o.panelId===s)return o}else for(var l=0;l<s_.length;l++)if(s_[l](n,o))return o}return!0},r})();function Bv(r){return r[0]>r[1]&&r.reverse(),r}function o_(r,t){return Mo(r,t,{includeMainTypes:oV})}var sV={grid:function(r,t){var e=r.xAxisModels,a=r.yAxisModels,n=r.gridModels,i=nt(),o={},s={};!e&&!a&&!n||(M(e,function(l){var u=l.axis.grid.model;i.set(u.id,u),o[u.id]=!0}),M(a,function(l){var u=l.axis.grid.model;i.set(u.id,u),s[u.id]=!0}),M(n,function(l){i.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),i.each(function(l){var u=l.coordinateSystem,f=[];M(u.getCartesians(),function(h,v){(dt(e,h.getAxis("x").model)>=0||dt(a,h.getAxis("y").model)>=0)&&f.push(h)}),t.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:f[0],coordSyses:f,getPanelRect:l_.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(r,t){M(r.geoModels,function(e){var a=e.coordinateSystem;t.push({panelId:"geo--"+e.id,geoModel:e,coordSysModel:e,coordSys:a,coordSyses:[a],getPanelRect:l_.geo})})}},s_=[function(r,t){var e=r.xAxisModel,a=r.yAxisModel,n=r.gridModel;return!n&&e&&(n=e.axis.grid.model),!n&&a&&(n=a.axis.grid.model),n&&n===t.gridModel},function(r,t){var e=r.geoModel;return e&&e===t.geoModel}],l_={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var r=this.coordSys,t=r.getBoundingRect().clone();return t.applyTransform(bn(r)),t}},Kh={lineX:it(u_,0),lineY:it(u_,1),rect:function(r,t,e,a){var n=r?t.pointToData([e[0][0],e[1][0]],a):t.dataToPoint([e[0][0],e[1][0]],a),i=r?t.pointToData([e[0][1],e[1][1]],a):t.dataToPoint([e[0][1],e[1][1]],a),o=[Bv([n[0],i[0]]),Bv([n[1],i[1]])];return{values:o,xyMinMax:o}},polygon:function(r,t,e,a){var n=[[1/0,-1/0],[1/0,-1/0]],i=U(e,function(o){var s=r?t.pointToData(o,a):t.dataToPoint(o,a);return n[0][0]=Math.min(n[0][0],s[0]),n[1][0]=Math.min(n[1][0],s[1]),n[0][1]=Math.max(n[0][1],s[0]),n[1][1]=Math.max(n[1][1],s[1]),s});return{values:i,xyMinMax:n}}};function u_(r,t,e,a){var n=e.getAxis(["x","y"][r]),i=Bv(U([0,1],function(s){return t?n.coordToData(n.toLocalCoord(a[s]),!0):n.toGlobalCoord(n.dataToCoord(a[s]))})),o=[];return o[r]=i,o[1-r]=[NaN,NaN],{values:i,xyMinMax:o}}var f_={lineX:it(h_,0),lineY:it(h_,1),rect:function(r,t,e){return[[r[0][0]-e[0]*t[0][0],r[0][1]-e[0]*t[0][1]],[r[1][0]-e[1]*t[1][0],r[1][1]-e[1]*t[1][1]]]},polygon:function(r,t,e){return U(r,function(a,n){return[a[0]-e[0]*t[n][0],a[1]-e[1]*t[n][1]]})}};function h_(r,t,e,a){return[t[0]-a[r]*e[0],t[1]-a[r]*e[1]]}function lV(r,t){var e=c_(r),a=c_(t),n=[e[0]/a[0],e[1]/a[1]];return isNaN(n[0])&&(n[0]=1),isNaN(n[1])&&(n[1]=1),n}function c_(r){return r?[r[0][1]-r[0][0],r[1][1]-r[1][0]]:[NaN,NaN]}var Nv=M,uV=kM("toolbox-dataZoom_"),fV=(function(r){B(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.render=function(e,a,n,i){this._brushController||(this._brushController=new mw(n.getZr()),this._brushController.on("brush",Y(this._onBrush,this)).mount()),vV(e,a,this,i,n),cV(e,a)},t.prototype.onclick=function(e,a,n){hV[n].call(this)},t.prototype.remove=function(e,a){this._brushController&&this._brushController.unmount()},t.prototype.dispose=function(e,a){this._brushController&&this._brushController.dispose()},t.prototype._onBrush=function(e){var a=e.areas;if(!e.isEnd||!a.length)return;var n={},i=this.ecModel;this._brushController.updateCovers([]);var o=new Qw(Dp(this.model),i,{include:["grid"]});o.matchOutputRanges(a,i,function(u,f,h){if(h.type==="cartesian2d"){var v=u.brushType;v==="rect"?(s("x",h,f[0]),s("y",h,f[1])):s({lineX:"x",lineY:"y"}[v],h,f)}}),eV(i,n),this._dispatchZoomAction(n);function s(u,f,h){var v=f.getAxis(u),c=v.model,d=l(u,c,i),p=d.findRepresentativeAxisProxy(c).getMinMaxSpan();(p.minValueSpan!=null||p.maxValueSpan!=null)&&(h=La(0,h.slice(),v.scale.getExtent(),0,p.minValueSpan,p.maxValueSpan)),d&&(n[d.id]={dataZoomId:d.id,startValue:h[0],endValue:h[1]})}function l(u,f,h){var v;return h.eachComponent({mainType:"dataZoom",subType:"select"},function(c){var d=c.getAxisModel(u,f.componentIndex);d&&(v=c)}),v}},t.prototype._dispatchZoomAction=function(e){var a=[];Nv(e,function(n,i){a.push(J(n))}),a.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:a})},t.getDefaultOption=function(e){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:e.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:N.color.backgroundTint}};return a},t})(er),hV={zoom:function(){var r=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:r})},back:function(){this._dispatchZoomAction(rV(this.ecModel))}};function Dp(r){var t={xAxisIndex:r.get("xAxisIndex",!0),yAxisIndex:r.get("yAxisIndex",!0),xAxisId:r.get("xAxisId",!0),yAxisId:r.get("yAxisId",!0)};return t.xAxisIndex==null&&t.xAxisId==null&&(t.xAxisIndex="all"),t.yAxisIndex==null&&t.yAxisId==null&&(t.yAxisIndex="all"),t}function cV(r,t){r.setIconStatus("back",nV(t)>1?"emphasis":"normal")}function vV(r,t,e,a,n){var i=e._isZoomActive;a&&a.type==="takeGlobalCursor"&&(i=a.key==="dataZoomSelect"?a.dataZoomSelectActive:!1),e._isZoomActive=i,r.setIconStatus("zoom",i?"emphasis":"normal");var o=new Qw(Dp(r),t,{include:["grid"]}),s=o.makePanelOpts(n,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});e._brushController.setPanels(s).enableBrush(i&&s.length?{brushType:"auto",brushStyle:r.getModel("brushStyle").getItemStyle()}:!1)}OL("dataZoom",function(r){var t=r.getComponent("toolbox",0),e=["feature","dataZoom"];if(!t||t.get(e)==null)return;var a=t.getModel(e),n=[],i=Dp(a),o=Mo(r,i);Nv(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),Nv(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,f){var h=l.componentIndex,v={type:"select",$fromToolbox:!0,filterMode:a.get("filterMode",!0)||"filter",id:uV+u+h};v[f]=h,n.push(v)}return n});function dV(r){r.registerComponentModel(Vz),r.registerComponentView(Fz),so("saveAsImage",Hz),so("magicType",Uz),so("dataView",Jz),so("dataZoom",fV),so("restore",iV),ue(zz)}var pV=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="tooltip",t.dependencies=["axisPointer"],t.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:N.color.neutral00,shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:N.color.border,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:N.color.borderShade,width:1,type:"dashed",textStyle:{}}},textStyle:{color:N.color.tertiary,fontSize:14}},t})(mt);function jw(r){var t=r.get("confine");return t!=null?!!t:r.get("renderMode")==="richText"}function Jw(r){if(ct.domSupported){for(var t=document.documentElement.style,e=0,a=r.length;e<a;e++)if(r[e]in t)return r[e]}}var tT=Jw(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),gV=Jw(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);function eT(r,t){if(!r)return t;t=Ib(t,!0);var e=r.indexOf(t);return r=e===-1?t:"-"+r.slice(0,e)+"-"+t,r.toLowerCase()}function yV(r,t){var e=r.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(r);return e?e[t]:null}var mV=eT(gV,"transition"),Lp=eT(tT,"transform"),_V="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(ct.transform3dSupported?"will-change:transform;":"");function SV(r){return r=r==="left"?"right":r==="right"?"left":r==="top"?"bottom":"top",r}function bV(r,t,e){if(!X(e)||e==="inside")return"";var a=r.get("backgroundColor"),n=r.get("borderWidth");t=Ln(t);var i=SV(e),o=Math.max(Math.round(n)*1.5,6),s="",l=Lp+":",u;dt(["left","right"],i)>-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=i==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=i==="top"?225:45)+"deg)");var f=u*Math.PI/180,h=o+n,v=h*Math.abs(Math.cos(f))+h*Math.abs(Math.sin(f)),c=Math.round(((v-Math.SQRT2*n)/2+Math.SQRT2*n-(v-h)/2)*100)/100;s+=";"+i+":-"+c+"px";var d=t+" solid "+n+"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 xV(r,t,e){var a="cubic-bezier(0.23,1,0.32,1)",n="",i="";return e&&(n=" "+r/2+"s "+a,i="opacity"+n+",visibility"+n),t||(n=" "+r+"s "+a,i+=(i.length?",":"")+(ct.transformSupported?""+Lp+n:",left"+n+",top"+n)),mV+":"+i}function v_(r,t,e){var a=r.toFixed(0)+"px",n=t.toFixed(0)+"px";if(!ct.transformSupported)return e?"top:"+n+";left:"+a+";":[["top",n],["left",a]];var i=ct.transform3dSupported,o="translate"+(i?"3d":"")+"("+a+","+n+(i?",0":"")+")";return e?"top:0;left:0;"+Lp+":"+o+";":[["top",0],["left",0],[tT,o]]}function wV(r){var t=[],e=r.get("fontSize"),a=r.getTextColor();a&&t.push("color:"+a),t.push("font:"+r.getFont());var n=et(r.get("lineHeight"),Math.round(e*3/2));e&&t.push("line-height:"+n+"px");var i=r.get("textShadowColor"),o=r.get("textShadowBlur")||0,s=r.get("textShadowOffsetX")||0,l=r.get("textShadowOffsetY")||0;return i&&o&&t.push("text-shadow:"+s+"px "+l+"px "+o+"px "+i),M(["decoration","align"],function(u){var f=r.get(u);f&&t.push("text-"+u+":"+f)}),t.join(";")}function TV(r,t,e,a){var n=[],i=r.get("transitionDuration"),o=r.get("backgroundColor"),s=r.get("shadowBlur"),l=r.get("shadowColor"),u=r.get("shadowOffsetX"),f=r.get("shadowOffsetY"),h=r.getModel("textStyle"),v=lx(r,"html"),c=u+"px "+f+"px "+s+"px "+l;return n.push("box-shadow:"+c),t&&i>0&&n.push(xV(i,e,a)),o&&n.push("background-color:"+o),M(["width","color","radius"],function(d){var p="border-"+d,g=Ib(p),y=r.get(g);y!=null&&n.push(p+":"+y+(d==="color"?"":"px"))}),n.push(wV(h)),v!=null&&n.push("padding:"+ys(v).join("px ")+"px"),n.join(";")+";"}function d_(r,t,e,a,n){var i=t&&t.painter;if(e){var o=i&&i.getViewportRoot();o&&sC(r,o,e,a,n)}else{r[0]=a,r[1]=n;var s=i&&i.getViewportRootOffset();s&&(r[0]+=s.offsetLeft,r[1]+=s.offsetTop)}r[2]=r[0]/t.getWidth(),r[3]=r[1]/t.getHeight()}var CV=(function(){function r(t,e){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,ct.wxa)return null;var a=document.createElement("div");a.domBelongToZr=!0,this.el=a;var n=this._zr=t.getZr(),i=e.appendTo,o=i&&(X(i)?document.querySelector(i):yi(i)?i:Q(i)&&i(t.getDom()));d_(this._styleCoord,n,o,t.getWidth()/2,t.getHeight()/2),(o||t.getDom()).appendChild(a),this._api=t,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=n.handler,f=n.painter.getViewportRoot();Ee(f,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(t){if(!this._container){var e=this._api.getDom(),a=yV(e,"position"),n=e.style;n.position!=="absolute"&&a!=="absolute"&&(n.position="relative")}var i=t.get("alwaysShowContent");i&&this._moveIfResized(),this._alwaysShowContent=i,this._enableDisplayTransition=t.get("displayTransition")&&t.get("transitionDuration")>0,this.el.className=t.get("className")||""},r.prototype.show=function(t,e){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var a=this.el,n=a.style,i=this._styleCoord;a.innerHTML?n.cssText=_V+TV(t,!this._firstShow,this._longHide,this._enableDisplayTransition)+v_(i[0],i[1],!0)+("border-color:"+Ln(e)+";")+(t.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):n.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},r.prototype.setContent=function(t,e,a,n,i){var o=this.el;if(t==null){o.innerHTML="";return}var s="";if(X(i)&&a.get("trigger")==="item"&&!jw(a)&&(s=bV(a,n,i)),X(t))o.innerHTML=t+s;else if(t){o.innerHTML="",H(t)||(t=[t]);for(var l=0;l<t.length;l++)yi(t[l])&&t[l].parentNode!==o&&o.appendChild(t[l]);if(s&&o.childNodes.length){var u=document.createElement("div");u.innerHTML=s,o.appendChild(u)}}},r.prototype.setEnterable=function(t){this._enterable=t},r.prototype.getSize=function(){var t=this.el;return t?[t.offsetWidth,t.offsetHeight]:[0,0]},r.prototype.moveTo=function(t,e){if(this.el){var a=this._styleCoord;if(d_(a,this._zr,this._container,t,e),a[0]!=null&&a[1]!=null){var n=this.el.style,i=v_(a[0],a[1]);M(i,function(o){n[o[0]]=o[1]})}}},r.prototype._moveIfResized=function(){var t=this._styleCoord[2],e=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),e*this._zr.getHeight())},r.prototype.hide=function(){var t=this,e=this.el.style;this._enableDisplayTransition?(e.visibility="hidden",e.opacity="0"):e.display="none",ct.transform3dSupported&&(e.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return t._longHide=!0},500)},r.prototype.hideLater=function(t){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(Y(this.hide,this),t)):this.hide())},r.prototype.isShow=function(){return this._show},r.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var t=this._zr;lC(t&&t.painter&&t.painter.getViewportRoot(),this._container);var e=this.el;if(e){e.onmouseenter=e.onmousemove=e.onmouseleave=null;var a=e.parentNode;a&&a.removeChild(e)}this.el=this._container=null},r})(),MV=(function(){function r(t){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=t.getZr(),g_(this._styleCoord,this._zr,t.getWidth()/2,t.getHeight()/2)}return r.prototype.update=function(t){var e=t.get("alwaysShowContent");e&&this._moveIfResized(),this._alwaysShowContent=e},r.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},r.prototype.setContent=function(t,e,a,n,i){var o=this;j(t)&&de(""),this.el&&this._zr.remove(this.el);var s=a.getModel("textStyle");this.el=new Tt({style:{rich:e.richTextStyles,text:t,lineHeight:22,borderWidth:1,borderColor:n,textShadowColor:s.get("textShadowColor"),fill:a.get(["textStyle","color"]),padding:lx(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(t){this._enterable=t},r.prototype.getSize=function(){var t=this.el,e=this.el.getBoundingRect(),a=p_(t.style);return[e.width+a.left+a.right,e.height+a.top+a.bottom]},r.prototype.moveTo=function(t,e){var a=this.el;if(a){var n=this._styleCoord;g_(n,this._zr,t,e),t=n[0],e=n[1];var i=a.style,o=sa(i.borderWidth||0),s=p_(i);a.x=t+o+s.left,a.y=e+o+s.top,a.markRedraw()}},r.prototype._moveIfResized=function(){var t=this._styleCoord[2],e=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),e*this._zr.getHeight())},r.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},r.prototype.hideLater=function(t){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(Y(this.hide,this),t)):this.hide())},r.prototype.isShow=function(){return this._show},r.prototype.dispose=function(){this._zr.remove(this.el)},r})();function sa(r){return Math.max(0,r)}function p_(r){var t=sa(r.shadowBlur||0),e=sa(r.shadowOffsetX||0),a=sa(r.shadowOffsetY||0);return{left:sa(t-e),right:sa(t+e),top:sa(t-a),bottom:sa(t+a)}}function g_(r,t,e,a){r[0]=e,r[1]=a,r[2]=r[0]/t.getWidth(),r[3]=r[1]/t.getHeight()}var AV=new _t({shape:{x:-1,y:-1,width:2,height:2}}),DV=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,a){if(!(ct.node||!a.getDom())){var n=e.getComponent("tooltip"),i=this._renderMode=GM(n.get("renderMode"));this._tooltipContent=i==="richText"?new MV(a):new CV(a,{appendTo:n.get("appendToBody",!0)?"body":n.get("appendTo",!0)})}},t.prototype.render=function(e,a,n){if(!(ct.node||!n.getDom())){this.group.removeAll(),this._tooltipModel=e,this._ecModel=a,this._api=n;var i=this._tooltipContent;i.update(e),i.setEnterable(e.get("enterable")),this._initGlobalListener(),this._keepShow(),this._renderMode!=="richText"&&e.get("transitionDuration")?_s(this,"_updatePosition",50,"fixRate"):$o(this,"_updatePosition")}},t.prototype._initGlobalListener=function(){var e=this._tooltipModel,a=e.get("triggerOn");Hw("itemTooltip",this._api,Y(function(n,i,o){a!=="none"&&(a.indexOf(n)>=0?this._tryShow(i,o):n==="leave"&&this._hide(o))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,a=this._ecModel,n=this._api,i=e.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&i!=="none"&&i!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&o.manuallyShowTip(e,a,n,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,a,n,i){if(!(i.from===this.uid||ct.node||!n.getDom())){var o=y_(i,n);this._ticket="";var s=i.dataByCoordSys,l=RV(i,a,n);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:i.position,positionDefault:"bottom"},o)}else if(i.tooltip&&i.x!=null&&i.y!=null){var f=AV;f.x=i.x,f.y=i.y,f.update(),vt(f).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:f},o)}else if(s)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:s,tooltipOption:i.tooltipOption},o);else if(i.seriesIndex!=null){if(this._manuallyAxisShowTip(e,a,n,i))return;var h=Ww(i,a),v=h.point[0],c=h.point[1];v!=null&&c!=null&&this._tryShow({offsetX:v,offsetY:c,target:h.el,position:i.position,positionDefault:"bottom"},o)}else i.x!=null&&i.y!=null&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target},o))}},t.prototype.manuallyHideTip=function(e,a,n,i){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(y_(i,n))},t.prototype._manuallyAxisShowTip=function(e,a,n,i){var o=i.seriesIndex,s=i.dataIndex,l=a.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=a.getSeriesByIndex(o);if(u){var f=u.getData(),h=lo([f.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(h.get("trigger")==="axis")return n.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:i.position}),!0}}},t.prototype._tryShow=function(e,a){var n=e.target,i=this._tooltipModel;if(i){this._lastX=e.offsetX,this._lastY=e.offsetY;var o=e.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,e);else if(n){var s=vt(n);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;hi(n,function(f){if(f.tooltipDisabled)return l=u=null,!0;l||u||(vt(f).dataIndex!=null?l=f:vt(f).tooltipConfig!=null&&(u=f))},!0),l?this._showSeriesItemTooltip(e,l,a):u?this._showComponentItemTooltip(e,u,a):this._hide(a)}else this._lastDataByCoordSys=null,this._hide(a)}},t.prototype._showOrMove=function(e,a){var n=e.get("showDelay");a=Y(a,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(a,n):a()},t.prototype._showAxisTooltip=function(e,a){var n=this._ecModel,i=this._tooltipModel,o=[a.offsetX,a.offsetY],s=lo([a.tooltipOption],i),l=this._renderMode,u=[],f=Ye("section",{blocks:[],noHeader:!0}),h=[],v=new fh;M(e,function(m){M(m.dataByAxis,function(_){var S=n.getComponent(_.axisDim+"Axis",_.axisIndex),x=_.value;if(!(!S||x==null)){var b=Fw(x,S.axis,n,_.seriesDataIndices,_.valueLabelOpt),w=Ye("section",{header:b,noHeader:!Sr(b),sortBlocks:!0,blocks:[]});f.blocks.push(w),M(_.seriesDataIndices,function(T){var D=n.getSeriesByIndex(T.seriesIndex),A=T.dataIndexInside,C=D.getDataParams(A);if(!(C.dataIndex<0)){C.axisDim=_.axisDim,C.axisIndex=_.axisIndex,C.axisType=_.axisType,C.axisId=_.axisId,C.axisValue=du(S.axis,{value:x}),C.axisValueLabel=b,C.marker=v.makeTooltipMarker("item",Ln(C.color),l);var I=Dy(D.formatTooltip(A,!0,null)),L=I.frag;if(L){var P=lo([D],i).get("valueFormatter");w.blocks.push(P?F({valueFormatter:P},L):L)}I.text&&h.push(I.text),u.push(C)}})}})}),f.blocks.reverse(),h.reverse();var c=a.position,d=s.get("order"),p=ky(f,v,l,d,n.get("useUTC"),s.get("textStyle"));p&&h.unshift(p);var g=l==="richText"?`
|
|
53
|
+
|
|
54
|
+
`:"<br/>",y=h.join(g);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(e,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)})},t.prototype._showSeriesItemTooltip=function(e,a,n){var i=this._ecModel,o=vt(a),s=o.seriesIndex,l=i.getSeriesByIndex(s),u=o.dataModel||l,f=o.dataIndex,h=o.dataType,v=u.getData(h),c=this._renderMode,d=e.positionDefault,p=lo([v.getItemModel(f),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,d?{position:d}:null),g=p.get("trigger");if(!(g!=null&&g!=="item")){var y=u.getDataParams(f,h),m=new fh;y.marker=m.makeTooltipMarker("item",Ln(y.color),c);var _=Dy(u.formatTooltip(f,!1,h)),S=p.get("order"),x=p.get("valueFormatter"),b=_.frag,w=b?ky(x?F({valueFormatter:x},b):b,m,c,S,i.get("useUTC"),p.get("textStyle")):_.text,T="item_"+u.name+"_"+f;this._showOrMove(p,function(){this._showTooltipContent(p,w,y,T,e.offsetX,e.offsetY,e.position,e.target,m)}),n({type:"showTip",dataIndexInside:f,dataIndex:v.getRawIndex(f),seriesIndex:s,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,a,n){var i=this._renderMode==="html",o=vt(a),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(X(l)){var f=l;l={content:f,formatter:f},u=!0}u&&i&&l.content&&(l=J(l),l.content=_e(l.content));var h=[l],v=this._ecModel.getComponent(o.componentMainType,o.componentIndex);v&&h.push(v),h.push({formatter:l.content});var c=e.positionDefault,d=lo(h,this._tooltipModel,c?{position:c}:null),p=d.get("content"),g=Math.random()+"",y=new fh;this._showOrMove(d,function(){var m=J(d.get("formatterParams")||{});this._showTooltipContent(d,p,m,g,e.offsetX,e.offsetY,e.position,a,y)}),n({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(e,a,n,i,o,s,l,u,f){if(this._ticket="",!(!e.get("showContent")||!e.get("show"))){var h=this._tooltipContent;h.setEnterable(e.get("enterable"));var v=e.get("formatter");l=l||e.get("position");var c=a,d=this._getNearestPoint([o,s],n,e.get("trigger"),e.get("borderColor"),e.get("defaultBorderColor",!0)),p=d.color;if(v)if(X(v)){var g=e.ecModel.get("useUTC"),y=H(n)?n[0]:n,m=y&&y.axisType&&y.axisType.indexOf("time")>=0;c=v,m&&(c=ju(y.axisValue,c,g)),c=Pb(c,n,!0)}else if(Q(v)){var _=Y(function(S,x){S===this._ticket&&(h.setContent(x,f,e,p,l),this._updatePosition(e,l,o,s,h,n,u))},this);this._ticket=i,c=v(n,i,_)}else c=v;h.setContent(c,f,e,p,l),h.show(e,p),this._updatePosition(e,l,o,s,h,n,u)}},t.prototype._getNearestPoint=function(e,a,n,i,o){if(n==="axis"||H(a))return{color:i||o};if(!H(a))return{color:i||a.color||a.borderColor}},t.prototype._updatePosition=function(e,a,n,i,o,s,l){var u=this._api.getWidth(),f=this._api.getHeight();a=a||e.get("position");var h=o.getSize(),v=e.get("align"),c=e.get("verticalAlign"),d=l&&l.getBoundingRect().clone();if(l&&d.applyTransform(l.transform),Q(a)&&(a=a([n,i],s,o.el,d,{viewSize:[u,f],contentSize:h.slice()})),H(a))n=K(a[0],u),i=K(a[1],f);else if(j(a)){var p=a;p.width=h[0],p.height=h[1];var g=ne(p,{width:u,height:f});n=g.x,i=g.y,v=null,c=null}else if(X(a)&&l){var y=PV(a,d,h,e.get("borderWidth"));n=y[0],i=y[1]}else{var y=LV(n,i,o,u,f,v?null:20,c?null:20);n=y[0],i=y[1]}if(v&&(n-=m_(v)?h[0]/2:v==="right"?h[0]:0),c&&(i-=m_(c)?h[1]/2:c==="bottom"?h[1]:0),jw(e)){var y=IV(n,i,o,u,f);n=y[0],i=y[1]}o.moveTo(n,i)},t.prototype._updateContentNotChangedOnAxis=function(e,a){var n=this._lastDataByCoordSys,i=this._cbParamsList,o=!!n&&n.length===e.length;return o&&M(n,function(s,l){var u=s.dataByAxis||[],f=e[l]||{},h=f.dataByAxis||[];o=o&&u.length===h.length,o&&M(u,function(v,c){var d=h[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}),i&&M(v.seriesDataIndices,function(y){var m=y.seriesIndex,_=a[m],S=i[m];_&&S&&S.data!==_.data&&(o=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=a,!!o},t.prototype._hide=function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},t.prototype.dispose=function(e,a){ct.node||!a.getDom()||($o(this,"_updatePosition"),this._tooltipContent.dispose(),kv("itemTooltip",a))},t.type="tooltip",t})($t);function lo(r,t,e){var a=t.ecModel,n;e?(n=new Dt(e,a,a),n=new Dt(t.option,n,a)):n=t;for(var i=r.length-1;i>=0;i--){var o=r[i];o&&(o instanceof Dt&&(o=o.get("tooltip",!0)),X(o)&&(o={formatter:o}),o&&(n=new Dt(o,n,a)))}return n}function y_(r,t){return r.dispatchAction||Y(t.dispatchAction,t)}function LV(r,t,e,a,n,i,o){var s=e.getSize(),l=s[0],u=s[1];return i!=null&&(r+l+i+2>a?r-=l+i:r+=i),o!=null&&(t+u+o>n?t-=u+o:t+=o),[r,t]}function IV(r,t,e,a,n){var i=e.getSize(),o=i[0],s=i[1];return r=Math.min(r+o,a)-o,t=Math.min(t+s,n)-s,r=Math.max(r,0),t=Math.max(t,0),[r,t]}function PV(r,t,e,a){var n=e[0],i=e[1],o=Math.ceil(Math.SQRT2*a)+8,s=0,l=0,u=t.width,f=t.height;switch(r){case"inside":s=t.x+u/2-n/2,l=t.y+f/2-i/2;break;case"top":s=t.x+u/2-n/2,l=t.y-i-o;break;case"bottom":s=t.x+u/2-n/2,l=t.y+f+o;break;case"left":s=t.x-n-o,l=t.y+f/2-i/2;break;case"right":s=t.x+u+o,l=t.y+f/2-i/2}return[s,l]}function m_(r){return r==="center"||r==="middle"}function RV(r,t,e){var a=nd(r).queryOptionMap,n=a.keys()[0];if(!(!n||n==="series")){var i=Ri(t,n,a.get(n),{useDefault:!1,enableAll:!1,enableNone:!1}),o=i.models[0];if(o){var s=e.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var f=vt(u).tooltipConfig;if(f&&f.name===r.name)return l=u,!0}),l)return{componentMainType:n,componentIndex:o.componentIndex,el:l}}}}function EV(r){ue(Uw),r.registerComponentModel(pV),r.registerComponentView(DV),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},re),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},re)}var __=M;function S_(r){if(r){for(var t in r)if(r.hasOwnProperty(t))return!0}}function b_(r,t,e){var a={};return __(t,function(i){var o=a[i]=n();__(r[i],function(s,l){if(Qt.isValidType(l)){var u={type:l,visual:s};e&&e(u,i),o[l]=new Qt(u),l==="opacity"&&(u=J(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new Qt(u))}})}),a;function n(){var i=function(){};i.prototype.__hidden=i.prototype;var o=new i;return o}}function kV(r,t,e){var a;M(e,function(n){t.hasOwnProperty(n)&&S_(t[n])&&(a=!0)}),a&&M(e,function(n){t.hasOwnProperty(n)&&S_(t[n])?r[n]=J(t[n]):delete r[n]})}function OV(r,t,e,a){var n={};return M(r,function(i){var o=Qt.prepareVisualTypes(t[i]);n[i]=o}),{progress:function(o,s){var l;a!=null&&(l=s.getDimensionIndex(a));function u(x){return yx(s,h,x)}function f(x,b){c2(s,h,x,b)}for(var h,v=s.getStore();(h=o.next())!=null;){var c=s.getRawDataItem(h);if(!(c&&c.visualMap===!1))for(var d=a!=null?v.get(l,h):h,p=e(d),g=t[p],y=n[p],m=0,_=y.length;m<_;m++){var S=y[m];g[S]&&g[S].applyVisual(d,u,f)}}}}}var BV=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.layoutMode={type:"box",ignoreSize:!0},e}return t.type="title",t.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:"center",top:N.size.m,backgroundColor:N.color.transparent,borderColor:N.color.primary,borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:N.color.primary},subtextStyle:{fontSize:12,color:N.color.quaternary}},t})(mt),NV=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){if(this.group.removeAll(),!!e.get("show")){var i=this.group,o=e.getModel("textStyle"),s=e.getModel("subtextStyle"),l=e.get("textAlign"),u=et(e.get("textBaseline"),e.get("textVerticalAlign")),f=new Tt({style:Ht(o,{text:e.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),h=f.getBoundingRect(),v=e.get("subtext"),c=new Tt({style:Ht(s,{text:v,fill:s.getTextColor(),y:h.height+e.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),d=e.get("link"),p=e.get("sublink"),g=e.get("triggerEvent",!0);f.silent=!d&&!g,c.silent=!p&&!g,d&&f.on("click",function(){iu(d,"_"+e.get("target"))}),p&&c.on("click",function(){iu(p,"_"+e.get("subtarget"))}),vt(f).eventData=vt(c).eventData=g?{componentType:"title",componentIndex:e.componentIndex}:null,i.add(f),v&&i.add(c);var y=i.getBoundingRect(),m=e.getBoxLayoutParams();m.width=y.width,m.height=y.height;var _=Le(e,n),S=ne(m,_.refContainer,e.get("padding"));l||(l=e.get("left")||e.get("right"),l==="middle"&&(l="center"),l==="right"?S.x+=S.width:l==="center"&&(S.x+=S.width/2)),u||(u=e.get("top")||e.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?S.y+=S.height:u==="middle"&&(S.y+=S.height/2),u=u||"top"),i.x=S.x,i.y=S.y,i.markRedraw();var x={align:l,verticalAlign:u};f.setStyle(x),c.setStyle(x),y=i.getBoundingRect();var b=S.margin,w=e.getItemStyle(["color","opacity"]);w.fill=e.get("backgroundColor");var T=new _t({shape:{x:y.x-b[3],y:y.y-b[0],width:y.width+b[1]+b[3],height:y.height+b[0]+b[2],r:e.get("borderRadius")},style:w,subPixelOptimize:!0,silent:!0});i.add(T)}},t.type="title",t})($t);function zV(r){r.registerComponentModel(BV),r.registerComponentView(NV)}function rT(r,t){if(!r)return!1;for(var e=H(r)?r:[r],a=0;a<e.length;a++)if(e[a]&&e[a][t])return!0;return!1}function ml(r){Fo(r,"label",["show"])}var _l=wt(),Pa=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.createdBySelf=!1,e.preventAutoZ=!0,e}return t.prototype.init=function(e,a,n){this.mergeDefaultAndTheme(e,n),this._mergeOption(e,n,!1,!0)},t.prototype.isAnimationEnabled=function(){if(ct.node)return!1;var e=this.__hostSeries;return this.getShallow("animation")&&e&&e.isAnimationEnabled()},t.prototype.mergeOption=function(e,a){this._mergeOption(e,a,!1,!1)},t.prototype._mergeOption=function(e,a,n,i){var o=this.mainType;n||a.eachSeries(function(s){var l=s.get(this.mainType,!0),u=_l(s)[o];if(!l||!l.data){_l(s)[o]=null;return}u?u._mergeOption(l,a,!0):(i&&ml(l),M(l.data,function(f){f instanceof Array?(ml(f[0]),ml(f[1])):ml(f)}),u=this.createMarkerModelFromSeries(l,this,a),F(u,{mainType:this.mainType,seriesIndex:s.seriesIndex,name:s.name,createdBySelf:!0}),u.__hostSeries=s),_l(s)[o]=u},this)},t.prototype.formatTooltip=function(e,a,n){var i=this.getData(),o=this.getRawValue(e),s=i.getName(e);return Ye("section",{header:this.name,blocks:[Ye("nameValue",{name:s,value:o,noName:!s,noValue:o==null})]})},t.prototype.getData=function(){return this._data},t.prototype.setData=function(e){this._data=e},t.prototype.getDataParams=function(e,a){var n=Fd.prototype.getDataParams.call(this,e,a),i=this.__hostSeries;return i&&(n.seriesId=i.id,n.seriesName=i.name,n.seriesType=i.subType),n},t.getMarkerModelFromSeries=function(e,a){return _l(e)[a]},t.type="marker",t.dependencies=["series","grid","polar","geo"],t})(mt);fe(Pa,Fd.prototype);var VV=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.createMarkerModelFromSeries=function(e,a,n){return new t(e,a,n)},t.type="markPoint",t.defaultOption={z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},t})(Pa);function FV(r){return!(isNaN(parseFloat(r.x))&&isNaN(parseFloat(r.y)))}function GV(r){return!isNaN(parseFloat(r.x))&&!isNaN(parseFloat(r.y))}function Sl(r,t,e,a,n,i,o){var s=[],l=In(t,n),u=l?t.getCalculationInfo("stackResultDimension"):n,f=Au(t,u,r),h=t.hostModel,v=h.indicesOfNearest(e,u,f)[0];s[i]=t.get(a,v),s[o]=t.get(u,v);var c=t.get(n,v),d=xr(t.get(n,v));return d=Math.min(d,20),d>=0&&(s[o]=+s[o].toFixed(d)),[s,c]}var bl={min:it(Sl,"min"),max:it(Sl,"max"),average:it(Sl,"average"),median:it(Sl,"median")};function zv(r,t){if(t){var e=r.getData(),a=r.coordinateSystem,n=a&&a.dimensions;if(!GV(t)&&!H(t.coord)&&H(n)){var i=aT(t,e,a,r);if(t=J(t),t.type&&bl[t.type]&&i.baseAxis&&i.valueAxis){var o=dt(n,i.baseAxis.dim),s=dt(n,i.valueAxis.dim),l=bl[t.type](e,i.valueAxis.dim,i.baseDataDim,i.valueDataDim,o,s);t.coord=l[0],t.value=l[1]}else t.coord=[t.xAxis!=null?t.xAxis:t.radiusAxis,t.yAxis!=null?t.yAxis:t.angleAxis]}if(t.coord==null||!H(n)){t.coord=[];var u=r.getBaseAxis();if(u&&t.type&&bl[t.type]){var f=a.getOtherAxis(u);f&&(t.value=Au(e,e.mapDimension(f.dim),t.type))}}else for(var h=t.coord,v=0;v<2;v++)bl[h[v]]&&(h[v]=Au(e,e.mapDimension(n[v]),h[v]));return t}}function aT(r,t,e,a){var n={};return r.valueIndex!=null||r.valueDim!=null?(n.valueDataDim=r.valueIndex!=null?t.getDimension(r.valueIndex):r.valueDim,n.valueAxis=e.getAxis(HV(a,n.valueDataDim)),n.baseAxis=e.getOtherAxis(n.valueAxis),n.baseDataDim=t.mapDimension(n.baseAxis.dim)):(n.baseAxis=a.getBaseAxis(),n.valueAxis=e.getOtherAxis(n.baseAxis),n.baseDataDim=t.mapDimension(n.baseAxis.dim),n.valueDataDim=t.mapDimension(n.valueAxis.dim)),n}function HV(r,t){var e=r.getData().getDimensionInfo(t);return e&&e.coordDim}function Vv(r,t){return r&&r.containData&&t.coord&&!FV(t)?r.containData(t.coord):!0}function nT(r,t){return r?function(e,a,n,i){var o=i<2?e.coord&&e.coord[i]:e.value;return gi(o,t[i])}:function(e,a,n,i){return gi(e.value,t[i])}}function Au(r,t,e){if(e==="average"){var a=0,n=0;return r.each(t,function(i,o){isNaN(i)||(a+=i,n++)}),a/n}else return e==="median"?r.getMedian(t):r.getDataExtent(t)[e==="max"?1:0]}var qh=wt(),iT=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(){this.markerGroupMap=nt()},t.prototype.render=function(e,a,n){var i=this,o=this.markerGroupMap;o.each(function(s){qh(s).keep=!1}),a.eachSeries(function(s){var l=Pa.getMarkerModelFromSeries(s,i.type);l&&i.renderSeries(s,l,a,n)}),o.each(function(s){!qh(s).keep&&i.group.remove(s.group)}),WV(a,o,this.type)},t.prototype.markKeep=function(e){qh(e).keep=!0},t.prototype.toggleBlurSeries=function(e,a){var n=this;M(e,function(i){var o=Pa.getMarkerModelFromSeries(i,n.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(a?QS(l):cd(l))})}})},t.type="marker",t})($t);function WV(r,t,e){r.eachSeries(function(a){var n=Pa.getMarkerModelFromSeries(a,e),i=t.get(a.id);if(n&&i&&i.group){var o=xi(n),s=o.z,l=o.zlevel;Sd(i.group,s,l)}})}function x_(r,t,e){var a=t.coordinateSystem,n=e.getWidth(),i=e.getHeight(),o=a&&a.getArea&&a.getArea();r.each(function(s){var l=r.getItemModel(s),u=l.get("relativeTo")==="coordinate",f=u?o?o.width:0:n,h=u?o?o.height:0:i,v=u&&o?o.x:0,c=u&&o?o.y:0,d,p=K(l.get("x"),f)+v,g=K(l.get("y"),h)+c;if(!isNaN(p)&&!isNaN(g))d=[p,g];else if(t.getMarkerPosition)d=t.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 UV=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.updateTransform=function(e,a,n){a.eachSeries(function(i){var o=Pa.getMarkerModelFromSeries(i,"markPoint");o&&(x_(o.getData(),i,n),this.markerGroupMap.get(i.id).updateLayout())},this)},t.prototype.renderSeries=function(e,a,n,i){var o=e.coordinateSystem,s=e.id,l=e.getData(),u=this.markerGroupMap,f=u.get(s)||u.set(s,new sp),h=YV(o,e,a);a.setData(h),x_(a.getData(),e,i),h.each(function(v){var c=h.getItemModel(v),d=c.getShallow("symbol"),p=c.getShallow("symbolSize"),g=c.getShallow("symbolRotate"),y=c.getShallow("symbolOffset"),m=c.getShallow("symbolKeepAspect");if(Q(d)||Q(p)||Q(g)||Q(y)){var _=a.getRawValue(v),S=a.getDataParams(v);Q(d)&&(d=d(_,S)),Q(p)&&(p=p(_,S)),Q(g)&&(g=g(_,S)),Q(y)&&(y=y(_,S))}var x=c.getModel("itemStyle").getItemStyle(),b=c.get("z2"),w=ef(l,"color");x.fill||(x.fill=w),h.setItemVisual(v,{z2:et(b,0),symbol:d,symbolSize:p,symbolRotate:g,symbolOffset:y,symbolKeepAspect:m,style:x})}),f.updateData(h),this.group.add(f.group),h.eachItemGraphicEl(function(v){v.traverse(function(c){vt(c).dataModel=a})}),this.markKeep(f),f.group.silent=a.get("silent")||e.get("silent")},t.type="markPoint",t})(iT);function YV(r,t,e){var a;r?a=U(r&&r.dimensions,function(s){var l=t.getData().getDimensionInfo(t.getData().mapDimension(s))||{};return F(F({},l),{name:s,ordinalMeta:null})}):a=[{name:"value",type:"float"}];var n=new Yr(a,e),i=U(e.get("data"),it(zv,t));r&&(i=kt(i,it(Vv,r)));var o=nT(!!r,a);return n.initData(i,null,o),n}function ZV(r){r.registerComponentModel(VV),r.registerComponentView(UV),r.registerPreprocessor(function(t){rT(t.series,"markPoint")&&(t.markPoint=t.markPoint||{})})}var XV=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.createMarkerModelFromSeries=function(e,a,n){return new t(e,a,n)},t.type="markLine",t.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"},t})(Pa),xl=wt(),$V=function(r,t,e,a){var n=r.getData(),i;if(H(a))i=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=t.getAxis(a.yAxis!=null?"y":"x"),l=Zr(a.yAxis,a.xAxis);else{var u=aT(a,n,t,r);s=u.valueAxis;var f=Zx(n,u.valueDataDim);l=Au(n,f,o)}var h=s.dim==="x"?0:1,v=1-h,c=J(a),d={coord:[]};c.type=null,c.coord=[],c.coord[v]=-1/0,d.coord[v]=1/0;var p=e.get("precision");p>=0&&bt(l)&&(l=+l.toFixed(Math.min(p,20))),c.coord[h]=d.coord[h]=l,i=[c,d,{type:o,valueIndex:a.valueIndex,value:l}]}else i=[]}var g=[zv(r,i[0]),zv(r,i[1]),F({},i[2])];return g[2].type=g[2].type||null,ft(g[2],g[0]),ft(g[2],g[1]),g};function Du(r){return!isNaN(r)&&!isFinite(r)}function w_(r,t,e,a){var n=1-r,i=a.dimensions[r];return Du(t[n])&&Du(e[n])&&t[r]===e[r]&&a.getAxis(i).containData(t[r])}function KV(r,t){if(r.type==="cartesian2d"){var e=t[0].coord,a=t[1].coord;if(e&&a&&(w_(1,e,a,r)||w_(0,e,a,r)))return!0}return Vv(r,t[0])&&Vv(r,t[1])}function Qh(r,t,e,a,n){var i=a.coordinateSystem,o=r.getItemModel(t),s,l=K(o.get("x"),n.getWidth()),u=K(o.get("y"),n.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(a.getMarkerPosition)s=a.getMarkerPosition(r.getValues(r.dimensions,t));else{var f=i.dimensions,h=r.get(f[0],t),v=r.get(f[1],t);s=i.dataToPoint([h,v])}if(Ci(i,"cartesian2d")){var c=i.getAxis("x"),d=i.getAxis("y"),f=i.dimensions;Du(r.get(f[0],t))?s[0]=c.toGlobalCoord(c.getExtent()[e?0:1]):Du(r.get(f[1],t))&&(s[1]=d.toGlobalCoord(d.getExtent()[e?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}r.setItemLayout(t,s)}var qV=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.updateTransform=function(e,a,n){a.eachSeries(function(i){var o=Pa.getMarkerModelFromSeries(i,"markLine");if(o){var s=o.getData(),l=xl(o).from,u=xl(o).to;l.each(function(f){Qh(l,f,!0,i,n),Qh(u,f,!1,i,n)}),s.each(function(f){s.setItemLayout(f,[l.getItemLayout(f),u.getItemLayout(f)])}),this.markerGroupMap.get(i.id).updateLayout()}},this)},t.prototype.renderSeries=function(e,a,n,i){var o=e.coordinateSystem,s=e.id,l=e.getData(),u=this.markerGroupMap,f=u.get(s)||u.set(s,new $O);this.group.add(f.group);var h=QV(o,e,a),v=h.from,c=h.to,d=h.line;xl(a).from=v,xl(a).to=c,a.setData(d);var p=a.get("symbol"),g=a.get("symbolSize"),y=a.get("symbolRotate"),m=a.get("symbolOffset");H(p)||(p=[p,p]),H(g)||(g=[g,g]),H(y)||(y=[y,y]),H(m)||(m=[m,m]),h.from.each(function(S){_(v,S,!0),_(c,S,!1)}),d.each(function(S){var x=d.getItemModel(S),b=x.getModel("lineStyle").getLineStyle();d.setItemLayout(S,[v.getItemLayout(S),c.getItemLayout(S)]);var w=x.get("z2");b.stroke==null&&(b.stroke=v.getItemVisual(S,"style").fill),d.setItemVisual(S,{z2:et(w,0),fromSymbolKeepAspect:v.getItemVisual(S,"symbolKeepAspect"),fromSymbolOffset:v.getItemVisual(S,"symbolOffset"),fromSymbolRotate:v.getItemVisual(S,"symbolRotate"),fromSymbolSize:v.getItemVisual(S,"symbolSize"),fromSymbol:v.getItemVisual(S,"symbol"),toSymbolKeepAspect:c.getItemVisual(S,"symbolKeepAspect"),toSymbolOffset:c.getItemVisual(S,"symbolOffset"),toSymbolRotate:c.getItemVisual(S,"symbolRotate"),toSymbolSize:c.getItemVisual(S,"symbolSize"),toSymbol:c.getItemVisual(S,"symbol"),style:b})}),f.updateData(d),h.line.eachItemGraphicEl(function(S){vt(S).dataModel=a,S.traverse(function(x){vt(x).dataModel=a})});function _(S,x,b){var w=S.getItemModel(x);Qh(S,x,b,e,i);var T=w.getModel("itemStyle").getItemStyle();T.fill==null&&(T.fill=ef(l,"color")),S.setItemVisual(x,{symbolKeepAspect:w.get("symbolKeepAspect"),symbolOffset:et(w.get("symbolOffset",!0),m[b?0:1]),symbolRotate:et(w.get("symbolRotate",!0),y[b?0:1]),symbolSize:et(w.get("symbolSize"),g[b?0:1]),symbol:et(w.get("symbol",!0),p[b?0:1]),style:T})}this.markKeep(f),f.group.silent=a.get("silent")||e.get("silent")},t.type="markLine",t})(iT);function QV(r,t,e){var a;r?a=U(r&&r.dimensions,function(u){var f=t.getData().getDimensionInfo(t.getData().mapDimension(u))||{};return F(F({},f),{name:u,ordinalMeta:null})}):a=[{name:"value",type:"float"}];var n=new Yr(a,e),i=new Yr(a,e),o=new Yr([],e),s=U(e.get("data"),it($V,t,r,e));r&&(s=kt(s,it(KV,r)));var l=nT(!!r,a);return n.initData(U(s,function(u){return u[0]}),null,l),i.initData(U(s,function(u){return u[1]}),null,l),o.initData(U(s,function(u){return u[2]})),o.hasItemOption=!0,{from:n,to:i,line:o}}function jV(r){r.registerComponentModel(XV),r.registerComponentView(qV),r.registerPreprocessor(function(t){rT(t.series,"markLine")&&(t.markLine=t.markLine||{})})}var JV=function(r,t){if(t==="all")return{type:"all",title:r.getLocaleModel().get(["legend","selector","all"])};if(t==="inverse")return{type:"inverse",title:r.getLocaleModel().get(["legend","selector","inverse"])}},Fv=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.layoutMode={type:"box",ignoreSize:!0},e}return t.prototype.init=function(e,a,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(e,a){r.prototype.mergeOption.call(this,e,a),this._updateSelector(e)},t.prototype._updateSelector=function(e){var a=e.selector,n=this.ecModel;a===!0&&(a=e.selector=["all","inverse"]),H(a)&&M(a,function(i,o){X(i)&&(i={type:i}),a[o]=ft(i,JV(n,i.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&this.get("selectedMode")==="single"){for(var a=!1,n=0;n<e.length;n++){var i=e[n].get("name");if(this.isSelected(i)){this.select(i),a=!0;break}}!a&&this.select(e[0].get("name"))}},t.prototype._updateData=function(e){var a=[],n=[];e.eachRawSeries(function(l){var u=l.name;n.push(u);var f;if(l.legendVisualProvider){var h=l.legendVisualProvider,v=h.getAllNames();e.isSeriesFiltered(l)||(n=n.concat(v)),v.length?a=a.concat(v):f=!0}else f=!0;f&&ad(l)&&a.push(l.name)}),this._availableNames=n;var i=this.get("data")||a,o=nt(),s=U(i,function(l){return(X(l)||bt(l))&&(l={name:l}),o.get(l.name)?null:(o.set(l.name,!0),new Dt(l,this,this.ecModel))},this);this._data=kt(s,function(l){return!!l})},t.prototype.getData=function(){return this._data},t.prototype.select=function(e){var a=this.option.selected,n=this.get("selectedMode");if(n==="single"){var i=this._data;M(i,function(o){a[o.get("name")]=!1})}a[e]=!0},t.prototype.unSelect=function(e){this.get("selectedMode")!=="single"&&(this.option.selected[e]=!1)},t.prototype.toggleSelected=function(e){var a=this.option.selected;a.hasOwnProperty(e)||(a[e]=!0),this[a[e]?"unSelect":"select"](e)},t.prototype.allSelect=function(){var e=this._data,a=this.option.selected;M(e,function(n){a[n.get("name",!0)]=!0})},t.prototype.inverseSelect=function(){var e=this._data,a=this.option.selected;M(e,function(n){var i=n.get("name",!0);a.hasOwnProperty(i)||(a[i]=!0),a[i]=!a[i]})},t.prototype.isSelected=function(e){var a=this.option.selected;return!(a.hasOwnProperty(e)&&!a[e])&&dt(this._availableNames,e)>=0},t.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},t.type="legend.plain",t.dependencies=["series"],t.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",bottom:N.size.m,align:"auto",backgroundColor:N.color.transparent,borderColor:N.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:N.color.disabled,inactiveBorderColor:N.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:N.color.disabled,inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:N.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:N.color.tertiary,borderWidth:1,borderColor:N.color.border},emphasis:{selectorLabel:{show:!0,color:N.color.quaternary}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t})(mt),ei=it,Gv=M,wl=yt,oT=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.newlineDisabled=!1,e}return t.prototype.init=function(){this.group.add(this._contentGroup=new wl),this.group.add(this._selectorGroup=new wl),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,a,n){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!e.get("show",!0)){var o=e.get("align"),s=e.get("orient");(!o||o==="auto")&&(o=e.get("left")==="right"&&s==="vertical"?"right":"left");var l=e.get("selector",!0),u=e.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,e,a,n,l,s,u);var f=Le(e,n).refContainer,h=e.getBoxLayoutParams(),v=e.get("padding"),c=ne(h,f,v),d=this.layoutInner(e,o,c,i,l,u),p=ne(gt({width:d.width,height:d.height},h),f,v);this.group.x=p.x-d.x,this.group.y=p.y-d.y,this.group.markRedraw(),this.group.add(this._backgroundEl=$w(d,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,a,n,i,o,s,l){var u=this.getContentGroup(),f=nt(),h=a.get("selectedMode"),v=a.get("triggerEvent"),c=[];n.eachRawSeries(function(d){!d.get("legendHoverLink")&&c.push(d.id)}),Gv(a.getData(),function(d,p){var g=this,y=d.get("name");if(!this.newlineDisabled&&(y===""||y===`
|
|
55
|
+
`)){var m=new wl;m.newline=!0,u.add(m);return}var _=n.getSeriesByName(y)[0];if(!f.get(y))if(_){var S=_.getData(),x=S.getVisual("legendLineStyle")||{},b=S.getVisual("legendIcon"),w=S.getVisual("style"),T=this._createItem(_,y,p,d,a,e,x,w,b,h,i);T.on("click",ei(T_,y,null,i,c)).on("mouseover",ei(Hv,_.name,null,i,c)).on("mouseout",ei(Wv,_.name,null,i,c)),n.ssr&&T.eachChild(function(D){var A=vt(D);A.seriesIndex=_.seriesIndex,A.dataIndex=p,A.ssrType="legend"}),v&&T.eachChild(function(D){g.packEventData(D,a,_,p,y)}),f.set(y,!0)}else n.eachRawSeries(function(D){var A=this;if(!f.get(y)&&D.legendVisualProvider){var C=D.legendVisualProvider;if(!C.containName(y))return;var I=C.indexOfName(y),L=C.getItemVisual(I,"style"),P=C.getItemVisual(I,"legendIcon"),R=Ge(L.fill);R&&R[3]===0&&(R[3]=.2,L=F(F({},L),{fill:Wr(R,"rgba")}));var E=this._createItem(D,y,p,d,a,e,{},L,P,h,i);E.on("click",ei(T_,null,y,i,c)).on("mouseover",ei(Hv,null,y,i,c)).on("mouseout",ei(Wv,null,y,i,c)),n.ssr&&E.eachChild(function(O){var k=vt(O);k.seriesIndex=D.seriesIndex,k.dataIndex=p,k.ssrType="legend"}),v&&E.eachChild(function(O){A.packEventData(O,a,D,p,y)}),f.set(y,!0)}},this)},this),o&&this._createSelector(o,a,i,s,l)},t.prototype.packEventData=function(e,a,n,i,o){var s={componentType:"legend",componentIndex:a.componentIndex,dataIndex:i,value:o,seriesIndex:n.seriesIndex};vt(e).eventData=s},t.prototype._createSelector=function(e,a,n,i,o){var s=this.getSelectorGroup();Gv(e,function(u){var f=u.type,h=new Tt({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:f==="all"?"legendAllSelect":"legendInverseSelect",legendId:a.id})}});s.add(h);var v=a.getModel("selectorLabel"),c=a.getModel(["emphasis","selectorLabel"]);Ue(h,{normal:v,emphasis:c},{defaultText:u.title}),Jl(h)})},t.prototype._createItem=function(e,a,n,i,o,s,l,u,f,h,v){var c=e.visualDrawType,d=o.get("itemWidth"),p=o.get("itemHeight"),g=o.isSelected(a),y=i.get("symbolRotate"),m=i.get("symbolKeepAspect"),_=i.get("icon");f=_||f||"roundRect";var S=t5(f,i,l,u,c,g,v),x=new wl,b=i.getModel("textStyle");if(Q(e.getLegendIcon)&&(!_||_==="inherit"))x.add(e.getLegendIcon({itemWidth:d,itemHeight:p,icon:f,iconRotate:y,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:m}));else{var w=_==="inherit"&&e.getData().getVisual("symbol")?y==="inherit"?e.getData().getVisual("symbolRotate"):y:0;x.add(e5({itemWidth:d,itemHeight:p,icon:f,iconRotate:w,itemStyle:S.itemStyle,symbolKeepAspect:m}))}var T=s==="left"?d+5:-5,D=s,A=o.get("formatter"),C=a;X(A)&&A?C=A.replace("{name}",a??""):Q(A)&&(C=A(a));var I=g?b.getTextColor():i.get("inactiveColor");x.add(new Tt({style:Ht(b,{text:C,x:T,y:p/2,fill:I,align:D,verticalAlign:"middle"},{inheritColor:I})}));var L=new _t({shape:x.getBoundingRect(),style:{fill:"transparent"}}),P=i.getModel("tooltip");return P.get("show")&&ds({el:L,componentModel:o,itemName:a,itemTooltipOption:P.option}),x.add(L),x.eachChild(function(R){R.silent=!0}),L.silent=!h,this.getContentGroup().add(x),Jl(x),x.__legendDataIndex=n,x},t.prototype.layoutInner=function(e,a,n,i,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();wn(e.get("orient"),l,e.get("itemGap"),n.width,n.height);var f=l.getBoundingRect(),h=[-f.x,-f.y];if(u.markRedraw(),l.markRedraw(),o){wn("horizontal",u,e.get("selectorItemGap",!0));var v=u.getBoundingRect(),c=[-v.x,-v.y],d=e.get("selectorButtonGap",!0),p=e.getOrient().index,g=p===0?"width":"height",y=p===0?"height":"width",m=p===0?"y":"x";s==="end"?c[p]+=f[g]+d:h[p]+=v[g]+d,c[1-p]+=f[y]/2-v[y]/2,u.x=c[0],u.y=c[1],l.x=h[0],l.y=h[1];var _={x:0,y:0};return _[g]=f[g]+d+v[g],_[y]=Math.max(f[y],v[y]),_[m]=Math.min(0,v[m]+c[1-p]),_}else return l.x=h[0],l.y=h[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t})($t);function t5(r,t,e,a,n,i,o){function s(g,y){g.lineWidth==="auto"&&(g.lineWidth=y.lineWidth>0?2:0),Gv(g,function(m,_){g[_]==="inherit"&&(g[_]=y[_])})}var l=t.getModel("itemStyle"),u=l.getItemStyle(),f=r.lastIndexOf("empty",0)===0?"fill":"stroke",h=l.getShallow("decal");u.decal=!h||h==="inherit"?a.decal:hu(h,o),u.fill==="inherit"&&(u.fill=a[n]),u.stroke==="inherit"&&(u.stroke=a[f]),u.opacity==="inherit"&&(u.opacity=(n==="fill"?a:e).opacity),s(u,a);var v=t.getModel("lineStyle"),c=v.getLineStyle();if(s(c,e),u.fill==="auto"&&(u.fill=a.fill),u.stroke==="auto"&&(u.stroke=a.fill),c.stroke==="auto"&&(c.stroke=a.fill),!i){var d=t.get("inactiveBorderWidth"),p=u[f];u.lineWidth=d==="auto"?a.lineWidth>0&&p?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),c.stroke=v.get("inactiveColor"),c.lineWidth=v.get("inactiveWidth")}return{itemStyle:u,lineStyle:c}}function e5(r){var t=r.icon||"roundRect",e=le(t,0,0,r.itemWidth,r.itemHeight,r.itemStyle.fill,r.symbolKeepAspect);return e.setStyle(r.itemStyle),e.rotation=(r.iconRotate||0)*Math.PI/180,e.setOrigin([r.itemWidth/2,r.itemHeight/2]),t.indexOf("empty")>-1&&(e.style.stroke=e.style.fill,e.style.fill=N.color.neutral00,e.style.lineWidth=2),e}function T_(r,t,e,a){Wv(r,t,e,a),e.dispatchAction({type:"legendToggleSelect",name:r??t}),Hv(r,t,e,a)}function sT(r){for(var t=r.getZr().storage.getDisplayList(),e,a=0,n=t.length;a<n&&!(e=t[a].states.emphasis);)a++;return e&&e.hoverLayer}function Hv(r,t,e,a){sT(e)||e.dispatchAction({type:"highlight",seriesName:r,name:t,excludeSeriesId:a})}function Wv(r,t,e,a){sT(e)||e.dispatchAction({type:"downplay",seriesName:r,name:t,excludeSeriesId:a})}function r5(r){var t=r.findComponents({mainType:"legend"});t&&t.length&&r.filterSeries(function(e){for(var a=0;a<t.length;a++)if(!t[a].isSelected(e.name))return!1;return!0})}function uo(r,t,e){var a=r==="allSelect"||r==="inverseSelect",n={},i=[];e.eachComponent({mainType:"legend",query:t},function(s){a?s[r]():s[r](t.name),C_(s,n),i.push(s.componentIndex)});var o={};return e.eachComponent("legend",function(s){M(n,function(l,u){s[l?"select":"unSelect"](u)}),C_(s,o)}),a?{selected:o,legendIndex:i}:{name:t.name,selected:o}}function C_(r,t){var e=t||{};return M(r.getData(),function(a){var n=a.get("name");if(!(n===`
|
|
56
|
+
`||n==="")){var i=r.isSelected(n);rr(e,n)?e[n]=e[n]&&i:e[n]=i}}),e}function a5(r){r.registerAction("legendToggleSelect","legendselectchanged",it(uo,"toggleSelected")),r.registerAction("legendAllSelect","legendselectall",it(uo,"allSelect")),r.registerAction("legendInverseSelect","legendinverseselect",it(uo,"inverseSelect")),r.registerAction("legendSelect","legendselected",it(uo,"select")),r.registerAction("legendUnSelect","legendunselected",it(uo,"unSelect"))}function lT(r){r.registerComponentModel(Fv),r.registerComponentView(oT),r.registerProcessor(r.PRIORITY.PROCESSOR.SERIES_FILTER,r5),r.registerSubTypeDefaulter("legend",function(){return"plain"}),a5(r)}var n5=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.setScrollDataIndex=function(e){this.option.scrollDataIndex=e},t.prototype.init=function(e,a,n){var i=Bi(e);r.prototype.init.call(this,e,a,n),M_(this,e,i)},t.prototype.mergeOption=function(e,a){r.prototype.mergeOption.call(this,e,a),M_(this,this.option,e)},t.type="legend.scroll",t.defaultOption=Oi(Fv.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:N.color.accent50,pageIconInactiveColor:N.color.accent10,pageIconSize:15,pageTextStyle:{color:N.color.tertiary},animationDurationUpdate:800}),t})(Fv);function M_(r,t,e){var a=r.getOrient(),n=[1,1];n[a.index]=0,Ma(t,e,{type:"box",ignoreSize:!!n})}var A_=yt,jh=["width","height"],Jh=["x","y"],i5=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.newlineDisabled=!0,e._currentIndex=0,e}return t.prototype.init=function(){r.prototype.init.call(this),this.group.add(this._containerGroup=new A_),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new A_)},t.prototype.resetInner=function(){r.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(e,a,n,i,o,s,l){var u=this;r.prototype.renderInner.call(this,e,a,n,i,o,s,l);var f=this._controllerGroup,h=a.get("pageIconSize",!0),v=H(h)?h:[h,h];d("pagePrev",0);var c=a.getModel("pageTextStyle");f.add(new Tt({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=qu(a.get("pageIcons",!0)[a.getOrient().name][g],{onclick:Y(u._pageGo,u,y,a,i)},{x:-v[0]/2,y:-v[1]/2,width:v[0],height:v[1]});m.name=p,f.add(m)}},t.prototype.layoutInner=function(e,a,n,i,o,s){var l=this.getSelectorGroup(),u=e.getOrient().index,f=jh[u],h=Jh[u],v=jh[1-u],c=Jh[1-u];o&&wn("horizontal",l,e.get("selectorItemGap",!0));var d=e.get("selectorButtonGap",!0),p=l.getBoundingRect(),g=[-p.x,-p.y],y=J(n);o&&(y[f]=n[f]-p[f]-d);var m=this._layoutContentAndController(e,i,y,u,f,v,c,h);if(o){if(s==="end")g[u]+=m[f]+d;else{var _=p[f]+d;g[u]-=_,m[h]-=_}m[f]+=p[f]+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},t.prototype._layoutContentAndController=function(e,a,n,i,o,s,l,u){var f=this.getContentGroup(),h=this._containerGroup,v=this._controllerGroup;wn(e.get("orient"),f,e.get("itemGap"),i?n.width:null,i?null:n.height),wn("horizontal",v,e.get("pageButtonItemGap",!0));var c=f.getBoundingRect(),d=v.getBoundingRect(),p=this._showController=c[o]>n[o],g=[-c.x,-c.y];a||(g[i]=f[u]);var y=[0,0],m=[-d.x,-d.y],_=et(e.get("pageButtonGap",!0),e.get("itemGap",!0));if(p){var S=e.get("pageButtonPosition",!0);S==="end"?m[i]+=n[o]-d[o]:y[i]+=d[o]+_}m[1-i]+=c[s]/2-d[s]/2,f.setPosition(g),h.setPosition(y),v.setPosition(m);var x={x:0,y:0};if(x[o]=p?n[o]:c[o],x[s]=Math.max(c[s],d[s]),x[l]=Math.min(0,d[l]+m[1-i]),h.__rectSize=n[o],p){var b={x:0,y:0};b[o]=Math.max(n[o]-d[o]-_,0),b[s]=x[s],h.setClipPath(new _t({shape:b})),h.__rectSize=b[o]}else v.eachChild(function(T){T.attr({invisible:!0,silent:!0})});var w=this._getPageInfo(e);return w.pageIndex!=null&&Et(f,{x:w.contentPosition[0],y:w.contentPosition[1]},p?e:null),this._updatePageInfoView(e,w),x},t.prototype._pageGo=function(e,a,n){var i=this._getPageInfo(a)[e];i!=null&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:a.id})},t.prototype._updatePageInfoView=function(e,a){var n=this._controllerGroup;M(["pagePrev","pageNext"],function(f){var h=f+"DataIndex",v=a[h]!=null,c=n.childOfName(f);c&&(c.setStyle("fill",v?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),c.cursor=v?"pointer":"default")});var i=n.childOfName("pageText"),o=e.get("pageFormatter"),s=a.pageIndex,l=s!=null?s+1:0,u=a.pageCount;i&&o&&i.setStyle("text",X(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},t.prototype._getPageInfo=function(e){var a=e.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,o=e.getOrient().index,s=jh[o],l=Jh[o],u=this._findTargetItemIndex(a),f=n.children(),h=f[u],v=f.length,c=v?1:0,d={contentPosition:[n.x,n.y],pageCount:c,pageIndex:c-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!h)return d;var p=S(h);d.contentPosition[o]=-p.s;for(var g=u+1,y=p,m=p,_=null;g<=v;++g)_=S(f[g]),(!_&&m.e>y.s+i||_&&!x(_,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)_=S(f[g]),(!_||!x(m,_.s))&&y.i<m.i&&(m=y,d.pagePrevDataIndex==null&&(d.pagePrevDataIndex=y.i),++d.pageCount,++d.pageIndex),y=_;return d;function S(b){if(b){var w=b.getBoundingRect(),T=w[l]+b[l];return{s:T,e:T+w[s],i:b.__legendDataIndex}}}function x(b,w){return b.e>=w&&b.s<=w+i}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var a,n=this.getContentGroup(),i;return n.eachChild(function(o,s){var l=o.__legendDataIndex;i==null&&l!=null&&(i=s),l===e&&(a=s)}),a??i},t.type="legend.scroll",t})(oT);function o5(r){r.registerAction("legendScroll","legendscroll",function(t,e){var a=t.scrollDataIndex;a!=null&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(n){n.setScrollDataIndex(a)})})}function s5(r){ue(lT),r.registerComponentModel(n5),r.registerComponentView(i5),o5(r)}function l5(r){ue(lT),ue(s5)}var u5=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.inside",t.defaultOption=Oi(is.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t})(is),Ip=wt();function f5(r,t,e){Ip(r).coordSysRecordMap.each(function(a){var n=a.dataZoomInfoMap.get(t.uid);n&&(n.getRange=e)})}function h5(r,t){for(var e=Ip(r).coordSysRecordMap,a=e.keys(),n=0;n<a.length;n++){var i=a[n],o=e.get(i),s=o.dataZoomInfoMap;if(s){var l=t.uid,u=s.get(l);u&&(s.removeKey(l),s.keys().length||uT(e,o))}}}function uT(r,t){if(t){r.removeKey(t.model.uid);var e=t.controller;e&&e.dispose()}}function c5(r,t){var e={model:t,containsPoint:it(d5,t),dispatchAction:it(v5,r),dataZoomInfoMap:null,controller:null},a=e.controller=new vp(r.getZr());return M(["pan","zoom","scrollMove"],function(n){a.on(n,function(i){var o=[];e.dataZoomInfoMap.each(function(s){if(i.isAvailableBehavior(s.model.option)){var l=(s.getRange||{})[n],u=l&&l(s.dzReferCoordSysInfo,e.model.mainType,e.controller,i);!s.model.get("disabled",!0)&&u&&o.push({dataZoomId:s.model.id,start:u[0],end:u[1]})}}),o.length&&e.dispatchAction(o)})}),e}function v5(r,t){r.isDisposed()||r.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:t})}function d5(r,t,e,a){return r.coordinateSystem.containPoint([e,a])}function p5(r,t,e){var a,n="type_",i={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;i[n+u]>i[n+a]&&(a=u),o=o&&l.get("preventDefaultMouseMove",!0)}),{controlType:a,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o,api:e,zInfo:{component:t.model},triggerInfo:{roamTrigger:null,isInSelf:t.containsPoint}}}}function g5(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(t,e){var a=Ip(e),n=a.coordSysRecordMap||(a.coordSysRecordMap=nt());n.each(function(i){i.dataZoomInfoMap=null}),t.eachComponent({mainType:"dataZoom",subType:"inside"},function(i){var o=Yw(i);M(o.infoList,function(s){var l=s.model.uid,u=n.get(l)||n.set(l,c5(e,s.model)),f=u.dataZoomInfoMap||(u.dataZoomInfoMap=nt());f.set(i.uid,{dzReferCoordSysInfo:s,model:i,getRange:null})})}),n.each(function(i){var o=i.controller,s,l=i.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){uT(n,i);return}var f=p5(l,i,e);o.enable(f.controlType,f.opt),_s(i,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var y5=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="dataZoom.inside",e}return t.prototype.render=function(e,a,n){if(r.prototype.render.apply(this,arguments),e.noTarget()){this._clear();return}this.range=e.getPercentRange(),f5(n,e,{pan:Y(tc.pan,this),zoom:Y(tc.zoom,this),scrollMove:Y(tc.scrollMove,this)})},t.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){h5(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t})(Cp),tc={zoom:function(r,t,e,a){var n=this.range,i=n.slice(),o=r.axisModels[0];if(o){var s=ec[t](null,[a.originX,a.originY],o,e,r),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(i[1]-i[0])+i[0],u=Math.max(1/a.scale,0);i[0]=(i[0]-l)*u+l,i[1]=(i[1]-l)*u+l;var f=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(La(0,i,[0,100],0,f.minSpan,f.maxSpan),this.range=i,n[0]!==i[0]||n[1]!==i[1])return i}},pan:D_(function(r,t,e,a,n,i){var o=ec[a]([i.oldX,i.oldY],[i.newX,i.newY],t,n,e);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:D_(function(r,t,e,a,n,i){var o=ec[a]([0,0],[i.scrollDelta,i.scrollDelta],t,n,e);return o.signal*(r[1]-r[0])*i.scrollDelta})};function D_(r){return function(t,e,a,n){var i=this.range,o=i.slice(),s=t.axisModels[0];if(s){var l=r(o,s,t,e,a,n);if(La(l,o,[0,100],"all"),this.range=o,i[0]!==o[0]||i[1]!==o[1])return o}}}var ec={grid:function(r,t,e,a,n){var i=e.axis,o={},s=n.model.coordinateSystem.getRect();return r=r||[0,0],i.dim==="x"?(o.pixel=t[0]-r[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=i.inverse?1:-1):(o.pixel=t[1]-r[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=i.inverse?-1:1),o},polar:function(r,t,e,a,n){var i=e.axis,o={},s=n.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return r=r?s.pointToCoord(r):[0,0],t=s.pointToCoord(t),e.mainType==="radiusAxis"?(o.pixel=t[0]-r[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=i.inverse?1:-1):(o.pixel=t[1]-r[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=i.inverse?-1:1),o},singleAxis:function(r,t,e,a,n){var i=e.axis,o=n.model.coordinateSystem.getRect(),s={};return r=r||[0,0],i.orient==="horizontal"?(s.pixel=t[0]-r[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=i.inverse?1:-1):(s.pixel=t[1]-r[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=i.inverse?-1:1),s}};function m5(r){Mp(r),r.registerComponentModel(u5),r.registerComponentView(y5),g5(r)}var _5=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=Oi(is.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:N.color.accent10,borderRadius:0,backgroundColor:N.color.transparent,dataBackground:{lineStyle:{color:N.color.accent30,width:.5},areaStyle:{color:N.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:N.color.accent40,width:.5},areaStyle:{color:N.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:N.color.neutral00,borderColor:N.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:N.color.accent40,opacity:.5},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:N.color.tertiary},brushSelect:!0,brushStyle:{color:N.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:N.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),t})(is),fo=_t,S5=1,rc=30,b5=7,ho="horizontal",L_="vertical",x5=5,w5=["line","bar","candlestick","scatter"],T5={easing:"cubicOut",duration:100,delay:0},C5=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._displayables={},e}return t.prototype.init=function(e,a){this.api=a,this._onBrush=Y(this._onBrush,this),this._onBrushEnd=Y(this._onBrushEnd,this)},t.prototype.render=function(e,a,n,i){if(r.prototype.render.apply(this,arguments),_s(this,"_dispatchZoomAction",e.get("throttle"),"fixRate"),this._orient=e.getOrient(),e.get("show")===!1){this.group.removeAll();return}if(e.noTarget()){this._clear(),this.group.removeAll();return}(!i||i.type!=="dataZoom"||i.from!==this.uid)&&this._buildView(),this._updateView()},t.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){$o(this,"_dispatchZoomAction");var e=this.api.getZr();e.off("mousemove",this._onBrush),e.off("mouseup",this._onBrushEnd)},t.prototype._buildView=function(){var e=this.group;e.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var a=this._displayables.sliderGroup=new yt;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(a),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,a=this.api,n=e.get("brushSelect"),i=n?b5:0,o=Le(e,a).refContainer,s=this._findCoordRect(),l=e.get("defaultLocationEdgeGap",!0)||0,u=this._orient===ho?{right:o.width-s.x-s.width,top:o.height-rc-l-i,width:s.width,height:rc}:{right:l,top:s.y,width:rc,height:s.height},f=Bi(e.option);M(["right","top","width","height"],function(v){f[v]==="ph"&&(f[v]=u[v])});var h=ne(f,o);this._location={x:h.x,y:h.y},this._size=[h.width,h.height],this._orient===L_&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,a=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),o=i&&i.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(n===ho&&!o?{scaleY:l?1:-1,scaleX:1}:n===ho&&o?{scaleY:l?1:-1,scaleX:-1}:n===L_&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=e.getBoundingRect([s]);e.x=a.x-u.x,e.y=a.y-u.y,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,a=this._size,n=this._displayables.sliderGroup,i=e.get("brushSelect");n.add(new fo({silent:!0,shape:{x:0,y:0,width:a[0],height:a[1]},style:{fill:e.get("backgroundColor")},z2:-40}));var o=new fo({shape:{x:0,y:0,width:a[0],height:a[1]},style:{fill:"transparent"},z2:0,onclick:Y(this._onClickPanel,this)}),s=this.api.getZr();i?(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)),n.add(o)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!e)return;var a=this._size,n=this._shadowSize||[],i=e.series,o=i.getRawData(),s=i.getShadowDim&&i.getShadowDim(),l=s&&o.getDimensionInfo(s)?i.getShadowDim():e.otherDim;if(l==null)return;var u=this._shadowPolygonPts,f=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||a[0]!==n[0]||a[1]!==n[1]){var h=o.getDataExtent(e.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]/(h[1]-h[0]),S=e.thisAxis.type==="time",x=-m,b=Math.round(o.count()/a[0]),w;o.each([e.thisDim,l],function(I,L,P){if(b>0&&P%b){S||(x+=m);return}x=S?(+I-h[0])*_:x+m;var R=L==null||isNaN(L)||L==="",E=R?0:St(L,v,d,!0);R&&!w&&P?(g.push([g[g.length-1][0],0]),y.push([y[y.length-1][0],0])):!R&&w&&(g.push([x,0]),y.push([x,0])),R||(g.push([x,E]),y.push([x,E])),w=R}),u=this._shadowPolygonPts=g,f=this._shadowPolylinePts=y}this._shadowData=o,this._shadowDim=l,this._shadowSize=[a[0],a[1]];var T=this.dataZoomModel;function D(I){var L=T.getModel(I?"selectedDataBackground":"dataBackground"),P=new yt,R=new Dr({shape:{points:u},segmentIgnoreThreshold:1,style:L.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),E=new ur({shape:{points:f},segmentIgnoreThreshold:1,style:L.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return P.add(R),P.add(E),P}for(var A=0;A<3;A++){var C=D(A===1);this._displayables.sliderGroup.add(C),this._displayables.dataShadowSegs.push(C)}},t.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,a=e.get("showDataShadow");if(a!==!1){var n,i=this.ecModel;return e.eachTargetAxis(function(o,s){var l=e.getAxisProxy(o,s).getTargetSeriesModels();M(l,function(u){if(!n&&!(a!==!0&&dt(w5,u.get("type"))<0)){var f=i.getComponent(ga(o),s).axis,h=M5(o),v,c=u.coordinateSystem;h!=null&&c.getOtherAxis&&(v=c.getOtherAxis(f).inverse),h=u.getData().mapDimension(h);var d=u.getData().mapDimension(o);n={thisAxis:f,series:u,thisDim:d,otherDim:h,otherAxisInverse:v}}},this)},this),n}},t.prototype._renderHandle=function(){var e=this.group,a=this._displayables,n=a.handles=[null,null],i=a.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,f=l.get("borderRadius")||0,h=l.get("brushSelect"),v=a.filler=new fo({silent:h,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(v),o.add(new fo({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:f},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:S5,fill:N.color.transparent}})),M([0,1],function(_){var S=l.get("handleIcon");!lu[S]&&S.indexOf("path://")<0&&S.indexOf("image://")<0&&(S="path://"+S);var x=le(S,-1,0,2,2,null,!0);x.attr({cursor:A5(this._orient),draggable:!0,drift:Y(this._onDragMove,this,_),ondragend:Y(this._onDragEnd,this),onmouseover:Y(this._showDataInfo,this,!0),onmouseout:Y(this._showDataInfo,this,!1),z2:5});var b=x.getBoundingRect(),w=l.get("handleSize");this._handleHeight=K(w,this._size[1]),this._handleWidth=b.width/b.height*this._handleHeight,x.setStyle(l.getModel("handleStyle").getItemStyle()),x.style.strokeNoScale=!0,x.rectHover=!0,x.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),Jl(x);var T=l.get("handleColor");T!=null&&(x.style.fill=T),o.add(n[_]=x);var D=l.getModel("textStyle"),A=l.get("handleLabel")||{},C=A.show||!1;e.add(i[_]=new Tt({silent:!0,invisible:!C,style:Ht(D,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:D.getTextColor(),font:D.getFont()}),z2:10}))},this);var c=v;if(h){var d=K(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=le(l.get("moveHandleIcon"),-g/2,-g/2,g,g,N.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:Y(this._onDragMove,this,"all"),ondragstart:Y(this._showDataInfo,this,!0),ondragend:Y(this._onDragEnd,this),onmouseover:Y(this._showDataInfo,this,!0),onmouseout:Y(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),a=this._getViewExtent();this._handleEnds=[St(e[0],[0,100],a,!0),St(e[1],[0,100],a,!0)]},t.prototype._updateInterval=function(e,a){var n=this.dataZoomModel,i=this._handleEnds,o=this._getViewExtent(),s=n.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];La(a,i,o,n.get("zoomLock")?"all":e,s.minSpan!=null?St(s.minSpan,l,o,!0):null,s.maxSpan!=null?St(s.maxSpan,l,o,!0):null);var u=this._range,f=this._range=Vr([St(i[0],o,l,!0),St(i[1],o,l,!0)]);return!u||u[0]!==f[0]||u[1]!==f[1]},t.prototype._updateView=function(e){var a=this._displayables,n=this._handleEnds,i=Vr(n.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:n[c]+(c?-1:1),y:o[1]/2-p/2})},this),a.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:o[1]});var s={x:i[0],width:i[1]-i[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,i[0],i[1],o[0]],f=0;f<l.length;f++){var h=l[f],v=h.getClipPath();v||(v=new _t,h.setClipPath(v)),v.setShape({x:u[f],y:0,width:u[f+1]-u[f],height:o[1]})}this._updateDataInfo(e)},t.prototype._updateDataInfo=function(e){var a=this.dataZoomModel,n=this._displayables,i=n.handleLabels,o=this._orient,s=["",""];if(a.get("showDetail")){var l=a.findRepresentativeAxisProxy();if(l){var u=l.getAxisModel().axis,f=this._range,h=e?l.calculateDataWindow({start:f[0],end:f[1]}).valueWindow:l.getDataValueWindow();s=[this._formatLabel(h[0],u),this._formatLabel(h[1],u)]}}var v=Vr(this._handleEnds.slice());c.call(this,0),c.call(this,1);function c(d){var p=bn(n.handles[d].parent,this.group),g=Ku(d===0?"right":"left",p),y=this._handleWidth/2+x5,m=Ur([v[d]+(d===0?-y:y),this._size[1]/2],p);i[d].setStyle({x:m[0],y:m[1],verticalAlign:o===ho?"middle":g,align:o===ho?g:"center",text:s[d]})}},t.prototype._formatLabel=function(e,a){var n=this.dataZoomModel,i=n.get("labelFormatter"),o=n.get("labelPrecision");(o==null||o==="auto")&&(o=a.getPixelPrecision());var s=e==null||isNaN(e)?"":a.type==="category"||a.type==="time"?a.scale.getLabel({value:Math.round(e)}):e.toFixed(Math.min(o,20));return Q(i)?i(e,s):X(i)?i.replace("{value}",s):s},t.prototype._showDataInfo=function(e){var a=this.dataZoomModel.get("handleLabel")||{},n=a.show||!1,i=this.dataZoomModel.getModel(["emphasis","handleLabel"]),o=i.get("show")||!1,s=e||this._dragging?o:n,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)},t.prototype._onDragMove=function(e,a,n,i){this._dragging=!0,Xr(i.event);var o=this._displayables.sliderGroup.getLocalTransform(),s=Ur([a,n],o,!0),l=this._updateInterval(e,s[0]),u=this.dataZoomModel.get("realtime");this._updateView(!u),l&&u&&this._dispatchZoomAction(!0)},t.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1);var e=this.dataZoomModel.get("realtime");!e&&this._dispatchZoomAction(!1)},t.prototype._onClickPanel=function(e){var a=this._size,n=this._displayables.sliderGroup.transformCoordToLocal(e.offsetX,e.offsetY);if(!(n[0]<0||n[0]>a[0]||n[1]<0||n[1]>a[1])){var i=this._handleEnds,o=(i[0]+i[1])/2,s=this._updateInterval("all",n[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var a=e.offsetX,n=e.offsetY;this._brushStart=new ht(a,n),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(e){if(this._brushing){var a=this._displayables.brushRect;if(this._brushing=!1,!!a){a.attr("ignore",!0);var n=a.shape,i=+new Date;if(!(i-this._brushStartTime<200&&Math.abs(n.width)<5)){var o=this._getViewExtent(),s=[0,100],l=this._handleEnds=[n.x,n.x+n.width],u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();La(0,l,o,0,u.minSpan!=null?St(u.minSpan,s,o,!0):null,u.maxSpan!=null?St(u.maxSpan,s,o,!0):null),this._range=Vr([St(l[0],o,s,!0),St(l[1],o,s,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(Xr(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,a){var n=this._displayables,i=this.dataZoomModel,o=n.brushRect;o||(o=n.brushRect=new fo({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(e,a),f=l.transformCoordToLocal(s.x,s.y),h=this._size;u[0]=Math.max(Math.min(h[0],u[0]),0),o.setShape({x:f[0],y:0,width:u[0]-f[0],height:h[1]})},t.prototype._dispatchZoomAction=function(e){var a=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?T5:null,start:a[0],end:a[1]})},t.prototype._findCoordRect=function(){var e,a=Yw(this.dataZoomModel).infoList;if(!e&&a.length){var n=a[0].model.coordinateSystem;e=n.getRect&&n.getRect()}if(!e){var i=this.api.getWidth(),o=this.api.getHeight();e={x:i*.2,y:o*.2,width:i*.6,height:o*.6}}return e},t.type="dataZoom.slider",t})(Cp);function M5(r){var t={x:"y",y:"x",radius:"angle",angle:"radius"};return t[r]}function A5(r){return r==="vertical"?"ns-resize":"ew-resize"}function D5(r){r.registerComponentModel(_5),r.registerComponentView(C5),Mp(r)}function L5(r){ue(m5),ue(D5)}var fT={get:function(r,t,e){var a=J((I5[r]||{})[t]);return e&&H(a)?a[a.length-1]:a}},I5={color:{active:["#006edd","#e0ffff"],inactive:[N.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]}},I_=Qt.mapVisual,P5=Qt.eachVisual,R5=H,P_=M,E5=Vr,k5=St,Lu=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.stateList=["inRange","outOfRange"],e.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],e.layoutMode={type:"box",ignoreSize:!0},e.dataBound=[-1/0,1/0],e.targetVisuals={},e.controllerVisuals={},e}return t.prototype.init=function(e,a,n){this.mergeDefaultAndTheme(e,n)},t.prototype.optionUpdated=function(e,a){var n=this.option;!a&&kV(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var a=this.stateList;e=Y(e,this),this.controllerVisuals=b_(this.option.controller,a,e),this.targetVisuals=b_(this.option.target,a,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this.option.seriesId,a=this.option.seriesIndex;a==null&&e==null&&(a="all");var n=Ri(this.ecModel,"series",{index:a,id:e},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return U(n,function(i){return i.componentIndex})},t.prototype.eachTargetSeries=function(e,a){M(this.getTargetSeriesIndices(),function(n){var i=this.ecModel.getSeriesByIndex(n);i&&e.call(a,i)},this)},t.prototype.isTargetSeries=function(e){var a=!1;return this.eachTargetSeries(function(n){n===e&&(a=!0)}),a},t.prototype.formatValueText=function(e,a,n){var i=this.option,o=i.precision,s=this.dataBound,l=i.formatter,u;n=n||["<",">"],H(e)&&(e=e.slice(),u=!0);var f=a?e:u?[h(e[0]),h(e[1])]:h(e);if(X(l))return l.replace("{value}",u?f[0]:f).replace("{value2}",u?f[1]:f);if(Q(l))return u?l(e[0],e[1]):l(e);if(u)return e[0]===s[0]?n[0]+" "+f[1]:e[1]===s[1]?n[1]+" "+f[0]:f[0]+" - "+f[1];return f;function h(v){return v===s[0]?"min":v===s[1]?"max":(+v).toFixed(Math.min(o,20))}},t.prototype.resetExtent=function(){var e=this.option,a=E5([e.min,e.max]);this._dataExtent=a},t.prototype.getDataDimensionIndex=function(e){var a=this.option.dimension;if(a!=null)return e.getDimensionIndex(a);for(var n=e.dimensions,i=n.length-1;i>=0;i--){var o=n[i],s=e.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,a=this.option,n={inRange:a.inRange,outOfRange:a.outOfRange},i=a.target||(a.target={}),o=a.controller||(a.controller={});ft(i,n),ft(o,n);var s=this.isCategory();l.call(this,i),l.call(this,o),u.call(this,i,"inRange","outOfRange"),f.call(this,o);function l(h){R5(a.color)&&!h.inRange&&(h.inRange={color:a.color.slice().reverse()}),h.inRange=h.inRange||{color:e.get("gradientColor")}}function u(h,v,c){var d=h[v],p=h[c];d&&!p&&(p=h[c]={},P_(d,function(g,y){if(Qt.isValidType(y)){var m=fT.get(y,"inactive",s);m!=null&&(p[y]=m,y==="color"&&!p.hasOwnProperty("opacity")&&!p.hasOwnProperty("colorAlpha")&&(p.opacity=[0,0]))}}))}function f(h){var v=(h.inRange||{}).symbol||(h.outOfRange||{}).symbol,c=(h.inRange||{}).symbolSize||(h.outOfRange||{}).symbolSize,d=this.get("inactiveColor"),p=this.getItemSymbol(),g=p||"roundRect";P_(this.stateList,function(y){var m=this.itemSize,_=h[y];_||(_=h[y]={color:s?d:[d]}),_.symbol==null&&(_.symbol=v&&J(v)||(s?g:[g])),_.symbolSize==null&&(_.symbolSize=c&&J(c)||(s?m[0]:[m[0],m[0]])),_.symbol=I_(_.symbol,function(b){return b==="none"?g:b});var S=_.symbolSize;if(S!=null){var x=-1/0;P5(S,function(b){b>x&&(x=b)}),_.symbolSize=I_(S,function(b){return k5(b,[0,x],[0,m[0]],!0)})}},this)}},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){return null},t.type="visualMap",t.dependencies=["series"],t.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:N.color.transparent,borderColor:N.color.borderTint,contentColor:N.color.theme[0],inactiveColor:N.color.disabled,borderWidth:0,padding:N.size.m,textGap:10,precision:0,textStyle:{color:N.color.secondary}},t})(mt),R_=[20,140],O5=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.optionUpdated=function(e,a){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(n){n.mappingMethod="linear",n.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){r.prototype.resetItemSize.apply(this,arguments);var e=this.itemSize;(e[0]==null||isNaN(e[0]))&&(e[0]=R_[0]),(e[1]==null||isNaN(e[1]))&&(e[1]=R_[1])},t.prototype._resetRange=function(){var e=this.getExtent(),a=this.option.range;!a||a.auto?(e.auto=1,this.option.range=e):H(a)&&(a[0]>a[1]&&a.reverse(),a[0]=Math.max(a[0],e[0]),a[1]=Math.min(a[1],e[1]))},t.prototype.completeVisualOption=function(){r.prototype.completeVisualOption.apply(this,arguments),M(this.stateList,function(e){var a=this.option.controller[e].symbolSize;a&&a[0]!==a[1]&&(a[0]=a[1]/3)},this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),a=Vr((this.get("range")||[]).slice());return a[0]>e[1]&&(a[0]=e[1]),a[1]>e[1]&&(a[1]=e[1]),a[0]<e[0]&&(a[0]=e[0]),a[1]<e[0]&&(a[1]=e[0]),a},t.prototype.getValueState=function(e){var a=this.option.range,n=this.getExtent(),i=et(this.option.unboundedRange,!0);return(i&&a[0]<=n[0]||a[0]<=e)&&(i&&a[1]>=n[1]||e<=a[1])?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var a=[];return this.eachTargetSeries(function(n){var i=[],o=n.getData();o.each(this.getDataDimensionIndex(o),function(s,l){e[0]<=s&&s<=e[1]&&i.push(l)},this),a.push({seriesId:n.id,dataIndex:i})},this),a},t.prototype.getVisualMeta=function(e){var a=E_(this,"outOfRange",this.getExtent()),n=E_(this,"inRange",this.option.range.slice()),i=[];function o(c,d){i.push({value:c,color:e(c,d)})}for(var s=0,l=0,u=n.length,f=a.length;l<f&&(!n.length||a[l]<=n[0]);l++)a[l]<n[s]&&o(a[l],"outOfRange");for(var h=1;s<u;s++,h=0)h&&i.length&&o(n[s],"outOfRange"),o(n[s],"inRange");for(var h=1;l<f;l++)(!n.length||n[n.length-1]<a[l])&&(h&&(i.length&&o(i[i.length-1].value,"outOfRange"),h=0),o(a[l],"outOfRange"));var v=i.length;return{stops:i,outerColors:[v?i[0].color:"transparent",v?i[v-1].color:"transparent"]}},t.type="visualMap.continuous",t.defaultOption=Oi(Lu.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:N.color.neutral00,borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:N.color.neutral00,borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:N.color.shadow}}),t})(Lu);function E_(r,t,e){if(e[0]===e[1])return e.slice();for(var a=200,n=(e[1]-e[0])/a,i=e[0],o=[],s=0;s<=a&&i<e[1];s++)o.push(i),i+=n;return o.push(e[1]),o}var hT=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.autoPositionValues={left:1,right:1,top:1,bottom:1},e}return t.prototype.init=function(e,a){this.ecModel=e,this.api=a},t.prototype.render=function(e,a,n,i){if(this.visualMapModel=e,e.get("show")===!1){this.group.removeAll();return}this.doRender(e,a,n,i)},t.prototype.renderBackground=function(e){var a=this.visualMapModel,n=ys(a.get("padding")||0),i=e.getBoundingRect();e.add(new _t({z2:-1,silent:!0,shape:{x:i.x-n[3],y:i.y-n[0],width:i.width+n[3]+n[1],height:i.height+n[0]+n[2]},style:{fill:a.get("backgroundColor"),stroke:a.get("borderColor"),lineWidth:a.get("borderWidth")}}))},t.prototype.getControllerVisual=function(e,a,n){n=n||{};var i=n.forceState,o=this.visualMapModel,s={};if(a==="color"){var l=o.get("contentColor");s.color=l}function u(c){return s[c]}function f(c,d){s[c]=d}var h=o.controllerVisuals[i||o.getValueState(e)],v=Qt.prepareVisualTypes(h);return M(v,function(c){var d=h[c];n.convertOpacityToAlpha&&c==="opacity"&&(c="colorAlpha",d=h.__alphaForOpacity),Qt.dependsOn(c,a)&&d&&d.applyVisual(e,u,f)}),s[a]},t.prototype.positionGroup=function(e){var a=this.visualMapModel,n=this.api,i=Le(a,n).refContainer;Ed(e,a.getBoxLayoutParams(),i)},t.prototype.doRender=function(e,a,n,i){},t.type="visualMap",t})($t),k_=[["left","right","width"],["top","bottom","height"]];function cT(r,t,e){var a=r.option,n=a.align;if(n!=null&&n!=="auto")return n;for(var i={width:t.getWidth(),height:t.getHeight()},o=a.orient==="horizontal"?1:0,s=k_[o],l=[0,null,10],u={},f=0;f<3;f++)u[k_[1-o][f]]=l[f],u[s[f]]=f===2?e[0]:a[s[f]];var h=[["x","width",3],["y","height",0]][o],v=ne(u,i,a.padding);return s[(v.margin[h[2]]||0)+v[h[0]]+v[h[1]]*.5<i[h[1]]*.5?0:1]}function zl(r,t){return M(r||[],function(e){e.dataIndex!=null&&(e.dataIndexInside=e.dataIndex,e.dataIndex=null),e.highlightKey="visualMap"+(t?t.componentIndex:"")}),r}var yr=St,B5=M,O_=Math.min,ac=Math.max,N5=12,z5=6,V5=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._shapes={},e._dataInterval=[],e._handleEnds=[],e._hoverLinkDataIndices=[],e}return t.prototype.init=function(e,a){r.prototype.init.call(this,e,a),this._hoverLinkFromSeriesMouseOver=Y(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=Y(this._hideIndicator,this)},t.prototype.doRender=function(e,a,n,i){(!i||i.type!=="selectDataRange"||i.from!==this.uid)&&this._buildView()},t.prototype._buildView=function(){this.group.removeAll();var e=this.visualMapModel,a=this.group;this._orient=e.get("orient"),this._useHandle=e.get("calculable"),this._resetInterval(),this._renderBar(a);var n=e.get("text");this._renderEndsText(a,n,0),this._renderEndsText(a,n,1),this._updateView(!0),this.renderBackground(a),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(a)},t.prototype._renderEndsText=function(e,a,n){if(a){var i=a[1-n];i=i!=null?i+"":"";var o=this.visualMapModel,s=o.get("textGap"),l=o.itemSize,u=this._shapes.mainGroup,f=this._applyTransform([l[0]/2,n===0?-s:l[1]+s],u),h=this._applyTransform(n===0?"bottom":"top",u),v=this._orient,c=this.visualMapModel.textStyleModel;this.group.add(new Tt({style:Ht(c,{x:f[0],y:f[1],verticalAlign:c.get("verticalAlign")||(v==="horizontal"?"middle":h),align:c.get("align")||(v==="horizontal"?h:"center"),text:i})}))}},t.prototype._renderBar=function(e){var a=this.visualMapModel,n=this._shapes,i=a.itemSize,o=this._orient,s=this._useHandle,l=cT(a,this.api,i),u=n.mainGroup=this._createBarGroup(l),f=new yt;u.add(f),f.add(n.outOfRange=B_()),f.add(n.inRange=B_(null,s?z_(this._orient):null,Y(this._dragHandle,this,"all",!1),Y(this._dragHandle,this,"all",!0))),f.setClipPath(new _t({shape:{x:0,y:0,width:i[0],height:i[1],r:3}}));var h=a.textStyleModel.getTextRect("国"),v=ac(h.width,h.height);s&&(n.handleThumbs=[],n.handleLabels=[],n.handleLabelPoints=[],this._createHandle(a,u,0,i,v,o),this._createHandle(a,u,1,i,v,o)),this._createIndicator(a,u,i,v,o),e.add(u)},t.prototype._createHandle=function(e,a,n,i,o,s){var l=Y(this._dragHandle,this,n,!1),u=Y(this._dragHandle,this,n,!0),f=Ar(e.get("handleSize"),i[0]),h=le(e.get("handleIcon"),-f/2,-f/2,f,f,null,!0),v=z_(this._orient);h.attr({cursor:v,draggable:!0,drift:l,ondragend:u,onmousemove:function(y){Xr(y.event)}}),h.x=i[0]/2,h.useStyle(e.getModel("handleStyle").getItemStyle()),h.setStyle({strokeNoScale:!0,strokeFirst:!0}),h.style.lineWidth*=2,h.ensureState("emphasis").style=e.getModel(["emphasis","handleStyle"]).getItemStyle(),vn(h,!0),a.add(h);var c=this.visualMapModel.textStyleModel,d=new Tt({cursor:v,draggable:!0,drift:l,onmousemove:function(y){Xr(y.event)},ondragend:u,style:Ht(c,{x:0,y:0,text:""})});d.ensureState("blur").style={opacity:.1},d.stateTransition={duration:200},this.group.add(d);var p=[f,0],g=this._shapes;g.handleThumbs[n]=h,g.handleLabelPoints[n]=p,g.handleLabels[n]=d},t.prototype._createIndicator=function(e,a,n,i,o){var s=Ar(e.get("indicatorSize"),n[0]),l=le(e.get("indicatorIcon"),-s/2,-s/2,s,s,null,!0);l.attr({cursor:"move",invisible:!0,silent:!0,x:n[0]/2});var u=e.getModel("indicatorStyle").getItemStyle();if(l instanceof Xe){var f=l.style;l.useStyle(F({image:f.image,x:f.x,y:f.y,width:f.width,height:f.height},u))}else l.useStyle(u);a.add(l);var h=this.visualMapModel.textStyleModel,v=new Tt({silent:!0,invisible:!0,style:Ht(h,{x:0,y:0,text:""})});this.group.add(v);var c=[(o==="horizontal"?i/2:z5)+n[0]/2,0],d=this._shapes;d.indicator=l,d.indicatorLabel=v,d.indicatorLabelPoint=c,this._firstShowIndicator=!0},t.prototype._dragHandle=function(e,a,n,i){if(this._useHandle){if(this._dragging=!a,!a){var o=this._applyTransform([n,i],this._shapes.mainGroup,!0);this._updateInterval(e,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():N_(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[e],!1)}},t.prototype._resetInterval=function(){var e=this.visualMapModel,a=this._dataInterval=e.getSelected(),n=e.getExtent(),i=[0,e.itemSize[1]];this._handleEnds=[yr(a[0],n,i,!0),yr(a[1],n,i,!0)]},t.prototype._updateInterval=function(e,a){a=a||0;var n=this.visualMapModel,i=this._handleEnds,o=[0,n.itemSize[1]];La(a,i,o,e,0);var s=n.getExtent();this._dataInterval=[yr(i[0],o,s,!0),yr(i[1],o,s,!0)]},t.prototype._updateView=function(e){var a=this.visualMapModel,n=a.getExtent(),i=this._shapes,o=[0,a.itemSize[1]],s=e?o:this._handleEnds,l=this._createBarVisual(this._dataInterval,n,s,"inRange"),u=this._createBarVisual(n,n,o,"outOfRange");i.inRange.setStyle({fill:l.barColor}).setShape("points",l.barPoints),i.outOfRange.setStyle({fill:u.barColor}).setShape("points",u.barPoints),this._updateHandle(s,l)},t.prototype._createBarVisual=function(e,a,n,i){var o={forceState:i,convertOpacityToAlpha:!0},s=this._makeColorGradient(e,o),l=[this.getControllerVisual(e[0],"symbolSize",o),this.getControllerVisual(e[1],"symbolSize",o)],u=this._createBarPoints(n,l);return{barColor:new $u(0,0,0,1,s),barPoints:u,handlesColor:[s[0].color,s[s.length-1].color]}},t.prototype._makeColorGradient=function(e,a){var n=100,i=[],o=(e[1]-e[0])/n;i.push({color:this.getControllerVisual(e[0],"color",a),offset:0});for(var s=1;s<n;s++){var l=e[0]+o*s;if(l>e[1])break;i.push({color:this.getControllerVisual(l,"color",a),offset:s/n})}return i.push({color:this.getControllerVisual(e[1],"color",a),offset:1}),i},t.prototype._createBarPoints=function(e,a){var n=this.visualMapModel.itemSize;return[[n[0]-a[0],e[0]],[n[0],e[0]],[n[0],e[1]],[n[0]-a[1],e[1]]]},t.prototype._createBarGroup=function(e){var a=this._orient,n=this.visualMapModel.get("inverse");return new yt(a==="horizontal"&&!n?{scaleX:e==="bottom"?1:-1,rotation:Math.PI/2}:a==="horizontal"&&n?{scaleX:e==="bottom"?-1:1,rotation:-Math.PI/2}:a==="vertical"&&!n?{scaleX:e==="left"?1:-1,scaleY:-1}:{scaleX:e==="left"?1:-1})},t.prototype._updateHandle=function(e,a){if(this._useHandle){var n=this._shapes,i=this.visualMapModel,o=n.handleThumbs,s=n.handleLabels,l=i.itemSize,u=i.getExtent(),f=this._applyTransform("left",n.mainGroup);B5([0,1],function(h){var v=o[h];v.setStyle("fill",a.handlesColor[h]),v.y=e[h];var c=yr(e[h],[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=Ur(n.handleLabelPoints[h],bn(v,this.group));if(this._orient==="horizontal"){var g=f==="left"||f==="top"?(l[0]-d)/2:(l[0]-d)/-2;p[1]+=g}s[h].setStyle({x:p[0],y:p[1],text:i.formatValueText(this._dataInterval[h]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",n.mainGroup):"center"})},this)}},t.prototype._showIndicator=function(e,a,n,i){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],f=this._shapes,h=f.indicator;if(h){h.attr("invisible",!1);var v={convertOpacityToAlpha:!0},c=this.getControllerVisual(e,"color",v),d=this.getControllerVisual(e,"symbolSize"),p=yr(e,s,u,!0),g=l[0]-d/2,y={x:h.x,y:h.y};h.y=p,h.x=g;var m=Ur(f.indicatorLabelPoint,bn(h,this.group)),_=f.indicatorLabel;_.attr("invisible",!1);var S=this._applyTransform("left",f.mainGroup),x=this._orient,b=x==="horizontal";_.setStyle({text:(n||"")+o.formatValueText(a),verticalAlign:b?S:"middle",align:b?"center":S});var w={x:g,y:p,style:{fill:c}},T={style:{x:m[0],y:m[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var D={duration:100,easing:"cubicInOut",additive:!0};h.x=y.x,h.y=y.y,h.animateTo(w,D),_.animateTo(T,D)}else h.attr(w),_.attr(T);this._firstShowIndicator=!1;var A=this._shapes.handleLabels;if(A)for(var C=0;C<A.length;C++)this.api.enterBlur(A[C])}},t.prototype._enableHoverLinkToSeries=function(){var e=this;this._shapes.mainGroup.on("mousemove",function(a){if(e._hovering=!0,!e._dragging){var n=e.visualMapModel.itemSize,i=e._applyTransform([a.offsetX,a.offsetY],e._shapes.mainGroup,!0,!0);i[1]=O_(ac(0,i[1]),n[1]),e._doHoverLinkToSeries(i[1],0<=i[0]&&i[0]<=n[0])}}).on("mouseout",function(){e._hovering=!1,!e._dragging&&e._clearHoverLinkToSeries()})},t.prototype._enableHoverLinkFromSeries=function(){var e=this.api.getZr();this.visualMapModel.option.hoverLink?(e.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),e.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},t.prototype._doHoverLinkToSeries=function(e,a){var n=this.visualMapModel,i=n.itemSize;if(n.option.hoverLink){var o=[0,i[1]],s=n.getExtent();e=O_(ac(o[0],e),o[1]);var l=F5(n,s,o),u=[e-l,e+l],f=yr(e,o,s,!0),h=[yr(u[0],o,s,!0),yr(u[1],o,s,!0)];u[0]<o[0]&&(h[0]=-1/0),u[1]>o[1]&&(h[1]=1/0),a&&(h[0]===-1/0?this._showIndicator(f,h[1],"< ",l):h[1]===1/0?this._showIndicator(f,h[0],"> ",l):this._showIndicator(f,f,"≈ ",l));var v=this._hoverLinkDataIndices,c=[];(a||N_(n))&&(c=this._hoverLinkDataIndices=n.findTargetDataIndices(h));var d=NM(v,c);this._dispatchHighDown("downplay",zl(d[0],n)),this._dispatchHighDown("highlight",zl(d[1],n))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){var a;if(hi(e.target,function(l){var u=vt(l);if(u.dataIndex!=null)return a=u,!0},!0),!!a){var n=this.ecModel.getSeriesByIndex(a.seriesIndex),i=this.visualMapModel;if(i.isTargetSeries(n)){var o=n.getData(a.dataType),s=o.getStore().get(i.getDataDimensionIndex(o),a.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},t.prototype._hideIndicator=function(){var e=this._shapes;e.indicator&&e.indicator.attr("invisible",!0),e.indicatorLabel&&e.indicatorLabel.attr("invisible",!0);var a=this._shapes.handleLabels;if(a)for(var n=0;n<a.length;n++)this.api.leaveBlur(a[n])},t.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var e=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",zl(e,this.visualMapModel)),e.length=0},t.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var e=this.api.getZr();e.off("mouseover",this._hoverLinkFromSeriesMouseOver),e.off("mouseout",this._hideIndicator)},t.prototype._applyTransform=function(e,a,n,i){var o=bn(a,i?null:this.group);return H(e)?Ur(e,o,n):Ku(e,o,n)},t.prototype._dispatchHighDown=function(e,a){a&&a.length&&this.api.dispatchAction({type:e,batch:a})},t.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},t.type="visualMap.continuous",t})(hT);function B_(r,t,e,a){return new Dr({shape:{points:r},draggable:!!e,cursor:t,drift:e,onmousemove:function(n){Xr(n.event)},ondragend:a})}function F5(r,t,e){var a=N5/2,n=r.get("hoverLinkDataSize");return n&&(a=yr(n,t,e,!0)/2),a}function N_(r){var t=r.get("hoverLinkOnHandle");return!!(t??r.get("realtime"))}function z_(r){return r==="vertical"?"ns-resize":"ew-resize"}var G5={type:"selectDataRange",event:"dataRangeSelected",update:"update"},H5=function(r,t){t.eachComponent({mainType:"visualMap",query:r},function(e){e.setSelected(r.selected)})},W5=[{createOnAllSeries:!0,reset:function(r,t){var e=[];return t.eachComponent("visualMap",function(a){var n=r.pipelineContext;!a.isTargetSeries(r)||n&&n.large||e.push(OV(a.stateList,a.targetVisuals,Y(a.getValueState,a),a.getDataDimensionIndex(r.getData())))}),e}},{createOnAllSeries:!0,reset:function(r,t){var e=r.getData(),a=[];t.eachComponent("visualMap",function(n){if(n.isTargetSeries(r)){var i=n.getVisualMeta(Y(U5,null,r,n))||{stops:[],outerColors:[]},o=n.getDataDimensionIndex(e);o>=0&&(i.dimension=o,a.push(i))}}),r.getData().setVisual("visualMeta",a)}}];function U5(r,t,e,a){for(var n=t.targetVisuals[a],i=Qt.prepareVisualTypes(n),o={color:ef(r.getData(),"color")},s=0,l=i.length;s<l;s++){var u=i[s],f=n[u==="opacity"?"__alphaForOpacity":u];f&&f.applyVisual(e,h,v)}return o.color;function h(c){return o[c]}function v(c,d){o[c]=d}}var V_=M;function Y5(r){var t=r&&r.visualMap;H(t)||(t=t?[t]:[]),V_(t,function(e){if(e){ri(e,"splitList")&&!ri(e,"pieces")&&(e.pieces=e.splitList,delete e.splitList);var a=e.pieces;a&&H(a)&&V_(a,function(n){j(n)&&(ri(n,"start")&&!ri(n,"min")&&(n.min=n.start),ri(n,"end")&&!ri(n,"max")&&(n.max=n.end))})}})}function ri(r,t){return r&&r.hasOwnProperty&&r.hasOwnProperty(t)}var F_=!1;function vT(r){F_||(F_=!0,r.registerSubTypeDefaulter("visualMap",function(t){return!t.categories&&(!(t.pieces?t.pieces.length>0:t.splitNumber>0)||t.calculable)?"continuous":"piecewise"}),r.registerAction(G5,H5),M(W5,function(t){r.registerVisual(r.PRIORITY.VISUAL.COMPONENT,t)}),r.registerPreprocessor(Y5))}function Z5(r){r.registerComponentModel(O5),r.registerComponentView(V5),vT(r)}var X5=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._pieceList=[],e}return t.prototype.optionUpdated=function(e,a){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var n=this._mode=this._determineMode();this._pieceList=[],$5[this._mode].call(this,this._pieceList),this._resetSelected(e,a);var i=this.option.categories;this.resetVisual(function(o,s){n==="categories"?(o.mappingMethod="category",o.categories=J(i)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=U(this._pieceList,function(l){return l=J(l),s!=="inRange"&&(l.visual=null),l}))})},t.prototype.completeVisualOption=function(){var e=this.option,a={},n=Qt.listVisualTypes(),i=this.isCategory();M(e.pieces,function(s){M(n,function(l){s.hasOwnProperty(l)&&(a[l]=1)})}),M(a,function(s,l){var u=!1;M(this.stateList,function(f){u=u||o(e,f,l)||o(e.target,f,l)},this),!u&&M(this.stateList,function(f){(e[f]||(e[f]={}))[l]=fT.get(l,f==="inRange"?"active":"inactive",i)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}r.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,a){var n=this.option,i=this._pieceList,o=(a?n:e).selected||{};if(n.selected=o,M(i,function(l,u){var f=this.getSelectedMapKey(l);o.hasOwnProperty(f)||(o[f]=!0)},this),n.selectedMode==="single"){var s=!1;M(i,function(l,u){var f=this.getSelectedMapKey(l);o[f]&&(s?o[f]=!1:s=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get("itemSymbol")},t.prototype.getSelectedMapKey=function(e){return this._mode==="categories"?e.value+"":e.index+""},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},t.prototype.setSelected=function(e){this.option.selected=J(e)},t.prototype.getValueState=function(e){var a=Qt.findPieceIndex(e,this._pieceList);return a!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[a])]?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var a=[],n=this._pieceList;return this.eachTargetSeries(function(i){var o=[],s=i.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var f=Qt.findPieceIndex(l,n);f===e&&o.push(u)},this),a.push({seriesId:i.id,dataIndex:o})},this),a},t.prototype.getRepresentValue=function(e){var a;if(this.isCategory())a=e.value;else if(e.value!=null)a=e.value;else{var n=e.interval||[];a=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return a},t.prototype.getVisualMeta=function(e){if(this.isCategory())return;var a=[],n=["",""],i=this;function o(f,h){var v=i.getRepresentValue({interval:f});h||(h=i.getValueState(v));var c=e(v,h);f[0]===-1/0?n[0]=c:f[1]===1/0?n[1]=c:a.push({value:f[0],color:c},{value:f[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(f){var h=f.interval;h&&(h[0]>u&&o([u,h[0]],"outOfRange"),o(h.slice()),u=h[1])},this),{stops:a,outerColors:n}},t.type="visualMap.piecewise",t.defaultOption=Oi(Lu.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}),t})(Lu),$5={splitNumber:function(r){var t=this.option,e=Math.min(t.precision,20),a=this.getExtent(),n=t.splitNumber;n=Math.max(parseInt(n,10),1),t.splitNumber=n;for(var i=(a[1]-a[0])/n;+i.toFixed(e)!==i&&e<5;)e++;t.precision=e,i=+i.toFixed(e),t.minOpen&&r.push({interval:[-1/0,a[0]],close:[0,0]});for(var o=0,s=a[0];o<n;s+=i,o++){var l=o===n-1?a[1]:s+i;r.push({interval:[s,l],close:[1,1]})}t.maxOpen&&r.push({interval:[a[1],1/0],close:[0,0]}),pg(r),M(r,function(u,f){u.index=f,u.text=this.formatValueText(u.interval)},this)},categories:function(r){var t=this.option;M(t.categories,function(e){r.push({text:this.formatValueText(e,!0),value:e})},this),G_(t,r)},pieces:function(r){var t=this.option;M(t.pieces,function(e,a){j(e)||(e={value:e});var n={text:"",index:a};if(e.label!=null&&(n.text=e.label),e.hasOwnProperty("value")){var i=n.value=e.value;n.interval=[i,i],n.close=[1,1]}else{for(var o=n.interval=[],s=n.close=[0,0],l=[1,0,1],u=[-1/0,1/0],f=[],h=0;h<2;h++){for(var v=[["gte","gt","min"],["lte","lt","max"]][h],c=0;c<3&&o[h]==null;c++)o[h]=e[v[c]],s[h]=l[c],f[h]=c===2;o[h]==null&&(o[h]=u[h])}f[0]&&o[1]===1/0&&(s[0]=0),f[1]&&o[0]===-1/0&&(s[1]=0),o[0]===o[1]&&s[0]&&s[1]&&(n.value=o[0])}n.visual=Qt.retrieveVisuals(e),r.push(n)},this),G_(t,r),pg(r),M(r,function(e){var a=e.close,n=[["<","≤"][a[1]],[">","≥"][a[0]]];e.text=e.text||this.formatValueText(e.value!=null?e.value:e.interval,!1,n)},this)}};function G_(r,t){var e=r.inverse;(r.orient==="vertical"?!e:e)&&t.reverse()}var K5=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.doRender=function(){var e=this.group;e.removeAll();var a=this.visualMapModel,n=a.get("textGap"),i=a.textStyleModel,o=this._getItemAlign(),s=a.itemSize,l=this._getViewData(),u=l.endsText,f=Zr(a.get("showLabel",!0),!u),h=!a.get("selectedMode");u&&this._renderEndsText(e,u[0],s,f,o),M(l.viewPieceList,function(v){var c=v.piece,d=new yt;d.onclick=Y(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]],h),f){var g=this.visualMapModel.getValueState(p),y=i.get("align")||o;d.add(new Tt({style:Ht(i,{x:y==="right"?-n:s[0]+n,y:s[1]/2,text:c.text,verticalAlign:i.get("verticalAlign")||"middle",align:y,opacity:et(i.get("opacity"),g==="outOfRange"?.5:1)}),silent:h}))}e.add(d)},this),u&&this._renderEndsText(e,u[1],s,f,o),wn(a.get("orient"),e,a.get("itemGap")),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,a){var n=this;e.on("mouseover",function(){return i("highlight")}).on("mouseout",function(){return i("downplay")});var i=function(o){var s=n.visualMapModel;s.option.hoverLink&&n.api.dispatchAction({type:o,batch:zl(s.findTargetDataIndices(a),s)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,a=e.option;if(a.orient==="vertical")return cT(e,this.api,e.itemSize);var n=a.align;return(!n||n==="auto")&&(n="left"),n},t.prototype._renderEndsText=function(e,a,n,i,o){if(a){var s=new yt,l=this.visualMapModel.textStyleModel;s.add(new Tt({style:Ht(l,{x:i?o==="right"?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:i?o:"center",text:a})})),e.add(s)}},t.prototype._getViewData=function(){var e=this.visualMapModel,a=U(e.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),n=e.get("text"),i=e.get("orient"),o=e.get("inverse");return(i==="horizontal"?o:!o)?a.reverse():n&&(n=n.slice().reverse()),{viewPieceList:a,endsText:n}},t.prototype._createItemSymbol=function(e,a,n,i){var o=le(this.getControllerVisual(a,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(a,"color"));o.silent=i,e.add(o)},t.prototype._onItemClick=function(e){var a=this.visualMapModel,n=a.option,i=n.selectedMode;if(i){var o=J(n.selected),s=a.getSelectedMapKey(e);i==="single"||i===!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})}},t.type="visualMap.piecewise",t})(hT);function q5(r){r.registerComponentModel(X5),r.registerComponentView(K5),vT(r)}function Q5(r){ue(Z5),ue(q5)}var j5=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="dataset",e}return t.prototype.init=function(e,a,n){r.prototype.init.call(this,e,a,n),this._sourceManager=new ex(this),Ry(this)},t.prototype.mergeOption=function(e,a){r.prototype.mergeOption.call(this,e,a),Ry(this)},t.prototype.optionUpdated=function(){this._sourceManager.dirty()},t.prototype.getSourceManager=function(){return this._sourceManager},t.type="dataset",t.defaultOption={seriesLayoutBy:nr},t})(mt),J5=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="dataset",e}return t.type="dataset",t})($t);function tF(r){r.registerComponentModel(j5),r.registerComponentView(J5)}ue([NR,xk,sk,Rk,FE,hB,aB,Hk,DN,az,UO,XN,FN,nN,Dz,EV,l5,L5,dV,zV,tF,Q5,jV,ZV,Ew,dE]);const Pp="wildo";function dT(r){return r.length}function je(r,t){return typeof document>"u"?t:getComputedStyle(document.documentElement).getPropertyValue(r).trim()||t}function Rp(){if(typeof document>"u")return!1;const r=document.documentElement;return r.classList.contains("dark")||r.getAttribute("data-theme")==="dark"}function pT(r,t){return la(je(r,t))}function la(r){return r.startsWith("#")||r.startsWith("rgb")?r:/^[\d.]+\s+[\d.]+\s+[\d.]+$/.test(r)?`oklch(${r})`:/^\d/.test(r)?`hsl(${r.replace(/\s+/g,", ")})`:r}function eF(){return{...Vl}}function rF(r){const t=r??Vl,e=Rp(),a=la(je("--background","#ffffff")),n=la(je("--foreground","#0a0a0a")),i=la(je("--muted-foreground","#737373")),o=la(je("--border","#e5e5e5")),s=la(je("--surface-raised",je("--popover","#ffffff"))),l=la(je("--surface-raised-foreground",je("--popover-foreground","#0a0a0a"))),u=je("--radius","0.5rem"),f=parseFloat(u)*(u.includes("rem")?16:1),h=e?t.colorShadeDark:t.colorShadeLight,v=Z_(),c=X_(dT(v),{shade:h,palette:v}),d=t.axis.splitLineType==="none"?{show:!1}:{lineStyle:{color:o,type:t.axis.splitLineType}},p=t.typography??Vl.typography,g=p.axisLabelFontSize;return{color:c,backgroundColor:"transparent",textStyle:{color:n,fontFamily:"inherit"},title:{textStyle:{color:n,fontSize:p.titleFontSize,fontWeight:p.titleFontWeight},subtextStyle:{color:i,fontSize:p.subtitleFontSize}},legend:{textStyle:{color:i,fontSize:p.legendFontSize}},tooltip:{backgroundColor:s,borderColor:o,borderWidth:t.tooltip.borderWidth,borderRadius:f,textStyle:{color:l,fontSize:p.tooltipFontSize},extraCssText:t.tooltip.extraCss},axisPointer:{lineStyle:{color:o},crossStyle:{color:o}},categoryAxis:{axisLine:{show:t.axis.showAxisLine,lineStyle:{color:o}},axisTick:{show:t.axis.showTicks,lineStyle:{color:o}},axisLabel:{color:i,fontSize:g},splitLine:d},valueAxis:{axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:i,fontSize:g},nameTextStyle:{color:i,fontSize:p.axisNameFontSize},splitLine:d},timeAxis:{axisLine:{show:t.axis.showAxisLine,lineStyle:{color:o}},axisTick:{show:t.axis.showTicks,lineStyle:{color:o}},axisLabel:{color:i,fontSize:g},splitLine:d},line:{smooth:!1,symbol:"circle",symbolSize:t.series.pointSize,lineStyle:{width:t.series.lineWidth}},bar:{itemStyle:{borderRadius:t.series.barBorderRadius},emphasis:{itemStyle:{color:"inherit"}}},pie:{itemStyle:{borderColor:a,borderWidth:t.series.pieBorderWidth},label:{color:n,textBorderWidth:0,textBorderColor:"transparent"}},scatter:{symbolSize:t.series.pointSize},radar:{axisLine:{lineStyle:{color:o}},splitLine:{lineStyle:{color:o}},splitArea:{show:!1}},gauge:{axisLine:{lineStyle:{color:[[1,o]]}}},dataZoom:{backgroundColor:"transparent",borderColor:o,fillerColor:la(je("--muted","#f5f5f5")),handleColor:i,textStyle:{color:i}}}}function H_(r){const t=rF(r);Xd(Pp,t)}function aF(){return Pp}function nF(r){const t=Rp(),e=r??Vl,a=t?e.colorShadeDark:e.colorShadeLight,n=Z_();return X_(dT(n),{shade:a,palette:n})}function iF(r){const t=Zt.useRef(void 0),e=Rp();Zt.useMemo(()=>{H_(r)},[r,e]);const a=Zt.useCallback(()=>{H_(r)},[r]),n=Zt.useCallback(()=>{clearTimeout(t.current),t.current=setTimeout(a,50)},[a]);return Zt.useEffect(()=>{a();const i=new MutationObserver(()=>{n()});return i.observe(document.documentElement,{attributes:!0,attributeFilter:["class","data-theme","style"]}),()=>{i.disconnect(),clearTimeout(t.current)}},[a,n]),{themeName:Pp}}const oF={[zi.INFO]:{token:"--info",fallback:"#3b82f6"},[zi.SUCCESS]:{token:"--success",fallback:"#22c55e"},[zi.WARNING]:{token:"--warning",fallback:"#f59e0b"},[zi.ERROR]:{token:"--destructive",fallback:"#ef4444"},[zi.NEUTRAL]:{token:"--muted-foreground",fallback:"#737373"}};function W_(r){const{token:t,fallback:e}=oF[bT(r)];return pT(t,e)}function sF(r,t,e){const a={},n={},i={},s=t(r.dataQuery.mainResourceType)?.mainSchema;if(!s)return{colors:a,order:n,labels:i};const l=mT(s);for(const u of r.dataQuery.dimensions){const f=l[u.field];if(!f)continue;const h=_T(f);h.length>0&&(n[u.ref]=h),h.length>0&&e&&(i[u.ref]=Object.fromEntries(h.map(p=>[p,e(r.dataQuery.mainResourceType,u.field,p,f)])));const v=ST(f);if(!v)continue;const c={};for(const[p,g]of Object.entries(v.values??{})){const y=g?.color??v.defaultColor;y&&(c[p]=W_(y))}const d=v.defaultColor?W_(v.defaultColor):void 0;(Object.keys(c).length>0||d)&&(a[u.ref]={values:c,defaultColor:d})}return{colors:a,order:n,labels:i}}function Ea(r){return r.definition.dataQuery.dimensions[0]?.ref??""}function Cn(r,t){return r.map(e=>e[t])}function Iu(r,t){return r.map(e=>{const a=e[t];if(a==null)return null;const n=typeof a=="number"?a:Number(a);return Number.isFinite(n)?n:null})}function En(r,t,e){return r.style?.color??e[t%e.length]}function lF(r,t,e){const a=new Map(e.map((n,i)=>[n,i]));return r.map((n,i)=>({row:n,originalIndex:i})).sort((n,i)=>{const o=a.get(String(n.row[t]))??1/0,s=a.get(String(i.row[t]))??1/0;return o!==s?o-s:n.originalIndex-i.originalIndex}).map(({row:n})=>n)}function gT(r,t,e){const a=new Set;for(const i of r){const o=i[t];o!=null&&a.add(String(o))}let n=Array.from(a);if(e.splitConfig?.exclude){const i=new Set(e.splitConfig.exclude);n=n.filter(o=>!i.has(o))}if(e.splitConfig?.order){const i=new Map(e.splitConfig.order.map((o,s)=>[o,s]));n.sort((o,s)=>{const l=i.get(o)??1/0,u=i.get(s)??1/0;return l===u?o.localeCompare(s):l-u})}return n}function Ep(r,t,e,a,n){return e.splitConfig?.colorMap?.[r]??n?.values[r]??n?.defaultColor??a[t%a.length]}function xs(r,t,e,a){if(e?.definition.i18n?.splitValueKeys){const n=e.definition.i18n.splitValueKeys[r];if(n){const i=e.t(n);if(i!==n)return i}}return t.splitConfig?.labelMap?.[r]??(a?e?.dimensionEnumLabels?.[a]?.[r]:void 0)??r}function Ke(r,t){if(r.nameKey&&t){const e=t(r.nameKey);if(e!==r.nameKey)return e}return r.name}function hf(r,t,e,a){const n=Cn(r,t);return{type:"category",data:a?n.map(i=>a[String(i)]??i):n,axisLabel:{hideOverlap:e?.axis.hideOverlap??!0}}}function os(r,t){if(t.length===0)return!1;const e=new Map(r.definition.dataQuery.measures.map(a=>[a.ref,a]));return t.every(a=>{const n=e.get(a.measureRef)?.aggregate;return n===kp.COUNT||n===kp.COUNT_DISTINCT})}function ss(r,t,e){return{type:"value",name:r,nameLocation:t?.axis.yAxisNameLocation??"middle",nameGap:t?.axis.yAxisNameGap??50,...e?.integerValued?{minInterval:1}:{}}}function ls(r){return r.response.queryMeta?.resolvedTimezone??"UTC"}function Di(r,t,e){if(r==null)return"";const a=r instanceof Date?r:new Date(r);if(isNaN(a.getTime()))return String(r);const n=e||"UTC",i=new Intl.DateTimeFormat("en-US",{timeZone:n,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hourCycle:"h23"}).formatToParts(a),o=v=>i.find(c=>c.type===v)?.value??"",s=o("year"),l=o("month"),u=o("day"),f=o("hour"),h=o("minute");switch(t){case Br.YEAR:return s;case Br.QUARTER:return`${s}-Q${Math.floor((Number(l)-1)/3)+1}`;case Br.MONTH:return`${s}-${l}`;case Br.HOUR:return`${s}-${l}-${u} ${f}:00`;case Br.MINUTE:return`${s}-${l}-${u} ${f}:${h}`;case Br.WEEK:case Br.DAY:default:return`${s}-${l}-${u}`}}function us(r){if(r!==Br.DAY&&r!==Br.WEEK)return;const t=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric",timeZone:"UTC"});return e=>{const a=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);return a?t.format(new Date(Date.UTC(Number(a[1]),Number(a[2])-1,Number(a[3])))):e}}function uF(r,t){const e=new Set,a=[];for(const n of r){const i=n[t];if(i==null)continue;const o=i instanceof Date?i.toISOString():String(i);e.has(o)||(e.add(o),a.push(o))}return a}function fF(r,t,e,a,n){const i=uF(r,t),o=us(e);return{type:"category",data:i.map(s=>Di(s,e,a)),axisLabel:{hideOverlap:n?.axis.hideOverlap??!0,...o?{formatter:o}:{}}}}function Uv(r){return!!r._filled}function hF(r){return r.some(Uv)}function cF(r,t,e=!1){const a=r?.responsive,n=a?.smallMaxWidth??400,i=a?.mediumMaxWidth??799,o=a?.smallGridPadding??{top:20,right:10,bottom:20,left:30},s=a?.mediumGridPadding??{left:50,right:20,bottom:40},l=a?.hideLegendOnSmall??!0;return[{query:{maxWidth:n},option:{legend:{show:!l},...t?{grid:o,xAxis:{axisLabel:{rotate:a?.smallAxisLabelRotate??45,fontSize:a?.smallFontSize??10}}}:{},...e&&l?{series:[{label:{position:"inside",formatter:"{d}%"},labelLine:{show:!1}}]}:{}}},{query:{minWidth:n,maxWidth:i},option:{legend:{orient:"horizontal",bottom:0},...t?{grid:s,xAxis:{axisLabel:{fontSize:a?.mediumFontSize??11}}}:{}}}]}function Pu(r,t){const e=t.style;e&&(e.lineWidth!=null&&(r.lineStyle={...r.lineStyle||{},width:e.lineWidth}),e.lineType&&(r.lineStyle={...r.lineStyle||{},type:e.lineType}),e.areaOpacity!=null&&(r.areaStyle={opacity:e.areaOpacity}),e.smooth!=null&&(r.smooth=e.smooth),e.barWidth!=null&&(r.barWidth=e.barWidth),e.opacity!=null&&(r.opacity=e.opacity),e.pointSize!=null&&(r.symbolSize=e.pointSize,e.pointSize===0&&(r.showSymbol=!1)),e.pointShape&&(r.symbol=e.pointShape),e.connectNulls!=null&&(r.connectNulls=e.connectNulls),e.step&&(r.step=e.step),(e.showLabel!=null||e.labelPosition||e.labelFormatter)&&(r.label={...r.label||{},...e.showLabel!=null?{show:e.showLabel}:{},...e.labelPosition?{position:e.labelPosition}:{},...e.labelFormatter?{formatter:e.labelFormatter}:{}}),e.emphasisScale!=null&&(r.emphasis={...r.emphasis||{},scale:e.emphasisScale}),e.markLines?.length&&(r.markLine={silent:!0,data:e.markLines.map(a=>{if(a.type)return{type:a.type,...a.label?{label:{formatter:a.label}}:{},...a.color?{lineStyle:{color:a.color,type:a.lineType??"dashed"}}:{lineStyle:{type:a.lineType??"dashed"}}};const n={};return a.yValue!=null&&(n.yAxis=a.yValue),a.xValue!=null&&(n.xAxis=a.xValue),a.label&&(n.label={formatter:a.label}),n.lineStyle={color:a.color,type:a.lineType??"dashed"},n})}),e.markPoints?.length&&(r.markPoint={data:e.markPoints.map(a=>({...a.type?{type:a.type}:{},...a.label?{label:{formatter:a.label}}:{},...a.symbol?{symbol:a.symbol}:{},...a.symbolSize?{symbolSize:a.symbolSize}:{}}))}))}class vF{supportedTypes=[st.BAR,st.HORIZONTAL_BAR,st.GROUPED_BAR,st.STACKED_BAR,st.WATERFALL];build(t,e){const a=Ea(t),n=t.definition.chartType,i=n===st.HORIZONTAL_BAR,o=n===st.STACKED_BAR,s=n===st.WATERFALL,l=t.definition.chartTypeConfig??{};if(s)return this.buildWaterfall(t,e,a,l);const u=t.definition.i18n?.yAxisLabelKey?(()=>{const x=t.t(t.definition.i18n.yAxisLabelKey);return x!==t.definition.i18n.yAxisLabelKey?x:void 0})():void 0,f=ss(u,t.chartStylePreset,{integerValued:os(t,e)}),h=Cn(t.response.data,a).map(String),v=[...new Set(h)],c=t.definition.dataQuery.dimensions[0],d=!!c?.timeGranularity,p=x=>Di(x,c?.timeGranularity,ls(t)),g=e.some(x=>x.splitByDimension),y=d?us(c?.timeGranularity):void 0,m={hideOverlap:t.chartStylePreset.axis.hideOverlap??!0,...y?{formatter:y}:{}},_=g?{type:"category",data:d?v.map(p):v.map(x=>t.dimensionEnumLabels?.[a]?.[x]??x),axisLabel:m}:d?{type:"category",data:Cn(t.response.data,a).map(p),axisLabel:m}:hf(t.response.data,a,t.chartStylePreset,t.dimensionEnumLabels?.[a]),S=[];for(let x=0;x<e.length;x++){const b=e[x];if(b.splitByDimension){const w=gT(t.response.data,b.splitByDimension,b);for(let T=0;T<w.length;T++){const D=w[T],A=new Map;for(const L of t.response.data)if(String(L[b.splitByDimension])===D){const P=String(L[a]),R=L[b.measureRef];A.set(P,typeof R=="number"?R:Number(R)||0)}const C=v.map(L=>A.get(L)??null),I={type:"bar",name:xs(D,b,t,b.splitByDimension),data:C,itemStyle:{color:Ep(D,T,b,t.colorPalette,t.dimensionEnumColors[b.splitByDimension])},stack:o?"stack":void 0,...l.barGap!=null?{barGap:l.barGap}:{},...l.barCategoryGap!=null?{barCategoryGap:l.barCategoryGap}:{}};Pu(I,b),S.push(I)}}else{const w=Iu(t.response.data,b.measureRef),T=t.dimensionEnumColors[a],D=T?w.map((C,I)=>{const L=T.values[h[I]]??T.defaultColor;return L!=null?{value:C,itemStyle:{color:L}}:C}):w,A={type:"bar",name:Ke(b,t.t),data:D,itemStyle:{color:En(b,x,t.colorPalette)},stack:o?"stack":void 0,yAxisIndex:b.yAxisIndex,...l.barGap!=null?{barGap:l.barGap}:{},...l.barCategoryGap!=null?{barCategoryGap:l.barCategoryGap}:{}};Pu(A,b),S.push(A)}}return{series:S,xAxis:i?f:_,yAxis:i?_:f}}buildWaterfall(t,e,a,n){const i=e[0];if(!i)return{series:[]};const o=t.definition.dataQuery.dimensions[0],s=Cn(t.response.data,a),l=o?.timeGranularity?s.map(x=>Di(x,o.timeGranularity,ls(t))):s,u=o?.timeGranularity?us(o.timeGranularity):void 0,f=Iu(t.response.data,i.measureRef),h=[],v=[],c=[];let d=0;for(let x=0;x<f.length;x++){const b=f[x];b>=0?(h.push(d),v.push(b),c.push("-")):(h.push(d+b),v.push("-"),c.push(Math.abs(b))),d+=b}const p=t.colorPalette,g=n.waterfall,y=g?.gainColor??p[0]??"#5470c6",m=g?.lossColor??"#ee6666",_=(g?.gainLabelKey?(()=>{const x=t.t(g.gainLabelKey);return x!==g.gainLabelKey?x:void 0})():void 0)??g?.gainLabel??"Increase",S=(g?.lossLabelKey?(()=>{const x=t.t(g.lossLabelKey);return x!==g.lossLabelKey?x:void 0})():void 0)??g?.lossLabel??"Decrease";return{series:[{type:"bar",name:"__waterfall_base",stack:"waterfall",data:h,itemStyle:{color:"transparent",borderColor:"transparent"},emphasis:{itemStyle:{color:"transparent",borderColor:"transparent"}},tooltip:{show:!1},legendHoverLink:!1},{type:"bar",name:_,stack:"waterfall",data:v,itemStyle:{color:y}},{type:"bar",name:S,stack:"waterfall",data:c,itemStyle:{color:m}}],xAxis:{type:"category",data:l,axisLabel:{hideOverlap:t.chartStylePreset.axis.hideOverlap??!0,...u?{formatter:u}:{}}},yAxis:{type:"value"}}}}class dF{supportedTypes=[st.LINE,st.AREA,st.STACKED_AREA,st.STEP_LINE];_t;build(t,e){this._t=t.t;const a=Ea(t),n=t.definition.chartType,i=n===st.AREA||n===st.STACKED_AREA,o=n===st.STACKED_AREA,s=n===st.STEP_LINE,l=t.definition.chartTypeConfig??{},u=t.definition.dataQuery.dimensions[0],f=!!u?.timeGranularity,h=Cn(t.response.data,a).map(String),v=[...new Set(h)],d=e.some(x=>x.splitByDimension)?v:h,p=us(u?.timeGranularity),g=f?{type:"category",data:d.map(x=>Di(x,u?.timeGranularity,ls(t))),axisLabel:{hideOverlap:t.chartStylePreset.axis.hideOverlap??!0,...p?{formatter:p}:{}}}:hf(t.response.data,a,t.chartStylePreset,t.dimensionEnumLabels?.[a]),y=t.definition.i18n?.yAxisLabelKey?(()=>{const x=t.t(t.definition.i18n.yAxisLabelKey);return x!==t.definition.i18n.yAxisLabelKey?x:void 0})():void 0,m=ss(y,t.chartStylePreset,{integerValued:os(t,e)}),_=hF(t.response.data),S=[];for(let x=0;x<e.length;x++){const b=e[x];if(b.splitByDimension){const w=gT(t.response.data,b.splitByDimension,b);for(let T=0;T<w.length;T++){const D=w[T],A=Ep(D,T,b,t.colorPalette,t.dimensionEnumColors[b.splitByDimension]),C=xs(D,b,t,b.splitByDimension),{realValues:I,filledValues:L}=this.buildCategorySplitDataWithOverlay(t,b,a,D,v),P=this.buildLineItem(C,I,A,i,o,s,b,l);if(S.push(P),L.some(R=>R!==null)){const R=this.buildDashedOverlayItem(C,L,A,i,o,s,b,l);S.push(R)}}}else{const w=En(b,x,t.colorPalette),T=Ke(b,t.t);if(_){const{realValues:D,filledValues:A}=this.buildDensifiedValueSeries(t.response.data,a,b.measureRef,v),C=this.buildLineItem(T,D,w,i,o,s,b,l);if(C.yAxisIndex=b.yAxisIndex,C.connectNulls=b.style?.connectNulls??!1,S.push(C),A.some(I=>I!==null)){const I=this.buildDashedOverlayItem(T,A,w,i,o,s,b,l);I.yAxisIndex=b.yAxisIndex,I.connectNulls=!1,S.push(I)}}else{const D=Iu(t.response.data,b.measureRef),A=this.buildLineItem(T,D,w,i,o,s,b,l);A.yAxisIndex=b.yAxisIndex,S.push(A)}}}return{series:S,xAxis:g,yAxis:m}}buildLineItem(t,e,a,n,i,o,s,l){const u=l.symbolVisibilityThreshold??30,f={type:"line",name:t,data:e,itemStyle:{color:a},lineStyle:{color:a},showSymbol:e.length<=u};return this.applyLineVariant(f,n,i,o,s),Pu(f,s),f}buildDashedOverlayItem(t,e,a,n,i,o,s,l){const u=l.densifiedOverlay,f=l.densifiedOverlayNameKey?(()=>{const v=this._t?.(l.densifiedOverlayNameKey);return v&&v!==l.densifiedOverlayNameKey?v:"(filled)"})():"(filled)",h={type:"line",name:t?`${t} ${f}`:f,data:e,itemStyle:{color:a,opacity:u?.itemOpacity??.4},lineStyle:{color:a,type:u?.lineType??"dashed",opacity:u?.lineOpacity??.5,width:u?.lineWidth??1},showSymbol:u?.showSymbol??!1,legendHoverLink:!1,emphasis:{disabled:!0}};return(n||i)&&(h.areaStyle={opacity:u?.areaOpacity??.1}),i&&(h.stack="stack"),o&&(h.step=s.style?.step??"start"),h}buildDensifiedValueSeries(t,e,a,n){const i=new Map,o=new Map;for(const u of t){const f=String(u[e]),h=u[a];i.set(f,h==null?null:typeof h=="number"?h:Number(h)),o.set(f,Uv(u))}const s=[],l=[];for(let u=0;u<n.length;u++){const f=n[u],h=i.get(f)??null;if(o.get(f)??!1)s.push(null),l.push(h);else{s.push(h);const c=u>0&&(o.get(n[u-1])??!1),d=u<n.length-1&&(o.get(n[u+1])??!1);l.push(c||d?h:null)}}return{realValues:s,filledValues:l}}buildCategorySplitDataWithOverlay(t,e,a,n,i){const o=new Map,s=new Map;for(const f of t.response.data)if(String(f[e.splitByDimension])===n){const h=String(f[a]),v=f[e.measureRef];o.set(h,typeof v=="number"?v:Number(v)||0),s.set(h,Uv(f))}const l=[],u=[];for(let f=0;f<i.length;f++){const h=i[f],v=o.get(h)??null;if(s.get(h)??!1)l.push(null),u.push(v);else{l.push(v);const d=f>0&&(s.get(i[f-1])??!1),p=f<i.length-1&&(s.get(i[f+1])??!1);u.push(d||p?v:null)}}return{realValues:l,filledValues:u}}applyLineVariant(t,e,a,n,i){e&&(t.areaStyle={opacity:i.style?.areaOpacity??.3}),a&&(t.stack="stack",t.areaStyle={opacity:i.style?.areaOpacity??.3}),n&&(t.step=i.style?.step??"start")}}class pF{supportedTypes=[st.PIE,st.DONUT];build(t,e){const a=Ea(t),n=t.definition.chartType===st.DONUT,i=t.definition.chartTypeConfig??{},o=e[0];if(!o)return{series:[]};const s=i.itemNameFallbackKey?(()=>{const g=t.t(i.itemNameFallbackKey);return g!==i.itemNameFallbackKey?g:void 0})():void 0,l=t.dimensionEnumColors[a];let u=t.response.data.map((g,y)=>{const m=s?`${s} ${y}`:`Item ${y}`,_=String(g[a]??m),S=typeof g[o.measureRef]=="number"?g[o.measureRef]:Number(g[o.measureRef])||0;return{name:xs(_,o,t,a),value:S,_rawName:_,itemStyle:{color:Ep(_,y,o,t.colorPalette,l)}}});if(o.splitConfig?.exclude){const g=new Set(o.splitConfig.exclude);u=u.filter(y=>!g.has(y._rawName))}if(o.splitConfig?.order){const g=new Map(o.splitConfig.order.map((y,m)=>[y,m]));u.sort((y,m)=>{const _=g.get(y._rawName)??1/0,S=g.get(m._rawName)??1/0;return _===S?y._rawName.localeCompare(m._rawName):_-S})}const f=u.map(({_rawName:g,...y})=>y),h=n?["40%","70%"]:"70%",v=i.radius??h,c=t.definition.appearance?.emphasisShadow,d=t.chartStylePreset.emphasis;return{series:[{type:"pie",name:Ke(o,t.t),data:f,radius:v,...i.center?{center:i.center}:{},...i.startAngle!=null?{startAngle:i.startAngle}:{},...i.minAngle!=null?{minAngle:i.minAngle}:{},...i.roseType?{roseType:i.roseType}:{},...i.borderWidth!=null||i.borderColor?{itemStyle:{...i.borderWidth!=null?{borderWidth:i.borderWidth}:{},...i.borderColor?{borderColor:i.borderColor}:{}}}:{},avoidLabelOverlap:!0,labelLayout:{hideOverlap:!0},label:{show:i.showLabel??!0,formatter:i.labelFormatter??"{b}: {d}%",...i.labelPosition?{position:i.labelPosition}:{}},labelLine:{show:i.showLabel??!0},emphasis:{scale:!1,itemStyle:{color:"inherit",shadowBlur:c?.blur??d?.shadowBlur??10,shadowOffsetX:c?.offsetX??d?.shadowOffsetX??0,shadowColor:c?.color??d?.shadowColor??"rgba(0, 0, 0, 0.2)"}}}]}}}class gF{supportedTypes=[st.SCATTER,st.BUBBLE];build(t,e){const a=t.definition.dataQuery.dimensions,n=a[0]?.ref??"",i=t.definition.chartType===st.BUBBLE,o=t.definition.chartTypeConfig??{},[s,l]=o.bubbleSizeRange??[4,60],u=a[0],f=u?.timeGranularity!=null,h=u?.timeGranularity,v=ls(t),c=[];for(let g=0;g<e.length;g++){const y=e[g],m=t.response.data.map(S=>{const b=[f?Di(S[n],h,v):S[n],S[y.measureRef]];if(i&&t.definition.dataQuery.measures.length>1){const w=t.definition.dataQuery.measures[1]?.ref;w&&b.push(S[w])}return b}),_={type:"scatter",name:Ke(y,t.t),data:m,itemStyle:{color:En(y,g,t.colorPalette)},...o.symbolShape?{symbol:o.symbolShape}:{},symbolSize:i?S=>Math.min(Math.max(Number(S[2])||10,s),l):y.style?.pointSize??8};c.push(_)}const d=!f&&t.response.data.length>0&&t.response.data.every(g=>{const y=g[n];return typeof y=="number"||typeof y=="string"&&y.trim()!==""&&Number.isFinite(Number(y))}),p=f?fF(t.response.data,n,h,v,t.chartStylePreset):d?{type:"value"}:hf(t.response.data,n,t.chartStylePreset,t.dimensionEnumLabels?.[n]);return{series:c,xAxis:p,yAxis:ss(void 0,t.chartStylePreset,{integerValued:os(t,e)})}}}class yF{supportedTypes=[st.GAUGE];build(t,e){const a=e[0];if(!a)return{series:[]};const n=t.definition.chartTypeConfig??{},i=Ke(a,t.t),o=t.response.data[0],s=o&&Number(o[a.measureRef])||0;return{series:[{type:"gauge",name:i,data:[{value:s,name:i}],min:n.min??0,max:n.max??100,...n.splitNumber!=null?{splitNumber:n.splitNumber}:{},...n.radius?{radius:n.radius}:{},...n.startAngle!=null?{startAngle:n.startAngle}:{},...n.endAngle!=null?{endAngle:n.endAngle}:{},...n.pointer?{pointer:{...n.pointer.show!=null?{show:n.pointer.show}:{},...n.pointer.length?{length:n.pointer.length}:{},...n.pointer.width!=null?{width:n.pointer.width}:{}}}:{},...n.axisLineWidth||n.axisLineColors?{axisLine:{lineStyle:{...n.axisLineWidth?{width:n.axisLineWidth}:{},...n.axisLineColors?{color:n.axisLineColors}:{}}}}:{},detail:{formatter:n.detailFormatter??"{value}",fontSize:n.detailFontSize??20},progress:{show:n.showProgress??!0}}]}}}class mF{supportedTypes=[st.FUNNEL];build(t,e){const a=Ea(t),n=e[0];if(!n)return{series:[]};const i=t.definition.chartTypeConfig??{},o=t.response.data.map(u=>({name:xs(String(u[a]??""),n,t,a),value:typeof u[n.measureRef]=="number"?u[n.measureRef]:Number(u[n.measureRef])||0})),s=i.sort??"descending";return{series:[{type:"funnel",name:Ke(n,t.t),data:o,left:i.left??"10%",width:i.width??"80%",label:{show:i.showLabel??!0,position:i.labelPosition??"inside"},gap:i.gap??2,sort:s,...i.funnelAlign?{funnelAlign:i.funnelAlign}:{},...i.minSize?{minSize:i.minSize}:{},...i.maxSize?{maxSize:i.maxSize}:{}}]}}}class _F{supportedTypes=[st.RADAR];build(t,e){const a=Ea(t),n=t.definition.chartTypeConfig??{},i=t.response.data.map(s=>({name:xs(String(s[a]??""),e[0],t,a)})),o=[];for(let s=0;s<e.length;s++){const l=e[s],u=t.response.data.map(f=>{const h=f[l.measureRef];return typeof h=="number"?h:Number(h)||0});o.push({value:u,name:Ke(l,t.t),areaStyle:{opacity:n.areaOpacity??.2},lineStyle:{color:En(l,s,t.colorPalette)},itemStyle:{color:En(l,s,t.colorPalette)}})}return{series:[{type:"radar",data:o}],radar:{indicator:i,shape:n.shape??"polygon",...n.center?{center:n.center}:{},...n.radius?{radius:n.radius}:{},...n.startAngle!=null?{startAngle:n.startAngle}:{},...n.nameGap!=null?{nameGap:n.nameGap}:{},splitArea:{show:n.showSplitArea??!1}}}}}class SF{supportedTypes=[st.SANKEY];build(t,e){const a=e[0];if(!a)return{series:[]};const n=t.definition.chartTypeConfig??{},i=t.definition.dataQuery.dimensions,o=i[0]?.ref??"",s=i[1]?.ref??o,l=a.measureRef,u=new Set,f=[];for(const c of t.response.data){const d=String(c[o]??""),p=String(c[s]??""),g=Number(c[l])||0;u.add(d),u.add(p),f.push({source:d,target:p,value:g})}const h=Array.from(u).map(c=>({name:c})),v={type:"sankey",name:Ke(a,t.t),layout:"none",emphasis:{focus:n.emphasisFocus??"adjacency"},...n.nodeWidth!=null?{nodeWidth:n.nodeWidth}:{},...n.nodeGap!=null?{nodeGap:n.nodeGap}:{},...n.orient?{orient:n.orient}:{},...n.draggable!=null?{draggable:n.draggable}:{},...n.labelPosition?{label:{position:n.labelPosition}}:{},data:h,links:f};return a.style?.color&&(v.itemStyle={color:a.style.color}),{series:[v]}}}class bF{supportedTypes=[st.SUNBURST,st.TREEMAP];build(t,e){const a=e[0];if(!a)return{series:[]};const n=t.definition.chartTypeConfig??{},i=t.definition.dataQuery.dimensions,o=a.measureRef,s=i.map(h=>h.ref),l=this.buildTree(t.response.data,s,o),u=t.definition.chartType===st.SUNBURST,f={type:u?"sunburst":"treemap",name:Ke(a,t.t),data:l};if(u){const[h,v]=n.sunburstRadius??["15%","90%"];f.radius=[h,v],f.sort=void 0,f.emphasis={focus:n.sunburstEmphasisFocus??"ancestor"};const c=parseFloat(h)||15,p=(parseFloat(v)||90)-c,g=`${Math.round(c+p*.33)}%`,y=`${Math.round(c+p*.73)}%`,m=n.sunburstLevels;f.levels=[{},{r0:h,r:g,label:{rotate:m?.level1LabelRotate??"tangential"}},{r0:g,r:y,label:{align:m?.level2LabelAlign??"right"}},{r0:y,r:v,label:{position:m?.level3LabelPosition??"outside",padding:m?.level3LabelPadding??3,silent:!1}}]}else f.leafDepth=n.treemapLeafDepth??(s.length>1?2:1),f.visibleMin=n.treemapVisibleMin??300,f.label={show:n.treemapShowLabel??!0,formatter:n.treemapLabelFormatter??"{b}"},f.upperLabel={show:n.treemapShowUpperLabel??!0,height:n.treemapUpperLabelHeight??30},f.breadcrumb={show:n.showBreadcrumb??!0};return{series:[f]}}buildTree(t,e,a){if(e.length===0)return[];if(e.length===1)return t.map(i=>({name:String(i[e[0]]??""),value:Number(i[a])||0}));const n=new Map;for(const i of t){let o=null;for(let s=0;s<e.length;s++){const l=String(i[e[s]]??""),u=s===e.length-1;if(s===0){if(!n.has(l)){const h={name:l,children:[]};n.set(l,{node:h,childMap:new Map})}o=n.get(l).node}else if(o)if(o.children||(o.children=[]),u)o.children.push({name:l,value:Number(i[a])||0});else{const f=o.children.find(h=>h.name===l);if(f)o=f;else{const h={name:l,children:[]};o.children.push(h),o=h}}}}return Array.from(n.values()).map(i=>i.node)}}class xF{supportedTypes=[st.HEATMAP];build(t,e){const a=e[0];if(!a)return{series:[]};const n=t.definition.chartTypeConfig??{},i=t.definition.dataQuery.dimensions,o=i[0]?.ref??"",s=i[1]?.ref??o,l=a.measureRef,u=[...new Set(t.response.data.map(b=>String(b[o]??"")))],f=[...new Set(t.response.data.map(b=>String(b[s]??"")))],h=new Map(u.map((b,w)=>[b,w])),v=new Map(f.map((b,w)=>[b,w]));let c=1/0,d=-1/0;const p=[];for(const b of t.response.data){const w=h.get(String(b[o]??""))??0,T=v.get(String(b[s]??""))??0,D=Number(b[l])||0;p.push([w,T,D]),D<c&&(c=D),D>d&&(d=D)}c===1/0&&(c=0),d===-1/0&&(d=0),c===d&&(d=c+1);const g=t.definition.appearance?.emphasisShadow,y=t.chartStylePreset.emphasis,m={type:"heatmap",name:a.name,data:p,label:{show:n.showLabel??!0},emphasis:{itemStyle:{shadowBlur:g?.blur??y?.shadowBlur??10,shadowColor:g?.color??y?.shadowColor??"rgba(0, 0, 0, 0.5)"}}},_=n.visualMapOrient??"horizontal",S=n.visualMapPosition??"bottom",x=n.showSplitArea??!0;return{series:[m],xAxis:{type:"category",data:u,splitArea:{show:x}},yAxis:{type:"category",data:f,splitArea:{show:x}},visualMap:{min:n.visualMapMin??c,max:n.visualMapMax??d,calculable:n.visualMapCalculable??!0,orient:_,...n.visualMapInRange?{inRange:{color:n.visualMapInRange}}:{},..._==="horizontal"?{left:"center",[S]:0}:{top:"center",[S]:0}}}}}class wF{supportedTypes=[st.BOXPLOT];build(t,e){const a=e[0];if(!a)return{series:[]};const n=t.definition.chartTypeConfig??{},i=Ea(t),o=Cn(t.response.data,i),s=t.definition.dataQuery.measures,l=s.length>=5;let u;if(l){const v=d=>s.find(p=>d.some(g=>p.ref.toLowerCase().endsWith(`_${g}`)||p.label?.toLowerCase()===g)),c=(()=>{const d=v(["min"]),p=v(["q1","lower_quartile"]),g=v(["median","med","p50"]),y=v(["q3","upper_quartile"]),m=v(["max"]);return d&&p&&g&&y&&m?[d,p,g,y,m]:s.slice(0,5)})();u=t.response.data.map(d=>c.map(p=>Number(d[p.ref])||0))}else u=t.response.data.map(v=>{const c=v[a.measureRef];if(Array.isArray(c))return this.computeBoxplotStats(c.map(Number).filter(p=>!isNaN(p)));const d=Number(c)||0;return[d,d,d,d,d]});const f=Ke(a,t.t);return{series:[{type:"boxplot",name:f,data:u}],xAxis:{type:"category",data:o,boundaryGap:n.boundaryGap??!0,axisLabel:{hideOverlap:t.chartStylePreset.axis.hideOverlap??!0}},yAxis:{type:"value",name:f}}}computeBoxplotStats(t){if(t.length===0)return[0,0,0,0,0];const e=[...t].sort((u,f)=>u-f),a=e.length,n=e[0],i=e[a-1],o=this.percentile(e,50),s=this.percentile(e,25),l=this.percentile(e,75);return[n,s,o,l,i]}percentile(t,e){const a=e/100*(t.length-1),n=Math.floor(a),i=Math.ceil(a);if(n===i)return t[n];const o=a-n;return t[n]+o*(t[i]-t[n])}}class TF{supportedTypes=[st.PARALLEL];build(t,e){const a=e[0];if(!a)return{series:[]};const n=t.definition.chartTypeConfig??{},i=t.definition.dataQuery.measures,o=Ea(t),s=i.map((c,d)=>({dim:d,name:c.label||c.ref})),l=t.response.data.map(c=>i.map(d=>Number(c[d.ref])||0)),u=t.response.data.map(c=>String(c[o]??"")),f=En(a,0,t.colorPalette),h=n.layoutMargins;return{series:[{type:"parallel",name:Ke(a,t.t),data:l.map((c,d)=>({value:c,name:u[d]})),lineStyle:{width:n.lineWidth??2,opacity:n.lineOpacity??.6,color:f},emphasis:{lineStyle:{width:n.emphasisLineWidth??4,opacity:n.emphasisOpacity??1}}}],parallelAxis:s,parallel:{left:h?.left??"5%",right:h?.right??"13%",bottom:h?.bottom??"10%",top:h?.top??"10%"}}}}function CF(r){switch(r){case st.LINE:case st.STEP_LINE:case st.AREA:case st.STACKED_AREA:return"line";case st.SCATTER:case st.BUBBLE:return"scatter";case st.BAR:case st.HORIZONTAL_BAR:case st.GROUPED_BAR:case st.STACKED_BAR:case st.WATERFALL:default:return"bar"}}class MF{supportedTypes=[st.COMPOSED];build(t,e){const a=Ea(t),n=[];let i=!1;for(let c=0;c<e.length;c++){const d=e[c],p=CF(d.chartType),g=En(d,c,t.colorPalette),y=Iu(t.response.data,d.measureRef),m={type:p,name:Ke(d,t.t),data:y,itemStyle:{color:g},yAxisIndex:d.yAxisIndex??0};(d.chartType===st.AREA||d.chartType===st.STACKED_AREA)&&(m.areaStyle={opacity:d.style?.areaOpacity??.3}),(d.chartType===st.STACKED_BAR||d.chartType===st.STACKED_AREA)&&(m.stack="composed_stack"),d.chartType===st.STEP_LINE&&(m.step=d.style?.step??"start"),Pu(m,d),(d.yAxisIndex??0)>0&&(i=!0),n.push(m)}const o=t.definition.dataQuery.dimensions[0],s=us(o?.timeGranularity),l=o?.timeGranularity?{type:"category",data:Cn(t.response.data,a).map(c=>Di(c,o.timeGranularity,ls(t))),axisLabel:{hideOverlap:t.chartStylePreset.axis.hideOverlap??!0,...s?{formatter:s}:{}}}:hf(t.response.data,a,t.chartStylePreset,t.dimensionEnumLabels?.[a]),u=t.definition.i18n?.yAxisLabelKey?(()=>{const c=t.t(t.definition.i18n.yAxisLabelKey);return c!==t.definition.i18n.yAxisLabelKey?c:void 0})():void 0,f=e.filter(c=>(c.yAxisIndex??0)===0),h=e.filter(c=>(c.yAxisIndex??0)>0),v=[ss(u,t.chartStylePreset,{integerValued:os(t,f)})];if(i){const c=t.definition.i18n?.yAxisSecondaryLabelKey?(()=>{const p=t.t(t.definition.i18n.yAxisSecondaryLabelKey);return p!==t.definition.i18n.yAxisSecondaryLabelKey?p:void 0})():void 0,d=ss(c,t.chartStylePreset,{integerValued:os(t,h)});d.position="right",d.splitLine={show:!1},v.push(d)}return{series:n,xAxis:l,yAxis:v.length===1?v[0]:v}}}const AF=[new vF,new dF,new pF,new gF,new yF,new mF,new _F,new SF,new bF,new xF,new wF,new TF,new MF],yT=new Map;for(const r of AF)for(const t of r.supportedTypes)yT.set(t,r);const U_=new Set(["pie","donut","funnel","radar","sankey","sunburst","treemap","gauge","heatmap"]),DF=new Set(["pie","donut","funnel","sankey"]);function LF(r,t,e){const a={...r.gridPadding};if(e&&e>1&&(a.bottom=Math.max(a.bottom,r.multiSeriesLegendBottomPadding??50)),t?.gridPadding){const n=t.gridPadding;n.top!==void 0&&(a.top=n.top),n.right!==void 0&&(a.right=n.right),n.bottom!==void 0&&(a.bottom=n.bottom),n.left!==void 0&&(a.left=n.left)}return a}const IF=r=>r;function PF(r,t,e={width:800,height:400},a,n=IF,i={colors:{},order:{},labels:{}}){const o=a??eF(),s=r.appearance,l=r.i18n,u=r.dataQuery.dimensions[0]?.ref,f=u?i.order[u]:void 0,h=Array.isArray(r.dataQuery.orderBy)&&r.dataQuery.orderBy.length>0,v=u&&f&&!h?{...t,data:lF(t.data,u,f)}:t,c=s?.colorPalette?.length?s.colorPalette:nF(o),d=r.chartType,p=yT.get(d);if(!p)return console.warn(`EChartsOptionBuilder: no builder for chart type '${d}'`),{series:[]};const g={definition:r,response:v,containerSize:e,colorPalette:c,chartStylePreset:o,t:n,dimensionEnumColors:i.colors,dimensionEnumLabels:i.labels},y=p.build(g,r.series),m=DF.has(d)||r.series.length>1||r.series.some(O=>O.splitByDimension),_=s?.showLegend??m,S=s?.showTooltip??!0,x=LF(o,s,r.series.length),b=s?.animated??o.animation.enabled,w=s?.animationDuration??o.animation.durationMs,T=s?.animationEasing??o.animation.easing;let D="transparent";s?.background&&(D=s.background==="surface"?pT("--background","#ffffff"):s.background);const A=s?.title,C=l?.titleKey?Y_(n,l.titleKey,A?.text):A?.text,I=l?.subtitleKey?Y_(n,l.subtitleKey,A?.subtext):A?.subtext,L=s?.tooltip,P=U_.has(d)?"item":"axis",R=s?.legend,E={series:y.series,...C?{title:{text:C,...I?{subtext:I}:{},left:A?.left??"left",...A?.top!=null?{top:A.top}:{},...A?.textAlign?{textAlign:A.textAlign}:{},textStyle:{fontSize:o.typography.titleFontSize,fontWeight:o.typography.titleFontWeight},subtextStyle:{fontSize:o.typography.subtitleFontSize}}}:{},tooltip:S?{trigger:L?.trigger??P,confine:L?.confine??!0,...L?.formatter?{formatter:L.formatter}:{},...L?.axisPointerType&&L.axisPointerType!=="none"?{axisPointer:{type:L.axisPointerType}}:{}}:{show:!1},legend:{show:_,type:R?.type??"scroll",...R?.position==="top"?{top:0}:R?.position==="left"?{left:0,orient:"vertical"}:R?.position==="right"?{right:0,orient:"vertical"}:{bottom:0},...R?.orient?{orient:R.orient}:{},...R?.itemGap!=null?{itemGap:R.itemGap}:{},...R?.pageSize!=null?{pageSize:R.pageSize}:{},...U_.has(d)?{}:{data:y.series.map(O=>O.name).filter(O=>typeof O=="string"&&!O.startsWith("__"))}},grid:{...x,containLabel:!0},...D!=="transparent"?{backgroundColor:D}:{},animation:b,animationDuration:w,animationEasing:T,media:cF(o,!!(y.xAxis||y.yAxis),d===st.PIE||d===st.DONUT)};if(s?.toolbox?.show){const O=s.toolbox;E.toolbox={show:!0,right:O.right??10,top:O.top??10,feature:{...O.saveAsImage?{saveAsImage:{type:"png"}}:{},...O.dataView?{dataView:{readOnly:!0}}:{},...O.restore?{restore:{}}:{},...O.magicType?.length?{magicType:{type:O.magicType}}:{}}}}if(s?.dataZoom?.enabled){const O=s.dataZoom,k=O.type??["slider"],z=[];for(const V of k){const G={type:V,start:O.start??0,end:O.end??100};(O.axis==="both"||O.axis==="x"||!O.axis)&&z.push({...G,xAxisIndex:0}),(O.axis==="both"||O.axis==="y")&&z.push({...G,yAxisIndex:0})}E.dataZoom=z}y.xAxis&&(E.xAxis=y.xAxis),y.yAxis&&(E.yAxis=y.yAxis),y.radar&&(E.radar=y.radar);for(const[O,k]of Object.entries(y))!["series","xAxis","yAxis","radar"].includes(O)&&!O.startsWith("_")&&(E[O]=k);return E}function Y_(r,t,e){const a=r(t);return a!==t?a:e}const RF=({option:r,theme:t,className:e,style:a,notMerge:n=!0,lazyUpdate:i=!1,onChartReady:o})=>{const s=Zt.useRef(null),l=Zt.useRef(null),u=Zt.useRef(r);u.current=r;const f=Zt.useRef(o);f.current=o,Zt.useEffect(()=>{const v=s.current;if(!v)return;const c=oP(v,t);return l.current=c,u.current&&c.setOption(u.current,{notMerge:n,lazyUpdate:i}),f.current?.(c),()=>{c.dispose(),l.current=null}},[t]);const h=Zt.useRef(!0);return Zt.useEffect(()=>{if(h.current){h.current=!1;return}const v=l.current;v&&!v.isDisposed()&&r&&v.setOption(r,{notMerge:n,lazyUpdate:i})},[r,n,i]),nn.jsx("div",{ref:s,className:e,style:a})},OF=({viewRef:r,document:t,viewDefinition:e,runtimeDescriptor:a,contextResourceIdentifiers:n,urlParamValues:i,inputs:o,className:s="",width:l="100%",height:u=400,localErrorOnly:f=!1})=>{const{registry:h}=xT(),{getChartStylePreset:v,isDark:c}=wT(),d=v(),{t:p,isReady:g}=Op({component:TT.HIGH_LEVEL_VIEWS_CHART}),y=Zt.useRef(null),m=Zt.useRef(null);iF(d);const _=Zt.useMemo(()=>e?void 0:CT({viewRef:r,registry:h}),[e,r,h]),S=e??_?.chartView,x=Zt.useMemo(()=>a??(_?MT({identity:_.identity,chartView:_.chartView,contextResourceIdentifiers:n??{}}):void 0),[a,_,n]),b=IT({surfaceDefinition:S,chartDefinition:t,runtimeDescriptor:x,explicitContextResourceIdentifiers:n,explicitInputs:o,urlParamValues:i}),w=b?.chartDefinition,{data:T,loading:D,error:A,refetch:C}=PT(w,b?.executionChartRef,b?.resolvedInputs,b?.contextResourceIdentifiers,i,f),I=Zt.useCallback(k=>{if(y.current?.disconnect(),y.current=null,!k)return;const z=new ResizeObserver(()=>{const V=m.current?.getEchartsInstance?.();V&&!V.isDisposed?.()&&V.resize()});z.observe(k),y.current=z},[]),L=Zt.useCallback(k=>{m.current={getEchartsInstance:()=>k}},[]),{tResourceFieldEnumValue:P,isReady:R}=Op({resource:w?.dataQuery.mainResourceType}),E=Zt.useMemo(()=>w?sF(w,k=>h.resourceConfigurations[k],P):{colors:{},order:{},labels:{}},[w,h,c,P,R]),O=Zt.useMemo(()=>w&&T&&T.data.length>0?PF(w,T,void 0,d,p,E):null,[w,T,d,p,E]);return w?D&&!T?nn.jsx(DT,{height:u}):A?nn.jsx(RT,{error:A,onRetry:C}):O?!g||!R?null:nn.jsx("div",{ref:I,className:LT("chart-view",s),style:{width:l,height:u,position:"relative"},children:nn.jsx(RF,{option:O,theme:aF(),style:{width:"100%",height:"100%"},notMerge:!0,lazyUpdate:!1,onChartReady:L},c?"dark":"light")}):nn.jsx(ET,{}):nn.jsx(AT,{viewKind:"chart",viewRef:r})};export{OF as ChartView,OF as default};
|