q2-tecton-elements 1.18.0 → 1.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/click-elsewhere.cjs.entry.js +1 -1
- package/dist/cjs/{icons-e2bc9ee9.js → icons-afbdf88a.js} +1 -1
- package/dist/cjs/{index-eccd5617.js → index-3518c78c.js} +1 -1
- package/dist/cjs/{index-0128397d.js → index-734296a7.js} +476 -271
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/q2-avatar.cjs.entry.js +9 -6
- package/dist/cjs/q2-badge_2.cjs.entry.js +46 -7
- package/dist/cjs/q2-btn_2.cjs.entry.js +30 -5
- package/dist/cjs/q2-calendar.cjs.entry.js +89 -62
- package/dist/cjs/q2-card.cjs.entry.js +17 -6
- package/dist/cjs/q2-carousel-pane.cjs.entry.js +7 -3
- package/dist/cjs/q2-carousel.cjs.entry.js +196 -285
- package/dist/cjs/q2-chart-donut.cjs.entry.js +583 -504
- package/dist/cjs/q2-checkbox-group.cjs.entry.js +9 -7
- package/dist/cjs/q2-checkbox.cjs.entry.js +17 -4
- package/dist/cjs/q2-dropdown-item.cjs.entry.js +9 -3
- package/dist/cjs/q2-dropdown.cjs.entry.js +16 -5
- package/dist/cjs/q2-editable-field.cjs.entry.js +16 -6
- package/dist/cjs/q2-icon.cjs.entry.js +6 -4
- package/dist/cjs/q2-loading-element.cjs.entry.js +6 -2
- package/dist/cjs/q2-loc.cjs.entry.js +5 -3
- package/dist/cjs/q2-message.cjs.entry.js +4 -3
- package/dist/cjs/q2-month-picker.cjs.entry.js +9 -7
- package/dist/cjs/q2-optgroup.cjs.entry.js +6 -5
- package/dist/cjs/q2-option-list_2.cjs.entry.js +21 -7
- package/dist/cjs/q2-option.cjs.entry.js +12 -2
- package/dist/cjs/q2-pagination.cjs.entry.js +11 -3
- package/dist/cjs/q2-pill.cjs.entry.js +25 -7
- package/dist/cjs/q2-radio-group.cjs.entry.js +13 -6
- package/dist/cjs/q2-radio.cjs.entry.js +13 -8
- package/dist/cjs/q2-section.cjs.entry.js +9 -4
- package/dist/cjs/q2-select.cjs.entry.js +26 -17
- package/dist/cjs/q2-stepper-pane.cjs.entry.js +8 -3
- package/dist/cjs/q2-stepper-vertical.cjs.entry.js +5 -4
- package/dist/cjs/q2-stepper.cjs.entry.js +9 -7
- package/dist/cjs/q2-tab-container.cjs.entry.js +14 -9
- package/dist/cjs/q2-tab-pane.cjs.entry.js +10 -2
- package/dist/cjs/q2-tag.cjs.entry.js +20 -7
- package/dist/cjs/q2-tecton-elements.cjs.js +3 -3
- package/dist/cjs/q2-textarea.cjs.entry.js +20 -4
- package/dist/cjs/q2-tooltip.cjs.entry.js +9 -3
- package/dist/cjs/{shapes-c1a60d46.js → shapes-aad2b98f.js} +1 -1
- package/dist/cjs/tecton-tab-pane.cjs.entry.js +17 -2
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/click-elsewhere/index.js +18 -17
- package/dist/collection/components/q2-avatar/index.js +100 -92
- package/dist/collection/components/q2-avatar/styles.css +1 -1
- package/dist/collection/components/q2-badge/index.js +119 -111
- package/dist/collection/components/q2-badge/styles.css +1 -1
- package/dist/collection/components/q2-btn/index.js +349 -322
- package/dist/collection/components/q2-btn/styles.css +7 -7
- package/dist/collection/components/q2-calendar/index.js +565 -551
- package/dist/collection/components/q2-calendar/q2-month-picker.css +1 -1
- package/dist/collection/components/q2-calendar/q2-month-picker.js +112 -116
- package/dist/collection/components/q2-calendar/styles.css +1 -1
- package/dist/collection/components/q2-card/index.js +262 -244
- package/dist/collection/components/q2-card/styles.css +9 -2
- package/dist/collection/components/q2-carousel/index.js +249 -253
- package/dist/collection/components/q2-carousel/styles.css +1 -1
- package/dist/collection/components/q2-carousel-pane/index.js +108 -96
- package/dist/collection/components/q2-carousel-pane/styles.css +5 -4
- package/dist/collection/components/q2-chart-donut/index.js +350 -334
- package/dist/collection/components/q2-chart-donut/styles.css +3 -3
- package/dist/collection/components/q2-checkbox/index.js +296 -287
- package/dist/collection/components/q2-checkbox/styles.css +2 -2
- package/dist/collection/components/q2-checkbox-group/index.js +156 -152
- package/dist/collection/components/q2-checkbox-group/styles.css +1 -1
- package/dist/collection/components/q2-dropdown/index.js +255 -240
- package/dist/collection/components/q2-dropdown/styles.css +1 -1
- package/dist/collection/components/q2-dropdown-item/index.js +134 -123
- package/dist/collection/components/q2-dropdown-item/styles.css +12 -10
- package/dist/collection/components/q2-editable-field/index.js +300 -293
- package/dist/collection/components/q2-editable-field/styles.css +1 -1
- package/dist/collection/components/q2-icon/icons.js +358 -2158
- package/dist/collection/components/q2-icon/index.js +59 -49
- package/dist/collection/components/q2-icon/styles.css +1 -1
- package/dist/collection/components/q2-input/index.js +729 -705
- package/dist/collection/components/q2-input/styles.css +2 -2
- package/dist/collection/components/q2-loading/index.js +143 -132
- package/dist/collection/components/q2-loading/skeleton/q2-loading-element/index.js +85 -74
- package/dist/collection/components/q2-loading/skeleton/shapes.js +23 -36
- package/dist/collection/components/q2-loading/styles.css +1 -1
- package/dist/collection/components/q2-loc/index.js +49 -39
- package/dist/collection/components/q2-loc/styles.css +1 -1
- package/dist/collection/components/q2-message/index.js +101 -92
- package/dist/collection/components/q2-message/styles.css +1 -1
- package/dist/collection/components/q2-optgroup/index.js +64 -56
- package/dist/collection/components/q2-optgroup/styles.css +1 -1
- package/dist/collection/components/q2-option/index.js +244 -229
- package/dist/collection/components/q2-option/styles.css +5 -1
- package/dist/collection/components/q2-option-list/index.js +291 -270
- package/dist/collection/components/q2-option-list/styles.css +1 -1
- package/dist/collection/components/q2-pagination/index.js +183 -179
- package/dist/collection/components/q2-pagination/styles.css +1 -1
- package/dist/collection/components/q2-pill/index.js +260 -208
- package/dist/collection/components/q2-pill/styles.css +1 -1
- package/dist/collection/components/q2-popover/index.js +169 -151
- package/dist/collection/components/q2-popover/styles.css +2 -2
- package/dist/collection/components/q2-radio/index.js +233 -224
- package/dist/collection/components/q2-radio/styles.css +3 -3
- package/dist/collection/components/q2-radio-group/index.js +252 -244
- package/dist/collection/components/q2-radio-group/styles.css +1 -1
- package/dist/collection/components/q2-section/index.js +134 -125
- package/dist/collection/components/q2-section/styles.css +12 -1
- package/dist/collection/components/q2-select/index.js +393 -381
- package/dist/collection/components/q2-select/styles.css +1 -1
- package/dist/collection/components/q2-stepper/index.js +124 -126
- package/dist/collection/components/q2-stepper/styles.css +2 -1
- package/dist/collection/components/q2-stepper-pane/index.js +165 -149
- package/dist/collection/components/q2-stepper-pane/styles.css +1 -1
- package/dist/collection/components/q2-stepper-vertical/index.js +86 -85
- package/dist/collection/components/q2-stepper-vertical/styles.css +1 -1
- package/dist/collection/components/q2-tab-container/index.js +189 -184
- package/dist/collection/components/q2-tab-container/styles.css +1 -1
- package/dist/collection/components/q2-tab-pane/index.js +185 -166
- package/dist/collection/components/q2-tab-pane/styles.css +1 -1
- package/dist/collection/components/q2-tag/index.js +168 -116
- package/dist/collection/components/q2-tag/styles.css +1 -1
- package/dist/collection/components/q2-textarea/index.js +344 -327
- package/dist/collection/components/q2-textarea/styles.css +2 -2
- package/dist/collection/components/q2-tooltip/index.js +147 -133
- package/dist/collection/components/q2-tooltip/styles.css +1 -1
- package/dist/collection/components/tecton-tab-pane/index.js +287 -266
- package/dist/collection/components/tecton-tab-pane/styles.css +1 -1
- package/dist/collection/utils/index.js +2 -6
- package/dist/esm/click-elsewhere.entry.js +1 -1
- package/dist/esm/{icons-ed54e307.js → icons-78da5dd2.js} +1 -1
- package/dist/esm/{index-eac6b89e.js → index-9c591682.js} +1 -1
- package/dist/esm/{index-6d5ed7cc.js → index-bb1c8c7f.js} +476 -271
- package/dist/esm/loader.js +3 -3
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/q2-avatar.entry.js +9 -6
- package/dist/esm/q2-badge_2.entry.js +46 -7
- package/dist/esm/q2-btn_2.entry.js +30 -5
- package/dist/esm/q2-calendar.entry.js +89 -62
- package/dist/esm/q2-card.entry.js +17 -6
- package/dist/esm/q2-carousel-pane.entry.js +7 -3
- package/dist/esm/q2-carousel.entry.js +196 -285
- package/dist/esm/q2-chart-donut.entry.js +583 -504
- package/dist/esm/q2-checkbox-group.entry.js +9 -7
- package/dist/esm/q2-checkbox.entry.js +17 -4
- package/dist/esm/q2-dropdown-item.entry.js +9 -3
- package/dist/esm/q2-dropdown.entry.js +16 -5
- package/dist/esm/q2-editable-field.entry.js +16 -6
- package/dist/esm/q2-icon.entry.js +6 -4
- package/dist/esm/q2-loading-element.entry.js +6 -2
- package/dist/esm/q2-loc.entry.js +5 -3
- package/dist/esm/q2-message.entry.js +4 -3
- package/dist/esm/q2-month-picker.entry.js +9 -7
- package/dist/esm/q2-optgroup.entry.js +6 -5
- package/dist/esm/q2-option-list_2.entry.js +21 -7
- package/dist/esm/q2-option.entry.js +12 -2
- package/dist/esm/q2-pagination.entry.js +11 -3
- package/dist/esm/q2-pill.entry.js +25 -7
- package/dist/esm/q2-radio-group.entry.js +13 -6
- package/dist/esm/q2-radio.entry.js +13 -8
- package/dist/esm/q2-section.entry.js +9 -4
- package/dist/esm/q2-select.entry.js +26 -17
- package/dist/esm/q2-stepper-pane.entry.js +8 -3
- package/dist/esm/q2-stepper-vertical.entry.js +5 -4
- package/dist/esm/q2-stepper.entry.js +9 -7
- package/dist/esm/q2-tab-container.entry.js +14 -9
- package/dist/esm/q2-tab-pane.entry.js +10 -2
- package/dist/esm/q2-tag.entry.js +20 -7
- package/dist/esm/q2-tecton-elements.js +3 -3
- package/dist/esm/q2-textarea.entry.js +20 -4
- package/dist/esm/q2-tooltip.entry.js +9 -3
- package/dist/esm/{shapes-c32e3ba2.js → shapes-62b8a431.js} +1 -1
- package/dist/esm/tecton-tab-pane.entry.js +17 -2
- package/dist/loader/package.json +1 -0
- package/dist/q2-tecton-elements/p-0ba564b1.entry.js +1 -0
- package/dist/q2-tecton-elements/p-0fad9c5a.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-73154834.js → p-13a639cf.js} +1 -1
- package/dist/q2-tecton-elements/p-16c11d74.entry.js +1 -0
- package/dist/q2-tecton-elements/p-17e0cbf1.entry.js +1 -0
- package/dist/q2-tecton-elements/p-18e095af.entry.js +1 -0
- package/dist/q2-tecton-elements/p-2c9b1308.entry.js +1 -0
- package/dist/q2-tecton-elements/p-2e832e42.entry.js +1 -0
- package/dist/q2-tecton-elements/p-315fdb74.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-c608e3c9.entry.js → p-444415b5.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-4d700630.entry.js +1 -0
- package/dist/q2-tecton-elements/p-4f0f45e7.entry.js +1 -0
- package/dist/q2-tecton-elements/p-54e792bd.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-80014da0.js → p-5e374fbd.js} +1 -1
- package/dist/q2-tecton-elements/p-5f064e1e.entry.js +39 -0
- package/dist/q2-tecton-elements/p-692f2d09.entry.js +1 -0
- package/dist/q2-tecton-elements/p-6e6b5b80.entry.js +1 -0
- package/dist/q2-tecton-elements/p-7e8f43d1.entry.js +1 -0
- package/dist/q2-tecton-elements/p-8e380edf.entry.js +1 -0
- package/dist/q2-tecton-elements/p-926a3e80.js +2 -0
- package/dist/q2-tecton-elements/{p-93c00587.js → p-92e1faf8.js} +1 -1
- package/dist/q2-tecton-elements/p-9772b15f.entry.js +1 -0
- package/dist/q2-tecton-elements/p-97aa8423.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-17cffd7d.entry.js → p-a987402e.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-aaf42539.entry.js +1 -0
- package/dist/q2-tecton-elements/p-ac674c20.entry.js +1 -0
- package/dist/q2-tecton-elements/p-b8b00394.entry.js +1 -0
- package/dist/q2-tecton-elements/p-c444a60b.entry.js +1 -0
- package/dist/q2-tecton-elements/p-c6c489fe.entry.js +1 -0
- package/dist/q2-tecton-elements/p-ce015552.entry.js +1 -0
- package/dist/q2-tecton-elements/p-d464fccc.entry.js +1 -0
- package/dist/q2-tecton-elements/p-de164483.entry.js +1 -0
- package/dist/q2-tecton-elements/p-df91e954.entry.js +1 -0
- package/dist/q2-tecton-elements/p-e6d26f39.entry.js +1 -0
- package/dist/q2-tecton-elements/p-e8e113c2.entry.js +1 -0
- package/dist/q2-tecton-elements/p-f1d06917.entry.js +1 -0
- package/dist/q2-tecton-elements/p-f800fd1e.entry.js +1 -0
- package/dist/q2-tecton-elements/p-fb37e67e.entry.js +1 -0
- package/dist/q2-tecton-elements/p-fc134a5d.entry.js +1 -0
- package/dist/q2-tecton-elements/p-fe88e979.entry.js +1 -0
- package/dist/q2-tecton-elements/p-ffb48ccc.entry.js +1 -0
- package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
- package/dist/test/helpers.js +6 -0
- package/dist/types/components/q2-pill/index.d.ts +3 -0
- package/dist/types/components/q2-tag/index.d.ts +3 -0
- package/dist/types/components.d.ts +154 -38
- package/dist/types/stencil-public-runtime.d.ts +20 -4
- package/dist/types/workspace/workspace/Tecton_tecton-production_master/packages/q2-tecton-elements/.stencil/test/helpers.d.ts +2 -0
- package/package.json +6 -6
- package/dist/q2-tecton-elements/p-02c1b7fd.entry.js +0 -1
- package/dist/q2-tecton-elements/p-04c743f2.entry.js +0 -1
- package/dist/q2-tecton-elements/p-07dc509c.entry.js +0 -1
- package/dist/q2-tecton-elements/p-12caa479.entry.js +0 -1
- package/dist/q2-tecton-elements/p-160dd1c2.entry.js +0 -1
- package/dist/q2-tecton-elements/p-1a3de749.entry.js +0 -1
- package/dist/q2-tecton-elements/p-2061c3fd.entry.js +0 -1
- package/dist/q2-tecton-elements/p-2a217895.entry.js +0 -1
- package/dist/q2-tecton-elements/p-2b94ae62.entry.js +0 -1
- package/dist/q2-tecton-elements/p-2e54f9a0.entry.js +0 -1
- package/dist/q2-tecton-elements/p-375569ff.entry.js +0 -1
- package/dist/q2-tecton-elements/p-3766cc6c.entry.js +0 -1
- package/dist/q2-tecton-elements/p-3eda2714.entry.js +0 -1
- package/dist/q2-tecton-elements/p-421af42d.entry.js +0 -1
- package/dist/q2-tecton-elements/p-4c53713d.entry.js +0 -1
- package/dist/q2-tecton-elements/p-4fd405f5.entry.js +0 -1
- package/dist/q2-tecton-elements/p-509c8924.entry.js +0 -1
- package/dist/q2-tecton-elements/p-55dc3dc1.entry.js +0 -1
- package/dist/q2-tecton-elements/p-5fffb28a.entry.js +0 -1
- package/dist/q2-tecton-elements/p-612e9974.entry.js +0 -1
- package/dist/q2-tecton-elements/p-64ca8c59.entry.js +0 -1
- package/dist/q2-tecton-elements/p-796c2bb5.entry.js +0 -1
- package/dist/q2-tecton-elements/p-86887866.entry.js +0 -1
- package/dist/q2-tecton-elements/p-9204c34d.entry.js +0 -1
- package/dist/q2-tecton-elements/p-9725d55f.entry.js +0 -1
- package/dist/q2-tecton-elements/p-a0fa416d.entry.js +0 -39
- package/dist/q2-tecton-elements/p-bd83e8e2.entry.js +0 -1
- package/dist/q2-tecton-elements/p-be0f2539.entry.js +0 -1
- package/dist/q2-tecton-elements/p-c05b0b55.entry.js +0 -1
- package/dist/q2-tecton-elements/p-c5691700.js +0 -1
- package/dist/q2-tecton-elements/p-d826d7ad.entry.js +0 -1
- package/dist/q2-tecton-elements/p-d9e9340c.entry.js +0 -1
- package/dist/q2-tecton-elements/p-e5757895.entry.js +0 -1
- package/dist/q2-tecton-elements/p-e68c9ef0.entry.js +0 -1
- package/dist/q2-tecton-elements/p-eb33bda4.entry.js +0 -1
- package/dist/q2-tecton-elements/p-f319549d.entry.js +0 -1
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import{r as t,c as n,h as i,g as r}from"./p-c5691700.js";import{o as e,l as o,i as a}from"./p-80014da0.js";
|
|
2
|
-
/*! *****************************************************************************
|
|
3
|
-
Copyright (c) Microsoft Corporation.
|
|
4
|
-
|
|
5
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
-
purpose with or without fee is hereby granted.
|
|
7
|
-
|
|
8
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
9
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
10
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
11
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
12
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
-
***************************************************************************** */var s=function(t,n){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(t,n)};function u(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}s(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}var h=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1},f=new function(){this.browser=new h,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="undefined"!=typeof window};"object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?(f.wxa=!0,f.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?f.worker=!0:"undefined"==typeof navigator?(f.node=!0,f.svgSupported=!0):function(t,n){var i=n.browser,r=t.match(/Firefox\/([\d.]+)/),e=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),o=t.match(/Edge?\/([\d.]+)/),a=/micromessenger/i.test(t);r&&(i.firefox=!0,i.version=r[1]),e&&(i.ie=!0,i.version=e[1]),o&&(i.edge=!0,i.version=o[1],i.newEdge=+o[1].split(".")[0]>18),a&&(i.weChat=!0),n.svgSupported="undefined"!=typeof SVGRect,n.touchEventsSupported="ontouchstart"in window&&!i.ie&&!i.edge,n.pointerEventsSupported="onpointerdown"in window&&(i.edge||i.ie&&+i.version>=11),n.domSupported="undefined"!=typeof document;var s=document.documentElement.style;n.transform3dSupported=(i.ie&&"transition"in s||i.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),n.transformSupported=n.transform3dSupported||i.ie&&+i.version>=9}(navigator.userAgent,f);var l,c,v="12px sans-serif",d=function(t){var n={};if("undefined"==typeof JSON)return n;for(var i=0;i<t.length;i++){var r=String.fromCharCode(i+32),e=(t.charCodeAt(i)-20)/100;n[r]=e}return n}("007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N"),p={createCanvas:function(){return"undefined"!=typeof document&&document.createElement("canvas")},measureText:function(t,n){if(!l){var i=p.createCanvas();l=i&&i.getContext("2d")}if(l)return c!==n&&(c=l.font=n||v),l.measureText(t);t=t||"";var r=/^([0-9]*?)px$/.exec(n=n||v),e=+(r&&r[1])||12,o=0;if(n.indexOf("mono")>=0)o=e*t.length;else for(var a=0;a<t.length;a++){var s=d[t[a]];o+=null==s?e:s*e}return{width:o}},loadImage:function(t,n,i){var r=new Image;return r.onload=n,r.onerror=i,r.src=t,r}},m=E(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],(function(t,n){return t["[object "+n+"]"]=!0,t}),{}),g=E(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],(function(t,n){return t["[object "+n+"Array]"]=!0,t}),{}),y=Object.prototype.toString,b=Array.prototype,w=b.forEach,x=b.filter,M=b.slice,k=b.map,S=function(){}.constructor,A=S?S.prototype:null,C=2311;function T(){return C++}function I(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];"undefined"!=typeof console&&console.error.apply(console,t)}function N(t){if(null==t||"object"!=typeof t)return t;var n=t,i=y.call(t);if("[object Array]"===i){if(!st(t)){n=[];for(var r=0,e=t.length;r<e;r++)n[r]=N(t[r])}}else if(g[i]){if(!st(t)){var o=t.constructor;if(o.from)n=o.from(t);else for(n=new o(t.length),r=0,e=t.length;r<e;r++)n[r]=t[r]}}else if(!m[i]&&!st(t)&&!$(t))for(var a in n={},t)t.hasOwnProperty(a)&&"__proto__"!==a&&(n[a]=N(t[a]));return n}function L(t,n,i){if(!G(n)||!G(t))return i?N(n):t;for(var r in n)if(n.hasOwnProperty(r)&&"__proto__"!==r){var e=t[r],o=n[r];!G(o)||!G(e)||j(o)||j(e)||$(o)||$(e)||Z(o)||Z(e)||st(o)||st(e)?!i&&r in t||(t[r]=N(n[r])):L(e,o,i)}return t}function O(t,n){if(Object.assign)Object.assign(t,n);else for(var i in n)n.hasOwnProperty(i)&&"__proto__"!==i&&(t[i]=n[i]);return t}function D(t,n,i){for(var r=W(n),e=0;e<r.length;e++){var o=r[e];(i?null!=n[o]:null==t[o])&&(t[o]=n[o])}return t}function z(t,n){if(t){if(t.indexOf)return t.indexOf(n);for(var i=0,r=t.length;i<r;i++)if(t[i]===n)return i}return-1}function B(t,n,i){if(t="prototype"in t?t.prototype:t,n="prototype"in n?n.prototype:n,Object.getOwnPropertyNames)for(var r=Object.getOwnPropertyNames(n),e=0;e<r.length;e++){var o=r[e];"constructor"!==o&&(i?null!=n[o]:null==t[o])&&(t[o]=n[o])}else D(t,n,i)}function _(t){return!!t&&"string"!=typeof t&&"number"==typeof t.length}function R(t,n,i){if(t&&n)if(t.forEach&&t.forEach===w)t.forEach(n,i);else if(t.length===+t.length)for(var r=0,e=t.length;r<e;r++)n.call(i,t[r],r,t);else for(var o in t)t.hasOwnProperty(o)&&n.call(i,t[o],o,t)}function F(t,n,i){if(!t)return[];if(!n)return it(t);if(t.map&&t.map===k)return t.map(n,i);for(var r=[],e=0,o=t.length;e<o;e++)r.push(n.call(i,t[e],e,t));return r}function E(t,n,i,r){if(t&&n){for(var e=0,o=t.length;e<o;e++)i=n.call(r,i,t[e],e,t);return i}}function P(t,n,i){if(!t)return[];if(!n)return it(t);if(t.filter&&t.filter===x)return t.filter(n,i);for(var r=[],e=0,o=t.length;e<o;e++)n.call(i,t[e],e,t)&&r.push(t[e]);return r}function W(t){if(!t)return[];if(Object.keys)return Object.keys(t);var n=[];for(var i in t)t.hasOwnProperty(i)&&n.push(i);return n}var H=A&&Y(A.bind)?A.call.bind(A.bind):function(t,n){for(var i=[],r=2;r<arguments.length;r++)i[r-2]=arguments[r];return function(){return t.apply(n,i.concat(M.call(arguments)))}};function U(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];return function(){return t.apply(this,n.concat(M.call(arguments)))}}function j(t){return Array.isArray?Array.isArray(t):"[object Array]"===y.call(t)}function Y(t){return"function"==typeof t}function X(t){return"string"==typeof t}function V(t){return"[object String]"===y.call(t)}function q(t){return"number"==typeof t}function G(t){var n=typeof t;return"function"===n||!!t&&"object"===n}function Z(t){return!!m[y.call(t)]}function K(t){return!!g[y.call(t)]}function $(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}function J(t){return null!=t.colorStops}function Q(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var i=0,r=t.length;i<r;i++)if(null!=t[i])return t[i]}function tt(t,n){return null!=t?t:n}function nt(t,n,i){return null!=t?t:null!=n?n:i}function it(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];return M.apply(t,n)}function rt(t){if("number"==typeof t)return[t,t,t,t];var n=t.length;return 2===n?[t[0],t[1],t[0],t[1]]:3===n?[t[0],t[1],t[2],t[1]]:t}function et(t,n){if(!t)throw new Error(n)}function ot(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}function at(t){t.__ec_primitive__=!0}function st(t){return t.__ec_primitive__}var ut=function(){function t(n){this.data={};var i=j(n);this.data={};var r=this;function e(t,n){i?r.set(t,n):r.set(n,t)}n instanceof t?n.each(e):n&&R(n,e)}return t.prototype.get=function(t){return this.data.hasOwnProperty(t)?this.data[t]:null},t.prototype.set=function(t,n){return this.data[t]=n},t.prototype.each=function(t,n){for(var i in this.data)this.data.hasOwnProperty(i)&&t.call(n,this.data[i],i)},t.prototype.keys=function(){return W(this.data)},t.prototype.removeKey=function(t){delete this.data[t]},t}();function ht(t){return new ut(t)}function ft(t,n){var i;if(Object.create)i=Object.create(t);else{var r=function(){};r.prototype=t,i=new r}return n&&O(i,n),i}function lt(t){var n=t.style;n.webkitUserSelect="none",n.userSelect="none",n.webkitTapHighlightColor="rgba(0,0,0,0)",n["-webkit-touch-callout"]="none"}function ct(t,n){return t.hasOwnProperty(n)}function vt(){}var dt=180/Math.PI,pt=function(t,n){return(pt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(t,n)};
|
|
16
|
-
/*! *****************************************************************************
|
|
17
|
-
Copyright (c) Microsoft Corporation.
|
|
18
|
-
|
|
19
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
20
|
-
purpose with or without fee is hereby granted.
|
|
21
|
-
|
|
22
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
23
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
24
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
25
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
26
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
27
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
28
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
29
|
-
***************************************************************************** */function mt(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}pt(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}function gt(t,n){return null==t&&(t=0),null==n&&(n=0),[t,n]}function yt(t){return[t[0],t[1]]}function bt(t,n,i){return t[0]=n[0]+i[0],t[1]=n[1]+i[1],t}function wt(t,n,i){return t[0]=n[0]-i[0],t[1]=n[1]-i[1],t}function xt(t,n,i){return t[0]=n[0]*i,t[1]=n[1]*i,t}function Mt(t,n){return Math.sqrt((t[0]-n[0])*(t[0]-n[0])+(t[1]-n[1])*(t[1]-n[1]))}var kt=Mt,St=function(t,n){return(t[0]-n[0])*(t[0]-n[0])+(t[1]-n[1])*(t[1]-n[1])};function At(t,n,i,r){return t[0]=n[0]+r*(i[0]-n[0]),t[1]=n[1]+r*(i[1]-n[1]),t}function Ct(t,n,i){var r=n[0],e=n[1];return t[0]=i[0]*r+i[2]*e+i[4],t[1]=i[1]*r+i[3]*e+i[5],t}function Tt(t,n,i){return t[0]=Math.min(n[0],i[0]),t[1]=Math.min(n[1],i[1]),t}function It(t,n,i){return t[0]=Math.max(n[0],i[0]),t[1]=Math.max(n[1],i[1]),t}var Nt=function(t,n){this.target=t,this.topTarget=n&&n.topTarget},Lt=function(){function t(t){this.handler=t,t.on("mousedown",this._dragStart,this),t.on("mousemove",this._drag,this),t.on("mouseup",this._dragEnd,this)}return t.prototype._dragStart=function(t){for(var n=t.target;n&&!n.draggable;)n=n.parent||n.__hostTarget;n&&(this._draggingTarget=n,n.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.handler.dispatchToElement(new Nt(n,t),"dragstart",t.event))},t.prototype._drag=function(t){var n=this._draggingTarget;if(n){var i=t.offsetX,r=t.offsetY,e=i-this._x,o=r-this._y;this._x=i,this._y=r,n.drift(e,o,t),this.handler.dispatchToElement(new Nt(n,t),"drag",t.event);var a=this.handler.findHover(i,r,n).target,s=this._dropTarget;this._dropTarget=a,n!==a&&(s&&a!==s&&this.handler.dispatchToElement(new Nt(s,t),"dragleave",t.event),a&&a!==s&&this.handler.dispatchToElement(new Nt(a,t),"dragenter",t.event))}},t.prototype._dragEnd=function(t){var n=this._draggingTarget;n&&(n.dragging=!1),this.handler.dispatchToElement(new Nt(n,t),"dragend",t.event),this._dropTarget&&this.handler.dispatchToElement(new Nt(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null},t}(),Ot=function(){function t(t){t&&(this._$eventProcessor=t)}return t.prototype.on=function(t,n,i,r){this._$handlers||(this._$handlers={});var e=this._$handlers;if("function"==typeof n&&(r=i,i=n,n=null),!i||!t)return this;var o=this._$eventProcessor;null!=n&&o&&o.normalizeQuery&&(n=o.normalizeQuery(n)),e[t]||(e[t]=[]);for(var a=0;a<e[t].length;a++)if(e[t][a].h===i)return this;var s={h:i,query:n,ctx:r||this,callAtLast:i.zrEventfulCallAtLast},u=e[t].length-1,h=e[t][u];return h&&h.callAtLast?e[t].splice(u,0,s):e[t].push(s),this},t.prototype.isSilent=function(t){var n=this._$handlers;return!n||!n[t]||!n[t].length},t.prototype.off=function(t,n){var i=this._$handlers;if(!i)return this;if(!t)return this._$handlers={},this;if(n){if(i[t]){for(var r=[],e=0,o=i[t].length;e<o;e++)i[t][e].h!==n&&r.push(i[t][e]);i[t]=r}i[t]&&0===i[t].length&&delete i[t]}else delete i[t];return this},t.prototype.trigger=function(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];if(!this._$handlers)return this;var r=this._$handlers[t],e=this._$eventProcessor;if(r)for(var o=n.length,a=r.length,s=0;s<a;s++){var u=r[s];if(!e||!e.filter||null==u.query||e.filter(t,u.query))switch(o){case 0:u.h.call(u.ctx);break;case 1:u.h.call(u.ctx,n[0]);break;case 2:u.h.call(u.ctx,n[0],n[1]);break;default:u.h.apply(u.ctx,n)}}return e&&e.afterTrigger&&e.afterTrigger(t),this},t.prototype.triggerWithContext=function(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];if(!this._$handlers)return this;var r=this._$handlers[t],e=this._$eventProcessor;if(r)for(var o=n.length,a=n[o-1],s=r.length,u=0;u<s;u++){var h=r[u];if(!e||!e.filter||null==h.query||e.filter(t,h.query))switch(o){case 0:h.h.call(a);break;case 1:h.h.call(a,n[0]);break;case 2:h.h.call(a,n[0],n[1]);break;default:h.h.apply(a,n.slice(1,o-1))}}return e&&e.afterTrigger&&e.afterTrigger(t),this},t}(),Dt=Math.log(2);function zt(t,n,i,r,e,o){var a=r+"-"+e,s=t.length;if(o.hasOwnProperty(a))return o[a];if(1===n){var u=Math.round(Math.log((1<<s)-1&~e)/Dt);return t[i][u]}for(var h=r|1<<i,f=i+1;r&1<<f;)f++;for(var l=0,c=0,v=0;c<s;c++){var d=1<<c;d&e||(l+=(v%2?-1:1)*t[i][c]*zt(t,n-1,f,h,e|d,o),v++)}return o[a]=l,l}function Bt(t,n){var i=[[t[0],t[1],1,0,0,0,-n[0]*t[0],-n[0]*t[1]],[0,0,0,t[0],t[1],1,-n[1]*t[0],-n[1]*t[1]],[t[2],t[3],1,0,0,0,-n[2]*t[2],-n[2]*t[3]],[0,0,0,t[2],t[3],1,-n[3]*t[2],-n[3]*t[3]],[t[4],t[5],1,0,0,0,-n[4]*t[4],-n[4]*t[5]],[0,0,0,t[4],t[5],1,-n[5]*t[4],-n[5]*t[5]],[t[6],t[7],1,0,0,0,-n[6]*t[6],-n[6]*t[7]],[0,0,0,t[6],t[7],1,-n[7]*t[6],-n[7]*t[7]]],r={},e=zt(i,8,0,0,0,r);if(0!==e){for(var o=[],a=0;a<8;a++)for(var s=0;s<8;s++)null==o[s]&&(o[s]=0),o[s]+=((a+s)%2?-1:1)*zt(i,7,0===a?1:0,1<<a,1<<s,r)/e*n[a];return function(t,n,i){var r=n*o[6]+i*o[7]+1;t[0]=(n*o[0]+i*o[1]+o[2])/r,t[1]=(n*o[3]+i*o[4]+o[5])/r}}}var _t=[];function Rt(t,n,i,r,e){if(n.getBoundingClientRect&&f.domSupported&&!Ft(n)){var o=n.___zrEVENTSAVED||(n.___zrEVENTSAVED={}),a=function(t,n,i){for(var r=i?"invTrans":"trans",e=n[r],o=n.srcCoords,a=[],s=[],u=!0,h=0;h<4;h++){var f=t[h].getBoundingClientRect(),l=2*h,c=f.left,v=f.top;a.push(c,v),u=u&&o&&c===o[l]&&v===o[l+1],s.push(t[h].offsetLeft,t[h].offsetTop)}return u&&e?e:(n.srcCoords=a,n[r]=i?Bt(s,a):Bt(a,s))}(function(t,n){var i=n.markers;if(i)return i;i=n.markers=[];for(var r=["left","right"],e=["top","bottom"],o=0;o<4;o++){var a=document.createElement("div"),s=o%2,u=(o>>1)%2;a.style.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",r[s]+":0",e[u]+":0",r[1-s]+":auto",e[1-u]+":auto",""].join("!important;"),t.appendChild(a),i.push(a)}return i}(n,o),o,e);if(a)return a(t,i,r),!0}return!1}function Ft(t){return"CANVAS"===t.nodeName.toUpperCase()}var Et=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Pt=[],Wt=f.browser.firefox&&+f.browser.version.split(".")[0]<39;function Ht(t,n,i,r){return i=i||{},r?Ut(t,n,i):Wt&&null!=n.layerX&&n.layerX!==n.offsetX?(i.zrX=n.layerX,i.zrY=n.layerY):null!=n.offsetX?(i.zrX=n.offsetX,i.zrY=n.offsetY):Ut(t,n,i),i}function Ut(t,n,i){if(f.domSupported&&t.getBoundingClientRect){var r=n.clientX,e=n.clientY;if(Ft(t)){var o=t.getBoundingClientRect();return i.zrX=r-o.left,void(i.zrY=e-o.top)}if(Rt(Pt,t,r,e))return i.zrX=Pt[0],void(i.zrY=Pt[1])}i.zrX=i.zrY=0}function jt(t){return t||window.event}function Yt(t,n,i){if(null!=(n=jt(n)).zrX)return n;var r=n.type;if(r&&r.indexOf("touch")>=0){var e="touchend"!==r?n.targetTouches[0]:n.changedTouches[0];e&&Ht(t,e,n,i)}else{Ht(t,n,n,i);var o=function(t){var n=t.wheelDelta;if(n)return n;var i=t.deltaX,r=t.deltaY;return null==i||null==r?n:3*(0!==r?Math.abs(r):Math.abs(i))*(r>0?-1:r<0?1:i>0?-1:1)}(n);n.zrDelta=o?o/120:-(n.detail||0)/3}var a=n.button;return null==n.which&&void 0!==a&&Et.test(n.type)&&(n.which=1&a?1:2&a?3:4&a?2:0),n}var Xt=function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0},Vt=function(){function t(){this._track=[]}return t.prototype.recognize=function(t,n,i){return this._doTrack(t,n,i),this._recognize(t)},t.prototype.clear=function(){return this._track.length=0,this},t.prototype._doTrack=function(t,n,i){var r=t.touches;if(r){for(var e={points:[],touches:[],target:n,event:t},o=0,a=r.length;o<a;o++){var s=r[o],u=Ht(i,s,{});e.points.push([u.zrX,u.zrY]),e.touches.push(s)}this._track.push(e)}},t.prototype._recognize=function(t){for(var n in Gt)if(Gt.hasOwnProperty(n)){var i=Gt[n](this._track,t);if(i)return i}},t}();function qt(t){var n=t[1][0]-t[0][0],i=t[1][1]-t[0][1];return Math.sqrt(n*n+i*i)}var Gt={pinch:function(t,n){var i=t.length;if(i){var r,e=(t[i-1]||{}).points,o=(t[i-2]||{}).points||e;if(o&&o.length>1&&e&&e.length>1){var a=qt(e)/qt(o);!isFinite(a)&&(a=1),n.pinchScale=a;var s=[((r=e)[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2];return n.pinchX=s[0],n.pinchY=s[1],{type:"pinch",target:t[0].target,event:n}}}}};function Zt(){Xt(this.event)}var Kt=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.handler=null,n}return mt(n,t),n.prototype.dispose=function(){},n.prototype.setCursor=function(){},n}(Ot),$t=function(t,n){this.x=t,this.y=n},Jt=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Qt=function(t){function n(n,i,r,e){var o=t.call(this)||this;return o._hovered=new $t(0,0),o.storage=n,o.painter=i,o.painterRoot=e,r=r||new Kt,o.proxy=null,o.setHandlerProxy(r),o._draggingMgr=new Lt(o),o}return mt(n,t),n.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(R(Jt,(function(n){t.on&&t.on(n,this[n],this)}),this),t.handler=this),this.proxy=t},n.prototype.mousemove=function(t){var n=t.zrX,i=t.zrY,r=nn(this,n,i),e=this._hovered,o=e.target;o&&!o.__zr&&(o=(e=this.findHover(e.x,e.y)).target);var a=this._hovered=r?new $t(n,i):this.findHover(n,i),s=a.target,u=this.proxy;u.setCursor&&u.setCursor(s?s.cursor:"default"),o&&s!==o&&this.dispatchToElement(e,"mouseout",t),this.dispatchToElement(a,"mousemove",t),s&&s!==o&&this.dispatchToElement(a,"mouseover",t)},n.prototype.mouseout=function(t){var n=t.zrEventControl;"only_globalout"!==n&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==n&&this.trigger("globalout",{type:"globalout",event:t})},n.prototype.resize=function(){this._hovered=new $t(0,0)},n.prototype.dispatch=function(t,n){var i=this[t];i&&i.call(this,n)},n.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},n.prototype.setCursorStyle=function(t){var n=this.proxy;n.setCursor&&n.setCursor(t)},n.prototype.dispatchToElement=function(t,n,i){var r=(t=t||{}).target;if(!r||!r.silent){for(var e="on"+n,o=function(t,n,i){return{type:t,event:i,target:n.target,topTarget:n.topTarget,cancelBubble:!1,offsetX:i.zrX,offsetY:i.zrY,gestureEvent:i.gestureEvent,pinchX:i.pinchX,pinchY:i.pinchY,pinchScale:i.pinchScale,wheelDelta:i.zrDelta,zrByTouch:i.zrByTouch,which:i.which,stop:Zt}}(n,t,i);r&&(r[e]&&(o.cancelBubble=!!r[e].call(r,o)),r.trigger(n,o),r=r.__hostTarget?r.__hostTarget:r.parent,!o.cancelBubble););o.cancelBubble||(this.trigger(n,o),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer((function(t){"function"==typeof t[e]&&t[e].call(t,o),t.trigger&&t.trigger(n,o)})))}},n.prototype.findHover=function(t,n,i){for(var r=this.storage.getDisplayList(),e=new $t(t,n),o=r.length-1;o>=0;o--){var a=void 0;if(r[o]!==i&&!r[o].ignore&&(a=tn(r[o],t,n))&&(!e.topTarget&&(e.topTarget=r[o]),"silent"!==a)){e.target=r[o];break}}return e},n.prototype.processGesture=function(t,n){this._gestureMgr||(this._gestureMgr=new Vt);var i=this._gestureMgr;"start"===n&&i.clear();var r=i.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===n&&i.clear(),r){var e=r.type;t.gestureEvent=e;var o=new $t;o.target=r.target,this.dispatchToElement(o,e,r.event)}},n}(Ot);function tn(t,n,i){if(t[t.rectHover?"rectContain":"contain"](n,i)){for(var r=t,e=void 0,o=!1;r;){if(r.ignoreClip&&(o=!0),!o){var a=r.getClipPath();if(a&&!a.contain(n,i))return!1;r.silent&&(e=!0)}r=r.__hostTarget||r.parent}return!e||"silent"}return!1}function nn(t,n,i){var r=t.painter;return n<0||n>r.getWidth()||i<0||i>r.getHeight()}function rn(t,n,i,r){var e=n+1;if(e===i)return 1;if(r(t[e++],t[n])<0){for(;e<i&&r(t[e],t[e-1])<0;)e++;!function(t,n,i){for(i--;n<i;){var r=t[n];t[n++]=t[i],t[i--]=r}}(t,n,e)}else for(;e<i&&r(t[e],t[e-1])>=0;)e++;return e-n}function en(t,n,i,r,e){for(r===n&&r++;r<i;r++){for(var o,a=t[r],s=n,u=r;s<u;)e(a,t[o=s+u>>>1])<0?u=o:s=o+1;var h=r-s;switch(h){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;h>0;)t[s+h]=t[s+h-1],h--}t[s]=a}}function on(t,n,i,r,e,o){var a=0,s=0,u=1;if(o(t,n[i+e])>0){for(s=r-e;u<s&&o(t,n[i+e+u])>0;)a=u,(u=1+(u<<1))<=0&&(u=s);u>s&&(u=s),a+=e,u+=e}else{for(s=e+1;u<s&&o(t,n[i+e-u])<=0;)a=u,(u=1+(u<<1))<=0&&(u=s);u>s&&(u=s);var h=a;a=e-u,u=e-h}for(a++;a<u;){var f=a+(u-a>>>1);o(t,n[i+f])>0?a=f+1:u=f}return u}function an(t,n,i,r,e,o){var a=0,s=0,u=1;if(o(t,n[i+e])<0){for(s=e+1;u<s&&o(t,n[i+e-u])<0;)a=u,(u=1+(u<<1))<=0&&(u=s);u>s&&(u=s);var h=a;a=e-u,u=e-h}else{for(s=r-e;u<s&&o(t,n[i+e+u])>=0;)a=u,(u=1+(u<<1))<=0&&(u=s);u>s&&(u=s),a+=e,u+=e}for(a++;a<u;){var f=a+(u-a>>>1);o(t,n[i+f])<0?u=f:a=f+1}return u}function sn(t,n,i,r){i||(i=0),r||(r=t.length);var e=r-i;if(!(e<2)){var o=0;if(e<32)en(t,i,r,i+(o=rn(t,i,r,n)),n);else{var a=function(t,n){var i,r,e=7,o=0,a=[];function s(s){var u=i[s],h=r[s],f=i[s+1],l=r[s+1];r[s]=h+l,s===o-3&&(i[s+1]=i[s+2],r[s+1]=r[s+2]),o--;var c=an(t[f],t,u,h,0,n);u+=c,0!=(h-=c)&&0!==(l=on(t[u+h-1],t,f,l,l-1,n))&&(h<=l?function(i,r,o,s){var u=0;for(u=0;u<r;u++)a[u]=t[i+u];var h=0,f=o,l=i;if(t[l++]=t[f++],0!=--s)if(1!==r){for(var c,v,d,p=e;;){c=0,v=0,d=!1;do{if(n(t[f],a[h])<0){if(t[l++]=t[f++],v++,c=0,0==--s){d=!0;break}}else if(t[l++]=a[h++],c++,v=0,1==--r){d=!0;break}}while((c|v)<p);if(d)break;do{if(0!==(c=an(t[f],a,h,r,0,n))){for(u=0;u<c;u++)t[l+u]=a[h+u];if(l+=c,h+=c,(r-=c)<=1){d=!0;break}}if(t[l++]=t[f++],0==--s){d=!0;break}if(0!==(v=on(a[h],t,f,s,0,n))){for(u=0;u<v;u++)t[l+u]=t[f+u];if(l+=v,f+=v,0==(s-=v)){d=!0;break}}if(t[l++]=a[h++],1==--r){d=!0;break}p--}while(c>=7||v>=7);if(d)break;p<0&&(p=0),p+=2}if((e=p)<1&&(e=1),1===r){for(u=0;u<s;u++)t[l+u]=t[f+u];t[l+s]=a[h]}else{if(0===r)throw new Error;for(u=0;u<r;u++)t[l+u]=a[h+u]}}else{for(u=0;u<s;u++)t[l+u]=t[f+u];t[l+s]=a[h]}else for(u=0;u<r;u++)t[l+u]=a[h+u]}(u,h,f,l):function(i,r,o,s){var u=0;for(u=0;u<s;u++)a[u]=t[o+u];var h=i+r-1,f=s-1,l=o+s-1,c=0,v=0;if(t[l--]=t[h--],0!=--r)if(1!==s){for(var d=e;;){var p=0,m=0,g=!1;do{if(n(a[f],t[h])<0){if(t[l--]=t[h--],p++,m=0,0==--r){g=!0;break}}else if(t[l--]=a[f--],m++,p=0,1==--s){g=!0;break}}while((p|m)<d);if(g)break;do{if(0!=(p=r-an(a[f],t,i,r,r-1,n))){for(r-=p,v=1+(l-=p),c=1+(h-=p),u=p-1;u>=0;u--)t[v+u]=t[c+u];if(0===r){g=!0;break}}if(t[l--]=a[f--],1==--s){g=!0;break}if(0!=(m=s-on(t[h],a,0,s,s-1,n))){for(s-=m,v=1+(l-=m),c=1+(f-=m),u=0;u<m;u++)t[v+u]=a[c+u];if(s<=1){g=!0;break}}if(t[l--]=t[h--],0==--r){g=!0;break}d--}while(p>=7||m>=7);if(g)break;d<0&&(d=0),d+=2}if((e=d)<1&&(e=1),1===s){for(v=1+(l-=r),c=1+(h-=r),u=r-1;u>=0;u--)t[v+u]=t[c+u];t[l]=a[f]}else{if(0===s)throw new Error;for(c=l-(s-1),u=0;u<s;u++)t[c+u]=a[u]}}else{for(v=1+(l-=r),c=1+(h-=r),u=r-1;u>=0;u--)t[v+u]=t[c+u];t[l]=a[f]}else for(c=l-(s-1),u=0;u<s;u++)t[c+u]=a[u]}(u,h,f,l))}return i=[],r=[],{mergeRuns:function(){for(;o>1;){var t=o-2;if(t>=1&&r[t-1]<=r[t]+r[t+1]||t>=2&&r[t-2]<=r[t]+r[t-1])r[t-1]<r[t+1]&&t--;else if(r[t]>r[t+1])break;s(t)}},forceMergeRuns:function(){for(;o>1;){var t=o-2;t>0&&r[t-1]<r[t+1]&&t--,s(t)}},pushRun:function(t,n){i[o]=t,r[o]=n,o+=1}}}(t,n),s=function(t){for(var n=0;t>=32;)n|=1&t,t>>=1;return t+n}(e);do{if((o=rn(t,i,r,n))<s){var u=e;u>s&&(u=s),en(t,i,i+u,i+o,n),o=u}a.pushRun(i,o),a.mergeRuns(),e-=o,i+=o}while(0!==e);a.forceMergeRuns()}}}R(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(t){Qt.prototype[t]=function(n){var i,r,e=n.zrX,o=n.zrY,a=nn(this,e,o);if("mouseup"===t&&a||(r=(i=this.findHover(e,o)).target),"mousedown"===t)this._downEl=r,this._downPoint=[n.zrX,n.zrY],this._upEl=r;else if("mouseup"===t)this._upEl=r;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||kt(this._downPoint,[n.zrX,n.zrY])>4)return;this._downPoint=null}this.dispatchToElement(i,t,n)}}));var un=!1;function hn(){un||(un=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function fn(t,n){return t.zlevel===n.zlevel?t.z===n.z?t.z2-n.z2:t.z-n.z:t.zlevel-n.zlevel}var ln=function(){function t(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=fn}return t.prototype.traverse=function(t,n){for(var i=0;i<this._roots.length;i++)this._roots[i].traverse(t,n)},t.prototype.getDisplayList=function(t,n){n=n||!1;var i=this._displayList;return!t&&i.length||this.updateDisplayList(n),i},t.prototype.updateDisplayList=function(t){this._displayListLen=0;for(var n=this._roots,i=this._displayList,r=0,e=n.length;r<e;r++)this._updateAndAddDisplayable(n[r],null,t);i.length=this._displayListLen,sn(i,fn)},t.prototype._updateAndAddDisplayable=function(t,n,i){if(!t.ignore||i){t.beforeUpdate(),t.update(),t.afterUpdate();var r=t.getClipPath();if(t.ignoreClip)n=null;else if(r){n=n?n.slice():[];for(var e=r,o=t;e;)e.parent=o,e.updateTransform(),n.push(e),o=e,e=e.getClipPath()}if(t.childrenRef){for(var a=t.childrenRef(),s=0;s<a.length;s++){var u=a[s];t.__dirty&&(u.__dirty|=1),this._updateAndAddDisplayable(u,n,i)}t.__dirty=0}else{var h=t;n&&n.length?h.__clipPaths=n:h.__clipPaths&&h.__clipPaths.length>0&&(h.__clipPaths=[]),isNaN(h.z)&&(hn(),h.z=0),isNaN(h.z2)&&(hn(),h.z2=0),isNaN(h.zlevel)&&(hn(),h.zlevel=0),this._displayList[this._displayListLen++]=h}var f=t.getDecalElement&&t.getDecalElement();f&&this._updateAndAddDisplayable(f,n,i);var l=t.getTextGuideLine();l&&this._updateAndAddDisplayable(l,n,i);var c=t.getTextContent();c&&this._updateAndAddDisplayable(c,n,i)}},t.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},t.prototype.delRoot=function(t){if(t instanceof Array)for(var n=0,i=t.length;n<i;n++)this.delRoot(t[n]);else{var r=z(this._roots,t);r>=0&&this._roots.splice(r,1)}},t.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},t.prototype.getRoots=function(){return this._roots},t.prototype.dispose=function(){this._displayList=null,this._roots=null},t}();const cn=f.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)};var vn={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var n,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,n=.1):n=.4*Math.asin(1/i)/(2*Math.PI),-i*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/.4))},elasticOut:function(t){var n,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,n=.1):n=.4*Math.asin(1/i)/(2*Math.PI),i*Math.pow(2,-10*t)*Math.sin((t-n)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var n,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,n=.1):n=.4*Math.asin(1/i)/(2*Math.PI),(t*=2)<1?i*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/.4)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/.4)*.5+1)},backIn:function(t){var n=1.70158;return t*t*((n+1)*t-n)},backOut:function(t){var n=1.70158;return--t*t*((n+1)*t+n)+1},backInOut:function(t){var n=2.5949095;return(t*=2)<1?t*t*((n+1)*t-n)*.5:.5*((t-=2)*t*((n+1)*t+n)+2)},bounceIn:function(t){return 1-vn.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?.5*vn.bounceIn(2*t):.5*vn.bounceOut(2*t-1)+.5}},dn=Math.pow,pn=Math.sqrt,mn=pn(3),gn=1/3,yn=gt(),bn=gt(),wn=gt();function xn(t){return t>-1e-8&&t<1e-8}function Mn(t){return t>1e-8||t<-1e-8}function kn(t,n,i,r,e){var o=1-e;return o*o*(o*t+3*e*n)+e*e*(e*r+3*o*i)}function Sn(t,n,i,r,e){var o=1-e;return 3*(((n-t)*o+2*(i-n)*e)*o+(r-i)*e*e)}function An(t,n,i,r,e,o){var a=r+3*(n-i)-t,s=3*(i-2*n+t),u=3*(n-t),h=t-e,f=s*s-3*a*u,l=s*u-9*a*h,c=u*u-3*s*h,v=0;if(xn(f)&&xn(l))xn(s)?o[0]=0:(S=-u/s)>=0&&S<=1&&(o[v++]=S);else{var d=l*l-4*f*c;if(xn(d)){var p=l/f,m=-p/2;(S=-s/a+p)>=0&&S<=1&&(o[v++]=S),m>=0&&m<=1&&(o[v++]=m)}else if(d>0){var g=pn(d),y=f*s+1.5*a*(-l+g),b=f*s+1.5*a*(-l-g);(S=(-s-((y=y<0?-dn(-y,gn):dn(y,gn))+(b=b<0?-dn(-b,gn):dn(b,gn))))/(3*a))>=0&&S<=1&&(o[v++]=S)}else{var w=(2*f*s-3*a*l)/(2*pn(f*f*f)),x=Math.acos(w)/3,M=pn(f),k=Math.cos(x),S=(-s-2*M*k)/(3*a),A=(m=(-s+M*(k+mn*Math.sin(x)))/(3*a),(-s+M*(k-mn*Math.sin(x)))/(3*a));S>=0&&S<=1&&(o[v++]=S),m>=0&&m<=1&&(o[v++]=m),A>=0&&A<=1&&(o[v++]=A)}}return v}function Cn(t,n,i,r,e){var o=6*i-12*n+6*t,a=9*n+3*r-3*t-9*i,s=3*n-3*t,u=0;if(xn(a))Mn(o)&&(f=-s/o)>=0&&f<=1&&(e[u++]=f);else{var h=o*o-4*a*s;if(xn(h))e[0]=-o/(2*a);else if(h>0){var f,l=pn(h),c=(-o-l)/(2*a);(f=(-o+l)/(2*a))>=0&&f<=1&&(e[u++]=f),c>=0&&c<=1&&(e[u++]=c)}}return u}function Tn(t,n,i,r,e,o){var a=(n-t)*e+t,s=(i-n)*e+n,u=(r-i)*e+i,h=(s-a)*e+a,f=(u-s)*e+s,l=(f-h)*e+h;o[0]=t,o[1]=a,o[2]=h,o[3]=l,o[4]=l,o[5]=f,o[6]=u,o[7]=r}function In(t,n,i,r,e,o,a,s,u,h,f){var l,c,v,d,p,m=.005,g=1/0;yn[0]=u,yn[1]=h;for(var y=0;y<1;y+=.05)bn[0]=kn(t,i,e,a,y),bn[1]=kn(n,r,o,s,y),(d=St(yn,bn))<g&&(l=y,g=d);g=1/0;for(var b=0;b<32&&!(m<1e-4);b++)v=l+m,bn[0]=kn(t,i,e,a,c=l-m),bn[1]=kn(n,r,o,s,c),d=St(bn,yn),c>=0&&d<g?(l=c,g=d):(wn[0]=kn(t,i,e,a,v),wn[1]=kn(n,r,o,s,v),p=St(wn,yn),v<=1&&p<g?(l=v,g=p):m*=.5);return f&&(f[0]=kn(t,i,e,a,l),f[1]=kn(n,r,o,s,l)),pn(g)}function Nn(t,n,i,r,e,o,a,s,u){for(var h=t,f=n,l=0,c=1/u,v=1;v<=u;v++){var d=v*c,p=kn(t,i,e,a,d),m=kn(n,r,o,s,d),g=p-h,y=m-f;l+=Math.sqrt(g*g+y*y),h=p,f=m}return l}function Ln(t,n,i,r){var e=1-r;return e*(e*t+2*r*n)+r*r*i}function On(t,n,i,r){return 2*((1-r)*(n-t)+r*(i-n))}function Dn(t,n,i){var r=t+i-2*n;return 0===r?.5:(t-n)/r}function zn(t,n,i,r,e){var o=(n-t)*r+t,a=(i-n)*r+n,s=(a-o)*r+o;e[0]=t,e[1]=o,e[2]=s,e[3]=s,e[4]=a,e[5]=i}function Bn(t,n,i,r,e,o,a,s,u){var h,f=.005,l=1/0;yn[0]=a,yn[1]=s;for(var c=0;c<1;c+=.05)bn[0]=Ln(t,i,e,c),bn[1]=Ln(n,r,o,c),(m=St(yn,bn))<l&&(h=c,l=m);l=1/0;for(var v=0;v<32&&!(f<1e-4);v++){var d=h-f,p=h+f;bn[0]=Ln(t,i,e,d),bn[1]=Ln(n,r,o,d);var m=St(bn,yn);if(d>=0&&m<l)h=d,l=m;else{wn[0]=Ln(t,i,e,p),wn[1]=Ln(n,r,o,p);var g=St(wn,yn);p<=1&&g<l?(h=p,l=g):f*=.5}}return u&&(u[0]=Ln(t,i,e,h),u[1]=Ln(n,r,o,h)),pn(l)}function _n(t,n,i,r,e,o,a){for(var s=t,u=n,h=0,f=1/a,l=1;l<=a;l++){var c=l*f,v=Ln(t,i,e,c),d=Ln(n,r,o,c),p=v-s,m=d-u;h+=Math.sqrt(p*p+m*m),s=v,u=d}return h}var Rn=/cubic-bezier\(([0-9,\.e ]+)\)/;function Fn(t){var n=t&&Rn.exec(t);if(n){var i=n[1].split(","),r=+ot(i[0]),e=+ot(i[1]),o=+ot(i[2]),a=+ot(i[3]);if(isNaN(r+e+o+a))return;var s=[];return function(t){return t<=0?0:t>=1?1:An(0,r,o,1,t,s)&&kn(0,e,a,1,s[0])}}}var En=function(){function t(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||vt,this.ondestroy=t.ondestroy||vt,this.onrestart=t.onrestart||vt,t.easing&&this.setEasing(t.easing)}return t.prototype.step=function(t,n){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),!this._paused){var i=this._life,r=t-this._startTime-this._pausedTime,e=r/i;e<0&&(e=0),e=Math.min(e,1);var o=this.easingFunc,a=o?o(e):e;if(this.onframe(a),1===e){if(!this.loop)return!0;this._startTime=t-r%i,this._pausedTime=0,this.onrestart()}return!1}this._pausedTime+=n},t.prototype.pause=function(){this._paused=!0},t.prototype.resume=function(){this._paused=!1},t.prototype.setEasing=function(t){this.easing=t,this.easingFunc=Y(t)?t:vn[t]||Fn(t)},t}(),Pn=function(t){this.value=t},Wn=function(){function t(){this._len=0}return t.prototype.insert=function(t){var n=new Pn(t);return this.insertEntry(n),n},t.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++},t.prototype.remove=function(t){var n=t.prev,i=t.next;n?n.next=i:this.head=i,i?i.prev=n:this.tail=n,t.next=t.prev=null,this._len--},t.prototype.len=function(){return this._len},t.prototype.clear=function(){this.head=this.tail=null,this._len=0},t}(),Hn=function(){function t(t){this._list=new Wn,this._maxSize=10,this._map={},this._maxSize=t}return t.prototype.put=function(t,n){var i=this._list,r=this._map,e=null;if(null==r[t]){var o=i.len(),a=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var s=i.head;i.remove(s),delete r[s.key],e=s.value,this._lastRemovedEntry=s}a?a.value=n:a=new Pn(n),a.key=t,i.insertEntry(a),r[t]=a}return e},t.prototype.get=function(t){var n=this._map[t],i=this._list;if(null!=n)return n!==i.tail&&(i.remove(n),i.insertEntry(n)),n.value},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t}(),Un={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 jn(t){return(t=Math.round(t))<0?0:t>255?255:t}function Yn(t){return t<0?0:t>1?1:t}function Xn(t){var n=t;return n.length&&"%"===n.charAt(n.length-1)?jn(parseFloat(n)/100*255):jn(parseInt(n,10))}function Vn(t){var n=t;return n.length&&"%"===n.charAt(n.length-1)?Yn(parseFloat(n)/100):Yn(parseFloat(n))}function qn(t,n,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?t+(n-t)*i*6:2*i<1?n:3*i<2?t+(n-t)*(2/3-i)*6:t}function Gn(t,n,i,r,e){return t[0]=n,t[1]=i,t[2]=r,t[3]=e,t}function Zn(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t}var Kn=new Hn(20),$n=null;function Jn(t,n){$n&&Zn($n,n),$n=Kn.put(t,$n||n.slice())}function Qn(t,n){if(t){n=n||[];var i=Kn.get(t);if(i)return Zn(n,i);var r=(t+="").replace(/ /g,"").toLowerCase();if(r in Un)return Zn(n,Un[r]),Jn(t,n),n;var e,o=r.length;if("#"===r.charAt(0))return 4===o||5===o?(e=parseInt(r.slice(1,4),16))>=0&&e<=4095?(Gn(n,(3840&e)>>4|(3840&e)>>8,240&e|(240&e)>>4,15&e|(15&e)<<4,5===o?parseInt(r.slice(4),16)/15:1),Jn(t,n),n):void Gn(n,0,0,0,1):7===o||9===o?(e=parseInt(r.slice(1,7),16))>=0&&e<=16777215?(Gn(n,(16711680&e)>>16,(65280&e)>>8,255&e,9===o?parseInt(r.slice(7),16)/255:1),Jn(t,n),n):void Gn(n,0,0,0,1):void 0;var a=r.indexOf("("),s=r.indexOf(")");if(-1!==a&&s+1===o){var u=r.substr(0,a),h=r.substr(a+1,s-(a+1)).split(","),f=1;switch(u){case"rgba":if(4!==h.length)return 3===h.length?Gn(n,+h[0],+h[1],+h[2],1):Gn(n,0,0,0,1);f=Vn(h.pop());case"rgb":return 3!==h.length?void Gn(n,0,0,0,1):(Gn(n,Xn(h[0]),Xn(h[1]),Xn(h[2]),f),Jn(t,n),n);case"hsla":return 4!==h.length?void Gn(n,0,0,0,1):(h[3]=Vn(h[3]),ti(h,n),Jn(t,n),n);case"hsl":return 3!==h.length?void Gn(n,0,0,0,1):(ti(h,n),Jn(t,n),n);default:return}}Gn(n,0,0,0,1)}}function ti(t,n){var i=(parseFloat(t[0])%360+360)%360/360,r=Vn(t[1]),e=Vn(t[2]),o=e<=.5?e*(r+1):e+r-e*r,a=2*e-o;return Gn(n=n||[],jn(255*qn(a,o,i+1/3)),jn(255*qn(a,o,i)),jn(255*qn(a,o,i-1/3)),1),4===t.length&&(n[3]=t[3]),n}function ni(t,n){var i=Qn(t);if(i){for(var r=0;r<3;r++)i[r]=n<0?i[r]*(1-n)|0:(255-i[r])*n+i[r]|0,i[r]>255?i[r]=255:i[r]<0&&(i[r]=0);return ii(i,4===i.length?"rgba":"rgb")}}function ii(t,n){if(t&&t.length){var i=t[0]+","+t[1]+","+t[2];return"rgba"!==n&&"hsva"!==n&&"hsla"!==n||(i+=","+t[3]),n+"("+i+")"}}function ri(t,n){var i=Qn(t);return i?(.299*i[0]+.587*i[1]+.114*i[2])*i[3]/255+(1-i[3])*n:0}var ei=Array.prototype.slice;function oi(t,n,i){return(n-t)*i+t}function ai(t,n,i,r){for(var e=n.length,o=0;o<e;o++)t[o]=oi(n[o],i[o],r);return t}function si(t,n,i,r){for(var e=n.length,o=0;o<e;o++)t[o]=n[o]+i[o]*r;return t}function ui(t,n,i,r){for(var e=n.length,o=e&&n[0].length,a=0;a<e;a++){t[a]||(t[a]=[]);for(var s=0;s<o;s++)t[a][s]=n[a][s]+i[a][s]*r}return t}function hi(t,n){for(var i=t.length,r=n.length,e=i>r?n:t,o=Math.min(i,r),a=e[o-1]||{color:[0,0,0,0],offset:0},s=o;s<Math.max(i,r);s++)e.push({offset:a.offset,color:a.color.slice()})}function fi(t,n,i){var r=t,e=n;if(r.push&&e.push){var o=r.length,a=e.length;if(o!==a)if(o>a)r.length=a;else for(var s=o;s<a;s++)r.push(1===i?e[s]:ei.call(e[s]));var u=r[0]&&r[0].length;for(s=0;s<r.length;s++)if(1===i)isNaN(r[s])&&(r[s]=e[s]);else for(var h=0;h<u;h++)isNaN(r[s][h])&&(r[s][h]=e[s][h])}}function li(t){if(_(t)){var n=t.length;if(_(t[0])){for(var i=[],r=0;r<n;r++)i.push(ei.call(t[r]));return i}return ei.call(t)}return t}function ci(t){return t[0]=Math.floor(t[0])||0,t[1]=Math.floor(t[1])||0,t[2]=Math.floor(t[2])||0,t[3]=null==t[3]?1:t[3],"rgba("+t.join(",")+")"}function vi(t){return 4===t||5===t}function di(t){return 1===t||2===t}var pi=[0,0,0,0],mi=function(){function t(t){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=t}return t.prototype.isFinished=function(){return this._finished},t.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},t.prototype.needsAnimate=function(){return this.keyframes.length>=1},t.prototype.getAdditiveTrack=function(){return this._additiveTrack},t.prototype.addKeyframe=function(t,n,i){this._needsSort=!0;var r=this.keyframes,e=r.length,o=!1,a=6,s=n;if(_(n)){var u=function(t){return _(t&&t[0])?2:1}(n);a=u,(1===u&&!q(n[0])||2===u&&!q(n[0][0]))&&(o=!0)}else if(q(n)&&!function(t){return t!=t}(n))a=0;else if(X(n))if(isNaN(+n)){var h=Qn(n);h&&(s=h,a=3)}else a=0;else if(J(n)){var f=O({},s);f.colorStops=F(n.colorStops,(function(t){return{offset:t.offset,color:Qn(t.color)}})),"linear"===n.type?a=4:"radial"===n.type&&(a=5),s=f}0===e?this.valType=a:a===this.valType&&6!==a||(o=!0),this.discrete=this.discrete||o;var l={time:t,value:s,rawValue:n,percent:0};return i&&(l.easing=i,l.easingFunc=Y(i)?i:vn[i]||Fn(i)),r.push(l),l},t.prototype.prepare=function(t,n){var i=this.keyframes;this._needsSort&&i.sort((function(t,n){return t.time-n.time}));for(var r=this.valType,e=i.length,o=i[e-1],a=this.discrete,s=di(r),u=vi(r),h=0;h<e;h++){var f=i[h],l=f.value,c=o.value;f.percent=f.time/t,a||(s&&h!==e-1?fi(l,c,r):u&&hi(l.colorStops,c.colorStops))}if(!a&&5!==r&&n&&this.needsAnimate()&&n.needsAnimate()&&r===n.valType&&!n._finished){this._additiveTrack=n;var v=i[0].value;for(h=0;h<e;h++)0===r?i[h].additiveValue=i[h].value-v:3===r?i[h].additiveValue=si([],i[h].value,v,-1):di(r)&&(i[h].additiveValue=1===r?si([],i[h].value,v,-1):ui([],i[h].value,v,-1))}},t.prototype.step=function(t,n){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var i,r,e,o=null!=this._additiveTrack,a=o?"additiveValue":"value",s=this.valType,u=this.keyframes,h=u.length,f=this.propName,l=3===s,c=this._lastFr,v=Math.min;if(1===h)r=e=u[0];else{if(n<0)i=0;else if(n<this._lastFrP){for(i=v(c+1,h-1);i>=0&&!(u[i].percent<=n);i--);i=v(i,h-2)}else{for(i=c;i<h&&!(u[i].percent>n);i++);i=v(i-1,h-2)}e=u[i+1],r=u[i]}if(r&&e){this._lastFr=i,this._lastFrP=n;var d=e.percent-r.percent,p=0===d?1:v((n-r.percent)/d,1);e.easingFunc&&(p=e.easingFunc(p));var m=o?this._additiveValue:l?pi:t[f];if(!di(s)&&!l||m||(m=this._additiveValue=[]),this.discrete)t[f]=p<1?r.rawValue:e.rawValue;else if(di(s))1===s?ai(m,r[a],e[a],p):function(t,n,i,r){for(var e=n.length,o=e&&n[0].length,a=0;a<e;a++){t[a]||(t[a]=[]);for(var s=0;s<o;s++)t[a][s]=oi(n[a][s],i[a][s],r)}}(m,r[a],e[a],p);else if(vi(s)){var g=r[a],y=e[a],b=4===s;t[f]={type:b?"linear":"radial",x:oi(g.x,y.x,p),y:oi(g.y,y.y,p),colorStops:F(g.colorStops,(function(t,n){var i=y.colorStops[n];return{offset:oi(t.offset,i.offset,p),color:ci(ai([],t.color,i.color,p))}})),global:y.global},b?(t[f].x2=oi(g.x2,y.x2,p),t[f].y2=oi(g.y2,y.y2,p)):t[f].r=oi(g.r,y.r,p)}else if(l)ai(m,r[a],e[a],p),o||(t[f]=ci(m));else{var w=oi(r[a],e[a],p);o?this._additiveValue=w:t[f]=w}o&&this._addToTarget(t)}}},t.prototype._addToTarget=function(t){var n=this.valType,i=this.propName,r=this._additiveValue;0===n?t[i]=t[i]+r:3===n?(Qn(t[i],pi),si(pi,pi,r,1),t[i]=ci(pi)):1===n?si(t[i],t[i],r,1):2===n&&ui(t[i],t[i],r,1)},t}(),gi=function(){function t(t,n,i,r){this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=t,this._loop=n,n&&r?I("Can' use additive animation on looped animation."):(this._additiveAnimators=r,this._allowDiscrete=i)}return t.prototype.getMaxTime=function(){return this._maxTime},t.prototype.getDelay=function(){return this._delay},t.prototype.getLoop=function(){return this._loop},t.prototype.getTarget=function(){return this._target},t.prototype.changeTarget=function(t){this._target=t},t.prototype.when=function(t,n,i){return this.whenWithKeys(t,n,W(n),i)},t.prototype.whenWithKeys=function(t,n,i,r){for(var e=this._tracks,o=0;o<i.length;o++){var a=i[o],s=e[a];if(!s){s=e[a]=new mi(a);var u=void 0,h=this._getAdditiveTrack(a);if(h){var f=h.keyframes,l=f[f.length-1];u=l&&l.value,3===h.valType&&u&&(u=ci(u))}else u=this._target[a];if(null==u)continue;t>0&&s.addKeyframe(0,li(u),r),this._trackKeys.push(a)}s.addKeyframe(t,li(n[a]),r)}return this._maxTime=Math.max(this._maxTime,t),this},t.prototype.pause=function(){this._clip.pause(),this._paused=!0},t.prototype.resume=function(){this._clip.resume(),this._paused=!1},t.prototype.isPaused=function(){return!!this._paused},t.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},t.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var n=t.length,i=0;i<n;i++)t[i].call(this)},t.prototype._abortedCallback=function(){this._setTracksFinished();var t=this.animation,n=this._abortedCbs;if(t&&t.removeClip(this._clip),this._clip=null,n)for(var i=0;i<n.length;i++)n[i].call(this)},t.prototype._setTracksFinished=function(){for(var t=this._tracks,n=this._trackKeys,i=0;i<n.length;i++)t[n[i]].setFinished()},t.prototype._getAdditiveTrack=function(t){var n,i=this._additiveAnimators;if(i)for(var r=0;r<i.length;r++){var e=i[r].getTrack(t);e&&(n=e)}return n},t.prototype.start=function(t){if(!(this._started>0)){this._started=1;for(var n=this,i=[],r=this._maxTime||0,e=0;e<this._trackKeys.length;e++){var o=this._trackKeys[e],a=this._tracks[o],s=this._getAdditiveTrack(o),u=a.keyframes,h=u.length;if(a.prepare(r,s),a.needsAnimate())if(!this._allowDiscrete&&a.discrete){var f=u[h-1];f&&(n._target[a.propName]=f.rawValue),a.setFinished()}else i.push(a)}if(i.length||this._force){var l=new En({life:r,loop:this._loop,delay:this._delay||0,onframe:function(t){n._started=2;var r=n._additiveAnimators;if(r){for(var e=!1,o=0;o<r.length;o++)if(r[o]._clip){e=!0;break}e||(n._additiveAnimators=null)}for(o=0;o<i.length;o++)i[o].step(n._target,t);var a=n._onframeCbs;if(a)for(o=0;o<a.length;o++)a[o](n._target,t)},ondestroy:function(){n._doneCallback()}});this._clip=l,this.animation&&this.animation.addClip(l),t&&l.setEasing(t)}else this._doneCallback();return this}},t.prototype.stop=function(t){this._clip&&(t&&this._clip.onframe(1),this._abortedCallback())},t.prototype.delay=function(t){return this._delay=t,this},t.prototype.during=function(t){return t&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(t)),this},t.prototype.done=function(t){return t&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(t)),this},t.prototype.aborted=function(t){return t&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(t)),this},t.prototype.getClip=function(){return this._clip},t.prototype.getTrack=function(t){return this._tracks[t]},t.prototype.getTracks=function(){var t=this;return F(this._trackKeys,(function(n){return t._tracks[n]}))},t.prototype.stopTracks=function(t,n){if(!t.length||!this._clip)return!0;for(var i=this._tracks,r=this._trackKeys,e=0;e<t.length;e++){var o=i[t[e]];o&&!o.isFinished()&&(n?o.step(this._target,1):1===this._started&&o.step(this._target,0),o.setFinished())}var a=!0;for(e=0;e<r.length;e++)if(!i[r[e]].isFinished()){a=!1;break}return a&&this._abortedCallback(),a},t.prototype.saveTo=function(t,n,i){if(t){n=n||this._trackKeys;for(var r=0;r<n.length;r++){var e=n[r],o=this._tracks[e];if(o&&!o.isFinished()){var a=o.keyframes,s=a[i?0:a.length-1];s&&(t[e]=li(s.rawValue))}}}},t.prototype.__changeFinalValue=function(t,n){n=n||W(t);for(var i=0;i<n.length;i++){var r=n[i],e=this._tracks[r];if(e){var o=e.keyframes;if(o.length>1){var a=o.pop();e.addKeyframe(a.time,t[r]),e.prepare(this._maxTime,e.getAdditiveTrack())}}}},t}();function yi(){return(new Date).getTime()}var bi,wi,xi=function(t){function n(n){var i=t.call(this)||this;return i._running=!1,i._time=0,i._pausedTime=0,i._pauseStart=0,i._paused=!1,i.stage=(n=n||{}).stage||{},i}return mt(n,t),n.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._head?(this._tail.next=t,t.prev=this._tail,t.next=null,this._tail=t):this._head=this._tail=t,t.animation=this},n.prototype.addAnimator=function(t){t.animation=this;var n=t.getClip();n&&this.addClip(n)},n.prototype.removeClip=function(t){if(t.animation){var n=t.prev,i=t.next;n?n.next=i:this._head=i,i?i.prev=n:this._tail=n,t.next=t.prev=t.animation=null}},n.prototype.removeAnimator=function(t){var n=t.getClip();n&&this.removeClip(n),t.animation=null},n.prototype.update=function(t){for(var n=yi()-this._pausedTime,i=n-this._time,r=this._head;r;){var e=r.next;r.step(n,i)?(r.ondestroy(),this.removeClip(r),r=e):r=e}this._time=n,t||(this.trigger("frame",i),this.stage.update&&this.stage.update())},n.prototype._startLoop=function(){var t=this;this._running=!0,cn((function n(){t._running&&(cn(n),!t._paused&&t.update())}))},n.prototype.start=function(){this._running||(this._time=yi(),this._pausedTime=0,this._startLoop())},n.prototype.stop=function(){this._running=!1},n.prototype.pause=function(){this._paused||(this._pauseStart=yi(),this._paused=!0)},n.prototype.resume=function(){this._paused&&(this._pausedTime+=yi()-this._pauseStart,this._paused=!1)},n.prototype.clear=function(){for(var t=this._head;t;){var n=t.next;t.prev=t.next=t.animation=null,t=n}this._head=this._tail=null},n.prototype.isFinished=function(){return null==this._head},n.prototype.animate=function(t,n){n=n||{},this.start();var i=new gi(t,n.loop);return this.addAnimator(i),i},n}(Ot),Mi=f.domSupported,ki=(wi={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:bi=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:F(bi,(function(t){var n=t.replace("mouse","pointer");return wi.hasOwnProperty(n)?n:t}))}),Si=["mousemove","mouseup"],Ai=["pointermove","pointerup"],Ci=!1;function Ti(t){var n=t.pointerType;return"pen"===n||"touch"===n}function Ii(t){t&&(t.zrByTouch=!0)}function Ni(t,n){for(var i=n,r=!1;i&&9!==i.nodeType&&!(r=i.domBelongToZr||i!==n&&i===t.painterRoot);)i=i.parentNode;return r}var Li=function(t,n){this.stopPropagation=vt,this.stopImmediatePropagation=vt,this.preventDefault=vt,this.type=n.type,this.target=this.currentTarget=t.dom,this.pointerType=n.pointerType,this.clientX=n.clientX,this.clientY=n.clientY},Oi={mousedown:function(t){t=Yt(this.dom,t),this.__mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=Yt(this.dom,t);var n=this.__mayPointerCapture;!n||t.zrX===n[0]&&t.zrY===n[1]||this.__togglePointerCapture(!0),this.trigger("mousemove",t)},mouseup:function(t){t=Yt(this.dom,t),this.__togglePointerCapture(!1),this.trigger("mouseup",t)},mouseout:function(t){Ni(this,(t=Yt(this.dom,t)).toElement||t.relatedTarget)||(this.__pointerCapturing&&(t.zrEventControl="no_globalout"),this.trigger("mouseout",t))},wheel:function(t){Ci=!0,t=Yt(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){Ci||(t=Yt(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){Ii(t=Yt(this.dom,t)),this.__lastTouchMoment=new Date,this.handler.processGesture(t,"start"),Oi.mousemove.call(this,t),Oi.mousedown.call(this,t)},touchmove:function(t){Ii(t=Yt(this.dom,t)),this.handler.processGesture(t,"change"),Oi.mousemove.call(this,t)},touchend:function(t){Ii(t=Yt(this.dom,t)),this.handler.processGesture(t,"end"),Oi.mouseup.call(this,t),+new Date-+this.__lastTouchMoment<300&&Oi.click.call(this,t)},pointerdown:function(t){Oi.mousedown.call(this,t)},pointermove:function(t){Ti(t)||Oi.mousemove.call(this,t)},pointerup:function(t){Oi.mouseup.call(this,t)},pointerout:function(t){Ti(t)||Oi.mouseout.call(this,t)}};R(["click","dblclick","contextmenu"],(function(t){Oi[t]=function(n){n=Yt(this.dom,n),this.trigger(t,n)}}));var Di={pointermove:function(t){Ti(t)||Di.mousemove.call(this,t)},pointerup:function(t){Di.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var n=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",t),n&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}};function zi(t,n,i,r){t.mounted[n]=i,t.listenerOpts[n]=r,function(t,n,i,r){t.addEventListener(n,i,r)}(t.domTarget,n,i,r)}function Bi(t){var n=t.mounted;for(var i in n)n.hasOwnProperty(i)&&t.domTarget.removeEventListener(i,n[i],t.listenerOpts[i]);t.mounted={}}var _i=function(t,n){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=t,this.domHandlers=n},Ri=function(t){function n(n,i){var r,e,o,a=t.call(this)||this;return a.__pointerCapturing=!1,a.dom=n,a.painterRoot=i,a._localHandlerScope=new _i(n,Oi),Mi&&(a._globalHandlerScope=new _i(document,Di)),r=a,o=(e=a._localHandlerScope).domHandlers,f.pointerEventsSupported?R(ki.pointer,(function(t){zi(e,t,(function(n){o[t].call(r,n)}))})):(f.touchEventsSupported&&R(ki.touch,(function(t){zi(e,t,(function(n){o[t].call(r,n),function(t){t.touching=!0,null!=t.touchTimer&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout((function(){t.touching=!1,t.touchTimer=null}),700)}(e)}))})),R(ki.mouse,(function(t){zi(e,t,(function(n){n=jt(n),e.touching||o[t].call(r,n)}))}))),a}return mt(n,t),n.prototype.dispose=function(){Bi(this._localHandlerScope),Mi&&Bi(this._globalHandlerScope)},n.prototype.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},n.prototype.__togglePointerCapture=function(t){if(this.__mayPointerCapture=null,Mi&&+this.__pointerCapturing^+t){this.__pointerCapturing=t;var n=this._globalHandlerScope;t?function(t,n){function i(i){zi(n,i,(function(r){r=jt(r),Ni(t,r.target)||(r=function(t,n){return Yt(t.dom,new Li(t,n),!0)}(t,r),n.domHandlers[i].call(t,r))}),{capture:!0})}f.pointerEventsSupported?R(Ai,i):f.touchEventsSupported||R(Si,i)}(this,n):Bi(n)}},n}(Ot),Fi=1;f.hasGlobalWindow&&(Fi=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var Ei=Fi;function Pi(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function Wi(t,n,i){var r=n[1]*i[0]+n[3]*i[1],e=n[0]*i[2]+n[2]*i[3],o=n[1]*i[2]+n[3]*i[3],a=n[0]*i[4]+n[2]*i[5]+n[4],s=n[1]*i[4]+n[3]*i[5]+n[5];return t[0]=n[0]*i[0]+n[2]*i[1],t[1]=r,t[2]=e,t[3]=o,t[4]=a,t[5]=s,t}function Hi(t,n,i){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4]+i[0],t[5]=n[5]+i[1],t}function Ui(t,n,i){var r=n[0],e=n[2],o=n[4],a=n[1],s=n[3],u=n[5],h=Math.sin(i),f=Math.cos(i);return t[0]=r*f+a*h,t[1]=-r*h+a*f,t[2]=e*f+s*h,t[3]=-e*h+f*s,t[4]=f*o+h*u,t[5]=f*u-h*o,t}function ji(t,n){var i=n[0],r=n[2],e=n[4],o=n[1],a=n[3],s=n[5],u=i*a-o*r;return u?(t[0]=a*(u=1/u),t[1]=-o*u,t[2]=-r*u,t[3]=i*u,t[4]=(r*s-a*e)*u,t[5]=(o*e-i*s)*u,t):null}var Yi=Pi;function Xi(t){return t>5e-5||t<-5e-5}var Vi=[],qi=[],Gi=[1,0,0,1,0,0],Zi=Math.abs,Ki=function(){function t(){}var n;return t.prototype.getLocalTransform=function(n){return t.getLocalTransform(this,n)},t.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},t.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},t.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},t.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},t.prototype.needLocalTransform=function(){return Xi(this.rotation)||Xi(this.x)||Xi(this.y)||Xi(this.scaleX-1)||Xi(this.scaleY-1)||Xi(this.skewX)||Xi(this.skewY)},t.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,n=this.needLocalTransform(),i=this.transform;n||t?(i=i||[1,0,0,1,0,0],n?this.getLocalTransform(i):Yi(i),t&&(n?Wi(i,t,i):function(t,n){t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5]}(i,t)),this.transform=i,this._resolveGlobalScaleRatio(i)):i&&Yi(i)},t.prototype._resolveGlobalScaleRatio=function(t){var n=this.globalScaleRatio;if(null!=n&&1!==n){this.getGlobalScale(Vi);var i=Vi[0]<0?-1:1,r=Vi[1]<0?-1:1,e=((Vi[0]-i)*n+i)/Vi[0]||0,o=((Vi[1]-r)*n+r)/Vi[1]||0;t[0]*=e,t[1]*=e,t[2]*=o,t[3]*=o}this.invTransform=this.invTransform||[1,0,0,1,0,0],ji(this.invTransform,t)},t.prototype.getComputedTransform=function(){for(var t=this,n=[];t;)n.push(t),t=t.parent;for(;t=n.pop();)t.updateTransform();return this.transform},t.prototype.setLocalTransform=function(t){if(t){var n=t[0]*t[0]+t[1]*t[1],i=t[2]*t[2]+t[3]*t[3],r=Math.atan2(t[1],t[0]),e=Math.PI/2+r-Math.atan2(t[3],t[2]);i=Math.sqrt(i)*Math.cos(e),n=Math.sqrt(n),this.skewX=e,this.skewY=0,this.rotation=-r,this.x=+t[4],this.y=+t[5],this.scaleX=n,this.scaleY=i,this.originX=0,this.originY=0}},t.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,n=this.transform;t&&t.transform&&(Wi(qi,t.invTransform,n),n=qi);var i=this.originX,r=this.originY;(i||r)&&(Gi[4]=i,Gi[5]=r,Wi(qi,n,Gi),qi[4]-=i,qi[5]-=r,n=qi),this.setLocalTransform(n)}},t.prototype.getGlobalScale=function(t){var n=this.transform;return t=t||[],n?(t[0]=Math.sqrt(n[0]*n[0]+n[1]*n[1]),t[1]=Math.sqrt(n[2]*n[2]+n[3]*n[3]),n[0]<0&&(t[0]=-t[0]),n[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},t.prototype.transformCoordToLocal=function(t,n){var i=[t,n],r=this.invTransform;return r&&Ct(i,i,r),i},t.prototype.transformCoordToGlobal=function(t,n){var i=[t,n],r=this.transform;return r&&Ct(i,i,r),i},t.prototype.getLineScale=function(){var t=this.transform;return t&&Zi(t[0]-1)>1e-10&&Zi(t[3]-1)>1e-10?Math.sqrt(Zi(t[0]*t[3]-t[2]*t[1])):1},t.prototype.copyTransform=function(t){!function(t,n){for(var i=0;i<$i.length;i++){var r=$i[i];t[r]=n[r]}}(this,t)},t.getLocalTransform=function(t,n){n=n||[];var i=t.originX||0,r=t.originY||0,e=t.scaleX,o=t.scaleY,a=t.anchorX,s=t.anchorY,u=t.rotation||0,h=t.x,f=t.y,l=t.skewX?Math.tan(t.skewX):0,c=t.skewY?Math.tan(-t.skewY):0;if(i||r||a||s){var v=i+a,d=r+s;n[4]=-v*e-l*d*o,n[5]=-d*o-c*v*e}else n[4]=n[5]=0;return n[0]=e,n[3]=o,n[1]=c*e,n[2]=l*o,u&&Ui(n,n,u),n[4]+=i+h,n[5]+=r+f,n},t.initDefaultProps=((n=t.prototype).scaleX=n.scaleY=n.globalScaleRatio=1,void(n.x=n.y=n.originX=n.originY=n.skewX=n.skewY=n.rotation=n.anchorX=n.anchorY=0)),t}(),$i=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"],Ji=function(){function t(t,n){this.x=t||0,this.y=n||0}return t.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.set=function(t,n){return this.x=t,this.y=n,this},t.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},t.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},t.prototype.scale=function(t){this.x*=t,this.y*=t},t.prototype.scaleAndAdd=function(t,n){this.x+=t.x*n,this.y+=t.y*n},t.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},t.prototype.dot=function(t){return this.x*t.x+this.y*t.y},t.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},t.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},t.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},t.prototype.distance=function(t){var n=this.x-t.x,i=this.y-t.y;return Math.sqrt(n*n+i*i)},t.prototype.distanceSquare=function(t){var n=this.x-t.x,i=this.y-t.y;return n*n+i*i},t.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},t.prototype.transform=function(t){if(t){var n=this.x,i=this.y;return this.x=t[0]*n+t[2]*i+t[4],this.y=t[1]*n+t[3]*i+t[5],this}},t.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},t.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},t.set=function(t,n,i){t.x=n,t.y=i},t.copy=function(t,n){t.x=n.x,t.y=n.y},t.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},t.lenSquare=function(t){return t.x*t.x+t.y*t.y},t.dot=function(t,n){return t.x*n.x+t.y*n.y},t.add=function(t,n,i){t.x=n.x+i.x,t.y=n.y+i.y},t.sub=function(t,n,i){t.x=n.x-i.x,t.y=n.y-i.y},t.scale=function(t,n,i){t.x=n.x*i,t.y=n.y*i},t.scaleAndAdd=function(t,n,i,r){t.x=n.x+i.x*r,t.y=n.y+i.y*r},t.lerp=function(t,n,i,r){var e=1-r;t.x=e*n.x+r*i.x,t.y=e*n.y+r*i.y},t}(),Qi=Math.min,tr=Math.max,nr=new Ji,ir=new Ji,rr=new Ji,er=new Ji,or=new Ji,ar=new Ji,sr=function(){function t(t,n,i,r){i<0&&(t+=i,i=-i),r<0&&(n+=r,r=-r),this.x=t,this.y=n,this.width=i,this.height=r}return t.prototype.union=function(t){var n=Qi(t.x,this.x),i=Qi(t.y,this.y);this.width=isFinite(this.x)&&isFinite(this.width)?tr(t.x+t.width,this.x+this.width)-n:t.width,this.height=isFinite(this.y)&&isFinite(this.height)?tr(t.y+t.height,this.y+this.height)-i:t.height,this.x=n,this.y=i},t.prototype.applyTransform=function(n){t.applyTransform(this,this,n)},t.prototype.calculateTransform=function(t){var n=this,i=t.width/n.width,r=t.height/n.height,e=[1,0,0,1,0,0];return Hi(e,e,[-n.x,-n.y]),function(t,n,i){var r=i[0],e=i[1];t[0]=n[0]*r,t[1]=n[1]*e,t[2]=n[2]*r,t[3]=n[3]*e,t[4]=n[4]*r,t[5]=n[5]*e}(e,e,[i,r]),Hi(e,e,[t.x,t.y]),e},t.prototype.intersect=function(n,i){if(!n)return!1;n instanceof t||(n=t.create(n));var r=this,e=r.x,o=r.x+r.width,a=r.y,s=r.y+r.height,u=n.x,h=n.x+n.width,f=n.y,l=n.y+n.height,c=!(o<u||h<e||s<f||l<a);if(i){var v=1/0,d=0,p=Math.abs(o-u),m=Math.abs(h-e),g=Math.abs(s-f),y=Math.abs(l-a),b=Math.min(p,m),w=Math.min(g,y);o<u||h<e?b>d&&(d=b,Ji.set(ar,p<m?-p:m,0)):b<v&&(v=b,Ji.set(or,p<m?p:-m,0)),s<f||l<a?w>d&&(d=w,Ji.set(ar,0,g<y?-g:y)):b<v&&(v=b,Ji.set(or,0,g<y?g:-y))}return i&&Ji.copy(i,c?or:ar),c},t.prototype.contain=function(t,n){var i=this;return t>=i.x&&t<=i.x+i.width&&n>=i.y&&n<=i.y+i.height},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(n){t.copy(this,n)},t.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},t.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},t.prototype.isZero=function(){return 0===this.width||0===this.height},t.create=function(n){return new t(n.x,n.y,n.width,n.height)},t.copy=function(t,n){t.x=n.x,t.y=n.y,t.width=n.width,t.height=n.height},t.applyTransform=function(n,i,r){if(r){if(r[1]<1e-5&&r[1]>-1e-5&&r[2]<1e-5&&r[2]>-1e-5){var e=r[0],o=r[3],a=r[5];return n.x=i.x*e+r[4],n.y=i.y*o+a,n.width=i.width*e,n.height=i.height*o,n.width<0&&(n.x+=n.width,n.width=-n.width),void(n.height<0&&(n.y+=n.height,n.height=-n.height))}nr.x=rr.x=i.x,nr.y=er.y=i.y,ir.x=er.x=i.x+i.width,ir.y=rr.y=i.y+i.height,nr.transform(r),er.transform(r),ir.transform(r),rr.transform(r),n.x=Qi(nr.x,ir.x,rr.x,er.x),n.y=Qi(nr.y,ir.y,rr.y,er.y);var s=tr(nr.x,ir.x,rr.x,er.x),u=tr(nr.y,ir.y,rr.y,er.y);n.width=s-n.x,n.height=u-n.y}else n!==i&&t.copy(n,i)},t}(),ur={};function hr(t,n){var i=ur[n=n||v];i||(i=ur[n]=new Hn(500));var r=i.get(t);return null==r&&(r=p.measureText(t,n).width,i.put(t,r)),r}function fr(t,n,i,r){var e=hr(t,n),o=dr(n),a=cr(0,e,i),s=vr(0,o,r);return new sr(a,s,e,o)}function lr(t,n,i,r){var e=((t||"")+"").split("\n");if(1===e.length)return fr(e[0],n,i,r);for(var o=new sr(0,0,0,0),a=0;a<e.length;a++){var s=fr(e[a],n,i,r);0===a?o.copy(s):o.union(s)}return o}function cr(t,n,i){return"right"===i?t-=n:"center"===i&&(t-=n/2),t}function vr(t,n,i){return"middle"===i?t-=n/2:"bottom"===i&&(t-=n),t}function dr(t){return hr("国",t)}function pr(t,n){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*n:parseFloat(t):t}function mr(t,n,i){var r=n.position||"inside",e=null!=n.distance?n.distance:5,o=i.height,a=i.width,s=o/2,u=i.x,h=i.y,f="left",l="top";if(r instanceof Array)u+=pr(r[0],i.width),h+=pr(r[1],i.height),f=null,l=null;else switch(r){case"left":u-=e,h+=s,f="right",l="middle";break;case"right":u+=e+a,h+=s,l="middle";break;case"top":u+=a/2,h-=e,f="center",l="bottom";break;case"bottom":u+=a/2,h+=o+e,f="center";break;case"inside":u+=a/2,h+=s,f="center",l="middle";break;case"insideLeft":u+=e,h+=s,l="middle";break;case"insideRight":u+=a-e,h+=s,f="right",l="middle";break;case"insideTop":u+=a/2,h+=e,f="center";break;case"insideBottom":u+=a/2,h+=o-e,f="center",l="bottom";break;case"insideTopLeft":u+=e,h+=e;break;case"insideTopRight":u+=a-e,h+=e,f="right";break;case"insideBottomLeft":u+=e,h+=o-e,l="bottom";break;case"insideBottomRight":u+=a-e,h+=o-e,f="right",l="bottom"}return(t=t||{}).x=u,t.y=h,t.align=f,t.verticalAlign=l,t}var gr=$i.concat(["ignore"]),yr=E($i,(function(t,n){return t[n]=!0,t}),{ignore:!1}),br={},wr=new sr(0,0,0,0),xr=function(){function t(t){this.id=T(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return t.prototype._init=function(t){this.attr(t)},t.prototype.drift=function(t,n){switch(this.draggable){case"horizontal":n=0;break;case"vertical":t=0}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=n,this.decomposeTransform(),this.markRedraw()},t.prototype.beforeUpdate=function(){},t.prototype.afterUpdate=function(){},t.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},t.prototype.updateInnerText=function(t){var n=this._textContent;if(n&&(!n.ignore||t)){this.textConfig||(this.textConfig={});var i=this.textConfig,r=i.local,e=n.innerTransformable,o=void 0,a=void 0,s=!1;e.parent=r?this:null;var u=!1;if(e.copyTransform(n),null!=i.position){var h=wr;h.copy(i.layoutRect?i.layoutRect:this.getBoundingRect()),r||h.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(br,i,h):mr(br,i,h),e.x=br.x,e.y=br.y,o=br.align,a=br.verticalAlign;var f=i.origin;if(f&&null!=i.rotation){var l=void 0,c=void 0;"center"===f?(l=.5*h.width,c=.5*h.height):(l=pr(f[0],h.width),c=pr(f[1],h.height)),u=!0,e.originX=-e.x+l+(r?0:h.x),e.originY=-e.y+c+(r?0:h.y)}}null!=i.rotation&&(e.rotation=i.rotation);var v=i.offset;v&&(e.x+=v[0],e.y+=v[1],u||(e.originX=-v[0],e.originY=-v[1]));var d=null==i.inside?"string"==typeof i.position&&i.position.indexOf("inside")>=0:i.inside,p=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),m=void 0,g=void 0,y=void 0;d&&this.canBeInsideText()?(g=i.insideStroke,null!=(m=i.insideFill)&&"auto"!==m||(m=this.getInsideTextFill()),null!=g&&"auto"!==g||(g=this.getInsideTextStroke(m),y=!0)):(g=i.outsideStroke,null!=(m=i.outsideFill)&&"auto"!==m||(m=this.getOutsideFill()),null!=g&&"auto"!==g||(g=this.getOutsideStroke(m),y=!0)),(m=m||"#000")===p.fill&&g===p.stroke&&y===p.autoStroke&&o===p.align&&a===p.verticalAlign||(s=!0,p.fill=m,p.stroke=g,p.autoStroke=y,p.align=o,p.verticalAlign=a,n.setDefaultTextStyle(p)),n.__dirty|=1,s&&n.dirtyStyle(!0)}},t.prototype.canBeInsideText=function(){return!0},t.prototype.getInsideTextFill=function(){return"#fff"},t.prototype.getInsideTextStroke=function(){return"#000"},t.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?"#ccc":"#333"},t.prototype.getOutsideStroke=function(){var t=this.__zr&&this.__zr.getBackgroundColor(),n="string"==typeof t&&Qn(t);n||(n=[255,255,255,1]);for(var i=n[3],r=this.__zr.isDarkMode(),e=0;e<3;e++)n[e]=n[e]*i+(r?0:255)*(1-i);return n[3]=1,ii(n,"rgba")},t.prototype.traverse=function(){},t.prototype.attrKV=function(t,n){"textConfig"===t?this.setTextConfig(n):"textContent"===t?this.setTextContent(n):"clipPath"===t?this.setClipPath(n):"extra"===t?(this.extra=this.extra||{},O(this.extra,n)):this[t]=n},t.prototype.hide=function(){this.ignore=!0,this.markRedraw()},t.prototype.show=function(){this.ignore=!1,this.markRedraw()},t.prototype.attr=function(t,n){if("string"==typeof t)this.attrKV(t,n);else if(G(t))for(var i=W(t),r=0;r<i.length;r++){var e=i[r];this.attrKV(e,t[e])}return this.markRedraw(),this},t.prototype.saveCurrentToNormalState=function(t){this._innerSaveToNormal(t);for(var n=this._normalState,i=0;i<this.animators.length;i++){var r=this.animators[i],e=r.__fromStateTransition;if(!(r.getLoop()||e&&"__zr_normal__"!==e)){var o=r.targetName;r.saveTo(o?n[o]:n)}}},t.prototype._innerSaveToNormal=function(t){var n=this._normalState;n||(n=this._normalState={}),t.textConfig&&!n.textConfig&&(n.textConfig=this.textConfig),this._savePrimaryToNormal(t,n,gr)},t.prototype._savePrimaryToNormal=function(t,n,i){for(var r=0;r<i.length;r++){var e=i[r];null==t[e]||e in n||(n[e]=this[e])}},t.prototype.hasState=function(){return this.currentStates.length>0},t.prototype.getState=function(t){return this.states[t]},t.prototype.ensureState=function(t){var n=this.states;return n[t]||(n[t]={}),n[t]},t.prototype.clearStates=function(t){this.useState("__zr_normal__",!1,t)},t.prototype.useState=function(t,n,i,r){var e="__zr_normal__"===t;if(this.hasState()||!e){var o=this.currentStates,a=this.stateTransition;if(!(z(o,t)>=0)||!n&&1!==o.length){var s;if(this.stateProxy&&!e&&(s=this.stateProxy(t)),s||(s=this.states&&this.states[t]),s||e){e||this.saveCurrentToNormalState(s);var u=!!(s&&s.hoverLayer||r);u&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,s,this._normalState,n,!i&&!this.__inHover&&a&&a.duration>0,a);var h=this._textContent,f=this._textGuide;return h&&h.useState(t,n,i,u),f&&f.useState(t,n,i,u),e?(this.currentStates=[],this._normalState={}):n?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!u&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2),s}I("State "+t+" not exists.")}}},t.prototype.useStates=function(t,n,i){if(t.length){var r=[],e=this.currentStates,o=t.length,a=o===e.length;if(a)for(var s=0;s<o;s++)if(t[s]!==e[s]){a=!1;break}if(a)return;for(s=0;s<o;s++){var u=t[s],h=void 0;this.stateProxy&&(h=this.stateProxy(u,t)),h||(h=this.states[u]),h&&r.push(h)}var f=r[o-1],l=!!(f&&f.hoverLayer||i);l&&this._toggleHoverLayerFlag(!0);var c=this._mergeStates(r),v=this.stateTransition;this.saveCurrentToNormalState(c),this._applyStateObj(t.join(","),c,this._normalState,!1,!n&&!this.__inHover&&v&&v.duration>0,v);var d=this._textContent,p=this._textGuide;d&&d.useStates(t,n,l),p&&p.useStates(t,n,l),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!l&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2)}else this.clearStates()},t.prototype._updateAnimationTargets=function(){for(var t=0;t<this.animators.length;t++){var n=this.animators[t];n.targetName&&n.changeTarget(this[n.targetName])}},t.prototype.removeState=function(t){var n=z(this.currentStates,t);if(n>=0){var i=this.currentStates.slice();i.splice(n,1),this.useStates(i)}},t.prototype.replaceState=function(t,n,i){var r=this.currentStates.slice(),e=z(r,t),o=z(r,n)>=0;e>=0?o?r.splice(e,1):r[e]=n:i&&!o&&r.push(n),this.useStates(r)},t.prototype.toggleState=function(t,n){n?this.useState(t,!0):this.removeState(t)},t.prototype._mergeStates=function(t){for(var n,i={},r=0;r<t.length;r++){var e=t[r];O(i,e),e.textConfig&&O(n=n||{},e.textConfig)}return n&&(i.textConfig=n),i},t.prototype._applyStateObj=function(t,n,i,r,e,o){var a=!(n&&r);n&&n.textConfig?(this.textConfig=O({},r?this.textConfig:i.textConfig),O(this.textConfig,n.textConfig)):a&&i.textConfig&&(this.textConfig=i.textConfig);for(var s={},u=!1,h=0;h<gr.length;h++){var f=gr[h],l=e&&yr[f];n&&null!=n[f]?l?(u=!0,s[f]=n[f]):this[f]=n[f]:a&&null!=i[f]&&(l?(u=!0,s[f]=i[f]):this[f]=i[f])}if(!e)for(h=0;h<this.animators.length;h++){var c=this.animators[h],v=c.targetName;c.getLoop()||c.__changeFinalValue(v?(n||i)[v]:n||i)}u&&this._transitionState(t,s,o)},t.prototype._attachComponent=function(t){if((!t.__zr||t.__hostTarget)&&t!==this){var n=this.__zr;n&&t.addSelfToZr(n),t.__zr=n,t.__hostTarget=this}},t.prototype._detachComponent=function(t){t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__hostTarget=null},t.prototype.getClipPath=function(){return this._clipPath},t.prototype.setClipPath=function(t){this._clipPath&&this._clipPath!==t&&this.removeClipPath(),this._attachComponent(t),this._clipPath=t,this.markRedraw()},t.prototype.removeClipPath=function(){var t=this._clipPath;t&&(this._detachComponent(t),this._clipPath=null,this.markRedraw())},t.prototype.getTextContent=function(){return this._textContent},t.prototype.setTextContent=function(t){var n=this._textContent;n!==t&&(n&&n!==t&&this.removeTextContent(),t.innerTransformable=new Ki,this._attachComponent(t),this._textContent=t,this.markRedraw())},t.prototype.setTextConfig=function(t){this.textConfig||(this.textConfig={}),O(this.textConfig,t),this.markRedraw()},t.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},t.prototype.removeTextContent=function(){var t=this._textContent;t&&(t.innerTransformable=null,this._detachComponent(t),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},t.prototype.getTextGuideLine=function(){return this._textGuide},t.prototype.setTextGuideLine=function(t){this._textGuide&&this._textGuide!==t&&this.removeTextGuideLine(),this._attachComponent(t),this._textGuide=t,this.markRedraw()},t.prototype.removeTextGuideLine=function(){var t=this._textGuide;t&&(this._detachComponent(t),this._textGuide=null,this.markRedraw())},t.prototype.markRedraw=function(){this.__dirty|=1;var t=this.__zr;t&&(this.__inHover?t.refreshHover():t.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},t.prototype.dirty=function(){this.markRedraw()},t.prototype._toggleHoverLayerFlag=function(t){this.__inHover=t;var n=this._textContent,i=this._textGuide;n&&(n.__inHover=t),i&&(i.__inHover=t)},t.prototype.addSelfToZr=function(t){if(this.__zr!==t){this.__zr=t;var n=this.animators;if(n)for(var i=0;i<n.length;i++)t.animation.addAnimator(n[i]);this._clipPath&&this._clipPath.addSelfToZr(t),this._textContent&&this._textContent.addSelfToZr(t),this._textGuide&&this._textGuide.addSelfToZr(t)}},t.prototype.removeSelfFromZr=function(t){if(this.__zr){this.__zr=null;var n=this.animators;if(n)for(var i=0;i<n.length;i++)t.animation.removeAnimator(n[i]);this._clipPath&&this._clipPath.removeSelfFromZr(t),this._textContent&&this._textContent.removeSelfFromZr(t),this._textGuide&&this._textGuide.removeSelfFromZr(t)}},t.prototype.animate=function(t,n,i){var r=new gi(t?this[t]:this,n,i);return t&&(r.targetName=t),this.addAnimator(r,t),r},t.prototype.addAnimator=function(t,n){var i=this.__zr,r=this;t.during((function(){r.updateDuringAnimation(n)})).done((function(){var n=r.animators,i=z(n,t);i>=0&&n.splice(i,1)})),this.animators.push(t),i&&i.animation.addAnimator(t),i&&i.wakeUp()},t.prototype.updateDuringAnimation=function(){this.markRedraw()},t.prototype.stopAnimation=function(t,n){for(var i=this.animators,r=i.length,e=[],o=0;o<r;o++){var a=i[o];t&&t!==a.scope?e.push(a):a.stop(n)}return this.animators=e,this},t.prototype.animateTo=function(t,n,i){Mr(this,t,n,i)},t.prototype.animateFrom=function(t,n,i){Mr(this,t,n,i,!0)},t.prototype._transitionState=function(t,n,i,r){for(var e=Mr(this,n,i,r),o=0;o<e.length;o++)e[o].__fromStateTransition=t},t.prototype.getBoundingRect=function(){return null},t.prototype.getPaintRect=function(){return null},t.initDefaultProps=function(){var n=t.prototype;function i(t,i,r,e){function o(t,n){Object.defineProperty(n,0,{get:function(){return t[r]},set:function(n){t[r]=n}}),Object.defineProperty(n,1,{get:function(){return t[e]},set:function(n){t[e]=n}})}Object.defineProperty(n,t,{get:function(){return this[i]||o(this,this[i]=[]),this[i]},set:function(t){this[r]=t[0],this[e]=t[1],this[i]=t,o(this,t)}})}n.type="element",n.name="",n.ignore=n.silent=n.isGroup=n.draggable=n.dragging=n.ignoreClip=n.__inHover=!1,n.__dirty=1,Object.defineProperty&&(i("position","_legacyPos","x","y"),i("scale","_legacyScale","scaleX","scaleY"),i("origin","_legacyOrigin","originX","originY"))}(),t}();function Mr(t,n,i,r,e){var o=[];Ar(t,"",t,n,i=i||{},r,o,e);var a=o.length,s=!1,u=i.done,h=i.aborted,f=function(){s=!0,--a<=0&&(s?u&&u():h&&h())},l=function(){--a<=0&&(s?u&&u():h&&h())};a||u&&u(),o.length>0&&i.during&&o[0].during((function(t,n){i.during(n)}));for(var c=0;c<o.length;c++){var v=o[c];f&&v.done(f),l&&v.aborted(l),i.force&&v.duration(i.duration),v.start(i.easing)}return o}function kr(t,n,i){for(var r=0;r<i;r++)t[r]=n[r]}function Sr(t,n,i){if(_(n[i]))if(_(t[i])||(t[i]=[]),K(n[i])){var r=n[i].length;t[i].length!==r&&(t[i]=new n[i].constructor(r),kr(t[i],n[i],r))}else{var e=n[i],o=t[i],a=e.length;if(_(e[0]))for(var s=e[0].length,u=0;u<a;u++)o[u]?kr(o[u],e[u],s):o[u]=Array.prototype.slice.call(e[u]);else kr(o,e,a);o.length=e.length}else t[i]=n[i]}function Ar(t,n,i,r,e,o,a,s){for(var u=W(r),h=e.duration,f=e.delay,l=e.additive,c=e.setToFinal,v=!G(o),d=t.animators,p=[],m=0;m<u.length;m++){var g=r[A=u[m]];if(null!=g&&null!=i[A]&&(v||o[A]))if(!G(g)||_(g)||J(g))p.push(A);else{if(n){s||(i[A]=g,t.updateDuringAnimation(n));continue}Ar(t,A,i[A],g,e,o&&o[A],a,s)}else s||(i[A]=g,t.updateDuringAnimation(n),p.push(A))}var y=p.length;if(!l&&y)for(var b=0;b<d.length;b++)if((x=d[b]).targetName===n&&x.stopTracks(p)){var w=z(d,x);d.splice(w,1)}if(e.force||(y=(p=P(p,(function(t){return!((n=r[t])===(e=i[t])||_(n)&&_(e)&&function(t,n){var i=t.length;if(i!==n.length)return!1;for(var r=0;r<i;r++)if(t[r]!==n[r])return!1;return!0}(n,e));var n,e}))).length),y>0||e.force&&!a.length){var x,M=void 0,k=void 0,S=void 0;if(s)for(k={},c&&(M={}),b=0;b<y;b++)k[A=p[b]]=i[A],c?M[A]=r[A]:i[A]=r[A];else if(c)for(S={},b=0;b<y;b++){var A;S[A=p[b]]=li(i[A]),Sr(i,r,A)}(x=new gi(i,!1,!1,l?P(d,(function(t){return t.targetName===n})):null)).targetName=n,e.scope&&(x.scope=e.scope),c&&M&&x.whenWithKeys(0,M,p),S&&x.whenWithKeys(0,S,p),x.whenWithKeys(null==h?500:h,s?k:r,p).delay(f||0),t.addAnimator(x,n),a.push(x)}}B(xr,Ot),B(xr,Ki);var Cr=function(t){function n(n){var i=t.call(this)||this;return i.isGroup=!0,i._children=[],i.attr(n),i}return mt(n,t),n.prototype.childrenRef=function(){return this._children},n.prototype.children=function(){return this._children.slice()},n.prototype.childAt=function(t){return this._children[t]},n.prototype.childOfName=function(t){for(var n=this._children,i=0;i<n.length;i++)if(n[i].name===t)return n[i]},n.prototype.childCount=function(){return this._children.length},n.prototype.add=function(t){return t&&t!==this&&t.parent!==this&&(this._children.push(t),this._doAdd(t)),this},n.prototype.addBefore=function(t,n){if(t&&t!==this&&t.parent!==this&&n&&n.parent===this){var i=this._children,r=i.indexOf(n);r>=0&&(i.splice(r,0,t),this._doAdd(t))}return this},n.prototype.replace=function(t,n){var i=z(this._children,t);return i>=0&&this.replaceAt(n,i),this},n.prototype.replaceAt=function(t,n){var i=this._children,r=i[n];if(t&&t!==this&&t.parent!==this&&t!==r){i[n]=t,r.parent=null;var e=this.__zr;e&&r.removeSelfFromZr(e),this._doAdd(t)}return this},n.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var n=this.__zr;n&&n!==t.__zr&&t.addSelfToZr(n),n&&n.refresh()},n.prototype.remove=function(t){var n=this.__zr,i=this._children,r=z(i,t);return r<0||(i.splice(r,1),t.parent=null,n&&t.removeSelfFromZr(n),n&&n.refresh()),this},n.prototype.removeAll=function(){for(var t=this._children,n=this.__zr,i=0;i<t.length;i++){var r=t[i];n&&r.removeSelfFromZr(n),r.parent=null}return t.length=0,this},n.prototype.eachChild=function(t,n){for(var i=this._children,r=0;r<i.length;r++)t.call(n,i[r],r);return this},n.prototype.traverse=function(t,n){for(var i=0;i<this._children.length;i++){var r=this._children[i],e=t.call(n,r);r.isGroup&&!e&&r.traverse(t,n)}return this},n.prototype.addSelfToZr=function(n){t.prototype.addSelfToZr.call(this,n);for(var i=0;i<this._children.length;i++)this._children[i].addSelfToZr(n)},n.prototype.removeSelfFromZr=function(n){t.prototype.removeSelfFromZr.call(this,n);for(var i=0;i<this._children.length;i++)this._children[i].removeSelfFromZr(n)},n.prototype.getBoundingRect=function(t){for(var n=new sr(0,0,0,0),i=t||this._children,r=[],e=null,o=0;o<i.length;o++){var a=i[o];if(!a.ignore&&!a.invisible){var s=a.getBoundingRect(),u=a.getLocalTransform(r);u?(sr.applyTransform(n,s,u),(e=e||n.clone()).union(n)):(e=e||s.clone()).union(s)}}return e||n},n}(xr);Cr.prototype.type="group";
|
|
30
|
-
/*!
|
|
31
|
-
* ZRender, a high performance 2d drawing library.
|
|
32
|
-
*
|
|
33
|
-
* Copyright (c) 2013, Baidu Inc.
|
|
34
|
-
* All rights reserved.
|
|
35
|
-
*
|
|
36
|
-
* LICENSE
|
|
37
|
-
* https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
|
|
38
|
-
*/
|
|
39
|
-
var Tr={},Ir=function(){function t(t,n,i){var r=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,i=i||{},this.dom=n,this.id=t;var e=new ln,o=i.renderer||"canvas";Tr[o]||(o=W(Tr)[0]),i.useDirtyRect=null!=i.useDirtyRect&&i.useDirtyRect;var a=new Tr[o](n,e,i,t),s=i.ssr||a.ssrOnly;this.storage=e,this.painter=a;var u=f.node||f.worker||s?null:new Ri(a.getViewportRoot(),a.root);this.handler=new Qt(e,a,u,a.root),this.animation=new xi({stage:{update:s?null:function(){return r._flush(!0)}}}),s||this.animation.start()}return t.prototype.add=function(t){t&&(this.storage.addRoot(t),t.addSelfToZr(this),this.refresh())},t.prototype.remove=function(t){t&&(this.storage.delRoot(t),t.removeSelfFromZr(this),this.refresh())},t.prototype.configLayer=function(t,n){this.painter.configLayer&&this.painter.configLayer(t,n),this.refresh()},t.prototype.setBackgroundColor=function(t){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this.refresh(),this._backgroundColor=t,this._darkMode=function(t){if(!t)return!1;if("string"==typeof t)return ri(t,1)<.4;if(t.colorStops){for(var n=t.colorStops,i=0,r=n.length,e=0;e<r;e++)i+=ri(n[e].color,1);return(i/=r)<.4}return!1}(t)},t.prototype.getBackgroundColor=function(){return this._backgroundColor},t.prototype.setDarkMode=function(t){this._darkMode=t},t.prototype.isDarkMode=function(){return this._darkMode},t.prototype.refreshImmediately=function(t){t||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1},t.prototype.refresh=function(){this._needsRefresh=!0,this.animation.start()},t.prototype.flush=function(){this._flush(!1)},t.prototype._flush=function(t){var n,i=yi();this._needsRefresh&&(n=!0,this.refreshImmediately(t)),this._needsRefreshHover&&(n=!0,this.refreshHoverImmediately());var r=yi();n?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:r-i})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},t.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},t.prototype.wakeUp=function(){this.animation.start(),this._stillFrameAccum=0},t.prototype.refreshHover=function(){this._needsRefreshHover=!0},t.prototype.refreshHoverImmediately=function(){this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover()},t.prototype.resize=function(t){this.painter.resize((t=t||{}).width,t.height),this.handler.resize()},t.prototype.clearAnimation=function(){this.animation.clear()},t.prototype.getWidth=function(){return this.painter.getWidth()},t.prototype.getHeight=function(){return this.painter.getHeight()},t.prototype.setCursorStyle=function(t){this.handler.setCursorStyle(t)},t.prototype.findHover=function(t,n){return this.handler.findHover(t,n)},t.prototype.on=function(t,n,i){return this.handler.on(t,n,i),this},t.prototype.off=function(t,n){this.handler.off(t,n)},t.prototype.trigger=function(t,n){this.handler.trigger(t,n)},t.prototype.clear=function(){for(var t=this.storage.getRoots(),n=0;n<t.length;n++)t[n]instanceof Cr&&t[n].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()},t.prototype.dispose=function(){this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null},t}();function Nr(t,n){return new Ir(T(),t,n)}function Lr(t,n,i,r){var e=n[0],o=n[1],a=i[0],s=i[1],u=o-e,h=s-a;if(0===u)return 0===h?a:(a+s)/2;if(r)if(u>0){if(t<=e)return a;if(t>=o)return s}else{if(t>=e)return a;if(t<=o)return s}else{if(t===e)return a;if(t===o)return s}return(t-e)/u*h+a}function Or(t,n){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return X(t)?(i=t,i.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(t)/100*n:parseFloat(t):null==t?NaN:+t;var i}function Dr(t,n,i){return null==n&&(n=10),n=Math.min(Math.max(0,n),20),t=(+t).toFixed(n),i?t:+t}function zr(t){if(t=+t,isNaN(t))return 0;if(t>1e-14)for(var n=1,i=0;i<15;i++,n*=10)if(Math.round(t*n)/n===t)return i;return function(t){var n=t.toString().toLowerCase(),i=n.indexOf("e"),r=i>0?+n.slice(i+1):0,e=i>0?i:n.length,o=n.indexOf(".");return Math.max(0,(o<0?0:e-1-o)-r)}(t)}function Br(t,n){var i=Math.max(zr(t),zr(n)),r=t+n;return i>20?r:Dr(r,i)}function _r(t){var n=2*Math.PI;return(t%n+n)%n}function Rr(t){return t>-1e-4&&t<1e-4}var Fr=/^(?:(\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 Er(t){if(t instanceof Date)return t;if(X(t)){var n=Fr.exec(t);if(!n)return new Date(NaN);if(n[8]){var i=+n[4]||0;return"Z"!==n[8].toUpperCase()&&(i-=+n[8].slice(0,3)),new Date(Date.UTC(+n[1],+(n[2]||1)-1,+n[3]||1,i,+(n[5]||0),+n[6]||0,n[7]?+n[7].substring(0,3):0))}return new Date(+n[1],+(n[2]||1)-1,+n[3]||1,+n[4]||0,+(n[5]||0),+n[6]||0,n[7]?+n[7].substring(0,3):0)}return null==t?new Date(NaN):new Date(Math.round(t))}function Pr(t){var n=parseFloat(t);return n==t&&(0!==n||!X(t)||t.indexOf("x")<=0)?n:NaN}function Wr(){return Math.round(9*Math.random())}function Hr(t,n){return 0===n?t:Hr(n,t%n)}function Ur(t,n){return null==t?n:null==n?t:t*n/Hr(t,n)}function jr(t){throw new Error(t)}function Yr(t,n,i){return(n-t)*i+t}function Xr(t){return t instanceof Array?t:null==t?[]:[t]}function Vr(t,n,i){if(t){t[n]=t[n]||{},t.emphasis=t.emphasis||{},t.emphasis[n]=t.emphasis[n]||{};for(var r=0,e=i.length;r<e;r++){var o=i[r];!t.emphasis[n].hasOwnProperty(o)&&t[n].hasOwnProperty(o)&&(t.emphasis[n][o]=t[n][o])}}}var qr=["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 Gr(t){return!G(t)||j(t)||t instanceof Date?t:t.value}function Zr(t){return G(t)&&!(t instanceof Array)}function Kr(t,n,i){var r=Jr(n[t],null),e=Jr(i[t],null);return null!=r&&null!=e&&r===e}function $r(t){return Jr(t,"")}function Jr(t,n){return null==t?n:X(t)?t:q(t)||V(t)?t+"":n}function Qr(t){var n=t.name;return!(!n||!n.indexOf("series\0"))}function te(t){return t&&null!=t.id&&0===$r(t.id).indexOf("\0_ec_\0")}function ne(t,n){return null!=n.dataIndexInside?n.dataIndexInside:null!=n.dataIndex?j(n.dataIndex)?F(n.dataIndex,(function(n){return t.indexOfRawIndex(n)})):t.indexOfRawIndex(n.dataIndex):null!=n.name?j(n.name)?F(n.name,(function(n){return t.indexOfName(n)})):t.indexOfName(n.name):void 0}function ie(){var t="__ec_inner_"+re++;return function(n){return n[t]||(n[t]={})}}var re=Wr();function ee(t,n,i){var r=oe(n,i),e=r.queryOptionMap,o=r.others,a=i?i.defaultMainType:null;return!r.mainTypeSpecified&&a&&e.set(a,{}),e.each((function(n,r){var e=se(t,r,n,{useDefault:a===r,enableAll:!i||null==i.enableAll||i.enableAll,enableNone:!i||null==i.enableNone||i.enableNone});o[r+"Models"]=e.models,o[r+"Model"]=e.models[0]})),o}function oe(t,n){var i;if(X(t)){var r={};r[t+"Index"]=0,i=r}else i=t;var e=ht(),o={},a=!1;return R(i,(function(t,i){if("dataIndex"!==i&&"dataIndexInside"!==i){var r=i.match(/^(\w+)(Index|Id|Name)$/)||[],s=r[1],u=(r[2]||"").toLowerCase();!s||!u||n&&n.includeMainTypes&&z(n.includeMainTypes,s)<0||(a=a||!!s,(e.get(s)||e.set(s,{}))[u]=t)}else o[i]=t})),{mainTypeSpecified:a,queryOptionMap:e,others:o}}var ae={useDefault:!0,enableAll:!1,enableNone:!1};function se(t,n,i,r){r=r||ae;var e=i.index,o=i.id,a=i.name,s={models:null,specified:null!=e||null!=o||null!=a};if(!s.specified){var u=void 0;return s.models=r.useDefault&&(u=t.getComponent(n))?[u]:[],s}return"none"===e||!1===e?(et(r.enableNone,'`"none"` or `false` is not a valid value on index option.'),s.models=[],s):("all"===e&&(et(r.enableAll,'`"all"` is not a valid value on index option.'),e=o=a=null),s.models=t.queryComponents({mainType:n,index:e,id:o,name:a}),s)}function ue(t,n,i){t.setAttribute?t.setAttribute(n,i):t[n]=i}var he="___EC__COMPONENT__CONTAINER___";function fe(t){var n={main:"",sub:""};if(t){var i=t.split(".");n.main=i[0]||"",n.sub=i[1]||""}return n}function le(t){t.$constructor=t,t.extend=function(t){var n,i,r=this;return Y(i=r)&&/^class\s/.test(Function.prototype.toString.call(i))?n=function(t){function n(){return t.apply(this,arguments)||this}return u(n,t),n}(r):function(t,n){var i=t.prototype;function r(){}for(var e in r.prototype=n.prototype,t.prototype=new r,i)i.hasOwnProperty(e)&&(t.prototype[e]=i[e]);t.prototype.constructor=t,t.superClass=n}(n=function(){(t.$constructor||r).apply(this,arguments)},this),O(n.prototype,t),n.___EC__EXTENDED_CLASS___=!0,n.extend=this.extend,n.superCall=de,n.superApply=pe,n.superClass=r,n}}function ce(t,n){t.extend=n.extend}var ve=Math.round(10*Math.random());function de(t,n){for(var i=[],r=2;r<arguments.length;r++)i[r-2]=arguments[r];return this.superClass.prototype[n].apply(t,i)}function pe(t,n,i){return this.superClass.prototype[n].apply(t,i)}function me(t){var n={};t.registerClass=function(t){var i,r=t.type||t.prototype.type;if(r){et(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(i=r),'componentType "'+i+'" illegal'),t.prototype.type=r;var e=fe(r);e.sub?e.sub!==he&&((function(t){var i=n[t.main];return i&&i[he]||((i=n[t.main]={})[he]=!0),i}(e))[e.sub]=t):n[e.main]=t}return t},t.getClass=function(t,i,r){var e=n[t];if(e&&e[he]&&(e=i?e[i]:null),r&&!e)throw new Error(i?"Component "+t+"."+(i||"")+" is used but not imported.":t+".type should be specified.");return e},t.getClassesByMainType=function(t){var i=fe(t),r=[],e=n[i.main];return e&&e[he]?R(e,(function(t,n){n!==he&&r.push(t)})):r.push(e),r},t.hasClass=function(t){var i=fe(t);return!!n[i.main]},t.getAllClassMainTypes=function(){var t=[];return R(n,(function(n,i){t.push(i)})),t},t.hasSubTypes=function(t){var i=fe(t),r=n[i.main];return r&&r[he]}}function ge(t,n){for(var i=0;i<t.length;i++)t[i][1]||(t[i][1]=t[i][0]);return n=n||!1,function(i,r,e){for(var o={},a=0;a<t.length;a++){var s=t[a][1];if(!(r&&z(r,s)>=0||e&&z(e,s)<0)){var u=i.getShallow(s,n);null!=u&&(o[t[a][0]]=u)}}return o}}var ye=ge([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),be=function(){function t(){}return t.prototype.getAreaStyle=function(t,n){return ye(this,t,n)},t}(),we=new Hn(50);function xe(t){if("string"==typeof t){var n=we.get(t);return n&&n.image}return t}function Me(t,n,i,r,e){if(t){if("string"==typeof t){if(n&&n.__zrImageSrc===t||!i)return n;var o=we.get(t),a={hostEl:i,cb:r,cbPayload:e};return o?!Se(n=o.image)&&o.pending.push(a):((n=p.loadImage(t,ke,ke)).__zrImageSrc=t,we.put(t,n.__cachedImgObj={image:n,pending:[a]})),n}return t}return n}function ke(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var n=0;n<t.pending.length;n++){var i=t.pending[n],r=i.cb;r&&r(this,i.cbPayload),i.hostEl.dirty()}t.pending.length=0}function Se(t){return t&&t.width&&t.height}var Ae=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function Ce(t,n,i,r,e){if(!n)return"";var o=(t+"").split("\n");e=Te(n,i,r,e);for(var a=0,s=o.length;a<s;a++)o[a]=Ie(o[a],e);return o.join("\n")}function Te(t,n,i,r){var e=O({},r=r||{});e.font=n,i=tt(i,"..."),e.maxIterations=tt(r.maxIterations,2);var o=e.minChar=tt(r.minChar,0);e.cnCharWidth=hr("国",n);var a=e.ascCharWidth=hr("a",n);e.placeholder=tt(r.placeholder,"");for(var s=t=Math.max(0,t-1),u=0;u<o&&s>=a;u++)s-=a;var h=hr(i,n);return h>s&&(i="",h=0),s=t-h,e.ellipsis=i,e.ellipsisWidth=h,e.contentWidth=s,e.containerWidth=t,e}function Ie(t,n){var i=n.containerWidth,r=n.font,e=n.contentWidth;if(!i)return"";var o=hr(t,r);if(o<=i)return t;for(var a=0;;a++){if(o<=e||a>=n.maxIterations){t+=n.ellipsis;break}var s=0===a?Ne(t,e,n.ascCharWidth,n.cnCharWidth):o>0?Math.floor(t.length*e/o):0;o=hr(t=t.substr(0,s),r)}return""===t&&(t=n.placeholder),t}function Ne(t,n,i,r){for(var e=0,o=0,a=t.length;o<a&&e<n;o++){var s=t.charCodeAt(o);e+=0<=s&&s<=127?i:r}return o}var Le=function(){},Oe=function(t){this.tokens=[],t&&(this.tokens=t)},De=function(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[]};function ze(t,n,i,r,e){var o,a,s=""===n,u=e&&i.rich[e]||{},h=t.lines,f=u.font||i.font,l=!1;if(r){var c=u.padding,v=c?c[1]+c[3]:0;if(null!=u.width&&"auto"!==u.width){var d=pr(u.width,r.width)+v;h.length>0&&d+r.accumWidth>r.width&&(o=n.split("\n"),l=!0),r.accumWidth=d}else{var p=Re(n,f,r.width,r.breakAll,r.accumWidth);r.accumWidth=p.accumWidth+v,a=p.linesWidths,o=p.lines}}else o=n.split("\n");for(var m=0;m<o.length;m++){var g=o[m],y=new Le;if(y.styleName=e,y.text=g,y.isLineHolder=!g&&!s,y.width="number"==typeof u.width?u.width:a?a[m]:hr(g,f),m||l)h.push(new Oe([y]));else{var b=(h[h.length-1]||(h[0]=new Oe)).tokens,w=b.length;1===w&&b[0].isLineHolder?b[0]=y:(g||!w||s)&&b.push(y)}}}var Be=E(",&?/;] ".split(""),(function(t,n){return t[n]=!0,t}),{});function _e(t){return!function(t){var n=t.charCodeAt(0);return n>=33&&n<=383}(t)||!!Be[t]}function Re(t,n,i,r,e){for(var o=[],a=[],s="",u="",h=0,f=0,l=0;l<t.length;l++){var c=t.charAt(l);if("\n"!==c){var v=hr(c,n),d=!r&&!_e(c);(o.length?f+v>i:e+f+v>i)?f?(s||u)&&(d?(s||(s=u,u="",f=h=0),o.push(s),a.push(f-h),u+=c,s="",f=h+=v):(u&&(s+=u,u="",h=0),o.push(s),a.push(f),s=c,f=v)):d?(o.push(u),a.push(h),u=c,h=v):(o.push(c),a.push(v)):(f+=v,d?(u+=c,h+=v):(u&&(s+=u,u="",h=0),s+=c))}else u&&(s+=u,f+=h),o.push(s),a.push(f),s="",u="",h=0,f=0}return o.length||s||(s=t,u="",h=0),u&&(s+=u),s&&(o.push(s),a.push(f)),1===o.length&&(f+=e),{accumWidth:f,lines:o,linesWidths:a}}var Fe="__zr_style_"+Math.round(10*Math.random()),Ee={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},Pe={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Ee[Fe]=!0;var We=["z","z2","invisible"],He=["invisible"],Ue=function(t){function n(n){return t.call(this,n)||this}var i;return mt(n,t),n.prototype._init=function(n){for(var i=W(n),r=0;r<i.length;r++){var e=i[r];"style"===e?this.useStyle(n[e]):t.prototype.attrKV.call(this,e,n[e])}this.style||this.useStyle({})},n.prototype.beforeBrush=function(){},n.prototype.afterBrush=function(){},n.prototype.innerBeforeBrush=function(){},n.prototype.innerAfterBrush=function(){},n.prototype.shouldBePainted=function(t,n,i,r){var e,o,a,s=this.transform;if(this.ignore||this.invisible||0===this.style.opacity||this.culling&&(o=t,a=n,je.copy((e=this).getBoundingRect()),e.transform&&je.applyTransform(e.transform),Ye.width=o,Ye.height=a,!je.intersect(Ye))||s&&!s[0]&&!s[3])return!1;if(i&&this.__clipPaths)for(var u=0;u<this.__clipPaths.length;++u)if(this.__clipPaths[u].isZeroArea())return!1;if(r&&this.parent)for(var h=this.parent;h;){if(h.ignore)return!1;h=h.parent}return!0},n.prototype.contain=function(t,n){return this.rectContain(t,n)},n.prototype.traverse=function(t,n){t.call(n,this)},n.prototype.rectContain=function(t,n){var i=this.transformCoordToLocal(t,n);return this.getBoundingRect().contain(i[0],i[1])},n.prototype.getPaintRect=function(){var t=this._paintRect;if(!this._paintRect||this.__dirty){var n=this.transform,i=this.getBoundingRect(),r=this.style,e=r.shadowBlur||0,o=r.shadowOffsetX||0,a=r.shadowOffsetY||0;t=this._paintRect||(this._paintRect=new sr(0,0,0,0)),n?sr.applyTransform(t,i,n):t.copy(i),(e||o||a)&&(t.width+=2*e+Math.abs(o),t.height+=2*e+Math.abs(a),t.x=Math.min(t.x,t.x+o-e),t.y=Math.min(t.y,t.y+a-e));var s=this.dirtyRectTolerance;t.isZero()||(t.x=Math.floor(t.x-s),t.y=Math.floor(t.y-s),t.width=Math.ceil(t.width+1+2*s),t.height=Math.ceil(t.height+1+2*s))}return t},n.prototype.setPrevPaintRect=function(t){t?(this._prevPaintRect=this._prevPaintRect||new sr(0,0,0,0),this._prevPaintRect.copy(t)):this._prevPaintRect=null},n.prototype.getPrevPaintRect=function(){return this._prevPaintRect},n.prototype.animateStyle=function(t){return this.animate("style",t)},n.prototype.updateDuringAnimation=function(t){"style"===t?this.dirtyStyle():this.markRedraw()},n.prototype.attrKV=function(n,i){"style"!==n?t.prototype.attrKV.call(this,n,i):this.style?this.setStyle(i):this.useStyle(i)},n.prototype.setStyle=function(t,n){return"string"==typeof t?this.style[t]=n:O(this.style,t),this.dirtyStyle(),this},n.prototype.dirtyStyle=function(t){t||this.markRedraw(),this.__dirty|=2,this._rect&&(this._rect=null)},n.prototype.dirty=function(){this.dirtyStyle()},n.prototype.styleChanged=function(){return!!(2&this.__dirty)},n.prototype.styleUpdated=function(){this.__dirty&=-3},n.prototype.createStyle=function(t){return ft(Ee,t)},n.prototype.useStyle=function(t){t[Fe]||(t=this.createStyle(t)),this.__inHover?this.__hoverStyle=t:this.style=t,this.dirtyStyle()},n.prototype.isStyleObject=function(t){return t[Fe]},n.prototype._innerSaveToNormal=function(n){t.prototype._innerSaveToNormal.call(this,n);var i=this._normalState;n.style&&!i.style&&(i.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(n,i,We)},n.prototype._applyStateObj=function(n,i,r,e,o,a){t.prototype._applyStateObj.call(this,n,i,r,e,o,a);var s,u=!(i&&e);if(i&&i.style?o?e?s=i.style:(s=this._mergeStyle(this.createStyle(),r.style),this._mergeStyle(s,i.style)):(s=this._mergeStyle(this.createStyle(),e?this.style:r.style),this._mergeStyle(s,i.style)):u&&(s=r.style),s)if(o){var h=this.style;if(this.style=this.createStyle(u?{}:h),u)for(var f=W(h),l=0;l<f.length;l++)(d=f[l])in s&&(s[d]=s[d],this.style[d]=h[d]);var c=W(s);for(l=0;l<c.length;l++)this.style[d=c[l]]=this.style[d];this._transitionState(n,{style:s},a,this.getAnimationStyleProps())}else this.useStyle(s);var v=this.__inHover?He:We;for(l=0;l<v.length;l++){var d=v[l];i&&null!=i[d]?this[d]=i[d]:u&&null!=r[d]&&(this[d]=r[d])}},n.prototype._mergeStates=function(n){for(var i,r=t.prototype._mergeStates.call(this,n),e=0;e<n.length;e++){var o=n[e];o.style&&this._mergeStyle(i=i||{},o.style)}return i&&(r.style=i),r},n.prototype._mergeStyle=function(t,n){return O(t,n),t},n.prototype.getAnimationStyleProps=function(){return Pe},n.initDefaultProps=((i=n.prototype).type="displayable",i.invisible=!1,i.z=0,i.z2=0,i.zlevel=0,i.culling=!1,i.cursor="pointer",i.rectHover=!1,i.incremental=!1,i._rect=null,i.dirtyRectTolerance=0,void(i.__dirty=3)),n}(xr),je=new sr(0,0,0,0),Ye=new sr(0,0,0,0),Xe=Math.min,Ve=Math.max,qe=Math.sin,Ge=Math.cos,Ze=2*Math.PI,Ke=gt(),$e=gt(),Je=gt();function Qe(t,n,i,r,e,o){e[0]=Xe(t,i),e[1]=Xe(n,r),o[0]=Ve(t,i),o[1]=Ve(n,r)}var to=[],no=[];function io(t,n,i,r,e,o,a,s,u,h){var f=Cn,l=kn,c=f(t,i,e,a,to);u[0]=1/0,u[1]=1/0,h[0]=-1/0,h[1]=-1/0;for(var v=0;v<c;v++){var d=l(t,i,e,a,to[v]);u[0]=Xe(d,u[0]),h[0]=Ve(d,h[0])}for(c=f(n,r,o,s,no),v=0;v<c;v++){var p=l(n,r,o,s,no[v]);u[1]=Xe(p,u[1]),h[1]=Ve(p,h[1])}u[0]=Xe(t,u[0]),h[0]=Ve(t,h[0]),u[0]=Xe(a,u[0]),h[0]=Ve(a,h[0]),u[1]=Xe(n,u[1]),h[1]=Ve(n,h[1]),u[1]=Xe(s,u[1]),h[1]=Ve(s,h[1])}function ro(t,n,i,r,e,o,a,s){var u=Dn,h=Ln,f=Ve(Xe(u(t,i,e),1),0),l=Ve(Xe(u(n,r,o),1),0),c=h(t,i,e,f),v=h(n,r,o,l);a[0]=Xe(t,e,c),a[1]=Xe(n,o,v),s[0]=Ve(t,e,c),s[1]=Ve(n,o,v)}function eo(t,n,i,r,e,o,a,s,u){var h=Tt,f=It,l=Math.abs(e-o);if(l%Ze<1e-4&&l>1e-4)return s[0]=t-i,s[1]=n-r,u[0]=t+i,void(u[1]=n+r);if(Ke[0]=Ge(e)*i+t,Ke[1]=qe(e)*r+n,$e[0]=Ge(o)*i+t,$e[1]=qe(o)*r+n,h(s,Ke,$e),f(u,Ke,$e),(e%=Ze)<0&&(e+=Ze),(o%=Ze)<0&&(o+=Ze),e>o&&!a?o+=Ze:e<o&&a&&(e+=Ze),a){var c=o;o=e,e=c}for(var v=0;v<o;v+=Math.PI/2)v>e&&(Je[0]=Ge(v)*i+t,Je[1]=qe(v)*r+n,h(s,Je,s),f(u,Je,u))}var oo={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},ao=[],so=[],uo=[],ho=[],fo=[],lo=[],co=Math.min,vo=Math.max,po=Math.cos,mo=Math.sin,go=Math.abs,yo=Math.PI,bo=2*yo,wo="undefined"!=typeof Float32Array,xo=[];function Mo(t){return Math.round(t/yo*1e8)/1e8%2*yo}var ko=function(){function t(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=[])}var n;return t.prototype.increaseVersion=function(){this._version++},t.prototype.getVersion=function(){return this._version},t.prototype.setScale=function(t,n,i){(i=i||0)>0&&(this._ux=go(i/Ei/t)||0,this._uy=go(i/Ei/n)||0)},t.prototype.setDPR=function(t){this.dpr=t},t.prototype.setContext=function(t){this._ctx=t},t.prototype.getContext=function(){return this._ctx},t.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},t.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},t.prototype.moveTo=function(t,n){return this._drawPendingPt(),this.addData(oo.M,t,n),this._ctx&&this._ctx.moveTo(t,n),this._x0=t,this._y0=n,this._xi=t,this._yi=n,this},t.prototype.lineTo=function(t,n){var i=go(t-this._xi),r=go(n-this._yi),e=i>this._ux||r>this._uy;if(this.addData(oo.L,t,n),this._ctx&&e&&this._ctx.lineTo(t,n),e)this._xi=t,this._yi=n,this._pendingPtDist=0;else{var o=i*i+r*r;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=n,this._pendingPtDist=o)}return this},t.prototype.bezierCurveTo=function(t,n,i,r,e,o){return this._drawPendingPt(),this.addData(oo.C,t,n,i,r,e,o),this._ctx&&this._ctx.bezierCurveTo(t,n,i,r,e,o),this._xi=e,this._yi=o,this},t.prototype.quadraticCurveTo=function(t,n,i,r){return this._drawPendingPt(),this.addData(oo.Q,t,n,i,r),this._ctx&&this._ctx.quadraticCurveTo(t,n,i,r),this._xi=i,this._yi=r,this},t.prototype.arc=function(t,n,i,r,e,o){return this._drawPendingPt(),xo[0]=r,xo[1]=e,function(t,n){var i=Mo(t[0]);i<0&&(i+=bo);var r=t[1];r+=i-t[0],!n&&r-i>=bo?r=i+bo:n&&i-r>=bo?r=i-bo:!n&&i>r?r=i+(bo-Mo(i-r)):n&&i<r&&(r=i-(bo-Mo(r-i))),t[0]=i,t[1]=r}(xo,o),this.addData(oo.A,t,n,i,i,r=xo[0],(e=xo[1])-r,0,o?0:1),this._ctx&&this._ctx.arc(t,n,i,r,e,o),this._xi=po(e)*i+t,this._yi=mo(e)*i+n,this},t.prototype.arcTo=function(t,n,i,r,e){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,n,i,r,e),this},t.prototype.rect=function(t,n,i,r){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,n,i,r),this.addData(oo.R,t,n,i,r),this},t.prototype.closePath=function(){this._drawPendingPt(),this.addData(oo.Z);var t=this._ctx,n=this._x0,i=this._y0;return t&&t.closePath(),this._xi=n,this._yi=i,this},t.prototype.fill=function(t){t&&t.fill(),this.toStatic()},t.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},t.prototype.len=function(){return this._len},t.prototype.setData=function(t){var n=t.length;this.data&&this.data.length===n||!wo||(this.data=new Float32Array(n));for(var i=0;i<n;i++)this.data[i]=t[i];this._len=n},t.prototype.appendPath=function(t){t instanceof Array||(t=[t]);for(var n=t.length,i=0,r=this._len,e=0;e<n;e++)i+=t[e].len();for(wo&&this.data instanceof Float32Array&&(this.data=new Float32Array(r+i)),e=0;e<n;e++)for(var o=t[e].data,a=0;a<o.length;a++)this.data[r++]=o[a];this._len=r},t.prototype.addData=function(t,n,i,r,e,o,a,s,u){if(this._saveData){var h=this.data;this._len+arguments.length>h.length&&(this._expandData(),h=this.data);for(var f=0;f<arguments.length;f++)h[this._len++]=arguments[f]}},t.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},t.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],n=0;n<this._len;n++)t[n]=this.data[n];this.data=t}},t.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var t=this.data;t instanceof Array&&(t.length=this._len,wo&&this._len>11&&(this.data=new Float32Array(t)))}},t.prototype.getBoundingRect=function(){uo[0]=uo[1]=fo[0]=fo[1]=Number.MAX_VALUE,ho[0]=ho[1]=lo[0]=lo[1]=-Number.MAX_VALUE;var t,n=this.data,i=0,r=0,e=0,o=0;for(t=0;t<this._len;){var a=n[t++],s=1===t;switch(s&&(e=i=n[t],o=r=n[t+1]),a){case oo.M:i=e=n[t++],r=o=n[t++],fo[0]=e,fo[1]=o,lo[0]=e,lo[1]=o;break;case oo.L:Qe(i,r,n[t],n[t+1],fo,lo),i=n[t++],r=n[t++];break;case oo.C:io(i,r,n[t++],n[t++],n[t++],n[t++],n[t],n[t+1],fo,lo),i=n[t++],r=n[t++];break;case oo.Q:ro(i,r,n[t++],n[t++],n[t],n[t+1],fo,lo),i=n[t++],r=n[t++];break;case oo.A:var u=n[t++],h=n[t++],f=n[t++],l=n[t++],c=n[t++],v=n[t++]+c;t+=1;var d=!n[t++];s&&(e=po(c)*f+u,o=mo(c)*l+h),eo(u,h,f,l,c,v,d,fo,lo),i=po(v)*f+u,r=mo(v)*l+h;break;case oo.R:Qe(e=i=n[t++],o=r=n[t++],e+n[t++],o+n[t++],fo,lo);break;case oo.Z:i=e,r=o}Tt(uo,uo,fo),It(ho,ho,lo)}return 0===t&&(uo[0]=uo[1]=ho[0]=ho[1]=0),new sr(uo[0],uo[1],ho[0]-uo[0],ho[1]-uo[1])},t.prototype._calculateLength=function(){var t=this.data,n=this._len,i=this._ux,r=this._uy,e=0,o=0,a=0,s=0;this._pathSegLen||(this._pathSegLen=[]);for(var u=this._pathSegLen,h=0,f=0,l=0;l<n;){var c=t[l++],v=1===l;v&&(a=e=t[l],s=o=t[l+1]);var d=-1;switch(c){case oo.M:e=a=t[l++],o=s=t[l++];break;case oo.L:var p=t[l++],m=(b=t[l++])-o;(go(N=p-e)>i||go(m)>r||l===n-1)&&(d=Math.sqrt(N*N+m*m),e=p,o=b);break;case oo.C:var g=t[l++],y=t[l++],b=(p=t[l++],t[l++]),w=t[l++],x=t[l++];d=Nn(e,o,g,y,p,b,w,x,10),e=w,o=x;break;case oo.Q:d=_n(e,o,g=t[l++],y=t[l++],p=t[l++],b=t[l++],10),e=p,o=b;break;case oo.A:var M=t[l++],k=t[l++],S=t[l++],A=t[l++],C=t[l++],T=t[l++],I=T+C;l+=1,l++,v&&(a=po(C)*S+M,s=mo(C)*A+k),d=vo(S,A)*co(bo,Math.abs(T)),e=po(I)*S+M,o=mo(I)*A+k;break;case oo.R:a=e=t[l++],s=o=t[l++],d=2*t[l++]+2*t[l++];break;case oo.Z:var N=a-e;m=s-o,d=Math.sqrt(N*N+m*m),e=a,o=s}d>=0&&(u[f++]=d,h+=d)}return this._pathLen=h,h},t.prototype.rebuildPath=function(t,n){var i,r,e,o,a,s,u,h,f,l,c=this.data,v=this._ux,d=this._uy,p=this._len,m=n<1,g=0,y=0,b=0;if(!m||(this._pathSegLen||this._calculateLength(),u=this._pathSegLen,h=n*this._pathLen))t:for(var w=0;w<p;){var x=c[w++],M=1===w;switch(M&&(i=e=c[w],r=o=c[w+1]),x!==oo.L&&b>0&&(t.lineTo(f,l),b=0),x){case oo.M:i=e=c[w++],r=o=c[w++],t.moveTo(e,o);break;case oo.L:a=c[w++],s=c[w++];var k=go(a-e),S=go(s-o);if(k>v||S>d){if(m){if(g+(q=u[y++])>h){t.lineTo(e*(1-(G=(h-g)/q))+a*G,o*(1-G)+s*G);break t}g+=q}t.lineTo(a,s),e=a,o=s,b=0}else{var A=k*k+S*S;A>b&&(f=a,l=s,b=A)}break;case oo.C:var C=c[w++],T=c[w++],I=c[w++],N=c[w++],L=c[w++],O=c[w++];if(m){if(g+(q=u[y++])>h){Tn(e,C,I,L,G=(h-g)/q,ao),Tn(o,T,N,O,G,so),t.bezierCurveTo(ao[1],so[1],ao[2],so[2],ao[3],so[3]);break t}g+=q}t.bezierCurveTo(C,T,I,N,L,O),e=L,o=O;break;case oo.Q:if(C=c[w++],T=c[w++],I=c[w++],N=c[w++],m){if(g+(q=u[y++])>h){zn(e,C,I,G=(h-g)/q,ao),zn(o,T,N,G,so),t.quadraticCurveTo(ao[1],so[1],ao[2],so[2]);break t}g+=q}t.quadraticCurveTo(C,T,I,N),e=I,o=N;break;case oo.A:var D=c[w++],z=c[w++],B=c[w++],_=c[w++],R=c[w++],F=c[w++],E=c[w++],P=!c[w++],W=B>_?B:_,H=go(B-_)>.001,U=R+F,j=!1;if(m&&(g+(q=u[y++])>h&&(U=R+F*(h-g)/q,j=!0),g+=q),H&&t.ellipse?t.ellipse(D,z,B,_,E,R,U,P):t.arc(D,z,W,R,U,P),j)break t;M&&(i=po(R)*B+D,r=mo(R)*_+z),e=po(U)*B+D,o=mo(U)*_+z;break;case oo.R:i=e=c[w],r=o=c[w+1],a=c[w++],s=c[w++];var Y=c[w++],X=c[w++];if(m){if(g+(q=u[y++])>h){var V=h-g;t.moveTo(a,s),t.lineTo(a+co(V,Y),s),(V-=Y)>0&&t.lineTo(a+Y,s+co(V,X)),(V-=X)>0&&t.lineTo(a+vo(Y-V,0),s+X),(V-=Y)>0&&t.lineTo(a,s+vo(X-V,0));break t}g+=q}t.rect(a,s,Y,X);break;case oo.Z:if(m){var q;if(g+(q=u[y++])>h){var G;t.lineTo(e*(1-(G=(h-g)/q))+i*G,o*(1-G)+r*G);break t}g+=q}t.closePath(),e=i,o=r}}},t.prototype.clone=function(){var n=new t,i=this.data;return n.data=i.slice?i.slice():Array.prototype.slice.call(i),n._len=this._len,n},t.CMD=oo,t.initDefaultProps=((n=t.prototype)._saveData=!0,n._ux=0,n._uy=0,n._pendingPtDist=0,void(n._version=0)),t}();function So(t,n,i,r,e,o,a){if(0===e)return!1;var s,u=e;if(a>n+u&&a>r+u||a<n-u&&a<r-u||o>t+u&&o>i+u||o<t-u&&o<i-u)return!1;if(t===i)return Math.abs(o-t)<=u/2;var h=(s=(n-r)/(t-i))*o-a+(t*r-i*n)/(t-i);return h*h/(s*s+1)<=u/2*u/2}function Ao(t,n,i,r,e,o,a,s,u,h,f){if(0===u)return!1;var l=u;return!(f>n+l&&f>r+l&&f>o+l&&f>s+l||f<n-l&&f<r-l&&f<o-l&&f<s-l||h>t+l&&h>i+l&&h>e+l&&h>a+l||h<t-l&&h<i-l&&h<e-l&&h<a-l)&&In(t,n,i,r,e,o,a,s,h,f,null)<=l/2}function Co(t,n,i,r,e,o,a,s,u){if(0===a)return!1;var h=a;return!(u>n+h&&u>r+h&&u>o+h||u<n-h&&u<r-h&&u<o-h||s>t+h&&s>i+h&&s>e+h||s<t-h&&s<i-h&&s<e-h)&&Bn(t,n,i,r,e,o,s,u,null)<=h/2}var To=2*Math.PI;function Io(t){return(t%=To)<0&&(t+=To),t}var No=2*Math.PI;function Lo(t,n,i,r,e,o,a,s,u){if(0===a)return!1;var h=a;s-=t,u-=n;var f=Math.sqrt(s*s+u*u);if(f-h>i||f+h<i)return!1;if(Math.abs(r-e)%No<1e-4)return!0;if(o){var l=r;r=Io(e),e=Io(l)}else r=Io(r),e=Io(e);r>e&&(e+=No);var c=Math.atan2(u,s);return c<0&&(c+=No),c>=r&&c<=e||c+No>=r&&c+No<=e}function Oo(t,n,i,r,e,o){if(o>n&&o>r||o<n&&o<r)return 0;if(r===n)return 0;var a=(o-n)/(r-n),s=r<n?1:-1;1!==a&&0!==a||(s=r<n?.5:-.5);var u=a*(i-t)+t;return u===e?1/0:u>e?s:0}var Do=ko.CMD,zo=2*Math.PI,Bo=[-1,-1,-1],_o=[-1,-1];function Ro(t,n,i,r,e,o,a,s,u,h){if(h>n&&h>r&&h>o&&h>s||h<n&&h<r&&h<o&&h<s)return 0;var f,l=An(n,r,o,s,h,Bo);if(0===l)return 0;for(var c=0,v=-1,d=void 0,p=void 0,m=0;m<l;m++){var g=Bo[m],y=0===g||1===g?.5:1;kn(t,i,e,a,g)<u||(v<0&&(v=Cn(n,r,o,s,_o),_o[1]<_o[0]&&v>1&&(void 0,f=_o[0],_o[0]=_o[1],_o[1]=f),d=kn(n,r,o,s,_o[0]),v>1&&(p=kn(n,r,o,s,_o[1]))),c+=2===v?g<_o[0]?d<n?y:-y:g<_o[1]?p<d?y:-y:s<p?y:-y:g<_o[0]?d<n?y:-y:s<d?y:-y)}return c}function Fo(t,n,i,r,e,o,a,s){if(s>n&&s>r&&s>o||s<n&&s<r&&s<o)return 0;var u=function(t,n,i,r,e){var o=t-2*n+i,a=2*(n-t),s=t-r,u=0;if(xn(o))Mn(a)&&(f=-s/a)>=0&&f<=1&&(e[u++]=f);else{var h=a*a-4*o*s;if(xn(h))(f=-a/(2*o))>=0&&f<=1&&(e[u++]=f);else if(h>0){var f,l=pn(h),c=(-a-l)/(2*o);(f=(-a+l)/(2*o))>=0&&f<=1&&(e[u++]=f),c>=0&&c<=1&&(e[u++]=c)}}return u}(n,r,o,s,Bo);if(0===u)return 0;var h=Dn(n,r,o);if(h>=0&&h<=1){for(var f=0,l=Ln(n,r,o,h),c=0;c<u;c++){var v=0===Bo[c]||1===Bo[c]?.5:1;Ln(t,i,e,Bo[c])<a||(f+=Bo[c]<h?l<n?v:-v:o<l?v:-v)}return f}return v=0===Bo[0]||1===Bo[0]?.5:1,Ln(t,i,e,Bo[0])<a?0:o<n?v:-v}function Eo(t,n,i,r,e,o,a,s){if((s-=n)>i||s<-i)return 0;var u=Math.sqrt(i*i-s*s);Bo[0]=-u,Bo[1]=u;var h=Math.abs(r-e);if(h<1e-4)return 0;if(h>=zo-1e-4){r=0,e=zo;var f=o?1:-1;return a>=Bo[0]+t&&a<=Bo[1]+t?f:0}if(r>e){var l=r;r=e,e=l}r<0&&(r+=zo,e+=zo);for(var c=0,v=0;v<2;v++){var d=Bo[v];if(d+t>a){var p=Math.atan2(s,d);f=o?1:-1,p<0&&(p=zo+p),(p>=r&&p<=e||p+zo>=r&&p+zo<=e)&&(p>Math.PI/2&&p<1.5*Math.PI&&(f=-f),c+=f)}}return c}function Po(t,n,i,r,e){for(var o,a,s=t.data,u=t.len(),h=0,f=0,l=0,c=0,v=0,d=0;d<u;){var p=s[d++],m=1===d;switch(p===Do.M&&d>1&&(i||(h+=Oo(f,l,c,v,r,e))),m&&(c=f=s[d],v=l=s[d+1]),p){case Do.M:f=c=s[d++],l=v=s[d++];break;case Do.L:if(i){if(So(f,l,s[d],s[d+1],n,r,e))return!0}else h+=Oo(f,l,s[d],s[d+1],r,e)||0;f=s[d++],l=s[d++];break;case Do.C:if(i){if(Ao(f,l,s[d++],s[d++],s[d++],s[d++],s[d],s[d+1],n,r,e))return!0}else h+=Ro(f,l,s[d++],s[d++],s[d++],s[d++],s[d],s[d+1],r,e)||0;f=s[d++],l=s[d++];break;case Do.Q:if(i){if(Co(f,l,s[d++],s[d++],s[d],s[d+1],n,r,e))return!0}else h+=Fo(f,l,s[d++],s[d++],s[d],s[d+1],r,e)||0;f=s[d++],l=s[d++];break;case Do.A:var g=s[d++],y=s[d++],b=s[d++],w=s[d++],x=s[d++],M=s[d++];d+=1;var k=!!(1-s[d++]);o=Math.cos(x)*b+g,a=Math.sin(x)*w+y,m?(c=o,v=a):h+=Oo(f,l,o,a,r,e);var S=(r-g)*w/b+g;if(i){if(Lo(g,y,w,x,x+M,k,n,S,e))return!0}else h+=Eo(g,y,w,x,x+M,k,S,e);f=Math.cos(x+M)*b+g,l=Math.sin(x+M)*w+y;break;case Do.R:if(c=f=s[d++],v=l=s[d++],o=c+s[d++],a=v+s[d++],i){if(So(c,v,o,v,n,r,e)||So(o,v,o,a,n,r,e)||So(o,a,c,a,n,r,e)||So(c,a,c,v,n,r,e))return!0}else h+=Oo(o,v,o,a,r,e),h+=Oo(c,a,c,v,r,e);break;case Do.Z:if(i){if(So(f,l,c,v,n,r,e))return!0}else h+=Oo(f,l,c,v,r,e);f=c,l=v}}return i||Math.abs(l-v)<1e-4||(h+=Oo(f,l,c,v,r,e)||0),0!==h}var Wo=D({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Ee),Ho={style:D({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},Pe.style)},Uo=$i.concat(["invisible","culling","z","z2","zlevel","parent"]),jo=function(t){function n(n){return t.call(this,n)||this}var i;return mt(n,t),n.prototype.update=function(){var i=this;t.prototype.update.call(this);var r=this.style;if(r.decal){var e=this._decalEl=this._decalEl||new n;e.buildPath===n.prototype.buildPath&&(e.buildPath=function(t){i.buildPath(t,i.shape)}),e.silent=!0;var o=e.style;for(var a in r)o[a]!==r[a]&&(o[a]=r[a]);o.fill=r.fill?r.decal:null,o.decal=null,o.shadowColor=null,r.strokeFirst&&(o.stroke=null);for(var s=0;s<Uo.length;++s)e[Uo[s]]=this[Uo[s]];e.__dirty|=1}else this._decalEl&&(this._decalEl=null)},n.prototype.getDecalElement=function(){return this._decalEl},n.prototype._init=function(n){var i=W(n);this.shape=this.getDefaultShape();var r=this.getDefaultStyle();r&&this.useStyle(r);for(var e=0;e<i.length;e++){var o=i[e],a=n[o];"style"===o?this.style?O(this.style,a):this.useStyle(a):"shape"===o?O(this.shape,a):t.prototype.attrKV.call(this,o,a)}this.style||this.useStyle({})},n.prototype.getDefaultStyle=function(){return null},n.prototype.getDefaultShape=function(){return{}},n.prototype.canBeInsideText=function(){return this.hasFill()},n.prototype.getInsideTextFill=function(){var t=this.style.fill;if("none"!==t){if(X(t)){var n=ri(t,0);return n>.5?"#333":n>.2?"#eee":"#ccc"}if(t)return"#ccc"}return"#333"},n.prototype.getInsideTextStroke=function(t){var n=this.style.fill;if(X(n)){var i=this.__zr;if(!(!i||!i.isDarkMode())==ri(t,0)<.4)return n}},n.prototype.buildPath=function(){},n.prototype.pathUpdated=function(){this.__dirty&=-5},n.prototype.getUpdatedPathProxy=function(t){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,t),this.path},n.prototype.createPathProxy=function(){this.path=new ko(!1)},n.prototype.hasStroke=function(){var t=this.style,n=t.stroke;return!(null==n||"none"===n||!(t.lineWidth>0))},n.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},n.prototype.getBoundingRect=function(){var t=this._rect,n=this.style,i=!t;if(i){var r=!1;this.path||(r=!0,this.createPathProxy());var e=this.path;(r||4&this.__dirty)&&(e.beginPath(),this.buildPath(e,this.shape,!1),this.pathUpdated()),t=e.getBoundingRect()}if(this._rect=t,this.hasStroke()&&this.path&&this.path.len()>0){var o=this._rectStroke||(this._rectStroke=t.clone());if(this.__dirty||i){o.copy(t);var a=n.strokeNoScale?this.getLineScale():1,s=n.lineWidth;if(!this.hasFill()){var u=this.strokeContainThreshold;s=Math.max(s,null==u?4:u)}a>1e-10&&(o.width+=s/a,o.height+=s/a,o.x-=s/a/2,o.y-=s/a/2)}return o}return t},n.prototype.contain=function(t,n){var i=this.transformCoordToLocal(t,n),r=this.getBoundingRect(),e=this.style;if(r.contain(t=i[0],n=i[1])){var o=this.path;if(this.hasStroke()){var a=e.lineWidth,s=e.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),function(t,n,i,r){return Po(t,n,!0,i,r)}(o,a/s,t,n)))return!0}if(this.hasFill())return function(t,n,i){return Po(t,0,!1,n,i)}(o,t,n)}return!1},n.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},n.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},n.prototype.animateShape=function(t){return this.animate("shape",t)},n.prototype.updateDuringAnimation=function(t){"style"===t?this.dirtyStyle():"shape"===t?this.dirtyShape():this.markRedraw()},n.prototype.attrKV=function(n,i){"shape"===n?this.setShape(i):t.prototype.attrKV.call(this,n,i)},n.prototype.setShape=function(t,n){var i=this.shape;return i||(i=this.shape={}),"string"==typeof t?i[t]=n:O(i,t),this.dirtyShape(),this},n.prototype.shapeChanged=function(){return!!(4&this.__dirty)},n.prototype.createStyle=function(t){return ft(Wo,t)},n.prototype._innerSaveToNormal=function(n){t.prototype._innerSaveToNormal.call(this,n);var i=this._normalState;n.shape&&!i.shape&&(i.shape=O({},this.shape))},n.prototype._applyStateObj=function(n,i,r,e,o,a){t.prototype._applyStateObj.call(this,n,i,r,e,o,a);var s,u=!(i&&e);if(i&&i.shape?o?e?s=i.shape:(s=O({},r.shape),O(s,i.shape)):(s=O({},e?this.shape:r.shape),O(s,i.shape)):u&&(s=r.shape),s)if(o){this.shape=O({},this.shape);for(var h={},f=W(s),l=0;l<f.length;l++){var c=f[l];"object"==typeof s[c]?this.shape[c]=s[c]:h[c]=s[c]}this._transitionState(n,{shape:h},a)}else this.shape=s,this.dirtyShape()},n.prototype._mergeStates=function(n){for(var i,r=t.prototype._mergeStates.call(this,n),e=0;e<n.length;e++){var o=n[e];o.shape&&this._mergeStyle(i=i||{},o.shape)}return i&&(r.shape=i),r},n.prototype.getAnimationStyleProps=function(){return Ho},n.prototype.isZeroArea=function(){return!1},n.extend=function(t){var i=function(n){function i(i){var r=n.call(this,i)||this;return t.init&&t.init.call(r,i),r}return mt(i,n),i.prototype.getDefaultStyle=function(){return N(t.style)},i.prototype.getDefaultShape=function(){return N(t.shape)},i}(n);for(var r in t)"function"==typeof t[r]&&(i.prototype[r]=t[r]);return i},n.initDefaultProps=((i=n.prototype).type="path",i.strokeContainThreshold=5,i.segmentIgnoreThreshold=0,i.subPixelOptimize=!1,i.autoBatch=!1,void(i.__dirty=7)),n}(Ue),Yo=D({strokeFirst:!0,font:v,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},Wo),Xo=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return mt(n,t),n.prototype.hasStroke=function(){var t=this.style,n=t.stroke;return null!=n&&"none"!==n&&t.lineWidth>0},n.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},n.prototype.createStyle=function(t){return ft(Yo,t)},n.prototype.setBoundingRect=function(t){this._rect=t},n.prototype.getBoundingRect=function(){var t=this.style;if(!this._rect){var n=t.text;null!=n?n+="":n="";var i=lr(n,t.font,t.textAlign,t.textBaseline);if(i.x+=t.x||0,i.y+=t.y||0,this.hasStroke()){var r=t.lineWidth;i.x-=r/2,i.y-=r/2,i.width+=r,i.height+=r}this._rect=i}return this._rect},n.initDefaultProps=void(n.prototype.dirtyRectTolerance=10),n}(Ue);Xo.prototype.type="tspan";var Vo=D({x:0,y:0},Ee),qo={style:D({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},Pe.style)},Go=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return mt(n,t),n.prototype.createStyle=function(t){return ft(Vo,t)},n.prototype._getSize=function(t){var n=this.style,i=n[t];if(null!=i)return i;var r,e=(r=n.image)&&"string"!=typeof r&&r.width&&r.height?n.image:this.__image;if(!e)return 0;var o="width"===t?"height":"width",a=n[o];return null==a?e[t]:e[t]/e[o]*a},n.prototype.getWidth=function(){return this._getSize("width")},n.prototype.getHeight=function(){return this._getSize("height")},n.prototype.getAnimationStyleProps=function(){return qo},n.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new sr(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},n}(Ue);Go.prototype.type="image";var Zo=Math.round;function Ko(t,n,i){if(n){var r=n.x1,e=n.x2,o=n.y1,a=n.y2;t.x1=r,t.x2=e,t.y1=o,t.y2=a;var s=i&&i.lineWidth;return s?(Zo(2*r)===Zo(2*e)&&(t.x1=t.x2=Jo(r,s,!0)),Zo(2*o)===Zo(2*a)&&(t.y1=t.y2=Jo(o,s,!0)),t):t}}function $o(t,n,i){if(n){var r=n.x,e=n.y,o=n.width,a=n.height;t.x=r,t.y=e,t.width=o,t.height=a;var s=i&&i.lineWidth;return s?(t.x=Jo(r,s,!0),t.y=Jo(e,s,!0),t.width=Math.max(Jo(r+o,s,!1)-t.x,0===o?0:1),t.height=Math.max(Jo(e+a,s,!1)-t.y,0===a?0:1),t):t}}function Jo(t,n,i){if(!n)return t;var r=Zo(2*t);return(r+Zo(n))%2==0?r/2:(r+(i?1:-1))/2}var Qo=function(){this.x=0,this.y=0,this.width=0,this.height=0},ta={},na=function(t){function n(n){return t.call(this,n)||this}return mt(n,t),n.prototype.getDefaultShape=function(){return new Qo},n.prototype.buildPath=function(t,n){var i,r,e,o;if(this.subPixelOptimize){var a=$o(ta,n,this.style);i=a.x,r=a.y,e=a.width,o=a.height,a.r=n.r,n=a}else i=n.x,r=n.y,e=n.width,o=n.height;n.r?function(t,n){var i,r,e,o,a,s=n.x,u=n.y,h=n.width,f=n.height,l=n.r;h<0&&(s+=h,h=-h),f<0&&(u+=f,f=-f),"number"==typeof l?i=r=e=o=l:l instanceof Array?1===l.length?i=r=e=o=l[0]:2===l.length?(i=e=l[0],r=o=l[1]):3===l.length?(i=l[0],r=o=l[1],e=l[2]):(i=l[0],r=l[1],e=l[2],o=l[3]):i=r=e=o=0,i+r>h&&(i*=h/(a=i+r),r*=h/a),e+o>h&&(e*=h/(a=e+o),o*=h/a),r+e>f&&(r*=f/(a=r+e),e*=f/a),i+o>f&&(i*=f/(a=i+o),o*=f/a),t.moveTo(s+i,u),t.lineTo(s+h-r,u),0!==r&&t.arc(s+h-r,u+r,r,-Math.PI/2,0),t.lineTo(s+h,u+f-e),0!==e&&t.arc(s+h-e,u+f-e,e,0,Math.PI/2),t.lineTo(s+o,u+f),0!==o&&t.arc(s+o,u+f-o,o,Math.PI/2,Math.PI),t.lineTo(s,u+i),0!==i&&t.arc(s+i,u+i,i,Math.PI,1.5*Math.PI)}(t,n):t.rect(i,r,e,o)},n.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},n}(jo);na.prototype.type="rect";var ia={fill:"#000"},ra={style:D({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},Pe.style)},ea=function(t){function n(n){var i=t.call(this)||this;return i.type="text",i._children=[],i._defaultStyle=ia,i.attr(n),i}return mt(n,t),n.prototype.childrenRef=function(){return this._children},n.prototype.update=function(){t.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var n=0;n<this._children.length;n++){var i=this._children[n];i.zlevel=this.zlevel,i.z=this.z,i.z2=this.z2,i.culling=this.culling,i.cursor=this.cursor,i.invisible=this.invisible}},n.prototype.updateTransform=function(){var n=this.innerTransformable;n?(n.updateTransform(),n.transform&&(this.transform=n.transform)):t.prototype.updateTransform.call(this)},n.prototype.getLocalTransform=function(n){var i=this.innerTransformable;return i?i.getLocalTransform(n):t.prototype.getLocalTransform.call(this,n)},n.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),t.prototype.getComputedTransform.call(this)},n.prototype._updateSubTexts=function(){var t;this._childCursor=0,ha(t=this.style),R(t.rich,ha),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},n.prototype.addSelfToZr=function(n){t.prototype.addSelfToZr.call(this,n);for(var i=0;i<this._children.length;i++)this._children[i].__zr=n},n.prototype.removeSelfFromZr=function(n){t.prototype.removeSelfFromZr.call(this,n);for(var i=0;i<this._children.length;i++)this._children[i].__zr=null},n.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var t=new sr(0,0,0,0),n=this._children,i=[],r=null,e=0;e<n.length;e++){var o=n[e],a=o.getBoundingRect(),s=o.getLocalTransform(i);s?(t.copy(a),t.applyTransform(s),(r=r||t.clone()).union(t)):(r=r||a.clone()).union(a)}this._rect=r||t}return this._rect},n.prototype.setDefaultTextStyle=function(t){this._defaultStyle=t||ia},n.prototype.setTextContent=function(){},n.prototype._mergeStyle=function(t,n){if(!n)return t;var i=n.rich,r=t.rich||i&&{};return O(t,n),i&&r?(this._mergeRich(r,i),t.rich=r):r&&(t.rich=r),t},n.prototype._mergeRich=function(t,n){for(var i=W(n),r=0;r<i.length;r++){var e=i[r];t[e]=t[e]||{},O(t[e],n[e])}},n.prototype.getAnimationStyleProps=function(){return ra},n.prototype._getOrCreateChild=function(t){var n=this._children[this._childCursor];return n&&n instanceof t||(n=new t),this._children[this._childCursor++]=n,n.__zr=this.__zr,n.parent=this,n},n.prototype._updatePlainTexts=function(){var t=this.style,n=t.font||v,i=t.padding,r=function(t,n){null!=t&&(t+="");var i,r=n.overflow,e=n.padding,o=n.font,a="truncate"===r,s=dr(o),u=tt(n.lineHeight,s),h=!!n.backgroundColor,f="truncate"===n.lineOverflow,l=n.width,c=(i=null==l||"break"!==r&&"breakAll"!==r?t?t.split("\n"):[]:t?Re(t,n.font,l,"breakAll"===r,0).lines:[]).length*u,v=tt(n.height,c);if(c>v&&f){var d=Math.floor(v/u);i=i.slice(0,d)}if(t&&a&&null!=l)for(var p=Te(l,o,n.ellipsis,{minChar:n.truncateMinChar,placeholder:n.placeholder}),m=0;m<i.length;m++)i[m]=Ie(i[m],p);var g=v,y=0;for(m=0;m<i.length;m++)y=Math.max(hr(i[m],o),y);null==l&&(l=y);var b=y;return e&&(g+=e[0]+e[2],b+=e[1]+e[3],l+=e[1]+e[3]),h&&(b=l),{lines:i,height:v,outerWidth:b,outerHeight:g,lineHeight:u,calculatedLineHeight:s,contentWidth:y,contentHeight:c,width:l}}(va(t),t),e=da(t),o=!!t.backgroundColor,a=r.outerHeight,s=r.outerWidth,u=r.contentWidth,h=r.lines,f=r.lineHeight,l=this._defaultStyle,c=t.x||0,d=t.y||0,p=t.align||l.align||"left",m=t.verticalAlign||l.verticalAlign||"top",g=c,y=vr(d,r.contentHeight,m);if(e||i){var b=cr(c,s,p),w=vr(d,a,m);e&&this._renderBackground(t,t,b,w,s,a)}y+=f/2,i&&(g=ca(c,p,i),"top"===m?y+=i[0]:"bottom"===m&&(y-=i[2]));for(var x=0,M=!1,k=(la("fill"in t?t.fill:(M=!0,l.fill))),S=(fa("stroke"in t?t.stroke:o||l.autoStroke&&!M?null:(x=2,l.stroke))),A=t.textShadowBlur>0,C=null!=t.width&&("truncate"===t.overflow||"break"===t.overflow||"breakAll"===t.overflow),T=r.calculatedLineHeight,I=0;I<h.length;I++){var N=this._getOrCreateChild(Xo),L=N.createStyle();N.useStyle(L),L.text=h[I],L.x=g,L.y=y,p&&(L.textAlign=p),L.textBaseline="middle",L.opacity=t.opacity,L.strokeFirst=!0,A&&(L.shadowBlur=t.textShadowBlur||0,L.shadowColor=t.textShadowColor||"transparent",L.shadowOffsetX=t.textShadowOffsetX||0,L.shadowOffsetY=t.textShadowOffsetY||0),L.stroke=S,L.fill=k,S&&(L.lineWidth=t.lineWidth||x,L.lineDash=t.lineDash,L.lineDashOffset=t.lineDashOffset||0),L.font=n,ua(L,t),y+=f,C&&N.setBoundingRect(new sr(cr(L.x,t.width,L.textAlign),vr(L.y,T,L.textBaseline),u,T))}},n.prototype._updateRichTexts=function(){var t=this.style,n=function(t,n){var i=new De;if(null!=t&&(t+=""),!t)return i;for(var r,e=n.width,o=n.height,a=n.overflow,s="break"!==a&&"breakAll"!==a||null==e?null:{width:e,accumWidth:0,breakAll:"breakAll"===a},u=Ae.lastIndex=0;null!=(r=Ae.exec(t));){var h=r.index;h>u&&ze(i,t.substring(u,h),n,s),ze(i,r[2],n,s,r[1]),u=Ae.lastIndex}u<t.length&&ze(i,t.substring(u,t.length),n,s);var f=[],l=0,c=0,v=n.padding,d="truncate"===a,p="truncate"===n.lineOverflow;function m(t,n,i){t.width=n,t.lineHeight=i,l+=i,c=Math.max(c,n)}t:for(var g=0;g<i.lines.length;g++){for(var y=i.lines[g],b=0,w=0,x=0;x<y.tokens.length;x++){var M=(D=y.tokens[x]).styleName&&n.rich[D.styleName]||{},k=D.textPadding=M.padding,S=k?k[1]+k[3]:0,A=D.font=M.font||n.font;D.contentHeight=dr(A);var C=tt(M.height,D.contentHeight);if(D.innerHeight=C,k&&(C+=k[0]+k[2]),D.height=C,D.lineHeight=nt(M.lineHeight,n.lineHeight,C),D.align=M&&M.align||n.align,D.verticalAlign=M&&M.verticalAlign||"middle",p&&null!=o&&l+D.lineHeight>o){x>0?(y.tokens=y.tokens.slice(0,x),m(y,w,b),i.lines=i.lines.slice(0,g+1)):i.lines=i.lines.slice(0,g);break t}var T=M.width,I=null==T||"auto"===T;if("string"==typeof T&&"%"===T.charAt(T.length-1))D.percentWidth=T,f.push(D),D.contentWidth=hr(D.text,A);else{if(I){var N=M.backgroundColor,L=N&&N.image;L&&Se(L=xe(L))&&(D.width=Math.max(D.width,L.width*C/L.height))}var O=d&&null!=e?e-w:null;null!=O&&O<D.width?!I||O<S?(D.text="",D.width=D.contentWidth=0):(D.text=Ce(D.text,O-S,A,n.ellipsis,{minChar:n.truncateMinChar}),D.width=D.contentWidth=hr(D.text,A)):D.contentWidth=hr(D.text,A)}D.width+=S,w+=D.width,M&&(b=Math.max(b,D.lineHeight))}m(y,w,b)}for(i.outerWidth=i.width=tt(e,c),i.outerHeight=i.height=tt(o,l),i.contentHeight=l,i.contentWidth=c,v&&(i.outerWidth+=v[1]+v[3],i.outerHeight+=v[0]+v[2]),g=0;g<f.length;g++){var D;(D=f[g]).width=parseInt(D.percentWidth,10)/100*i.width}return i}(va(t),t),i=n.width,r=n.outerWidth,e=n.outerHeight,o=t.padding,a=t.y||0,s=this._defaultStyle,u=t.verticalAlign||s.verticalAlign,h=cr(t.x||0,r,t.align||s.align),f=vr(a,e,u),l=h,c=f;o&&(l+=o[3],c+=o[0]);var v=l+i;da(t)&&this._renderBackground(t,t,h,f,r,e);for(var d=!!t.backgroundColor,p=0;p<n.lines.length;p++){for(var m=n.lines[p],g=m.tokens,y=g.length,b=m.lineHeight,w=m.width,x=0,M=l,k=v,S=y-1,A=void 0;x<y&&(!(A=g[x]).align||"left"===A.align);)this._placeToken(A,t,b,c,M,"left",d),w-=A.width,M+=A.width,x++;for(;S>=0&&"right"===(A=g[S]).align;)this._placeToken(A,t,b,c,k,"right",d),w-=A.width,k-=A.width,S--;for(M+=(i-(M-l)-(v-k)-w)/2;x<=S;)this._placeToken(A=g[x],t,b,c,M+A.width/2,"center",d),M+=A.width,x++;c+=b}},n.prototype._placeToken=function(t,n,i,r,e,o,a){var s=n.rich[t.styleName]||{};s.text=t.text;var u=t.verticalAlign,h=r+i/2;"top"===u?h=r+t.height/2:"bottom"===u&&(h=r+i-t.height/2),!t.isLineHolder&&da(s)&&this._renderBackground(s,n,"right"===o?e-t.width:"center"===o?e-t.width/2:e,h-t.height/2,t.width,t.height);var f=!!s.backgroundColor,l=t.textPadding;l&&(e=ca(e,o,l),h-=t.height/2-l[0]-t.innerHeight/2);var c=this._getOrCreateChild(Xo),d=c.createStyle();c.useStyle(d);var p=this._defaultStyle,m=!1,g=0,y=la("fill"in s?s.fill:"fill"in n?n.fill:(m=!0,p.fill)),b=fa("stroke"in s?s.stroke:"stroke"in n?n.stroke:f||a||p.autoStroke&&!m?null:(g=2,p.stroke)),w=s.textShadowBlur>0||n.textShadowBlur>0;d.text=t.text,d.x=e,d.y=h,w&&(d.shadowBlur=s.textShadowBlur||n.textShadowBlur||0,d.shadowColor=s.textShadowColor||n.textShadowColor||"transparent",d.shadowOffsetX=s.textShadowOffsetX||n.textShadowOffsetX||0,d.shadowOffsetY=s.textShadowOffsetY||n.textShadowOffsetY||0),d.textAlign=o,d.textBaseline="middle",d.font=t.font||v,d.opacity=nt(s.opacity,n.opacity,1),ua(d,s),b&&(d.lineWidth=nt(s.lineWidth,n.lineWidth,g),d.lineDash=tt(s.lineDash,n.lineDash),d.lineDashOffset=n.lineDashOffset||0,d.stroke=b),y&&(d.fill=y);var x=t.contentWidth,M=t.contentHeight;c.setBoundingRect(new sr(cr(d.x,x,d.textAlign),vr(d.y,M,d.textBaseline),x,M))},n.prototype._renderBackground=function(t,n,i,r,e,o){var a,s,u,h=t.backgroundColor,f=t.borderWidth,l=t.borderColor,c=h&&h.image,v=h&&!c,d=t.borderRadius,p=this;if(v||t.lineHeight||f&&l){(a=this._getOrCreateChild(na)).useStyle(a.createStyle()),a.style.fill=null;var m=a.shape;m.x=i,m.y=r,m.width=e,m.height=o,m.r=d,a.dirtyShape()}if(v)(u=a.style).fill=h||null,u.fillOpacity=tt(t.fillOpacity,1);else if(c){(s=this._getOrCreateChild(Go)).onload=function(){p.dirtyStyle()};var g=s.style;g.image=h.image,g.x=i,g.y=r,g.width=e,g.height=o}f&&l&&((u=a.style).lineWidth=f,u.stroke=l,u.strokeOpacity=tt(t.strokeOpacity,1),u.lineDash=t.borderDash,u.lineDashOffset=t.borderDashOffset||0,a.strokeContainThreshold=0,a.hasFill()&&a.hasStroke()&&(u.strokeFirst=!0,u.lineWidth*=2));var y=(a||s).style;y.shadowBlur=t.shadowBlur||0,y.shadowColor=t.shadowColor||"transparent",y.shadowOffsetX=t.shadowOffsetX||0,y.shadowOffsetY=t.shadowOffsetY||0,y.opacity=nt(t.opacity,n.opacity,1)},n.makeFont=function(t){var n,i="";return function(t){return null!=t.fontSize||t.fontFamily||t.fontWeight}(t)&&(i=[t.fontStyle,t.fontWeight,(n=t.fontSize,"string"!=typeof n||-1===n.indexOf("px")&&-1===n.indexOf("rem")&&-1===n.indexOf("em")?isNaN(+n)?"12px":n+"px":n),t.fontFamily||"sans-serif"].join(" ")),i&&ot(i)||t.textFont||t.font},n}(Ue),oa={left:!0,right:1,center:1},aa={top:1,bottom:1,middle:1},sa=["fontStyle","fontWeight","fontSize","fontFamily"];function ua(t,n){for(var i=0;i<sa.length;i++){var r=sa[i],e=n[r];null!=e&&(t[r]=e)}}function ha(t){if(t){t.font=ea.makeFont(t);var n=t.align;"middle"===n&&(n="center"),t.align=null==n||oa[n]?n:"left";var i=t.verticalAlign;"center"===i&&(i="middle"),t.verticalAlign=null==i||aa[i]?i:"top",t.padding&&(t.padding=rt(t.padding))}}function fa(t,n){return null==t||n<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function la(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function ca(t,n,i){return"right"===n?t-i[1]:"center"===n?t+i[3]/2-i[1]/2:t+i[3]}function va(t){var n=t.text;return null!=n&&(n+=""),n}function da(t){return!!(t.backgroundColor||t.lineHeight||t.borderWidth&&t.borderColor)}var pa=ie(),ma=1,ga={},ya=ie(),ba=ie(),wa=["emphasis","blur","select"],xa=["normal","emphasis","blur","select"];function Ma(t){return null!=t&&"none"!==t}var ka=new Hn(100);function Sa(t){if(X(t)){var n=ka.get(t);return n||(n=ni(t,-.1),ka.put(t,n)),n}if(J(t)){var i=O({},t);return i.colorStops=F(t.colorStops,(function(t){return{offset:t.offset,color:ni(t.color,-.1)}})),i}return t}function Aa(t,n,i){t.onHoverStateChange&&(t.hoverState||0)!==i&&t.onHoverStateChange(n),t.hoverState=i}function Ca(t){Aa(t,"emphasis",2)}function Ta(t){2===t.hoverState&&Aa(t,"normal",0)}function Ia(t){Aa(t,"blur",1)}function Na(t){1===t.hoverState&&Aa(t,"normal",0)}function La(t){t.selected=!0}function Oa(t){t.selected=!1}function Da(t,n,i){n(t,i)}function za(t,n,i){Da(t,n,i),t.isGroup&&t.traverse((function(t){Da(t,n,i)}))}function Ba(t,n){var i=this.states[t];if(this.style){if("emphasis"===t)return function(t,n,i,r){var e=i&&z(i,"select")>=0,o=!1;if(t instanceof jo){var a=ya(t),s=e&&a.selectFill||a.normalFill,u=e&&a.selectStroke||a.normalStroke;if(Ma(s)||Ma(u)){var h=(r=r||{}).style||{};"inherit"===h.fill?(o=!0,r=O({},r),(h=O({},h)).fill=s):!Ma(h.fill)&&Ma(s)?(o=!0,r=O({},r),(h=O({},h)).fill=Sa(s)):!Ma(h.stroke)&&Ma(u)&&(o||(r=O({},r),h=O({},h)),h.stroke=Sa(u)),r.style=h}}if(r&&null==r.z2){o||(r=O({},r));var f=t.z2EmphasisLift;r.z2=t.z2+(null!=f?f:10)}return r}(this,0,n,i);if("blur"===t)return function(t,n,i){var r=z(t.currentStates,n)>=0,e=t.style.opacity,o=r?null:function(t,n,i,r){for(var e=t.style,o={},a=0;a<n.length;a++){var s=n[a],u=e[s];o[s]=null==u?r&&r[s]:u}for(a=0;a<t.animators.length;a++){var h=t.animators[a];h.__fromStateTransition&&h.__fromStateTransition.indexOf(i)<0&&"style"===h.targetName&&h.saveTo(o,n)}return o}(t,["opacity"],n,{opacity:1}),a=(i=i||{}).style||{};return null==a.opacity&&(i=O({},i),a=O({opacity:r?e:.1*o.opacity},a),i.style=a),i}(this,t,i);if("select"===t)return function(t,n,i){if(i&&null==i.z2){i=O({},i);var r=t.z2SelectLift;i.z2=t.z2+(null!=r?r:9)}return i}(this,0,i)}return i}function _a(t){t.stateProxy=Ba;var n=t.getTextContent(),i=t.getTextGuideLine();n&&(n.stateProxy=Ba),i&&(i.stateProxy=Ba)}function Ra(t,n){!ja(t,n)&&!t.__highByOuter&&za(t,Ca)}function Fa(t,n){!ja(t,n)&&!t.__highByOuter&&za(t,Ta)}function Ea(t,n){t.__highByOuter|=1<<(n||0),za(t,Ca)}function Pa(t,n){!(t.__highByOuter&=~(1<<(n||0)))&&za(t,Ta)}function Wa(t){za(t,Na)}function Ha(t){za(t,La)}function Ua(t){za(t,Oa)}function ja(t,n){return t.__highDownSilentOnTouch&&n.zrByTouch}function Ya(t){var n=t.getModel(),i=[],r=[];n.eachComponent((function(n,e){var o=ba(e),a="series"===n,s=a?t.getViewOfSeriesModel(e):t.getViewOfComponentModel(e);!a&&r.push(s),o.isBlured&&(s.group.traverse((function(t){Na(t)})),a&&i.push(e)),o.isBlured=!1})),R(r,(function(t){t&&t.toggleBlurSeries&&t.toggleBlurSeries(i,!1,n)}))}function Xa(t,n,i,r){var e=r.getModel();function o(t,n){for(var i=0;i<n.length;i++){var r=t.getItemGraphicEl(n[i]);r&&Wa(r)}}if(i=i||"coordinateSystem",null!=t&&n&&"none"!==n){var a=e.getSeriesByIndex(t),s=a.coordinateSystem;s&&s.master&&(s=s.master);var u=[];e.eachSeries((function(t){var e=a===t,h=t.coordinateSystem;if(h&&h.master&&(h=h.master),!("series"===i&&!e||"coordinateSystem"===i&&!(h&&s?h===s:e)||"series"===n&&e)){if(r.getViewOfSeriesModel(t).group.traverse((function(t){Ia(t)})),_(n))o(t.getData(),n);else if(G(n))for(var f=W(n),l=0;l<f.length;l++)o(t.getData(f[l]),n[f[l]]);u.push(t),ba(t).isBlured=!0}})),e.eachComponent((function(t,n){if("series"!==t){var i=r.getViewOfComponentModel(n);i&&i.toggleBlurSeries&&i.toggleBlurSeries(u,!0,e)}}))}}function Va(t,n,i){if(null!=t&&null!=n){var r=i.getModel().getComponent(t,n);if(r){ba(r).isBlured=!0;var e=i.getViewOfComponentModel(r);e&&e.focusBlurEnabled&&e.group.traverse((function(t){Ia(t)}))}}}function qa(t,n,i,r){var e={focusSelf:!1,dispatchers:null};if(null==t||"series"===t||null==n||null==i)return e;var o=r.getModel().getComponent(t,n);if(!o)return e;var a=r.getViewOfComponentModel(o);if(!a||!a.findHighDownDispatchers)return e;for(var s,u=a.findHighDownDispatchers(i),h=0;h<u.length;h++)if("self"===pa(u[h]).focus){s=!0;break}return{focusSelf:s,dispatchers:u}}function Ga(t){R(t.getAllData(),(function(n){var i=n.type;n.data.eachItemGraphicEl((function(n,r){t.isSelected(r,i)?Ha(n):Ua(n)}))}))}function Za(t){var n=[];return t.eachSeries((function(t){R(t.getAllData(),(function(i){var r=i.type,e=t.getSelectedDataIndices();if(e.length>0){var o={dataIndex:e,seriesIndex:t.seriesIndex};null!=r&&(o.dataType=r),n.push(o)}}))})),n}function Ka(t,n,i){Qa(t,!0),za(t,_a),function(t,n,i){var r=pa(t);null!=n?(r.focus=n,r.blurScope=i):r.focus&&(r.focus=null)}(t,n,i)}var $a=["emphasis","blur","select"],Ja={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Qa(t,n){var i=!1===n,r=t;t.highDownSilentOnTouch&&(r.__highDownSilentOnTouch=t.highDownSilentOnTouch),i&&!r.__highDownDispatcher||(r.__highByOuter=r.__highByOuter||0,r.__highDownDispatcher=!i)}function ts(t){return!(!t||!t.__highDownDispatcher)}function ns(t){var n=t.type;return"select"===n||"unselect"===n||"toggleSelect"===n}function is(t){var n=t.type;return"highlight"===n||"downplay"===n}var rs=ko.CMD,es=[[],[],[]],os=Math.sqrt,as=Math.atan2,ss=Math.sqrt,us=Math.sin,hs=Math.cos,fs=Math.PI;function ls(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function cs(t,n){return(t[0]*n[0]+t[1]*n[1])/(ls(t)*ls(n))}function vs(t,n){return(t[0]*n[1]<t[1]*n[0]?-1:1)*Math.acos(cs(t,n))}function ds(t,n,i,r,e,o,a,s,u,h,f){var l=u*(fs/180),c=hs(l)*(t-i)/2+us(l)*(n-r)/2,v=-1*us(l)*(t-i)/2+hs(l)*(n-r)/2,d=c*c/(a*a)+v*v/(s*s);d>1&&(a*=ss(d),s*=ss(d));var p=(e===o?-1:1)*ss((a*a*(s*s)-a*a*(v*v)-s*s*(c*c))/(a*a*(v*v)+s*s*(c*c)))||0,m=p*a*v/s,g=p*-s*c/a,y=(t+i)/2+hs(l)*m-us(l)*g,b=(n+r)/2+us(l)*m+hs(l)*g,w=vs([1,0],[(c-m)/a,(v-g)/s]),x=[(c-m)/a,(v-g)/s],M=[(-1*c-m)/a,(-1*v-g)/s],k=vs(x,M);if(cs(x,M)<=-1&&(k=fs),cs(x,M)>=1&&(k=0),k<0){var S=Math.round(k/fs*1e6)/1e6;k=2*fs+S%2*fs}f.addData(h,y,b,a,s,w,k,l,o)}var ps=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,ms=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g,gs=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return mt(n,t),n.prototype.applyTransform=function(){},n}(jo);function ys(t){return null!=t.setData}function bs(t,n){var i=function(t){var n=new ko;if(!t)return n;var i,r=0,e=0,o=r,a=e,s=ko.CMD,u=t.match(ps);if(!u)return n;for(var h=0;h<u.length;h++){for(var f=u[h],l=f.charAt(0),c=void 0,v=f.match(ms)||[],d=v.length,p=0;p<d;p++)v[p]=parseFloat(v[p]);for(var m=0;m<d;){var g=void 0,y=void 0,b=void 0,w=void 0,x=void 0,M=void 0,k=void 0,S=r,A=e,C=void 0,T=void 0;switch(l){case"l":r+=v[m++],e+=v[m++],n.addData(c=s.L,r,e);break;case"L":r=v[m++],e=v[m++],n.addData(c=s.L,r,e);break;case"m":r+=v[m++],e+=v[m++],n.addData(c=s.M,r,e),o=r,a=e,l="l";break;case"M":r=v[m++],e=v[m++],n.addData(c=s.M,r,e),o=r,a=e,l="L";break;case"h":r+=v[m++],n.addData(c=s.L,r,e);break;case"H":r=v[m++],n.addData(c=s.L,r,e);break;case"v":e+=v[m++],n.addData(c=s.L,r,e);break;case"V":e=v[m++],n.addData(c=s.L,r,e);break;case"C":n.addData(c=s.C,v[m++],v[m++],v[m++],v[m++],v[m++],v[m++]),r=v[m-2],e=v[m-1];break;case"c":n.addData(c=s.C,v[m++]+r,v[m++]+e,v[m++]+r,v[m++]+e,v[m++]+r,v[m++]+e),r+=v[m-2],e+=v[m-1];break;case"S":g=r,y=e,C=n.len(),T=n.data,i===s.C&&(g+=r-T[C-4],y+=e-T[C-3]),S=v[m++],A=v[m++],r=v[m++],e=v[m++],n.addData(c=s.C,g,y,S,A,r,e);break;case"s":g=r,y=e,C=n.len(),T=n.data,i===s.C&&(g+=r-T[C-4],y+=e-T[C-3]),S=r+v[m++],A=e+v[m++],r+=v[m++],e+=v[m++],n.addData(c=s.C,g,y,S,A,r,e);break;case"Q":S=v[m++],A=v[m++],r=v[m++],e=v[m++],n.addData(c=s.Q,S,A,r,e);break;case"q":S=v[m++]+r,A=v[m++]+e,r+=v[m++],e+=v[m++],n.addData(c=s.Q,S,A,r,e);break;case"T":g=r,y=e,C=n.len(),T=n.data,i===s.Q&&(g+=r-T[C-4],y+=e-T[C-3]),r=v[m++],e=v[m++],n.addData(c=s.Q,g,y,r,e);break;case"t":g=r,y=e,C=n.len(),T=n.data,i===s.Q&&(g+=r-T[C-4],y+=e-T[C-3]),r+=v[m++],e+=v[m++],n.addData(c=s.Q,g,y,r,e);break;case"A":b=v[m++],w=v[m++],x=v[m++],M=v[m++],k=v[m++],ds(S=r,A=e,r=v[m++],e=v[m++],M,k,b,w,x,c=s.A,n);break;case"a":b=v[m++],w=v[m++],x=v[m++],M=v[m++],k=v[m++],ds(S=r,A=e,r+=v[m++],e+=v[m++],M,k,b,w,x,c=s.A,n)}}"z"!==l&&"Z"!==l||(n.addData(c=s.Z),r=o,e=a),i=c}return n.toStatic(),n}(t),r=O({},n);return r.buildPath=function(t){var n;ys(t)?(t.setData(i.data),(n=t.getContext())&&t.rebuildPath(n,1)):i.rebuildPath(n=t,1)},r.applyTransform=function(t){!function(t,n){if(n){var i,r,e,o,a,s,u=t.data,h=t.len(),f=rs.M,l=rs.C,c=rs.L,v=rs.R,d=rs.A,p=rs.Q;for(e=0,o=0;e<h;){switch(i=u[e++],o=e,r=0,i){case f:case c:r=1;break;case l:r=3;break;case p:r=2;break;case d:var m=n[4],g=n[5],y=os(n[0]*n[0]+n[1]*n[1]),b=os(n[2]*n[2]+n[3]*n[3]),w=as(-n[1]/b,n[0]/y);u[e]*=y,u[e++]+=m,u[e]*=b,u[e++]+=g,u[e++]*=y,u[e++]*=b,u[e++]+=w,u[e++]+=w,o=e+=2;break;case v:s[0]=u[e++],s[1]=u[e++],Ct(s,s,n),u[o++]=s[0],u[o++]=s[1],s[0]+=u[e++],s[1]+=u[e++],Ct(s,s,n),u[o++]=s[0],u[o++]=s[1]}for(a=0;a<r;a++){var x=es[a];x[0]=u[e++],x[1]=u[e++],Ct(x,x,n),u[o++]=x[0],u[o++]=x[1]}}t.increaseVersion()}}(i,t),this.dirtyShape()},r}var ws=function(){this.cx=0,this.cy=0,this.r=0},xs=function(t){function n(n){return t.call(this,n)||this}return mt(n,t),n.prototype.getDefaultShape=function(){return new ws},n.prototype.buildPath=function(t,n){t.moveTo(n.cx+n.r,n.cy),t.arc(n.cx,n.cy,n.r,0,2*Math.PI)},n}(jo);xs.prototype.type="circle";var Ms=function(){this.cx=0,this.cy=0,this.rx=0,this.ry=0},ks=function(t){function n(n){return t.call(this,n)||this}return mt(n,t),n.prototype.getDefaultShape=function(){return new Ms},n.prototype.buildPath=function(t,n){var i=.5522848,r=n.cx,e=n.cy,o=n.rx,a=n.ry,s=o*i,u=a*i;t.moveTo(r-o,e),t.bezierCurveTo(r-o,e-u,r-s,e-a,r,e-a),t.bezierCurveTo(r+s,e-a,r+o,e-u,r+o,e),t.bezierCurveTo(r+o,e+u,r+s,e+a,r,e+a),t.bezierCurveTo(r-s,e+a,r-o,e+u,r-o,e),t.closePath()},n}(jo);ks.prototype.type="ellipse";var Ss=Math.PI,As=2*Ss,Cs=Math.sin,Ts=Math.cos,Is=Math.acos,Ns=Math.atan2,Ls=Math.abs,Os=Math.sqrt,Ds=Math.max,zs=Math.min,Bs=1e-4;function _s(t,n,i,r,e,o,a){var s=t-i,u=n-r,h=(a?o:-o)/Os(s*s+u*u),f=h*u,l=-h*s,c=t+f,v=n+l,d=i+f,p=r+l,m=(c+d)/2,g=(v+p)/2,y=d-c,b=p-v,w=y*y+b*b,x=e-o,M=c*p-d*v,k=(b<0?-1:1)*Os(Ds(0,x*x*w-M*M)),S=(M*b-y*k)/w,A=(-M*y-b*k)/w,C=(M*b+y*k)/w,T=(-M*y+b*k)/w,I=S-m,N=A-g,L=C-m,O=T-g;return I*I+N*N>L*L+O*O&&(S=C,A=T),{cx:S,cy:A,x0:-f,y0:-l,x1:S*(e/x-1),y1:A*(e/x-1)}}var Rs=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0,this.cornerRadius=0},Fs=function(t){function n(n){return t.call(this,n)||this}return mt(n,t),n.prototype.getDefaultShape=function(){return new Rs},n.prototype.buildPath=function(t,n){!function(t,n){var i,r=Ds(n.r,0),e=Ds(n.r0||0,0),o=r>0;if(o||e>0){if(o||(r=e,e=0),e>r){var a=r;r=e,e=a}var s=n.startAngle,u=n.endAngle;if(!isNaN(s)&&!isNaN(u)){var h=n.cx,f=n.cy,l=!!n.clockwise,c=Ls(u-s),v=c>As&&c%As;if(v>Bs&&(c=v),r>Bs)if(c>As-Bs)t.moveTo(h+r*Ts(s),f+r*Cs(s)),t.arc(h,f,r,s,u,!l),e>Bs&&(t.moveTo(h+e*Ts(u),f+e*Cs(u)),t.arc(h,f,e,u,s,l));else{var d=void 0,p=void 0,m=void 0,g=void 0,y=void 0,b=void 0,w=void 0,x=void 0,M=void 0,k=void 0,S=void 0,A=void 0,C=void 0,T=void 0,I=void 0,N=void 0,L=r*Ts(s),O=r*Cs(s),D=e*Ts(u),z=e*Cs(u),B=c>Bs;if(B){var _=n.cornerRadius;_&&(d=(i=function(t){var n;if(j(t)){var i=t.length;if(!i)return t;n=1===i?[t[0],t[0],0,0]:2===i?[t[0],t[0],t[1],t[1]]:3===i?t.concat(t[2]):t}else n=[t,t,t,t];return n}(_))[0],p=i[1],m=i[2],g=i[3]);var R=Ls(r-e)/2;if(y=zs(R,m),b=zs(R,g),w=zs(R,d),x=zs(R,p),S=M=Ds(y,b),A=k=Ds(w,x),(M>Bs||k>Bs)&&(C=r*Ts(u),T=r*Cs(u),I=e*Ts(s),N=e*Cs(s),c<Ss)){var F=function(t,n,i,r,e,o,a,s){var u=i-t,h=r-n,f=a-e,l=s-o,c=l*u-f*h;if(!(c*c<Bs))return[t+(c=(f*(n-o)-l*(t-e))/c)*u,n+c*h]}(L,O,I,N,C,T,D,z);if(F){var E=L-F[0],P=O-F[1],W=C-F[0],H=T-F[1],U=1/Cs(Is((E*W+P*H)/(Os(E*E+P*P)*Os(W*W+H*H)))/2),Y=Os(F[0]*F[0]+F[1]*F[1]);S=zs(M,(r-Y)/(U+1)),A=zs(k,(e-Y)/(U-1))}}}if(B)if(S>Bs){var X=zs(m,S),V=zs(g,S),q=_s(I,N,L,O,r,X,l),G=_s(C,T,D,z,r,V,l);t.moveTo(h+q.cx+q.x0,f+q.cy+q.y0),S<M&&X===V?t.arc(h+q.cx,f+q.cy,S,Ns(q.y0,q.x0),Ns(G.y0,G.x0),!l):(X>0&&t.arc(h+q.cx,f+q.cy,X,Ns(q.y0,q.x0),Ns(q.y1,q.x1),!l),t.arc(h,f,r,Ns(q.cy+q.y1,q.cx+q.x1),Ns(G.cy+G.y1,G.cx+G.x1),!l),V>0&&t.arc(h+G.cx,f+G.cy,V,Ns(G.y1,G.x1),Ns(G.y0,G.x0),!l))}else t.moveTo(h+L,f+O),t.arc(h,f,r,s,u,!l);else t.moveTo(h+L,f+O);e>Bs&&B?A>Bs?(X=zs(d,A),q=_s(D,z,C,T,e,-(V=zs(p,A)),l),G=_s(L,O,I,N,e,-X,l),t.lineTo(h+q.cx+q.x0,f+q.cy+q.y0),A<k&&X===V?t.arc(h+q.cx,f+q.cy,A,Ns(q.y0,q.x0),Ns(G.y0,G.x0),!l):(V>0&&t.arc(h+q.cx,f+q.cy,V,Ns(q.y0,q.x0),Ns(q.y1,q.x1),!l),t.arc(h,f,e,Ns(q.cy+q.y1,q.cx+q.x1),Ns(G.cy+G.y1,G.cx+G.x1),l),X>0&&t.arc(h+G.cx,f+G.cy,X,Ns(G.y1,G.x1),Ns(G.y0,G.x0),!l))):(t.lineTo(h+D,f+z),t.arc(h,f,e,u,s,l)):t.lineTo(h+D,f+z)}else t.moveTo(h,f);t.closePath()}}}(t,n)},n.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},n}(jo);Fs.prototype.type="sector";var Es=function(){this.cx=0,this.cy=0,this.r=0,this.r0=0},Ps=function(t){function n(n){return t.call(this,n)||this}return mt(n,t),n.prototype.getDefaultShape=function(){return new Es},n.prototype.buildPath=function(t,n){var i=n.cx,r=n.cy,e=2*Math.PI;t.moveTo(i+n.r,r),t.arc(i,r,n.r,0,e,!1),t.moveTo(i+n.r0,r),t.arc(i,r,n.r0,0,e,!0)},n}(jo);function Ws(t,n,i){var r=n.smooth,e=n.points;if(e&&e.length>=2){if(r){var o=function(t,n,i,r){var e,o,a,s,u=[],h=[],f=[],l=[];if(r){a=[1/0,1/0],s=[-1/0,-1/0];for(var c=0,v=t.length;c<v;c++)Tt(a,a,t[c]),It(s,s,t[c]);Tt(a,a,r[0]),It(s,s,r[1])}for(c=0,v=t.length;c<v;c++){var d=t[c];if(i)e=t[c?c-1:v-1],o=t[(c+1)%v];else{if(0===c||c===v-1){u.push(yt(t[c]));continue}e=t[c-1],o=t[c+1]}wt(h,o,e),xt(h,h,n);var p=Mt(d,e),m=Mt(d,o),g=p+m;0!==g&&(p/=g,m/=g),xt(f,h,-p),xt(l,h,m);var y=bt([],d,f),b=bt([],d,l);r&&(It(y,y,a),Tt(y,y,s),It(b,b,a),Tt(b,b,s)),u.push(y),u.push(b)}return i&&u.push(u.shift()),u}(e,r,i,n.smoothConstraint);t.moveTo(e[0][0],e[0][1]);for(var a=e.length,s=0;s<(i?a:a-1);s++){var u=o[2*s],h=o[2*s+1],f=e[(s+1)%a];t.bezierCurveTo(u[0],u[1],h[0],h[1],f[0],f[1])}}else{t.moveTo(e[0][0],e[0][1]),s=1;for(var l=e.length;s<l;s++)t.lineTo(e[s][0],e[s][1])}i&&t.closePath()}}Ps.prototype.type="ring";var Hs=function(){this.points=null,this.smooth=0,this.smoothConstraint=null},Us=function(t){function n(n){return t.call(this,n)||this}return mt(n,t),n.prototype.getDefaultShape=function(){return new Hs},n.prototype.buildPath=function(t,n){Ws(t,n,!0)},n}(jo);Us.prototype.type="polygon";var js=function(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null},Ys=function(t){function n(n){return t.call(this,n)||this}return mt(n,t),n.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},n.prototype.getDefaultShape=function(){return new js},n.prototype.buildPath=function(t,n){Ws(t,n,!1)},n}(jo);Ys.prototype.type="polyline";var Xs={},Vs=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1},qs=function(t){function n(n){return t.call(this,n)||this}return mt(n,t),n.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},n.prototype.getDefaultShape=function(){return new Vs},n.prototype.buildPath=function(t,n){var i,r,e,o;if(this.subPixelOptimize){var a=Ko(Xs,n,this.style);i=a.x1,r=a.y1,e=a.x2,o=a.y2}else i=n.x1,r=n.y1,e=n.x2,o=n.y2;var s=n.percent;0!==s&&(t.moveTo(i,r),s<1&&(e=i*(1-s)+e*s,o=r*(1-s)+o*s),t.lineTo(e,o))},n.prototype.pointAt=function(t){var n=this.shape;return[n.x1*(1-t)+n.x2*t,n.y1*(1-t)+n.y2*t]},n}(jo);qs.prototype.type="line";var Gs=[],Zs=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1};function Ks(t,n,i){return null!=t.cpx2||null!=t.cpy2?[(i?Sn:kn)(t.x1,t.cpx1,t.cpx2,t.x2,n),(i?Sn:kn)(t.y1,t.cpy1,t.cpy2,t.y2,n)]:[(i?On:Ln)(t.x1,t.cpx1,t.x2,n),(i?On:Ln)(t.y1,t.cpy1,t.y2,n)]}var $s=function(t){function n(n){return t.call(this,n)||this}return mt(n,t),n.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},n.prototype.getDefaultShape=function(){return new Zs},n.prototype.buildPath=function(t,n){var i=n.x1,r=n.y1,e=n.x2,o=n.y2,a=n.cpx1,s=n.cpy1,u=n.cpx2,h=n.cpy2,f=n.percent;0!==f&&(t.moveTo(i,r),null==u||null==h?(f<1&&(zn(i,a,e,f,Gs),a=Gs[1],e=Gs[2],zn(r,s,o,f,Gs),s=Gs[1],o=Gs[2]),t.quadraticCurveTo(a,s,e,o)):(f<1&&(Tn(i,a,u,e,f,Gs),a=Gs[1],u=Gs[2],e=Gs[3],Tn(r,s,h,o,f,Gs),s=Gs[1],h=Gs[2],o=Gs[3]),t.bezierCurveTo(a,s,u,h,e,o)))},n.prototype.pointAt=function(t){return Ks(this.shape,t,!1)},n.prototype.tangentAt=function(t){var n=Ks(this.shape,t,!0);return function(t,n){var i=function(t){return Math.sqrt(function(t){return t[0]*t[0]+t[1]*t[1]}(t))}(n);return 0===i?(t[0]=0,t[1]=0):(t[0]=n[0]/i,t[1]=n[1]/i),t}(n,n)},n}(jo);$s.prototype.type="bezier-curve";var Js=function(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},Qs=function(t){function n(n){return t.call(this,n)||this}return mt(n,t),n.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},n.prototype.getDefaultShape=function(){return new Js},n.prototype.buildPath=function(t,n){var i=n.cx,r=n.cy,e=Math.max(n.r,0),o=n.startAngle,a=n.endAngle,s=n.clockwise,u=Math.cos(o),h=Math.sin(o);t.moveTo(u*e+i,h*e+r),t.arc(i,r,e,o,a,!s)},n}(jo);Qs.prototype.type="arc";var tu=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.type="compound",n}return mt(n,t),n.prototype._updatePathDirty=function(){for(var t=this.shape.paths,n=this.shapeChanged(),i=0;i<t.length;i++)n=n||t[i].shapeChanged();n&&this.dirtyShape()},n.prototype.beforeBrush=function(){this._updatePathDirty();for(var t=this.shape.paths||[],n=this.getGlobalScale(),i=0;i<t.length;i++)t[i].path||t[i].createPathProxy(),t[i].path.setScale(n[0],n[1],t[i].segmentIgnoreThreshold)},n.prototype.buildPath=function(t,n){for(var i=n.paths||[],r=0;r<i.length;r++)i[r].buildPath(t,i[r].shape,!0)},n.prototype.afterBrush=function(){for(var t=this.shape.paths||[],n=0;n<t.length;n++)t[n].pathUpdated()},n.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),jo.prototype.getBoundingRect.call(this)},n}(jo),nu=function(){function t(t){this.colorStops=t||[]}return t.prototype.addColorStop=function(t,n){this.colorStops.push({offset:t,color:n})},t}(),iu=function(t){function n(n,i,r,e,o,a){var s=t.call(this,o)||this;return s.x=null==n?0:n,s.y=null==i?0:i,s.x2=null==r?1:r,s.y2=null==e?0:e,s.type="linear",s.global=a||!1,s}return mt(n,t),n}(nu),ru=function(t){function n(n,i,r,e,o){var a=t.call(this,e)||this;return a.x=null==n?.5:n,a.y=null==i?.5:i,a.r=null==r?.5:r,a.type="radial",a.global=o||!1,a}return mt(n,t),n}(nu),eu=[0,0],ou=[0,0],au=new Ji,su=new Ji,uu=function(){function t(t,n){this._corners=[],this._axes=[],this._origin=[0,0];for(var i=0;i<4;i++)this._corners[i]=new Ji;for(i=0;i<2;i++)this._axes[i]=new Ji;t&&this.fromBoundingRect(t,n)}return t.prototype.fromBoundingRect=function(t,n){var i=this._corners,r=this._axes,e=t.x,o=t.y,a=e+t.width,s=o+t.height;if(i[0].set(e,o),i[1].set(a,o),i[2].set(a,s),i[3].set(e,s),n)for(var u=0;u<4;u++)i[u].transform(n);for(Ji.sub(r[0],i[1],i[0]),Ji.sub(r[1],i[3],i[0]),r[0].normalize(),r[1].normalize(),u=0;u<2;u++)this._origin[u]=r[u].dot(i[0])},t.prototype.intersect=function(t,n){var i=!0,r=!n;return au.set(1/0,1/0),su.set(0,0),!this._intersectCheckOneSide(this,t,au,su,r,1)&&(i=!1,r)||!this._intersectCheckOneSide(t,this,au,su,r,-1)&&(i=!1,r)||r||Ji.copy(n,i?au:su),i},t.prototype._intersectCheckOneSide=function(t,n,i,r,e,o){for(var a=!0,s=0;s<2;s++){var u=this._axes[s];if(this._getProjMinMaxOnAxis(s,t._corners,eu),this._getProjMinMaxOnAxis(s,n._corners,ou),eu[1]<ou[0]||eu[0]>ou[1]){if(a=!1,e)return a;var h=Math.abs(ou[0]-eu[1]),f=Math.abs(eu[0]-ou[1]);Math.min(h,f)>r.len()&&Ji.scale(r,u,h<f?-h*o:f*o)}else i&&(h=Math.abs(ou[0]-eu[1]),f=Math.abs(eu[0]-ou[1]),Math.min(h,f)<i.len()&&Ji.scale(i,u,h<f?h*o:-f*o))}return a},t.prototype._getProjMinMaxOnAxis=function(t,n,i){for(var r=this._axes[t],e=this._origin,o=n[0].dot(r)+e[t],a=o,s=o,u=1;u<n.length;u++){var h=n[u].dot(r)+e[t];a=Math.min(h,a),s=Math.max(h,s)}i[0]=a,i[1]=s},t}(),hu=[],fu=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.notClear=!0,n.incremental=!0,n._displayables=[],n._temporaryDisplayables=[],n._cursor=0,n}return mt(n,t),n.prototype.traverse=function(t,n){t.call(n,this)},n.prototype.useStyle=function(){this.style={}},n.prototype.getCursor=function(){return this._cursor},n.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},n.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},n.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},n.prototype.addDisplayable=function(t,n){n?this._temporaryDisplayables.push(t):this._displayables.push(t),this.markRedraw()},n.prototype.addDisplayables=function(t,n){n=n||!1;for(var i=0;i<t.length;i++)this.addDisplayable(t[i],n)},n.prototype.getDisplayables=function(){return this._displayables},n.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},n.prototype.eachPendingDisplayable=function(t){for(var n=this._cursor;n<this._displayables.length;n++)t&&t(this._displayables[n]);for(n=0;n<this._temporaryDisplayables.length;n++)t&&t(this._temporaryDisplayables[n])},n.prototype.update=function(){this.updateTransform();for(var t=this._cursor;t<this._displayables.length;t++)(n=this._displayables[t]).parent=this,n.update(),n.parent=null;for(t=0;t<this._temporaryDisplayables.length;t++){var n;(n=this._temporaryDisplayables[t]).parent=this,n.update(),n.parent=null}},n.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new sr(1/0,1/0,-1/0,-1/0),n=0;n<this._displayables.length;n++){var i=this._displayables[n],r=i.getBoundingRect().clone();i.needLocalTransform()&&r.applyTransform(i.getLocalTransform(hu)),t.union(r)}this._rect=t}return this._rect},n.prototype.contain=function(t,n){var i=this.transformCoordToLocal(t,n);if(this.getBoundingRect().contain(i[0],i[1]))for(var r=0;r<this._displayables.length;r++)if(this._displayables[r].contain(t,n))return!0;return!1},n}(Ue),lu=ie();function cu(t,n,i,r,e,o,a){var s,u=!1;Y(e)?(a=o,o=e,e=null):G(e)&&(o=e.cb,a=e.during,u=e.isFrom,s=e.removeOpt,e=e.dataIndex);var h="leave"===t;h||n.stopAnimation("leave");var f=function(t,n,i,r,e){var o;if(n&&n.ecModel){var a=n.ecModel.getUpdatePayload();o=a&&a.animation}var s="update"===t;if(n&&n.isAnimationEnabled()){var u=void 0,h=void 0,f=void 0;return r?(u=tt(r.duration,200),h=tt(r.easing,"cubicOut"),f=0):(u=n.getShallow(s?"animationDurationUpdate":"animationDuration"),h=n.getShallow(s?"animationEasingUpdate":"animationEasing"),f=n.getShallow(s?"animationDelayUpdate":"animationDelay")),o&&(null!=o.duration&&(u=o.duration),null!=o.easing&&(h=o.easing),null!=o.delay&&(f=o.delay)),Y(f)&&(f=f(i,e)),Y(u)&&(u=u(i)),{duration:u||0,delay:f,easing:h}}return null}(t,r,e,h?s||{}:null,r&&r.getAnimationDelayParams?r.getAnimationDelayParams(n,e):null);if(f&&f.duration>0){var l={duration:f.duration,delay:f.delay||0,easing:f.easing,done:o,force:!!o||!!a,setToFinal:!h,scope:t,during:a};u?n.animateFrom(i,l):n.animateTo(i,l)}else n.stopAnimation(),!u&&n.attr(i),a&&a(1),o&&o()}function vu(t,n,i,r,e,o){cu("update",t,n,i,r,e,o)}function du(t,n,i,r,e,o){cu("enter",t,n,i,r,e,o)}function pu(t){if(!t.__zr)return!0;for(var n=0;n<t.animators.length;n++)if("leave"===t.animators[n].scope)return!0;return!1}function mu(t,n,i,r,e,o){pu(t)||cu("leave",t,n,i,r,e,o)}function gu(t,n,i,r){t.removeTextContent(),t.removeTextGuideLine(),mu(t,{style:{opacity:0}},n,i,r)}function yu(t,n,i){function r(){t.parent&&t.parent.remove(t)}t.isGroup?t.traverse((function(t){t.isGroup||gu(t,n,i,r)})):gu(t,n,i,r)}var bu=Math.max,wu=Math.min,xu={};function Mu(t,n){xu[t]=n}function ku(t,n,i,r){var e=function(t,n){return new gs(bs(t,n))}(t,n);return i&&("center"===r&&(i=Au(i,e.getBoundingRect())),Cu(e,i)),e}function Su(t,n,i){var r=new Go({style:{image:t,x:n.x,y:n.y,width:n.width,height:n.height},onload:function(t){"center"===i&&r.setStyle(Au(n,{width:t.width,height:t.height}))}});return r}function Au(t,n){var i,r=n.width/n.height,e=t.height*r;return i=e<=t.width?t.height:(e=t.width)/r,{x:t.x+t.width/2-e/2,y:t.y+t.height/2-i/2,width:e,height:i}}function Cu(t,n){if(t.applyTransform){var i=t.getBoundingRect().calculateTransform(n);t.applyTransform(i)}}var Tu=Jo;function Iu(t,n,i){return n&&!_(n)&&(n=Ki.getLocalTransform(n)),i&&(n=ji([],n)),Ct([],t,n)}function Nu(t){return!t.isGroup}function Lu(t,n,i){var r=O({rectHover:!0},n),e=r.style={strokeNoScale:!0};if(i=i||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(e.image=t.slice(8),D(e,i),new Go(r)):ku(t.replace("path://",""),r,i,"center")}function Ou(t,n,i,r,e,o,a,s){var u,h=i-t,f=r-n,l=a-e,c=s-o,v=Du(l,c,h,f);if((u=v)<=1e-6&&u>=-1e-6)return!1;var d=t-e,p=n-o,m=Du(d,p,h,f)/v;if(m<0||m>1)return!1;var g=Du(d,p,l,c)/v;return!(g<0||g>1)}function Du(t,n,i,r){return t*r-i*n}function zu(t){var n=t.itemTooltipOption,i=t.componentModel,r=t.itemName,e=X(n)?{formatter:n}:n,o=i.mainType,a=i.componentIndex,s={componentType:o,name:r,$vars:["name"]};s[o+"Index"]=a;var u=t.formatterParamsExtra;u&&R(W(u),(function(t){ct(s,t)||(s[t]=u[t],s.$vars.push(t))}));var h=pa(t.el);h.componentMainType=o,h.componentIndex=a,h.tooltipConfig={name:r,option:D({content:r,formatterParams:s},e)}}function Bu(t,n){var i;t.isGroup&&(i=n(t)),i||t.traverse(n)}function _u(t,n){if(t)if(j(t))for(var i=0;i<t.length;i++)Bu(t[i],n);else Bu(t,n)}Mu("circle",xs),Mu("ellipse",ks),Mu("sector",Fs),Mu("ring",Ps),Mu("polygon",Us),Mu("polyline",Ys),Mu("rect",na),Mu("line",qs),Mu("bezierCurve",$s),Mu("arc",Qs);const Ru=Object.freeze({__proto__:null,updateProps:vu,initProps:du,removeElement:mu,removeElementWithFadeOut:yu,isElementRemoved:pu,extendShape:function(t){return jo.extend(t)},extendPath:function(t,n){return i=bs(t,n),function(t){function n(n){var r=t.call(this,n)||this;return r.applyTransform=i.applyTransform,r.buildPath=i.buildPath,r}return mt(n,t),n}(gs);var i},registerShape:Mu,getShapeClass:function(t){if(xu.hasOwnProperty(t))return xu[t]},makePath:ku,makeImage:Su,mergePath:function(t,n){for(var i=[],r=t.length,e=0;e<r;e++)i.push(t[e].getUpdatedPathProxy(!0));var o=new jo(n);return o.createPathProxy(),o.buildPath=function(t){if(ys(t)){t.appendPath(i);var n=t.getContext();n&&t.rebuildPath(n,1)}},o},resizePath:Cu,subPixelOptimizeLine:function(t){return Ko(t.shape,t.shape,t.style),t},subPixelOptimizeRect:function(t){return $o(t.shape,t.shape,t.style),t},subPixelOptimize:Tu,getTransform:function(t,n){for(var i=Pi([]);t&&t!==n;)Wi(i,t.getLocalTransform(),i),t=t.parent;return i},applyTransform:Iu,transformDirection:function(t,n,i){var r=0===n[4]||0===n[5]||0===n[0]?1:Math.abs(2*n[4]/n[0]),e=0===n[4]||0===n[5]||0===n[2]?1:Math.abs(2*n[4]/n[2]),o=["left"===t?-r:"right"===t?r:0,"top"===t?-e:"bottom"===t?e:0];return o=Iu(o,n,i),Math.abs(o[0])>Math.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"},groupTransition:function(t,n,i){if(t&&n){var r,e=(r={},t.traverse((function(t){Nu(t)&&t.anid&&(r[t.anid]=t)})),r);n.traverse((function(t){if(Nu(t)&&t.anid){var n=e[t.anid];if(n){var r=o(t);t.attr(o(n)),vu(t,r,i,pa(t).dataIndex)}}}))}function o(t){var n={x:t.x,y:t.y,rotation:t.rotation};return function(t){return null!=t.shape}(t)&&(n.shape=O({},t.shape)),n}},clipPointsByRect:function(t,n){return F(t,(function(t){var i=t[0];i=bu(i,n.x),i=wu(i,n.x+n.width);var r=t[1];return r=bu(r,n.y),[i,r=wu(r,n.y+n.height)]}))},clipRectByRect:function(t,n){var i=bu(t.x,n.x),r=wu(t.x+t.width,n.x+n.width),e=bu(t.y,n.y),o=wu(t.y+t.height,n.y+n.height);if(r>=i&&o>=e)return{x:i,y:e,width:r-i,height:o-e}},createIcon:Lu,linePolygonIntersect:function(t,n,i,r,e){for(var o=0,a=e[e.length-1];o<e.length;o++){var s=e[o];if(Ou(t,n,i,r,s[0],s[1],a[0],a[1]))return!0;a=s}},lineLineIntersect:Ou,setTooltipConfig:zu,traverseElements:_u,Group:Cr,Image:Go,Text:ea,Circle:xs,Ellipse:ks,Sector:Fs,Ring:Ps,Polygon:Us,Polyline:Ys,Rect:na,Line:qs,BezierCurve:$s,Arc:Qs,IncrementalDisplayable:fu,CompoundPath:tu,LinearGradient:iu,RadialGradient:ru,BoundingRect:sr,OrientedBoundingRect:uu,Point:Ji,Path:jo});var Fu={};function Eu(t,n){for(var i=0;i<wa.length;i++){var r=wa[i],e=n[r],o=t.ensureState(r);o.style=o.style||{},o.style.text=e}var a=t.currentStates.slice();t.clearStates(!0),t.setStyle({text:n.normal}),t.useStates(a,!0)}function Pu(t,n,i){var r,e=t.labelFetcher,o=t.labelDataIndex,a=t.labelDimIndex,s=n.normal;e&&(r=e.getFormattedLabel(o,"normal",null,a,s&&s.get("formatter"),null!=i?{interpolatedValue:i}:null)),null==r&&(r=Y(t.defaultText)?t.defaultText(o,t,i):t.defaultText);for(var u={normal:r},h=0;h<wa.length;h++){var f=wa[h],l=n[f];u[f]=tt(e?e.getFormattedLabel(o,f,null,a,l&&l.get("formatter")):null,r)}return u}function Wu(t,n,i,r){i=i||Fu;for(var e=t instanceof ea,o=!1,a=0;a<xa.length;a++)if((c=n[xa[a]])&&c.getShallow("show")){o=!0;break}var s=e?t:t.getTextContent();if(o){e||(s||(s=new ea,t.setTextContent(s)),t.stateProxy&&(s.stateProxy=t.stateProxy));var u=Pu(i,n),h=n.normal,f=!!h.getShallow("show"),l=Hu(h,r&&r.normal,i,!1,!e);for(l.text=u.normal,e||t.setTextConfig(Uu(h,i,!1)),a=0;a<wa.length;a++){var c,v=wa[a];if(c=n[v]){var d=s.ensureState(v),p=!!tt(c.getShallow("show"),f);p!==f&&(d.ignore=!p),d.style=Hu(c,r&&r[v],i,!0,!e),d.style.text=u[v],e||(t.ensureState(v).textConfig=Uu(c,i,!0))}}s.silent=!!h.getShallow("silent"),null!=s.style.x&&(l.x=s.style.x),null!=s.style.y&&(l.y=s.style.y),s.ignore=!f,s.useStyle(l),s.dirty(),i.enableTextSetter&&(qu(s).setLabelText=function(t){var r=Pu(i,n,t);Eu(s,r)})}else s&&(s.ignore=!0);t.dirty()}function Hu(t,n,i,r,e){var o={};return function(t,n,i,r,e){i=i||Fu;var o,a=n.ecModel,s=a&&a.option.textStyle,u=function(t){for(var n;t&&t!==t.ecModel;){var i=(t.option||Fu).rich;if(i){n=n||{};for(var r=W(i),e=0;e<r.length;e++)n[r[e]]=1}t=t.parentModel}return n}(n);if(u)for(var h in o={},u)if(u.hasOwnProperty(h)){var f=n.getModel(["rich",h]);Vu(o[h]={},f,s,i,r,e,!1,!0)}o&&(t.rich=o);var l=n.get("overflow");l&&(t.overflow=l);var c=n.get("minMargin");null!=c&&(t.margin=c),Vu(t,n,s,i,r,e,!0,!1)}(o,t,i,r,e),n&&O(o,n),o}function Uu(t,n,i){n=n||{};var r,e={},o=t.getShallow("rotate"),a=tt(t.getShallow("distance"),i?null:5),s=t.getShallow("offset");return"outside"===(r=t.getShallow("position")||(i?null:"inside"))&&(r=n.defaultOutsidePosition||"top"),null!=r&&(e.position=r),null!=s&&(e.offset=s),null!=o&&(o*=Math.PI/180,e.rotation=o),null!=a&&(e.distance=a),e.outsideFill="inherit"===t.get("color")?n.inheritColor||null:"auto",e}var ju=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],Yu=["align","lineHeight","width","height","tag","verticalAlign"],Xu=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function Vu(t,n,i,r,e,o,a,s){i=!e&&i||Fu;var u=r&&r.inheritColor,h=n.getShallow("color"),f=n.getShallow("textBorderColor"),l=tt(n.getShallow("opacity"),i.opacity);"inherit"!==h&&"auto"!==h||(h=u||null),"inherit"!==f&&"auto"!==f||(f=u||null),o||(h=h||i.color,f=f||i.textBorderColor),null!=h&&(t.fill=h),null!=f&&(t.stroke=f);var c=tt(n.getShallow("textBorderWidth"),i.textBorderWidth);null!=c&&(t.lineWidth=c);var v=tt(n.getShallow("textBorderType"),i.textBorderType);null!=v&&(t.lineDash=v);var d=tt(n.getShallow("textBorderDashOffset"),i.textBorderDashOffset);null!=d&&(t.lineDashOffset=d),e||null!=l||s||(l=r&&r.defaultOpacity),null!=l&&(t.opacity=l),e||o||null==t.fill&&r.inheritColor&&(t.fill=r.inheritColor);for(var p=0;p<ju.length;p++)null!=(y=tt(n.getShallow(g=ju[p]),i[g]))&&(t[g]=y);for(p=0;p<Yu.length;p++)null!=(y=n.getShallow(g=Yu[p]))&&(t[g]=y);if(null==t.verticalAlign){var m=n.getShallow("baseline");null!=m&&(t.verticalAlign=m)}if(!a||!r.disableBox){for(p=0;p<Xu.length;p++){var g,y;null!=(y=n.getShallow(g=Xu[p]))&&(t[g]=y)}var b=n.getShallow("borderType");null!=b&&(t.borderDash=b),"auto"!==t.backgroundColor&&"inherit"!==t.backgroundColor||!u||(t.backgroundColor=u),"auto"!==t.borderColor&&"inherit"!==t.borderColor||!u||(t.borderColor=u)}}var qu=ie();var Gu,Zu,Ku=["textStyle","color"],$u=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],Ju=new ea,Qu=function(){function t(){}return t.prototype.getTextColor=function(t){var n=this.ecModel;return this.getShallow("color")||(!t&&n?n.get(Ku):null)},t.prototype.getFont=function(){return t={fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},i=(n=this.ecModel)&&n.getModel("textStyle"),ot([t.fontStyle||i&&i.getShallow("fontStyle")||"",t.fontWeight||i&&i.getShallow("fontWeight")||"",(t.fontSize||i&&i.getShallow("fontSize")||12)+"px",t.fontFamily||i&&i.getShallow("fontFamily")||"sans-serif"].join(" "));var t,n,i},t.prototype.getTextRect=function(t){for(var n={text:t,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},i=0;i<$u.length;i++)n[$u[i]]=this.getShallow($u[i]);return Ju.useStyle(n),Ju.update(),Ju.getBoundingRect()},t}(),th=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],nh=ge(th),ih=function(){function t(){}return t.prototype.getLineStyle=function(t){return nh(this,t)},t}(),rh=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],eh=ge(rh),oh=function(){function t(){}return t.prototype.getItemStyle=function(t,n){return eh(this,t,n)},t}(),ah=function(){function t(t,n,i){this.parentModel=n,this.ecModel=i,this.option=t}return t.prototype.init=function(t,n,i){for(var r=[],e=3;e<arguments.length;e++)r[e-3]=arguments[e]},t.prototype.mergeOption=function(t){L(this.option,t,!0)},t.prototype.get=function(t,n){return null==t?this.option:this._doGet(this.parsePath(t),!n&&this.parentModel)},t.prototype.getShallow=function(t,n){var i=this.option,r=null==i?i:i[t];if(null==r&&!n){var e=this.parentModel;e&&(r=e.getShallow(t))}return r},t.prototype.getModel=function(n,i){var r=null!=n,e=r?this.parsePath(n):null;return new t(r?this._doGet(e):this.option,i=i||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(e)),this.ecModel)},t.prototype.isEmpty=function(){return null==this.option},t.prototype.restoreData=function(){},t.prototype.clone=function(){return new(0,this.constructor)(N(this.option))},t.prototype.parsePath=function(t){return"string"==typeof t?t.split("."):t},t.prototype.resolveParentPath=function(t){return t},t.prototype.isAnimationEnabled=function(){if(!f.node&&this.option){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},t.prototype._doGet=function(t,n){var i=this.option;if(!t)return i;for(var r=0;r<t.length&&(!t[r]||null!=(i=i&&"object"==typeof i?i[t[r]]:null));r++);return null==i&&n&&(i=n._doGet(this.resolveParentPath(t),n.parentModel)),i},t}();le(ah),Gu=ah,Zu=["__\0is_clz",ve++].join("_"),Gu.prototype[Zu]=!0,Gu.isInstance=function(t){return!(!t||!t[Zu])},B(ah,ih),B(ah,oh),B(ah,be),B(ah,Qu);var sh=Math.round(10*Math.random());function uh(t){return[t||"",sh++].join("_")}var hh={},fh={},lh=f.domSupported&&(document.documentElement.lang||navigator.language||navigator.browserLanguage).toUpperCase().indexOf("ZH")>-1?"ZH":"EN";function ch(t,n){t=t.toUpperCase(),fh[t]=new ah(n),hh[t]=n}function vh(t,n){return"0000".substr(0,n-(t+="").length)+t}function dh(t,n,i,r){var e=Er(t),o=e[function(t){return t?"getUTCFullYear":"getFullYear"}(i)](),a=e[function(t){return t?"getUTCMonth":"getMonth"}(i)]()+1,s=Math.floor((a-1)/3)+1,u=e[function(t){return t?"getUTCDate":"getDate"}(i)](),h=e["get"+(i?"UTC":"")+"Day"](),f=e[function(t){return t?"getUTCHours":"getHours"}(i)](),l=(f-1)%12+1,c=e[function(t){return t?"getUTCMinutes":"getMinutes"}(i)](),v=e[function(t){return t?"getUTCSeconds":"getSeconds"}(i)](),d=e[function(t){return t?"getUTCMilliseconds":"getMilliseconds"}(i)](),p=(r instanceof ah?r:function(t){return fh[t]}(r||lh)||fh.EN).getModel("time"),m=p.get("month"),g=p.get("monthAbbr"),y=p.get("dayOfWeek"),b=p.get("dayOfWeekAbbr");return(n||"").replace(/{yyyy}/g,o+"").replace(/{yy}/g,o%100+"").replace(/{Q}/g,s+"").replace(/{MMMM}/g,m[a-1]).replace(/{MMM}/g,g[a-1]).replace(/{MM}/g,vh(a,2)).replace(/{M}/g,a+"").replace(/{dd}/g,vh(u,2)).replace(/{d}/g,u+"").replace(/{eeee}/g,y[h]).replace(/{ee}/g,b[h]).replace(/{e}/g,h+"").replace(/{HH}/g,vh(f,2)).replace(/{H}/g,f+"").replace(/{hh}/g,vh(l+"",2)).replace(/{h}/g,l+"").replace(/{mm}/g,vh(c,2)).replace(/{m}/g,c+"").replace(/{ss}/g,vh(v,2)).replace(/{s}/g,v+"").replace(/{SSS}/g,vh(d,3)).replace(/{S}/g,d+"")}function ph(t,n){return t=(t||"").toLowerCase().replace(/-(.)/g,(function(t,n){return n.toUpperCase()})),n&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}ch("EN",{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"}},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:". "}}}}),ch("ZH",{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:"旭日图"}},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 mh=rt,gh=/([&<>"'])/g,yh={"&":"&","<":"<",">":">",'"':""","'":"'"};function bh(t){return null==t?"":(t+"").replace(gh,(function(t,n){return yh[n]}))}function wh(t,n,i){function r(t){return t&&ot(t)?t:"-"}function e(t){return!(null==t||isNaN(t)||!isFinite(t))}var o="time"===n,a=t instanceof Date;if(o||a){var s=o?Er(t):t;if(!isNaN(+s))return dh(s,"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}",i);if(a)return"-"}if("ordinal"===n)return V(t)?r(t):q(t)&&e(t)?t+"":"-";var u=Pr(t);return e(u)?function(t){if(isNaN(Pr(t)))return X(t)?t:"-";var n=(t+"").split(".");return n[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(n.length>1?"."+n[1]:"")}(u):V(t)?r(t):"boolean"==typeof t?t+"":"-"}var xh=["a","b","c","d","e","f","g"],Mh=function(t,n){return"{"+t+(null==n?"":n)+"}"};function kh(t,n,i){j(n)||(n=[n]);var r=n.length;if(!r)return"";for(var e=n[0].$vars||[],o=0;o<e.length;o++){var a=xh[o];t=t.replace(Mh(a),Mh(a,0))}for(var s=0;s<r;s++)for(var u=0;u<e.length;u++){var h=n[s][e[u]];t=t.replace(Mh(xh[u],s),i?bh(h):h)}return t}function Sh(t,n){return n=n||"transparent",X(t)?t:G(t)&&t.colorStops&&(t.colorStops[0]||{}).color||n}var Ah=R,Ch=["left","right","top","bottom","width","height"],Th=[["width","left","right"],["height","top","bottom"]];function Ih(t,n,i,r,e){var o=0,a=0;null==r&&(r=1/0),null==e&&(e=1/0);var s=0;n.eachChild((function(u,h){var f,l,c=u.getBoundingRect(),v=n.childAt(h+1),d=v&&v.getBoundingRect();if("horizontal"===t){var p=c.width+(d?-d.x+c.x:0);(f=o+p)>r||u.newline?(o=0,f=p,a+=s+i,s=c.height):s=Math.max(s,c.height)}else{var m=c.height+(d?-d.y+c.y:0);(l=a+m)>e||u.newline?(o+=s+i,a=0,l=m,s=c.width):s=Math.max(s,c.width)}u.newline||(u.x=o,u.y=a,u.markRedraw(),"horizontal"===t?o=f+i:a=l+i)}))}var Nh=Ih;function Lh(t,n,i){i=mh(i||0);var r=n.width,e=n.height,o=Or(t.left,r),a=Or(t.top,e),s=Or(t.right,r),u=Or(t.bottom,e),h=Or(t.width,r),f=Or(t.height,e),l=i[2]+i[0],c=i[1]+i[3],v=t.aspect;switch(isNaN(h)&&(h=r-s-c-o),isNaN(f)&&(f=e-u-l-a),null!=v&&(isNaN(h)&&isNaN(f)&&(v>r/e?h=.8*r:f=.8*e),isNaN(h)&&(h=v*f),isNaN(f)&&(f=h/v)),isNaN(o)&&(o=r-s-h-c),isNaN(a)&&(a=e-u-f-l),t.left||t.right){case"center":o=r/2-h/2-i[3];break;case"right":o=r-h-c}switch(t.top||t.bottom){case"middle":case"center":a=e/2-f/2-i[0];break;case"bottom":a=e-f-l}o=o||0,a=a||0,isNaN(h)&&(h=r-c-o-(s||0)),isNaN(f)&&(f=e-l-a-(u||0));var d=new sr(o+i[3],a+i[0],h,f);return d.margin=i,d}function Oh(t){var n=t.layoutMode||t.constructor.layoutMode;return G(n)?n:n?{type:n}:null}function Dh(t,n,i){var r=i&&i.ignoreSize;!j(r)&&(r=[r,r]);var e=a(Th[0],0),o=a(Th[1],1);function a(i,e){var o={},a=0,h={},f=0;if(Ah(i,(function(n){h[n]=t[n]})),Ah(i,(function(t){s(n,t)&&(o[t]=h[t]=n[t]),u(o,t)&&a++,u(h,t)&&f++})),r[e])return u(n,i[1])?h[i[2]]=null:u(n,i[2])&&(h[i[1]]=null),h;if(2!==f&&a){if(a>=2)return o;for(var l=0;l<i.length;l++){var c=i[l];if(!s(o,c)&&s(t,c)){o[c]=t[c];break}}return o}return h}function s(t,n){return t.hasOwnProperty(n)}function u(t,n){return null!=t[n]&&"auto"!==t[n]}function h(t,n,i){Ah(t,(function(t){n[t]=i[t]}))}h(Th[0],t,e),h(Th[1],t,o)}function zh(t){return function(t,n){return n&&t&&Ah(Ch,(function(i){n.hasOwnProperty(i)&&(t[i]=n[i])})),t}({},t)}U(Ih,"vertical"),U(Ih,"horizontal");var Bh=ie(),_h=function(t){function n(n,i,r){var e=t.call(this,n,i,r)||this;return e.uid=uh("ec_cpt_model"),e}var i;return u(n,t),n.prototype.init=function(t,n,i){this.mergeDefaultAndTheme(t,i)},n.prototype.mergeDefaultAndTheme=function(t,n){var i=Oh(this),r=i?zh(t):{};L(t,n.getTheme().get(this.mainType)),L(t,this.getDefaultOption()),i&&Dh(t,r,i)},n.prototype.mergeOption=function(t){L(this.option,t,!0);var n=Oh(this);n&&Dh(this.option,t,n)},n.prototype.optionUpdated=function(){},n.prototype.getDefaultOption=function(){var t=this.constructor;if(!function(t){return!(!t||!t.___EC__EXTENDED_CLASS___)}(t))return t.defaultOption;var n=Bh(this);if(!n.defaultOption){for(var i=[],r=t;r;){var e=r.prototype.defaultOption;e&&i.push(e),r=r.superClass}for(var o={},a=i.length-1;a>=0;a--)o=L(o,i[a],!0);n.defaultOption=o}return n.defaultOption},n.prototype.getReferringComponents=function(t,n){var i=t+"Id";return se(this.ecModel,t,{index:this.get(t+"Index",!0),id:this.get(i,!0)},n)},n.prototype.getBoxLayoutParams=function(){var t=this;return{left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")}},n.prototype.getZLevelKey=function(){return""},n.prototype.setZLevel=function(t){this.option.zlevel=t},n.protoInitialize=((i=n.prototype).type="component",i.id="",i.name="",i.mainType="",i.subType="",void(i.componentIndex=0)),n}(ah);ce(_h,ah),me(_h),function(t){var n={};t.registerSubTypeDefaulter=function(t,i){var r=fe(t);n[r.main]=i},t.determineSubType=function(i,r){var e=r.type;if(!e){var o=fe(i).main;t.hasSubTypes(i)&&n[o]&&(e=n[o](r))}return e}}(_h),function(){function t(t,n){return t[n]||(t[n]={predecessor:[],successor:[]}),t[n]}_h.topologicalTravel=function(n,i,r,e){if(n.length){var o=function(n){var i={},r=[];return R(n,(function(e){var o,a,s=t(i,e),u=function(t,n){var i=[];return R(t,(function(t){z(n,t)>=0&&i.push(t)})),i}(s.originalDeps=(a=[],R(_h.getClassesByMainType(o=e),(function(t){a=a.concat(t.dependencies||t.prototype.dependencies||[])})),a=F(a,(function(t){return fe(t).main})),"dataset"!==o&&z(a,"dataset")<=0&&a.unshift("dataset"),a),n);s.entryCount=u.length,0===s.entryCount&&r.push(e),R(u,(function(n){z(s.predecessor,n)<0&&s.predecessor.push(n);var r=t(i,n);z(r.successor,n)<0&&r.successor.push(e)}))})),{graph:i,noEntryList:r}}(i),a=o.graph,s=o.noEntryList,u={};for(R(n,(function(t){u[t]=!0}));s.length;){var h=s.pop(),f=a[h],l=!!u[h];l&&(r.call(e,h,f.originalDeps.slice()),delete u[h]),R(f.successor,l?v:c)}R(u,(function(){throw new Error("")}))}function c(t){a[t].entryCount--,0===a[t].entryCount&&s.push(t)}function v(t){u[t]=!0,c(t)}}}();var Rh="";"undefined"!=typeof navigator&&(Rh=navigator.platform||"");var Fh="rgba(0, 0, 0, 0.2)";const Eh={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:Fh,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Fh,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Fh,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Fh,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Fh,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Fh,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:Rh.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 Ph=ht(["tooltip","label","itemName","itemId","itemGroupId","seriesName"]),Wh=ie();function Hh(t,n,i){var r={};if(!Uh(t))return r;var e,o=n.sourceFormat,a=n.dimensionsDefine;"objectRows"!==o&&"keyedColumns"!==o||R(a,(function(t,n){"name"===(G(t)?t.name:t)&&(e=n)}));var s=function(){for(var t={},r={},s=[],u=0,h=Math.min(5,i);u<h;u++){var f=Yh(n.data,o,n.seriesLayoutBy,a,n.startIndex,u);s.push(f);var l=3===f;if(l&&null==t.v&&u!==e&&(t.v=u),(null==t.n||t.n===t.v||!l&&3===s[t.n])&&(t.n=u),c(t)&&3!==s[t.n])return t;l||(2===f&&null==r.v&&u!==e&&(r.v=u),null!=r.n&&r.n!==r.v||(r.n=u))}function c(t){return null!=t.v&&null!=t.n}return c(t)?t:c(r)?r:null}();if(s){r.value=[s.v];var u=null!=e?e:s.n;r.itemName=[u],r.seriesName=[u]}return r}function Uh(t){if(!t.get("data",!0))return se(t.ecModel,"dataset",{index:t.get("datasetIndex",!0),id:t.get("datasetId",!0)},ae).models[0]}function jh(t,n){return Yh(t.data,t.sourceFormat,t.seriesLayoutBy,t.dimensionsDefine,t.startIndex,n)}function Yh(t,n,i,r,e,o){var a,s,u;if(K(t))return 3;if(r){var h=r[o];G(h)?(s=h.name,u=h.type):X(h)&&(s=h)}if(null!=u)return"ordinal"===u?1:3;if("arrayRows"===n){var f=t;if("row"===i){for(var l=f[o],c=0;c<(l||[]).length&&c<5;c++)if(null!=(a=y(l[e+c])))return a}else for(c=0;c<f.length&&c<5;c++){var v=f[e+c];if(v&&null!=(a=y(v[o])))return a}}else if("objectRows"===n){var d=t;if(!s)return 3;for(c=0;c<d.length&&c<5;c++)if((m=d[c])&&null!=(a=y(m[s])))return a}else if("keyedColumns"===n){if(!s)return 3;if(!(l=t[s])||K(l))return 3;for(c=0;c<l.length&&c<5;c++)if(null!=(a=y(l[c])))return a}else if("original"===n){var p=t;for(c=0;c<p.length&&c<5;c++){var m,g=Gr(m=p[c]);if(!j(g))return 3;if(null!=(a=y(g[o])))return a}}function y(t){var n=X(t);return null!=t&&isFinite(t)&&""!==t?n?2:3:n&&"-"!==t?1:void 0}return 3}var Xh,Vh,qh,Gh=ht(),Zh=ie(),Kh=ie(),$h=function(){function t(){}return t.prototype.getColorFromPalette=function(t,n,i){var r=Xr(this.get("color",!0)),e=this.get("colorLayer",!0);return Qh(this,Zh,r,e,t,n,i)},t.prototype.clearColorPalette=function(){!function(t,n){n(t).paletteIdx=0,n(t).paletteNameMap={}}(this,Zh)},t}();function Jh(t,n,i,r){var e=Xr(t.get(["aria","decal","decals"]));return Qh(t,Kh,e,null,n,i,r)}function Qh(t,n,i,r,e,o,a){var s=n(o=o||t),u=s.paletteIdx||0,h=s.paletteNameMap=s.paletteNameMap||{};if(h.hasOwnProperty(e))return h[e];var f=null!=a&&r?function(t,n){for(var i=t.length,r=0;r<i;r++)if(t[r].length>n)return t[r];return t[i-1]}(r,a):i;if((f=f||i)&&f.length){var l=f[u];return e&&(h[e]=l),s.paletteIdx=(u+1)%f.length,l}}var tf=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return u(n,t),n.prototype.init=function(t,n,i,r,e,o){r=r||{},this.option=null,this._theme=new ah(r),this._locale=new ah(e),this._optionManager=o},n.prototype.setOption=function(t,n,i){var r=ef(n);this._optionManager.setOption(t,i,r),this._resetOption(null,r)},n.prototype.resetOption=function(t,n){return this._resetOption(t,ef(n))},n.prototype._resetOption=function(t,n){var i=!1,r=this._optionManager;if(!t||"recreate"===t){var e=r.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this._mergeOption(e,n)):qh(this,e),i=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var o=r.getTimelineOption(this);o&&(i=!0,this._mergeOption(o,n))}if(!t||"recreate"===t||"media"===t){var a=r.getMediaOption(this);a.length&&R(a,(function(t){i=!0,this._mergeOption(t,n)}),this)}return i},n.prototype.mergeOption=function(t){this._mergeOption(t,null)},n.prototype._mergeOption=function(t,n){var i=this.option,r=this._componentsMap,e=this._componentsCount,o=[],a=ht(),s=n&&n.replaceMergeMainTypeMap;Wh(this).datasetMap=ht(),R(t,(function(t,n){null!=t&&(_h.hasClass(n)?n&&(o.push(n),a.set(n,!0)):i[n]=null==i[n]?N(t):L(i[n],t,!0))})),s&&s.each((function(t,n){_h.hasClass(n)&&!a.get(n)&&(o.push(n),a.set(n,!0))})),_h.topologicalTravel(o,_h.getAllClassMainTypes(),(function(n){var o=function(t,n,i){var r=Gh.get(n);if(!r)return i;var e=r(t);return e?i.concat(e):i}(this,n,Xr(t[n])),a=r.get(n),u=function(t,n,i){var r="normalMerge"===i,e="replaceMerge"===i,o="replaceAll"===i;t=t||[],n=(n||[]).slice();var a=ht();R(n,(function(t,i){G(t)||(n[i]=null)}));var s,u,h=function(t,n,i){var r=[];if("replaceAll"===i)return r;for(var e=0;e<t.length;e++){var o=t[e];o&&null!=o.id&&n.set(o.id,e),r.push({existing:"replaceMerge"===i||te(o)?null:o,newOption:null,keyInfo:null,brandNew:null})}return r}(t,a,i);return(r||e)&&function(t,n,i,r){R(r,(function(e,o){if(e&&null!=e.id){var a=$r(e.id),s=i.get(a);if(null!=s){var u=t[s];et(!u.newOption,'Duplicated option on id "'+a+'".'),u.newOption=e,u.existing=n[s],r[o]=null}}}))}(h,t,a,n),r&&function(t,n){R(n,(function(i,r){if(i&&null!=i.name)for(var e=0;e<t.length;e++){var o=t[e].existing;if(!t[e].newOption&&o&&(null==o.id||null==i.id)&&!te(i)&&!te(o)&&Kr("name",o,i))return t[e].newOption=i,void(n[r]=null)}}))}(h,n),r||e?function(t,n,i){R(n,(function(n){if(n){for(var r,e=0;(r=t[e])&&(r.newOption||te(r.existing)||r.existing&&null!=n.id&&!Kr("id",n,r.existing));)e++;r?(r.newOption=n,r.brandNew=i):t.push({newOption:n,brandNew:i,existing:null,keyInfo:null}),e++}}))}(h,n,e):o&&function(t,n){R(n,(function(n){t.push({newOption:n,brandNew:!0,existing:null,keyInfo:null})}))}(h,n),s=h,u=ht(),R(s,(function(t){var n=t.existing;n&&u.set(n.id,t)})),R(s,(function(t){var n=t.newOption;et(!n||null==n.id||!u.get(n.id)||u.get(n.id)===t,"id duplicates: "+(n&&n.id)),n&&null!=n.id&&u.set(n.id,t),!t.keyInfo&&(t.keyInfo={})})),R(s,(function(t,n){var i=t.existing,r=t.newOption,e=t.keyInfo;if(G(r)){if(e.name=null!=r.name?$r(r.name):i?i.name:"series\0"+n,i)e.id=$r(i.id);else if(null!=r.id)e.id=$r(r.id);else{var o=0;do{e.id="\0"+e.name+"\0"+o++}while(u.get(e.id))}u.set(e.id,t)}})),h}(a,o,a?s&&s.get(n)?"replaceMerge":"normalMerge":"replaceAll");(function(t,n,i){R(t,(function(t){var r=t.newOption;G(r)&&(t.keyInfo.mainType=n,t.keyInfo.subType=function(t,n,i,r){return n.type?n.type:i?i.subType:r.determineSubType(t,n)}(n,r,t.existing,i))}))})(u,n,_h),i[n]=null,r.set(n,null),e.set(n,0);var h,f=[],l=[],c=0;R(u,(function(t,i){var r=t.existing,e=t.newOption;if(e){var o=_h.getClass(n,t.keyInfo.subType,!("series"===n));if(!o)return;if("tooltip"===n){if(h)return;h=!0}if(r&&r.constructor===o)r.name=t.keyInfo.name,r.mergeOption(e,this),r.optionUpdated(e,!1);else{var a=O({componentIndex:i},t.keyInfo);O(r=new o(e,this,this,a),a),t.brandNew&&(r.__requireNewView=!0),r.init(e,this,this),r.optionUpdated(null,!0)}}else r&&(r.mergeOption({},this),r.optionUpdated({},!1));r?(f.push(r.option),l.push(r),c++):(f.push(void 0),l.push(void 0))}),this),i[n]=f,r.set(n,l),e.set(n,c),"series"===n&&Xh(this)}),this),this._seriesIndices||Xh(this)},n.prototype.getOption=function(){var t=N(this.option);return R(t,(function(n,i){if(_h.hasClass(i)){for(var r=Xr(n),e=r.length,o=!1,a=e-1;a>=0;a--)r[a]&&!te(r[a])?o=!0:(r[a]=null,!o&&e--);r.length=e,t[i]=r}})),delete t["\0_ec_inner"],t},n.prototype.getTheme=function(){return this._theme},n.prototype.getLocaleModel=function(){return this._locale},n.prototype.setUpdatePayload=function(t){this._payload=t},n.prototype.getUpdatePayload=function(){return this._payload},n.prototype.getComponent=function(t,n){var i=this._componentsMap.get(t);if(i){var r=i[n||0];if(r)return r;if(null==n)for(var e=0;e<i.length;e++)if(i[e])return i[e]}},n.prototype.queryComponents=function(t){var n=t.mainType;if(!n)return[];var i,r=t.index,e=t.id,o=t.name,a=this._componentsMap.get(n);return a&&a.length?(null!=r?(i=[],R(Xr(r),(function(t){a[t]&&i.push(a[t])}))):i=null!=e?nf("id",e,a):null!=o?nf("name",o,a):P(a,(function(t){return!!t})),rf(i,t)):[]},n.prototype.findComponents=function(t){var n,i,r,e,o,a=t.mainType,s=(i=a+"Index",r=a+"Id",e=a+"Name",!(n=t.query)||null==n[i]&&null==n[r]&&null==n[e]?null:{mainType:a,index:n[i],id:n[r],name:n[e]});return o=rf(s?this.queryComponents(s):P(this._componentsMap.get(a),(function(t){return!!t})),t),t.filter?P(o,t.filter):o},n.prototype.eachComponent=function(t,n,i){var r=this._componentsMap;if(Y(t)){var e=n,o=t;r.each((function(t,n){for(var i=0;t&&i<t.length;i++){var r=t[i];r&&o.call(e,n,r,r.componentIndex)}}))}else for(var a=X(t)?r.get(t):G(t)?this.findComponents(t):null,s=0;a&&s<a.length;s++){var u=a[s];u&&n.call(i,u,u.componentIndex)}},n.prototype.getSeriesByName=function(t){var n=Jr(t,null);return P(this._componentsMap.get("series"),(function(t){return!!t&&null!=n&&t.name===n}))},n.prototype.getSeriesByIndex=function(t){return this._componentsMap.get("series")[t]},n.prototype.getSeriesByType=function(t){return P(this._componentsMap.get("series"),(function(n){return!!n&&n.subType===t}))},n.prototype.getSeries=function(){return P(this._componentsMap.get("series"),(function(t){return!!t}))},n.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},n.prototype.eachSeries=function(t,n){Vh(this),R(this._seriesIndices,(function(i){var r=this._componentsMap.get("series")[i];t.call(n,r,i)}),this)},n.prototype.eachRawSeries=function(t,n){R(this._componentsMap.get("series"),(function(i){i&&t.call(n,i,i.componentIndex)}))},n.prototype.eachSeriesByType=function(t,n,i){Vh(this),R(this._seriesIndices,(function(r){var e=this._componentsMap.get("series")[r];e.subType===t&&n.call(i,e,r)}),this)},n.prototype.eachRawSeriesByType=function(t,n,i){return R(this.getSeriesByType(t),n,i)},n.prototype.isSeriesFiltered=function(t){return Vh(this),null==this._seriesIndicesMap.get(t.componentIndex)},n.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},n.prototype.filterSeries=function(t,n){Vh(this);var i=[];R(this._seriesIndices,(function(r){var e=this._componentsMap.get("series")[r];t.call(n,e,r)&&i.push(r)}),this),this._seriesIndices=i,this._seriesIndicesMap=ht(i)},n.prototype.restoreData=function(t){Xh(this);var n=this._componentsMap,i=[];n.each((function(t,n){_h.hasClass(n)&&i.push(n)})),_h.topologicalTravel(i,_h.getAllClassMainTypes(),(function(i){R(n.get(i),(function(n){!n||"series"===i&&function(t,n){if(n){var i=n.seriesIndex,r=n.seriesId,e=n.seriesName;return null!=i&&t.componentIndex!==i||null!=r&&t.id!==r||null!=e&&t.name!==e}}(n,t)||n.restoreData()}))}))},n.internalField=(Xh=function(t){var n=t._seriesIndices=[];R(t._componentsMap.get("series"),(function(t){t&&n.push(t.componentIndex)})),t._seriesIndicesMap=ht(n)},Vh=function(){},void(qh=function(t,n){t.option={},t.option["\0_ec_inner"]=1,t._componentsMap=ht({series:[]}),t._componentsCount=ht();var i=n.aria;G(i)&&null==i.enabled&&(i.enabled=!0),function(t,n){var i=t.color&&!t.colorLayer;R(n,(function(n,r){"colorLayer"===r&&i||_h.hasClass(r)||("object"==typeof n?t[r]=t[r]?L(t[r],n,!1):N(n):null==t[r]&&(t[r]=n))}))}(n,t._theme.option),L(n,Eh,!1),t._mergeOption(n,null)})),n}(ah);function nf(t,n,i){if(j(n)){var r=ht();return R(n,(function(t){null!=t&&null!=Jr(t,null)&&r.set(t,!0)})),P(i,(function(n){return n&&r.get(n[t])}))}var e=Jr(n,null);return P(i,(function(n){return n&&null!=e&&n[t]===e}))}function rf(t,n){return n.hasOwnProperty("subType")?P(t,(function(t){return t&&t.subType===n.subType})):t}function ef(t){var n=ht();return t&&R(Xr(t.replaceMerge),(function(t){n.set(t,!0)})),{replaceMergeMainTypeMap:n}}B(tf,$h);var of=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],af=function(t){R(of,(function(n){this[n]=H(t[n],t)}),this)},sf={},uf=function(){function t(){this._coordinateSystems=[]}return t.prototype.create=function(t,n){var i=[];R(sf,(function(r){var e=r.create(t,n);i=i.concat(e||[])})),this._coordinateSystems=i},t.prototype.update=function(t,n){R(this._coordinateSystems,(function(i){i.update&&i.update(t,n)}))},t.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},t.register=function(t,n){sf[t]=n},t.get=function(t){return sf[t]},t}(),hf=/^(min|max)?(.+)$/,ff=function(){function t(t){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=t}return t.prototype.setOption=function(t,n){t&&(R(Xr(t.series),(function(t){t&&t.data&&K(t.data)&&at(t.data)})),R(Xr(t.dataset),(function(t){t&&t.source&&K(t.source)&&at(t.source)}))),t=N(t);var i=this._optionBackup,r=function(t,n,i){var r,e,o=[],a=t.baseOption,s=t.timeline,u=t.options,h=t.media,f=!!t.media,l=!!(u||s||a&&a.timeline);function c(t){R(n,(function(n){n(t,i)}))}return a?(e=a).timeline||(e.timeline=s):((l||f)&&(t.options=t.media=null),e=t),f&&j(h)&&R(h,(function(t){t&&t.option&&(t.query?o.push(t):r||(r=t))})),c(e),R(u,(function(t){return c(t)})),R(o,(function(t){return c(t.option)})),{baseOption:e,timelineOptions:u||[],mediaDefault:r,mediaList:o}}(t,n,!i);this._newBaseOption=r.baseOption,i?(r.timelineOptions.length&&(i.timelineOptions=r.timelineOptions),r.mediaList.length&&(i.mediaList=r.mediaList),r.mediaDefault&&(i.mediaDefault=r.mediaDefault)):this._optionBackup=r},t.prototype.mountOption=function(t){var n=this._optionBackup;return this._timelineOptions=n.timelineOptions,this._mediaList=n.mediaList,this._mediaDefault=n.mediaDefault,this._currentMediaIndices=[],N(t?n.baseOption:this._newBaseOption)},t.prototype.getTimelineOption=function(t){var n,i=this._timelineOptions;if(i.length){var r=t.getComponent("timeline");r&&(n=N(i[r.getCurrentIndex()]))}return n},t.prototype.getMediaOption=function(){var t,n=this._api.getWidth(),i=this._api.getHeight(),r=this._mediaList,e=this._mediaDefault,o=[],a=[];if(!r.length&&!e)return a;for(var s=0,u=r.length;s<u;s++)lf(r[s].query,n,i)&&o.push(s);return!o.length&&e&&(o=[-1]),o.length&&(t=this._currentMediaIndices,o.join(",")!==t.join(","))&&(a=F(o,(function(t){return N(-1===t?e.option:r[t].option)}))),this._currentMediaIndices=o,a},t}();function lf(t,n,i){var r={width:n,height:i,aspectratio:n/i},e=!0;return R(t,(function(t,n){var i=n.match(hf);if(i&&i[1]&&i[2]){var o=i[1],a=i[2].toLowerCase();(function(t,n,i){return"min"===i?t>=n:"max"===i?t<=n:t===n})(r[a],t,o)||(e=!1)}})),e}var cf=R,vf=G,df=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function pf(t){var n=t&&t.itemStyle;if(n)for(var i=0,r=df.length;i<r;i++){var e=df[i],o=n.normal,a=n.emphasis;o&&o[e]&&(t[e]=t[e]||{},t[e].normal?L(t[e].normal,o[e]):t[e].normal=o[e],o[e]=null),a&&a[e]&&(t[e]=t[e]||{},t[e].emphasis?L(t[e].emphasis,a[e]):t[e].emphasis=a[e],a[e]=null)}}function mf(t,n,i){if(t&&t[n]&&(t[n].normal||t[n].emphasis)){var r=t[n].normal,e=t[n].emphasis;r&&(i?(t[n].normal=t[n].emphasis=null,D(t[n],r)):t[n]=r),e&&(t.emphasis=t.emphasis||{},t.emphasis[n]=e,e.focus&&(t.emphasis.focus=e.focus),e.blurScope&&(t.emphasis.blurScope=e.blurScope))}}function gf(t){mf(t,"itemStyle"),mf(t,"lineStyle"),mf(t,"areaStyle"),mf(t,"label"),mf(t,"labelLine"),mf(t,"upperLabel"),mf(t,"edgeLabel")}function yf(t,n){var i=vf(t)&&t[n],r=vf(i)&&i.textStyle;if(r)for(var e=0,o=qr.length;e<o;e++){var a=qr[e];r.hasOwnProperty(a)&&(i[a]=r[a])}}function bf(t){t&&(gf(t),yf(t,"label"),t.emphasis&&yf(t.emphasis,"label"))}function wf(t){return j(t)?t:t?[t]:[]}function xf(t){return(j(t)?t[0]:t)||{}}function Mf(t){t&&R(kf,(function(n){n[0]in t&&!(n[1]in t)&&(t[n[1]]=t[n[0]])}))}var kf=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],Sf=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],Af=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function Cf(t){var n=t&&t.itemStyle;if(n)for(var i=0;i<Af.length;i++){var r=Af[i][1];null!=n[r]&&(n[Af[i][0]]=n[r])}}function Tf(t){t&&"edge"===t.alignTo&&null!=t.margin&&null==t.edgeDistance&&(t.edgeDistance=t.margin)}function If(t){t&&t.downplay&&!t.blur&&(t.blur=t.downplay)}function Nf(t,n){if(t)for(var i=0;i<t.length;i++)n(t[i]),t[i]&&Nf(t[i].children,n)}function Lf(t,n){(function(t,n){cf(wf(t.series),(function(t){vf(t)&&function(t){if(vf(t)){pf(t),gf(t),yf(t,"label"),yf(t,"upperLabel"),yf(t,"edgeLabel"),t.emphasis&&(yf(t.emphasis,"label"),yf(t.emphasis,"upperLabel"),yf(t.emphasis,"edgeLabel"));var n=t.markPoint;n&&(pf(n),bf(n));var i=t.markLine;i&&(pf(i),bf(i));var r=t.markArea;r&&bf(r);var e=t.data;if("graph"===t.type){e=e||t.nodes;var o=t.links||t.edges;if(o&&!K(o))for(var a=0;a<o.length;a++)bf(o[a]);R(t.categories,(function(t){gf(t)}))}if(e&&!K(e))for(a=0;a<e.length;a++)bf(e[a]);if((n=t.markPoint)&&n.data){var s=n.data;for(a=0;a<s.length;a++)bf(s[a])}if((i=t.markLine)&&i.data){var u=i.data;for(a=0;a<u.length;a++)j(u[a])?(bf(u[a][0]),bf(u[a][1])):bf(u[a])}"gauge"===t.type?(yf(t,"axisLabel"),yf(t,"title"),yf(t,"detail")):"treemap"===t.type?(mf(t.breadcrumb,"itemStyle"),R(t.levels,(function(t){gf(t)}))):"tree"===t.type&&gf(t.leaves)}}(t)}));var i=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];n&&i.push("valueAxis","categoryAxis","logAxis","timeAxis"),cf(i,(function(n){cf(wf(t[n]),(function(t){t&&(yf(t,"axisLabel"),yf(t.axisPointer,"label"))}))})),cf(wf(t.parallel),(function(t){var n=t&&t.parallelAxisDefault;yf(n,"axisLabel"),yf(n&&n.axisPointer,"label")})),cf(wf(t.calendar),(function(t){mf(t,"itemStyle"),yf(t,"dayLabel"),yf(t,"monthLabel"),yf(t,"yearLabel")})),cf(wf(t.radar),(function(t){yf(t,"name"),t.name&&null==t.axisName&&(t.axisName=t.name,delete t.name),null!=t.nameGap&&null==t.axisNameGap&&(t.axisNameGap=t.nameGap,delete t.nameGap)})),cf(wf(t.geo),(function(t){vf(t)&&(bf(t),cf(wf(t.regions),(function(t){bf(t)})))})),cf(wf(t.timeline),(function(t){bf(t),mf(t,"label"),mf(t,"itemStyle"),mf(t,"controlStyle",!0);var n=t.data;j(n)&&R(n,(function(t){G(t)&&(mf(t,"label"),mf(t,"itemStyle"))}))})),cf(wf(t.toolbox),(function(t){mf(t,"iconStyle"),cf(t.feature,(function(t){mf(t,"iconStyle")}))})),yf(xf(t.axisPointer),"label"),yf(xf(t.tooltip).axisPointer,"label")})(t,n),t.series=Xr(t.series),R(t.series,(function(t){if(G(t)){var n=t.type;if("line"===n)null!=t.clipOverflow&&(t.clip=t.clipOverflow);else if("pie"===n||"gauge"===n){if(null!=t.clockWise&&(t.clockwise=t.clockWise),Tf(t.label),(e=t.data)&&!K(e))for(var i=0;i<e.length;i++)Tf(e[i]);null!=t.hoverOffset&&(t.emphasis=t.emphasis||{},(t.emphasis.scaleSize=null)&&(t.emphasis.scaleSize=t.hoverOffset))}else if("gauge"===n){var r=function(t){for(var n="pointer.color".split(","),i=t,r=0;r<n.length&&null!=(i=i&&i[n[r]]);r++);return i}(t);null!=r&&function(t,n,i){for(var r,e="itemStyle.color".split(","),o=t,a=0;a<e.length-1;a++)null==o[r=e[a]]&&(o[r]={}),o=o[r];null==o[e[a]]&&(o[e[a]]=i)}(t,0,r)}else if("bar"===n){var e;if(Cf(t),Cf(t.backgroundStyle),Cf(t.emphasis),(e=t.data)&&!K(e))for(i=0;i<e.length;i++)"object"==typeof e[i]&&(Cf(e[i]),Cf(e[i]&&e[i].emphasis))}else if("sunburst"===n){var o=t.highlightPolicy;o&&(t.emphasis=t.emphasis||{},t.emphasis.focus||(t.emphasis.focus=o)),If(t),Nf(t.data,If)}else"graph"===n||"sankey"===n?function(t){t&&null!=t.focusNodeAdjacency&&(t.emphasis=t.emphasis||{},null==t.emphasis.focus&&(t.emphasis.focus="adjacency"))}(t):"map"===n&&(t.mapType&&!t.map&&(t.map=t.mapType),t.mapLocation&&D(t,t.mapLocation));null!=t.hoverAnimation&&(t.emphasis=t.emphasis||{},t.emphasis&&null==t.emphasis.scale&&(t.emphasis.scale=t.hoverAnimation)),Mf(t)}})),t.dataRange&&(t.visualMap=t.dataRange),R(Sf,(function(n){var i=t[n];i&&(j(i)||(i=[i]),R(i,(function(t){Mf(t)})))}))}function Of(t){R(t,(function(n,i){var r=[],e=[NaN,NaN],o=[n.stackResultDimension,n.stackedOverDimension],a=n.data,s=n.isStackedByIndex,u=n.seriesModel.get("stackStrategy")||"samesign";a.modify(o,(function(o,h,f){var l,c,v=a.get(n.stackedDimension,f);if(isNaN(v))return e;s?c=a.getRawIndex(f):l=a.get(n.stackedByDimension,f);for(var d=NaN,p=i-1;p>=0;p--){var m=t[p];if(s||(c=m.data.rawIndexOf(m.stackedByDimension,l)),c>=0){var g=m.data.getByRawIndex(m.stackResultDimension,c);if("all"===u||"positive"===u&&g>0||"negative"===u&&g<0||"samesign"===u&&v>=0&&g>0||"samesign"===u&&v<=0&&g<0){v=Br(v,g),d=g;break}}}return r[0]=v,r[1]=d,r}))}))}var Df,zf,Bf,_f,Rf,Ff=function(t){this.data=t.data||("keyedColumns"===t.sourceFormat?{}:[]),this.sourceFormat=t.sourceFormat||"unknown",this.seriesLayoutBy=t.seriesLayoutBy||"column",this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var n=this.dimensionsDefine=t.dimensionsDefine;if(n)for(var i=0;i<n.length;i++){var r=n[i];null==r.type&&1===jh(this,i)&&(r.type="ordinal")}};function Ef(t){return t instanceof Ff}function Pf(t,n,i){i=i||Hf(t);var r=n.seriesLayoutBy,e=function(t,n,i,r,e){var o,a;if(!t)return{dimensionsDefine:Uf(e),startIndex:a,dimensionsDetectedCount:o};if("arrayRows"===n){var s=t;"auto"===r||null==r?jf((function(t){null!=t&&"-"!==t&&(X(t)?null==a&&(a=1):a=0)}),i,s,10):a=q(r)?r:r?1:0,e||1!==a||(e=[],jf((function(t,n){e[n]=null!=t?t+"":""}),i,s,1/0)),o=e?e.length:"row"===i?s.length:s[0]?s[0].length:null}else if("objectRows"===n)e||(e=function(t){for(var n,i=0;i<t.length&&!(n=t[i++]););if(n){var r=[];return R(n,(function(t,n){r.push(n)})),r}}(t));else if("keyedColumns"===n)e||(e=[],R(t,(function(t,n){e.push(n)})));else if("original"===n){var u=Gr(t[0]);o=j(u)&&u.length||1}return{startIndex:a,dimensionsDefine:Uf(e),dimensionsDetectedCount:o}}(t,i,r,n.sourceHeader,n.dimensions);return new Ff({data:t,sourceFormat:i,seriesLayoutBy:r,dimensionsDefine:e.dimensionsDefine,startIndex:e.startIndex,dimensionsDetectedCount:e.dimensionsDetectedCount,metaRawOption:N(n)})}function Wf(t){return new Ff({data:t,sourceFormat:K(t)?"typedArray":"original"})}function Hf(t){var n="unknown";if(K(t))n="typedArray";else if(j(t)){0===t.length&&(n="arrayRows");for(var i=0,r=t.length;i<r;i++){var e=t[i];if(null!=e){if(j(e)){n="arrayRows";break}if(G(e)){n="objectRows";break}}}}else if(G(t))for(var o in t)if(ct(t,o)&&_(t[o])){n="keyedColumns";break}return n}function Uf(t){if(t){var n=ht();return F(t,(function(t){var i={name:(t=G(t)?t:{name:t}).name,displayName:t.displayName,type:t.type};if(null==i.name)return i;i.name+="",null==i.displayName&&(i.displayName=i.name);var r=n.get(i.name);return r?i.name+="-"+r.count++:n.set(i.name,{count:1}),i}))}}function jf(t,n,i,r){if("row"===n)for(var e=0;e<i.length&&e<r;e++)t(i[e]?i[e][0]:null,e);else{var o=i[0]||[];for(e=0;e<o.length&&e<r;e++)t(o[e],e)}}var Yf=function(){function t(t,n){var i=Ef(t)?t:Wf(t);this._source=i;var r=this._data=i.data;"typedArray"===i.sourceFormat&&(this._offset=0,this._dimSize=n,this._data=r),Rf(this,r,i)}var n;return t.prototype.getSource=function(){return this._source},t.prototype.count=function(){return 0},t.prototype.getItem=function(){},t.prototype.appendData=function(){},t.prototype.clean=function(){},t.protoInitialize=((n=t.prototype).pure=!1,void(n.persistent=!0)),t.internalField=function(){var t;Rf=function(t,e,o){var a=o.sourceFormat,s=o.seriesLayoutBy,u=o.startIndex,h=o.dimensionsDefine;if(O(t,_f[tl(a,s)]),"typedArray"===a)t.getItem=n,t.count=r,t.fillStorage=i;else{var f=qf(a,s);t.getItem=H(f,null,e,u,h);var l=Kf(a,s);t.count=H(l,null,e,u,h)}};var n=function(t,n){n=n||[];for(var i=this._data,r=this._dimSize,e=r*(t-=this._offset),o=0;o<r;o++)n[o]=i[e+o];return n},i=function(t,n,i,r){for(var e=this._data,o=this._dimSize,a=0;a<o;a++){for(var s=r[a],u=null==s[0]?1/0:s[0],h=null==s[1]?-1/0:s[1],f=n-t,l=i[a],c=0;c<f;c++){var v=e[c*o+a];l[t+c]=v,v<u&&(u=v),v>h&&(h=v)}s[0]=u,s[1]=h}},r=function(){return this._data?this._data.length/this._dimSize:0};function e(t){for(var n=0;n<t.length;n++)this._data.push(t[n])}(t={}).arrayRows_column={pure:!0,appendData:e},t.arrayRows_row={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},t.objectRows={pure:!0,appendData:e},t.keyedColumns={pure:!0,appendData:function(t){var n=this._data;R(t,(function(t,i){for(var r=n[i]||(n[i]=[]),e=0;e<(t||[]).length;e++)r.push(t[e])}))}},t.original={appendData:e},t.typedArray={persistent:!1,pure:!0,appendData:function(t){this._data=t},clean:function(){this._offset+=this.count(),this._data=null}},_f=t}(),t}(),Xf=function(t,n,i,r){return t[r]},Vf=((Df={}).arrayRows_column=function(t,n,i,r){return t[r+n]},Df.arrayRows_row=function(t,n,i,r,e){r+=n;for(var o=e||[],a=t,s=0;s<a.length;s++){var u=a[s];o[s]=u?u[r]:null}return o},Df.objectRows=Xf,Df.keyedColumns=function(t,n,i,r,e){for(var o=e||[],a=0;a<i.length;a++){var s=t[i[a].name];o[a]=s?s[r]:null}return o},Df.original=Xf,Df);function qf(t,n){return Vf[tl(t,n)]}var Gf=function(t){return t.length},Zf=((zf={}).arrayRows_column=function(t,n){return Math.max(0,t.length-n)},zf.arrayRows_row=function(t,n){var i=t[0];return i?Math.max(0,i.length-n):0},zf.objectRows=Gf,zf.keyedColumns=function(t,n,i){var r=t[i[0].name];return r?r.length:0},zf.original=Gf,zf);function Kf(t,n){return Zf[tl(t,n)]}var $f=function(t,n){return t[n]},Jf=((Bf={}).arrayRows=$f,Bf.objectRows=function(t,n,i){return t[i]},Bf.keyedColumns=$f,Bf.original=function(t,n){var i=Gr(t);return i instanceof Array?i[n]:i},Bf.typedArray=$f,Bf);function Qf(t){return Jf[t]}function tl(t,n){return"arrayRows"===t?t+"_"+n:t}function nl(t,n,i){if(t){var r=t.getRawDataItem(n);if(null!=r){var e=t.getStore(),o=e.getSource().sourceFormat;if(null!=i){var a=t.getDimensionIndex(i),s=e.getDimensionProperty(a);return Qf(o)(r,a,s)}var u=r;return"original"===o&&(u=Gr(r)),u}}}var il=/\{@(.+?)\}/g,rl=function(){function t(){}return t.prototype.getDataParams=function(t,n){var i=this.getData(n),r=this.getRawValue(t,n),e=i.getRawIndex(t),o=i.getName(t),a=i.getRawDataItem(t),s=i.getItemVisual(t,"style"),u=s&&s[i.getItemVisual(t,"drawType")||"fill"],h=s&&s.stroke,f=this.mainType,l="series"===f,c=i.userOutput&&i.userOutput.get();return{componentType:f,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:l?this.subType:null,seriesIndex:this.seriesIndex,seriesId:l?this.id:null,seriesName:l?this.name:null,name:o,dataIndex:e,data:a,dataType:n,value:r,color:u,borderColor:h,dimensionNames:c?c.fullDimensions:null,encode:c?c.encode:null,$vars:["seriesName","name","value"]}},t.prototype.getFormattedLabel=function(t,n,i,r,e,o){n=n||"normal";var a=this.getData(i),s=this.getDataParams(t,i);return o&&(s.value=o.interpolatedValue),null!=r&&j(s.value)&&(s.value=s.value[r]),e||(e=a.getItemModel(t).get("normal"===n?["label","formatter"]:[n,"label","formatter"])),Y(e)?(s.status=n,s.dimensionIndex=r,e(s)):X(e)?kh(e,s).replace(il,(function(n,i){var r=i.length,e=i;"["===e.charAt(0)&&"]"===e.charAt(r-1)&&(e=+e.slice(1,r-1));var s=nl(a,t,e);if(o&&j(o.interpolatedValue)){var u=a.getDimensionIndex(e);u>=0&&(s=o.interpolatedValue[u])}return null!=s?s+"":""})):void 0},t.prototype.getRawValue=function(t,n){return nl(this.getData(n),t)},t.prototype.formatTooltip=function(){},t}();function el(t){var n,i;return G(t)?t.type&&(i=t):n=t,{text:n,frag:i}}function ol(t){return new al(t)}var al=function(){function t(t){this._reset=(t=t||{}).reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return t.prototype.perform=function(t){var n,i=this._upstream,r=t&&t.skip;if(this._dirty&&i){var e=this.context;e.data=e.outputData=i.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!r&&(n=this._plan(this.context));var o,a=f(this._modBy),s=this._modDataCount||0,u=f(t&&t.modBy),h=t&&t.modDataCount||0;function f(t){return!(t>=1)&&(t=1),t}a===u&&s===h||(n="reset"),(this._dirty||"reset"===n)&&(this._dirty=!1,o=this._doReset(r)),this._modBy=u,this._modDataCount=h;var l=t&&t.step;if(this._dueEnd=i?i._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var c=this._dueIndex,v=Math.min(null!=l?this._dueIndex+l:1/0,this._dueEnd);if(!r&&(o||c<v)){var d=this._progress;if(j(d))for(var p=0;p<d.length;p++)this._doProgress(d[p],c,v,u,h);else this._doProgress(d,c,v,u,h)}this._dueIndex=v,this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:v}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()},t.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},t.prototype._doProgress=function(t,n,i,r,e){sl.reset(n,i,r,e),this._callingProgress=t,this._callingProgress({start:n,end:i,count:i-n,next:sl.next},this.context)},t.prototype._doReset=function(t){var n,i;this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null,!t&&this._reset&&((n=this._reset(this.context))&&n.progress&&(i=n.forceFirstProgress,n=n.progress),j(n)&&!n.length&&(n=null)),this._progress=n,this._modBy=this._modDataCount=null;var r=this._downstream;return r&&r.dirty(),i},t.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},t.prototype.pipe=function(t){(this._downstream!==t||this._dirty)&&(this._downstream=t,t._upstream=this,t.dirty())},t.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},t.prototype.getUpstream=function(){return this._upstream},t.prototype.getDownstream=function(){return this._downstream},t.prototype.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t},t}(),sl=function(){var t,n,i,r,e,o={reset:function(u,h,f,l){n=u,t=h,i=f,r=l,e=Math.ceil(r/i),o.next=i>1&&r>0?s:a}};return o;function a(){return n<t?n++:null}function s(){var o=n%e*i+Math.ceil(n/e),a=n>=t?null:o<r?o:n;return n++,a}}();function ul(t,n){var i=n&&n.type;return"ordinal"===i?t:("time"!==i||q(t)||null==t||"-"===t||(t=+Er(t)),null==t||""===t?NaN:+t)}ht({number:function(t){return parseFloat(t)},time:function(t){return+Er(t)},trim:function(t){return X(t)?ot(t):t}});var hl=function(){function t(t,n){var i="desc"===t;this._resultLT=i?1:-1,null==n&&(n=i?"min":"max"),this._incomparable="min"===n?-1/0:1/0}return t.prototype.evaluate=function(t,n){var i=q(t)?t:Pr(t),r=q(n)?n:Pr(n),e=isNaN(i),o=isNaN(r);if(e&&(i=this._incomparable),o&&(r=this._incomparable),e&&o){var a=X(t),s=X(n);a&&(i=s?t:0),s&&(r=a?n:0)}return i<r?this._resultLT:i>r?-this._resultLT:0},t}(),fl=function(){function t(){}return t.prototype.getRawData=function(){throw new Error("not supported")},t.prototype.getRawDataItem=function(){throw new Error("not supported")},t.prototype.cloneRawData=function(){},t.prototype.getDimensionInfo=function(){},t.prototype.cloneAllDimensionInfo=function(){},t.prototype.count=function(){},t.prototype.retrieveValue=function(){},t.prototype.retrieveValueFromItem=function(){},t.prototype.convertValue=function(t,n){return ul(t,n)},t}();function ll(t){return gl(t.sourceFormat)||jr(""),t.data}function cl(t){var n=t.sourceFormat,i=t.data;if(gl(n)||jr(""),"arrayRows"===n){for(var r=[],e=0,o=i.length;e<o;e++)r.push(i[e].slice());return r}if("objectRows"===n){for(r=[],e=0,o=i.length;e<o;e++)r.push(O({},i[e]));return r}}function vl(t,n,i){if(null!=i)return q(i)||!isNaN(i)&&!ct(n,i)?t[i]:ct(n,i)?n[i]:void 0}function dl(t){return N(t)}var pl=ht();function ml(t,n){n.length||jr(""),G(t)||jr("");var i=pl.get(t.type);i||jr("");var r=F(n,(function(t){return function(t,n){var i=new fl,r=t.data,e=i.sourceFormat=t.sourceFormat,o=t.startIndex;"column"!==t.seriesLayoutBy&&jr("");var a=[],s={},u=t.dimensionsDefine;if(u)R(u,(function(t,n){var i=t.name,r={index:n,name:i,displayName:t.displayName};a.push(r),null!=i&&(ct(s,i)&&jr(""),s[i]=r)}));else for(var h=0;h<t.dimensionsDetectedCount;h++)a.push({index:h});var f=qf(e,"column");n.__isBuiltIn&&(i.getRawDataItem=function(t){return f(r,o,a,t)},i.getRawData=H(ll,null,t)),i.cloneRawData=H(cl,null,t);var l=Kf(e,"column");i.count=H(l,null,r,o,a);var c=Qf(e);i.retrieveValue=function(t,n){var i=f(r,o,a,t);return v(i,n)};var v=i.retrieveValueFromItem=function(t,n){if(null!=t){var i=a[n];return i?c(t,n,i.name):void 0}};return i.getDimensionInfo=H(vl,null,a,s),i.cloneAllDimensionInfo=H(dl,null,a),i}(t,i)}));return F(Xr(i.transform({upstream:r[0],upstreamList:r,config:N(t.config)})),(function(t,i){var r;G(t)||jr(""),t.data||jr(""),gl(Hf(t.data))||jr("");var e=n[0];if(e&&0===i&&!t.dimensions){var o=e.startIndex;o&&(t.data=e.data.slice(0,o).concat(t.data)),r={seriesLayoutBy:"column",sourceHeader:o,dimensions:e.metaRawOption.dimensions}}else r={seriesLayoutBy:"column",sourceHeader:0,dimensions:t.dimensions};return Pf(t.data,r,null)}))}function gl(t){return"arrayRows"===t||"objectRows"===t}var yl,bl="undefined"==typeof Uint32Array?Array:Uint32Array,wl="undefined"==typeof Uint16Array?Array:Uint16Array,xl="undefined"==typeof Int32Array?Array:Int32Array,Ml="undefined"==typeof Float64Array?Array:Float64Array,kl={float:Ml,int:xl,ordinal:Array,number:Array,time:Ml};function Sl(t){return t>65535?bl:wl}function Al(t,n,i,r,e){var o=kl[i||"float"];if(e){var a=t[n],s=a&&a.length;if(s!==r){for(var u=new o(r),h=0;h<s;h++)u[h]=a[h];t[n]=u}}else t[n]=new o(r)}var Cl=function(){function t(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=ht()}return t.prototype.initData=function(t,n,i){this._provider=t,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var r=t.getSource(),e=this.defaultDimValueGetter=yl[r.sourceFormat];this._dimValueGetter=i||e,this._rawExtent=[],this._dimensions=F(n,(function(t){return{type:t.type,property:t.property}})),this._initDataFromProvider(0,t.count())},t.prototype.getProvider=function(){return this._provider},t.prototype.getSource=function(){return this._provider.getSource()},t.prototype.ensureCalculationDimension=function(t,n){var i=this._calcDimNameToIdx,r=this._dimensions,e=i.get(t);if(null!=e){if(r[e].type===n)return e}else e=r.length;return r[e]={type:n},i.set(t,e),this._chunks[e]=new kl[n||"float"](this._rawCount),this._rawExtent[e]=[1/0,-1/0],e},t.prototype.collectOrdinalMeta=function(t,n){var i=this._chunks[t],r=this._dimensions[t],e=this._rawExtent,o=r.ordinalOffset||0,a=i.length;0===o&&(e[t]=[1/0,-1/0]);for(var s=e[t],u=o;u<a;u++){var h=i[u]=n.parseAndCollect(i[u]);isNaN(h)||(s[0]=Math.min(h,s[0]),s[1]=Math.max(h,s[1]))}r.ordinalMeta=n,r.ordinalOffset=a,r.type="ordinal"},t.prototype.getOrdinalMeta=function(t){return this._dimensions[t].ordinalMeta},t.prototype.getDimensionProperty=function(t){var n=this._dimensions[t];return n&&n.property},t.prototype.appendData=function(t){var n=this._provider,i=this.count();n.appendData(t);var r=n.count();return n.persistent||(r+=i),i<r&&this._initDataFromProvider(i,r,!0),[i,r]},t.prototype.appendValues=function(t,n){for(var i=this._chunks,r=this._dimensions,e=r.length,o=this._rawExtent,a=this.count(),s=a+Math.max(t.length,n||0),u=0;u<e;u++)Al(i,u,r[u].type,s,!0);for(var h=[],f=a;f<s;f++)for(var l=f-a,c=0;c<e;c++){var v=yl.arrayRows.call(this,t[l]||h,r[c].property,l,c);i[c][f]=v;var d=o[c];v<d[0]&&(d[0]=v),v>d[1]&&(d[1]=v)}return this._rawCount=this._count=s,{start:a,end:s}},t.prototype._initDataFromProvider=function(t,n,i){for(var r=this._provider,e=this._chunks,o=this._dimensions,a=o.length,s=this._rawExtent,u=F(o,(function(t){return t.property})),h=0;h<a;h++){var f=o[h];s[h]||(s[h]=[1/0,-1/0]),Al(e,h,f.type,n,i)}if(r.fillStorage)r.fillStorage(t,n,e,s);else for(var l=[],c=t;c<n;c++){l=r.getItem(c,l);for(var v=0;v<a;v++){var d=e[v],p=this._dimValueGetter(l,u[v],c,v);d[c]=p;var m=s[v];p<m[0]&&(m[0]=p),p>m[1]&&(m[1]=p)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=n,this._extent=[]},t.prototype.count=function(){return this._count},t.prototype.get=function(t,n){if(!(n>=0&&n<this._count))return NaN;var i=this._chunks[t];return i?i[this.getRawIndex(n)]:NaN},t.prototype.getValues=function(t,n){var i=[],r=[];if(null==n){n=t,t=[];for(var e=0;e<this._dimensions.length;e++)r.push(e)}else r=t;e=0;for(var o=r.length;e<o;e++)i.push(this.get(r[e],n));return i},t.prototype.getByRawIndex=function(t,n){if(!(n>=0&&n<this._rawCount))return NaN;var i=this._chunks[t];return i?i[n]:NaN},t.prototype.getSum=function(t){var n=0;if(this._chunks[t])for(var i=0,r=this.count();i<r;i++){var e=this.get(t,i);isNaN(e)||(n+=e)}return n},t.prototype.getMedian=function(t){var n=[];this.each([t],(function(t){isNaN(t)||n.push(t)}));var i=n.sort((function(t,n){return t-n})),r=this.count();return 0===r?0:r%2==1?i[(r-1)/2]:(i[r/2]+i[r/2-1])/2},t.prototype.indexOfRawIndex=function(t){if(t>=this._rawCount||t<0)return-1;if(!this._indices)return t;var n=this._indices,i=n[t];if(null!=i&&i<this._count&&i===t)return t;for(var r=0,e=this._count-1;r<=e;){var o=(r+e)/2|0;if(n[o]<t)r=o+1;else{if(!(n[o]>t))return o;e=o-1}}return-1},t.prototype.indicesOfNearest=function(t,n,i){var r=this._chunks[t],e=[];if(!r)return e;null==i&&(i=1/0);for(var o=1/0,a=-1,s=0,u=0,h=this.count();u<h;u++){var f=n-r[this.getRawIndex(u)],l=Math.abs(f);l<=i&&((l<o||l===o&&f>=0&&a<0)&&(o=l,a=f,s=0),f===a&&(e[s++]=u))}return e.length=s,e},t.prototype.getIndices=function(){var t,n=this._indices;if(n){var i=this._count;if((e=n.constructor)===Array){t=new e(i);for(var r=0;r<i;r++)t[r]=n[r]}else t=new e(n.buffer,0,i)}else{var e;for(t=new(e=Sl(this._rawCount))(this.count()),r=0;r<t.length;r++)t[r]=r}return t},t.prototype.filter=function(t,n){if(!this._count)return this;for(var i=this.clone(),r=i.count(),e=new(Sl(i._rawCount))(r),o=[],a=t.length,s=0,u=t[0],h=i._chunks,f=0;f<r;f++){var l=void 0,c=i.getRawIndex(f);if(0===a)l=n(f);else if(1===a)l=n(h[u][c],f);else{for(var v=0;v<a;v++)o[v]=h[t[v]][c];o[v]=f,l=n.apply(null,o)}l&&(e[s++]=c)}return s<r&&(i._indices=e),i._count=s,i._extent=[],i._updateGetRawIdx(),i},t.prototype.selectRange=function(t){var n=this.clone(),i=n._count;if(!i)return this;var r=W(t),e=r.length;if(!e)return this;var o=n.count(),a=new(Sl(n._rawCount))(o),s=0,u=r[0],h=t[u][0],f=t[u][1],l=n._chunks,c=!1;if(!n._indices){var v=0;if(1===e){for(var d=l[r[0]],p=0;p<i;p++)((k=d[p])>=h&&k<=f||isNaN(k))&&(a[s++]=v),v++;c=!0}else if(2===e){d=l[r[0]];var m=l[r[1]],g=t[r[1]][0],y=t[r[1]][1];for(p=0;p<i;p++){var b=m[p];((k=d[p])>=h&&k<=f||isNaN(k))&&(b>=g&&b<=y||isNaN(b))&&(a[s++]=v),v++}c=!0}}if(!c)if(1===e)for(p=0;p<o;p++){var w=n.getRawIndex(p);((k=l[r[0]][w])>=h&&k<=f||isNaN(k))&&(a[s++]=w)}else for(p=0;p<o;p++){for(var x=!0,M=(w=n.getRawIndex(p),0);M<e;M++){var k,S=r[M];((k=l[S][w])<t[S][0]||k>t[S][1])&&(x=!1)}x&&(a[s++]=n.getRawIndex(p))}return s<o&&(n._indices=a),n._count=s,n._extent=[],n._updateGetRawIdx(),n},t.prototype.map=function(t,n){var i=this.clone(t);return this._updateDims(i,t,n),i},t.prototype.modify=function(t,n){this._updateDims(this,t,n)},t.prototype._updateDims=function(t,n,i){for(var r=t._chunks,e=[],o=n.length,a=t.count(),s=[],u=t._rawExtent,h=0;h<n.length;h++)u[n[h]]=[1/0,-1/0];for(var f=0;f<a;f++){for(var l=t.getRawIndex(f),c=0;c<o;c++)s[c]=r[n[c]][l];s[o]=f;var v=i&&i.apply(null,s);if(null!=v)for("object"!=typeof v&&(e[0]=v,v=e),h=0;h<v.length;h++){var d=n[h],p=v[h],m=u[d],g=r[d];g&&(g[l]=p),p<m[0]&&(m[0]=p),p>m[1]&&(m[1]=p)}}},t.prototype.lttbDownSample=function(t,n){var i,r,e,o=this.clone([t],!0),a=o._chunks[t],s=this.count(),u=0,h=Math.floor(1/n),f=this.getRawIndex(0),l=new(Sl(this._rawCount))(Math.min(2*(Math.ceil(s/h)+2),s));l[u++]=f;for(var c=1;c<s-1;c+=h){for(var v=Math.min(c+h,s-1),d=Math.min(c+2*h,s),p=(d+v)/2,m=0,g=v;g<d;g++){var y=a[A=this.getRawIndex(g)];isNaN(y)||(m+=y)}m/=d-v;var b=c,w=Math.min(c+h,s),x=c-1,M=a[f];i=-1,e=b;var k=-1,S=0;for(g=b;g<w;g++){var A;y=a[A=this.getRawIndex(g)],isNaN(y)?(S++,k<0&&(k=A)):(r=Math.abs((x-p)*(y-M)-(x-g)*(m-M)))>i&&(i=r,e=A)}S>0&&S<w-b&&(l[u++]=Math.min(k,e),e=Math.max(k,e)),l[u++]=e,f=e}return l[u++]=this.getRawIndex(s-1),o._count=u,o._indices=l,o.getRawIndex=this._getRawIdx,o},t.prototype.downSample=function(t,n,i,r){for(var e=this.clone([t],!0),o=e._chunks,a=[],s=Math.floor(1/n),u=o[t],h=this.count(),f=e._rawExtent[t]=[1/0,-1/0],l=new(Sl(this._rawCount))(Math.ceil(h/s)),c=0,v=0;v<h;v+=s){s>h-v&&(a.length=s=h-v);for(var d=0;d<s;d++){var p=this.getRawIndex(v+d);a[d]=u[p]}var m=i(a),g=this.getRawIndex(Math.min(v+r(a,m)||0,h-1));u[g]=m,m<f[0]&&(f[0]=m),m>f[1]&&(f[1]=m),l[c++]=g}return e._count=c,e._indices=l,e._updateGetRawIdx(),e},t.prototype.each=function(t,n){if(this._count)for(var i=t.length,r=this._chunks,e=0,o=this.count();e<o;e++){var a=this.getRawIndex(e);switch(i){case 0:n(e);break;case 1:n(r[t[0]][a],e);break;case 2:n(r[t[0]][a],r[t[1]][a],e);break;default:for(var s=0,u=[];s<i;s++)u[s]=r[t[s]][a];u[s]=e,n.apply(null,u)}}},t.prototype.getDataExtent=function(t){var n=this._chunks[t],i=[1/0,-1/0];if(!n)return i;var r,e=this.count();if(!this._indices)return this._rawExtent[t].slice();if(r=this._extent[t])return r.slice();for(var o=(r=i)[0],a=r[1],s=0;s<e;s++){var u=n[this.getRawIndex(s)];u<o&&(o=u),u>a&&(a=u)}return this._extent[t]=r=[o,a],r},t.prototype.getRawDataItem=function(t){var n=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(n);for(var i=[],r=this._chunks,e=0;e<r.length;e++)i.push(r[e][n]);return i},t.prototype.clone=function(n,i){var r,e,o=new t,a=this._chunks,s=n&&E(n,(function(t,n){return t[n]=!0,t}),{});if(s)for(var u=0;u<a.length;u++)o._chunks[u]=s[u]?(e=void 0,(e=(r=a[u]).constructor)===Array?r.slice():new e(r)):a[u];else o._chunks=a;return this._copyCommonProps(o),i||(o._indices=this._cloneIndices()),o._updateGetRawIdx(),o},t.prototype._copyCommonProps=function(t){t._count=this._count,t._rawCount=this._rawCount,t._provider=this._provider,t._dimensions=this._dimensions,t._extent=N(this._extent),t._rawExtent=N(this._rawExtent)},t.prototype._cloneIndices=function(){if(this._indices){var t=this._indices.constructor,n=void 0;if(t===Array){var i=this._indices.length;n=new t(i);for(var r=0;r<i;r++)n[r]=this._indices[r]}else n=new t(this._indices);return n}return null},t.prototype._getRawIdxIdentity=function(t){return t},t.prototype._getRawIdx=function(t){return t<this._count&&t>=0?this._indices[t]:-1},t.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},t.internalField=function(){function t(t,n,i,r){return ul(t[r],this._dimensions[r])}yl={arrayRows:t,objectRows:function(t,n,i,r){return ul(t[n],this._dimensions[r])},keyedColumns:t,original:function(t,n,i,r){var e=t&&(null==t.value?t:t.value);return ul(e instanceof Array?e[r]:e,this._dimensions[r])},typedArray:function(t,n,i,r){return t[r]}}}(),t}(),Tl=function(){function t(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return t.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},t.prototype._setLocalSource=function(t,n){this._sourceList=t,this._upstreamSignList=n,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},t.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},t.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},t.prototype._createSource=function(){this._setLocalSource([],[]);var t,n,i=this._sourceHost,r=this._getUpstreamSourceManagers(),e=!!r.length;if(Il(i)){var o=i,a=void 0,s=void 0,u=void 0;if(e){var h=r[0];h.prepareSource(),a=(u=h.getSource()).data,s=u.sourceFormat,n=[h._getVersionSign()]}else s=K(a=o.get("data",!0))?"typedArray":"original",n=[];var f=this._getSourceMetaRawOption()||{},l=u&&u.metaRawOption||{},c=tt(f.seriesLayoutBy,l.seriesLayoutBy)||null,v=tt(f.sourceHeader,l.sourceHeader),d=tt(f.dimensions,l.dimensions);t=c!==l.seriesLayoutBy||!!v!=!!l.sourceHeader||d?[Pf(a,{seriesLayoutBy:c,sourceHeader:v,dimensions:d},s)]:[]}else{var p=i;if(e){var m=this._applyTransform(r);t=m.sourceList,n=m.upstreamSignList}else t=[Pf(p.get("source",!0),this._getSourceMetaRawOption(),null)],n=[]}this._setLocalSource(t,n)},t.prototype._applyTransform=function(t){var n,i=this._sourceHost,r=i.get("transform",!0),e=i.get("fromTransformResult",!0);null!=e&&1!==t.length&&Nl("");var o,a=[],s=[];return R(t,(function(t){t.prepareSource();var n=t.getSource(e||0);null==e||n||Nl(""),a.push(n),s.push(t._getVersionSign())})),r?n=function(t,n){var i=Xr(t),r=i.length;r||jr("");for(var e=0,o=r;e<o;e++)n=ml(i[e],n),e!==o-1&&(n.length=Math.max(n.length,1));return n}(r,a):null!=e&&(n=[(o=a[0],new Ff({data:o.data,sourceFormat:o.sourceFormat,seriesLayoutBy:o.seriesLayoutBy,dimensionsDefine:N(o.dimensionsDefine),startIndex:o.startIndex,dimensionsDetectedCount:o.dimensionsDetectedCount}))]),{sourceList:n,upstreamSignList:s}},t.prototype._isDirty=function(){if(this._dirty)return!0;for(var t=this._getUpstreamSourceManagers(),n=0;n<t.length;n++){var i=t[n];if(i._isDirty()||this._upstreamSignList[n]!==i._getVersionSign())return!0}},t.prototype.getSource=function(t){var n=this._sourceList[t=t||0];if(!n){var i=this._getUpstreamSourceManagers();return i[0]&&i[0].getSource(t)}return n},t.prototype.getSharedDataStore=function(t){var n=t.makeStoreSchema();return this._innerGetDataStore(n.dimensions,t.source,n.hash)},t.prototype._innerGetDataStore=function(t,n,i){var r=this._storeList,e=r[0];e||(e=r[0]={});var o=e[i];if(!o){var a=this._getUpstreamSourceManagers()[0];Il(this._sourceHost)&&a?o=a._innerGetDataStore(t,n,i):(o=new Cl).initData(new Yf(n,t.length),t),e[i]=o}return o},t.prototype._getUpstreamSourceManagers=function(){var t=this._sourceHost;if(Il(t)){var n=Uh(t);return n?[n.getSourceManager()]:[]}return F(function(t){return t.get("transform",!0)||t.get("fromTransformResult",!0)?se(t.ecModel,"dataset",{index:t.get("fromDatasetIndex",!0),id:t.get("fromDatasetId",!0)},ae).models:[]}(t),(function(t){return t.getSourceManager()}))},t.prototype._getSourceMetaRawOption=function(){var t,n,i,r=this._sourceHost;if(Il(r))t=r.get("seriesLayoutBy",!0),n=r.get("sourceHeader",!0),i=r.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var e=r;t=e.get("seriesLayoutBy",!0),n=e.get("sourceHeader",!0),i=e.get("dimensions",!0)}return{seriesLayoutBy:t,sourceHeader:n,dimensions:i}},t}();function Il(t){return"series"===t.mainType}function Nl(t){throw new Error(t)}function Ll(t,n){var i=t.color||"#6e7079",r=t.fontSize||12,e=t.fontWeight||"400",o=t.color||"#464646",a=t.fontSize||14,s=t.fontWeight||"900";return"html"===n?{nameStyle:"font-size:"+bh(r+"")+"px;color:"+bh(i)+";font-weight:"+bh(e+""),valueStyle:"font-size:"+bh(a+"")+"px;color:"+bh(o)+";font-weight:"+bh(s+"")}:{nameStyle:{fontSize:r,fill:i,fontWeight:e},valueStyle:{fontSize:a,fill:o,fontWeight:s}}}var Ol=[0,10,20,30],Dl=["","\n","\n\n","\n\n\n"];function zl(t,n){return n.type=t,n}function Bl(t){return"section"===t.type}function _l(t){return Bl(t)?Fl:El}function Rl(t){if(Bl(t)){var n=0,i=t.blocks.length,r=i>1||i>0&&!t.noHeader;return R(t.blocks,(function(t){var i=Rl(t);i>=n&&(n=i+ +(r&&(!i||Bl(t)&&!t.noHeader)))})),n}return 0}function Fl(t,n,i,r){var e,o=n.noHeader,a=(e=Rl(n),{html:Ol[e],richText:Dl[e]}),s=[],u=n.blocks||[];et(!u||j(u)),u=u||[];var h=t.orderMode;if(n.sortBlocks&&h){u=u.slice();var f={valueAsc:"asc",valueDesc:"desc"};if(ct(f,h)){var l=new hl(f[h],null);u.sort((function(t,n){return l.evaluate(t.sortParam,n.sortParam)}))}else"seriesDesc"===h&&u.reverse()}R(u,(function(i,e){var o=n.valueFormatter,u=_l(i)(o?O(O({},t),{valueFormatter:o}):t,i,e>0?a.html:0,r);null!=u&&s.push(u)}));var c="richText"===t.renderMode?s.join(a.richText):Wl(s.join(""),o?i:a.html);if(o)return c;var v=wh(n.header,"ordinal",t.useUTC),d=Ll(r,t.renderMode).nameStyle;return"richText"===t.renderMode?Hl(t,v,d)+a.richText+c:Wl('<div style="'+d+';line-height:1;">'+bh(v)+"</div>"+c,i)}function El(t,n,i,r){var e=t.renderMode,o=n.noName,a=n.noValue,s=!n.markerType,u=n.name,h=t.useUTC,f=n.valueFormatter||t.valueFormatter||function(t){return F(t=j(t)?t:[t],(function(t,n){return wh(t,j(v)?v[n]:v,h)}))};if(!o||!a){var l=s?"":t.markupStyleCreator.makeTooltipMarker(n.markerType,n.markerColor||"#333",e),c=o?"":wh(u,"ordinal",h),v=n.valueType,d=a?[]:f(n.value),p=!s||!o,m=!s&&o,g=Ll(r,e),y=g.nameStyle,b=g.valueStyle;return"richText"===e?(s?"":l)+(o?"":Hl(t,c,y))+(a?"":function(t,n,i,r,e){var o=[e];return i&&o.push({padding:[0,0,0,r?10:20],align:"right"}),t.markupStyleCreator.wrapRichTextStyle(j(n)?n.join(" "):n,o)}(t,d,p,m,b)):Wl((s?"":l)+(o?"":function(t,n,i){return'<span style="'+i+";"+(n?"margin-left:2px":"")+'">'+bh(t)+"</span>"}(c,!s,y))+(a?"":function(t,n,i,r){return'<span style="'+(n?"float:right;margin-left:"+(i?"10px":"20px"):"")+";"+r+'">'+F(t=j(t)?t:[t],(function(t){return bh(t)})).join(" ")+"</span>"}(d,p,m,b)),i)}}function Pl(t,n,i,r,e,o){if(t)return _l(t)({useUTC:e,renderMode:i,orderMode:r,markupStyleCreator:n,valueFormatter:t.valueFormatter},t,0,o)}function Wl(t,n){return'<div style="margin: '+n+'px 0 0;line-height:1;">'+t+'<div style="clear:both"></div></div>'}function Hl(t,n,i){return t.markupStyleCreator.wrapRichTextStyle(n,i)}function Ul(t,n){var i=t.get("padding");return null!=i?i:"richText"===n?[8,10]:10}var jl=function(){function t(){this.richTextStyles={},this._nextStyleNameId=Wr()}return t.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},t.prototype.makeTooltipMarker=function(t,n,i){var r="richText"===i?this._generateStyleName():null,e=function(t,n){var i=X(t)?{color:t,extraCssText:n}:t||{},r=i.color,e=i.type;n=i.extraCssText;var o=i.renderMode||"html";return r?"html"===o?"subItem"===e?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+bh(r)+";"+(n||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+bh(r)+";"+(n||"")+'"></span>':{renderMode:o,content:"{"+(i.markerId||"markerX")+"|} ",style:"subItem"===e?{width:4,height:4,borderRadius:2,backgroundColor:r}:{width:10,height:10,borderRadius:5,backgroundColor:r}}:""}({color:n,type:t,renderMode:i,markerId:r});return X(e)?e:(this.richTextStyles[r]=e.style,e.content)},t.prototype.wrapRichTextStyle=function(t,n){var i={};j(n)?R(n,(function(t){return O(i,t)})):O(i,n);var r=this._generateStyleName();return this.richTextStyles[r]=i,"{"+r+"|"+t+"}"},t}();var Yl=ie();function Xl(t,n){return t.getName(n)||t.getId(n)}var Vl=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n._selectedDataIndicesMap={},n}var i;return u(n,t),n.prototype.init=function(t,n,i){this.seriesIndex=this.componentIndex,this.dataTask=ol({count:Gl,reset:Zl}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,i),(Yl(this).sourceManager=new Tl(this)).prepareSource();var r=this.getInitialData(t,i);$l(r,this),this.dataTask.context.data=r,Yl(this).dataBeforeProcessed=r,ql(this),this._initSelectedMapFromData(r)},n.prototype.mergeDefaultAndTheme=function(t,n){var i=Oh(this),r=i?zh(t):{},e=this.subType;_h.hasClass(e)&&(e+="Series"),L(t,n.getTheme().get(this.subType)),L(t,this.getDefaultOption()),Vr(t,"label",["show"]),this.fillDataTextStyle(t.data),i&&Dh(t,r,i)},n.prototype.mergeOption=function(t,n){t=L(this.option,t,!0),this.fillDataTextStyle(t.data);var i=Oh(this);i&&Dh(this.option,t,i);var r=Yl(this).sourceManager;r.dirty(),r.prepareSource();var e=this.getInitialData(t,n);$l(e,this),this.dataTask.dirty(),this.dataTask.context.data=e,Yl(this).dataBeforeProcessed=e,ql(this),this._initSelectedMapFromData(e)},n.prototype.fillDataTextStyle=function(t){if(t&&!K(t))for(var n=["show"],i=0;i<t.length;i++)t[i]&&t[i].label&&Vr(t[i],"label",n)},n.prototype.getInitialData=function(){},n.prototype.appendData=function(t){this.getRawData().appendData(t.data)},n.prototype.getData=function(t){var n=Ql(this);if(n){var i=n.context.data;return null==t?i:i.getLinkedData(t)}return Yl(this).data},n.prototype.getAllData=function(){var t=this.getData();return t&&t.getLinkedDataAll?t.getLinkedDataAll():[{data:t}]},n.prototype.setData=function(t){var n=Ql(this);if(n){var i=n.context;i.outputData=t,n!==this.dataTask&&(i.data=t)}Yl(this).data=t},n.prototype.getEncode=function(){var t=this.get("encode",!0);if(t)return ht(t)},n.prototype.getSourceManager=function(){return Yl(this).sourceManager},n.prototype.getSource=function(){return this.getSourceManager().getSource()},n.prototype.getRawData=function(){return Yl(this).dataBeforeProcessed},n.prototype.getColorBy=function(){return this.get("colorBy")||"series"},n.prototype.isColorBySeries=function(){return"series"===this.getColorBy()},n.prototype.getBaseAxis=function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},n.prototype.formatTooltip=function(t,n){return function(t){var n,i,r,e,o=t.series,a=t.dataIndex,s=t.multipleSeries,u=o.getData(),h=u.mapDimensionsAll("defaultedTooltip"),f=h.length,l=o.getRawValue(a),c=j(l),v=function(t,n){return Sh(t.getData().getItemVisual(n,"style")[t.visualDrawType])}(o,a);if(f>1||c&&!f){var d=function(t,n,i,r,e){var o=n.getData(),a=E(t,(function(t,n,i){var r=o.getDimensionInfo(i);return t||r&&!1!==r.tooltip&&null!=r.displayName}),!1),s=[],u=[],h=[];function f(t,n){var i=o.getDimensionInfo(n);i&&!1!==i.otherDims.tooltip&&(a?h.push(zl("nameValue",{markerType:"subItem",markerColor:e,name:i.displayName,value:t,valueType:i.type})):(s.push(t),u.push(i.type)))}return r.length?R(r,(function(t){f(nl(o,i,t),t)})):R(t,f),{inlineValues:s,inlineValueTypes:u,blocks:h}}(l,o,a,h,v);n=d.inlineValues,i=d.inlineValueTypes,r=d.blocks,e=d.inlineValues[0]}else if(f){var p=u.getDimensionInfo(h[0]);e=n=nl(u,a,h[0]),i=p.type}else e=n=c?l[0]:l;var m=Qr(o),g=m&&o.name||"",y=u.getName(a),b=s?g:y;return zl("section",{header:g,noHeader:s||!m,sortParam:e,blocks:[zl("nameValue",{markerType:"item",markerColor:v,name:b,noName:!ot(b),value:n,valueType:i})].concat(r||[])})}({series:this,dataIndex:t,multipleSeries:n})},n.prototype.isAnimationEnabled=function(){var t=this.ecModel;if(f.node&&(!t||!t.ssr))return!1;var n=this.getShallow("animation");return n&&this.getData().count()>this.getShallow("animationThreshold")&&(n=!1),!!n},n.prototype.restoreData=function(){this.dataTask.dirty()},n.prototype.getColorFromPalette=function(t,n,i){var r=this.ecModel,e=$h.prototype.getColorFromPalette.call(this,t,n,i);return e||(e=r.getColorFromPalette(t,n,i)),e},n.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},n.prototype.getProgressive=function(){return this.get("progressive")},n.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},n.prototype.select=function(t,n){this._innerSelect(this.getData(n),t)},n.prototype.unselect=function(t,n){var i=this.option.selectedMap;if(i){var r=this.option.selectedMode,e=this.getData(n);if("series"===r||"all"===i)return this.option.selectedMap={},void(this._selectedDataIndicesMap={});for(var o=0;o<t.length;o++){var a=Xl(e,t[o]);i[a]=!1,this._selectedDataIndicesMap[a]=-1}}},n.prototype.toggleSelect=function(t,n){for(var i=[],r=0;r<t.length;r++)i[0]=t[r],this.isSelected(t[r],n)?this.unselect(i,n):this.select(i,n)},n.prototype.getSelectedDataIndices=function(){if("all"===this.option.selectedMap)return[].slice.call(this.getData().getIndices());for(var t=this._selectedDataIndicesMap,n=W(t),i=[],r=0;r<n.length;r++){var e=t[n[r]];e>=0&&i.push(e)}return i},n.prototype.isSelected=function(t,n){var i=this.option.selectedMap;if(!i)return!1;var r=this.getData(n);return("all"===i||i[Xl(r,t)])&&!r.getItemModel(t).get(["select","disabled"])},n.prototype.isUniversalTransitionEnabled=function(){if(this.__universalTransitionEnabled)return!0;var t=this.option.universalTransition;return!!t&&(!0===t||t&&t.enabled)},n.prototype._innerSelect=function(t,n){var i,r,e=this.option,o=e.selectedMode,a=n.length;if(o&&a)if("series"===o)e.selectedMap="all";else if("multiple"===o){G(e.selectedMap)||(e.selectedMap={});for(var s=e.selectedMap,u=0;u<a;u++){var h=n[u];s[l=Xl(t,h)]=!0,this._selectedDataIndicesMap[l]=t.getRawIndex(h)}}else if("single"===o||!0===o){var f=n[a-1],l=Xl(t,f);e.selectedMap=((i={})[l]=!0,i),this._selectedDataIndicesMap=((r={})[l]=t.getRawIndex(f),r)}},n.prototype._initSelectedMapFromData=function(t){if(!this.option.selectedMap){var n=[];t.hasItemOption&&t.each((function(i){var r=t.getRawDataItem(i);r&&r.selected&&n.push(i)})),n.length>0&&this._innerSelect(t,n)}},n.registerClass=function(t){return _h.registerClass(t)},n.protoInitialize=((i=n.prototype).type="series.__base__",i.seriesIndex=0,i.ignoreStyleOnData=!1,i.hasSymbolVisual=!1,i.defaultSymbol="circle",i.visualStyleAccessPath="itemStyle",void(i.visualDrawType="fill")),n}(_h);function ql(t){var n=t.name;Qr(t)||(t.name=function(t){var n=t.getRawData(),i=n.mapDimensionsAll("seriesName"),r=[];return R(i,(function(t){var i=n.getDimensionInfo(t);i.displayName&&r.push(i.displayName)})),r.join(" ")}(t)||n)}function Gl(t){return t.model.getRawData().count()}function Zl(t){var n=t.model;return n.setData(n.getRawData().cloneShallow()),Kl}function Kl(t,n){n.outputData&&t.end>n.outputData.count()&&n.model.getRawData().cloneShallow(n.outputData)}function $l(t,n){R(function(t,n){for(var i=new t.constructor(t.length+n.length),r=0;r<t.length;r++)i[r]=t[r];var e=t.length;for(r=0;r<n.length;r++)i[r+e]=n[r];return i}(t.CHANGABLE_METHODS,t.DOWNSAMPLE_METHODS),(function(i){t.wrapMethod(i,U(Jl,n))}))}function Jl(t,n){var i=Ql(t);return i&&i.setOutputEnd((n||this).count()),n}function Ql(t){var n=(t.ecModel||{}).scheduler,i=n&&n.getPipeline(t.uid);if(i){var r=i.currentTask;if(r){var e=r.agentStubMap;e&&(r=e.get(t.uid))}return r}}B(Vl,rl),B(Vl,$h),ce(Vl,_h);var tc=function(){function t(){this.group=new Cr,this.uid=uh("viewComponent")}return t.prototype.init=function(){},t.prototype.render=function(){},t.prototype.dispose=function(){},t.prototype.updateView=function(){},t.prototype.updateLayout=function(){},t.prototype.updateVisual=function(){},t.prototype.toggleBlurSeries=function(){},t.prototype.eachRendered=function(t){var n=this.group;n&&n.traverse(t)},t}();le(tc),me(tc);var nc=ie(),ic=function(){var t=ie();return function(n){var i=t(n),r=n.pipelineContext,e=!!i.large,o=!!i.progressiveRender,a=i.large=!(!r||!r.large),s=i.progressiveRender=!(!r||!r.progressiveRender);return!(e===a&&o===s)&&"reset"}}(),rc=function(){function t(){this.group=new Cr,this.uid=uh("viewChart"),this.renderTask=ol({plan:ac,reset:sc}),this.renderTask.context={view:this}}return t.prototype.init=function(){},t.prototype.render=function(){},t.prototype.highlight=function(t,n,i,r){var e=t.getData(r&&r.dataType);e&&oc(e,r,"emphasis")},t.prototype.downplay=function(t,n,i,r){var e=t.getData(r&&r.dataType);e&&oc(e,r,"normal")},t.prototype.remove=function(){this.group.removeAll()},t.prototype.dispose=function(){},t.prototype.updateView=function(t,n,i,r){this.render(t,n,i,r)},t.prototype.updateLayout=function(t,n,i,r){this.render(t,n,i,r)},t.prototype.updateVisual=function(t,n,i,r){this.render(t,n,i,r)},t.prototype.eachRendered=function(t){_u(this.group,t)},t.markUpdateMethod=function(t,n){nc(t).updateMethod=n},t.protoInitialize=void(t.prototype.type="chart"),t}();function ec(t,n,i){t&&ts(t)&&("emphasis"===n?Ea:Pa)(t,i)}function oc(t,n,i){var r=ne(t,n),e=n&&null!=n.highlightKey?function(t){var n=ga[t];return null==n&&ma<=32&&(n=ga[t]=ma++),n}(n.highlightKey):null;null!=r?R(Xr(r),(function(n){ec(t.getItemGraphicEl(n),i,e)})):t.eachItemGraphicEl((function(t){ec(t,i,e)}))}function ac(t){return ic(t.model)}function sc(t){var n=t.model,i=t.ecModel,r=t.api,e=t.payload,o=n.pipelineContext.progressiveRender,a=t.view,s=e&&nc(e).updateMethod,u=o?"incrementalPrepareRender":s&&a[s]?s:"render";return"render"!==u&&a[u](n,i,r,e),uc[u]}le(rc),me(rc);var uc={incrementalPrepareRender:{progress:function(t,n){n.view.incrementalRender(t,n.model,n.ecModel,n.api,n.payload)}},render:{forceFirstProgress:!0,progress:function(t,n){n.view.render(n.model,n.ecModel,n.api,n.payload)}}},hc="\0__throttleOriginMethod",fc="\0__throttleRate";function lc(t,n,i){var r,e,o,a,s,u=0,h=0,f=null;function l(){h=(new Date).getTime(),f=null,t.apply(o,a||[])}n=n||0;var c=function(){for(var t=[],c=0;c<arguments.length;c++)t[c]=arguments[c];r=(new Date).getTime(),o=this,a=t;var v=s||n,d=s||i;s=null,e=r-(d?u:h)-v,clearTimeout(f),d?f=setTimeout(l,v):e>=0?l():f=setTimeout(l,-e),u=r};return c.clear=function(){f&&(clearTimeout(f),f=null)},c.debounceNextCall=function(t){s=t},c}function cc(t,n,i,r){var e=t[n];if(e){var o=e[hc]||e;if(e[fc]!==i||e["\0__throttleType"]!==r){if(null==i||!r)return t[n]=o;(e=t[n]=lc(o,i,"debounce"===r))[hc]=o,e["\0__throttleType"]=r,e[fc]=i}return e}}function vc(t,n){var i=t[n];i&&i[hc]&&(i.clear&&i.clear(),t[n]=i[hc])}var dc=ie(),pc={itemStyle:ge(rh,!0),lineStyle:ge(th,!0)},mc={lineStyle:"stroke",itemStyle:"fill"};function gc(t,n){return t.visualStyleMapper||pc[n]||(console.warn("Unkown style type '"+n+"'."),pc.itemStyle)}function yc(t,n){return t.visualDrawType||mc[n]||(console.warn("Unkown style type '"+n+"'."),"fill")}var bc={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,n){var i=t.getData(),r=t.visualStyleAccessPath||"itemStyle",e=t.getModel(r),o=gc(t,r)(e),a=e.getShallow("decal");a&&(i.setVisual("decal",a),a.dirty=!0);var s=yc(t,r),u=o[s],h=Y(u)?u:null;if(!o[s]||h||"auto"===o.fill||"auto"===o.stroke){var f=t.getColorFromPalette(t.name,null,n.getSeriesCount());o[s]||(o[s]=f,i.setVisual("colorFromPalette",!0)),o.fill="auto"===o.fill||Y(o.fill)?f:o.fill,o.stroke="auto"===o.stroke||Y(o.stroke)?f:o.stroke}if(i.setVisual("style",o),i.setVisual("drawType",s),!n.isSeriesFiltered(t)&&h)return i.setVisual("colorFromPalette",!1),{dataEach:function(n,i){var r=t.getDataParams(i),e=O({},o);e[s]=h(r),n.setItemVisual(i,"style",e)}}}},wc=new ah,xc={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,n){if(!t.ignoreStyleOnData&&!n.isSeriesFiltered(t)){var i=t.getData(),r=t.visualStyleAccessPath||"itemStyle",e=gc(t,r),o=i.getVisual("drawType");return{dataEach:i.hasItemOption?function(t,n){var i=t.getRawDataItem(n);if(i&&i[r]){wc.option=i[r];var a=e(wc);O(t.ensureUniqueItemVisual(n,"style"),a),wc.option.decal&&(t.setItemVisual(n,"decal",wc.option.decal),wc.option.decal.dirty=!0),o in a&&t.setItemVisual(n,"colorFromPalette",!1)}}:null}}}},Mc={performRawSeries:!0,overallReset:function(t){var n=ht();t.eachSeries((function(t){var i=t.getColorBy();if(!t.isColorBySeries()){var r=t.type+"-"+i,e=n.get(r);e||n.set(r,e={}),dc(t).scope=e}})),t.eachSeries((function(n){if(!n.isColorBySeries()&&!t.isSeriesFiltered(n)){var i=n.getRawData(),r={},e=n.getData(),o=dc(n).scope,a=yc(n,n.visualStyleAccessPath||"itemStyle");e.each((function(t){var n=e.getRawIndex(t);r[n]=t})),i.each((function(t){var s=r[t];if(e.getItemVisual(s,"colorFromPalette")){var u=e.ensureUniqueItemVisual(s,"style"),h=i.getName(t)||t+"",f=i.count();u[a]=n.getColorFromPalette(h,o,f)}}))}}))}},kc=Math.PI,Sc=function(){function t(t,n,i,r){this._stageTaskMap=ht(),this.ecInstance=t,this.api=n,i=this._dataProcessorHandlers=i.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=i.concat(r)}return t.prototype.restoreData=function(t,n){t.restoreData(n),this._stageTaskMap.each((function(t){var n=t.overallTask;n&&n.dirty()}))},t.prototype.getPerformArgs=function(t,n){if(t.__pipeline){var i=this._pipelineMap.get(t.__pipeline.id),r=i.context,e=!n&&i.progressiveEnabled&&(!r||r.progressiveRender)&&t.__idxInPipeline>i.blockIndex?i.step:null,o=r&&r.modDataCount;return{step:e,modBy:null!=o?Math.ceil(o/e):null,modDataCount:o}}},t.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},t.prototype.updateStreamModes=function(t,n){var i=this._pipelineMap.get(t.uid),r=t.getData().count(),e=i.progressiveEnabled&&n.incrementalPrepareRender&&r>=i.threshold,o=t.get("large")&&r>=t.get("largeThreshold"),a="mod"===t.get("progressiveChunkMode")?r:null;t.pipelineContext=i.context={progressiveRender:e,modDataCount:a,large:o}},t.prototype.restorePipelines=function(t){var n=this,i=n._pipelineMap=ht();t.eachSeries((function(t){var r=t.getProgressive(),e=t.uid;i.set(e,{id:e,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:r&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(r||700),count:0}),n._pipe(t,t.dataTask)}))},t.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,n=this.api.getModel(),i=this.api;R(this._allHandlers,(function(r){var e=t.get(r.uid)||t.set(r.uid,{});et(!(r.reset&&r.overallReset),""),r.reset&&this._createSeriesStageTask(r,e,n,i),r.overallReset&&this._createOverallStageTask(r,e,n,i)}),this)},t.prototype.prepareView=function(t,n,i,r){var e=t.renderTask,o=e.context;o.model=n,o.ecModel=i,o.api=r,e.__block=!t.incrementalPrepareRender,this._pipe(n,e)},t.prototype.performDataProcessorTasks=function(t,n){this._performStageTasks(this._dataProcessorHandlers,t,n,{block:!0})},t.prototype.performVisualTasks=function(t,n,i){this._performStageTasks(this._visualHandlers,t,n,i)},t.prototype._performStageTasks=function(t,n,i,r){r=r||{};var e=!1,o=this;function a(t,n){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(n.__pipeline.id))}R(t,(function(t){if(!r.visualType||r.visualType===t.visualType){var s=o._stageTaskMap.get(t.uid),u=s.seriesTaskMap,h=s.overallTask;if(h){var f,l=h.agentStubMap;l.each((function(t){a(r,t)&&(t.dirty(),f=!0)})),f&&h.dirty(),o.updatePayload(h,i);var c=o.getPerformArgs(h,r.block);l.each((function(t){t.perform(c)})),h.perform(c)&&(e=!0)}else u&&u.each((function(s){a(r,s)&&s.dirty();var u=o.getPerformArgs(s,r.block);u.skip=!t.performRawSeries&&n.isSeriesFiltered(s.context.model),o.updatePayload(s,i),s.perform(u)&&(e=!0)}))}})),this.unfinished=e||this.unfinished},t.prototype.performSeriesTasks=function(t){var n;t.eachSeries((function(t){n=t.dataTask.perform()||n})),this.unfinished=n||this.unfinished},t.prototype.plan=function(){this._pipelineMap.each((function(t){var n=t.tail;do{if(n.__block){t.blockIndex=n.__idxInPipeline;break}n=n.getUpstream()}while(n)}))},t.prototype.updatePayload=function(t,n){"remain"!==n&&(t.context.payload=n)},t.prototype._createSeriesStageTask=function(t,n,i,r){var e=this,o=n.seriesTaskMap,a=n.seriesTaskMap=ht(),s=t.seriesType,u=t.getTargetSeries;function h(n){var s=n.uid,u=a.set(s,o&&o.get(s)||ol({plan:Nc,reset:Lc,count:zc}));u.context={model:n,ecModel:i,api:r,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:e},e._pipe(n,u)}t.createOnAllSeries?i.eachRawSeries(h):s?i.eachRawSeriesByType(s,h):u&&u(i,r).each(h)},t.prototype._createOverallStageTask=function(t,n,i,r){var e=this,o=n.overallTask=n.overallTask||ol({reset:Ac});o.context={ecModel:i,api:r,overallReset:t.overallReset,scheduler:e};var a=o.agentStubMap,s=o.agentStubMap=ht(),u=t.seriesType,h=t.getTargetSeries,f=!0,l=!1;function c(t){var n=t.uid,i=s.set(n,a&&a.get(n)||(l=!0,ol({reset:Cc,onDirty:Ic})));i.context={model:t,overallProgress:f},i.agent=o,i.__block=f,e._pipe(t,i)}et(!t.createOnAllSeries,""),u?i.eachRawSeriesByType(u,c):h?h(i,r).each(c):(f=!1,R(i.getSeries(),c)),l&&o.dirty()},t.prototype._pipe=function(t,n){var i=this._pipelineMap.get(t.uid);!i.head&&(i.head=n),i.tail&&i.tail.pipe(n),i.tail=n,n.__idxInPipeline=i.count++,n.__pipeline=i},t.wrapStageHandler=function(t,n){return Y(t)&&(t={overallReset:t,seriesType:Bc(t)}),t.uid=uh("stageHandler"),n&&(t.visualType=n),t},t}();function Ac(t){t.overallReset(t.ecModel,t.api,t.payload)}function Cc(t){return t.overallProgress&&Tc}function Tc(){this.agent.dirty(),this.getDownstream().dirty()}function Ic(){this.agent&&this.agent.dirty()}function Nc(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function Lc(t){t.useClearVisual&&t.data.clearAllVisual();var n=t.resetDefines=Xr(t.reset(t.model,t.ecModel,t.api,t.payload));return n.length>1?F(n,(function(t,n){return Dc(n)})):Oc}var Oc=Dc(0);function Dc(t){return function(n,i){var r=i.data,e=i.resetDefines[t];if(e&&e.dataEach)for(var o=n.start;o<n.end;o++)e.dataEach(r,o);else e&&e.progress&&e.progress(n,r)}}function zc(t){return t.data.count()}function Bc(t){_c=null;try{t(Rc,Fc)}catch(t){}return _c}var _c,Rc={},Fc={};function Ec(t,n){for(var i in n.prototype)t[i]=vt}Ec(Rc,tf),Ec(Fc,af),Rc.eachSeriesByType=Rc.eachRawSeriesByType=function(t){_c=t},Rc.eachComponent=function(t){"series"===t.mainType&&t.subType&&(_c=t.subType)};var Pc=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"];const Wc={color:Pc,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],Pc]};var Hc=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],Uc={darkMode:!0,color:Hc,backgroundColor:"#100C2A",axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:"#B9B8CE"}},textStyle:{color:"#B9B8CE"},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:"#B9B8CE"}},dataZoom:{borderColor:"#71708A",textStyle:{color:"#B9B8CE"},brushStyle:{color:"rgba(135,163,206,0.3)"},handleStyle:{color:"#353450",borderColor:"#C5CBE3"},moveHandleStyle:{color:"#B0B6C3",opacity:.3},fillerColor:"rgba(135,163,206,0.2)",emphasis:{handleStyle:{borderColor:"#91B7F2",color:"#4D587D"},moveHandleStyle:{color:"#636D9A",opacity:.7}},dataBackground:{lineStyle:{color:"#71708A",width:1},areaStyle:{color:"#71708A"}},selectedDataBackground:{lineStyle:{color:"#87A3CE"},areaStyle:{color:"#87A3CE"}}},visualMap:{textStyle:{color:"#B9B8CE"}},timeline:{lineStyle:{color:"#B9B8CE"},label:{color:"#B9B8CE"},controlStyle:{color:"#B9B8CE",borderColor:"#B9B8CE"}},calendar:{itemStyle:{color:"#100C2A"},dayLabel:{color:"#B9B8CE"},monthLabel:{color:"#B9B8CE"},yearLabel:{color:"#B9B8CE"}},timeAxis:{axisLine:{lineStyle:{color:"#B9B8CE"}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}},logAxis:{axisLine:{lineStyle:{color:"#B9B8CE"}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}},valueAxis:{axisLine:{lineStyle:{color:"#B9B8CE"}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}},categoryAxis:{axisLine:{lineStyle:{color:"#B9B8CE"}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}},line:{symbol:"circle"},graph:{color:Hc},gauge:{title:{color:"#B9B8CE"},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:"#B9B8CE"},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}}};Uc.categoryAxis.splitLine.show=!1;var jc=function(){function t(){}return t.prototype.normalizeQuery=function(t){var n={},i={},r={};if(X(t)){var e=fe(t);n.mainType=e.main||null,n.subType=e.sub||null}else{var o=["Index","Name","Id"],a={name:1,dataIndex:1,dataType:1};R(t,(function(t,e){for(var s=!1,u=0;u<o.length;u++){var h=o[u],f=e.lastIndexOf(h);if(f>0&&f===e.length-h.length){var l=e.slice(0,f);"data"!==l&&(n.mainType=l,n[h.toLowerCase()]=t,s=!0)}}a.hasOwnProperty(e)&&(i[e]=t,s=!0),s||(r[e]=t)}))}return{cptQuery:n,dataQuery:i,otherQuery:r}},t.prototype.filter=function(t,n){var i=this.eventInfo;if(!i)return!0;var r=i.targetEl,e=i.packedEvent,o=i.model,a=i.view;if(!o||!a)return!0;var s=n.cptQuery,u=n.dataQuery;return h(s,o,"mainType")&&h(s,o,"subType")&&h(s,o,"index","componentIndex")&&h(s,o,"name")&&h(s,o,"id")&&h(u,e,"name")&&h(u,e,"dataIndex")&&h(u,e,"dataType")&&(!a.filterForExposedEvent||a.filterForExposedEvent(t,n.otherQuery,r,e));function h(t,n,i,r){return null==t[i]||n[r||i]===t[i]}},t.prototype.afterTrigger=function(){this.eventInfo=null},t}(),Yc=["symbol","symbolSize","symbolRotate","symbolOffset"],Xc=Yc.concat(["symbolKeepAspect"]),Vc={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,n){var i=t.getData();if(t.legendIcon&&i.setVisual("legendIcon",t.legendIcon),t.hasSymbolVisual){for(var r={},e={},o=!1,a=0;a<Yc.length;a++){var s=Yc[a],u=t.get(s);Y(u)?(o=!0,e[s]=u):r[s]=u}if(r.symbol=r.symbol||t.defaultSymbol,i.setVisual(O({legendIcon:t.legendIcon||r.symbol,symbolKeepAspect:t.get("symbolKeepAspect")},r)),!n.isSeriesFiltered(t)){var h=W(e);return{dataEach:o?function(n,i){for(var r=t.getRawValue(i),o=t.getDataParams(i),a=0;a<h.length;a++){var s=h[a];n.setItemVisual(i,s,e[s](r,o))}}:null}}}}},qc={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,n){if(t.hasSymbolVisual&&!n.isSeriesFiltered(t))return{dataEach:t.getData().hasItemOption?function(t,n){for(var i=t.getItemModel(n),r=0;r<Xc.length;r++){var e=Xc[r],o=i.getShallow(e,!0);null!=o&&t.setItemVisual(n,e,o)}}:null}}};function Gc(t,n,i,r,e){var o=t+n;i.isSilent(o)||r.eachComponent({mainType:"series",subType:"pie"},(function(t){for(var n=t.seriesIndex,r=t.option.selectedMap,a=e.selected,s=0;s<a.length;s++)if(a[s].seriesIndex===n){var u=t.getData(),h=ne(u,e.fromActionPayload);i.trigger(o,{type:o,seriesId:t.id,name:j(h)?u.getName(h[0]):u.getName(h),selected:X(r)?r:O({},r)})}}))}function Zc(t,n,i){for(var r;t&&(!n(t)||(r=t,!i));)t=t.__hostTarget||t.parent;return r}var Kc=Math.round(9*Math.random()),$c="function"==typeof Object.defineProperty,Jc=function(){function t(){this._id="__ec_inner_"+Kc++}return t.prototype.get=function(t){return this._guard(t)[this._id]},t.prototype.set=function(t,n){var i=this._guard(t);return $c?Object.defineProperty(i,this._id,{value:n,enumerable:!1,configurable:!0}):i[this._id]=n,this},t.prototype.delete=function(t){return!!this.has(t)&&(delete this._guard(t)[this._id],!0)},t.prototype.has=function(t){return!!this._guard(t)[this._id]},t.prototype._guard=function(t){if(t!==Object(t))throw TypeError("Value of WeakMap is not a non-null object.");return t},t}(),Qc=jo.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,n){var i=n.cx,r=n.cy,e=n.width/2,o=n.height/2;t.moveTo(i,r-o),t.lineTo(i+e,r+o),t.lineTo(i-e,r+o),t.closePath()}}),tv=jo.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,n){var i=n.cx,r=n.cy,e=n.width/2,o=n.height/2;t.moveTo(i,r-o),t.lineTo(i+e,r),t.lineTo(i,r+o),t.lineTo(i-e,r),t.closePath()}}),nv=jo.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,n){var i=n.x,r=n.y,e=n.width/5*3,o=Math.max(e,n.height),a=e/2,s=a*a/(o-a),u=r-o+a+s,h=Math.asin(s/a),f=Math.cos(h)*a,l=Math.sin(h),c=Math.cos(h),v=.6*a,d=.7*a;t.moveTo(i-f,u+s),t.arc(i,u,a,Math.PI-h,2*Math.PI+h),t.bezierCurveTo(i+f-l*v,u+s+c*v,i,r-d,i,r),t.bezierCurveTo(i,r-d,i-f+l*v,u+s+c*v,i-f,u+s),t.closePath()}}),iv=jo.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,n){var i=n.height,r=n.x,e=n.y,o=n.width/3*2;t.moveTo(r,e),t.lineTo(r+o,e+i),t.lineTo(r,e+i/4*3),t.lineTo(r-o,e+i),t.lineTo(r,e),t.closePath()}}),rv={line:function(t,n,i,r,e){e.x1=t,e.y1=n+r/2,e.x2=t+i,e.y2=n+r/2},rect:function(t,n,i,r,e){e.x=t,e.y=n,e.width=i,e.height=r},roundRect:function(t,n,i,r,e){e.x=t,e.y=n,e.width=i,e.height=r,e.r=Math.min(i,r)/4},square:function(t,n,i,r,e){var o=Math.min(i,r);e.x=t,e.y=n,e.width=o,e.height=o},circle:function(t,n,i,r,e){e.cx=t+i/2,e.cy=n+r/2,e.r=Math.min(i,r)/2},diamond:function(t,n,i,r,e){e.cx=t+i/2,e.cy=n+r/2,e.width=i,e.height=r},pin:function(t,n,i,r,e){e.x=t+i/2,e.y=n+r/2,e.width=i,e.height=r},arrow:function(t,n,i,r,e){e.x=t+i/2,e.y=n+r/2,e.width=i,e.height=r},triangle:function(t,n,i,r,e){e.cx=t+i/2,e.cy=n+r/2,e.width=i,e.height=r}},ev={};R({line:qs,rect:na,roundRect:na,square:na,circle:xs,diamond:tv,pin:nv,arrow:iv,triangle:Qc},(function(t,n){ev[n]=new t}));var ov=jo.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(t,n,i){var r=mr(t,n,i),e=this.shape;return e&&"pin"===e.symbolType&&"inside"===n.position&&(r.y=i.y+.4*i.height),r},buildPath:function(t,n,i){var r=n.symbolType;if("none"!==r){var e=ev[r];e||(e=ev[r="rect"]),rv[r](n.x,n.y,n.width,n.height,e.shape),e.buildPath(t,e.shape,i)}}});function av(t,n){if("image"!==this.type){var i=this.style;this.__isEmptyBrush?(i.stroke=t,i.fill=n||"#fff",i.lineWidth=2):"line"===this.shape.symbolType?i.stroke=t:i.fill=t,this.markRedraw()}}function sv(t,n,i,r,e,o,a){var s,u=0===t.indexOf("empty");return u&&(t=t.substr(5,1).toLowerCase()+t.substr(6)),(s=0===t.indexOf("image://")?Su(t.slice(8),new sr(n,i,r,e),a?"center":"cover"):0===t.indexOf("path://")?ku(t.slice(7),{},new sr(n,i,r,e),a?"center":"cover"):new ov({shape:{symbolType:t,x:n,y:i,width:r,height:e}})).__isEmptyBrush=u,s.setColor=av,o&&s.setColor(o),s}function uv(t){return isFinite(t)}function hv(t,n,i){for(var r="radial"===n.type?function(t,n,i){var r=i.width,e=i.height,o=Math.min(r,e),a=null==n.x?.5:n.x,s=null==n.y?.5:n.y,u=null==n.r?.5:n.r;return n.global||(a=a*r+i.x,s=s*e+i.y,u*=o),a=uv(a)?a:.5,s=uv(s)?s:.5,u=u>=0&&uv(u)?u:.5,t.createRadialGradient(a,s,0,a,s,u)}(t,n,i):function(t,n,i){var r=null==n.x?0:n.x,e=null==n.x2?1:n.x2,o=null==n.y?0:n.y,a=null==n.y2?0:n.y2;return n.global||(r=r*i.width+i.x,e=e*i.width+i.x,o=o*i.height+i.y,a=a*i.height+i.y),r=uv(r)?r:0,e=uv(e)?e:1,o=uv(o)?o:0,a=uv(a)?a:0,t.createLinearGradient(r,o,e,a)}(t,n,i),e=n.colorStops,o=0;o<e.length;o++)r.addColorStop(e[o].offset,e[o].color);return r}function fv(t){return parseInt(t,10)}function lv(t,n,i){var r=["width","height"][n],e=["clientWidth","clientHeight"][n],o=["paddingLeft","paddingTop"][n],a=["paddingRight","paddingBottom"][n];if(null!=i[r]&&"auto"!==i[r])return parseFloat(i[r]);var s=document.defaultView.getComputedStyle(t);return(t[e]||fv(s[r])||fv(t.style[r]))-(fv(s[o])||0)-(fv(s[a])||0)|0}function cv(t){var n,i,r=t.style,e=r.lineDash&&r.lineWidth>0&&(i=r.lineWidth,(n=r.lineDash)&&"solid"!==n&&i>0?"dashed"===n?[4*i,2*i]:"dotted"===n?[i]:q(n)?[n]:j(n)?n:null:null),o=r.lineDashOffset;if(e){var a=r.strokeNoScale&&t.getLineScale?t.getLineScale():1;a&&1!==a&&(e=F(e,(function(t){return t/a})),o/=a)}return[e,o]}var vv=new ko(!0);function dv(t){var n=t.stroke;return!(null==n||"none"===n||!(t.lineWidth>0))}function pv(t){return"string"==typeof t&&"none"!==t}function mv(t){var n=t.fill;return null!=n&&"none"!==n}function gv(t,n){if(null!=n.fillOpacity&&1!==n.fillOpacity){var i=t.globalAlpha;t.globalAlpha=n.fillOpacity*n.opacity,t.fill(),t.globalAlpha=i}else t.fill()}function yv(t,n){if(null!=n.strokeOpacity&&1!==n.strokeOpacity){var i=t.globalAlpha;t.globalAlpha=n.strokeOpacity*n.opacity,t.stroke(),t.globalAlpha=i}else t.stroke()}function bv(t,n,i){var r=Me(n.image,n.__image,i);if(Se(r)){var e=t.createPattern(r,n.repeat||"repeat");if("function"==typeof DOMMatrix&&e&&e.setTransform){var o=new DOMMatrix;o.translateSelf(n.x||0,n.y||0),o.rotateSelf(0,0,(n.rotation||0)*dt),o.scaleSelf(n.scaleX||1,n.scaleY||1),e.setTransform(o)}return e}}var wv=["shadowBlur","shadowOffsetX","shadowOffsetY"],xv=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function Mv(t,n,i,r,e){var o=!1;if(!r&&n===(i=i||{}))return!1;if(r||n.opacity!==i.opacity){Av(t,e),o=!0;var a=Math.max(Math.min(n.opacity,1),0);t.globalAlpha=isNaN(a)?Ee.opacity:a}(r||n.blend!==i.blend)&&(o||(Av(t,e),o=!0),t.globalCompositeOperation=n.blend||Ee.blend);for(var s=0;s<wv.length;s++){var u=wv[s];(r||n[u]!==i[u])&&(o||(Av(t,e),o=!0),t[u]=t.dpr*(n[u]||0))}return(r||n.shadowColor!==i.shadowColor)&&(o||(Av(t,e),o=!0),t.shadowColor=n.shadowColor||Ee.shadowColor),o}function kv(t,n,i,r,e){var o=Cv(n,e.inHover),a=r?null:i&&Cv(i,e.inHover)||{};if(o===a)return!1;var s=Mv(t,o,a,r,e);if((r||o.fill!==a.fill)&&(s||(Av(t,e),s=!0),pv(o.fill)&&(t.fillStyle=o.fill)),(r||o.stroke!==a.stroke)&&(s||(Av(t,e),s=!0),pv(o.stroke)&&(t.strokeStyle=o.stroke)),(r||o.opacity!==a.opacity)&&(s||(Av(t,e),s=!0),t.globalAlpha=null==o.opacity?1:o.opacity),n.hasStroke()){var u=o.lineWidth/(o.strokeNoScale&&n.getLineScale?n.getLineScale():1);t.lineWidth!==u&&(s||(Av(t,e),s=!0),t.lineWidth=u)}for(var h=0;h<xv.length;h++){var f=xv[h],l=f[0];(r||o[l]!==a[l])&&(s||(Av(t,e),s=!0),t[l]=o[l]||f[1])}return s}function Sv(t,n){var i=n.transform,r=t.dpr||1;i?t.setTransform(r*i[0],r*i[1],r*i[2],r*i[3],r*i[4],r*i[5]):t.setTransform(r,0,0,r,0,0)}function Av(t,n){n.batchFill&&t.fill(),n.batchStroke&&t.stroke(),n.batchFill="",n.batchStroke=""}function Cv(t,n){return n&&t.__hoverStyle||t.style}function Tv(t,n){Iv(t,n,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function Iv(t,n,i,r){var e=n.transform;if(!n.shouldBePainted(i.viewWidth,i.viewHeight,!1,!1))return n.__dirty&=-2,void(n.__isRendered=!1);var o=n.__clipPaths,a=i.prevElClipPaths,s=!1,u=!1;if(a&&!function(t,n){if(t===n||!t&&!n)return!1;if(!t||!n||t.length!==n.length)return!0;for(var i=0;i<t.length;i++)if(t[i]!==n[i])return!0;return!1}(o,a)||(a&&a.length&&(Av(t,i),t.restore(),u=s=!0,i.prevElClipPaths=null,i.allClipped=!1,i.prevEl=null),o&&o.length&&(Av(t,i),t.save(),function(t,n,i){for(var r=!1,e=0;e<t.length;e++){var o=t[e];r=r||o.isZeroArea(),Sv(n,o),n.beginPath(),o.buildPath(n,o.shape),n.clip()}i.allClipped=r}(o,t,i),s=!0),i.prevElClipPaths=o),i.allClipped)n.__isRendered=!1;else{n.beforeBrush&&n.beforeBrush(),n.innerBeforeBrush();var h=i.prevEl;h||(u=s=!0);var f,l,c=n instanceof jo&&n.autoBatch&&function(t){var n=mv(t),i=dv(t);return!(t.lineDash||!(+n^+i)||n&&"string"!=typeof t.fill||i&&"string"!=typeof t.stroke||t.strokePercent<1||t.strokeOpacity<1||t.fillOpacity<1)}(n.style);s||(l=h.transform,(f=e)&&l?f[0]!==l[0]||f[1]!==l[1]||f[2]!==l[2]||f[3]!==l[3]||f[4]!==l[4]||f[5]!==l[5]:f||l)?(Av(t,i),Sv(t,n)):c||Av(t,i);var d=Cv(n,i.inHover);n instanceof jo?(1!==i.lastDrawType&&(u=!0,i.lastDrawType=1),kv(t,n,h,u,i),c&&(i.batchFill||i.batchStroke)||t.beginPath(),function(t,n,i,r){var e,o=dv(i),a=mv(i),s=i.strokePercent,u=s<1,h=!n.path;n.silent&&!u||!h||n.createPathProxy();var f=n.path||vv,l=n.__dirty;if(!r){var c=i.fill,v=i.stroke,d=a&&!!c.colorStops,p=o&&!!v.colorStops,m=a&&!!c.image,g=o&&!!v.image,y=void 0,b=void 0,w=void 0,x=void 0,M=void 0;(d||p)&&(M=n.getBoundingRect()),d&&(y=l?hv(t,c,M):n.__canvasFillGradient,n.__canvasFillGradient=y),p&&(b=l?hv(t,v,M):n.__canvasStrokeGradient,n.__canvasStrokeGradient=b),m&&(w=l||!n.__canvasFillPattern?bv(t,c,n):n.__canvasFillPattern,n.__canvasFillPattern=w),g&&(x=l||!n.__canvasStrokePattern?bv(t,v,n):n.__canvasStrokePattern,n.__canvasStrokePattern=w),d?t.fillStyle=y:m&&(w?t.fillStyle=w:a=!1),p?t.strokeStyle=b:g&&(x?t.strokeStyle=x:o=!1)}var k,S,A=n.getGlobalScale();f.setScale(A[0],A[1],n.segmentIgnoreThreshold),t.setLineDash&&i.lineDash&&(k=(e=cv(n))[0],S=e[1]);var C=!0;(h||4&l)&&(f.setDPR(t.dpr),u?f.setContext(null):(f.setContext(t),C=!1),f.reset(),n.buildPath(f,n.shape,r),f.toStatic(),n.pathUpdated()),C&&f.rebuildPath(t,u?s:1),k&&(t.setLineDash(k),t.lineDashOffset=S),r||(i.strokeFirst?(o&&yv(t,i),a&&gv(t,i)):(a&&gv(t,i),o&&yv(t,i))),k&&t.setLineDash([])}(t,n,d,c),c&&(i.batchFill=d.fill||"",i.batchStroke=d.stroke||"")):n instanceof Xo?(3!==i.lastDrawType&&(u=!0,i.lastDrawType=3),kv(t,n,h,u,i),function(t,n,i){var r,e=i.text;if(null!=e&&(e+=""),e){t.font=i.font||v,t.textAlign=i.textAlign,t.textBaseline=i.textBaseline;var o=void 0,a=void 0;t.setLineDash&&i.lineDash&&(o=(r=cv(n))[0],a=r[1]),o&&(t.setLineDash(o),t.lineDashOffset=a),i.strokeFirst?(dv(i)&&t.strokeText(e,i.x,i.y),mv(i)&&t.fillText(e,i.x,i.y)):(mv(i)&&t.fillText(e,i.x,i.y),dv(i)&&t.strokeText(e,i.x,i.y)),o&&t.setLineDash([])}}(t,n,d)):n instanceof Go?(2!==i.lastDrawType&&(u=!0,i.lastDrawType=2),function(t,n,i,r,e){Mv(t,Cv(n,e.inHover),i&&Cv(i,e.inHover),r,e)}(t,n,h,u,i),function(t,n,i){var r=n.__image=Me(i.image,n.__image,n,n.onload);if(r&&Se(r)){var e=i.x||0,o=i.y||0,a=n.getWidth(),s=n.getHeight(),u=r.width/r.height;if(null==a&&null!=s?a=s*u:null==s&&null!=a?s=a/u:null==a&&null==s&&(a=r.width,s=r.height),i.sWidth&&i.sHeight)t.drawImage(r,h=i.sx||0,f=i.sy||0,i.sWidth,i.sHeight,e,o,a,s);else if(i.sx&&i.sy){var h,f;t.drawImage(r,h=i.sx,f=i.sy,a-h,s-f,e,o,a,s)}else t.drawImage(r,e,o,a,s)}}(t,n,d)):n.getTemporalDisplayables&&(4!==i.lastDrawType&&(u=!0,i.lastDrawType=4),function(t,n,i){var r=n.getDisplayables(),e=n.getTemporalDisplayables();t.save();var o,a,s={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:i.viewWidth,viewHeight:i.viewHeight,inHover:i.inHover};for(o=n.getCursor(),a=r.length;o<a;o++)(f=r[o]).beforeBrush&&f.beforeBrush(),f.innerBeforeBrush(),Iv(t,f,s,o===a-1),f.innerAfterBrush(),f.afterBrush&&f.afterBrush(),s.prevEl=f;for(var u=0,h=e.length;u<h;u++){var f;(f=e[u]).beforeBrush&&f.beforeBrush(),f.innerBeforeBrush(),Iv(t,f,s,u===h-1),f.innerAfterBrush(),f.afterBrush&&f.afterBrush(),s.prevEl=f}n.clearTemporalDisplayables(),n.notClear=!0,t.restore()}(t,n,i)),c&&r&&Av(t,i),n.innerAfterBrush(),n.afterBrush&&n.afterBrush(),i.prevEl=n,n.__dirty=0,n.__isRendered=!0}}var Nv=new Jc,Lv=new Hn(100),Ov=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function Dv(t,n){if("none"===t)return null;var i=n.getDevicePixelRatio(),r=n.getZr(),e="svg"===r.painter.type;t.dirty&&Nv.delete(t);var o=Nv.get(t);if(o)return o;var a=D(t,{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});"none"===a.backgroundColor&&(a.backgroundColor=null);var s={repeat:"repeat"};return function(t){for(var n,o=[i],s=!0,u=0;u<Ov.length;++u){var h=a[Ov[u]];if(null!=h&&!j(h)&&!X(h)&&!q(h)&&"boolean"!=typeof h){s=!1;break}o.push(h)}if(s){n=o.join(",")+(e?"-svg":"");var f=Lv.get(n);f&&(e?t.svgElement=f:t.image=f)}var l,c=Bv(a.dashArrayX),v=function(t){if(!t||"object"==typeof t&&0===t.length)return[0,0];if(q(t)){var n=Math.ceil(t);return[n,n]}var i=F(t,(function(t){return Math.ceil(t)}));return t.length%2?i.concat(i):i}(a.dashArrayY),d=zv(a.symbol),m=F(c,(function(t){return _v(t)})),g=_v(v),y=!e&&p.createCanvas(),b=e&&{tag:"g",attrs:{},key:"dcl",children:[]},w=function(){for(var t=1,n=0,i=m.length;n<i;++n)t=Ur(t,m[n]);var r=1;for(n=0,i=d.length;n<i;++n)r=Ur(r,d[n].length);t*=r;var e=g*m.length*d.length;return{width:Math.max(1,Math.min(t,a.maxTileWidth)),height:Math.max(1,Math.min(e,a.maxTileHeight))}}();y&&(y.width=w.width*i,y.height=w.height*i,l=y.getContext("2d")),function(){l&&(l.clearRect(0,0,y.width,y.height),a.backgroundColor&&(l.fillStyle=a.backgroundColor,l.fillRect(0,0,y.width,y.height)));for(var t=0,n=0;n<v.length;++n)t+=v[n];if(!(t<=0))for(var o=-g,s=0,u=0,h=0;o<w.height;){if(s%2==0){for(var f=u/2%d.length,p=0,m=0,x=0;p<2*w.width;){var M=0;for(n=0;n<c[h].length;++n)M+=c[h][n];if(M<=0)break;if(m%2==0){var k=.5*(1-a.symbolSize);S(p+c[h][m]*k,o+v[s]*k,c[h][m]*a.symbolSize,v[s]*a.symbolSize,d[f][x/2%d[f].length])}p+=c[h][m],++x,++m===c[h].length&&(m=0)}++h===c.length&&(h=0)}o+=v[s],++u,++s===v.length&&(s=0)}function S(t,n,o,s,u){var h=e?1:i,f=sv(u,t*h,n*h,o*h,s*h,a.color,a.symbolKeepAspect);if(e){var c=r.painter.renderOneToVNode(f);c&&b.children.push(c)}else Tv(l,f)}}(),s&&Lv.put(n,y||b),t.image=y,t.svgElement=b,t.svgWidth=w.width,t.svgHeight=w.height}(s),s.rotation=a.rotation,s.scaleX=s.scaleY=e?1:1/i,Nv.set(t,s),t.dirty=!1,s}function zv(t){if(!t||0===t.length)return[["rect"]];if(X(t))return[[t]];for(var n=!0,i=0;i<t.length;++i)if(!X(t[i])){n=!1;break}if(n)return zv([t]);var r=[];for(i=0;i<t.length;++i)X(t[i])?r.push([t[i]]):r.push(t[i]);return r}function Bv(t){if(!t||0===t.length)return[[0,0]];if(q(t))return[[e=Math.ceil(t),e]];for(var n=!0,i=0;i<t.length;++i)if(!q(t[i])){n=!1;break}if(n)return Bv([t]);var r=[];for(i=0;i<t.length;++i)if(q(t[i])){var e=Math.ceil(t[i]);r.push([e,e])}else e=F(t[i],(function(t){return Math.ceil(t)})),r.push(e.length%2==1?e.concat(e):e);return r}function _v(t){for(var n=0,i=0;i<t.length;++i)n+=t[i];return t.length%2==1?2*n:n}var Rv=new Ot,Fv={},Ev="undefined"!=typeof window,Pv=/^[a-zA-Z0-9_]+$/;function Wv(t){return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(!this.isDisposed())return Uv(this,t,n)}}function Hv(t){return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return Uv(this,t,n)}}function Uv(t,n,i){return i[0]=i[0]&&i[0].toLowerCase(),Ot.prototype[n].apply(t,i)}var jv,Yv,Xv,Vv,qv,Gv,Zv,Kv,$v,Jv,Qv,td,nd,id,rd,ed,od,ad,sd=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return u(n,t),n}(Ot),ud=sd.prototype;ud.on=Hv("on"),ud.off=Hv("off");var hd=function(t){function n(n,i,r){var e=t.call(this,new jc)||this;e._chartsViews=[],e._chartsMap={},e._componentsViews=[],e._componentsMap={},e._pendingActions=[],r=r||{},X(i)&&(i=gd[i]),e._dom=n;var o=e._zr=Nr(n,{renderer:r.renderer||"canvas",devicePixelRatio:r.devicePixelRatio,width:r.width,height:r.height,ssr:r.ssr,useDirtyRect:null!=r.useDirtyRect&&r.useDirtyRect});e._ssr=r.ssr,e._throttledZrFlush=lc(H(o.flush,o),17),(i=N(i))&&Lf(i,!0),e._theme=i,e._locale=function(t){if(X(t)){var n=hh[t.toUpperCase()]||{};return"ZH"===t||"EN"===t?N(n):L(N(n),N(hh.EN),!1)}return L(N(t),N(hh.EN),!1)}(r.locale||lh),e._coordSysMgr=new uf;var a=e._api=rd(e);function s(t,n){return t.__prio-n.__prio}return sn(md,s),sn(dd,s),e._scheduler=new Sc(e,a,dd,md),e._messageCenter=new sd,e._initEvents(),e.resize=H(e.resize,e),o.animation.on("frame",e._onframe,e),Jv(o,e),Qv(o,e),at(e),e}return u(n,t),n.prototype._onframe=function(){if(!this._disposed){ad(this);var t=this._scheduler;if(this.__pendingUpdate){var n=this.__pendingUpdate.silent;this.__flagInMainProcess=!0;try{jv(this),Vv.update.call(this,null,this.__pendingUpdate.updateParams)}catch(t){throw this.__flagInMainProcess=!1,this.__pendingUpdate=null,t}this._zr.flush(),this.__flagInMainProcess=!1,this.__pendingUpdate=null,Kv.call(this,n),$v.call(this,n)}else if(t.unfinished){var i=1,r=this._model,e=this._api;t.unfinished=!1;do{var o=+new Date;t.performSeriesTasks(r),t.performDataProcessorTasks(r),Gv(this,r),t.performVisualTasks(r),id(this,this._model,e,"remain",{}),i-=+new Date-o}while(i>0&&t.unfinished);t.unfinished||this._zr.flush()}}},n.prototype.getDom=function(){return this._dom},n.prototype.getId=function(){return this.id},n.prototype.getZr=function(){return this._zr},n.prototype.isSSR=function(){return this._ssr},n.prototype.setOption=function(t,n,i){if(!this.__flagInMainProcess&&!this._disposed){var r,e,o;if(G(n)&&(i=n.lazyUpdate,r=n.silent,e=n.replaceMerge,o=n.transition,n=n.notMerge),this.__flagInMainProcess=!0,!this._model||n){var a=new ff(this._api),s=this._theme,u=this._model=new tf;u.scheduler=this._scheduler,u.ssr=this._ssr,u.init(null,null,null,s,this._locale,a)}this._model.setOption(t,{replaceMerge:e},pd);var h={seriesTransition:o,optionChanged:!0};if(i)this.__pendingUpdate={silent:r,updateParams:h},this.__flagInMainProcess=!1,this.getZr().wakeUp();else{try{jv(this),Vv.update.call(this,null,h)}catch(t){throw this.__pendingUpdate=null,this.__flagInMainProcess=!1,t}this._ssr||this._zr.flush(),this.__pendingUpdate=null,this.__flagInMainProcess=!1,Kv.call(this,r),$v.call(this,r)}}},n.prototype.setTheme=function(){},n.prototype.getModel=function(){return this._model},n.prototype.getOption=function(){return this._model&&this._model.getOption()},n.prototype.getWidth=function(){return this._zr.getWidth()},n.prototype.getHeight=function(){return this._zr.getHeight()},n.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Ev&&window.devicePixelRatio||1},n.prototype.getRenderedCanvas=function(t){return this.renderToCanvas(t)},n.prototype.renderToCanvas=function(t){return this._zr.painter.getRenderedCanvas({backgroundColor:(t=t||{}).backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},n.prototype.renderToSVGString=function(t){return this._zr.painter.renderToString({useViewBox:(t=t||{}).useViewBox})},n.prototype.getSvgDataURL=function(){if(f.svgSupported){var t=this._zr;return R(t.storage.getDisplayList(),(function(t){t.stopAnimation(null,!0)})),t.painter.toDataURL()}},n.prototype.getDataURL=function(t){if(!this._disposed){var n=this._model,i=[],r=this;R((t=t||{}).excludeComponents,(function(t){n.eachComponent({mainType:t},(function(t){var n=r._componentsMap[t.__viewId];n.group.ignore||(i.push(n),n.group.ignore=!0)}))}));var e="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.renderToCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return R(i,(function(t){t.group.ignore=!1})),e}},n.prototype.getConnectedDataURL=function(t){if(!this._disposed){var n="svg"===t.type,i=this.group,r=Math.min,e=Math.max,o=1/0;if(wd[i]){var a=o,s=o,u=-1/0,h=-1/0,f=[],l=t&&t.pixelRatio||this.getDevicePixelRatio();R(bd,(function(o){if(o.group===i){var l=n?o.getZr().painter.getSvgDom().innerHTML:o.renderToCanvas(N(t)),c=o.getDom().getBoundingClientRect();a=r(c.left,a),s=r(c.top,s),u=e(c.right,u),h=e(c.bottom,h),f.push({dom:l,left:c.left,top:c.top})}}));var c=(u*=l)-(a*=l),v=(h*=l)-(s*=l),d=p.createCanvas(),m=Nr(d,{renderer:n?"svg":"canvas"});if(m.resize({width:c,height:v}),n){var g="";return R(f,(function(t){g+='<g transform="translate('+(t.left-a)+","+(t.top-s)+')">'+t.dom+"</g>"})),m.painter.getSvgRoot().innerHTML=g,t.connectedBackgroundColor&&m.painter.setBackgroundColor(t.connectedBackgroundColor),m.refreshImmediately(),m.painter.toDataURL()}return t.connectedBackgroundColor&&m.add(new na({shape:{x:0,y:0,width:c,height:v},style:{fill:t.connectedBackgroundColor}})),R(f,(function(t){var n=new Go({style:{x:t.left*l-a,y:t.top*l-s,image:t.dom}});m.add(n)})),m.refreshImmediately(),d.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}},n.prototype.convertToPixel=function(t,n){return qv(this,"convertToPixel",t,n)},n.prototype.convertFromPixel=function(t,n){return qv(this,"convertFromPixel",t,n)},n.prototype.containPixel=function(t,n){var i;if(!this._disposed)return R(ee(this._model,t),(function(t,r){r.indexOf("Models")>=0&&R(t,(function(t){var e=t.coordinateSystem;if(e&&e.containPoint)i=i||!!e.containPoint(n);else if("seriesModels"===r){var o=this._chartsMap[t.__viewId];o&&o.containPoint&&(i=i||o.containPoint(n,t))}}),this)}),this),!!i},n.prototype.getVisual=function(t,n){var i=ee(this._model,t,{defaultMainType:"series"}),r=i.seriesModel.getData(),e=i.hasOwnProperty("dataIndexInside")?i.dataIndexInside:i.hasOwnProperty("dataIndex")?r.indexOfRawIndex(i.dataIndex):null;return null!=e?function(t,n,i){switch(i){case"color":return t.getItemVisual(n,"style")[t.getVisual("drawType")];case"opacity":return t.getItemVisual(n,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getItemVisual(n,i)}}(r,e,n):function(t,n){switch(n){case"color":return t.getVisual("style")[t.getVisual("drawType")];case"opacity":return t.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getVisual(n)}}(r,n)},n.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},n.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},n.prototype._initEvents=function(){var t,n,i=this;R(ld,(function(t){var n=function(n){var r,e=i.getModel(),o=n.target;if("globalout"===t?r={}:o&&Zc(o,(function(t){var n=pa(t);if(n&&null!=n.dataIndex){var i=n.dataModel||e.getSeriesByIndex(n.seriesIndex);return r=i&&i.getDataParams(n.dataIndex,n.dataType)||{},!0}if(n.eventData)return r=O({},n.eventData),!0}),!0),r){var a=r.componentType,s=r.componentIndex;"markLine"!==a&&"markPoint"!==a&&"markArea"!==a||(a="series",s=r.seriesIndex);var u=a&&null!=s&&e.getComponent(a,s),h=u&&i["series"===u.mainType?"_chartsMap":"_componentsMap"][u.__viewId];r.event=n,r.type=t,i._$eventProcessor.eventInfo={targetEl:o,packedEvent:r,model:u,view:h},i.trigger(t,r)}};n.zrEventfulCallAtLast=!0,i._zr.on(t,n,i)})),R(vd,(function(t,n){i._messageCenter.on(n,(function(t){this.trigger(n,t)}),i)})),R(["selectchanged"],(function(t){i._messageCenter.on(t,(function(n){this.trigger(t,n)}),i)})),t=this,n=this._api,this._messageCenter.on("selectchanged",(function(i){var r=n.getModel();i.isFromClick?(Gc("map","selectchanged",t,r,i),Gc("pie","selectchanged",t,r,i)):"select"===i.fromAction?(Gc("map","selected",t,r,i),Gc("pie","selected",t,r,i)):"unselect"===i.fromAction&&(Gc("map","unselected",t,r,i),Gc("pie","unselected",t,r,i))}))},n.prototype.isDisposed=function(){return this._disposed},n.prototype.clear=function(){this._disposed||this.setOption({series:[]},!0)},n.prototype.dispose=function(){if(!this._disposed){this._disposed=!0,this.getDom()&&ue(this.getDom(),Md,"");var t=this,n=t._api,i=t._model;R(t._componentsViews,(function(t){t.dispose(i,n)})),R(t._chartsViews,(function(t){t.dispose(i,n)})),t._zr.dispose(),t._dom=t._model=t._chartsMap=t._componentsMap=t._chartsViews=t._componentsViews=t._scheduler=t._api=t._zr=t._throttledZrFlush=t._theme=t._coordSysMgr=t._messageCenter=null,delete bd[t.id]}},n.prototype.resize=function(t){if(!this.__flagInMainProcess&&!this._disposed){this._zr.resize(t);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),n){var i=n.resetOption("media"),r=t&&t.silent;this.__pendingUpdate&&(null==r&&(r=this.__pendingUpdate.silent),i=!0,this.__pendingUpdate=null),this.__flagInMainProcess=!0;try{i&&jv(this),Vv.update.call(this,{type:"resize",animation:O({duration:0},t&&t.animation)})}catch(t){throw this.__flagInMainProcess=!1,t}this.__flagInMainProcess=!1,Kv.call(this,r),$v.call(this,r)}}},n.prototype.showLoading=function(t,n){if(!this._disposed&&(G(t)&&(n=t,t=""),t=t||"default",this.hideLoading(),yd[t])){var i=yd[t](this._api,n),r=this._zr;this._loadingFX=i,r.add(i)}},n.prototype.hideLoading=function(){this._disposed||(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},n.prototype.makeActionFromEvent=function(t){var n=O({},t);return n.type=vd[t.type],n},n.prototype.dispatchAction=function(t,n){if(!this._disposed&&(G(n)||(n={silent:!!n}),cd[t.type]&&this._model))if(this.__flagInMainProcess)this._pendingActions.push(t);else{var i=n.silent;Zv.call(this,t,i);var r=n.flush;r?this._zr.flush():!1!==r&&f.browser.weChat&&this._throttledZrFlush(),Kv.call(this,i),$v.call(this,i)}},n.prototype.updateLabelLayout=function(){Rv.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},n.prototype.appendData=function(t){if(!this._disposed){var n=t.seriesIndex;this.getModel().getSeriesByIndex(n).appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()}},n.internalField=function(){function t(t){t.clearColorPalette(),t.eachSeries((function(t){t.clearColorPalette()}))}function n(t){for(var n=[],i=t.currentStates,r=0;r<i.length;r++){var e=i[r];"emphasis"!==e&&"blur"!==e&&"select"!==e&&n.push(e)}t.selected&&t.states.select&&n.push("select"),2===t.hoverState&&t.states.emphasis?n.push("emphasis"):1===t.hoverState&&t.states.blur&&n.push("blur"),t.useStates(n)}function i(t,n){if(!t.preventAutoZ){var i=t.get("z")||0,e=t.get("zlevel")||0;n.eachRendered((function(t){return r(t,i,e,-1/0),!0}))}}function r(t,n,i,e){var o=t.getTextContent(),a=t.getTextGuideLine();if(t.isGroup)for(var s=t.childrenRef(),u=0;u<s.length;u++)e=Math.max(r(s[u],n,i,e),e);else t.z=n,t.zlevel=i,e=Math.max(t.z2,e);if(o&&(o.z=n,o.zlevel=i,isFinite(e)&&(o.z2=e+2)),a){var h=t.textGuideLineConfig;a.z=n,a.zlevel=i,isFinite(e)&&(a.z2=e+(h&&h.showAbove?1:-1))}return e}function e(t,n){n.eachRendered((function(t){if(!pu(t)){var n=t.getTextContent(),i=t.getTextGuideLine();t.stateTransition&&(t.stateTransition=null),n&&n.stateTransition&&(n.stateTransition=null),i&&i.stateTransition&&(i.stateTransition=null),t.hasState()?(t.prevStates=t.currentStates,t.clearStates()):t.prevStates&&(t.prevStates=null)}}))}function o(t,i){var r=t.getModel("stateAnimation"),e=t.isAnimationEnabled(),o=r.get("duration"),a=o>0?{duration:o,delay:r.get("delay"),easing:r.get("easing")}:null;i.eachRendered((function(t){if(t.states&&t.states.emphasis){if(pu(t))return;if(t instanceof jo&&function(t){var n=ya(t);n.normalFill=t.style.fill,n.normalStroke=t.style.stroke;var i=t.states.select||{};n.selectFill=i.style&&i.style.fill||null,n.selectStroke=i.style&&i.style.stroke||null}(t),t.__dirty){var i=t.prevStates;i&&t.useStates(i)}if(e){t.stateTransition=a;var r=t.getTextContent(),o=t.getTextGuideLine();r&&(r.stateTransition=a),o&&(o.stateTransition=a)}t.__dirty&&n(t)}}))}jv=function(t){var n=t._scheduler;n.restorePipelines(t._model),n.prepareStageTasks(),Yv(t,!0),Yv(t,!1),n.plan()},Yv=function(t,n){for(var i=t._model,r=t._scheduler,e=n?t._componentsViews:t._chartsViews,o=n?t._componentsMap:t._chartsMap,a=t._zr,s=t._api,u=0;u<e.length;u++)e[u].__alive=!1;function h(t){var u=t.__requireNewView;t.__requireNewView=!1;var h="_ec_"+t.id+"_"+t.type,f=!u&&o[h];if(!f){var l=fe(t.type);(f=new(n?tc.getClass(l.main,l.sub):rc.getClass(l.sub))).init(i,s),o[h]=f,e.push(f),a.add(f.group)}t.__viewId=f.__id=h,f.__alive=!0,f.__model=t,f.group.__ecComponentInfo={mainType:t.mainType,index:t.componentIndex},!n&&r.prepareView(f,t,i,s)}for(n?i.eachComponent((function(t,n){"series"!==t&&h(n)})):i.eachSeries(h),u=0;u<e.length;){var f=e[u];f.__alive?u++:(!n&&f.renderTask.dispose(),a.remove(f.group),f.dispose(i,s),e.splice(u,1),o[f.__id]===f&&delete o[f.__id],f.__id=f.group.__ecComponentInfo=null)}},Xv=function(t,n,i,r,e){var o=t._model;if(o.setUpdatePayload(i),r){var a={};a[r+"Id"]=i[r+"Id"],a[r+"Index"]=i[r+"Index"],a[r+"Name"]=i[r+"Name"];var s={mainType:r,query:a};e&&(s.subType=e);var u,h=i.excludeSeriesId;null!=h&&(u=ht(),R(Xr(h),(function(t){var n=Jr(t,null);null!=n&&u.set(n,!0)}))),o&&o.eachComponent(s,(function(n){if(!u||null===u.get(n.id))if(is(i))if(n instanceof Vl)"highlight"!==i.type||i.notBlur||n.get(["emphasis","disabled"])||function(t,n,i){var r=t.seriesIndex,e=t.getData(n.dataType);if(e){var o=ne(e,n);o=(j(o)?o[0]:o)||0;var a=e.getItemGraphicEl(o);if(!a)for(var s=e.count(),u=0;!a&&u<s;)a=e.getItemGraphicEl(u++);if(a){var h=pa(a);Xa(r,h.focus,h.blurScope,i)}else{var f=t.get(["emphasis","focus"]),l=t.get(["emphasis","blurScope"]);null!=f&&Xa(r,f,l,i)}}}(n,i,t._api);else{var r=qa(n.mainType,n.componentIndex,i.name,t._api),e=r.dispatchers;"highlight"===i.type&&r.focusSelf&&!i.notBlur&&Va(n.mainType,n.componentIndex,t._api),e&&R(e,(function(t){"highlight"===i.type?Ea(t):Pa(t)}))}else ns(i)&&n instanceof Vl&&(function(t,n){if(ns(n)){var i=n.dataType,r=ne(t.getData(i),n);j(r)||(r=[r]),t["toggleSelect"===n.type?"toggleSelect":"select"===n.type?"select":"unselect"](r,i)}}(n,i),Ga(n),od(t))}),t),o&&o.eachComponent(s,(function(n){u&&null!==u.get(n.id)||f(t["series"===r?"_chartsMap":"_componentsMap"][n.__viewId])}),t)}else R([].concat(t._componentsViews).concat(t._chartsViews),f);function f(r){r&&r.__alive&&r[n]&&r[n](r.__model,o,t._api,i)}},Vv={prepareAndUpdate:function(t){jv(this),Vv.update.call(this,t,{optionChanged:null!=t.newOption})},update:function(n,i){var r=this._model,e=this._api,o=this._zr,a=this._coordSysMgr,s=this._scheduler;if(r){r.setUpdatePayload(n),s.restoreData(r,n),s.performSeriesTasks(r),a.create(r,e),s.performDataProcessorTasks(r,n),Gv(this,r),a.update(r,e),t(r),s.performVisualTasks(r,n),td(this,r,e,n,i);var u=r.get("backgroundColor")||"transparent",h=r.get("darkMode");o.setBackgroundColor(u),null!=h&&"auto"!==h&&o.setDarkMode(h),Rv.trigger("afterupdate",r,e)}},updateTransform:function(n){var i=this,r=this._model,e=this._api;if(r){r.setUpdatePayload(n),r.eachComponent((function(t,o){if("series"!==t){var a=i.getViewOfComponentModel(o);a&&a.__alive&&a.updateTransform&&a.updateTransform(o,r,e,n)}}));var o=ht();r.eachSeries((function(t){var a=i._chartsMap[t.__viewId];if(a.updateTransform){var s=a.updateTransform(t,r,e,n);s&&s.update&&o.set(t.uid,1)}else o.set(t.uid,1)})),t(r),this._scheduler.performVisualTasks(r,n,{setDirty:!0,dirtyMap:o}),id(this,r,e,n,{},o),Rv.trigger("afterupdate",r,e)}},updateView:function(n){var i=this._model;i&&(i.setUpdatePayload(n),rc.markUpdateMethod(n,"updateView"),t(i),this._scheduler.performVisualTasks(i,n,{setDirty:!0}),td(this,i,this._api,n,{}),Rv.trigger("afterupdate",i,this._api))},updateVisual:function(n){var i=this,r=this._model;r&&(r.setUpdatePayload(n),r.eachSeries((function(t){t.getData().clearAllVisual()})),rc.markUpdateMethod(n,"updateVisual"),t(r),this._scheduler.performVisualTasks(r,n,{visualType:"visual",setDirty:!0}),r.eachComponent((function(t,e){if("series"!==t){var o=i.getViewOfComponentModel(e);o&&o.__alive&&o.updateVisual(e,r,i._api,n)}})),r.eachSeries((function(t){i._chartsMap[t.__viewId].updateVisual(t,r,i._api,n)})),Rv.trigger("afterupdate",r,this._api))},updateLayout:function(t){Vv.update.call(this,t)}},qv=function(t,n,i,r){if(!t._disposed)for(var e,o=t._model,a=t._coordSysMgr.getCoordinateSystems(),s=ee(o,i),u=0;u<a.length;u++){var h=a[u];if(h[n]&&null!=(e=h[n](o,s,r)))return e}},Gv=function(t,n){var i=t._chartsMap,r=t._scheduler;n.eachSeries((function(t){r.updateStreamModes(t,i[t.__viewId])}))},Zv=function(t,n){var i=this,r=this.getModel(),e=t.type,o=t.escapeConnect,a=cd[e],s=a.actionInfo,u=(s.update||"update").split(":"),h=u.pop(),f=null!=u[0]&&fe(u[0]);this.__flagInMainProcess=!0;var l=[t],c=!1;t.batch&&(c=!0,l=F(t.batch,(function(n){return(n=D(O({},n),t)).batch=null,n})));var v,d=[],p=ns(t),m=is(t);if(m&&Ya(this._api),R(l,(function(n){if((v=(v=a.action(n,i._model,i._api))||O({},n)).type=s.event||v.type,d.push(v),m){var r=oe(t),e=r.mainTypeSpecified?r.queryOptionMap.keys()[0]:"series";Xv(i,h,n,e),od(i)}else p?(Xv(i,h,n,"series"),od(i)):f&&Xv(i,h,n,f.main,f.sub)})),"none"!==h&&!m&&!p&&!f)try{this.__pendingUpdate?(jv(this),Vv.update.call(this,t),this.__pendingUpdate=null):Vv[h].call(this,t)}catch(t){throw this.__flagInMainProcess=!1,t}if(v=c?{type:s.event||e,escapeConnect:o,batch:d}:d[0],this.__flagInMainProcess=!1,!n){var g=this._messageCenter;if(g.trigger(v.type,v),p){var y={type:"selectchanged",escapeConnect:o,selected:Za(r),isFromClick:t.isFromClick||!1,fromAction:t.type,fromActionPayload:t};g.trigger(y.type,y)}}},Kv=function(t){for(var n=this._pendingActions;n.length;){var i=n.shift();Zv.call(this,i,t)}},$v=function(t){!t&&this.trigger("updated")},Jv=function(t,n){t.on("rendered",(function(i){n.trigger("rendered",i),!t.animation.isFinished()||n.__pendingUpdate||n._scheduler.unfinished||n._pendingActions.length||n.trigger("finished")}))},Qv=function(t,n){t.on("mouseover",(function(t){var i=Zc(t.target,ts);i&&(function(t,n,i){var r=pa(t),e=qa(r.componentMainType,r.componentIndex,r.componentHighDownName,i),o=e.dispatchers;o?(e.focusSelf&&Va(r.componentMainType,r.componentIndex,i),R(o,(function(t){return Ra(t,n)}))):(Xa(r.seriesIndex,r.focus,r.blurScope,i),"self"===r.focus&&Va(r.componentMainType,r.componentIndex,i),Ra(t,n))}(i,t,n._api),od(n))})).on("mouseout",(function(t){var i=Zc(t.target,ts);i&&(function(t,n,i){Ya(i);var r=pa(t),e=qa(r.componentMainType,r.componentIndex,r.componentHighDownName,i).dispatchers;e?R(e,(function(t){return Fa(t,n)})):Fa(t,n)}(i,t,n._api),od(n))})).on("click",(function(t){var i=Zc(t.target,(function(t){return null!=pa(t).dataIndex}),!0);if(i){var r=i.selected?"unselect":"select",e=pa(i);n._api.dispatchAction({type:r,dataType:e.dataType,dataIndexInside:e.dataIndex,seriesIndex:e.seriesIndex,isFromClick:!0})}}))},td=function(t,n,i,r,e){!function(t){var n=[],i=[],r=!1;if(t.eachComponent((function(t,e){var o=e.get("zlevel")||0,a=e.get("z")||0,s=e.getZLevelKey();r=r||!!s,("series"===t?i:n).push({zlevel:o,z:a,idx:e.componentIndex,type:t,key:s})})),r){var e,o,a=n.concat(i);sn(a,(function(t,n){return t.zlevel===n.zlevel?t.z-n.z:t.zlevel-n.zlevel})),R(a,(function(n){var i=t.getComponent(n.type,n.idx),r=n.zlevel,a=n.key;null!=e&&(r=Math.max(e,r)),a?(r===e&&a!==o&&r++,o=a):o&&(r===e&&r++,o=""),e=r,i.setZLevel(r)}))}}(n),nd(t,n,i,r,e),R(t._chartsViews,(function(t){t.__alive=!1})),id(t,n,i,r,e),R(t._chartsViews,(function(t){t.__alive||t.remove(n,i)}))},nd=function(t,n,r,a,s,u){R(u||t._componentsViews,(function(t){var s=t.__model;e(0,t),t.render(s,n,r,a),i(s,t),o(s,t)}))},id=function(t,n,r,a,s,u){var h=t._scheduler;s=O(s||{},{updatedSeries:n.getSeries()}),Rv.trigger("series:beforeupdate",n,r,s);var l=!1;n.eachSeries((function(n){var i=t._chartsMap[n.__viewId];i.__alive=!0;var r=i.renderTask;h.updatePayload(r,a),e(0,i),u&&u.get(n.uid)&&r.dirty(),r.perform(h.getPerformArgs(r))&&(l=!0),i.group.silent=!!n.get("silent"),function(t,n){var i=t.get("blendMode")||null;n.eachRendered((function(t){t.isGroup||(t.style.blend=i)}))}(n,i),Ga(n)})),h.unfinished=l||h.unfinished,Rv.trigger("series:layoutlabels",n,r,s),Rv.trigger("series:transition",n,r,s),n.eachSeries((function(n){var r=t._chartsMap[n.__viewId];i(n,r),o(n,r)})),function(t,n){var i=0;t._zr.storage.traverse((function(t){t.isGroup||i++})),i>n.get("hoverLayerThreshold")&&!f.node&&!f.worker&&n.eachSeries((function(n){if(!n.preventUsingHoverLayer){var i=t._chartsMap[n.__viewId];i.__alive&&i.eachRendered((function(t){t.states.emphasis&&(t.states.emphasis.hoverLayer=!0)}))}}))}(t,n),Rv.trigger("series:afterupdate",n,r,s)},od=function(t){t.__needsUpdateStatus=!0,t.getZr().wakeUp()},ad=function(t){t.__needsUpdateStatus&&(t.getZr().storage.traverse((function(t){pu(t)||n(t)})),t.__needsUpdateStatus=!1)},rd=function(t){return new(function(n){function i(){return null!==n&&n.apply(this,arguments)||this}return u(i,n),i.prototype.getCoordinateSystems=function(){return t._coordSysMgr.getCoordinateSystems()},i.prototype.getComponentByElement=function(n){for(;n;){var i=n.__ecComponentInfo;if(null!=i)return t._model.getComponent(i.mainType,i.index);n=n.parent}},i.prototype.enterEmphasis=function(n,i){Ea(n,i),od(t)},i.prototype.leaveEmphasis=function(n,i){Pa(n,i),od(t)},i.prototype.enterBlur=function(n){!function(t){za(t,Ia)}(n),od(t)},i.prototype.leaveBlur=function(n){Wa(n),od(t)},i.prototype.enterSelect=function(n){Ha(n),od(t)},i.prototype.leaveSelect=function(n){Ua(n),od(t)},i.prototype.getModel=function(){return t.getModel()},i.prototype.getViewOfComponentModel=function(n){return t.getViewOfComponentModel(n)},i.prototype.getViewOfSeriesModel=function(n){return t.getViewOfSeriesModel(n)},i}(af))(t)},ed=function(t){function n(t,n){for(var i=0;i<t.length;i++)t[i].__connectUpdateStatus=n}R(vd,(function(i,r){t._messageCenter.on(r,(function(i){if(wd[t.group]&&0!==t.__connectUpdateStatus){if(i&&i.escapeConnect)return;var r=t.makeActionFromEvent(i),e=[];R(bd,(function(n){n!==t&&n.group===t.group&&e.push(n)})),n(e,0),R(e,(function(t){1!==t.__connectUpdateStatus&&t.dispatchAction(r)})),n(e,2)}}))}))}}(),n}(Ot),fd=hd.prototype;fd.on=Wv("on"),fd.off=Wv("off"),fd.one=function(t,n,i){var r=this;this.on.call(this,t,(function i(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];n&&n.apply&&n.apply(this,e),r.off(t,i)}),i)};var ld=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"],cd={},vd={},dd=[],pd=[],md=[],gd={},yd={},bd={},wd={},xd=+new Date-0,Md="_echarts_instance_";function kd(t,n){gd[t]=n}function Sd(t){z(pd,t)<0&&pd.push(t)}function Ad(t,n){Ld(dd,t,n,2e3)}function Cd(t,n){Rv.on(t,n)}function Td(t,n,i){Y(n)&&(i=n,n="");var r=G(t)?t.type:[t,t={event:n}][0];t.event=(t.event||r).toLowerCase(),vd[n=t.event]||(et(Pv.test(r)&&Pv.test(n)),cd[r]||(cd[r]={action:i,actionInfo:t}),vd[n]=r)}function Id(t,n){Ld(md,t,n,3e3,"visual")}var Nd=[];function Ld(t,n,i,r,e){if((Y(n)||G(n))&&(i=n,n=r),!(z(Nd,i)>=0)){Nd.push(i);var o=Sc.wrapStageHandler(i,e);o.__prio=n,o.__raw=i,t.push(o)}}function Od(t,n){yd[t]=n}function Dd(t){return null==t?0:t.length||1}function zd(t){return t}Id(2e3,bc),Id(4500,xc),Id(4500,Mc),Id(2e3,Vc),Id(4500,qc),Id(7e3,(function(t,n){t.eachRawSeries((function(i){if(!t.isSeriesFiltered(i)){var r=i.getData();r.hasItemVisual()&&r.each((function(t){var i=r.getItemVisual(t,"decal");i&&(r.ensureUniqueItemVisual(t,"style").decal=Dv(i,n))}));var e=r.getVisual("decal");e&&(r.getVisual("style").decal=Dv(e,n))}}))})),Sd(Lf),Ad(900,(function(t){var n=ht();t.eachSeries((function(t){var i=t.get("stack");if(i){var r=n.get(i)||n.set(i,[]),e=t.getData(),o={stackResultDimension:e.getCalculationInfo("stackResultDimension"),stackedOverDimension:e.getCalculationInfo("stackedOverDimension"),stackedDimension:e.getCalculationInfo("stackedDimension"),stackedByDimension:e.getCalculationInfo("stackedByDimension"),isStackedByIndex:e.getCalculationInfo("isStackedByIndex"),data:e,seriesModel:t};if(!o.stackedDimension||!o.isStackedByIndex&&!o.stackedByDimension)return;r.length&&e.setCalculationInfo("stackedOnSeries",r[r.length-1].seriesModel),r.push(o)}})),n.each(Of)})),Od("default",(function(t,n){D(n=n||{},{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var i=new Cr,r=new na({style:{fill:n.maskColor},zlevel:n.zlevel,z:1e4});i.add(r);var e,o=new ea({style:{text:n.text,fill:n.textColor,fontSize:n.fontSize,fontWeight:n.fontWeight,fontStyle:n.fontStyle,fontFamily:n.fontFamily},zlevel:n.zlevel,z:10001}),a=new na({style:{fill:"none"},textContent:o,textConfig:{position:"right",distance:10},zlevel:n.zlevel,z:10001});return i.add(a),n.showSpinner&&((e=new Qs({shape:{startAngle:-kc/2,endAngle:-kc/2+.1,r:n.spinnerRadius},style:{stroke:n.color,lineCap:"round",lineWidth:n.lineWidth},zlevel:n.zlevel,z:10001})).animateShape(!0).when(1e3,{endAngle:3*kc/2}).start("circularInOut"),e.animateShape(!0).when(1e3,{startAngle:3*kc/2}).delay(300).start("circularInOut"),i.add(e)),i.resize=function(){var i=o.getBoundingRect().width,s=n.showSpinner?n.spinnerRadius:0,u=(t.getWidth()-2*s-(n.showSpinner&&i?10:0)-i)/2-(n.showSpinner&&i?0:5+i/2)+(n.showSpinner?0:i/2)+(i?0:s),h=t.getHeight()/2;n.showSpinner&&e.setShape({cx:u,cy:h}),a.setShape({x:u-s,y:h-s,width:2*s,height:2*s}),r.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},i.resize(),i})),Td({type:"highlight",event:"highlight",update:"highlight"},vt),Td({type:"downplay",event:"downplay",update:"downplay"},vt),Td({type:"select",event:"select",update:"select"},vt),Td({type:"unselect",event:"unselect",update:"unselect"},vt),Td({type:"toggleSelect",event:"toggleSelect",update:"toggleSelect"},vt),kd("light",Wc),kd("dark",Uc);var Bd=function(){function t(t,n,i,r,e,o){this._old=t,this._new=n,this._oldKeyGetter=i||zd,this._newKeyGetter=r||zd,this.context=e,this._diffModeMultiple="multiple"===o}return t.prototype.add=function(t){return this._add=t,this},t.prototype.update=function(t){return this._update=t,this},t.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},t.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},t.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},t.prototype.remove=function(t){return this._remove=t,this},t.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},t.prototype._executeOneToOne=function(){var t=this._old,n=this._new,i={},r=new Array(t.length),e=new Array(n.length);this._initIndexMap(t,null,r,"_oldKeyGetter"),this._initIndexMap(n,i,e,"_newKeyGetter");for(var o=0;o<t.length;o++){var a=r[o],s=i[a],u=Dd(s);if(u>1){var h=s.shift();1===s.length&&(i[a]=s[0]),this._update&&this._update(h,o)}else 1===u?(i[a]=null,this._update&&this._update(s,o)):this._remove&&this._remove(o)}this._performRestAdd(e,i)},t.prototype._executeMultiple=function(){var t=this._new,n={},i={},r=[],e=[];this._initIndexMap(this._old,n,r,"_oldKeyGetter"),this._initIndexMap(t,i,e,"_newKeyGetter");for(var o=0;o<r.length;o++){var a=r[o],s=n[a],u=i[a],h=Dd(s),f=Dd(u);if(h>1&&1===f)this._updateManyToOne&&this._updateManyToOne(u,s),i[a]=null;else if(1===h&&f>1)this._updateOneToMany&&this._updateOneToMany(u,s),i[a]=null;else if(1===h&&1===f)this._update&&this._update(u,s),i[a]=null;else if(h>1&&f>1)this._updateManyToMany&&this._updateManyToMany(u,s),i[a]=null;else if(h>1)for(var l=0;l<h;l++)this._remove&&this._remove(s[l]);else this._remove&&this._remove(s)}this._performRestAdd(e,i)},t.prototype._performRestAdd=function(t,n){for(var i=0;i<t.length;i++){var r=t[i],e=n[r],o=Dd(e);if(o>1)for(var a=0;a<o;a++)this._add&&this._add(e[a]);else 1===o&&this._add&&this._add(e);n[r]=null}},t.prototype._initIndexMap=function(t,n,i,r){for(var e=this._diffModeMultiple,o=0;o<t.length;o++){var a="_ec_"+this[r](t[o],o);if(e||(i[o]=a),n){var s=n[a],u=Dd(s);0===u?(n[a]=o,e&&i.push(a)):1===u?n[a]=[s,o]:s.push(o)}}},t}(),_d=function(){function t(t,n){this._encode=t,this._schema=n}return t.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},t.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},t}();function Rd(t,n){return t.hasOwnProperty(n)||(t[n]=[]),t[n]}var Fd=function(t){this.otherDims={},null!=t&&O(this,t)},Ed=ie(),Pd={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},Wd=function(){function t(t){this.dimensions=t.dimensions,this._dimOmitted=t.dimensionOmitted,this.source=t.source,this._fullDimCount=t.fullDimensionCount,this._updateDimOmitted(t.dimensionOmitted)}return t.prototype.isDimensionOmitted=function(){return this._dimOmitted},t.prototype._updateDimOmitted=function(t){this._dimOmitted=t,t&&(this._dimNameMap||(this._dimNameMap=Ud(this.source)))},t.prototype.getSourceDimensionIndex=function(t){return tt(this._dimNameMap.get(t),-1)},t.prototype.getSourceDimension=function(t){var n=this.source.dimensionsDefine;if(n)return n[t]},t.prototype.makeStoreSchema=function(){for(var t=this._fullDimCount,n=function(t){var n=t.sourceFormat;return"objectRows"===n||"keyedColumns"===n}(this.source),i=!jd(t),r="",e=[],o=0,a=0;o<t;o++){var s=void 0,u=void 0,h=void 0,f=this.dimensions[a];if(f&&f.storeDimIndex===o)s=n?f.name:null,u=f.type,h=f.ordinalMeta,a++;else{var l=this.getSourceDimension(o);l&&(s=n?l.name:null,u=l.type)}e.push({property:s,type:u,ordinalMeta:h}),!n||null==s||f&&f.isCalculationCoord||(r+=i?s.replace(/\`/g,"`1").replace(/\$/g,"`2"):s),r+="$",r+=Pd[u]||"f",h&&(r+=h.uid),r+="$"}var c=this.source;return{dimensions:e,hash:[c.seriesLayoutBy,c.startIndex,r].join("$$")}},t.prototype.makeOutputDimensionNames=function(){for(var t=[],n=0,i=0;n<this._fullDimCount;n++){var r=void 0,e=this.dimensions[i];if(e&&e.storeDimIndex===n)e.isCalculationCoord||(r=e.name),i++;else{var o=this.getSourceDimension(n);o&&(r=o.name)}t.push(r)}return t},t.prototype.appendCalculationDimension=function(t){this.dimensions.push(t),t.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},t}();function Hd(t){for(var n=ht(),i=0;i<(t||[]).length;i++){var r=t[i],e=G(r)?r.name:r;null!=e&&null==n.get(e)&&n.set(e,i)}return n}function Ud(t){var n=Ed(t);return n.dimNameMap||(n.dimNameMap=Hd(t.dimensionsDefine))}function jd(t){return t>30}var Yd,Xd,Vd,qd,Gd,Zd,Kd,$d=G,Jd=F,Qd="undefined"==typeof Int32Array?Array:Int32Array,tp=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],np=["_approximateExtent"],ip=function(){function t(t,n){var i;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","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var r=!1;t instanceof Wd?(i=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(r=!0,i=t),i=i||["x","y"];for(var e={},o=[],a={},s=!1,u={},h=0;h<i.length;h++){var f=i[h],l=X(f)?new Fd({name:f}):f instanceof Fd?f:new Fd(f),c=l.name;l.type=l.type||"float",l.coordDim||(l.coordDim=c,l.coordDimIndex=0);var v=l.otherDims=l.otherDims||{};o.push(c),e[c]=l,null!=u[c]&&(s=!0),l.createInvertedIndices&&(a[c]=[]),0===v.itemName&&(this._nameDimIdx=h),0===v.itemId&&(this._idDimIdx=h),r&&(l.storeDimIndex=h)}if(this.dimensions=o,this._dimInfos=e,this._initGetDimensionInfo(s),this.hostModel=n,this._invertedIndicesMap=a,this._dimOmitted){var d=this._dimIdxToName=ht();R(o,(function(t){d.set(e[t].storeDimIndex,t)}))}}return t.prototype.getDimension=function(t){var n=this._recognizeDimIndex(t);if(null==n)return t;if(n=t,!this._dimOmitted)return this.dimensions[n];var i=this._dimIdxToName.get(n);if(null!=i)return i;var r=this._schema.getSourceDimension(n);return r?r.name:void 0},t.prototype.getDimensionIndex=function(t){var n=this._recognizeDimIndex(t);if(null!=n)return n;if(null==t)return-1;var i=this._getDimInfo(t);return i?i.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(t):-1},t.prototype._recognizeDimIndex=function(t){if(q(t)||null!=t&&!isNaN(t)&&!this._getDimInfo(t)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(t)<0))return+t},t.prototype._getStoreDimIndex=function(t){return this.getDimensionIndex(t)},t.prototype.getDimensionInfo=function(t){return this._getDimInfo(this.getDimension(t))},t.prototype._initGetDimensionInfo=function(t){var n=this._dimInfos;this._getDimInfo=t?function(t){return n.hasOwnProperty(t)?n[t]:void 0}:function(t){return n[t]}},t.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},t.prototype.mapDimension=function(t,n){var i=this._dimSummary;if(null==n)return i.encodeFirstDimNotExtra[t];var r=i.encode[t];return r?r[n]:null},t.prototype.mapDimensionsAll=function(t){return(this._dimSummary.encode[t]||[]).slice()},t.prototype.getStore=function(){return this._store},t.prototype.initData=function(t,n,i){var r,e=this;if(t instanceof Cl&&(r=t),!r){var o=this.dimensions,a=Ef(t)||_(t)?new Yf(t,o.length):t;r=new Cl;var s=Jd(o,(function(t){return{type:e._dimInfos[t].type,property:t}}));r.initData(a,s,i)}this._store=r,this._nameList=(n||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,r.count()),this._dimSummary=function(t,n){var i={},r=i.encode={},e=ht(),o=[],a=[],s={};R(t.dimensions,(function(n){var i,u=t.getDimensionInfo(n),h=u.coordDim;if(h){var f=u.coordDimIndex;Rd(r,h)[f]=n,u.isExtraCoord||(e.set(h,1),"ordinal"!==(i=u.type)&&"time"!==i&&(o[0]=n),Rd(s,h)[f]=t.getDimensionIndex(u.name)),u.defaultTooltip&&a.push(n)}Ph.each((function(t,n){var i=Rd(r,n),e=u.otherDims[n];null!=e&&!1!==e&&(i[e]=u.name)}))}));var u=[],h={};e.each((function(t,n){var i=r[n];h[n]=i[0],u=u.concat(i)})),i.dataDimsOnCoord=u,i.dataDimIndicesOnCoord=F(u,(function(n){return t.getDimensionInfo(n).storeDimIndex})),i.encodeFirstDimNotExtra=h;var f=r.label;f&&f.length&&(o=f.slice());var l=r.tooltip;return l&&l.length?a=l.slice():a.length||(a=o.slice()),r.defaultedLabel=o,r.defaultedTooltip=a,i.userOutput=new _d(s,n),i}(this,this._schema),this.userOutput=this._dimSummary.userOutput},t.prototype.appendData=function(t){var n=this._store.appendData(t);this._doInit(n[0],n[1])},t.prototype.appendValues=function(t,n){var i=this._store.appendValues(t,n.length),r=i.start,e=i.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),n)for(var a=r;a<e;a++)this._nameList[a]=n[a-r],o&&Kd(this,a)},t.prototype._updateOrdinalMeta=function(){for(var t=this._store,n=this.dimensions,i=0;i<n.length;i++){var r=this._dimInfos[n[i]];r.ordinalMeta&&t.collectOrdinalMeta(r.storeDimIndex,r.ordinalMeta)}},t.prototype._shouldMakeIdFromName=function(){var t=this._store.getProvider();return null==this._idDimIdx&&"typedArray"!==t.getSource().sourceFormat&&!t.fillStorage},t.prototype._doInit=function(t,n){if(!(t>=n)){var i=this._store.getProvider();this._updateOrdinalMeta();var r=this._nameList,e=this._idList;if("original"===i.getSource().sourceFormat&&!i.pure)for(var o=[],a=t;a<n;a++){var s=i.getItem(a,o);if(!this.hasItemOption&&Zr(s)&&(this.hasItemOption=!0),s){var u=s.name;null==r[a]&&null!=u&&(r[a]=Jr(u,null));var h=s.id;null==e[a]&&null!=h&&(e[a]=Jr(h,null))}}if(this._shouldMakeIdFromName())for(a=t;a<n;a++)Kd(this,a);Yd(this)}},t.prototype.getApproximateExtent=function(t){return this._approximateExtent[t]||this._store.getDataExtent(this._getStoreDimIndex(t))},t.prototype.setApproximateExtent=function(t,n){n=this.getDimension(n),this._approximateExtent[n]=t.slice()},t.prototype.getCalculationInfo=function(t){return this._calculationInfo[t]},t.prototype.setCalculationInfo=function(t,n){$d(t)?O(this._calculationInfo,t):this._calculationInfo[t]=n},t.prototype.getName=function(t){var n=this.getRawIndex(t),i=this._nameList[n];return null==i&&null!=this._nameDimIdx&&(i=Vd(this,this._nameDimIdx,n)),null==i&&(i=""),i},t.prototype._getCategory=function(t,n){var i=this._store.get(t,n),r=this._store.getOrdinalMeta(t);return r?r.categories[i]:i},t.prototype.getId=function(t){return Xd(this,this.getRawIndex(t))},t.prototype.count=function(){return this._store.count()},t.prototype.get=function(t,n){var i=this._dimInfos[t];if(i)return this._store.get(i.storeDimIndex,n)},t.prototype.getByRawIndex=function(t,n){var i=this._dimInfos[t];if(i)return this._store.getByRawIndex(i.storeDimIndex,n)},t.prototype.getIndices=function(){return this._store.getIndices()},t.prototype.getDataExtent=function(t){return this._store.getDataExtent(this._getStoreDimIndex(t))},t.prototype.getSum=function(t){return this._store.getSum(this._getStoreDimIndex(t))},t.prototype.getMedian=function(t){return this._store.getMedian(this._getStoreDimIndex(t))},t.prototype.getValues=function(t,n){var i=this,r=this._store;return j(t)?r.getValues(Jd(t,(function(t){return i._getStoreDimIndex(t)})),n):r.getValues(t)},t.prototype.hasValue=function(t){for(var n=this._dimSummary.dataDimIndicesOnCoord,i=0,r=n.length;i<r;i++)if(isNaN(this._store.get(n[i],t)))return!1;return!0},t.prototype.indexOfName=function(t){for(var n=0,i=this._store.count();n<i;n++)if(this.getName(n)===t)return n;return-1},t.prototype.getRawIndex=function(t){return this._store.getRawIndex(t)},t.prototype.indexOfRawIndex=function(t){return this._store.indexOfRawIndex(t)},t.prototype.rawIndexOf=function(t,n){var i=(t&&this._invertedIndicesMap[t])[n];return null==i||isNaN(i)?-1:i},t.prototype.indicesOfNearest=function(t,n,i){return this._store.indicesOfNearest(this._getStoreDimIndex(t),n,i)},t.prototype.each=function(t,n,i){Y(t)&&(i=n,n=t,t=[]);var r=i||this,e=Jd(qd(t),this._getStoreDimIndex,this);this._store.each(e,r?H(n,r):n)},t.prototype.filterSelf=function(t,n,i){Y(t)&&(i=n,n=t,t=[]);var r=i||this,e=Jd(qd(t),this._getStoreDimIndex,this);return this._store=this._store.filter(e,r?H(n,r):n),this},t.prototype.selectRange=function(t){var n=this,i={};return R(W(t),(function(r){var e=n._getStoreDimIndex(r);i[e]=t[r]})),this._store=this._store.selectRange(i),this},t.prototype.mapArray=function(t,n,i){Y(t)&&(i=n,n=t,t=[]);var r=[];return this.each(t,(function(){r.push(n&&n.apply(this,arguments))}),i=i||this),r},t.prototype.map=function(t,n,i,r){var e=i||r||this,o=Jd(qd(t),this._getStoreDimIndex,this),a=Zd(this);return a._store=this._store.map(o,e?H(n,e):n),a},t.prototype.modify=function(t,n,i,r){var e=i||r||this,o=Jd(qd(t),this._getStoreDimIndex,this);this._store.modify(o,e?H(n,e):n)},t.prototype.downSample=function(t,n,i,r){var e=Zd(this);return e._store=this._store.downSample(this._getStoreDimIndex(t),n,i,r),e},t.prototype.lttbDownSample=function(t,n){var i=Zd(this);return i._store=this._store.lttbDownSample(this._getStoreDimIndex(t),n),i},t.prototype.getRawDataItem=function(t){return this._store.getRawDataItem(t)},t.prototype.getItemModel=function(t){var n=this.hostModel,i=this.getRawDataItem(t);return new ah(i,n,n&&n.ecModel)},t.prototype.diff=function(t){var n=this;return new Bd(t?t.getStore().getIndices():[],this.getStore().getIndices(),(function(n){return Xd(t,n)}),(function(t){return Xd(n,t)}))},t.prototype.getVisual=function(t){var n=this._visual;return n&&n[t]},t.prototype.setVisual=function(t,n){this._visual=this._visual||{},$d(t)?O(this._visual,t):this._visual[t]=n},t.prototype.getItemVisual=function(t,n){var i=this._itemVisuals[t],r=i&&i[n];return null==r?this.getVisual(n):r},t.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},t.prototype.ensureUniqueItemVisual=function(t,n){var i=this._itemVisuals,r=i[t];r||(r=i[t]={});var e=r[n];return null==e&&(j(e=this.getVisual(n))?e=e.slice():$d(e)&&(e=O({},e)),r[n]=e),e},t.prototype.setItemVisual=function(t,n,i){var r=this._itemVisuals[t]||{};this._itemVisuals[t]=r,$d(n)?O(r,n):r[n]=i},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(t,n){$d(t)?O(this._layout,t):this._layout[t]=n},t.prototype.getLayout=function(t){return this._layout[t]},t.prototype.getItemLayout=function(t){return this._itemLayouts[t]},t.prototype.setItemLayout=function(t,n,i){this._itemLayouts[t]=i?O(this._itemLayouts[t]||{},n):n},t.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},t.prototype.setItemGraphicEl=function(t,n){!function(t,n,i,r){if(r){var e=pa(r);e.dataIndex=i,e.dataType=n,e.seriesIndex=t,"group"===r.type&&r.traverse((function(r){var e=pa(r);e.seriesIndex=t,e.dataIndex=i,e.dataType=n}))}}(this.hostModel&&this.hostModel.seriesIndex,this.dataType,t,n),this._graphicEls[t]=n},t.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},t.prototype.eachItemGraphicEl=function(t,n){R(this._graphicEls,(function(i,r){i&&t&&t.call(n,i,r)}))},t.prototype.cloneShallow=function(n){return n||(n=new t(this._schema?this._schema:Jd(this.dimensions,this._getDimInfo,this),this.hostModel)),Gd(n,this),n._store=this._store,n},t.prototype.wrapMethod=function(t,n){var i=this[t];Y(i)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=i.apply(this,arguments);return n.apply(this,[t].concat(it(arguments)))})},t.internalField=(Yd=function(t){var n=t._invertedIndicesMap;R(n,(function(i,r){var e=t._dimInfos[r],o=e.ordinalMeta,a=t._store;if(o){i=n[r]=new Qd(o.categories.length);for(var s=0;s<i.length;s++)i[s]=-1;for(s=0;s<a.count();s++)i[a.get(e.storeDimIndex,s)]=s}}))},Vd=function(t,n,i){return Jr(t._getCategory(n,i),null)},Xd=function(t,n){var i=t._idList[n];return null==i&&null!=t._idDimIdx&&(i=Vd(t,t._idDimIdx,n)),null==i&&(i="e\0\0"+n),i},qd=function(t){return j(t)||(t=null!=t?[t]:[]),t},Zd=function(n){var i=new t(n._schema?n._schema:Jd(n.dimensions,n._getDimInfo,n),n.hostModel);return Gd(i,n),i},Gd=function(t,n){R(tp.concat(n.__wrappedMethods||[]),(function(i){n.hasOwnProperty(i)&&(t[i]=n[i])})),t.__wrappedMethods=n.__wrappedMethods,R(np,(function(i){t[i]=N(n[i])})),t._calculationInfo=O({},n._calculationInfo)},void(Kd=function(t,n){var i=t._nameList,r=t._idList,e=t._nameDimIdx,o=t._idDimIdx,a=i[n],s=r[n];if(null==a&&null!=e&&(i[n]=a=Vd(t,e,n)),null==s&&null!=o&&(r[n]=s=Vd(t,o,n)),null==s&&null!=a){var u=t._nameRepeatCount,h=u[a]=(u[a]||0)+1;s=a,h>1&&(s+="__ec__"+h),r[n]=s}})),t}();function rp(t,n,i){var r=n.data;if(i||r.hasOwnProperty(t)){for(var e=0;r.hasOwnProperty(t+e);)e++;t+=e}return n.set(t,!0),t}function ep(t,n){return"category"===t.type?t.scale.getLabel(n):n.value}var op=[],ap={registerPreprocessor:Sd,registerProcessor:Ad,registerPostInit:function(t){Cd("afterinit",t)},registerPostUpdate:function(t){Cd("afterupdate",t)},registerUpdateLifecycle:Cd,registerAction:Td,registerCoordinateSystem:function(t,n){uf.register(t,n)},registerLayout:function(t,n){Ld(md,t,n,1e3,"layout")},registerVisual:Id,registerTransform:function(t){var n=(t=N(t)).type;n||jr("");var i=n.split(":");2!==i.length&&jr("");var r=!1;"echarts"===i[0]&&(n=i[1],r=!0),t.__isBuiltIn=r,pl.set(n,t)},registerLoading:Od,registerMap:function(t,n,i){var r=Fv.registerMap;r&&r(t,n,i)},registerImpl:function(t,n){Fv[t]=n},PRIORITY:{PROCESSOR:{FILTER:1e3,SERIES_FILTER:800,STATISTIC:5e3},VISUAL:{LAYOUT:1e3,PROGRESSIVE_LAYOUT:1100,GLOBAL:2e3,CHART:3e3,POST_CHART_LAYOUT:4600,COMPONENT:4e3,BRUSH:5e3,CHART_ITEM:4500,ARIA:6e3,DECAL:7e3}},ComponentModel:_h,ComponentView:tc,SeriesModel:Vl,ChartView:rc,registerComponentModel:function(t){_h.registerClass(t)},registerComponentView:function(t){tc.registerClass(t)},registerSeriesModel:function(t){Vl.registerClass(t)},registerChartView:function(t){rc.registerClass(t)},registerSubTypeDefaulter:function(t,n){_h.registerSubTypeDefaulter(t,n)},registerPainter:function(t,n){Tr[t]=n}};function sp(t){j(t)?R(t,(function(t){sp(t)})):z(op,t)>=0||(op.push(t),Y(t)&&(t={install:t}),t.install(ap))}var up=2*Math.PI,hp=ko.CMD,fp=["top","right","bottom","left"];function lp(t,n,i,r,e){var o=i.width,a=i.height;switch(t){case"top":r.set(i.x+o/2,i.y-n),e.set(0,-1);break;case"bottom":r.set(i.x+o/2,i.y+a+n),e.set(0,1);break;case"left":r.set(i.x-n,i.y+a/2),e.set(-1,0);break;case"right":r.set(i.x+o+n,i.y+a/2),e.set(1,0)}}function cp(t,n,i,r,e,o,a,s,u){a-=t,s-=n;var h=Math.sqrt(a*a+s*s),f=(a/=h)*i+t,l=(s/=h)*i+n;if(Math.abs(r-e)%up<1e-4)return u[0]=f,u[1]=l,h-i;if(o){var c=r;r=Io(e),e=Io(c)}else r=Io(r),e=Io(e);r>e&&(e+=up);var v=Math.atan2(s,a);if(v<0&&(v+=up),v>=r&&v<=e||v+up>=r&&v+up<=e)return u[0]=f,u[1]=l,h-i;var d=i*Math.cos(r)+t,p=i*Math.sin(r)+n,m=i*Math.cos(e)+t,g=i*Math.sin(e)+n,y=(d-a)*(d-a)+(p-s)*(p-s),b=(m-a)*(m-a)+(g-s)*(g-s);return y<b?(u[0]=d,u[1]=p,Math.sqrt(y)):(u[0]=m,u[1]=g,Math.sqrt(b))}function vp(t,n,i,r,e,o,a,s){var u=e-t,h=o-n,f=i-t,l=r-n,c=Math.sqrt(f*f+l*l),v=(u*(f/=c)+h*(l/=c))/c;s&&(v=Math.min(Math.max(v,0),1));var d=a[0]=t+(v*=c)*f,p=a[1]=n+v*l;return Math.sqrt((d-e)*(d-e)+(p-o)*(p-o))}function dp(t,n,i,r,e,o,a){i<0&&(t+=i,i=-i),r<0&&(n+=r,r=-r);var s=t+i,u=n+r,h=a[0]=Math.min(Math.max(e,t),s),f=a[1]=Math.min(Math.max(o,n),u);return Math.sqrt((h-e)*(h-e)+(f-o)*(f-o))}var pp=[];function mp(t,n,i){var r=dp(n.x,n.y,n.width,n.height,t.x,t.y,pp);return i.set(pp[0],pp[1]),r}function gp(t,n,i){for(var r,e,o=0,a=0,s=0,u=0,h=1/0,f=n.data,l=t.x,c=t.y,v=0;v<f.length;){var d=f[v++];1===v&&(s=o=f[v],u=a=f[v+1]);var p=h;switch(d){case hp.M:o=s=f[v++],a=u=f[v++];break;case hp.L:p=vp(o,a,f[v],f[v+1],l,c,pp,!0),o=f[v++],a=f[v++];break;case hp.C:p=In(o,a,f[v++],f[v++],f[v++],f[v++],f[v],f[v+1],l,c,pp),o=f[v++],a=f[v++];break;case hp.Q:p=Bn(o,a,f[v++],f[v++],f[v],f[v+1],l,c,pp),o=f[v++],a=f[v++];break;case hp.A:var m=f[v++],g=f[v++],y=f[v++],b=f[v++],w=f[v++],x=f[v++];v+=1;var M=!!(1-f[v++]);r=Math.cos(w)*y+m,e=Math.sin(w)*b+g,v<=1&&(s=r,u=e),p=cp(m,g,b,w,w+x,M,(l-m)*b/y+m,c,pp),o=Math.cos(w+x)*y+m,a=Math.sin(w+x)*b+g;break;case hp.R:p=dp(s=o=f[v++],u=a=f[v++],f[v++],f[v++],l,c,pp);break;case hp.Z:p=vp(o,a,s,u,l,c,pp,!0),o=s,a=u}p<h&&(h=p,i.set(pp[0],pp[1]))}return h}var yp=new Ji,bp=new Ji,wp=new Ji,xp=new Ji,Mp=new Ji;function kp(t,n){if(t){var i=t.getTextGuideLine(),r=t.getTextContent();if(r&&i){var e=t.textGuideLineConfig||{},o=[[0,0],[0,0],[0,0]],a=e.candidates||fp,s=r.getBoundingRect().clone();s.applyTransform(r.getComputedTransform());var u=1/0,h=e.anchor,f=t.getComputedTransform(),l=f&&ji([],f),c=n.get("length2")||0;h&&wp.copy(h);for(var v=0;v<a.length;v++){lp(a[v],0,s,yp,xp),Ji.scaleAndAdd(bp,yp,xp,c),bp.transform(l);var d=t.getBoundingRect(),p=h?h.distance(bp):t instanceof jo?gp(bp,t.path,wp):mp(bp,d,wp);p<u&&(u=p,bp.transform(f),wp.transform(f),wp.toArray(o[0]),bp.toArray(o[1]),yp.toArray(o[2]))}Cp(o,n.get("minTurnAngle")),i.setShape({points:o})}}}var Sp=[],Ap=new Ji;function Cp(t,n){if(n<=180&&n>0){n=n/180*Math.PI,yp.fromArray(t[0]),bp.fromArray(t[1]),wp.fromArray(t[2]),Ji.sub(xp,yp,bp),Ji.sub(Mp,wp,bp);var i=xp.len(),r=Mp.len();if(!(i<.001||r<.001)){xp.scale(1/i),Mp.scale(1/r);var e=xp.dot(Mp);if(Math.cos(n)<e){var o=vp(bp.x,bp.y,wp.x,wp.y,yp.x,yp.y,Sp,!1);Ap.fromArray(Sp),Ap.scaleAndAdd(Mp,o/Math.tan(Math.PI-n));var a=wp.x!==bp.x?(Ap.x-bp.x)/(wp.x-bp.x):(Ap.y-bp.y)/(wp.y-bp.y);if(isNaN(a))return;a<0?Ji.copy(Ap,bp):a>1&&Ji.copy(Ap,wp),Ap.toArray(t[1])}}}}function Tp(t,n,i){if(i<=180&&i>0){i=i/180*Math.PI,yp.fromArray(t[0]),bp.fromArray(t[1]),wp.fromArray(t[2]),Ji.sub(xp,bp,yp),Ji.sub(Mp,wp,bp);var r=xp.len(),e=Mp.len();if(!(r<.001||e<.001)&&(xp.scale(1/r),Mp.scale(1/e),xp.dot(n)<Math.cos(i))){var o=vp(bp.x,bp.y,wp.x,wp.y,yp.x,yp.y,Sp,!1);Ap.fromArray(Sp);var a=Math.PI/2,s=a+Math.acos(Mp.dot(n))-i;if(s>=a)Ji.copy(Ap,wp);else{Ap.scaleAndAdd(Mp,o/Math.tan(Math.PI/2-s));var u=wp.x!==bp.x?(Ap.x-bp.x)/(wp.x-bp.x):(Ap.y-bp.y)/(wp.y-bp.y);if(isNaN(u))return;u<0?Ji.copy(Ap,bp):u>1&&Ji.copy(Ap,wp)}Ap.toArray(t[1])}}}function Ip(t,n,i,r){var e="normal"===i,o=e?t:t.ensureState(i);o.ignore=n;var a=r.get("smooth");a&&!0===a&&(a=.3),o.shape=o.shape||{},a>0&&(o.shape.smooth=a);var s=r.getModel("lineStyle").getLineStyle();e?t.useStyle(s):o.style=s}function Np(t,n){var i=n.smooth,r=n.points;if(r)if(t.moveTo(r[0][0],r[0][1]),i>0&&r.length>=3){var e=kt(r[0],r[1]),o=kt(r[1],r[2]);if(!e||!o)return t.lineTo(r[1][0],r[1][1]),void t.lineTo(r[2][0],r[2][1]);var a=Math.min(e,o)*i,s=At([],r[1],r[0],a/e),u=At([],r[1],r[2],a/o),h=At([],s,u,.5);t.bezierCurveTo(s[0],s[1],s[0],s[1],h[0],h[1]),t.bezierCurveTo(u[0],u[1],u[0],u[1],r[2][0],r[2][1])}else for(var f=1;f<r.length;f++)t.lineTo(r[f][0],r[f][1])}function Lp(t,n,i){var r=t.getTextGuideLine(),e=t.getTextContent();if(e){for(var o=n.normal,a=o.get("show"),s=e.ignore,u=0;u<xa.length;u++){var h=xa[u],f=n[h],l="normal"===h;if(f){var c=f.get("show");if((l?s:tt(e.states[h]&&e.states[h].ignore,s))||!tt(c,a)){var v=l?r:r&&r.states[h];v&&(v.ignore=!0);continue}r||(r=new Ys,t.setTextGuideLine(r),l||!s&&a||Ip(r,!0,"normal",n.normal),t.stateProxy&&(r.stateProxy=t.stateProxy)),Ip(r,!1,h,f)}}if(r){D(r.style,i),r.style.fill=null;var d=o.get("showAbove");(t.textGuideLineConfig=t.textGuideLineConfig||{}).showAbove=d||!1,r.buildPath=Np}}else r&&t.removeTextGuideLine()}function Op(t,n){for(var i={normal:t.getModel(n=n||"labelLine")},r=0;r<wa.length;r++){var e=wa[r];i[e]=t.getModel([e,n])}return i}function Dp(t){for(var n=[],i=0;i<t.length;i++){var r=t[i];if(!r.defaultAttr.ignore){var e=r.label,o=e.getComputedTransform(),a=e.getBoundingRect(),s=!o||o[1]<1e-5&&o[2]<1e-5,u=e.style.margin||0,h=a.clone();h.applyTransform(o),h.x-=u/2,h.y-=u/2,h.width+=u,h.height+=u;var f=s?new uu(a,o):null;n.push({label:e,labelLine:r.labelLine,rect:h,localRect:a,obb:f,priority:r.priority,defaultAttr:r.defaultAttr,layoutOption:r.computedLayoutOption,axisAligned:s,transform:o})}}return n}function zp(t,n,i,r,e,o){var a=t.length;if(!(a<2)){t.sort((function(t,i){return t.rect[n]-i.rect[n]}));for(var s,u=0,h=!1,f=0,l=0;l<a;l++){var c=t[l],v=c.rect;(s=v[n]-u)<0&&(v[n]-=s,c.label[n]-=s,h=!0),f+=Math.max(-s,0),u=v[n]+v[i]}f>0&&o&&w(-f/a,0,a);var d,p,m=t[0],g=t[a-1];return y(),d<0&&x(-d,.8),p<0&&x(p,.8),y(),b(d,p,1),b(p,d,-1),y(),d<0&&M(-d),p<0&&M(p),h}function y(){d=m.rect[n]-r,p=e-g.rect[n]-g.rect[i]}function b(t,n,i){if(t<0){var r=Math.min(n,-t);if(r>0){w(r*i,0,a);var e=r+t;e<0&&x(-e*i,1)}else x(-t*i,1)}}function w(i,r,e){0!==i&&(h=!0);for(var o=r;o<e;o++){var a=t[o];a.rect[n]+=i,a.label[n]+=i}}function x(r,e){for(var o=[],s=0,u=1;u<a;u++){var h=t[u-1].rect,f=Math.max(t[u].rect[n]-h[n]-h[i],0);o.push(f),s+=f}if(s){var l=Math.min(Math.abs(r)/s,e);if(r>0)for(u=0;u<a-1;u++)w(o[u]*l,0,u+1);else for(u=a-1;u>0;u--)w(-o[u-1]*l,u,a)}}function M(t){var n=t<0?-1:1;t=Math.abs(t);for(var i=Math.ceil(t/(a-1)),r=0;r<a-1;r++)if(n>0?w(i,0,r+1):w(-i,a-r-1,a),(t-=i)<=0)return}}function Bp(t,n,i,r){return zp(t,"y","height",n,i,r)}function _p(t){var n=[];t.sort((function(t,n){return n.priority-t.priority}));var i=new sr(0,0,0,0);function r(t){if(!t.ignore){var n=t.ensureState("emphasis");null==n.ignore&&(n.ignore=!1)}t.ignore=!0}for(var e=0;e<t.length;e++){var o=t[e],a=o.axisAligned,s=o.localRect,u=o.transform,h=o.label,f=o.labelLine;i.copy(o.rect),i.width-=.1,i.height-=.1,i.x+=.05,i.y+=.05;for(var l=o.obb,c=!1,v=0;v<n.length;v++){var d=n[v];if(i.intersect(d.rect)){if(a&&d.axisAligned){c=!0;break}if(d.obb||(d.obb=new uu(d.localRect,d.transform)),l||(l=new uu(s,u)),l.intersect(d.obb)){c=!0;break}}}c?(r(h),f&&r(f)):(h.attr("ignore",o.defaultAttr.ignore),f&&f.attr("ignore",o.defaultAttr.labelGuideIgnore),n.push(o))}}function Rp(t){if(t){for(var n=[],i=0;i<t.length;i++)n.push(t[i].slice());return n}}function Fp(t,n){var i=t.label,r=n&&n.getTextGuideLine();return{dataIndex:t.dataIndex,dataType:t.dataType,seriesIndex:t.seriesModel.seriesIndex,text:t.label.style.text,rect:t.hostRect,labelRect:t.rect,align:i.style.align,verticalAlign:i.style.verticalAlign,labelLinePoints:Rp(r&&r.shape.points)}}var Ep=["align","verticalAlign","width","height","fontSize"],Pp=new Ki,Wp=ie(),Hp=ie();function Up(t,n,i){for(var r=0;r<i.length;r++){var e=i[r];null!=n[e]&&(t[e]=n[e])}}var jp=["x","y","rotation"],Yp=function(){function t(){this._labelList=[],this._chartViewList=[]}return t.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},t.prototype._addLabel=function(t,n,i,r,e){var o=r.style,a=r.__hostTarget.textConfig||{},s=r.getComputedTransform(),u=r.getBoundingRect().plain();sr.applyTransform(u,u,s),s?Pp.setLocalTransform(s):(Pp.x=Pp.y=Pp.rotation=Pp.originX=Pp.originY=0,Pp.scaleX=Pp.scaleY=1);var h,f=r.__hostTarget;if(f){h=f.getBoundingRect().plain();var l=f.getComputedTransform();sr.applyTransform(h,h,l)}var c=h&&f.getTextGuideLine();this._labelList.push({label:r,labelLine:c,seriesModel:i,dataIndex:t,dataType:n,layoutOption:e,computedLayoutOption:null,rect:u,hostRect:h,priority:h?h.width*h.height:0,defaultAttr:{ignore:r.ignore,labelGuideIgnore:c&&c.ignore,x:Pp.x,y:Pp.y,scaleX:Pp.scaleX,scaleY:Pp.scaleY,rotation:Pp.rotation,style:{x:o.x,y:o.y,align:o.align,verticalAlign:o.verticalAlign,width:o.width,height:o.height,fontSize:o.fontSize},cursor:r.cursor,attachedPos:a.position,attachedRot:a.rotation}})},t.prototype.addLabelsOfSeries=function(t){var n=this;this._chartViewList.push(t);var i=t.__model,r=i.get("labelLayout");(Y(r)||W(r).length)&&t.group.traverse((function(t){if(t.ignore)return!0;var e=t.getTextContent(),o=pa(t);e&&!e.disableLabelLayout&&n._addLabel(o.dataIndex,o.dataType,i,e,r)}))},t.prototype.updateLayoutConfig=function(t){var n=t.getWidth(),i=t.getHeight();function r(t,n){return function(){kp(t,n)}}for(var e=0;e<this._labelList.length;e++){var o=this._labelList[e],a=o.label,s=a.__hostTarget,u=o.defaultAttr,h=void 0;h=Y(o.layoutOption)?o.layoutOption(Fp(o,s)):o.layoutOption,o.computedLayoutOption=h=h||{};var f=Math.PI/180;s&&s.setTextConfig({local:!1,position:null!=h.x||null!=h.y?null:u.attachedPos,rotation:null!=h.rotate?h.rotate*f:u.attachedRot,offset:[h.dx||0,h.dy||0]});var l=!1;if(null!=h.x?(a.x=Or(h.x,n),a.setStyle("x",0),l=!0):(a.x=u.x,a.setStyle("x",u.style.x)),null!=h.y?(a.y=Or(h.y,i),a.setStyle("y",0),l=!0):(a.y=u.y,a.setStyle("y",u.style.y)),h.labelLinePoints){var c=s.getTextGuideLine();c&&(c.setShape({points:h.labelLinePoints}),l=!1)}Wp(a).needsUpdateLabelLine=l,a.rotation=null!=h.rotate?h.rotate*f:u.rotation,a.scaleX=u.scaleX,a.scaleY=u.scaleY;for(var v=0;v<Ep.length;v++){var d=Ep[v];a.setStyle(d,null!=h[d]?h[d]:u.style[d])}if(h.draggable){if(a.draggable=!0,a.cursor="move",s){var p=o.seriesModel;null!=o.dataIndex&&(p=o.seriesModel.getData(o.dataType).getItemModel(o.dataIndex)),a.on("drag",r(s,p.getModel("labelLine")))}}else a.off("drag"),a.cursor=u.cursor}},t.prototype.layout=function(t){var n=t.getWidth(),i=t.getHeight(),r=Dp(this._labelList),e=P(r,(function(t){return"shiftX"===t.layoutOption.moveOverlap})),o=P(r,(function(t){return"shiftY"===t.layoutOption.moveOverlap}));zp(e,"x","width",0,n,undefined),Bp(o,0,i),_p(P(r,(function(t){return t.layoutOption.hideOverlap})))},t.prototype.processLabelsOverall=function(){var t=this;R(this._chartViewList,(function(n){var i=n.__model,r=n.ignoreLabelLineUpdate,e=i.isAnimationEnabled();n.group.traverse((function(n){if(n.ignore&&!n.forceLabelAnimation)return!0;var o=!r,a=n.getTextContent();!o&&a&&(o=Wp(a).needsUpdateLabelLine),o&&t._updateLabelLine(n,i),e&&t._animateLabels(n,i)}))}))},t.prototype._updateLabelLine=function(t,n){var i=t.getTextContent(),r=pa(t),e=r.dataIndex;if(i&&null!=e){var o=n.getData(r.dataType),a=o.getItemModel(e),s={},u=o.getItemVisual(e,"style"),h=o.getVisual("drawType");s.stroke=u[h];var f=a.getModel("labelLine");Lp(t,Op(a),s),kp(t,f)}},t.prototype._animateLabels=function(t,n){var i=t.getTextContent(),r=t.getTextGuideLine();if(i&&(t.forceLabelAnimation||!i.ignore&&!i.invisible&&!t.disableLabelAnimation&&!pu(t))){var e=(v=Wp(i)).oldLayout,o=pa(t),a=o.dataIndex,s={x:i.x,y:i.y,rotation:i.rotation},u=n.getData(o.dataType);if(e){i.attr(e);var h=t.prevStates;h&&(z(h,"select")>=0&&i.attr(v.oldLayoutSelect),z(h,"emphasis")>=0&&i.attr(v.oldLayoutEmphasis)),vu(i,s,n,a)}else if(i.attr(s),!qu(i).valueAnimation){var f=tt(i.style.opacity,1);i.style.opacity=0,du(i,{style:{opacity:f}},n,a)}if(v.oldLayout=s,i.states.select){var l=v.oldLayoutSelect={};Up(l,s,jp),Up(l,i.states.select,jp)}if(i.states.emphasis){var c=v.oldLayoutEmphasis={};Up(c,s,jp),Up(c,i.states.emphasis,jp)}!function(t,n,i,r,e){var o=qu(t);if(o.valueAnimation&&o.prevValue!==o.value){var a=o.defaultInterpolatedText,s=tt(o.interpolatedValue,o.prevValue),u=o.value;t.percent=0,(null==o.prevValue?du:vu)(t,{percent:1},r,n,null,(function(r){var h=function(t,n,i,r,e){var o=null==n||"auto"===n;if(null==r)return r;if(q(r))return Dr(d=Yr(i||0,r,e),o?Math.max(zr(i||0),zr(r)):n);if(X(r))return e<1?i:r;for(var a=[],s=i,u=r,h=Math.max(s?s.length:0,u.length),f=0;f<h;++f){var l=t.getDimensionInfo(f);if(l&&"ordinal"===l.type)a[f]=(e<1&&s?s:u)[f];else{var c=s&&s[f]?s[f]:0,v=u[f],d=Yr(c,v,e);a[f]=Dr(d,o?Math.max(zr(c),zr(v)):n)}}return a}(i,o.precision,s,u,r);o.interpolatedValue=1===r?null:h;var f=Pu({labelDataIndex:n,labelFetcher:e,defaultText:a?a(h):h+""},o.statesModels,h);Eu(t,f)}))}}(i,a,u,n,n)}if(r&&!r.ignore&&!r.invisible){var v=Hp(r),d={points:r.shape.points};(e=v.oldLayout)?(r.attr({shape:e}),vu(r,{shape:d},n)):(r.setShape(d),r.style.strokePercent=0,du(r,{style:{strokePercent:1}},n)),v.oldLayout=d}},t}(),Xp=ie();function Vp(t,n,i){i=i||{};var r=t.coordinateSystem,e=n.axis,o={},a=e.getAxesOnZeroOf()[0],s=e.position,u=a?"onZero":s,h=e.dim,f=r.getRect(),l=[f.x,f.x+f.width,f.y,f.y+f.height],c={left:0,right:1,top:0,bottom:1,onZero:2},v=n.get("offset")||0,d="x"===h?[l[2]-v,l[3]+v]:[l[0]-v,l[1]+v];if(a){var p=a.toGlobalCoord(a.dataToCoord(0));d[c.onZero]=Math.max(Math.min(p,d[1]),d[0])}o.position=["y"===h?d[c[u]]:l[0],"x"===h?d[c[u]]:l[3]],o.rotation=Math.PI/2*("x"===h?0:1),o.labelDirection=o.tickDirection=o.nameDirection={top:-1,bottom:1,left:-1,right:1}[s],o.labelOffset=a?d[c[s]]-d[c.onZero]:0,n.get(["axisTick","inside"])&&(o.tickDirection=-o.tickDirection),Q(i.labelInside,n.get(["axisLabel","inside"]))&&(o.labelDirection=-o.labelDirection);var m=n.get(["axisLabel","rotate"]);return o.labelRotate="top"===u?-m:m,o.z2=1,o}var qp=Math.PI,Gp=function(){function t(t,n){this.group=new Cr,this.opt=n,this.axisModel=t,D(n,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var i=new Cr({x:n.position[0],y:n.position[1],rotation:n.rotation});i.updateTransform(),this._transformGroup=i}return t.prototype.hasBuilder=function(t){return!!Zp[t]},t.prototype.add=function(t){Zp[t](this.opt,this.axisModel,this.group,this._transformGroup)},t.prototype.getGroup=function(){return this.group},t.innerTextLayout=function(t,n,i){var r,e,o=_r(n-t);return Rr(o)?(e=i>0?"top":"bottom",r="center"):Rr(o-qp)?(e=i>0?"bottom":"top",r="center"):(e="middle",r=o>0&&o<qp?i>0?"right":"left":i>0?"left":"right"),{rotation:o,textAlign:r,textVerticalAlign:e}},t.makeAxisEventDataBase=function(t){var n={componentType:t.mainType,componentIndex:t.componentIndex};return n[t.mainType+"Index"]=t.componentIndex,n},t.isLabelSilent=function(t){var n=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||n&&n.show)},t}(),Zp={axisLine:function(t,n,i,r){var e=n.get(["axisLine","show"]);if("auto"===e&&t.handleAutoShown&&(e=t.handleAutoShown("axisLine")),e){var o=n.axis.getExtent(),a=r.transform,s=[o[0],0],u=[o[1],0];a&&(Ct(s,s,a),Ct(u,u,a));var h=O({lineCap:"round"},n.getModel(["axisLine","lineStyle"]).getLineStyle()),f=new qs({subPixelOptimize:!0,shape:{x1:s[0],y1:s[1],x2:u[0],y2:u[1]},style:h,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1});f.anid="line",i.add(f);var l=n.get(["axisLine","symbol"]);if(null!=l){var c=n.get(["axisLine","symbolSize"]);X(l)&&(l=[l,l]),(X(c)||q(c))&&(c=[c,c]);var v=function(t,n){if(null!=t)return j(t)||(t=[t,t]),[Or(t[0],n[0])||0,Or(tt(t[1],t[0]),n[1])||0]}(n.get(["axisLine","symbolOffset"])||0,c),d=c[0],p=c[1];R([{rotate:t.rotation+Math.PI/2,offset:v[0],r:0},{rotate:t.rotation-Math.PI/2,offset:v[1],r:Math.sqrt((s[0]-u[0])*(s[0]-u[0])+(s[1]-u[1])*(s[1]-u[1]))}],(function(n,r){if("none"!==l[r]&&null!=l[r]){var e=sv(l[r],-d/2,-p/2,d,p,h.stroke,!0),o=n.r+n.offset;e.attr({rotation:n.rotate,x:s[0]+o*Math.cos(t.rotation),y:s[1]-o*Math.sin(t.rotation),silent:!0,z2:11}),i.add(e)}}))}}},axisTickLabel:function(t,n,i,r){var e=function(t,n,i,r){var e=i.axis,o=i.getModel("axisTick"),a=o.get("show");if("auto"===a&&r.handleAutoShown&&(a=r.handleAutoShown("axisTick")),a&&!e.scale.isBlank()){for(var s=o.getModel("lineStyle"),u=r.tickDirection*o.get("length"),h=Qp(e.getTicksCoords(),n.transform,u,D(s.getLineStyle(),{stroke:i.get(["axisLine","lineStyle","color"])}),"ticks"),f=0;f<h.length;f++)t.add(h[f]);return h}}(i,r,n,t),o=function(t,n,i,r){var e=i.axis;if(Q(r.axisLabelShow,i.get(["axisLabel","show"]))&&!e.scale.isBlank()){var o=i.getModel("axisLabel"),a=o.get("margin"),s=e.getViewLabels(),u=(Q(r.labelRotate,o.get("rotate"))||0)*qp/180,h=Gp.innerTextLayout(r.rotation,u,r.labelDirection),f=i.getCategories&&i.getCategories(!0),l=[],c=Gp.isLabelSilent(i),v=i.get("triggerEvent");return R(s,(function(s,u){var d="ordinal"===e.scale.type?e.scale.getRawOrdinalNumber(s.tickValue):s.tickValue,p=s.formattedLabel,m=s.rawLabel,g=o;if(f&&f[d]){var y=f[d];G(y)&&y.textStyle&&(g=new ah(y.textStyle,o,i.ecModel))}var b=g.getTextColor()||i.get(["axisLine","lineStyle","color"]),w=e.dataToCoord(d),x=new ea({x:w,y:r.labelOffset+r.labelDirection*a,rotation:h.rotation,silent:c,z2:10+(s.level||0),style:Hu(g,{text:p,align:g.getShallow("align",!0)||h.textAlign,verticalAlign:g.getShallow("verticalAlign",!0)||g.getShallow("baseline",!0)||h.textVerticalAlign,fill:Y(b)?b("category"===e.type?m:"value"===e.type?d+"":d,u):b})});if(x.anid="label_"+d,v){var M=Gp.makeAxisEventDataBase(i);M.targetType="axisLabel",M.value=m,M.tickIndex=u,"category"===e.type&&(M.dataIndex=d),pa(x).eventData=M}n.add(x),x.updateTransform(),l.push(x),t.add(x),x.decomposeTransform()})),l}}(i,r,n,t);(function(t,n,i){if("category"!==(r=t.axis).type||0!==(null==(e=r.getLabelModel().get("interval"))?"auto":e)){var r,e,o=t.get(["axisLabel","showMinLabel"]),a=t.get(["axisLabel","showMaxLabel"]),s=(n=n||[])[0],u=n[1],h=n[n.length-1],f=n[n.length-2],l=(i=i||[])[0],c=i[1],v=i[i.length-1],d=i[i.length-2];!1===o?(Kp(s),Kp(l)):$p(s,u)&&(o?(Kp(u),Kp(c)):(Kp(s),Kp(l))),!1===a?(Kp(h),Kp(v)):$p(f,h)&&(a?(Kp(f),Kp(d)):(Kp(h),Kp(v)))}})(n,o,e),function(t,n,i,r){var e=i.axis,o=i.getModel("minorTick");if(o.get("show")&&!e.scale.isBlank()){var a=e.getMinorTicksCoords();if(a.length)for(var s=o.getModel("lineStyle"),u=r*o.get("length"),h=D(s.getLineStyle(),D(i.getModel("axisTick").getLineStyle(),{stroke:i.get(["axisLine","lineStyle","color"])})),f=0;f<a.length;f++)for(var l=Qp(a[f],n.transform,u,h,"minorticks_"+f),c=0;c<l.length;c++)t.add(l[c])}}(i,r,n,t.tickDirection),n.get(["axisLabel","hideOverlap"])&&_p(Dp(F(o,(function(t){return{label:t,priority:t.z2,defaultAttr:{ignore:t.ignore}}}))))},axisName:function(t,n,i,r){var e=Q(t.axisName,n.get("name"));if(e){var o,a,s=n.get("nameLocation"),u=t.nameDirection,h=n.getModel("nameTextStyle"),f=n.get("nameGap")||0,l=n.axis.getExtent(),c=l[0]>l[1]?-1:1,v=["start"===s?l[0]-c*f:"end"===s?l[1]+c*f:(l[0]+l[1])/2,Jp(s)?t.labelOffset+u*f:0],d=n.get("nameRotate");null!=d&&(d=d*qp/180),Jp(s)?o=Gp.innerTextLayout(t.rotation,null!=d?d:t.rotation,u):(o=function(t,n,i,r){var e,o,a=_r(i-t),s=r[0]>r[1],u="start"===n&&!s||"start"!==n&&s;return Rr(a-qp/2)?(o=u?"bottom":"top",e="center"):Rr(a-1.5*qp)?(o=u?"top":"bottom",e="center"):(o="middle",e=a<1.5*qp&&a>qp/2?u?"left":"right":u?"right":"left"),{rotation:a,textAlign:e,textVerticalAlign:o}}(t.rotation,s,d||0,l),null!=(a=t.axisNameAvailableWidth)&&(a=Math.abs(a/Math.sin(o.rotation)),!isFinite(a)&&(a=null)));var p=h.getFont(),m=n.get("nameTruncate",!0)||{},g=m.ellipsis,y=Q(t.nameTruncateMaxWidth,m.maxWidth,a),b=new ea({x:v[0],y:v[1],rotation:o.rotation,silent:Gp.isLabelSilent(n),style:Hu(h,{text:e,font:p,overflow:"truncate",width:y,ellipsis:g,fill:h.getTextColor()||n.get(["axisLine","lineStyle","color"]),align:h.get("align")||o.textAlign,verticalAlign:h.get("verticalAlign")||o.textVerticalAlign}),z2:1});if(zu({el:b,componentModel:n,itemName:e}),b.__fullText=e,b.anid="name",n.get("triggerEvent")){var w=Gp.makeAxisEventDataBase(n);w.targetType="axisName",w.name=e,pa(b).eventData=w}r.add(b),b.updateTransform(),i.add(b),b.decomposeTransform()}}};function Kp(t){t&&(t.ignore=!0)}function $p(t,n){var i=t&&t.getBoundingRect().clone(),r=n&&n.getBoundingRect().clone();if(i&&r){var e=Pi([]);return Ui(e,e,-t.rotation),i.applyTransform(Wi([],e,t.getLocalTransform())),r.applyTransform(Wi([],e,n.getLocalTransform())),i.intersect(r)}}function Jp(t){return"middle"===t||"center"===t}function Qp(t,n,i,r,e){for(var o=[],a=[],s=[],u=0;u<t.length;u++){var h=t[u].coord;a[0]=h,a[1]=0,s[0]=h,s[1]=i,n&&(Ct(a,a,n),Ct(s,s,n));var f=new qs({subPixelOptimize:!0,shape:{x1:a[0],y1:a[1],x2:s[0],y2:s[1]},style:r,z2:2,autoBatch:!0,silent:!0});f.anid=e+"_"+t[u].tickValue,o.push(f)}return o}function tm(t,n){return"all"===t||j(t)&&z(t,n)>=0||t===n}function nm(t){var n=im(t);if(n){var i=n.axisPointerModel,r=n.axis.scale,e=i.option,o=i.get("status"),a=i.get("value");null!=a&&(a=r.parse(a));var s=rm(i);null==o&&(e.status=s?"show":"hide");var u=r.getExtent().slice();u[0]>u[1]&&u.reverse(),(null==a||a>u[1])&&(a=u[1]),a<u[0]&&(a=u[0]),e.value=a,s&&(e.status=n.axis.scale.isBlank()?"hide":"show")}}function im(t){var n=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return n&&n.axesInfo[em(t)]}function rm(t){return!!t.get(["handle","show"])}function em(t){return t.type+"||"+t.id}var om={},am=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return u(n,t),n.prototype.render=function(n,i,r,e){this.axisPointerClass&&nm(n),t.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(n,r,!0)},n.prototype.updateAxisPointer=function(t,n,i){this._doUpdateAxisPointerClass(t,i,!1)},n.prototype.remove=function(t,n){var i=this._axisPointer;i&&i.remove(n)},n.prototype.dispose=function(n,i){this._disposeAxisPointer(i),t.prototype.dispose.apply(this,arguments)},n.prototype._doUpdateAxisPointerClass=function(t,i,r){var e=n.getAxisPointerClass(this.axisPointerClass);if(e){var o=function(t){var n=im(t);return n&&n.axisPointerModel}(t);o?(this._axisPointer||(this._axisPointer=new e)).render(t,o,i,r):this._disposeAxisPointer(i)}},n.prototype._disposeAxisPointer=function(t){this._axisPointer&&this._axisPointer.dispose(t),this._axisPointer=null},n.registerAxisPointerClass=function(t,n){om[t]=n},n.getAxisPointerClass=function(t){return t&&om[t]},n.type="axis",n}(tc),sm=ie(),um=N,hm=H;function fm(t,n,i,r){lm(sm(i).lastProp,r)||(sm(i).lastProp=r,n?vu(i,r,t):(i.stopAnimation(),i.attr(r)))}function lm(t,n){if(G(t)&&G(n)){var i=!0;return R(n,(function(n,r){i=i&&lm(t[r],n)})),!!i}return t===n}function cm(t,n){t[n.get(["label","show"])?"show":"hide"]()}function vm(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function dm(t,n,i){var r=n.get("z"),e=n.get("zlevel");t&&t.traverse((function(t){"group"!==t.type&&(null!=r&&(t.z=r),null!=e&&(t.zlevel=e),t.silent=i)}))}function pm(t,n,i,r,e){t=n.scale.parse(t);var o=n.scale.getLabel({value:t},{precision:e.precision}),a=e.formatter;if(a){var s={value:ep(n,{value:t}),axisDimension:n.dim,axisIndex:n.index,seriesData:[]};R(r,(function(t){var n=i.getSeriesByIndex(t.seriesIndex),r=n&&n.getDataParams(t.dataIndexInside);r&&s.seriesData.push(r)})),X(a)?o=a.replace("{value}",o):Y(a)&&(o=a(s))}return o}function mm(t,n,i){var r=[1,0,0,1,0,0];return Ui(r,r,i.rotation),Hi(r,r,i.position),Iu([t.dataToCoord(n),(i.labelOffset||0)+(i.labelDirection||1)*(i.labelMargin||0)],r)}var gm=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return u(n,t),n.prototype.makeElOption=function(t,n,i,r,e){var o=i.axis,a=o.grid,s=r.get("type"),u=ym(a,o).getOtherAxis(o).getGlobalExtent(),h=o.toGlobalCoord(o.dataToCoord(n,!0));if(s&&"none"!==s){var f=function(t){var n,i=t.get("type"),r=t.getModel(i+"Style");return"line"===i?(n=r.getLineStyle()).fill=null:"shadow"===i&&((n=r.getAreaStyle()).stroke=null),n}(r),l=bm[s](o,h,u);l.style=f,t.graphicKey=l.type,t.pointer=l}!function(t,n,i,r,e,o){var a=Gp.innerTextLayout(i.rotation,0,i.labelDirection);i.labelMargin=e.get(["label","margin"]),function(t,n,i,r,e){var o=pm(i.get("value"),n.axis,n.ecModel,i.get("seriesDataIndices"),{precision:i.get(["label","precision"]),formatter:i.get(["label","formatter"])}),a=i.getModel("label"),s=mh(a.get("padding")||0),u=a.getFont(),h=lr(o,u),f=e.position,l=h.width+s[1]+s[3],c=h.height+s[0]+s[2],v=e.align;"right"===v&&(f[0]-=l),"center"===v&&(f[0]-=l/2);var d=e.verticalAlign;"bottom"===d&&(f[1]-=c),"middle"===d&&(f[1]-=c/2),function(t,n,i,r){var e=r.getWidth(),o=r.getHeight();t[0]=Math.min(t[0]+n,e)-n,t[1]=Math.min(t[1]+i,o)-i,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}(f,l,c,r);var p=a.get("backgroundColor");p&&"auto"!==p||(p=n.get(["axisLine","lineStyle","color"])),t.label={x:f[0],y:f[1],style:Hu(a,{text:o,font:u,fill:a.getTextColor(),padding:s,backgroundColor:p}),z2:10}}(n,r,e,o,{position:mm(r.axis,t,i),align:a.textAlign,verticalAlign:a.textVerticalAlign})}(n,t,Vp(a.model,i),i,r,e)},n.prototype.getHandleTransform=function(t,n,i){var r=Vp(n.axis.grid.model,n,{labelInside:!1});r.labelMargin=i.get(["handle","margin"]);var e=mm(n.axis,t,r);return{x:e[0],y:e[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},n.prototype.updateHandleTransform=function(t,n,i){var r=i.axis,e=r.grid,o=r.getGlobalExtent(!0),a=ym(e,r).getOtherAxis(r).getGlobalExtent(),s="x"===r.dim?0:1,u=[t.x,t.y];u[s]+=n[s],u[s]=Math.min(o[1],u[s]),u[s]=Math.max(o[0],u[s]);var h=(a[1]+a[0])/2,f=[h,h];return f[s]=u[s],{x:u[0],y:u[1],rotation:t.rotation,cursorPoint:f,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][s]}},n}(function(){function t(){this._dragging=!1,this.animationThreshold=15}return t.prototype.render=function(t,n,i,r){var e=n.get("value"),o=n.get("status");if(this._axisModel=t,this._axisPointerModel=n,this._api=i,r||this._lastValue!==e||this._lastStatus!==o){this._lastValue=e,this._lastStatus=o;var a=this._group,s=this._handle;if(!o||"hide"===o)return a&&a.hide(),void(s&&s.hide());a&&a.show(),s&&s.show();var u={};this.makeElOption(u,e,t,n,i);var h=u.graphicKey;h!==this._lastGraphicKey&&this.clear(i),this._lastGraphicKey=h;var f=this._moveAnimation=this.determineAnimation(t,n);if(a){var l=U(fm,n,f);this.updatePointerEl(a,u,l),this.updateLabelEl(a,u,l,n)}else a=this._group=new Cr,this.createPointerEl(a,u,t,n),this.createLabelEl(a,u,t,n),i.getZr().add(a);dm(a,n,!0),this._renderHandle(e)}},t.prototype.remove=function(t){this.clear(t)},t.prototype.dispose=function(t){this.clear(t)},t.prototype.determineAnimation=function(t,n){var i=n.get("animation"),r=t.axis,e="category"===r.type,o=n.get("snap");if(!o&&!e)return!1;if("auto"===i||null==i){var a=this.animationThreshold;if(e&&r.getBandWidth()>a)return!0;if(o){var s=im(t).seriesDataCount,u=r.getExtent();return Math.abs(u[0]-u[1])/s>a}return!1}return!0===i},t.prototype.makeElOption=function(){},t.prototype.createPointerEl=function(t,n){var i=n.pointer;if(i){var r=sm(t).pointerEl=new Ru[i.type](um(n.pointer));t.add(r)}},t.prototype.createLabelEl=function(t,n,i,r){if(n.label){var e=sm(t).labelEl=new ea(um(n.label));t.add(e),cm(e,r)}},t.prototype.updatePointerEl=function(t,n,i){var r=sm(t).pointerEl;r&&n.pointer&&(r.setStyle(n.pointer.style),i(r,{shape:n.pointer.shape}))},t.prototype.updateLabelEl=function(t,n,i,r){var e=sm(t).labelEl;e&&(e.setStyle(n.label.style),i(e,{x:n.label.x,y:n.label.y}),cm(e,r))},t.prototype._renderHandle=function(t){if(!this._dragging&&this.updateHandleTransform){var n,i=this._axisPointerModel,r=this._api.getZr(),e=this._handle,o=i.getModel("handle"),a=i.get("status");if(!o.get("show")||!a||"hide"===a)return e&&r.remove(e),void(this._handle=null);this._handle||(n=!0,e=this._handle=Lu(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){Xt(t.event)},onmousedown:hm(this._onHandleDragMove,this,0,0),drift:hm(this._onHandleDragMove,this),ondragend:hm(this._onHandleDragEnd,this)}),r.add(e)),dm(e,i,!1),e.setStyle(o.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=o.get("size");j(s)||(s=[s,s]),e.scaleX=s[0]/2,e.scaleY=s[1]/2,cc(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,n)}},t.prototype._moveHandleToValue=function(t,n){fm(this._axisPointerModel,!n&&this._moveAnimation,this._handle,vm(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},t.prototype._onHandleDragMove=function(t,n){var i=this._handle;if(i){this._dragging=!0;var r=this.updateHandleTransform(vm(i),[t,n],this._axisModel,this._axisPointerModel);this._payloadInfo=r,i.stopAnimation(),i.attr(vm(r)),sm(i).lastProp=null,this._doDispatchAxisPointer()}},t.prototype._doDispatchAxisPointer=function(){if(this._handle){var t=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.componentIndex}]})}},t.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},t.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var n=t.getZr(),i=this._group,r=this._handle;n&&i&&(this._lastGraphicKey=null,i&&n.remove(i),r&&n.remove(r),this._group=null,this._handle=null,this._payloadInfo=null),vc(this,"_doDispatchAxisPointer")},t.prototype.doClear=function(){},t.prototype.buildLabel=function(t,n,i){return{x:t[i=i||0],y:t[1-i],width:n[i],height:n[1-i]}},t}());function ym(t,n){var i={};return i[n.dim+"AxisIndex"]=n.index,t.getCartesian(i)}var bm={line:function(t,n,i){var r,e,o;return{type:"Line",subPixelOptimize:!0,shape:(r=[n,i[0]],e=[n,i[1]],o=wm(t),{x1:r[o=o||0],y1:r[1-o],x2:e[o],y2:e[1-o]})}},shadow:function(t,n,i){var r,e,o,a=Math.max(1,t.getBandWidth());return{type:"Rect",shape:(r=[n-a/2,i[0]],e=[a,i[1]-i[0]],o=wm(t),{x:r[o=o||0],y:r[1-o],width:e[o],height:e[1-o]})}}};function wm(t){return"x"===t.dim?0:1}var xm=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return u(n,t),n.type="axisPointer",n.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",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:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},n}(_h),Mm=ie(),km=R;function Sm(t,n,i){if(!f.node){var r=n.getZr();Mm(r).records||(Mm(r).records={}),function(t,n){function i(i,r){t.on(i,(function(i){var e=function(t){var n={showTip:[],hideTip:[]},i=function(r){var e=n[r.type];e?e.push(r):(r.dispatchAction=i,t.dispatchAction(r))};return{dispatchAction:i,pendings:n}}(n);km(Mm(t).records,(function(t){t&&r(t,i,e.dispatchAction)})),function(t,n){var i,r=t.showTip.length,e=t.hideTip.length;r?i=t.showTip[r-1]:e&&(i=t.hideTip[e-1]),i&&(i.dispatchAction=null,n.dispatchAction(i))}(e.pendings,n)}))}Mm(t).initialized||(Mm(t).initialized=!0,i("click",U(Cm,"click")),i("mousemove",U(Cm,"mousemove")),i("globalout",Am))}(r,n),(Mm(r).records[t]||(Mm(r).records[t]={})).handler=i}}function Am(t,n,i){t.handler("leave",null,i)}function Cm(t,n,i,r){n.handler(t,i,r)}function Tm(t,n){if(!f.node){var i=n.getZr();(Mm(i).records||{})[t]&&(Mm(i).records[t]=null)}}var Im=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return u(n,t),n.prototype.render=function(t,n,i){var r=n.getComponent("tooltip"),e=t.get("triggerOn")||r&&r.get("triggerOn")||"mousemove|click";Sm("axisPointer",i,(function(t,n,i){"none"!==e&&("leave"===t||e.indexOf(t)>=0)&&i({type:"updateAxisPointer",currTrigger:t,x:n&&n.offsetX,y:n&&n.offsetY})}))},n.prototype.remove=function(t,n){Tm("axisPointer",n)},n.prototype.dispose=function(t,n){Tm("axisPointer",n)},n.type="axisPointer",n}(tc);function Nm(t,n){var i,r=[],e=t.seriesIndex;if(null==e||!(i=n.getSeriesByIndex(e)))return{point:[]};var o=i.getData(),a=ne(o,t);if(null==a||a<0||j(a))return{point:[]};var s=o.getItemGraphicEl(a),u=i.coordinateSystem;if(i.getTooltipPosition)r=i.getTooltipPosition(a)||[];else if(u&&u.dataToPoint)if(t.isStacked){var h=u.getBaseAxis(),f=u.getOtherAxis(h).dim,l="x"===f||"radius"===f?1:0,c=o.mapDimension(h.dim),v=[];v[l]=o.get(c,a),v[1-l]=o.get(o.getCalculationInfo("stackResultDimension"),a),r=u.dataToPoint(v)||[]}else r=u.dataToPoint(o.getValues(F(u.dimensions,(function(t){return o.mapDimension(t)})),a))||[];else if(s){var d=s.getBoundingRect().clone();d.applyTransform(s.transform),r=[d.x+d.width/2,d.y+d.height/2]}return{point:r,el:s}}var Lm=ie();function Om(t,n,i){var r=t.currTrigger,e=[t.x,t.y],o=t,a=t.dispatchAction||H(i.dispatchAction,i),s=n.getComponent("axisPointer").coordSysAxesInfo;if(s){Rm(e)&&(e=Nm({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},n).point);var u=Rm(e),h=o.axesInfo,f=s.axesInfo,l="leave"===r||Rm(e),c={},v={},d={list:[],map:{}},p={showPointer:U(zm,v),showTooltip:U(Bm,d)};R(s.coordSysMap,(function(t,n){var i=u||t.containPoint(e);R(s.coordSysAxesInfo[n],(function(t){var n=t.axis,r=function(t,n){for(var i=0;i<(t||[]).length;i++){var r=t[i];if(n.axis.dim===r.axisDim&&n.axis.model.componentIndex===r.axisIndex)return r}}(h,t);if(!l&&i&&(!h||r)){var o=r&&r.value;null!=o||u||(o=n.pointToData(e)),null!=o&&Dm(t,o,p,!1,c)}}))}));var m={};return R(f,(function(t,n){var i=t.linkGroup;i&&!v[n]&&R(i.axesInfo,(function(n,r){var e=v[r];if(n!==t&&e){var o=e.value;i.mapper&&(o=t.axis.scale.parse(i.mapper(o,_m(n),_m(t)))),m[t.key]=o}}))})),R(m,(function(t,n){Dm(f[n],t,p,!0,c)})),function(t,n,i){var r=i.axesInfo=[];R(n,(function(n,i){var e=n.axisPointerModel.option,o=t[i];o?(!n.useHandle&&(e.status="show"),e.value=o.value,e.seriesDataIndices=(o.payloadBatch||[]).slice()):!n.useHandle&&(e.status="hide"),"show"===e.status&&r.push({axisDim:n.axis.dim,axisIndex:n.axis.model.componentIndex,value:e.value})}))}(v,f,c),function(t,n,i,r){if(!Rm(n)&&t.list.length){var e=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:"showTip",escapeConnect:!0,x:n[0],y:n[1],tooltipOption:i.tooltipOption,position:i.position,dataIndexInside:e.dataIndexInside,dataIndex:e.dataIndex,seriesIndex:e.seriesIndex,dataByCoordSys:t.list})}else r({type:"hideTip"})}(d,e,t,a),function(t,n,i){var r=i.getZr(),e="axisPointerLastHighlights",o=Lm(r)[e]||{},a=Lm(r)[e]={};R(t,(function(t){var n=t.axisPointerModel.option;"show"===n.status&&R(n.seriesDataIndices,(function(t){a[t.seriesIndex+" | "+t.dataIndex]=t}))}));var s=[],u=[];R(o,(function(t,n){!a[n]&&u.push(t)})),R(a,(function(t,n){!o[n]&&s.push(t)})),u.length&&i.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:u}),s.length&&i.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}(f,0,i),c}}function Dm(t,n,i,r,e){var o=t.axis;if(!o.scale.isBlank()&&o.containData(n))if(t.involveSeries){var a=function(t,n){var i=n.axis,r=i.dim,e=t,o=[],a=Number.MAX_VALUE,s=-1;return R(n.seriesModels,(function(n){var u,h,f=n.getData().mapDimensionsAll(r);if(n.getAxisTooltipData){var l=n.getAxisTooltipData(f,t,i);h=l.dataIndices,u=l.nestestValue}else{if(!(h=n.getData().indicesOfNearest(f[0],t,"category"===i.type?.5:null)).length)return;u=n.getData().get(f[0],h[0])}if(null!=u&&isFinite(u)){var c=t-u,v=Math.abs(c);v<=a&&((v<a||c>=0&&s<0)&&(a=v,s=c,e=u,o.length=0),R(h,(function(t){o.push({seriesIndex:n.seriesIndex,dataIndexInside:t,dataIndex:n.getData().getRawIndex(t)})})))}})),{payloadBatch:o,snapToValue:e}}(n,t),s=a.payloadBatch,u=a.snapToValue;s[0]&&null==e.seriesIndex&&O(e,s[0]),!r&&t.snap&&o.containData(u)&&null!=u&&(n=u),i.showPointer(t,n,s),i.showTooltip(t,a,u)}else i.showPointer(t,n)}function zm(t,n,i,r){t[n.key]={value:i,payloadBatch:r}}function Bm(t,n,i,r){var e=i.payloadBatch,o=n.axis,a=o.model,s=n.axisPointerModel;if(n.triggerTooltip&&e.length){var u=n.coordSys.model,h=em(u),f=t.map[h];f||(f=t.map[h]={coordSysId:u.id,coordSysIndex:u.componentIndex,coordSysType:u.type,coordSysMainType:u.mainType,dataByAxis:[]},t.list.push(f)),f.dataByAxis.push({axisDim:o.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:r,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:e.slice()})}}function _m(t){var n=t.axis.model,i={},r=i.axisDim=t.axis.dim;return i.axisIndex=i[r+"AxisIndex"]=n.componentIndex,i.axisName=i[r+"AxisName"]=n.name,i.axisId=i[r+"AxisId"]=n.id,i}function Rm(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function Fm(t){am.registerAxisPointerClass("CartesianAxisPointer",gm),t.registerComponentModel(xm),t.registerComponentView(Im),t.registerPreprocessor((function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var n=t.axisPointer.link;n&&!j(n)&&(t.axisPointer.link=[n])}})),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,(function(t,n){t.getComponent("axisPointer").coordSysAxesInfo=function(t,n){var i={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return function(t,n,i){var r=n.getComponent("tooltip"),e=n.getComponent("axisPointer"),o=e.get("link",!0)||[],a=[];R(i.getCoordinateSystems(),(function(i){if(i.axisPointerEnabled){var s=em(i.model),u=t.coordSysAxesInfo[s]={};t.coordSysMap[s]=i;var h=i.model.getModel("tooltip",r);if(R(i.getAxes(),U(v,!1,null)),i.getTooltipAxes&&r&&h.get("show")){var f="axis"===h.get("trigger"),l="cross"===h.get(["axisPointer","type"]),c=i.getTooltipAxes(h.get(["axisPointer","axis"]));(f||l)&&R(c.baseAxes,U(v,!l||"cross",f)),l&&R(c.otherAxes,U(v,"cross",!1))}}function v(r,s,f){var l=f.model.getModel("axisPointer",e),c=l.get("show");if(c&&("auto"!==c||r||rm(l))){null==s&&(s=l.get("triggerTooltip"));var v=(l=r?function(t,n,i,r,e,o){var a=n.getModel("axisPointer"),s={};R(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],(function(t){s[t]=N(a.get(t))})),s.snap="category"!==t.type&&!!o,"cross"===a.get("type")&&(s.type="line");var u=s.label||(s.label={});if(null==u.show&&(u.show=!1),"cross"===e){var h=a.get(["label","show"]);if(u.show=null==h||h,!o){var f=s.lineStyle=a.get("crossStyle");f&&D(u,f.textStyle)}}return t.model.getModel("axisPointer",new ah(s,i,r))}(f,h,e,n,r,s):l).get("snap"),d=em(f.model),p=s||v||"category"===f.type,m=t.axesInfo[d]={key:d,axis:f,coordSys:i,axisPointerModel:l,triggerTooltip:s,involveSeries:p,snap:v,useHandle:rm(l),seriesModels:[],linkGroup:null};u[d]=m,t.seriesInvolved=t.seriesInvolved||p;var g=function(t,n){for(var i=n.model,r=n.dim,e=0;e<t.length;e++){var o=t[e]||{};if(tm(o[r+"AxisId"],i.id)||tm(o[r+"AxisIndex"],i.componentIndex)||tm(o[r+"AxisName"],i.name))return e}}(o,f);if(null!=g){var y=a[g]||(a[g]={axesInfo:{}});y.axesInfo[d]=m,y.mapper=o[g].mapper,m.linkGroup=y}}}}))}(i,t,n),i.seriesInvolved&&function(t,n){n.eachSeries((function(n){var i=n.coordinateSystem,r=n.get(["tooltip","trigger"],!0),e=n.get(["tooltip","show"],!0);i&&"none"!==r&&!1!==r&&"item"!==r&&!1!==e&&!1!==n.get(["axisPointer","show"],!0)&&R(t.coordSysAxesInfo[em(i.model)],(function(t){var r=t.axis;i.getAxis(r.dim)===r&&(t.seriesModels.push(n),null==t.seriesDataCount&&(t.seriesDataCount=0),t.seriesDataCount+=n.getData().count())}))}))}(i,t),i}(t,n)})),t.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},Om)}var Em=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return u(n,t),n.type="tooltip",n.dependencies=["axisPointer"],n.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},n}(_h);function Pm(t){var n=t.get("confine");return null!=n?!!n:"richText"===t.get("renderMode")}function Wm(t){if(f.domSupported)for(var n=document.documentElement.style,i=0,r=t.length;i<r;i++)if(t[i]in n)return t[i]}var Hm=Wm(["transform","webkitTransform","OTransform","MozTransform","msTransform"]);function Um(t,n){if(!t)return n;n=ph(n,!0);var i=t.indexOf(n);return(t=-1===i?n:"-"+t.slice(0,i)+"-"+n).toLowerCase()}var jm=Um(Wm(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),"transition"),Ym=Um(Hm,"transform"),Xm="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(f.transform3dSupported?"will-change:transform;":"");function Vm(t,n,i){var r=t.toFixed(0)+"px",e=n.toFixed(0)+"px";if(!f.transformSupported)return i?"top:"+e+";left:"+r+";":[["top",e],["left",r]];var o=f.transform3dSupported,a="translate"+(o?"3d":"")+"("+r+","+e+(o?",0":"")+")";return i?"top:0;left:0;"+Ym+":"+a+";":[["top",0],["left",0],[Hm,a]]}function qm(t,n,i,r,e){var o=n&&n.painter;if(i){var a=o&&o.getViewportRoot();a&&function(t,n,i,r,e){Rt(_t,n,r,e,!0)&&Rt(t,i,_t[0],_t[1])}(t,a,document.body,r,e)}else{t[0]=r,t[1]=e;var s=o&&o.getViewportRootOffset();s&&(t[0]+=s.offsetLeft,t[1]+=s.offsetTop)}t[2]=t[0]/n.getWidth(),t[3]=t[1]/n.getHeight()}var Gm=function(){function t(t,n,i){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._firstShow=!0,this._longHide=!0,f.wxa)return null;var r=document.createElement("div");r.domBelongToZr=!0,this.el=r;var e=this._zr=n.getZr(),o=this._appendToBody=i&&i.appendToBody;qm(this._styleCoord,e,o,n.getWidth()/2,n.getHeight()/2),o?document.body.appendChild(r):t.appendChild(r),this._container=t;var a=this;r.onmouseenter=function(){a._enterable&&(clearTimeout(a._hideTimeout),a._show=!0),a._inContent=!0},r.onmousemove=function(t){if(t=t||window.event,!a._enterable){var n=e.handler;Yt(e.painter.getViewportRoot(),t,!0),n.dispatch("mousemove",t)}},r.onmouseleave=function(){a._inContent=!1,a._enterable&&a._show&&a.hideLater(a._hideDelay)}}return t.prototype.update=function(t){var n,i,r,e=this._container,o=(i="position",(r=(n=e).currentStyle||document.defaultView&&document.defaultView.getComputedStyle(n))?r[i]:null),a=e.style;"absolute"!==a.position&&"absolute"!==o&&(a.position="relative"),t.get("alwaysShowContent")&&this._moveIfResized(),this.el.className=t.get("className")||""},t.prototype.show=function(t,n){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var i=this.el,r=i.style,e=this._styleCoord;i.innerHTML?r.cssText=Xm+function(t,n,i){var r=[],e=t.get("transitionDuration"),o=t.get("backgroundColor"),a=t.get("shadowBlur"),s=t.get("shadowColor"),u=t.get("shadowOffsetX"),h=t.get("shadowOffsetY"),l=t.getModel("textStyle"),c=Ul(t,"html");return r.push("box-shadow:"+u+"px "+h+"px "+a+"px "+s),n&&e&&r.push(function(t,n){var i="cubic-bezier(0.23,1,0.32,1)",r=" "+t/2+"s "+i,e="opacity"+r+",visibility"+r;return n||(r=" "+t+"s "+i,e+=f.transformSupported?","+Ym+r:",left"+r+",top"+r),jm+":"+e}(e,i)),o&&r.push("background-color:"+o),R(["width","color","radius"],(function(n){var i="border-"+n,e=ph(i),o=t.get(e);null!=o&&r.push(i+":"+o+("color"===n?"":"px"))})),r.push(function(t){var n=[],i=t.get("fontSize"),r=t.getTextColor();r&&n.push("color:"+r),n.push("font:"+t.getFont()),i&&n.push("line-height:"+Math.round(3*i/2)+"px");var e=t.get("textShadowColor"),o=t.get("textShadowBlur")||0,a=t.get("textShadowOffsetX")||0,s=t.get("textShadowOffsetY")||0;return e&&o&&n.push("text-shadow:"+a+"px "+s+"px "+o+"px "+e),R(["decoration","align"],(function(i){var r=t.get(i);r&&n.push("text-"+i+":"+r)})),n.join(";")}(l)),null!=c&&r.push("padding:"+mh(c).join("px ")+"px"),r.join(";")+";"}(t,!this._firstShow,this._longHide)+Vm(e[0],e[1],!0)+"border-color:"+Sh(n)+";"+(t.get("extraCssText")||"")+";pointer-events:"+(this._enterable?"auto":"none"):r.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},t.prototype.setContent=function(t,n,i,r,e){var o=this.el;if(null!=t){var a="";if(X(e)&&"item"===i.get("trigger")&&!Pm(i)&&(a=function(t,n,i){if(!X(i)||"inside"===i)return"";var r=t.get("backgroundColor"),e=t.get("borderWidth");n=Sh(n);var o,a,s="left"===(o=i)?"right":"right"===o?"left":"top"===o?"bottom":"top",u=Math.max(1.5*Math.round(e),6),h="",f=Ym+":";z(["left","right"],s)>-1?(h+="top:50%",f+="translateY(-50%) rotate("+(a="left"===s?-225:-45)+"deg)"):(h+="left:50%",f+="translateX(-50%) rotate("+(a="top"===s?225:45)+"deg)");var l=a*Math.PI/180,c=u+e,v=c*Math.abs(Math.cos(l))+c*Math.abs(Math.sin(l)),d=n+" solid "+e+"px;";return'<div style="'+["position:absolute;width:"+u+"px;height:"+u+"px;",(h+=";"+s+":-"+Math.round(100*((v-Math.SQRT2*e)/2+Math.SQRT2*e-(v-c)/2))/100+"px")+";"+f+";","border-bottom:"+d,"border-right:"+d,"background-color:"+r+";"].join("")+'"></div>'}(i,r,e)),X(t))o.innerHTML=t+a;else if(t){o.innerHTML="",j(t)||(t=[t]);for(var s=0;s<t.length;s++)$(t[s])&&t[s].parentNode!==o&&o.appendChild(t[s]);if(a&&o.childNodes.length){var u=document.createElement("div");u.innerHTML=a,o.appendChild(u)}}}else o.innerHTML=""},t.prototype.setEnterable=function(t){this._enterable=t},t.prototype.getSize=function(){var t=this.el;return[t.offsetWidth,t.offsetHeight]},t.prototype.moveTo=function(t,n){var i=this._styleCoord;if(qm(i,this._zr,this._appendToBody,t,n),null!=i[0]&&null!=i[1]){var r=this.el.style;R(Vm(i[0],i[1]),(function(t){r[t[0]]=t[1]}))}},t.prototype._moveIfResized=function(){var t=this._styleCoord[3];this.moveTo(this._styleCoord[2]*this._zr.getWidth(),t*this._zr.getHeight())},t.prototype.hide=function(){var t=this,n=this.el.style;n.visibility="hidden",n.opacity="0",f.transform3dSupported&&(n.willChange=""),this._show=!1,this._longHideTimeout=setTimeout((function(){return t._longHide=!0}),500)},t.prototype.hideLater=function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(H(this.hide,this),t)):this.hide())},t.prototype.isShow=function(){return this._show},t.prototype.dispose=function(){this.el.parentNode.removeChild(this.el)},t}(),Zm=function(){function t(t){this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._zr=t.getZr(),Jm(this._styleCoord,this._zr,t.getWidth()/2,t.getHeight()/2)}return t.prototype.update=function(t){t.get("alwaysShowContent")&&this._moveIfResized()},t.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},t.prototype.setContent=function(t,n,i,r){var e=this;G(t)&&jr(""),this.el&&this._zr.remove(this.el);var o=i.getModel("textStyle");this.el=new ea({style:{rich:n.richTextStyles,text:t,lineHeight:22,borderWidth:1,borderColor:r,textShadowColor:o.get("textShadowColor"),fill:i.get(["textStyle","color"]),padding:Ul(i,"richText"),verticalAlign:"top",align:"left"},z:i.get("z")}),R(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],(function(t){e.el.style[t]=i.get(t)})),R(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],(function(t){e.el.style[t]=o.get(t)||0})),this._zr.add(this.el);var a=this;this.el.on("mouseover",(function(){a._enterable&&(clearTimeout(a._hideTimeout),a._show=!0),a._inContent=!0})),this.el.on("mouseout",(function(){a._enterable&&a._show&&a.hideLater(a._hideDelay),a._inContent=!1}))},t.prototype.setEnterable=function(t){this._enterable=t},t.prototype.getSize=function(){var t=this.el,n=this.el.getBoundingRect(),i=$m(t.style);return[n.width+i.left+i.right,n.height+i.top+i.bottom]},t.prototype.moveTo=function(t,n){var i=this.el;if(i){var r=this._styleCoord;Jm(r,this._zr,t,n),t=r[0],n=r[1];var e=i.style,o=Km(e.borderWidth||0),a=$m(e);i.x=t+o+a.left,i.y=n+o+a.top,i.markRedraw()}},t.prototype._moveIfResized=function(){var t=this._styleCoord[3];this.moveTo(this._styleCoord[2]*this._zr.getWidth(),t*this._zr.getHeight())},t.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},t.prototype.hideLater=function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(H(this.hide,this),t)):this.hide())},t.prototype.isShow=function(){return this._show},t.prototype.dispose=function(){this._zr.remove(this.el)},t}();function Km(t){return Math.max(0,t)}function $m(t){var n=Km(t.shadowBlur||0),i=Km(t.shadowOffsetX||0),r=Km(t.shadowOffsetY||0);return{left:Km(n-i),right:Km(n+i),top:Km(n-r),bottom:Km(n+r)}}function Jm(t,n,i,r){t[0]=i,t[1]=r,t[2]=t[0]/n.getWidth(),t[3]=t[1]/n.getHeight()}var Qm=new na({shape:{x:-1,y:-1,width:2,height:2}}),tg=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return u(n,t),n.prototype.init=function(t,n){if(!f.node&&n.getDom()){var i,r=t.getComponent("tooltip"),e=this._renderMode="auto"===(i=r.get("renderMode"))?f.domSupported?"html":"richText":i||"html";this._tooltipContent="richText"===e?new Zm(n):new Gm(n.getDom(),n,{appendToBody:r.get("appendToBody",!0)})}},n.prototype.render=function(t,n,i){if(!f.node&&i.getDom()){this.group.removeAll(),this._tooltipModel=t,this._ecModel=n,this._api=i,this._alwaysShowContent=t.get("alwaysShowContent");var r=this._tooltipContent;r.update(t),r.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow(),"richText"!==this._renderMode&&t.get("transitionDuration")?cc(this,"_updatePosition",50,"fixRate"):vc(this,"_updatePosition")}},n.prototype._initGlobalListener=function(){var t=this._tooltipModel.get("triggerOn");Sm("itemTooltip",this._api,H((function(n,i,r){"none"!==t&&(t.indexOf(n)>=0?this._tryShow(i,r):"leave"===n&&this._hide(r))}),this))},n.prototype._keepShow=function(){var t=this._tooltipModel,n=this._ecModel,i=this._api,r=t.get("triggerOn");if(null!=this._lastX&&null!=this._lastY&&"none"!==r&&"click"!==r){var e=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){!i.isDisposed()&&e.manuallyShowTip(t,n,i,{x:e._lastX,y:e._lastY,dataByCoordSys:e._lastDataByCoordSys})}))}},n.prototype.manuallyShowTip=function(t,n,i,r){if(r.from!==this.uid&&!f.node&&i.getDom()){var e=ig(r,i);this._ticket="";var o=r.dataByCoordSys,a=function(t,n,i){var r=oe(t).queryOptionMap,e=r.keys()[0];if(e&&"series"!==e){var o,a=se(n,e,r.get(e),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(a)return i.getViewOfComponentModel(a).group.traverse((function(n){var i=pa(n).tooltipConfig;if(i&&i.name===t.name)return o=n,!0})),o?{componentMainType:e,componentIndex:a.componentIndex,el:o}:void 0}}(r,n,i);if(a){var s=a.el.getBoundingRect().clone();s.applyTransform(a.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:a.el,position:r.position,positionDefault:"bottom"},e)}else if(r.tooltip&&null!=r.x&&null!=r.y){var u=Qm;u.x=r.x,u.y=r.y,u.update(),pa(u).tooltipConfig={name:null,option:r.tooltip},this._tryShow({offsetX:r.x,offsetY:r.y,target:u},e)}else if(o)this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,dataByCoordSys:o,tooltipOption:r.tooltipOption},e);else if(null!=r.seriesIndex){if(this._manuallyAxisShowTip(t,n,i,r))return;var h=Nm(r,n),l=h.point[0],c=h.point[1];null!=l&&null!=c&&this._tryShow({offsetX:l,offsetY:c,target:h.el,position:r.position,positionDefault:"bottom"},e)}else null!=r.x&&null!=r.y&&(i.dispatchAction({type:"updateAxisPointer",x:r.x,y:r.y}),this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,target:i.getZr().findHover(r.x,r.y).target},e))}},n.prototype.manuallyHideTip=function(t,n,i,r){!this._alwaysShowContent&&this._tooltipModel&&this._tooltipContent.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,r.from!==this.uid&&this._hide(ig(r,i))},n.prototype._manuallyAxisShowTip=function(t,n,i,r){var e=r.seriesIndex,o=r.dataIndex,a=n.getComponent("axisPointer").coordSysAxesInfo;if(null!=e&&null!=o&&null!=a){var s=n.getSeriesByIndex(e);if(s&&"axis"===ng([s.getData().getItemModel(o),s,(s.coordinateSystem||{}).model],this._tooltipModel).get("trigger"))return i.dispatchAction({type:"updateAxisPointer",seriesIndex:e,dataIndex:o,position:r.position}),!0}},n.prototype._tryShow=function(t,n){var i=t.target;if(this._tooltipModel){this._lastX=t.offsetX,this._lastY=t.offsetY;var r=t.dataByCoordSys;if(r&&r.length)this._showAxisTooltip(r,t);else if(i){var e,o;this._lastDataByCoordSys=null,Zc(i,(function(t){return null!=pa(t).dataIndex?(e=t,!0):null!=pa(t).tooltipConfig?(o=t,!0):void 0}),!0),e?this._showSeriesItemTooltip(t,e,n):o?this._showComponentItemTooltip(t,o,n):this._hide(n)}else this._lastDataByCoordSys=null,this._hide(n)}},n.prototype._showOrMove=function(t,n){var i=t.get("showDelay");n=H(n,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(n,i):n()},n.prototype._showAxisTooltip=function(t,n){var i=this._ecModel,r=this._tooltipModel,e=[n.offsetX,n.offsetY],o=ng([n.tooltipOption],r),a=this._renderMode,s=[],u=zl("section",{blocks:[],noHeader:!0}),h=[],f=new jl;R(t,(function(t){R(t.dataByAxis,(function(t){var n=i.getComponent(t.axisDim+"Axis",t.axisIndex),e=t.value;if(n&&null!=e){var o=pm(e,n.axis,i,t.seriesDataIndices,t.valueLabelOpt),l=zl("section",{header:o,noHeader:!ot(o),sortBlocks:!0,blocks:[]});u.blocks.push(l),R(t.seriesDataIndices,(function(u){var c=i.getSeriesByIndex(u.seriesIndex),v=u.dataIndexInside,d=c.getDataParams(v);if(!(d.dataIndex<0)){d.axisDim=t.axisDim,d.axisIndex=t.axisIndex,d.axisType=t.axisType,d.axisId=t.axisId,d.axisValue=ep(n.axis,{value:e}),d.axisValueLabel=o,d.marker=f.makeTooltipMarker("item",Sh(d.color),a);var p=el(c.formatTooltip(v,!0,null)),m=p.frag;if(m){var g=ng([c],r).get("valueFormatter");l.blocks.push(g?O({valueFormatter:g},m):m)}p.text&&h.push(p.text),s.push(d)}}))}}))})),u.blocks.reverse(),h.reverse();var l=n.position,c=o.get("order"),v=Pl(u,f,a,c,i.get("useUTC"),o.get("textStyle"));v&&h.unshift(v);var d=h.join("richText"===a?"\n\n":"<br/>");this._showOrMove(o,(function(){this._updateContentNotChangedOnAxis(t,s)?this._updatePosition(o,l,e[0],e[1],this._tooltipContent,s):this._showTooltipContent(o,d,s,Math.random()+"",e[0],e[1],l,null,f)}))},n.prototype._showSeriesItemTooltip=function(t,n,i){var r=this._ecModel,e=pa(n),o=e.seriesIndex,a=r.getSeriesByIndex(o),s=e.dataModel||a,u=e.dataIndex,h=e.dataType,f=s.getData(h),l=this._renderMode,c=t.positionDefault,v=ng([f.getItemModel(u),s,a&&(a.coordinateSystem||{}).model],this._tooltipModel,c?{position:c}:null),d=v.get("trigger");if(null==d||"item"===d){var p=s.getDataParams(u,h),m=new jl;p.marker=m.makeTooltipMarker("item",Sh(p.color),l);var g=el(s.formatTooltip(u,!1,h)),y=v.get("order"),b=v.get("valueFormatter"),w=g.frag,x=w?Pl(b?O({valueFormatter:b},w):w,m,l,y,r.get("useUTC"),v.get("textStyle")):g.text,M="item_"+s.name+"_"+u;this._showOrMove(v,(function(){this._showTooltipContent(v,x,p,M,t.offsetX,t.offsetY,t.position,t.target,m)})),i({type:"showTip",dataIndexInside:u,dataIndex:f.getRawIndex(u),seriesIndex:o,from:this.uid})}},n.prototype._showComponentItemTooltip=function(t,n,i){var r=pa(n),e=r.tooltipConfig.option||{};X(e)&&(e={content:e,formatter:e});var o=[e],a=this._ecModel.getComponent(r.componentMainType,r.componentIndex);a&&o.push(a),o.push({formatter:e.content});var s=t.positionDefault,u=ng(o,this._tooltipModel,s?{position:s}:null),h=u.get("content"),f=Math.random()+"",l=new jl;this._showOrMove(u,(function(){var i=N(u.get("formatterParams")||{});this._showTooltipContent(u,h,i,f,t.offsetX,t.offsetY,t.position,n,l)})),i({type:"showTip",from:this.uid})},n.prototype._showTooltipContent=function(t,n,i,r,e,o,a,s,u){if(this._ticket="",t.get("showContent")&&t.get("show")){var h=this._tooltipContent;h.setEnterable(t.get("enterable"));var f=t.get("formatter");a=a||t.get("position");var l=n,c=this._getNearestPoint([e,o],i,t.get("trigger"),t.get("borderColor")).color;if(f)if(X(f)){var v=t.ecModel.get("useUTC"),d=j(i)?i[0]:i;l=f,d&&d.axisType&&d.axisType.indexOf("time")>=0&&(l=dh(d.axisValue,l,v)),l=kh(l,i,!0)}else if(Y(f)){var p=H((function(n,r){n===this._ticket&&(h.setContent(r,u,t,c,a),this._updatePosition(t,a,e,o,h,i,s))}),this);this._ticket=r,l=f(i,r,p)}else l=f;h.setContent(l,u,t,c,a),h.show(t,c),this._updatePosition(t,a,e,o,h,i,s)}},n.prototype._getNearestPoint=function(t,n,i,r){return"axis"===i||j(n)?{color:r||("html"===this._renderMode?"#fff":"none")}:j(n)?void 0:{color:r||n.color||n.borderColor}},n.prototype._updatePosition=function(t,n,i,r,e,o,a){var s=this._api.getWidth(),u=this._api.getHeight();n=n||t.get("position");var h=e.getSize(),f=t.get("align"),l=t.get("verticalAlign"),c=a&&a.getBoundingRect().clone();if(a&&c.applyTransform(a.transform),Y(n)&&(n=n([i,r],o,e.el,c,{viewSize:[s,u],contentSize:h.slice()})),j(n))i=Or(n[0],s),r=Or(n[1],u);else if(G(n)){var v=n;v.width=h[0],v.height=h[1];var d=Lh(v,{width:s,height:u});i=d.x,r=d.y,f=null,l=null}else if(X(n)&&a){var p=function(t,n,i,r){var e=i[0],o=i[1],a=Math.ceil(Math.SQRT2*r)+8,s=0,u=0,h=n.width,f=n.height;switch(t){case"inside":s=n.x+h/2-e/2,u=n.y+f/2-o/2;break;case"top":s=n.x+h/2-e/2,u=n.y-o-a;break;case"bottom":s=n.x+h/2-e/2,u=n.y+f+a;break;case"left":s=n.x-e-a,u=n.y+f/2-o/2;break;case"right":s=n.x+h+a,u=n.y+f/2-o/2}return[s,u]}(n,c,h,t.get("borderWidth"));i=p[0],r=p[1]}else p=function(t,n,i,r,e,o,a){var s=i.getSize(),u=s[0],h=s[1];return null!=o&&(t+u+o+2>r?t-=u+o:t+=o),null!=a&&(n+h+a>e?n-=h+a:n+=a),[t,n]}(i,r,e,s,u,f?null:20,l?null:20),i=p[0],r=p[1];f&&(i-=rg(f)?h[0]/2:"right"===f?h[0]:0),l&&(r-=rg(l)?h[1]/2:"bottom"===l?h[1]:0),Pm(t)&&(p=function(t,n,i,r,e){var o=i.getSize(),a=o[0],s=o[1];return t=Math.min(t+a,r)-a,n=Math.min(n+s,e)-s,[t=Math.max(t,0),n=Math.max(n,0)]}(i,r,e,s,u),i=p[0],r=p[1]),e.moveTo(i,r)},n.prototype._updateContentNotChangedOnAxis=function(t,n){var i=this._lastDataByCoordSys,r=this._cbParamsList,e=!!i&&i.length===t.length;return e&&R(i,(function(i,o){var a=i.dataByAxis||[],s=(t[o]||{}).dataByAxis||[];(e=e&&a.length===s.length)&&R(a,(function(t,i){var o=s[i]||{},a=t.seriesDataIndices||[],u=o.seriesDataIndices||[];(e=e&&t.value===o.value&&t.axisType===o.axisType&&t.axisId===o.axisId&&a.length===u.length)&&R(a,(function(t,n){var i=u[n];e=e&&t.seriesIndex===i.seriesIndex&&t.dataIndex===i.dataIndex})),r&&R(t.seriesDataIndices,(function(t){var i=t.seriesIndex,o=n[i],a=r[i];o&&a&&a.data!==o.data&&(e=!1)}))}))})),this._lastDataByCoordSys=t,this._cbParamsList=n,!!e},n.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},n.prototype.dispose=function(t,n){!f.node&&n.getDom()&&(vc(this,"_updatePosition"),this._tooltipContent.dispose(),Tm("itemTooltip",n))},n.type="tooltip",n}(tc);function ng(t,n,i){var r,e=n.ecModel;i?(r=new ah(i,e,e),r=new ah(n.option,r,e)):r=n;for(var o=t.length-1;o>=0;o--){var a=t[o];a&&(a instanceof ah&&(a=a.get("tooltip",!0)),X(a)&&(a={formatter:a}),a&&(r=new ah(a,r,e)))}return r}function ig(t,n){return t.dispatchAction||H(n.dispatchAction,n)}function rg(t){return"center"===t||"middle"===t}var eg=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i.layoutMode={type:"box",ignoreSize:!0},i}return u(n,t),n.prototype.init=function(t,n,i){this.mergeDefaultAndTheme(t,i),t.selected=t.selected||{},this._updateSelector(t)},n.prototype.mergeOption=function(n,i){t.prototype.mergeOption.call(this,n,i),this._updateSelector(n)},n.prototype._updateSelector=function(t){var n=t.selector,i=this.ecModel;!0===n&&(n=t.selector=["all","inverse"]),j(n)&&R(n,(function(t,r){X(t)&&(t={type:t}),n[r]=L(t,function(t,n){return"all"===n?{type:"all",title:t.getLocaleModel().get(["legend","selector","all"])}:"inverse"===n?{type:"inverse",title:t.getLocaleModel().get(["legend","selector","inverse"])}:void 0}(i,t.type))}))},n.prototype.optionUpdated=function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var n=!1,i=0;i<t.length;i++){var r=t[i].get("name");if(this.isSelected(r)){this.select(r),n=!0;break}}!n&&this.select(t[0].get("name"))}},n.prototype._updateData=function(t){var n=[],i=[];t.eachRawSeries((function(r){var e;if(i.push(r.name),r.legendVisualProvider){var o=r.legendVisualProvider.getAllNames();t.isSeriesFiltered(r)||(i=i.concat(o)),o.length?n=n.concat(o):e=!0}else e=!0;e&&Qr(r)&&n.push(r.name)})),this._availableNames=i;var r=F(this.get("data")||n,(function(t){return(X(t)||q(t))&&(t={name:t}),new ah(t,this,this.ecModel)}),this);this._data=r},n.prototype.getData=function(){return this._data},n.prototype.select=function(t){var n=this.option.selected;"single"===this.get("selectedMode")&&R(this._data,(function(t){n[t.get("name")]=!1})),n[t]=!0},n.prototype.unSelect=function(t){"single"!==this.get("selectedMode")&&(this.option.selected[t]=!1)},n.prototype.toggleSelected=function(t){var n=this.option.selected;n.hasOwnProperty(t)||(n[t]=!0),this[n[t]?"unSelect":"select"](t)},n.prototype.allSelect=function(){var t=this.option.selected;R(this._data,(function(n){t[n.get("name",!0)]=!0}))},n.prototype.inverseSelect=function(){var t=this.option.selected;R(this._data,(function(n){var i=n.get("name",!0);t.hasOwnProperty(i)||(t[i]=!0),t[i]=!t[i]}))},n.prototype.isSelected=function(t){var n=this.option.selected;return!(n.hasOwnProperty(t)&&!n[t])&&z(this._availableNames,t)>=0},n.prototype.getOrient=function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},n.type="legend.plain",n.dependencies=["series"],n.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",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:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},n}(_h),og=U,ag=R,sg=Cr,ug=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i.newlineDisabled=!1,i}return u(n,t),n.prototype.init=function(){this.group.add(this._contentGroup=new sg),this.group.add(this._selectorGroup=new sg),this._isFirstRender=!0},n.prototype.getContentGroup=function(){return this._contentGroup},n.prototype.getSelectorGroup=function(){return this._selectorGroup},n.prototype.render=function(t,n,i){var r=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),t.get("show",!0)){var e=t.get("align"),o=t.get("orient");e&&"auto"!==e||(e="right"===t.get("left")&&"vertical"===o?"right":"left");var a=t.get("selector",!0),s=t.get("selectorPosition",!0);!a||s&&"auto"!==s||(s="horizontal"===o?"end":"start"),this.renderInner(e,t,n,i,a,o,s);var u=t.getBoxLayoutParams(),h={width:i.getWidth(),height:i.getHeight()},f=t.get("padding"),l=Lh(u,h,f),c=this.layoutInner(t,e,l,r,a,s),v=Lh(D({width:c.width,height:c.height},u),h,f);this.group.x=v.x-c.x,this.group.y=v.y-c.y,this.group.markRedraw(),this.group.add(this._backgroundEl=function(t,n){var i=mh(n.get("padding")),r=n.getItemStyle(["color","opacity"]);return r.fill=n.get("backgroundColor"),new na({shape:{x:t.x-i[3],y:t.y-i[0],width:t.width+i[1]+i[3],height:t.height+i[0]+i[2],r:n.get("borderRadius")},style:r,silent:!0,z2:-1})}(c,t))}},n.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},n.prototype.renderInner=function(t,n,i,r,e,o,a){var s=this.getContentGroup(),u=ht(),h=n.get("selectedMode"),f=[];i.eachRawSeries((function(t){!t.get("legendHoverLink")&&f.push(t.id)})),ag(n.getData(),(function(e,o){var a=e.get("name");if(!this.newlineDisabled&&(""===a||"\n"===a)){var l=new sg;return l.newline=!0,void s.add(l)}var c=i.getSeriesByName(a)[0];if(!u.get(a))if(c){var v=c.getData(),d=v.getVisual("legendLineStyle")||{},p=v.getVisual("legendIcon"),m=v.getVisual("style");this._createItem(c,a,o,e,n,t,d,m,p,h,r).on("click",og(hg,a,null,r,f)).on("mouseover",og(lg,c.name,null,r,f)).on("mouseout",og(cg,c.name,null,r,f)),u.set(a,!0)}else i.eachRawSeries((function(i){if(!u.get(a)&&i.legendVisualProvider){var s=i.legendVisualProvider;if(!s.containName(a))return;var l=s.indexOfName(a),c=s.getItemVisual(l,"style"),v=s.getItemVisual(l,"legendIcon"),d=Qn(c.fill);d&&0===d[3]&&(d[3]=.2,c=O(O({},c),{fill:ii(d,"rgba")})),this._createItem(i,a,o,e,n,t,{},c,v,h,r).on("click",og(hg,null,a,r,f)).on("mouseover",og(lg,null,a,r,f)).on("mouseout",og(cg,null,a,r,f)),u.set(a,!0)}}),this)}),this),e&&this._createSelector(e,n,r,o,a)},n.prototype._createSelector=function(t,n,i){var r=this.getSelectorGroup();ag(t,(function(t){var e=t.type,o=new ea({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:"all"===e?"legendAllSelect":"legendInverseSelect"})}});r.add(o),Wu(o,{normal:n.getModel("selectorLabel"),emphasis:n.getModel(["emphasis","selectorLabel"])},{defaultText:t.title}),Ka(o)}))},n.prototype._createItem=function(t,n,i,r,e,o,a,s,u,h,f){var l,c,v,d=t.visualDrawType,p=e.get("itemWidth"),m=e.get("itemHeight"),g=e.isSelected(n),y=r.get("symbolRotate"),b=r.get("symbolKeepAspect"),w=r.get("icon"),x=function(t,n,i,r,e,o,a){function s(t,n){"auto"===t.lineWidth&&(t.lineWidth=n.lineWidth>0?2:0),ag(t,(function(i,r){"inherit"===t[r]&&(t[r]=n[r])}))}var u=n.getModel("itemStyle"),h=u.getItemStyle(),f=0===t.lastIndexOf("empty",0)?"fill":"stroke",l=u.getShallow("decal");h.decal=l&&"inherit"!==l?Dv(l,a):r.decal,"inherit"===h.fill&&(h.fill=r[e]),"inherit"===h.stroke&&(h.stroke=r[f]),"inherit"===h.opacity&&(h.opacity=("fill"===e?r:i).opacity),s(h,r);var c=n.getModel("lineStyle"),v=c.getLineStyle();if(s(v,i),"auto"===h.fill&&(h.fill=r.fill),"auto"===h.stroke&&(h.stroke=r.fill),"auto"===v.stroke&&(v.stroke=r.fill),!o){var d=n.get("inactiveBorderWidth");h.lineWidth="auto"===d?r.lineWidth>0&&h[f]?2:0:h.lineWidth,h.fill=n.get("inactiveColor"),h.stroke=n.get("inactiveBorderColor"),v.stroke=c.get("inactiveColor"),v.lineWidth=c.get("inactiveWidth")}return{itemStyle:h,lineStyle:v}}(u=w||u||"roundRect",r,a,s,d,g,f),M=new sg,k=r.getModel("textStyle");if(!Y(t.getLegendIcon)||w&&"inherit"!==w){var S="inherit"===w&&t.getData().getVisual("symbol")?"inherit"===y?t.getData().getVisual("symbolRotate"):y:0;M.add(((v=sv(c=(l={itemWidth:p,itemHeight:m,icon:u,iconRotate:S,itemStyle:x.itemStyle,lineStyle:x.lineStyle,symbolKeepAspect:b}).icon||"roundRect",0,0,l.itemWidth,l.itemHeight,l.itemStyle.fill,l.symbolKeepAspect)).setStyle(l.itemStyle),v.rotation=(l.iconRotate||0)*Math.PI/180,v.setOrigin([l.itemWidth/2,l.itemHeight/2]),c.indexOf("empty")>-1&&(v.style.stroke=v.style.fill,v.style.fill="#fff",v.style.lineWidth=2),v))}else M.add(t.getLegendIcon({itemWidth:p,itemHeight:m,icon:u,iconRotate:y,itemStyle:x.itemStyle,lineStyle:x.lineStyle,symbolKeepAspect:b}));var A="left"===o?p+5:-5,C=o,T=e.get("formatter"),I=n;X(T)&&T?I=T.replace("{name}",null!=n?n:""):Y(T)&&(I=T(n));var N=r.get("inactiveColor");M.add(new ea({style:Hu(k,{text:I,x:A,y:m/2,fill:g?k.getTextColor():N,align:C,verticalAlign:"middle"})}));var L=new na({shape:M.getBoundingRect(),invisible:!0}),O=r.getModel("tooltip");return O.get("show")&&zu({el:L,componentModel:e,itemName:n,itemTooltipOption:O.option}),M.add(L),M.eachChild((function(t){t.silent=!0})),L.silent=!h,this.getContentGroup().add(M),Ka(M),M.__legendDataIndex=i,M},n.prototype.layoutInner=function(t,n,i,r,e,o){var a=this.getContentGroup(),s=this.getSelectorGroup();Nh(t.get("orient"),a,t.get("itemGap"),i.width,i.height);var u=a.getBoundingRect(),h=[-u.x,-u.y];if(s.markRedraw(),a.markRedraw(),e){Nh("horizontal",s,t.get("selectorItemGap",!0));var f=s.getBoundingRect(),l=[-f.x,-f.y],c=t.get("selectorButtonGap",!0),v=t.getOrient().index,d=0===v?"width":"height",p=0===v?"height":"width",m=0===v?"y":"x";"end"===o?l[v]+=u[d]+c:h[v]+=f[d]+c,l[1-v]+=u[p]/2-f[p]/2,s.x=l[0],s.y=l[1],a.x=h[0],a.y=h[1];var g={x:0,y:0};return g[d]=u[d]+c+f[d],g[p]=Math.max(u[p],f[p]),g[m]=Math.min(0,f[m]+l[1-v]),g}return a.x=h[0],a.y=h[1],this.group.getBoundingRect()},n.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},n.type="legend.plain",n}(tc);function hg(t,n,i,r){cg(t,n,i,r),i.dispatchAction({type:"legendToggleSelect",name:null!=t?t:n}),lg(t,n,i,r)}function fg(t){for(var n,i=t.getZr().storage.getDisplayList(),r=0,e=i.length;r<e&&!(n=i[r].states.emphasis);)r++;return n&&n.hoverLayer}function lg(t,n,i,r){fg(i)||i.dispatchAction({type:"highlight",seriesName:t,name:n,excludeSeriesId:r})}function cg(t,n,i,r){fg(i)||i.dispatchAction({type:"downplay",seriesName:t,name:n,excludeSeriesId:r})}function vg(t){var n=t.findComponents({mainType:"legend"});n&&n.length&&t.filterSeries((function(t){for(var i=0;i<n.length;i++)if(!n[i].isSelected(t.name))return!1;return!0}))}function dg(t,n,i){var r,e={},o="toggleSelected"===t;return i.eachComponent("legend",(function(i){o&&null!=r?i[r?"select":"unSelect"](n.name):"allSelect"===t||"inverseSelect"===t?i[t]():(i[t](n.name),r=i.isSelected(n.name)),R(i.getData(),(function(t){var n=t.get("name");if("\n"!==n&&""!==n){var r=i.isSelected(n);e[n]=e.hasOwnProperty(n)?e[n]&&r:r}}))})),"allSelect"===t||"inverseSelect"===t?{selected:e}:{name:n.name,selected:e}}function pg(t){t.registerComponentModel(eg),t.registerComponentView(ug),t.registerProcessor(t.PRIORITY.PROCESSOR.SERIES_FILTER,vg),t.registerSubTypeDefaulter("legend",(function(){return"plain"})),function(t){t.registerAction("legendToggleSelect","legendselectchanged",U(dg,"toggleSelected")),t.registerAction("legendAllSelect","legendselectall",U(dg,"allSelect")),t.registerAction("legendInverseSelect","legendinverseselect",U(dg,"inverseSelect")),t.registerAction("legendSelect","legendselected",U(dg,"select")),t.registerAction("legendUnSelect","legendunselected",U(dg,"unSelect"))}(t)}var mg=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}var i;return u(n,t),n.prototype.setScrollDataIndex=function(t){this.option.scrollDataIndex=t},n.prototype.init=function(n,i,r){var e=zh(n);t.prototype.init.call(this,n,i,r),gg(this,n,e)},n.prototype.mergeOption=function(n,i){t.prototype.mergeOption.call(this,n,i),gg(this,this.option,n)},n.type="legend.scroll",n.defaultOption=(i={scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800},L(L({},eg.defaultOption,!0),i,!0)),n}(eg);function gg(t,n,i){var r=[1,1];r[t.getOrient().index]=0,Dh(n,i,{type:"box",ignoreSize:!!r})}var yg=Cr,bg=["width","height"],wg=["x","y"],xg=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i.newlineDisabled=!0,i._currentIndex=0,i}return u(n,t),n.prototype.init=function(){t.prototype.init.call(this),this.group.add(this._containerGroup=new yg),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new yg)},n.prototype.resetInner=function(){t.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},n.prototype.renderInner=function(n,i,r,e,o,a,s){var u=this;t.prototype.renderInner.call(this,n,i,r,e,o,a,s);var h=this._controllerGroup,f=i.get("pageIconSize",!0),l=j(f)?f:[f,f];v("pagePrev",0);var c=i.getModel("pageTextStyle");function v(t,n){var r=t+"DataIndex",o=Lu(i.get("pageIcons",!0)[i.getOrient().name][n],{onclick:H(u._pageGo,u,r,i,e)},{x:-l[0]/2,y:-l[1]/2,width:l[0],height:l[1]});o.name=t,h.add(o)}h.add(new ea({name:"pageText",style:{text:"xx/xx",fill:c.getTextColor(),font:c.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),v("pageNext",1)},n.prototype.layoutInner=function(t,n,i,r,e,o){var a=this.getSelectorGroup(),s=t.getOrient().index,u=bg[s],h=wg[s],f=bg[1-s],l=wg[1-s];e&&Nh("horizontal",a,t.get("selectorItemGap",!0));var c=t.get("selectorButtonGap",!0),v=a.getBoundingRect(),d=[-v.x,-v.y],p=N(i);e&&(p[u]=i[u]-v[u]-c);var m=this._layoutContentAndController(t,r,p,s,u,f,l,h);if(e){if("end"===o)d[s]+=m[u]+c;else{var g=v[u]+c;d[s]-=g,m[h]-=g}m[u]+=v[u]+c,d[1-s]+=m[l]+m[f]/2-v[f]/2,m[f]=Math.max(m[f],v[f]),m[l]=Math.min(m[l],v[l]+d[1-s]),a.x=d[0],a.y=d[1],a.markRedraw()}return m},n.prototype._layoutContentAndController=function(t,n,i,r,e,o,a,s){var u=this.getContentGroup(),h=this._containerGroup,f=this._controllerGroup;Nh(t.get("orient"),u,t.get("itemGap"),r?i.width:null,r?null:i.height),Nh("horizontal",f,t.get("pageButtonItemGap",!0));var l=u.getBoundingRect(),c=f.getBoundingRect(),v=this._showController=l[e]>i[e],d=[-l.x,-l.y];n||(d[r]=u[s]);var p=[0,0],m=[-c.x,-c.y],g=tt(t.get("pageButtonGap",!0),t.get("itemGap",!0));v&&("end"===t.get("pageButtonPosition",!0)?m[r]+=i[e]-c[e]:p[r]+=c[e]+g),m[1-r]+=l[o]/2-c[o]/2,u.setPosition(d),h.setPosition(p),f.setPosition(m);var y={x:0,y:0};if(y[e]=v?i[e]:l[e],y[o]=Math.max(l[o],c[o]),y[a]=Math.min(0,c[a]+m[1-r]),h.__rectSize=i[e],v){var b={x:0,y:0};b[e]=Math.max(i[e]-c[e]-g,0),b[o]=y[o],h.setClipPath(new na({shape:b})),h.__rectSize=b[e]}else f.eachChild((function(t){t.attr({invisible:!0,silent:!0})}));var w=this._getPageInfo(t);return null!=w.pageIndex&&vu(u,{x:w.contentPosition[0],y:w.contentPosition[1]},v?t:null),this._updatePageInfoView(t,w),y},n.prototype._pageGo=function(t,n,i){var r=this._getPageInfo(n)[t];null!=r&&i.dispatchAction({type:"legendScroll",scrollDataIndex:r,legendId:n.id})},n.prototype._updatePageInfoView=function(t,n){var i=this._controllerGroup;R(["pagePrev","pageNext"],(function(r){var e=null!=n[r+"DataIndex"],o=i.childOfName(r);o&&(o.setStyle("fill",t.get(e?"pageIconColor":"pageIconInactiveColor",!0)),o.cursor=e?"pointer":"default")}));var r=i.childOfName("pageText"),e=t.get("pageFormatter"),o=n.pageIndex,a=null!=o?o+1:0,s=n.pageCount;r&&e&&r.setStyle("text",X(e)?e.replace("{current}",null==a?"":a+"").replace("{total}",null==s?"":s+""):e({current:a,total:s}))},n.prototype._getPageInfo=function(t){var n=t.get("scrollDataIndex",!0),i=this.getContentGroup(),r=this._containerGroup.__rectSize,e=t.getOrient().index,o=bg[e],a=wg[e],s=this._findTargetItemIndex(n),u=i.children(),h=u[s],f=u.length,l=f?1:0,c={contentPosition:[i.x,i.y],pageCount:l,pageIndex:l-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!h)return c;var v=y(h);c.contentPosition[e]=-v.s;for(var d=s+1,p=v,m=v,g=null;d<=f;++d)(!(g=y(u[d]))&&m.e>p.s+r||g&&!b(g,p.s))&&(p=m.i>p.i?m:g)&&(null==c.pageNextDataIndex&&(c.pageNextDataIndex=p.i),++c.pageCount),m=g;for(d=s-1,p=v,m=v,g=null;d>=-1;--d)(g=y(u[d]))&&b(m,g.s)||!(p.i<m.i)||(m=p,null==c.pagePrevDataIndex&&(c.pagePrevDataIndex=p.i),++c.pageCount,++c.pageIndex),p=g;return c;function y(t){if(t){var n=t.getBoundingRect(),i=n[a]+t[a];return{s:i,e:i+n[o],i:t.__legendDataIndex}}}function b(t,n){return t.e>=n&&t.s<=n+r}},n.prototype._findTargetItemIndex=function(t){return this._showController?(this.getContentGroup().eachChild((function(r,e){var o=r.__legendDataIndex;null==i&&null!=o&&(i=e),o===t&&(n=e)})),null!=n?n:i):0;var n,i},n.type="legend.scroll",n}(ug);function Mg(t){sp(pg),t.registerComponentModel(mg),t.registerComponentView(xg),function(t){t.registerAction("legendScroll","legendscroll",(function(t,n){var i=t.scrollDataIndex;null!=i&&n.eachComponent({mainType:"legend",subType:"scroll",query:t},(function(t){t.setScrollDataIndex(i)}))}))}(t)}var kg={label:{enabled:!0},decal:{show:!1}},Sg=ie(),Ag={};function Cg(t,n){var i=t.getModel("aria");if(i.get("enabled")){var r=N(kg);L(r.label,t.getLocaleModel().get("aria"),!1),L(i.option,r,!1),function(){if(i.getModel("decal").get("show")){var n=ht();t.eachSeries((function(t){if(!t.isColorBySeries()){var i=n.get(t.type);i||n.set(t.type,i={}),Sg(t).scope=i}})),t.eachRawSeries((function(n){if(!t.isSeriesFiltered(n))if(Y(n.enableAriaDecal))n.enableAriaDecal();else{var i=n.getData();if(n.isColorBySeries()){var r=Jh(n.ecModel,n.name,Ag,t.getSeriesCount()),e=i.getVisual("decal");i.setVisual("decal",h(e,r))}else{var o=n.getRawData(),a={},s=Sg(n).scope;i.each((function(t){var n=i.getRawIndex(t);a[n]=t}));var u=o.count();o.each((function(t){var r=a[t],e=o.getName(t)||t+"",f=Jh(n.ecModel,e,s,u),l=i.getItemVisual(r,"decal");i.setItemVisual(r,"decal",h(l,f))}))}}function h(t,n){var i=t?O(O({},n),t):n;return i.dirty=!0,i}}))}}(),function(){var r=t.getLocaleModel().get("aria"),o=i.getModel("label");if(o.option=D(o.option,r),o.get("enabled")){var a=n.getZr().dom;if(o.get("description"))a.setAttribute("aria-label",o.get("description"));else{var s,u=t.getSeriesCount(),h=o.get(["data","maxCount"])||10,f=o.get(["series","maxCount"])||10,l=Math.min(u,f);if(!(u<1)){var c=function(){var n=t.get("title");return n&&n.length&&(n=n[0]),n&&n.text}();if(c)s=e(o.get(["general","withTitle"]),{title:c});else s=o.get(["general","withoutTitle"]);var v=[];s+=e(o.get(u>1?["series","multiple","prefix"]:["series","single","prefix"]),{seriesCount:u}),t.eachSeries((function(n,i){if(i<l){var r=void 0,a=n.get("name")?"withName":"withoutName";r=e(r=o.get(u>1?["series","multiple",a]:["series","single",a]),{seriesId:n.seriesIndex,seriesName:n.get("name"),seriesType:(b=n.subType,t.getLocaleModel().get(["series","typeNames"])[b]||"自定义图")});var s=n.getData();s.count()>h?r+=e(o.get(["data","partialData"]),{displayCnt:h}):r+=o.get(["data","allData"]);for(var f=o.get(["data","separator","middle"]),c=o.get(["data","separator","end"]),d=[],p=0;p<s.count();p++)if(p<h){var m=s.getName(p),g=s.getValues(p),y=o.get(["data",m?"withName":"withoutName"]);d.push(e(y,{name:m,value:g.join(f)}))}r+=d.join(f)+c,v.push(r)}var b}));var d=o.getModel(["series","multiple","separator"]),p=d.get("middle"),m=d.get("end");s+=v.join(p)+m,a.setAttribute("aria-label",s)}}}}()}function e(t,n){if(!X(t))return t;var i=t;return R(n,(function(t,n){i=i.replace(new RegExp("\\{\\s*"+n+"\\s*\\}","g"),t)})),i}}function Tg(t){if(t&&t.aria){var n=t.aria;null!=n.show&&(n.enabled=n.show),n.label=n.label||{},R(["description","general","series","data"],(function(t){null!=n[t]&&(n.label[t]=n[t])}))}}var Ig=2*Math.PI,Ng=Math.PI/180;function Lg(t,n){return Lh(t.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()})}function Og(t,n){var i=Lg(t,n),r=t.get("center"),e=t.get("radius");j(e)||(e=[0,e]),j(r)||(r=[r,r]);var o=Or(i.width,n.getWidth()),a=Or(i.height,n.getHeight()),s=Math.min(o,a);return{cx:Or(r[0],o)+i.x,cy:Or(r[1],a)+i.y,r0:Or(e[0],s/2),r:Or(e[1],s/2)}}function Dg(t,n,i){n.eachSeriesByType(t,(function(t){var n=t.getData(),r=n.mapDimension("value"),e=Lg(t,i),o=Og(t,i),a=o.cx,s=o.cy,u=o.r,h=o.r0,f=-t.get("startAngle")*Ng,l=t.get("minAngle")*Ng,c=0;n.each(r,(function(t){!isNaN(t)&&c++}));var v=n.getSum(r),d=Math.PI/(v||c)*2,p=t.get("clockwise"),m=t.get("roseType"),g=t.get("stillShowZeroSum"),y=n.getDataExtent(r);y[0]=0;var b=Ig,w=0,x=f,M=p?1:-1;if(n.setLayout({viewRect:e,r:u}),n.each(r,(function(t,i){var r;if(isNaN(t))n.setItemLayout(i,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:p,cx:a,cy:s,r0:h,r:m?NaN:u});else{(r="area"!==m?0===v&&g?d:t*d:Ig/c)<l?(r=l,b-=l):w+=t;var e=x+M*r;n.setItemLayout(i,{angle:r,startAngle:x,endAngle:e,clockwise:p,cx:a,cy:s,r0:h,r:m?Lr(t,y,[h,u]):u}),x=e}})),b<Ig&&c)if(b<=.001){var k=Ig/c;n.each(r,(function(t,i){if(!isNaN(t)){var r=n.getItemLayout(i);r.angle=k,r.startAngle=f+M*i*k,r.endAngle=f+M*(i+1)*k}}))}else d=b/w,x=f,n.each(r,(function(t,i){if(!isNaN(t)){var r=n.getItemLayout(i),e=r.angle===l?l:t*d;r.startAngle=x,r.endAngle=x+M*e,x+=M*e}}))}))}var zg=Math.PI/180;function Bg(t,n,i,r,e,o,a,s,u,h){if(!(t.length<2)){for(var f=t.length,l=0;l<f;l++)"outer"===t[l].position&&"labelLine"===t[l].labelAlignTo&&(t[l].linePoints[1][0]+=t[l].label.x-h,t[l].label.x=h);Bp(t,u,u+a)&&function(t){for(var o={list:[],maxY:0},a={list:[],maxY:0},s=0;s<t.length;s++)if("none"===t[s].labelAlignTo){var u=t[s],h=u.label.y>i?a:o,f=Math.abs(u.label.y-i);if(f>=h.maxY){var l=u.label.x-n-u.len2*e,v=r+u.len,d=Math.abs(l)<v?Math.sqrt(f*f/(1-l*l/v/v)):v;h.rB=d,h.maxY=f}h.list.push(u)}c(o),c(a)}(t)}function c(t){for(var o=t.rB,a=o*o,s=0;s<t.list.length;s++){var u=t.list[s],h=Math.abs(u.label.y-i),f=r+u.len,l=f*f,c=Math.sqrt((1-Math.abs(h*h/a))*l),v=n+(c+u.len2)*e;_g(u,u.targetTextWidth-(v-u.label.x)*e,!0),u.label.x=v}}}function _g(t,n,i){if(void 0===i&&(i=!1),null==t.labelStyleWidth){var r=t.label,e=r.style,o=t.rect,a=e.backgroundColor,s=e.padding,u=s?s[1]+s[3]:0,h=e.overflow,f=o.width+(a?0:u);if(n<f||i){var l=o.height;if(h&&h.match("break")){r.setStyle("backgroundColor",null),r.setStyle("width",n-u);var c=r.getBoundingRect();r.setStyle("width",Math.ceil(c.width)),r.setStyle("backgroundColor",a)}else{var v=n-u;r.setStyle("width",n<f?v:i?v>t.unconstrainedWidth?null:v:null)}var d=r.getBoundingRect();o.width=d.width,o.height=d.height+((r.style.margin||0)+2.1),o.y-=(o.height-l)/2}}}function Rg(t){return"center"===t.position}function Fg(t,n,i){var r=t.get("borderRadius");if(null==r)return i?{cornerRadius:0}:null;j(r)||(r=[r,r,r,r]);var e=Math.abs(n.r||0-n.r0||0);return{cornerRadius:F(r,(function(t){return pr(t,e)}))}}var Eg=function(t){function n(n,i,r){var e=t.call(this)||this;e.z2=2;var o=new ea;return e.setTextContent(o),e.updateData(n,i,r,!0),e}return u(n,t),n.prototype.updateData=function(t,n,i,r){var e=this,o=t.hostModel,a=t.getItemModel(n),s=a.getModel("emphasis"),u=t.getItemLayout(n),h=O(Fg(a.getModel("itemStyle"),u,!0),u);if(isNaN(h.startAngle))e.setShape(h);else{if(r){e.setShape(h);var f=o.getShallow("animationType");o.ecModel.ssr?(du(e,{scaleX:0,scaleY:0},o,{dataIndex:n,isFrom:!0}),e.originX=h.cx,e.originY=h.cy):"scale"===f?(e.shape.r=u.r0,du(e,{shape:{r:u.r}},o,n)):null!=i?(e.setShape({startAngle:i,endAngle:i}),du(e,{shape:{startAngle:u.startAngle,endAngle:u.endAngle}},o,n)):(e.shape.endAngle=u.startAngle,vu(e,{shape:{endAngle:u.endAngle}},o,n))}else lu(l=e).oldStyle=l.style,vu(e,{shape:h},o,n);var l;e.useStyle(t.getItemVisual(n,"style")),function(t,n,i){i=i||"itemStyle";for(var r=0;r<$a.length;r++){var e=$a[r],o=n.getModel([e,i]);t.ensureState(e).style=o[Ja[i]]()}}(e,a);var c=(u.startAngle+u.endAngle)/2,v=o.get("selectedOffset"),d=Math.cos(c)*v,p=Math.sin(c)*v,m=a.getShallow("cursor");m&&e.attr("cursor",m),this._updateLabel(o,t,n),e.ensureState("emphasis").shape=O({r:u.r+(s.get("scale")&&s.get("scaleSize")||0)},Fg(s.getModel("itemStyle"),u)),O(e.ensureState("select"),{x:d,y:p,shape:Fg(a.getModel(["select","itemStyle"]),u)}),O(e.ensureState("blur"),{shape:Fg(a.getModel(["blur","itemStyle"]),u)});var g=e.getTextGuideLine(),y=e.getTextContent();g&&O(g.ensureState("select"),{x:d,y:p}),O(y.ensureState("select"),{x:d,y:p}),function(t,n,i,r){r?function(t){Qa(t,!1)}(t):Ka(t,n,i)}(this,s.get("focus"),s.get("blurScope"),s.get("disabled"))}},n.prototype._updateLabel=function(t,n,i){var r=this,e=n.getItemModel(i),o=e.getModel("labelLine"),a=n.getItemVisual(i,"style"),s=a&&a.fill,u=a&&a.opacity;Wu(r,function(t,n){for(var i={normal:t.getModel(n=n||"label")},r=0;r<wa.length;r++){var e=wa[r];i[e]=t.getModel([e,n])}return i}(e),{labelFetcher:n.hostModel,labelDataIndex:i,inheritColor:s,defaultOpacity:u,defaultText:t.getFormattedLabel(i,"normal")||n.getName(i)});var h=r.getTextContent();r.setTextConfig({position:null,rotation:null}),h.attr({z2:10});var f=t.get(["label","position"]);if("outside"!==f&&"outer"!==f)r.removeTextGuideLine();else{var l=this.getTextGuideLine();l||(l=new Ys,this.setTextGuideLine(l)),Lp(this,Op(e),{stroke:s,opacity:nt(o.get(["lineStyle","opacity"]),u,1)})}},n}(Fs),Pg=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.ignoreLabelLineUpdate=!0,n}return u(n,t),n.prototype.render=function(t,n,i){var r,e=t.getData(),o=this._data,a=this.group;if(!o&&e.count()>0){for(var s=e.getItemLayout(0),u=1;isNaN(s&&s.startAngle)&&u<e.count();++u)s=e.getItemLayout(u);s&&(r=s.startAngle)}if(this._emptyCircleSector&&a.remove(this._emptyCircleSector),0===e.count()&&t.get("showEmptyCircle")){var h=new Fs({shape:Og(t,i)});h.useStyle(t.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=h,a.add(h)}e.diff(o).add((function(t){var n=new Eg(e,t,r);e.setItemGraphicEl(t,n),a.add(n)})).update((function(t,n){var i=o.getItemGraphicEl(n);i.updateData(e,t,r),i.off("click"),a.add(i),e.setItemGraphicEl(t,i)})).remove((function(n){yu(o.getItemGraphicEl(n),t,n)})).execute(),function(t){var n,i,r=t.getData(),e=[],o=!1,a=(t.get("minShowLabelAngle")||0)*zg,s=r.getLayout("viewRect"),u=r.getLayout("r"),h=s.width,f=s.x,l=s.y,c=s.height;function v(t){t.ignore=!0}r.each((function(t){var s=r.getItemGraphicEl(t),l=s.shape,c=s.getTextContent(),d=s.getTextGuideLine(),p=r.getItemModel(t),m=p.getModel("label"),g=m.get("position")||p.get(["emphasis","label","position"]),y=m.get("distanceToLabelLine"),b=m.get("alignTo"),w=Or(m.get("edgeDistance"),h),x=m.get("bleedMargin"),M=p.getModel("labelLine"),k=M.get("length");k=Or(k,h);var S=M.get("length2");if(S=Or(S,h),Math.abs(l.endAngle-l.startAngle)<a)return R(c.states,v),void(c.ignore=!0);if(function(t){if(!t.ignore)return!0;for(var n in t.states)if(!1===t.states[n].ignore)return!0;return!1}(c)){var A,C,T,I,N=(l.startAngle+l.endAngle)/2,L=Math.cos(N),O=Math.sin(N);n=l.cx,i=l.cy;var D="inside"===g||"inner"===g;if("center"===g)A=l.cx,C=l.cy,I="center";else{var z=(D?(l.r+l.r0)/2*L:l.r*L)+n,B=(D?(l.r+l.r0)/2*O:l.r*O)+i;if(A=z+3*L,C=B+3*O,!D){var _=z+L*(k+u-l.r),F=B+O*(k+u-l.r),E=_+(L<0?-1:1)*S;A="edge"===b?L<0?f+w:f+h-w:E+(L<0?-y:y),C=F,T=[[z,B],[_,F],[E,F]]}I=D?"center":"edge"===b?L>0?"right":"left":L>0?"left":"right"}var P=Math.PI,W=0,H=m.get("rotate");if(q(H))W=H*(P/180);else if("center"===g)W=0;else if("radial"===H||!0===H)W=L<0?-N+P:-N;else if("tangential"===H&&"outside"!==g&&"outer"!==g){var U=Math.atan2(L,O);U<0&&(U=2*P+U),O>0&&(U=P+U),W=U-P}if(o=!!W,c.x=A,c.y=C,c.rotation=W,c.setStyle({verticalAlign:"middle"}),D){c.setStyle({align:I});var j=c.states.select;j&&(j.x+=c.x,j.y+=c.y)}else{var Y=c.getBoundingRect().clone();Y.applyTransform(c.getComputedTransform());var X=(c.style.margin||0)+2.1;Y.y-=X/2,Y.height+=X,e.push({label:c,labelLine:d,position:g,len:k,len2:S,minTurnAngle:M.get("minTurnAngle"),maxSurfaceAngle:M.get("maxSurfaceAngle"),surfaceNormal:new Ji(L,O),linePoints:T,textAlign:I,labelDistance:y,labelAlignTo:b,edgeDistance:w,bleedMargin:x,rect:Y,unconstrainedWidth:Y.width,labelStyleWidth:c.style.width})}s.setTextConfig({inside:D})}})),!o&&t.get("avoidLabelOverlap")&&function(t,n,i,r,e,o,a,s){for(var u=[],h=[],f=Number.MAX_VALUE,l=-Number.MAX_VALUE,c=0;c<t.length;c++){var v=t[c].label;Rg(t[c])||(v.x<n?(f=Math.min(f,v.x),u.push(t[c])):(l=Math.max(l,v.x),h.push(t[c])))}for(c=0;c<t.length;c++)if(!Rg(m=t[c])&&m.linePoints){if(null!=m.labelStyleWidth)continue;v=m.label;var d,p=m.linePoints;m.targetTextWidth=d="edge"===m.labelAlignTo?v.x<n?p[2][0]-m.labelDistance-a-m.edgeDistance:a+e-m.edgeDistance-p[2][0]-m.labelDistance:"labelLine"===m.labelAlignTo?v.x<n?f-a-m.bleedMargin:a+e-l-m.bleedMargin:v.x<n?v.x-a-m.bleedMargin:a+e-v.x-m.bleedMargin,_g(m,d)}for(Bg(h,n,i,r,1,0,o,0,s,l),Bg(u,n,i,r,-1,0,o,0,s,f),c=0;c<t.length;c++){var m;if(!Rg(m=t[c])&&m.linePoints){var g=(v=m.label).style.padding,y=m.rect.width+(v.style.backgroundColor?0:g?g[1]+g[3]:0),b=(p=m.linePoints)[1][0]-p[2][0];"edge"===m.labelAlignTo?p[2][0]=v.x<n?a+m.edgeDistance+y+m.labelDistance:a+e-m.edgeDistance-y-m.labelDistance:(p[2][0]=v.x<n?v.x+m.labelDistance:v.x-m.labelDistance,p[1][0]=p[2][0]+b),p[1][1]=p[2][1]=v.y}}}(e,n,i,u,h,c,f,l);for(var d=0;d<e.length;d++){var p=e[d],m=p.label,g=p.labelLine,y=isNaN(m.x)||isNaN(m.y);if(m){m.setStyle({align:p.textAlign}),y&&(R(m.states,v),m.ignore=!0);var b=m.states.select;b&&(b.x+=m.x,b.y+=m.y)}if(g){var w=p.linePoints;y||!w?(R(g.states,v),g.ignore=!0):(Cp(w,p.minTurnAngle),Tp(w,p.surfaceNormal,p.maxSurfaceAngle),g.setShape({points:w}),m.__hostTarget.textGuideLineConfig={anchor:new Ji(w[0][0],w[0][1])})}}}(t),"expansion"!==t.get("animationTypeUpdate")&&(this._data=e)},n.prototype.dispose=function(){},n.prototype.containPoint=function(t,n){var i=n.getData().getItemLayout(0);if(i){var r=t[0]-i.cx,e=t[1]-i.cy,o=Math.sqrt(r*r+e*e);return o<=i.r&&o>=i.r0}},n.type="pie",n}(rc),Wg=function(){function t(t,n){this._getDataWithEncodedVisual=t,this._getRawData=n}return t.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},t.prototype.containName=function(t){return this._getRawData().indexOfName(t)>=0},t.prototype.indexOfName=function(t){return this._getDataWithEncodedVisual().indexOfName(t)},t.prototype.getItemVisual=function(t,n){return this._getDataWithEncodedVisual().getItemVisual(t,n)},t}(),Hg=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return u(n,t),n.prototype.init=function(n){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new Wg(H(this.getData,this),H(this.getRawData,this)),this._defaultLabelLine(n)},n.prototype.mergeOption=function(){t.prototype.mergeOption.apply(this,arguments)},n.prototype.getInitialData=function(){return function(t,n){n=j(n)&&{coordDimensions:n}||O({encodeDefine:t.getEncode()},n);var i=t.getSource(),r=function(t,n){Ef(t)||(t=Wf(t));var i=(n=n||{}).coordDimensions||[],r=n.dimensionsDefine||t.dimensionsDefine||[],e=ht(),o=[],a=function(t,n,i,r){var e=Math.max(t.dimensionsDetectedCount||1,n.length,i.length,r||0);return R(n,(function(t){var n;G(t)&&(n=t.dimsDef)&&(e=Math.max(e,n.length))})),e}(t,i,r,n.dimensionsCount),s=n.canOmitUnusedDimensions&&jd(a),u=r===t.dimensionsDefine,h=u?Ud(t):Hd(r),f=n.encodeDefine;!f&&n.encodeDefaulter&&(f=n.encodeDefaulter(t,a));for(var l=ht(f),c=new xl(a),v=0;v<c.length;v++)c[v]=-1;function d(t){var n=c[t];if(n<0){var i=r[t],e=G(i)?i:{name:i},a=new Fd,s=e.name;return null!=s&&null!=h.get(s)&&(a.name=a.displayName=s),null!=e.type&&(a.type=e.type),null!=e.displayName&&(a.displayName=e.displayName),c[t]=o.length,a.storeDimIndex=t,o.push(a),a}return o[n]}if(!s)for(v=0;v<a;v++)d(v);l.each((function(t,n){var i=Xr(t).slice();if(1===i.length&&!X(i[0])&&i[0]<0)l.set(n,!1);else{var r=l.set(n,[]);R(i,(function(t,i){var e=X(t)?h.get(t):t;null!=e&&e<a&&(r[i]=e,m(d(e),n,i))}))}}));var p=0;function m(t,n,i){null!=Ph.get(n)?t.otherDims[n]=i:(t.coordDim=n,t.coordDimIndex=i,e.set(n,!0))}R(i,(function(t){var n,i,r,e;if(X(t))n=t,e={};else{n=(e=t).name;var o=e.ordinalMeta;e.ordinalMeta=null,(e=O({},e)).ordinalMeta=o,i=e.dimsDef,r=e.otherDims,e.name=e.coordDim=e.coordDimIndex=e.dimsDef=e.otherDims=null}var s=l.get(n);if(!1!==s){if(!(s=Xr(s)).length)for(var h=0;h<(i&&i.length||1);h++){for(;p<a&&null!=d(p).coordDim;)p++;p<a&&s.push(p++)}R(s,(function(t,o){var a=d(t);if(u&&null!=e.type&&(a.type=e.type),m(D(a,e),n,o),null==a.name&&i){var s=i[o];!G(s)&&(s={name:s}),a.name=a.displayName=s.name,a.defaultTooltip=s.defaultTooltip}r&&D(a.otherDims,r)}))}}));var g=n.generateCoord,y=n.generateCoordCount,b=null!=y;y=g?y||1:0;var w=g||"value";function x(t){null==t.name&&(t.name=t.coordDim)}if(s)R(o,(function(t){x(t)})),o.sort((function(t,n){return t.storeDimIndex-n.storeDimIndex}));else for(var M=0;M<a;M++){var k=d(M);null==k.coordDim&&(k.coordDim=rp(w,e,b),k.coordDimIndex=0,(!g||y<=0)&&(k.isExtraCoord=!0),y--),x(k),null!=k.type||1!==jh(t,M)&&(!k.isExtraCoord||null==k.otherDims.itemName&&null==k.otherDims.seriesName)||(k.type="ordinal")}return function(t){for(var n=ht(),i=0;i<t.length;i++){var r=t[i],e=r.name,o=n.get(e)||0;o>0&&(r.name=e+(o-1)),o++,n.set(e,o)}}(o),new Wd({source:t,dimensions:o,fullDimensionCount:a,dimensionOmitted:s})}(i,n).dimensions,e=new ip(r,t);return e.initData(i,void 0),e}(this,{coordDimensions:["value"],encodeDefaulter:U(Hh,this)})},n.prototype.getDataParams=function(n){var i=this.getData(),r=t.prototype.getDataParams.call(this,n),e=[];return i.each(i.mapDimension("value"),(function(t){e.push(t)})),r.percent=function(t,n,i){if(!t[n])return 0;var r=E(t,(function(t,n){return t+(isNaN(n)?0:n)}),0);if(0===r)return 0;for(var e=Math.pow(10,i),o=F(t,(function(t){return(isNaN(t)?0:t)/r*e*100})),a=100*e,s=F(o,(function(t){return Math.floor(t)})),u=E(s,(function(t,n){return t+n}),0),h=F(o,(function(t,n){return t-s[n]}));u<a;){for(var f=Number.NEGATIVE_INFINITY,l=null,c=0,v=h.length;c<v;++c)h[c]>f&&(f=h[c],l=c);++s[l],h[l]=0,++u}return s[n]/e}(e,n,i.hostModel.get("percentPrecision")),r.$vars.push("percent"),r},n.prototype._defaultLabelLine=function(t){Vr(t,"labelLine",["show"]);var n=t.labelLine,i=t.emphasis.labelLine;n.show=n.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},n.type="series.pie",n.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,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%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,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"},n}(Vl);function Ug(t,n,i){var r=p.createCanvas(),e=n.getWidth(),o=n.getHeight(),a=r.style;return a&&(a.position="absolute",a.left="0",a.top="0",a.width=e+"px",a.height=o+"px",r.setAttribute("data-zr-dom-id",t)),r.width=e*i,r.height=o*i,r}var jg=function(t){function n(n,i,r){var e,o=t.call(this)||this;o.motionBlur=!1,o.lastFrameAlpha=.7,o.dpr=1,o.virtual=!1,o.config={},o.incremental=!1,o.zlevel=0,o.maxRepaintRectCount=5,o.__dirty=!0,o.__firstTimePaint=!0,o.__used=!1,o.__drawIndex=0,o.__startIndex=0,o.__endIndex=0,o.__prevStartIndex=null,o.__prevEndIndex=null,r=r||Ei,"string"==typeof n?e=Ug(n,i,r):G(n)&&(n=(e=n).id),o.id=n,o.dom=e;var a=e.style;return a&&(lt(e),e.onselectstart=function(){return!1},a.padding="0",a.margin="0",a.borderWidth="0"),o.painter=i,o.dpr=r,o}return mt(n,t),n.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},n.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},n.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},n.prototype.setUnpainted=function(){this.__firstTimePaint=!0},n.prototype.createBackBuffer=function(){var t=this.dpr;this.domBack=Ug("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!==t&&this.ctxBack.scale(t,t)},n.prototype.createRepaintRects=function(t,n,i,r){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var e,o=[],a=this.maxRepaintRectCount,s=!1,u=new sr(0,0,0,0);function h(t){if(t.isFinite()&&!t.isZero())if(0===o.length)(n=new sr(0,0,0,0)).copy(t),o.push(n);else{for(var n,i=!1,r=1/0,e=0,h=0;h<o.length;++h){var f=o[h];if(f.intersect(t)){var l=new sr(0,0,0,0);l.copy(f),l.union(t),o[h]=l,i=!0;break}if(s){u.copy(t),u.union(f);var c=u.width*u.height-t.width*t.height-f.width*f.height;c<r&&(r=c,e=h)}}s&&(o[e].union(t),i=!0),i||((n=new sr(0,0,0,0)).copy(t),o.push(n)),s||(s=o.length>=a)}}for(var f=this.__startIndex;f<this.__endIndex;++f)if(v=t[f]){var l=v.shouldBePainted(i,r,!0,!0);(d=v.__isRendered&&(1&v.__dirty||!l)?v.getPrevPaintRect():null)&&h(d);var c=l&&(1&v.__dirty||!v.__isRendered)?v.getPaintRect():null;c&&h(c)}for(f=this.__prevStartIndex;f<this.__prevEndIndex;++f){var v,d;l=(v=n[f]).shouldBePainted(i,r,!0,!0),!v||l&&v.__zr||!v.__isRendered||(d=v.getPrevPaintRect())&&h(d)}do{for(e=!1,f=0;f<o.length;)if(o[f].isZero())o.splice(f,1);else{for(var p=f+1;p<o.length;)o[f].intersect(o[p])?(e=!0,o[f].union(o[p]),o.splice(p,1)):p++;f++}}while(e);return this._paintRects=o,o},n.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},n.prototype.resize=function(t,n){var i=this.dpr,r=this.dom,e=r.style,o=this.domBack;e&&(e.width=t+"px",e.height=n+"px"),r.width=t*i,r.height=n*i,o&&(o.width=t*i,o.height=n*i,1!==i&&this.ctxBack.scale(i,i))},n.prototype.clear=function(t,n,i){var r=this.dom,e=this.ctx,o=r.width,a=r.height;n=n||this.clearColor;var s=this.motionBlur&&!t,u=this.lastFrameAlpha,h=this.dpr,f=this;s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(r,0,0,o/h,a/h));var l=this.domBack;function c(t,i,r,o){if(e.clearRect(t,i,r,o),n&&"transparent"!==n){var a=void 0;J(n)?(a=n.__canvasGradient||hv(e,n,{x:0,y:0,width:r,height:o}),n.__canvasGradient=a):null!=n.image&&(a=bv(e,n,{dirty:function(){f.setUnpainted(),f.__painter.refresh()}})),e.save(),e.fillStyle=a||n,e.fillRect(t,i,r,o),e.restore()}s&&(e.save(),e.globalAlpha=u,e.drawImage(l,t,i,r,o),e.restore())}!i||s?c(0,0,o,a):i.length&&R(i,(function(t){c(t.x*h,t.y*h,t.width*h,t.height*h)}))},n}(Ot),Yg=function(){function t(t,n,i){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var r=!t.nodeName||"CANVAS"===t.nodeName.toUpperCase();this._opts=i=O({},i||{}),this.dpr=i.devicePixelRatio||Ei,this._singleCanvas=r,this.root=t,t.style&&(lt(t),t.innerHTML=""),this.storage=n;var e=this._zlevelList;this._prevDisplayList=[];var o=this._layers;if(r){var a=t,s=a.width,u=a.height;null!=i.width&&(s=i.width),null!=i.height&&(u=i.height),this.dpr=i.devicePixelRatio||1,a.width=s*this.dpr,a.height=u*this.dpr,this._width=s,this._height=u;var h=new jg(a,this,this.dpr);h.__builtin__=!0,h.initContext(),o[314159]=h,h.zlevel=314159,e.push(314159),this._domRoot=t}else{this._width=lv(t,0,i),this._height=lv(t,1,i);var f=this._domRoot=function(t,n){var i=document.createElement("div");return i.style.cssText=["position:relative","width:"+t+"px","height:"+n+"px","padding:0","margin:0","border-width:0"].join(";")+";",i}(this._width,this._height);t.appendChild(f)}}return t.prototype.getType=function(){return"canvas"},t.prototype.isSingleCanvas=function(){return this._singleCanvas},t.prototype.getViewportRoot=function(){return this._domRoot},t.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},t.prototype.refresh=function(t){var n=this.storage.getDisplayList(!0),i=this._prevDisplayList,r=this._zlevelList;this._redrawId=Math.random(),this._paintList(n,i,t,this._redrawId);for(var e=0;e<r.length;e++){var o=this._layers[r[e]];!o.__builtin__&&o.refresh&&o.refresh(0===e?this._backgroundColor:null)}return this._opts.useDirtyRect&&(this._prevDisplayList=n.slice()),this},t.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},t.prototype._paintHoverList=function(t){var n=t.length,i=this._hoverlayer;if(i&&i.clear(),n){for(var r,e={inHover:!0,viewWidth:this._width,viewHeight:this._height},o=0;o<n;o++){var a=t[o];a.__inHover&&(i||(i=this._hoverlayer=this.getLayer(1e5)),r||(r=i.ctx).save(),Iv(r,a,e,o===n-1))}r&&r.restore()}},t.prototype.getHoverLayer=function(){return this.getLayer(1e5)},t.prototype.paintOne=function(t,n){Tv(t,n)},t.prototype._paintList=function(t,n,i,r){if(this._redrawId===r){i=i||!1,this._updateLayerStatus(t);var e=this._doPaintList(t,n,i),o=e.finished,a=e.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),a&&this._paintHoverList(t),o)this.eachLayer((function(t){t.afterBrush&&t.afterBrush()}));else{var s=this;cn((function(){s._paintList(t,n,i,r)}))}}},t.prototype._compositeManually=function(){var t=this.getLayer(314159).ctx,n=this._domRoot.width,i=this._domRoot.height;t.clearRect(0,0,n,i),this.eachBuiltinLayer((function(r){r.virtual&&t.drawImage(r.dom,0,0,n,i)}))},t.prototype._doPaintList=function(t,n,i){for(var r=this,e=[],o=this._opts.useDirtyRect,a=0;a<this._zlevelList.length;a++){var s=this._layers[this._zlevelList[a]];s.__builtin__&&s!==this._hoverlayer&&(s.__dirty||i)&&e.push(s)}for(var u=!0,h=!1,l=function(a){var s,f=e[a],l=f.ctx,v=o&&f.createRepaintRects(t,n,c._width,c._height),d=i?f.__startIndex:f.__drawIndex,p=!i&&f.incremental&&Date.now,m=p&&Date.now(),g=f.zlevel===c._zlevelList[0]?c._backgroundColor:null;if(f.__startIndex===f.__endIndex)f.clear(!1,g,v);else if(d===f.__startIndex){var y=t[d];y.incremental&&y.notClear&&!i||f.clear(!1,g,v)}-1===d&&(console.error("For some unknown reason. drawIndex is -1"),d=f.__startIndex);var b=function(n){var i={inHover:!1,allClipped:!1,prevEl:null,viewWidth:r._width,viewHeight:r._height};for(s=d;s<f.__endIndex;s++){var e=t[s];if(e.__inHover&&(h=!0),r._doPaintEl(e,f,o,n,i,s===f.__endIndex-1),p&&Date.now()-m>15)break}i.prevElClipPaths&&l.restore()};if(v)if(0===v.length)s=f.__endIndex;else for(var w=c.dpr,x=0;x<v.length;++x){var M=v[x];l.save(),l.beginPath(),l.rect(M.x*w,M.y*w,M.width*w,M.height*w),l.clip(),b(M),l.restore()}else l.save(),b(),l.restore();f.__drawIndex=s,f.__drawIndex<f.__endIndex&&(u=!1)},c=this,v=0;v<e.length;v++)l(v);return f.wxa&&R(this._layers,(function(t){t&&t.ctx&&t.ctx.draw&&t.ctx.draw()})),{finished:u,needsRefreshHover:h}},t.prototype._doPaintEl=function(t,n,i,r,e,o){var a=n.ctx;if(i){var s=t.getPaintRect();(!r||s&&s.intersect(r))&&(Iv(a,t,e,o),t.setPrevPaintRect(s))}else Iv(a,t,e,o)},t.prototype.getLayer=function(t,n){this._singleCanvas&&!this._needsManuallyCompositing&&(t=314159);var i=this._layers[t];return i||((i=new jg("zr_"+t,this,this.dpr)).zlevel=t,i.__builtin__=!0,this._layerConfig[t]?L(i,this._layerConfig[t],!0):this._layerConfig[t-.01]&&L(i,this._layerConfig[t-.01],!0),n&&(i.virtual=n),this.insertLayer(t,i),i.initContext()),i},t.prototype.insertLayer=function(t,n){var i=this._layers,r=this._zlevelList,e=r.length,o=this._domRoot,a=null,s=-1;if(!i[t]&&function(t){return!!t&&(!!t.__builtin__||"function"==typeof t.resize&&"function"==typeof t.refresh)}(n)){if(e>0&&t>r[0]){for(s=0;s<e-1&&!(r[s]<t&&r[s+1]>t);s++);a=i[r[s]]}if(r.splice(s+1,0,t),i[t]=n,!n.virtual)if(a){var u=a.dom;u.nextSibling?o.insertBefore(n.dom,u.nextSibling):o.appendChild(n.dom)}else o.firstChild?o.insertBefore(n.dom,o.firstChild):o.appendChild(n.dom);n.__painter=this}},t.prototype.eachLayer=function(t,n){for(var i=this._zlevelList,r=0;r<i.length;r++){var e=i[r];t.call(n,this._layers[e],e)}},t.prototype.eachBuiltinLayer=function(t,n){for(var i=this._zlevelList,r=0;r<i.length;r++){var e=i[r],o=this._layers[e];o.__builtin__&&t.call(n,o,e)}},t.prototype.eachOtherLayer=function(t,n){for(var i=this._zlevelList,r=0;r<i.length;r++){var e=i[r],o=this._layers[e];o.__builtin__||t.call(n,o,e)}},t.prototype.getLayers=function(){return this._layers},t.prototype._updateLayerStatus=function(t){function n(t){o&&(o.__endIndex!==t&&(o.__dirty=!0),o.__endIndex=t)}if(this.eachBuiltinLayer((function(t){t.__dirty=t.__used=!1})),this._singleCanvas)for(var i=1;i<t.length;i++)if((s=t[i]).zlevel!==t[i-1].zlevel||s.incremental){this._needsManuallyCompositing=!0;break}var r,e,o=null,a=0;for(e=0;e<t.length;e++){var s,u=(s=t[e]).zlevel,h=void 0;r!==u&&(r=u,a=0),s.incremental?((h=this.getLayer(u+.001,this._needsManuallyCompositing)).incremental=!0,a=1):h=this.getLayer(u+(a>0?.01:0),this._needsManuallyCompositing),h.__builtin__||I("ZLevel "+u+" has been used by unkown layer "+h.id),h!==o&&(h.__used=!0,h.__startIndex!==e&&(h.__dirty=!0),h.__startIndex=e,h.__drawIndex=h.incremental?-1:e,n(e),o=h),1&s.__dirty&&!s.__inHover&&(h.__dirty=!0,h.incremental&&h.__drawIndex<0&&(h.__drawIndex=e))}n(e),this.eachBuiltinLayer((function(t){!t.__used&&t.getElementCount()>0&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)}))},t.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},t.prototype._clearLayer=function(t){t.clear()},t.prototype.setBackgroundColor=function(t){this._backgroundColor=t,R(this._layers,(function(t){t.setUnpainted()}))},t.prototype.configLayer=function(t,n){if(n){var i=this._layerConfig;i[t]?L(i[t],n,!0):i[t]=n;for(var r=0;r<this._zlevelList.length;r++){var e=this._zlevelList[r];e!==t&&e!==t+.01||L(this._layers[e],i[t],!0)}}},t.prototype.delLayer=function(t){var n=this._layers,i=this._zlevelList,r=n[t];r&&(r.dom.parentNode.removeChild(r.dom),delete n[t],i.splice(z(i,t),1))},t.prototype.resize=function(t,n){if(this._domRoot.style){var i=this._domRoot;i.style.display="none";var r=this._opts,e=this.root;if(null!=t&&(r.width=t),null!=n&&(r.height=n),t=lv(e,0,r),n=lv(e,1,r),i.style.display="",this._width!==t||n!==this._height){for(var o in i.style.width=t+"px",i.style.height=n+"px",this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(t,n);this.refresh(!0)}this._width=t,this._height=n}else{if(null==t||null==n)return;this._width=t,this._height=n,this.getLayer(314159).resize(t,n)}return this},t.prototype.clearLayer=function(t){var n=this._layers[t];n&&n.clear()},t.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},t.prototype.getRenderedCanvas=function(t){if(this._singleCanvas&&!this._compositeManually)return this._layers[314159].dom;var n=new jg("image",this,(t=t||{}).pixelRatio||this.dpr);n.initContext(),n.clear(!1,t.backgroundColor||this._backgroundColor);var i=n.ctx;if(t.pixelRatio<=this.dpr){this.refresh();var r=n.dom.width,e=n.dom.height;this.eachLayer((function(t){t.__builtin__?i.drawImage(t.dom,0,0,r,e):t.renderToCanvas&&(i.save(),t.renderToCanvas(i),i.restore())}))}else for(var o={inHover:!1,viewWidth:this._width,viewHeight:this._height},a=this.storage.getDisplayList(!0),s=0,u=a.length;s<u;s++)Iv(i,a[s],o,s===u-1);return n.dom},t.prototype.getWidth=function(){return this._width},t.prototype.getHeight=function(){return this._height},t}();sp([function(t){sp(Fm),t.registerComponentModel(Em),t.registerComponentView(tg),t.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},vt),t.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},vt)},function(){sp(pg),sp(Mg)},function(t){t.registerChartView(Pg),t.registerSeriesModel(Hg),function(t,n){function i(n,i){var r=[];return n.eachComponent({mainType:"series",subType:t,query:i},(function(t){r.push(t.seriesIndex)})),r}R([["pieToggleSelect","toggleSelect"],["pieSelect","select"],["pieUnSelect","unselect"]],(function(t){n(t[0],(function(n,r,e){n=O({},n),e.dispatchAction(O(n,{type:t[1],seriesIndex:i(r,n)}))}))}))}("pie",t.registerAction),t.registerLayout(U(Dg,"pie")),t.registerProcessor({seriesType:"pie",reset:function(t,n){var i=n.findComponents({mainType:"legend"});if(i&&i.length){var r=t.getData();r.filterSelf((function(t){for(var n=r.getName(t),e=0;e<i.length;e++)if(!i[e].isSelected(n))return!1;return!0}))}}}),t.registerProcessor({seriesType:"pie",reset:function(t){var n=t.getData();n.filterSelf((function(t){var i=n.mapDimension("value"),r=n.get(i,t);return!(q(r)&&!isNaN(r)&&r<0)}))}})},function(t){t.registerPainter("canvas",Yg)},function(t){t.registerPreprocessor(Tg),t.registerVisual(t.PRIORITY.VISUAL.ARIA,Cg)},function(t){t.registerUpdateLifecycle("series:beforeupdate",(function(t,n){var i=Xp(n).labelManager;i||(i=Xp(n).labelManager=new Yp),i.clearLabels()})),t.registerUpdateLifecycle("series:layoutlabels",(function(t,n,i){var r=Xp(n).labelManager;i.updatedSeries.forEach((function(t){r.addLabelsOfSeries(n.getViewOfSeriesModel(t))})),r.updateLayoutConfig(n),r.layout(n),r.processLabelsOverall()}))}]);const Xg=class{constructor(i){t(this,i),this.change=n(this,"change",7),this.click=n(this,"click",7),this.innerRadius="70%",this.outerRadius="85%",this.minSliceSize="2.5%",this.selectedOffset=10,this.hoverScaleSize=5,this.data=[],this.defaultRecord={id:null,value:null,name:null},this.onClickElsewhere=t=>{t.stopPropagation(),this.clearSelection()},this.onButtonKeyUp=t=>{const{selectedId:n,data:i}=this;let r=this.getIndexById(n)||0;switch(t.key){case"ArrowLeft":case"ArrowUp":r--,r<0&&(r=i.length-1),this.chart.dispatchAction({type:"select",seriesId:"pie",dataIndex:r});break;case"ArrowRight":case"ArrowDown":r++,r>i.length-1&&(r=0),this.chart.dispatchAction({type:"select",seriesId:"pie",dataIndex:r});break;case"Escape":this.clearSelection();break;default:return}},this.onButtonClick=t=>{t.stopPropagation();const{selectedId:n}=this,i=n?this.getDataById(n):Object.assign({},this.defaultRecord);this.click.emit(i)},this.onContainerClick=t=>{this.isInChangeEvent||t.target instanceof HTMLElement&&(this.clearSelection(),t.stopPropagation())}}componentDidLoad(){const t=function(t,n,i){var r=!(i&&i.ssr);if(r){var e=function(t){return bd[function(t,n){return t.getAttribute?t.getAttribute(n):t[n]}(t,Md)]}(t);if(e)return e}var o=new hd(t,n,i);return o.id="ec_"+xd++,bd[o.id]=o,r&&ue(t,Md,o.id),ed(o),Rv.trigger("afterinit",o),o}(this.chartContainer);this.cacheComputedStyles(),this.colors=this.getColors(),this.resizeObserver=new ResizeObserver((()=>this.resizeChart())),this.resizeObserver.observe(this.hostElement),this.updateChart(t),this.setupChartEvents(t),this.chart=t,e(this.hostElement)}willDestroyElement(){this.resizeObserver=null}get centerData(){const{selectedId:t,hoveredId:n,data:i}=this,r=n||t,e=this.getIndexById(r);return r?Object.assign(Object.assign({},this.getDataById(r)),{color:this.colors[e]}):{name:o(this.summaryName||"tecton.element.chartDonut.button.summaryName"),icon:this.summaryIcon,value:i.reduce(((t,n)=>t+n.value),0),color:null}}cacheComputedStyles(){this.chartContainerStyles=getComputedStyle(this.chartContainer),this.hostElementStyles=getComputedStyle(this.hostElement)}displayValue(t){const n=parseFloat(t.toString());if(!isNaN(n))return"currency"===this.format?Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(n):Intl.NumberFormat("en-US").format(n)}getCSSProperty(t){let n;if(t.startsWith("var(")&&t.endsWith(")")){const i=/var\((.*)\)/g.exec(t),r=i.length>=2?i[1].split(","):[];t=r[0],n=r[1]}let i=this.chartContainerStyles.getPropertyValue(t).trim();return i||(i=this.hostElementStyles.getPropertyValue(t).trim()),i||n}getIndexById(t){return this.data.findIndex((n=>n.id===t))}getDataByIndex(t){if("number"==typeof t)return this.data[t]}getDataById(t){if(t)return this.data.find((n=>n.id===t))}getColors(){const t=["--comp-color-1","--comp-color-2","--comp-color-3","--comp-color-4","--comp-color-5","--comp-color-6","--comp-color-7","--comp-color-8","--comp-color-9","--comp-color-10","--comp-color-11","--comp-color-12"];return this.data.reduce(((n,i)=>{let r=t.shift();return i.color&&(r=i.color),n.push(this.getCSSProperty(r)||r),n}),[])}setupChartEvents(t){t.on("mouseover",(t=>{this.hoveredId=t.data.id})),t.on("click",(t=>{t.event.event.stopPropagation()})),t.on("mouseout",(()=>{this.hoveredId=null})),t.on("selectchanged",(t=>{var n,i,r,e;const o=null!==(e=null===(r=null===(i=null===(n=t.selected)||void 0===n?void 0:n[0])||void 0===i?void 0:i.dataIndex)||void 0===r?void 0:r[0])&&void 0!==e?e:null,a="number"==typeof o?this.getDataByIndex(o):Object.assign({},this.defaultRecord);this.selectedId=a.id,this.isInChangeEvent=!0,this.change.emit(a),setTimeout((()=>{this.isInChangeEvent=!1}),0)}))}cleanData(t){const{minSliceSize:n}=this,i=parseFloat(n||"2.5%")/100,r=t.reduce(((t,n)=>t+n.value),0)*i;return t.map((t=>t.value<r?Object.assign(Object.assign({},t),{value:r}):t))}updateChart(t){return t.setOption({tooltip:{show:!1},legend:{show:!1},aria:{enabled:!0},series:[{name:this.chartName,animationType:"scale",color:this.colors,id:"pie",type:"pie",selectedOffset:this.selectedOffset,selectedMode:"single",radius:[this.innerRadius,this.outerRadius],label:{show:!1},labelLine:{show:!1},itemStyle:{borderWidth:5,borderColor:this.getCSSProperty("--comp-background-color")},emphasis:{scaleSize:this.hoverScaleSize,itemStyle:{color:"inherit"}},data:this.cleanData(this.data)}]})}resizeChart(){this.chart.resize()}propsUpdates(){this.updateChart(this.chart)}dataUpdated(){this.colors=this.getColors()}innerRadiusUpdated(){const{innerRadius:t,outerRadius:n}=this,i=parseFloat(t),r=parseFloat(n);i>=r&&(this.innerRadius=r-15+"%")}outerRadiusUpdated(){const{innerRadius:t,outerRadius:n}=this,i=parseFloat(t);parseFloat(n)<=i&&(this.outerRadius=`${i+15}%`)}delegateFocus(t){var n;a(t,this.hostElement)&&this.isClickable&&(null===(n=this.centerButtonElement)||void 0===n||n.focus())}async selectById(t){const n=this.getIndexById(t);-1!==n&&this.chart.dispatchAction({type:"select",seriesId:"pie",dataIndex:n})}async selectByIndex(t){const n=this.data[t]?t:null;n&&this.chart.dispatchAction({type:"select",seriesId:"pie",dataIndex:n})}async clearSelection(){const{selectedId:t}=this;t&&this.chart.dispatchAction({type:"unselect",seriesId:"pie",dataIndex:this.getIndexById(t)})}renderCenterBlock(){const{icon:t,name:n,value:r,color:e}=this.centerData,{isClickable:a}=this,s=a?"button":"div",u=this.displayValue(r),h=a?{onKeyUp:this.onButtonKeyUp,onClick:this.onButtonClick,ref:t=>this.centerButtonElement=t,"aria-description":o("tecton.element.chartDonut.button.description"),"aria-roledescription":o("tecton.element.chartDonut.button.roleDescription")}:null;return i("div",{class:"center-card-container",style:{width:`calc(${this.innerRadius} - 10%)`}},i(s,Object.assign({class:"center-card","test-id":"centerCard"},h),t&&i("q2-icon",{type:t,style:e&&{"--tct-icon-stroke-primary":e,"--tct-icon-stroke-secondary":e,color:e}}),n&&i("div",{class:"name"},n),r&&i("div",{class:"value"},u)))}render(){return i("click-elsewhere",{onChange:this.onClickElsewhere},i("div",{class:"container"},i("div",{ref:t=>this.chartContainer=t,class:"chart-container","test-id":"chartContainer",onClick:this.onContainerClick}),this.renderCenterBlock()))}get hostElement(){return r(this)}static get watchers(){return{chartName:["propsUpdates"],innerRadius:["propsUpdates","innerRadiusUpdated"],outerRadius:["propsUpdates","outerRadiusUpdated"],minSliceSize:["propsUpdates"],hoverScaleSize:["propsUpdates"],selectedOffset:["propsUpdates"],data:["propsUpdates","dataUpdated"]}}};Xg.style="*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-global-focus, 0 0 0 2px #33b4ff)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{position:relative;width:100%;display:block}.container{aspect-ratio:1/1;width:100%;display:flex;justify-content:center;align-items:center}.chart-container{width:100%;height:100%;--comp-color-1:var(--tct-chart-donut-color-1, var(--t-chart-donut-color-1, var(--t-accent-1, #e05252)));--comp-color-2:var(--tct-chart-donut-color-2, var(--t-chart-donut-color-2, var(--t-accent-2, #e09952)));--comp-color-3:var(--tct-chart-donut-color-3, var(--t-chart-donut-color-3, var(--t-accent-3, #e0e052)));--comp-color-4:var(--tct-chart-donut-color-4, var(--t-chart-donut-color-4, var(--t-accent-4, #99e052)));--comp-color-5:var(--tct-chart-donut-color-5, var(--t-chart-donut-color-5, var(--t-accent-5, #52e052)));--comp-color-6:var(--tct-chart-donut-color-6, var(--t-chart-donut-color-6, var(--t-accent-6, #52e099)));--comp-color-7:var(--tct-chart-donut-color-7, var(--t-chart-donut-color-7, var(--t-accent-7, #52e0e0)));--comp-color-8:var(--tct-chart-donut-color-8, var(--t-chart-donut-color-8, var(--t-accent-8, #5299e0)));--comp-color-9:var(--tct-chart-donut-color-9, var(--t-chart-donut-color-9, var(--t-accent-9, #5252e0)));--comp-color-10:var(--tct-chart-donut-color-10, var(--t-chart-donut-color-10, var(--t-accent-10, #9952e0)));--comp-color-11:var(--tct-chart-donut-color-11, var(--t-chart-donut-color-11, var(--t-accent-11, #e052e0)));--comp-color-12:var(--tct-chart-donut-color-12, var(--t-chart-donut-color-12, var(--t-accent-12, #e05299)))}.chart-container,.center-card{--comp-background-color:var(--tct-chart-donut-border-color, var(--t-chart-donut-border-color, var(--t-base, #ffffff)))}button{--comp-button-vertical-padding:var(--tct-chart-donut-button-vertical-padding, var(--t-chart-donut-button-vertical-padding, var(--app-scale-1x, 5px)));transition:box-shadow var(--tct-chart-donut-button-tween, var(--t-chart-donut-button-tween, var(--app-tween-1, 0.2s ease)));padding:var(--comp-button-vertical-padding) 0}button:active{box-shadow:var(--const-global-focus), var(--tct-chart-donut-button-hover-box-shadow, var(--t-chart-donut-button-hover-box-shadow, var(--app-shadow-1, 0 2px 4px rgba(0, 0, 0, 0.3))))}button:hover{box-shadow:var(--tct-chart-donut-button-hover-box-shadow, var(--t-chart-donut-button-hover-box-shadow, var(--app-shadow-1, 0 2px 4px rgba(0, 0, 0, 0.3))))}button:focus{box-shadow:var(--const-global-focus), var(--tct-chart-donut-button-hover-box-shadow, var(--t-chart-donut-button-hover-box-shadow, var(--app-shadow-1, 0 2px 4px rgba(0, 0, 0, 0.3))))}.center-card-container{position:absolute;top:50%;transform:translateY(-50%);padding:var(--tct-chart-donut-button-container-padding, var(--t-chart-donut-button-container-padding, var(--app-scale-1x, 5px)))}.center-card{width:100%;text-align:center;color:var(--tct-chart-donut-text-color, var(--t-chart-donut-text-color, var(--t-text, #4d4d4d)));margin-inline:auto;display:block}.center-card:is(button){cursor:pointer;background:var(--comp-background-color);border:0;border-radius:var(--tct-chart-donut-button-border-radius, var(--t-chart-donut-button-border-radius, var(--app-border-radius-1, 3px)))}q2-icon{--tct-icon-size:var(--tct-chart-donut-icon-size, var(--t-chart-donut-icon-size, 26px));margin-bottom:var(--tct-chart-donut-icon-margin-bottom, var(--t-chart-donut-icon-margin-bottom, var(--app-scale-1x, 5px)))}.name{font-size:var(--tct-chart-donut-name-font-size, var(--t-chart-donut-name-font-size, 14px))}.value{font-size:var(--tct-chart-donut-value-font-size, var(--t-chart-donut-value-font-size, 21px))}";export{Xg as q2_chart_donut}
|