diff --git a/Makefile b/Makefile index 4469548..50dc06f 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ deps-js: cd frontend; npm install && npx puppeteer browsers install chrome deps-py: - cd example; pipenv install -d + pipenv install -d deps: deps-js deps-py @@ -24,13 +24,18 @@ run: run-debug: cd example; pipenv run fava --debug example.beancount +lint: + pipenv run mypy src/fava_dashboards/__init__.py scripts/format_js_in_dashboard.py + pipenv run pylint src/fava_dashboards/__init__.py scripts/format_js_in_dashboard.py + format: cd frontend; npx prettier -w . ../src/fava_dashboards/templates/*.css - cd example; pipenv run black ../src/fava_dashboards/__init__.py ../scripts/format_js_in_dashboard.py - cd example; find . -name '*.beancount' -exec pipenv run bean-format -c 59 -o "{}" "{}" \; + pipenv run black src/fava_dashboards/__init__.py scripts/format_js_in_dashboard.py + find example -name '*.beancount' -exec pipenv run bean-format -c 59 -o "{}" "{}" \; ./scripts/format_js_in_dashboard.py example/dashboards.yaml ci: + make lint make build-js make run & make test-js diff --git a/example/Pipfile b/Pipfile similarity index 62% rename from example/Pipfile rename to Pipfile index e52128b..a18b2ed 100644 --- a/example/Pipfile +++ b/Pipfile @@ -4,10 +4,13 @@ verify_ssl = true name = "pypi" [packages] -fava-dashboards = {editable = true, path = "./.."} +fava-dashboards = {editable = true, path = "."} [dev-packages] black = "*" +mypy = "*" +pylint = "*" +types-PyYAML = "*" [requires] python_version = "3.11" diff --git a/example/Pipfile.lock b/Pipfile.lock similarity index 91% rename from example/Pipfile.lock rename to Pipfile.lock index 07fda87..725c23c 100644 --- a/example/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "02580f527324764bf052acbe9925b9f848fe15a4e1ea077c15151147afaff48e" + "sha256": "3a55d47698e2cdb0da6192df5029eb1ded834a1cc14a0a31cf19a97d6a0ce358" }, "pipfile-spec": 6, "requires": { @@ -235,7 +235,7 @@ }, "fava-dashboards": { "editable": true, - "path": "./.." + "path": "." }, "flask": { "hashes": [ @@ -853,6 +853,14 @@ } }, "develop": { + "astroid": { + "hashes": [ + "sha256:951798f922990137ac090c53af473db7ab4e70c770e6d7fae0cec59f74411819", + "sha256:ac248253bfa4bd924a0de213707e7ebeeb3138abeb48d798784ead1e56d419d4" + ], + "markers": "python_full_version >= '3.8.0'", + "version": "==3.1.0" + }, "black": { "hashes": [ "sha256:2818cf72dfd5d289e48f37ccfa08b460bf469e67fb7c4abb07edc2e9f16fb63f", @@ -889,6 +897,63 @@ "markers": "python_version >= '3.7'", "version": "==8.1.7" }, + "dill": { + "hashes": [ + "sha256:3ebe3c479ad625c4553aca177444d89b486b1d84982eeacded644afc0cf797ca", + "sha256:c36ca9ffb54365bdd2f8eb3eff7d2a21237f8452b57ace88b1ac615b7e815bd7" + ], + "markers": "python_version >= '3.11'", + "version": "==0.3.8" + }, + "isort": { + "hashes": [ + "sha256:48fdfcb9face5d58a4f6dde2e72a1fb8dcaf8ab26f95ab49fab84c2ddefb0109", + "sha256:8ca5e72a8d85860d5a3fa69b8745237f2939afe12dbf656afbcb47fe72d947a6" + ], + "markers": "python_full_version >= '3.8.0'", + "version": "==5.13.2" + }, + "mccabe": { + "hashes": [ + "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325", + "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e" + ], + "markers": "python_version >= '3.6'", + "version": "==0.7.0" + }, + "mypy": { + "hashes": [ + "sha256:0235391f1c6f6ce487b23b9dbd1327b4ec33bb93934aa986efe8a9563d9349e6", + "sha256:190da1ee69b427d7efa8aa0d5e5ccd67a4fb04038c380237a0d96829cb157913", + "sha256:2418488264eb41f69cc64a69a745fad4a8f86649af4b1041a4c64ee61fc61129", + "sha256:3a3c007ff3ee90f69cf0a15cbcdf0995749569b86b6d2f327af01fd1b8aee9dc", + "sha256:3cc5da0127e6a478cddd906068496a97a7618a21ce9b54bde5bf7e539c7af974", + "sha256:48533cdd345c3c2e5ef48ba3b0d3880b257b423e7995dada04248725c6f77374", + "sha256:49c87c15aed320de9b438ae7b00c1ac91cd393c1b854c2ce538e2a72d55df150", + "sha256:4d3dbd346cfec7cb98e6cbb6e0f3c23618af826316188d587d1c1bc34f0ede03", + "sha256:571741dc4194b4f82d344b15e8837e8c5fcc462d66d076748142327626a1b6e9", + "sha256:587ce887f75dd9700252a3abbc9c97bbe165a4a630597845c61279cf32dfbf02", + "sha256:5d741d3fc7c4da608764073089e5f58ef6352bedc223ff58f2f038c2c4698a89", + "sha256:5e6061f44f2313b94f920e91b204ec600982961e07a17e0f6cd83371cb23f5c2", + "sha256:61758fabd58ce4b0720ae1e2fea5cfd4431591d6d590b197775329264f86311d", + "sha256:653265f9a2784db65bfca694d1edd23093ce49740b2244cde583aeb134c008f3", + "sha256:68edad3dc7d70f2f17ae4c6c1b9471a56138ca22722487eebacfd1eb5321d612", + "sha256:81a10926e5473c5fc3da8abb04119a1f5811a236dc3a38d92015cb1e6ba4cb9e", + "sha256:85ca5fcc24f0b4aeedc1d02f93707bccc04733f21d41c88334c5482219b1ccb3", + "sha256:a260627a570559181a9ea5de61ac6297aa5af202f06fd7ab093ce74e7181e43e", + "sha256:aceb1db093b04db5cd390821464504111b8ec3e351eb85afd1433490163d60cd", + "sha256:b685154e22e4e9199fc95f298661deea28aaede5ae16ccc8cbb1045e716b3e04", + "sha256:d357423fa57a489e8c47b7c85dfb96698caba13d66e086b412298a1a0ea3b0ed", + "sha256:d4d5ddc13421ba3e2e082a6c2d74c2ddb3979c39b582dacd53dd5d9431237185", + "sha256:e49499be624dead83927e70c756970a0bc8240e9f769389cdf5714b0784ca6bf", + "sha256:e54396d70be04b34f31d2edf3362c1edd023246c82f1730bbf8768c28db5361b", + "sha256:f88566144752999351725ac623471661c9d1cd8caa0134ff98cceeea181789f4", + "sha256:f8a67616990062232ee4c3952f41c779afac41405806042a8126fe96e098419f", + "sha256:fe28657de3bfec596bbeef01cb219833ad9d38dd5393fc649f4b366840baefe6" + ], + "index": "pypi", + "version": "==1.9.0" + }, "mypy-extensions": { "hashes": [ "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d", @@ -920,6 +985,38 @@ ], "markers": "python_version >= '3.8'", "version": "==4.2.0" + }, + "pylint": { + "hashes": [ + "sha256:507a5b60953874766d8a366e8e8c7af63e058b26345cfcb5f91f89d987fd6b74", + "sha256:6a69beb4a6f63debebaab0a3477ecd0f559aa726af4954fc948c51f7a2549e23" + ], + "index": "pypi", + "version": "==3.1.0" + }, + "tomlkit": { + "hashes": [ + "sha256:5cd82d48a3dd89dee1f9d64420aa20ae65cfbd00668d6f094d7578a78efbb77b", + "sha256:7ca1cfc12232806517a8515047ba66a19369e71edf2439d0f5824f91032b6cc3" + ], + "markers": "python_version >= '3.7'", + "version": "==0.12.4" + }, + "types-pyyaml": { + "hashes": [ + "sha256:a9e0f0f88dc835739b0c1ca51ee90d04ca2a897a71af79de9aec5f38cb0a5342", + "sha256:b845b06a1c7e54b8e5b4c683043de0d9caf205e7434b3edc678ff2411979b8f6" + ], + "index": "pypi", + "version": "==6.0.12.20240311" + }, + "typing-extensions": { + "hashes": [ + "sha256:69b1a937c3a517342112fb4c6df7e72fc39a38e7891a5730ed4985b5214b5475", + "sha256:b0abd7c89e8fb96f98db18d86106ff1d90ab692004eb746cf6eda2682f91b3cb" + ], + "markers": "python_version >= '3.8'", + "version": "==4.10.0" } } } diff --git a/README.md b/README.md index 13bb0c6..6145305 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,7 @@ The following variables and functions are available: * `ledger.dateLast`: last date in the current date filter * `ledger.operatingCurrencies`: configured operating currencies of the ledger * `ledger.ccy`: shortcut for the first configured operating currency of the ledger +* `ledger.accounts`: declared accounts of the ledger * `ledger.commodities`: declared commodities of the ledger * `utils`: the return value of the `utils` code of the dashboard configuration diff --git a/frontend/src/extension.ts b/frontend/src/extension.ts index 60c6a02..fe2e777 100644 --- a/frontend/src/extension.ts +++ b/frontend/src/extension.ts @@ -1,71 +1,16 @@ -import * as echarts from "echarts"; -import * as helpers from "./helpers"; -import { render_d3sankey } from "./sankey"; -import { Dashboard, Ledger, Panel as PanelType, Utils } from "./types"; +import { Bootstrap, Dashboard, Ledger, Utils } from "./types"; +import * as Panels from "./panels"; -class Panel { - static runScript(ledger: Ledger, utils: Utils, panel: PanelType) { - // pass 'fava' and 'helpers' for backwards compatibility - const scriptFn = new Function("panel", "ledger", "fava", "helpers", "utils", panel.script!); - return scriptFn(panel, ledger, ledger, helpers, utils); - } - - static html(ledger: Ledger, utils: Utils, panel: PanelType, elem: HTMLDivElement) { - try { - elem.innerHTML = Panel.runScript(ledger, utils, panel); - } catch (e) { - elem.innerHTML = e; - } - } - - static echarts(ledger: Ledger, utils: Utils, panel: PanelType, elem: HTMLDivElement) { - let options; - try { - options = Panel.runScript(ledger, utils, panel); - } catch (e) { - elem.innerHTML = e; - return; - } - - const renderer = window.navigator.userAgent === "puppeteer" ? "svg" : undefined; - const chart = echarts.init(elem, undefined, { renderer }); - if (options.onClick) { - chart.on("click", options.onClick); - delete options.onClick; - } - if (options.onDblClick) { - chart.on("dblclick", options.onDblClick); - delete options.onDblClick; - } - chart.setOption(options); - } - - static d3_sankey(ledger: Ledger, utils: Utils, panel: PanelType, elem: HTMLDivElement) { - let options; - try { - options = Panel.runScript(ledger, utils, panel); - } catch (e) { - elem.innerHTML = e; - return; - } - - render_d3sankey(elem, options); - } - - static jinja2(ledger: Ledger, utils: Utils, panel: PanelType, elem: HTMLDivElement) { - elem.innerHTML = panel.template!; - } -} - -function renderDashboard(ledger: Ledger, dashboard: Dashboard, utils: Utils) { +function renderDashboard(dashboard: Dashboard, ledger: Ledger, utils: Utils) { for (let i = 0; i < dashboard.panels.length; i++) { const panel = dashboard.panels[i]; - if (!panel.type || !(panel.type in Panel)) { + if (!panel.type || !(panel.type in Panels)) { continue; } - const elem = document.getElementById(`panel${i}`); - Panel[panel.type](ledger, utils, panel, elem as HTMLDivElement); + const elem = document.getElementById(`panel${i}`) as HTMLDivElement; + const ctx = { ledger, utils, panel }; + Panels[panel.type](ctx, elem); } } @@ -74,8 +19,8 @@ export default { const boostrapJSON = (document.querySelector("#favaDashboardsBootstrap") as HTMLScriptElement)?.text; if (!boostrapJSON) return; - const bootstrap = JSON.parse(boostrapJSON); - const utils = new Function(bootstrap.utils)(); - renderDashboard(bootstrap.ledger, bootstrap.dashboard, utils); + const bootstrap: Bootstrap = JSON.parse(boostrapJSON); + const utils: Utils = new Function(bootstrap.utils)(); + renderDashboard(bootstrap.dashboard, bootstrap.ledger, utils); }, }; diff --git a/frontend/src/panels.ts b/frontend/src/panels.ts new file mode 100644 index 0000000..044f617 --- /dev/null +++ b/frontend/src/panels.ts @@ -0,0 +1,69 @@ +import * as echartslib from "echarts"; +import * as helpers from "./helpers"; +import { render_d3sankey } from "./sankey"; +import { PanelCtx } from "./types"; + +function runFunction(src: string, args: Record): Promise { + const AsyncFunction = async function () {}.constructor; + const params = Object.entries(args); + const fn = AsyncFunction( + params.map(([k, _]) => k), + src, + ); + return fn(...params.map(([_, v]) => v)); +} + +function runScript(ctx: PanelCtx) { + return runFunction(ctx.panel.script!, { + ...ctx, + // pass 'fava' and 'helpers' for backwards compatibility + fava: ctx.ledger, + helpers, + }); +} + +export async function html(ctx: PanelCtx, elem: HTMLDivElement) { + try { + elem.innerHTML = await runScript(ctx); + } catch (e) { + elem.innerHTML = e; + } +} + +export async function echarts(ctx: PanelCtx, elem: HTMLDivElement) { + let options: echartslib.EChartsOption; + try { + options = await runScript(ctx); + } catch (e) { + elem.innerHTML = e; + return; + } + + const renderer = window.navigator.userAgent === "puppeteer" ? "svg" : undefined; + const chart = echartslib.init(elem, undefined, { renderer }); + if (options.onClick) { + chart.on("click", (options as any).onClick); + delete options.onClick; + } + if (options.onDblClick) { + chart.on("dblclick", (options as any).onDblClick); + delete options.onDblClick; + } + chart.setOption(options); +} + +export async function d3_sankey(ctx: PanelCtx, elem: HTMLDivElement) { + let options: any; + try { + options = await runScript(ctx); + } catch (e) { + elem.innerHTML = e; + return; + } + + render_d3sankey(elem, options); +} + +export async function jinja2(ctx: PanelCtx, elem: HTMLDivElement) { + elem.innerHTML = ctx.panel.template ?? ""; +} diff --git a/frontend/src/types.ts b/frontend/src/types.ts index dd72197..13213cf 100644 --- a/frontend/src/types.ts +++ b/frontend/src/types.ts @@ -1,6 +1,26 @@ -export interface Ledger {} +export interface Bootstrap { + dashboard: Dashboard; + ledger: Ledger; + utils: string; +} -export interface Panel { +export interface Dashboard { + name: string; + panels: Panel[]; +} + +export interface PanelCtx { + // metadata of the Beancount ledger + ledger: Ledger; + + // return value of the `utils` code of the dashboard configuration + utils: Utils; + + // current (augmented) panel definition. The results of the BQL queries can be accessed with `panel.queries[i].result`. + panel: Panel; +} + +interface Panel { title?: string; width?: string; height?: string; @@ -9,14 +29,26 @@ export interface Panel { template?: string; } -export interface Dashboard { - name: string; - panels: Panel[]; -} +export interface Ledger { + // first date in the current date filter + dateFirst: string; -export type Utils = { [k: string]: any }; + // last date in the current date filter + dateLast: string; -export interface Bootstrap { - ledger: Ledger; - dashboard: Dashboard; + // configured operating currencies of the ledger + operatingCurrencies: string[]; + + // shortcut for the first configured operating currency of the ledger + ccy: string; + + // declared accounts of the ledger + accounts: any[]; + + // declared commodities of the ledger + commodities: any[]; } + +export type Utils = { + [k: string]: any; +}; diff --git a/pyproject.toml b/pyproject.toml index 94d86dc..5bb13fc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,3 +3,11 @@ requires = ["setuptools>=45", "wheel", "setuptools_scm>=6.2"] build-backend = "setuptools.build_meta" [tool.setuptools_scm] + +[tool.pylint.'messages control'] +disable = [ + "missing-module-docstring", + "missing-class-docstring", + "missing-function-docstring", + "no-else-return", +] diff --git a/scripts/format_js_in_dashboard.py b/scripts/format_js_in_dashboard.py index 55cc386..de7ce64 100755 --- a/scripts/format_js_in_dashboard.py +++ b/scripts/format_js_in_dashboard.py @@ -4,6 +4,7 @@ def run_prettier(code, indent): + code = code.replace("\n" + indent, "\n") p = subprocess.run( [ "npx", @@ -57,9 +58,9 @@ def main(): parser.add_argument("dashboard") args = parser.parse_args() - with open(args.dashboard) as f: + with open(args.dashboard, encoding="utf-8") as f: formatted = format_js_in_dashboard(f) - with open(args.dashboard, "w") as f: + with open(args.dashboard, "w", encoding="utf-8") as f: f.write(formatted) diff --git a/src/fava_dashboards/FavaDashboards.js b/src/fava_dashboards/FavaDashboards.js index 800de9e..c61f494 100644 --- a/src/fava_dashboards/FavaDashboards.js +++ b/src/fava_dashboards/FavaDashboards.js @@ -1,46 +1,46 @@ -var uet=Object.defineProperty;var uy=(e,t)=>{for(var r in t)uet(e,r,{get:t[r],enumerable:!0})};var e2=function(e,t){return e2=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},e2(e,t)};function N(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");e2(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var fet=function(){function e(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return e}(),cet=function(){function e(){this.browser=new fet,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<"u"}return e}(),nu=new cet;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(nu.wxa=!0,nu.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?nu.worker=!0:typeof navigator>"u"?(nu.node=!0,nu.svgSupported=!0):pet(navigator.userAgent,nu);function pet(e,t){var r=t.browser,n=e.match(/Firefox\/([\d.]+)/),i=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),a=e.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(e);n&&(r.firefox=!0,r.version=n[1]),i&&(r.ie=!0,r.version=i[1]),a&&(r.edge=!0,r.version=a[1],r.newEdge=+a[1].split(".")[0]>18),o&&(r.weChat=!0),t.svgSupported=typeof SVGRect<"u",t.touchEventsSupported="ontouchstart"in window&&!r.ie&&!r.edge,t.pointerEventsSupported="onpointerdown"in window&&(r.edge||r.ie&&+r.version>=11),t.domSupported=typeof document<"u";var s=document.documentElement.style;t.transform3dSupported=(r.ie&&"transition"in s||r.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),t.transformSupported=t.transform3dSupported||r.ie&&+r.version>=9}var Ot=nu;var fy=12,r2="sans-serif",Qn=fy+"px "+r2,het=20,det=100,vet="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function met(e){var t={};if(typeof JSON>"u")return t;for(var r=0;r=0)s=o*r.length;else for(var l=0;l>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",n[l]+":0",i[u]+":0",n[1-l]+":auto",i[1-u]+":auto",""].join("!important;"),e.appendChild(o),r.push(o)}return r}function Ret(e,t,r){for(var n=r?"invTrans":"trans",i=t[n],a=t.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var f=e[u].getBoundingClientRect(),c=2*u,p=f.left,h=f.top;o.push(p,h),l=l&&a&&p===a[c]&&h===a[c+1],s.push(e[u].offsetLeft,e[u].offsetTop)}return l&&i?i:(t.srcCoords=o,t[n]=r?s2(s,o):s2(o,s))}function u2(e){return e.nodeName.toUpperCase()==="CANVAS"}var Net=/([&<>"'])/g,ket={"&":"&","<":"<",">":">",'"':""","'":"'"};function Rr(e){return e==null?"":(e+"").replace(Net,function(t,r){return ket[r]})}var Oet=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,f2=[],zet=Ot.browser.firefox&&+Ot.browser.version.split(".")[0]<39;function xy(e,t,r,n){return r=r||{},n?xk(e,t,r):zet&&t.layerX!=null&&t.layerX!==t.offsetX?(r.zrX=t.layerX,r.zrY=t.layerY):t.offsetX!=null?(r.zrX=t.offsetX,r.zrY=t.offsetY):xk(e,t,r),r}function xk(e,t,r){if(Ot.domSupported&&e.getBoundingClientRect){var n=t.clientX,i=t.clientY;if(u2(e)){var a=e.getBoundingClientRect();r.zrX=n-a.left,r.zrY=i-a.top;return}else if(yy(f2,e,n,i)){r.zrX=f2[0],r.zrY=f2[1];return}}r.zrX=r.zrY=0}function _y(e){return e||window.event}function Tn(e,t,r){if(t=_y(t),t.zrX!=null)return t;var n=t.type,i=n&&n.indexOf("touch")>=0;if(i){var o=n!=="touchend"?t.targetTouches[0]:t.changedTouches[0];o&&xy(e,o,t,r)}else{xy(e,t,t,r);var a=Uet(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var s=t.button;return t.which==null&&s!==void 0&&Oet.test(t.type)&&(t.which=s&1?1:s&2?3:s&4?2:0),t}function Uet(e){var t=e.wheelDelta;if(t)return t;var r=e.deltaX,n=e.deltaY;if(r==null||n==null)return t;var i=Math.abs(n!==0?n:r),a=n>0?-1:n<0?1:r>0?-1:1;return 3*i*a}function pd(e,t,r,n){e.addEventListener(t,r,n)}function _k(e,t,r,n){e.removeEventListener(t,r,n)}var Mn=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function c2(e){return e.which===2||e.which===3}var Sk=function(){function e(){this._track=[]}return e.prototype.recognize=function(t,r,n){return this._doTrack(t,r,n),this._recognize(t)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(t,r,n){var i=t.touches;if(i){for(var a={points:[],touches:[],target:r,event:t},o=0,s=i.length;o1&&n&&n.length>1){var a=bk(n)/bk(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=Vet(n);return t.pinchX=o[0],t.pinchY=o[1],{type:"pinch",target:e[0].target,event:t}}}}};function tr(){return[1,0,0,1,0,0]}function Ls(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function hd(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function An(e,t,r){var n=t[0]*r[0]+t[2]*r[1],i=t[1]*r[0]+t[3]*r[1],a=t[0]*r[2]+t[2]*r[3],o=t[1]*r[2]+t[3]*r[3],s=t[0]*r[4]+t[2]*r[5]+t[4],l=t[1]*r[4]+t[3]*r[5]+t[5];return e[0]=n,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=l,e}function Nr(e,t,r){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+r[0],e[5]=t[5]+r[1],e}function Cn(e,t,r){var n=t[0],i=t[2],a=t[4],o=t[1],s=t[3],l=t[5],u=Math.sin(r),f=Math.cos(r);return e[0]=n*f+o*u,e[1]=-n*u+o*f,e[2]=i*f+s*u,e[3]=-i*u+f*s,e[4]=f*a+u*l,e[5]=f*l-u*a,e}function Lc(e,t,r){var n=r[0],i=r[1];return e[0]=t[0]*n,e[1]=t[1]*i,e[2]=t[2]*n,e[3]=t[3]*i,e[4]=t[4]*n,e[5]=t[5]*i,e}function gi(e,t){var r=t[0],n=t[2],i=t[4],a=t[1],o=t[3],s=t[5],l=r*o-a*n;return l?(l=1/l,e[0]=o*l,e[1]=-a*l,e[2]=-n*l,e[3]=r*l,e[4]=(n*s-o*i)*l,e[5]=(a*i-r*s)*l,e):null}function wk(e){var t=tr();return hd(t,e),t}var Bet=function(){function e(t,r){this.x=t||0,this.y=r||0}return e.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(t,r){return this.x=t,this.y=r,this},e.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},e.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},e.prototype.scale=function(t){this.x*=t,this.y*=t},e.prototype.scaleAndAdd=function(t,r){this.x+=t.x*r,this.y+=t.y*r},e.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},e.prototype.dot=function(t){return this.x*t.x+this.y*t.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},e.prototype.distance=function(t){var r=this.x-t.x,n=this.y-t.y;return Math.sqrt(r*r+n*n)},e.prototype.distanceSquare=function(t){var r=this.x-t.x,n=this.y-t.y;return r*r+n*n},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(t){if(t){var r=this.x,n=this.y;return this.x=t[0]*r+t[2]*n+t[4],this.y=t[1]*r+t[3]*n+t[5],this}},e.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},e.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},e.set=function(t,r,n){t.x=r,t.y=n},e.copy=function(t,r){t.x=r.x,t.y=r.y},e.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},e.lenSquare=function(t){return t.x*t.x+t.y*t.y},e.dot=function(t,r){return t.x*r.x+t.y*r.y},e.add=function(t,r,n){t.x=r.x+n.x,t.y=r.y+n.y},e.sub=function(t,r,n){t.x=r.x-n.x,t.y=r.y-n.y},e.scale=function(t,r,n){t.x=r.x*n,t.y=r.y*n},e.scaleAndAdd=function(t,r,n,i){t.x=r.x+n.x*i,t.y=r.y+n.y*i},e.lerp=function(t,r,n,i){var a=1-i;t.x=a*r.x+i*n.x,t.y=a*r.y+i*n.y},e}(),kt=Bet;var by=Math.min,Sy=Math.max,lu=new kt,uu=new kt,fu=new kt,cu=new kt,dd=new kt,vd=new kt,Fet=function(){function e(t,r,n,i){n<0&&(t=t+n,n=-n),i<0&&(r=r+i,i=-i),this.x=t,this.y=r,this.width=n,this.height=i}return e.prototype.union=function(t){var r=by(t.x,this.x),n=by(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Sy(t.x+t.width,this.x+this.width)-r:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=Sy(t.y+t.height,this.y+this.height)-n:this.height=t.height,this.x=r,this.y=n},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(t){var r=this,n=t.width/r.width,i=t.height/r.height,a=tr();return Nr(a,a,[-r.x,-r.y]),Lc(a,a,[n,i]),Nr(a,a,[t.x,t.y]),a},e.prototype.intersect=function(t,r){if(!t)return!1;t instanceof e||(t=e.create(t));var n=this,i=n.x,a=n.x+n.width,o=n.y,s=n.y+n.height,l=t.x,u=t.x+t.width,f=t.y,c=t.y+t.height,p=!(ad&&(d=x,md&&(d=_,g=n.x&&t<=n.x+n.width&&r>=n.y&&r<=n.y+n.height},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(t){e.copy(this,t)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return this.width===0||this.height===0},e.create=function(t){return new e(t.x,t.y,t.width,t.height)},e.copy=function(t,r){t.x=r.x,t.y=r.y,t.width=r.width,t.height=r.height},e.applyTransform=function(t,r,n){if(!n){t!==r&&e.copy(t,r);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var i=n[0],a=n[3],o=n[4],s=n[5];t.x=r.x*i+o,t.y=r.y*a+s,t.width=r.width*i,t.height=r.height*a,t.width<0&&(t.x+=t.width,t.width=-t.width),t.height<0&&(t.y+=t.height,t.height=-t.height);return}lu.x=fu.x=r.x,lu.y=cu.y=r.y,uu.x=cu.x=r.x+r.width,uu.y=fu.y=r.y+r.height,lu.transform(n),cu.transform(n),uu.transform(n),fu.transform(n),t.x=by(lu.x,uu.x,fu.x,cu.x),t.y=by(lu.y,uu.y,fu.y,cu.y);var l=Sy(lu.x,uu.x,fu.x,cu.x),u=Sy(lu.y,uu.y,fu.y,cu.y);t.width=l-t.x,t.height=u-t.y},e}(),dt=Fet;var Mk="silent";function Get(e,t,r){return{type:e,event:r,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:r.zrX,offsetY:r.zrY,gestureEvent:r.gestureEvent,pinchX:r.pinchX,pinchY:r.pinchY,pinchScale:r.pinchScale,wheelDelta:r.zrDelta,zrByTouch:r.zrByTouch,which:r.which,stop:Het}}function Het(){Mn(this.event)}var Wet=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.handler=null,r}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(Je),md=function(){function e(t,r){this.x=t,this.y=r}return e}(),Yet=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],h2=new dt(0,0,0,0),Ak=function(e){N(t,e);function t(r,n,i,a,o){var s=e.call(this)||this;return s._hovered=new md(0,0),s.storage=r,s.painter=n,s.painterRoot=a,s._pointerSize=o,i=i||new Wet,s.proxy=null,s.setHandlerProxy(i),s._draggingMgr=new mk(s),s}return t.prototype.setHandlerProxy=function(r){this.proxy&&this.proxy.dispose(),r&&(D(Yet,function(n){r.on&&r.on(n,this[n],this)},this),r.handler=this),this.proxy=r},t.prototype.mousemove=function(r){var n=r.zrX,i=r.zrY,a=Ck(this,n,i),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var l=this._hovered=a?new md(n,i):this.findHover(n,i),u=l.target,f=this.proxy;f.setCursor&&f.setCursor(u?u.cursor:"default"),s&&u!==s&&this.dispatchToElement(o,"mouseout",r),this.dispatchToElement(l,"mousemove",r),u&&u!==s&&this.dispatchToElement(l,"mouseover",r)},t.prototype.mouseout=function(r){var n=r.zrEventControl;n!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",r),n!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:r})},t.prototype.resize=function(){this._hovered=new md(0,0)},t.prototype.dispatch=function(r,n){var i=this[r];i&&i.call(this,n)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(r){var n=this.proxy;n.setCursor&&n.setCursor(r)},t.prototype.dispatchToElement=function(r,n,i){r=r||{};var a=r.target;if(!(a&&a.silent)){for(var o="on"+n,s=Get(n,r,i);a&&(a[o]&&(s.cancelBubble=!!a[o].call(a,s)),a.trigger(n,s),a=a.__hostTarget?a.__hostTarget:a.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(n,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(l){typeof l[o]=="function"&&l[o].call(l,s),l.trigger&&l.trigger(n,s)}))}},t.prototype.findHover=function(r,n,i){var a=this.storage.getDisplayList(),o=new md(r,n);if(Tk(a,o,r,n,i),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,f=new dt(r-u,n-u,l,l),c=a.length-1;c>=0;c--){var p=a[c];p!==i&&!p.ignore&&!p.ignoreCoarsePointer&&(!p.parent||!p.parent.ignoreCoarsePointer)&&(h2.copy(p.getBoundingRect()),p.transform&&h2.applyTransform(p.transform),h2.intersect(f)&&s.push(p))}if(s.length)for(var h=4,d=Math.PI/12,m=Math.PI*2,v=0;v4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function Xet(e,t,r){if(e[e.rectHover?"rectContain":"contain"](t,r)){for(var n=e,i=void 0,a=!1;n;){if(n.ignoreClip&&(a=!0),!a){var o=n.getClipPath();if(o&&!o.contain(t,r))return!1;n.silent&&(i=!0)}var s=n.__hostTarget;n=s||n.parent}return i?Mk:!0}return!1}function Tk(e,t,r,n,i){for(var a=e.length-1;a>=0;a--){var o=e[a],s=void 0;if(o!==i&&!o.ignore&&(s=Xet(o,r,n))&&(!t.topTarget&&(t.topTarget=o),s!==Mk)){t.target=o;break}}}function Ck(e,t,r){var n=e.painter;return t<0||t>n.getWidth()||r<0||r>n.getHeight()}var Dk=Ak;var Pk=32,gd=7,Ek=256;function qet(e){for(var t=0;e>=Pk;)t|=e&1,e>>=1;return e+t}function Ik(e,t,r,n){var i=t+1;if(i===r)return 1;if(n(e[i++],e[t])<0){for(;i=0;)i++;return i-t}function Zet(e,t,r){for(r--;t>>1,i(a,e[l])<0?s=l:o=l+1;var u=n-o;switch(u){case 3:e[o+3]=e[o+2];case 2:e[o+2]=e[o+1];case 1:e[o+1]=e[o];break;default:for(;u>0;)e[o+u]=e[o+u-1],u--}e[o]=a}}function d2(e,t,r,n,i,a){var o=0,s=0,l=1;if(a(e,t[r+i])>0){for(s=n-i;l0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}else{for(s=i+1;ls&&(l=s);var u=o;o=i-l,l=i-u}for(o++;o>>1);a(e,t[r+f])>0?o=f+1:l=f}return l}function v2(e,t,r,n,i,a){var o=0,s=0,l=1;if(a(e,t[r+i])<0){for(s=i+1;ls&&(l=s);var u=o;o=i-l,l=i-u}else{for(s=n-i;l=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}for(o++;o>>1);a(e,t[r+f])<0?l=f:o=f+1}return l}function Ket(e,t){var r=gd,n=0,i=Ek,a=0,o,s,l=0;n=e.length,n<2*Ek&&(i=n>>>1);var u=[];a=n<120?5:n<1542?10:n<119151?19:40,o=[],s=[];function f(v,g){o[l]=v,s[l]=g,l+=1}function c(){for(;l>1;){var v=l-2;if(v>=1&&s[v-1]<=s[v]+s[v+1]||v>=2&&s[v-2]<=s[v]+s[v-1])s[v-1]s[v+1])break;h(v)}}function p(){for(;l>1;){var v=l-2;v>0&&s[v-1]=gd||C>=gd);if(A)break;T<0&&(T=0),T+=2}if(r=T,r<1&&(r=1),g===1){for(_=0;_=0;_--)e[M+_]=e[T+_];e[w]=u[b];return}for(var C=r;;){var A=0,P=0,L=!1;do if(t(u[b],e[S])<0){if(e[w--]=e[S--],A++,P=0,--g===0){L=!0;break}}else if(e[w--]=u[b--],P++,A=0,--x===1){L=!0;break}while((A|P)=0;_--)e[M+_]=e[T+_];if(g===0){L=!0;break}}if(e[w--]=u[b--],--x===1){L=!0;break}if(P=x-d2(e[S],u,0,x,x-1,t),P!==0){for(w-=P,b-=P,x-=P,M=w+1,T=b+1,_=0;_=gd||P>=gd);if(L)break;C<0&&(C=0),C+=2}if(r=C,r<1&&(r=1),x===1){for(w-=g,S-=g,M=w+1,T=S+1,_=g-1;_>=0;_--)e[M+_]=e[T+_];e[w]=u[b]}else{if(x===0)throw new Error;for(T=w-(x-1),_=0;_s&&(l=s),Lk(e,r,r+l,r+a,t),a=l}o.pushRun(r,a),o.mergeRuns(),i-=a,r+=a}while(i!==0);o.forceMergeRuns()}}var or=1,hu=2,Ps=4;var Rk=!1;function m2(){Rk||(Rk=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function Nk(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var $et=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=Nk}return e.prototype.traverse=function(t,r){for(var n=0;n0&&(f.__clipPaths=[]),isNaN(f.z)&&(m2(),f.z=0),isNaN(f.z2)&&(m2(),f.z2=0),isNaN(f.zlevel)&&(m2(),f.zlevel=0),this._displayList[this._displayListLen++]=f}var c=t.getDecalElement&&t.getDecalElement();c&&this._updateAndAddDisplayable(c,r,n);var p=t.getTextGuideLine();p&&this._updateAndAddDisplayable(p,r,n);var h=t.getTextContent();h&&this._updateAndAddDisplayable(h,r,n)}},e.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},e.prototype.delRoot=function(t){if(t instanceof Array){for(var r=0,n=t.length;r=0&&this._roots.splice(i,1)},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}(),kk=$et;var Ok;Ok=Ot.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};var yd=Ok;var wy={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return .5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return e===0?0:Math.pow(1024,e-1)},exponentialOut:function(e){return e===1?1:1-Math.pow(2,-10*e)},exponentialInOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(-Math.pow(2,-10*(e-1))+2)},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,r=.1,n=.4;return e===0?0:e===1?1:(!r||r<1?(r=1,t=n/4):t=n*Math.asin(1/r)/(2*Math.PI),-(r*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)))},elasticOut:function(e){var t,r=.1,n=.4;return e===0?0:e===1?1:(!r||r<1?(r=1,t=n/4):t=n*Math.asin(1/r)/(2*Math.PI),r*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/n)+1)},elasticInOut:function(e){var t,r=.1,n=.4;return e===0?0:e===1?1:(!r||r<1?(r=1,t=n/4):t=n*Math.asin(1/r)/(2*Math.PI),(e*=2)<1?-.5*(r*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)):r*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-wy.bounceOut(1-e)},bounceOut:function(e){return e<.36363636363636365?7.5625*e*e:e<.7272727272727273?7.5625*(e-=.5454545454545454)*e+.75:e<.9090909090909091?7.5625*(e-=.8181818181818182)*e+.9375:7.5625*(e-=.9545454545454546)*e+.984375},bounceInOut:function(e){return e<.5?wy.bounceIn(e*2)*.5:wy.bounceOut(e*2-1)*.5+.5}},Ty=wy;var My=Math.pow,Ns=Math.sqrt,Cy=1e-8,Uk=1e-4,zk=Ns(3),Ay=1/3,Va=Ua(),yi=Ua(),Pc=Ua();function Rs(e){return e>-Cy&&eCy||e<-Cy}function Ve(e,t,r,n,i){var a=1-i;return a*a*(a*e+3*i*t)+i*i*(i*n+3*a*r)}function g2(e,t,r,n,i){var a=1-i;return 3*(((t-e)*a+2*(r-t)*i)*a+(n-r)*i*i)}function du(e,t,r,n,i,a){var o=n+3*(t-r)-e,s=3*(r-t*2+e),l=3*(t-e),u=e-i,f=s*s-3*o*l,c=s*l-9*o*u,p=l*l-3*s*u,h=0;if(Rs(f)&&Rs(c))if(Rs(s))a[0]=0;else{var d=-l/s;d>=0&&d<=1&&(a[h++]=d)}else{var m=c*c-4*f*p;if(Rs(m)){var v=c/f,d=-s/o+v,g=-v/2;d>=0&&d<=1&&(a[h++]=d),g>=0&&g<=1&&(a[h++]=g)}else if(m>0){var y=Ns(m),x=f*s+1.5*o*(-c+y),_=f*s+1.5*o*(-c-y);x<0?x=-My(-x,Ay):x=My(x,Ay),_<0?_=-My(-_,Ay):_=My(_,Ay);var d=(-s-(x+_))/(3*o);d>=0&&d<=1&&(a[h++]=d)}else{var S=(2*f*s-3*o*c)/(2*Ns(f*f*f)),b=Math.acos(S)/3,w=Ns(f),T=Math.cos(b),d=(-s-2*w*T)/(3*o),g=(-s+w*(T+zk*Math.sin(b)))/(3*o),M=(-s+w*(T-zk*Math.sin(b)))/(3*o);d>=0&&d<=1&&(a[h++]=d),g>=0&&g<=1&&(a[h++]=g),M>=0&&M<=1&&(a[h++]=M)}}return h}function Dy(e,t,r,n,i){var a=6*r-12*t+6*e,o=9*t+3*n-3*e-9*r,s=3*t-3*e,l=0;if(Rs(o)){if(Vk(a)){var u=-s/a;u>=0&&u<=1&&(i[l++]=u)}}else{var f=a*a-4*o*s;if(Rs(f))i[0]=-a/(2*o);else if(f>0){var c=Ns(f),u=(-a+c)/(2*o),p=(-a-c)/(2*o);u>=0&&u<=1&&(i[l++]=u),p>=0&&p<=1&&(i[l++]=p)}}return l}function xi(e,t,r,n,i,a){var o=(t-e)*i+e,s=(r-t)*i+t,l=(n-r)*i+r,u=(s-o)*i+o,f=(l-s)*i+s,c=(f-u)*i+u;a[0]=e,a[1]=o,a[2]=u,a[3]=c,a[4]=c,a[5]=f,a[6]=l,a[7]=n}function Ey(e,t,r,n,i,a,o,s,l,u,f){var c,p=.005,h=1/0,d,m,v,g;Va[0]=l,Va[1]=u;for(var y=0;y<1;y+=.05)yi[0]=Ve(e,r,i,o,y),yi[1]=Ve(t,n,a,s,y),v=No(Va,yi),v=0&&v=0&&u<=1&&(i[l++]=u)}}else{var f=o*o-4*a*s;if(Rs(f)){var u=-o/(2*a);u>=0&&u<=1&&(i[l++]=u)}else if(f>0){var c=Ns(f),u=(-o+c)/(2*a),p=(-o-c)/(2*a);u>=0&&u<=1&&(i[l++]=u),p>=0&&p<=1&&(i[l++]=p)}}return l}function Iy(e,t,r){var n=e+r-2*t;return n===0?.5:(e-t)/n}function ks(e,t,r,n,i){var a=(t-e)*n+e,o=(r-t)*n+t,s=(o-a)*n+a;i[0]=e,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=r}function Ly(e,t,r,n,i,a,o,s,l){var u,f=.005,c=1/0;Va[0]=o,Va[1]=s;for(var p=0;p<1;p+=.05){yi[0]=He(e,r,i,p),yi[1]=He(t,n,a,p);var h=No(Va,yi);h=0&&h=1?1:du(0,n,a,1,l,s)&&Ve(0,i,o,1,s[0])}}}var Qet=function(){function e(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||ce,this.ondestroy=t.ondestroy||ce,this.onrestart=t.onrestart||ce,t.easing&&this.setEasing(t.easing)}return e.prototype.step=function(t,r){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),this._paused){this._pausedTime+=r;return}var n=this._life,i=t-this._startTime-this._pausedTime,a=i/n;a<0&&(a=0),a=Math.min(a,1);var o=this.easingFunc,s=o?o(a):a;if(this.onframe(s),a===1)if(this.loop){var l=i%n;this._startTime=t-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(t){this.easing=t,this.easingFunc=j(t)?t:Ty[t]||Rc(t)},e}(),Hk=Qet;var Wk=function(){function e(t){this.value=t}return e}();var Jet=function(){function e(){this._len=0}return e.prototype.insert=function(t){var r=new Wk(t);return this.insertEntry(r),r},e.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++},e.prototype.remove=function(t){var r=t.prev,n=t.next;r?r.next=n:this.head=n,n?n.prev=r:this.tail=r,t.next=t.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e}();var trt=function(){function e(t){this._list=new Jet,this._maxSize=10,this._map={},this._maxSize=t}return e.prototype.put=function(t,r){var n=this._list,i=this._map,a=null;if(i[t]==null){var o=n.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=n.head;n.remove(l),delete i[l.key],a=l.value,this._lastRemovedEntry=l}s?s.value=r:s=new Wk(r),s.key=t,n.insertEntry(s),i[t]=s}return a},e.prototype.get=function(t){var r=this._map[t],n=this._list;if(r!=null)return r!==n.tail&&(n.remove(r),n.insertEntry(r)),r.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}(),Ba=trt;var Yk={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 ta(e){return e=Math.round(e),e<0?0:e>255?255:e}function ert(e){return e=Math.round(e),e<0?0:e>360?360:e}function bd(e){return e<0?0:e>1?1:e}function y2(e){var t=e;return t.length&&t.charAt(t.length-1)==="%"?ta(parseFloat(t)/100*255):ta(parseInt(t,10))}function vu(e){var t=e;return t.length&&t.charAt(t.length-1)==="%"?bd(parseFloat(t)/100):bd(parseFloat(t))}function x2(e,t,r){return r<0?r+=1:r>1&&(r-=1),r*6<1?e+(t-e)*r*6:r*2<1?t:r*3<2?e+(t-e)*(2/3-r)*6:e}function Os(e,t,r){return e+(t-e)*r}function _i(e,t,r,n,i){return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e}function _2(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var Xk=new Ba(20),Py=null;function Nc(e,t){Py&&_2(Py,t),Py=Xk.put(e,Py||t.slice())}function br(e,t){if(e){t=t||[];var r=Xk.get(e);if(r)return _2(t,r);e=e+"";var n=e.replace(/ /g,"").toLowerCase();if(n in Yk)return _2(t,Yk[n]),Nc(e,t),t;var i=n.length;if(n.charAt(0)==="#"){if(i===4||i===5){var a=parseInt(n.slice(1,4),16);if(!(a>=0&&a<=4095)){_i(t,0,0,0,1);return}return _i(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(n.slice(4),16)/15:1),Nc(e,t),t}else if(i===7||i===9){var a=parseInt(n.slice(1,7),16);if(!(a>=0&&a<=16777215)){_i(t,0,0,0,1);return}return _i(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(n.slice(7),16)/255:1),Nc(e,t),t}return}var o=n.indexOf("("),s=n.indexOf(")");if(o!==-1&&s+1===i){var l=n.substr(0,o),u=n.substr(o+1,s-(o+1)).split(","),f=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?_i(t,+u[0],+u[1],+u[2],1):_i(t,0,0,0,1);f=vu(u.pop());case"rgb":if(u.length>=3)return _i(t,y2(u[0]),y2(u[1]),y2(u[2]),u.length===3?f:vu(u[3])),Nc(e,t),t;_i(t,0,0,0,1);return;case"hsla":if(u.length!==4){_i(t,0,0,0,1);return}return u[3]=vu(u[3]),b2(u,t),Nc(e,t),t;case"hsl":if(u.length!==3){_i(t,0,0,0,1);return}return b2(u,t),Nc(e,t),t;default:return}}_i(t,0,0,0,1)}}function b2(e,t){var r=(parseFloat(e[0])%360+360)%360/360,n=vu(e[1]),i=vu(e[2]),a=i<=.5?i*(n+1):i+n-i*n,o=i*2-a;return t=t||[],_i(t,ta(x2(o,a,r+1/3)*255),ta(x2(o,a,r)*255),ta(x2(o,a,r-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function rrt(e){if(e){var t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=a-i,s=(a+i)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(a+i):u=o/(2-a-i);var f=((a-t)/6+o/2)/o,c=((a-r)/6+o/2)/o,p=((a-n)/6+o/2)/o;t===a?l=p-c:r===a?l=1/3+f-p:n===a&&(l=2/3+c-f),l<0&&(l+=1),l>1&&(l-=1)}var h=[l*360,u,s];return e[3]!=null&&h.push(e[3]),h}}function Sd(e,t){var r=br(e);if(r){for(var n=0;n<3;n++)t<0?r[n]=r[n]*(1-t)|0:r[n]=(255-r[n])*t+r[n]|0,r[n]>255?r[n]=255:r[n]<0&&(r[n]=0);return bi(r,r.length===4?"rgba":"rgb")}}function Ry(e,t,r){if(!(!(t&&t.length)||!(e>=0&&e<=1))){r=r||[];var n=e*(t.length-1),i=Math.floor(n),a=Math.ceil(n),o=t[i],s=t[a],l=n-i;return r[0]=ta(Os(o[0],s[0],l)),r[1]=ta(Os(o[1],s[1],l)),r[2]=ta(Os(o[2],s[2],l)),r[3]=bd(Os(o[3],s[3],l)),r}}function qk(e,t,r){if(!(!(t&&t.length)||!(e>=0&&e<=1))){var n=e*(t.length-1),i=Math.floor(n),a=Math.ceil(n),o=br(t[i]),s=br(t[a]),l=n-i,u=bi([ta(Os(o[0],s[0],l)),ta(Os(o[1],s[1],l)),ta(Os(o[2],s[2],l)),bd(Os(o[3],s[3],l))],"rgba");return r?{color:u,leftIndex:i,rightIndex:a,value:n}:u}}function mu(e,t,r,n){var i=br(e);if(e)return i=rrt(i),t!=null&&(i[0]=ert(t)),r!=null&&(i[1]=vu(r)),n!=null&&(i[2]=vu(n)),bi(b2(i),"rgba")}function gu(e,t){var r=br(e);if(r&&t!=null)return r[3]=bd(t),bi(r,"rgba")}function bi(e,t){if(!(!e||!e.length)){var r=e[0]+","+e[1]+","+e[2];return(t==="rgba"||t==="hsva"||t==="hsla")&&(r+=","+e[3]),t+"("+r+")"}}function kc(e,t){var r=br(e);return r?(.299*r[0]+.587*r[1]+.114*r[2])*r[3]/255+(1-r[3])*t:0}var Oy=Math.round;function zs(e){var t;if(!e||e==="transparent")e="none";else if(typeof e=="string"&&e.indexOf("rgba")>-1){var r=br(e);r&&(e="rgb("+r[0]+","+r[1]+","+r[2]+")",t=r[3])}return{color:e,opacity:t??1}}var Zk=1e-4;function Fa(e){return e-Zk}function ky(e){return Oy(e*1e3)/1e3}function zy(e){return Oy(e*1e4)/1e4}function Kk(e){return"matrix("+ky(e[0])+","+ky(e[1])+","+ky(e[2])+","+ky(e[3])+","+zy(e[4])+","+zy(e[5])+")"}var $k={left:"start",right:"end",center:"middle",middle:"middle"};function jk(e,t,r){return r==="top"?e+=t/2:r==="bottom"&&(e-=t/2),e}function Qk(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY)}function Jk(e){var t=e.style,r=e.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),r[0],r[1]].join(",")}function S2(e){return e&&!!e.image}function nrt(e){return e&&!!e.svgElement}function wd(e){return S2(e)||nrt(e)}function Uy(e){return e.type==="linear"}function Vy(e){return e.type==="radial"}function By(e){return e&&(e.type==="linear"||e.type==="radial")}function Td(e){return"url(#"+e+")"}function Fy(e){var t=e.getGlobalScale(),r=Math.max(t[0],t[1]);return Math.max(Math.ceil(Math.log(r)/Math.log(10)),1)}function Gy(e){var t=e.x||0,r=e.y||0,n=(e.rotation||0)*Ac,i=bt(e.scaleX,1),a=bt(e.scaleY,1),o=e.skewX||0,s=e.skewY||0,l=[];return(t||r)&&l.push("translate("+t+"px,"+r+"px)"),n&&l.push("rotate("+n+")"),(i!==1||a!==1)&&l.push("scale("+i+","+a+")"),(o||s)&&l.push("skew("+Oy(o*Ac)+"deg, "+Oy(s*Ac)+"deg)"),l.join(" ")}var tO=function(){return Ot.hasGlobalWindow&&j(window.btoa)?function(e){return window.btoa(unescape(encodeURIComponent(e)))}:typeof Buffer<"u"?function(e){return Buffer.from(e).toString("base64")}:function(e){return null}}();var T2=Array.prototype.slice;function ko(e,t,r){return(t-e)*r+e}function w2(e,t,r,n){for(var i=t.length,a=0;an?t:e,a=Math.min(r,n),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;so;if(s)n.length=o;else for(var l=a;l=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(t,r,n){this._needsSort=!0;var i=this.keyframes,a=i.length,o=!1,s=rO,l=r;if(ze(r)){var u=srt(r);s=u,(u===1&&!Ct(r[0])||u===2&&!Ct(r[0][0]))&&(o=!0)}else if(Ct(r)&&!Es(r))s=Wy;else if(H(r))if(!isNaN(+r))s=Wy;else{var f=br(r);f&&(l=f,s=Ad)}else if(Ds(r)){var c=V({},l);c.colorStops=F(r.colorStops,function(h){return{offset:h.offset,color:br(h.color)}}),Uy(r)?s=M2:Vy(r)&&(s=A2),l=c}a===0?this.valType=s:(s!==this.valType||s===rO)&&(o=!0),this.discrete=this.discrete||o;var p={time:t,value:l,rawValue:r,percent:0};return n&&(p.easing=n,p.easingFunc=j(n)?n:Ty[n]||Rc(n)),i.push(p),p},e.prototype.prepare=function(t,r){var n=this.keyframes;this._needsSort&&n.sort(function(m,v){return m.time-v.time});for(var i=this.valType,a=n.length,o=n[a-1],s=this.discrete,l=Yy(i),u=nO(i),f=0;f=0&&!(o[f].percent<=r);f--);f=p(f,s-2)}else{for(f=c;fr);f++);f=p(f-1,s-2)}d=o[f+1],h=o[f]}if(h&&d){this._lastFr=f,this._lastFrP=r;var v=d.percent-h.percent,g=v===0?1:p((r-h.percent)/v,1);d.easingFunc&&(g=d.easingFunc(g));var y=n?this._additiveValue:u?Md:t[l];if((Yy(a)||u)&&!y&&(y=this._additiveValue=[]),this.discrete)t[l]=g<1?h.rawValue:d.rawValue;else if(Yy(a))a===qy?w2(y,h[i],d[i],g):irt(y,h[i],d[i],g);else if(nO(a)){var x=h[i],_=d[i],S=a===M2;t[l]={type:S?"linear":"radial",x:ko(x.x,_.x,g),y:ko(x.y,_.y,g),colorStops:F(x.colorStops,function(w,T){var M=_.colorStops[T];return{offset:ko(w.offset,M.offset,g),color:Xy(w2([],w.color,M.color,g))}}),global:_.global},S?(t[l].x2=ko(x.x2,_.x2,g),t[l].y2=ko(x.y2,_.y2,g)):t[l].r=ko(x.r,_.r,g)}else if(u)w2(y,h[i],d[i],g),n||(t[l]=Xy(y));else{var b=ko(h[i],d[i],g);n?this._additiveValue=b:t[l]=b}n&&this._addToTarget(t)}}},e.prototype._addToTarget=function(t){var r=this.valType,n=this.propName,i=this._additiveValue;r===Wy?t[n]=t[n]+i:r===Ad?(br(t[n],Md),Hy(Md,Md,i,1),t[n]=Xy(Md)):r===qy?Hy(t[n],t[n],i,1):r===iO&&eO(t[n],t[n],i,1)},e}(),urt=function(){function e(t,r,n,i){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=t,this._loop=r,r&&i){au("Can' use additive animation on looped animation.");return}this._additiveAnimators=i,this._allowDiscrete=n}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(t){this._target=t},e.prototype.when=function(t,r,n){return this.whenWithKeys(t,r,St(r),n)},e.prototype.whenWithKeys=function(t,r,n,i){for(var a=this._tracks,o=0;o0&&l.addKeyframe(0,yu(u),i),this._trackKeys.push(s)}l.addKeyframe(t,yu(r[s]),i)}return this._maxTime=Math.max(this._maxTime,t),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var r=t.length,n=0;n0)){this._started=1;for(var r=this,n=[],i=this._maxTime||0,a=0;a1){var s=o.pop();a.addKeyframe(s.time,t[i]),a.prepare(this._maxTime,a.getAdditiveTrack())}}}},e}(),Cd=urt;function xu(){return new Date().getTime()}var frt=function(e){N(t,e);function t(r){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,r=r||{},n.stage=r.stage||{},n}return t.prototype.addClip=function(r){r.animation&&this.removeClip(r),this._head?(this._tail.next=r,r.prev=this._tail,r.next=null,this._tail=r):this._head=this._tail=r,r.animation=this},t.prototype.addAnimator=function(r){r.animation=this;var n=r.getClip();n&&this.addClip(n)},t.prototype.removeClip=function(r){if(r.animation){var n=r.prev,i=r.next;n?n.next=i:this._head=i,i?i.prev=n:this._tail=n,r.next=r.prev=r.animation=null}},t.prototype.removeAnimator=function(r){var n=r.getClip();n&&this.removeClip(n),r.animation=null},t.prototype.update=function(r){for(var n=xu()-this._pausedTime,i=n-this._time,a=this._head;a;){var o=a.next,s=a.step(n,i);s&&(a.ondestroy(),this.removeClip(a)),a=o}this._time=n,r||(this.trigger("frame",i),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var r=this;this._running=!0;function n(){r._running&&(yd(n),!r._paused&&r.update())}yd(n)},t.prototype.start=function(){this._running||(this._time=xu(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=xu(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=xu()-this._pauseStart,this._paused=!1)},t.prototype.clear=function(){for(var r=this._head;r;){var n=r.next;r.prev=r.next=r.animation=null,r=n}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(r,n){n=n||{},this.start();var i=new Cd(r,n.loop);return this.addAnimator(i),i},t}(Je),aO=frt;var crt=300,C2=Ot.domSupported,D2=function(){var e=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],t=["touchstart","touchend","touchmove"],r={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},n=F(e,function(i){var a=i.replace("mouse","pointer");return r.hasOwnProperty(a)?a:i});return{mouse:e,touch:t,pointer:n}}(),oO={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},sO=!1;function L2(e){var t=e.pointerType;return t==="pen"||t==="touch"}function prt(e){e.touching=!0,e.touchTimer!=null&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)}function E2(e){e&&(e.zrByTouch=!0)}function hrt(e,t){return Tn(e.dom,new drt(e,t),!0)}function uO(e,t){for(var r=t,n=!1;r&&r.nodeType!==9&&!(n=r.domBelongToZr||r!==t&&r===e.painterRoot);)r=r.parentNode;return n}var drt=function(){function e(t,r){this.stopPropagation=ce,this.stopImmediatePropagation=ce,this.preventDefault=ce,this.type=r.type,this.target=this.currentTarget=t.dom,this.pointerType=r.pointerType,this.clientX=r.clientX,this.clientY=r.clientY}return e}(),ea={mousedown:function(e){e=Tn(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger("mousedown",e)},mousemove:function(e){e=Tn(this.dom,e);var t=this.__mayPointerCapture;t&&(e.zrX!==t[0]||e.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",e)},mouseup:function(e){e=Tn(this.dom,e),this.__togglePointerCapture(!1),this.trigger("mouseup",e)},mouseout:function(e){e=Tn(this.dom,e);var t=e.toElement||e.relatedTarget;uO(this,t)||(this.__pointerCapturing&&(e.zrEventControl="no_globalout"),this.trigger("mouseout",e))},wheel:function(e){sO=!0,e=Tn(this.dom,e),this.trigger("mousewheel",e)},mousewheel:function(e){sO||(e=Tn(this.dom,e),this.trigger("mousewheel",e))},touchstart:function(e){e=Tn(this.dom,e),E2(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,"start"),ea.mousemove.call(this,e),ea.mousedown.call(this,e)},touchmove:function(e){e=Tn(this.dom,e),E2(e),this.handler.processGesture(e,"change"),ea.mousemove.call(this,e)},touchend:function(e){e=Tn(this.dom,e),E2(e),this.handler.processGesture(e,"end"),ea.mouseup.call(this,e),+new Date-+this.__lastTouchMomentdO||e<-dO}var Su=[],Oc=[],R2=tr(),N2=Math.abs,yrt=function(){function e(){}return e.prototype.getLocalTransform=function(t){return e.getLocalTransform(this,t)},e.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},e.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},e.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},e.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},e.prototype.needLocalTransform=function(){return bu(this.rotation)||bu(this.x)||bu(this.y)||bu(this.scaleX-1)||bu(this.scaleY-1)||bu(this.skewX)||bu(this.skewY)},e.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,r=this.needLocalTransform(),n=this.transform;if(!(r||t)){n&&(hO(n),this.invTransform=null);return}n=n||tr(),r?this.getLocalTransform(n):hO(n),t&&(r?An(n,t,n):hd(n,t)),this.transform=n,this._resolveGlobalScaleRatio(n)},e.prototype._resolveGlobalScaleRatio=function(t){var r=this.globalScaleRatio;if(r!=null&&r!==1){this.getGlobalScale(Su);var n=Su[0]<0?-1:1,i=Su[1]<0?-1:1,a=((Su[0]-n)*r+n)/Su[0]||0,o=((Su[1]-i)*r+i)/Su[1]||0;t[0]*=a,t[1]*=a,t[2]*=o,t[3]*=o}this.invTransform=this.invTransform||tr(),gi(this.invTransform,t)},e.prototype.getComputedTransform=function(){for(var t=this,r=[];t;)r.push(t),t=t.parent;for(;t=r.pop();)t.updateTransform();return this.transform},e.prototype.setLocalTransform=function(t){if(t){var r=t[0]*t[0]+t[1]*t[1],n=t[2]*t[2]+t[3]*t[3],i=Math.atan2(t[1],t[0]),a=Math.PI/2+i-Math.atan2(t[3],t[2]);n=Math.sqrt(n)*Math.cos(a),r=Math.sqrt(r),this.skewX=a,this.skewY=0,this.rotation=-i,this.x=+t[4],this.y=+t[5],this.scaleX=r,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,r=this.transform;t&&t.transform&&(An(Oc,t.invTransform,r),r=Oc);var n=this.originX,i=this.originY;(n||i)&&(R2[4]=n,R2[5]=i,An(Oc,r,R2),Oc[4]-=n,Oc[5]-=i,r=Oc),this.setLocalTransform(r)}},e.prototype.getGlobalScale=function(t){var r=this.transform;return t=t||[],r?(t[0]=Math.sqrt(r[0]*r[0]+r[1]*r[1]),t[1]=Math.sqrt(r[2]*r[2]+r[3]*r[3]),r[0]<0&&(t[0]=-t[0]),r[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},e.prototype.transformCoordToLocal=function(t,r){var n=[t,r],i=this.invTransform;return i&&Ue(n,n,i),n},e.prototype.transformCoordToGlobal=function(t,r){var n=[t,r],i=this.transform;return i&&Ue(n,n,i),n},e.prototype.getLineScale=function(){var t=this.transform;return t&&N2(t[0]-1)>1e-10&&N2(t[3]-1)>1e-10?Math.sqrt(N2(t[0]*t[3]-t[2]*t[1])):1},e.prototype.copyTransform=function(t){k2(this,t)},e.getLocalTransform=function(t,r){r=r||[];var n=t.originX||0,i=t.originY||0,a=t.scaleX,o=t.scaleY,s=t.anchorX,l=t.anchorY,u=t.rotation||0,f=t.x,c=t.y,p=t.skewX?Math.tan(t.skewX):0,h=t.skewY?Math.tan(-t.skewY):0;if(n||i||s||l){var d=n+s,m=i+l;r[4]=-d*a-p*m*o,r[5]=-m*o-h*d*a}else r[4]=r[5]=0;return r[0]=a,r[3]=o,r[1]=h*a,r[2]=p*o,u&&Cn(r,r,u),r[4]+=n+f,r[5]+=i+c,r},e.initDefaultProps=function(){var t=e.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0}(),e}(),ri=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function k2(e,t){for(var r=0;r=0?parseFloat(e)/100*t:parseFloat(e):e}function Tu(e,t,r){var n=t.position||"inside",i=t.distance!=null?t.distance:5,a=r.height,o=r.width,s=a/2,l=r.x,u=r.y,f="left",c="top";if(n instanceof Array)l+=kr(n[0],r.width),u+=kr(n[1],r.height),f=null,c=null;else switch(n){case"left":l-=i,u+=s,f="right",c="middle";break;case"right":l+=i+o,u+=s,c="middle";break;case"top":l+=o/2,u-=i,f="center",c="bottom";break;case"bottom":l+=o/2,u+=a+i,f="center";break;case"inside":l+=o/2,u+=s,f="center",c="middle";break;case"insideLeft":l+=i,u+=s,c="middle";break;case"insideRight":l+=o-i,u+=s,f="right",c="middle";break;case"insideTop":l+=o/2,u+=i,f="center";break;case"insideBottom":l+=o/2,u+=a-i,f="center",c="bottom";break;case"insideTopLeft":l+=i,u+=i;break;case"insideTopRight":l+=o-i,u+=i,f="right";break;case"insideBottomLeft":l+=i,u+=a-i,c="bottom";break;case"insideBottomRight":l+=o-i,u+=a-i,f="right",c="bottom";break}return e=e||{},e.x=l,e.y=u,e.align=f,e.verticalAlign=c,e}var O2="__zr_normal__",z2=ri.concat(["ignore"]),xrt=Pr(ri,function(e,t){return e[t]=!0,e},{ignore:!1}),Vc={},_rt=new dt(0,0,0,0),B2=function(){function e(t){this.id=hy(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return e.prototype._init=function(t){this.attr(t)},e.prototype.drift=function(t,r,n){switch(this.draggable){case"horizontal":r=0;break;case"vertical":t=0;break}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=r,this.decomposeTransform(),this.markRedraw()},e.prototype.beforeUpdate=function(){},e.prototype.afterUpdate=function(){},e.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},e.prototype.updateInnerText=function(t){var r=this._textContent;if(r&&(!r.ignore||t)){this.textConfig||(this.textConfig={});var n=this.textConfig,i=n.local,a=r.innerTransformable,o=void 0,s=void 0,l=!1;a.parent=i?this:null;var u=!1;if(a.copyTransform(r),n.position!=null){var f=_rt;n.layoutRect?f.copy(n.layoutRect):f.copy(this.getBoundingRect()),i||f.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(Vc,n,f):Tu(Vc,n,f),a.x=Vc.x,a.y=Vc.y,o=Vc.align,s=Vc.verticalAlign;var c=n.origin;if(c&&n.rotation!=null){var p=void 0,h=void 0;c==="center"?(p=f.width*.5,h=f.height*.5):(p=kr(c[0],f.width),h=kr(c[1],f.height)),u=!0,a.originX=-a.x+p+(i?0:f.x),a.originY=-a.y+h+(i?0:f.y)}}n.rotation!=null&&(a.rotation=n.rotation);var d=n.offset;d&&(a.x+=d[0],a.y+=d[1],u||(a.originX=-d[0],a.originY=-d[1]));var m=n.inside==null?typeof n.position=="string"&&n.position.indexOf("inside")>=0:n.inside,v=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),g=void 0,y=void 0,x=void 0;m&&this.canBeInsideText()?(g=n.insideFill,y=n.insideStroke,(g==null||g==="auto")&&(g=this.getInsideTextFill()),(y==null||y==="auto")&&(y=this.getInsideTextStroke(g),x=!0)):(g=n.outsideFill,y=n.outsideStroke,(g==null||g==="auto")&&(g=this.getOutsideFill()),(y==null||y==="auto")&&(y=this.getOutsideStroke(g),x=!0)),g=g||"#000",(g!==v.fill||y!==v.stroke||x!==v.autoStroke||o!==v.align||s!==v.verticalAlign)&&(l=!0,v.fill=g,v.stroke=y,v.autoStroke=x,v.align=o,v.verticalAlign=s,r.setDefaultTextStyle(v)),r.__dirty|=or,l&&r.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return"#fff"},e.prototype.getInsideTextStroke=function(t){return"#000"},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Id:Ed},e.prototype.getOutsideStroke=function(t){var r=this.__zr&&this.__zr.getBackgroundColor(),n=typeof r=="string"&&br(r);n||(n=[255,255,255,1]);for(var i=n[3],a=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*i+(a?0:255)*(1-i);return n[3]=1,bi(n,"rgba")},e.prototype.traverse=function(t,r){},e.prototype.attrKV=function(t,r){t==="textConfig"?this.setTextConfig(r):t==="textContent"?this.setTextContent(r):t==="clipPath"?this.setClipPath(r):t==="extra"?(this.extra=this.extra||{},V(this.extra,r)):this[t]=r},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(t,r){if(typeof t=="string")this.attrKV(t,r);else if(rt(t))for(var n=t,i=St(n),a=0;a0},e.prototype.getState=function(t){return this.states[t]},e.prototype.ensureState=function(t){var r=this.states;return r[t]||(r[t]={}),r[t]},e.prototype.clearStates=function(t){this.useState(O2,!1,t)},e.prototype.useState=function(t,r,n,i){var a=t===O2,o=this.hasState();if(!(!o&&a)){var s=this.currentStates,l=this.stateTransition;if(!(gt(s,t)>=0&&(r||s.length===1))){var u;if(this.stateProxy&&!a&&(u=this.stateProxy(t)),u||(u=this.states&&this.states[t]),!u&&!a){au("State "+t+" not exists.");return}a||this.saveCurrentToNormalState(u);var f=!!(u&&u.hoverLayer||i);f&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,u,this._normalState,r,!n&&!this.__inHover&&l&&l.duration>0,l);var c=this._textContent,p=this._textGuide;return c&&c.useState(t,r,n,f),p&&p.useState(t,r,n,f),a?(this.currentStates=[],this._normalState={}):r?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!f&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~or),u}}},e.prototype.useStates=function(t,r,n){if(!t.length)this.clearStates();else{var i=[],a=this.currentStates,o=t.length,s=o===a.length;if(s){for(var l=0;l0,d);var m=this._textContent,v=this._textGuide;m&&m.useStates(t,r,p),v&&v.useStates(t,r,p),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!p&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~or)}},e.prototype._updateAnimationTargets=function(){for(var t=0;t=0){var n=this.currentStates.slice();n.splice(r,1),this.useStates(n)}},e.prototype.replaceState=function(t,r,n){var i=this.currentStates.slice(),a=gt(i,t),o=gt(i,r)>=0;a>=0?o?i.splice(a,1):i[a]=r:n&&!o&&i.push(r),this.useStates(i)},e.prototype.toggleState=function(t,r){r?this.useState(t,!0):this.removeState(t)},e.prototype._mergeStates=function(t){for(var r={},n,i=0;i=0&&a.splice(o,1)}),this.animators.push(t),n&&n.animation.addAnimator(t),n&&n.wakeUp()},e.prototype.updateDuringAnimation=function(t){this.markRedraw()},e.prototype.stopAnimation=function(t,r){for(var n=this.animators,i=n.length,a=[],o=0;o0&&r.during&&a[0].during(function(d,m){r.during(m)});for(var p=0;p0||i.force&&!o.length){var T=void 0,M=void 0,C=void 0;if(s){M={},p&&(T={});for(var _=0;_=0&&(i.splice(a,0,r),this._doAdd(r))}return this},t.prototype.replace=function(r,n){var i=gt(this._children,r);return i>=0&&this.replaceAt(n,i),this},t.prototype.replaceAt=function(r,n){var i=this._children,a=i[n];if(r&&r!==this&&r.parent!==this&&r!==a){i[n]=r,a.parent=null;var o=this.__zr;o&&a.removeSelfFromZr(o),this._doAdd(r)}return this},t.prototype._doAdd=function(r){r.parent&&r.parent.remove(r),r.parent=this;var n=this.__zr;n&&n!==r.__zr&&r.addSelfToZr(n),n&&n.refresh()},t.prototype.remove=function(r){var n=this.__zr,i=this._children,a=gt(i,r);return a<0?this:(i.splice(a,1),r.parent=null,n&&r.removeSelfFromZr(n),n&&n.refresh(),this)},t.prototype.removeAll=function(){for(var r=this._children,n=this.__zr,i=0;i0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},e.prototype.wakeUp=function(){this.animation.start(),this._stillFrameAccum=0},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover()},e.prototype.resize=function(t){t=t||{},this.painter.resize(t.width,t.height),this.handler.resize()},e.prototype.clearAnimation=function(){this.animation.clear()},e.prototype.getWidth=function(){return this.painter.getWidth()},e.prototype.getHeight=function(){return this.painter.getHeight()},e.prototype.setCursorStyle=function(t){this.handler.setCursorStyle(t)},e.prototype.findHover=function(t,r){return this.handler.findHover(t,r)},e.prototype.on=function(t,r,n){return this.handler.on(t,r,n),this},e.prototype.off=function(t,r){this.handler.off(t,r)},e.prototype.trigger=function(t,r){this.handler.trigger(t,r)},e.prototype.clear=function(){for(var t=this.storage.getRoots(),r=0;r0){if(e<=i)return o;if(e>=a)return s}else{if(e>=i)return o;if(e<=a)return s}else{if(e===i)return o;if(e===a)return s}return(e-i)/l*u+o}function q(e,t){switch(e){case"center":case"middle":e="50%";break;case"left":case"top":e="0%";break;case"right":case"bottom":e="100%";break}return H(e)?Ert(e).match(/%$/)?parseFloat(e)/100*t:parseFloat(e):e==null?NaN:+e}function pe(e,t,r){return t==null&&(t=10),t=Math.min(Math.max(0,t),SO),e=(+e).toFixed(t),r?e:+e}function sr(e){return e.sort(function(t,r){return t-r}),e}function an(e){if(e=+e,isNaN(e))return 0;if(e>1e-14){for(var t=1,r=0;r<15;r++,t*=10)if(Math.round(e*t)/t===e)return r}return Irt(e)}function Irt(e){var t=e.toString().toLowerCase(),r=t.indexOf("e"),n=r>0?+t.slice(r+1):0,i=r>0?r:t.length,a=t.indexOf("."),o=a<0?0:i-1-a;return Math.max(0,o-n)}function Qy(e,t){var r=Math.log,n=Math.LN10,i=Math.floor(r(e[1]-e[0])/n),a=Math.round(r(Math.abs(t[1]-t[0]))/n),o=Math.min(Math.max(-i+a,0),20);return isFinite(o)?o:20}function wO(e,t){var r=Pr(e,function(h,d){return h+(isNaN(d)?0:d)},0);if(r===0)return[];for(var n=Math.pow(10,t),i=F(e,function(h){return(isNaN(h)?0:h)/r*n*100}),a=n*100,o=F(i,function(h){return Math.floor(h)}),s=Pr(o,function(h,d){return h+d},0),l=F(i,function(h,d){return h-o[d]});su&&(u=l[c],f=c);++o[f],l[f]=0,++s}return F(o,function(h){return h/n})}function TO(e,t){var r=Math.max(an(e),an(t)),n=e+t;return r>SO?n:pe(n,r)}var G2=9007199254740991;function H2(e){var t=Math.PI*2;return(e%t+t)%t}function Ld(e){return e>-bO&&e=10&&t++,t}function t0(e,t){var r=Jy(e),n=Math.pow(10,r),i=e/n,a;return t?i<1.5?a=1:i<2.5?a=2:i<4?a=3:i<7?a=5:a=10:i<1?a=1:i<2?a=2:i<3?a=3:i<5?a=5:a=10,e=a*n,r>=-20?+e.toFixed(r<0?-r:0):e}function e0(e,t){var r=(e.length-1)*t+1,n=Math.floor(r),i=+e[n-1],a=r-n;return a?i+a*(e[n]-i):i}function W2(e){e.sort(function(l,u){return s(l,u,0)?-1:1});for(var t=-1/0,r=1,n=0;n=0||a&>(a,l)<0)){var u=n.getShallow(l,t);u!=null&&(o[e[s][0]]=u)}}return o}}var Krt=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],$rt=Pn(Krt),HO=function(){function e(){}return e.prototype.getAreaStyle=function(t,r){return $rt(this,t,r)},e}();var K2=new Ba(50);function YO(e){if(typeof e=="string"){var t=K2.get(e);return t&&t.image}else return e}function Od(e,t,r,n,i){if(e)if(typeof e=="string"){if(t&&t.__zrImageSrc===e||!r)return t;var a=K2.get(e),o={hostEl:r,cb:n,cbPayload:i};return a?(t=a.image,!Hc(t)&&a.pending.push(o)):(t=Wr.loadImage(e,WO,WO),t.__zrImageSrc=e,K2.put(e,t.__cachedImgObj={image:t,pending:[o]})),t}else return e;else return t}function WO(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t=o;l++)s-=o;var u=En(r,t);return u>s&&(r="",u=0),s=e-u,i.ellipsis=r,i.ellipsisWidth=u,i.contentWidth=s,i.containerWidth=e,i}function ZO(e,t){var r=t.containerWidth,n=t.font,i=t.contentWidth;if(!r)return"";var a=En(e,n);if(a<=r)return e;for(var o=0;;o++){if(a<=i||o>=t.maxIterations){e+=t.ellipsis;break}var s=o===0?Jrt(e,i,t.ascCharWidth,t.cnCharWidth):a>0?Math.floor(e.length*i/a):0;e=e.substr(0,s),a=En(e,n)}return e===""&&(e=t.placeholder),e}function Jrt(e,t,r,n){for(var i=0,a=0,o=e.length;ah&&u){var d=Math.floor(h/s);c=c.slice(0,d)}if(e&&a&&f!=null)for(var m=qO(f,i,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),v=0;vs&&j2(r,e.substring(s,u),t,o),j2(r,l[2],t,o,l[1]),s=$2.lastIndex}si){S>0?(y.tokens=y.tokens.slice(0,S),v(y,_,x),r.lines=r.lines.slice(0,g+1)):r.lines=r.lines.slice(0,g);break t}var P=w.width,L=P==null||P==="auto";if(typeof P=="string"&&P.charAt(P.length-1)==="%")b.percentWidth=P,f.push(b),b.contentWidth=En(b.text,C);else{if(L){var I=w.backgroundColor,E=I&&I.image;E&&(E=YO(E),Hc(E)&&(b.width=Math.max(b.width,E.width*A/E.height)))}var R=d&&n!=null?n-_:null;R!=null&&R0&&d+n.accumWidth>n.width&&(f=t.split(` -`),u=!0),n.accumWidth=d}else{var m=jO(t,l,n.width,n.breakAll,n.accumWidth);n.accumWidth=m.accumWidth+h,c=m.linesWidths,f=m.lines}}else f=t.split(` -`);for(var v=0;v=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var nnt=Pr(",&?/;] ".split(""),function(e,t){return e[t]=!0,e},{});function int(e){return rnt(e)?!!nnt[e]:!0}function jO(e,t,r,n,i){for(var a=[],o=[],s="",l="",u=0,f=0,c=0;cr:i+f+h>r){f?(s||l)&&(d?(s||(s=l,l="",u=0,f=u),a.push(s),o.push(f-u),l+=p,u+=h,s="",f=u):(l&&(s+=l,l="",u=0),a.push(s),o.push(f),s=p,f=h)):d?(a.push(l),o.push(u),l=p,u=h):(a.push(p),o.push(h));continue}f+=h,d?(l+=p,u+=h):(l&&(s+=l,l="",u=0),s+=p)}return!a.length&&!s&&(s=e,l="",u=0),l&&(s+=l),s&&(a.push(s),o.push(f)),a.length===1&&(f+=i),{accumWidth:f,lines:a,linesWidths:o}}var tT="__zr_style_"+Math.round(Math.random()*10),Ha={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},Au={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Ha[tT]=!0;var QO=["z","z2","invisible"],ant=["invisible"],ont=function(e){N(t,e);function t(r){return e.call(this,r)||this}return t.prototype._init=function(r){for(var n=St(r),i=0;i1e-4){s[0]=e-r,s[1]=t-n,l[0]=e+r,l[1]=t+n;return}if(o0[0]=rT(i)*r+e,o0[1]=eT(i)*n+t,s0[0]=rT(a)*r+e,s0[1]=eT(a)*n+t,u(s,o0,s0),f(l,o0,s0),i=i%Cu,i<0&&(i=i+Cu),a=a%Cu,a<0&&(a=a+Cu),i>a&&!o?a+=Cu:ii&&(l0[0]=rT(h)*r+e,l0[1]=eT(h)*n+t,u(s,l0,s),f(l,l0,l))}var Se={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Eu=[],Iu=[],Wa=[],Fs=[],Ya=[],Xa=[],iT=Math.min,aT=Math.max,Lu=Math.cos,Pu=Math.sin,Oo=Math.abs,lT=Math.PI,Gs=lT*2,oT=typeof Float32Array<"u",zd=[];function sT(e){var t=Math.round(e/lT*1e8)/1e8;return t%2*lT}function uT(e,t){var r=sT(e[0]);r<0&&(r+=Gs);var n=r-e[0],i=e[1];i+=n,!t&&i-r>=Gs?i=r+Gs:t&&r-i>=Gs?i=r-Gs:!t&&r>i?i=r+(Gs-sT(r-i)):t&&r0&&(this._ux=Oo(n/_u/t)||0,this._uy=Oo(n/_u/r)||0)},e.prototype.setDPR=function(t){this.dpr=t},e.prototype.setContext=function(t){this._ctx=t},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(t,r){return this._drawPendingPt(),this.addData(Se.M,t,r),this._ctx&&this._ctx.moveTo(t,r),this._x0=t,this._y0=r,this._xi=t,this._yi=r,this},e.prototype.lineTo=function(t,r){var n=Oo(t-this._xi),i=Oo(r-this._yi),a=n>this._ux||i>this._uy;if(this.addData(Se.L,t,r),this._ctx&&a&&this._ctx.lineTo(t,r),a)this._xi=t,this._yi=r,this._pendingPtDist=0;else{var o=n*n+i*i;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=r,this._pendingPtDist=o)}return this},e.prototype.bezierCurveTo=function(t,r,n,i,a,o){return this._drawPendingPt(),this.addData(Se.C,t,r,n,i,a,o),this._ctx&&this._ctx.bezierCurveTo(t,r,n,i,a,o),this._xi=a,this._yi=o,this},e.prototype.quadraticCurveTo=function(t,r,n,i){return this._drawPendingPt(),this.addData(Se.Q,t,r,n,i),this._ctx&&this._ctx.quadraticCurveTo(t,r,n,i),this._xi=n,this._yi=i,this},e.prototype.arc=function(t,r,n,i,a,o){this._drawPendingPt(),zd[0]=i,zd[1]=a,uT(zd,o),i=zd[0],a=zd[1];var s=a-i;return this.addData(Se.A,t,r,n,n,i,s,0,o?0:1),this._ctx&&this._ctx.arc(t,r,n,i,a,o),this._xi=Lu(a)*n+t,this._yi=Pu(a)*n+r,this},e.prototype.arcTo=function(t,r,n,i,a){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,r,n,i,a),this},e.prototype.rect=function(t,r,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,r,n,i),this.addData(Se.R,t,r,n,i),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(Se.Z);var t=this._ctx,r=this._x0,n=this._y0;return t&&t.closePath(),this._xi=r,this._yi=n,this},e.prototype.fill=function(t){t&&t.fill(),this.toStatic()},e.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(t){var r=t.length;!(this.data&&this.data.length===r)&&oT&&(this.data=new Float32Array(r));for(var n=0;nf.length&&(this._expandData(),f=this.data);for(var c=0;c0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},e.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],r=0;r11&&(this.data=new Float32Array(t)))}},e.prototype.getBoundingRect=function(){Wa[0]=Wa[1]=Ya[0]=Ya[1]=Number.MAX_VALUE,Fs[0]=Fs[1]=Xa[0]=Xa[1]=-Number.MAX_VALUE;var t=this.data,r=0,n=0,i=0,a=0,o;for(o=0;on||Oo(x)>i||p===r-1)&&(m=Math.sqrt(y*y+x*x),a=v,o=g);break}case Se.C:{var _=t[p++],S=t[p++],v=t[p++],g=t[p++],b=t[p++],w=t[p++];m=Bk(a,o,_,S,v,g,b,w,10),a=b,o=w;break}case Se.Q:{var _=t[p++],S=t[p++],v=t[p++],g=t[p++];m=Gk(a,o,_,S,v,g,10),a=v,o=g;break}case Se.A:var T=t[p++],M=t[p++],C=t[p++],A=t[p++],P=t[p++],L=t[p++],I=L+P;p+=1;var E=!t[p++];d&&(s=Lu(P)*C+T,l=Pu(P)*A+M),m=aT(C,A)*iT(Gs,Math.abs(L)),a=Lu(I)*C+T,o=Pu(I)*A+M;break;case Se.R:{s=a=t[p++],l=o=t[p++];var R=t[p++],k=t[p++];m=R*2+k*2;break}case Se.Z:{var y=s-a,x=l-o;m=Math.sqrt(y*y+x*x),a=s,o=l;break}}m>=0&&(u[c++]=m,f+=m)}return this._pathLen=f,f},e.prototype.rebuildPath=function(t,r){var n=this.data,i=this._ux,a=this._uy,o=this._len,s,l,u,f,c,p,h=r<1,d,m,v=0,g=0,y,x=0,_,S;if(!(h&&(this._pathSegLen||this._calculateLength(),d=this._pathSegLen,m=this._pathLen,y=r*m,!y)))t:for(var b=0;b0&&(t.lineTo(_,S),x=0),w){case Se.M:s=u=n[b++],l=f=n[b++],t.moveTo(u,f);break;case Se.L:{c=n[b++],p=n[b++];var M=Oo(c-u),C=Oo(p-f);if(M>i||C>a){if(h){var A=d[g++];if(v+A>y){var P=(y-v)/A;t.lineTo(u*(1-P)+c*P,f*(1-P)+p*P);break t}v+=A}t.lineTo(c,p),u=c,f=p,x=0}else{var L=M*M+C*C;L>x&&(_=c,S=p,x=L)}break}case Se.C:{var I=n[b++],E=n[b++],R=n[b++],k=n[b++],O=n[b++],z=n[b++];if(h){var A=d[g++];if(v+A>y){var P=(y-v)/A;xi(u,I,R,O,P,Eu),xi(f,E,k,z,P,Iu),t.bezierCurveTo(Eu[1],Iu[1],Eu[2],Iu[2],Eu[3],Iu[3]);break t}v+=A}t.bezierCurveTo(I,E,R,k,O,z),u=O,f=z;break}case Se.Q:{var I=n[b++],E=n[b++],R=n[b++],k=n[b++];if(h){var A=d[g++];if(v+A>y){var P=(y-v)/A;ks(u,I,R,P,Eu),ks(f,E,k,P,Iu),t.quadraticCurveTo(Eu[1],Iu[1],Eu[2],Iu[2]);break t}v+=A}t.quadraticCurveTo(I,E,R,k),u=R,f=k;break}case Se.A:var U=n[b++],G=n[b++],Y=n[b++],et=n[b++],tt=n[b++],lt=n[b++],Mt=n[b++],ut=!n[b++],ct=Y>et?Y:et,K=Oo(Y-et)>.001,ot=tt+lt,Q=!1;if(h){var A=d[g++];v+A>y&&(ot=tt+lt*(y-v)/A,Q=!0),v+=A}if(K&&t.ellipse?t.ellipse(U,G,Y,et,Mt,tt,ot,ut):t.arc(U,G,ct,tt,ot,ut),Q)break t;T&&(s=Lu(tt)*Y+U,l=Pu(tt)*et+G),u=Lu(ot)*Y+U,f=Pu(ot)*et+G;break;case Se.R:s=u=n[b],l=f=n[b+1],c=n[b++],p=n[b++];var W=n[b++],Gt=n[b++];if(h){var A=d[g++];if(v+A>y){var Tt=y-v;t.moveTo(c,p),t.lineTo(c+iT(Tt,W),p),Tt-=W,Tt>0&&t.lineTo(c+W,p+iT(Tt,Gt)),Tt-=Gt,Tt>0&&t.lineTo(c+aT(W-Tt,0),p+Gt),Tt-=W,Tt>0&&t.lineTo(c,p+aT(Gt-Tt,0));break t}v+=A}t.rect(c,p,W,Gt);break;case Se.Z:if(h){var A=d[g++];if(v+A>y){var P=(y-v)/A;t.lineTo(u*(1-P)+s*P,f*(1-P)+l*P);break t}v+=A}t.closePath(),u=s,f=l}}},e.prototype.clone=function(){var t=new e,r=this.data;return t.data=r.slice?r.slice():Array.prototype.slice.call(r),t._len=this._len,t},e.CMD=Se,e.initDefaultProps=function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0}(),e}(),mr=lnt;function qa(e,t,r,n,i,a,o){if(i===0)return!1;var s=i,l=0,u=e;if(o>t+s&&o>n+s||oe+s&&a>r+s||at+c&&f>n+c&&f>a+c&&f>s+c||fe+c&&u>r+c&&u>i+c&&u>o+c||ut+u&&l>n+u&&l>a+u||le+u&&s>r+u&&s>i+u||sr||f+ui&&(i+=Ud);var p=Math.atan2(l,s);return p<0&&(p+=Ud),p>=n&&p<=i||p+Ud>=n&&p+Ud<=i}function Ti(e,t,r,n,i,a){if(a>t&&a>n||ai?s:0}var Hs=mr.CMD,Ru=Math.PI*2,cnt=1e-4;function pnt(e,t){return Math.abs(e-t)t&&u>n&&u>a&&u>s||u1&&hnt(),h=Ve(t,n,a,s,Mi[0]),p>1&&(d=Ve(t,n,a,s,Mi[1]))),p===2?vt&&s>n&&s>a||s=0&&u<=1){for(var f=0,c=He(t,n,a,u),p=0;pr||s<-r)return 0;var l=Math.sqrt(r*r-s*s);ln[0]=-l,ln[1]=l;var u=Math.abs(n-i);if(u<1e-4)return 0;if(u>=Ru-1e-4){n=0,i=Ru;var f=a?1:-1;return o>=ln[0]+e&&o<=ln[1]+e?f:0}if(n>i){var c=n;n=i,i=c}n<0&&(n+=Ru,i+=Ru);for(var p=0,h=0;h<2;h++){var d=ln[h];if(d+e>o){var m=Math.atan2(s,d),f=a?1:-1;m<0&&(m=Ru+m),(m>=n&&m<=i||m+Ru>=n&&m+Ru<=i)&&(m>Math.PI/2&&m1&&(r||(s+=Ti(l,u,f,c,n,i))),v&&(l=a[d],u=a[d+1],f=l,c=u),m){case Hs.M:f=a[d++],c=a[d++],l=f,u=c;break;case Hs.L:if(r){if(qa(l,u,a[d],a[d+1],t,n,i))return!0}else s+=Ti(l,u,a[d],a[d+1],n,i)||0;l=a[d++],u=a[d++];break;case Hs.C:if(r){if(oz(l,u,a[d++],a[d++],a[d++],a[d++],a[d],a[d+1],t,n,i))return!0}else s+=dnt(l,u,a[d++],a[d++],a[d++],a[d++],a[d],a[d+1],n,i)||0;l=a[d++],u=a[d++];break;case Hs.Q:if(r){if(u0(l,u,a[d++],a[d++],a[d],a[d+1],t,n,i))return!0}else s+=vnt(l,u,a[d++],a[d++],a[d],a[d+1],n,i)||0;l=a[d++],u=a[d++];break;case Hs.A:var g=a[d++],y=a[d++],x=a[d++],_=a[d++],S=a[d++],b=a[d++];d+=1;var w=!!(1-a[d++]);p=Math.cos(S)*x+g,h=Math.sin(S)*_+y,v?(f=p,c=h):s+=Ti(l,u,p,h,n,i);var T=(n-g)*_/x+g;if(r){if(uz(g,y,_,S,S+b,w,t,T,i))return!0}else s+=mnt(g,y,_,S,S+b,w,T,i);l=Math.cos(S+b)*x+g,u=Math.sin(S+b)*_+y;break;case Hs.R:f=l=a[d++],c=u=a[d++];var M=a[d++],C=a[d++];if(p=f+M,h=c+C,r){if(qa(f,c,p,c,t,n,i)||qa(p,c,p,h,t,n,i)||qa(p,h,f,h,t,n,i)||qa(f,h,f,c,t,n,i))return!0}else s+=Ti(p,c,p,h,n,i),s+=Ti(f,h,f,c,n,i);break;case Hs.Z:if(r){if(qa(l,u,f,c,t,n,i))return!0}else s+=Ti(l,u,f,c,n,i);l=f,u=c;break}}return!r&&!pnt(u,c)&&(s+=Ti(l,u,f,c,n,i)||0),s!==0}function cz(e,t,r){return fz(e,0,!1,t,r)}function pz(e,t,r,n){return fz(e,t,!0,r,n)}var Wc=J({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Ha),ynt={style:J({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},Au.style)},fT=ri.concat(["invisible","culling","z","z2","zlevel","parent"]),xnt=function(e){N(t,e);function t(r){return e.call(this,r)||this}return t.prototype.update=function(){var r=this;e.prototype.update.call(this);var n=this.style;if(n.decal){var i=this._decalEl=this._decalEl||new t;i.buildPath===t.prototype.buildPath&&(i.buildPath=function(l){r.buildPath(l,r.shape)}),i.silent=!0;var a=i.style;for(var o in n)a[o]!==n[o]&&(a[o]=n[o]);a.fill=n.fill?n.decal:null,a.decal=null,a.shadowColor=null,n.strokeFirst&&(a.stroke=null);for(var s=0;s.5?Ed:n>.2?pO:Id}else if(r)return Id}return Ed},t.prototype.getInsideTextStroke=function(r){var n=this.style.fill;if(H(n)){var i=this.__zr,a=!!(i&&i.isDarkMode()),o=kc(r,0)0))},t.prototype.hasFill=function(){var r=this.style,n=r.fill;return n!=null&&n!=="none"},t.prototype.getBoundingRect=function(){var r=this._rect,n=this.style,i=!r;if(i){var a=!1;this.path||(a=!0,this.createPathProxy());var o=this.path;(a||this.__dirty&Ps)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),r=o.getBoundingRect()}if(this._rect=r,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=r.clone());if(this.__dirty||i){s.copy(r);var l=n.strokeNoScale?this.getLineScale():1,u=n.lineWidth;if(!this.hasFill()){var f=this.strokeContainThreshold;u=Math.max(u,f??4)}l>1e-10&&(s.width+=u/l,s.height+=u/l,s.x-=u/l/2,s.y-=u/l/2)}return s}return r},t.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect(),o=this.style;if(r=i[0],n=i[1],a.contain(r,n)){var s=this.path;if(this.hasStroke()){var l=o.lineWidth,u=o.strokeNoScale?this.getLineScale():1;if(u>1e-10&&(this.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),pz(s,l/u,r,n)))return!0}if(this.hasFill())return cz(s,r,n)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=Ps,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(r){return this.animate("shape",r)},t.prototype.updateDuringAnimation=function(r){r==="style"?this.dirtyStyle():r==="shape"?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(r,n){r==="shape"?this.setShape(n):e.prototype.attrKV.call(this,r,n)},t.prototype.setShape=function(r,n){var i=this.shape;return i||(i=this.shape={}),typeof r=="string"?i[r]=n:V(i,r),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&Ps)},t.prototype.createStyle=function(r){return Is(Wc,r)},t.prototype._innerSaveToNormal=function(r){e.prototype._innerSaveToNormal.call(this,r);var n=this._normalState;r.shape&&!n.shape&&(n.shape=V({},this.shape))},t.prototype._applyStateObj=function(r,n,i,a,o,s){e.prototype._applyStateObj.call(this,r,n,i,a,o,s);var l=!(n&&a),u;if(n&&n.shape?o?a?u=n.shape:(u=V({},i.shape),V(u,n.shape)):(u=V({},a?this.shape:i.shape),V(u,n.shape)):l&&(u=i.shape),u)if(o){this.shape=V({},this.shape);for(var f={},c=St(u),p=0;p0},t.prototype.hasFill=function(){var r=this.style,n=r.fill;return n!=null&&n!=="none"},t.prototype.createStyle=function(r){return Is(_nt,r)},t.prototype.setBoundingRect=function(r){this._rect=r},t.prototype.getBoundingRect=function(){var r=this.style;if(!this._rect){var n=r.text;n!=null?n+="":n="";var i=Ga(n,r.font,r.textAlign,r.textBaseline);if(i.x+=r.x||0,i.y+=r.y||0,this.hasStroke()){var a=r.lineWidth;i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a}this._rect=i}return this._rect},t.initDefaultProps=function(){var r=t.prototype;r.dirtyRectTolerance=10}(),t}(We);hz.prototype.type="tspan";var zo=hz;var bnt=J({x:0,y:0},Ha),Snt={style:J({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},Au.style)};function wnt(e){return!!(e&&typeof e!="string"&&e.width&&e.height)}var dz=function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createStyle=function(r){return Is(bnt,r)},t.prototype._getSize=function(r){var n=this.style,i=n[r];if(i!=null)return i;var a=wnt(n.image)?n.image:this.__image;if(!a)return 0;var o=r==="width"?"height":"width",s=n[o];return s==null?a[r]:a[r]/a[o]*s},t.prototype.getWidth=function(){return this._getSize("width")},t.prototype.getHeight=function(){return this._getSize("height")},t.prototype.getAnimationStyleProps=function(){return Snt},t.prototype.getBoundingRect=function(){var r=this.style;return this._rect||(this._rect=new dt(r.x||0,r.y||0,this.getWidth(),this.getHeight())),this._rect},t}(We);dz.prototype.type="image";var me=dz;function vz(e,t){var r=t.x,n=t.y,i=t.width,a=t.height,o=t.r,s,l,u,f;i<0&&(r=r+i,i=-i),a<0&&(n=n+a,a=-a),typeof o=="number"?s=l=u=f=o:o instanceof Array?o.length===1?s=l=u=f=o[0]:o.length===2?(s=u=o[0],l=f=o[1]):o.length===3?(s=o[0],l=f=o[1],u=o[2]):(s=o[0],l=o[1],u=o[2],f=o[3]):s=l=u=f=0;var c;s+l>i&&(c=s+l,s*=i/c,l*=i/c),u+f>i&&(c=u+f,u*=i/c,f*=i/c),l+u>a&&(c=l+u,l*=a/c,u*=a/c),s+f>a&&(c=s+f,s*=a/c,f*=a/c),e.moveTo(r+s,n),e.lineTo(r+i-l,n),l!==0&&e.arc(r+i-l,n+l,l,-Math.PI/2,0),e.lineTo(r+i,n+a-u),u!==0&&e.arc(r+i-u,n+a-u,u,0,Math.PI/2),e.lineTo(r+f,n+a),f!==0&&e.arc(r+f,n+a-f,f,Math.PI/2,Math.PI),e.lineTo(r,n+s),s!==0&&e.arc(r+s,n+s,s,Math.PI,Math.PI*1.5)}var Yc=Math.round;function f0(e,t,r){if(t){var n=t.x1,i=t.x2,a=t.y1,o=t.y2;e.x1=n,e.x2=i,e.y1=a,e.y2=o;var s=r&&r.lineWidth;return s&&(Yc(n*2)===Yc(i*2)&&(e.x1=e.x2=Ws(n,s,!0)),Yc(a*2)===Yc(o*2)&&(e.y1=e.y2=Ws(a,s,!0))),e}}function c0(e,t,r){if(t){var n=t.x,i=t.y,a=t.width,o=t.height;e.x=n,e.y=i,e.width=a,e.height=o;var s=r&&r.lineWidth;return s&&(e.x=Ws(n,s,!0),e.y=Ws(i,s,!0),e.width=Math.max(Ws(n+a,s,!1)-e.x,a===0?0:1),e.height=Math.max(Ws(i+o,s,!1)-e.y,o===0?0:1)),e}}function Ws(e,t,r){if(!t)return e;var n=Yc(e*2);return(n+Yc(t))%2===0?n/2:(n+(r?1:-1))/2}var Ant=function(){function e(){this.x=0,this.y=0,this.width=0,this.height=0}return e}();var Cnt={},mz=function(e){N(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new Ant},t.prototype.buildPath=function(r,n){var i,a,o,s;if(this.subPixelOptimize){var l=c0(Cnt,n,this.style);i=l.x,a=l.y,o=l.width,s=l.height,l.r=n.r,n=l}else i=n.x,a=n.y,o=n.width,s=n.height;n.r?vz(r,n):r.rect(i,a,o,s)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(vt);mz.prototype.type="rect";var At=mz;var gz={fill:"#000"},yz=2,Dnt={style:J({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},Au.style)},Az=function(e){N(t,e);function t(r){var n=e.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=gz,n.attr(r),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){e.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var r=0;r0,P=r.width!=null&&(r.overflow==="truncate"||r.overflow==="break"||r.overflow==="breakAll"),L=o.calculatedLineHeight,I=0;I=0&&(I=b[L],I.align==="right");)this._placeToken(I,r,T,g,P,"right",x),M-=I.width,P-=I.width,L--;for(A+=(a-(A-v)-(y-P)-M)/2;C<=L;)I=b[C],this._placeToken(I,r,T,g,A+I.width/2,"center",x),A+=I.width,C++;g+=T}},t.prototype._placeToken=function(r,n,i,a,o,s,l){var u=n.rich[r.styleName]||{};u.text=r.text;var f=r.verticalAlign,c=a+i/2;f==="top"?c=a+r.height/2:f==="bottom"&&(c=a+i-r.height/2);var p=!r.isLineHolder&&cT(u);p&&this._renderBackground(u,n,s==="right"?o-r.width:s==="center"?o-r.width/2:o,c-r.height/2,r.width,r.height);var h=!!u.backgroundColor,d=r.textPadding;d&&(o=Tz(o,s,d),c-=r.height/2-d[0]-r.innerHeight/2);var m=this._getOrCreateChild(zo),v=m.createStyle();m.useStyle(v);var g=this._defaultStyle,y=!1,x=0,_=wz("fill"in u?u.fill:"fill"in n?n.fill:(y=!0,g.fill)),S=Sz("stroke"in u?u.stroke:"stroke"in n?n.stroke:!h&&!l&&(!g.autoStroke||y)?(x=yz,g.stroke):null),b=u.textShadowBlur>0||n.textShadowBlur>0;v.text=r.text,v.x=o,v.y=c,b&&(v.shadowBlur=u.textShadowBlur||n.textShadowBlur||0,v.shadowColor=u.textShadowColor||n.textShadowColor||"transparent",v.shadowOffsetX=u.textShadowOffsetX||n.textShadowOffsetX||0,v.shadowOffsetY=u.textShadowOffsetY||n.textShadowOffsetY||0),v.textAlign=s,v.textBaseline="middle",v.font=r.font||Qn,v.opacity=cr(u.opacity,n.opacity,1),_z(v,u),S&&(v.lineWidth=cr(u.lineWidth,n.lineWidth,x),v.lineDash=bt(u.lineDash,n.lineDash),v.lineDashOffset=n.lineDashOffset||0,v.stroke=S),_&&(v.fill=_);var w=r.contentWidth,T=r.contentHeight;m.setBoundingRect(new dt(zc(v.x,w,v.textAlign),wu(v.y,T,v.textBaseline),w,T))},t.prototype._renderBackground=function(r,n,i,a,o,s){var l=r.backgroundColor,u=r.borderWidth,f=r.borderColor,c=l&&l.image,p=l&&!c,h=r.borderRadius,d=this,m,v;if(p||r.lineHeight||u&&f){m=this._getOrCreateChild(At),m.useStyle(m.createStyle()),m.style.fill=null;var g=m.shape;g.x=i,g.y=a,g.width=o,g.height=s,g.r=h,m.dirtyShape()}if(p){var y=m.style;y.fill=l||null,y.fillOpacity=bt(r.fillOpacity,1)}else if(c){v=this._getOrCreateChild(me),v.onload=function(){d.dirtyStyle()};var x=v.style;x.image=l.image,x.x=i,x.y=a,x.width=o,x.height=s}if(u&&f){var y=m.style;y.lineWidth=u,y.stroke=f,y.strokeOpacity=bt(r.strokeOpacity,1),y.lineDash=r.borderDash,y.lineDashOffset=r.borderDashOffset||0,m.strokeContainThreshold=0,m.hasFill()&&m.hasStroke()&&(y.strokeFirst=!0,y.lineWidth*=2)}var _=(m||v).style;_.shadowBlur=r.shadowBlur||0,_.shadowColor=r.shadowColor||"transparent",_.shadowOffsetX=r.shadowOffsetX||0,_.shadowOffsetY=r.shadowOffsetY||0,_.opacity=cr(r.opacity,n.opacity,1)},t.makeFont=function(r){var n="";return hT(r)&&(n=[r.fontStyle,r.fontWeight,pT(r.fontSize),r.fontFamily||"sans-serif"].join(" ")),n&&pr(n)||r.textFont||r.font},t}(We),Ent={left:!0,right:1,center:1},Int={top:1,bottom:1,middle:1},xz=["fontStyle","fontWeight","fontSize","fontFamily"];function pT(e){return typeof e=="string"&&(e.indexOf("px")!==-1||e.indexOf("rem")!==-1||e.indexOf("em")!==-1)?e:isNaN(+e)?fy+"px":e+"px"}function _z(e,t){for(var r=0;r=0,a=!1;if(e instanceof vt){var o=kz(e),s=i&&o.selectFill||o.normalFill,l=i&&o.selectStroke||o.normalStroke;if(Xc(s)||Xc(l)){n=n||{};var u=n.style||{};u.fill==="inherit"?(a=!0,n=V({},n),u=V({},u),u.fill=s):!Xc(u.fill)&&Xc(s)?(a=!0,n=V({},n),u=V({},u),u.fill=Iz(s)):!Xc(u.stroke)&&Xc(l)&&(a||(n=V({},n),u=V({},u)),u.stroke=Iz(l)),n.style=u}}if(n&&n.z2==null){a||(n=V({},n));var f=e.z2EmphasisLift;n.z2=e.z2+(f??Uo)}return n}function znt(e,t,r){if(r&&r.z2==null){r=V({},r);var n=e.z2SelectLift;r.z2=e.z2+(n??Pnt)}return r}function Unt(e,t,r){var n=gt(e.currentStates,t)>=0,i=e.style.opacity,a=n?null:knt(e,["opacity"],t,{opacity:1});r=r||{};var o=r.style||{};return o.opacity==null&&(r=V({},r),o=V({opacity:n?i:a.opacity*.1},o),r.style=o),r}function dT(e,t){var r=this.states[e];if(this.style){if(e==="emphasis")return Ont(this,e,t,r);if(e==="blur")return Unt(this,e,r);if(e==="select")return znt(this,e,r)}return r}function na(e){e.stateProxy=dT;var t=e.getTextContent(),r=e.getTextGuideLine();t&&(t.stateProxy=dT),r&&(r.stateProxy=dT)}function Pz(e,t){!Vz(e,t)&&!e.__highByOuter&&Vo(e,Oz)}function Rz(e,t){!Vz(e,t)&&!e.__highByOuter&&Vo(e,zz)}function Yr(e,t){e.__highByOuter|=1<<(t||0),Vo(e,Oz)}function Xr(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&Vo(e,zz)}function d0(e){Vo(e,yT)}function Hd(e){Vo(e,Uz)}function xT(e){Vo(e,Rnt)}function _T(e){Vo(e,Nnt)}function Vz(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function bT(e){var t=e.getModel(),r=[],n=[];t.eachComponent(function(i,a){var o=mT(a),s=i==="series",l=s?e.getViewOfSeriesModel(a):e.getViewOfComponentModel(a);!s&&n.push(l),o.isBlured&&(l.group.traverse(function(u){Uz(u)}),s&&r.push(a)),o.isBlured=!1}),D(n,function(i){i&&i.toggleBlurSeries&&i.toggleBlurSeries(r,!1,t)})}function vT(e,t,r,n){var i=n.getModel();r=r||"coordinateSystem";function a(u,f){for(var c=0;c0){var l={dataIndex:s,seriesIndex:r.seriesIndex};o!=null&&(l.dataType=o),t.push(l)}})}),t}function Za(e,t,r){Bo(e,!0),Vo(e,na),m0(e,t,r)}function Vnt(e){Bo(e,!1)}function Zt(e,t,r,n){n?Vnt(e):Za(e,t,r)}function m0(e,t,r){var n=ht(e);t!=null?(n.focus=t,n.blurScope=r):n.focus&&(n.focus=null)}var Nz=["emphasis","blur","select"],Bnt={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function we(e,t,r,n){r=r||"itemStyle";for(var i=0;iZd,BezierCurve:()=>Uu,BoundingRect:()=>dt,Circle:()=>Sr,CompoundPath:()=>Qc,Ellipse:()=>Yd,Group:()=>nt,Image:()=>me,IncrementalDisplayable:()=>g5,Line:()=>De,LinearGradient:()=>$a,OrientedBoundingRect:()=>Jc,Path:()=>vt,Point:()=>kt,Polygon:()=>Re,Polyline:()=>Ie,RadialGradient:()=>M0,Rect:()=>At,Ring:()=>zu,Sector:()=>Ye,Text:()=>Lt,applyTransform:()=>Or,clipPointsByRect:()=>PT,clipRectByRect:()=>xit,createIcon:()=>Yo,extendPath:()=>mit,extendShape:()=>dit,getShapeClass:()=>Kd,getTransform:()=>oa,groupTransition:()=>Wo,initProps:()=>Kt,isElementRemoved:()=>Fo,lineLineIntersect:()=>M5,linePolygonIntersect:()=>ep,makeImage:()=>LT,makePath:()=>tp,mergePath:()=>Zr,registerShape:()=>aa,removeElement:()=>Ai,removeElementWithFadeOut:()=>Go,resizePath:()=>T5,setTooltipConfig:()=>sa,subPixelOptimize:()=>$d,subPixelOptimizeLine:()=>Ho,subPixelOptimizeRect:()=>git,transformDirection:()=>Fu,traverseElements:()=>un,updateProps:()=>Rt});var Kc=mr.CMD,Fnt=[[],[],[]],Zz=Math.sqrt,Gnt=Math.atan2;function y0(e,t){if(t){var r=e.data,n=e.len(),i,a,o,s,l,u,f=Kc.M,c=Kc.C,p=Kc.L,h=Kc.R,d=Kc.A,m=Kc.Q;for(o=0,s=0;o1&&(o*=TT(d),s*=TT(d));var m=(i===a?-1:1)*TT((o*o*(s*s)-o*o*(h*h)-s*s*(p*p))/(o*o*(h*h)+s*s*(p*p)))||0,v=m*o*h/s,g=m*-s*p/o,y=(e+r)/2+_0(c)*v-x0(c)*g,x=(t+n)/2+x0(c)*v+_0(c)*g,_=$z([1,0],[(p-v)/o,(h-g)/s]),S=[(p-v)/o,(h-g)/s],b=[(-1*p-v)/o,(-1*h-g)/s],w=$z(S,b);if(MT(S,b)<=-1&&(w=Wd),MT(S,b)>=1&&(w=0),w<0){var T=Math.round(w/Wd*1e6)/1e6;w=Wd*2+T%2*Wd}f.addData(u,y,x,o,s,_,w,c,a)}var Hnt=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,Wnt=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Ynt(e){var t=new mr;if(!e)return t;var r=0,n=0,i=r,a=n,o,s=mr.CMD,l=e.match(Hnt);if(!l)return t;for(var u=0;uI*I+E*E&&(T=C,M=A),{cx:T,cy:M,x0:-f,y0:-c,x1:T*(i/S-1),y1:M*(i/S-1)}}function jnt(e){var t;if(B(e)){var r=e.length;if(!r)return e;r===1?t=[e[0],e[0],0,0]:r===2?t=[e[0],e[0],e[1],e[1]]:r===3?t=e.concat(e[2]):t=e}else t=[e,e,e,e];return t}function s5(e,t){var r,n=Xd(t.r,0),i=Xd(t.r0||0,0),a=n>0,o=i>0;if(!(!a&&!o)){if(a||(n=i,i=0),i>n){var s=n;n=i,i=s}var l=t.startAngle,u=t.endAngle;if(!(isNaN(l)||isNaN(u))){var f=t.cx,c=t.cy,p=!!t.clockwise,h=a5(u-l),d=h>AT&&h%AT;if(d>ia&&(h=d),!(n>ia))e.moveTo(f,c);else if(h>AT-ia)e.moveTo(f+n*jc(l),c+n*Ou(l)),e.arc(f,c,n,l,u,!p),i>ia&&(e.moveTo(f+i*jc(u),c+i*Ou(u)),e.arc(f,c,i,u,l,p));else{var m=void 0,v=void 0,g=void 0,y=void 0,x=void 0,_=void 0,S=void 0,b=void 0,w=void 0,T=void 0,M=void 0,C=void 0,A=void 0,P=void 0,L=void 0,I=void 0,E=n*jc(l),R=n*Ou(l),k=i*jc(u),O=i*Ou(u),z=h>ia;if(z){var U=t.cornerRadius;U&&(r=jnt(U),m=r[0],v=r[1],g=r[2],y=r[3]);var G=a5(n-i)/2;if(x=Ka(G,g),_=Ka(G,y),S=Ka(G,m),b=Ka(G,v),M=w=Xd(x,_),C=T=Xd(S,b),(w>ia||T>ia)&&(A=n*jc(u),P=n*Ou(u),L=i*jc(l),I=i*Ou(l),hia){var K=Ka(g,M),ot=Ka(y,M),Q=S0(L,I,E,R,n,K,p),W=S0(A,P,k,O,n,ot,p);e.moveTo(f+Q.cx+Q.x0,c+Q.cy+Q.y0),M0&&e.arc(f+Q.cx,c+Q.cy,K,qr(Q.y0,Q.x0),qr(Q.y1,Q.x1),!p),e.arc(f,c,n,qr(Q.cy+Q.y1,Q.cx+Q.x1),qr(W.cy+W.y1,W.cx+W.x1),!p),ot>0&&e.arc(f+W.cx,c+W.cy,ot,qr(W.y1,W.x1),qr(W.y0,W.x0),!p))}else e.moveTo(f+E,c+R),e.arc(f,c,n,l,u,!p);if(!(i>ia)||!z)e.lineTo(f+k,c+O);else if(C>ia){var K=Ka(m,C),ot=Ka(v,C),Q=S0(k,O,A,P,i,-ot,p),W=S0(E,R,L,I,i,-K,p);e.lineTo(f+Q.cx+Q.x0,c+Q.cy+Q.y0),C0&&e.arc(f+Q.cx,c+Q.cy,ot,qr(Q.y0,Q.x0),qr(Q.y1,Q.x1),!p),e.arc(f,c,i,qr(Q.cy+Q.y1,Q.cx+Q.x1),qr(W.cy+W.y1,W.cx+W.x1),p),K>0&&e.arc(f+W.cx,c+W.cy,K,qr(W.y1,W.x1),qr(W.y0,W.x0),!p))}else e.lineTo(f+k,c+O),e.arc(f,c,i,u,l,p)}e.closePath()}}}var Jnt=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return e}();var l5=function(e){N(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new Jnt},t.prototype.buildPath=function(r,n){s5(r,n)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(vt);l5.prototype.type="sector";var Ye=l5;var tit=function(){function e(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return e}();var u5=function(e){N(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new tit},t.prototype.buildPath=function(r,n){var i=n.cx,a=n.cy,o=Math.PI*2;r.moveTo(i+n.r,a),r.arc(i,a,n.r,0,o,!1),r.moveTo(i+n.r0,a),r.arc(i,a,n.r0,0,o,!0)},t}(vt);u5.prototype.type="ring";var zu=u5;function CT(e,t,r,n){var i=[],a=[],o=[],s=[],l,u,f,c;if(n){f=[1/0,1/0],c=[-1/0,-1/0];for(var p=0,h=e.length;p=2){if(n){var a=CT(i,n,r,t.smoothConstraint);e.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(r?o:o-1);s++){var l=a[s*2],u=a[s*2+1],f=i[(s+1)%o];e.bezierCurveTo(l[0],l[1],u[0],u[1],f[0],f[1])}}else{e.moveTo(i[0][0],i[0][1]);for(var s=1,c=i.length;sBu[1]){if(s=!1,a)return s;var f=Math.abs(Bu[0]-Vu[1]),c=Math.abs(Vu[0]-Bu[1]);Math.min(f,c)>i.len()&&(f0){var c=f.duration,p=f.delay,h=f.easing,d={duration:c,delay:p||0,easing:h,done:a,force:!!a||!!o,setToFinal:!u,scope:e,during:o};s?t.animateFrom(r,d):t.animateTo(r,d)}else t.stopAnimation(),!s&&t.attr(r),o&&o(1),a&&a()}function Rt(e,t,r,n,i,a){DT("update",e,t,r,n,i,a)}function Kt(e,t,r,n,i,a){DT("enter",e,t,r,n,i,a)}function Fo(e){if(!e.__zr)return!0;for(var t=0;tMath.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function b5(e){return!e.isGroup}function yit(e){return e.shape!=null}function Wo(e,t,r){if(!e||!t)return;function n(o){var s={};return o.traverse(function(l){b5(l)&&l.anid&&(s[l.anid]=l)}),s}function i(o){var s={x:o.x,y:o.y,rotation:o.rotation};return yit(o)&&(s.shape=V({},o.shape)),s}var a=n(e);t.traverse(function(o){if(b5(o)&&o.anid){var s=a[o.anid];if(s){var l=i(o);o.attr(i(s)),Rt(o,l,r,ht(o).dataIndex)}}})}function PT(e,t){return F(e,function(r){var n=r[0];n=D0(n,t.x),n=E0(n,t.x+t.width);var i=r[1];return i=D0(i,t.y),i=E0(i,t.y+t.height),[n,i]})}function xit(e,t){var r=D0(e.x,t.x),n=E0(e.x+e.width,t.x+t.width),i=D0(e.y,t.y),a=E0(e.y+e.height,t.y+t.height);if(n>=r&&a>=i)return{x:r,y:i,width:n-r,height:a-i}}function Yo(e,t,r){var n=V({rectHover:!0},t),i=n.style={strokeNoScale:!0};if(r=r||{x:-1,y:-1,width:2,height:2},e)return e.indexOf("image://")===0?(i.image=e.slice(8),J(i,r),new me(n)):tp(e.replace("path://",""),n,r,"center")}function ep(e,t,r,n,i){for(var a=0,o=i[i.length-1];a1)return!1;var v=ET(h,d,f,c)/p;return!(v<0||v>1)}function ET(e,t,r,n){return e*n-r*t}function _it(e){return e<=1e-6&&e>=-1e-6}function sa(e){var t=e.itemTooltipOption,r=e.componentModel,n=e.itemName,i=H(t)?{formatter:t}:t,a=r.mainType,o=r.componentIndex,s={componentType:a,name:n,$vars:["name"]};s[a+"Index"]=o;var l=e.formatterParamsExtra;l&&D(St(l),function(f){st(s,f)||(s[f]=l[f],s.$vars.push(f))});var u=ht(e.el);u.componentMainType=a,u.componentIndex=o,u.tooltipConfig={name:n,option:J({content:n,formatterParams:s},i)}}function S5(e,t){var r;e.isGroup&&(r=t(e)),r||e.traverse(t)}function un(e,t){if(e)if(B(e))for(var r=0;r=0&&s.push(l)}),s}}function Kr(e,t){return _t(_t({},e,!0),t,!0)}var O5={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:". "}}}};var z5={time:{month:["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"],monthAbbr:["1\u6708","2\u6708","3\u6708","4\u6708","5\u6708","6\u6708","7\u6708","8\u6708","9\u6708","10\u6708","11\u6708","12\u6708"],dayOfWeek:["\u661F\u671F\u65E5","\u661F\u671F\u4E00","\u661F\u671F\u4E8C","\u661F\u671F\u4E09","\u661F\u671F\u56DB","\u661F\u671F\u4E94","\u661F\u671F\u516D"],dayOfWeekAbbr:["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"]},legend:{selector:{all:"\u5168\u9009",inverse:"\u53CD\u9009"}},toolbox:{brush:{title:{rect:"\u77E9\u5F62\u9009\u62E9",polygon:"\u5708\u9009",lineX:"\u6A2A\u5411\u9009\u62E9",lineY:"\u7EB5\u5411\u9009\u62E9",keep:"\u4FDD\u6301\u9009\u62E9",clear:"\u6E05\u9664\u9009\u62E9"}},dataView:{title:"\u6570\u636E\u89C6\u56FE",lang:["\u6570\u636E\u89C6\u56FE","\u5173\u95ED","\u5237\u65B0"]},dataZoom:{title:{zoom:"\u533A\u57DF\u7F29\u653E",back:"\u533A\u57DF\u7F29\u653E\u8FD8\u539F"}},magicType:{title:{line:"\u5207\u6362\u4E3A\u6298\u7EBF\u56FE",bar:"\u5207\u6362\u4E3A\u67F1\u72B6\u56FE",stack:"\u5207\u6362\u4E3A\u5806\u53E0",tiled:"\u5207\u6362\u4E3A\u5E73\u94FA"}},restore:{title:"\u8FD8\u539F"},saveAsImage:{title:"\u4FDD\u5B58\u4E3A\u56FE\u7247",lang:["\u53F3\u952E\u53E6\u5B58\u4E3A\u56FE\u7247"]}},series:{typeNames:{pie:"\u997C\u56FE",bar:"\u67F1\u72B6\u56FE",line:"\u6298\u7EBF\u56FE",scatter:"\u6563\u70B9\u56FE",effectScatter:"\u6D9F\u6F2A\u6563\u70B9\u56FE",radar:"\u96F7\u8FBE\u56FE",tree:"\u6811\u56FE",treemap:"\u77E9\u5F62\u6811\u56FE",boxplot:"\u7BB1\u578B\u56FE",candlestick:"K\u7EBF\u56FE",k:"K\u7EBF\u56FE",heatmap:"\u70ED\u529B\u56FE",map:"\u5730\u56FE",parallel:"\u5E73\u884C\u5750\u6807\u56FE",lines:"\u7EBF\u56FE",graph:"\u5173\u7CFB\u56FE",sankey:"\u6851\u57FA\u56FE",funnel:"\u6F0F\u6597\u56FE",gauge:"\u4EEA\u8868\u76D8\u56FE",pictorialBar:"\u8C61\u5F62\u67F1\u56FE",themeRiver:"\u4E3B\u9898\u6CB3\u6D41\u56FE",sunburst:"\u65ED\u65E5\u56FE"}},aria:{general:{withTitle:"\u8FD9\u662F\u4E00\u4E2A\u5173\u4E8E\u201C{title}\u201D\u7684\u56FE\u8868\u3002",withoutTitle:"\u8FD9\u662F\u4E00\u4E2A\u56FE\u8868\uFF0C"},series:{single:{prefix:"",withName:"\u56FE\u8868\u7C7B\u578B\u662F{seriesType}\uFF0C\u8868\u793A{seriesName}\u3002",withoutName:"\u56FE\u8868\u7C7B\u578B\u662F{seriesType}\u3002"},multiple:{prefix:"\u5B83\u7531{seriesCount}\u4E2A\u56FE\u8868\u7CFB\u5217\u7EC4\u6210\u3002",withName:"\u7B2C{seriesId}\u4E2A\u7CFB\u5217\u662F\u4E00\u4E2A\u8868\u793A{seriesName}\u7684{seriesType}\uFF0C",withoutName:"\u7B2C{seriesId}\u4E2A\u7CFB\u5217\u662F\u4E00\u4E2A{seriesType}\uFF0C",separator:{middle:"\uFF1B",end:"\u3002"}}},data:{allData:"\u5176\u6570\u636E\u662F\u2014\u2014",partialData:"\u5176\u4E2D\uFF0C\u524D{displayCnt}\u9879\u662F\u2014\u2014",withName:"{name}\u7684\u6570\u636E\u662F{value}",withoutName:"{value}",separator:{middle:"\uFF0C",end:""}}}};var k0="ZH",VT="EN",Qd=VT,N0={},BT={},O0=Ot.domSupported?function(){var e=(document.documentElement.lang||navigator.language||navigator.browserLanguage).toUpperCase();return e.indexOf(k0)>-1?k0:Qd}():Qd;function U5(e,t){e=e.toUpperCase(),BT[e]=new Ht(t),N0[e]=t}function V5(e){if(H(e)){var t=N0[e.toUpperCase()]||{};return e===k0||e===VT?at(t):_t(at(t),at(N0[Qd]),!1)}else return _t(at(e),at(N0[Qd]),!1)}function Jd(e){return BT[e]}function B5(){return BT[Qd]}U5(VT,O5);U5(k0,z5);var U0=1e3,V0=U0*60,np=V0*60,ii=np*24,GT=ii*365,tv={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},z0="{yyyy}-{MM}-{dd}",HT={year:"{yyyy}",month:"{yyyy}-{MM}",day:z0,hour:z0+" "+tv.hour,minute:z0+" "+tv.minute,second:z0+" "+tv.second,millisecond:tv.none},FT=["year","month","day","hour","minute","second","millisecond"],WT=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function qo(e,t){return e+="","0000".substr(0,t-e.length)+e}function Wu(e){switch(e){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return e}}function F5(e){return e===Wu(e)}function G5(e){switch(e){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function Yu(e,t,r,n){var i=on(e),a=i[B0(r)](),o=i[Hu(r)]()+1,s=Math.floor((o-1)/3)+1,l=i[ev(r)](),u=i["get"+(r?"UTC":"")+"Day"](),f=i[rp(r)](),c=(f-1)%12+1,p=i[rv(r)](),h=i[nv(r)](),d=i[iv(r)](),m=n instanceof Ht?n:Jd(n||O0)||B5(),v=m.getModel("time"),g=v.get("month"),y=v.get("monthAbbr"),x=v.get("dayOfWeek"),_=v.get("dayOfWeekAbbr");return(t||"").replace(/{yyyy}/g,a+"").replace(/{yy}/g,qo(a%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,g[o-1]).replace(/{MMM}/g,y[o-1]).replace(/{MM}/g,qo(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,qo(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,x[u]).replace(/{ee}/g,_[u]).replace(/{e}/g,u+"").replace(/{HH}/g,qo(f,2)).replace(/{H}/g,f+"").replace(/{hh}/g,qo(c+"",2)).replace(/{h}/g,c+"").replace(/{mm}/g,qo(p,2)).replace(/{m}/g,p+"").replace(/{ss}/g,qo(h,2)).replace(/{s}/g,h+"").replace(/{SSS}/g,qo(d,3)).replace(/{S}/g,d+"")}function H5(e,t,r,n,i){var a=null;if(H(r))a=r;else if(j(r))a=r(e.value,t,{level:e.level});else{var o=V({},tv);if(e.level>0)for(var s=0;s=0;--s)if(l[u]){a=l[u];break}a=a||o.none}if(B(a)){var c=e.level==null?0:e.level>=0?e.level:a.length+e.level;c=Math.min(c,a.length-1),a=a[c]}}return Yu(new Date(e.value),a,i,n)}function W5(e,t){var r=on(e),n=r[Hu(t)]()+1,i=r[ev(t)](),a=r[rp(t)](),o=r[rv(t)](),s=r[nv(t)](),l=r[iv(t)](),u=l===0,f=u&&s===0,c=f&&o===0,p=c&&a===0,h=p&&i===1,d=h&&n===1;return d?"year":h?"month":p?"day":c?"hour":f?"minute":u?"second":"millisecond"}function YT(e,t,r){var n=Ct(e)?on(e):e;switch(t=t||W5(e,r),t){case"year":return n[B0(r)]();case"half-year":return n[Hu(r)]()>=6?1:0;case"quarter":return Math.floor((n[Hu(r)]()+1)/4);case"month":return n[Hu(r)]();case"day":return n[ev(r)]();case"half-day":return n[rp(r)]()/24;case"hour":return n[rp(r)]();case"minute":return n[rv(r)]();case"second":return n[nv(r)]();case"millisecond":return n[iv(r)]()}}function B0(e){return e?"getUTCFullYear":"getFullYear"}function Hu(e){return e?"getUTCMonth":"getMonth"}function ev(e){return e?"getUTCDate":"getDate"}function rp(e){return e?"getUTCHours":"getHours"}function rv(e){return e?"getUTCMinutes":"getMinutes"}function nv(e){return e?"getUTCSeconds":"getSeconds"}function iv(e){return e?"getUTCMilliseconds":"getMilliseconds"}function Y5(e){return e?"setUTCFullYear":"setFullYear"}function XT(e){return e?"setUTCMonth":"setMonth"}function qT(e){return e?"setUTCDate":"setDate"}function ZT(e){return e?"setUTCHours":"setHours"}function KT(e){return e?"setUTCMinutes":"setMinutes"}function $T(e){return e?"setUTCSeconds":"setSeconds"}function jT(e){return e?"setUTCMilliseconds":"setMilliseconds"}function JT(e){if(!Pd(e))return H(e)?e:"-";var t=(e+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function F0(e,t){return e=(e||"").toLowerCase().replace(/-(.)/g,function(r,n){return n.toUpperCase()}),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}var la=Mc;function G0(e,t,r){var n="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function i(f){return f&&pr(f)?f:"-"}function a(f){return!!(f!=null&&!isNaN(f)&&isFinite(f))}var o=t==="time",s=e instanceof Date;if(o||s){var l=o?on(e):e;if(isNaN(+l)){if(s)return"-"}else return Yu(l,n,r)}if(t==="ordinal")return fd(e)?i(e):Ct(e)&&a(e)?e+"":"-";var u=Si(e);return a(u)?JT(u):fd(e)?i(e):typeof e=="boolean"?e+"":"-"}var X5=["a","b","c","d","e","f","g"],QT=function(e,t){return"{"+e+(t??"")+"}"};function H0(e,t,r){B(t)||(t=[t]);var n=t.length;if(!n)return"";for(var i=t[0].$vars||[],a=0;a':'';var o=r.markerId||"markerX";return{renderMode:a,content:"{"+o+"|} ",style:i==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:n}:{width:10,height:10,borderRadius:5,backgroundColor:n}}}function ua(e,t){return t=t||"transparent",H(e)?e:rt(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}function Xu(e,t){if(t==="_blank"||t==="blank"){var r=window.open();r.opener=null,r.location.href=e}else window.open(e,t)}var W0=D,tM=["left","right","top","bottom","width","height"],qu=[["width","left","right"],["height","top","bottom"]];function eM(e,t,r,n,i){var a=0,o=0;n==null&&(n=1/0),i==null&&(i=1/0);var s=0;t.eachChild(function(l,u){var f=l.getBoundingRect(),c=t.childAt(u+1),p=c&&c.getBoundingRect(),h,d;if(e==="horizontal"){var m=f.width+(p?-p.x+f.x:0);h=a+m,h>n||l.newline?(a=0,h=m,o+=s+r,s=f.height):s=Math.max(s,f.height)}else{var v=f.height+(p?-p.y+f.y:0);d=o+v,d>i||l.newline?(a+=s+r,o=0,d=v,s=f.width):s=Math.max(s,f.width)}l.newline||(l.x=a,l.y=o,l.markRedraw(),e==="horizontal"?a=h+r:o=d+r)})}var fa=eM,CDt=pt(eM,"vertical"),DDt=pt(eM,"horizontal");function K5(e,t,r){var n=t.width,i=t.height,a=q(e.left,n),o=q(e.top,i),s=q(e.right,n),l=q(e.bottom,i);return(isNaN(a)||isNaN(parseFloat(e.left)))&&(a=0),(isNaN(s)||isNaN(parseFloat(e.right)))&&(s=n),(isNaN(o)||isNaN(parseFloat(e.top)))&&(o=0),(isNaN(l)||isNaN(parseFloat(e.bottom)))&&(l=i),r=la(r||0),{width:Math.max(s-a-r[1]-r[3],0),height:Math.max(l-o-r[0]-r[2],0)}}function re(e,t,r){r=la(r||0);var n=t.width,i=t.height,a=q(e.left,n),o=q(e.top,i),s=q(e.right,n),l=q(e.bottom,i),u=q(e.width,n),f=q(e.height,i),c=r[2]+r[0],p=r[1]+r[3],h=e.aspect;switch(isNaN(u)&&(u=n-s-p-a),isNaN(f)&&(f=i-l-c-o),h!=null&&(isNaN(u)&&isNaN(f)&&(h>n/i?u=n*.8:f=i*.8),isNaN(u)&&(u=h*f),isNaN(f)&&(f=u/h)),isNaN(a)&&(a=n-s-u-p),isNaN(o)&&(o=i-l-f-c),e.left||e.right){case"center":a=n/2-u/2-r[3];break;case"right":a=n-u-p;break}switch(e.top||e.bottom){case"middle":case"center":o=i/2-f/2-r[0];break;case"bottom":o=i-f-c;break}a=a||0,o=o||0,isNaN(u)&&(u=n-p-a-(s||0)),isNaN(f)&&(f=i-c-o-(l||0));var d=new dt(a+r[3],o+r[0],u,f);return d.margin=r,d}function Zs(e,t,r,n,i,a){var o=!i||!i.hv||i.hv[0],s=!i||!i.hv||i.hv[1],l=i&&i.boundingMode||"all";if(a=a||e,a.x=e.x,a.y=e.y,!o&&!s)return!1;var u;if(l==="raw")u=e.type==="group"?new dt(0,0,+t.width||0,+t.height||0):e.getBoundingRect();else if(u=e.getBoundingRect(),e.needLocalTransform()){var f=e.getLocalTransform();u=u.clone(),u.applyTransform(f)}var c=re(J({width:u.width,height:u.height},t),r,n),p=o?c.x-u.x:0,h=s?c.y-u.y:0;return l==="raw"?(a.x=p,a.y=h):(a.x+=p,a.y+=h),a===e&&e.markRedraw(),!0}function $5(e,t){return e[qu[t][0]]!=null||e[qu[t][1]]!=null&&e[qu[t][2]]!=null}function Ks(e){var t=e.layoutMode||e.constructor.layoutMode;return rt(t)?t:t?{type:t}:null}function On(e,t,r){var n=r&&r.ignoreSize;!B(n)&&(n=[n,n]);var i=o(qu[0],0),a=o(qu[1],1);u(qu[0],e,i),u(qu[1],e,a);function o(f,c){var p={},h=0,d={},m=0,v=2;if(W0(f,function(x){d[x]=e[x]}),W0(f,function(x){s(t,x)&&(p[x]=d[x]=t[x]),l(p,x)&&h++,l(d,x)&&m++}),n[c])return l(t,f[1])?d[f[2]]=null:l(t,f[2])&&(d[f[1]]=null),d;if(m===v||!h)return d;if(h>=v)return p;for(var g=0;g=0;l--)s=_t(s,i[l],!0);n.defaultOption=s}return n.defaultOption},t.prototype.getReferringComponents=function(r,n){var i=r+"Index",a=r+"Id";return Vs(this.ecModel,r,{index:this.get(i,!0),id:this.get(a,!0)},n)},t.prototype.getBoxLayoutParams=function(){var r=this;return{left:r.get("left"),top:r.get("top"),right:r.get("right"),bottom:r.get("bottom"),width:r.get("width"),height:r.get("height")}},t.prototype.getZLevelKey=function(){return""},t.prototype.setZLevel=function(r){this.option.zlevel=r},t.protoInitialize=function(){var r=t.prototype;r.type="component",r.id="",r.name="",r.mainType="",r.subType="",r.componentIndex=0}(),t}(Ht);a0(ip,Ht);Bs(ip);N5(ip);k5(ip,Iit);function Iit(e){var t=[];return D(ip.getClassesByMainType(e),function(r){t=t.concat(r.dependencies||r.prototype.dependencies||[])}),t=F(t,function(r){return Ln(r).main}),e!=="dataset"&>(t,"dataset")<=0&&t.unshift("dataset"),t}var Pt=ip;var j5="";typeof navigator<"u"&&(j5=navigator.platform||"");var ap="rgba(0, 0, 0, 0.2)",Q5={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:ap,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:ap,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:ap,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:ap,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:ap,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:ap,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:j5.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 Y0=$(["tooltip","label","itemName","itemId","itemGroupId","seriesName"]),wr="original",qe="arrayRows",Ur="objectRows",ai="keyedColumns",oi="typedArray",nM="unknown",zn="column",Zo="row";var gr={Must:1,Might:2,Not:3},J5=yt();function t3(e){J5(e).datasetMap=$()}function X0(e,t,r){var n={},i=q0(t);if(!i||!e)return n;var a=[],o=[],s=t.ecModel,l=J5(s).datasetMap,u=i.uid+"_"+r.seriesLayoutBy,f,c;e=e.slice(),D(e,function(m,v){var g=rt(m)?m:e[v]={name:m};g.type==="ordinal"&&f==null&&(f=v,c=d(g)),n[g.name]=[]});var p=l.get(u)||l.set(u,{categoryWayDim:c,valueWayDim:0});D(e,function(m,v){var g=m.name,y=d(m);if(f==null){var x=p.valueWayDim;h(n[g],x,y),h(o,x,y),p.valueWayDim+=y}else if(f===v)h(n[g],0,y),h(a,0,y);else{var x=p.categoryWayDim;h(n[g],x,y),h(o,x,y),p.categoryWayDim+=y}});function h(m,v,g){for(var y=0;yt)return e[n];return e[r-1]}function o3(e,t,r,n,i,a,o){a=a||e;var s=t(a),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(i))return u[i];var f=o==null||!n?r:Pit(n,o);if(f=f||r,!(!f||!f.length)){var c=f[l];return i&&(u[i]=c),s.paletteIdx=(l+1)%f.length,c}}function Rit(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}var K0,lv,s3,l3="\0_ec_inner",Nit=1;var p3=function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(r,n,i,a,o,s){a=a||{},this.option=null,this._theme=new Ht(a),this._locale=new Ht(o),this._optionManager=s},t.prototype.setOption=function(r,n,i){var a=c3(n);this._optionManager.setOption(r,i,a),this._resetOption(null,a)},t.prototype.resetOption=function(r,n){return this._resetOption(r,c3(n))},t.prototype._resetOption=function(r,n){var i=!1,a=this._optionManager;if(!r||r==="recreate"){var o=a.mountOption(r==="recreate");!this.option||r==="recreate"?s3(this,o):(this.restoreData(),this._mergeOption(o,n)),i=!0}if((r==="timeline"||r==="media")&&this.restoreData(),!r||r==="recreate"||r==="timeline"){var s=a.getTimelineOption(this);s&&(i=!0,this._mergeOption(s,n))}if(!r||r==="recreate"||r==="media"){var l=a.getMediaOption(this);l.length&&D(l,function(u){i=!0,this._mergeOption(u,n)},this)}return i},t.prototype.mergeOption=function(r){this._mergeOption(r,null)},t.prototype._mergeOption=function(r,n){var i=this.option,a=this._componentsMap,o=this._componentsCount,s=[],l=$(),u=n&&n.replaceMergeMainTypeMap;t3(this),D(r,function(c,p){c!=null&&(Pt.hasClass(p)?p&&(s.push(p),l.set(p,!0)):i[p]=i[p]==null?at(c):_t(i[p],c,!0))}),u&&u.each(function(c,p){Pt.hasClass(p)&&!l.get(p)&&(s.push(p),l.set(p,!0))}),Pt.topologicalTravel(s,Pt.getAllClassMainTypes(),f,this);function f(c){var p=i3(this,c,Yt(r[c])),h=a.get(c),d=h?u&&u.get(c)?"replaceMerge":"normalMerge":"replaceAll",m=n0(h,p,d);kO(m,c,Pt),i[c]=null,a.set(c,null),o.set(c,0);var v=[],g=[],y=0,x,_;D(m,function(S,b){var w=S.existing,T=S.newOption;if(!T)w&&(w.mergeOption({},this),w.optionUpdated({},!1));else{var M=c==="series",C=Pt.getClass(c,S.keyInfo.subType,!M);if(!C){if(!1)var A,P;return}if(c==="tooltip"){if(x)return;x=!0}if(w&&w.constructor===C)w.name=S.keyInfo.name,w.mergeOption(T,this),w.optionUpdated(T,!1);else{var L=V({componentIndex:b},S.keyInfo);w=new C(T,this,this,L),V(w,L),S.brandNew&&(w.__requireNewView=!0),w.init(T,this,this),w.optionUpdated(null,!0)}}w?(v.push(w.option),g.push(w),y++):(v.push(void 0),g.push(void 0))},this),i[c]=v,a.set(c,g),o.set(c,y),c==="series"&&K0(this)}this._seriesIndices||K0(this)},t.prototype.getOption=function(){var r=at(this.option);return D(r,function(n,i){if(Pt.hasClass(i)){for(var a=Yt(n),o=a.length,s=!1,l=o-1;l>=0;l--)a[l]&&!Bc(a[l])?s=!0:(a[l]=null,!s&&o--);a.length=o,r[i]=a}}),delete r[l3],r},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(r){this._payload=r},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(r,n){var i=this._componentsMap.get(r);if(i){var a=i[n||0];if(a)return a;if(n==null){for(var o=0;o=t:r==="max"?e<=t:e===t}function Yit(e,t){return e.join(",")===t.join(",")}var h3=Fit;var ca=D,fv=rt,d3=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function oM(e){var t=e&&e.itemStyle;if(t)for(var r=0,n=d3.length;r=0;v--){var g=e[v];if(s||(d=g.data.rawIndexOf(g.stackedByDimension,h)),d>=0){var y=g.data.getByRawIndex(g.stackResultDimension,d);if(l==="all"||l==="positive"&&y>0||l==="negative"&&y<0||l==="samesign"&&p>=0&&y>0||l==="samesign"&&p<=0&&y<0){p=TO(p,y),m=y;break}}}return n[0]=p,n[1]=m,n})})}var J0=function(){function e(t){this.data=t.data||(t.sourceFormat===ai?{}:[]),this.sourceFormat=t.sourceFormat||nM,this.seriesLayoutBy=t.seriesLayoutBy||zn,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var r=this.dimensionsDefine=t.dimensionsDefine;if(r)for(var n=0;nm&&(m=x)}h[0]=d,h[1]=m}},i=function(){return this._data?this._data.length/this._dimSize:0};w3=(t={},t[qe+"_"+zn]={pure:!0,appendData:a},t[qe+"_"+Zo]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},t[Ur]={pure:!0,appendData:a},t[ai]={pure:!0,appendData:function(o){var s=this._data;D(o,function(l,u){for(var f=s[u]||(s[u]=[]),c=0;c<(l||[]).length;c++)f.push(l[c])})}},t[wr]={appendData:a},t[oi]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},t);function a(o){for(var s=0;s=0&&(m=o.interpolatedValue[v])}return m!=null?m+"":""})}},e.prototype.getRawValue=function(t,r){return jo(this.getData(r),t)},e.prototype.formatTooltip=function(t,r,n){},e}();function mM(e){var t,r;return rt(e)?e.type&&(r=e):t=e,{text:t,frag:r}}function $s(e){return new aat(e)}var aat=function(){function e(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return e.prototype.perform=function(t){var r=this._upstream,n=t&&t.skip;if(this._dirty&&r){var i=this.context;i.data=i.outputData=r.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!n&&(a=this._plan(this.context));var o=f(this._modBy),s=this._modDataCount||0,l=f(t&&t.modBy),u=t&&t.modDataCount||0;(o!==l||s!==u)&&(a="reset");function f(y){return!(y>=1)&&(y=1),y}var c;(this._dirty||a==="reset")&&(this._dirty=!1,c=this._doReset(n)),this._modBy=l,this._modDataCount=u;var p=t&&t.step;if(r?this._dueEnd=r._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var h=this._dueIndex,d=Math.min(p!=null?this._dueIndex+p:1/0,this._dueEnd);if(!n&&(c||h1&&n>0?s:o}};return a;function o(){return t=e?null:lt},gte:function(e,t){return e>=t}},sat=function(){function e(t,r){if(!Ct(r)){var n="";jt(n)}this._opFn=D3[t],this._rvalFloat=Si(r)}return e.prototype.evaluate=function(t){return Ct(t)?this._opFn(t,this._rvalFloat):this._opFn(Si(t),this._rvalFloat)},e}(),nx=function(){function e(t,r){var n=t==="desc";this._resultLT=n?1:-1,r==null&&(r=n?"min":"max"),this._incomparable=r==="min"?-1/0:1/0}return e.prototype.evaluate=function(t,r){var n=Ct(t)?t:Si(t),i=Ct(r)?r:Si(r),a=isNaN(n),o=isNaN(i);if(a&&(n=this._incomparable),o&&(i=this._incomparable),a&&o){var s=H(t),l=H(r);s&&(n=l?t:0),l&&(i=s?r:0)}return ni?-this._resultLT:0},e}();var lat=function(){function e(t,r){this._rval=r,this._isEQ=t,this._rvalTypeof=typeof r,this._rvalFloat=Si(r)}return e.prototype.evaluate=function(t){var r=t===this._rval;if(!r){var n=typeof t;n!==this._rvalTypeof&&(n==="number"||this._rvalTypeof==="number")&&(r=Si(t)===this._rvalFloat)}return this._isEQ?r:!r},e}();function E3(e,t){return e==="eq"||e==="ne"?new lat(e==="eq",t):st(D3,e)?new sat(e,t):null}var uat=function(){function e(){}return e.prototype.getRawData=function(){throw new Error("not supported")},e.prototype.getRawDataItem=function(t){throw new Error("not supported")},e.prototype.cloneRawData=function(){},e.prototype.getDimensionInfo=function(t){},e.prototype.cloneAllDimensionInfo=function(){},e.prototype.count=function(){},e.prototype.retrieveValue=function(t,r){},e.prototype.retrieveValueFromItem=function(t,r){},e.prototype.convertValue=function(t,r){return Ii(t,r)},e}();function fat(e,t){var r=new uat,n=e.data,i=r.sourceFormat=e.sourceFormat,a=e.startIndex,o="";e.seriesLayoutBy!==zn&&jt(o);var s=[],l={},u=e.dimensionsDefine;if(u)D(u,function(m,v){var g=m.name,y={index:v,name:g,displayName:m.displayName};if(s.push(y),g!=null){var x="";st(l,g)&&jt(x),l[g]=y}});else for(var f=0;f65535?mat:gat}function fp(){return[1/0,-1/0]}function yat(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function N3(e,t,r,n,i){var a=k3[r||"float"];if(i){var o=e[t],s=o&&o.length;if(s!==n){for(var l=new a(n),u=0;uv[1]&&(v[1]=m)}return this._rawCount=this._count=l,{start:s,end:l}},e.prototype._initDataFromProvider=function(t,r,n){for(var i=this._provider,a=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=F(o,function(y){return y.property}),f=0;fg[1]&&(g[1]=v)}}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=r,this._extent=[]},e.prototype.count=function(){return this._count},e.prototype.get=function(t,r){if(!(r>=0&&r=0&&r=this._rawCount||t<0)return-1;if(!this._indices)return t;var r=this._indices,n=r[t];if(n!=null&&nt)a=o-1;else return o}return-1},e.prototype.indicesOfNearest=function(t,r,n){var i=this._chunks,a=i[t],o=[];if(!a)return o;n==null&&(n=1/0);for(var s=1/0,l=-1,u=0,f=0,c=this.count();f=0&&l<0)&&(s=d,l=h,u=0),h===l&&(o[u++]=f))}return o.length=u,o},e.prototype.getIndices=function(){var t,r=this._indices;if(r){var n=r.constructor,i=this._count;if(n===Array){t=new n(i);for(var a=0;a=c&&y<=p||isNaN(y))&&(l[u++]=m),m++}d=!0}else if(a===2){for(var v=h[i[0]],x=h[i[1]],_=t[i[1]][0],S=t[i[1]][1],g=0;g=c&&y<=p||isNaN(y))&&(b>=_&&b<=S||isNaN(b))&&(l[u++]=m),m++}d=!0}}if(!d)if(a===1)for(var g=0;g=c&&y<=p||isNaN(y))&&(l[u++]=w)}else for(var g=0;gt[C][1])&&(T=!1)}T&&(l[u++]=r.getRawIndex(g))}return ug[1]&&(g[1]=v)}}}},e.prototype.lttbDownSample=function(t,r){var n=this.clone([t],!0),i=n._chunks,a=i[t],o=this.count(),s=0,l=Math.floor(1/r),u=this.getRawIndex(0),f,c,p,h=new(hv(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));h[s++]=u;for(var d=1;df&&(f=c,p=_)}A>0&&Af-d&&(l=f-d,s.length=l);for(var m=0;mc[1]&&(c[1]=g),p[h++]=y}return a._count=h,a._indices=p,a._updateGetRawIdx(),a},e.prototype.each=function(t,r){if(this._count)for(var n=t.length,i=this._chunks,a=0,o=this.count();al&&(l=c)}return o=[s,l],this._extent[t]=o,o},e.prototype.getRawDataItem=function(t){var r=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(r);for(var n=[],i=this._chunks,a=0;a=0?this._indices[t]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=function(){function t(r,n,i,a){return Ii(r[a],this._dimensions[a])}yM={arrayRows:t,objectRows:function(r,n,i,a){return Ii(r[n],this._dimensions[a])},keyedColumns:t,original:function(r,n,i,a){var o=r&&(r.value==null?r:r.value);return Ii(o instanceof Array?o[a]:o,this._dimensions[a])},typedArray:function(r,n,i,a){return r[a]}}}(),e}(),dv=xat;var ox=function(){function e(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return e.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},e.prototype._setLocalSource=function(t,r){this._sourceList=t,this._upstreamSignList=r,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},e.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},e.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},e.prototype._createSource=function(){this._setLocalSource([],[]);var t=this._sourceHost,r=this._getUpstreamSourceManagers(),n=!!r.length,i,a;if(ax(t)){var o=t,s=void 0,l=void 0,u=void 0;if(n){var f=r[0];f.prepareSource(),u=f.getSource(),s=u.data,l=u.sourceFormat,a=[f._getVersionSign()]}else s=o.get("data",!0),l=Qe(s)?oi:wr,a=[];var c=this._getSourceMetaRawOption()||{},p=u&&u.metaRawOption||{},h=bt(c.seriesLayoutBy,p.seriesLayoutBy)||null,d=bt(c.sourceHeader,p.sourceHeader),m=bt(c.dimensions,p.dimensions),v=h!==p.seriesLayoutBy||!!d!=!!p.sourceHeader||m;i=v?[pv(s,{seriesLayoutBy:h,sourceHeader:d,dimensions:m},l)]:[]}else{var g=t;if(n){var y=this._applyTransform(r);i=y.sourceList,a=y.upstreamSignList}else{var x=g.get("source",!0);i=[pv(x,this._getSourceMetaRawOption(),null)],a=[]}}this._setLocalSource(i,a)},e.prototype._applyTransform=function(t){var r=this._sourceHost,n=r.get("transform",!0),i=r.get("fromTransformResult",!0);if(i!=null){var a="";t.length!==1&&O3(a)}var o,s=[],l=[];return D(t,function(u){u.prepareSource();var f=u.getSource(i||0),c="";i!=null&&!f&&O3(c),s.push(f),l.push(u._getVersionSign())}),n?o=P3(n,s,{datasetIndex:r.componentIndex}):i!=null&&(o=[S3(s[0])]),{sourceList:o,upstreamSignList:l}},e.prototype._isDirty=function(){if(this._dirty)return!0;for(var t=this._getUpstreamSourceManagers(),r=0;r{for(var r in t)fet(e,r,{get:t[r],enumerable:!0})};var Jw={};ud(Jw,{d3_sankey:()=>h2t,echarts:()=>p2t,html:()=>c2t,jinja2:()=>d2t});var e2=function(e,t){return e2=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},e2(e,t)};function N(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");e2(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var cet=function(){function e(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return e}(),pet=function(){function e(){this.browser=new cet,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<"u"}return e}(),nu=new pet;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(nu.wxa=!0,nu.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?nu.worker=!0:typeof navigator>"u"?(nu.node=!0,nu.svgSupported=!0):het(navigator.userAgent,nu);function het(e,t){var r=t.browser,n=e.match(/Firefox\/([\d.]+)/),i=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),a=e.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(e);n&&(r.firefox=!0,r.version=n[1]),i&&(r.ie=!0,r.version=i[1]),a&&(r.edge=!0,r.version=a[1],r.newEdge=+a[1].split(".")[0]>18),o&&(r.weChat=!0),t.svgSupported=typeof SVGRect<"u",t.touchEventsSupported="ontouchstart"in window&&!r.ie&&!r.edge,t.pointerEventsSupported="onpointerdown"in window&&(r.edge||r.ie&&+r.version>=11),t.domSupported=typeof document<"u";var s=document.documentElement.style;t.transform3dSupported=(r.ie&&"transition"in s||r.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),t.transformSupported=t.transform3dSupported||r.ie&&+r.version>=9}var Ot=nu;var fy=12,r2="sans-serif",Qn=fy+"px "+r2,det=20,vet=100,met="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function get(e){var t={};if(typeof JSON>"u")return t;for(var r=0;r=0)s=o*r.length;else for(var l=0;l>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",n[l]+":0",i[u]+":0",n[1-l]+":auto",i[1-u]+":auto",""].join("!important;"),e.appendChild(o),r.push(o)}return r}function Net(e,t,r){for(var n=r?"invTrans":"trans",i=t[n],a=t.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var f=e[u].getBoundingClientRect(),c=2*u,p=f.left,h=f.top;o.push(p,h),l=l&&a&&p===a[c]&&h===a[c+1],s.push(e[u].offsetLeft,e[u].offsetTop)}return l&&i?i:(t.srcCoords=o,t[n]=r?s2(s,o):s2(o,s))}function u2(e){return e.nodeName.toUpperCase()==="CANVAS"}var ket=/([&<>"'])/g,Oet={"&":"&","<":"<",">":">",'"':""","'":"'"};function Rr(e){return e==null?"":(e+"").replace(ket,function(t,r){return Oet[r]})}var zet=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,f2=[],Uet=Ot.browser.firefox&&+Ot.browser.version.split(".")[0]<39;function xy(e,t,r,n){return r=r||{},n?_k(e,t,r):Uet&&t.layerX!=null&&t.layerX!==t.offsetX?(r.zrX=t.layerX,r.zrY=t.layerY):t.offsetX!=null?(r.zrX=t.offsetX,r.zrY=t.offsetY):_k(e,t,r),r}function _k(e,t,r){if(Ot.domSupported&&e.getBoundingClientRect){var n=t.clientX,i=t.clientY;if(u2(e)){var a=e.getBoundingClientRect();r.zrX=n-a.left,r.zrY=i-a.top;return}else if(yy(f2,e,n,i)){r.zrX=f2[0],r.zrY=f2[1];return}}r.zrX=r.zrY=0}function _y(e){return e||window.event}function Tn(e,t,r){if(t=_y(t),t.zrX!=null)return t;var n=t.type,i=n&&n.indexOf("touch")>=0;if(i){var o=n!=="touchend"?t.targetTouches[0]:t.changedTouches[0];o&&xy(e,o,t,r)}else{xy(e,t,t,r);var a=Vet(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var s=t.button;return t.which==null&&s!==void 0&&zet.test(t.type)&&(t.which=s&1?1:s&2?3:s&4?2:0),t}function Vet(e){var t=e.wheelDelta;if(t)return t;var r=e.deltaX,n=e.deltaY;if(r==null||n==null)return t;var i=Math.abs(n!==0?n:r),a=n>0?-1:n<0?1:r>0?-1:1;return 3*i*a}function hd(e,t,r,n){e.addEventListener(t,r,n)}function bk(e,t,r,n){e.removeEventListener(t,r,n)}var Mn=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function c2(e){return e.which===2||e.which===3}var wk=function(){function e(){this._track=[]}return e.prototype.recognize=function(t,r,n){return this._doTrack(t,r,n),this._recognize(t)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(t,r,n){var i=t.touches;if(i){for(var a={points:[],touches:[],target:r,event:t},o=0,s=i.length;o1&&n&&n.length>1){var a=Sk(n)/Sk(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=Bet(n);return t.pinchX=o[0],t.pinchY=o[1],{type:"pinch",target:e[0].target,event:t}}}}};function tr(){return[1,0,0,1,0,0]}function Ls(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function dd(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function An(e,t,r){var n=t[0]*r[0]+t[2]*r[1],i=t[1]*r[0]+t[3]*r[1],a=t[0]*r[2]+t[2]*r[3],o=t[1]*r[2]+t[3]*r[3],s=t[0]*r[4]+t[2]*r[5]+t[4],l=t[1]*r[4]+t[3]*r[5]+t[5];return e[0]=n,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=l,e}function Nr(e,t,r){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+r[0],e[5]=t[5]+r[1],e}function Cn(e,t,r){var n=t[0],i=t[2],a=t[4],o=t[1],s=t[3],l=t[5],u=Math.sin(r),f=Math.cos(r);return e[0]=n*f+o*u,e[1]=-n*u+o*f,e[2]=i*f+s*u,e[3]=-i*u+f*s,e[4]=f*a+u*l,e[5]=f*l-u*a,e}function Lc(e,t,r){var n=r[0],i=r[1];return e[0]=t[0]*n,e[1]=t[1]*i,e[2]=t[2]*n,e[3]=t[3]*i,e[4]=t[4]*n,e[5]=t[5]*i,e}function gi(e,t){var r=t[0],n=t[2],i=t[4],a=t[1],o=t[3],s=t[5],l=r*o-a*n;return l?(l=1/l,e[0]=o*l,e[1]=-a*l,e[2]=-n*l,e[3]=r*l,e[4]=(n*s-o*i)*l,e[5]=(a*i-r*s)*l,e):null}function Tk(e){var t=tr();return dd(t,e),t}var Fet=function(){function e(t,r){this.x=t||0,this.y=r||0}return e.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(t,r){return this.x=t,this.y=r,this},e.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},e.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},e.prototype.scale=function(t){this.x*=t,this.y*=t},e.prototype.scaleAndAdd=function(t,r){this.x+=t.x*r,this.y+=t.y*r},e.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},e.prototype.dot=function(t){return this.x*t.x+this.y*t.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},e.prototype.distance=function(t){var r=this.x-t.x,n=this.y-t.y;return Math.sqrt(r*r+n*n)},e.prototype.distanceSquare=function(t){var r=this.x-t.x,n=this.y-t.y;return r*r+n*n},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(t){if(t){var r=this.x,n=this.y;return this.x=t[0]*r+t[2]*n+t[4],this.y=t[1]*r+t[3]*n+t[5],this}},e.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},e.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},e.set=function(t,r,n){t.x=r,t.y=n},e.copy=function(t,r){t.x=r.x,t.y=r.y},e.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},e.lenSquare=function(t){return t.x*t.x+t.y*t.y},e.dot=function(t,r){return t.x*r.x+t.y*r.y},e.add=function(t,r,n){t.x=r.x+n.x,t.y=r.y+n.y},e.sub=function(t,r,n){t.x=r.x-n.x,t.y=r.y-n.y},e.scale=function(t,r,n){t.x=r.x*n,t.y=r.y*n},e.scaleAndAdd=function(t,r,n,i){t.x=r.x+n.x*i,t.y=r.y+n.y*i},e.lerp=function(t,r,n,i){var a=1-i;t.x=a*r.x+i*n.x,t.y=a*r.y+i*n.y},e}(),kt=Fet;var by=Math.min,Sy=Math.max,lu=new kt,uu=new kt,fu=new kt,cu=new kt,vd=new kt,md=new kt,Get=function(){function e(t,r,n,i){n<0&&(t=t+n,n=-n),i<0&&(r=r+i,i=-i),this.x=t,this.y=r,this.width=n,this.height=i}return e.prototype.union=function(t){var r=by(t.x,this.x),n=by(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Sy(t.x+t.width,this.x+this.width)-r:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=Sy(t.y+t.height,this.y+this.height)-n:this.height=t.height,this.x=r,this.y=n},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(t){var r=this,n=t.width/r.width,i=t.height/r.height,a=tr();return Nr(a,a,[-r.x,-r.y]),Lc(a,a,[n,i]),Nr(a,a,[t.x,t.y]),a},e.prototype.intersect=function(t,r){if(!t)return!1;t instanceof e||(t=e.create(t));var n=this,i=n.x,a=n.x+n.width,o=n.y,s=n.y+n.height,l=t.x,u=t.x+t.width,f=t.y,c=t.y+t.height,p=!(ad&&(d=x,md&&(d=_,g=n.x&&t<=n.x+n.width&&r>=n.y&&r<=n.y+n.height},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(t){e.copy(this,t)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return this.width===0||this.height===0},e.create=function(t){return new e(t.x,t.y,t.width,t.height)},e.copy=function(t,r){t.x=r.x,t.y=r.y,t.width=r.width,t.height=r.height},e.applyTransform=function(t,r,n){if(!n){t!==r&&e.copy(t,r);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var i=n[0],a=n[3],o=n[4],s=n[5];t.x=r.x*i+o,t.y=r.y*a+s,t.width=r.width*i,t.height=r.height*a,t.width<0&&(t.x+=t.width,t.width=-t.width),t.height<0&&(t.y+=t.height,t.height=-t.height);return}lu.x=fu.x=r.x,lu.y=cu.y=r.y,uu.x=cu.x=r.x+r.width,uu.y=fu.y=r.y+r.height,lu.transform(n),cu.transform(n),uu.transform(n),fu.transform(n),t.x=by(lu.x,uu.x,fu.x,cu.x),t.y=by(lu.y,uu.y,fu.y,cu.y);var l=Sy(lu.x,uu.x,fu.x,cu.x),u=Sy(lu.y,uu.y,fu.y,cu.y);t.width=l-t.x,t.height=u-t.y},e}(),dt=Get;var Ak="silent";function Het(e,t,r){return{type:e,event:r,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:r.zrX,offsetY:r.zrY,gestureEvent:r.gestureEvent,pinchX:r.pinchX,pinchY:r.pinchY,pinchScale:r.pinchScale,wheelDelta:r.zrDelta,zrByTouch:r.zrByTouch,which:r.which,stop:Wet}}function Wet(){Mn(this.event)}var Yet=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.handler=null,r}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(Je),gd=function(){function e(t,r){this.x=t,this.y=r}return e}(),Xet=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],h2=new dt(0,0,0,0),Ck=function(e){N(t,e);function t(r,n,i,a,o){var s=e.call(this)||this;return s._hovered=new gd(0,0),s.storage=r,s.painter=n,s.painterRoot=a,s._pointerSize=o,i=i||new Yet,s.proxy=null,s.setHandlerProxy(i),s._draggingMgr=new gk(s),s}return t.prototype.setHandlerProxy=function(r){this.proxy&&this.proxy.dispose(),r&&(D(Xet,function(n){r.on&&r.on(n,this[n],this)},this),r.handler=this),this.proxy=r},t.prototype.mousemove=function(r){var n=r.zrX,i=r.zrY,a=Dk(this,n,i),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var l=this._hovered=a?new gd(n,i):this.findHover(n,i),u=l.target,f=this.proxy;f.setCursor&&f.setCursor(u?u.cursor:"default"),s&&u!==s&&this.dispatchToElement(o,"mouseout",r),this.dispatchToElement(l,"mousemove",r),u&&u!==s&&this.dispatchToElement(l,"mouseover",r)},t.prototype.mouseout=function(r){var n=r.zrEventControl;n!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",r),n!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:r})},t.prototype.resize=function(){this._hovered=new gd(0,0)},t.prototype.dispatch=function(r,n){var i=this[r];i&&i.call(this,n)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(r){var n=this.proxy;n.setCursor&&n.setCursor(r)},t.prototype.dispatchToElement=function(r,n,i){r=r||{};var a=r.target;if(!(a&&a.silent)){for(var o="on"+n,s=Het(n,r,i);a&&(a[o]&&(s.cancelBubble=!!a[o].call(a,s)),a.trigger(n,s),a=a.__hostTarget?a.__hostTarget:a.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(n,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(l){typeof l[o]=="function"&&l[o].call(l,s),l.trigger&&l.trigger(n,s)}))}},t.prototype.findHover=function(r,n,i){var a=this.storage.getDisplayList(),o=new gd(r,n);if(Mk(a,o,r,n,i),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,f=new dt(r-u,n-u,l,l),c=a.length-1;c>=0;c--){var p=a[c];p!==i&&!p.ignore&&!p.ignoreCoarsePointer&&(!p.parent||!p.parent.ignoreCoarsePointer)&&(h2.copy(p.getBoundingRect()),p.transform&&h2.applyTransform(p.transform),h2.intersect(f)&&s.push(p))}if(s.length)for(var h=4,d=Math.PI/12,m=Math.PI*2,v=0;v4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function qet(e,t,r){if(e[e.rectHover?"rectContain":"contain"](t,r)){for(var n=e,i=void 0,a=!1;n;){if(n.ignoreClip&&(a=!0),!a){var o=n.getClipPath();if(o&&!o.contain(t,r))return!1;n.silent&&(i=!0)}var s=n.__hostTarget;n=s||n.parent}return i?Ak:!0}return!1}function Mk(e,t,r,n,i){for(var a=e.length-1;a>=0;a--){var o=e[a],s=void 0;if(o!==i&&!o.ignore&&(s=qet(o,r,n))&&(!t.topTarget&&(t.topTarget=o),s!==Ak)){t.target=o;break}}}function Dk(e,t,r){var n=e.painter;return t<0||t>n.getWidth()||r<0||r>n.getHeight()}var Ek=Ck;var Rk=32,yd=7,Ik=256;function Zet(e){for(var t=0;e>=Rk;)t|=e&1,e>>=1;return e+t}function Lk(e,t,r,n){var i=t+1;if(i===r)return 1;if(n(e[i++],e[t])<0){for(;i=0;)i++;return i-t}function Ket(e,t,r){for(r--;t>>1,i(a,e[l])<0?s=l:o=l+1;var u=n-o;switch(u){case 3:e[o+3]=e[o+2];case 2:e[o+2]=e[o+1];case 1:e[o+1]=e[o];break;default:for(;u>0;)e[o+u]=e[o+u-1],u--}e[o]=a}}function d2(e,t,r,n,i,a){var o=0,s=0,l=1;if(a(e,t[r+i])>0){for(s=n-i;l0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}else{for(s=i+1;ls&&(l=s);var u=o;o=i-l,l=i-u}for(o++;o>>1);a(e,t[r+f])>0?o=f+1:l=f}return l}function v2(e,t,r,n,i,a){var o=0,s=0,l=1;if(a(e,t[r+i])<0){for(s=i+1;ls&&(l=s);var u=o;o=i-l,l=i-u}else{for(s=n-i;l=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}for(o++;o>>1);a(e,t[r+f])<0?l=f:o=f+1}return l}function $et(e,t){var r=yd,n=0,i=Ik,a=0,o,s,l=0;n=e.length,n<2*Ik&&(i=n>>>1);var u=[];a=n<120?5:n<1542?10:n<119151?19:40,o=[],s=[];function f(v,g){o[l]=v,s[l]=g,l+=1}function c(){for(;l>1;){var v=l-2;if(v>=1&&s[v-1]<=s[v]+s[v+1]||v>=2&&s[v-2]<=s[v]+s[v-1])s[v-1]s[v+1])break;h(v)}}function p(){for(;l>1;){var v=l-2;v>0&&s[v-1]=yd||C>=yd);if(A)break;T<0&&(T=0),T+=2}if(r=T,r<1&&(r=1),g===1){for(_=0;_=0;_--)e[M+_]=e[T+_];e[w]=u[b];return}for(var C=r;;){var A=0,P=0,L=!1;do if(t(u[b],e[S])<0){if(e[w--]=e[S--],A++,P=0,--g===0){L=!0;break}}else if(e[w--]=u[b--],P++,A=0,--x===1){L=!0;break}while((A|P)=0;_--)e[M+_]=e[T+_];if(g===0){L=!0;break}}if(e[w--]=u[b--],--x===1){L=!0;break}if(P=x-d2(e[S],u,0,x,x-1,t),P!==0){for(w-=P,b-=P,x-=P,M=w+1,T=b+1,_=0;_=yd||P>=yd);if(L)break;C<0&&(C=0),C+=2}if(r=C,r<1&&(r=1),x===1){for(w-=g,S-=g,M=w+1,T=S+1,_=g-1;_>=0;_--)e[M+_]=e[T+_];e[w]=u[b]}else{if(x===0)throw new Error;for(T=w-(x-1),_=0;_s&&(l=s),Pk(e,r,r+l,r+a,t),a=l}o.pushRun(r,a),o.mergeRuns(),i-=a,r+=a}while(i!==0);o.forceMergeRuns()}}var or=1,hu=2,Ps=4;var Nk=!1;function m2(){Nk||(Nk=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function kk(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var jet=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=kk}return e.prototype.traverse=function(t,r){for(var n=0;n0&&(f.__clipPaths=[]),isNaN(f.z)&&(m2(),f.z=0),isNaN(f.z2)&&(m2(),f.z2=0),isNaN(f.zlevel)&&(m2(),f.zlevel=0),this._displayList[this._displayListLen++]=f}var c=t.getDecalElement&&t.getDecalElement();c&&this._updateAndAddDisplayable(c,r,n);var p=t.getTextGuideLine();p&&this._updateAndAddDisplayable(p,r,n);var h=t.getTextContent();h&&this._updateAndAddDisplayable(h,r,n)}},e.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},e.prototype.delRoot=function(t){if(t instanceof Array){for(var r=0,n=t.length;r=0&&this._roots.splice(i,1)},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}(),Ok=jet;var zk;zk=Ot.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};var xd=zk;var wy={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return .5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return e===0?0:Math.pow(1024,e-1)},exponentialOut:function(e){return e===1?1:1-Math.pow(2,-10*e)},exponentialInOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(-Math.pow(2,-10*(e-1))+2)},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,r=.1,n=.4;return e===0?0:e===1?1:(!r||r<1?(r=1,t=n/4):t=n*Math.asin(1/r)/(2*Math.PI),-(r*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)))},elasticOut:function(e){var t,r=.1,n=.4;return e===0?0:e===1?1:(!r||r<1?(r=1,t=n/4):t=n*Math.asin(1/r)/(2*Math.PI),r*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/n)+1)},elasticInOut:function(e){var t,r=.1,n=.4;return e===0?0:e===1?1:(!r||r<1?(r=1,t=n/4):t=n*Math.asin(1/r)/(2*Math.PI),(e*=2)<1?-.5*(r*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)):r*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-wy.bounceOut(1-e)},bounceOut:function(e){return e<.36363636363636365?7.5625*e*e:e<.7272727272727273?7.5625*(e-=.5454545454545454)*e+.75:e<.9090909090909091?7.5625*(e-=.8181818181818182)*e+.9375:7.5625*(e-=.9545454545454546)*e+.984375},bounceInOut:function(e){return e<.5?wy.bounceIn(e*2)*.5:wy.bounceOut(e*2-1)*.5+.5}},Ty=wy;var My=Math.pow,Ns=Math.sqrt,Cy=1e-8,Vk=1e-4,Uk=Ns(3),Ay=1/3,Va=Ua(),yi=Ua(),Pc=Ua();function Rs(e){return e>-Cy&&eCy||e<-Cy}function Ve(e,t,r,n,i){var a=1-i;return a*a*(a*e+3*i*t)+i*i*(i*n+3*a*r)}function g2(e,t,r,n,i){var a=1-i;return 3*(((t-e)*a+2*(r-t)*i)*a+(n-r)*i*i)}function du(e,t,r,n,i,a){var o=n+3*(t-r)-e,s=3*(r-t*2+e),l=3*(t-e),u=e-i,f=s*s-3*o*l,c=s*l-9*o*u,p=l*l-3*s*u,h=0;if(Rs(f)&&Rs(c))if(Rs(s))a[0]=0;else{var d=-l/s;d>=0&&d<=1&&(a[h++]=d)}else{var m=c*c-4*f*p;if(Rs(m)){var v=c/f,d=-s/o+v,g=-v/2;d>=0&&d<=1&&(a[h++]=d),g>=0&&g<=1&&(a[h++]=g)}else if(m>0){var y=Ns(m),x=f*s+1.5*o*(-c+y),_=f*s+1.5*o*(-c-y);x<0?x=-My(-x,Ay):x=My(x,Ay),_<0?_=-My(-_,Ay):_=My(_,Ay);var d=(-s-(x+_))/(3*o);d>=0&&d<=1&&(a[h++]=d)}else{var S=(2*f*s-3*o*c)/(2*Ns(f*f*f)),b=Math.acos(S)/3,w=Ns(f),T=Math.cos(b),d=(-s-2*w*T)/(3*o),g=(-s+w*(T+Uk*Math.sin(b)))/(3*o),M=(-s+w*(T-Uk*Math.sin(b)))/(3*o);d>=0&&d<=1&&(a[h++]=d),g>=0&&g<=1&&(a[h++]=g),M>=0&&M<=1&&(a[h++]=M)}}return h}function Dy(e,t,r,n,i){var a=6*r-12*t+6*e,o=9*t+3*n-3*e-9*r,s=3*t-3*e,l=0;if(Rs(o)){if(Bk(a)){var u=-s/a;u>=0&&u<=1&&(i[l++]=u)}}else{var f=a*a-4*o*s;if(Rs(f))i[0]=-a/(2*o);else if(f>0){var c=Ns(f),u=(-a+c)/(2*o),p=(-a-c)/(2*o);u>=0&&u<=1&&(i[l++]=u),p>=0&&p<=1&&(i[l++]=p)}}return l}function xi(e,t,r,n,i,a){var o=(t-e)*i+e,s=(r-t)*i+t,l=(n-r)*i+r,u=(s-o)*i+o,f=(l-s)*i+s,c=(f-u)*i+u;a[0]=e,a[1]=o,a[2]=u,a[3]=c,a[4]=c,a[5]=f,a[6]=l,a[7]=n}function Ey(e,t,r,n,i,a,o,s,l,u,f){var c,p=.005,h=1/0,d,m,v,g;Va[0]=l,Va[1]=u;for(var y=0;y<1;y+=.05)yi[0]=Ve(e,r,i,o,y),yi[1]=Ve(t,n,a,s,y),v=No(Va,yi),v=0&&v=0&&u<=1&&(i[l++]=u)}}else{var f=o*o-4*a*s;if(Rs(f)){var u=-o/(2*a);u>=0&&u<=1&&(i[l++]=u)}else if(f>0){var c=Ns(f),u=(-o+c)/(2*a),p=(-o-c)/(2*a);u>=0&&u<=1&&(i[l++]=u),p>=0&&p<=1&&(i[l++]=p)}}return l}function Iy(e,t,r){var n=e+r-2*t;return n===0?.5:(e-t)/n}function ks(e,t,r,n,i){var a=(t-e)*n+e,o=(r-t)*n+t,s=(o-a)*n+a;i[0]=e,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=r}function Ly(e,t,r,n,i,a,o,s,l){var u,f=.005,c=1/0;Va[0]=o,Va[1]=s;for(var p=0;p<1;p+=.05){yi[0]=He(e,r,i,p),yi[1]=He(t,n,a,p);var h=No(Va,yi);h=0&&h=1?1:du(0,n,a,1,l,s)&&Ve(0,i,o,1,s[0])}}}var Jet=function(){function e(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||ce,this.ondestroy=t.ondestroy||ce,this.onrestart=t.onrestart||ce,t.easing&&this.setEasing(t.easing)}return e.prototype.step=function(t,r){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),this._paused){this._pausedTime+=r;return}var n=this._life,i=t-this._startTime-this._pausedTime,a=i/n;a<0&&(a=0),a=Math.min(a,1);var o=this.easingFunc,s=o?o(a):a;if(this.onframe(s),a===1)if(this.loop){var l=i%n;this._startTime=t-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(t){this.easing=t,this.easingFunc=j(t)?t:Ty[t]||Rc(t)},e}(),Wk=Jet;var Yk=function(){function e(t){this.value=t}return e}();var trt=function(){function e(){this._len=0}return e.prototype.insert=function(t){var r=new Yk(t);return this.insertEntry(r),r},e.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++},e.prototype.remove=function(t){var r=t.prev,n=t.next;r?r.next=n:this.head=n,n?n.prev=r:this.tail=r,t.next=t.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e}();var ert=function(){function e(t){this._list=new trt,this._maxSize=10,this._map={},this._maxSize=t}return e.prototype.put=function(t,r){var n=this._list,i=this._map,a=null;if(i[t]==null){var o=n.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=n.head;n.remove(l),delete i[l.key],a=l.value,this._lastRemovedEntry=l}s?s.value=r:s=new Yk(r),s.key=t,n.insertEntry(s),i[t]=s}return a},e.prototype.get=function(t){var r=this._map[t],n=this._list;if(r!=null)return r!==n.tail&&(n.remove(r),n.insertEntry(r)),r.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}(),Ba=ert;var Xk={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 ta(e){return e=Math.round(e),e<0?0:e>255?255:e}function rrt(e){return e=Math.round(e),e<0?0:e>360?360:e}function Sd(e){return e<0?0:e>1?1:e}function y2(e){var t=e;return t.length&&t.charAt(t.length-1)==="%"?ta(parseFloat(t)/100*255):ta(parseInt(t,10))}function vu(e){var t=e;return t.length&&t.charAt(t.length-1)==="%"?Sd(parseFloat(t)/100):Sd(parseFloat(t))}function x2(e,t,r){return r<0?r+=1:r>1&&(r-=1),r*6<1?e+(t-e)*r*6:r*2<1?t:r*3<2?e+(t-e)*(2/3-r)*6:e}function Os(e,t,r){return e+(t-e)*r}function _i(e,t,r,n,i){return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e}function _2(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var qk=new Ba(20),Py=null;function Nc(e,t){Py&&_2(Py,t),Py=qk.put(e,Py||t.slice())}function br(e,t){if(e){t=t||[];var r=qk.get(e);if(r)return _2(t,r);e=e+"";var n=e.replace(/ /g,"").toLowerCase();if(n in Xk)return _2(t,Xk[n]),Nc(e,t),t;var i=n.length;if(n.charAt(0)==="#"){if(i===4||i===5){var a=parseInt(n.slice(1,4),16);if(!(a>=0&&a<=4095)){_i(t,0,0,0,1);return}return _i(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(n.slice(4),16)/15:1),Nc(e,t),t}else if(i===7||i===9){var a=parseInt(n.slice(1,7),16);if(!(a>=0&&a<=16777215)){_i(t,0,0,0,1);return}return _i(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(n.slice(7),16)/255:1),Nc(e,t),t}return}var o=n.indexOf("("),s=n.indexOf(")");if(o!==-1&&s+1===i){var l=n.substr(0,o),u=n.substr(o+1,s-(o+1)).split(","),f=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?_i(t,+u[0],+u[1],+u[2],1):_i(t,0,0,0,1);f=vu(u.pop());case"rgb":if(u.length>=3)return _i(t,y2(u[0]),y2(u[1]),y2(u[2]),u.length===3?f:vu(u[3])),Nc(e,t),t;_i(t,0,0,0,1);return;case"hsla":if(u.length!==4){_i(t,0,0,0,1);return}return u[3]=vu(u[3]),b2(u,t),Nc(e,t),t;case"hsl":if(u.length!==3){_i(t,0,0,0,1);return}return b2(u,t),Nc(e,t),t;default:return}}_i(t,0,0,0,1)}}function b2(e,t){var r=(parseFloat(e[0])%360+360)%360/360,n=vu(e[1]),i=vu(e[2]),a=i<=.5?i*(n+1):i+n-i*n,o=i*2-a;return t=t||[],_i(t,ta(x2(o,a,r+1/3)*255),ta(x2(o,a,r)*255),ta(x2(o,a,r-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function nrt(e){if(e){var t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=a-i,s=(a+i)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(a+i):u=o/(2-a-i);var f=((a-t)/6+o/2)/o,c=((a-r)/6+o/2)/o,p=((a-n)/6+o/2)/o;t===a?l=p-c:r===a?l=1/3+f-p:n===a&&(l=2/3+c-f),l<0&&(l+=1),l>1&&(l-=1)}var h=[l*360,u,s];return e[3]!=null&&h.push(e[3]),h}}function wd(e,t){var r=br(e);if(r){for(var n=0;n<3;n++)t<0?r[n]=r[n]*(1-t)|0:r[n]=(255-r[n])*t+r[n]|0,r[n]>255?r[n]=255:r[n]<0&&(r[n]=0);return bi(r,r.length===4?"rgba":"rgb")}}function Ry(e,t,r){if(!(!(t&&t.length)||!(e>=0&&e<=1))){r=r||[];var n=e*(t.length-1),i=Math.floor(n),a=Math.ceil(n),o=t[i],s=t[a],l=n-i;return r[0]=ta(Os(o[0],s[0],l)),r[1]=ta(Os(o[1],s[1],l)),r[2]=ta(Os(o[2],s[2],l)),r[3]=Sd(Os(o[3],s[3],l)),r}}function Zk(e,t,r){if(!(!(t&&t.length)||!(e>=0&&e<=1))){var n=e*(t.length-1),i=Math.floor(n),a=Math.ceil(n),o=br(t[i]),s=br(t[a]),l=n-i,u=bi([ta(Os(o[0],s[0],l)),ta(Os(o[1],s[1],l)),ta(Os(o[2],s[2],l)),Sd(Os(o[3],s[3],l))],"rgba");return r?{color:u,leftIndex:i,rightIndex:a,value:n}:u}}function mu(e,t,r,n){var i=br(e);if(e)return i=nrt(i),t!=null&&(i[0]=rrt(t)),r!=null&&(i[1]=vu(r)),n!=null&&(i[2]=vu(n)),bi(b2(i),"rgba")}function gu(e,t){var r=br(e);if(r&&t!=null)return r[3]=Sd(t),bi(r,"rgba")}function bi(e,t){if(!(!e||!e.length)){var r=e[0]+","+e[1]+","+e[2];return(t==="rgba"||t==="hsva"||t==="hsla")&&(r+=","+e[3]),t+"("+r+")"}}function kc(e,t){var r=br(e);return r?(.299*r[0]+.587*r[1]+.114*r[2])*r[3]/255+(1-r[3])*t:0}var Oy=Math.round;function zs(e){var t;if(!e||e==="transparent")e="none";else if(typeof e=="string"&&e.indexOf("rgba")>-1){var r=br(e);r&&(e="rgb("+r[0]+","+r[1]+","+r[2]+")",t=r[3])}return{color:e,opacity:t??1}}var Kk=1e-4;function Fa(e){return e-Kk}function ky(e){return Oy(e*1e3)/1e3}function zy(e){return Oy(e*1e4)/1e4}function $k(e){return"matrix("+ky(e[0])+","+ky(e[1])+","+ky(e[2])+","+ky(e[3])+","+zy(e[4])+","+zy(e[5])+")"}var jk={left:"start",right:"end",center:"middle",middle:"middle"};function Qk(e,t,r){return r==="top"?e+=t/2:r==="bottom"&&(e-=t/2),e}function Jk(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY)}function tO(e){var t=e.style,r=e.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),r[0],r[1]].join(",")}function S2(e){return e&&!!e.image}function irt(e){return e&&!!e.svgElement}function Td(e){return S2(e)||irt(e)}function Uy(e){return e.type==="linear"}function Vy(e){return e.type==="radial"}function By(e){return e&&(e.type==="linear"||e.type==="radial")}function Md(e){return"url(#"+e+")"}function Fy(e){var t=e.getGlobalScale(),r=Math.max(t[0],t[1]);return Math.max(Math.ceil(Math.log(r)/Math.log(10)),1)}function Gy(e){var t=e.x||0,r=e.y||0,n=(e.rotation||0)*Ac,i=bt(e.scaleX,1),a=bt(e.scaleY,1),o=e.skewX||0,s=e.skewY||0,l=[];return(t||r)&&l.push("translate("+t+"px,"+r+"px)"),n&&l.push("rotate("+n+")"),(i!==1||a!==1)&&l.push("scale("+i+","+a+")"),(o||s)&&l.push("skew("+Oy(o*Ac)+"deg, "+Oy(s*Ac)+"deg)"),l.join(" ")}var eO=function(){return Ot.hasGlobalWindow&&j(window.btoa)?function(e){return window.btoa(unescape(encodeURIComponent(e)))}:typeof Buffer<"u"?function(e){return Buffer.from(e).toString("base64")}:function(e){return null}}();var T2=Array.prototype.slice;function ko(e,t,r){return(t-e)*r+e}function w2(e,t,r,n){for(var i=t.length,a=0;an?t:e,a=Math.min(r,n),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;so;if(s)n.length=o;else for(var l=a;l=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(t,r,n){this._needsSort=!0;var i=this.keyframes,a=i.length,o=!1,s=nO,l=r;if(ze(r)){var u=lrt(r);s=u,(u===1&&!Ct(r[0])||u===2&&!Ct(r[0][0]))&&(o=!0)}else if(Ct(r)&&!Es(r))s=Wy;else if(H(r))if(!isNaN(+r))s=Wy;else{var f=br(r);f&&(l=f,s=Cd)}else if(Ds(r)){var c=V({},l);c.colorStops=F(r.colorStops,function(h){return{offset:h.offset,color:br(h.color)}}),Uy(r)?s=M2:Vy(r)&&(s=A2),l=c}a===0?this.valType=s:(s!==this.valType||s===nO)&&(o=!0),this.discrete=this.discrete||o;var p={time:t,value:l,rawValue:r,percent:0};return n&&(p.easing=n,p.easingFunc=j(n)?n:Ty[n]||Rc(n)),i.push(p),p},e.prototype.prepare=function(t,r){var n=this.keyframes;this._needsSort&&n.sort(function(m,v){return m.time-v.time});for(var i=this.valType,a=n.length,o=n[a-1],s=this.discrete,l=Yy(i),u=iO(i),f=0;f=0&&!(o[f].percent<=r);f--);f=p(f,s-2)}else{for(f=c;fr);f++);f=p(f-1,s-2)}d=o[f+1],h=o[f]}if(h&&d){this._lastFr=f,this._lastFrP=r;var v=d.percent-h.percent,g=v===0?1:p((r-h.percent)/v,1);d.easingFunc&&(g=d.easingFunc(g));var y=n?this._additiveValue:u?Ad:t[l];if((Yy(a)||u)&&!y&&(y=this._additiveValue=[]),this.discrete)t[l]=g<1?h.rawValue:d.rawValue;else if(Yy(a))a===qy?w2(y,h[i],d[i],g):art(y,h[i],d[i],g);else if(iO(a)){var x=h[i],_=d[i],S=a===M2;t[l]={type:S?"linear":"radial",x:ko(x.x,_.x,g),y:ko(x.y,_.y,g),colorStops:F(x.colorStops,function(w,T){var M=_.colorStops[T];return{offset:ko(w.offset,M.offset,g),color:Xy(w2([],w.color,M.color,g))}}),global:_.global},S?(t[l].x2=ko(x.x2,_.x2,g),t[l].y2=ko(x.y2,_.y2,g)):t[l].r=ko(x.r,_.r,g)}else if(u)w2(y,h[i],d[i],g),n||(t[l]=Xy(y));else{var b=ko(h[i],d[i],g);n?this._additiveValue=b:t[l]=b}n&&this._addToTarget(t)}}},e.prototype._addToTarget=function(t){var r=this.valType,n=this.propName,i=this._additiveValue;r===Wy?t[n]=t[n]+i:r===Cd?(br(t[n],Ad),Hy(Ad,Ad,i,1),t[n]=Xy(Ad)):r===qy?Hy(t[n],t[n],i,1):r===aO&&rO(t[n],t[n],i,1)},e}(),frt=function(){function e(t,r,n,i){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=t,this._loop=r,r&&i){au("Can' use additive animation on looped animation.");return}this._additiveAnimators=i,this._allowDiscrete=n}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(t){this._target=t},e.prototype.when=function(t,r,n){return this.whenWithKeys(t,r,St(r),n)},e.prototype.whenWithKeys=function(t,r,n,i){for(var a=this._tracks,o=0;o0&&l.addKeyframe(0,yu(u),i),this._trackKeys.push(s)}l.addKeyframe(t,yu(r[s]),i)}return this._maxTime=Math.max(this._maxTime,t),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var r=t.length,n=0;n0)){this._started=1;for(var r=this,n=[],i=this._maxTime||0,a=0;a1){var s=o.pop();a.addKeyframe(s.time,t[i]),a.prepare(this._maxTime,a.getAdditiveTrack())}}}},e}(),Dd=frt;function xu(){return new Date().getTime()}var crt=function(e){N(t,e);function t(r){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,r=r||{},n.stage=r.stage||{},n}return t.prototype.addClip=function(r){r.animation&&this.removeClip(r),this._head?(this._tail.next=r,r.prev=this._tail,r.next=null,this._tail=r):this._head=this._tail=r,r.animation=this},t.prototype.addAnimator=function(r){r.animation=this;var n=r.getClip();n&&this.addClip(n)},t.prototype.removeClip=function(r){if(r.animation){var n=r.prev,i=r.next;n?n.next=i:this._head=i,i?i.prev=n:this._tail=n,r.next=r.prev=r.animation=null}},t.prototype.removeAnimator=function(r){var n=r.getClip();n&&this.removeClip(n),r.animation=null},t.prototype.update=function(r){for(var n=xu()-this._pausedTime,i=n-this._time,a=this._head;a;){var o=a.next,s=a.step(n,i);s&&(a.ondestroy(),this.removeClip(a)),a=o}this._time=n,r||(this.trigger("frame",i),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var r=this;this._running=!0;function n(){r._running&&(xd(n),!r._paused&&r.update())}xd(n)},t.prototype.start=function(){this._running||(this._time=xu(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=xu(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=xu()-this._pauseStart,this._paused=!1)},t.prototype.clear=function(){for(var r=this._head;r;){var n=r.next;r.prev=r.next=r.animation=null,r=n}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(r,n){n=n||{},this.start();var i=new Dd(r,n.loop);return this.addAnimator(i),i},t}(Je),oO=crt;var prt=300,C2=Ot.domSupported,D2=function(){var e=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],t=["touchstart","touchend","touchmove"],r={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},n=F(e,function(i){var a=i.replace("mouse","pointer");return r.hasOwnProperty(a)?a:i});return{mouse:e,touch:t,pointer:n}}(),sO={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},lO=!1;function L2(e){var t=e.pointerType;return t==="pen"||t==="touch"}function hrt(e){e.touching=!0,e.touchTimer!=null&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)}function E2(e){e&&(e.zrByTouch=!0)}function drt(e,t){return Tn(e.dom,new vrt(e,t),!0)}function fO(e,t){for(var r=t,n=!1;r&&r.nodeType!==9&&!(n=r.domBelongToZr||r!==t&&r===e.painterRoot);)r=r.parentNode;return n}var vrt=function(){function e(t,r){this.stopPropagation=ce,this.stopImmediatePropagation=ce,this.preventDefault=ce,this.type=r.type,this.target=this.currentTarget=t.dom,this.pointerType=r.pointerType,this.clientX=r.clientX,this.clientY=r.clientY}return e}(),ea={mousedown:function(e){e=Tn(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger("mousedown",e)},mousemove:function(e){e=Tn(this.dom,e);var t=this.__mayPointerCapture;t&&(e.zrX!==t[0]||e.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",e)},mouseup:function(e){e=Tn(this.dom,e),this.__togglePointerCapture(!1),this.trigger("mouseup",e)},mouseout:function(e){e=Tn(this.dom,e);var t=e.toElement||e.relatedTarget;fO(this,t)||(this.__pointerCapturing&&(e.zrEventControl="no_globalout"),this.trigger("mouseout",e))},wheel:function(e){lO=!0,e=Tn(this.dom,e),this.trigger("mousewheel",e)},mousewheel:function(e){lO||(e=Tn(this.dom,e),this.trigger("mousewheel",e))},touchstart:function(e){e=Tn(this.dom,e),E2(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,"start"),ea.mousemove.call(this,e),ea.mousedown.call(this,e)},touchmove:function(e){e=Tn(this.dom,e),E2(e),this.handler.processGesture(e,"change"),ea.mousemove.call(this,e)},touchend:function(e){e=Tn(this.dom,e),E2(e),this.handler.processGesture(e,"end"),ea.mouseup.call(this,e),+new Date-+this.__lastTouchMomentvO||e<-vO}var Su=[],Oc=[],R2=tr(),N2=Math.abs,xrt=function(){function e(){}return e.prototype.getLocalTransform=function(t){return e.getLocalTransform(this,t)},e.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},e.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},e.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},e.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},e.prototype.needLocalTransform=function(){return bu(this.rotation)||bu(this.x)||bu(this.y)||bu(this.scaleX-1)||bu(this.scaleY-1)||bu(this.skewX)||bu(this.skewY)},e.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,r=this.needLocalTransform(),n=this.transform;if(!(r||t)){n&&(dO(n),this.invTransform=null);return}n=n||tr(),r?this.getLocalTransform(n):dO(n),t&&(r?An(n,t,n):dd(n,t)),this.transform=n,this._resolveGlobalScaleRatio(n)},e.prototype._resolveGlobalScaleRatio=function(t){var r=this.globalScaleRatio;if(r!=null&&r!==1){this.getGlobalScale(Su);var n=Su[0]<0?-1:1,i=Su[1]<0?-1:1,a=((Su[0]-n)*r+n)/Su[0]||0,o=((Su[1]-i)*r+i)/Su[1]||0;t[0]*=a,t[1]*=a,t[2]*=o,t[3]*=o}this.invTransform=this.invTransform||tr(),gi(this.invTransform,t)},e.prototype.getComputedTransform=function(){for(var t=this,r=[];t;)r.push(t),t=t.parent;for(;t=r.pop();)t.updateTransform();return this.transform},e.prototype.setLocalTransform=function(t){if(t){var r=t[0]*t[0]+t[1]*t[1],n=t[2]*t[2]+t[3]*t[3],i=Math.atan2(t[1],t[0]),a=Math.PI/2+i-Math.atan2(t[3],t[2]);n=Math.sqrt(n)*Math.cos(a),r=Math.sqrt(r),this.skewX=a,this.skewY=0,this.rotation=-i,this.x=+t[4],this.y=+t[5],this.scaleX=r,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,r=this.transform;t&&t.transform&&(An(Oc,t.invTransform,r),r=Oc);var n=this.originX,i=this.originY;(n||i)&&(R2[4]=n,R2[5]=i,An(Oc,r,R2),Oc[4]-=n,Oc[5]-=i,r=Oc),this.setLocalTransform(r)}},e.prototype.getGlobalScale=function(t){var r=this.transform;return t=t||[],r?(t[0]=Math.sqrt(r[0]*r[0]+r[1]*r[1]),t[1]=Math.sqrt(r[2]*r[2]+r[3]*r[3]),r[0]<0&&(t[0]=-t[0]),r[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},e.prototype.transformCoordToLocal=function(t,r){var n=[t,r],i=this.invTransform;return i&&Ue(n,n,i),n},e.prototype.transformCoordToGlobal=function(t,r){var n=[t,r],i=this.transform;return i&&Ue(n,n,i),n},e.prototype.getLineScale=function(){var t=this.transform;return t&&N2(t[0]-1)>1e-10&&N2(t[3]-1)>1e-10?Math.sqrt(N2(t[0]*t[3]-t[2]*t[1])):1},e.prototype.copyTransform=function(t){k2(this,t)},e.getLocalTransform=function(t,r){r=r||[];var n=t.originX||0,i=t.originY||0,a=t.scaleX,o=t.scaleY,s=t.anchorX,l=t.anchorY,u=t.rotation||0,f=t.x,c=t.y,p=t.skewX?Math.tan(t.skewX):0,h=t.skewY?Math.tan(-t.skewY):0;if(n||i||s||l){var d=n+s,m=i+l;r[4]=-d*a-p*m*o,r[5]=-m*o-h*d*a}else r[4]=r[5]=0;return r[0]=a,r[3]=o,r[1]=h*a,r[2]=p*o,u&&Cn(r,r,u),r[4]+=n+f,r[5]+=i+c,r},e.initDefaultProps=function(){var t=e.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0}(),e}(),ri=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function k2(e,t){for(var r=0;r=0?parseFloat(e)/100*t:parseFloat(e):e}function Tu(e,t,r){var n=t.position||"inside",i=t.distance!=null?t.distance:5,a=r.height,o=r.width,s=a/2,l=r.x,u=r.y,f="left",c="top";if(n instanceof Array)l+=kr(n[0],r.width),u+=kr(n[1],r.height),f=null,c=null;else switch(n){case"left":l-=i,u+=s,f="right",c="middle";break;case"right":l+=i+o,u+=s,c="middle";break;case"top":l+=o/2,u-=i,f="center",c="bottom";break;case"bottom":l+=o/2,u+=a+i,f="center";break;case"inside":l+=o/2,u+=s,f="center",c="middle";break;case"insideLeft":l+=i,u+=s,c="middle";break;case"insideRight":l+=o-i,u+=s,f="right",c="middle";break;case"insideTop":l+=o/2,u+=i,f="center";break;case"insideBottom":l+=o/2,u+=a-i,f="center",c="bottom";break;case"insideTopLeft":l+=i,u+=i;break;case"insideTopRight":l+=o-i,u+=i,f="right";break;case"insideBottomLeft":l+=i,u+=a-i,c="bottom";break;case"insideBottomRight":l+=o-i,u+=a-i,f="right",c="bottom";break}return e=e||{},e.x=l,e.y=u,e.align=f,e.verticalAlign=c,e}var O2="__zr_normal__",z2=ri.concat(["ignore"]),_rt=Pr(ri,function(e,t){return e[t]=!0,e},{ignore:!1}),Vc={},brt=new dt(0,0,0,0),B2=function(){function e(t){this.id=hy(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return e.prototype._init=function(t){this.attr(t)},e.prototype.drift=function(t,r,n){switch(this.draggable){case"horizontal":r=0;break;case"vertical":t=0;break}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=r,this.decomposeTransform(),this.markRedraw()},e.prototype.beforeUpdate=function(){},e.prototype.afterUpdate=function(){},e.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},e.prototype.updateInnerText=function(t){var r=this._textContent;if(r&&(!r.ignore||t)){this.textConfig||(this.textConfig={});var n=this.textConfig,i=n.local,a=r.innerTransformable,o=void 0,s=void 0,l=!1;a.parent=i?this:null;var u=!1;if(a.copyTransform(r),n.position!=null){var f=brt;n.layoutRect?f.copy(n.layoutRect):f.copy(this.getBoundingRect()),i||f.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(Vc,n,f):Tu(Vc,n,f),a.x=Vc.x,a.y=Vc.y,o=Vc.align,s=Vc.verticalAlign;var c=n.origin;if(c&&n.rotation!=null){var p=void 0,h=void 0;c==="center"?(p=f.width*.5,h=f.height*.5):(p=kr(c[0],f.width),h=kr(c[1],f.height)),u=!0,a.originX=-a.x+p+(i?0:f.x),a.originY=-a.y+h+(i?0:f.y)}}n.rotation!=null&&(a.rotation=n.rotation);var d=n.offset;d&&(a.x+=d[0],a.y+=d[1],u||(a.originX=-d[0],a.originY=-d[1]));var m=n.inside==null?typeof n.position=="string"&&n.position.indexOf("inside")>=0:n.inside,v=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),g=void 0,y=void 0,x=void 0;m&&this.canBeInsideText()?(g=n.insideFill,y=n.insideStroke,(g==null||g==="auto")&&(g=this.getInsideTextFill()),(y==null||y==="auto")&&(y=this.getInsideTextStroke(g),x=!0)):(g=n.outsideFill,y=n.outsideStroke,(g==null||g==="auto")&&(g=this.getOutsideFill()),(y==null||y==="auto")&&(y=this.getOutsideStroke(g),x=!0)),g=g||"#000",(g!==v.fill||y!==v.stroke||x!==v.autoStroke||o!==v.align||s!==v.verticalAlign)&&(l=!0,v.fill=g,v.stroke=y,v.autoStroke=x,v.align=o,v.verticalAlign=s,r.setDefaultTextStyle(v)),r.__dirty|=or,l&&r.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return"#fff"},e.prototype.getInsideTextStroke=function(t){return"#000"},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Ld:Id},e.prototype.getOutsideStroke=function(t){var r=this.__zr&&this.__zr.getBackgroundColor(),n=typeof r=="string"&&br(r);n||(n=[255,255,255,1]);for(var i=n[3],a=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*i+(a?0:255)*(1-i);return n[3]=1,bi(n,"rgba")},e.prototype.traverse=function(t,r){},e.prototype.attrKV=function(t,r){t==="textConfig"?this.setTextConfig(r):t==="textContent"?this.setTextContent(r):t==="clipPath"?this.setClipPath(r):t==="extra"?(this.extra=this.extra||{},V(this.extra,r)):this[t]=r},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(t,r){if(typeof t=="string")this.attrKV(t,r);else if(rt(t))for(var n=t,i=St(n),a=0;a0},e.prototype.getState=function(t){return this.states[t]},e.prototype.ensureState=function(t){var r=this.states;return r[t]||(r[t]={}),r[t]},e.prototype.clearStates=function(t){this.useState(O2,!1,t)},e.prototype.useState=function(t,r,n,i){var a=t===O2,o=this.hasState();if(!(!o&&a)){var s=this.currentStates,l=this.stateTransition;if(!(gt(s,t)>=0&&(r||s.length===1))){var u;if(this.stateProxy&&!a&&(u=this.stateProxy(t)),u||(u=this.states&&this.states[t]),!u&&!a){au("State "+t+" not exists.");return}a||this.saveCurrentToNormalState(u);var f=!!(u&&u.hoverLayer||i);f&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,u,this._normalState,r,!n&&!this.__inHover&&l&&l.duration>0,l);var c=this._textContent,p=this._textGuide;return c&&c.useState(t,r,n,f),p&&p.useState(t,r,n,f),a?(this.currentStates=[],this._normalState={}):r?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!f&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~or),u}}},e.prototype.useStates=function(t,r,n){if(!t.length)this.clearStates();else{var i=[],a=this.currentStates,o=t.length,s=o===a.length;if(s){for(var l=0;l0,d);var m=this._textContent,v=this._textGuide;m&&m.useStates(t,r,p),v&&v.useStates(t,r,p),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!p&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~or)}},e.prototype._updateAnimationTargets=function(){for(var t=0;t=0){var n=this.currentStates.slice();n.splice(r,1),this.useStates(n)}},e.prototype.replaceState=function(t,r,n){var i=this.currentStates.slice(),a=gt(i,t),o=gt(i,r)>=0;a>=0?o?i.splice(a,1):i[a]=r:n&&!o&&i.push(r),this.useStates(i)},e.prototype.toggleState=function(t,r){r?this.useState(t,!0):this.removeState(t)},e.prototype._mergeStates=function(t){for(var r={},n,i=0;i=0&&a.splice(o,1)}),this.animators.push(t),n&&n.animation.addAnimator(t),n&&n.wakeUp()},e.prototype.updateDuringAnimation=function(t){this.markRedraw()},e.prototype.stopAnimation=function(t,r){for(var n=this.animators,i=n.length,a=[],o=0;o0&&r.during&&a[0].during(function(d,m){r.during(m)});for(var p=0;p0||i.force&&!o.length){var T=void 0,M=void 0,C=void 0;if(s){M={},p&&(T={});for(var _=0;_=0&&(i.splice(a,0,r),this._doAdd(r))}return this},t.prototype.replace=function(r,n){var i=gt(this._children,r);return i>=0&&this.replaceAt(n,i),this},t.prototype.replaceAt=function(r,n){var i=this._children,a=i[n];if(r&&r!==this&&r.parent!==this&&r!==a){i[n]=r,a.parent=null;var o=this.__zr;o&&a.removeSelfFromZr(o),this._doAdd(r)}return this},t.prototype._doAdd=function(r){r.parent&&r.parent.remove(r),r.parent=this;var n=this.__zr;n&&n!==r.__zr&&r.addSelfToZr(n),n&&n.refresh()},t.prototype.remove=function(r){var n=this.__zr,i=this._children,a=gt(i,r);return a<0?this:(i.splice(a,1),r.parent=null,n&&r.removeSelfFromZr(n),n&&n.refresh(),this)},t.prototype.removeAll=function(){for(var r=this._children,n=this.__zr,i=0;i0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},e.prototype.wakeUp=function(){this.animation.start(),this._stillFrameAccum=0},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover()},e.prototype.resize=function(t){t=t||{},this.painter.resize(t.width,t.height),this.handler.resize()},e.prototype.clearAnimation=function(){this.animation.clear()},e.prototype.getWidth=function(){return this.painter.getWidth()},e.prototype.getHeight=function(){return this.painter.getHeight()},e.prototype.setCursorStyle=function(t){this.handler.setCursorStyle(t)},e.prototype.findHover=function(t,r){return this.handler.findHover(t,r)},e.prototype.on=function(t,r,n){return this.handler.on(t,r,n),this},e.prototype.off=function(t,r){this.handler.off(t,r)},e.prototype.trigger=function(t,r){this.handler.trigger(t,r)},e.prototype.clear=function(){for(var t=this.storage.getRoots(),r=0;r0){if(e<=i)return o;if(e>=a)return s}else{if(e>=i)return o;if(e<=a)return s}else{if(e===i)return o;if(e===a)return s}return(e-i)/l*u+o}function q(e,t){switch(e){case"center":case"middle":e="50%";break;case"left":case"top":e="0%";break;case"right":case"bottom":e="100%";break}return H(e)?Irt(e).match(/%$/)?parseFloat(e)/100*t:parseFloat(e):e==null?NaN:+e}function pe(e,t,r){return t==null&&(t=10),t=Math.min(Math.max(0,t),wO),e=(+e).toFixed(t),r?e:+e}function sr(e){return e.sort(function(t,r){return t-r}),e}function an(e){if(e=+e,isNaN(e))return 0;if(e>1e-14){for(var t=1,r=0;r<15;r++,t*=10)if(Math.round(e*t)/t===e)return r}return Lrt(e)}function Lrt(e){var t=e.toString().toLowerCase(),r=t.indexOf("e"),n=r>0?+t.slice(r+1):0,i=r>0?r:t.length,a=t.indexOf("."),o=a<0?0:i-1-a;return Math.max(0,o-n)}function Qy(e,t){var r=Math.log,n=Math.LN10,i=Math.floor(r(e[1]-e[0])/n),a=Math.round(r(Math.abs(t[1]-t[0]))/n),o=Math.min(Math.max(-i+a,0),20);return isFinite(o)?o:20}function TO(e,t){var r=Pr(e,function(h,d){return h+(isNaN(d)?0:d)},0);if(r===0)return[];for(var n=Math.pow(10,t),i=F(e,function(h){return(isNaN(h)?0:h)/r*n*100}),a=n*100,o=F(i,function(h){return Math.floor(h)}),s=Pr(o,function(h,d){return h+d},0),l=F(i,function(h,d){return h-o[d]});su&&(u=l[c],f=c);++o[f],l[f]=0,++s}return F(o,function(h){return h/n})}function MO(e,t){var r=Math.max(an(e),an(t)),n=e+t;return r>wO?n:pe(n,r)}var G2=9007199254740991;function H2(e){var t=Math.PI*2;return(e%t+t)%t}function Pd(e){return e>-SO&&e=10&&t++,t}function t0(e,t){var r=Jy(e),n=Math.pow(10,r),i=e/n,a;return t?i<1.5?a=1:i<2.5?a=2:i<4?a=3:i<7?a=5:a=10:i<1?a=1:i<2?a=2:i<3?a=3:i<5?a=5:a=10,e=a*n,r>=-20?+e.toFixed(r<0?-r:0):e}function e0(e,t){var r=(e.length-1)*t+1,n=Math.floor(r),i=+e[n-1],a=r-n;return a?i+a*(e[n]-i):i}function W2(e){e.sort(function(l,u){return s(l,u,0)?-1:1});for(var t=-1/0,r=1,n=0;n=0||a&>(a,l)<0)){var u=n.getShallow(l,t);u!=null&&(o[e[s][0]]=u)}}return o}}var $rt=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],jrt=Pn($rt),WO=function(){function e(){}return e.prototype.getAreaStyle=function(t,r){return jrt(this,t,r)},e}();var K2=new Ba(50);function XO(e){if(typeof e=="string"){var t=K2.get(e);return t&&t.image}else return e}function zd(e,t,r,n,i){if(e)if(typeof e=="string"){if(t&&t.__zrImageSrc===e||!r)return t;var a=K2.get(e),o={hostEl:r,cb:n,cbPayload:i};return a?(t=a.image,!Hc(t)&&a.pending.push(o)):(t=Wr.loadImage(e,YO,YO),t.__zrImageSrc=e,K2.put(e,t.__cachedImgObj={image:t,pending:[o]})),t}else return e;else return t}function YO(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t=o;l++)s-=o;var u=En(r,t);return u>s&&(r="",u=0),s=e-u,i.ellipsis=r,i.ellipsisWidth=u,i.contentWidth=s,i.containerWidth=e,i}function KO(e,t){var r=t.containerWidth,n=t.font,i=t.contentWidth;if(!r)return"";var a=En(e,n);if(a<=r)return e;for(var o=0;;o++){if(a<=i||o>=t.maxIterations){e+=t.ellipsis;break}var s=o===0?tnt(e,i,t.ascCharWidth,t.cnCharWidth):a>0?Math.floor(e.length*i/a):0;e=e.substr(0,s),a=En(e,n)}return e===""&&(e=t.placeholder),e}function tnt(e,t,r,n){for(var i=0,a=0,o=e.length;ah&&u){var d=Math.floor(h/s);c=c.slice(0,d)}if(e&&a&&f!=null)for(var m=ZO(f,i,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),v=0;vs&&j2(r,e.substring(s,u),t,o),j2(r,l[2],t,o,l[1]),s=$2.lastIndex}si){S>0?(y.tokens=y.tokens.slice(0,S),v(y,_,x),r.lines=r.lines.slice(0,g+1)):r.lines=r.lines.slice(0,g);break t}var P=w.width,L=P==null||P==="auto";if(typeof P=="string"&&P.charAt(P.length-1)==="%")b.percentWidth=P,f.push(b),b.contentWidth=En(b.text,C);else{if(L){var I=w.backgroundColor,E=I&&I.image;E&&(E=XO(E),Hc(E)&&(b.width=Math.max(b.width,E.width*A/E.height)))}var R=d&&n!=null?n-_:null;R!=null&&R0&&d+n.accumWidth>n.width&&(f=t.split(` +`),u=!0),n.accumWidth=d}else{var m=QO(t,l,n.width,n.breakAll,n.accumWidth);n.accumWidth=m.accumWidth+h,c=m.linesWidths,f=m.lines}}else f=t.split(` +`);for(var v=0;v=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var int=Pr(",&?/;] ".split(""),function(e,t){return e[t]=!0,e},{});function ant(e){return nnt(e)?!!int[e]:!0}function QO(e,t,r,n,i){for(var a=[],o=[],s="",l="",u=0,f=0,c=0;cr:i+f+h>r){f?(s||l)&&(d?(s||(s=l,l="",u=0,f=u),a.push(s),o.push(f-u),l+=p,u+=h,s="",f=u):(l&&(s+=l,l="",u=0),a.push(s),o.push(f),s=p,f=h)):d?(a.push(l),o.push(u),l=p,u=h):(a.push(p),o.push(h));continue}f+=h,d?(l+=p,u+=h):(l&&(s+=l,l="",u=0),s+=p)}return!a.length&&!s&&(s=e,l="",u=0),l&&(s+=l),s&&(a.push(s),o.push(f)),a.length===1&&(f+=i),{accumWidth:f,lines:a,linesWidths:o}}var tT="__zr_style_"+Math.round(Math.random()*10),Ha={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},Au={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Ha[tT]=!0;var JO=["z","z2","invisible"],ont=["invisible"],snt=function(e){N(t,e);function t(r){return e.call(this,r)||this}return t.prototype._init=function(r){for(var n=St(r),i=0;i1e-4){s[0]=e-r,s[1]=t-n,l[0]=e+r,l[1]=t+n;return}if(o0[0]=rT(i)*r+e,o0[1]=eT(i)*n+t,s0[0]=rT(a)*r+e,s0[1]=eT(a)*n+t,u(s,o0,s0),f(l,o0,s0),i=i%Cu,i<0&&(i=i+Cu),a=a%Cu,a<0&&(a=a+Cu),i>a&&!o?a+=Cu:ii&&(l0[0]=rT(h)*r+e,l0[1]=eT(h)*n+t,u(s,l0,s),f(l,l0,l))}var Se={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Eu=[],Iu=[],Wa=[],Fs=[],Ya=[],Xa=[],iT=Math.min,aT=Math.max,Lu=Math.cos,Pu=Math.sin,Oo=Math.abs,lT=Math.PI,Gs=lT*2,oT=typeof Float32Array<"u",Ud=[];function sT(e){var t=Math.round(e/lT*1e8)/1e8;return t%2*lT}function uT(e,t){var r=sT(e[0]);r<0&&(r+=Gs);var n=r-e[0],i=e[1];i+=n,!t&&i-r>=Gs?i=r+Gs:t&&r-i>=Gs?i=r-Gs:!t&&r>i?i=r+(Gs-sT(r-i)):t&&r0&&(this._ux=Oo(n/_u/t)||0,this._uy=Oo(n/_u/r)||0)},e.prototype.setDPR=function(t){this.dpr=t},e.prototype.setContext=function(t){this._ctx=t},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(t,r){return this._drawPendingPt(),this.addData(Se.M,t,r),this._ctx&&this._ctx.moveTo(t,r),this._x0=t,this._y0=r,this._xi=t,this._yi=r,this},e.prototype.lineTo=function(t,r){var n=Oo(t-this._xi),i=Oo(r-this._yi),a=n>this._ux||i>this._uy;if(this.addData(Se.L,t,r),this._ctx&&a&&this._ctx.lineTo(t,r),a)this._xi=t,this._yi=r,this._pendingPtDist=0;else{var o=n*n+i*i;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=r,this._pendingPtDist=o)}return this},e.prototype.bezierCurveTo=function(t,r,n,i,a,o){return this._drawPendingPt(),this.addData(Se.C,t,r,n,i,a,o),this._ctx&&this._ctx.bezierCurveTo(t,r,n,i,a,o),this._xi=a,this._yi=o,this},e.prototype.quadraticCurveTo=function(t,r,n,i){return this._drawPendingPt(),this.addData(Se.Q,t,r,n,i),this._ctx&&this._ctx.quadraticCurveTo(t,r,n,i),this._xi=n,this._yi=i,this},e.prototype.arc=function(t,r,n,i,a,o){this._drawPendingPt(),Ud[0]=i,Ud[1]=a,uT(Ud,o),i=Ud[0],a=Ud[1];var s=a-i;return this.addData(Se.A,t,r,n,n,i,s,0,o?0:1),this._ctx&&this._ctx.arc(t,r,n,i,a,o),this._xi=Lu(a)*n+t,this._yi=Pu(a)*n+r,this},e.prototype.arcTo=function(t,r,n,i,a){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,r,n,i,a),this},e.prototype.rect=function(t,r,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,r,n,i),this.addData(Se.R,t,r,n,i),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(Se.Z);var t=this._ctx,r=this._x0,n=this._y0;return t&&t.closePath(),this._xi=r,this._yi=n,this},e.prototype.fill=function(t){t&&t.fill(),this.toStatic()},e.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(t){var r=t.length;!(this.data&&this.data.length===r)&&oT&&(this.data=new Float32Array(r));for(var n=0;nf.length&&(this._expandData(),f=this.data);for(var c=0;c0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},e.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],r=0;r11&&(this.data=new Float32Array(t)))}},e.prototype.getBoundingRect=function(){Wa[0]=Wa[1]=Ya[0]=Ya[1]=Number.MAX_VALUE,Fs[0]=Fs[1]=Xa[0]=Xa[1]=-Number.MAX_VALUE;var t=this.data,r=0,n=0,i=0,a=0,o;for(o=0;on||Oo(x)>i||p===r-1)&&(m=Math.sqrt(y*y+x*x),a=v,o=g);break}case Se.C:{var _=t[p++],S=t[p++],v=t[p++],g=t[p++],b=t[p++],w=t[p++];m=Fk(a,o,_,S,v,g,b,w,10),a=b,o=w;break}case Se.Q:{var _=t[p++],S=t[p++],v=t[p++],g=t[p++];m=Hk(a,o,_,S,v,g,10),a=v,o=g;break}case Se.A:var T=t[p++],M=t[p++],C=t[p++],A=t[p++],P=t[p++],L=t[p++],I=L+P;p+=1;var E=!t[p++];d&&(s=Lu(P)*C+T,l=Pu(P)*A+M),m=aT(C,A)*iT(Gs,Math.abs(L)),a=Lu(I)*C+T,o=Pu(I)*A+M;break;case Se.R:{s=a=t[p++],l=o=t[p++];var R=t[p++],k=t[p++];m=R*2+k*2;break}case Se.Z:{var y=s-a,x=l-o;m=Math.sqrt(y*y+x*x),a=s,o=l;break}}m>=0&&(u[c++]=m,f+=m)}return this._pathLen=f,f},e.prototype.rebuildPath=function(t,r){var n=this.data,i=this._ux,a=this._uy,o=this._len,s,l,u,f,c,p,h=r<1,d,m,v=0,g=0,y,x=0,_,S;if(!(h&&(this._pathSegLen||this._calculateLength(),d=this._pathSegLen,m=this._pathLen,y=r*m,!y)))t:for(var b=0;b0&&(t.lineTo(_,S),x=0),w){case Se.M:s=u=n[b++],l=f=n[b++],t.moveTo(u,f);break;case Se.L:{c=n[b++],p=n[b++];var M=Oo(c-u),C=Oo(p-f);if(M>i||C>a){if(h){var A=d[g++];if(v+A>y){var P=(y-v)/A;t.lineTo(u*(1-P)+c*P,f*(1-P)+p*P);break t}v+=A}t.lineTo(c,p),u=c,f=p,x=0}else{var L=M*M+C*C;L>x&&(_=c,S=p,x=L)}break}case Se.C:{var I=n[b++],E=n[b++],R=n[b++],k=n[b++],O=n[b++],z=n[b++];if(h){var A=d[g++];if(v+A>y){var P=(y-v)/A;xi(u,I,R,O,P,Eu),xi(f,E,k,z,P,Iu),t.bezierCurveTo(Eu[1],Iu[1],Eu[2],Iu[2],Eu[3],Iu[3]);break t}v+=A}t.bezierCurveTo(I,E,R,k,O,z),u=O,f=z;break}case Se.Q:{var I=n[b++],E=n[b++],R=n[b++],k=n[b++];if(h){var A=d[g++];if(v+A>y){var P=(y-v)/A;ks(u,I,R,P,Eu),ks(f,E,k,P,Iu),t.quadraticCurveTo(Eu[1],Iu[1],Eu[2],Iu[2]);break t}v+=A}t.quadraticCurveTo(I,E,R,k),u=R,f=k;break}case Se.A:var U=n[b++],G=n[b++],Y=n[b++],et=n[b++],tt=n[b++],lt=n[b++],Mt=n[b++],ut=!n[b++],ct=Y>et?Y:et,K=Oo(Y-et)>.001,ot=tt+lt,Q=!1;if(h){var A=d[g++];v+A>y&&(ot=tt+lt*(y-v)/A,Q=!0),v+=A}if(K&&t.ellipse?t.ellipse(U,G,Y,et,Mt,tt,ot,ut):t.arc(U,G,ct,tt,ot,ut),Q)break t;T&&(s=Lu(tt)*Y+U,l=Pu(tt)*et+G),u=Lu(ot)*Y+U,f=Pu(ot)*et+G;break;case Se.R:s=u=n[b],l=f=n[b+1],c=n[b++],p=n[b++];var W=n[b++],Gt=n[b++];if(h){var A=d[g++];if(v+A>y){var Tt=y-v;t.moveTo(c,p),t.lineTo(c+iT(Tt,W),p),Tt-=W,Tt>0&&t.lineTo(c+W,p+iT(Tt,Gt)),Tt-=Gt,Tt>0&&t.lineTo(c+aT(W-Tt,0),p+Gt),Tt-=W,Tt>0&&t.lineTo(c,p+aT(Gt-Tt,0));break t}v+=A}t.rect(c,p,W,Gt);break;case Se.Z:if(h){var A=d[g++];if(v+A>y){var P=(y-v)/A;t.lineTo(u*(1-P)+s*P,f*(1-P)+l*P);break t}v+=A}t.closePath(),u=s,f=l}}},e.prototype.clone=function(){var t=new e,r=this.data;return t.data=r.slice?r.slice():Array.prototype.slice.call(r),t._len=this._len,t},e.CMD=Se,e.initDefaultProps=function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0}(),e}(),mr=unt;function qa(e,t,r,n,i,a,o){if(i===0)return!1;var s=i,l=0,u=e;if(o>t+s&&o>n+s||oe+s&&a>r+s||at+c&&f>n+c&&f>a+c&&f>s+c||fe+c&&u>r+c&&u>i+c&&u>o+c||ut+u&&l>n+u&&l>a+u||le+u&&s>r+u&&s>i+u||sr||f+ui&&(i+=Vd);var p=Math.atan2(l,s);return p<0&&(p+=Vd),p>=n&&p<=i||p+Vd>=n&&p+Vd<=i}function Ti(e,t,r,n,i,a){if(a>t&&a>n||ai?s:0}var Hs=mr.CMD,Ru=Math.PI*2,pnt=1e-4;function hnt(e,t){return Math.abs(e-t)t&&u>n&&u>a&&u>s||u1&&dnt(),h=Ve(t,n,a,s,Mi[0]),p>1&&(d=Ve(t,n,a,s,Mi[1]))),p===2?vt&&s>n&&s>a||s=0&&u<=1){for(var f=0,c=He(t,n,a,u),p=0;pr||s<-r)return 0;var l=Math.sqrt(r*r-s*s);ln[0]=-l,ln[1]=l;var u=Math.abs(n-i);if(u<1e-4)return 0;if(u>=Ru-1e-4){n=0,i=Ru;var f=a?1:-1;return o>=ln[0]+e&&o<=ln[1]+e?f:0}if(n>i){var c=n;n=i,i=c}n<0&&(n+=Ru,i+=Ru);for(var p=0,h=0;h<2;h++){var d=ln[h];if(d+e>o){var m=Math.atan2(s,d),f=a?1:-1;m<0&&(m=Ru+m),(m>=n&&m<=i||m+Ru>=n&&m+Ru<=i)&&(m>Math.PI/2&&m1&&(r||(s+=Ti(l,u,f,c,n,i))),v&&(l=a[d],u=a[d+1],f=l,c=u),m){case Hs.M:f=a[d++],c=a[d++],l=f,u=c;break;case Hs.L:if(r){if(qa(l,u,a[d],a[d+1],t,n,i))return!0}else s+=Ti(l,u,a[d],a[d+1],n,i)||0;l=a[d++],u=a[d++];break;case Hs.C:if(r){if(sz(l,u,a[d++],a[d++],a[d++],a[d++],a[d],a[d+1],t,n,i))return!0}else s+=vnt(l,u,a[d++],a[d++],a[d++],a[d++],a[d],a[d+1],n,i)||0;l=a[d++],u=a[d++];break;case Hs.Q:if(r){if(u0(l,u,a[d++],a[d++],a[d],a[d+1],t,n,i))return!0}else s+=mnt(l,u,a[d++],a[d++],a[d],a[d+1],n,i)||0;l=a[d++],u=a[d++];break;case Hs.A:var g=a[d++],y=a[d++],x=a[d++],_=a[d++],S=a[d++],b=a[d++];d+=1;var w=!!(1-a[d++]);p=Math.cos(S)*x+g,h=Math.sin(S)*_+y,v?(f=p,c=h):s+=Ti(l,u,p,h,n,i);var T=(n-g)*_/x+g;if(r){if(fz(g,y,_,S,S+b,w,t,T,i))return!0}else s+=gnt(g,y,_,S,S+b,w,T,i);l=Math.cos(S+b)*x+g,u=Math.sin(S+b)*_+y;break;case Hs.R:f=l=a[d++],c=u=a[d++];var M=a[d++],C=a[d++];if(p=f+M,h=c+C,r){if(qa(f,c,p,c,t,n,i)||qa(p,c,p,h,t,n,i)||qa(p,h,f,h,t,n,i)||qa(f,h,f,c,t,n,i))return!0}else s+=Ti(p,c,p,h,n,i),s+=Ti(f,h,f,c,n,i);break;case Hs.Z:if(r){if(qa(l,u,f,c,t,n,i))return!0}else s+=Ti(l,u,f,c,n,i);l=f,u=c;break}}return!r&&!hnt(u,c)&&(s+=Ti(l,u,f,c,n,i)||0),s!==0}function pz(e,t,r){return cz(e,0,!1,t,r)}function hz(e,t,r,n){return cz(e,t,!0,r,n)}var Wc=J({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Ha),xnt={style:J({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},Au.style)},fT=ri.concat(["invisible","culling","z","z2","zlevel","parent"]),_nt=function(e){N(t,e);function t(r){return e.call(this,r)||this}return t.prototype.update=function(){var r=this;e.prototype.update.call(this);var n=this.style;if(n.decal){var i=this._decalEl=this._decalEl||new t;i.buildPath===t.prototype.buildPath&&(i.buildPath=function(l){r.buildPath(l,r.shape)}),i.silent=!0;var a=i.style;for(var o in n)a[o]!==n[o]&&(a[o]=n[o]);a.fill=n.fill?n.decal:null,a.decal=null,a.shadowColor=null,n.strokeFirst&&(a.stroke=null);for(var s=0;s.5?Id:n>.2?hO:Ld}else if(r)return Ld}return Id},t.prototype.getInsideTextStroke=function(r){var n=this.style.fill;if(H(n)){var i=this.__zr,a=!!(i&&i.isDarkMode()),o=kc(r,0)0))},t.prototype.hasFill=function(){var r=this.style,n=r.fill;return n!=null&&n!=="none"},t.prototype.getBoundingRect=function(){var r=this._rect,n=this.style,i=!r;if(i){var a=!1;this.path||(a=!0,this.createPathProxy());var o=this.path;(a||this.__dirty&Ps)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),r=o.getBoundingRect()}if(this._rect=r,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=r.clone());if(this.__dirty||i){s.copy(r);var l=n.strokeNoScale?this.getLineScale():1,u=n.lineWidth;if(!this.hasFill()){var f=this.strokeContainThreshold;u=Math.max(u,f??4)}l>1e-10&&(s.width+=u/l,s.height+=u/l,s.x-=u/l/2,s.y-=u/l/2)}return s}return r},t.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect(),o=this.style;if(r=i[0],n=i[1],a.contain(r,n)){var s=this.path;if(this.hasStroke()){var l=o.lineWidth,u=o.strokeNoScale?this.getLineScale():1;if(u>1e-10&&(this.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),hz(s,l/u,r,n)))return!0}if(this.hasFill())return pz(s,r,n)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=Ps,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(r){return this.animate("shape",r)},t.prototype.updateDuringAnimation=function(r){r==="style"?this.dirtyStyle():r==="shape"?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(r,n){r==="shape"?this.setShape(n):e.prototype.attrKV.call(this,r,n)},t.prototype.setShape=function(r,n){var i=this.shape;return i||(i=this.shape={}),typeof r=="string"?i[r]=n:V(i,r),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&Ps)},t.prototype.createStyle=function(r){return Is(Wc,r)},t.prototype._innerSaveToNormal=function(r){e.prototype._innerSaveToNormal.call(this,r);var n=this._normalState;r.shape&&!n.shape&&(n.shape=V({},this.shape))},t.prototype._applyStateObj=function(r,n,i,a,o,s){e.prototype._applyStateObj.call(this,r,n,i,a,o,s);var l=!(n&&a),u;if(n&&n.shape?o?a?u=n.shape:(u=V({},i.shape),V(u,n.shape)):(u=V({},a?this.shape:i.shape),V(u,n.shape)):l&&(u=i.shape),u)if(o){this.shape=V({},this.shape);for(var f={},c=St(u),p=0;p0},t.prototype.hasFill=function(){var r=this.style,n=r.fill;return n!=null&&n!=="none"},t.prototype.createStyle=function(r){return Is(bnt,r)},t.prototype.setBoundingRect=function(r){this._rect=r},t.prototype.getBoundingRect=function(){var r=this.style;if(!this._rect){var n=r.text;n!=null?n+="":n="";var i=Ga(n,r.font,r.textAlign,r.textBaseline);if(i.x+=r.x||0,i.y+=r.y||0,this.hasStroke()){var a=r.lineWidth;i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a}this._rect=i}return this._rect},t.initDefaultProps=function(){var r=t.prototype;r.dirtyRectTolerance=10}(),t}(We);dz.prototype.type="tspan";var zo=dz;var Snt=J({x:0,y:0},Ha),wnt={style:J({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},Au.style)};function Tnt(e){return!!(e&&typeof e!="string"&&e.width&&e.height)}var vz=function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createStyle=function(r){return Is(Snt,r)},t.prototype._getSize=function(r){var n=this.style,i=n[r];if(i!=null)return i;var a=Tnt(n.image)?n.image:this.__image;if(!a)return 0;var o=r==="width"?"height":"width",s=n[o];return s==null?a[r]:a[r]/a[o]*s},t.prototype.getWidth=function(){return this._getSize("width")},t.prototype.getHeight=function(){return this._getSize("height")},t.prototype.getAnimationStyleProps=function(){return wnt},t.prototype.getBoundingRect=function(){var r=this.style;return this._rect||(this._rect=new dt(r.x||0,r.y||0,this.getWidth(),this.getHeight())),this._rect},t}(We);vz.prototype.type="image";var me=vz;function mz(e,t){var r=t.x,n=t.y,i=t.width,a=t.height,o=t.r,s,l,u,f;i<0&&(r=r+i,i=-i),a<0&&(n=n+a,a=-a),typeof o=="number"?s=l=u=f=o:o instanceof Array?o.length===1?s=l=u=f=o[0]:o.length===2?(s=u=o[0],l=f=o[1]):o.length===3?(s=o[0],l=f=o[1],u=o[2]):(s=o[0],l=o[1],u=o[2],f=o[3]):s=l=u=f=0;var c;s+l>i&&(c=s+l,s*=i/c,l*=i/c),u+f>i&&(c=u+f,u*=i/c,f*=i/c),l+u>a&&(c=l+u,l*=a/c,u*=a/c),s+f>a&&(c=s+f,s*=a/c,f*=a/c),e.moveTo(r+s,n),e.lineTo(r+i-l,n),l!==0&&e.arc(r+i-l,n+l,l,-Math.PI/2,0),e.lineTo(r+i,n+a-u),u!==0&&e.arc(r+i-u,n+a-u,u,0,Math.PI/2),e.lineTo(r+f,n+a),f!==0&&e.arc(r+f,n+a-f,f,Math.PI/2,Math.PI),e.lineTo(r,n+s),s!==0&&e.arc(r+s,n+s,s,Math.PI,Math.PI*1.5)}var Yc=Math.round;function f0(e,t,r){if(t){var n=t.x1,i=t.x2,a=t.y1,o=t.y2;e.x1=n,e.x2=i,e.y1=a,e.y2=o;var s=r&&r.lineWidth;return s&&(Yc(n*2)===Yc(i*2)&&(e.x1=e.x2=Ws(n,s,!0)),Yc(a*2)===Yc(o*2)&&(e.y1=e.y2=Ws(a,s,!0))),e}}function c0(e,t,r){if(t){var n=t.x,i=t.y,a=t.width,o=t.height;e.x=n,e.y=i,e.width=a,e.height=o;var s=r&&r.lineWidth;return s&&(e.x=Ws(n,s,!0),e.y=Ws(i,s,!0),e.width=Math.max(Ws(n+a,s,!1)-e.x,a===0?0:1),e.height=Math.max(Ws(i+o,s,!1)-e.y,o===0?0:1)),e}}function Ws(e,t,r){if(!t)return e;var n=Yc(e*2);return(n+Yc(t))%2===0?n/2:(n+(r?1:-1))/2}var Cnt=function(){function e(){this.x=0,this.y=0,this.width=0,this.height=0}return e}();var Dnt={},gz=function(e){N(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new Cnt},t.prototype.buildPath=function(r,n){var i,a,o,s;if(this.subPixelOptimize){var l=c0(Dnt,n,this.style);i=l.x,a=l.y,o=l.width,s=l.height,l.r=n.r,n=l}else i=n.x,a=n.y,o=n.width,s=n.height;n.r?mz(r,n):r.rect(i,a,o,s)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(vt);gz.prototype.type="rect";var At=gz;var yz={fill:"#000"},xz=2,Ent={style:J({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},Au.style)},Cz=function(e){N(t,e);function t(r){var n=e.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=yz,n.attr(r),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){e.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var r=0;r0,P=r.width!=null&&(r.overflow==="truncate"||r.overflow==="break"||r.overflow==="breakAll"),L=o.calculatedLineHeight,I=0;I=0&&(I=b[L],I.align==="right");)this._placeToken(I,r,T,g,P,"right",x),M-=I.width,P-=I.width,L--;for(A+=(a-(A-v)-(y-P)-M)/2;C<=L;)I=b[C],this._placeToken(I,r,T,g,A+I.width/2,"center",x),A+=I.width,C++;g+=T}},t.prototype._placeToken=function(r,n,i,a,o,s,l){var u=n.rich[r.styleName]||{};u.text=r.text;var f=r.verticalAlign,c=a+i/2;f==="top"?c=a+r.height/2:f==="bottom"&&(c=a+i-r.height/2);var p=!r.isLineHolder&&cT(u);p&&this._renderBackground(u,n,s==="right"?o-r.width:s==="center"?o-r.width/2:o,c-r.height/2,r.width,r.height);var h=!!u.backgroundColor,d=r.textPadding;d&&(o=Mz(o,s,d),c-=r.height/2-d[0]-r.innerHeight/2);var m=this._getOrCreateChild(zo),v=m.createStyle();m.useStyle(v);var g=this._defaultStyle,y=!1,x=0,_=Tz("fill"in u?u.fill:"fill"in n?n.fill:(y=!0,g.fill)),S=wz("stroke"in u?u.stroke:"stroke"in n?n.stroke:!h&&!l&&(!g.autoStroke||y)?(x=xz,g.stroke):null),b=u.textShadowBlur>0||n.textShadowBlur>0;v.text=r.text,v.x=o,v.y=c,b&&(v.shadowBlur=u.textShadowBlur||n.textShadowBlur||0,v.shadowColor=u.textShadowColor||n.textShadowColor||"transparent",v.shadowOffsetX=u.textShadowOffsetX||n.textShadowOffsetX||0,v.shadowOffsetY=u.textShadowOffsetY||n.textShadowOffsetY||0),v.textAlign=s,v.textBaseline="middle",v.font=r.font||Qn,v.opacity=cr(u.opacity,n.opacity,1),bz(v,u),S&&(v.lineWidth=cr(u.lineWidth,n.lineWidth,x),v.lineDash=bt(u.lineDash,n.lineDash),v.lineDashOffset=n.lineDashOffset||0,v.stroke=S),_&&(v.fill=_);var w=r.contentWidth,T=r.contentHeight;m.setBoundingRect(new dt(zc(v.x,w,v.textAlign),wu(v.y,T,v.textBaseline),w,T))},t.prototype._renderBackground=function(r,n,i,a,o,s){var l=r.backgroundColor,u=r.borderWidth,f=r.borderColor,c=l&&l.image,p=l&&!c,h=r.borderRadius,d=this,m,v;if(p||r.lineHeight||u&&f){m=this._getOrCreateChild(At),m.useStyle(m.createStyle()),m.style.fill=null;var g=m.shape;g.x=i,g.y=a,g.width=o,g.height=s,g.r=h,m.dirtyShape()}if(p){var y=m.style;y.fill=l||null,y.fillOpacity=bt(r.fillOpacity,1)}else if(c){v=this._getOrCreateChild(me),v.onload=function(){d.dirtyStyle()};var x=v.style;x.image=l.image,x.x=i,x.y=a,x.width=o,x.height=s}if(u&&f){var y=m.style;y.lineWidth=u,y.stroke=f,y.strokeOpacity=bt(r.strokeOpacity,1),y.lineDash=r.borderDash,y.lineDashOffset=r.borderDashOffset||0,m.strokeContainThreshold=0,m.hasFill()&&m.hasStroke()&&(y.strokeFirst=!0,y.lineWidth*=2)}var _=(m||v).style;_.shadowBlur=r.shadowBlur||0,_.shadowColor=r.shadowColor||"transparent",_.shadowOffsetX=r.shadowOffsetX||0,_.shadowOffsetY=r.shadowOffsetY||0,_.opacity=cr(r.opacity,n.opacity,1)},t.makeFont=function(r){var n="";return hT(r)&&(n=[r.fontStyle,r.fontWeight,pT(r.fontSize),r.fontFamily||"sans-serif"].join(" ")),n&&pr(n)||r.textFont||r.font},t}(We),Int={left:!0,right:1,center:1},Lnt={top:1,bottom:1,middle:1},_z=["fontStyle","fontWeight","fontSize","fontFamily"];function pT(e){return typeof e=="string"&&(e.indexOf("px")!==-1||e.indexOf("rem")!==-1||e.indexOf("em")!==-1)?e:isNaN(+e)?fy+"px":e+"px"}function bz(e,t){for(var r=0;r<_z.length;r++){var n=_z[r],i=t[n];i!=null&&(e[n]=i)}}function hT(e){return e.fontSize!=null||e.fontFamily||e.fontWeight}function Pnt(e){return Sz(e),D(e.rich,Sz),e}function Sz(e){if(e){e.font=Cz.makeFont(e);var t=e.align;t==="middle"&&(t="center"),e.align=t==null||Int[t]?t:"left";var r=e.verticalAlign;r==="center"&&(r="middle"),e.verticalAlign=r==null||Lnt[r]?r:"top";var n=e.padding;n&&(e.padding=Mc(e.padding))}}function wz(e,t){return e==null||t<=0||e==="transparent"||e==="none"?null:e.image||e.colorStops?"#000":e}function Tz(e){return e==null||e==="none"?null:e.image||e.colorStops?"#000":e}function Mz(e,t,r){return t==="right"?e-r[1]:t==="center"?e+r[3]/2-r[1]/2:e+r[3]}function Az(e){var t=e.text;return t!=null&&(t+=""),t}function cT(e){return!!(e.backgroundColor||e.lineHeight||e.borderWidth&&e.borderColor)}var Lt=Cz;var ht=yt(),Bd=function(e,t,r,n){if(n){var i=ht(n);i.dataIndex=r,i.dataType=t,i.seriesIndex=e,n.type==="group"&&n.traverse(function(a){var o=ht(a);o.seriesIndex=e,o.dataIndex=r,o.dataType=t})}};var Dz=1,Ez={},Oz=yt(),mT=yt(),gT=0,Nu=1,Fd=2,lr=["emphasis","blur","select"],Ys=["normal","emphasis","blur","select"],Uo=10,Rnt=9,Xs="highlight",Gd="downplay",qc="select",Hd="unselect",Zc="toggleSelect";function Xc(e){return e!=null&&e!=="none"}var Iz=new Ba(100);function Lz(e){if(H(e)){var t=Iz.get(e);return t||(t=wd(e,-.1),Iz.put(e,t)),t}else if(Ds(e)){var r=V({},e);return r.colorStops=F(e.colorStops,function(n){return{offset:n.offset,color:wd(n.color,-.1)}}),r}return e}function h0(e,t,r){e.onHoverStateChange&&(e.hoverState||0)!==r&&e.onHoverStateChange(t),e.hoverState=r}function zz(e){h0(e,"emphasis",Fd)}function Uz(e){e.hoverState===Fd&&h0(e,"normal",gT)}function yT(e){h0(e,"blur",Nu)}function Vz(e){e.hoverState===Nu&&h0(e,"normal",gT)}function Nnt(e){e.selected=!0}function knt(e){e.selected=!1}function Pz(e,t,r){t(e,r)}function Vo(e,t,r){Pz(e,t,r),e.isGroup&&e.traverse(function(n){Pz(n,t,r)})}function ku(e,t){switch(t){case"emphasis":e.hoverState=Fd;break;case"normal":e.hoverState=gT;break;case"blur":e.hoverState=Nu;break;case"select":e.selected=!0}}function Ont(e,t,r,n){for(var i=e.style,a={},o=0;o=0,a=!1;if(e instanceof vt){var o=Oz(e),s=i&&o.selectFill||o.normalFill,l=i&&o.selectStroke||o.normalStroke;if(Xc(s)||Xc(l)){n=n||{};var u=n.style||{};u.fill==="inherit"?(a=!0,n=V({},n),u=V({},u),u.fill=s):!Xc(u.fill)&&Xc(s)?(a=!0,n=V({},n),u=V({},u),u.fill=Lz(s)):!Xc(u.stroke)&&Xc(l)&&(a||(n=V({},n),u=V({},u)),u.stroke=Lz(l)),n.style=u}}if(n&&n.z2==null){a||(n=V({},n));var f=e.z2EmphasisLift;n.z2=e.z2+(f??Uo)}return n}function Unt(e,t,r){if(r&&r.z2==null){r=V({},r);var n=e.z2SelectLift;r.z2=e.z2+(n??Rnt)}return r}function Vnt(e,t,r){var n=gt(e.currentStates,t)>=0,i=e.style.opacity,a=n?null:Ont(e,["opacity"],t,{opacity:1});r=r||{};var o=r.style||{};return o.opacity==null&&(r=V({},r),o=V({opacity:n?i:a.opacity*.1},o),r.style=o),r}function dT(e,t){var r=this.states[e];if(this.style){if(e==="emphasis")return znt(this,e,t,r);if(e==="blur")return Vnt(this,e,r);if(e==="select")return Unt(this,e,r)}return r}function na(e){e.stateProxy=dT;var t=e.getTextContent(),r=e.getTextGuideLine();t&&(t.stateProxy=dT),r&&(r.stateProxy=dT)}function Rz(e,t){!Bz(e,t)&&!e.__highByOuter&&Vo(e,zz)}function Nz(e,t){!Bz(e,t)&&!e.__highByOuter&&Vo(e,Uz)}function Yr(e,t){e.__highByOuter|=1<<(t||0),Vo(e,zz)}function Xr(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&Vo(e,Uz)}function d0(e){Vo(e,yT)}function Wd(e){Vo(e,Vz)}function xT(e){Vo(e,Nnt)}function _T(e){Vo(e,knt)}function Bz(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function bT(e){var t=e.getModel(),r=[],n=[];t.eachComponent(function(i,a){var o=mT(a),s=i==="series",l=s?e.getViewOfSeriesModel(a):e.getViewOfComponentModel(a);!s&&n.push(l),o.isBlured&&(l.group.traverse(function(u){Vz(u)}),s&&r.push(a)),o.isBlured=!1}),D(n,function(i){i&&i.toggleBlurSeries&&i.toggleBlurSeries(r,!1,t)})}function vT(e,t,r,n){var i=n.getModel();r=r||"coordinateSystem";function a(u,f){for(var c=0;c0){var l={dataIndex:s,seriesIndex:r.seriesIndex};o!=null&&(l.dataType=o),t.push(l)}})}),t}function Za(e,t,r){Bo(e,!0),Vo(e,na),m0(e,t,r)}function Bnt(e){Bo(e,!1)}function Zt(e,t,r,n){n?Bnt(e):Za(e,t,r)}function m0(e,t,r){var n=ht(e);t!=null?(n.focus=t,n.blurScope=r):n.focus&&(n.focus=null)}var kz=["emphasis","blur","select"],Fnt={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function we(e,t,r,n){r=r||"itemStyle";for(var i=0;iKd,BezierCurve:()=>Uu,BoundingRect:()=>dt,Circle:()=>Sr,CompoundPath:()=>Qc,Ellipse:()=>Xd,Group:()=>nt,Image:()=>me,IncrementalDisplayable:()=>y5,Line:()=>De,LinearGradient:()=>$a,OrientedBoundingRect:()=>Jc,Path:()=>vt,Point:()=>kt,Polygon:()=>Re,Polyline:()=>Ie,RadialGradient:()=>M0,Rect:()=>At,Ring:()=>zu,Sector:()=>Ye,Text:()=>Lt,applyTransform:()=>Or,clipPointsByRect:()=>PT,clipRectByRect:()=>_it,createIcon:()=>Yo,extendPath:()=>git,extendShape:()=>vit,getShapeClass:()=>$d,getTransform:()=>oa,groupTransition:()=>Wo,initProps:()=>Kt,isElementRemoved:()=>Fo,lineLineIntersect:()=>A5,linePolygonIntersect:()=>ep,makeImage:()=>LT,makePath:()=>tp,mergePath:()=>Zr,registerShape:()=>aa,removeElement:()=>Ai,removeElementWithFadeOut:()=>Go,resizePath:()=>M5,setTooltipConfig:()=>sa,subPixelOptimize:()=>jd,subPixelOptimizeLine:()=>Ho,subPixelOptimizeRect:()=>yit,transformDirection:()=>Fu,traverseElements:()=>un,updateProps:()=>Rt});var Kc=mr.CMD,Gnt=[[],[],[]],Kz=Math.sqrt,Hnt=Math.atan2;function y0(e,t){if(t){var r=e.data,n=e.len(),i,a,o,s,l,u,f=Kc.M,c=Kc.C,p=Kc.L,h=Kc.R,d=Kc.A,m=Kc.Q;for(o=0,s=0;o1&&(o*=TT(d),s*=TT(d));var m=(i===a?-1:1)*TT((o*o*(s*s)-o*o*(h*h)-s*s*(p*p))/(o*o*(h*h)+s*s*(p*p)))||0,v=m*o*h/s,g=m*-s*p/o,y=(e+r)/2+_0(c)*v-x0(c)*g,x=(t+n)/2+x0(c)*v+_0(c)*g,_=jz([1,0],[(p-v)/o,(h-g)/s]),S=[(p-v)/o,(h-g)/s],b=[(-1*p-v)/o,(-1*h-g)/s],w=jz(S,b);if(MT(S,b)<=-1&&(w=Yd),MT(S,b)>=1&&(w=0),w<0){var T=Math.round(w/Yd*1e6)/1e6;w=Yd*2+T%2*Yd}f.addData(u,y,x,o,s,_,w,c,a)}var Wnt=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,Ynt=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Xnt(e){var t=new mr;if(!e)return t;var r=0,n=0,i=r,a=n,o,s=mr.CMD,l=e.match(Wnt);if(!l)return t;for(var u=0;uI*I+E*E&&(T=C,M=A),{cx:T,cy:M,x0:-f,y0:-c,x1:T*(i/S-1),y1:M*(i/S-1)}}function Qnt(e){var t;if(B(e)){var r=e.length;if(!r)return e;r===1?t=[e[0],e[0],0,0]:r===2?t=[e[0],e[0],e[1],e[1]]:r===3?t=e.concat(e[2]):t=e}else t=[e,e,e,e];return t}function l5(e,t){var r,n=qd(t.r,0),i=qd(t.r0||0,0),a=n>0,o=i>0;if(!(!a&&!o)){if(a||(n=i,i=0),i>n){var s=n;n=i,i=s}var l=t.startAngle,u=t.endAngle;if(!(isNaN(l)||isNaN(u))){var f=t.cx,c=t.cy,p=!!t.clockwise,h=o5(u-l),d=h>AT&&h%AT;if(d>ia&&(h=d),!(n>ia))e.moveTo(f,c);else if(h>AT-ia)e.moveTo(f+n*jc(l),c+n*Ou(l)),e.arc(f,c,n,l,u,!p),i>ia&&(e.moveTo(f+i*jc(u),c+i*Ou(u)),e.arc(f,c,i,u,l,p));else{var m=void 0,v=void 0,g=void 0,y=void 0,x=void 0,_=void 0,S=void 0,b=void 0,w=void 0,T=void 0,M=void 0,C=void 0,A=void 0,P=void 0,L=void 0,I=void 0,E=n*jc(l),R=n*Ou(l),k=i*jc(u),O=i*Ou(u),z=h>ia;if(z){var U=t.cornerRadius;U&&(r=Qnt(U),m=r[0],v=r[1],g=r[2],y=r[3]);var G=o5(n-i)/2;if(x=Ka(G,g),_=Ka(G,y),S=Ka(G,m),b=Ka(G,v),M=w=qd(x,_),C=T=qd(S,b),(w>ia||T>ia)&&(A=n*jc(u),P=n*Ou(u),L=i*jc(l),I=i*Ou(l),hia){var K=Ka(g,M),ot=Ka(y,M),Q=S0(L,I,E,R,n,K,p),W=S0(A,P,k,O,n,ot,p);e.moveTo(f+Q.cx+Q.x0,c+Q.cy+Q.y0),M0&&e.arc(f+Q.cx,c+Q.cy,K,qr(Q.y0,Q.x0),qr(Q.y1,Q.x1),!p),e.arc(f,c,n,qr(Q.cy+Q.y1,Q.cx+Q.x1),qr(W.cy+W.y1,W.cx+W.x1),!p),ot>0&&e.arc(f+W.cx,c+W.cy,ot,qr(W.y1,W.x1),qr(W.y0,W.x0),!p))}else e.moveTo(f+E,c+R),e.arc(f,c,n,l,u,!p);if(!(i>ia)||!z)e.lineTo(f+k,c+O);else if(C>ia){var K=Ka(m,C),ot=Ka(v,C),Q=S0(k,O,A,P,i,-ot,p),W=S0(E,R,L,I,i,-K,p);e.lineTo(f+Q.cx+Q.x0,c+Q.cy+Q.y0),C0&&e.arc(f+Q.cx,c+Q.cy,ot,qr(Q.y0,Q.x0),qr(Q.y1,Q.x1),!p),e.arc(f,c,i,qr(Q.cy+Q.y1,Q.cx+Q.x1),qr(W.cy+W.y1,W.cx+W.x1),p),K>0&&e.arc(f+W.cx,c+W.cy,K,qr(W.y1,W.x1),qr(W.y0,W.x0),!p))}else e.lineTo(f+k,c+O),e.arc(f,c,i,u,l,p)}e.closePath()}}}var tit=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return e}();var u5=function(e){N(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new tit},t.prototype.buildPath=function(r,n){l5(r,n)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(vt);u5.prototype.type="sector";var Ye=u5;var eit=function(){function e(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return e}();var f5=function(e){N(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new eit},t.prototype.buildPath=function(r,n){var i=n.cx,a=n.cy,o=Math.PI*2;r.moveTo(i+n.r,a),r.arc(i,a,n.r,0,o,!1),r.moveTo(i+n.r0,a),r.arc(i,a,n.r0,0,o,!0)},t}(vt);f5.prototype.type="ring";var zu=f5;function CT(e,t,r,n){var i=[],a=[],o=[],s=[],l,u,f,c;if(n){f=[1/0,1/0],c=[-1/0,-1/0];for(var p=0,h=e.length;p=2){if(n){var a=CT(i,n,r,t.smoothConstraint);e.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(r?o:o-1);s++){var l=a[s*2],u=a[s*2+1],f=i[(s+1)%o];e.bezierCurveTo(l[0],l[1],u[0],u[1],f[0],f[1])}}else{e.moveTo(i[0][0],i[0][1]);for(var s=1,c=i.length;sBu[1]){if(s=!1,a)return s;var f=Math.abs(Bu[0]-Vu[1]),c=Math.abs(Vu[0]-Bu[1]);Math.min(f,c)>i.len()&&(f0){var c=f.duration,p=f.delay,h=f.easing,d={duration:c,delay:p||0,easing:h,done:a,force:!!a||!!o,setToFinal:!u,scope:e,during:o};s?t.animateFrom(r,d):t.animateTo(r,d)}else t.stopAnimation(),!s&&t.attr(r),o&&o(1),a&&a()}function Rt(e,t,r,n,i,a){DT("update",e,t,r,n,i,a)}function Kt(e,t,r,n,i,a){DT("enter",e,t,r,n,i,a)}function Fo(e){if(!e.__zr)return!0;for(var t=0;tMath.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function S5(e){return!e.isGroup}function xit(e){return e.shape!=null}function Wo(e,t,r){if(!e||!t)return;function n(o){var s={};return o.traverse(function(l){S5(l)&&l.anid&&(s[l.anid]=l)}),s}function i(o){var s={x:o.x,y:o.y,rotation:o.rotation};return xit(o)&&(s.shape=V({},o.shape)),s}var a=n(e);t.traverse(function(o){if(S5(o)&&o.anid){var s=a[o.anid];if(s){var l=i(o);o.attr(i(s)),Rt(o,l,r,ht(o).dataIndex)}}})}function PT(e,t){return F(e,function(r){var n=r[0];n=D0(n,t.x),n=E0(n,t.x+t.width);var i=r[1];return i=D0(i,t.y),i=E0(i,t.y+t.height),[n,i]})}function _it(e,t){var r=D0(e.x,t.x),n=E0(e.x+e.width,t.x+t.width),i=D0(e.y,t.y),a=E0(e.y+e.height,t.y+t.height);if(n>=r&&a>=i)return{x:r,y:i,width:n-r,height:a-i}}function Yo(e,t,r){var n=V({rectHover:!0},t),i=n.style={strokeNoScale:!0};if(r=r||{x:-1,y:-1,width:2,height:2},e)return e.indexOf("image://")===0?(i.image=e.slice(8),J(i,r),new me(n)):tp(e.replace("path://",""),n,r,"center")}function ep(e,t,r,n,i){for(var a=0,o=i[i.length-1];a1)return!1;var v=ET(h,d,f,c)/p;return!(v<0||v>1)}function ET(e,t,r,n){return e*n-r*t}function bit(e){return e<=1e-6&&e>=-1e-6}function sa(e){var t=e.itemTooltipOption,r=e.componentModel,n=e.itemName,i=H(t)?{formatter:t}:t,a=r.mainType,o=r.componentIndex,s={componentType:a,name:n,$vars:["name"]};s[a+"Index"]=o;var l=e.formatterParamsExtra;l&&D(St(l),function(f){st(s,f)||(s[f]=l[f],s.$vars.push(f))});var u=ht(e.el);u.componentMainType=a,u.componentIndex=o,u.tooltipConfig={name:n,option:J({content:n,formatterParams:s},i)}}function w5(e,t){var r;e.isGroup&&(r=t(e)),r||e.traverse(t)}function un(e,t){if(e)if(B(e))for(var r=0;r=0&&s.push(l)}),s}}function Kr(e,t){return _t(_t({},e,!0),t,!0)}var z5={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:". "}}}};var U5={time:{month:["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"],monthAbbr:["1\u6708","2\u6708","3\u6708","4\u6708","5\u6708","6\u6708","7\u6708","8\u6708","9\u6708","10\u6708","11\u6708","12\u6708"],dayOfWeek:["\u661F\u671F\u65E5","\u661F\u671F\u4E00","\u661F\u671F\u4E8C","\u661F\u671F\u4E09","\u661F\u671F\u56DB","\u661F\u671F\u4E94","\u661F\u671F\u516D"],dayOfWeekAbbr:["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"]},legend:{selector:{all:"\u5168\u9009",inverse:"\u53CD\u9009"}},toolbox:{brush:{title:{rect:"\u77E9\u5F62\u9009\u62E9",polygon:"\u5708\u9009",lineX:"\u6A2A\u5411\u9009\u62E9",lineY:"\u7EB5\u5411\u9009\u62E9",keep:"\u4FDD\u6301\u9009\u62E9",clear:"\u6E05\u9664\u9009\u62E9"}},dataView:{title:"\u6570\u636E\u89C6\u56FE",lang:["\u6570\u636E\u89C6\u56FE","\u5173\u95ED","\u5237\u65B0"]},dataZoom:{title:{zoom:"\u533A\u57DF\u7F29\u653E",back:"\u533A\u57DF\u7F29\u653E\u8FD8\u539F"}},magicType:{title:{line:"\u5207\u6362\u4E3A\u6298\u7EBF\u56FE",bar:"\u5207\u6362\u4E3A\u67F1\u72B6\u56FE",stack:"\u5207\u6362\u4E3A\u5806\u53E0",tiled:"\u5207\u6362\u4E3A\u5E73\u94FA"}},restore:{title:"\u8FD8\u539F"},saveAsImage:{title:"\u4FDD\u5B58\u4E3A\u56FE\u7247",lang:["\u53F3\u952E\u53E6\u5B58\u4E3A\u56FE\u7247"]}},series:{typeNames:{pie:"\u997C\u56FE",bar:"\u67F1\u72B6\u56FE",line:"\u6298\u7EBF\u56FE",scatter:"\u6563\u70B9\u56FE",effectScatter:"\u6D9F\u6F2A\u6563\u70B9\u56FE",radar:"\u96F7\u8FBE\u56FE",tree:"\u6811\u56FE",treemap:"\u77E9\u5F62\u6811\u56FE",boxplot:"\u7BB1\u578B\u56FE",candlestick:"K\u7EBF\u56FE",k:"K\u7EBF\u56FE",heatmap:"\u70ED\u529B\u56FE",map:"\u5730\u56FE",parallel:"\u5E73\u884C\u5750\u6807\u56FE",lines:"\u7EBF\u56FE",graph:"\u5173\u7CFB\u56FE",sankey:"\u6851\u57FA\u56FE",funnel:"\u6F0F\u6597\u56FE",gauge:"\u4EEA\u8868\u76D8\u56FE",pictorialBar:"\u8C61\u5F62\u67F1\u56FE",themeRiver:"\u4E3B\u9898\u6CB3\u6D41\u56FE",sunburst:"\u65ED\u65E5\u56FE"}},aria:{general:{withTitle:"\u8FD9\u662F\u4E00\u4E2A\u5173\u4E8E\u201C{title}\u201D\u7684\u56FE\u8868\u3002",withoutTitle:"\u8FD9\u662F\u4E00\u4E2A\u56FE\u8868\uFF0C"},series:{single:{prefix:"",withName:"\u56FE\u8868\u7C7B\u578B\u662F{seriesType}\uFF0C\u8868\u793A{seriesName}\u3002",withoutName:"\u56FE\u8868\u7C7B\u578B\u662F{seriesType}\u3002"},multiple:{prefix:"\u5B83\u7531{seriesCount}\u4E2A\u56FE\u8868\u7CFB\u5217\u7EC4\u6210\u3002",withName:"\u7B2C{seriesId}\u4E2A\u7CFB\u5217\u662F\u4E00\u4E2A\u8868\u793A{seriesName}\u7684{seriesType}\uFF0C",withoutName:"\u7B2C{seriesId}\u4E2A\u7CFB\u5217\u662F\u4E00\u4E2A{seriesType}\uFF0C",separator:{middle:"\uFF1B",end:"\u3002"}}},data:{allData:"\u5176\u6570\u636E\u662F\u2014\u2014",partialData:"\u5176\u4E2D\uFF0C\u524D{displayCnt}\u9879\u662F\u2014\u2014",withName:"{name}\u7684\u6570\u636E\u662F{value}",withoutName:"{value}",separator:{middle:"\uFF0C",end:""}}}};var k0="ZH",VT="EN",Jd=VT,N0={},BT={},O0=Ot.domSupported?function(){var e=(document.documentElement.lang||navigator.language||navigator.browserLanguage).toUpperCase();return e.indexOf(k0)>-1?k0:Jd}():Jd;function V5(e,t){e=e.toUpperCase(),BT[e]=new Ht(t),N0[e]=t}function B5(e){if(H(e)){var t=N0[e.toUpperCase()]||{};return e===k0||e===VT?at(t):_t(at(t),at(N0[Jd]),!1)}else return _t(at(e),at(N0[Jd]),!1)}function tv(e){return BT[e]}function F5(){return BT[Jd]}V5(VT,z5);V5(k0,U5);var U0=1e3,V0=U0*60,np=V0*60,ii=np*24,GT=ii*365,ev={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},z0="{yyyy}-{MM}-{dd}",HT={year:"{yyyy}",month:"{yyyy}-{MM}",day:z0,hour:z0+" "+ev.hour,minute:z0+" "+ev.minute,second:z0+" "+ev.second,millisecond:ev.none},FT=["year","month","day","hour","minute","second","millisecond"],WT=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function qo(e,t){return e+="","0000".substr(0,t-e.length)+e}function Wu(e){switch(e){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return e}}function G5(e){return e===Wu(e)}function H5(e){switch(e){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function Yu(e,t,r,n){var i=on(e),a=i[B0(r)](),o=i[Hu(r)]()+1,s=Math.floor((o-1)/3)+1,l=i[rv(r)](),u=i["get"+(r?"UTC":"")+"Day"](),f=i[rp(r)](),c=(f-1)%12+1,p=i[nv(r)](),h=i[iv(r)](),d=i[av(r)](),m=n instanceof Ht?n:tv(n||O0)||F5(),v=m.getModel("time"),g=v.get("month"),y=v.get("monthAbbr"),x=v.get("dayOfWeek"),_=v.get("dayOfWeekAbbr");return(t||"").replace(/{yyyy}/g,a+"").replace(/{yy}/g,qo(a%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,g[o-1]).replace(/{MMM}/g,y[o-1]).replace(/{MM}/g,qo(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,qo(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,x[u]).replace(/{ee}/g,_[u]).replace(/{e}/g,u+"").replace(/{HH}/g,qo(f,2)).replace(/{H}/g,f+"").replace(/{hh}/g,qo(c+"",2)).replace(/{h}/g,c+"").replace(/{mm}/g,qo(p,2)).replace(/{m}/g,p+"").replace(/{ss}/g,qo(h,2)).replace(/{s}/g,h+"").replace(/{SSS}/g,qo(d,3)).replace(/{S}/g,d+"")}function W5(e,t,r,n,i){var a=null;if(H(r))a=r;else if(j(r))a=r(e.value,t,{level:e.level});else{var o=V({},ev);if(e.level>0)for(var s=0;s=0;--s)if(l[u]){a=l[u];break}a=a||o.none}if(B(a)){var c=e.level==null?0:e.level>=0?e.level:a.length+e.level;c=Math.min(c,a.length-1),a=a[c]}}return Yu(new Date(e.value),a,i,n)}function Y5(e,t){var r=on(e),n=r[Hu(t)]()+1,i=r[rv(t)](),a=r[rp(t)](),o=r[nv(t)](),s=r[iv(t)](),l=r[av(t)](),u=l===0,f=u&&s===0,c=f&&o===0,p=c&&a===0,h=p&&i===1,d=h&&n===1;return d?"year":h?"month":p?"day":c?"hour":f?"minute":u?"second":"millisecond"}function YT(e,t,r){var n=Ct(e)?on(e):e;switch(t=t||Y5(e,r),t){case"year":return n[B0(r)]();case"half-year":return n[Hu(r)]()>=6?1:0;case"quarter":return Math.floor((n[Hu(r)]()+1)/4);case"month":return n[Hu(r)]();case"day":return n[rv(r)]();case"half-day":return n[rp(r)]()/24;case"hour":return n[rp(r)]();case"minute":return n[nv(r)]();case"second":return n[iv(r)]();case"millisecond":return n[av(r)]()}}function B0(e){return e?"getUTCFullYear":"getFullYear"}function Hu(e){return e?"getUTCMonth":"getMonth"}function rv(e){return e?"getUTCDate":"getDate"}function rp(e){return e?"getUTCHours":"getHours"}function nv(e){return e?"getUTCMinutes":"getMinutes"}function iv(e){return e?"getUTCSeconds":"getSeconds"}function av(e){return e?"getUTCMilliseconds":"getMilliseconds"}function X5(e){return e?"setUTCFullYear":"setFullYear"}function XT(e){return e?"setUTCMonth":"setMonth"}function qT(e){return e?"setUTCDate":"setDate"}function ZT(e){return e?"setUTCHours":"setHours"}function KT(e){return e?"setUTCMinutes":"setMinutes"}function $T(e){return e?"setUTCSeconds":"setSeconds"}function jT(e){return e?"setUTCMilliseconds":"setMilliseconds"}function JT(e){if(!Rd(e))return H(e)?e:"-";var t=(e+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function F0(e,t){return e=(e||"").toLowerCase().replace(/-(.)/g,function(r,n){return n.toUpperCase()}),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}var la=Mc;function G0(e,t,r){var n="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function i(f){return f&&pr(f)?f:"-"}function a(f){return!!(f!=null&&!isNaN(f)&&isFinite(f))}var o=t==="time",s=e instanceof Date;if(o||s){var l=o?on(e):e;if(isNaN(+l)){if(s)return"-"}else return Yu(l,n,r)}if(t==="ordinal")return cd(e)?i(e):Ct(e)&&a(e)?e+"":"-";var u=Si(e);return a(u)?JT(u):cd(e)?i(e):typeof e=="boolean"?e+"":"-"}var q5=["a","b","c","d","e","f","g"],QT=function(e,t){return"{"+e+(t??"")+"}"};function H0(e,t,r){B(t)||(t=[t]);var n=t.length;if(!n)return"";for(var i=t[0].$vars||[],a=0;a':'';var o=r.markerId||"markerX";return{renderMode:a,content:"{"+o+"|} ",style:i==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:n}:{width:10,height:10,borderRadius:5,backgroundColor:n}}}function ua(e,t){return t=t||"transparent",H(e)?e:rt(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}function Xu(e,t){if(t==="_blank"||t==="blank"){var r=window.open();r.opener=null,r.location.href=e}else window.open(e,t)}var W0=D,tM=["left","right","top","bottom","width","height"],qu=[["width","left","right"],["height","top","bottom"]];function eM(e,t,r,n,i){var a=0,o=0;n==null&&(n=1/0),i==null&&(i=1/0);var s=0;t.eachChild(function(l,u){var f=l.getBoundingRect(),c=t.childAt(u+1),p=c&&c.getBoundingRect(),h,d;if(e==="horizontal"){var m=f.width+(p?-p.x+f.x:0);h=a+m,h>n||l.newline?(a=0,h=m,o+=s+r,s=f.height):s=Math.max(s,f.height)}else{var v=f.height+(p?-p.y+f.y:0);d=o+v,d>i||l.newline?(a+=s+r,o=0,d=v,s=f.width):s=Math.max(s,f.width)}l.newline||(l.x=a,l.y=o,l.markRedraw(),e==="horizontal"?a=h+r:o=d+r)})}var fa=eM,RDt=pt(eM,"vertical"),NDt=pt(eM,"horizontal");function $5(e,t,r){var n=t.width,i=t.height,a=q(e.left,n),o=q(e.top,i),s=q(e.right,n),l=q(e.bottom,i);return(isNaN(a)||isNaN(parseFloat(e.left)))&&(a=0),(isNaN(s)||isNaN(parseFloat(e.right)))&&(s=n),(isNaN(o)||isNaN(parseFloat(e.top)))&&(o=0),(isNaN(l)||isNaN(parseFloat(e.bottom)))&&(l=i),r=la(r||0),{width:Math.max(s-a-r[1]-r[3],0),height:Math.max(l-o-r[0]-r[2],0)}}function re(e,t,r){r=la(r||0);var n=t.width,i=t.height,a=q(e.left,n),o=q(e.top,i),s=q(e.right,n),l=q(e.bottom,i),u=q(e.width,n),f=q(e.height,i),c=r[2]+r[0],p=r[1]+r[3],h=e.aspect;switch(isNaN(u)&&(u=n-s-p-a),isNaN(f)&&(f=i-l-c-o),h!=null&&(isNaN(u)&&isNaN(f)&&(h>n/i?u=n*.8:f=i*.8),isNaN(u)&&(u=h*f),isNaN(f)&&(f=u/h)),isNaN(a)&&(a=n-s-u-p),isNaN(o)&&(o=i-l-f-c),e.left||e.right){case"center":a=n/2-u/2-r[3];break;case"right":a=n-u-p;break}switch(e.top||e.bottom){case"middle":case"center":o=i/2-f/2-r[0];break;case"bottom":o=i-f-c;break}a=a||0,o=o||0,isNaN(u)&&(u=n-p-a-(s||0)),isNaN(f)&&(f=i-c-o-(l||0));var d=new dt(a+r[3],o+r[0],u,f);return d.margin=r,d}function Zs(e,t,r,n,i,a){var o=!i||!i.hv||i.hv[0],s=!i||!i.hv||i.hv[1],l=i&&i.boundingMode||"all";if(a=a||e,a.x=e.x,a.y=e.y,!o&&!s)return!1;var u;if(l==="raw")u=e.type==="group"?new dt(0,0,+t.width||0,+t.height||0):e.getBoundingRect();else if(u=e.getBoundingRect(),e.needLocalTransform()){var f=e.getLocalTransform();u=u.clone(),u.applyTransform(f)}var c=re(J({width:u.width,height:u.height},t),r,n),p=o?c.x-u.x:0,h=s?c.y-u.y:0;return l==="raw"?(a.x=p,a.y=h):(a.x+=p,a.y+=h),a===e&&e.markRedraw(),!0}function j5(e,t){return e[qu[t][0]]!=null||e[qu[t][1]]!=null&&e[qu[t][2]]!=null}function Ks(e){var t=e.layoutMode||e.constructor.layoutMode;return rt(t)?t:t?{type:t}:null}function On(e,t,r){var n=r&&r.ignoreSize;!B(n)&&(n=[n,n]);var i=o(qu[0],0),a=o(qu[1],1);u(qu[0],e,i),u(qu[1],e,a);function o(f,c){var p={},h=0,d={},m=0,v=2;if(W0(f,function(x){d[x]=e[x]}),W0(f,function(x){s(t,x)&&(p[x]=d[x]=t[x]),l(p,x)&&h++,l(d,x)&&m++}),n[c])return l(t,f[1])?d[f[2]]=null:l(t,f[2])&&(d[f[1]]=null),d;if(m===v||!h)return d;if(h>=v)return p;for(var g=0;g=0;l--)s=_t(s,i[l],!0);n.defaultOption=s}return n.defaultOption},t.prototype.getReferringComponents=function(r,n){var i=r+"Index",a=r+"Id";return Vs(this.ecModel,r,{index:this.get(i,!0),id:this.get(a,!0)},n)},t.prototype.getBoxLayoutParams=function(){var r=this;return{left:r.get("left"),top:r.get("top"),right:r.get("right"),bottom:r.get("bottom"),width:r.get("width"),height:r.get("height")}},t.prototype.getZLevelKey=function(){return""},t.prototype.setZLevel=function(r){this.option.zlevel=r},t.protoInitialize=function(){var r=t.prototype;r.type="component",r.id="",r.name="",r.mainType="",r.subType="",r.componentIndex=0}(),t}(Ht);a0(ip,Ht);Bs(ip);k5(ip);O5(ip,Lit);function Lit(e){var t=[];return D(ip.getClassesByMainType(e),function(r){t=t.concat(r.dependencies||r.prototype.dependencies||[])}),t=F(t,function(r){return Ln(r).main}),e!=="dataset"&>(t,"dataset")<=0&&t.unshift("dataset"),t}var Pt=ip;var Q5="";typeof navigator<"u"&&(Q5=navigator.platform||"");var ap="rgba(0, 0, 0, 0.2)",J5={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:ap,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:ap,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:ap,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:ap,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:ap,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:ap,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:Q5.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 Y0=$(["tooltip","label","itemName","itemId","itemGroupId","seriesName"]),wr="original",qe="arrayRows",Ur="objectRows",ai="keyedColumns",oi="typedArray",nM="unknown",zn="column",Zo="row";var gr={Must:1,Might:2,Not:3},t3=yt();function e3(e){t3(e).datasetMap=$()}function X0(e,t,r){var n={},i=q0(t);if(!i||!e)return n;var a=[],o=[],s=t.ecModel,l=t3(s).datasetMap,u=i.uid+"_"+r.seriesLayoutBy,f,c;e=e.slice(),D(e,function(m,v){var g=rt(m)?m:e[v]={name:m};g.type==="ordinal"&&f==null&&(f=v,c=d(g)),n[g.name]=[]});var p=l.get(u)||l.set(u,{categoryWayDim:c,valueWayDim:0});D(e,function(m,v){var g=m.name,y=d(m);if(f==null){var x=p.valueWayDim;h(n[g],x,y),h(o,x,y),p.valueWayDim+=y}else if(f===v)h(n[g],0,y),h(a,0,y);else{var x=p.categoryWayDim;h(n[g],x,y),h(o,x,y),p.categoryWayDim+=y}});function h(m,v,g){for(var y=0;yt)return e[n];return e[r-1]}function s3(e,t,r,n,i,a,o){a=a||e;var s=t(a),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(i))return u[i];var f=o==null||!n?r:Rit(n,o);if(f=f||r,!(!f||!f.length)){var c=f[l];return i&&(u[i]=c),s.paletteIdx=(l+1)%f.length,c}}function Nit(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}var K0,uv,l3,u3="\0_ec_inner",kit=1;var h3=function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(r,n,i,a,o,s){a=a||{},this.option=null,this._theme=new Ht(a),this._locale=new Ht(o),this._optionManager=s},t.prototype.setOption=function(r,n,i){var a=p3(n);this._optionManager.setOption(r,i,a),this._resetOption(null,a)},t.prototype.resetOption=function(r,n){return this._resetOption(r,p3(n))},t.prototype._resetOption=function(r,n){var i=!1,a=this._optionManager;if(!r||r==="recreate"){var o=a.mountOption(r==="recreate");!this.option||r==="recreate"?l3(this,o):(this.restoreData(),this._mergeOption(o,n)),i=!0}if((r==="timeline"||r==="media")&&this.restoreData(),!r||r==="recreate"||r==="timeline"){var s=a.getTimelineOption(this);s&&(i=!0,this._mergeOption(s,n))}if(!r||r==="recreate"||r==="media"){var l=a.getMediaOption(this);l.length&&D(l,function(u){i=!0,this._mergeOption(u,n)},this)}return i},t.prototype.mergeOption=function(r){this._mergeOption(r,null)},t.prototype._mergeOption=function(r,n){var i=this.option,a=this._componentsMap,o=this._componentsCount,s=[],l=$(),u=n&&n.replaceMergeMainTypeMap;e3(this),D(r,function(c,p){c!=null&&(Pt.hasClass(p)?p&&(s.push(p),l.set(p,!0)):i[p]=i[p]==null?at(c):_t(i[p],c,!0))}),u&&u.each(function(c,p){Pt.hasClass(p)&&!l.get(p)&&(s.push(p),l.set(p,!0))}),Pt.topologicalTravel(s,Pt.getAllClassMainTypes(),f,this);function f(c){var p=a3(this,c,Yt(r[c])),h=a.get(c),d=h?u&&u.get(c)?"replaceMerge":"normalMerge":"replaceAll",m=n0(h,p,d);OO(m,c,Pt),i[c]=null,a.set(c,null),o.set(c,0);var v=[],g=[],y=0,x,_;D(m,function(S,b){var w=S.existing,T=S.newOption;if(!T)w&&(w.mergeOption({},this),w.optionUpdated({},!1));else{var M=c==="series",C=Pt.getClass(c,S.keyInfo.subType,!M);if(!C){if(!1)var A,P;return}if(c==="tooltip"){if(x)return;x=!0}if(w&&w.constructor===C)w.name=S.keyInfo.name,w.mergeOption(T,this),w.optionUpdated(T,!1);else{var L=V({componentIndex:b},S.keyInfo);w=new C(T,this,this,L),V(w,L),S.brandNew&&(w.__requireNewView=!0),w.init(T,this,this),w.optionUpdated(null,!0)}}w?(v.push(w.option),g.push(w),y++):(v.push(void 0),g.push(void 0))},this),i[c]=v,a.set(c,g),o.set(c,y),c==="series"&&K0(this)}this._seriesIndices||K0(this)},t.prototype.getOption=function(){var r=at(this.option);return D(r,function(n,i){if(Pt.hasClass(i)){for(var a=Yt(n),o=a.length,s=!1,l=o-1;l>=0;l--)a[l]&&!Bc(a[l])?s=!0:(a[l]=null,!s&&o--);a.length=o,r[i]=a}}),delete r[u3],r},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(r){this._payload=r},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(r,n){var i=this._componentsMap.get(r);if(i){var a=i[n||0];if(a)return a;if(n==null){for(var o=0;o=t:r==="max"?e<=t:e===t}function Xit(e,t){return e.join(",")===t.join(",")}var d3=Git;var ca=D,cv=rt,v3=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function oM(e){var t=e&&e.itemStyle;if(t)for(var r=0,n=v3.length;r=0;v--){var g=e[v];if(s||(d=g.data.rawIndexOf(g.stackedByDimension,h)),d>=0){var y=g.data.getByRawIndex(g.stackResultDimension,d);if(l==="all"||l==="positive"&&y>0||l==="negative"&&y<0||l==="samesign"&&p>=0&&y>0||l==="samesign"&&p<=0&&y<0){p=MO(p,y),m=y;break}}}return n[0]=p,n[1]=m,n})})}var J0=function(){function e(t){this.data=t.data||(t.sourceFormat===ai?{}:[]),this.sourceFormat=t.sourceFormat||nM,this.seriesLayoutBy=t.seriesLayoutBy||zn,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var r=this.dimensionsDefine=t.dimensionsDefine;if(r)for(var n=0;nm&&(m=x)}h[0]=d,h[1]=m}},i=function(){return this._data?this._data.length/this._dimSize:0};T3=(t={},t[qe+"_"+zn]={pure:!0,appendData:a},t[qe+"_"+Zo]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},t[Ur]={pure:!0,appendData:a},t[ai]={pure:!0,appendData:function(o){var s=this._data;D(o,function(l,u){for(var f=s[u]||(s[u]=[]),c=0;c<(l||[]).length;c++)f.push(l[c])})}},t[wr]={appendData:a},t[oi]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},t);function a(o){for(var s=0;s=0&&(m=o.interpolatedValue[v])}return m!=null?m+"":""})}},e.prototype.getRawValue=function(t,r){return jo(this.getData(r),t)},e.prototype.formatTooltip=function(t,r,n){},e}();function mM(e){var t,r;return rt(e)?e.type&&(r=e):t=e,{text:t,frag:r}}function $s(e){return new oat(e)}var oat=function(){function e(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return e.prototype.perform=function(t){var r=this._upstream,n=t&&t.skip;if(this._dirty&&r){var i=this.context;i.data=i.outputData=r.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!n&&(a=this._plan(this.context));var o=f(this._modBy),s=this._modDataCount||0,l=f(t&&t.modBy),u=t&&t.modDataCount||0;(o!==l||s!==u)&&(a="reset");function f(y){return!(y>=1)&&(y=1),y}var c;(this._dirty||a==="reset")&&(this._dirty=!1,c=this._doReset(n)),this._modBy=l,this._modDataCount=u;var p=t&&t.step;if(r?this._dueEnd=r._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var h=this._dueIndex,d=Math.min(p!=null?this._dueIndex+p:1/0,this._dueEnd);if(!n&&(c||h1&&n>0?s:o}};return a;function o(){return t=e?null:lt},gte:function(e,t){return e>=t}},lat=function(){function e(t,r){if(!Ct(r)){var n="";jt(n)}this._opFn=E3[t],this._rvalFloat=Si(r)}return e.prototype.evaluate=function(t){return Ct(t)?this._opFn(t,this._rvalFloat):this._opFn(Si(t),this._rvalFloat)},e}(),nx=function(){function e(t,r){var n=t==="desc";this._resultLT=n?1:-1,r==null&&(r=n?"min":"max"),this._incomparable=r==="min"?-1/0:1/0}return e.prototype.evaluate=function(t,r){var n=Ct(t)?t:Si(t),i=Ct(r)?r:Si(r),a=isNaN(n),o=isNaN(i);if(a&&(n=this._incomparable),o&&(i=this._incomparable),a&&o){var s=H(t),l=H(r);s&&(n=l?t:0),l&&(i=s?r:0)}return ni?-this._resultLT:0},e}();var uat=function(){function e(t,r){this._rval=r,this._isEQ=t,this._rvalTypeof=typeof r,this._rvalFloat=Si(r)}return e.prototype.evaluate=function(t){var r=t===this._rval;if(!r){var n=typeof t;n!==this._rvalTypeof&&(n==="number"||this._rvalTypeof==="number")&&(r=Si(t)===this._rvalFloat)}return this._isEQ?r:!r},e}();function I3(e,t){return e==="eq"||e==="ne"?new uat(e==="eq",t):st(E3,e)?new lat(e,t):null}var fat=function(){function e(){}return e.prototype.getRawData=function(){throw new Error("not supported")},e.prototype.getRawDataItem=function(t){throw new Error("not supported")},e.prototype.cloneRawData=function(){},e.prototype.getDimensionInfo=function(t){},e.prototype.cloneAllDimensionInfo=function(){},e.prototype.count=function(){},e.prototype.retrieveValue=function(t,r){},e.prototype.retrieveValueFromItem=function(t,r){},e.prototype.convertValue=function(t,r){return Ii(t,r)},e}();function cat(e,t){var r=new fat,n=e.data,i=r.sourceFormat=e.sourceFormat,a=e.startIndex,o="";e.seriesLayoutBy!==zn&&jt(o);var s=[],l={},u=e.dimensionsDefine;if(u)D(u,function(m,v){var g=m.name,y={index:v,name:g,displayName:m.displayName};if(s.push(y),g!=null){var x="";st(l,g)&&jt(x),l[g]=y}});else for(var f=0;f65535?gat:yat}function fp(){return[1/0,-1/0]}function xat(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function k3(e,t,r,n,i){var a=O3[r||"float"];if(i){var o=e[t],s=o&&o.length;if(s!==n){for(var l=new a(n),u=0;uv[1]&&(v[1]=m)}return this._rawCount=this._count=l,{start:s,end:l}},e.prototype._initDataFromProvider=function(t,r,n){for(var i=this._provider,a=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=F(o,function(y){return y.property}),f=0;fg[1]&&(g[1]=v)}}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=r,this._extent=[]},e.prototype.count=function(){return this._count},e.prototype.get=function(t,r){if(!(r>=0&&r=0&&r=this._rawCount||t<0)return-1;if(!this._indices)return t;var r=this._indices,n=r[t];if(n!=null&&nt)a=o-1;else return o}return-1},e.prototype.indicesOfNearest=function(t,r,n){var i=this._chunks,a=i[t],o=[];if(!a)return o;n==null&&(n=1/0);for(var s=1/0,l=-1,u=0,f=0,c=this.count();f=0&&l<0)&&(s=d,l=h,u=0),h===l&&(o[u++]=f))}return o.length=u,o},e.prototype.getIndices=function(){var t,r=this._indices;if(r){var n=r.constructor,i=this._count;if(n===Array){t=new n(i);for(var a=0;a=c&&y<=p||isNaN(y))&&(l[u++]=m),m++}d=!0}else if(a===2){for(var v=h[i[0]],x=h[i[1]],_=t[i[1]][0],S=t[i[1]][1],g=0;g=c&&y<=p||isNaN(y))&&(b>=_&&b<=S||isNaN(b))&&(l[u++]=m),m++}d=!0}}if(!d)if(a===1)for(var g=0;g=c&&y<=p||isNaN(y))&&(l[u++]=w)}else for(var g=0;gt[C][1])&&(T=!1)}T&&(l[u++]=r.getRawIndex(g))}return ug[1]&&(g[1]=v)}}}},e.prototype.lttbDownSample=function(t,r){var n=this.clone([t],!0),i=n._chunks,a=i[t],o=this.count(),s=0,l=Math.floor(1/r),u=this.getRawIndex(0),f,c,p,h=new(dv(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));h[s++]=u;for(var d=1;df&&(f=c,p=_)}A>0&&Af-d&&(l=f-d,s.length=l);for(var m=0;mc[1]&&(c[1]=g),p[h++]=y}return a._count=h,a._indices=p,a._updateGetRawIdx(),a},e.prototype.each=function(t,r){if(this._count)for(var n=t.length,i=this._chunks,a=0,o=this.count();al&&(l=c)}return o=[s,l],this._extent[t]=o,o},e.prototype.getRawDataItem=function(t){var r=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(r);for(var n=[],i=this._chunks,a=0;a=0?this._indices[t]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=function(){function t(r,n,i,a){return Ii(r[a],this._dimensions[a])}yM={arrayRows:t,objectRows:function(r,n,i,a){return Ii(r[n],this._dimensions[a])},keyedColumns:t,original:function(r,n,i,a){var o=r&&(r.value==null?r:r.value);return Ii(o instanceof Array?o[a]:o,this._dimensions[a])},typedArray:function(r,n,i,a){return r[a]}}}(),e}(),vv=_at;var ox=function(){function e(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return e.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},e.prototype._setLocalSource=function(t,r){this._sourceList=t,this._upstreamSignList=r,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},e.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},e.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},e.prototype._createSource=function(){this._setLocalSource([],[]);var t=this._sourceHost,r=this._getUpstreamSourceManagers(),n=!!r.length,i,a;if(ax(t)){var o=t,s=void 0,l=void 0,u=void 0;if(n){var f=r[0];f.prepareSource(),u=f.getSource(),s=u.data,l=u.sourceFormat,a=[f._getVersionSign()]}else s=o.get("data",!0),l=Qe(s)?oi:wr,a=[];var c=this._getSourceMetaRawOption()||{},p=u&&u.metaRawOption||{},h=bt(c.seriesLayoutBy,p.seriesLayoutBy)||null,d=bt(c.sourceHeader,p.sourceHeader),m=bt(c.dimensions,p.dimensions),v=h!==p.seriesLayoutBy||!!d!=!!p.sourceHeader||m;i=v?[hv(s,{seriesLayoutBy:h,sourceHeader:d,dimensions:m},l)]:[]}else{var g=t;if(n){var y=this._applyTransform(r);i=y.sourceList,a=y.upstreamSignList}else{var x=g.get("source",!0);i=[hv(x,this._getSourceMetaRawOption(),null)],a=[]}}this._setLocalSource(i,a)},e.prototype._applyTransform=function(t){var r=this._sourceHost,n=r.get("transform",!0),i=r.get("fromTransformResult",!0);if(i!=null){var a="";t.length!==1&&z3(a)}var o,s=[],l=[];return D(t,function(u){u.prepareSource();var f=u.getSource(i||0),c="";i!=null&&!f&&z3(c),s.push(f),l.push(u._getVersionSign())}),n?o=R3(n,s,{datasetIndex:r.componentIndex}):i!=null&&(o=[w3(s[0])]),{sourceList:o,upstreamSignList:l}},e.prototype._isDirty=function(){if(this._dirty)return!0;for(var t=this._getUpstreamSourceManagers(),r=0;r1||r>0&&!e.noHeader;return D(e.blocks,function(i){var a=B3(i);a>=t&&(t=a+ +(n&&(!a||bM(i)&&!i.noHeader)))}),t}return 0}function Sat(e,t,r,n){var i=t.noHeader,a=Tat(B3(t)),o=[],s=t.blocks||[];be(!s||B(s)),s=s||[];var l=e.orderMode;if(t.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(st(u,l)){var f=new nx(u[l],null);s.sort(function(d,m){return f.evaluate(d.sortParam,m.sortParam)})}else l==="seriesDesc"&&s.reverse()}D(s,function(d,m){var v=t.valueFormatter,g=V3(d)(v?V(V({},e),{valueFormatter:v}):e,d,m>0?a.html:0,n);g!=null&&o.push(g)});var c=e.renderMode==="richText"?o.join(a.richText):SM(o.join(""),i?r:a.html);if(i)return c;var p=G0(t.header,"ordinal",e.useUTC),h=U3(n,e.renderMode).nameStyle;return e.renderMode==="richText"?F3(e,p,h)+a.richText+c:SM('
'+Rr(p)+"
"+c,r)}function wat(e,t,r,n){var i=e.renderMode,a=t.noName,o=t.noValue,s=!t.markerType,l=t.name,u=e.useUTC,f=t.valueFormatter||e.valueFormatter||function(_){return _=B(_)?_:[_],F(_,function(S,b){return G0(S,B(h)?h[b]:h,u)})};if(!(a&&o)){var c=s?"":e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||"#333",i),p=a?"":G0(l,"ordinal",u),h=t.valueType,d=o?[]:f(t.value),m=!s||!a,v=!s&&a,g=U3(n,i),y=g.nameStyle,x=g.valueStyle;return i==="richText"?(s?"":c)+(a?"":F3(e,p,y))+(o?"":Cat(e,d,m,v,x)):SM((s?"":c)+(a?"":Mat(p,!s,y))+(o?"":Aat(d,m,v,x)),r)}}function wM(e,t,r,n,i,a){if(e){var o=V3(e),s={useUTC:i,renderMode:r,orderMode:n,markupStyleCreator:t,valueFormatter:e.valueFormatter};return o(s,e,0,a)}}function Tat(e){return{html:_at[e],richText:bat[e]}}function SM(e,t){var r='
',n="margin: "+t+"px 0 0";return'
'+e+r+"
"}function Mat(e,t,r){var n=t?"margin-left:2px":"";return''+Rr(e)+""}function Aat(e,t,r,n){var i=r?"10px":"20px",a=t?"float:right;margin-left:"+i:"";return e=B(e)?e:[e],''+F(e,function(o){return Rr(o)}).join("  ")+""}function F3(e,t,r){return e.markupStyleCreator.wrapRichTextStyle(t,r)}function Cat(e,t,r,n,i){var a=[i],o=n?10:20;return r&&a.push({padding:[0,0,0,o],align:"right"}),e.markupStyleCreator.wrapRichTextStyle(B(t)?t.join(" "):t,a)}function sx(e,t){var r=e.getData().getItemVisual(t,"style"),n=r[e.visualDrawType];return ua(n)}function lx(e,t){var r=e.get("padding");return r??(t==="richText"?[8,10]:10)}var ux=function(){function e(){this.richTextStyles={},this._nextStyleNameId=r0()}return e.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(t,r,n){var i=n==="richText"?this._generateStyleName():null,a=Z5({color:r,type:t,renderMode:n,markerId:i});return H(a)?a:(this.richTextStyles[i]=a.style,a.content)},e.prototype.wrapRichTextStyle=function(t,r){var n={};B(r)?D(r,function(a){return V(n,a)}):V(n,r);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+t+"}"},e}();function fx(e){var t=e.series,r=e.dataIndex,n=e.multipleSeries,i=t.getData(),a=i.mapDimensionsAll("defaultedTooltip"),o=a.length,s=t.getRawValue(r),l=B(s),u=sx(t,r),f,c,p,h;if(o>1||l&&!o){var d=Dat(s,t,r,a,u);f=d.inlineValues,c=d.inlineValueTypes,p=d.blocks,h=d.inlineValues[0]}else if(o){var m=i.getDimensionInfo(a[0]);h=f=jo(i,r,a[0]),c=m.type}else h=f=l?s[0]:s;var v=Fc(t),g=v&&t.name||"",y=i.getName(r),x=n?g:y;return xe("section",{header:g,noHeader:n||!v,sortParam:h,blocks:[xe("nameValue",{markerType:"item",markerColor:u,name:x,noName:!pr(x),value:f,valueType:c})].concat(p||[])})}function Dat(e,t,r,n,i){var a=t.getData(),o=Pr(e,function(c,p,h){var d=a.getDimensionInfo(h);return c=c||d&&d.tooltip!==!1&&d.displayName!=null},!1),s=[],l=[],u=[];n.length?D(n,function(c){f(jo(a,r,c),c)}):D(e,f);function f(c,p){var h=a.getDimensionInfo(p);!h||h.otherDims.tooltip===!1||(o?u.push(xe("nameValue",{markerType:"subItem",markerColor:i,name:h.displayName,value:c,valueType:h.type})):(s.push(c),l.push(h.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var js=yt();function cx(e,t){return e.getName(t)||e.getId(t)}var vv="__universalTransitionEnabled",px=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r._selectedDataIndicesMap={},r}return t.prototype.init=function(r,n,i){this.seriesIndex=this.componentIndex,this.dataTask=$s({count:Iat,reset:Lat}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(r,i);var a=js(this).sourceManager=new ox(this);a.prepareSource();var o=this.getInitialData(r,i);H3(o,this),this.dataTask.context.data=o,js(this).dataBeforeProcessed=o,G3(this),this._initSelectedMapFromData(o)},t.prototype.mergeDefaultAndTheme=function(r,n){var i=Ks(this),a=i?Di(r):{},o=this.subType;Pt.hasClass(o)&&(o+="Series"),_t(r,n.getTheme().get(this.subType)),_t(r,this.getDefaultOption()),ni(r,"label",["show"]),this.fillDataTextStyle(r.data),i&&On(r,a,i)},t.prototype.mergeOption=function(r,n){r=_t(this.option,r,!0),this.fillDataTextStyle(r.data);var i=Ks(this);i&&On(this.option,r,i);var a=js(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(r,n);H3(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,js(this).dataBeforeProcessed=o,G3(this),this._initSelectedMapFromData(o)},t.prototype.fillDataTextStyle=function(r){if(r&&!Qe(r))for(var n=["show"],i=0;ithis.getShallow("animationThreshold")&&(n=!1),!!n},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(r,n,i){var a=this.ecModel,o=ov.prototype.getColorFromPalette.call(this,r,n,i);return o||(o=a.getColorFromPalette(r,n,i)),o},t.prototype.coordDimToDataDim=function(r){return this.getRawData().mapDimensionsAll(r)},t.prototype.getProgressive=function(){return this.get("progressive")},t.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},t.prototype.select=function(r,n){this._innerSelect(this.getData(n),r)},t.prototype.unselect=function(r,n){var i=this.option.selectedMap;if(i){var a=this.option.selectedMode,o=this.getData(n);if(a==="series"||i==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s=0&&i.push(o)}return i},t.prototype.isSelected=function(r,n){var i=this.option.selectedMap;if(!i)return!1;var a=this.getData(n);return(i==="all"||i[cx(a,r)])&&!a.getItemModel(r).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this[vv])return!0;var r=this.option.universalTransition;return r?r===!0?!0:r&&r.enabled:!1},t.prototype._innerSelect=function(r,n){var i,a,o=this.option,s=o.selectedMode,l=n.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){rt(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,f=0;f0&&this._innerSelect(r,n)}},t.registerClass=function(r){return Pt.registerClass(r)},t.protoInitialize=function(){var r=t.prototype;r.type="series.__base__",r.seriesIndex=0,r.ignoreStyleOnData=!1,r.hasSymbolVisual=!1,r.defaultSymbol="circle",r.visualStyleAccessPath="itemStyle",r.visualDrawType="fill"}(),t}(Pt);ie(px,up);ie(px,ov);a0(px,Pt);function G3(e){var t=e.name;Fc(e)||(e.name=Eat(e)||t)}function Eat(e){var t=e.getRawData(),r=t.mapDimensionsAll("seriesName"),n=[];return D(r,function(i){var a=t.getDimensionInfo(i);a.displayName&&n.push(a.displayName)}),n.join(" ")}function Iat(e){return e.model.getRawData().count()}function Lat(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),Pat}function Pat(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function H3(e,t){D(su(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(r){e.wrapMethod(r,pt(Rat,t))})}function Rat(e,t){var r=TM(e);return r&&r.setOutputEnd((t||this).count()),t}function TM(e){var t=(e.ecModel||{}).scheduler,r=t&&t.getPipeline(e.uid);if(r){var n=r.currentTask;if(n){var i=n.agentStubMap;i&&(n=i.get(e.uid))}return n}}var Wt=px;var MM=function(){function e(){this.group=new nt,this.uid=Ci("viewComponent")}return e.prototype.init=function(t,r){},e.prototype.render=function(t,r,n,i){},e.prototype.dispose=function(t,r){},e.prototype.updateView=function(t,r,n,i){},e.prototype.updateLayout=function(t,r,n,i){},e.prototype.updateVisual=function(t,r,n,i){},e.prototype.toggleBlurSeries=function(t,r,n){},e.prototype.eachRendered=function(t){var r=this.group;r&&r.traverse(t)},e}();Gc(MM);Bs(MM);var Xt=MM;function si(){var e=yt();return function(t){var r=e(t),n=t.pipelineContext,i=!!r.large,a=!!r.progressiveRender,o=r.large=!!(n&&n.large),s=r.progressiveRender=!!(n&&n.progressiveRender);return(i!==o||a!==s)&&"reset"}}var X3=yt(),Nat=si(),AM=function(){function e(){this.group=new nt,this.uid=Ci("viewChart"),this.renderTask=$s({plan:kat,reset:Oat}),this.renderTask.context={view:this}}return e.prototype.init=function(t,r){},e.prototype.render=function(t,r,n,i){},e.prototype.highlight=function(t,r,n,i){var a=t.getData(i&&i.dataType);a&&Y3(a,i,"emphasis")},e.prototype.downplay=function(t,r,n,i){var a=t.getData(i&&i.dataType);a&&Y3(a,i,"normal")},e.prototype.remove=function(t,r){this.group.removeAll()},e.prototype.dispose=function(t,r){},e.prototype.updateView=function(t,r,n,i){this.render(t,r,n,i)},e.prototype.updateLayout=function(t,r,n,i){this.render(t,r,n,i)},e.prototype.updateVisual=function(t,r,n,i){this.render(t,r,n,i)},e.prototype.eachRendered=function(t){un(this.group,t)},e.markUpdateMethod=function(t,r){X3(t).updateMethod=r},e.protoInitialize=function(){var t=e.prototype;t.type="chart"}(),e}();function W3(e,t,r){e&&qs(e)&&(t==="emphasis"?Yr:Xr)(e,r)}function Y3(e,t,r){var n=wi(e,t),i=t&&t.highlightKey!=null?Xz(t.highlightKey):null;n!=null?D(Yt(n),function(a){W3(e.getItemGraphicEl(a),r,i)}):e.eachItemGraphicEl(function(a){W3(a,r,i)})}Gc(AM,["dispose"]);Bs(AM);function kat(e){return Nat(e.model)}function Oat(e){var t=e.model,r=e.ecModel,n=e.api,i=e.payload,a=t.pipelineContext.progressiveRender,o=e.view,s=i&&X3(i).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](t,r,n,i),zat[l]}var zat={incrementalPrepareRender:{progress:function(e,t){t.view.incrementalRender(e,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(e,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}},Vt=AM;var hx="\0__throttleOriginMethod",q3="\0__throttleRate",Z3="\0__throttleType";function mv(e,t,r){var n,i=0,a=0,o=null,s,l,u,f;t=t||0;function c(){a=new Date().getTime(),o=null,e.apply(l,u||[])}var p=function(){for(var h=[],d=0;d=0?c():o=setTimeout(c,-s),i=n};return p.clear=function(){o&&(clearTimeout(o),o=null)},p.debounceNextCall=function(h){f=h},p}function Li(e,t,r,n){var i=e[t];if(i){var a=i[hx]||i,o=i[Z3],s=i[q3];if(s!==r||o!==n){if(r==null||!n)return e[t]=a;i=e[t]=mv(a,r,n==="debounce"),i[hx]=a,i[Z3]=n,i[q3]=r}return i}}function Qo(e,t){var r=e[t];r&&r[hx]&&(r.clear&&r.clear(),e[t]=r[hx])}var K3=yt(),$3={itemStyle:Pn(zT,!0),lineStyle:Pn(OT,!0)},Uat={lineStyle:"stroke",itemStyle:"fill"};function j3(e,t){var r=e.visualStyleMapper||$3[t];return r||(console.warn("Unknown style type '"+t+"'."),$3.itemStyle)}function Q3(e,t){var r=e.visualDrawType||Uat[t];return r||(console.warn("Unknown style type '"+t+"'."),"fill")}var J3={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var r=e.getData(),n=e.visualStyleAccessPath||"itemStyle",i=e.getModel(n),a=j3(e,n),o=a(i),s=i.getShallow("decal");s&&(r.setVisual("decal",s),s.dirty=!0);var l=Q3(e,n),u=o[l],f=j(u)?u:null,c=o.fill==="auto"||o.stroke==="auto";if(!o[l]||f||c){var p=e.getColorFromPalette(e.name,null,t.getSeriesCount());o[l]||(o[l]=p,r.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||j(o.fill)?p:o.fill,o.stroke=o.stroke==="auto"||j(o.stroke)?p:o.stroke}if(r.setVisual("style",o),r.setVisual("drawType",l),!t.isSeriesFiltered(e)&&f)return r.setVisual("colorFromPalette",!1),{dataEach:function(h,d){var m=e.getDataParams(d),v=V({},o);v[l]=f(m),h.setItemVisual(d,"style",v)}}}},gv=new Ht,t4={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!(e.ignoreStyleOnData||t.isSeriesFiltered(e))){var r=e.getData(),n=e.visualStyleAccessPath||"itemStyle",i=j3(e,n),a=r.getVisual("drawType");return{dataEach:r.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[n]){gv.option=l[n];var u=i(gv),f=o.ensureUniqueItemVisual(s,"style");V(f,u),gv.option.decal&&(o.setItemVisual(s,"decal",gv.option.decal),gv.option.decal.dirty=!0),a in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},e4={performRawSeries:!0,overallReset:function(e){var t=$();e.eachSeries(function(r){var n=r.getColorBy();if(!r.isColorBySeries()){var i=r.type+"-"+n,a=t.get(i);a||(a={},t.set(i,a)),K3(r).scope=a}}),e.eachSeries(function(r){if(!(r.isColorBySeries()||e.isSeriesFiltered(r))){var n=r.getRawData(),i={},a=r.getData(),o=K3(r).scope,s=r.visualStyleAccessPath||"itemStyle",l=Q3(r,s);a.each(function(u){var f=a.getRawIndex(u);i[f]=u}),n.each(function(u){var f=i[u],c=a.getItemVisual(f,"colorFromPalette");if(c){var p=a.ensureUniqueItemVisual(f,"style"),h=n.getName(u)||u+"",d=n.count();p[l]=r.getColorFromPalette(h,o,d)}})}})}};var vx=Math.PI;function CM(e,t){t=t||{},J(t,{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 r=new nt,n=new At({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});r.add(n);var i=new Lt({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new At({style:{fill:"none"},textContent:i,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});r.add(a);var o;return t.showSpinner&&(o=new Zd({shape:{startAngle:-vx/2,endAngle:-vx/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:vx*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:vx*3/2}).delay(300).start("circularInOut"),r.add(o)),r.resize=function(){var s=i.getBoundingRect().width,l=t.showSpinner?t.spinnerRadius:0,u=(e.getWidth()-l*2-(t.showSpinner&&s?10:0)-s)/2-(t.showSpinner&&s?0:5+s/2)+(t.showSpinner?0:s/2)+(s?0:l),f=e.getHeight()/2;t.showSpinner&&o.setShape({cx:u,cy:f}),a.setShape({x:u-l,y:f-l,width:l*2,height:l*2}),n.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},r.resize(),r}var Vat=function(){function e(t,r,n,i){this._stageTaskMap=$(),this.ecInstance=t,this.api=r,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return e.prototype.restoreData=function(t,r){t.restoreData(r),this._stageTaskMap.each(function(n){var i=n.overallTask;i&&i.dirty()})},e.prototype.getPerformArgs=function(t,r){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),i=n.context,a=!r&&n.progressiveEnabled&&(!i||i.progressiveRender)&&t.__idxInPipeline>n.blockIndex,o=a?n.step:null,s=i&&i.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},e.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},e.prototype.updateStreamModes=function(t,r){var n=this._pipelineMap.get(t.uid),i=t.getData(),a=i.count(),o=n.progressiveEnabled&&r.incrementalPrepareRender&&a>=n.threshold,s=t.get("large")&&a>=t.get("largeThreshold"),l=t.get("progressiveChunkMode")==="mod"?a:null;t.pipelineContext=n.context={progressiveRender:o,modDataCount:l,large:s}},e.prototype.restorePipelines=function(t){var r=this,n=r._pipelineMap=$();t.eachSeries(function(i){var a=i.getProgressive(),o=i.uid;n.set(o,{id:o,head:null,tail:null,threshold:i.getProgressiveThreshold(),progressiveEnabled:a&&!(i.preventIncremental&&i.preventIncremental()),blockIndex:-1,step:Math.round(a||700),count:0}),r._pipe(i,i.dataTask)})},e.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,r=this.api.getModel(),n=this.api;D(this._allHandlers,function(i){var a=t.get(i.uid)||t.set(i.uid,{}),o="";be(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,a,r,n),i.overallReset&&this._createOverallStageTask(i,a,r,n)},this)},e.prototype.prepareView=function(t,r,n,i){var a=t.renderTask,o=a.context;o.model=r,o.ecModel=n,o.api=i,a.__block=!t.incrementalPrepareRender,this._pipe(r,a)},e.prototype.performDataProcessorTasks=function(t,r){this._performStageTasks(this._dataProcessorHandlers,t,r,{block:!0})},e.prototype.performVisualTasks=function(t,r,n){this._performStageTasks(this._visualHandlers,t,r,n)},e.prototype._performStageTasks=function(t,r,n,i){i=i||{};var a=!1,o=this;D(t,function(l,u){if(!(i.visualType&&i.visualType!==l.visualType)){var f=o._stageTaskMap.get(l.uid),c=f.seriesTaskMap,p=f.overallTask;if(p){var h,d=p.agentStubMap;d.each(function(v){s(i,v)&&(v.dirty(),h=!0)}),h&&p.dirty(),o.updatePayload(p,n);var m=o.getPerformArgs(p,i.block);d.each(function(v){v.perform(m)}),p.perform(m)&&(a=!0)}else c&&c.each(function(v,g){s(i,v)&&v.dirty();var y=o.getPerformArgs(v,i.block);y.skip=!l.performRawSeries&&r.isSeriesFiltered(v.context.model),o.updatePayload(v,n),v.perform(y)&&(a=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=a||this.unfinished},e.prototype.performSeriesTasks=function(t){var r;t.eachSeries(function(n){r=n.dataTask.perform()||r}),this.unfinished=r||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each(function(t){var r=t.tail;do{if(r.__block){t.blockIndex=r.__idxInPipeline;break}r=r.getUpstream()}while(r)})},e.prototype.updatePayload=function(t,r){r!=="remain"&&(t.context.payload=r)},e.prototype._createSeriesStageTask=function(t,r,n,i){var a=this,o=r.seriesTaskMap,s=r.seriesTaskMap=$(),l=t.seriesType,u=t.getTargetSeries;t.createOnAllSeries?n.eachRawSeries(f):l?n.eachRawSeriesByType(l,f):u&&u(n,i).each(f);function f(c){var p=c.uid,h=s.set(p,o&&o.get(p)||$s({plan:Wat,reset:Yat,count:qat}));h.context={model:c,ecModel:n,api:i,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:a},a._pipe(c,h)}},e.prototype._createOverallStageTask=function(t,r,n,i){var a=this,o=r.overallTask=r.overallTask||$s({reset:Bat});o.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:a};var s=o.agentStubMap,l=o.agentStubMap=$(),u=t.seriesType,f=t.getTargetSeries,c=!0,p=!1,h="";be(!t.createOnAllSeries,h),u?n.eachRawSeriesByType(u,d):f?f(n,i).each(d):(c=!1,D(n.getSeries(),d));function d(m){var v=m.uid,g=l.set(v,s&&s.get(v)||(p=!0,$s({reset:Fat,onDirty:Hat})));g.context={model:m,overallProgress:c},g.agent=o,g.__block=c,a._pipe(m,g)}p&&o.dirty()},e.prototype._pipe=function(t,r){var n=t.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=r),i.tail&&i.tail.pipe(r),i.tail=r,r.__idxInPipeline=i.count++,r.__pipeline=i},e.wrapStageHandler=function(t,r){return j(t)&&(t={overallReset:t,seriesType:Zat(t)}),t.uid=Ci("stageHandler"),r&&(t.visualType=r),t},e}();function Bat(e){e.overallReset(e.ecModel,e.api,e.payload)}function Fat(e){return e.overallProgress&&Gat}function Gat(){this.agent.dirty(),this.getDownstream().dirty()}function Hat(){this.agent&&this.agent.dirty()}function Wat(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function Yat(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=Yt(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?F(t,function(r,n){return r4(n)}):Xat}var Xat=r4(0);function r4(e){return function(t,r){var n=r.data,i=r.resetDefines[e];if(i&&i.dataEach)for(var a=t.start;a0&&h===u.length-p.length){var d=u.slice(0,h);d!=="data"&&(r.mainType=d,r[p.toLowerCase()]=l,f=!0)}}s.hasOwnProperty(u)&&(n[u]=l,f=!0),f||(i[u]=l)})}return{cptQuery:r,dataQuery:n,otherQuery:i}},e.prototype.filter=function(t,r){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,a=n.packedEvent,o=n.model,s=n.view;if(!o||!s)return!0;var l=r.cptQuery,u=r.dataQuery;return f(l,o,"mainType")&&f(l,o,"subType")&&f(l,o,"index","componentIndex")&&f(l,o,"name")&&f(l,o,"id")&&f(u,a,"name")&&f(u,a,"dataIndex")&&f(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,r.otherQuery,i,a));function f(c,p,h,d){return c[h]==null||p[d||h]===c[h]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}();var EM=["symbol","symbolSize","symbolRotate","symbolOffset"],p4=EM.concat(["symbolKeepAspect"]),h4={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var r=e.getData();if(e.legendIcon&&r.setVisual("legendIcon",e.legendIcon),!e.hasSymbolVisual)return;for(var n={},i={},a=!1,o=0;o=0&&ju(l)?l:.5;var u=e.createRadialGradient(o,s,0,o,s,l);return u}function bv(e,t,r){for(var n=t.type==="radial"?sot(e,t,r):oot(e,t,r),i=t.colorStops,a=0;a0)?null:e==="dashed"?[4*t,2*t]:e==="dotted"?[t]:Ct(e)?[e]:B(e)?e:null}function Sv(e){var t=e.style,r=t.lineDash&&t.lineWidth>0&&lot(t.lineDash,t.lineWidth),n=t.lineDashOffset;if(r){var i=t.strokeNoScale&&e.getLineScale?e.getLineScale():1;i&&i!==1&&(r=F(r,function(a){return a/i}),n/=i)}return[r,n]}var uot=new mr(!0);function _x(e){var t=e.stroke;return!(t==null||t==="none"||!(e.lineWidth>0))}function x4(e){return typeof e=="string"&&e!=="none"}function bx(e){var t=e.fill;return t!=null&&t!=="none"}function _4(e,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var r=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=r}else e.fill()}function b4(e,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var r=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=r}else e.stroke()}function Sx(e,t,r){var n=Od(t.image,t.__image,r);if(Hc(n)){var i=e.createPattern(n,t.repeat||"repeat");if(typeof DOMMatrix=="function"&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(t.x||0,t.y||0),a.rotateSelf(0,0,(t.rotation||0)*Ac),a.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(a)}return i}}function fot(e,t,r,n){var i,a=_x(r),o=bx(r),s=r.strokePercent,l=s<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var f=t.path||uot,c=t.__dirty;if(!n){var p=r.fill,h=r.stroke,d=o&&!!p.colorStops,m=a&&!!h.colorStops,v=o&&!!p.image,g=a&&!!h.image,y=void 0,x=void 0,_=void 0,S=void 0,b=void 0;(d||m)&&(b=t.getBoundingRect()),d&&(y=c?bv(e,p,b):t.__canvasFillGradient,t.__canvasFillGradient=y),m&&(x=c?bv(e,h,b):t.__canvasStrokeGradient,t.__canvasStrokeGradient=x),v&&(_=c||!t.__canvasFillPattern?Sx(e,p,t):t.__canvasFillPattern,t.__canvasFillPattern=_),g&&(S=c||!t.__canvasStrokePattern?Sx(e,h,t):t.__canvasStrokePattern,t.__canvasStrokePattern=_),d?e.fillStyle=y:v&&(_?e.fillStyle=_:o=!1),m?e.strokeStyle=x:g&&(S?e.strokeStyle=S:a=!1)}var w=t.getGlobalScale();f.setScale(w[0],w[1],t.segmentIgnoreThreshold);var T,M;e.setLineDash&&r.lineDash&&(i=Sv(t),T=i[0],M=i[1]);var C=!0;(u||c&Ps)&&(f.setDPR(e.dpr),l?f.setContext(null):(f.setContext(e),C=!1),f.reset(),t.buildPath(f,t.shape,n),f.toStatic(),t.pathUpdated()),C&&f.rebuildPath(e,l?s:1),T&&(e.setLineDash(T),e.lineDashOffset=M),n||(r.strokeFirst?(a&&b4(e,r),o&&_4(e,r)):(o&&_4(e,r),a&&b4(e,r))),T&&e.setLineDash([])}function cot(e,t,r){var n=t.__image=Od(r.image,t.__image,t,t.onload);if(!(!n||!Hc(n))){var i=r.x||0,a=r.y||0,o=t.getWidth(),s=t.getHeight(),l=n.width/n.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=n.width,s=n.height),r.sWidth&&r.sHeight){var u=r.sx||0,f=r.sy||0;e.drawImage(n,u,f,r.sWidth,r.sHeight,i,a,o,s)}else if(r.sx&&r.sy){var u=r.sx,f=r.sy,c=o-u,p=s-f;e.drawImage(n,u,f,c,p,i,a,o,s)}else e.drawImage(n,i,a,o,s)}}function pot(e,t,r){var n,i=r.text;if(i!=null&&(i+=""),i){e.font=r.font||Qn,e.textAlign=r.textAlign,e.textBaseline=r.textBaseline;var a=void 0,o=void 0;e.setLineDash&&r.lineDash&&(n=Sv(t),a=n[0],o=n[1]),a&&(e.setLineDash(a),e.lineDashOffset=o),r.strokeFirst?(_x(r)&&e.strokeText(i,r.x,r.y),bx(r)&&e.fillText(i,r.x,r.y)):(bx(r)&&e.fillText(i,r.x,r.y),_x(r)&&e.strokeText(i,r.x,r.y)),a&&e.setLineDash([])}}var S4=["shadowBlur","shadowOffsetX","shadowOffsetY"],w4=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function E4(e,t,r,n,i){var a=!1;if(!n&&(r=r||{},t===r))return!1;if(n||t.opacity!==r.opacity){Un(e,i),a=!0;var o=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(o)?Ha.opacity:o}(n||t.blend!==r.blend)&&(a||(Un(e,i),a=!0),e.globalCompositeOperation=t.blend||Ha.blend);for(var s=0;s0&&r.unfinished);r.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(r,n,i){if(!this[jr]){if(this._disposed){this.id;return}var a,o,s;if(rt(n)&&(i=n.lazyUpdate,a=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[jr]=!0,!this._model||n){var l=new h3(this._api),u=this._theme,f=this._model=new $0;f.scheduler=this._scheduler,f.ssr=this._ssr,f.init(null,null,null,u,this._locale,l)}this._model.setOption(r,{replaceMerge:o},FM);var c={seriesTransition:s,optionChanged:!0};if(i)this[Vn]={silent:a,updateParams:c},this[jr]=!1,this.getZr().wakeUp();else{try{pp(this),tl.update.call(this,null,c)}catch(p){throw this[Vn]=null,this[jr]=!1,p}this._ssr||this._zr.flush(),this[Vn]=null,this[jr]=!1,Tv.call(this,a),Mv.call(this,a)}}},t.prototype.setTheme=function(){},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Ot.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(r){return this.renderToCanvas(r)},t.prototype.renderToCanvas=function(r){r=r||{};var n=this._zr.painter;return n.getRenderedCanvas({backgroundColor:r.backgroundColor||this._model.get("backgroundColor"),pixelRatio:r.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(r){r=r||{};var n=this._zr.painter;return n.renderToString({useViewBox:r.useViewBox})},t.prototype.getSvgDataURL=function(){if(Ot.svgSupported){var r=this._zr,n=r.storage.getDisplayList();return D(n,function(i){i.stopAnimation(null,!0)}),r.painter.toDataURL()}},t.prototype.getDataURL=function(r){if(this._disposed){this.id;return}r=r||{};var n=r.excludeComponents,i=this._model,a=[],o=this;D(n,function(l){i.eachComponent({mainType:l},function(u){var f=o._componentsMap[u.__viewId];f.group.ignore||(a.push(f),f.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(r).toDataURL("image/"+(r&&r.type||"png"));return D(a,function(l){l.group.ignore=!1}),s},t.prototype.getConnectedDataURL=function(r){if(this._disposed){this.id;return}var n=r.type==="svg",i=this.group,a=Math.min,o=Math.max,s=1/0;if(X4[i]){var l=s,u=s,f=-s,c=-s,p=[],h=r&&r.pixelRatio||this.getDevicePixelRatio();D(Cv,function(x,_){if(x.group===i){var S=n?x.getZr().painter.getSvgDom().innerHTML:x.renderToCanvas(at(r)),b=x.getDom().getBoundingClientRect();l=a(b.left,l),u=a(b.top,u),f=o(b.right,f),c=o(b.bottom,c),p.push({dom:S,left:b.left,top:b.top})}}),l*=h,u*=h,f*=h,c*=h;var d=f-l,m=c-u,v=Wr.createCanvas(),g=F2(v,{renderer:n?"svg":"canvas"});if(g.resize({width:d,height:m}),n){var y="";return D(p,function(x){var _=x.left-l,S=x.top-u;y+=''+x.dom+""}),g.painter.getSvgRoot().innerHTML=y,r.connectedBackgroundColor&&g.painter.setBackgroundColor(r.connectedBackgroundColor),g.refreshImmediately(),g.painter.toDataURL()}else return r.connectedBackgroundColor&&g.add(new At({shape:{x:0,y:0,width:d,height:m},style:{fill:r.connectedBackgroundColor}})),D(p,function(x){var _=new me({style:{x:x.left*h-l,y:x.top*h-u,image:x.dom}});g.add(_)}),g.refreshImmediately(),v.toDataURL("image/"+(r&&r.type||"png"))}else return this.getDataURL(r)},t.prototype.convertToPixel=function(r,n){return OM(this,"convertToPixel",r,n)},t.prototype.convertFromPixel=function(r,n){return OM(this,"convertFromPixel",r,n)},t.prototype.containPixel=function(r,n){if(this._disposed){this.id;return}var i=this._model,a,o=Us(i,r);return D(o,function(s,l){l.indexOf("Models")>=0&&D(s,function(u){var f=u.coordinateSystem;if(f&&f.containPoint)a=a||!!f.containPoint(n);else if(l==="seriesModels"){var c=this._chartsMap[u.__viewId];c&&c.containPoint&&(a=a||c.containPoint(n,u))}},this)},this),!!a},t.prototype.getVisual=function(r,n){var i=this._model,a=Us(i,r,{defaultMainType:"series"}),o=a.seriesModel,s=o.getData(),l=a.hasOwnProperty("dataIndexInside")?a.dataIndexInside:a.hasOwnProperty("dataIndex")?s.indexOfRawIndex(a.dataIndex):null;return l!=null?xv(s,l,n):Qa(s,n)},t.prototype.getViewOfComponentModel=function(r){return this._componentsMap[r.__viewId]},t.prototype.getViewOfSeriesModel=function(r){return this._chartsMap[r.__viewId]},t.prototype._initEvents=function(){var r=this;D(Not,function(n){var i=function(a){var o=r.getModel(),s=a.target,l,u=n==="globalout";if(u?l={}:s&&pa(s,function(d){var m=ht(d);if(m&&m.dataIndex!=null){var v=m.dataModel||o.getSeriesByIndex(m.seriesIndex);return l=v&&v.getDataParams(m.dataIndex,m.dataType,s)||{},!0}else if(m.eventData)return l=V({},m.eventData),!0},!0),l){var f=l.componentType,c=l.componentIndex;(f==="markLine"||f==="markPoint"||f==="markArea")&&(f="series",c=l.seriesIndex);var p=f&&c!=null&&o.getComponent(f,c),h=p&&r[p.mainType==="series"?"_chartsMap":"_componentsMap"][p.__viewId];l.event=a,l.type=n,r._$eventProcessor.eventInfo={targetEl:s,packedEvent:l,model:p,view:h},r.trigger(n,l)}};i.zrEventfulCallAtLast=!0,r._zr.on(n,i,r)}),D(Av,function(n,i){r._messageCenter.on(i,function(a){this.trigger(i,a)},r)}),D(["selectchanged"],function(n){r._messageCenter.on(n,function(i){this.trigger(n,i)},r)}),v4(this._messageCenter,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var r=this.getDom();r&&q2(this.getDom(),YM,"");var n=this,i=n._api,a=n._model;D(n._componentsViews,function(o){o.dispose(a,i)}),D(n._chartsViews,function(o){o.dispose(a,i)}),n._zr.dispose(),n._dom=n._model=n._chartsMap=n._componentsMap=n._chartsViews=n._componentsViews=n._scheduler=n._api=n._zr=n._throttledZrFlush=n._theme=n._coordSysMgr=n._messageCenter=null,delete Cv[n.id]},t.prototype.resize=function(r){if(!this[jr]){if(this._disposed){this.id;return}this._zr.resize(r);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var i=n.resetOption("media"),a=r&&r.silent;this[Vn]&&(a==null&&(a=this[Vn].silent),i=!0,this[Vn]=null),this[jr]=!0;try{i&&pp(this),tl.update.call(this,{type:"resize",animation:V({duration:0},r&&r.animation)})}catch(o){throw this[jr]=!1,o}this[jr]=!1,Tv.call(this,a),Mv.call(this,a)}}},t.prototype.showLoading=function(r,n){if(this._disposed){this.id;return}if(rt(r)&&(n=r,r=""),r=r||"default",this.hideLoading(),!!GM[r]){var i=GM[r](this._api,n),a=this._zr;this._loadingFX=i,a.add(i)}},t.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(r){var n=V({},r);return n.type=Av[r.type],n},t.prototype.dispatchAction=function(r,n){if(this._disposed){this.id;return}if(rt(n)||(n={silent:!!n}),!!Cx[r.type]&&this._model){if(this[jr]){this._pendingActions.push(r);return}var i=n.silent;UM.call(this,r,i);var a=n.flush;a?this._zr.flush():a!==!1&&Ot.browser.weChat&&this._throttledZrFlush(),Tv.call(this,i),Mv.call(this,i)}},t.prototype.updateLabelLayout=function(){Pi.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(r){if(this._disposed){this.id;return}var n=r.seriesIndex,i=this.getModel(),a=i.getSeriesByIndex(n);a.appendData(r),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=function(){pp=function(c){var p=c._scheduler;p.restorePipelines(c._model),p.prepareStageTasks(),kM(c,!0),kM(c,!1),p.plan()},kM=function(c,p){for(var h=c._model,d=c._scheduler,m=p?c._componentsViews:c._chartsViews,v=p?c._componentsMap:c._chartsMap,g=c._zr,y=c._api,x=0;xp.get("hoverLayerThreshold")&&!Ot.node&&!Ot.worker&&p.eachSeries(function(v){if(!v.preventUsingHoverLayer){var g=c._chartsMap[v.__viewId];g.__alive&&g.eachRendered(function(y){y.states.emphasis&&(y.states.emphasis.hoverLayer=!0)})}})}function o(c,p){var h=c.get("blendMode")||null;p.eachRendered(function(d){d.isGroup||(d.style.blend=h)})}function s(c,p){if(!c.preventAutoZ){var h=c.get("z")||0,d=c.get("zlevel")||0;p.eachRendered(function(m){return l(m,h,d,-1/0),!0})}}function l(c,p,h,d){var m=c.getTextContent(),v=c.getTextGuideLine(),g=c.isGroup;if(g)for(var y=c.childrenRef(),x=0;x0?{duration:m,delay:h.get("delay"),easing:h.get("easing")}:null;p.eachRendered(function(g){if(g.states&&g.states.emphasis){if(Fo(g))return;if(g instanceof vt&&qz(g),g.__dirty){var y=g.prevStates;y&&g.useStates(y)}if(d){g.stateTransition=v;var x=g.getTextContent(),_=g.getTextGuideLine();x&&(x.stateTransition=v),_&&(_.stateTransition=v)}g.__dirty&&i(g)}})}W4=function(c){return new(function(p){N(h,p);function h(){return p!==null&&p.apply(this,arguments)||this}return h.prototype.getCoordinateSystems=function(){return c._coordSysMgr.getCoordinateSystems()},h.prototype.getComponentByElement=function(d){for(;d;){var m=d.__ecComponentInfo;if(m!=null)return c._model.getComponent(m.mainType,m.index);d=d.parent}},h.prototype.enterEmphasis=function(d,m){Yr(d,m),Ri(c)},h.prototype.leaveEmphasis=function(d,m){Xr(d,m),Ri(c)},h.prototype.enterBlur=function(d){d0(d),Ri(c)},h.prototype.leaveBlur=function(d){Hd(d),Ri(c)},h.prototype.enterSelect=function(d){xT(d),Ri(c)},h.prototype.leaveSelect=function(d){_T(d),Ri(c)},h.prototype.getModel=function(){return c.getModel()},h.prototype.getViewOfComponentModel=function(d){return c.getViewOfComponentModel(d)},h.prototype.getViewOfSeriesModel=function(d){return c.getViewOfSeriesModel(d)},h}(j0))(c)},nU=function(c){function p(h,d){for(var m=0;m=0)){q4.push(r);var a=DM.wrapStageHandler(r,i);a.__prio=t,a.__raw=r,e.push(a)}}function KM(e,t){GM[e]=t}function pU(e,t,r){var n=U4("registerMap");n&&n(e,t,r)}var hU=L3;el(HM,J3);el(Ex,t4);el(Ex,e4);el(HM,h4);el(Ex,d4);el($4,PM);XM(Q0);qM(wot,uM);KM("default",CM);cn({type:Xs,event:Xs,update:Xs},ce);cn({type:Fd,event:Fd,update:Fd},ce);cn({type:qc,event:qc,update:qc},ce);cn({type:Gd,event:Gd,update:Gd},ce);cn({type:Zc,event:Zc,update:Zc},ce);sU("light",o4);sU("dark",f4);var dU=[],zot={registerPreprocessor:XM,registerProcessor:qM,registerPostInit:lU,registerPostUpdate:uU,registerUpdateLifecycle:Ix,registerAction:cn,registerCoordinateSystem:fU,registerLayout:cU,registerVisual:el,registerTransform:hU,registerLoading:KM,registerMap:pU,registerImpl:z4,PRIORITY:j4,ComponentModel:Pt,ComponentView:Xt,SeriesModel:Wt,ChartView:Vt,registerComponentModel:function(e){Pt.registerClass(e)},registerComponentView:function(e){Xt.registerClass(e)},registerSeriesModel:function(e){Wt.registerClass(e)},registerChartView:function(e){Vt.registerClass(e)},registerSubTypeDefaulter:function(e,t){Pt.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){_O(e,t)}};function Nt(e){if(B(e)){D(e,function(t){Nt(t)});return}gt(dU,e)>=0||(dU.push(e),j(e)&&(e={install:e}),e.install(zot))}function Dv(e){return e==null?0:e.length||1}function vU(e){return e}var Uot=function(){function e(t,r,n,i,a,o){this._old=t,this._new=r,this._oldKeyGetter=n||vU,this._newKeyGetter=i||vU,this.context=a,this._diffModeMultiple=o==="multiple"}return e.prototype.add=function(t){return this._add=t,this},e.prototype.update=function(t){return this._update=t,this},e.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},e.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},e.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},e.prototype.remove=function(t){return this._remove=t,this},e.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},e.prototype._executeOneToOne=function(){var t=this._old,r=this._new,n={},i=new Array(t.length),a=new Array(r.length);this._initIndexMap(t,null,i,"_oldKeyGetter"),this._initIndexMap(r,n,a,"_newKeyGetter");for(var o=0;o1){var f=l.shift();l.length===1&&(n[s]=l[0]),this._update&&this._update(f,o)}else u===1?(n[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(a,n)},e.prototype._executeMultiple=function(){var t=this._old,r=this._new,n={},i={},a=[],o=[];this._initIndexMap(t,n,a,"_oldKeyGetter"),this._initIndexMap(r,i,o,"_newKeyGetter");for(var s=0;s1&&p===1)this._updateManyToOne&&this._updateManyToOne(f,u),i[l]=null;else if(c===1&&p>1)this._updateOneToMany&&this._updateOneToMany(f,u),i[l]=null;else if(c===1&&p===1)this._update&&this._update(f,u),i[l]=null;else if(c>1&&p>1)this._updateManyToMany&&this._updateManyToMany(f,u),i[l]=null;else if(c>1)for(var h=0;h1)for(var s=0;s30}var Ev=rt,rl=F,Wot=typeof Int32Array>"u"?Array:Int32Array,Yot="e\0\0",gU=-1,Xot=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],qot=["_approximateExtent"],yU,Rx,Iv,Lv,eA,Nx,rA,Zot=function(){function e(t,r){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 n,i=!1;Px(t)?(n=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(i=!0,n=t),n=n||["x","y"];for(var a={},o=[],s={},l=!1,u={},f=0;f=r)){var n=this._store,i=n.getProvider();this._updateOrdinalMeta();var a=this._nameList,o=this._idList,s=i.getSource().sourceFormat,l=s===wr;if(l&&!i.pure)for(var u=[],f=t;f0},e.prototype.ensureUniqueItemVisual=function(t,r){var n=this._itemVisuals,i=n[t];i||(i=n[t]={});var a=i[r];return a==null&&(a=this.getVisual(r),B(a)?a=a.slice():Ev(a)&&(a=V({},a)),i[r]=a),a},e.prototype.setItemVisual=function(t,r,n){var i=this._itemVisuals[t]||{};this._itemVisuals[t]=i,Ev(r)?V(i,r):i[r]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(t,r){Ev(t)?V(this._layout,t):this._layout[t]=r},e.prototype.getLayout=function(t){return this._layout[t]},e.prototype.getItemLayout=function(t){return this._itemLayouts[t]},e.prototype.setItemLayout=function(t,r,n){this._itemLayouts[t]=n?V(this._itemLayouts[t]||{},r):r},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(t,r){var n=this.hostModel&&this.hostModel.seriesIndex;Vd(n,this.dataType,t,r),this._graphicEls[t]=r},e.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},e.prototype.eachItemGraphicEl=function(t,r){D(this._graphicEls,function(n,i){n&&t&&t.call(r,n,i)})},e.prototype.cloneShallow=function(t){return t||(t=new e(this._schema?this._schema:rl(this.dimensions,this._getDimInfo,this),this.hostModel)),eA(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(t,r){var n=this[t];j(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var i=n.apply(this,arguments);return r.apply(this,[i].concat(dy(arguments)))})},e.internalField=function(){yU=function(t){var r=t._invertedIndicesMap;D(r,function(n,i){var a=t._dimInfos[i],o=a.ordinalMeta,s=t._store;if(o){n=r[i]=new Wot(o.categories.length);for(var l=0;l1&&(l+="__ec__"+f),i[r]=l}}}(),e}(),Ne=Zot;function va(e,t){sp(e)||(e=lp(e)),t=t||{};var r=t.coordDimensions||[],n=t.dimensionsDefine||e.dimensionsDefine||[],i=$(),a=[],o=$ot(e,r,n,t.dimensionsCount),s=t.canOmitUnusedDimensions&&tA(o),l=n===e.dimensionsDefine,u=l?JM(e):QM(n),f=t.encodeDefine;!f&&t.encodeDefaulter&&(f=t.encodeDefaulter(e,o));for(var c=$(f),p=new xM(o),h=0;h0&&(n.name=i+(a-1)),a++,t.set(i,a)}}function $ot(e,t,r,n){var i=Math.max(e.dimensionsDetectedCount||1,t.length,r.length,n||0);return D(t,function(a){var o;rt(a)&&(o=a.dimsDef)&&(i=Math.max(i,o.length))}),i}function jot(e,t,r){if(r||t.hasKey(e)){for(var n=0;t.hasKey(e+n);)n++;e+=n}return t.set(e,!0),e}var Qot=function(){function e(t){this.coordSysDims=[],this.axisMap=$(),this.categoryAxisMap=$(),this.coordSysName=t}return e}();function xU(e){var t=e.get("coordinateSystem"),r=new Qot(t),n=Jot[t];if(n)return n(e,r,r.axisMap,r.categoryAxisMap),r}var Jot={cartesian2d:function(e,t,r,n){var i=e.getReferringComponents("xAxis",se).models[0],a=e.getReferringComponents("yAxis",se).models[0];t.coordSysDims=["x","y"],r.set("x",i),r.set("y",a),dp(i)&&(n.set("x",i),t.firstCategoryDimIndex=0),dp(a)&&(n.set("y",a),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},singleAxis:function(e,t,r,n){var i=e.getReferringComponents("singleAxis",se).models[0];t.coordSysDims=["single"],r.set("single",i),dp(i)&&(n.set("single",i),t.firstCategoryDimIndex=0)},polar:function(e,t,r,n){var i=e.getReferringComponents("polar",se).models[0],a=i.findAxisModel("radiusAxis"),o=i.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],r.set("radius",a),r.set("angle",o),dp(a)&&(n.set("radius",a),t.firstCategoryDimIndex=0),dp(o)&&(n.set("angle",o),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},geo:function(e,t,r,n){t.coordSysDims=["lng","lat"]},parallel:function(e,t,r,n){var i=e.ecModel,a=i.getComponent("parallel",e.get("parallelIndex")),o=t.coordSysDims=a.dimensions.slice();D(a.parallelAxisIndex,function(s,l){var u=i.getComponent("parallelAxis",s),f=o[l];r.set(f,u),dp(u)&&(n.set(f,u),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=l))})}};function dp(e){return e.get("type")==="category"}function _U(e,t,r){r=r||{};var n=r.byIndex,i=r.stackedCoordDimension,a,o,s;tst(t)?a=t:(o=t.schema,a=o.dimensions,s=t.store);var l=!!(e&&e.get("stack")),u,f,c,p;if(D(a,function(y,x){H(y)&&(a[x]=y={name:y}),l&&!y.isExtraCoord&&(!n&&!u&&y.ordinalMeta&&(u=y),!f&&y.type!=="ordinal"&&y.type!=="time"&&(!i||i===y.coordDim)&&(f=y))}),f&&!n&&!u&&(n=!0),f){c="__\0ecstackresult_"+e.id,p="__\0ecstackedover_"+e.id,u&&(u.createInvertedIndices=!0);var h=f.coordDim,d=f.type,m=0;D(a,function(y){y.coordDim===h&&m++});var v={name:c,coordDim:h,coordDimIndex:m,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},g={name:p,coordDim:p,coordDimIndex:m+1,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(v.storeDimIndex=s.ensureCalculationDimension(p,d),g.storeDimIndex=s.ensureCalculationDimension(c,d)),o.appendCalculationDimension(v),o.appendCalculationDimension(g)):(a.push(v),a.push(g))}return{stackedDimension:f&&f.name,stackedByDimension:u&&u.name,isStackedByIndex:n,stackedOverDimension:p,stackResultDimension:c}}function tst(e){return!Px(e.schema)}function ui(e,t){return!!t&&t===e.getCalculationInfo("stackedDimension")}function kx(e,t){return ui(e,t)?e.getCalculationInfo("stackResultDimension"):t}function est(e,t){var r=e.get("coordinateSystem"),n=Ko.get(r),i;return t&&t.coordSysDims&&(i=F(t.coordSysDims,function(a){var o={name:a},s=t.axisMap.get(a);if(s){var l=s.get("type");o.type=Qu(l)}return o})),i||(i=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),i}function rst(e,t,r){var n,i;return r&&D(e,function(a,o){var s=a.coordDim,l=r.categoryAxisMap.get(s);l&&(n==null&&(n=o),a.ordinalMeta=l.getOrdinalMeta(),t&&(a.createInvertedIndices=!0)),a.otherDims.itemName!=null&&(i=!0)}),!i&&n!=null&&(e[n].otherDims.itemName=0),n}function nst(e,t,r){r=r||{};var n=t.getSourceManager(),i,a=!1;e?(a=!0,i=lp(e)):(i=n.getSource(),a=i.sourceFormat===wr);var o=xU(t),s=est(t,o),l=r.useEncodeDefaulter,u=j(l)?l:l?pt(X0,s,t):null,f={coordDimensions:s,generateCoord:r.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!a},c=va(i,f),p=rst(c.dimensions,r.createInvertedIndices,o),h=a?null:n.getSharedDataStore(c),d=_U(t,{schema:c,store:h}),m=new Ne(c,t);m.setCalculationInfo(d);var v=p!=null&&ist(i)?function(g,y,x,_){return _===p?x:this.defaultDimValueGetter(g,y,x,_)}:null;return m.hasItemOption=!1,m.initData(a?i:h,null,v),m}function ist(e){if(e.sourceFormat===wr){var t=ast(e.data||[]);return!B(ra(t))}}function ast(e){for(var t=0;tr[1]&&(r[1]=t[1])},e.prototype.unionExtentFromData=function(t,r){this.unionExtent(t.getApproximateExtent(r))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(t,r){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(r)||(n[1]=r)},e.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},e.prototype.isBlank=function(){return this._isBlank},e.prototype.setBlank=function(t){this._isBlank=t},e}();Bs(bU);var Bn=bU;var ost=0,sst=function(){function e(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++ost}return e.createByAxisModel=function(t){var r=t.option,n=r.data,i=n&&F(n,lst);return new e({categories:i,needCollect:!i,deduplication:r.dedplication!==!1})},e.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},e.prototype.parseAndCollect=function(t){var r,n=this._needCollect;if(!H(t)&&!n)return t;if(n&&!this._deduplication)return r=this.categories.length,this.categories[r]=t,r;var i=this._getOrCreateMap();return r=i.get(t),r==null&&(n?(r=this.categories.length,this.categories[r]=t,i.set(t,r)):r=NaN),r},e.prototype._getOrCreateMap=function(){return this._map||(this._map=$(this.categories))},e}();function lst(e){return rt(e)&&e.value!=null?e.value:e+""}var Pv=sst;function Rv(e){return e.type==="interval"||e.type==="log"}function wU(e,t,r,n){var i={},a=e[1]-e[0],o=i.interval=t0(a/t,!0);r!=null&&on&&(o=i.interval=n);var s=i.intervalPrecision=nA(o),l=i.niceTickExtent=[pe(Math.ceil(e[0]/o)*o,s),pe(Math.floor(e[1]/o)*o,s)];return ust(l,e),i}function Ox(e){var t=Math.pow(10,Jy(e)),r=e/t;return r?r===2?r=3:r===3?r=5:r*=2:r=1,pe(r*t)}function nA(e){return an(e)+2}function SU(e,t,r){e[t]=Math.max(Math.min(e[t],r[1]),r[0])}function ust(e,t){!isFinite(e[0])&&(e[0]=t[0]),!isFinite(e[1])&&(e[1]=t[1]),SU(e,0,t),SU(e,1,t),e[0]>e[1]&&(e[0]=e[1])}function nl(e,t){return e>=t[0]&&e<=t[1]}function il(e,t){return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])}function al(e,t){return e*(t[1]-t[0])+t[0]}var TU=function(e){N(t,e);function t(r){var n=e.call(this,r)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new Pv({})),B(i)&&(i=new Pv({categories:F(i,function(a){return rt(a)?a.value:a})})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return t.prototype.parse=function(r){return r==null?NaN:H(r)?this._ordinalMeta.getOrdinal(r):Math.round(r)},t.prototype.contain=function(r){return r=this.parse(r),nl(r,this._extent)&&this._ordinalMeta.categories[r]!=null},t.prototype.normalize=function(r){return r=this._getTickNumber(this.parse(r)),il(r,this._extent)},t.prototype.scale=function(r){return r=Math.round(al(r,this._extent)),this.getRawOrdinalNumber(r)},t.prototype.getTicks=function(){for(var r=[],n=this._extent,i=n[0];i<=n[1];)r.push({value:i}),i++;return r},t.prototype.getMinorTicks=function(r){},t.prototype.setSortInfo=function(r){if(r==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var n=r.ordinalNumbers,i=this._ordinalNumbersByTick=[],a=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Math.min(s,n.length);o=0&&r=0&&r=r},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t}(Bn);Bn.registerClass(TU);var Nv=TU;var Ju=pe,MU=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="interval",r._interval=0,r._intervalPrecision=2,r}return t.prototype.parse=function(r){return r},t.prototype.contain=function(r){return nl(r,this._extent)},t.prototype.normalize=function(r){return il(r,this._extent)},t.prototype.scale=function(r){return al(r,this._extent)},t.prototype.setExtent=function(r,n){var i=this._extent;isNaN(r)||(i[0]=parseFloat(r)),isNaN(n)||(i[1]=parseFloat(n))},t.prototype.unionExtent=function(r){var n=this._extent;r[0]n[1]&&(n[1]=r[1]),this.setExtent(n[0],n[1])},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(r){this._interval=r,this._niceExtent=this._extent.slice(),this._intervalPrecision=nA(r)},t.prototype.getTicks=function(r){var n=this._interval,i=this._extent,a=this._niceExtent,o=this._intervalPrecision,s=[];if(!n)return s;var l=1e4;i[0]l)return[];var f=s.length?s[s.length-1].value:a[1];return i[1]>f&&(r?s.push({value:Ju(f+n,o)}):s.push({value:i[1]})),s},t.prototype.getMinorTicks=function(r){for(var n=this.getTicks(!0),i=[],a=this.getExtent(),o=1;oa[0]&&h0&&(a=a===null?s:Math.min(a,s))}r[n]=a}}return r}function lA(e){var t=cst(e),r=[];return D(e,function(n){var i=n.coordinateSystem,a=i.getBaseAxis(),o=a.getExtent(),s;if(a.type==="category")s=a.getBandWidth();else if(a.type==="value"||a.type==="time"){var l=a.dim+"_"+a.index,u=t[l],f=Math.abs(o[1]-o[0]),c=a.scale.getExtent(),p=Math.abs(c[1]-c[0]);s=u?f/p*u:f}else{var h=n.getData();s=Math.abs(o[1]-o[0])/h.count()}var d=q(n.get("barWidth"),s),m=q(n.get("barMaxWidth"),s),v=q(n.get("barMinWidth")||(LU(n)?.5:1),s),g=n.get("barGap"),y=n.get("barCategoryGap");r.push({bandWidth:s,barWidth:d,barMaxWidth:m,barMinWidth:v,barGap:g,barCategoryGap:y,axisKey:oA(a),stackId:aA(n)})}),DU(r)}function DU(e){var t={};D(e,function(n,i){var a=n.axisKey,o=n.bandWidth,s=t[a]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},l=s.stacks;t[a]=s;var u=n.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var f=n.barWidth;f&&!l[u].width&&(l[u].width=f,f=Math.min(s.remainedWidth,f),s.remainedWidth-=f);var c=n.barMaxWidth;c&&(l[u].maxWidth=c);var p=n.barMinWidth;p&&(l[u].minWidth=p);var h=n.barGap;h!=null&&(s.gap=h);var d=n.barCategoryGap;d!=null&&(s.categoryGap=d)});var r={};return D(t,function(n,i){r[i]={};var a=n.stacks,o=n.bandWidth,s=n.categoryGap;if(s==null){var l=St(a).length;s=Math.max(35-l*4,15)+"%"}var u=q(s,o),f=q(n.gap,1),c=n.remainedWidth,p=n.autoWidthCount,h=(c-u)/(p+(p-1)*f);h=Math.max(h,0),D(a,function(g){var y=g.maxWidth,x=g.minWidth;if(g.width){var _=g.width;y&&(_=Math.min(_,y)),x&&(_=Math.max(_,x)),g.width=_,c-=_+f*_,p--}else{var _=h;y&&y<_&&(_=Math.min(y,c)),x&&x>_&&(_=x),_!==h&&(g.width=_,c-=_+f*_,p--)}}),h=(c-u)/(p+(p-1)*f),h=Math.max(h,0);var d=0,m;D(a,function(g,y){g.width||(g.width=h),m=g,d+=g.width*(1+f)}),m&&(d-=m.width*f);var v=-d/2;D(a,function(g,y){r[i][y]=r[i][y]||{bandWidth:o,offset:v,width:g.width},v+=g.width*(1+f)})}),r}function EU(e,t,r){if(e&&t){var n=e[oA(t)];return n!=null&&r!=null?n[aA(r)]:n}}function Ux(e,t){var r=sA(e,t),n=lA(r);D(r,function(i){var a=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),l=aA(i),u=n[oA(s)][l],f=u.offset,c=u.width;a.setLayout({bandWidth:u.bandWidth,offset:f,size:c})})}function Vx(e){return{seriesType:e,plan:si(),reset:function(t){if(IU(t)){var r=t.getData(),n=t.coordinateSystem,i=n.getBaseAxis(),a=n.getOtherAxis(i),o=r.getDimensionIndex(r.mapDimension(a.dim)),s=r.getDimensionIndex(r.mapDimension(i.dim)),l=t.get("showBackground",!0),u=r.mapDimension(a.dim),f=r.getCalculationInfo("stackResultDimension"),c=ui(r,u)&&!!r.getCalculationInfo("stackedOnSeries"),p=a.isHorizontal(),h=pst(i,a),d=LU(t),m=t.get("barMinHeight")||0,v=f&&r.getDimensionIndex(f),g=r.getLayout("size"),y=r.getLayout("offset");return{progress:function(x,_){for(var S=x.count,b=d&&pn(S*3),w=d&&l&&pn(S*3),T=d&&pn(S),M=n.master.getRect(),C=p?M.width:M.height,A,P=_.getStore(),L=0;(A=x.next())!=null;){var I=P.get(c?v:o,A),E=P.get(s,A),R=h,k=void 0;c&&(k=+I-P.get(o,A));var O=void 0,z=void 0,U=void 0,G=void 0;if(p){var Y=n.dataToPoint([I,E]);if(c){var et=n.dataToPoint([k,E]);R=et[0]}O=R,z=Y[1]+y,U=Y[0]-R,G=g,Math.abs(U)>>1;e[i][1]i&&(this._approxInterval=i);var s=Bx.length,l=Math.min(hst(Bx,this._approxInterval,0,s),s-1);this._interval=Bx[l][1],this._minLevelUnit=Bx[Math.max(l-1,0)][0]},t.prototype.parse=function(r){return Ct(r)?r:+on(r)},t.prototype.contain=function(r){return nl(this.parse(r),this._extent)},t.prototype.normalize=function(r){return il(this.parse(r),this._extent)},t.prototype.scale=function(r){return al(r,this._extent)},t.type="time",t}(Fn),Bx=[["second",U0],["minute",V0],["hour",np],["quarter-day",np*6],["half-day",np*12],["day",ii*1.2],["half-week",ii*3.5],["week",ii*7],["month",ii*31],["quarter",ii*95],["half-year",GT/2],["year",GT]];function dst(e,t,r,n){var i=on(t),a=on(r),o=function(d){return YT(i,d,n)===YT(a,d,n)},s=function(){return o("year")},l=function(){return s()&&o("month")},u=function(){return l()&&o("day")},f=function(){return u()&&o("hour")},c=function(){return f()&&o("minute")},p=function(){return c()&&o("second")},h=function(){return p()&&o("millisecond")};switch(e){case"year":return s();case"month":return l();case"day":return u();case"hour":return f();case"minute":return c();case"second":return p();case"millisecond":return h()}}function vst(e,t){return e/=ii,e>16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function mst(e){var t=30*ii;return e/=t,e>6?6:e>3?3:e>2?2:1}function gst(e){return e/=np,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function PU(e,t){return e/=t?V0:U0,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function yst(e){return t0(e,!0)}function xst(e,t,r){var n=new Date(e);switch(Wu(t)){case"year":case"month":n[XT(r)](0);case"day":n[qT(r)](1);case"hour":n[ZT(r)](0);case"minute":n[KT(r)](0);case"second":n[$T(r)](0),n[jT(r)](0)}return n.getTime()}function _st(e,t,r,n){var i=1e4,a=WT,o=0;function s(C,A,P,L,I,E,R){for(var k=new Date(A),O=A,z=k[L]();O1&&E===0&&P.unshift({value:P[0].value-O})}}for(var E=0;E=n[0]&&y<=n[1]&&c++)}var x=(n[1]-n[0])/t;if(c>x*1.5&&p>x/1.5||(u.push(v),c>x||e===a[h]))break}f=[]}}}for(var _=Ut(F(u,function(C){return Ut(C,function(A){return A.value>=n[0]&&A.value<=n[1]&&!A.notAdd})}),function(C){return C.length>0}),S=[],b=_.length-1,h=0;h<_.length;++h)for(var w=_[h],T=0;T0;)a*=10;var s=[pe(wst(n[0]/a)*a),pe(Sst(n[1]/a)*a)];this._interval=a,this._niceExtent=s}},t.prototype.calcNiceExtent=function(r){kv.calcNiceExtent.call(this,r),this._fixMin=r.fixMin,this._fixMax=r.fixMax},t.prototype.parse=function(r){return r},t.prototype.contain=function(r){return r=ma(r)/ma(this.base),nl(r,this._extent)},t.prototype.normalize=function(r){return r=ma(r)/ma(this.base),il(r,this._extent)},t.prototype.scale=function(r){return r=al(r,this._extent),Gx(this.base,r)},t.type="log",t}(Bn),kU=uA.prototype;kU.getMinorTicks=kv.getMinorTicks;kU.getLabel=kv.getLabel;function Hx(e,t){return bst(e,an(t))}Bn.registerClass(uA);var OU=uA;var Tst=function(){function e(t,r,n){this._prepareParams(t,r,n)}return e.prototype._prepareParams=function(t,r,n){n[1]0&&l>0&&!u&&(s=0),s<0&&l<0&&!f&&(l=0));var p=this._determinedMin,h=this._determinedMax;return p!=null&&(s=p,u=!0),h!=null&&(l=h,f=!0),{min:s,max:l,minFixed:u,maxFixed:f,isBlank:c}},e.prototype.modifyDataMinMax=function(t,r){this[Ast[t]]=r},e.prototype.setDeterminedMinMax=function(t,r){var n=Mst[t];this[n]=r},e.prototype.freeze=function(){this.frozen=!0},e}();var Mst={min:"_determinedMin",max:"_determinedMax"},Ast={min:"_dataMin",max:"_dataMax"};function Yx(e,t,r){var n=e.rawExtentInfo;return n||(n=new Tst(e,t,r),e.rawExtentInfo=n,n)}function Wx(e,t){return t==null?null:Es(t)?NaN:e.parse(t)}function fA(e,t){var r=e.type,n=Yx(e,t,e.getExtent()).calculate();e.setBlank(n.isBlank);var i=n.min,a=n.max,o=t.ecModel;if(o&&r==="time"){var s=sA("bar",o),l=!1;if(D(s,function(c){l=l||c.getBaseAxis()===t.axis}),l){var u=lA(s),f=Cst(i,a,t,u);i=f.min,a=f.max}}return{extent:[i,a],fixMin:n.minFixed,fixMax:n.maxFixed}}function Cst(e,t,r,n){var i=r.axis.getExtent(),a=i[1]-i[0],o=EU(n,r.axis);if(o===void 0)return{min:e,max:t};var s=1/0;D(o,function(h){s=Math.min(h.offset,s)});var l=-1/0;D(o,function(h){l=Math.max(h.offset+h.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,f=t-e,c=1-(s+l)/a,p=f/c-f;return t+=p*(l/u),e-=p*(s/u),{min:e,max:t}}function Ja(e,t){var r=t,n=fA(e,r),i=n.extent,a=r.get("splitNumber");e instanceof OU&&(e.base=r.get("logBase"));var o=e.type,s=r.get("interval"),l=o==="interval"||o==="time";e.setExtent(i[0],i[1]),e.calcNiceExtent({splitNumber:a,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:l?r.get("minInterval"):null,maxInterval:l?r.get("maxInterval"):null}),s!=null&&e.setInterval&&e.setInterval(s)}function ol(e,t){if(t=t||e.get("type"),t)switch(t){case"category":return new Nv({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:[1/0,-1/0]});case"time":return new Fx({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC")});default:return new(Bn.getClass(t)||Fn)}}function zU(e){var t=e.scale.getExtent(),r=t[0],n=t[1];return!(r>0&&n>0||r<0&&n<0)}function vp(e){var t=e.getLabelModel().get("formatter"),r=e.type==="category"?e.scale.getExtent()[0]:null;return e.scale.type==="time"?function(n){return function(i,a){return e.scale.getFormattedLabel(i,a,n)}}(t):H(t)?function(n){return function(i){var a=e.scale.getLabel(i),o=n.replace("{value}",a??"");return o}}(t):j(t)?function(n){return function(i,a){return r!=null&&(a=i.value-r),n(Ov(e,i),a,i.level!=null?{level:i.level}:null)}}(t):function(n){return e.scale.getLabel(n)}}function Ov(e,t){return e.type==="category"?e.scale.getLabel(t):t.value}function UU(e){var t=e.model,r=e.scale;if(!(!t.get(["axisLabel","show"])||r.isBlank())){var n,i,a=r.getExtent();r instanceof Nv?i=r.count():(n=r.getTicks(),i=n.length);var o=e.getLabelModel(),s=vp(e),l,u=1;i>40&&(u=Math.ceil(i/40));for(var f=0;fe[1]&&(e[1]=i[1])})}var to=function(){function e(){}return e.prototype.getNeedCrossZero=function(){var t=this.option;return!t.scale},e.prototype.getCoordSysModel=function(){},e}();var Est=1e-8;function BU(e,t){return Math.abs(e-t)i&&(n=o,i=l)}if(n)return Lst(n.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},t.prototype.getBoundingRect=function(r){var n=this._rect;if(n&&!r)return n;var i=[1/0,1/0],a=[-1/0,-1/0],o=this.geometries;return D(o,function(s){s.type==="polygon"?GU(s.exterior,i,a,r):D(s.points,function(l){GU(l,i,a,r)})}),isFinite(i[0])&&isFinite(i[1])&&isFinite(a[0])&&isFinite(a[1])||(i[0]=i[1]=a[0]=a[1]=0),n=new dt(i[0],i[1],a[0]-i[0],a[1]-i[1]),r||(this._rect=n),n},t.prototype.contain=function(r){var n=this.getBoundingRect(),i=this.geometries;if(!n.contain(r[0],r[1]))return!1;t:for(var a=0,o=i.length;a>1^-(s&1),l=l>>1^-(l&1),s+=i,l+=a,i=s,a=l,n.push([s/r,l/r])}return n}function vA(e,t){return e=Pst(e),F(Ut(e.features,function(r){return r.geometry&&r.properties&&r.geometry.coordinates.length>0}),function(r){var n=r.properties,i=r.geometry,a=[];switch(i.type){case"Polygon":var o=i.coordinates;a.push(new pA(o[0],o.slice(1)));break;case"MultiPolygon":D(i.coordinates,function(l){l[0]&&a.push(new pA(l[0],l.slice(1)))});break;case"LineString":a.push(new hA([i.coordinates]));break;case"MultiLineString":a.push(new hA(i.coordinates))}var s=new Kx(n[t||"name"],a,n.cp);return s.properties=n,s})}var zv=yt();function XU(e){return e.type==="category"?Rst(e):kst(e)}function qU(e,t){return e.type==="category"?Nst(e,t):{ticks:F(e.scale.getTicks(),function(r){return r.value})}}function Rst(e){var t=e.getLabelModel(),r=ZU(e,t);return!t.get("show")||e.scale.isBlank()?{labels:[],labelCategoryInterval:r.labelCategoryInterval}:r}function ZU(e,t){var r=KU(e,"labels"),n=Xx(t),i=$U(r,n);if(i)return i;var a,o;return j(n)?a=tV(e,n):(o=n==="auto"?Ost(e):n,a=JU(e,o)),jU(r,n,{labels:a,labelCategoryInterval:o})}function Nst(e,t){var r=KU(e,"ticks"),n=Xx(t),i=$U(r,n);if(i)return i;var a,o;if((!t.get("show")||e.scale.isBlank())&&(a=[]),j(n))a=tV(e,n,!0);else if(n==="auto"){var s=ZU(e,e.getLabelModel());o=s.labelCategoryInterval,a=F(s.labels,function(l){return l.tickValue})}else o=n,a=JU(e,o,!0);return jU(r,n,{ticks:a,tickCategoryInterval:o})}function kst(e){var t=e.scale.getTicks(),r=vp(e);return{labels:F(t,function(n,i){return{level:n.level,formattedLabel:r(n,i),rawLabel:e.scale.getLabel(n),tickValue:n.value}})}}function KU(e,t){return zv(e)[t]||(zv(e)[t]=[])}function $U(e,t){for(var r=0;r40&&(s=Math.max(1,Math.floor(o/40)));for(var l=a[0],u=e.dataToCoord(l+1)-e.dataToCoord(l),f=Math.abs(u*Math.cos(n)),c=Math.abs(u*Math.sin(n)),p=0,h=0;l<=a[1];l+=s){var d=0,m=0,v=Ga(r({value:l}),t.font,"center","top");d=v.width*1.3,m=v.height*1.3,p=Math.max(p,d,7),h=Math.max(h,m,7)}var g=p/f,y=h/c;isNaN(g)&&(g=1/0),isNaN(y)&&(y=1/0);var x=Math.max(0,Math.floor(Math.min(g,y))),_=zv(e.model),S=e.getExtent(),b=_.lastAutoInterval,w=_.lastTickCount;return b!=null&&w!=null&&Math.abs(b-x)<=1&&Math.abs(w-o)<=1&&b>x&&_.axisExtent0===S[0]&&_.axisExtent1===S[1]?x=b:(_.lastTickCount=o,_.lastAutoInterval=x,_.axisExtent0=S[0],_.axisExtent1=S[1]),x}function zst(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}function JU(e,t,r){var n=vp(e),i=e.scale,a=i.getExtent(),o=e.getLabelModel(),s=[],l=Math.max((t||0)+1,1),u=a[0],f=i.count();u!==0&&l>1&&f/l>2&&(u=Math.round(Math.ceil(u/l)*l));var c=qx(e),p=o.get("showMinLabel")||c,h=o.get("showMaxLabel")||c;p&&u!==a[0]&&m(a[0]);for(var d=u;d<=a[1];d+=l)m(d);h&&d-l!==a[1]&&m(a[1]);function m(v){var g={value:v};s.push(r?v:{formattedLabel:n(g),rawLabel:i.getLabel(g),tickValue:v})}return s}function tV(e,t,r){var n=e.scale,i=vp(e),a=[];return D(n.getTicks(),function(o){var s=n.getLabel(o),l=o.value;t(o.value,s)&&a.push(r?l:{formattedLabel:i(o),rawLabel:s,tickValue:l})}),a}var eV=[0,1],Ust=function(){function e(t,r,n){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=r,this._extent=n||[0,0]}return e.prototype.contain=function(t){var r=this._extent,n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return t>=n&&t<=i},e.prototype.containData=function(t){return this.scale.contain(t)},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.getPixelPrecision=function(t){return Qy(t||this.scale.getExtent(),this._extent)},e.prototype.setExtent=function(t,r){var n=this._extent;n[0]=t,n[1]=r},e.prototype.dataToCoord=function(t,r){var n=this._extent,i=this.scale;return t=i.normalize(t),this.onBand&&i.type==="ordinal"&&(n=n.slice(),rV(n,i.count())),$t(t,eV,n,r)},e.prototype.coordToData=function(t,r){var n=this._extent,i=this.scale;this.onBand&&i.type==="ordinal"&&(n=n.slice(),rV(n,i.count()));var a=$t(t,n,eV,r);return this.scale.scale(a)},e.prototype.pointToData=function(t,r){},e.prototype.getTicksCoords=function(t){t=t||{};var r=t.tickModel||this.getTickModel(),n=qU(this,r),i=n.ticks,a=F(i,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=r.get("alignWithLabel");return Vst(this,a,o,t.clamp),a},e.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var t=this.model.getModel("minorTick"),r=t.get("splitNumber");r>0&&r<100||(r=5);var n=this.scale.getMinorTicks(r),i=F(n,function(a){return F(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return i},e.prototype.getViewLabels=function(){return XU(this).labels},e.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},e.prototype.getTickModel=function(){return this.model.getModel("axisTick")},e.prototype.getBandWidth=function(){var t=this._extent,r=this.scale.getExtent(),n=r[1]-r[0]+(this.onBand?1:0);n===0&&(n=1);var i=Math.abs(t[1]-t[0]);return Math.abs(i)/n},e.prototype.calculateCategoryInterval=function(){return QU(this)},e}();function rV(e,t){var r=e[1]-e[0],n=t,i=r/n/2;e[0]+=i,e[1]-=i}function Vst(e,t,r,n){var i=t.length;if(!e.onBand||r||!i)return;var a=e.getExtent(),o,s;if(i===1)t[0].coord=a[0],o=t[1]={coord:a[1]};else{var l=t[i-1].tickValue-t[0].tickValue,u=(t[i-1].coord-t[0].coord)/l;D(t,function(h){h.coord-=u/2});var f=e.scale.getExtent();s=1+f[1]-t[i-1].tickValue,o={coord:t[i-1].coord+u*s},t.push(o)}var c=a[0]>a[1];p(t[0].coord,a[0])&&(n?t[0].coord=a[0]:t.shift()),n&&p(a[0],t[0].coord)&&t.unshift({coord:a[0]}),p(a[1],o.coord)&&(n?o.coord=a[1]:t.pop()),n&&p(o.coord,a[1])&&t.push({coord:a[1]});function p(h,d){return h=pe(h),d=pe(d),c?h>d:hi&&(i+=Uv);var h=Math.atan2(s,o);if(h<0&&(h+=Uv),h>=n&&h<=i||h+Uv>=n&&h+Uv<=i)return l[0]=f,l[1]=c,u-r;var d=r*Math.cos(n)+e,m=r*Math.sin(n)+t,v=r*Math.cos(i)+e,g=r*Math.sin(i)+t,y=(d-o)*(d-o)+(m-s)*(m-s),x=(v-o)*(v-o)+(g-s)*(g-s);return y0){t=t/180*Math.PI,ya.fromArray(e[0]),Me.fromArray(e[1]),Ze.fromArray(e[2]),kt.sub(ro,ya,Me),kt.sub(eo,Ze,Me);var r=ro.len(),n=eo.len();if(!(r<.001||n<.001)){ro.scale(1/r),eo.scale(1/n);var i=ro.dot(eo),a=Math.cos(t);if(a1&&kt.copy(hn,Ze),hn.toArray(e[1])}}}}function aV(e,t,r){if(r<=180&&r>0){r=r/180*Math.PI,ya.fromArray(e[0]),Me.fromArray(e[1]),Ze.fromArray(e[2]),kt.sub(ro,Me,ya),kt.sub(eo,Ze,Me);var n=ro.len(),i=eo.len();if(!(n<.001||i<.001)){ro.scale(1/n),eo.scale(1/i);var a=ro.dot(t),o=Math.cos(r);if(a=l)kt.copy(hn,Ze);else{hn.scaleAndAdd(eo,s/Math.tan(Math.PI/2-f));var c=Ze.x!==Me.x?(hn.x-Me.x)/(Ze.x-Me.x):(hn.y-Me.y)/(Ze.y-Me.y);if(isNaN(c))return;c<0?kt.copy(hn,Me):c>1&&kt.copy(hn,Ze)}hn.toArray(e[1])}}}}function nV(e,t,r,n){var i=r==="normal",a=i?e:e.ensureState(r);a.ignore=t;var o=n.get("smooth");o&&o===!0&&(o=.3),a.shape=a.shape||{},o>0&&(a.shape.smooth=o);var s=n.getModel("lineStyle").getLineStyle();i?e.useStyle(s):a.style=s}function Yst(e,t){var r=t.smooth,n=t.points;if(n)if(e.moveTo(n[0][0],n[0][1]),r>0&&n.length>=3){var i=mi(n[0],n[1]),a=mi(n[1],n[2]);if(!i||!a){e.lineTo(n[1][0],n[1][1]),e.lineTo(n[2][0],n[2][1]);return}var o=Math.min(i,a)*r,s=Dc([],n[1],n[0],o/i),l=Dc([],n[1],n[2],o/a),u=Dc([],s,l,.5);e.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),e.bezierCurveTo(l[0],l[1],l[0],l[1],n[2][0],n[2][1])}else for(var f=1;f0&&a&&b(-c/o,0,o);var v=e[0],g=e[o-1],y,x;_(),y<0&&w(-y,.8),x<0&&w(x,.8),_(),S(y,x,1),S(x,y,-1),_(),y<0&&T(-y),x<0&&T(x);function _(){y=v.rect[t]-n,x=i-g.rect[t]-g.rect[r]}function S(M,C,A){if(M<0){var P=Math.min(C,-M);if(P>0){b(P*A,0,o);var L=P+M;L<0&&w(-L*A,1)}else w(-M*A,1)}}function b(M,C,A){M!==0&&(u=!0);for(var P=C;P0)for(var L=0;L0;L--){var k=A[L-1]*R;b(-k,L,o)}}}function T(M){var C=M<0?-1:1;M=Math.abs(M);for(var A=Math.ceil(M/(o-1)),P=0;P0?b(A,0,P+1):b(-A,o-P-1,o),M-=A,M<=0)return}return u}function sV(e,t,r,n){return oV(e,"x","width",t,r,n)}function Jx(e,t,r,n){return oV(e,"y","height",t,r,n)}function t1(e){var t=[];e.sort(function(m,v){return v.priority-m.priority});var r=new dt(0,0,0,0);function n(m){if(!m.ignore){var v=m.ensureState("emphasis");v.ignore==null&&(v.ignore=!1)}m.ignore=!0}for(var i=0;i=0&&n.attr(a.oldLayoutSelect),gt(p,"emphasis")>=0&&n.attr(a.oldLayoutEmphasis)),Rt(n,u,r,l)}else if(n.attr(u),!Xo(n).valueAnimation){var c=bt(n.style.opacity,1);n.style.opacity=0,Kt(n,{style:{opacity:c}},r,l)}if(a.oldLayout=u,n.states.select){var h=a.oldLayoutSelect={};e1(h,u,r1),e1(h,n.states.select,r1)}if(n.states.emphasis){var d=a.oldLayoutEmphasis={};e1(d,u,r1),e1(d,n.states.emphasis,r1)}R0(n,l,f,r,r)}if(i&&!i.ignore&&!i.invisible){var a=Zst(i),o=a.oldLayout,m={points:i.shape.points};o?(i.attr({shape:o}),Rt(i,{shape:m},r)):(i.setShape(m),i.style.strokePercent=0,Kt(i,{style:{strokePercent:1}},r)),a.oldLayout=m}},e}(),uV=Kst;var xA=yt();function _A(e){e.registerUpdateLifecycle("series:beforeupdate",function(t,r,n){var i=xA(r).labelManager;i||(i=xA(r).labelManager=new uV),i.clearLabels()}),e.registerUpdateLifecycle("series:layoutlabels",function(t,r,n){var i=xA(r).labelManager;n.updatedSeries.forEach(function(a){i.addLabelsOfSeries(r.getViewOfSeriesModel(a))}),i.updateLayoutConfig(r),i.layout(r),i.processLabelsOverall()})}var bA=Math.sin,SA=Math.cos,fV=Math.PI,ef=Math.PI*2,$st=180/fV,jst=function(){function e(){}return e.prototype.reset=function(t){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,t||4)},e.prototype.moveTo=function(t,r){this._add("M",t,r)},e.prototype.lineTo=function(t,r){this._add("L",t,r)},e.prototype.bezierCurveTo=function(t,r,n,i,a,o){this._add("C",t,r,n,i,a,o)},e.prototype.quadraticCurveTo=function(t,r,n,i){this._add("Q",t,r,n,i)},e.prototype.arc=function(t,r,n,i,a,o){this.ellipse(t,r,n,n,0,i,a,o)},e.prototype.ellipse=function(t,r,n,i,a,o,s,l){var u=s-o,f=!l,c=Math.abs(u),p=Fa(c-ef)||(f?u>=ef:-u>=ef),h=u>0?u%ef:u%ef+ef,d=!1;p?d=!0:Fa(c)?d=!1:d=h>=fV==!!f;var m=t+n*SA(o),v=r+i*bA(o);this._start&&this._add("M",m,v);var g=Math.round(a*$st);if(p){var y=1/this._p,x=(f?1:-1)*(ef-y);this._add("A",n,i,g,1,+f,t+n*SA(o+x),r+i*bA(o+x)),y>.01&&this._add("A",n,i,g,0,+f,m,v)}else{var _=t+n*SA(s),S=r+i*bA(s);this._add("A",n,i,g,+d,+f,_,S)}},e.prototype.rect=function(t,r,n,i){this._add("M",t,r),this._add("l",n,0),this._add("l",0,i),this._add("l",-n,0),this._add("Z")},e.prototype.closePath=function(){this._d.length>0&&this._add("Z")},e.prototype._add=function(t,r,n,i,a,o,s,l,u){for(var f=[],c=this._p,p=1;p"}function nlt(e){return""}function Bv(e,t){t=t||{};var r=t.newline?` -`:"";function n(i){var a=i.children,o=i.tag,s=i.attrs,l=i.text;return rlt(o,s)+(o!=="style"?Rr(l):l||"")+(a?""+r+F(a,function(u){return n(u)}).join(r)+r:"")+nlt(o)}return n(e)}function dV(e,t,r){r=r||{};var n=r.newline?` -`:"",i=" {"+n,a=n+"}",o=F(St(e),function(l){return l+i+F(St(e[l]),function(u){return u+":"+e[l][u]+";"}).join(n)+a}).join(n),s=F(St(t),function(l){return"@keyframes "+l+i+F(St(t[l]),function(u){return u+i+F(St(t[l][u]),function(f){var c=t[l][u][f];return f==="d"&&(c='path("'+c+'")'),f+":"+c+";"}).join(n)+a}).join(n)+a}).join(n);return!o&&!s?"":[""].join(n)}function Fv(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssClassIdx:0,cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function AA(e,t,r,n){return Ke("svg","root",{width:e,height:t,xmlns:cV,"xmlns:xlink":MA,version:"1.1",baseProfile:"full",viewBox:n?"0 0 "+e+" "+t:!1},r)}var vV={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},rf="transform-origin";function ilt(e,t,r){var n=V({},e.shape);V(n,t),e.buildPath(r,n);var i=new n1;return i.reset(Fy(e)),r.rebuildPath(i,1),i.generateStr(),i.getStr()}function alt(e,t){var r=t.originX,n=t.originY;(r||n)&&(e[rf]=r+"px "+n+"px")}var olt={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function gV(e,t){var r=t.zrId+"-ani-"+t.cssAnimIdx++;return t.cssAnims[r]=e,r}function slt(e,t,r){var n=e.shape.paths,i={},a,o;if(D(n,function(l){var u=Fv(r.zrId);u.animation=!0,Gv(l,{},u,!0);var f=u.cssAnims,c=u.cssNodes,p=St(f),h=p.length;if(h){o=p[h-1];var d=f[o];for(var m in d){var v=d[m];i[m]=i[m]||{d:""},i[m].d+=v.d||""}for(var g in c){var y=c[g].animation;y.indexOf(o)>=0&&(a=y)}}}),!!a){t.d=!1;var s=gV(i,r);return a.replace(o,s)}}function mV(e){return H(e)?vV[e]?"cubic-bezier("+vV[e]+")":Rc(e)?e:"":""}function Gv(e,t,r,n){var i=e.animators,a=i.length,o=[];if(e instanceof Qc){var s=slt(e,t,r);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var l={},u=0;u0}).length){var ut=gV(w,r);return ut+" "+y[0]+" both"}}for(var v in l){var s=m(l[v]);s&&o.push(s)}if(o.length){var g=r.zrId+"-cls-"+r.cssClassIdx++;r.cssNodes["."+g]={animation:o.join(",")},t.class=g}}var Hv=Math.round;function bV(e){return e&&H(e.src)}function SV(e){return e&&j(e.toDataURL)}function CA(e,t,r,n){TA(function(i,a){var o=i==="fill"||i==="stroke";o&&By(a)?IA(t,e,i,n):o&&wd(a)?LA(r,e,i,n):e[i]=a},t,r,!1),dlt(r,e,n)}function yV(e){return Fa(e[0]-1)&&Fa(e[1])&&Fa(e[2])&&Fa(e[3]-1)}function llt(e){return Fa(e[4])&&Fa(e[5])}function DA(e,t,r){if(t&&!(llt(t)&&yV(t))){var n=r?10:1e4;e.transform=yV(t)?"translate("+Hv(t[4]*n)/n+" "+Hv(t[5]*n)/n+")":Kk(t)}}function xV(e,t,r){for(var n=e.points,i=[],a=0;a"u"){var v="Image width/height must been given explictly in svg-ssr renderer.";be(p,v),be(h,v)}else if(p==null||h==null){var g=function(C,A){if(C){var P=C.elm,L=p||A.width,I=h||A.height;C.tag==="pattern"&&(u?(I=1,L/=a.width):f&&(L=1,I/=a.height)),C.attrs.width=L,C.attrs.height=I,P&&(P.setAttribute("width",L),P.setAttribute("height",I))}},y=Od(d,null,e,function(C){l||g(b,C),g(c,C)});y&&y.width&&y.height&&(p=p||y.width,h=h||y.height)}c=Ke("image","img",{href:d,width:p,height:h}),o.width=p,o.height=h}else i.svgElement&&(c=at(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(c){var x,_;l?x=_=1:u?(_=1,x=o.width/a.width):f?(x=1,_=o.height/a.height):o.patternUnits="userSpaceOnUse",x!=null&&!isNaN(x)&&(o.width=x),_!=null&&!isNaN(_)&&(o.height=_);var S=Gy(i);S&&(o.patternTransform=S);var b=Ke("pattern","",o,[c]),w=Bv(b),T=n.patternCache,M=T[w];M||(M=n.zrId+"-p"+n.patternIdx++,T[w]=M,o.id=M,b=n.defs[M]=Ke("pattern",M,o,[c])),t[r]=Td(M)}}function TV(e,t,r){var n=r.clipPathCache,i=r.defs,a=n[e.id];if(!a){a=r.zrId+"-c"+r.clipPathIdx++;var o={id:a};n[e.id]=a,i[a]=Ke("clipPath",a,o,[wV(e,r)])}t["clip-path"]=Td(a)}function PA(e){return document.createTextNode(e)}function sl(e,t,r){e.insertBefore(t,r)}function RA(e,t){e.removeChild(t)}function NA(e,t){e.appendChild(t)}function kA(e){return e.parentNode}function OA(e){return e.nextSibling}function a1(e,t){e.textContent=t}var MV=58,mlt=120,glt=Ke("","");function zA(e){return e===void 0}function no(e){return e!==void 0}function ylt(e,t,r){for(var n={},i=t;i<=r;++i){var a=e[i].key;a!==void 0&&(n[a]=i)}return n}function Wv(e,t){var r=e.key===t.key,n=e.tag===t.tag;return n&&r}function Yv(e){var t,r=e.children,n=e.tag;if(no(n)){var i=e.elm=i1(n);if(s1(glt,e),B(r))for(t=0;ta?(d=r[l+1]==null?null:r[l+1].elm,AV(e,d,r,i,l)):o1(e,t,n,a))}function xp(e,t){var r=t.elm=e.elm,n=e.children,i=t.children;e!==t&&(s1(e,t),zA(t.text)?no(n)&&no(i)?n!==i&&xlt(r,n,i):no(i)?(no(e.text)&&a1(r,""),AV(r,null,i,0,i.length-1)):no(n)?o1(r,n,0,n.length-1):no(e.text)&&a1(r,""):e.text!==t.text&&(no(n)&&o1(r,n,0,n.length-1),a1(r,t.text)))}function UA(e,t){if(Wv(e,t))xp(e,t);else{var r=e.elm,n=kA(r);Yv(t),n!==null&&(sl(n,t.elm,OA(r)),o1(n,[e],0,0))}return t}var _lt=0,blt=function(){function e(t,r,n){if(this.type="svg",this.refreshHover=CV("refreshHover"),this.configLayer=CV("configLayer"),this.storage=r,this._opts=n=V({},n),this.root=t,this._id="zr"+_lt++,this._oldVNode=AA(n.width,n.height),t&&!n.ssr){var i=this._viewport=document.createElement("div");i.style.cssText="position:relative;overflow:hidden";var a=this._svgDom=this._oldVNode.elm=i1("svg");s1(null,this._oldVNode),i.appendChild(a),t.appendChild(i)}this.resize(n.width,n.height)}return e.prototype.getType=function(){return this.type},e.prototype.getViewportRoot=function(){return this._viewport},e.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},e.prototype.getSvgDom=function(){return this._svgDom},e.prototype.refresh=function(){if(this.root){var t=this.renderToVNode({willUpdate:!0});t.attrs.style="position:absolute;left:0;top:0;user-select:none",UA(this._oldVNode,t),this._oldVNode=t}},e.prototype.renderOneToVNode=function(t){return EA(t,Fv(this._id))},e.prototype.renderToVNode=function(t){t=t||{};var r=this.storage.getDisplayList(!0),n=this._width,i=this._height,a=Fv(this._id);a.animation=t.animation,a.willUpdate=t.willUpdate,a.compress=t.compress;var o=[],s=this._bgVNode=Slt(n,i,this._backgroundColor,a);s&&o.push(s);var l=t.compress?null:this._mainVNode=Ke("g","main",{},[]);this._paintList(r,a,l?l.children:o),l&&o.push(l);var u=F(St(a.defs),function(p){return a.defs[p]});if(u.length&&o.push(Ke("defs","defs",{},u)),t.animation){var f=dV(a.cssNodes,a.cssAnims,{newline:!0});if(f){var c=Ke("style","stl",{},[],f);o.push(c)}}return AA(n,i,o,t.useViewBox)},e.prototype.renderToString=function(t){return t=t||{},Bv(this.renderToVNode({animation:bt(t.cssAnimation,!0),willUpdate:!1,compress:!0,useViewBox:bt(t.useViewBox,!0)}),{newline:!0})},e.prototype.setBackgroundColor=function(t){this._backgroundColor=t},e.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},e.prototype._paintList=function(t,r,n){for(var i=t.length,a=[],o=0,s,l,u=0,f=0;f=0&&!(p&&l&&p[m]===l[m]);m--);for(var v=d-1;v>m;v--)o--,s=a[o-1];for(var g=m+1;g=s)}}for(var c=this.__startIndex;c15)break}}I.prevElClipPaths&&g.restore()};if(y)if(y.length===0)T=v.__endIndex;else for(var C=h.dpr,A=0;A0&&t>i[0]){for(l=0;lt);l++);s=n[i[l]]}if(i.splice(l+1,0,t),n[t]=r,!r.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(r.dom,u.nextSibling):o.appendChild(r.dom)}else o.firstChild?o.insertBefore(r.dom,o.firstChild):o.appendChild(r.dom);r.__painter=this}},e.prototype.eachLayer=function(t,r){for(var n=this._zlevelList,i=0;i0?u1:0),this._needsManuallyCompositing),f.__builtin__||au("ZLevel "+u+" has been used by unkown layer "+f.id),f!==a&&(f.__used=!0,f.__startIndex!==l&&(f.__dirty=!0),f.__startIndex=l,f.incremental?f.__drawIndex=-1:f.__drawIndex=l,r(l),a=f),i.__dirty&or&&!i.__inHover&&(f.__dirty=!0,f.incremental&&f.__drawIndex<0&&(f.__drawIndex=l))}r(l),this.eachBuiltinLayer(function(c,p){!c.__used&&c.getElementCount()>0&&(c.__dirty=!0,c.__startIndex=c.__endIndex=c.__drawIndex=0),c.__dirty&&c.__drawIndex<0&&(c.__drawIndex=c.__startIndex)})},e.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},e.prototype._clearLayer=function(t){t.clear()},e.prototype.setBackgroundColor=function(t){this._backgroundColor=t,D(this._layers,function(r){r.setUnpainted()})},e.prototype.configLayer=function(t,r){if(r){var n=this._layerConfig;n[t]?_t(n[t],r,!0):n[t]=r;for(var i=0;i-1&&(u.style.stroke=u.style.fill,u.style.fill="#fff",u.style.lineWidth=2),n},t.type="series.line",t.dependencies=["grid","polar"],t.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},t}(Wt),PV=Dlt;function xa(e,t){var r=e.mapDimensionsAll("defaultedLabel"),n=r.length;if(n===1){var i=jo(e,t,r[0]);return i!=null?i+"":null}else if(n){for(var a=[],o=0;o=0&&n.push(t[a])}return n.join(" ")}var Elt=function(e){N(t,e);function t(r,n,i,a){var o=e.call(this)||this;return o.updateData(r,n,i,a),o}return t.prototype._createSymbol=function(r,n,i,a,o){this.removeAll();var s=ne(r,-1,-1,2,2,null,o);s.attr({z2:100,culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),s.drift=Ilt,this._symbolType=r,this.add(s)},t.prototype.stopSymbolAnimation=function(r){this.childAt(0).stopAnimation(null,r)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){Yr(this.childAt(0))},t.prototype.downplay=function(){Xr(this.childAt(0))},t.prototype.setZ=function(r,n){var i=this.childAt(0);i.zlevel=r,i.z=n},t.prototype.setDraggable=function(r,n){var i=this.childAt(0);i.draggable=r,i.cursor=!n&&r?"move":i.cursor},t.prototype.updateData=function(r,n,i,a){this.silent=!1;var o=r.getItemVisual(n,"symbol")||"circle",s=r.hostModel,l=t.getSymbolSize(r,n),u=o!==this._symbolType,f=a&&a.disableAnimation;if(u){var c=r.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,r,n,l,c)}else{var p=this.childAt(0);p.silent=!1;var h={scaleX:l[0]/2,scaleY:l[1]/2};f?p.attr(h):Rt(p,h,s,n),er(p)}if(this._updateCommon(r,n,l,i,a),u){var p=this.childAt(0);if(!f){var h={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:p.style.opacity}};p.scaleX=p.scaleY=0,p.style.opacity=0,Kt(p,h,s,n)}}f&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(r,n,i,a,o){var s=this.childAt(0),l=r.hostModel,u,f,c,p,h,d,m,v,g;if(a&&(u=a.emphasisItemStyle,f=a.blurItemStyle,c=a.selectItemStyle,p=a.focus,h=a.blurScope,m=a.labelStatesModels,v=a.hoverScale,g=a.cursorStyle,d=a.emphasisDisabled),!a||r.hasItemOption){var y=a&&a.itemModel?a.itemModel:r.getItemModel(n),x=y.getModel("emphasis");u=x.getModel("itemStyle").getItemStyle(),c=y.getModel(["select","itemStyle"]).getItemStyle(),f=y.getModel(["blur","itemStyle"]).getItemStyle(),p=x.get("focus"),h=x.get("blurScope"),d=x.get("disabled"),m=ae(y),v=x.getShallow("scale"),g=y.getShallow("cursor")}var _=r.getItemVisual(n,"symbolRotate");s.attr("rotation",(_||0)*Math.PI/180||0);var S=li(r.getItemVisual(n,"symbolOffset"),i);S&&(s.x=S[0],s.y=S[1]),g&&s.attr("cursor",g);var b=r.getItemVisual(n,"style"),w=b.fill;if(s instanceof me){var T=s.style;s.useStyle(V({image:T.image,x:T.x,y:T.y,width:T.width,height:T.height},b))}else s.__isEmptyBrush?s.useStyle(V({},b)):s.useStyle(b),s.style.decal=null,s.setColor(w,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var M=r.getItemVisual(n,"liftZ"),C=this._z2;M!=null?C==null&&(this._z2=s.z2,s.z2+=M):C!=null&&(s.z2=C,this._z2=null);var A=o&&o.useNameLabel;he(s,m,{labelFetcher:l,labelDataIndex:n,defaultText:P,inheritColor:w,defaultOpacity:b.opacity});function P(E){return A?r.getName(E):xa(r,E)}this._sizeX=i[0]/2,this._sizeY=i[1]/2;var L=s.ensureState("emphasis");L.style=u,s.ensureState("select").style=c,s.ensureState("blur").style=f;var I=v==null||v===!0?Math.max(1.1,3/this._sizeY):isFinite(v)&&v>0?+v:1;L.scaleX=this._sizeX*I,L.scaleY=this._sizeY*I,this.setSymbolScale(1),Zt(this,p,h,d)},t.prototype.setSymbolScale=function(r){this.scaleX=this.scaleY=r},t.prototype.fadeOut=function(r,n,i){var a=this.childAt(0),o=ht(this).dataIndex,s=i&&i.animation;if(this.silent=a.silent=!0,i&&i.fadeLabel){var l=a.getTextContent();l&&Ai(l,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();Ai(a,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:r,removeOpt:s})},t.getSymbolSize=function(r,n){return ha(r.getItemVisual(n,"symbolSize"))},t}(nt);function Ilt(e,t){this.parent.drift(e,t)}var ts=Elt;function FA(e,t,r,n){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(n.isIgnore&&n.isIgnore(r))&&!(n.clipShape&&!n.clipShape.contain(t[0],t[1]))&&e.getItemVisual(r,"symbol")!=="none"}function RV(e){return e!=null&&!rt(e)&&(e={isIgnore:e}),e||{}}function NV(e){var t=e.hostModel,r=t.getModel("emphasis");return{emphasisItemStyle:r.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:r.get("focus"),blurScope:r.get("blurScope"),emphasisDisabled:r.get("disabled"),hoverScale:r.get("scale"),labelStatesModels:ae(t),cursorStyle:t.get("cursor")}}var Llt=function(){function e(t){this.group=new nt,this._SymbolCtor=t||ts}return e.prototype.updateData=function(t,r){this._progressiveEls=null,r=RV(r);var n=this.group,i=t.hostModel,a=this._data,o=this._SymbolCtor,s=r.disableAnimation,l=NV(t),u={disableAnimation:s},f=r.getSymbolPoint||function(c){return t.getItemLayout(c)};a||n.removeAll(),t.diff(a).add(function(c){var p=f(c);if(FA(t,p,c,r)){var h=new o(t,c,l,u);h.setPosition(p),t.setItemGraphicEl(c,h),n.add(h)}}).update(function(c,p){var h=a.getItemGraphicEl(p),d=f(c);if(!FA(t,d,c,r)){n.remove(h);return}var m=t.getItemVisual(c,"symbol")||"circle",v=h&&h.getSymbolType&&h.getSymbolType();if(!h||v&&v!==m)n.remove(h),h=new o(t,c,l,u),h.setPosition(d);else{h.updateData(t,c,l,u);var g={x:d[0],y:d[1]};s?h.attr(g):Rt(h,g,i)}n.add(h),t.setItemGraphicEl(c,h)}).remove(function(c){var p=a.getItemGraphicEl(c);p&&p.fadeOut(function(){n.remove(p)},i)}).execute(),this._getSymbolPoint=f,this._data=t},e.prototype.updateLayout=function(){var t=this,r=this._data;r&&r.eachItemGraphicEl(function(n,i){var a=t._getSymbolPoint(i);n.setPosition(a),n.markRedraw()})},e.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=NV(t),this._data=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(t,r,n){this._progressiveEls=[],n=RV(n);function i(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var a=t.start;a0?r=n[0]:n[1]<0&&(r=n[1]),r}function p1(e,t,r,n){var i=NaN;e.stacked&&(i=r.get(r.getCalculationInfo("stackedOverDimension"),n)),isNaN(i)&&(i=e.valueStart);var a=e.baseDataOffset,o=[];return o[a]=r.get(e.baseDim,n),o[1-a]=i,t.dataToPoint(o)}function Rlt(e,t){var r=[];return t.diff(e).add(function(n){r.push({cmd:"+",idx:n})}).update(function(n,i){r.push({cmd:"=",idx:i,idx1:n})}).remove(function(n){r.push({cmd:"-",idx:n})}).execute(),r}function GA(e,t,r,n,i,a,o,s){for(var l=Rlt(e,t),u=[],f=[],c=[],p=[],h=[],d=[],m=[],v=c1(i,t,o),g=e.getLayout("points")||[],y=t.getLayout("points")||[],x=0;x=i||m<0)break;if(af(g,y)){if(l){m+=a;continue}break}if(m===r)e[a>0?"moveTo":"lineTo"](g,y),c=g,p=y;else{var x=g-u,_=y-f;if(x*x+_*_<.5){m+=a;continue}if(o>0){for(var S=m+a,b=t[S*2],w=t[S*2+1];b===g&&w===y&&v=n||af(b,w))h=g,d=y;else{C=b-u,A=w-f;var I=g-u,E=b-g,R=y-f,k=w-y,O=void 0,z=void 0;if(s==="x"){O=Math.abs(I),z=Math.abs(E);var U=C>0?1:-1;h=g-U*O*o,d=y,P=g+U*z*o,L=y}else if(s==="y"){O=Math.abs(R),z=Math.abs(k);var G=A>0?1:-1;h=g,d=y-G*O*o,P=g,L=y+G*z*o}else O=Math.sqrt(I*I+R*R),z=Math.sqrt(E*E+k*k),M=z/(z+O),h=g-C*o*(1-M),d=y-A*o*(1-M),P=g+C*o*M,L=y+A*o*M,P=ll(P,ul(b,g)),L=ll(L,ul(w,y)),P=ul(P,ll(b,g)),L=ul(L,ll(w,y)),C=P-g,A=L-y,h=g-C*O/z,d=y-A*O/z,h=ll(h,ul(u,g)),d=ll(d,ul(f,y)),h=ul(h,ll(u,g)),d=ul(d,ll(f,y)),C=g-h,A=y-d,P=g+C*z/O,L=y+A*z/O}e.bezierCurveTo(c,p,h,d,g,y),c=P,p=L}else e.lineTo(g,y)}u=g,f=y,m+=a}return v}var kV=function(){function e(){this.smooth=0,this.smoothConstraint=!0}return e}(),OV=function(e){N(t,e);function t(r){var n=e.call(this,r)||this;return n.type="ec-polyline",n}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new kV},t.prototype.buildPath=function(r,n){var i=n.points,a=0,o=i.length/2;if(n.connectNulls){for(;o>0&&af(i[o*2-2],i[o*2-1]);o--);for(;a=0){var _=u?(d-l)*x+l:(h-s)*x+s;return u?[r,_]:[_,r]}s=h,l=d;break;case o.C:h=a[c++],d=a[c++],m=a[c++],v=a[c++],g=a[c++],y=a[c++];var S=u?du(s,h,m,g,r,f):du(l,d,v,y,r,f);if(S>0)for(var b=0;b=0){var _=u?Ve(l,d,v,y,w):Ve(s,h,m,g,w);return u?[r,_]:[_,r]}}s=g,l=y;break}}},t}(vt);var Nlt=function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(kV),h1=function(e){N(t,e);function t(r){var n=e.call(this,r)||this;return n.type="ec-polygon",n}return t.prototype.getDefaultShape=function(){return new Nlt},t.prototype.buildPath=function(r,n){var i=n.points,a=n.stackedOnPoints,o=0,s=i.length/2,l=n.smoothMonotone;if(n.connectNulls){for(;s>0&&af(i[s*2-2],i[s*2-1]);s--);for(;ot){a?r.push(o(a,l,t)):i&&r.push(o(i,l,0),o(i,l,t));break}else i&&(r.push(o(i,l,0)),i=null),r.push(l),a=l}return r}function zlt(e,t,r){var n=e.getVisual("visualMeta");if(!(!n||!n.length||!e.count())&&t.type==="cartesian2d"){for(var i,a,o=n.length-1;o>=0;o--){var s=e.getDimensionInfo(n[o].dimension);if(i=s&&s.coordDim,i==="x"||i==="y"){a=n[o];break}}if(a){var l=t.getAxis(i),u=F(a.stops,function(x){return{coord:l.toGlobalCoord(l.dataToCoord(x.value)),color:x.color}}),f=u.length,c=a.outerColors.slice();f&&u[0].coord>u[f-1].coord&&(u.reverse(),c.reverse());var p=Olt(u,i==="x"?r.getWidth():r.getHeight()),h=p.length;if(!h&&f)return u[0].coord<0?c[1]?c[1]:u[f-1].color:c[0]?c[0]:u[0].color;var d=10,m=p[0].coord-d,v=p[h-1].coord+d,g=v-m;if(g<.001)return"transparent";D(p,function(x){x.offset=(x.coord-m)/g}),p.push({offset:h?p[h-1].offset:.5,color:c[1]||"transparent"}),p.unshift({offset:h?p[0].offset:.5,color:c[0]||"transparent"});var y=new $a(0,0,0,0,p,!0);return y[i]=m,y[i+"2"]=v,y}}}function Ult(e,t,r){var n=e.get("showAllSymbol"),i=n==="auto";if(!(n&&!i)){var a=r.getAxesByScale("ordinal")[0];if(a&&!(i&&Vlt(a,t))){var o=t.mapDimension(a.dim),s={};return D(a.getViewLabels(),function(l){var u=a.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(t.get(o,l))}}}}function Vlt(e,t){var r=e.getExtent(),n=Math.abs(r[1]-r[0])/e.scale.count();isNaN(n)&&(n=0);for(var i=t.count(),a=Math.max(1,Math.round(i/5)),o=0;on)return!1;return!0}function Blt(e,t){return isNaN(e)||isNaN(t)}function Flt(e){for(var t=e.length/2;t>0&&Blt(e[t*2-2],e[t*2-1]);t--);return t-1}function FV(e,t){return[e[t*2],e[t*2+1]]}function Glt(e,t,r){for(var n=e.length/2,i=r==="x"?0:1,a,o,s=0,l=-1,u=0;u=t||a>=t&&o<=t){l=u;break}s=u,a=o}return{range:[s,l],t:(t-a)/(o-a)}}function GV(e){if(e.get(["endLabel","show"]))return!0;for(var t=0;t0&&r.get(["emphasis","lineStyle","width"])==="bolder"){var U=m.getState("emphasis").style;U.lineWidth=+m.style.lineWidth+1}ht(m).seriesIndex=r.seriesIndex,Zt(m,k,O,z);var G=BV(r.get("smooth")),Y=r.get("smoothMonotone");if(m.setShape({smooth:G,smoothMonotone:Y,connectNulls:T}),v){var et=l.getCalculationInfo("stackedOnSeries"),tt=0;v.useStyle(J(f.getAreaStyle(),{fill:L,opacity:.7,lineJoin:"bevel",decal:l.getVisual("style").decal})),et&&(tt=BV(et.get("smooth"))),v.setShape({smooth:G,stackedOnSmooth:tt,smoothMonotone:Y,connectNulls:T}),we(v,r,"areaStyle"),ht(v).seriesIndex=r.seriesIndex,Zt(v,k,O,z)}var lt=function(Mt){a._changePolyState(Mt)};l.eachItemGraphicEl(function(Mt){Mt&&(Mt.onHoverStateChange=lt)}),this._polyline.onHoverStateChange=lt,this._data=l,this._coordSys=o,this._stackedOnPoints=b,this._points=c,this._step=A,this._valueOrigin=_,r.get("triggerLineEvent")&&(this.packEventData(r,m),v&&this.packEventData(r,v))},t.prototype.packEventData=function(r,n){ht(n).eventData={componentType:"series",componentSubType:"line",componentIndex:r.componentIndex,seriesIndex:r.seriesIndex,seriesName:r.name,seriesType:"line"}},t.prototype.highlight=function(r,n,i,a){var o=r.getData(),s=wi(o,a);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var f=l[s*2],c=l[s*2+1];if(isNaN(f)||isNaN(c)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(f,c))return;var p=r.get("zlevel")||0,h=r.get("z")||0;u=new ts(o,s),u.x=f,u.y=c,u.setZ(p,h);var d=u.getSymbolPath().getTextContent();d&&(d.zlevel=p,d.z=h,d.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else Vt.prototype.highlight.call(this,r,n,i,a)},t.prototype.downplay=function(r,n,i,a){var o=r.getData(),s=wi(o,a);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else Vt.prototype.downplay.call(this,r,n,i,a)},t.prototype._changePolyState=function(r){var n=this._polygon;ku(this._polyline,r),n&&ku(n,r)},t.prototype._newPolyline=function(r){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new OV({shape:{points:r},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(n),this._polyline=n,n},t.prototype._newPolygon=function(r,n){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new h1({shape:{points:r,stackedOnPoints:n},segmentIgnoreThreshold:2}),this._lineGroup.add(i),this._polygon=i,i},t.prototype._initSymbolLabelAnimation=function(r,n,i){var a,o,s=n.getBaseAxis(),l=s.inverse;n.type==="cartesian2d"?(a=s.isHorizontal(),o=!1):n.type==="polar"&&(a=s.dim==="angle",o=!0);var u=r.hostModel,f=u.get("animationDuration");j(f)&&(f=f(null));var c=u.get("animationDelay")||0,p=j(c)?c(null):c;r.eachItemGraphicEl(function(h,d){var m=h;if(m){var v=[h.x,h.y],g=void 0,y=void 0,x=void 0;if(i)if(o){var _=i,S=n.pointToCoord(v);a?(g=_.startAngle,y=_.endAngle,x=-S[1]/180*Math.PI):(g=_.r0,y=_.r,x=S[0])}else{var b=i;a?(g=b.x,y=b.x+b.width,x=h.x):(g=b.y+b.height,y=b.y,x=h.y)}var w=y===g?0:(x-g)/(y-g);l&&(w=1-w);var T=j(c)?c(d):f*w+p,M=m.getSymbolPath(),C=M.getTextContent();m.attr({scaleX:0,scaleY:0}),m.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:T}),C&&C.animateFrom({style:{opacity:0}},{duration:300,delay:T}),M.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(r,n,i){var a=r.getModel("endLabel");if(GV(r)){var o=r.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new Lt({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var f=Flt(l);f>=0&&(he(s,ae(r,"endLabel"),{inheritColor:i,labelFetcher:r,labelDataIndex:f,defaultText:function(c,p,h){return h!=null?f1(o,h):xa(o,c)},enableTextSetter:!0},Hlt(a,n)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(r,n,i,a,o,s,l){var u=this._endLabel,f=this._polyline;if(u){r<1&&a.originalX==null&&(a.originalX=u.x,a.originalY=u.y);var c=i.getLayout("points"),p=i.hostModel,h=p.get("connectNulls"),d=s.get("precision"),m=s.get("distance")||0,v=l.getBaseAxis(),g=v.isHorizontal(),y=v.inverse,x=n.shape,_=y?g?x.x:x.y+x.height:g?x.x+x.width:x.y,S=(g?m:0)*(y?-1:1),b=(g?0:-m)*(y?-1:1),w=g?"x":"y",T=Glt(c,_,w),M=T.range,C=M[1]-M[0],A=void 0;if(C>=1){if(C>1&&!h){var P=FV(c,M[0]);u.attr({x:P[0]+S,y:P[1]+b}),o&&(A=p.getRawValue(M[0]))}else{var P=f.getPointOn(_,w);P&&u.attr({x:P[0]+S,y:P[1]+b});var L=p.getRawValue(M[0]),I=p.getRawValue(M[1]);o&&(A=i0(i,d,L,I,T.t))}a.lastFrameIndex=M[0]}else{var E=r===1||a.lastFrameIndex>0?M[0]:0,P=FV(c,E);o&&(A=p.getRawValue(E)),u.attr({x:P[0]+S,y:P[1]+b})}if(o){var R=Xo(u);typeof R.setLabelText=="function"&&R.setLabelText(A)}}},t.prototype._doUpdateAnimation=function(r,n,i,a,o,s,l){var u=this._polyline,f=this._polygon,c=r.hostModel,p=GA(this._data,r,this._stackedOnPoints,n,this._coordSys,i,this._valueOrigin,s),h=p.current,d=p.stackedOnCurrent,m=p.next,v=p.stackedOnNext;if(o&&(h=cl(p.current,i,o,l),d=cl(p.stackedOnCurrent,i,o,l),m=cl(p.next,i,o,l),v=cl(p.stackedOnNext,i,o,l)),VV(h,m)>3e3||f&&VV(d,v)>3e3){u.stopAnimation(),u.setShape({points:m}),f&&(f.stopAnimation(),f.setShape({points:m,stackedOnPoints:v}));return}u.shape.__points=p.current,u.shape.points=h;var g={shape:{points:m}};p.current!==h&&(g.shape.__points=p.next),u.stopAnimation(),Rt(u,g,c),f&&(f.setShape({points:h,stackedOnPoints:d}),f.stopAnimation(),Rt(f,{shape:{stackedOnPoints:v}},c),u.shape.points!==f.shape.points&&(f.shape.points=u.shape.points));for(var y=[],x=p.status,_=0;_t&&(t=e[r]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,r=0;r10&&o.type==="cartesian2d"&&a){var l=o.getBaseAxis(),u=o.getOtherAxis(l),f=l.getExtent(),c=n.getDevicePixelRatio(),p=Math.abs(f[1]-f[0])*(c||1),h=Math.round(s/p);if(isFinite(h)&&h>1){a==="lttb"&&t.setData(i.lttbDownSample(i.mapDimension(u.dim),1/h));var d=void 0;H(a)?d=Ylt[a]:j(a)&&(d=a),d&&t.setData(i.downSample(i.mapDimension(u.dim),1/h,d,Xlt))}}}}}function qA(e){e.registerChartView(HV),e.registerSeriesModel(PV),e.registerLayout(_a("line",!0)),e.registerVisual({seriesType:"line",reset:function(t){var r=t.getData(),n=t.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=r.getVisual("style").fill),r.setVisual("legendLineStyle",n)}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,Xv("line"))}var WV=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.getInitialData=function(r,n){return Tr(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(r,n,i){var a=this.coordinateSystem;if(a&&a.clampData){var o=a.clampData(r),s=a.dataToPoint(o);if(i)D(a.getAxes(),function(p,h){if(p.type==="category"&&n!=null){var d=p.getTicksCoords(),m=o[h],v=n[h]==="x1"||n[h]==="y1";if(v&&(m+=1),d.length<2)return;if(d.length===2){s[h]=p.toGlobalCoord(p.getExtent()[v?1:0]);return}for(var g=void 0,y=void 0,x=1,_=0;_m){y=(S+g)/2;break}_===1&&(x=b-d[0].tickValue)}y==null&&(g?g&&(y=d[d.length-1].coord):y=d[0].coord),s[h]=p.toGlobalCoord(y)}});else{var l=this.getData(),u=l.getLayout("offset"),f=l.getLayout("size"),c=a.getBaseAxis().isHorizontal()?0:1;s[c]+=u+f/2}return s}return[NaN,NaN]},t.type="series.__base_bar__",t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},t}(Wt);Wt.registerClass(WV);var _p=WV;var qlt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.getInitialData=function(){return Tr(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},t.prototype.getProgressiveThreshold=function(){var r=this.get("progressiveThreshold"),n=this.get("largeThreshold");return n>r&&(r=n),r},t.prototype.brushSelector=function(r,n,i){return i.rect(n.getItemLayout(r))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=Kr(_p.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),t}(_p),YV=qlt;var Zlt=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return e}(),Klt=function(e){N(t,e);function t(r){var n=e.call(this,r)||this;return n.type="sausage",n}return t.prototype.getDefaultShape=function(){return new Zlt},t.prototype.buildPath=function(r,n){var i=n.cx,a=n.cy,o=Math.max(n.r0||0,0),s=Math.max(n.r,0),l=(s-o)*.5,u=o+l,f=n.startAngle,c=n.endAngle,p=n.clockwise,h=Math.PI*2,d=p?c-fMath.PI/2&&fs)return!0;s=c}return!1},t.prototype._isOrderDifferentInView=function(r,n){for(var i=n.scale,a=i.getExtent(),o=Math.max(0,a[0]),s=Math.min(a[1],i.getOrdinalMeta().categories.length-1);o<=s;++o)if(r.ordinalNumbers[o]!==i.getRawOrdinalNumber(o))return!0},t.prototype._updateSortWithinSameData=function(r,n,i,a){if(this._isOrderChangedWithinSameData(r,n,i)){var o=this._dataSort(r,i,n);this._isOrderDifferentInView(o,i)&&(this._removeOnRenderedListener(a),a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",axisId:i.index,sortInfo:o}))}},t.prototype._dispatchInitSort=function(r,n,i){var a=n.baseAxis,o=this._dataSort(r,a,function(s){return r.get(r.mapDimension(n.otherAxis.dim),s)});i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",isInitSort:!0,axisId:a.index,sortInfo:o})},t.prototype.remove=function(r,n){this._clear(this._model),this._removeOnRenderedListener(n)},t.prototype.dispose=function(r,n){this._removeOnRenderedListener(n)},t.prototype._removeOnRenderedListener=function(r){this._onRendered&&(r.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(r){var n=this.group,i=this._data;r&&r.isAnimationEnabled()&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl(function(a){Go(a,r,ht(a).dataIndex)})):n.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t}(Vt),ZV={cartesian2d:function(e,t){var r=t.width<0?-1:1,n=t.height<0?-1:1;r<0&&(t.x+=t.width,t.width=-t.width),n<0&&(t.y+=t.height,t.height=-t.height);var i=e.x+e.width,a=e.y+e.height,o=ZA(t.x,e.x),s=KA(t.x+t.width,i),l=ZA(t.y,e.y),u=KA(t.y+t.height,a),f=si?s:o,t.y=c&&l>a?u:l,t.width=f?0:s-o,t.height=c?0:u-l,r<0&&(t.x+=t.width,t.width=-t.width),n<0&&(t.y+=t.height,t.height=-t.height),f||c},polar:function(e,t){var r=t.r0<=t.r?1:-1;if(r<0){var n=t.r;t.r=t.r0,t.r0=n}var i=KA(t.r,e.r),a=ZA(t.r0,e.r0);t.r=i,t.r0=a;var o=i-a<0;if(r<0){var n=t.r;t.r=t.r0,t.r0=n}return o}},KV={cartesian2d:function(e,t,r,n,i,a,o,s,l){var u=new At({shape:V({},n),z2:1});if(u.__dataIndex=r,u.name="item",a){var f=u.shape,c=i?"height":"width";f[c]=0}return u},polar:function(e,t,r,n,i,a,o,s,l){var u=!i&&l?bp:Ye,f=new u({shape:n,z2:1});f.name="item";var c=n6(i);if(f.calculateTextPosition=XV(c,{isRoundCap:u===bp}),a){var p=f.shape,h=i?"r":"endAngle",d={};p[h]=i?n.r0:n.startAngle,d[h]=n[h],(s?Rt:Kt)(f,{shape:d},a)}return f}};function Qlt(e,t){var r=e.get("realtimeSort",!0),n=t.getBaseAxis();if(r&&n.type==="category"&&t.type==="cartesian2d")return{baseAxis:n,otherAxis:t.getOtherAxis(n)}}function $V(e,t,r,n,i,a,o,s){var l,u;a?(u={x:n.x,width:n.width},l={y:n.y,height:n.height}):(u={y:n.y,height:n.height},l={x:n.x,width:n.width}),s||(o?Rt:Kt)(r,{shape:l},t,i,null);var f=t?e.baseAxis.model:null;(o?Rt:Kt)(r,{shape:u},f,i)}function jV(e,t){for(var r=0;r0?1:-1,o=n.height>0?1:-1;return{x:n.x+a*i/2,y:n.y+o*i/2,width:n.width-a*i,height:n.height-o*i}},polar:function(e,t,r){var n=e.getItemLayout(t);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}}};function eut(e){return e.startAngle!=null&&e.endAngle!=null&&e.startAngle===e.endAngle}function n6(e){return function(t){var r=t?"Arc":"Angle";return function(n){switch(n){case"start":case"insideStart":case"end":case"insideEnd":return n+r;default:return n}}}(e)}function JV(e,t,r,n,i,a,o,s){var l=t.getItemVisual(r,"style");if(s){if(!a.get("roundCap")){var f=e.shape,c=ao(n.getModel("itemStyle"),f,!0);V(f,c),e.setShape(f)}}else{var u=n.get(["itemStyle","borderRadius"])||0;e.setShape("r",u)}e.useStyle(l);var p=n.getShallow("cursor");p&&e.attr("cursor",p);var h=s?o?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":o?i.height>=0?"bottom":"top":i.width>=0?"right":"left",d=ae(n);he(e,d,{labelFetcher:a,labelDataIndex:r,defaultText:xa(a.getData(),r),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:h});var m=e.getTextContent();if(s&&m){var v=n.get(["label","position"]);e.textConfig.inside=v==="middle"?!0:null,qV(e,v==="outside"?h:v,n6(o),n.get(["label","rotate"]))}P0(m,d,a.getRawValue(r),function(y){return f1(t,y)});var g=n.getModel(["emphasis"]);Zt(e,g.get("focus"),g.get("blurScope"),g.get("disabled")),we(e,n),eut(i)&&(e.style.fill="none",e.style.stroke="none",D(e.states,function(y){y.style&&(y.style.fill=y.style.stroke="none")}))}function rut(e,t){var r=e.get(["itemStyle","borderColor"]);if(!r||r==="none")return 0;var n=e.get(["itemStyle","borderWidth"])||0,i=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),a=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(n,i,a)}var nut=function(){function e(){}return e}(),t6=function(e){N(t,e);function t(r){var n=e.call(this,r)||this;return n.type="largeBar",n}return t.prototype.getDefaultShape=function(){return new nut},t.prototype.buildPath=function(r,n){for(var i=n.points,a=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,f=0;f=0?r:null},30,!1);function iut(e,t,r){for(var n=e.baseDimIdx,i=1-n,a=e.shape.points,o=e.largeDataIndices,s=[],l=[],u=e.barWidth,f=0,c=a.length/3;f=s[0]&&t<=s[0]+l[0]&&r>=s[1]&&r<=s[1]+l[1])return o[f]}return-1}function i6(e,t,r){if(Ni(r,"cartesian2d")){var n=t,i=r.getArea();return{x:e?n.x:i.x,y:e?i.y:n.y,width:e?n.width:i.width,height:e?i.height:n.height}}else{var i=r.getArea(),a=t;return{cx:i.cx,cy:i.cy,r0:e?i.r0:a.r0,r:e?i.r:a.r,startAngle:e?a.startAngle:0,endAngle:e?a.endAngle:Math.PI*2}}}function aut(e,t,r){var n=e.type==="polar"?Ye:At;return new n({shape:i6(t,r,e),silent:!0,z2:0})}var a6=jlt;function $A(e){e.registerChartView(a6),e.registerSeriesModel(YV),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,pt(Ux,"bar")),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,Vx("bar")),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,Xv("bar")),e.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(t,r){var n=t.componentType||"series";r.eachComponent({mainType:n,query:t},function(i){t.sortInfo&&i.axis.setCategorySortInfo(t.sortInfo)})})}var g1=Math.PI*2,o6=Math.PI/180;function s6(e,t){return re(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function jA(e,t){var r=s6(e,t),n=e.get("center"),i=e.get("radius");B(i)||(i=[0,i]);var a=q(r.width,t.getWidth()),o=q(r.height,t.getHeight()),s=Math.min(a,o),l=q(i[0],s/2),u=q(i[1],s/2),f,c,p=e.coordinateSystem;if(p){var h=p.dataToPoint(n);f=h[0]||0,c=h[1]||0}else B(n)||(n=[n,n]),f=q(n[0],a)+r.x,c=q(n[1],o)+r.y;return{cx:f,cy:c,r0:l,r:u}}function QA(e,t,r){t.eachSeriesByType(e,function(n){var i=n.getData(),a=i.mapDimension("value"),o=s6(n,r),s=jA(n,r),l=s.cx,u=s.cy,f=s.r,c=s.r0,p=-n.get("startAngle")*o6,h=n.get("minAngle")*o6,d=0;i.each(a,function(C){!isNaN(C)&&d++});var m=i.getSum(a),v=Math.PI/(m||d)*2,g=n.get("clockwise"),y=n.get("roseType"),x=n.get("stillShowZeroSum"),_=i.getDataExtent(a);_[0]=0;var S=g1,b=0,w=p,T=g?1:-1;if(i.setLayout({viewRect:o,r:f}),i.each(a,function(C,A){var P;if(isNaN(C)){i.setItemLayout(A,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:g,cx:l,cy:u,r0:c,r:y?NaN:f});return}y!=="area"?P=m===0&&x?v:C*v:P=g1/d,Pr?g:v,S=Math.abs(x.label.y-r);if(S>=_.maxY){var b=x.label.x-t-x.len2*i,w=n+x.len,T=Math.abs(b)e.unconstrainedWidth?null:h:null;n.setStyle("width",d)}var m=n.getBoundingRect();a.width=m.width;var v=(n.style.margin||0)+2.1;a.height=m.height+v,a.y-=(a.height-c)/2}}}function JA(e){return e.position==="center"}function tC(e){var t=e.getData(),r=[],n,i,a=!1,o=(e.get("minShowLabelAngle")||0)*out,s=t.getLayout("viewRect"),l=t.getLayout("r"),u=s.width,f=s.x,c=s.y,p=s.height;function h(b){b.ignore=!0}function d(b){if(!b.ignore)return!0;for(var w in b.states)if(b.states[w].ignore===!1)return!0;return!1}t.each(function(b){var w=t.getItemGraphicEl(b),T=w.shape,M=w.getTextContent(),C=w.getTextGuideLine(),A=t.getItemModel(b),P=A.getModel("label"),L=P.get("position")||A.get(["emphasis","label","position"]),I=P.get("distanceToLabelLine"),E=P.get("alignTo"),R=q(P.get("edgeDistance"),u),k=P.get("bleedMargin"),O=A.getModel("labelLine"),z=O.get("length");z=q(z,u);var U=O.get("length2");if(U=q(U,u),Math.abs(T.endAngle-T.startAngle)0?"right":"left":Y>0?"left":"right"}var te=Math.PI,Jt=0,Dt=P.get("rotate");if(Ct(Dt))Jt=Dt*(te/180);else if(L==="center")Jt=0;else if(Dt==="radial"||Dt===!0){var ve=Y<0?-G+te:-G;Jt=ve}else if(Dt==="tangential"&&L!=="outside"&&L!=="outer"){var ar=Math.atan2(Y,et);ar<0&&(ar=te*2+ar);var jn=et>0;jn&&(ar=te+ar),Jt=ar-te}if(a=!!Jt,M.x=tt,M.y=lt,M.rotation=Jt,M.setStyle({verticalAlign:"middle"}),ct){M.setStyle({align:ut});var t2=M.states.select;t2&&(t2.x+=M.x,t2.y+=M.y)}else{var Cs=M.getBoundingRect().clone();Cs.applyTransform(M.getComputedTransform());var ik=(M.style.margin||0)+2.1;Cs.y-=ik/2,Cs.height+=ik,r.push({label:M,labelLine:C,position:L,len:z,len2:U,minTurnAngle:O.get("minTurnAngle"),maxSurfaceAngle:O.get("maxSurfaceAngle"),surfaceNormal:new kt(Y,et),linePoints:Mt,textAlign:ut,labelDistance:I,labelAlignTo:E,edgeDistance:R,bleedMargin:k,rect:Cs,unconstrainedWidth:Cs.width,labelStyleWidth:M.style.width})}w.setTextConfig({inside:ct})}}),!a&&e.get("avoidLabelOverlap")&&sut(r,n,i,l,u,p,f,c);for(var m=0;m0){for(var f=o.getItemLayout(0),c=1;isNaN(f&&f.startAngle)&&c=a.r0}},t.type="pie",t}(Vt),f6=uut;function fi(e,t,r){t=B(t)&&{coordDimensions:t}||V({encodeDefine:e.getEncode()},t);var n=e.getSource(),i=va(n,t).dimensions,a=new Ne(i,e);return a.initData(n,r),a}var fut=function(){function e(t,r){this._getDataWithEncodedVisual=t,this._getRawData=r}return e.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},e.prototype.containName=function(t){var r=this._getRawData();return r.indexOfName(t)>=0},e.prototype.indexOfName=function(t){var r=this._getDataWithEncodedVisual();return r.indexOfName(t)},e.prototype.getItemVisual=function(t,r){var n=this._getDataWithEncodedVisual();return n.getItemVisual(t,r)},e}(),oo=fut;var cut=yt(),put=function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(r){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new oo(Z(this.getData,this),Z(this.getRawData,this)),this._defaultLabelLine(r)},t.prototype.mergeOption=function(){e.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return fi(this,{coordDimensions:["value"],encodeDefaulter:pt(op,this)})},t.prototype.getDataParams=function(r){var n=this.getData(),i=cut(n),a=i.seats;if(!a){var o=[];n.each(n.mapDimension("value"),function(l){o.push(l)}),a=i.seats=wO(o,n.hostModel.get("percentPrecision"))}var s=e.prototype.getDataParams.call(this,r);return s.percent=a[r]||0,s.$vars.push("percent"),s},t.prototype._defaultLabelLine=function(r){ni(r,"labelLine",["show"]);var n=r.labelLine,i=r.emphasis.labelLine;n.show=n.show&&r.label.show,i.show=i.show&&r.emphasis.label.show},t.type="series.pie",t.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"},t}(Wt),c6=put;function eC(e){return{seriesType:e,reset:function(t,r){var n=t.getData();n.filterSelf(function(i){var a=n.mapDimension("value"),o=n.get(a,i);return!(Ct(o)&&!isNaN(o)&&o<0)})}}}function rC(e){e.registerChartView(f6),e.registerSeriesModel(c6),yx("pie",e.registerAction),e.registerLayout(pt(QA,"pie")),e.registerProcessor(ba("pie")),e.registerProcessor(eC("pie"))}var hut=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.hasSymbolVisual=!0,r}return t.prototype.getInitialData=function(r,n){return Tr(null,this,{useEncodeDefaulter:!0})},t.prototype.getProgressive=function(){var r=this.option.progressive;return r??(this.option.large?5e3:this.get("progressive"))},t.prototype.getProgressiveThreshold=function(){var r=this.option.progressiveThreshold;return r??(this.option.large?1e4:this.get("progressiveThreshold"))},t.prototype.brushSelector=function(r,n,i){return i.point(n.getItemLayout(r))},t.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},t.type="series.scatter",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},t}(Wt),p6=hut;var h6=4,dut=function(){function e(){}return e}(),vut=function(e){N(t,e);function t(r){var n=e.call(this,r)||this;return n._off=0,n.hoverDataIdx=-1,n}return t.prototype.getDefaultShape=function(){return new dut},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.buildPath=function(r,n){var i=n.points,a=n.size,o=this.symbolProxy,s=o.shape,l=r.getContext?r.getContext():r,u=l&&a[0]=0;u--){var f=u*2,c=a[f]-s/2,p=a[f+1]-l/2;if(r>=c&&n>=p&&r<=c+s&&n<=p+l)return u}return-1},t.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect();if(r=i[0],n=i[1],a.contain(r,n)){var o=this.hoverDataIdx=this.findDataIndex(r,n);return o>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var r=this._rect;if(!r){for(var n=this.shape,i=n.points,a=n.size,o=a[0],s=a[1],l=1/0,u=1/0,f=-1/0,c=-1/0,p=0;p=0&&(u.dataIndex=c+(t.startIndex||0))})},e.prototype.remove=function(){this._clear()},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}(),d6=mut;var gut=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a=r.getData(),o=this._updateSymbolDraw(a,r);o.updateData(a,{clipShape:this._getClipShape(r)}),this._finished=!0},t.prototype.incrementalPrepareRender=function(r,n,i){var a=r.getData(),o=this._updateSymbolDraw(a,r);o.incrementalPrepareUpdate(a),this._finished=!1},t.prototype.incrementalRender=function(r,n,i){this._symbolDraw.incrementalUpdate(r,n.getData(),{clipShape:this._getClipShape(n)}),this._finished=r.end===n.getData().count()},t.prototype.updateTransform=function(r,n,i){var a=r.getData();if(this.group.dirty(),!this._finished||a.count()>1e4)return{update:!0};var o=_a("").reset(r,n,i);o.progress&&o.progress({start:0,end:a.count(),count:a.count()},a),this._symbolDraw.updateLayout(a)},t.prototype.eachRendered=function(r){this._symbolDraw&&this._symbolDraw.eachRendered(r)},t.prototype._getClipShape=function(r){var n=r.coordinateSystem,i=n&&n.getArea&&n.getArea();return r.get("clip",!0)?i:null},t.prototype._updateSymbolDraw=function(r,n){var i=this._symbolDraw,a=n.pipelineContext,o=a.large;return(!i||o!==this._isLargeDraw)&&(i&&i.remove(),i=this._symbolDraw=o?new d6:new io,this._isLargeDraw=o,this.group.removeAll()),this.group.add(i.group),i},t.prototype.remove=function(r,n){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type="scatter",t}(Vt),v6=gut;var yut=function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},t}(Pt),m6=yut;var y1=function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",se).models[0]},t.type="cartesian2dAxis",t}(Pt);ie(y1,to);var g6={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},xut=_t({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},g6),nC=_t({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},g6),_ut=_t({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},nC),but=J({logBase:10},nC),x1={category:xut,value:nC,time:_ut,log:but};var y6={value:1,category:1,time:1,log:1};function Sa(e,t,r,n){D(y6,function(i,a){var o=_t(_t({},x1[a],!0),n,!0),s=function(l){N(u,l);function u(){var f=l!==null&&l.apply(this,arguments)||this;return f.type=t+"Axis."+a,f}return u.prototype.mergeDefaultAndTheme=function(f,c){var p=Ks(this),h=p?Di(f):{},d=c.getTheme();_t(f,d.get(a+"Axis")),_t(f,this.getDefaultOption()),f.type=x6(f),p&&On(f,h,p)},u.prototype.optionUpdated=function(){var f=this.option;f.type==="category"&&(this.__ordinalMeta=Pv.createByAxisModel(this))},u.prototype.getCategories=function(f){var c=this.option;if(c.type==="category")return f?c.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.type=t+"Axis."+a,u.defaultOption=o,u}(r);e.registerComponentModel(s)}),e.registerSubTypeDefaulter(t+"Axis",x6)}function x6(e){return e.type||(e.data?"category":"value")}var Sut=function(){function e(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return e.prototype.getAxis=function(t){return this._axes[t]},e.prototype.getAxes=function(){return F(this._dimList,function(t){return this._axes[t]},this)},e.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),Ut(this.getAxes(),function(r){return r.scale.type===t})},e.prototype.addAxis=function(t){var r=t.dim;this._axes[r]=t,this._dimList.push(r)},e}(),_6=Sut;var _1=["x","y"];function b6(e){return e.type==="interval"||e.type==="time"}var wut=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="cartesian2d",r.dimensions=_1,r}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var r=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!b6(r)||!b6(n))){var i=r.getExtent(),a=n.getExtent(),o=this.dataToPoint([i[0],a[0]]),s=this.dataToPoint([i[1],a[1]]),l=i[1]-i[0],u=a[1]-a[0];if(!(!l||!u)){var f=(s[0]-o[0])/l,c=(s[1]-o[1])/u,p=o[0]-i[0]*f,h=o[1]-a[0]*c,d=this._transform=[f,0,0,c,p,h];this._invTransform=gi([],d)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(r){var n=this.getAxis("x"),i=this.getAxis("y");return n.contain(n.toLocalCoord(r[0]))&&i.contain(i.toLocalCoord(r[1]))},t.prototype.containData=function(r){return this.getAxis("x").containData(r[0])&&this.getAxis("y").containData(r[1])},t.prototype.containZone=function(r,n){var i=this.dataToPoint(r),a=this.dataToPoint(n),o=this.getArea(),s=new dt(i[0],i[1],a[0]-i[0],a[1]-i[1]);return o.intersect(s)},t.prototype.dataToPoint=function(r,n,i){i=i||[];var a=r[0],o=r[1];if(this._transform&&a!=null&&isFinite(a)&&o!=null&&isFinite(o))return Ue(i,r,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return i[0]=s.toGlobalCoord(s.dataToCoord(a,n)),i[1]=l.toGlobalCoord(l.dataToCoord(o,n)),i},t.prototype.clampData=function(r,n){var i=this.getAxis("x").scale,a=this.getAxis("y").scale,o=i.getExtent(),s=a.getExtent(),l=i.parse(r[0]),u=a.parse(r[1]);return n=n||[],n[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),n[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),n},t.prototype.pointToData=function(r,n){var i=[];if(this._invTransform)return Ue(i,r,this._invTransform);var a=this.getAxis("x"),o=this.getAxis("y");return i[0]=a.coordToData(a.toLocalCoord(r[0]),n),i[1]=o.coordToData(o.toLocalCoord(r[1]),n),i},t.prototype.getOtherAxis=function(r){return this.getAxis(r.dim==="x"?"y":"x")},t.prototype.getArea=function(){var r=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),i=Math.min(r[0],r[1]),a=Math.min(n[0],n[1]),o=Math.max(r[0],r[1])-i,s=Math.max(n[0],n[1])-a;return new dt(i,a,o,s)},t}(_6),S6=wut;var Tut=function(e){N(t,e);function t(r,n,i,a,o){var s=e.call(this,r,n,i)||this;return s.index=0,s.type=a||"value",s.position=o||"bottom",s}return t.prototype.isHorizontal=function(){var r=this.position;return r==="top"||r==="bottom"},t.prototype.getGlobalExtent=function(r){var n=this.getExtent();return n[0]=this.toGlobalCoord(n[0]),n[1]=this.toGlobalCoord(n[1]),r&&n[0]>n[1]&&n.reverse(),n},t.prototype.pointToData=function(r,n){return this.coordToData(this.toLocalCoord(r[this.dim==="x"?0:1]),n)},t.prototype.setCategorySortInfo=function(r){if(this.type!=="category")return!1;this.model.option.categorySortInfo=r,this.scale.setSortInfo(r)},t}(Mr),w6=Tut;function qv(e,t,r){r=r||{};var n=e.coordinateSystem,i=t.axis,a={},o=i.getAxesOnZeroOf()[0],s=i.position,l=o?"onZero":s,u=i.dim,f=n.getRect(),c=[f.x,f.x+f.width,f.y,f.y+f.height],p={left:0,right:1,top:0,bottom:1,onZero:2},h=t.get("offset")||0,d=u==="x"?[c[2]-h,c[3]+h]:[c[0]-h,c[1]+h];if(o){var m=o.toGlobalCoord(o.dataToCoord(0));d[p.onZero]=Math.max(Math.min(m,d[1]),d[0])}a.position=[u==="y"?d[p[l]]:c[0],u==="x"?d[p[l]]:c[3]],a.rotation=Math.PI/2*(u==="x"?0:1);var v={top:-1,bottom:1,left:-1,right:1};a.labelDirection=a.tickDirection=a.nameDirection=v[s],a.labelOffset=o?d[p[s]]-d[p.onZero]:0,t.get(["axisTick","inside"])&&(a.tickDirection=-a.tickDirection),_e(r.labelInside,t.get(["axisLabel","inside"]))&&(a.labelDirection=-a.labelDirection);var g=t.get(["axisLabel","rotate"]);return a.labelRotate=l==="top"?-g:g,a.z2=1,a}function iC(e){return e.get("coordinateSystem")==="cartesian2d"}function aC(e){var t={xAxisModel:null,yAxisModel:null};return D(t,function(r,n){var i=n.replace(/Model$/,""),a=e.getReferringComponents(i,se).models[0];t[n]=a}),t}var oC=Math.log;function b1(e,t,r){var n=Fn.prototype,i=n.getTicks.call(r),a=n.getTicks.call(r,!0),o=i.length-1,s=n.getInterval.call(r),l=fA(e,t),u=l.extent,f=l.fixMin,c=l.fixMax;if(e.type==="log"){var p=oC(e.base);u=[oC(u[0])/p,oC(u[1])/p]}e.setExtent(u[0],u[1]),e.calcNiceExtent({splitNumber:o,fixMin:f,fixMax:c});var h=n.getExtent.call(e);f&&(u[0]=h[0]),c&&(u[1]=h[1]);var d=n.getInterval.call(e),m=u[0],v=u[1];if(f&&c)d=(v-m)/o;else if(f)for(v=u[0]+d*o;vu[0]&&isFinite(m)&&isFinite(u[0]);)d=Ox(d),m=u[1]-d*o;else{var g=e.getTicks().length-1;g>o&&(d=Ox(d));var y=d*o;v=Math.ceil(u[1]/d)*d,m=pe(v-y),m<0&&u[0]>=0?(m=0,v=pe(y)):v>0&&u[1]<=0&&(v=0,m=-pe(y))}var x=(i[0].value-a[0].value)/s,_=(i[o].value-a[o].value)/s;if(n.setExtent.call(e,m+d*x,v+d*_),n.setInterval.call(e,d),(x||_)&&n.setNiceExtent.call(e,m+d,v-d),!1)var S}var Mut=function(){function e(t,r,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=_1,this._initCartesian(t,r,n),this.model=t}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(t,r){var n=this._axesMap;this._updateScale(t,this.model);function i(o){var s,l=St(o),u=l.length;if(u){for(var f=[],c=u-1;c>=0;c--){var p=+l[c],h=o[p],d=h.model,m=h.scale;Rv(m)&&d.get("alignTicks")&&d.get("interval")==null?f.push(h):(Ja(m,d),Rv(m)&&(s=h))}f.length&&(s||(s=f.pop(),Ja(s.scale,s.model)),D(f,function(v){b1(v.scale,v.model,s.scale)}))}}i(n.x),i(n.y);var a={};D(n.x,function(o){M6(n,"y",o,a)}),D(n.y,function(o){M6(n,"x",o,a)}),this.resize(this.model,r)},e.prototype.resize=function(t,r,n){var i=t.getBoxLayoutParams(),a=!n&&t.get("containLabel"),o=re(i,{width:r.getWidth(),height:r.getHeight()});this._rect=o;var s=this._axesList;l(),a&&(D(s,function(u){if(!u.model.get(["axisLabel","inside"])){var f=UU(u);if(f){var c=u.isHorizontal()?"height":"width",p=u.model.get(["axisLabel","margin"]);o[c]-=f[c]+p,u.position==="top"?o.y+=f.height+p:u.position==="left"&&(o.x+=f.width+p)}}}),l()),D(this._coordsList,function(u){u.calcAffineTransform()});function l(){D(s,function(u){var f=u.isHorizontal(),c=f?[0,o.width]:[0,o.height],p=u.inverse?1:0;u.setExtent(c[p],c[1-p]),Aut(u,f?o.x:o.y)})}},e.prototype.getAxis=function(t,r){var n=this._axesMap[t];if(n!=null)return n[r||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(t,r){if(t!=null&&r!=null){var n="x"+t+"y"+r;return this._coordsMap[n]}rt(t)&&(r=t.yAxisIndex,t=t.xAxisIndex);for(var i=0,a=this._coordsList;i0?"top":"bottom",a="center"):Ld(i-pl)?(o=n>0?"bottom":"top",a="center"):(o="middle",i>0&&i0?"right":"left":a=n>0?"left":"right"),{rotation:i,textAlign:a,textVerticalAlign:o}},e.makeAxisEventDataBase=function(t){var r={componentType:t.mainType,componentIndex:t.componentIndex};return r[t.mainType+"Index"]=t.componentIndex,r},e.isLabelSilent=function(t){var r=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||r&&r.show)},e}(),D6={axisLine:function(e,t,r,n){var i=t.get(["axisLine","show"]);if(i==="auto"&&e.handleAutoShown&&(i=e.handleAutoShown("axisLine")),!!i){var a=t.axis.getExtent(),o=n.transform,s=[a[0],0],l=[a[1],0],u=s[0]>l[0];o&&(Ue(s,s,o),Ue(l,l,o));var f=V({lineCap:"round"},t.getModel(["axisLine","lineStyle"]).getLineStyle()),c=new De({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:f,strokeContainThreshold:e.strokeContainThreshold||5,silent:!0,z2:1});Ho(c.shape,c.style.lineWidth),c.anid="line",r.add(c);var p=t.get(["axisLine","symbol"]);if(p!=null){var h=t.get(["axisLine","symbolSize"]);H(p)&&(p=[p,p]),(H(h)||Ct(h))&&(h=[h,h]);var d=li(t.get(["axisLine","symbolOffset"])||0,h),m=h[0],v=h[1];D([{rotate:e.rotation+Math.PI/2,offset:d[0],r:0},{rotate:e.rotation-Math.PI/2,offset:d[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],function(g,y){if(p[y]!=="none"&&p[y]!=null){var x=ne(p[y],-m/2,-v/2,m,v,f.stroke,!0),_=g.r+g.offset,S=u?l:s;x.attr({rotation:g.rotate,x:S[0]+_*Math.cos(e.rotation),y:S[1]-_*Math.sin(e.rotation),silent:!0,z2:11}),r.add(x)}})}}},axisTickLabel:function(e,t,r,n){var i=Eut(r,n,t,e),a=Lut(r,n,t,e);if(Dut(t,a,i),Iut(r,n,t,e.tickDirection),t.get(["axisLabel","hideOverlap"])){var o=Qx(F(a,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));t1(o)}},axisName:function(e,t,r,n){var i=_e(e.axisName,t.get("name"));if(i){var a=t.get("nameLocation"),o=e.nameDirection,s=t.getModel("nameTextStyle"),l=t.get("nameGap")||0,u=t.axis.getExtent(),f=u[0]>u[1]?-1:1,c=[a==="start"?u[0]-f*l:a==="end"?u[1]+f*l:(u[0]+u[1])/2,I6(a)?e.labelOffset+o*l:0],p,h=t.get("nameRotate");h!=null&&(h=h*pl/180);var d;I6(a)?p=of.innerTextLayout(e.rotation,h??e.rotation,o):(p=Cut(e.rotation,a,h||0,u),d=e.axisNameAvailableWidth,d!=null&&(d=Math.abs(d/Math.sin(p.rotation)),!isFinite(d)&&(d=null)));var m=s.getFont(),v=t.get("nameTruncate",!0)||{},g=v.ellipsis,y=_e(e.nameTruncateMaxWidth,v.maxWidth,d),x=new Lt({x:c[0],y:c[1],rotation:p.rotation,silent:of.isLabelSilent(t),style:Qt(s,{text:i,font:m,overflow:"truncate",width:y,ellipsis:g,fill:s.getTextColor()||t.get(["axisLine","lineStyle","color"]),align:s.get("align")||p.textAlign,verticalAlign:s.get("verticalAlign")||p.textVerticalAlign}),z2:1});if(sa({el:x,componentModel:t,itemName:i}),x.__fullText=i,x.anid="name",t.get("triggerEvent")){var _=of.makeAxisEventDataBase(t);_.targetType="axisName",_.name=i,ht(x).eventData=_}n.add(x),x.updateTransform(),r.add(x),x.decomposeTransform()}}};function Cut(e,t,r,n){var i=H2(r-e),a,o,s=n[0]>n[1],l=t==="start"&&!s||t!=="start"&&s;return Ld(i-pl/2)?(o=l?"bottom":"top",a="center"):Ld(i-pl*1.5)?(o=l?"top":"bottom",a="center"):(o="middle",ipl/2?a=l?"left":"right":a=l?"right":"left"),{rotation:i,textAlign:a,textVerticalAlign:o}}function Dut(e,t,r){if(!qx(e.axis)){var n=e.get(["axisLabel","showMinLabel"]),i=e.get(["axisLabel","showMaxLabel"]);t=t||[],r=r||[];var a=t[0],o=t[1],s=t[t.length-1],l=t[t.length-2],u=r[0],f=r[1],c=r[r.length-1],p=r[r.length-2];n===!1?(ki(a),ki(u)):E6(a,o)&&(n?(ki(o),ki(f)):(ki(a),ki(u))),i===!1?(ki(s),ki(c)):E6(l,s)&&(i?(ki(l),ki(p)):(ki(s),ki(c)))}}function ki(e){e&&(e.ignore=!0)}function E6(e,t){var r=e&&e.getBoundingRect().clone(),n=t&&t.getBoundingRect().clone();if(!(!r||!n)){var i=Ls([]);return Cn(i,i,-e.rotation),r.applyTransform(An([],i,e.getLocalTransform())),n.applyTransform(An([],i,t.getLocalTransform())),r.intersect(n)}}function I6(e){return e==="middle"||e==="center"}function L6(e,t,r,n,i){for(var a=[],o=[],s=[],l=0;l=0||e===t}function R6(e){var t=S1(e);if(t){var r=t.axisPointerModel,n=t.axis.scale,i=r.option,a=r.get("status"),o=r.get("value");o!=null&&(o=n.parse(o));var s=uC(r);a==null&&(i.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o0&&!d.min?d.min=0:d.min!=null&&d.min<0&&!d.max&&(d.max=0);var m=l;d.color!=null&&(m=J({color:d.color},l));var v=_t(at(d),{boundaryGap:r,splitNumber:n,scale:i,axisLine:a,axisTick:o,axisLabel:s,name:d.text,showName:u,nameLocation:"end",nameGap:c,nameTextStyle:m,triggerEvent:p},!1);if(H(f)){var g=v.name;v.name=f.replace("{value}",g??"")}else j(f)&&(v.name=f(v.name,v));var y=new Ht(v,null,this.ecModel);return ie(y,to.prototype),y.mainType="radar",y.componentIndex=this.componentIndex,y},this);this._indicatorModels=h},t.prototype.getIndicatorModels=function(){return this._indicatorModels},t.type="radar",t.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:_t({lineStyle:{color:"#bbb"}},Zv.axisLine),axisLabel:A1(Zv.axisLabel,!1),axisTick:A1(Zv.axisTick,!1),splitLine:A1(Zv.splitLine,!0),splitArea:A1(Zv.splitArea,!0),indicator:[]},t}(Pt),H6=Hut;var Wut=["axisLine","axisTickLabel","axisName"],Yut=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a=this.group;a.removeAll(),this._buildAxes(r),this._buildSplitLineAndArea(r)},t.prototype._buildAxes=function(r){var n=r.coordinateSystem,i=n.getIndicatorAxes(),a=F(i,function(o){var s=o.model.get("showName")?o.name:"",l=new Br(o.model,{axisName:s,position:[n.cx,n.cy],rotation:o.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return l});D(a,function(o){D(Wut,o.add,o),this.group.add(o.getGroup())},this)},t.prototype._buildSplitLineAndArea=function(r){var n=r.coordinateSystem,i=n.getIndicatorAxes();if(!i.length)return;var a=r.get("shape"),o=r.getModel("splitLine"),s=r.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),f=o.get("show"),c=s.get("show"),p=l.get("color"),h=u.get("color"),d=B(p)?p:[p],m=B(h)?h:[h],v=[],g=[];function y(E,R,k){var O=k%R.length;return E[O]=E[O]||[],O}if(a==="circle")for(var x=i[0].getTicksCoords(),_=n.cx,S=n.cy,b=0;b3?1.4:o>1?1.2:1.1,f=a>0?u:1/u;xC(this,"zoom","zoomOnMouseWheel",r,{scale:f,originX:s,originY:l,isAvailableBehavior:null})}if(i){var c=Math.abs(a),p=(a>0?1:-1)*(c>3?.4:c>1?.15:.05);xC(this,"scrollMove","moveOnMouseWheel",r,{scrollDelta:p,originX:s,originY:l,isAvailableBehavior:null})}}},t.prototype._pinchHandler=function(r){if(!gC(this._zr,"globalPan")){var n=r.pinchScale>1?1.1:1/1.1;xC(this,"zoom",null,r,{scale:n,originX:r.pinchX,originY:r.pinchY,isAvailableBehavior:null})}},t}(Je);function xC(e,t,r,n,i){e.pointerChecker&&e.pointerChecker(n,i.originX,i.originY)&&(Mn(n.event),Q6(e,t,r,n,i))}function Q6(e,t,r,n,i){i.isAvailableBehavior=Z(C1,null,r,n),e.trigger(t,i)}function C1(e,t,r){var n=r[e];return!e||n&&(!H(n)||t.event[n+"Key"])}var so=Zut;function wp(e,t,r){var n=e.target;n.x+=t,n.y+=r,n.dirty()}function Tp(e,t,r,n){var i=e.target,a=e.zoomLimit,o=e.zoom=e.zoom||1;if(o*=t,a){var s=a.min||0,l=a.max||1/0;o=Math.max(Math.min(l,o),s)}var u=o/e.zoom;e.zoom=o,i.x-=(r-i.x)*(u-1),i.y-=(n-i.y)*(u-1),i.scaleX*=u,i.scaleY*=u,i.dirty()}var Kut={axisPointer:1,tooltip:1,brush:1};function hl(e,t,r){var n=t.getComponentByElement(e.topTarget),i=n&&n.coordinateSystem;return n&&n!==r&&!Kut.hasOwnProperty(n.mainType)&&i&&i.model!==r}function D1(e){if(H(e)){var t=new DOMParser;e=t.parseFromString(e,"text/xml")}var r=e;for(r.nodeType===9&&(r=r.firstChild);r.nodeName.toLowerCase()!=="svg"||r.nodeType!==1;)r=r.nextSibling;return r}var bC,E1={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},J6=St(E1),I1={"alignment-baseline":"textBaseline","stop-color":"stopColor"},t8=St(I1),$ut=function(){function e(){this._defs={},this._root=null}return e.prototype.parse=function(t,r){r=r||{};var n=D1(t);this._defsUsePending=[];var i=new nt;this._root=i;var a=[],o=n.getAttribute("viewBox")||"",s=parseFloat(n.getAttribute("width")||r.width),l=parseFloat(n.getAttribute("height")||r.height);isNaN(s)&&(s=null),isNaN(l)&&(l=null),ci(n,i,null,!0,!1);for(var u=n.firstChild;u;)this._parseNode(u,i,a,null,!1,!1),u=u.nextSibling;Jut(this._defs,this._defsUsePending),this._defsUsePending=[];var f,c;if(o){var p=L1(o);p.length>=4&&(f={x:parseFloat(p[0]||0),y:parseFloat(p[1]||0),width:parseFloat(p[2]),height:parseFloat(p[3])})}if(f&&s!=null&&l!=null&&(c=wC(f,{x:0,y:0,width:s,height:l}),!r.ignoreViewBox)){var h=i;i=new nt,i.add(h),h.scaleX=h.scaleY=c.scale,h.x=c.x,h.y=c.y}return!r.ignoreRootClip&&s!=null&&l!=null&&i.setClipPath(new At({shape:{x:0,y:0,width:s,height:l}})),{root:i,width:s,height:l,viewBoxRect:f,viewBoxTransform:c,named:a}},e.prototype._parseNode=function(t,r,n,i,a,o){var s=t.nodeName.toLowerCase(),l,u=i;if(s==="defs"&&(a=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=r;else{if(!a){var f=bC[s];if(f&&st(bC,s)){l=f.call(this,t,r);var c=t.getAttribute("name");if(c){var p={name:c,namedFrom:null,svgNodeTagLower:s,el:l};n.push(p),s==="g"&&(u=p)}else i&&n.push({name:i.name,namedFrom:i,svgNodeTagLower:s,el:l});r.add(l)}}var h=e8[s];if(h&&st(e8,s)){var d=h.call(this,t),m=t.getAttribute("id");m&&(this._defs[m]=d)}}if(l&&l.isGroup)for(var v=t.firstChild;v;)v.nodeType===1?this._parseNode(v,l,n,u,a,o):v.nodeType===3&&o&&this._parseText(v,l),v=v.nextSibling},e.prototype._parseText=function(t,r){var n=new zo({style:{text:t.textContent},silent:!0,x:this._textX||0,y:this._textY||0});Oi(r,n),ci(t,n,this._defsUsePending,!1,!1),jut(n,r);var i=n.style,a=i.fontSize;a&&a<9&&(i.fontSize=9,n.scaleX*=a/9,n.scaleY*=a/9);var o=(i.fontSize||i.fontFamily)&&[i.fontStyle,i.fontWeight,(i.fontSize||12)+"px",i.fontFamily||"sans-serif"].join(" ");i.font=o;var s=n.getBoundingRect();return this._textX+=s.width,r.add(n),n},e.internalField=function(){bC={g:function(t,r){var n=new nt;return Oi(r,n),ci(t,n,this._defsUsePending,!1,!1),n},rect:function(t,r){var n=new At;return Oi(r,n),ci(t,n,this._defsUsePending,!1,!1),n.setShape({x:parseFloat(t.getAttribute("x")||"0"),y:parseFloat(t.getAttribute("y")||"0"),width:parseFloat(t.getAttribute("width")||"0"),height:parseFloat(t.getAttribute("height")||"0")}),n.silent=!0,n},circle:function(t,r){var n=new Sr;return Oi(r,n),ci(t,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),r:parseFloat(t.getAttribute("r")||"0")}),n.silent=!0,n},line:function(t,r){var n=new De;return Oi(r,n),ci(t,n,this._defsUsePending,!1,!1),n.setShape({x1:parseFloat(t.getAttribute("x1")||"0"),y1:parseFloat(t.getAttribute("y1")||"0"),x2:parseFloat(t.getAttribute("x2")||"0"),y2:parseFloat(t.getAttribute("y2")||"0")}),n.silent=!0,n},ellipse:function(t,r){var n=new Yd;return Oi(r,n),ci(t,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),rx:parseFloat(t.getAttribute("rx")||"0"),ry:parseFloat(t.getAttribute("ry")||"0")}),n.silent=!0,n},polygon:function(t,r){var n=t.getAttribute("points"),i;n&&(i=i8(n));var a=new Re({shape:{points:i||[]},silent:!0});return Oi(r,a),ci(t,a,this._defsUsePending,!1,!1),a},polyline:function(t,r){var n=t.getAttribute("points"),i;n&&(i=i8(n));var a=new Ie({shape:{points:i||[]},silent:!0});return Oi(r,a),ci(t,a,this._defsUsePending,!1,!1),a},image:function(t,r){var n=new me;return Oi(r,n),ci(t,n,this._defsUsePending,!1,!1),n.setStyle({image:t.getAttribute("xlink:href")||t.getAttribute("href"),x:+t.getAttribute("x"),y:+t.getAttribute("y"),width:+t.getAttribute("width"),height:+t.getAttribute("height")}),n.silent=!0,n},text:function(t,r){var n=t.getAttribute("x")||"0",i=t.getAttribute("y")||"0",a=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(a),this._textY=parseFloat(i)+parseFloat(o);var s=new nt;return Oi(r,s),ci(t,s,this._defsUsePending,!1,!0),s},tspan:function(t,r){var n=t.getAttribute("x"),i=t.getAttribute("y");n!=null&&(this._textX=parseFloat(n)),i!=null&&(this._textY=parseFloat(i));var a=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0",s=new nt;return Oi(r,s),ci(t,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(a),this._textY+=parseFloat(o),s},path:function(t,r){var n=t.getAttribute("d")||"",i=b0(n);return Oi(r,i),ci(t,i,this._defsUsePending,!1,!1),i.silent=!0,i}}}(),e}(),e8={lineargradient:function(e){var t=parseInt(e.getAttribute("x1")||"0",10),r=parseInt(e.getAttribute("y1")||"0",10),n=parseInt(e.getAttribute("x2")||"10",10),i=parseInt(e.getAttribute("y2")||"0",10),a=new $a(t,r,n,i);return r8(e,a),n8(e,a),a},radialgradient:function(e){var t=parseInt(e.getAttribute("cx")||"0",10),r=parseInt(e.getAttribute("cy")||"0",10),n=parseInt(e.getAttribute("r")||"0",10),i=new M0(t,r,n);return r8(e,i),n8(e,i),i}};function r8(e,t){var r=e.getAttribute("gradientUnits");r==="userSpaceOnUse"&&(t.global=!0)}function n8(e,t){for(var r=e.firstChild;r;){if(r.nodeType===1&&r.nodeName.toLocaleLowerCase()==="stop"){var n=r.getAttribute("offset"),i=void 0;n&&n.indexOf("%")>0?i=parseInt(n,10)/100:n?i=parseFloat(n):i=0;var a={};s8(r,a,a);var o=a.stopColor||r.getAttribute("stop-color")||"#000000";t.colorStops.push({offset:i,color:o})}r=r.nextSibling}}function Oi(e,t){e&&e.__inheritedStyle&&(t.__inheritedStyle||(t.__inheritedStyle={}),J(t.__inheritedStyle,e.__inheritedStyle))}function i8(e){for(var t=L1(e),r=[],n=0;n0;a-=2){var o=n[a],s=n[a-1],l=L1(o);switch(i=i||tr(),s){case"translate":Nr(i,i,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":Lc(i,i,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":Cn(i,i,-parseFloat(l[0])*SC);break;case"skewX":var u=Math.tan(parseFloat(l[0])*SC);An(i,[1,0,u,1,0,0],i);break;case"skewY":var f=Math.tan(parseFloat(l[0])*SC);An(i,[1,f,0,1,0,0],i);break;case"matrix":i[0]=parseFloat(l[0]),i[1]=parseFloat(l[1]),i[2]=parseFloat(l[2]),i[3]=parseFloat(l[3]),i[4]=parseFloat(l[4]),i[5]=parseFloat(l[5]);break}}t.setLocalTransform(i)}}var o8=/([^\s:;]+)\s*:\s*([^:;]+)/g;function s8(e,t,r){var n=e.getAttribute("style");if(n){o8.lastIndex=0;for(var i;(i=o8.exec(n))!=null;){var a=i[1],o=st(E1,a)?E1[a]:null;o&&(t[o]=i[2]);var s=st(I1,a)?I1[a]:null;s&&(r[s]=i[2])}}}function nft(e,t,r){for(var n=0;n0,v={api:n,geo:l,mapOrGeoModel:t,data:s,isVisualEncodedByVisualMap:m,isGeo:o,transformInfoRaw:p};l.resourceType==="geoJSON"?this._buildGeoJSON(v):l.resourceType==="geoSVG"&&this._buildSVG(v),this._updateController(t,r,n),this._updateMapSelectHandler(t,u,n,i)},e.prototype._buildGeoJSON=function(t){var r=this._regionsGroupByName=$(),n=$(),i=this._regionsGroup,a=t.transformInfoRaw,o=t.mapOrGeoModel,s=t.data,l=t.geo.projection,u=l&&l.stream;function f(h,d){return d&&(h=d(h)),h&&[h[0]*a.scaleX+a.x,h[1]*a.scaleY+a.y]}function c(h){for(var d=[],m=!u&&l&&l.project,v=0;v=0)&&(p=i);var h=o?{normal:{align:"center",verticalAlign:"middle"}}:null;he(t,ae(n),{labelFetcher:p,labelDataIndex:c,defaultText:r},h);var d=t.getTextContent();if(d&&(x8(d).ignore=d.ignore,t.textConfig&&o)){var m=t.getBoundingRect().clone();t.textConfig.layoutRect=m,t.textConfig.position=[(o[0]-m.x)/m.width*100+"%",(o[1]-m.y)/m.height*100+"%"]}t.disableLabelAnimation=!0}else t.removeTextContent(),t.removeTextConfig(),t.disableLabelAnimation=null}function v8(e,t,r,n,i,a){e.data?e.data.setItemGraphicEl(a,t):ht(t).eventData={componentType:"geo",componentIndex:i.componentIndex,geoIndex:i.componentIndex,name:r,region:n&&n.option||{}}}function m8(e,t,r,n,i){e.data||sa({el:t,componentModel:i,itemName:r,itemTooltipOption:n.get("tooltip")})}function g8(e,t,r,n,i){t.highDownSilentOnTouch=!!i.get("selectedMode");var a=n.getModel("emphasis"),o=a.get("focus");return Zt(t,o,a.get("blurScope"),a.get("disabled")),e.isGeo&&Yz(t,i,r),o}function y8(e,t,r){var n=[],i;function a(){i=[]}function o(){i.length&&(n.push(i),i=[])}var s=t({polygonStart:a,polygonEnd:o,lineStart:a,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&i.push([l,u])},sphere:function(){}});return!r&&s.polygonStart(),D(e,function(l){s.lineStart();for(var u=0;u-1&&(i.style.stroke=i.style.fill,i.style.fill="#fff",i.style.lineWidth=2),i},t.type="series.map",t.dependencies=["geo"],t.layoutMode="box",t.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},t}(Wt),b8=gft;function yft(e,t){var r={};return D(e,function(n){n.each(n.mapDimension("value"),function(i,a){var o="ec-"+n.getName(a);r[o]=r[o]||[],isNaN(i)||r[o].push(i)})}),e[0].map(e[0].mapDimension("value"),function(n,i){for(var a="ec-"+e[0].getName(i),o=0,s=1/0,l=-1/0,u=r[a].length,f=0;f1?(_.width=x,_.height=x/v):(_.height=x,_.width=x*v),_.y=y[1]-_.height/2,_.x=y[0]-_.width/2;else{var S=e.getBoxLayoutParams();S.aspect=v,_=re(S,{width:d,height:m})}this.setViewRect(_.x,_.y,_.width,_.height),this.setCenter(e.get("center"),t),this.setZoom(e.get("zoom"))}function bft(e,t){D(t.get("geoCoord"),function(r,n){e.addGeoCoord(n,r)})}var Sft=function(){function e(){this.dimensions=LC}return e.prototype.create=function(t,r){var n=[];function i(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}t.eachComponent("geo",function(o,s){var l=o.get("map"),u=new PC(l+s,l,V({nameMap:o.get("nameMap")},i(o)));u.zoomLimit=o.get("scaleLimit"),n.push(u),o.coordinateSystem=u,u.model=o,u.resize=A8,u.resize(o,r)}),t.eachSeries(function(o){var s=o.get("coordinateSystem");if(s==="geo"){var l=o.get("geoIndex")||0;o.coordinateSystem=n[l]}});var a={};return t.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();a[s]=a[s]||[],a[s].push(o)}}),D(a,function(o,s){var l=F(o,function(f){return f.get("nameMap")}),u=new PC(s,s,V({nameMap:Tc(l)},i(o[0])));u.zoomLimit=_e.apply(null,F(o,function(f){return f.get("scaleLimit")})),n.push(u),u.resize=A8,u.resize(o[0],r),D(o,function(f){f.coordinateSystem=u,bft(u,f)})}),n},e.prototype.getFilledRegions=function(t,r,n,i){for(var a=(t||[]).slice(),o=$(),s=0;s=0;o--){var s=i[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},r.push(s)}}function L8(e,t){var r=e.isExpand?e.children:[],n=e.parentNode.children,i=e.hierNode.i?n[e.hierNode.i-1]:null;if(r.length){Cft(e);var a=(r[0].hierNode.prelim+r[r.length-1].hierNode.prelim)/2;i?(e.hierNode.prelim=i.hierNode.prelim+t(e,i),e.hierNode.modifier=e.hierNode.prelim-a):e.hierNode.prelim=a}else i&&(e.hierNode.prelim=i.hierNode.prelim+t(e,i));e.parentNode.hierNode.defaultAncestor=Dft(e,i,e.parentNode.hierNode.defaultAncestor||n[0],t)}function P8(e){var t=e.hierNode.prelim+e.parentNode.hierNode.modifier;e.setLayout({x:t},!0),e.hierNode.modifier+=e.parentNode.hierNode.modifier}function OC(e){return arguments.length?e:Lft}function uf(e,t){return e-=Math.PI/2,{x:t*Math.cos(e),y:t*Math.sin(e)}}function R8(e,t){return re(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function Cft(e){for(var t=e.children,r=t.length,n=0,i=0;--r>=0;){var a=t[r];a.hierNode.prelim+=n,a.hierNode.modifier+=n,i+=a.hierNode.change,n+=a.hierNode.shift+i}}function Dft(e,t,r,n){if(t){for(var i=e,a=e,o=a.parentNode.children[0],s=t,l=i.hierNode.modifier,u=a.hierNode.modifier,f=o.hierNode.modifier,c=s.hierNode.modifier;s=NC(s),a=kC(a),s&&a;){i=NC(i),o=kC(o),i.hierNode.ancestor=e;var p=s.hierNode.prelim+c-a.hierNode.prelim-u+n(s,a);p>0&&(Ift(Eft(s,e,r),e,p),u+=p,l+=p),c+=s.hierNode.modifier,u+=a.hierNode.modifier,l+=i.hierNode.modifier,f+=o.hierNode.modifier}s&&!NC(i)&&(i.hierNode.thread=s,i.hierNode.modifier+=c-l),a&&!kC(o)&&(o.hierNode.thread=a,o.hierNode.modifier+=u-f,r=e)}return r}function NC(e){var t=e.children;return t.length&&e.isExpand?t[t.length-1]:e.hierNode.thread}function kC(e){var t=e.children;return t.length&&e.isExpand?t[0]:e.hierNode.thread}function Eft(e,t,r){return e.hierNode.ancestor.parentNode===t.parentNode?e.hierNode.ancestor:r}function Ift(e,t,r){var n=r/(t.hierNode.i-e.hierNode.i);t.hierNode.change-=n,t.hierNode.shift+=r,t.hierNode.modifier+=r,t.hierNode.prelim+=r,e.hierNode.change+=n}function Lft(e,t){return e.parentNode===t.parentNode?1:2}var Pft=function(){function e(){this.parentPoint=[],this.childPoints=[]}return e}(),Rft=function(e){N(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new Pft},t.prototype.buildPath=function(r,n){var i=n.childPoints,a=i.length,o=n.parentPoint,s=i[0],l=i[a-1];if(a===1){r.moveTo(o[0],o[1]),r.lineTo(s[0],s[1]);return}var u=n.orient,f=u==="TB"||u==="BT"?0:1,c=1-f,p=q(n.forkPosition,1),h=[];h[f]=o[f],h[c]=o[c]+(l[c]-o[c])*p,r.moveTo(o[0],o[1]),r.lineTo(h[0],h[1]),r.moveTo(s[0],s[1]),h[f]=s[f],r.lineTo(h[0],h[1]),h[f]=l[f],r.lineTo(h[0],h[1]),r.lineTo(l[0],l[1]);for(var d=1;dy.x,S||(_=_-Math.PI));var w=S?"left":"right",T=s.getModel("label"),M=T.get("rotate"),C=M*(Math.PI/180),A=v.getTextContent();A&&(v.setTextConfig({position:T.get("position")||w,rotation:M==null?-_:C,origin:"center"}),A.setStyle("verticalAlign","middle"))}var P=s.get(["emphasis","focus"]),L=P==="relative"?su(o.getAncestorsIndices(),o.getDescendantIndices()):P==="ancestor"?o.getAncestorsIndices():P==="descendant"?o.getDescendantIndices():null;L&&(ht(r).focus=L),kft(i,o,f,r,d,h,m,n),r.__edge&&(r.onHoverStateChange=function(I){if(I!=="blur"){var E=o.parentNode&&e.getItemGraphicEl(o.parentNode.dataIndex);E&&E.hoverState===Nu||ku(r.__edge,I)}})}function kft(e,t,r,n,i,a,o,s){var l=t.getModel(),u=e.get("edgeShape"),f=e.get("layout"),c=e.getOrient(),p=e.get(["lineStyle","curveness"]),h=e.get("edgeForkPosition"),d=l.getModel("lineStyle").getLineStyle(),m=n.__edge;if(u==="curve")t.parentNode&&t.parentNode!==r&&(m||(m=n.__edge=new Uu({shape:zC(f,c,p,i,i)})),Rt(m,{shape:zC(f,c,p,a,o)},e));else if(u==="polyline"&&f==="orthogonal"&&t!==r&&t.children&&t.children.length!==0&&t.isExpand===!0){for(var v=t.children,g=[],y=0;yr&&(r=i.height)}this.height=r+1},e.prototype.getNodeById=function(t){if(this.getId()===t)return this;for(var r=0,n=this.children,i=n.length;r=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,r)},e.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},e.prototype.getModel=function(t){if(!(this.dataIndex<0)){var r=this.hostTree,n=r.data.getItemModel(this.dataIndex);return n.getModel(t)}},e.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},e.prototype.setVisual=function(t,r){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,r)},e.prototype.getVisual=function(t){return this.hostTree.data.getItemVisual(this.dataIndex,t)},e.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},e.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},e.prototype.getChildIndex=function(){if(this.parentNode){for(var t=this.parentNode.children,r=0;r=0){var n=r.getData().tree.root,i=e.targetNode;if(H(i)&&(i=n.getNodeById(i)),i&&n.contains(i))return{node:i};var a=e.targetNodeId;if(a!=null&&(i=n.getNodeById(a)))return{node:i}}}function VC(e){for(var t=[];e;)e=e.parentNode,e&&t.push(e);return t.reverse()}function Cp(e,t){var r=VC(e);return gt(r,t)>=0}function vl(e,t){for(var r=[];e;){var n=e.dataIndex;r.push({name:e.name,dataIndex:n,value:t.getRawValue(n)}),e=e.parentNode}return r.reverse(),r}var Xft=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.hasSymbolVisual=!0,r.ignoreStyleOnData=!0,r}return t.prototype.getInitialData=function(r){var n={name:r.name,children:r.data},i=r.leaves||{},a=new Ht(i,this,this.ecModel),o=Ap.createTree(n,this,s);function s(c){c.wrapMethod("getItemModel",function(p,h){var d=o.getNodeByDataIndex(h);return d&&d.children.length&&d.isExpand||(p.parentModel=a),p})}var l=0;o.eachNode("preorder",function(c){c.depth>l&&(l=c.depth)});var u=r.expandAndCollapse,f=u&&r.initialTreeDepth>=0?r.initialTreeDepth:l;return o.root.eachNode("preorder",function(c){var p=c.hostTree.data.getRawDataItem(c.dataIndex);c.isExpand=p&&p.collapsed!=null?!p.collapsed:c.depth<=f}),o.data},t.prototype.getOrient=function(){var r=this.get("orient");return r==="horizontal"?r="LR":r==="vertical"&&(r="TB"),r},t.prototype.setZoom=function(r){this.option.zoom=r},t.prototype.setCenter=function(r){this.option.center=r},t.prototype.formatTooltip=function(r,n,i){for(var a=this.getData().tree,o=a.root.children[0],s=a.getNodeByDataIndex(r),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return xe("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},t.prototype.getDataParams=function(r){var n=e.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(r);return n.treeAncestors=vl(i,this),n.collapsed=!i.isExpand,n},t.type="series.tree",t.layoutMode="box",t.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},t}(Wt),F8=Xft;function G8(e,t,r){for(var n=[e],i=[],a;a=n.pop();)if(i.push(a),a.isExpand){var o=a.children;if(o.length)for(var s=0;s=0;a--)r.push(i[a])}}function FC(e,t){e.eachSeriesByType("tree",function(r){qft(r,t)})}function qft(e,t){var r=R8(e,t);e.layoutInfo=r;var n=e.get("layout"),i=0,a=0,o=null;n==="radial"?(i=2*Math.PI,a=Math.min(r.height,r.width)/2,o=OC(function(x,_){return(x.parentNode===_.parentNode?1:2)/x.depth})):(i=r.width,a=r.height,o=OC());var s=e.getData().tree.root,l=s.children[0];if(l){I8(s),G8(l,L8,o),s.hierNode.modifier=-l.hierNode.prelim,Dp(l,P8);var u=l,f=l,c=l;Dp(l,function(x){var _=x.getLayout().x;_f.getLayout().x&&(f=x),x.depth>c.depth&&(c=x)});var p=u===f?1:o(u,f)/2,h=p-u.getLayout().x,d=0,m=0,v=0,g=0;if(n==="radial")d=i/(f.getLayout().x+p+h),m=a/(c.depth-1||1),Dp(l,function(x){v=(x.getLayout().x+h)*d,g=(x.depth-1)*m;var _=uf(v,g);x.setLayout({x:_.x,y:_.y,rawX:v,rawY:g},!0)});else{var y=e.getOrient();y==="RL"||y==="LR"?(m=a/(f.getLayout().x+p+h),d=i/(c.depth-1||1),Dp(l,function(x){g=(x.getLayout().x+h)*m,v=y==="LR"?(x.depth-1)*d:i-(x.depth-1)*d,x.setLayout({x:v,y:g},!0)})):(y==="TB"||y==="BT")&&(d=i/(f.getLayout().x+p+h),m=a/(c.depth-1||1),Dp(l,function(x){v=(x.getLayout().x+h)*d,g=y==="TB"?(x.depth-1)*m:a-(x.depth-1)*m,x.setLayout({x:v,y:g},!0)}))}}}function GC(e){e.eachSeriesByType("tree",function(t){var r=t.getData(),n=r.tree;n.eachNode(function(i){var a=i.getModel(),o=a.getModel("itemStyle").getItemStyle(),s=r.ensureUniqueItemVisual(i.dataIndex,"style");V(s,o)})})}function H8(e){e.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(t,r){r.eachComponent({mainType:"series",subType:"tree",query:t},function(n){var i=t.dataIndex,a=n.getData().tree,o=a.getNodeByDataIndex(i);o.isExpand=!o.isExpand})}),e.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(t,r,n){r.eachComponent({mainType:"series",subType:"tree",query:t},function(i){var a=i.coordinateSystem,o=Mp(a,t,void 0,n);i.setCenter&&i.setCenter(o.center),i.setZoom&&i.setZoom(o.zoom)})})}function HC(e){e.registerChartView(V8),e.registerSeriesModel(F8),e.registerLayout(FC),e.registerVisual(GC),H8(e)}var W8=["treemapZoomToNode","treemapRender","treemapMove"];function Y8(e){for(var t=0;t1;)a=a.parentNode;var o=sv(e.ecModel,a.name||a.dataIndex+"",n);i.setVisual("decal",o)})}var Zft=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.preventUsingHoverLayer=!0,r}return t.prototype.getInitialData=function(r,n){var i={name:r.name,children:r.data};X8(i);var a=r.levels||[],o=this.designatedVisualItemStyle={},s=new Ht({itemStyle:o},this,n);a=r.levels=Kft(a,n);var l=F(a||[],function(c){return new Ht(c,s,n)},this),u=Ap.createTree(i,this,f);function f(c){c.wrapMethod("getItemModel",function(p,h){var d=u.getNodeByDataIndex(h),m=d?l[d.depth]:null;return p.parentModel=m||s,p})}return u.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.formatTooltip=function(r,n,i){var a=this.getData(),o=this.getRawValue(r),s=a.getName(r);return xe("nameValue",{name:s,value:o})},t.prototype.getDataParams=function(r){var n=e.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(r);return n.treeAncestors=vl(i,this),n.treePathInfo=n.treeAncestors,n},t.prototype.setLayoutInfo=function(r){this.layoutInfo=this.layoutInfo||{},V(this.layoutInfo,r)},t.prototype.mapIdToIndex=function(r){var n=this._idIndexMap;n||(n=this._idIndexMap=$(),this._idIndexMapCount=0);var i=n.get(r);return i==null&&n.set(r,i=this._idIndexMapCount++),i},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(r){r?this._viewRoot=r:r=this._viewRoot;var n=this.getRawData().tree.root;(!r||r!==n&&!n.contains(r))&&(this._viewRoot=n)},t.prototype.enableAriaDecal=function(){jv(this)},t.type="series.treemap",t.layoutMode="box",t.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"\u25B6",zoomToNodeRatio:.32*.32,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}},emphasis:{itemStyle:{color:"rgba(0,0,0,0.9)"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},t}(Wt);function X8(e){var t=0;D(e.children,function(n){X8(n);var i=n.value;B(i)&&(i=i[0]),t+=i});var r=e.value;B(r)&&(r=r[0]),(r==null||isNaN(r))&&(r=t),r<0&&(r=0),B(e.value)?e.value[0]=r:e.value=r}function Kft(e,t){var r=Yt(t.get("color")),n=Yt(t.get(["aria","decal","decals"]));if(r){e=e||[];var i,a;D(e,function(s){var l=new Ht(s),u=l.get("color"),f=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(i=!0),(l.get(["itemStyle","decal"])||f&&f!=="none")&&(a=!0)});var o=e[0]||(e[0]={});return i||(o.color=r.slice()),!a&&n&&(o.decal=n.slice()),e}}var q8=Zft;var $ft=8,Z8=8,WC=5,jft=function(){function e(t){this.group=new nt,t.add(this.group)}return e.prototype.render=function(t,r,n,i){var a=t.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!a.get("show")||!n)){var s=a.getModel("itemStyle"),l=a.getModel("emphasis"),u=s.getModel("textStyle"),f=l.getModel(["itemStyle","textStyle"]),c={pos:{left:a.get("left"),right:a.get("right"),top:a.get("top"),bottom:a.get("bottom")},box:{width:r.getWidth(),height:r.getHeight()},emptyItemWidth:a.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(n,c,u),this._renderContent(t,c,s,l,u,f,i),Zs(o,c.pos,c.box)}},e.prototype._prepare=function(t,r,n){for(var i=t;i;i=i.parentNode){var a=Te(i.getModel().get("name"),""),o=n.getTextRect(a),s=Math.max(o.width+$ft*2,r.emptyItemWidth);r.totalWidth+=s+Z8,r.renderList.push({node:i,text:a,width:s})}},e.prototype._renderContent=function(t,r,n,i,a,o,s){for(var l=0,u=r.emptyItemWidth,f=t.get(["breadcrumb","height"]),c=K5(r.pos,r.box),p=r.totalWidth,h=r.renderList,d=i.getModel("itemStyle").getItemStyle(),m=h.length-1;m>=0;m--){var v=h[m],g=v.node,y=v.width,x=v.text;p>c.width&&(p-=y-u,y=u,x=null);var _=new Re({shape:{points:Qft(l,0,y,f,m===h.length-1,m===0)},style:J(n.getItemStyle(),{lineJoin:"bevel"}),textContent:new Lt({style:Qt(a,{text:x})}),textConfig:{position:"inside"},z2:Uo*1e4,onclick:pt(s,g)});_.disableLabelAnimation=!0,_.getTextContent().ensureState("emphasis").style=Qt(o,{text:x}),_.ensureState("emphasis").style=d,Zt(_,i.get("focus"),i.get("blurScope"),i.get("disabled")),this.group.add(_),Jft(_,t,g),l+=y+Z8}},e.prototype.remove=function(){this.group.removeAll()},e}();function Qft(e,t,r,n,i,a){var o=[[i?e:e-WC,t],[e+r,t],[e+r,t+n],[i?e:e-WC,t+n]];return!a&&o.splice(2,0,[e+r+WC,t+n/2]),!i&&o.push([e,t+n/2]),o}function Jft(e,t,r){ht(e).eventData={componentType:"series",componentSubType:"treemap",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:r&&r.dataIndex,name:r&&r.name},treePathInfo:r&&vl(r,t)}}var K8=jft;var tct=function(){function e(){this._storage=[],this._elExistsMap={}}return e.prototype.add=function(t,r,n,i,a){return this._elExistsMap[t.id]?!1:(this._elExistsMap[t.id]=!0,this._storage.push({el:t,target:r,duration:n,delay:i,easing:a}),!0)},e.prototype.finished=function(t){return this._finishedCallback=t,this},e.prototype.start=function(){for(var t=this,r=this._storage.length,n=function(){r--,r<=0&&(t._storage.length=0,t._elExistsMap={},t._finishedCallback&&t._finishedCallback())},i=0,a=this._storage.length;iQ8||Math.abs(r.dy)>Q8)){var n=this.seriesModel.getData().tree.root;if(!n)return;var i=n.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+r.dx,y:i.y+r.dy,width:i.width,height:i.height}})}},t.prototype._onZoom=function(r){var n=r.originX,i=r.originY;if(this._state!=="animating"){var a=this.seriesModel.getData().tree.root;if(!a)return;var o=a.getLayout();if(!o)return;var s=new dt(o.x,o.y,o.width,o.height),l=this.seriesModel.layoutInfo;n-=l.x,i-=l.y;var u=tr();Nr(u,u,[-n,-i]),Lc(u,u,[r.scale,r.scale]),Nr(u,u,[n,i]),s.applyTransform(u),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:s.x,y:s.y,width:s.width,height:s.height}})}},t.prototype._initEvents=function(r){var n=this;r.on("click",function(i){if(n._state==="ready"){var a=n.seriesModel.get("nodeClick",!0);if(a){var o=n.findTarget(i.offsetX,i.offsetY);if(o){var s=o.node;if(s.getLayout().isLeafRoot)n._rootToNode(o);else if(a==="zoomToNode")n._zoomToNode(o);else if(a==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),f=l.get("target",!0)||"blank";u&&Xu(u,f)}}}}},this)},t.prototype._renderBreadcrumb=function(r,n,i){var a=this;i||(i=r.get("leafDepth",!0)!=null?{node:r.getViewRoot()}:this.findTarget(n.getWidth()/2,n.getHeight()/2),i||(i={node:r.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new K8(this.group))).render(r,n,i.node,function(o){a._state!=="animating"&&(Cp(r.getViewRoot(),o)?a._rootToNode({node:o}):a._zoomToNode({node:o}))})},t.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=Qv(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},t.prototype.dispose=function(){this._clearController()},t.prototype._zoomToNode=function(r){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:r.node})},t.prototype._rootToNode=function(r){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:r.node})},t.prototype.findTarget=function(r,n){var i,a=this.seriesModel.getViewRoot();return a.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(r,n),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)i={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),i},t.type="treemap",t}(Vt);function Qv(){return{nodeGroup:[],background:[],content:[]}}function oct(e,t,r,n,i,a,o,s,l,u){if(!o)return;var f=o.getLayout(),c=e.getData(),p=o.getModel();if(c.setItemGraphicEl(o.dataIndex,null),!f||!f.isInView)return;var h=f.width,d=f.height,m=f.borderWidth,v=f.invisible,g=o.getRawIndex(),y=s&&s.getRawIndex(),x=o.viewChildren,_=f.upperHeight,S=x&&x.length,b=p.getModel("itemStyle"),w=p.getModel(["emphasis","itemStyle"]),T=p.getModel(["blur","itemStyle"]),M=p.getModel(["select","itemStyle"]),C=b.get("borderRadius")||0,A=tt("nodeGroup",YC);if(!A)return;if(l.add(A),A.x=f.x||0,A.y=f.y||0,A.markRedraw(),O1(A).nodeWidth=h,O1(A).nodeHeight=d,f.isAboveViewRoot)return A;var P=tt("background",j8,u,nct);P&&z(A,P,S&&f.upperLabelHeight);var L=p.getModel("emphasis"),I=L.get("focus"),E=L.get("blurScope"),R=L.get("disabled"),k=I==="ancestor"?o.getAncestorsIndices():I==="descendant"?o.getDescendantIndices():I;if(S)qs(A)&&Bo(A,!1),P&&(Bo(P,!R),c.setItemGraphicEl(o.dataIndex,P),m0(P,k,E));else{var O=tt("content",j8,u,ict);O&&U(A,O),P.disableMorphing=!0,P&&qs(P)&&Bo(P,!1),Bo(A,!R),c.setItemGraphicEl(o.dataIndex,A),m0(A,k,E)}return A;function z(ut,ct,K){var ot=ht(ct);if(ot.dataIndex=o.dataIndex,ot.seriesIndex=e.seriesIndex,ct.setShape({x:0,y:0,width:h,height:d,r:C}),v)G(ct);else{ct.invisible=!1;var Q=o.getVisual("style"),W=Q.stroke,Gt=eB(b);Gt.fill=W;var Tt=ff(w);Tt.fill=w.get("borderColor");var te=ff(T);te.fill=T.get("borderColor");var Jt=ff(M);if(Jt.fill=M.get("borderColor"),K){var Dt=h-2*m;Y(ct,W,Q.opacity,{x:m,y:0,width:Dt,height:_})}else ct.removeTextContent();ct.setStyle(Gt),ct.ensureState("emphasis").style=Tt,ct.ensureState("blur").style=te,ct.ensureState("select").style=Jt,na(ct)}ut.add(ct)}function U(ut,ct){var K=ht(ct);K.dataIndex=o.dataIndex,K.seriesIndex=e.seriesIndex;var ot=Math.max(h-2*m,0),Q=Math.max(d-2*m,0);if(ct.culling=!0,ct.setShape({x:m,y:m,width:ot,height:Q,r:C}),v)G(ct);else{ct.invisible=!1;var W=o.getVisual("style"),Gt=W.fill,Tt=eB(b);Tt.fill=Gt,Tt.decal=W.decal;var te=ff(w),Jt=ff(T),Dt=ff(M);Y(ct,Gt,W.opacity,null),ct.setStyle(Tt),ct.ensureState("emphasis").style=te,ct.ensureState("blur").style=Jt,ct.ensureState("select").style=Dt,na(ct)}ut.add(ct)}function G(ut){!ut.invisible&&a.push(ut)}function Y(ut,ct,K,ot){var Q=p.getModel(ot?tB:J8),W=Te(p.get("name"),null),Gt=Q.getShallow("show");he(ut,ae(p,ot?tB:J8),{defaultText:Gt?W:null,inheritColor:ct,defaultOpacity:K,labelFetcher:e,labelDataIndex:o.dataIndex});var Tt=ut.getTextContent();if(Tt){var te=Tt.style,Jt=Mc(te.padding||0);ot&&(ut.setTextConfig({layoutRect:ot}),Tt.disableLabelLayout=!0),Tt.beforeUpdate=function(){var ve=Math.max((ot?ot.width:ut.shape.width)-Jt[1]-Jt[3],0),ar=Math.max((ot?ot.height:ut.shape.height)-Jt[0]-Jt[2],0);(te.width!==ve||te.height!==ar)&&Tt.setStyle({width:ve,height:ar})},te.truncateMinChar=2,te.lineOverflow="truncate",et(te,ot,f);var Dt=Tt.getState("emphasis");et(Dt?Dt.style:null,ot,f)}}function et(ut,ct,K){var ot=ut?ut.text:null;if(!ct&&K.isLeafRoot&&ot!=null){var Q=e.get("drillDownIcon",!0);ut.text=Q?Q+" "+ot:ot}}function tt(ut,ct,K,ot){var Q=y!=null&&r[ut][y],W=i[ut];return Q?(r[ut][y]=null,lt(W,Q)):v||(Q=new ct,Q instanceof We&&(Q.z2=sct(K,ot)),Mt(W,Q)),t[ut][g]=Q}function lt(ut,ct){var K=ut[g]={};ct instanceof YC?(K.oldX=ct.x,K.oldY=ct.y):K.oldShape=V({},ct.shape)}function Mt(ut,ct){var K=ut[g]={},ot=o.parentNode,Q=ct instanceof nt;if(ot&&(!n||n.direction==="drillDown")){var W=0,Gt=0,Tt=i.background[ot.getRawIndex()];!n&&Tt&&Tt.oldShape&&(W=Tt.oldShape.width,Gt=Tt.oldShape.height),Q?(K.oldX=0,K.oldY=Gt):K.oldShape={x:W,y:Gt,width:0,height:0}}K.fadein=!Q}}function sct(e,t){return e*rct+t}var rB=act;var em=D,lct=rt,V1=-1,KC=function(){function e(t){var r=t.mappingMethod,n=t.type,i=this.option=at(t);this.type=n,this.mappingMethod=r,this._normalizeData=cct[r];var a=e.visualHandlers[n];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[r],r==="piecewise"?(XC(i),uct(i)):r==="category"?i.categories?fct(i):XC(i,!0):(be(r!=="linear"||i.dataExtent),XC(i))}return e.prototype.mapValueToVisual=function(t){var r=this._normalizeData(t);return this._normalizedToVisual(r,t)},e.prototype.getNormalizer=function(){return Z(this._normalizeData,this)},e.listVisualTypes=function(){return St(e.visualHandlers)},e.isValidType=function(t){return e.visualHandlers.hasOwnProperty(t)},e.eachVisual=function(t,r,n){rt(t)?D(t,r,n):r.call(n,t)},e.mapVisual=function(t,r,n){var i,a=B(t)?[]:rt(t)?{}:(i=!0,null);return e.eachVisual(t,function(o,s){var l=r.call(n,o,s);i?a=l:a[s]=l}),a},e.retrieveVisuals=function(t){var r={},n;return t&&em(e.visualHandlers,function(i,a){t.hasOwnProperty(a)&&(r[a]=t[a],n=!0)}),n?r:null},e.prepareVisualTypes=function(t){if(B(t))t=t.slice();else if(lct(t)){var r=[];em(t,function(n,i){r.push(i)}),t=r}else return[];return t.sort(function(n,i){return i==="color"&&n!=="color"&&n.indexOf("color")===0?1:-1}),t},e.dependsOn=function(t,r){return r==="color"?!!(t&&t.indexOf(r)===0):t===r},e.findPieceIndex=function(t,r,n){for(var i,a=1/0,o=0,s=r.length;o=0;a--)n[a]==null&&(delete r[t[a]],t.pop())}function XC(e,t){var r=e.visual,n=[];rt(r)?em(r,function(a){n.push(a)}):r!=null&&n.push(r);var i={color:1,symbol:1};!t&&n.length===1&&!i.hasOwnProperty(e.type)&&(n[1]=n[0]),iB(e,n)}function z1(e){return{applyVisual:function(t,r,n){var i=this.mapValueToVisual(t);n("color",e(r("color"),i))},_normalizedToVisual:qC([0,1])}}function nB(e){var t=this.option.visual;return t[Math.round($t(e,[0,1],[0,t.length-1],!0))]||{}}function Jv(e){return function(t,r,n){n(e,this.mapValueToVisual(t))}}function tm(e){var t=this.option.visual;return t[this.option.loop&&e!==V1?e%t.length:e]}function cf(){return this.option.visual[0]}function qC(e){return{linear:function(t){return $t(t,e,this.option.visual,!0)},category:tm,piecewise:function(t,r){var n=ZC.call(this,r);return n==null&&(n=$t(t,e,this.option.visual,!0)),n},fixed:cf}}function ZC(e){var t=this.option,r=t.pieceList;if(t.hasSpecialVisual){var n=KC.findPieceIndex(e,r),i=r[n];if(i&&i.visual)return i.visual[this.type]}}function iB(e,t){return e.visual=t,e.type==="color"&&(e.parsedVisual=F(t,function(r){var n=br(r);return n||[0,0,0,1]})),t}var cct={linear:function(e){return $t(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,r=KC.findPieceIndex(e,t,!0);if(r!=null)return $t(r,[0,t.length-1],[0,1],!0)},category:function(e){var t=this.option.categories?this.option.categoryMap[e]:e;return t??V1},fixed:ce};function U1(e,t,r){return e?t<=r:t=r.length||m===r[m.depth]){var g=mct(i,l,m,v,d,n);lB(m,g,r,n)}})}}}function hct(e,t,r){var n=V({},t),i=r.designatedVisualItemStyle;return D(["color","colorAlpha","colorSaturation"],function(a){i[a]=t[a];var o=e.get(a);i[a]=null,o!=null&&(n[a]=o)}),n}function aB(e){var t=$C(e,"color");if(t){var r=$C(e,"colorAlpha"),n=$C(e,"colorSaturation");return n&&(t=mu(t,null,null,n)),r&&(t=gu(t,r)),t}}function dct(e,t){return t!=null?mu(t,null,null,e):null}function $C(e,t){var r=e[t];if(r!=null&&r!=="none")return r}function vct(e,t,r,n,i,a){if(!(!a||!a.length)){var o=jC(t,"color")||i.color!=null&&i.color!=="none"&&(jC(t,"colorAlpha")||jC(t,"colorSaturation"));if(o){var s=t.get("visualMin"),l=t.get("visualMax"),u=r.dataExtent.slice();s!=null&&su[1]&&(u[1]=l);var f=t.get("colorMappingBy"),c={type:o.name,dataExtent:u,visual:o.range};c.type==="color"&&(f==="index"||f==="id")?(c.mappingMethod="category",c.loop=!0):c.mappingMethod="linear";var p=new Be(c);return oB(p).drColorMappingBy=f,p}}}function jC(e,t){var r=e.get(t);return B(r)&&r.length?{name:t,range:r}:null}function mct(e,t,r,n,i,a){var o=V({},t);if(i){var s=i.type,l=s==="color"&&oB(i).drColorMappingBy,u=l==="index"?n:l==="id"?a.mapIdToIndex(r.getId()):r.getValue(e.get("visualDimension"));o[s]=i.mapValueToVisual(u)}return o}var rm=Math.max,B1=Math.min,uB=_e,QC=D,cB=["itemStyle","borderWidth"],gct=["itemStyle","gapWidth"],yct=["upperLabel","show"],xct=["upperLabel","height"],pB={seriesType:"treemap",reset:function(e,t,r,n){var i=r.getWidth(),a=r.getHeight(),o=e.option,s=re(e.getBoxLayoutParams(),{width:r.getWidth(),height:r.getHeight()}),l=o.size||[],u=q(uB(s.width,l[0]),i),f=q(uB(s.height,l[1]),a),c=n&&n.type,p=["treemapZoomToNode","treemapRootToNode"],h=rs(n,p,e),d=c==="treemapRender"||c==="treemapMove"?n.rootRect:null,m=e.getViewRoot(),v=VC(m);if(c!=="treemapMove"){var g=c==="treemapZoomToNode"?Mct(e,h,m,u,f):d?[d.width,d.height]:[u,f],y=o.sort;y&&y!=="asc"&&y!=="desc"&&(y="desc");var x={squareRatio:o.squareRatio,sort:y,leafDepth:o.leafDepth};m.hostTree.clearLayouts();var _={x:0,y:0,width:g[0],height:g[1],area:g[0]*g[1]};m.setLayout(_),hB(m,x,!1,0),_=m.getLayout(),QC(v,function(b,w){var T=(v[w+1]||m).getValue();b.setLayout(V({dataExtent:[T,T],borderWidth:0,upperHeight:0},_))})}var S=e.getData().tree.root;S.setLayout(Act(s,d,h),!0),e.setLayoutInfo(s),dB(S,new dt(-s.x,-s.y,i,a),v,m,0)}};function hB(e,t,r,n){var i,a;if(!e.isRemoved()){var o=e.getLayout();i=o.width,a=o.height;var s=e.getModel(),l=s.get(cB),u=s.get(gct)/2,f=vB(s),c=Math.max(l,f),p=l-u,h=c-u;e.setLayout({borderWidth:l,upperHeight:c,upperLabelHeight:f},!0),i=rm(i-2*p,0),a=rm(a-p-h,0);var d=i*a,m=_ct(e,s,d,t,r,n);if(m.length){var v={x:p,y:h,width:i,height:a},g=B1(i,a),y=1/0,x=[];x.area=0;for(var _=0,S=m.length;_=0;l--){var u=i[n==="asc"?o-l-1:l].getValue();u/r*ts[1]&&(s[1]=u)})),{sum:n,dataExtent:s}}function Tct(e,t,r){for(var n=0,i=1/0,a=0,o=void 0,s=e.length;an&&(n=o));var l=e.area*e.area,u=t*t*r;return l?rm(u*n/l,l/(u*i)):1/0}function fB(e,t,r,n,i){var a=t===r.width?0:1,o=1-a,s=["x","y"],l=["width","height"],u=r[s[a]],f=t?e.area/t:0;(i||f>r[l[o]])&&(f=r[l[o]]);for(var c=0,p=e.length;cG2&&(u=G2),a=s}un&&(n=t);var a=n%2?n+2:n+3;i=[];for(var o=0;o0&&(S[0]=-S[0],S[1]=-S[1]);var w=_[0]<0?-1:1;if(a.__position!=="start"&&a.__position!=="end"){var T=-Math.atan2(_[1],_[0]);c[0].8?"left":p[0]<-.8?"right":"center",m=p[1]>.8?"top":p[1]<-.8?"bottom":"middle";break;case"start":a.x=-p[0]*g+f[0],a.y=-p[1]*y+f[1],d=p[0]>.8?"right":p[0]<-.8?"left":"center",m=p[1]>.8?"bottom":p[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":a.x=g*w+f[0],a.y=f[1]+M,d=_[0]<0?"right":"left",a.originX=-g*w,a.originY=-M;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":a.x=b[0],a.y=b[1]+M,d="center",a.originY=-M;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":a.x=-g*w+c[0],a.y=c[1]+M,d=_[0]>=0?"right":"left",a.originX=g*w,a.originY=-M;break}a.scaleX=a.scaleY=o,a.setStyle({verticalAlign:a.__verticalAlign||m,align:a.__align||d})}},t}(nt),Pp=Rct;var Nct=function(){function e(t){this.group=new nt,this._LineCtor=t||Pp}return e.prototype.updateData=function(t){var r=this;this._progressiveEls=null;var n=this,i=n.group,a=n._lineData;n._lineData=t,a||i.removeAll();var o=DB(t);t.diff(a).add(function(s){r._doAdd(t,s,o)}).update(function(s,l){r._doUpdate(a,t,l,s,o)}).remove(function(s){i.remove(a.getItemGraphicEl(s))}).execute()},e.prototype.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl(function(r,n){r.updateLayout(t,n)},this)},e.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=DB(t),this._lineData=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(t,r){this._progressiveEls=[];function n(s){!s.isGroup&&!kct(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var i=t.start;i0}function DB(e){var t=e.hostModel,r=t.getModel("emphasis");return{lineStyle:t.getModel("lineStyle").getLineStyle(),emphasisLineStyle:r.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:t.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:t.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:r.get("disabled"),blurScope:r.get("blurScope"),focus:r.get("focus"),labelStatesModels:ae(t)}}function EB(e){return isNaN(e[0])||isNaN(e[1])}function vD(e){return e&&!EB(e[0])&&!EB(e[1])}var Rp=Nct;var mD=[],gD=[],yD=[],Np=He,xD=No,IB=Math.abs;function LB(e,t,r){for(var n=e[0],i=e[1],a=e[2],o=1/0,s,l=r*r,u=.1,f=.1;f<=.9;f+=.1){mD[0]=Np(n[0],i[0],a[0],f),mD[1]=Np(n[1],i[1],a[1],f);var c=IB(xD(mD,t)-l);c=0?s=s+u:s=s-u:d>=0?s=s-u:s=s+u}return s}function am(e,t){var r=[],n=ks,i=[[],[],[]],a=[[],[]],o=[];t/=2,e.eachEdge(function(s,l){var u=s.getLayout(),f=s.getVisual("fromSymbol"),c=s.getVisual("toSymbol");u.__original||(u.__original=[wn(u[0]),wn(u[1])],u[2]&&u.__original.push(wn(u[2])));var p=u.__original;if(u[2]!=null){if(hr(i[0],p[0]),hr(i[1],p[2]),hr(i[2],p[1]),f&&f!=="none"){var h=hf(s.node1),d=LB(i,p[0],h*t);n(i[0][0],i[1][0],i[2][0],d,r),i[0][0]=r[3],i[1][0]=r[4],n(i[0][1],i[1][1],i[2][1],d,r),i[0][1]=r[3],i[1][1]=r[4]}if(c&&c!=="none"){var h=hf(s.node2),d=LB(i,p[1],h*t);n(i[0][0],i[1][0],i[2][0],d,r),i[1][0]=r[1],i[2][0]=r[2],n(i[0][1],i[1][1],i[2][1],d,r),i[1][1]=r[1],i[2][1]=r[2]}hr(u[0],i[0]),hr(u[1],i[2]),hr(u[2],i[1])}else{if(hr(a[0],p[0]),hr(a[1],p[1]),Ji(o,a[1],a[0]),vi(o,o),f&&f!=="none"){var h=hf(s.node1);cd(a[0],a[0],o,h*t)}if(c&&c!=="none"){var h=hf(s.node2);cd(a[1],a[1],o,-h*t)}hr(u[0],a[0]),hr(u[1],a[1])}})}function PB(e){return e.type==="view"}var Oct=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r,n){var i=new io,a=new Rp,o=this.group;this._controller=new so(n.getZr()),this._controllerHost={target:o},o.add(i.group),o.add(a.group),this._symbolDraw=i,this._lineDraw=a,this._firstRender=!0},t.prototype.render=function(r,n,i){var a=this,o=r.coordinateSystem;this._model=r;var s=this._symbolDraw,l=this._lineDraw,u=this.group;if(PB(o)){var f={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?u.attr(f):Rt(u,f,r)}am(r.getGraph(),pf(r));var c=r.getData();s.updateData(c);var p=r.getEdgeData();l.updateData(p),this._updateNodeAndLinkScale(),this._updateController(r,n,i),clearTimeout(this._layoutTimeout);var h=r.forceLayout,d=r.get(["force","layoutAnimation"]);h&&this._startForceLayoutIteration(h,d);var m=r.get("layout");c.graph.eachNode(function(x){var _=x.dataIndex,S=x.getGraphicEl(),b=x.getModel();if(S){S.off("drag").off("dragend");var w=b.get("draggable");w&&S.on("drag",function(M){switch(m){case"force":h.warmUp(),!a._layouting&&a._startForceLayoutIteration(h,d),h.setFixed(_),c.setItemLayout(_,[S.x,S.y]);break;case"circular":c.setItemLayout(_,[S.x,S.y]),x.setLayout({fixed:!0},!0),Ip(r,"symbolSize",x,[M.offsetX,M.offsetY]),a.updateLayout(r);break;case"none":default:c.setItemLayout(_,[S.x,S.y]),im(r.getGraph(),r),a.updateLayout(r);break}}).on("dragend",function(){h&&h.setUnfixed(_)}),S.setDraggable(w,!!b.get("cursor"));var T=b.get(["emphasis","focus"]);T==="adjacency"&&(ht(S).focus=x.getAdjacentDataIndices())}}),c.graph.eachEdge(function(x){var _=x.getGraphicEl(),S=x.getModel().get(["emphasis","focus"]);_&&S==="adjacency"&&(ht(_).focus={edge:[x.dataIndex],node:[x.node1.dataIndex,x.node2.dataIndex]})});var v=r.get("layout")==="circular"&&r.get(["circular","rotateLabel"]),g=c.getLayout("cx"),y=c.getLayout("cy");c.graph.eachNode(function(x){sD(x,v,g,y)}),this._firstRender=!1},t.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype._startForceLayoutIteration=function(r,n){var i=this;(function a(){r.step(function(o){i.updateLayout(i._model),(i._layouting=!o)&&(n?i._layoutTimeout=setTimeout(a,16):a())})})()},t.prototype._updateController=function(r,n,i){var a=this,o=this._controller,s=this._controllerHost,l=this.group;if(o.setPointerChecker(function(u,f,c){var p=l.getBoundingRect();return p.applyTransform(l.transform),p.contain(f,c)&&!hl(u,i,r)}),!PB(r.coordinateSystem)){o.disable();return}o.enable(r.get("roam")),s.zoomLimit=r.get("scaleLimit"),s.zoom=r.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",function(u){wp(s,u.dx,u.dy),i.dispatchAction({seriesId:r.id,type:"graphRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){Tp(s,u.scale,u.originX,u.originY),i.dispatchAction({seriesId:r.id,type:"graphRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),a._updateNodeAndLinkScale(),am(r.getGraph(),pf(r)),a._lineDraw.updateLayout(),i.updateLabelLayout()})},t.prototype._updateNodeAndLinkScale=function(){var r=this._model,n=r.getData(),i=pf(r);n.eachItemGraphicEl(function(a,o){a&&a.setSymbolScale(i)})},t.prototype.updateLayout=function(r){am(r.getGraph(),pf(r)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},t.prototype.remove=function(r,n){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},t.type="graph",t}(Vt),RB=Oct;function kp(e){return"_EC_"+e}var zct=function(){function e(t){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=t||!1}return e.prototype.isDirected=function(){return this._directed},e.prototype.addNode=function(t,r){t=t==null?""+r:""+t;var n=this._nodesMap;if(!n[kp(t)]){var i=new df(t,r);return i.hostGraph=this,this.nodes.push(i),n[kp(t)]=i,i}},e.prototype.getNodeByIndex=function(t){var r=this.data.getRawIndex(t);return this.nodes[r]},e.prototype.getNodeById=function(t){return this._nodesMap[kp(t)]},e.prototype.addEdge=function(t,r,n){var i=this._nodesMap,a=this._edgesMap;if(Ct(t)&&(t=this.nodes[t]),Ct(r)&&(r=this.nodes[r]),t instanceof df||(t=i[kp(t)]),r instanceof df||(r=i[kp(r)]),!(!t||!r)){var o=t.id+"-"+r.id,s=new NB(t,r,n);return s.hostGraph=this,this._directed&&(t.outEdges.push(s),r.inEdges.push(s)),t.edges.push(s),t!==r&&r.edges.push(s),this.edges.push(s),a[o]=s,s}},e.prototype.getEdgeByIndex=function(t){var r=this.edgeData.getRawIndex(t);return this.edges[r]},e.prototype.getEdge=function(t,r){t instanceof df&&(t=t.id),r instanceof df&&(r=r.id);var n=this._edgesMap;return this._directed?n[t+"-"+r]:n[t+"-"+r]||n[r+"-"+t]},e.prototype.eachNode=function(t,r){for(var n=this.nodes,i=n.length,a=0;a=0&&t.call(r,n[a],a)},e.prototype.eachEdge=function(t,r){for(var n=this.edges,i=n.length,a=0;a=0&&n[a].node1.dataIndex>=0&&n[a].node2.dataIndex>=0&&t.call(r,n[a],a)},e.prototype.breadthFirstTraverse=function(t,r,n,i){if(r instanceof df||(r=this._nodesMap[kp(r)]),!!r){for(var a=n==="out"?"outEdges":n==="in"?"inEdges":"edges",o=0;o=0&&l.node2.dataIndex>=0});for(var a=0,o=i.length;a=0&&this[e][t].setItemVisual(this.dataIndex,r,n)},getVisual:function(r){return this[e][t].getItemVisual(this.dataIndex,r)},setLayout:function(r,n){this.dataIndex>=0&&this[e][t].setItemLayout(this.dataIndex,r,n)},getLayout:function(){return this[e][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[e][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[e][t].getRawIndex(this.dataIndex)}}}ie(df,kB("hostGraph","data"));ie(NB,kB("hostGraph","edgeData"));var OB=zct;function om(e,t,r,n,i){for(var a=new OB(n),o=0;o "+p)),u++)}var h=r.get("coordinateSystem"),d;if(h==="cartesian2d"||h==="polar")d=Tr(e,r);else{var m=Ko.get(h),v=m?m.dimensions||[]:[];gt(v,"value")<0&&v.concat(["value"]);var g=va(e,{coordDimensions:v,encodeDefine:r.getEncode()}).dimensions;d=new Ne(g,r),d.initData(e)}var y=new Ne(["value"],r);return y.initData(l,s),i&&i(d,y),k1({mainData:d,struct:a,structAttr:"graph",datas:{node:d,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a}var Uct=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.hasSymbolVisual=!0,r}return t.prototype.init=function(r){e.prototype.init.apply(this,arguments);var n=this;function i(){return n._categoriesData}this.legendVisualProvider=new oo(i,i),this.fillDataTextStyle(r.edges||r.links),this._updateCategoriesData()},t.prototype.mergeOption=function(r){e.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(r.edges||r.links),this._updateCategoriesData()},t.prototype.mergeDefaultAndTheme=function(r){e.prototype.mergeDefaultAndTheme.apply(this,arguments),ni(r,"edgeLabel",["show"])},t.prototype.getInitialData=function(r,n){var i=r.edges||r.links||[],a=r.data||r.nodes||[],o=this;if(a&&i){yB(this);var s=om(a,i,this,!0,l);return D(s.edges,function(u){xB(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,f){u.wrapMethod("getItemModel",function(d){var m=o._categoriesModels,v=d.getShallow("category"),g=m[v];return g&&(g.parentModel=d.parentModel,d.parentModel=g),d});var c=Ht.prototype.getModel;function p(d,m){var v=c.call(this,d,m);return v.resolveParentPath=h,v}f.wrapMethod("getItemModel",function(d){return d.resolveParentPath=h,d.getModel=p,d});function h(d){if(d&&(d[0]==="label"||d[1]==="label")){var m=d.slice();return d[0]==="label"?m[0]="edgeLabel":d[1]==="label"&&(m[1]="edgeLabel"),m}return d}}},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.getCategoriesData=function(){return this._categoriesData},t.prototype.formatTooltip=function(r,n,i){if(i==="edge"){var a=this.getData(),o=this.getDataParams(r,i),s=a.graph.getEdgeByIndex(r),l=a.getName(s.node1.dataIndex),u=a.getName(s.node2.dataIndex),f=[];return l!=null&&f.push(l),u!=null&&f.push(u),xe("nameValue",{name:f.join(" > "),value:o.value,noValue:o.value==null})}var c=fx({series:this,dataIndex:r,multipleSeries:n});return c},t.prototype._updateCategoriesData=function(){var r=F(this.option.categories||[],function(i){return i.value!=null?i:V({value:0},i)}),n=new Ne(["value"],this);n.initData(r),this._categoriesData=n,this._categoriesModels=n.mapArray(function(i){return n.getItemModel(i)})},t.prototype.setZoom=function(r){this.option.zoom=r},t.prototype.setCenter=function(r){this.option.center=r},t.prototype.isAnimationEnabled=function(){return e.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},t.type="series.graph",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},t}(Wt),zB=Uct;var Vct={type:"graphRoam",event:"graphRoam",update:"none"};function _D(e){e.registerChartView(RB),e.registerSeriesModel(zB),e.registerProcessor(tD),e.registerVisual(eD),e.registerVisual(rD),e.registerLayout(aD),e.registerLayout(e.PRIORITY.VISUAL.POST_CHART_LAYOUT,lD),e.registerLayout(uD),e.registerCoordinateSystem("graphView",{dimensions:es.dimensions,create:fD}),e.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},ce),e.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},ce),e.registerAction(Vct,function(t,r,n){r.eachComponent({mainType:"series",query:t},function(i){var a=i.coordinateSystem,o=Mp(a,t,void 0,n);i.setCenter&&i.setCenter(o.center),i.setZoom&&i.setZoom(o.zoom)})})}var Bct=function(){function e(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return e}(),Fct=function(e){N(t,e);function t(r){var n=e.call(this,r)||this;return n.type="pointer",n}return t.prototype.getDefaultShape=function(){return new Bct},t.prototype.buildPath=function(r,n){var i=Math.cos,a=Math.sin,o=n.r,s=n.width,l=n.angle,u=n.x-i(l)*s*(s>=o/3?1:2),f=n.y-a(l)*s*(s>=o/3?1:2);l=n.angle-Math.PI/2,r.moveTo(u,f),r.lineTo(n.x+i(l)*s,n.y+a(l)*s),r.lineTo(n.x+i(n.angle)*o,n.y+a(n.angle)*o),r.lineTo(n.x-i(l)*s,n.y-a(l)*s),r.lineTo(u,f)},t}(vt),UB=Fct;function Gct(e,t){var r=e.get("center"),n=t.getWidth(),i=t.getHeight(),a=Math.min(n,i),o=q(r[0],t.getWidth()),s=q(r[1],t.getHeight()),l=q(e.get("radius"),a/2);return{cx:o,cy:s,r:l}}function W1(e,t){var r=e==null?"":e+"";return t&&(H(t)?r=t.replace("{value}",r):j(t)&&(r=t(e))),r}var Hct=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){this.group.removeAll();var a=r.get(["axisLine","lineStyle","color"]),o=Gct(r,i);this._renderMain(r,n,i,a,o),this._data=r.getData()},t.prototype.dispose=function(){},t.prototype._renderMain=function(r,n,i,a,o){var s=this.group,l=r.get("clockwise"),u=-r.get("startAngle")/180*Math.PI,f=-r.get("endAngle")/180*Math.PI,c=r.getModel("axisLine"),p=c.get("roundCap"),h=p?bp:Ye,d=c.get("show"),m=c.getModel("lineStyle"),v=m.get("width"),g=[u,f];uT(g,!l),u=g[0],f=g[1];for(var y=f-u,x=u,_=[],S=0;d&&S=M&&(C===0?0:a[C-1][0])Math.PI/2&&(tt+=Math.PI)):et==="tangential"?tt=-T-Math.PI/2:Ct(et)&&(tt=et*Math.PI/180),tt===0?c.add(new Lt({style:Qt(x,{text:z,x:G,y:Y,verticalAlign:E<-.8?"top":E>.8?"bottom":"middle",align:I<-.4?"left":I>.4?"right":"center"},{inheritColor:U}),silent:!0})):c.add(new Lt({style:Qt(x,{text:z,x:G,y:Y,verticalAlign:"middle",align:"center"},{inheritColor:U}),silent:!0,originX:G,originY:Y,rotation:tt}))}if(y.get("show")&&R!==_){var k=y.get("distance");k=k?k+f:f;for(var lt=0;lt<=S;lt++){I=Math.cos(T),E=Math.sin(T);var Mt=new De({shape:{x1:I*(d-k)+p,y1:E*(d-k)+h,x2:I*(d-w-k)+p,y2:E*(d-w-k)+h},silent:!0,style:P});P.stroke==="auto"&&Mt.setStyle({stroke:a((R+lt/S)/_)}),c.add(Mt),T+=C}T-=C}else T+=M}},t.prototype._renderPointer=function(r,n,i,a,o,s,l,u,f){var c=this.group,p=this._data,h=this._progressEls,d=[],m=r.get(["pointer","show"]),v=r.getModel("progress"),g=v.get("show"),y=r.getData(),x=y.mapDimension("value"),_=+r.get("min"),S=+r.get("max"),b=[_,S],w=[s,l];function T(C,A){var P=y.getItemModel(C),L=P.getModel("pointer"),I=q(L.get("width"),o.r),E=q(L.get("length"),o.r),R=r.get(["pointer","icon"]),k=L.get("offsetCenter"),O=q(k[0],o.r),z=q(k[1],o.r),U=L.get("keepAspect"),G;return R?G=ne(R,O-I/2,z-E,I,E,null,U):G=new UB({shape:{angle:-Math.PI/2,width:I,r:E,x:O,y:z}}),G.rotation=-(A+Math.PI/2),G.x=o.cx,G.y=o.cy,G}function M(C,A){var P=v.get("roundCap"),L=P?bp:Ye,I=v.get("overlap"),E=I?v.get("width"):f/y.count(),R=I?o.r-E:o.r-(C+1)*E,k=I?o.r:o.r-C*E,O=new L({shape:{startAngle:s,endAngle:A,cx:o.cx,cy:o.cy,clockwise:u,r0:R,r:k}});return I&&(O.z2=S-y.get(x,C)%S),O}(g||m)&&(y.diff(p).add(function(C){var A=y.get(x,C);if(m){var P=T(C,s);Kt(P,{rotation:-((isNaN(+A)?w[0]:$t(A,b,w,!0))+Math.PI/2)},r),c.add(P),y.setItemGraphicEl(C,P)}if(g){var L=M(C,s),I=v.get("clip");Kt(L,{shape:{endAngle:$t(A,b,w,I)}},r),c.add(L),Vd(r.seriesIndex,y.dataType,C,L),d[C]=L}}).update(function(C,A){var P=y.get(x,C);if(m){var L=p.getItemGraphicEl(A),I=L?L.rotation:s,E=T(C,I);E.rotation=I,Rt(E,{rotation:-((isNaN(+P)?w[0]:$t(P,b,w,!0))+Math.PI/2)},r),c.add(E),y.setItemGraphicEl(C,E)}if(g){var R=h[A],k=R?R.shape.endAngle:s,O=M(C,k),z=v.get("clip");Rt(O,{shape:{endAngle:$t(P,b,w,z)}},r),c.add(O),Vd(r.seriesIndex,y.dataType,C,O),d[C]=O}}).execute(),y.each(function(C){var A=y.getItemModel(C),P=A.getModel("emphasis"),L=P.get("focus"),I=P.get("blurScope"),E=P.get("disabled");if(m){var R=y.getItemGraphicEl(C),k=y.getItemVisual(C,"style"),O=k.fill;if(R instanceof me){var z=R.style;R.useStyle(V({image:z.image,x:z.x,y:z.y,width:z.width,height:z.height},k))}else R.useStyle(k),R.type!=="pointer"&&R.setColor(O);R.setStyle(A.getModel(["pointer","itemStyle"]).getItemStyle()),R.style.fill==="auto"&&R.setStyle("fill",a($t(y.get(x,C),b,[0,1],!0))),R.z2EmphasisLift=0,we(R,A),Zt(R,L,I,E)}if(g){var U=d[C];U.useStyle(y.getItemVisual(C,"style")),U.setStyle(A.getModel(["progress","itemStyle"]).getItemStyle()),U.z2EmphasisLift=0,we(U,A),Zt(U,L,I,E)}}),this._progressEls=d)},t.prototype._renderAnchor=function(r,n){var i=r.getModel("anchor"),a=i.get("show");if(a){var o=i.get("size"),s=i.get("icon"),l=i.get("offsetCenter"),u=i.get("keepAspect"),f=ne(s,n.cx-o/2+q(l[0],n.r),n.cy-o/2+q(l[1],n.r),o,o,null,u);f.z2=i.get("showAbove")?1:0,f.setStyle(i.getModel("itemStyle").getItemStyle()),this.group.add(f)}},t.prototype._renderTitleAndDetail=function(r,n,i,a,o){var s=this,l=r.getData(),u=l.mapDimension("value"),f=+r.get("min"),c=+r.get("max"),p=new nt,h=[],d=[],m=r.isAnimationEnabled(),v=r.get(["pointer","showAbove"]);l.diff(this._data).add(function(g){h[g]=new Lt({silent:!0}),d[g]=new Lt({silent:!0})}).update(function(g,y){h[g]=s._titleEls[y],d[g]=s._detailEls[y]}).execute(),l.each(function(g){var y=l.getItemModel(g),x=l.get(u,g),_=new nt,S=a($t(x,[f,c],[0,1],!0)),b=y.getModel("title");if(b.get("show")){var w=b.get("offsetCenter"),T=o.cx+q(w[0],o.r),M=o.cy+q(w[1],o.r),C=h[g];C.attr({z2:v?0:2,style:Qt(b,{x:T,y:M,text:l.getName(g),align:"center",verticalAlign:"middle"},{inheritColor:S})}),_.add(C)}var A=y.getModel("detail");if(A.get("show")){var P=A.get("offsetCenter"),L=o.cx+q(P[0],o.r),I=o.cy+q(P[1],o.r),E=q(A.get("width"),o.r),R=q(A.get("height"),o.r),k=r.get(["progress","show"])?l.getItemVisual(g,"style").fill:S,C=d[g],O=A.get("formatter");C.attr({z2:v?0:2,style:Qt(A,{x:L,y:I,text:W1(x,O),width:isNaN(E)?null:E,height:isNaN(R)?null:R,align:"center",verticalAlign:"middle"},{inheritColor:k})}),P0(C,{normal:A},x,function(U){return W1(U,O)}),m&&R0(C,g,l,r,{getFormattedLabel:function(U,G,Y,et,tt,lt){return W1(lt?lt.interpolatedValue:x,O)}}),_.add(C)}p.add(_)}),this.group.add(p),this._titleEls=h,this._detailEls=d},t.type="gauge",t}(Vt),VB=Hct;var Wct=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.visualStyleAccessPath="itemStyle",r}return t.prototype.getInitialData=function(r,n){return fi(this,["value"])},t.type="series.gauge",t.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},t}(Wt),BB=Wct;function bD(e){e.registerChartView(VB),e.registerSeriesModel(BB)}var Yct=["itemStyle","opacity"],Xct=function(e){N(t,e);function t(r,n){var i=e.call(this)||this,a=i,o=new Ie,s=new Lt;return a.setTextContent(s),i.setTextGuideLine(o),i.updateData(r,n,!0),i}return t.prototype.updateData=function(r,n,i){var a=this,o=r.hostModel,s=r.getItemModel(n),l=r.getItemLayout(n),u=s.getModel("emphasis"),f=s.get(Yct);f=f??1,i||er(a),a.useStyle(r.getItemVisual(n,"style")),a.style.lineJoin="round",i?(a.setShape({points:l.points}),a.style.opacity=0,Kt(a,{style:{opacity:f}},o,n)):Rt(a,{style:{opacity:f},shape:{points:l.points}},o,n),we(a,s),this._updateLabel(r,n),Zt(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(r,n){var i=this,a=this.getTextGuideLine(),o=i.getTextContent(),s=r.hostModel,l=r.getItemModel(n),u=r.getItemLayout(n),f=u.label,c=r.getItemVisual(n,"style"),p=c.fill;he(o,ae(l),{labelFetcher:r.hostModel,labelDataIndex:n,defaultOpacity:c.opacity,defaultText:r.getName(n)},{normal:{align:f.textAlign,verticalAlign:f.verticalAlign}}),i.setTextConfig({local:!0,inside:!!f.inside,insideStroke:p,outsideFill:p});var h=f.linePoints;a.setShape({points:h}),i.textGuideLineConfig={anchor:h?new kt(h[0][0],h[0][1]):null},Rt(o,{style:{x:f.x,y:f.y}},s,n),o.attr({rotation:f.rotation,originX:f.x,originY:f.y,z2:10}),gp(i,yp(l),{stroke:p})},t}(Re),qct=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.ignoreLabelLineUpdate=!0,r}return t.prototype.render=function(r,n,i){var a=r.getData(),o=this._data,s=this.group;a.diff(o).add(function(l){var u=new Xct(a,l);a.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var f=o.getItemGraphicEl(u);f.updateData(a,l),s.add(f),a.setItemGraphicEl(l,f)}).remove(function(l){var u=o.getItemGraphicEl(l);Go(u,r,l)}).execute(),this._data=a},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.prototype.dispose=function(){},t.type="funnel",t}(Vt),FB=qct;var Zct=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new oo(Z(this.getData,this),Z(this.getRawData,this)),this._defaultLabelLine(r)},t.prototype.getInitialData=function(r,n){return fi(this,{coordDimensions:["value"],encodeDefaulter:pt(op,this)})},t.prototype._defaultLabelLine=function(r){ni(r,"labelLine",["show"]);var n=r.labelLine,i=r.emphasis.labelLine;n.show=n.show&&r.label.show,i.show=i.show&&r.emphasis.label.show},t.prototype.getDataParams=function(r){var n=this.getData(),i=e.prototype.getDataParams.call(this,r),a=n.mapDimension("value"),o=n.getSum(a);return i.percent=o?+(n.get(a,r)/o*100).toFixed(2):0,i.$vars.push("percent"),i},t.type="series.funnel",t.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},t}(Wt),GB=Zct;function Kct(e,t){return re(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function $ct(e,t){for(var r=e.mapDimension("value"),n=e.mapArray(r,function(l){return l}),i=[],a=t==="ascending",o=0,s=e.count();oupt)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]);i.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(e){if(!(this._mouseDownPoint||!AD(this,"mousemove"))){var t=this._model,r=t.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]),n=r.behavior;n==="jump"&&this._throttledDispatchExpand.debounceNextCall(t.get("axisExpandDebounce")),this._throttledDispatchExpand(n==="none"?null:{axisExpandWindow:r.axisExpandWindow,animation:n==="jump"?null:{duration:0}})}}};function AD(e,t){var r=e._model;return r.get("axisExpandable")&&r.get("axisExpandTriggerOn")===t}var KB=fpt;var ppt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(){e.prototype.init.apply(this,arguments),this.mergeOption({})},t.prototype.mergeOption=function(r){var n=this.option;r&&_t(n,r,!0),this._initDimensions()},t.prototype.contains=function(r,n){var i=r.get("parallelIndex");return i!=null&&n.getComponent("parallel",i)===this},t.prototype.setAxisExpand=function(r){D(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(n){r.hasOwnProperty(n)&&(this.option[n]=r[n])},this)},t.prototype._initDimensions=function(){var r=this.dimensions=[],n=this.parallelAxisIndex=[],i=Ut(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(a){return(a.get("parallelIndex")||0)===this.componentIndex},this);D(i,function(a){r.push("dim"+a.get("dim")),n.push(a.componentIndex)})},t.type="parallel",t.dependencies=["parallelAxis"],t.layoutMode="box",t.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},t}(Pt),$B=ppt;var hpt=function(e){N(t,e);function t(r,n,i,a,o){var s=e.call(this,r,n,i)||this;return s.type=a||"value",s.axisIndex=o,s}return t.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},t}(Mr),jB=hpt;function Hn(e,t,r,n,i,a){e=e||0;var o=r[1]-r[0];if(i!=null&&(i=Op(i,[0,o])),a!=null&&(a=Math.max(a,i??0)),n==="all"){var s=Math.abs(t[1]-t[0]);s=Op(s,[0,o]),i=a=Op(s,[i,a]),n=0}t[0]=Op(t[0],r),t[1]=Op(t[1],r);var l=CD(t,n);t[n]+=e;var u=i||0,f=r.slice();l.sign<0?f[0]+=u:f[1]-=u,t[n]=Op(t[n],f);var c;return c=CD(t,n),i!=null&&(c.sign!==l.sign||c.spana&&(t[1-n]=t[n]+c.sign*a),t}function CD(e,t){var r=e[t]-e[1-t];return{span:Math.abs(r),sign:r>0?-1:r<0?1:t?-1:1}}function Op(e,t){return Math.min(t[1]!=null?t[1]:1/0,Math.max(t[0]!=null?t[0]:-1/0,e))}var DD=D,t7=Math.min,e7=Math.max,QB=Math.floor,dpt=Math.ceil,JB=pe,vpt=Math.PI,mpt=function(){function e(t,r,n){this.type="parallel",this._axesMap=$(),this._axesLayout={},this.dimensions=t.dimensions,this._model=t,this._init(t,r,n)}return e.prototype._init=function(t,r,n){var i=t.dimensions,a=t.parallelAxisIndex;DD(i,function(o,s){var l=a[s],u=r.getComponent("parallelAxis",l),f=this._axesMap.set(o,new jB(o,ol(u),[0,0],u.get("type"),l)),c=f.type==="category";f.onBand=c&&u.get("boundaryGap"),f.inverse=u.get("inverse"),u.axis=f,f.model=u,f.coordinateSystem=u.coordinateSystem=this},this)},e.prototype.update=function(t,r){this._updateAxesFromSeries(this._model,t)},e.prototype.containPoint=function(t){var r=this._makeLayoutInfo(),n=r.axisBase,i=r.layoutBase,a=r.pixelDimIndex,o=t[1-a],s=t[a];return o>=n&&o<=n+r.axisLength&&s>=i&&s<=i+r.layoutLength},e.prototype.getModel=function(){return this._model},e.prototype._updateAxesFromSeries=function(t,r){r.eachSeries(function(n){if(t.contains(n,r)){var i=n.getData();DD(this.dimensions,function(a){var o=this._axesMap.get(a);o.scale.unionExtentFromData(i,i.mapDimension(a)),Ja(o.scale,o.model)},this)}},this)},e.prototype.resize=function(t,r){this._rect=re(t.getBoxLayoutParams(),{width:r.getWidth(),height:r.getHeight()}),this._layoutAxes()},e.prototype.getRect=function(){return this._rect},e.prototype._makeLayoutInfo=function(){var t=this._model,r=this._rect,n=["x","y"],i=["width","height"],a=t.get("layout"),o=a==="horizontal"?0:1,s=r[i[o]],l=[0,s],u=this.dimensions.length,f=Y1(t.get("axisExpandWidth"),l),c=Y1(t.get("axisExpandCount")||0,[0,u]),p=t.get("axisExpandable")&&u>3&&u>c&&c>1&&f>0&&s>0,h=t.get("axisExpandWindow"),d;if(h)d=Y1(h[1]-h[0],l),h[1]=h[0]+d;else{d=Y1(f*(c-1),l);var m=t.get("axisExpandCenter")||QB(u/2);h=[f*m-d/2],h[1]=h[0]+d}var v=(s-d)/(u-c);v<3&&(v=0);var g=[QB(JB(h[0]/f,1))+1,dpt(JB(h[1]/f,1))-1],y=v/f*h[0];return{layout:a,pixelDimIndex:o,layoutBase:r[n[o]],layoutLength:s,axisBase:r[n[1-o]],axisLength:r[i[1-o]],axisExpandable:p,axisExpandWidth:f,axisCollapseWidth:v,axisExpandWindow:h,axisCount:u,winInnerIndices:g,axisExpandWindow0Pos:y}},e.prototype._layoutAxes=function(){var t=this._rect,r=this._axesMap,n=this.dimensions,i=this._makeLayoutInfo(),a=i.layout;r.each(function(o){var s=[0,i.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),DD(n,function(o,s){var l=(i.axisExpandable?ypt:gpt)(s,i),u={horizontal:{x:l.position,y:i.axisLength},vertical:{x:0,y:l.position}},f={horizontal:vpt/2,vertical:0},c=[u[a].x+t.x,u[a].y+t.y],p=f[a],h=tr();Cn(h,h,p),Nr(h,h,c),this._axesLayout[o]={position:c,rotation:p,transform:h,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},e.prototype.getAxis=function(t){return this._axesMap.get(t)},e.prototype.dataToPoint=function(t,r){return this.axisCoordToPoint(this._axesMap.get(r).dataToCoord(t),r)},e.prototype.eachActiveState=function(t,r,n,i){n==null&&(n=0),i==null&&(i=t.count());var a=this._axesMap,o=this.dimensions,s=[],l=[];D(o,function(v){s.push(t.mapDimension(v)),l.push(a.get(v).model)});for(var u=this.hasAxisBrushed(),f=n;fa*(1-c[0])?(u="jump",l=s-a*(1-c[2])):(l=s-a*c[1])>=0&&(l=s-a*(1-c[1]))<=0&&(l=0),l*=r.axisExpandWidth/f,l?Hn(l,i,o,"all"):u="none";else{var h=i[1]-i[0],d=o[1]*s/h;i=[e7(0,d-h/2)],i[1]=t7(o[1],i[0]+h),i[0]=i[1]-h}return{axisExpandWindow:i,behavior:u}},e}();function Y1(e,t){return t7(e7(e,t[0]),t[1])}function gpt(e,t){var r=t.layoutLength/(t.axisCount-1);return{position:r*e,axisNameAvailableWidth:r,axisLabelShow:!0}}function ypt(e,t){var r=t.layoutLength,n=t.axisExpandWidth,i=t.axisCount,a=t.axisCollapseWidth,o=t.winInnerIndices,s,l=a,u=!1,f;return e=0;i--)sr(n[i])},t.prototype.getActiveState=function(r){var n=this.activeIntervals;if(!n.length)return"normal";if(r==null||isNaN(+r))return"inactive";if(n.length===1){var i=n[0];if(i[0]<=r&&r<=i[1])return"active"}else for(var a=0,o=n.length;awpt}function m7(e){var t=e.length-1;return t<0&&(t=0),[e[0],e[t]]}function g7(e,t,r,n){var i=new nt;return i.add(new At({name:"main",style:UD(r),silent:!0,draggable:!0,cursor:"move",drift:pt(s7,e,t,i,["n","s","w","e"]),ondragend:pt(mf,t,{isEnd:!0})})),D(n,function(a){i.add(new At({name:a.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:pt(s7,e,t,i,a),ondragend:pt(mf,t,{isEnd:!0})}))}),i}function y7(e,t,r,n){var i=n.brushStyle.lineWidth||0,a=zp(i,Tpt),o=r[0][0],s=r[1][0],l=o-i/2,u=s-i/2,f=r[0][1],c=r[1][1],p=f-a+i/2,h=c-a+i/2,d=f-o,m=c-s,v=d+i,g=m+i;ns(e,t,"main",o,s,d,m),n.transformable&&(ns(e,t,"w",l,u,a,g),ns(e,t,"e",p,u,a,g),ns(e,t,"n",l,u,v,a),ns(e,t,"s",l,h,v,a),ns(e,t,"nw",l,u,a,a),ns(e,t,"ne",p,u,a,a),ns(e,t,"sw",l,h,a,a),ns(e,t,"se",p,h,a,a))}function LD(e,t){var r=t.__brushOption,n=r.transformable,i=t.childAt(0);i.useStyle(UD(r)),i.attr({silent:!n,cursor:n?"move":"default"}),D([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(a){var o=t.childOfName(a.join("")),s=a.length===1?PD(e,a[0]):Lpt(e,a);o&&o.attr({silent:!n,invisible:!n,cursor:n?Apt[s]+"-resize":null})})}function ns(e,t,r,n,i,a,o){var s=t.childOfName(r);s&&s.setShape(Rpt(VD(e,t,[[n,i],[n+a,i+o]])))}function UD(e){return J({strokeNoScale:!0},e.brushStyle)}function x7(e,t,r,n){var i=[sm(e,r),sm(t,n)],a=[zp(e,r),zp(t,n)];return[[i[0],a[0]],[i[1],a[1]]]}function Ipt(e){return oa(e.group)}function PD(e,t){var r={w:"left",e:"right",n:"top",s:"bottom"},n={left:"w",right:"e",top:"n",bottom:"s"},i=Fu(r[t],Ipt(e));return n[i]}function Lpt(e,t){var r=[PD(e,t[0]),PD(e,t[1])];return(r[0]==="e"||r[0]==="w")&&r.reverse(),r.join("")}function s7(e,t,r,n,i,a){var o=r.__brushOption,s=e.toRectRange(o.range),l=_7(t,i,a);D(n,function(u){var f=Mpt[u];s[f[0]][f[1]]+=l[f[0]]}),o.range=e.fromRectRange(x7(s[0][0],s[1][0],s[0][1],s[1][1])),kD(t,r),mf(t,{isEnd:!1})}function Ppt(e,t,r,n){var i=t.__brushOption.range,a=_7(e,r,n);D(i,function(o){o[0]+=a[0],o[1]+=a[1]}),kD(e,t),mf(e,{isEnd:!1})}function _7(e,t,r){var n=e.group,i=n.transformCoordToLocal(t,r),a=n.transformCoordToLocal(0,0);return[i[0]-a[0],i[1]-a[1]]}function VD(e,t,r){var n=v7(e,t);return n&&n!==vf?n.clipPath(r,e._transform):at(r)}function Rpt(e){var t=sm(e[0][0],e[1][0]),r=sm(e[0][1],e[1][1]),n=zp(e[0][0],e[1][0]),i=zp(e[0][1],e[1][1]);return{x:t,y:r,width:n-t,height:i-r}}function Npt(e,t,r){if(!(!e._brushType||Opt(e,t.offsetX,t.offsetY))){var n=e._zr,i=e._covers,a=zD(e,t,r);if(!e._dragging)for(var o=0;on.getWidth()||r<0||r>n.getHeight()}var X1={lineX:f7(0),lineY:f7(1),rect:{createCover:function(e,t){function r(n){return n}return g7({toRectRange:r,fromRectRange:r},e,t,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(e){var t=m7(e);return x7(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(e,t,r,n){y7(e,t,r,n)},updateCommon:LD,contain:ND},polygon:{createCover:function(e,t){var r=new nt;return r.add(new Ie({name:"main",style:UD(t),silent:!0})),r},getCreatingRange:function(e){return e},endCreating:function(e,t){t.remove(t.childAt(0)),t.add(new Re({name:"main",draggable:!0,drift:pt(Ppt,e,t),ondragend:pt(mf,e,{isEnd:!0})}))},updateCoverShape:function(e,t,r,n){t.childAt(0).setShape({points:VD(e,t,r)})},updateCommon:LD,contain:ND}};function f7(e){return{createCover:function(t,r){return g7({toRectRange:function(n){var i=[n,[0,100]];return e&&i.reverse(),i},fromRectRange:function(n){return n[e]}},t,r,[[["w"],["e"]],[["n"],["s"]]][e])},getCreatingRange:function(t){var r=m7(t),n=sm(r[0][e],r[1][e]),i=zp(r[0][e],r[1][e]);return[n,i]},updateCoverShape:function(t,r,n,i){var a,o=v7(t,r);if(o!==vf&&o.getLinearBrushOtherExtent)a=o.getLinearBrushOtherExtent(e);else{var s=t._zr;a=[0,[s.getWidth(),s.getHeight()][1-e]]}var l=[n,a];e&&l.reverse(),y7(t,r,l,i)},updateCommon:LD,contain:ND}}var Up=Dpt;function q1(e){return e=BD(e),function(t){return PT(t,e)}}function Z1(e,t){return e=BD(e),function(r){var n=t??r,i=n?e.width:e.height,a=n?e.x:e.y;return[a,a+(i||0)]}}function K1(e,t,r){var n=BD(e);return function(i,a){return n.contain(a[0],a[1])&&!hl(i,t,r)}}function BD(e){return dt.create(e)}var zpt=["axisLine","axisTickLabel","axisName"],Upt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r,n){e.prototype.init.apply(this,arguments),(this._brushController=new Up(n.getZr())).on("brush",Z(this._onBrush,this))},t.prototype.render=function(r,n,i,a){if(!Vpt(r,n,a)){this.axisModel=r,this.api=i,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new nt,this.group.add(this._axisGroup),!!r.get("show")){var s=Fpt(r,n),l=s.coordinateSystem,u=r.getAreaSelectStyle(),f=u.width,c=r.axis.dim,p=l.getAxisLayout(c),h=V({strokeContainThreshold:f},p),d=new Br(r,h);D(zpt,d.add,d),this._axisGroup.add(d.getGroup()),this._refreshBrushController(h,u,r,s,f,i),Wo(o,this._axisGroup,r)}}},t.prototype._refreshBrushController=function(r,n,i,a,o,s){var l=i.axis.getExtent(),u=l[1]-l[0],f=Math.min(30,Math.abs(u)*.1),c=dt.create({x:l[0],y:-o/2,width:u,height:o});c.x-=f,c.width+=2*f,this._brushController.mount({enableGlobalPan:!0,rotation:r.rotation,x:r.position[0],y:r.position[1]}).setPanels([{panelId:"pl",clipPath:q1(c),isTargetByCursor:K1(c,s,a),getLinearBrushOtherExtent:Z1(c,0)}]).enableBrush({brushType:"lineX",brushStyle:n,removeOnClick:!0}).updateCovers(Bpt(i))},t.prototype._onBrush=function(r){var n=r.areas,i=this.axisModel,a=i.axis,o=F(n,function(s){return[a.coordToData(s.range[0],!0),a.coordToData(s.range[1],!0)]});(!i.option.realtime===r.isEnd||r.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:i.id,intervals:o})},t.prototype.dispose=function(){this._brushController.dispose()},t.type="parallelAxis",t}(Xt);function Vpt(e,t,r){return r&&r.type==="axisAreaSelect"&&t.findComponents({mainType:"parallelAxis",query:r})[0]===e}function Bpt(e){var t=e.axis;return F(e.activeIntervals,function(r){return{brushType:"lineX",panelId:"pl",range:[t.dataToCoord(r[0],!0),t.dataToCoord(r[1],!0)]}})}function Fpt(e,t){return t.getComponent("parallel",e.get("parallelIndex"))}var w7=Upt;var Gpt={type:"axisAreaSelect",event:"axisAreaSelected"};function T7(e){e.registerAction(Gpt,function(t,r){r.eachComponent({mainType:"parallelAxis",query:t},function(n){n.axis.model.setActiveIntervals(t.intervals)})}),e.registerAction("parallelAxisExpand",function(t,r){r.eachComponent({mainType:"parallel",query:t},function(n){n.setAxisExpand(t)})})}var Hpt={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function lm(e){e.registerComponentView(KB),e.registerComponentModel($B),e.registerCoordinateSystem("parallel",n7),e.registerPreprocessor(MD),e.registerComponentModel(ED),e.registerComponentView(w7),Sa(e,"parallel",ED,Hpt),T7(e)}function FD(e){Nt(lm),e.registerChartView(XB),e.registerSeriesModel(qB),e.registerVisual(e.PRIORITY.VISUAL.BRUSH,ZB)}var Wpt=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return e}(),Ypt=function(e){N(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new Wpt},t.prototype.buildPath=function(r,n){var i=n.extent;r.moveTo(n.x1,n.y1),r.bezierCurveTo(n.cpx1,n.cpy1,n.cpx2,n.cpy2,n.x2,n.y2),n.orient==="vertical"?(r.lineTo(n.x2+i,n.y2),r.bezierCurveTo(n.cpx2+i,n.cpy2,n.cpx1+i,n.cpy1,n.x1+i,n.y1)):(r.lineTo(n.x2,n.y2+i),r.bezierCurveTo(n.cpx2,n.cpy2+i,n.cpx1,n.cpy1+i,n.x1,n.y1+i)),r.closePath()},t.prototype.highlight=function(){Yr(this)},t.prototype.downplay=function(){Xr(this)},t}(vt),Xpt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._focusAdjacencyDisabled=!1,r}return t.prototype.render=function(r,n,i){var a=this,o=r.getGraph(),s=this.group,l=r.layoutInfo,u=l.width,f=l.height,c=r.getData(),p=r.getData("edge"),h=r.get("orient");this._model=r,s.removeAll(),s.x=l.x,s.y=l.y,o.eachEdge(function(d){var m=new Ypt,v=ht(m);v.dataIndex=d.dataIndex,v.seriesIndex=r.seriesIndex,v.dataType="edge";var g=d.getModel(),y=g.getModel("lineStyle"),x=y.get("curveness"),_=d.node1.getLayout(),S=d.node1.getModel(),b=S.get("localX"),w=S.get("localY"),T=d.node2.getLayout(),M=d.node2.getModel(),C=M.get("localX"),A=M.get("localY"),P=d.getLayout(),L,I,E,R,k,O,z,U;m.shape.extent=Math.max(1,P.dy),m.shape.orient=h,h==="vertical"?(L=(b!=null?b*u:_.x)+P.sy,I=(w!=null?w*f:_.y)+_.dy,E=(C!=null?C*u:T.x)+P.ty,R=A!=null?A*f:T.y,k=L,O=I*(1-x)+R*x,z=E,U=I*x+R*(1-x)):(L=(b!=null?b*u:_.x)+_.dx,I=(w!=null?w*f:_.y)+P.sy,E=C!=null?C*u:T.x,R=(A!=null?A*f:T.y)+P.ty,k=L*(1-x)+E*x,O=I,z=L*x+E*(1-x),U=R),m.setShape({x1:L,y1:I,x2:E,y2:R,cpx1:k,cpy1:O,cpx2:z,cpy2:U}),m.useStyle(y.getItemStyle()),M7(m.style,h,d);var G=""+g.get("value"),Y=ae(g,"edgeLabel");he(m,Y,{labelFetcher:{getFormattedLabel:function(lt,Mt,ut,ct,K,ot){return r.getFormattedLabel(lt,Mt,"edge",ct,cr(K,Y.normal&&Y.normal.get("formatter"),G),ot)}},labelDataIndex:d.dataIndex,defaultText:G}),m.setTextConfig({position:"inside"});var et=g.getModel("emphasis");we(m,g,"lineStyle",function(lt){var Mt=lt.getItemStyle();return M7(Mt,h,d),Mt}),s.add(m),p.setItemGraphicEl(d.dataIndex,m);var tt=et.get("focus");Zt(m,tt==="adjacency"?d.getAdjacentDataIndices():tt==="trajectory"?d.getTrajectoryDataIndices():tt,et.get("blurScope"),et.get("disabled"))}),o.eachNode(function(d){var m=d.getLayout(),v=d.getModel(),g=v.get("localX"),y=v.get("localY"),x=v.getModel("emphasis"),_=new At({shape:{x:g!=null?g*u:m.x,y:y!=null?y*f:m.y,width:m.dx,height:m.dy},style:v.getModel("itemStyle").getItemStyle(),z2:10});he(_,ae(v),{labelFetcher:{getFormattedLabel:function(b,w){return r.getFormattedLabel(b,w,"node")}},labelDataIndex:d.dataIndex,defaultText:d.id}),_.disableLabelAnimation=!0,_.setStyle("fill",d.getVisual("color")),_.setStyle("decal",d.getVisual("style").decal),we(_,v),s.add(_),c.setItemGraphicEl(d.dataIndex,_),ht(_).dataType="node";var S=x.get("focus");Zt(_,S==="adjacency"?d.getAdjacentDataIndices():S==="trajectory"?d.getTrajectoryDataIndices():S,x.get("blurScope"),x.get("disabled"))}),c.eachItemGraphicEl(function(d,m){var v=c.getItemModel(m);v.get("draggable")&&(d.drift=function(g,y){a._focusAdjacencyDisabled=!0,this.shape.x+=g,this.shape.y+=y,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:r.id,dataIndex:c.getRawIndex(m),localX:this.shape.x/u,localY:this.shape.y/f})},d.ondragend=function(){a._focusAdjacencyDisabled=!1},d.draggable=!0,d.cursor="move")}),!this._data&&r.isAnimationEnabled()&&s.setClipPath(qpt(s.getBoundingRect(),r,function(){s.removeClipPath()})),this._data=r.getData()},t.prototype.dispose=function(){},t.type="sankey",t}(Vt);function M7(e,t,r){switch(e.fill){case"source":e.fill=r.node1.getVisual("color"),e.decal=r.node1.getVisual("style").decal;break;case"target":e.fill=r.node2.getVisual("color"),e.decal=r.node2.getVisual("style").decal;break;case"gradient":var n=r.node1.getVisual("color"),i=r.node2.getVisual("color");H(n)&&H(i)&&(e.fill=new $a(0,0,+(t==="horizontal"),+(t==="vertical"),[{color:n,offset:0},{color:i,offset:1}]))}}function qpt(e,t,r){var n=new At({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return Kt(n,{shape:{width:e.width+20}},t,r),n}var A7=Xpt;var Zpt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.getInitialData=function(r,n){var i=r.edges||r.links,a=r.data||r.nodes,o=r.levels;this.levelModels=[];for(var s=this.levelModels,l=0;l=0&&(s[o[l].depth]=new Ht(o[l],this,n));if(a&&i){var u=om(a,i,this,!0,f);return u.data}function f(c,p){c.wrapMethod("getItemModel",function(h,d){var m=h.parentModel,v=m.getData().getItemLayout(d);if(v){var g=v.depth,y=m.levelModels[g];y&&(h.parentModel=y)}return h}),p.wrapMethod("getItemModel",function(h,d){var m=h.parentModel,v=m.getGraph().getEdgeByIndex(d),g=v.node1.getLayout();if(g){var y=g.depth,x=m.levelModels[y];x&&(h.parentModel=x)}return h})}},t.prototype.setNodePosition=function(r,n){var i=this.option.data||this.option.nodes,a=i[r];a.localX=n[0],a.localY=n[1]},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.formatTooltip=function(r,n,i){function a(h){return isNaN(h)||h==null}if(i==="edge"){var o=this.getDataParams(r,i),s=o.data,l=o.value,u=s.source+" -- "+s.target;return xe("nameValue",{name:u,value:l,noValue:a(l)})}else{var f=this.getGraph().getNodeByIndex(r),c=f.getLayout().value,p=this.getDataParams(r,i).data.name;return xe("nameValue",{name:p!=null?p+"":null,value:c,noValue:a(c)})}},t.prototype.optionUpdated=function(){},t.prototype.getDataParams=function(r,n){var i=e.prototype.getDataParams.call(this,r,n);if(i.value==null&&n==="node"){var a=this.getGraph().getNodeByIndex(r),o=a.getLayout().value;i.value=o}return i},t.type="series.sankey",t.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},t}(Wt),C7=Zpt;function HD(e,t){e.eachSeriesByType("sankey",function(r){var n=r.get("nodeWidth"),i=r.get("nodeGap"),a=Kpt(r,t);r.layoutInfo=a;var o=a.width,s=a.height,l=r.getGraph(),u=l.nodes,f=l.edges;jpt(u);var c=Ut(u,function(m){return m.getLayout().value===0}),p=c.length!==0?0:r.get("layoutIterations"),h=r.get("orient"),d=r.get("nodeAlign");$pt(u,f,n,i,o,s,p,h,d)})}function Kpt(e,t){return re(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function $pt(e,t,r,n,i,a,o,s,l){Qpt(e,t,r,i,a,s,l),rht(e,t,a,i,n,o,s),cht(e,s)}function jpt(e){D(e,function(t){var r=ml(t.outEdges,$1),n=ml(t.inEdges,$1),i=t.getValue()||0,a=Math.max(r,n,i);t.setLayout({value:a},!0)})}function Qpt(e,t,r,n,i,a,o){for(var s=[],l=[],u=[],f=[],c=0,p=0;p=0;g&&v.depth>h&&(h=v.depth),m.setLayout({depth:g?v.depth:c},!0),a==="vertical"?m.setLayout({dy:r},!0):m.setLayout({dx:r},!0);for(var y=0;yc-1?h:c-1;o&&o!=="left"&&Jpt(e,o,a,w);var T=a==="vertical"?(i-r)/w:(n-r)/w;eht(e,T,a)}function D7(e){var t=e.hostGraph.data.getRawDataItem(e.dataIndex);return t.depth!=null&&t.depth>=0}function Jpt(e,t,r,n){if(t==="right"){for(var i=[],a=e,o=0;a.length;){for(var s=0;s0;a--)l*=.99,aht(s,l,o),GD(s,i,r,n,o),fht(s,l,o),GD(s,i,r,n,o)}function nht(e,t){var r=[],n=t==="vertical"?"y":"x",i=kd(e,function(a){return a.getLayout()[n]});return i.keys.sort(function(a,o){return a-o}),D(i.keys,function(a){r.push(i.buckets.get(a))}),r}function iht(e,t,r,n,i,a){var o=1/0;D(e,function(s){var l=s.length,u=0;D(s,function(c){u+=c.getLayout().value});var f=a==="vertical"?(n-(l-1)*i)/u:(r-(l-1)*i)/u;f0&&(s=l.getLayout()[a]+u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),f=l.getLayout()[a]+l.getLayout()[p]+t;var d=i==="vertical"?n:r;if(u=f-t-d,u>0){s=l.getLayout()[a]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),f=s;for(var h=c-2;h>=0;--h)l=o[h],u=l.getLayout()[a]+l.getLayout()[p]+t-f,u>0&&(s=l.getLayout()[a]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),f=l.getLayout()[a]}})}function aht(e,t,r){D(e.slice().reverse(),function(n){D(n,function(i){if(i.outEdges.length){var a=ml(i.outEdges,oht,r)/ml(i.outEdges,$1);if(isNaN(a)){var o=i.outEdges.length;a=o?ml(i.outEdges,sht,r)/o:0}if(r==="vertical"){var s=i.getLayout().x+(a-gl(i,r))*t;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(a-gl(i,r))*t;i.setLayout({y:l},!0)}}})})}function oht(e,t){return gl(e.node2,t)*e.getValue()}function sht(e,t){return gl(e.node2,t)}function lht(e,t){return gl(e.node1,t)*e.getValue()}function uht(e,t){return gl(e.node1,t)}function gl(e,t){return t==="vertical"?e.getLayout().x+e.getLayout().dx/2:e.getLayout().y+e.getLayout().dy/2}function $1(e){return e.getValue()}function ml(e,t,r){for(var n=0,i=e.length,a=-1;++ao&&(o=l)}),D(n,function(s){var l=new Be({type:"color",mappingMethod:"linear",dataExtent:[a,o],visual:t.get("color")}),u=l.mapValueToVisual(s.getLayout().value),f=s.getModel().get(["itemStyle","color"]);f!=null?(s.setVisual("color",f),s.setVisual("style",{fill:f})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}i.length&&D(i,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function YD(e){e.registerChartView(A7),e.registerSeriesModel(C7),e.registerLayout(HD),e.registerVisual(WD),e.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(t,r){r.eachComponent({mainType:"series",subType:"sankey",query:t},function(n){n.setNodePosition(t.dataIndex,[t.localX,t.localY])})})}var j1=function(){function e(){}return e.prototype.getInitialData=function(t,r){var n,i=r.getComponent("xAxis",this.get("xAxisIndex")),a=r.getComponent("yAxis",this.get("yAxisIndex")),o=i.get("type"),s=a.get("type"),l;o==="category"?(t.layout="horizontal",n=i.getOrdinalMeta(),l=!0):s==="category"?(t.layout="vertical",n=a.getOrdinalMeta(),l=!0):t.layout=t.layout||"horizontal";var u=["x","y"],f=t.layout==="horizontal"?0:1,c=this._baseAxisDim=u[f],p=u[1-f],h=[i,a],d=h[f].get("type"),m=h[1-f].get("type"),v=t.data;if(v&&l){var g=[];D(v,function(_,S){var b;B(_)?(b=_.slice(),_.unshift(S)):B(_.value)?(b=V({},_),b.value=b.value.slice(),_.value.unshift(S)):b=_,g.push(b)}),t.data=g}var y=this.defaultValueDimensions,x=[{name:c,type:Qu(d),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:p,type:Qu(m),dimsDef:y.slice()}];return fi(this,{coordDimensions:x,dimensionsCount:y.length+1,encodeDefaulter:pt(X0,x,this)})},e.prototype.getBaseAxis=function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis},e}();var E7=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],r.visualDrawType="stroke",r}return t.type="series.boxplot",t.dependencies=["xAxis","yAxis","grid"],t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},t}(Wt);ie(E7,j1,!0);var I7=E7;var pht=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a=r.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=r.get("layout")==="horizontal"?1:0;a.diff(s).add(function(u){if(a.hasValue(u)){var f=a.getItemLayout(u),c=L7(f,a,u,l,!0);a.setItemGraphicEl(u,c),o.add(c)}}).update(function(u,f){var c=s.getItemGraphicEl(f);if(!a.hasValue(u)){o.remove(c);return}var p=a.getItemLayout(u);c?(er(c),P7(p,c,a,u)):c=L7(p,a,u,l),o.add(c),a.setItemGraphicEl(u,c)}).remove(function(u){var f=s.getItemGraphicEl(u);f&&o.remove(f)}).execute(),this._data=a},t.prototype.remove=function(r){var n=this.group,i=this._data;this._data=null,i&&i.eachItemGraphicEl(function(a){a&&n.remove(a)})},t.type="boxplot",t}(Vt),hht=function(){function e(){}return e}(),dht=function(e){N(t,e);function t(r){var n=e.call(this,r)||this;return n.type="boxplotBoxPath",n}return t.prototype.getDefaultShape=function(){return new hht},t.prototype.buildPath=function(r,n){var i=n.points,a=0;for(r.moveTo(i[a][0],i[a][1]),a++;a<4;a++)r.lineTo(i[a][0],i[a][1]);for(r.closePath();am){var _=[g,x];n.push(_)}}}return{boxData:r,outliers:n}}var N7={type:"echarts:boxplot",transform:function(t){var r=t.upstream;if(r.sourceFormat!==qe){var n="";jt(n)}var i=qD(r.getRawData(),t.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:i.boxData},{data:i.outliers}]}};function ZD(e){e.registerSeriesModel(I7),e.registerChartView(R7),e.registerLayout(XD),e.registerTransform(N7)}var xht=["color","borderColor"],_ht=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(r),this._isLargeDraw?this._renderLarge(r):this._renderNormal(r)},t.prototype.incrementalPrepareRender=function(r,n,i){this._clear(),this._updateDrawMode(r)},t.prototype.incrementalRender=function(r,n,i,a){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(r,n):this._incrementalRenderNormal(r,n)},t.prototype.eachRendered=function(r){un(this._progressiveEls||this.group,r)},t.prototype._updateDrawMode=function(r){var n=r.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},t.prototype._renderNormal=function(r){var n=r.getData(),i=this._data,a=this.group,o=n.getLayout("isSimpleBox"),s=r.get("clip",!0),l=r.coordinateSystem,u=l.getArea&&l.getArea();this._data||a.removeAll(),n.diff(i).add(function(f){if(n.hasValue(f)){var c=n.getItemLayout(f);if(s&&k7(u,c))return;var p=KD(c,f,!0);Kt(p,{shape:{points:c.ends}},r,f),$D(p,n,f,o),a.add(p),n.setItemGraphicEl(f,p)}}).update(function(f,c){var p=i.getItemGraphicEl(c);if(!n.hasValue(f)){a.remove(p);return}var h=n.getItemLayout(f);if(s&&k7(u,h)){a.remove(p);return}p?(Rt(p,{shape:{points:h.ends}},r,f),er(p)):p=KD(h,f),$D(p,n,f,o),a.add(p),n.setItemGraphicEl(f,p)}).remove(function(f){var c=i.getItemGraphicEl(f);c&&a.remove(c)}).execute(),this._data=n},t.prototype._renderLarge=function(r){this._clear(),O7(r,this.group);var n=r.get("clip",!0)?fl(r.coordinateSystem,!1,r):null;n?this.group.setClipPath(n):this.group.removeClipPath()},t.prototype._incrementalRenderNormal=function(r,n){for(var i=n.getData(),a=i.getLayout("isSimpleBox"),o;(o=r.next())!=null;){var s=i.getItemLayout(o),l=KD(s,o);$D(l,i,o,a),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},t.prototype._incrementalRenderLarge=function(r,n){O7(n,this.group,this._progressiveEls,!0)},t.prototype.remove=function(r){this._clear()},t.prototype._clear=function(){this.group.removeAll(),this._data=null},t.type="candlestick",t}(Vt),bht=function(){function e(){}return e}(),Sht=function(e){N(t,e);function t(r){var n=e.call(this,r)||this;return n.type="normalCandlestickBox",n}return t.prototype.getDefaultShape=function(){return new bht},t.prototype.buildPath=function(r,n){var i=n.points;this.__simpleBox?(r.moveTo(i[4][0],i[4][1]),r.lineTo(i[6][0],i[6][1])):(r.moveTo(i[0][0],i[0][1]),r.lineTo(i[1][0],i[1][1]),r.lineTo(i[2][0],i[2][1]),r.lineTo(i[3][0],i[3][1]),r.closePath(),r.moveTo(i[4][0],i[4][1]),r.lineTo(i[5][0],i[5][1]),r.moveTo(i[6][0],i[6][1]),r.lineTo(i[7][0],i[7][1]))},t}(vt);function KD(e,t,r){var n=e.ends;return new Sht({shape:{points:r?wht(n,e):n},z2:100})}function k7(e,t){for(var r=!0,n=0;n0?"borderColor":"borderColor0"])||r.get(["itemStyle",e>0?"color":"color0"]);e===0&&(i=r.get(["itemStyle","borderColorDoji"]));var a=r.getModel("itemStyle").getItemStyle(xht);t.useStyle(a),t.style.fill=null,t.style.stroke=i}var z7=_ht;var U7=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],r}return t.prototype.getShadowDim=function(){return"open"},t.prototype.brushSelector=function(r,n,i){var a=n.getItemLayout(r);return a&&i.rect(a.brushRect)},t.type="series.candlestick",t.dependencies=["xAxis","yAxis","grid"],t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderColorDoji:null,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},t}(Wt);ie(U7,j1,!0);var V7=U7;function JD(e){!e||!B(e.series)||D(e.series,function(t){rt(t)&&t.type==="k"&&(t.type="candlestick")})}var Mht=["itemStyle","borderColor"],Aht=["itemStyle","borderColor0"],Cht=["itemStyle","borderColorDoji"],Dht=["itemStyle","color"],Eht=["itemStyle","color0"],Iht={seriesType:"candlestick",plan:si(),performRawSeries:!0,reset:function(e,t){function r(a,o){return o.get(a>0?Dht:Eht)}function n(a,o){return o.get(a===0?Cht:a>0?Mht:Aht)}if(!t.isSeriesFiltered(e)){var i=e.pipelineContext.large;return!i&&{progress:function(a,o){for(var s;(s=a.next())!=null;){var l=o.getItemModel(s),u=o.getItemLayout(s).sign,f=l.getItemStyle();f.fill=r(u,l),f.stroke=n(u,l)||f.fill;var c=o.ensureUniqueItemVisual(s,"style");V(c,f)}}}}}},B7=Iht;var Lht={seriesType:"candlestick",plan:si(),reset:function(e){var t=e.coordinateSystem,r=e.getData(),n=Pht(e,r),i=0,a=1,o=["x","y"],s=r.getDimensionIndex(r.mapDimension(o[i])),l=F(r.mapDimensionsAll(o[a]),r.getDimensionIndex,r),u=l[0],f=l[1],c=l[2],p=l[3];if(r.setLayout({candleWidth:n,isSimpleBox:n<=1.3}),s<0||l.length<4)return;return{progress:e.pipelineContext.large?d:h};function h(m,v){for(var g,y=v.getStore();(g=m.next())!=null;){var x=y.get(s,g),_=y.get(u,g),S=y.get(f,g),b=y.get(c,g),w=y.get(p,g),T=Math.min(_,S),M=Math.max(_,S),C=k(T,x),A=k(M,x),P=k(b,x),L=k(w,x),I=[];O(I,A,0),O(I,C,1),I.push(U(L),U(A),U(P),U(C));var E=v.getItemModel(g),R=!!E.get(["itemStyle","borderColorDoji"]);v.setItemLayout(g,{sign:F7(y,g,_,S,f,R),initBaseline:_>S?A[a]:C[a],ends:I,brushRect:z(b,w,x)})}function k(G,Y){var et=[];return et[i]=Y,et[a]=G,isNaN(Y)||isNaN(G)?[NaN,NaN]:t.dataToPoint(et)}function O(G,Y,et){var tt=Y.slice(),lt=Y.slice();tt[i]=$d(tt[i]+n/2,1,!1),lt[i]=$d(lt[i]-n/2,1,!0),et?G.push(tt,lt):G.push(lt,tt)}function z(G,Y,et){var tt=k(G,et),lt=k(Y,et);return tt[i]-=n/2,lt[i]-=n/2,{x:tt[0],y:tt[1],width:a?n:lt[0]-tt[0],height:a?lt[1]-tt[1]:n}}function U(G){return G[i]=$d(G[i],1),G}}function d(m,v){for(var g=pn(m.count*4),y=0,x,_=[],S=[],b,w=v.getStore(),T=!!e.get(["itemStyle","borderColorDoji"]);(b=m.next())!=null;){var M=w.get(s,b),C=w.get(u,b),A=w.get(f,b),P=w.get(c,b),L=w.get(p,b);if(isNaN(M)||isNaN(P)||isNaN(L)){g[y++]=NaN,y+=3;continue}g[y++]=F7(w,b,C,A,f,T),_[i]=M,_[a]=P,x=t.dataToPoint(_,null,S),g[y++]=x?x[0]:NaN,g[y++]=x?x[1]:NaN,_[a]=L,x=t.dataToPoint(_,null,S),g[y++]=x?x[1]:NaN}v.setLayout("largePoints",g)}}};function F7(e,t,r,n,i,a){var o;return r>n?o=-1:r0?e.get(i,t-1)<=n?1:-1:1,o}function Pht(e,t){var r=e.getBaseAxis(),n,i=r.type==="category"?r.getBandWidth():(n=r.getExtent(),Math.abs(n[1]-n[0])/t.count()),a=q(bt(e.get("barMaxWidth"),i),i),o=q(bt(e.get("barMinWidth"),1),i),s=e.get("barWidth");return s!=null?q(s,i):Math.max(Math.min(i/2,a),o)}var G7=Lht;function tE(e){e.registerChartView(z7),e.registerSeriesModel(V7),e.registerPreprocessor(JD),e.registerVisual(B7),e.registerLayout(G7)}function H7(e,t){var r=t.rippleEffectColor||t.color;e.eachChild(function(n){n.attr({z:t.z,zlevel:t.zlevel,style:{stroke:t.brushType==="stroke"?r:null,fill:t.brushType==="fill"?r:null}})})}var Rht=function(e){N(t,e);function t(r,n){var i=e.call(this)||this,a=new ts(r,n),o=new nt;return i.add(a),i.add(o),i.updateData(r,n),i}return t.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},t.prototype.startEffectAnimation=function(r){for(var n=r.symbolType,i=r.color,a=r.rippleNumber,o=this.childAt(1),s=0;s0&&(s=this._getLineLength(a)/f*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){a.stopAnimation();var p=void 0;j(c)?p=c(i):p=c,a.__t>0&&(p=-s*a.__t),this._animateSymbol(a,s,p,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},t.prototype._animateSymbol=function(r,n,i,a,o){if(n>0){r.__t=0;var s=this,l=r.animate("",a).when(o?n*2:n,{__t:o?2:1}).delay(i).during(function(){s._updateSymbolPosition(r)});a||l.done(function(){s.remove(r)}),l.start()}},t.prototype._getLineLength=function(r){return mi(r.__p1,r.__cp1)+mi(r.__cp1,r.__p2)},t.prototype._updateAnimationPoints=function(r,n){r.__p1=n[0],r.__p2=n[1],r.__cp1=n[2]||[(n[0][0]+n[1][0])/2,(n[0][1]+n[1][1])/2]},t.prototype.updateData=function(r,n,i){this.childAt(0).updateData(r,n,i),this._updateEffectSymbol(r,n)},t.prototype._updateSymbolPosition=function(r){var n=r.__p1,i=r.__p2,a=r.__cp1,o=r.__t<1?r.__t:2-r.__t,s=[r.x,r.y],l=s.slice(),u=He,f=xd;s[0]=u(n[0],a[0],i[0],o),s[1]=u(n[1],a[1],i[1],o);var c=r.__t<1?f(n[0],a[0],i[0],o):f(i[0],a[0],n[0],1-o),p=r.__t<1?f(n[1],a[1],i[1],o):f(i[1],a[1],n[1],1-o);r.rotation=-Math.atan2(p,c)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(r.__lastT!==void 0&&r.__lastT=0&&!(a[l]<=n);l--);l=Math.min(l,o-2)}else{for(l=s;ln);l++);l=Math.min(l-1,o-2)}var f=(n-a[l])/(a[l+1]-a[l]),c=i[l],p=i[l+1];r.x=c[0]*(1-f)+f*p[0],r.y=c[1]*(1-f)+f*p[1];var h=r.__t<1?p[0]-c[0]:c[0]-p[0],d=r.__t<1?p[1]-c[1]:c[1]-p[1];r.rotation=-Math.atan2(d,h)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=n,r.ignore=!1}},t}(Q1),q7=Uht;var Vht=function(){function e(){this.polyline=!1,this.curveness=0,this.segs=[]}return e}(),Bht=function(e){N(t,e);function t(r){var n=e.call(this,r)||this;return n._off=0,n.hoverDataIdx=-1,n}return t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new Vht},t.prototype.buildPath=function(r,n){var i=n.segs,a=n.curveness,o;if(n.polyline)for(o=this._off;o0){r.moveTo(i[o++],i[o++]);for(var l=1;l0){var h=(u+c)/2-(f-p)*a,d=(f+p)/2-(c-u)*a;r.quadraticCurveTo(h,d,c,p)}else r.lineTo(c,p)}this.incremental&&(this._off=o,this.notClear=!0)},t.prototype.findDataIndex=function(r,n){var i=this.shape,a=i.segs,o=i.curveness,s=this.style.lineWidth;if(i.polyline)for(var l=0,u=0;u0)for(var c=a[u++],p=a[u++],h=1;h0){var v=(c+d)/2-(p-m)*o,g=(p+m)/2-(d-c)*o;if(u0(c,p,v,g,d,m,s,r,n))return l}else if(qa(c,p,d,m,s,r,n))return l;l++}return-1},t.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect();if(r=i[0],n=i[1],a.contain(r,n)){var o=this.hoverDataIdx=this.findDataIndex(r,n);return o>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var r=this._rect;if(!r){for(var n=this.shape,i=n.segs,a=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u0&&(o.dataIndex=l+t.__startIndex)})},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}(),Z7=Fht;var Ght={seriesType:"lines",plan:si(),reset:function(e){var t=e.coordinateSystem;if(t){var r=e.get("polyline"),n=e.pipelineContext.large;return{progress:function(i,a){var o=[];if(n){var s=void 0,l=i.end-i.start;if(r){for(var u=0,f=i.start;f0&&(f||u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(a);var c=r.get("clip",!0)&&fl(r.coordinateSystem,!1,r);c?this.group.setClipPath(c):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},t.prototype.incrementalPrepareRender=function(r,n,i){var a=r.getData(),o=this._updateLineDraw(a,r);o.incrementalPrepareUpdate(a),this._clearLayer(i),this._finished=!1},t.prototype.incrementalRender=function(r,n,i){this._lineDraw.incrementalUpdate(r,n.getData()),this._finished=r.end===n.getData().count()},t.prototype.eachRendered=function(r){this._lineDraw&&this._lineDraw.eachRendered(r)},t.prototype.updateTransform=function(r,n,i){var a=r.getData(),o=r.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=t_.reset(r,n,i);s.progress&&s.progress({start:0,end:a.count(),count:a.count()},a),this._lineDraw.updateLayout(),this._clearLayer(i)},t.prototype._updateLineDraw=function(r,n){var i=this._lineDraw,a=this._showEffect(n),o=!!n.get("polyline"),s=n.pipelineContext,l=s.large;return(!i||a!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(i&&i.remove(),i=this._lineDraw=l?new Z7:new Rp(o?a?q7:J1:a?Q1:Pp),this._hasEffet=a,this._isPolyline=o,this._isLargeDraw=l),this.group.add(i.group),i},t.prototype._showEffect=function(r){return!!r.get(["effect","show"])},t.prototype._clearLayer=function(r){var n=r.getZr(),i=n.painter.getType()==="svg";!i&&this._lastZlevel!=null&&n.painter.getLayer(this._lastZlevel).clear(!0)},t.prototype.remove=function(r,n){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(n)},t.prototype.dispose=function(r,n){this.remove(r,n)},t.type="lines",t}(Vt),K7=Hht;var Wht=typeof Uint32Array>"u"?Array:Uint32Array,Yht=typeof Float64Array>"u"?Array:Float64Array;function $7(e){var t=e.data;t&&t[0]&&t[0][0]&&t[0][0].coord&&(e.data=F(t,function(r){var n=[r[0].coord,r[1].coord],i={coords:n};return r[0].name&&(i.fromName=r[0].name),r[1].name&&(i.toName=r[1].name),Tc([i,r[0],r[1]])}))}var Xht=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.visualStyleAccessPath="lineStyle",r.visualDrawType="stroke",r}return t.prototype.init=function(r){r.data=r.data||[],$7(r);var n=this._processFlatCoordsArray(r.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(r.data=new Float32Array(n.count)),e.prototype.init.apply(this,arguments)},t.prototype.mergeOption=function(r){if($7(r),r.data){var n=this._processFlatCoordsArray(r.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(r.data=new Float32Array(n.count))}e.prototype.mergeOption.apply(this,arguments)},t.prototype.appendData=function(r){var n=this._processFlatCoordsArray(r.data);n.flatCoords&&(this._flatCoords?(this._flatCoords=su(this._flatCoords,n.flatCoords),this._flatCoordsOffset=su(this._flatCoordsOffset,n.flatCoordsOffset)):(this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset),r.data=new Float32Array(n.count)),this.getRawData().appendData(r.data)},t.prototype._getCoordsFromItemModel=function(r){var n=this.getData().getItemModel(r),i=n.option instanceof Array?n.option:n.getShallow("coords");return i},t.prototype.getLineCoordsCount=function(r){return this._flatCoordsOffset?this._flatCoordsOffset[r*2+1]:this._getCoordsFromItemModel(r).length},t.prototype.getLineCoords=function(r,n){if(this._flatCoordsOffset){for(var i=this._flatCoordsOffset[r*2],a=this._flatCoordsOffset[r*2+1],o=0;oi}}return{flatCoordsOffset:new Uint32Array(a.buffer,0,l),flatCoords:o,count:u}}return{flatCoordsOffset:null,flatCoords:null,count:r.length}},t.prototype.getInitialData=function(r,n){if(!1)var i;var a=new Ne(["value"],this);return a.hasItemOption=!1,a.initData(r.data,[],function(o,s,l,u){if(o instanceof Array)return NaN;a.hasItemOption=!0;var f=o.value;if(f!=null)return f instanceof Array?f[u]:f}),a},t.prototype.formatTooltip=function(r,n,i){var a=this.getData(),o=a.getItemModel(r),s=o.get("name");if(s)return s;var l=o.get("fromName"),u=o.get("toName"),f=[];return l!=null&&f.push(l),u!=null&&f.push(u),xe("nameValue",{name:f.join(" > ")})},t.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},t.prototype.getProgressive=function(){var r=this.option.progressive;return r??(this.option.large?1e4:this.get("progressive"))},t.prototype.getProgressiveThreshold=function(){var r=this.option.progressiveThreshold;return r??(this.option.large?2e4:this.get("progressiveThreshold"))},t.prototype.getZLevelKey=function(){var r=this.getModel("effect"),n=r.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:r.get("show")&&n>0?n+"":""},t.type="series.lines",t.dependencies=["grid","polar","geo","calendar"],t.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},t}(Wt),j7=Xht;function e_(e){return e instanceof Array||(e=[e,e]),e}var qht={seriesType:"lines",reset:function(e){var t=e_(e.get("symbol")),r=e_(e.get("symbolSize")),n=e.getData();n.setVisual("fromSymbol",t&&t[0]),n.setVisual("toSymbol",t&&t[1]),n.setVisual("fromSymbolSize",r&&r[0]),n.setVisual("toSymbolSize",r&&r[1]);function i(a,o){var s=a.getItemModel(o),l=e_(s.getShallow("symbol",!0)),u=e_(s.getShallow("symbolSize",!0));l[0]&&a.setItemVisual(o,"fromSymbol",l[0]),l[1]&&a.setItemVisual(o,"toSymbol",l[1]),u[0]&&a.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&a.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:n.hasItemOption?i:null}}},Q7=qht;function rE(e){e.registerChartView(K7),e.registerSeriesModel(j7),e.registerLayout(t_),e.registerVisual(Q7)}var Zht=256,Kht=function(){function e(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var t=Wr.createCanvas();this.canvas=t}return e.prototype.update=function(t,r,n,i,a,o){var s=this._getBrush(),l=this._getGradient(a,"inRange"),u=this._getGradient(a,"outOfRange"),f=this.pointSize+this.blurSize,c=this.canvas,p=c.getContext("2d"),h=t.length;c.width=r,c.height=n;for(var d=0;d0){var P=o(x)?l:u;x>0&&(x=x*C+T),S[b++]=P[A],S[b++]=P[A+1],S[b++]=P[A+2],S[b++]=P[A+3]*x*256}else b+=4}return p.putImageData(_,0,0),c},e.prototype._getBrush=function(){var t=this._brushCanvas||(this._brushCanvas=Wr.createCanvas()),r=this.pointSize+this.blurSize,n=r*2;t.width=n,t.height=n;var i=t.getContext("2d");return i.clearRect(0,0,n,n),i.shadowOffsetX=n,i.shadowBlur=this.blurSize,i.shadowColor="#000",i.beginPath(),i.arc(-r,r,this.pointSize,0,Math.PI*2,!0),i.closePath(),i.fill(),t},e.prototype._getGradient=function(t,r){for(var n=this._gradientPixels,i=n[r]||(n[r]=new Uint8ClampedArray(256*4)),a=[0,0,0,0],o=0,s=0;s<256;s++)t[r](s/255,!0,a),i[o++]=a[0],i[o++]=a[1],i[o++]=a[2],i[o++]=a[3];return i},e}(),J7=Kht;function $ht(e,t,r){var n=e[1]-e[0];t=F(t,function(o){return{interval:[(o.interval[0]-e[0])/n,(o.interval[1]-e[0])/n]}});var i=t.length,a=0;return function(o){var s;for(s=a;s=0;s--){var l=t[s].interval;if(l[0]<=o&&o<=l[1]){a=s;break}}return s>=0&&s=t[0]&&n<=t[1]}}function tF(e){var t=e.dimensions;return t[0]==="lng"&&t[1]==="lat"}var Qht=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a;n.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===r&&(a=s)})}),this._progressiveEls=null,this.group.removeAll();var o=r.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"?this._renderOnCartesianAndCalendar(r,i,0,r.getData().count()):tF(o)&&this._renderOnGeo(o,r,a,i)},t.prototype.incrementalPrepareRender=function(r,n,i){this.group.removeAll()},t.prototype.incrementalRender=function(r,n,i,a){var o=n.coordinateSystem;o&&(tF(o)?this.render(n,i,a):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(n,a,r.start,r.end,!0)))},t.prototype.eachRendered=function(r){un(this._progressiveEls||this.group,r)},t.prototype._renderOnCartesianAndCalendar=function(r,n,i,a,o){var s=r.coordinateSystem,l=Ni(s,"cartesian2d"),u,f,c,p;if(l){var h=s.getAxis("x"),d=s.getAxis("y");u=h.getBandWidth()+.5,f=d.getBandWidth()+.5,c=h.scale.getExtent(),p=d.scale.getExtent()}for(var m=this.group,v=r.getData(),g=r.getModel(["emphasis","itemStyle"]).getItemStyle(),y=r.getModel(["blur","itemStyle"]).getItemStyle(),x=r.getModel(["select","itemStyle"]).getItemStyle(),_=r.get(["itemStyle","borderRadius"]),S=ae(r),b=r.getModel("emphasis"),w=b.get("focus"),T=b.get("blurScope"),M=b.get("disabled"),C=l?[v.mapDimension("x"),v.mapDimension("y"),v.mapDimension("value")]:[v.mapDimension("time"),v.mapDimension("value")],A=i;Ac[1]||Ep[1])continue;var R=s.dataToPoint([I,E]);P=new At({shape:{x:R[0]-u/2,y:R[1]-f/2,width:u,height:f},style:L})}else{if(isNaN(v.get(C[1],A)))continue;P=new At({z2:1,shape:s.dataToRect([v.get(C[0],A)]).contentShape,style:L})}if(v.hasItemOption){var k=v.getItemModel(A),O=k.getModel("emphasis");g=O.getModel("itemStyle").getItemStyle(),y=k.getModel(["blur","itemStyle"]).getItemStyle(),x=k.getModel(["select","itemStyle"]).getItemStyle(),_=k.get(["itemStyle","borderRadius"]),w=O.get("focus"),T=O.get("blurScope"),M=O.get("disabled"),S=ae(k)}P.shape.r=_;var z=r.getRawValue(A),U="-";z&&z[2]!=null&&(U=z[2]+""),he(P,S,{labelFetcher:r,labelDataIndex:A,defaultOpacity:L.opacity,defaultText:U}),P.ensureState("emphasis").style=g,P.ensureState("blur").style=y,P.ensureState("select").style=x,Zt(P,w,T,M),P.incremental=o,o&&(P.states.emphasis.hoverLayer=!0),m.add(P),v.setItemGraphicEl(A,P),this._progressiveEls&&this._progressiveEls.push(P)}},t.prototype._renderOnGeo=function(r,n,i,a){var o=i.targetVisuals.inRange,s=i.targetVisuals.outOfRange,l=n.getData(),u=this._hmLayer||this._hmLayer||new J7;u.blurSize=n.get("blurSize"),u.pointSize=n.get("pointSize"),u.minOpacity=n.get("minOpacity"),u.maxOpacity=n.get("maxOpacity");var f=r.getViewRect().clone(),c=r.getRoamTransform();f.applyTransform(c);var p=Math.max(f.x,0),h=Math.max(f.y,0),d=Math.min(f.width+f.x,a.getWidth()),m=Math.min(f.height+f.y,a.getHeight()),v=d-p,g=m-h,y=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],x=l.mapArray(y,function(w,T,M){var C=r.dataToPoint([w,T]);return C[0]-=p,C[1]-=h,C.push(M),C}),_=i.getExtent(),S=i.type==="visualMap.continuous"?jht(_,i.option.range):$ht(_,i.getPieceList(),i.option.selected);u.update(x,v,g,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},S);var b=new me({style:{width:v,height:g,x:p,y:h,image:u.canvas},silent:!0});this.group.add(b)},t.type="heatmap",t}(Vt),eF=Qht;var Jht=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.getInitialData=function(r,n){return Tr(null,this,{generateCoord:"value"})},t.prototype.preventIncremental=function(){var r=Ko.get(this.get("coordinateSystem"));if(r&&r.dimensions)return r.dimensions[0]==="lng"&&r.dimensions[1]==="lat"},t.type="series.heatmap",t.dependencies=["grid","geo","calendar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:"#212121"}}},t}(Wt),rF=Jht;function nE(e){e.registerChartView(eF),e.registerSeriesModel(rF)}var tdt=["itemStyle","borderWidth"],nF=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],iE=new Sr,edt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a=this.group,o=r.getData(),s=this._data,l=r.coordinateSystem,u=l.getBaseAxis(),f=u.isHorizontal(),c=l.master.getRect(),p={ecSize:{width:i.getWidth(),height:i.getHeight()},seriesModel:r,coordSys:l,coordSysExtent:[[c.x,c.x+c.width],[c.y,c.y+c.height]],isHorizontal:f,valueDim:nF[+f],categoryDim:nF[1-+f]};return o.diff(s).add(function(h){if(o.hasValue(h)){var d=aF(o,h),m=iF(o,h,d,p),v=oF(o,p,m);o.setItemGraphicEl(h,v),a.add(v),lF(v,p,m)}}).update(function(h,d){var m=s.getItemGraphicEl(d);if(!o.hasValue(h)){a.remove(m);return}var v=aF(o,h),g=iF(o,h,v,p),y=vF(o,g);m&&y!==m.__pictorialShapeStr&&(a.remove(m),o.setItemGraphicEl(h,null),m=null),m?ldt(m,p,g):m=oF(o,p,g,!0),o.setItemGraphicEl(h,m),m.__pictorialSymbolMeta=g,a.add(m),lF(m,p,g)}).remove(function(h){var d=s.getItemGraphicEl(h);d&&sF(s,h,d.__pictorialSymbolMeta.animationModel,d)}).execute(),this._data=o,this.group},t.prototype.remove=function(r,n){var i=this.group,a=this._data;r.get("animation")?a&&a.eachItemGraphicEl(function(o){sF(a,ht(o).dataIndex,r,o)}):i.removeAll()},t.type="pictorialBar",t}(Vt);function iF(e,t,r,n){var i=e.getItemLayout(t),a=r.get("symbolRepeat"),o=r.get("symbolClip"),s=r.get("symbolPosition")||"start",l=r.get("symbolRotate"),u=(l||0)*Math.PI/180||0,f=r.get("symbolPatternSize")||2,c=r.isAnimationEnabled(),p={dataIndex:t,layout:i,itemModel:r,symbolType:e.getItemVisual(t,"symbol")||"circle",style:e.getItemVisual(t,"style"),symbolClip:o,symbolRepeat:a,symbolRepeatDirection:r.get("symbolRepeatDirection"),symbolPatternSize:f,rotation:u,animationModel:c?r:null,hoverScale:c&&r.get(["emphasis","scale"]),z2:r.getShallow("z",!0)||0};rdt(r,a,i,n,p),ndt(e,t,i,a,o,p.boundingLength,p.pxSign,f,n,p),idt(r,p.symbolScale,u,n,p);var h=p.symbolSize,d=li(r.get("symbolOffset"),h);return adt(r,h,i,a,o,d,s,p.valueLineWidth,p.boundingLength,p.repeatCutLength,n,p),p}function rdt(e,t,r,n,i){var a=n.valueDim,o=e.get("symbolBoundingData"),s=n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(r[a.wh]<=0),f;if(B(o)){var c=[aE(s,o[0])-l,aE(s,o[1])-l];c[1]0?1:-1}function aE(e,t){return e.toGlobalCoord(e.dataToCoord(e.scale.parse(t)))}function ndt(e,t,r,n,i,a,o,s,l,u){var f=l.valueDim,c=l.categoryDim,p=Math.abs(r[c.wh]),h=e.getItemVisual(t,"symbolSize"),d;B(h)?d=h.slice():h==null?d=["100%","100%"]:d=[h,h],d[c.index]=q(d[c.index],p),d[f.index]=q(d[f.index],n?p:Math.abs(a)),u.symbolSize=d;var m=u.symbolScale=[d[0]/s,d[1]/s];m[f.index]*=(l.isHorizontal?-1:1)*o}function idt(e,t,r,n,i){var a=e.get(tdt)||0;a&&(iE.attr({scaleX:t[0],scaleY:t[1],rotation:r}),iE.updateTransform(),a/=iE.getLineScale(),a*=t[n.valueDim.index]),i.valueLineWidth=a||0}function adt(e,t,r,n,i,a,o,s,l,u,f,c){var p=f.categoryDim,h=f.valueDim,d=c.pxSign,m=Math.max(t[h.index]+s,0),v=m;if(n){var g=Math.abs(l),y=_e(e.get("symbolMargin"),"15%")+"",x=!1;y.lastIndexOf("!")===y.length-1&&(x=!0,y=y.slice(0,y.length-1));var _=q(y,t[h.index]),S=Math.max(m+_*2,0),b=x?0:_*2,w=Pd(n),T=w?n:uF((g+b)/S),M=g-T*m;_=M/2/(x?T:Math.max(T-1,1)),S=m+_*2,b=x?0:_*2,!w&&n!=="fixed"&&(T=u?uF((Math.abs(u)+b)/S):0),v=T*S-b,c.repeatTimes=T,c.symbolMargin=_}var C=d*(v/2),A=c.pathPosition=[];A[p.index]=r[p.wh]/2,A[h.index]=o==="start"?C:o==="end"?l-C:l/2,a&&(A[0]+=a[0],A[1]+=a[1]);var P=c.bundlePosition=[];P[p.index]=r[p.xy],P[h.index]=r[h.xy];var L=c.barRectShape=V({},r);L[h.wh]=d*Math.max(Math.abs(r[h.wh]),Math.abs(A[h.index]+C)),L[p.wh]=r[p.wh];var I=c.clipShape={};I[p.xy]=-r[p.xy],I[p.wh]=f.ecSize[p.wh],I[h.xy]=0,I[h.wh]=r[h.wh]}function fF(e){var t=e.symbolPatternSize,r=ne(e.symbolType,-t/2,-t/2,t,t);return r.attr({culling:!0}),r.type!=="image"&&r.setStyle({strokeNoScale:!0}),r}function cF(e,t,r,n){var i=e.__pictorialBundle,a=r.symbolSize,o=r.valueLineWidth,s=r.pathPosition,l=t.valueDim,u=r.repeatTimes||0,f=0,c=a[t.valueDim.index]+o+r.symbolMargin*2;for(oE(e,function(m){m.__pictorialAnimationIndex=f,m.__pictorialRepeatTimes=u,f0:g<0)&&(y=u-1-m),v[l.index]=c*(y-u/2+.5)+s[l.index],{x:v[0],y:v[1],scaleX:r.symbolScale[0],scaleY:r.symbolScale[1],rotation:r.rotation}}}function pF(e,t,r,n){var i=e.__pictorialBundle,a=e.__pictorialMainPath;a?Vp(a,null,{x:r.pathPosition[0],y:r.pathPosition[1],scaleX:r.symbolScale[0],scaleY:r.symbolScale[1],rotation:r.rotation},r,n):(a=e.__pictorialMainPath=fF(r),i.add(a),Vp(a,{x:r.pathPosition[0],y:r.pathPosition[1],scaleX:0,scaleY:0,rotation:r.rotation},{scaleX:r.symbolScale[0],scaleY:r.symbolScale[1]},r,n))}function hF(e,t,r){var n=V({},t.barRectShape),i=e.__pictorialBarRect;i?Vp(i,null,{shape:n},t,r):(i=e.__pictorialBarRect=new At({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),i.disableMorphing=!0,e.add(i))}function dF(e,t,r,n){if(r.symbolClip){var i=e.__pictorialClipPath,a=V({},r.clipShape),o=t.valueDim,s=r.animationModel,l=r.dataIndex;if(i)Rt(i,{shape:a},s,l);else{a[o.wh]=0,i=new At({shape:a}),e.__pictorialBundle.setClipPath(i),e.__pictorialClipPath=i;var u={};u[o.wh]=r.clipShape[o.wh],Et[n?"updateProps":"initProps"](i,{shape:u},s,l)}}}function aF(e,t){var r=e.getItemModel(t);return r.getAnimationDelayParams=odt,r.isAnimationEnabled=sdt,r}function odt(e){return{index:e.__pictorialAnimationIndex,count:e.__pictorialRepeatTimes}}function sdt(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function oF(e,t,r,n){var i=new nt,a=new nt;return i.add(a),i.__pictorialBundle=a,a.x=r.bundlePosition[0],a.y=r.bundlePosition[1],r.symbolRepeat?cF(i,t,r):pF(i,t,r),hF(i,r,n),dF(i,t,r,n),i.__pictorialShapeStr=vF(e,r),i.__pictorialSymbolMeta=r,i}function ldt(e,t,r){var n=r.animationModel,i=r.dataIndex,a=e.__pictorialBundle;Rt(a,{x:r.bundlePosition[0],y:r.bundlePosition[1]},n,i),r.symbolRepeat?cF(e,t,r,!0):pF(e,t,r,!0),hF(e,r,!0),dF(e,t,r,!0)}function sF(e,t,r,n){var i=n.__pictorialBarRect;i&&i.removeTextContent();var a=[];oE(n,function(o){a.push(o)}),n.__pictorialMainPath&&a.push(n.__pictorialMainPath),n.__pictorialClipPath&&(r=null),D(a,function(o){Ai(o,{scaleX:0,scaleY:0},r,t,function(){n.parent&&n.parent.remove(n)})}),e.setItemGraphicEl(t,null)}function vF(e,t){return[e.getItemVisual(t.dataIndex,"symbol")||"none",!!t.symbolRepeat,!!t.symbolClip].join(":")}function oE(e,t,r){D(e.__pictorialBundle.children(),function(n){n!==e.__pictorialBarRect&&t.call(r,n)})}function Vp(e,t,r,n,i,a){t&&e.attr(t),n.symbolClip&&!i?r&&e.attr(r):r&&Et[i?"updateProps":"initProps"](e,r,n.animationModel,n.dataIndex,a)}function lF(e,t,r){var n=r.dataIndex,i=r.itemModel,a=i.getModel("emphasis"),o=a.getModel("itemStyle").getItemStyle(),s=i.getModel(["blur","itemStyle"]).getItemStyle(),l=i.getModel(["select","itemStyle"]).getItemStyle(),u=i.getShallow("cursor"),f=a.get("focus"),c=a.get("blurScope"),p=a.get("scale");oE(e,function(m){if(m instanceof me){var v=m.style;m.useStyle(V({image:v.image,x:v.x,y:v.y,width:v.width,height:v.height},r.style))}else m.useStyle(r.style);var g=m.ensureState("emphasis");g.style=o,p&&(g.scaleX=m.scaleX*1.1,g.scaleY=m.scaleY*1.1),m.ensureState("blur").style=s,m.ensureState("select").style=l,u&&(m.cursor=u),m.z2=r.z2});var h=t.valueDim.posDesc[+(r.boundingLength>0)],d=e.__pictorialBarRect;he(d,ae(i),{labelFetcher:t.seriesModel,labelDataIndex:n,defaultText:xa(t.seriesModel.getData(),n),inheritColor:r.style.fill,defaultOpacity:r.style.opacity,defaultOutsidePosition:h}),Zt(e,f,c,a.get("disabled"))}function uF(e){var t=Math.round(e);return Math.abs(e-t)<1e-4?t:Math.ceil(e)}var mF=edt;var udt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.hasSymbolVisual=!0,r.defaultSymbol="roundRect",r}return t.prototype.getInitialData=function(r){return r.stack=null,e.prototype.getInitialData.apply(this,arguments)},t.type="series.pictorialBar",t.dependencies=["grid"],t.defaultOption=Kr(_p.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),t}(_p),gF=udt;function sE(e){e.registerChartView(mF),e.registerSeriesModel(gF),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,pt(Ux,"pictorialBar")),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,Vx("pictorialBar"))}var fdt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._layers=[],r}return t.prototype.render=function(r,n,i){var a=r.getData(),o=this,s=this.group,l=r.getLayerSeries(),u=a.getLayout("layoutInfo"),f=u.rect,c=u.boundaryGap;s.x=0,s.y=f.y+c[0];function p(v){return v.name}var h=new Vr(this._layersSeries||[],l,p,p),d=[];h.add(Z(m,this,"add")).update(Z(m,this,"update")).remove(Z(m,this,"remove")).execute();function m(v,g,y){var x=o._layers;if(v==="remove"){s.remove(x[g]);return}for(var _=[],S=[],b,w=l[g].indices,T=0;Ta&&(a=s),n.push(s)}for(var u=0;ua&&(a=c)}return{y0:i,max:a}}function fE(e){e.registerChartView(yF),e.registerSeriesModel(xF),e.registerLayout(uE),e.registerProcessor(ba("themeRiver"))}var ddt=2,vdt=4,mdt=function(e){N(t,e);function t(r,n,i,a){var o=e.call(this)||this;o.z2=ddt,o.textConfig={inside:!0},ht(o).seriesIndex=n.seriesIndex;var s=new Lt({z2:vdt,silent:r.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,r,n,i,a),o}return t.prototype.updateData=function(r,n,i,a,o){this.node=n,n.piece=this,i=i||this._seriesModel,a=a||this._ecModel;var s=this;ht(s).dataIndex=n.dataIndex;var l=n.getModel(),u=l.getModel("emphasis"),f=n.getLayout(),c=V({},f);c.label=null;var p=n.getVisual("style");p.lineJoin="bevel";var h=n.getVisual("decal");h&&(p.decal=da(h,o));var d=ao(l.getModel("itemStyle"),c,!0);V(c,d),D(lr,function(y){var x=s.ensureState(y),_=l.getModel([y,"itemStyle"]);x.style=_.getItemStyle();var S=ao(_,c);S&&(x.shape=S)}),r?(s.setShape(c),s.shape.r=f.r0,Kt(s,{shape:{r:f.r}},i,n.dataIndex)):(Rt(s,{shape:c},i),er(s)),s.useStyle(p),this._updateLabel(i);var m=l.getShallow("cursor");m&&s.attr("cursor",m),this._seriesModel=i||this._seriesModel,this._ecModel=a||this._ecModel;var v=u.get("focus"),g=v==="ancestor"?n.getAncestorsIndices():v==="descendant"?n.getDescendantIndices():v;Zt(this,g,u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(r){var n=this,i=this.node.getModel(),a=i.getModel("label"),o=this.node.getLayout(),s=o.endAngle-o.startAngle,l=(o.startAngle+o.endAngle)/2,u=Math.cos(l),f=Math.sin(l),c=this,p=c.getTextContent(),h=this.node.dataIndex,d=a.get("minAngle")/180*Math.PI,m=a.get("show")&&!(d!=null&&Math.abs(s)Math.PI/2?"right":"left"):!P||P==="center"?(s===2*Math.PI&&o.r0===0?C=0:C=(o.r+o.r0)/2,P="center"):P==="left"?(C=o.r0+A,l>Math.PI/2&&(P="right")):P==="right"&&(C=o.r-A,l>Math.PI/2&&(P="left")),_.style.align=P,_.style.verticalAlign=v(y,"verticalAlign")||"middle",_.x=C*u+o.cx,_.y=C*f+o.cy;var L=v(y,"rotate"),I=0;L==="radial"?(I=sn(-l),I>Math.PI/2&&IMath.PI/2?I-=Math.PI:I<-Math.PI/2&&(I+=Math.PI)):Ct(L)&&(I=L*Math.PI/180),_.rotation=sn(I)});function v(g,y){var x=g.get(y);return x??a.get(y)}p.dirtyStyle()},t}(Ye),cE=mdt;var r_="sunburstRootToNode",bF="sunburstHighlight",gdt="sunburstUnhighlight";function SF(e){e.registerAction({type:r_,update:"updateView"},function(t,r){r.eachComponent({mainType:"series",subType:"sunburst",query:t},n);function n(i,a){var o=rs(t,[r_],i);if(o){var s=i.getViewRoot();s&&(t.direction=Cp(s,o.node)?"rollUp":"drillDown"),i.resetViewRoot(o.node)}}}),e.registerAction({type:bF,update:"none"},function(t,r,n){t=V({},t),r.eachComponent({mainType:"series",subType:"sunburst",query:t},i);function i(a){var o=rs(t,[bF],a);o&&(t.dataIndex=o.node.dataIndex)}n.dispatchAction(V(t,{type:"highlight"}))}),e.registerAction({type:gdt,update:"updateView"},function(t,r,n){t=V({},t),n.dispatchAction(V(t,{type:"downplay"}))})}var ydt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i,a){var o=this;this.seriesModel=r,this.api=i,this.ecModel=n;var s=r.getData(),l=s.tree.root,u=r.getViewRoot(),f=this.group,c=r.get("renderLabelForZeroData"),p=[];u.eachNode(function(y){p.push(y)});var h=this._oldChildren||[];d(p,h),g(l,u),this._initEvents(),this._oldChildren=p;function d(y,x){if(y.length===0&&x.length===0)return;new Vr(x,y,_,_).add(S).update(S).remove(pt(S,null)).execute();function _(b){return b.getId()}function S(b,w){var T=b==null?null:y[b],M=w==null?null:x[w];m(T,M)}}function m(y,x){if(!c&&y&&!y.getValue()&&(y=null),y!==l&&x!==l){if(x&&x.piece)y?(x.piece.updateData(!1,y,r,n,i),s.setItemGraphicEl(y.dataIndex,x.piece)):v(x);else if(y){var _=new cE(y,r,n,i);f.add(_),s.setItemGraphicEl(y.dataIndex,_)}}}function v(y){y&&y.piece&&(f.remove(y.piece),y.piece=null)}function g(y,x){x.depth>0?(o.virtualPiece?o.virtualPiece.updateData(!1,y,r,n,i):(o.virtualPiece=new cE(y,r,n,i),f.add(o.virtualPiece)),x.piece.off("click"),o.virtualPiece.on("click",function(_){o._rootToNode(x.parentNode)})):o.virtualPiece&&(f.remove(o.virtualPiece),o.virtualPiece=null)}},t.prototype._initEvents=function(){var r=this;this.group.off("click"),this.group.on("click",function(n){var i=!1,a=r.seriesModel.getViewRoot();a.eachNode(function(o){if(!i&&o.piece&&o.piece===n.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")r._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var f=l.get("target",!0)||"_blank";Xu(u,f)}}i=!0}})})},t.prototype._rootToNode=function(r){r!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:r_,from:this.uid,seriesId:this.seriesModel.id,targetNode:r})},t.prototype.containPoint=function(r,n){var i=n.getData(),a=i.getItemLayout(0);if(a){var o=r[0]-a.cx,s=r[1]-a.cy,l=Math.sqrt(o*o+s*s);return l<=a.r&&l>=a.r0}},t.type="sunburst",t}(Vt),wF=ydt;var xdt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.ignoreStyleOnData=!0,r}return t.prototype.getInitialData=function(r,n){var i={name:r.name,children:r.data};TF(i);var a=this._levelModels=F(r.levels||[],function(l){return new Ht(l,this,n)},this),o=Ap.createTree(i,this,s);function s(l){l.wrapMethod("getItemModel",function(u,f){var c=o.getNodeByDataIndex(f),p=a[c.depth];return p&&(u.parentModel=p),u})}return o.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.getDataParams=function(r){var n=e.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(r);return n.treePathInfo=vl(i,this),n},t.prototype.getLevelModel=function(r){return this._levelModels&&this._levelModels[r.depth]},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(r){r?this._viewRoot=r:r=this._viewRoot;var n=this.getRawData().tree.root;(!r||r!==n&&!n.contains(r))&&(this._viewRoot=n)},t.prototype.enableAriaDecal=function(){jv(this)},t.type="series.sunburst",t.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},t}(Wt);function TF(e){var t=0;D(e.children,function(n){TF(n);var i=n.value;B(i)&&(i=i[0]),t+=i});var r=e.value;B(r)&&(r=r[0]),(r==null||isNaN(r))&&(r=t),r<0&&(r=0),B(e.value)?e.value[0]=r:e.value=r}var MF=xdt;var AF=Math.PI/180;function pE(e,t,r){t.eachSeriesByType(e,function(n){var i=n.get("center"),a=n.get("radius");B(a)||(a=[0,a]),B(i)||(i=[i,i]);var o=r.getWidth(),s=r.getHeight(),l=Math.min(o,s),u=q(i[0],o),f=q(i[1],s),c=q(a[0],l/2),p=q(a[1],l/2),h=-n.get("startAngle")*AF,d=n.get("minAngle")*AF,m=n.getData().tree.root,v=n.getViewRoot(),g=v.depth,y=n.get("sort");y!=null&&CF(v,y);var x=0;D(v.children,function(R){!isNaN(R.getValue())&&x++});var _=v.getValue(),S=Math.PI/(_||x)*2,b=v.depth>0,w=v.height-(b?-1:1),T=(p-c)/(w||1),M=n.get("clockwise"),C=n.get("stillShowZeroSum"),A=M?1:-1,P=function(R,k){if(R){var O=k;if(R!==m){var z=R.getValue(),U=_===0&&C?S:z*S;U1;)o=o.parentNode;var s=i.getColorFromPalette(o.name||o.dataIndex+"",t);return n.depth>1&&H(s)&&(s=Sd(s,(n.depth-1)/(a-1)*.5)),s}e.eachSeriesByType("sunburst",function(n){var i=n.getData(),a=i.tree;a.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=r(o,n,a.root.height));var u=i.ensureUniqueItemVisual(o.dataIndex,"style");V(u,l)})})}function dE(e){e.registerChartView(wF),e.registerSeriesModel(MF),e.registerLayout(pt(pE,"sunburst")),e.registerProcessor(pt(ba,"sunburst")),e.registerVisual(hE),SF(e)}var vE={color:"fill",borderColor:"stroke"},DF={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},lo=yt(),bdt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},t.prototype.getInitialData=function(r,n){return Tr(null,this)},t.prototype.getDataParams=function(r,n,i){var a=e.prototype.getDataParams.call(this,r,n);return i&&(a.info=lo(i).info),a},t.type="series.custom",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},t}(Wt),EF=bdt;function Sdt(e,t){return t=t||[0,0],F(["x","y"],function(r,n){var i=this.getAxis(r),a=t[n],o=e[n]/2;return i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(a-o)-i.dataToCoord(a+o))},this)}function mE(e){var t=e.master.getRect();return{coordSys:{type:"cartesian2d",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(r){return e.dataToPoint(r)},size:Z(Sdt,e)}}}function wdt(e,t){return t=t||[0,0],F([0,1],function(r){var n=t[r],i=e[r]/2,a=[],o=[];return a[r]=n-i,o[r]=n+i,a[1-r]=o[1-r]=t[1-r],Math.abs(this.dataToPoint(a)[r]-this.dataToPoint(o)[r])},this)}function gE(e){var t=e.getBoundingRect();return{coordSys:{type:"geo",x:t.x,y:t.y,width:t.width,height:t.height,zoom:e.getZoom()},api:{coord:function(r){return e.dataToPoint(r)},size:Z(wdt,e)}}}function Tdt(e,t){var r=this.getAxis(),n=t instanceof Array?t[0]:t,i=(e instanceof Array?e[0]:e)/2;return r.type==="category"?r.getBandWidth():Math.abs(r.dataToCoord(n-i)-r.dataToCoord(n+i))}function yE(e){var t=e.getRect();return{coordSys:{type:"singleAxis",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(r){return e.dataToPoint(r)},size:Z(Tdt,e)}}}function Mdt(e,t){return t=t||[0,0],F(["Radius","Angle"],function(r,n){var i="get"+r+"Axis",a=this[i](),o=t[n],s=e[n]/2,l=a.type==="category"?a.getBandWidth():Math.abs(a.dataToCoord(o-s)-a.dataToCoord(o+s));return r==="Angle"&&(l=l*Math.PI/180),l},this)}function xE(e){var t=e.getRadiusAxis(),r=e.getAngleAxis(),n=t.getExtent();return n[0]>n[1]&&n.reverse(),{coordSys:{type:"polar",cx:e.cx,cy:e.cy,r:n[1],r0:n[0]},api:{coord:function(i){var a=t.dataToRadius(i[0]),o=r.dataToAngle(i[1]),s=e.coordToPoint([a,o]);return s.push(a,o*Math.PI/180),s},size:Z(Mdt,e)}}}function _E(e){var t=e.getRect(),r=e.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:e.getCellWidth(),cellHeight:e.getCellHeight(),rangeInfo:{start:r.start,end:r.end,weeks:r.weeks,dayCount:r.allDay}},api:{coord:function(n,i){return e.dataToPoint(n,i)}}}}function n_(e,t,r,n){return e&&(e.legacy||e.legacy!==!1&&!r&&!n&&t!=="tspan"&&(t==="text"||st(e,"text")))}function i_(e,t,r){var n=e,i,a,o;if(t==="text")o=n;else{o={},st(n,"text")&&(o.text=n.text),st(n,"rich")&&(o.rich=n.rich),st(n,"textFill")&&(o.fill=n.textFill),st(n,"textStroke")&&(o.stroke=n.textStroke),st(n,"fontFamily")&&(o.fontFamily=n.fontFamily),st(n,"fontSize")&&(o.fontSize=n.fontSize),st(n,"fontStyle")&&(o.fontStyle=n.fontStyle),st(n,"fontWeight")&&(o.fontWeight=n.fontWeight),a={type:"text",style:o,silent:!0},i={};var s=st(n,"textPosition");r?i.position=s?n.textPosition:"inside":s&&(i.position=n.textPosition),st(n,"textPosition")&&(i.position=n.textPosition),st(n,"textOffset")&&(i.offset=n.textOffset),st(n,"textRotation")&&(i.rotation=n.textRotation),st(n,"textDistance")&&(i.distance=n.textDistance)}return IF(o,e),D(o.rich,function(l){IF(l,l)}),{textConfig:i,textContent:a}}function IF(e,t){t&&(t.font=t.textFont||t.font,st(t,"textStrokeWidth")&&(e.lineWidth=t.textStrokeWidth),st(t,"textAlign")&&(e.align=t.textAlign),st(t,"textVerticalAlign")&&(e.verticalAlign=t.textVerticalAlign),st(t,"textLineHeight")&&(e.lineHeight=t.textLineHeight),st(t,"textWidth")&&(e.width=t.textWidth),st(t,"textHeight")&&(e.height=t.textHeight),st(t,"textBackgroundColor")&&(e.backgroundColor=t.textBackgroundColor),st(t,"textPadding")&&(e.padding=t.textPadding),st(t,"textBorderColor")&&(e.borderColor=t.textBorderColor),st(t,"textBorderWidth")&&(e.borderWidth=t.textBorderWidth),st(t,"textBorderRadius")&&(e.borderRadius=t.textBorderRadius),st(t,"textBoxShadowColor")&&(e.shadowColor=t.textBoxShadowColor),st(t,"textBoxShadowBlur")&&(e.shadowBlur=t.textBoxShadowBlur),st(t,"textBoxShadowOffsetX")&&(e.shadowOffsetX=t.textBoxShadowOffsetX),st(t,"textBoxShadowOffsetY")&&(e.shadowOffsetY=t.textBoxShadowOffsetY))}function bE(e,t,r){var n=e;n.textPosition=n.textPosition||r.position||"inside",r.offset!=null&&(n.textOffset=r.offset),r.rotation!=null&&(n.textRotation=r.rotation),r.distance!=null&&(n.textDistance=r.distance);var i=n.textPosition.indexOf("inside")>=0,a=e.fill||"#000";LF(n,t);var o=n.textFill==null;return i?o&&(n.textFill=r.insideFill||"#fff",!n.textStroke&&r.insideStroke&&(n.textStroke=r.insideStroke),!n.textStroke&&(n.textStroke=a),n.textStrokeWidth==null&&(n.textStrokeWidth=2)):(o&&(n.textFill=e.fill||r.outsideFill||"#000"),!n.textStroke&&r.outsideStroke&&(n.textStroke=r.outsideStroke)),n.text=t.text,n.rich=t.rich,D(t.rich,function(s){LF(s,s)}),n}function LF(e,t){t&&(st(t,"fill")&&(e.textFill=t.fill),st(t,"stroke")&&(e.textStroke=t.fill),st(t,"lineWidth")&&(e.textStrokeWidth=t.lineWidth),st(t,"font")&&(e.font=t.font),st(t,"fontStyle")&&(e.fontStyle=t.fontStyle),st(t,"fontWeight")&&(e.fontWeight=t.fontWeight),st(t,"fontSize")&&(e.fontSize=t.fontSize),st(t,"fontFamily")&&(e.fontFamily=t.fontFamily),st(t,"align")&&(e.textAlign=t.align),st(t,"verticalAlign")&&(e.textVerticalAlign=t.verticalAlign),st(t,"lineHeight")&&(e.textLineHeight=t.lineHeight),st(t,"width")&&(e.textWidth=t.width),st(t,"height")&&(e.textHeight=t.height),st(t,"backgroundColor")&&(e.textBackgroundColor=t.backgroundColor),st(t,"padding")&&(e.textPadding=t.padding),st(t,"borderColor")&&(e.textBorderColor=t.borderColor),st(t,"borderWidth")&&(e.textBorderWidth=t.borderWidth),st(t,"borderRadius")&&(e.textBorderRadius=t.borderRadius),st(t,"shadowColor")&&(e.textBoxShadowColor=t.shadowColor),st(t,"shadowBlur")&&(e.textBoxShadowBlur=t.shadowBlur),st(t,"shadowOffsetX")&&(e.textBoxShadowOffsetX=t.shadowOffsetX),st(t,"shadowOffsetY")&&(e.textBoxShadowOffsetY=t.shadowOffsetY),st(t,"textShadowColor")&&(e.textShadowColor=t.textShadowColor),st(t,"textShadowBlur")&&(e.textShadowBlur=t.textShadowBlur),st(t,"textShadowOffsetX")&&(e.textShadowOffsetX=t.textShadowOffsetX),st(t,"textShadowOffsetY")&&(e.textShadowOffsetY=t.textShadowOffsetY))}var kF={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},PF=St(kF),dqt=Pr(ri,function(e,t){return e[t]=1,e},{}),vqt=ri.join(", "),fm=["","style","shape","extra"],Bp=yt();function SE(e,t,r,n,i){var a=e+"Animation",o=ja(e,n,i)||{},s=Bp(t).userDuring;return o.duration>0&&(o.during=s?Z(Idt,{el:t,userDuring:s}):null,o.setToFinal=!0,o.scope=e),V(o,r[a]),o}function Fp(e,t,r,n){n=n||{};var i=n.dataIndex,a=n.isInit,o=n.clearStyle,s=r.isAnimationEnabled(),l=Bp(e),u=t.style;l.userDuring=t.during;var f={},c={};if(Pdt(e,t,c),NF("shape",t,c),NF("extra",t,c),!a&&s&&(Ldt(e,t,f),RF("shape",e,t,f),RF("extra",e,t,f),Rdt(e,t,u,f)),c.style=u,Adt(e,c,o),Ddt(e,t),s)if(a){var p={};D(fm,function(d){var m=d?t[d]:t;m&&m.enterFrom&&(d&&(p[d]=p[d]||{}),V(d?p[d]:p,m.enterFrom))});var h=SE("enter",e,t,r,i);h.duration>0&&e.animateFrom(p,h)}else Cdt(e,t,i||0,r,f);wE(e,t),u?e.dirty():e.markRedraw()}function wE(e,t){for(var r=Bp(e).leaveToProps,n=0;n0&&e.animateFrom(i,a)}}function Ddt(e,t){st(t,"silent")&&(e.silent=t.silent),st(t,"ignore")&&(e.ignore=t.ignore),e instanceof We&&st(t,"invisible")&&(e.invisible=t.invisible),e instanceof vt&&st(t,"autoBatch")&&(e.autoBatch=t.autoBatch)}var uo={},Edt={setTransform:function(e,t){return uo.el[e]=t,this},getTransform:function(e){return uo.el[e]},setShape:function(e,t){var r=uo.el,n=r.shape||(r.shape={});return n[e]=t,r.dirtyShape&&r.dirtyShape(),this},getShape:function(e){var t=uo.el.shape;if(t)return t[e]},setStyle:function(e,t){var r=uo.el,n=r.style;return n&&(n[e]=t,r.dirtyStyle&&r.dirtyStyle()),this},getStyle:function(e){var t=uo.el.style;if(t)return t[e]},setExtra:function(e,t){var r=uo.el.extra||(uo.el.extra={});return r[e]=t,this},getExtra:function(e){var t=uo.el.extra;if(t)return t[e]}};function Idt(){var e=this,t=e.el;if(t){var r=Bp(t).userDuring,n=e.userDuring;if(r!==n){e.el=e.userDuring=null;return}uo.el=t,n(Edt)}}function RF(e,t,r,n){var i=r[e];if(i){var a=t[e],o;if(a){var s=r.transition,l=i.transition;if(l)if(!o&&(o=n[e]={}),yl(l))V(o,a);else for(var u=Yt(l),f=0;f=0){!o&&(o=n[e]={});for(var h=St(a),f=0;f=0)){var p=e.getAnimationStyleProps(),h=p?p.style:null;if(h){!a&&(a=n.style={});for(var d=St(r),u=0;u=0?t.getStore().get(k,E):void 0}var O=t.get(R.name,E),z=R&&R.ordinalMeta;return z?z.categories[O]:O}function b(I,E){E==null&&(E=u);var R=t.getItemVisual(E,"style"),k=R&&R.fill,O=R&&R.opacity,z=y(E,xl).getItemStyle();k!=null&&(z.fill=k),O!=null&&(z.opacity=O);var U={inheritColor:H(k)?k:"#000"},G=x(E,xl),Y=Qt(G,null,U,!1,!0);Y.text=G.getShallow("show")?bt(e.getFormattedLabel(E,xl),xa(t,E)):null;var et=jd(G,U,!1);return M(I,z),z=bE(z,Y,et),I&&T(z,I),z.legacy=!0,z}function w(I,E){E==null&&(E=u);var R=y(E,is).getItemStyle(),k=x(E,is),O=Qt(k,null,null,!0,!0);O.text=k.getShallow("show")?cr(e.getFormattedLabel(E,is),e.getFormattedLabel(E,xl),xa(t,E)):null;var z=jd(k,null,!0);return M(I,R),R=bE(R,O,z),I&&T(R,I),R.legacy=!0,R}function T(I,E){for(var R in E)st(E,R)&&(I[R]=E[R])}function M(I,E){I&&(I.textFill&&(E.textFill=I.textFill),I.textPosition&&(E.textPosition=I.textPosition))}function C(I,E){if(E==null&&(E=u),st(vE,I)){var R=t.getItemVisual(E,"style");return R?R[vE[I]]:null}if(st(DF,I))return t.getItemVisual(E,I)}function A(I){if(a.type==="cartesian2d"){var E=a.getBaseAxis();return CU(J({axis:E},I))}}function P(){return r.getCurrentSeriesIndices()}function L(I){return L0(I,r)}}function Hdt(e){var t={};return D(e.dimensions,function(r){var n=e.getDimensionInfo(r);if(!n.isExtraCoord){var i=n.coordDim,a=t[i]=t[i]||[];a[n.coordDimIndex]=e.getDimensionIndex(r)}}),t}function AE(e,t,r,n,i,a,o){if(!n){a.remove(t);return}var s=RE(e,t,r,n,i,a);return s&&o.setItemGraphicEl(r,s),s&&Zt(s,n.focus,n.blurScope,n.emphasisDisabled),s}function RE(e,t,r,n,i,a){var o=-1,s=t;t&&HF(t,n,i)&&(o=gt(a.childrenRef(),t),t=null);var l=!t,u=t;u?u.clearStates():(u=LE(n),s&&Vdt(s,u)),n.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),Ui.normal.cfg=Ui.normal.conOpt=Ui.emphasis.cfg=Ui.emphasis.conOpt=Ui.blur.cfg=Ui.blur.conOpt=Ui.select.cfg=Ui.select.conOpt=null,Ui.isLegacy=!1,Ydt(u,r,n,i,l,Ui),Wdt(u,r,n,i,l),PE(e,u,r,n,Ui,i,l),st(n,"info")&&(lo(u).info=n.info);for(var f=0;f<_l.length;f++){var c=_l[f];if(c!==xl){var p=o_(n,c),h=NE(n,p,c);GF(c,u,p,h,Ui)}}return Fdt(u,n,i),n.type==="group"&&Xdt(e,u,r,n,i),o>=0?a.replaceAt(u,o):a.add(u),u}function HF(e,t,r){var n=lo(e),i=t.type,a=t.shape,o=t.style;return r.isUniversalTransitionEnabled()||i!=null&&i!==n.customGraphicType||i==="path"&&$dt(a)&&WF(a)!==n.customPathData||i==="image"&&st(o,"image")&&o.image!==n.customImagePath}function Wdt(e,t,r,n,i){var a=r.clipPath;if(a===!1)e&&e.getClipPath()&&e.removeClipPath();else if(a){var o=e.getClipPath();o&&HF(o,a,n)&&(o=null),o||(o=LE(a),e.setClipPath(o)),PE(null,o,t,a,null,n,i)}}function Ydt(e,t,r,n,i,a){if(!e.isGroup){UF(r,null,a),UF(r,is,a);var o=a.normal.conOpt,s=a.emphasis.conOpt,l=a.blur.conOpt,u=a.select.conOpt;if(o!=null||s!=null||u!=null||l!=null){var f=e.getTextContent();if(o===!1)f&&e.removeTextContent();else{o=a.normal.conOpt=o||{type:"text"},f?f.clearStates():(f=LE(o),e.setTextContent(f)),PE(null,f,t,o,null,n,i);for(var c=o&&o.style,p=0;p<_l.length;p++){var h=_l[p];if(h!==xl){var d=a[h].conOpt;GF(h,f,d,NE(o,d,h),null)}}c?f.dirty():f.markRedraw()}}}}function UF(e,t,r){var n=t?o_(e,t):e,i=t?NE(e,n,is):e.style,a=e.type,o=n?n.textConfig:null,s=e.textContent,l=s?t?o_(s,t):s:null;if(i&&(r.isLegacy||n_(i,a,!!o,!!l))){r.isLegacy=!0;var u=i_(i,a,!t);!o&&u.textConfig&&(o=u.textConfig),!l&&u.textContent&&(l=u.textContent)}if(!t&&l){var f=l;!f.type&&(f.type="text")}var c=t?r[t]:r.normal;c.cfg=o,c.conOpt=l}function o_(e,t){return t?e?e[t]:null:e}function NE(e,t,r){var n=t&&t.style;return n==null&&r===is&&e&&(n=e.styleEmphasis),n}function Xdt(e,t,r,n,i){var a=n.children,o=a?a.length:0,s=n.$mergeChildren,l=s==="byName"||n.diffChildrenByName,u=s===!1;if(!(!o&&!l&&!u)){if(l){Zdt({api:e,oldChildren:t.children()||[],newChildren:a||[],dataIndex:r,seriesModel:i,group:t});return}u&&t.removeAll();for(var f=0;f=f;h--){var d=t.childAt(h);qdt(t,d,i)}}}function qdt(e,t,r){t&&Gp(t,lo(e).option,r)}function Zdt(e){new Vr(e.oldChildren,e.newChildren,VF,VF,e).add(BF).update(BF).remove(Kdt).execute()}function VF(e,t){var r=e&&e.name;return r??zdt+t}function BF(e,t){var r=this.context,n=e!=null?r.newChildren[e]:null,i=t!=null?r.oldChildren[t]:null;RE(r.api,i,r.dataIndex,n,r.seriesModel,r.group)}function Kdt(e){var t=this.context,r=t.oldChildren[e];r&&Gp(r,lo(r).option,t.seriesModel)}function WF(e){return e&&(e.pathData||e.d)}function $dt(e){return e&&(st(e,"pathData")||st(e,"d"))}function kE(e){e.registerChartView(FF),e.registerSeriesModel(EF)}var gf=yt(),YF=at,OE=Z,jdt=function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(t,r,n,i){var a=r.get("value"),o=r.get("status");if(this._axisModel=t,this._axisPointerModel=r,this._api=n,!(!i&&this._lastValue===a&&this._lastStatus===o)){this._lastValue=a,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,a,t,r,n);var f=u.graphicKey;f!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=f;var c=this._moveAnimation=this.determineAnimation(t,r);if(!s)s=this._group=new nt,this.createPointerEl(s,u,t,r),this.createLabelEl(s,u,t,r),n.getZr().add(s);else{var p=pt(XF,r,c);this.updatePointerEl(s,u,p),this.updateLabelEl(s,u,p,r)}ZF(s,r,!0),this._renderHandle(a)}},e.prototype.remove=function(t){this.clear(t)},e.prototype.dispose=function(t){this.clear(t)},e.prototype.determineAnimation=function(t,r){var n=r.get("animation"),i=t.axis,a=i.type==="category",o=r.get("snap");if(!o&&!a)return!1;if(n==="auto"||n==null){var s=this.animationThreshold;if(a&&i.getBandWidth()>s)return!0;if(o){var l=S1(t).seriesDataCount,u=i.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return n===!0},e.prototype.makeElOption=function(t,r,n,i,a){},e.prototype.createPointerEl=function(t,r,n,i){var a=r.pointer;if(a){var o=gf(t).pointerEl=new Et[a.type](YF(r.pointer));t.add(o)}},e.prototype.createLabelEl=function(t,r,n,i){if(r.label){var a=gf(t).labelEl=new Lt(YF(r.label));t.add(a),qF(a,i)}},e.prototype.updatePointerEl=function(t,r,n){var i=gf(t).pointerEl;i&&r.pointer&&(i.setStyle(r.pointer.style),n(i,{shape:r.pointer.shape}))},e.prototype.updateLabelEl=function(t,r,n,i){var a=gf(t).labelEl;a&&(a.setStyle(r.label.style),n(a,{x:r.label.x,y:r.label.y}),qF(a,i))},e.prototype._renderHandle=function(t){if(!(this._dragging||!this.updateHandleTransform)){var r=this._axisPointerModel,n=this._api.getZr(),i=this._handle,a=r.getModel("handle"),o=r.get("status");if(!a.get("show")||!o||o==="hide"){i&&n.remove(i),this._handle=null;return}var s;this._handle||(s=!0,i=this._handle=Yo(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){Mn(u.event)},onmousedown:OE(this._onHandleDragMove,this,0,0),drift:OE(this._onHandleDragMove,this),ondragend:OE(this._onHandleDragEnd,this)}),n.add(i)),ZF(i,r,!1),i.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=a.get("size");B(l)||(l=[l,l]),i.scaleX=l[0]/2,i.scaleY=l[1]/2,Li(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,s)}},e.prototype._moveHandleToValue=function(t,r){XF(this._axisPointerModel,!r&&this._moveAnimation,this._handle,zE(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(t,r){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(zE(n),[t,r],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(zE(i)),gf(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){var t=this._handle;if(t){var r=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:r.cursorPoint[0],y:r.cursorPoint[1],tooltipOption:r.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){this._dragging=!1;var t=this._handle;if(t){var r=this._axisPointerModel.get("value");this._moveHandleToValue(r),this._api.dispatchAction({type:"hideTip"})}},e.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var r=t.getZr(),n=this._group,i=this._handle;r&&n&&(this._lastGraphicKey=null,n&&r.remove(n),i&&r.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),Qo(this,"_doDispatchAxisPointer")},e.prototype.doClear=function(){},e.prototype.buildLabel=function(t,r,n){return n=n||0,{x:t[n],y:t[1-n],width:r[n],height:r[1-n]}},e}();function XF(e,t,r,n){KF(gf(r).lastProp,n)||(gf(r).lastProp=n,t?Rt(r,n,e):(r.stopAnimation(),r.attr(n)))}function KF(e,t){if(rt(e)&&rt(t)){var r=!0;return D(t,function(n,i){r=r&&KF(e[i],n)}),!!r}else return e===t}function qF(e,t){e[t.get(["label","show"])?"show":"hide"]()}function zE(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function ZF(e,t,r){var n=t.get("z"),i=t.get("zlevel");e&&e.traverse(function(a){a.type!=="group"&&(n!=null&&(a.z=n),i!=null&&(a.zlevel=i),a.silent=r)})}var Wp=jdt;function Yp(e){var t=e.get("type"),r=e.getModel(t+"Style"),n;return t==="line"?(n=r.getLineStyle(),n.fill=null):t==="shadow"&&(n=r.getAreaStyle(),n.stroke=null),n}function UE(e,t,r,n,i){var a=r.get("value"),o=VE(a,t.axis,t.ecModel,r.get("seriesDataIndices"),{precision:r.get(["label","precision"]),formatter:r.get(["label","formatter"])}),s=r.getModel("label"),l=la(s.get("padding")||0),u=s.getFont(),f=Ga(o,u),c=i.position,p=f.width+l[1]+l[3],h=f.height+l[0]+l[2],d=i.align;d==="right"&&(c[0]-=p),d==="center"&&(c[0]-=p/2);var m=i.verticalAlign;m==="bottom"&&(c[1]-=h),m==="middle"&&(c[1]-=h/2),Qdt(c,p,h,n);var v=s.get("backgroundColor");(!v||v==="auto")&&(v=t.get(["axisLine","lineStyle","color"])),e.label={x:c[0],y:c[1],style:Qt(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:v}),z2:10}}function Qdt(e,t,r,n){var i=n.getWidth(),a=n.getHeight();e[0]=Math.min(e[0]+t,i)-t,e[1]=Math.min(e[1]+r,a)-r,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}function VE(e,t,r,n,i){e=t.scale.parse(e);var a=t.scale.getLabel({value:e},{precision:i.precision}),o=i.formatter;if(o){var s={value:Ov(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};D(n,function(l){var u=r.getSeriesByIndex(l.seriesIndex),f=l.dataIndexInside,c=u&&u.getDataParams(f);c&&s.seriesData.push(c)}),H(o)?a=o.replace("{value}",a):j(o)&&(a=o(s))}return a}function cm(e,t,r){var n=tr();return Cn(n,n,r.rotation),Nr(n,n,r.position),Or([e.dataToCoord(t),(r.labelOffset||0)+(r.labelDirection||1)*(r.labelMargin||0)],n)}function s_(e,t,r,n,i,a){var o=Br.innerTextLayout(r.rotation,0,r.labelDirection);r.labelMargin=i.get(["label","margin"]),UE(t,n,i,a,{position:cm(n.axis,e,r),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function Xp(e,t,r){return r=r||0,{x1:e[r],y1:e[1-r],x2:t[r],y2:t[1-r]}}function l_(e,t,r){return r=r||0,{x:e[r],y:e[1-r],width:t[r],height:t[1-r]}}function BE(e,t,r,n,i,a){return{cx:e,cy:t,r0:r,r:n,startAngle:i,endAngle:a,clockwise:!0}}var Jdt=function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis,l=s.grid,u=a.get("type"),f=$F(l,s).getOtherAxis(s).getGlobalExtent(),c=s.toGlobalCoord(s.dataToCoord(n,!0));if(u&&u!=="none"){var p=Yp(a),h=tvt[u](s,c,f);h.style=p,r.graphicKey=h.type,r.pointer=h}var d=qv(l.model,i);s_(n,r,d,i,a,o)},t.prototype.getHandleTransform=function(r,n,i){var a=qv(n.axis.grid.model,n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=cm(n.axis,r,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(r,n,i,a){var o=i.axis,s=o.grid,l=o.getGlobalExtent(!0),u=$F(s,o).getOtherAxis(o).getGlobalExtent(),f=o.dim==="x"?0:1,c=[r.x,r.y];c[f]+=n[f],c[f]=Math.min(l[1],c[f]),c[f]=Math.max(l[0],c[f]);var p=(u[1]+u[0])/2,h=[p,p];h[f]=c[f];var d=[{verticalAlign:"middle"},{align:"center"}];return{x:c[0],y:c[1],rotation:r.rotation,cursorPoint:h,tooltipOption:d[f]}},t}(Wp);function $F(e,t){var r={};return r[t.dim+"AxisIndex"]=t.index,e.getCartesian(r)}var tvt={line:function(e,t,r){var n=Xp([t,r[0]],[t,r[1]],jF(e));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(e,t,r){var n=Math.max(1,e.getBandWidth()),i=r[1]-r[0];return{type:"Rect",shape:l_([t-n/2,r[0]],[n,i],jF(e))}}};function jF(e){return e.dim==="x"?0:1}var QF=Jdt;var evt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="axisPointer",t.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#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}},t}(Pt),JF=evt;var as=yt(),rvt=D;function f_(e,t,r){if(!Ot.node){var n=t.getZr();as(n).records||(as(n).records={}),nvt(n,t);var i=as(n).records[e]||(as(n).records[e]={});i.handler=r}}function nvt(e,t){if(as(e).initialized)return;as(e).initialized=!0,r("click",pt(t9,"click")),r("mousemove",pt(t9,"mousemove")),r("globalout",avt);function r(n,i){e.on(n,function(a){var o=ovt(t);rvt(as(e).records,function(s){s&&i(s,a,o.dispatchAction)}),ivt(o.pendings,t)})}}function ivt(e,t){var r=e.showTip.length,n=e.hideTip.length,i;r?i=e.showTip[r-1]:n&&(i=e.hideTip[n-1]),i&&(i.dispatchAction=null,t.dispatchAction(i))}function avt(e,t,r){e.handler("leave",null,r)}function t9(e,t,r,n){t.handler(e,r,n)}function ovt(e){var t={showTip:[],hideTip:[]},r=function(n){var i=t[n.type];i?i.push(n):(n.dispatchAction=r,e.dispatchAction(n))};return{dispatchAction:r,pendings:t}}function pm(e,t){if(!Ot.node){var r=t.getZr(),n=(as(r).records||{})[e];n&&(as(r).records[e]=null)}}var svt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a=n.getComponent("tooltip"),o=r.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click";f_("axisPointer",i,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},t.prototype.remove=function(r,n){pm("axisPointer",n)},t.prototype.dispose=function(r,n){pm("axisPointer",n)},t.type="axisPointer",t}(Xt),r9=svt;function hm(e,t){var r=[],n=e.seriesIndex,i;if(n==null||!(i=t.getSeriesByIndex(n)))return{point:[]};var a=i.getData(),o=wi(a,e);if(o==null||o<0||B(o))return{point:[]};var s=a.getItemGraphicEl(o),l=i.coordinateSystem;if(i.getTooltipPosition)r=i.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(e.isStacked){var u=l.getBaseAxis(),f=l.getOtherAxis(u),c=f.dim,p=u.dim,h=c==="x"||c==="radius"?1:0,d=a.mapDimension(p),m=[];m[h]=a.get(d,o),m[1-h]=a.get(a.getCalculationInfo("stackResultDimension"),o),r=l.dataToPoint(m)||[]}else r=l.dataToPoint(a.getValues(F(l.dimensions,function(g){return a.mapDimension(g)}),o))||[];else if(s){var v=s.getBoundingRect().clone();v.applyTransform(s.transform),r=[v.x+v.width/2,v.y+v.height/2]}return{point:r,el:s}}var n9=yt();function FE(e,t,r){var n=e.currTrigger,i=[e.x,e.y],a=e,o=e.dispatchAction||Z(r.dispatchAction,r),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){c_(i)&&(i=hm({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var l=c_(i),u=a.axesInfo,f=s.axesInfo,c=n==="leave"||c_(i),p={},h={},d={list:[],map:{}},m={showPointer:pt(uvt,h),showTooltip:pt(fvt,d)};D(s.coordSysMap,function(g,y){var x=l||g.containPoint(i);D(s.coordSysAxesInfo[y],function(_,S){var b=_.axis,w=dvt(u,_);if(!c&&x&&(!u||w)){var T=w&&w.value;T==null&&!l&&(T=b.pointToData(i)),T!=null&&i9(_,T,m,!1,p)}})});var v={};return D(f,function(g,y){var x=g.linkGroup;x&&!h[y]&&D(x.axesInfo,function(_,S){var b=h[S];if(_!==g&&b){var w=b.value;x.mapper&&(w=g.axis.scale.parse(x.mapper(w,a9(_),a9(g)))),v[g.key]=w}})}),D(v,function(g,y){i9(f[y],g,m,!0,p)}),cvt(h,f,p),pvt(d,i,e,o),hvt(f,o,r),p}}function i9(e,t,r,n,i){var a=e.axis;if(!(a.scale.isBlank()||!a.containData(t))){if(!e.involveSeries){r.showPointer(e,t);return}var o=lvt(t,e),s=o.payloadBatch,l=o.snapToValue;s[0]&&i.seriesIndex==null&&V(i,s[0]),!n&&e.snap&&a.containData(l)&&l!=null&&(t=l),r.showPointer(e,t,s),r.showTooltip(e,o,l)}}function lvt(e,t){var r=t.axis,n=r.dim,i=e,a=[],o=Number.MAX_VALUE,s=-1;return D(t.seriesModels,function(l,u){var f=l.getData().mapDimensionsAll(n),c,p;if(l.getAxisTooltipData){var h=l.getAxisTooltipData(f,e,r);p=h.dataIndices,c=h.nestestValue}else{if(p=l.getData().indicesOfNearest(f[0],e,r.type==="category"?.5:null),!p.length)return;c=l.getData().get(f[0],p[0])}if(!(c==null||!isFinite(c))){var d=e-c,m=Math.abs(d);m<=o&&((m=0&&s<0)&&(o=m,s=d,i=c,a.length=0),D(p,function(v){a.push({seriesIndex:l.seriesIndex,dataIndexInside:v,dataIndex:l.getData().getRawIndex(v)})}))}}),{payloadBatch:a,snapToValue:i}}function uvt(e,t,r,n){e[t.key]={value:r,payloadBatch:n}}function fvt(e,t,r,n){var i=r.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(!(!t.triggerTooltip||!i.length)){var l=t.coordSys.model,u=Sp(l),f=e.map[u];f||(f=e.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},e.list.push(f)),f.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:n,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:i.slice()})}}function cvt(e,t,r){var n=r.axesInfo=[];D(t,function(i,a){var o=i.axisPointerModel.option,s=e[a];s?(!i.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!i.useHandle&&(o.status="hide"),o.status==="show"&&n.push({axisDim:i.axis.dim,axisIndex:i.axis.model.componentIndex,value:o.value})})}function pvt(e,t,r,n){if(c_(t)||!e.list.length){n({type:"hideTip"});return}var i=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:r.tooltipOption,position:r.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:e.list})}function hvt(e,t,r){var n=r.getZr(),i="axisPointerLastHighlights",a=n9(n)[i]||{},o=n9(n)[i]={};D(e,function(u,f){var c=u.axisPointerModel.option;c.status==="show"&&u.triggerEmphasis&&D(c.seriesDataIndices,function(p){var h=p.seriesIndex+" | "+p.dataIndex;o[h]=p})});var s=[],l=[];D(a,function(u,f){!o[f]&&l.push(u)}),D(o,function(u,f){!a[f]&&s.push(u)}),l.length&&r.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&r.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function dvt(e,t){for(var r=0;r<(e||[]).length;r++){var n=e[r];if(t.axis.dim===n.axisDim&&t.axis.model.componentIndex===n.axisIndex)return n}}function a9(e){var t=e.axis.model,r={},n=r.axisDim=e.axis.dim;return r.axisIndex=r[n+"AxisIndex"]=t.componentIndex,r.axisName=r[n+"AxisName"]=t.name,r.axisId=r[n+"AxisId"]=t.id,r}function c_(e){return!e||e[0]==null||isNaN(e[0])||e[1]==null||isNaN(e[1])}function wa(e){Gn.registerAxisPointerClass("CartesianAxisPointer",QF),e.registerComponentModel(JF),e.registerComponentView(r9),e.registerPreprocessor(function(t){if(t){(!t.axisPointer||t.axisPointer.length===0)&&(t.axisPointer={});var r=t.axisPointer.link;r&&!B(r)&&(t.axisPointer.link=[r])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,function(t,r){t.getComponent("axisPointer").coordSysAxesInfo=P6(t,r)}),e.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},FE)}function GE(e){Nt(M1),Nt(wa)}var vvt=function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),f=u.getExtent(),c=s.dataToCoord(n),p=a.get("type");if(p&&p!=="none"){var h=Yp(a),d=gvt[p](s,l,c,f);d.style=h,r.graphicKey=d.type,r.pointer=d}var m=a.get(["label","margin"]),v=mvt(n,i,a,l,m);UE(r,i,a,o,v)},t}(Wp);function mvt(e,t,r,n,i){var a=t.axis,o=a.dataToCoord(e),s=n.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=n.getRadiusAxis().getExtent(),u,f,c;if(a.dim==="radius"){var p=tr();Cn(p,p,s),Nr(p,p,[n.cx,n.cy]),u=Or([o,-i],p);var h=t.getModel("axisLabel").get("rotate")||0,d=Br.innerTextLayout(s,h*Math.PI/180,-1);f=d.textAlign,c=d.textVerticalAlign}else{var m=l[1];u=n.coordToPoint([m+i,o]);var v=n.cx,g=n.cy;f=Math.abs(u[0]-v)/m<.3?"center":u[0]>v?"left":"right",c=Math.abs(u[1]-g)/m<.3?"middle":u[1]>g?"top":"bottom"}return{position:u,align:f,verticalAlign:c}}var gvt={line:function(e,t,r,n){return e.dim==="angle"?{type:"Line",shape:Xp(t.coordToPoint([n[0],r]),t.coordToPoint([n[1],r]))}:{type:"Circle",shape:{cx:t.cx,cy:t.cy,r}}},shadow:function(e,t,r,n){var i=Math.max(1,e.getBandWidth()),a=Math.PI/180;return e.dim==="angle"?{type:"Sector",shape:BE(t.cx,t.cy,n[0],n[1],(-r-i/2)*a,(-r+i/2)*a)}:{type:"Sector",shape:BE(t.cx,t.cy,r-i/2,r+i/2,0,Math.PI*2)}}},o9=vvt;var yvt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.findAxisModel=function(r){var n,i=this.ecModel;return i.eachComponent(r,function(a){a.getCoordSysModel()===this&&(n=a)},this),n},t.type="polar",t.dependencies=["radiusAxis","angleAxis"],t.defaultOption={z:0,center:["50%","50%"],radius:"80%"},t}(Pt),s9=yvt;var HE=function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",se).models[0]},t.type="polarAxis",t}(Pt);ie(HE,to);var l9=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="angleAxis",t}(HE);var u9=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="radiusAxis",t}(HE);var WE=function(e){N(t,e);function t(r,n){return e.call(this,"radius",r,n)||this}return t.prototype.pointToData=function(r,n){return this.polar.pointToData(r,n)[this.dim==="radius"?0:1]},t}(Mr);WE.prototype.dataToRadius=Mr.prototype.dataToCoord;WE.prototype.radiusToData=Mr.prototype.coordToData;var f9=WE;var xvt=yt(),YE=function(e){N(t,e);function t(r,n){return e.call(this,"angle",r,n||[0,360])||this}return t.prototype.pointToData=function(r,n){return this.polar.pointToData(r,n)[this.dim==="radius"?0:1]},t.prototype.calculateCategoryInterval=function(){var r=this,n=r.getLabelModel(),i=r.scale,a=i.getExtent(),o=i.count();if(a[1]-a[0]<1)return 0;var s=a[0],l=r.dataToCoord(s+1)-r.dataToCoord(s),u=Math.abs(l),f=Ga(s==null?"":s+"",n.getFont(),"center","top"),c=Math.max(f.height,7),p=c/u;isNaN(p)&&(p=1/0);var h=Math.max(0,Math.floor(p)),d=xvt(r.model),m=d.lastAutoInterval,v=d.lastTickCount;return m!=null&&v!=null&&Math.abs(m-h)<=1&&Math.abs(v-o)<=1&&m>h?h=m:(d.lastTickCount=o,d.lastAutoInterval=h),h},t}(Mr);YE.prototype.dataToAngle=Mr.prototype.dataToCoord;YE.prototype.angleToData=Mr.prototype.coordToData;var c9=YE;var XE=["radius","angle"],_vt=function(){function e(t){this.dimensions=XE,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new f9,this._angleAxis=new c9,this.axisPointerEnabled=!0,this.name=t||"",this._radiusAxis.polar=this._angleAxis.polar=this}return e.prototype.containPoint=function(t){var r=this.pointToCoord(t);return this._radiusAxis.contain(r[0])&&this._angleAxis.contain(r[1])},e.prototype.containData=function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},e.prototype.getAxis=function(t){var r="_"+t+"Axis";return this[r]},e.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},e.prototype.getAxesByScale=function(t){var r=[],n=this._angleAxis,i=this._radiusAxis;return n.scale.type===t&&r.push(n),i.scale.type===t&&r.push(i),r},e.prototype.getAngleAxis=function(){return this._angleAxis},e.prototype.getRadiusAxis=function(){return this._radiusAxis},e.prototype.getOtherAxis=function(t){var r=this._angleAxis;return t===r?this._radiusAxis:r},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},e.prototype.getTooltipAxes=function(t){var r=t!=null&&t!=="auto"?this.getAxis(t):this.getBaseAxis();return{baseAxes:[r],otherAxes:[this.getOtherAxis(r)]}},e.prototype.dataToPoint=function(t,r){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],r),this._angleAxis.dataToAngle(t[1],r)])},e.prototype.pointToData=function(t,r){var n=this.pointToCoord(t);return[this._radiusAxis.radiusToData(n[0],r),this._angleAxis.angleToData(n[1],r)]},e.prototype.pointToCoord=function(t){var r=t[0]-this.cx,n=t[1]-this.cy,i=this.getAngleAxis(),a=i.getExtent(),o=Math.min(a[0],a[1]),s=Math.max(a[0],a[1]);i.inverse?o=s-360:s=o+360;var l=Math.sqrt(r*r+n*n);r/=l,n/=l;for(var u=Math.atan2(-n,r)/Math.PI*180,f=us;)u+=f*360;return[l,u]},e.prototype.coordToPoint=function(t){var r=t[0],n=t[1]/180*Math.PI,i=Math.cos(n)*r+this.cx,a=-Math.sin(n)*r+this.cy;return[i,a]},e.prototype.getArea=function(){var t=this.getAngleAxis(),r=this.getRadiusAxis(),n=r.getExtent().slice();n[0]>n[1]&&n.reverse();var i=t.getExtent(),a=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:n[0],r:n[1],startAngle:-i[0]*a,endAngle:-i[1]*a,clockwise:t.inverse,contain:function(o,s){var l=o-this.cx,u=s-this.cy,f=l*l+u*u-1e-4,c=this.r,p=this.r0;return f<=c*c&&f>=p*p}}},e.prototype.convertToPixel=function(t,r,n){var i=p9(r);return i===this?this.dataToPoint(n):null},e.prototype.convertFromPixel=function(t,r,n){var i=p9(r);return i===this?this.pointToData(n):null},e}();function p9(e){var t=e.seriesModel,r=e.polarModel;return r&&r.coordinateSystem||t&&t.coordinateSystem}var h9=_vt;function bvt(e,t,r){var n=t.get("center"),i=r.getWidth(),a=r.getHeight();e.cx=q(n[0],i),e.cy=q(n[1],a);var o=e.getRadiusAxis(),s=Math.min(i,a)/2,l=t.get("radius");l==null?l=[0,"100%"]:B(l)||(l=[0,l]);var u=[q(l[0],s),q(l[1],s)];o.inverse?o.setExtent(u[1],u[0]):o.setExtent(u[0],u[1])}function Svt(e,t){var r=this,n=r.getAngleAxis(),i=r.getRadiusAxis();if(n.scale.setExtent(1/0,-1/0),i.scale.setExtent(1/0,-1/0),e.eachSeries(function(s){if(s.coordinateSystem===r){var l=s.getData();D(mp(l,"radius"),function(u){i.scale.unionExtentFromData(l,u)}),D(mp(l,"angle"),function(u){n.scale.unionExtentFromData(l,u)})}}),Ja(n.scale,n.model),Ja(i.scale,i.model),n.type==="category"&&!n.onBand){var a=n.getExtent(),o=360/n.scale.count();n.inverse?a[1]+=o:a[1]-=o,n.setExtent(a[0],a[1])}}function wvt(e){return e.mainType==="angleAxis"}function d9(e,t){if(e.type=t.get("type"),e.scale=ol(t),e.onBand=t.get("boundaryGap")&&e.type==="category",e.inverse=t.get("inverse"),wvt(t)){e.inverse=e.inverse!==t.get("clockwise");var r=t.get("startAngle");e.setExtent(r,r+(e.inverse?-360:360))}t.axis=e,e.model=t}var Tvt={dimensions:XE,create:function(e,t){var r=[];return e.eachComponent("polar",function(n,i){var a=new h9(i+"");a.update=Svt;var o=a.getRadiusAxis(),s=a.getAngleAxis(),l=n.findAxisModel("radiusAxis"),u=n.findAxisModel("angleAxis");d9(o,l),d9(s,u),bvt(a,n,t),r.push(a),n.coordinateSystem=a,a.model=n}),e.eachSeries(function(n){if(n.get("coordinateSystem")==="polar"){var i=n.getReferringComponents("polar",se).models[0];n.coordinateSystem=i.coordinateSystem}}),r}},v9=Tvt;var Mvt=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function p_(e,t,r){t[1]>t[0]&&(t=t.slice().reverse());var n=e.coordToPoint([t[0],r]),i=e.coordToPoint([t[1],r]);return{x1:n[0],y1:n[1],x2:i[0],y2:i[1]}}function h_(e){var t=e.getRadiusAxis();return t.inverse?0:1}function m9(e){var t=e[0],r=e[e.length-1];t&&r&&Math.abs(Math.abs(t.coord-r.coord)-360)<1e-4&&e.pop()}var Avt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.axisPointerClass="PolarAxisPointer",r}return t.prototype.render=function(r,n){if(this.group.removeAll(),!!r.get("show")){var i=r.axis,a=i.polar,o=a.getRadiusAxis().getExtent(),s=i.getTicksCoords(),l=i.getMinorTicksCoords(),u=F(i.getViewLabels(),function(f){f=at(f);var c=i.scale,p=c.type==="ordinal"?c.getRawOrdinalNumber(f.tickValue):f.tickValue;return f.coord=i.dataToCoord(p),f});m9(u),m9(s),D(Mvt,function(f){r.get([f,"show"])&&(!i.scale.isBlank()||f==="axisLine")&&Cvt[f](this.group,r,a,s,l,o,u)},this)}},t.type="angleAxis",t}(Gn),Cvt={axisLine:function(e,t,r,n,i,a){var o=t.getModel(["axisLine","lineStyle"]),s=h_(r),l=s?0:1,u;a[l]===0?u=new Sr({shape:{cx:r.cx,cy:r.cy,r:a[s]},style:o.getLineStyle(),z2:1,silent:!0}):u=new zu({shape:{cx:r.cx,cy:r.cy,r:a[s],r0:a[l]},style:o.getLineStyle(),z2:1,silent:!0}),u.style.fill=null,e.add(u)},axisTick:function(e,t,r,n,i,a){var o=t.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=a[h_(r)],u=F(n,function(f){return new De({shape:p_(r,[l,l+s],f.coord)})});e.add(Zr(u,{style:J(o.getModel("lineStyle").getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])})}))},minorTick:function(e,t,r,n,i,a){if(i.length){for(var o=t.getModel("axisTick"),s=t.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=a[h_(r)],f=[],c=0;cg?"left":"right",_=Math.abs(v[1]-y)/m<.3?"middle":v[1]>y?"top":"bottom";if(s&&s[d]){var S=s[d];rt(S)&&S.textStyle&&(h=new Ht(S.textStyle,l,l.ecModel))}var b=new Lt({silent:Br.isLabelSilent(t),style:Qt(h,{x:v[0],y:v[1],fill:h.getTextColor()||t.get(["axisLine","lineStyle","color"]),text:c.formattedLabel,align:x,verticalAlign:_})});if(e.add(b),f){var w=Br.makeAxisEventDataBase(t);w.targetType="axisLabel",w.value=c.rawLabel,ht(b).eventData=w}},this)},splitLine:function(e,t,r,n,i,a){var o=t.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var f=[],c=0;c=0?"p":"n",L=w;S&&(n[f][A]||(n[f][A]={p:w,n:w}),L=n[f][A][P]);var I=void 0,E=void 0,R=void 0,k=void 0;if(d.dim==="radius"){var O=d.dataToCoord(C)-w,z=l.dataToCoord(A);Math.abs(O)=k})}}})}function Nvt(e){var t={};D(e,function(n,i){var a=n.getData(),o=n.coordinateSystem,s=o.getBaseAxis(),l=_9(o,s),u=s.getExtent(),f=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/a.count(),c=t[l]||{bandWidth:f,remainedWidth:f,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},p=c.stacks;t[l]=c;var h=x9(n);p[h]||c.autoWidthCount++,p[h]=p[h]||{width:0,maxWidth:0};var d=q(n.get("barWidth"),f),m=q(n.get("barMaxWidth"),f),v=n.get("barGap"),g=n.get("barCategoryGap");d&&!p[h].width&&(d=Math.min(c.remainedWidth,d),p[h].width=d,c.remainedWidth-=d),m&&(p[h].maxWidth=m),v!=null&&(c.gap=v),g!=null&&(c.categoryGap=g)});var r={};return D(t,function(n,i){r[i]={};var a=n.stacks,o=n.bandWidth,s=q(n.categoryGap,o),l=q(n.gap,1),u=n.remainedWidth,f=n.autoWidthCount,c=(u-s)/(f+(f-1)*l);c=Math.max(c,0),D(a,function(m,v){var g=m.maxWidth;g&&g=r.y&&t[1]<=r.y+r.height:n.contain(n.toLocalCoord(t[1]))&&t[0]>=r.y&&t[0]<=r.y+r.height},e.prototype.pointToData=function(t){var r=this.getAxis();return[r.coordToData(r.toLocalCoord(t[r.orient==="horizontal"?0:1]))]},e.prototype.dataToPoint=function(t){var r=this.getAxis(),n=this.getRect(),i=[],a=r.orient==="horizontal"?0:1;return t instanceof Array&&(t=t[0]),i[a]=r.toGlobalCoord(r.dataToCoord(+t)),i[1-a]=a===0?n.y+n.height/2:n.x+n.width/2,i},e.prototype.convertToPixel=function(t,r,n){var i=A9(r);return i===this?this.dataToPoint(n):null},e.prototype.convertFromPixel=function(t,r,n){var i=A9(r);return i===this?this.pointToData(n):null},e}();function A9(e){var t=e.seriesModel,r=e.singleAxisModel;return r&&r.coordinateSystem||t&&t.coordinateSystem}var C9=Hvt;function Wvt(e,t){var r=[];return e.eachComponent("singleAxis",function(n,i){var a=new C9(n,e,t);a.name="single_"+i,a.resize(n,t),n.coordinateSystem=a,r.push(a)}),e.eachSeries(function(n){if(n.get("coordinateSystem")==="singleAxis"){var i=n.getReferringComponents("singleAxis",se).models[0];n.coordinateSystem=i&&i.coordinateSystem}}),r}var Yvt={create:Wvt,dimensions:ZE},D9=Yvt;var E9=["x","y"],Xvt=["width","height"],qvt=function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis,l=s.coordinateSystem,u=KE(l,1-v_(s)),f=l.dataToPoint(n)[0],c=a.get("type");if(c&&c!=="none"){var p=Yp(a),h=Zvt[c](s,f,u);h.style=p,r.graphicKey=h.type,r.pointer=h}var d=dm(i);s_(n,r,d,i,a,o)},t.prototype.getHandleTransform=function(r,n,i){var a=dm(n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=cm(n.axis,r,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(r,n,i,a){var o=i.axis,s=o.coordinateSystem,l=v_(o),u=KE(s,l),f=[r.x,r.y];f[l]+=n[l],f[l]=Math.min(u[1],f[l]),f[l]=Math.max(u[0],f[l]);var c=KE(s,1-l),p=(c[1]+c[0])/2,h=[p,p];return h[l]=f[l],{x:f[0],y:f[1],rotation:r.rotation,cursorPoint:h,tooltipOption:{verticalAlign:"middle"}}},t}(Wp),Zvt={line:function(e,t,r){var n=Xp([t,r[0]],[t,r[1]],v_(e));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(e,t,r){var n=e.getBandWidth(),i=r[1]-r[0];return{type:"Rect",shape:l_([t-n/2,r[0]],[n,i],v_(e))}}};function v_(e){return e.isHorizontal()?0:1}function KE(e,t){var r=e.getRect();return[r[E9[t]],r[E9[t]]+r[Xvt[t]]]}var I9=qvt;var Kvt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="single",t}(Xt);function $E(e){Nt(wa),Gn.registerAxisPointerClass("SingleAxisPointer",I9),e.registerComponentView(Kvt),e.registerComponentView(w9),e.registerComponentModel(d_),Sa(e,"single",d_,d_.defaultOption),e.registerCoordinateSystem("single",D9)}var $vt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r,n,i){var a=Di(r);e.prototype.init.apply(this,arguments),L9(r,a)},t.prototype.mergeOption=function(r){e.prototype.mergeOption.apply(this,arguments),L9(this.option,r)},t.prototype.getCellSize=function(){return this.option.cellSize},t.type="calendar",t.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},t}(Pt);function L9(e,t){var r=e.cellSize,n;B(r)?n=r:n=e.cellSize=[r,r],n.length===1&&(n[1]=n[0]);var i=F([0,1],function(a){return $5(t,a)&&(n[a]="auto"),n[a]!=null&&n[a]!=="auto"});On(e,t,{type:"box",ignoreSize:i})}var P9=$vt;var jvt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a=this.group;a.removeAll();var o=r.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=n.getLocaleModel();this._renderDayRect(r,s,a),this._renderLines(r,s,l,a),this._renderYearText(r,s,l,a),this._renderMonthText(r,u,l,a),this._renderWeekText(r,u,s,l,a)},t.prototype._renderDayRect=function(r,n,i){for(var a=r.coordinateSystem,o=r.getModel("itemStyle").getItemStyle(),s=a.getCellWidth(),l=a.getCellHeight(),u=n.start.time;u<=n.end.time;u=a.getNextNDay(u,1).time){var f=a.dataToRect([u],!1).tl,c=new At({shape:{x:f[0],y:f[1],width:s,height:l},cursor:"default",style:o});i.add(c)}},t.prototype._renderLines=function(r,n,i,a){var o=this,s=r.coordinateSystem,l=r.getModel(["splitLine","lineStyle"]).getLineStyle(),u=r.get(["splitLine","show"]),f=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var c=n.start,p=0;c.time<=n.end.time;p++){d(c.formatedDate),p===0&&(c=s.getDateInfo(n.start.y+"-"+n.start.m));var h=c.date;h.setMonth(h.getMonth()+1),c=s.getDateInfo(h)}d(s.getNextNDay(n.end.time,1).formatedDate);function d(m){o._firstDayOfMonth.push(s.getDateInfo(m)),o._firstDayPoints.push(s.dataToRect([m],!1).tl);var v=o._getLinePointsOfOneWeek(r,m,i);o._tlpoints.push(v[0]),o._blpoints.push(v[v.length-1]),u&&o._drawSplitline(v,l,a)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,f,i),l,a),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,f,i),l,a)},t.prototype._getEdgesPoints=function(r,n,i){var a=[r[0].slice(),r[r.length-1].slice()],o=i==="horizontal"?0:1;return a[0][o]=a[0][o]-n/2,a[1][o]=a[1][o]+n/2,a},t.prototype._drawSplitline=function(r,n,i){var a=new Ie({z2:20,shape:{points:r},style:n});i.add(a)},t.prototype._getLinePointsOfOneWeek=function(r,n,i){for(var a=r.coordinateSystem,o=a.getDateInfo(n),s=[],l=0;l<7;l++){var u=a.getNextNDay(o.time,l),f=a.dataToRect([u.time],!1);s[2*u.day]=f.tl,s[2*u.day+1]=f[i==="horizontal"?"bl":"tr"]}return s},t.prototype._formatterLabel=function(r,n){return H(r)&&r?q5(r,n):j(r)?r(n):n.nameMap},t.prototype._yearTextPositionControl=function(r,n,i,a,o){var s=n[0],l=n[1],u=["center","bottom"];a==="bottom"?(l+=o,u=["center","top"]):a==="left"?s-=o:a==="right"?(s+=o,u=["center","top"]):l-=o;var f=0;return(a==="left"||a==="right")&&(f=Math.PI/2),{rotation:f,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},t.prototype._renderYearText=function(r,n,i,a){var o=r.getModel("yearLabel");if(o.get("show")){var s=o.get("margin"),l=o.get("position");l||(l=i!=="horizontal"?"top":"left");var u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],f=(u[0][0]+u[1][0])/2,c=(u[0][1]+u[1][1])/2,p=i==="horizontal"?0:1,h={top:[f,u[p][1]],bottom:[f,u[1-p][1]],left:[u[1-p][0],c],right:[u[p][0],c]},d=n.start.y;+n.end.y>+n.start.y&&(d=d+"-"+n.end.y);var m=o.get("formatter"),v={start:n.start.y,end:n.end.y,nameMap:d},g=this._formatterLabel(m,v),y=new Lt({z2:30,style:Qt(o,{text:g})});y.attr(this._yearTextPositionControl(y,h[l],i,l,s)),a.add(y)}},t.prototype._monthTextPositionControl=function(r,n,i,a,o){var s="left",l="top",u=r[0],f=r[1];return i==="horizontal"?(f=f+o,n&&(s="center"),a==="start"&&(l="bottom")):(u=u+o,n&&(l="middle"),a==="start"&&(s="right")),{x:u,y:f,align:s,verticalAlign:l}},t.prototype._renderMonthText=function(r,n,i,a){var o=r.getModel("monthLabel");if(o.get("show")){var s=o.get("nameMap"),l=o.get("margin"),u=o.get("position"),f=o.get("align"),c=[this._tlpoints,this._blpoints];(!s||H(s))&&(s&&(n=Jd(s)||n),s=n.get(["time","monthAbbr"])||[]);var p=u==="start"?0:1,h=i==="horizontal"?0:1;l=u==="start"?-l:l;for(var d=f==="center",m=0;m=i.start.time&&n.times.end.time&&r.reverse(),r},e.prototype._getRangeInfo=function(t){var r=[this.getDateInfo(t[0]),this.getDateInfo(t[1])],n;r[0].time>r[1].time&&(n=!0,r.reverse());var i=Math.floor(r[1].time/jE)-Math.floor(r[0].time/jE)+1,a=new Date(r[0].time),o=a.getDate(),s=r[1].date.getDate();a.setDate(o+i-1);var l=a.getDate();if(l!==s)for(var u=a.getTime()-r[1].time>0?1:-1;(l=a.getDate())!==s&&(a.getTime()-r[1].time)*u>0;)i-=u,a.setDate(l-u);var f=Math.floor((i+r[0].day+6)/7),c=n?-f+1:f-1;return n&&r.reverse(),{range:[r[0].formatedDate,r[1].formatedDate],start:r[0],end:r[1],allDay:i,weeks:f,nthWeek:c,fweek:r[0].day,lweek:r[1].day}},e.prototype._getDateByWeeksAndDay=function(t,r,n){var i=this._getRangeInfo(n);if(t>i.weeks||t===0&&ri.lweek)return null;var a=(t-1)*7-i.fweek+r,o=new Date(i.start.time);return o.setDate(+i.start.d+a),this.getDateInfo(o)},e.create=function(t,r){var n=[];return t.eachComponent("calendar",function(i){var a=new e(i,t,r);n.push(a),i.coordinateSystem=a}),t.eachSeries(function(i){i.get("coordinateSystem")==="calendar"&&(i.coordinateSystem=n[i.get("calendarIndex")||0])}),n},e.dimensions=["time","value"],e}();function N9(e){var t=e.calendarModel,r=e.seriesModel,n=t?t.coordinateSystem:r?r.coordinateSystem:null;return n}var k9=Qvt;function QE(e){e.registerComponentModel(P9),e.registerComponentView(R9),e.registerCoordinateSystem("calendar",k9)}function Jvt(e,t){var r=e.existing;if(t.id=e.keyInfo.id,!t.type&&r&&(t.type=r.type),t.parentId==null){var n=t.parentOption;n?t.parentId=n.id:r&&(t.parentId=r.parentId)}t.parentOption=null}function O9(e,t){var r;return D(t,function(n){e[n]!=null&&e[n]!=="auto"&&(r=!0)}),r}function tmt(e,t,r){var n=V({},r),i=e[t],a=r.$action||"merge";if(a==="merge")if(i){if(!1)var o;_t(i,n,!0),On(i,n,{ignoreSize:!0}),rM(r,i),m_(r,i),m_(r,i,"shape"),m_(r,i,"style"),m_(r,i,"extra"),r.clipPath=i.clipPath}else e[t]=n;else a==="replace"?e[t]=n:a==="remove"&&i&&(e[t]=null)}var z9=["transition","enterFrom","leaveTo"],emt=z9.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function m_(e,t,r){if(r&&(!e[r]&&t[r]&&(e[r]={}),e=e[r],t=t[r]),!(!e||!t))for(var n=r?z9:emt,i=0;i=0;f--){var c=i[f],p=Te(c.id,null),h=p!=null?o.get(p):null;if(h){var d=h.parent,g=Vi(d),y=d===a?{width:s,height:l}:{width:g.width,height:g.height},x={},_=Zs(h,c,y,null,{hv:c.hv,boundingMode:c.bounding},x);if(!Vi(h).isNew&&_){for(var S=c.transition,b={},w=0;w=0)?b[T]=M:h[T]=M}Rt(h,b,r,0)}else h.attr(x)}}},t.prototype._clear=function(){var r=this,n=this._elMap;n.each(function(i){g_(i,Vi(i).option,n,r._lastGraphicModel)}),this._elMap=$()},t.prototype.dispose=function(){this._clear()},t.type="graphic",t}(Xt);function JE(e){var t=st(V9,e)?V9[e]:Kd(e),r=new t({});return Vi(r).type=e,r}function B9(e,t,r,n){var i=JE(r);return t.add(i),n.set(e,i),Vi(i).id=e,Vi(i).isNew=!0,i}function g_(e,t,r,n){var i=e&&e.parent;i&&(e.type==="group"&&e.traverse(function(a){g_(a,t,r,n)}),Gp(e,t,n),r.removeKey(Vi(e).id))}function F9(e,t,r,n){e.isGroup||D([["cursor",We.prototype.cursor],["zlevel",n||0],["z",r||0],["z2",0]],function(i){var a=i[0];st(t,a)?e[a]=bt(t[a],i[1]):e[a]==null&&(e[a]=i[1])}),D(St(t),function(i){if(i.indexOf("on")===0){var a=t[i];e[i]=j(a)?a:null}}),st(t,"draggable")&&(e.draggable=t.draggable),t.name!=null&&(e.name=t.name),t.id!=null&&(e.id=t.id)}function nmt(e){return e=V({},e),D(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(tM),function(t){delete e[t]}),e}function imt(e,t,r){var n=ht(e).eventData;!e.silent&&!e.ignore&&!n&&(n=ht(e).eventData={componentType:"graphic",componentIndex:t.componentIndex,name:e.name}),n&&(n.info=r.info)}function tI(e){e.registerComponentModel(U9),e.registerComponentView(G9),e.registerPreprocessor(function(t){var r=t.graphic;B(r)?!r[0]||!r[0].elements?t.graphic=[{elements:r}]:t.graphic=[t.graphic[0]]:r&&!r.elements&&(t.graphic=[{elements:[r]}])})}var eI=["x","y","radius","angle","single"],amt=["cartesian2d","polar","singleAxis"];function H9(e){var t=e.get("coordinateSystem");return gt(amt,t)>=0}function Bi(e){return e+"Axis"}function W9(e,t){var r=$(),n=[],i=$();e.eachComponent({mainType:"dataZoom",query:t},function(f){i.get(f.uid)||s(f)});var a;do a=!1,e.eachComponent("dataZoom",o);while(a);function o(f){!i.get(f.uid)&&l(f)&&(s(f),a=!0)}function s(f){i.set(f.uid,!0),n.push(f),u(f)}function l(f){var c=!1;return f.eachTargetAxis(function(p,h){var d=r.get(p);d&&d[h]&&(c=!0)}),c}function u(f){f.eachTargetAxis(function(c,p){(r.get(c)||r.set(c,[]))[p]=!0})}return n}function y_(e){var t=e.ecModel,r={infoList:[],infoMap:$()};return e.eachTargetAxis(function(n,i){var a=t.getComponent(Bi(n),i);if(a){var o=a.getCoordSysModel();if(o){var s=o.uid,l=r.infoMap.get(s);l||(l={model:o,axisModels:[]},r.infoList.push(l),r.infoMap.set(s,l)),l.axisModels.push(a)}}}),r}var rI=function(){function e(){this.indexList=[],this.indexMap=[]}return e.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},e}(),omt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._autoThrottle=!0,r._noTarget=!0,r._rangePropMode=["percent","percent"],r}return t.prototype.init=function(r,n,i){var a=Y9(r);this.settledOption=a,this.mergeDefaultAndTheme(r,i),this._doInit(a)},t.prototype.mergeOption=function(r){var n=Y9(r);_t(this.option,r,!0),_t(this.settledOption,n,!0),this._doInit(n)},t.prototype._doInit=function(r){var n=this.option;this._setDefaultThrottle(r),this._updateRangeUse(r);var i=this.settledOption;D([["start","startValue"],["end","endValue"]],function(a,o){this._rangePropMode[o]==="value"&&(n[a[0]]=i[a[0]]=null)},this),this._resetTarget()},t.prototype._resetTarget=function(){var r=this.get("orient",!0),n=this._targetAxisInfoMap=$(),i=this._fillSpecifiedTargetAxis(n);i?this._orient=r||this._makeAutoOrientByTargetAxis():(this._orient=r||"horizontal",this._fillAutoTargetAxisByOrient(n,this._orient)),this._noTarget=!0,n.each(function(a){a.indexList.length&&(this._noTarget=!1)},this)},t.prototype._fillSpecifiedTargetAxis=function(r){var n=!1;return D(eI,function(i){var a=this.getReferringComponents(Bi(i),zO);if(a.specified){n=!0;var o=new rI;D(a.models,function(s){o.add(s.componentIndex)}),r.set(i,o)}},this),n},t.prototype._fillAutoTargetAxisByOrient=function(r,n){var i=this.ecModel,a=!0;if(a){var o=n==="vertical"?"y":"x",s=i.findComponents({mainType:o+"Axis"});l(s,o)}if(a){var s=i.findComponents({mainType:"singleAxis",filter:function(f){return f.get("orient",!0)===n}});l(s,"single")}function l(u,f){var c=u[0];if(c){var p=new rI;if(p.add(c.componentIndex),r.set(f,p),a=!1,f==="x"||f==="y"){var h=c.getReferringComponents("grid",se).models[0];h&&D(u,function(d){c.componentIndex!==d.componentIndex&&h===d.getReferringComponents("grid",se).models[0]&&p.add(d.componentIndex)})}}}a&&D(eI,function(u){if(a){var f=i.findComponents({mainType:Bi(u),filter:function(p){return p.get("type",!0)==="category"}});if(f[0]){var c=new rI;c.add(f[0].componentIndex),r.set(u,c),a=!1}}},this)},t.prototype._makeAutoOrientByTargetAxis=function(){var r;return this.eachTargetAxis(function(n){!r&&(r=n)},this),r==="y"?"vertical":"horizontal"},t.prototype._setDefaultThrottle=function(r){if(r.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var n=this.ecModel.option;this.option.throttle=n.animation&&n.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(r){var n=this._rangePropMode,i=this.get("rangeMode");D([["start","startValue"],["end","endValue"]],function(a,o){var s=r[a[0]]!=null,l=r[a[1]]!=null;s&&!l?n[o]="percent":!s&&l?n[o]="value":i?n[o]=i[o]:s&&(n[o]="percent")})},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var r;return this.eachTargetAxis(function(n,i){r==null&&(r=this.ecModel.getComponent(Bi(n),i))},this),r},t.prototype.eachTargetAxis=function(r,n){this._targetAxisInfoMap.each(function(i,a){D(i.indexList,function(o){r.call(n,a,o)})})},t.prototype.getAxisProxy=function(r,n){var i=this.getAxisModel(r,n);if(i)return i.__dzAxisProxy},t.prototype.getAxisModel=function(r,n){var i=this._targetAxisInfoMap.get(r);if(i&&i.indexMap[n])return this.ecModel.getComponent(Bi(r),n)},t.prototype.setRawRange=function(r){var n=this.option,i=this.settledOption;D([["start","startValue"],["end","endValue"]],function(a){(r[a[0]]!=null||r[a[1]]!=null)&&(n[a[0]]=i[a[0]]=r[a[0]],n[a[1]]=i[a[1]]=r[a[1]])},this),this._updateRangeUse(r)},t.prototype.setCalculatedRange=function(r){var n=this.option;D(["start","startValue","end","endValue"],function(i){n[i]=r[i]})},t.prototype.getPercentRange=function(){var r=this.findRepresentativeAxisProxy();if(r)return r.getDataPercentWindow()},t.prototype.getValueRange=function(r,n){if(r==null&&n==null){var i=this.findRepresentativeAxisProxy();if(i)return i.getDataValueWindow()}else return this.getAxisProxy(r,n).getDataValueWindow()},t.prototype.findRepresentativeAxisProxy=function(r){if(r)return r.__dzAxisProxy;for(var n,i=this._targetAxisInfoMap.keys(),a=0;ao[1];if(x&&!_&&!S)return!0;x&&(v=!0),_&&(d=!0),S&&(m=!0)}return v&&d&&m})}else Zp(f,function(h){if(a==="empty")l.setData(u=u.map(h,function(m){return s(m)?m:NaN}));else{var d={};d[h]=o,u.selectRange(d)}});Zp(f,function(h){u.setApproximateExtent(o,h)})}});function s(l){return l>=o[0]&&l<=o[1]}},e.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},r=this._dataZoomModel,n=this._dataExtent;Zp(["min","max"],function(i){var a=r.get(i+"Span"),o=r.get(i+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?a=$t(n[0]+o,n,[0,100],!0):a!=null&&(o=$t(a,[0,100],n,!0)-n[0]),t[i+"Span"]=a,t[i+"ValueSpan"]=o},this)},e.prototype._setAxisModel=function(){var t=this.getAxisModel(),r=this._percentWindow,n=this._valueWindow;if(r){var i=Qy(n,[0,500]);i=Math.min(i,20);var a=t.axis.scale.rawExtentInfo;r[0]!==0&&a.setDeterminedMinMax("min",+n[0].toFixed(i)),r[1]!==100&&a.setDeterminedMinMax("max",+n[1].toFixed(i)),a.freeze()}},e}();function cmt(e,t,r){var n=[1/0,-1/0];Zp(r,function(o){VU(n,o.getData(),t)});var i=e.getAxisModel(),a=Yx(i.axis.scale,i,n).calculate();return[a.min,a.max]}var K9=fmt;var pmt={getTargetSeries:function(e){function t(i){e.eachComponent("dataZoom",function(a){a.eachTargetAxis(function(o,s){var l=e.getComponent(Bi(o),s);i(o,s,l,a)})})}t(function(i,a,o,s){o.__dzAxisProxy=null});var r=[];t(function(i,a,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new K9(i,a,s,e),r.push(o.__dzAxisProxy))});var n=$();return D(r,function(i){D(i.getTargetSeriesModels(),function(a){n.set(a.uid,a)})}),n},overallReset:function(e,t){e.eachComponent("dataZoom",function(r){r.eachTargetAxis(function(n,i){r.getAxisProxy(n,i).reset(r)}),r.eachTargetAxis(function(n,i){r.getAxisProxy(n,i).filterData(r,t)})}),e.eachComponent("dataZoom",function(r){var n=r.findRepresentativeAxisProxy();if(n){var i=n.getDataPercentWindow(),a=n.getDataValueWindow();r.setCalculatedRange({start:i[0],end:i[1],startValue:a[0],endValue:a[1]})}})}},$9=pmt;function nI(e){e.registerAction("dataZoom",function(t,r){var n=W9(r,t);D(n,function(i){i.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})})}var j9=!1;function yf(e){j9||(j9=!0,e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,$9),nI(e),e.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function Q9(e){e.registerComponentModel(X9),e.registerComponentView(q9),yf(e)}var yr=function(){function e(){}return e}();var J9={};function Sl(e,t){J9[e]=t}function x_(e){return J9[e]}var dmt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.optionUpdated=function(){e.prototype.optionUpdated.apply(this,arguments);var r=this.ecModel;D(this.option.feature,function(n,i){var a=x_(i);a&&(a.getDefaultOption&&(a.defaultOption=a.getDefaultOption(r)),_t(n,a.defaultOption))})},t.type="toolbox",t.layoutMode={type:"box",ignoreSize:!0},t.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},t}(Pt),tG=dmt;function eG(e,t,r){var n=t.getBoxLayoutParams(),i=t.get("padding"),a={width:r.getWidth(),height:r.getHeight()},o=re(n,a,i);fa(t.get("orient"),e,t.get("itemGap"),o.width,o.height),Zs(e,n,a,i)}function __(e,t){var r=la(t.get("padding")),n=t.getItemStyle(["color","opacity"]);return n.fill=t.get("backgroundColor"),e=new At({shape:{x:e.x-r[3],y:e.y-r[0],width:e.width+r[1]+r[3],height:e.height+r[0]+r[2],r:t.get("borderRadius")},style:n,silent:!0,z2:-1}),e}var mmt=function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(r,n,i,a){var o=this.group;if(o.removeAll(),!r.get("show"))return;var s=+r.get("itemSize"),l=r.get("orient")==="vertical",u=r.get("feature")||{},f=this._features||(this._features={}),c=[];D(u,function(d,m){c.push(m)}),new Vr(this._featureNames||[],c).add(p).update(p).remove(pt(p,null)).execute(),this._featureNames=c;function p(d,m){var v=c[d],g=c[m],y=u[v],x=new Ht(y,r,r.ecModel),_;if(a&&a.newTitle!=null&&a.featureName===v&&(y.title=a.newTitle),v&&!g){if(gmt(v))_={onclick:x.option.onclick,featureName:v};else{var S=x_(v);if(!S)return;_=new S}f[v]=_}else if(_=f[g],!_)return;_.uid=Ci("toolbox-feature"),_.model=x,_.ecModel=n,_.api=i;var b=_ instanceof yr;if(!v&&g){b&&_.dispose&&_.dispose(n,i);return}if(!x.get("show")||b&&_.unusable){b&&_.remove&&_.remove(n,i);return}h(x,_,v),x.setIconStatus=function(w,T){var M=this.option,C=this.iconPaths;M.iconStatus=M.iconStatus||{},M.iconStatus[w]=T,C[w]&&(T==="emphasis"?Yr:Xr)(C[w])},_ instanceof yr&&_.render&&_.render(x,n,i,a)}function h(d,m,v){var g=d.getModel("iconStyle"),y=d.getModel(["emphasis","iconStyle"]),x=m instanceof yr&&m.getIcons?m.getIcons():d.get("icon"),_=d.get("title")||{},S,b;H(x)?(S={},S[v]=x):S=x,H(_)?(b={},b[v]=_):b=_;var w=d.iconPaths={};D(S,function(T,M){var C=Yo(T,{},{x:-s/2,y:-s/2,width:s,height:s});C.setStyle(g.getItemStyle());var A=C.ensureState("emphasis");A.style=y.getItemStyle();var P=new Lt({style:{text:b[M],align:y.get("textAlign"),borderRadius:y.get("textBorderRadius"),padding:y.get("textPadding"),fill:null},ignore:!0});C.setTextContent(P),sa({el:C,componentModel:r,itemName:M,formatterParamsExtra:{title:b[M]}}),C.__title=b[M],C.on("mouseover",function(){var L=y.getItemStyle(),I=l?r.get("right")==null&&r.get("left")!=="right"?"right":"left":r.get("bottom")==null&&r.get("top")!=="bottom"?"bottom":"top";P.setStyle({fill:y.get("textFill")||L.fill||L.stroke||"#000",backgroundColor:y.get("textBackgroundColor")}),C.setTextConfig({position:y.get("textPosition")||I}),P.ignore=!r.get("showTitle"),i.enterEmphasis(this)}).on("mouseout",function(){d.get(["iconStatus",M])!=="emphasis"&&i.leaveEmphasis(this),P.hide()}),(d.get(["iconStatus",M])==="emphasis"?Yr:Xr)(C),o.add(C),C.on("click",Z(m.onclick,m,n,i,M)),w[M]=C})}eG(o,r,i),o.add(__(o.getBoundingRect(),r)),l||o.eachChild(function(d){var m=d.__title,v=d.ensureState("emphasis"),g=v.textConfig||(v.textConfig={}),y=d.getTextContent(),x=y&&y.ensureState("emphasis");if(x&&!j(x)&&m){var _=x.style||(x.style={}),S=Ga(m,Lt.makeFont(_)),b=d.x+o.x,w=d.y+o.y+s,T=!1;w+S.height>i.getHeight()&&(g.position="top",T=!0);var M=T?-5-S.height:s+10;b+S.width/2>i.getWidth()?(g.position=["100%",M],_.align="right"):b-S.width/2<0&&(g.position=[0,M],_.align="left")}})},t.prototype.updateView=function(r,n,i,a){D(this._features,function(o){o instanceof yr&&o.updateView&&o.updateView(o.model,n,i,a)})},t.prototype.remove=function(r,n){D(this._features,function(i){i instanceof yr&&i.remove&&i.remove(r,n)}),this.group.removeAll()},t.prototype.dispose=function(r,n){D(this._features,function(i){i instanceof yr&&i.dispose&&i.dispose(r,n)})},t.type="toolbox",t}(Xt);function gmt(e){return e.indexOf("my")===0}var rG=mmt;var ymt=function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.onclick=function(r,n){var i=this.model,a=i.get("name")||r.get("title.0.text")||"echarts",o=n.getZr().painter.getType()==="svg",s=o?"svg":i.get("type",!0)||"png",l=n.getConnectedDataURL({type:s,backgroundColor:i.get("backgroundColor",!0)||r.get("backgroundColor")||"#fff",connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")}),u=Ot.browser;if(j(MouseEvent)&&(u.newEdge||!u.ie&&!u.edge)){var f=document.createElement("a");f.download=a+"."+s,f.target="_blank",f.href=l;var c=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});f.dispatchEvent(c)}else if(window.navigator.msSaveOrOpenBlob||o){var p=l.split(","),h=p[0].indexOf("base64")>-1,d=o?decodeURIComponent(p[1]):p[1];h&&(d=window.atob(d));var m=a+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var v=d.length,g=new Uint8Array(v);v--;)g[v]=d.charCodeAt(v);var y=new Blob([g]);window.navigator.msSaveOrOpenBlob(y,m)}else{var x=document.createElement("iframe");document.body.appendChild(x);var _=x.contentWindow,S=_.document;S.open("image/svg+xml","replace"),S.write(d),S.close(),_.focus(),S.execCommand("SaveAs",!0,m),document.body.removeChild(x)}}else{var b=i.get("lang"),w='',T=window.open();T.document.write(w),T.document.title=a}},t.getDefaultOption=function(r){var n={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:r.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:r.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return n},t}(yr),nG=ymt;var iG="__ec_magicType_stack__";var xmt=[["line","bar"],["stack"]],_mt=function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getIcons=function(){var r=this.model,n=r.get("icon"),i={};return D(r.get("type"),function(a){n[a]&&(i[a]=n[a])}),i},t.getDefaultOption=function(r){var n={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:r.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return n},t.prototype.onclick=function(r,n,i){var a=this.model,o=a.get(["seriesIndex",i]);if(aG[i]){var s={series:[]},l=function(c){var p=c.subType,h=c.id,d=aG[i](p,h,c,a);d&&(J(d,c.option),s.series.push(d));var m=c.coordinateSystem;if(m&&m.type==="cartesian2d"&&(i==="line"||i==="bar")){var v=m.getAxesByScale("ordinal")[0];if(v){var g=v.dim,y=g+"Axis",x=c.getReferringComponents(y,se).models[0],_=x.componentIndex;s[y]=s[y]||[];for(var S=0;S<=_;S++)s[y][_]=s[y][_]||{};s[y][_].boundaryGap=i==="bar"}}};D(xmt,function(c){gt(c,i)>=0&&D(c,function(p){a.setIconStatus(p,"normal")})}),a.setIconStatus(i,"emphasis"),r.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,f=i;i==="stack"&&(u=_t({stack:a.option.title.tiled,tiled:a.option.title.stack},a.option.title),a.get(["iconStatus",i])!=="emphasis"&&(f="tiled")),n.dispatchAction({type:"changeMagicType",currentType:f,newOption:s,newTitle:u,featureName:"magicType"})}},t}(yr),aG={line:function(e,t,r,n){if(e==="bar")return _t({id:t,type:"line",data:r.get("data"),stack:r.get("stack"),markPoint:r.get("markPoint"),markLine:r.get("markLine")},n.get(["option","line"])||{},!0)},bar:function(e,t,r,n){if(e==="line")return _t({id:t,type:"bar",data:r.get("data"),stack:r.get("stack"),markPoint:r.get("markPoint"),markLine:r.get("markLine")},n.get(["option","bar"])||{},!0)},stack:function(e,t,r,n){var i=r.get("stack")===iG;if(e==="line"||e==="bar")return n.setIconStatus("stack",i?"normal":"emphasis"),_t({id:t,stack:i?"":iG},n.get(["option","stack"])||{},!0)}};cn({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(e,t){t.mergeOption(e.newOption)});var oG=_mt;var S_=new Array(60).join("-"),Kp=" ";function bmt(e){var t={},r=[],n=[];return e.eachRawSeries(function(i){var a=i.coordinateSystem;if(a&&(a.type==="cartesian2d"||a.type==="polar")){var o=a.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;t[s]||(t[s]={categoryAxis:o,valueAxis:a.getOtherAxis(o),series:[]},n.push({axisDim:o.dim,axisIndex:o.index})),t[s].series.push(i)}else r.push(i)}else r.push(i)}),{seriesGroupByCategoryAxis:t,other:r,meta:n}}function Smt(e){var t=[];return D(e,function(r,n){var i=r.categoryAxis,a=r.valueAxis,o=a.dim,s=[" "].concat(F(r.series,function(h){return h.name})),l=[i.model.getCategories()];D(r.series,function(h){var d=h.getRawData();l.push(h.getRawData().mapArray(d.mapDimension(o),function(m){return m}))});for(var u=[s.join(Kp)],f=0;f1||r>0&&!e.noHeader;return D(e.blocks,function(i){var a=F3(i);a>=t&&(t=a+ +(n&&(!a||bM(i)&&!i.noHeader)))}),t}return 0}function wat(e,t,r,n){var i=t.noHeader,a=Mat(F3(t)),o=[],s=t.blocks||[];be(!s||B(s)),s=s||[];var l=e.orderMode;if(t.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(st(u,l)){var f=new nx(u[l],null);s.sort(function(d,m){return f.evaluate(d.sortParam,m.sortParam)})}else l==="seriesDesc"&&s.reverse()}D(s,function(d,m){var v=t.valueFormatter,g=B3(d)(v?V(V({},e),{valueFormatter:v}):e,d,m>0?a.html:0,n);g!=null&&o.push(g)});var c=e.renderMode==="richText"?o.join(a.richText):SM(o.join(""),i?r:a.html);if(i)return c;var p=G0(t.header,"ordinal",e.useUTC),h=V3(n,e.renderMode).nameStyle;return e.renderMode==="richText"?G3(e,p,h)+a.richText+c:SM('
'+Rr(p)+"
"+c,r)}function Tat(e,t,r,n){var i=e.renderMode,a=t.noName,o=t.noValue,s=!t.markerType,l=t.name,u=e.useUTC,f=t.valueFormatter||e.valueFormatter||function(_){return _=B(_)?_:[_],F(_,function(S,b){return G0(S,B(h)?h[b]:h,u)})};if(!(a&&o)){var c=s?"":e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||"#333",i),p=a?"":G0(l,"ordinal",u),h=t.valueType,d=o?[]:f(t.value),m=!s||!a,v=!s&&a,g=V3(n,i),y=g.nameStyle,x=g.valueStyle;return i==="richText"?(s?"":c)+(a?"":G3(e,p,y))+(o?"":Dat(e,d,m,v,x)):SM((s?"":c)+(a?"":Aat(p,!s,y))+(o?"":Cat(d,m,v,x)),r)}}function wM(e,t,r,n,i,a){if(e){var o=B3(e),s={useUTC:i,renderMode:r,orderMode:n,markupStyleCreator:t,valueFormatter:e.valueFormatter};return o(s,e,0,a)}}function Mat(e){return{html:bat[e],richText:Sat[e]}}function SM(e,t){var r='
',n="margin: "+t+"px 0 0";return'
'+e+r+"
"}function Aat(e,t,r){var n=t?"margin-left:2px":"";return''+Rr(e)+""}function Cat(e,t,r,n){var i=r?"10px":"20px",a=t?"float:right;margin-left:"+i:"";return e=B(e)?e:[e],''+F(e,function(o){return Rr(o)}).join("  ")+""}function G3(e,t,r){return e.markupStyleCreator.wrapRichTextStyle(t,r)}function Dat(e,t,r,n,i){var a=[i],o=n?10:20;return r&&a.push({padding:[0,0,0,o],align:"right"}),e.markupStyleCreator.wrapRichTextStyle(B(t)?t.join(" "):t,a)}function sx(e,t){var r=e.getData().getItemVisual(t,"style"),n=r[e.visualDrawType];return ua(n)}function lx(e,t){var r=e.get("padding");return r??(t==="richText"?[8,10]:10)}var ux=function(){function e(){this.richTextStyles={},this._nextStyleNameId=r0()}return e.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(t,r,n){var i=n==="richText"?this._generateStyleName():null,a=K5({color:r,type:t,renderMode:n,markerId:i});return H(a)?a:(this.richTextStyles[i]=a.style,a.content)},e.prototype.wrapRichTextStyle=function(t,r){var n={};B(r)?D(r,function(a){return V(n,a)}):V(n,r);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+t+"}"},e}();function fx(e){var t=e.series,r=e.dataIndex,n=e.multipleSeries,i=t.getData(),a=i.mapDimensionsAll("defaultedTooltip"),o=a.length,s=t.getRawValue(r),l=B(s),u=sx(t,r),f,c,p,h;if(o>1||l&&!o){var d=Eat(s,t,r,a,u);f=d.inlineValues,c=d.inlineValueTypes,p=d.blocks,h=d.inlineValues[0]}else if(o){var m=i.getDimensionInfo(a[0]);h=f=jo(i,r,a[0]),c=m.type}else h=f=l?s[0]:s;var v=Fc(t),g=v&&t.name||"",y=i.getName(r),x=n?g:y;return xe("section",{header:g,noHeader:n||!v,sortParam:h,blocks:[xe("nameValue",{markerType:"item",markerColor:u,name:x,noName:!pr(x),value:f,valueType:c})].concat(p||[])})}function Eat(e,t,r,n,i){var a=t.getData(),o=Pr(e,function(c,p,h){var d=a.getDimensionInfo(h);return c=c||d&&d.tooltip!==!1&&d.displayName!=null},!1),s=[],l=[],u=[];n.length?D(n,function(c){f(jo(a,r,c),c)}):D(e,f);function f(c,p){var h=a.getDimensionInfo(p);!h||h.otherDims.tooltip===!1||(o?u.push(xe("nameValue",{markerType:"subItem",markerColor:i,name:h.displayName,value:c,valueType:h.type})):(s.push(c),l.push(h.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var js=yt();function cx(e,t){return e.getName(t)||e.getId(t)}var mv="__universalTransitionEnabled",px=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r._selectedDataIndicesMap={},r}return t.prototype.init=function(r,n,i){this.seriesIndex=this.componentIndex,this.dataTask=$s({count:Lat,reset:Pat}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(r,i);var a=js(this).sourceManager=new ox(this);a.prepareSource();var o=this.getInitialData(r,i);W3(o,this),this.dataTask.context.data=o,js(this).dataBeforeProcessed=o,H3(this),this._initSelectedMapFromData(o)},t.prototype.mergeDefaultAndTheme=function(r,n){var i=Ks(this),a=i?Di(r):{},o=this.subType;Pt.hasClass(o)&&(o+="Series"),_t(r,n.getTheme().get(this.subType)),_t(r,this.getDefaultOption()),ni(r,"label",["show"]),this.fillDataTextStyle(r.data),i&&On(r,a,i)},t.prototype.mergeOption=function(r,n){r=_t(this.option,r,!0),this.fillDataTextStyle(r.data);var i=Ks(this);i&&On(this.option,r,i);var a=js(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(r,n);W3(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,js(this).dataBeforeProcessed=o,H3(this),this._initSelectedMapFromData(o)},t.prototype.fillDataTextStyle=function(r){if(r&&!Qe(r))for(var n=["show"],i=0;ithis.getShallow("animationThreshold")&&(n=!1),!!n},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(r,n,i){var a=this.ecModel,o=sv.prototype.getColorFromPalette.call(this,r,n,i);return o||(o=a.getColorFromPalette(r,n,i)),o},t.prototype.coordDimToDataDim=function(r){return this.getRawData().mapDimensionsAll(r)},t.prototype.getProgressive=function(){return this.get("progressive")},t.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},t.prototype.select=function(r,n){this._innerSelect(this.getData(n),r)},t.prototype.unselect=function(r,n){var i=this.option.selectedMap;if(i){var a=this.option.selectedMode,o=this.getData(n);if(a==="series"||i==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s=0&&i.push(o)}return i},t.prototype.isSelected=function(r,n){var i=this.option.selectedMap;if(!i)return!1;var a=this.getData(n);return(i==="all"||i[cx(a,r)])&&!a.getItemModel(r).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this[mv])return!0;var r=this.option.universalTransition;return r?r===!0?!0:r&&r.enabled:!1},t.prototype._innerSelect=function(r,n){var i,a,o=this.option,s=o.selectedMode,l=n.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){rt(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,f=0;f0&&this._innerSelect(r,n)}},t.registerClass=function(r){return Pt.registerClass(r)},t.protoInitialize=function(){var r=t.prototype;r.type="series.__base__",r.seriesIndex=0,r.ignoreStyleOnData=!1,r.hasSymbolVisual=!1,r.defaultSymbol="circle",r.visualStyleAccessPath="itemStyle",r.visualDrawType="fill"}(),t}(Pt);ie(px,up);ie(px,sv);a0(px,Pt);function H3(e){var t=e.name;Fc(e)||(e.name=Iat(e)||t)}function Iat(e){var t=e.getRawData(),r=t.mapDimensionsAll("seriesName"),n=[];return D(r,function(i){var a=t.getDimensionInfo(i);a.displayName&&n.push(a.displayName)}),n.join(" ")}function Lat(e){return e.model.getRawData().count()}function Pat(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),Rat}function Rat(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function W3(e,t){D(su(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(r){e.wrapMethod(r,pt(Nat,t))})}function Nat(e,t){var r=TM(e);return r&&r.setOutputEnd((t||this).count()),t}function TM(e){var t=(e.ecModel||{}).scheduler,r=t&&t.getPipeline(e.uid);if(r){var n=r.currentTask;if(n){var i=n.agentStubMap;i&&(n=i.get(e.uid))}return n}}var Wt=px;var MM=function(){function e(){this.group=new nt,this.uid=Ci("viewComponent")}return e.prototype.init=function(t,r){},e.prototype.render=function(t,r,n,i){},e.prototype.dispose=function(t,r){},e.prototype.updateView=function(t,r,n,i){},e.prototype.updateLayout=function(t,r,n,i){},e.prototype.updateVisual=function(t,r,n,i){},e.prototype.toggleBlurSeries=function(t,r,n){},e.prototype.eachRendered=function(t){var r=this.group;r&&r.traverse(t)},e}();Gc(MM);Bs(MM);var Xt=MM;function si(){var e=yt();return function(t){var r=e(t),n=t.pipelineContext,i=!!r.large,a=!!r.progressiveRender,o=r.large=!!(n&&n.large),s=r.progressiveRender=!!(n&&n.progressiveRender);return(i!==o||a!==s)&&"reset"}}var q3=yt(),kat=si(),AM=function(){function e(){this.group=new nt,this.uid=Ci("viewChart"),this.renderTask=$s({plan:Oat,reset:zat}),this.renderTask.context={view:this}}return e.prototype.init=function(t,r){},e.prototype.render=function(t,r,n,i){},e.prototype.highlight=function(t,r,n,i){var a=t.getData(i&&i.dataType);a&&X3(a,i,"emphasis")},e.prototype.downplay=function(t,r,n,i){var a=t.getData(i&&i.dataType);a&&X3(a,i,"normal")},e.prototype.remove=function(t,r){this.group.removeAll()},e.prototype.dispose=function(t,r){},e.prototype.updateView=function(t,r,n,i){this.render(t,r,n,i)},e.prototype.updateLayout=function(t,r,n,i){this.render(t,r,n,i)},e.prototype.updateVisual=function(t,r,n,i){this.render(t,r,n,i)},e.prototype.eachRendered=function(t){un(this.group,t)},e.markUpdateMethod=function(t,r){q3(t).updateMethod=r},e.protoInitialize=function(){var t=e.prototype;t.type="chart"}(),e}();function Y3(e,t,r){e&&qs(e)&&(t==="emphasis"?Yr:Xr)(e,r)}function X3(e,t,r){var n=wi(e,t),i=t&&t.highlightKey!=null?qz(t.highlightKey):null;n!=null?D(Yt(n),function(a){Y3(e.getItemGraphicEl(a),r,i)}):e.eachItemGraphicEl(function(a){Y3(a,r,i)})}Gc(AM,["dispose"]);Bs(AM);function Oat(e){return kat(e.model)}function zat(e){var t=e.model,r=e.ecModel,n=e.api,i=e.payload,a=t.pipelineContext.progressiveRender,o=e.view,s=i&&q3(i).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](t,r,n,i),Uat[l]}var Uat={incrementalPrepareRender:{progress:function(e,t){t.view.incrementalRender(e,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(e,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}},Vt=AM;var hx="\0__throttleOriginMethod",Z3="\0__throttleRate",K3="\0__throttleType";function gv(e,t,r){var n,i=0,a=0,o=null,s,l,u,f;t=t||0;function c(){a=new Date().getTime(),o=null,e.apply(l,u||[])}var p=function(){for(var h=[],d=0;d=0?c():o=setTimeout(c,-s),i=n};return p.clear=function(){o&&(clearTimeout(o),o=null)},p.debounceNextCall=function(h){f=h},p}function Li(e,t,r,n){var i=e[t];if(i){var a=i[hx]||i,o=i[K3],s=i[Z3];if(s!==r||o!==n){if(r==null||!n)return e[t]=a;i=e[t]=gv(a,r,n==="debounce"),i[hx]=a,i[K3]=n,i[Z3]=r}return i}}function Qo(e,t){var r=e[t];r&&r[hx]&&(r.clear&&r.clear(),e[t]=r[hx])}var $3=yt(),j3={itemStyle:Pn(zT,!0),lineStyle:Pn(OT,!0)},Vat={lineStyle:"stroke",itemStyle:"fill"};function Q3(e,t){var r=e.visualStyleMapper||j3[t];return r||(console.warn("Unknown style type '"+t+"'."),j3.itemStyle)}function J3(e,t){var r=e.visualDrawType||Vat[t];return r||(console.warn("Unknown style type '"+t+"'."),"fill")}var t4={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var r=e.getData(),n=e.visualStyleAccessPath||"itemStyle",i=e.getModel(n),a=Q3(e,n),o=a(i),s=i.getShallow("decal");s&&(r.setVisual("decal",s),s.dirty=!0);var l=J3(e,n),u=o[l],f=j(u)?u:null,c=o.fill==="auto"||o.stroke==="auto";if(!o[l]||f||c){var p=e.getColorFromPalette(e.name,null,t.getSeriesCount());o[l]||(o[l]=p,r.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||j(o.fill)?p:o.fill,o.stroke=o.stroke==="auto"||j(o.stroke)?p:o.stroke}if(r.setVisual("style",o),r.setVisual("drawType",l),!t.isSeriesFiltered(e)&&f)return r.setVisual("colorFromPalette",!1),{dataEach:function(h,d){var m=e.getDataParams(d),v=V({},o);v[l]=f(m),h.setItemVisual(d,"style",v)}}}},yv=new Ht,e4={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!(e.ignoreStyleOnData||t.isSeriesFiltered(e))){var r=e.getData(),n=e.visualStyleAccessPath||"itemStyle",i=Q3(e,n),a=r.getVisual("drawType");return{dataEach:r.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[n]){yv.option=l[n];var u=i(yv),f=o.ensureUniqueItemVisual(s,"style");V(f,u),yv.option.decal&&(o.setItemVisual(s,"decal",yv.option.decal),yv.option.decal.dirty=!0),a in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},r4={performRawSeries:!0,overallReset:function(e){var t=$();e.eachSeries(function(r){var n=r.getColorBy();if(!r.isColorBySeries()){var i=r.type+"-"+n,a=t.get(i);a||(a={},t.set(i,a)),$3(r).scope=a}}),e.eachSeries(function(r){if(!(r.isColorBySeries()||e.isSeriesFiltered(r))){var n=r.getRawData(),i={},a=r.getData(),o=$3(r).scope,s=r.visualStyleAccessPath||"itemStyle",l=J3(r,s);a.each(function(u){var f=a.getRawIndex(u);i[f]=u}),n.each(function(u){var f=i[u],c=a.getItemVisual(f,"colorFromPalette");if(c){var p=a.ensureUniqueItemVisual(f,"style"),h=n.getName(u)||u+"",d=n.count();p[l]=r.getColorFromPalette(h,o,d)}})}})}};var vx=Math.PI;function CM(e,t){t=t||{},J(t,{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 r=new nt,n=new At({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});r.add(n);var i=new Lt({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new At({style:{fill:"none"},textContent:i,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});r.add(a);var o;return t.showSpinner&&(o=new Kd({shape:{startAngle:-vx/2,endAngle:-vx/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:vx*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:vx*3/2}).delay(300).start("circularInOut"),r.add(o)),r.resize=function(){var s=i.getBoundingRect().width,l=t.showSpinner?t.spinnerRadius:0,u=(e.getWidth()-l*2-(t.showSpinner&&s?10:0)-s)/2-(t.showSpinner&&s?0:5+s/2)+(t.showSpinner?0:s/2)+(s?0:l),f=e.getHeight()/2;t.showSpinner&&o.setShape({cx:u,cy:f}),a.setShape({x:u-l,y:f-l,width:l*2,height:l*2}),n.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},r.resize(),r}var Bat=function(){function e(t,r,n,i){this._stageTaskMap=$(),this.ecInstance=t,this.api=r,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return e.prototype.restoreData=function(t,r){t.restoreData(r),this._stageTaskMap.each(function(n){var i=n.overallTask;i&&i.dirty()})},e.prototype.getPerformArgs=function(t,r){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),i=n.context,a=!r&&n.progressiveEnabled&&(!i||i.progressiveRender)&&t.__idxInPipeline>n.blockIndex,o=a?n.step:null,s=i&&i.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},e.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},e.prototype.updateStreamModes=function(t,r){var n=this._pipelineMap.get(t.uid),i=t.getData(),a=i.count(),o=n.progressiveEnabled&&r.incrementalPrepareRender&&a>=n.threshold,s=t.get("large")&&a>=t.get("largeThreshold"),l=t.get("progressiveChunkMode")==="mod"?a:null;t.pipelineContext=n.context={progressiveRender:o,modDataCount:l,large:s}},e.prototype.restorePipelines=function(t){var r=this,n=r._pipelineMap=$();t.eachSeries(function(i){var a=i.getProgressive(),o=i.uid;n.set(o,{id:o,head:null,tail:null,threshold:i.getProgressiveThreshold(),progressiveEnabled:a&&!(i.preventIncremental&&i.preventIncremental()),blockIndex:-1,step:Math.round(a||700),count:0}),r._pipe(i,i.dataTask)})},e.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,r=this.api.getModel(),n=this.api;D(this._allHandlers,function(i){var a=t.get(i.uid)||t.set(i.uid,{}),o="";be(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,a,r,n),i.overallReset&&this._createOverallStageTask(i,a,r,n)},this)},e.prototype.prepareView=function(t,r,n,i){var a=t.renderTask,o=a.context;o.model=r,o.ecModel=n,o.api=i,a.__block=!t.incrementalPrepareRender,this._pipe(r,a)},e.prototype.performDataProcessorTasks=function(t,r){this._performStageTasks(this._dataProcessorHandlers,t,r,{block:!0})},e.prototype.performVisualTasks=function(t,r,n){this._performStageTasks(this._visualHandlers,t,r,n)},e.prototype._performStageTasks=function(t,r,n,i){i=i||{};var a=!1,o=this;D(t,function(l,u){if(!(i.visualType&&i.visualType!==l.visualType)){var f=o._stageTaskMap.get(l.uid),c=f.seriesTaskMap,p=f.overallTask;if(p){var h,d=p.agentStubMap;d.each(function(v){s(i,v)&&(v.dirty(),h=!0)}),h&&p.dirty(),o.updatePayload(p,n);var m=o.getPerformArgs(p,i.block);d.each(function(v){v.perform(m)}),p.perform(m)&&(a=!0)}else c&&c.each(function(v,g){s(i,v)&&v.dirty();var y=o.getPerformArgs(v,i.block);y.skip=!l.performRawSeries&&r.isSeriesFiltered(v.context.model),o.updatePayload(v,n),v.perform(y)&&(a=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=a||this.unfinished},e.prototype.performSeriesTasks=function(t){var r;t.eachSeries(function(n){r=n.dataTask.perform()||r}),this.unfinished=r||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each(function(t){var r=t.tail;do{if(r.__block){t.blockIndex=r.__idxInPipeline;break}r=r.getUpstream()}while(r)})},e.prototype.updatePayload=function(t,r){r!=="remain"&&(t.context.payload=r)},e.prototype._createSeriesStageTask=function(t,r,n,i){var a=this,o=r.seriesTaskMap,s=r.seriesTaskMap=$(),l=t.seriesType,u=t.getTargetSeries;t.createOnAllSeries?n.eachRawSeries(f):l?n.eachRawSeriesByType(l,f):u&&u(n,i).each(f);function f(c){var p=c.uid,h=s.set(p,o&&o.get(p)||$s({plan:Yat,reset:Xat,count:Zat}));h.context={model:c,ecModel:n,api:i,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:a},a._pipe(c,h)}},e.prototype._createOverallStageTask=function(t,r,n,i){var a=this,o=r.overallTask=r.overallTask||$s({reset:Fat});o.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:a};var s=o.agentStubMap,l=o.agentStubMap=$(),u=t.seriesType,f=t.getTargetSeries,c=!0,p=!1,h="";be(!t.createOnAllSeries,h),u?n.eachRawSeriesByType(u,d):f?f(n,i).each(d):(c=!1,D(n.getSeries(),d));function d(m){var v=m.uid,g=l.set(v,s&&s.get(v)||(p=!0,$s({reset:Gat,onDirty:Wat})));g.context={model:m,overallProgress:c},g.agent=o,g.__block=c,a._pipe(m,g)}p&&o.dirty()},e.prototype._pipe=function(t,r){var n=t.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=r),i.tail&&i.tail.pipe(r),i.tail=r,r.__idxInPipeline=i.count++,r.__pipeline=i},e.wrapStageHandler=function(t,r){return j(t)&&(t={overallReset:t,seriesType:Kat(t)}),t.uid=Ci("stageHandler"),r&&(t.visualType=r),t},e}();function Fat(e){e.overallReset(e.ecModel,e.api,e.payload)}function Gat(e){return e.overallProgress&&Hat}function Hat(){this.agent.dirty(),this.getDownstream().dirty()}function Wat(){this.agent&&this.agent.dirty()}function Yat(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function Xat(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=Yt(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?F(t,function(r,n){return n4(n)}):qat}var qat=n4(0);function n4(e){return function(t,r){var n=r.data,i=r.resetDefines[e];if(i&&i.dataEach)for(var a=t.start;a0&&h===u.length-p.length){var d=u.slice(0,h);d!=="data"&&(r.mainType=d,r[p.toLowerCase()]=l,f=!0)}}s.hasOwnProperty(u)&&(n[u]=l,f=!0),f||(i[u]=l)})}return{cptQuery:r,dataQuery:n,otherQuery:i}},e.prototype.filter=function(t,r){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,a=n.packedEvent,o=n.model,s=n.view;if(!o||!s)return!0;var l=r.cptQuery,u=r.dataQuery;return f(l,o,"mainType")&&f(l,o,"subType")&&f(l,o,"index","componentIndex")&&f(l,o,"name")&&f(l,o,"id")&&f(u,a,"name")&&f(u,a,"dataIndex")&&f(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,r.otherQuery,i,a));function f(c,p,h,d){return c[h]==null||p[d||h]===c[h]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}();var EM=["symbol","symbolSize","symbolRotate","symbolOffset"],h4=EM.concat(["symbolKeepAspect"]),d4={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var r=e.getData();if(e.legendIcon&&r.setVisual("legendIcon",e.legendIcon),!e.hasSymbolVisual)return;for(var n={},i={},a=!1,o=0;o=0&&ju(l)?l:.5;var u=e.createRadialGradient(o,s,0,o,s,l);return u}function Sv(e,t,r){for(var n=t.type==="radial"?lot(e,t,r):sot(e,t,r),i=t.colorStops,a=0;a0)?null:e==="dashed"?[4*t,2*t]:e==="dotted"?[t]:Ct(e)?[e]:B(e)?e:null}function wv(e){var t=e.style,r=t.lineDash&&t.lineWidth>0&&uot(t.lineDash,t.lineWidth),n=t.lineDashOffset;if(r){var i=t.strokeNoScale&&e.getLineScale?e.getLineScale():1;i&&i!==1&&(r=F(r,function(a){return a/i}),n/=i)}return[r,n]}var fot=new mr(!0);function _x(e){var t=e.stroke;return!(t==null||t==="none"||!(e.lineWidth>0))}function _4(e){return typeof e=="string"&&e!=="none"}function bx(e){var t=e.fill;return t!=null&&t!=="none"}function b4(e,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var r=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=r}else e.fill()}function S4(e,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var r=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=r}else e.stroke()}function Sx(e,t,r){var n=zd(t.image,t.__image,r);if(Hc(n)){var i=e.createPattern(n,t.repeat||"repeat");if(typeof DOMMatrix=="function"&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(t.x||0,t.y||0),a.rotateSelf(0,0,(t.rotation||0)*Ac),a.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(a)}return i}}function cot(e,t,r,n){var i,a=_x(r),o=bx(r),s=r.strokePercent,l=s<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var f=t.path||fot,c=t.__dirty;if(!n){var p=r.fill,h=r.stroke,d=o&&!!p.colorStops,m=a&&!!h.colorStops,v=o&&!!p.image,g=a&&!!h.image,y=void 0,x=void 0,_=void 0,S=void 0,b=void 0;(d||m)&&(b=t.getBoundingRect()),d&&(y=c?Sv(e,p,b):t.__canvasFillGradient,t.__canvasFillGradient=y),m&&(x=c?Sv(e,h,b):t.__canvasStrokeGradient,t.__canvasStrokeGradient=x),v&&(_=c||!t.__canvasFillPattern?Sx(e,p,t):t.__canvasFillPattern,t.__canvasFillPattern=_),g&&(S=c||!t.__canvasStrokePattern?Sx(e,h,t):t.__canvasStrokePattern,t.__canvasStrokePattern=_),d?e.fillStyle=y:v&&(_?e.fillStyle=_:o=!1),m?e.strokeStyle=x:g&&(S?e.strokeStyle=S:a=!1)}var w=t.getGlobalScale();f.setScale(w[0],w[1],t.segmentIgnoreThreshold);var T,M;e.setLineDash&&r.lineDash&&(i=wv(t),T=i[0],M=i[1]);var C=!0;(u||c&Ps)&&(f.setDPR(e.dpr),l?f.setContext(null):(f.setContext(e),C=!1),f.reset(),t.buildPath(f,t.shape,n),f.toStatic(),t.pathUpdated()),C&&f.rebuildPath(e,l?s:1),T&&(e.setLineDash(T),e.lineDashOffset=M),n||(r.strokeFirst?(a&&S4(e,r),o&&b4(e,r)):(o&&b4(e,r),a&&S4(e,r))),T&&e.setLineDash([])}function pot(e,t,r){var n=t.__image=zd(r.image,t.__image,t,t.onload);if(!(!n||!Hc(n))){var i=r.x||0,a=r.y||0,o=t.getWidth(),s=t.getHeight(),l=n.width/n.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=n.width,s=n.height),r.sWidth&&r.sHeight){var u=r.sx||0,f=r.sy||0;e.drawImage(n,u,f,r.sWidth,r.sHeight,i,a,o,s)}else if(r.sx&&r.sy){var u=r.sx,f=r.sy,c=o-u,p=s-f;e.drawImage(n,u,f,c,p,i,a,o,s)}else e.drawImage(n,i,a,o,s)}}function hot(e,t,r){var n,i=r.text;if(i!=null&&(i+=""),i){e.font=r.font||Qn,e.textAlign=r.textAlign,e.textBaseline=r.textBaseline;var a=void 0,o=void 0;e.setLineDash&&r.lineDash&&(n=wv(t),a=n[0],o=n[1]),a&&(e.setLineDash(a),e.lineDashOffset=o),r.strokeFirst?(_x(r)&&e.strokeText(i,r.x,r.y),bx(r)&&e.fillText(i,r.x,r.y)):(bx(r)&&e.fillText(i,r.x,r.y),_x(r)&&e.strokeText(i,r.x,r.y)),a&&e.setLineDash([])}}var w4=["shadowBlur","shadowOffsetX","shadowOffsetY"],T4=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function I4(e,t,r,n,i){var a=!1;if(!n&&(r=r||{},t===r))return!1;if(n||t.opacity!==r.opacity){Un(e,i),a=!0;var o=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(o)?Ha.opacity:o}(n||t.blend!==r.blend)&&(a||(Un(e,i),a=!0),e.globalCompositeOperation=t.blend||Ha.blend);for(var s=0;s0&&r.unfinished);r.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(r,n,i){if(!this[jr]){if(this._disposed){this.id;return}var a,o,s;if(rt(n)&&(i=n.lazyUpdate,a=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[jr]=!0,!this._model||n){var l=new d3(this._api),u=this._theme,f=this._model=new $0;f.scheduler=this._scheduler,f.ssr=this._ssr,f.init(null,null,null,u,this._locale,l)}this._model.setOption(r,{replaceMerge:o},FM);var c={seriesTransition:s,optionChanged:!0};if(i)this[Vn]={silent:a,updateParams:c},this[jr]=!1,this.getZr().wakeUp();else{try{pp(this),tl.update.call(this,null,c)}catch(p){throw this[Vn]=null,this[jr]=!1,p}this._ssr||this._zr.flush(),this[Vn]=null,this[jr]=!1,Mv.call(this,a),Av.call(this,a)}}},t.prototype.setTheme=function(){},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Ot.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(r){return this.renderToCanvas(r)},t.prototype.renderToCanvas=function(r){r=r||{};var n=this._zr.painter;return n.getRenderedCanvas({backgroundColor:r.backgroundColor||this._model.get("backgroundColor"),pixelRatio:r.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(r){r=r||{};var n=this._zr.painter;return n.renderToString({useViewBox:r.useViewBox})},t.prototype.getSvgDataURL=function(){if(Ot.svgSupported){var r=this._zr,n=r.storage.getDisplayList();return D(n,function(i){i.stopAnimation(null,!0)}),r.painter.toDataURL()}},t.prototype.getDataURL=function(r){if(this._disposed){this.id;return}r=r||{};var n=r.excludeComponents,i=this._model,a=[],o=this;D(n,function(l){i.eachComponent({mainType:l},function(u){var f=o._componentsMap[u.__viewId];f.group.ignore||(a.push(f),f.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(r).toDataURL("image/"+(r&&r.type||"png"));return D(a,function(l){l.group.ignore=!1}),s},t.prototype.getConnectedDataURL=function(r){if(this._disposed){this.id;return}var n=r.type==="svg",i=this.group,a=Math.min,o=Math.max,s=1/0;if(q4[i]){var l=s,u=s,f=-s,c=-s,p=[],h=r&&r.pixelRatio||this.getDevicePixelRatio();D(Dv,function(x,_){if(x.group===i){var S=n?x.getZr().painter.getSvgDom().innerHTML:x.renderToCanvas(at(r)),b=x.getDom().getBoundingClientRect();l=a(b.left,l),u=a(b.top,u),f=o(b.right,f),c=o(b.bottom,c),p.push({dom:S,left:b.left,top:b.top})}}),l*=h,u*=h,f*=h,c*=h;var d=f-l,m=c-u,v=Wr.createCanvas(),g=F2(v,{renderer:n?"svg":"canvas"});if(g.resize({width:d,height:m}),n){var y="";return D(p,function(x){var _=x.left-l,S=x.top-u;y+=''+x.dom+""}),g.painter.getSvgRoot().innerHTML=y,r.connectedBackgroundColor&&g.painter.setBackgroundColor(r.connectedBackgroundColor),g.refreshImmediately(),g.painter.toDataURL()}else return r.connectedBackgroundColor&&g.add(new At({shape:{x:0,y:0,width:d,height:m},style:{fill:r.connectedBackgroundColor}})),D(p,function(x){var _=new me({style:{x:x.left*h-l,y:x.top*h-u,image:x.dom}});g.add(_)}),g.refreshImmediately(),v.toDataURL("image/"+(r&&r.type||"png"))}else return this.getDataURL(r)},t.prototype.convertToPixel=function(r,n){return OM(this,"convertToPixel",r,n)},t.prototype.convertFromPixel=function(r,n){return OM(this,"convertFromPixel",r,n)},t.prototype.containPixel=function(r,n){if(this._disposed){this.id;return}var i=this._model,a,o=Us(i,r);return D(o,function(s,l){l.indexOf("Models")>=0&&D(s,function(u){var f=u.coordinateSystem;if(f&&f.containPoint)a=a||!!f.containPoint(n);else if(l==="seriesModels"){var c=this._chartsMap[u.__viewId];c&&c.containPoint&&(a=a||c.containPoint(n,u))}},this)},this),!!a},t.prototype.getVisual=function(r,n){var i=this._model,a=Us(i,r,{defaultMainType:"series"}),o=a.seriesModel,s=o.getData(),l=a.hasOwnProperty("dataIndexInside")?a.dataIndexInside:a.hasOwnProperty("dataIndex")?s.indexOfRawIndex(a.dataIndex):null;return l!=null?_v(s,l,n):Qa(s,n)},t.prototype.getViewOfComponentModel=function(r){return this._componentsMap[r.__viewId]},t.prototype.getViewOfSeriesModel=function(r){return this._chartsMap[r.__viewId]},t.prototype._initEvents=function(){var r=this;D(kot,function(n){var i=function(a){var o=r.getModel(),s=a.target,l,u=n==="globalout";if(u?l={}:s&&pa(s,function(d){var m=ht(d);if(m&&m.dataIndex!=null){var v=m.dataModel||o.getSeriesByIndex(m.seriesIndex);return l=v&&v.getDataParams(m.dataIndex,m.dataType,s)||{},!0}else if(m.eventData)return l=V({},m.eventData),!0},!0),l){var f=l.componentType,c=l.componentIndex;(f==="markLine"||f==="markPoint"||f==="markArea")&&(f="series",c=l.seriesIndex);var p=f&&c!=null&&o.getComponent(f,c),h=p&&r[p.mainType==="series"?"_chartsMap":"_componentsMap"][p.__viewId];l.event=a,l.type=n,r._$eventProcessor.eventInfo={targetEl:s,packedEvent:l,model:p,view:h},r.trigger(n,l)}};i.zrEventfulCallAtLast=!0,r._zr.on(n,i,r)}),D(Cv,function(n,i){r._messageCenter.on(i,function(a){this.trigger(i,a)},r)}),D(["selectchanged"],function(n){r._messageCenter.on(n,function(i){this.trigger(n,i)},r)}),m4(this._messageCenter,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var r=this.getDom();r&&q2(this.getDom(),YM,"");var n=this,i=n._api,a=n._model;D(n._componentsViews,function(o){o.dispose(a,i)}),D(n._chartsViews,function(o){o.dispose(a,i)}),n._zr.dispose(),n._dom=n._model=n._chartsMap=n._componentsMap=n._chartsViews=n._componentsViews=n._scheduler=n._api=n._zr=n._throttledZrFlush=n._theme=n._coordSysMgr=n._messageCenter=null,delete Dv[n.id]},t.prototype.resize=function(r){if(!this[jr]){if(this._disposed){this.id;return}this._zr.resize(r);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var i=n.resetOption("media"),a=r&&r.silent;this[Vn]&&(a==null&&(a=this[Vn].silent),i=!0,this[Vn]=null),this[jr]=!0;try{i&&pp(this),tl.update.call(this,{type:"resize",animation:V({duration:0},r&&r.animation)})}catch(o){throw this[jr]=!1,o}this[jr]=!1,Mv.call(this,a),Av.call(this,a)}}},t.prototype.showLoading=function(r,n){if(this._disposed){this.id;return}if(rt(r)&&(n=r,r=""),r=r||"default",this.hideLoading(),!!GM[r]){var i=GM[r](this._api,n),a=this._zr;this._loadingFX=i,a.add(i)}},t.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(r){var n=V({},r);return n.type=Cv[r.type],n},t.prototype.dispatchAction=function(r,n){if(this._disposed){this.id;return}if(rt(n)||(n={silent:!!n}),!!Cx[r.type]&&this._model){if(this[jr]){this._pendingActions.push(r);return}var i=n.silent;UM.call(this,r,i);var a=n.flush;a?this._zr.flush():a!==!1&&Ot.browser.weChat&&this._throttledZrFlush(),Mv.call(this,i),Av.call(this,i)}},t.prototype.updateLabelLayout=function(){Pi.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(r){if(this._disposed){this.id;return}var n=r.seriesIndex,i=this.getModel(),a=i.getSeriesByIndex(n);a.appendData(r),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=function(){pp=function(c){var p=c._scheduler;p.restorePipelines(c._model),p.prepareStageTasks(),kM(c,!0),kM(c,!1),p.plan()},kM=function(c,p){for(var h=c._model,d=c._scheduler,m=p?c._componentsViews:c._chartsViews,v=p?c._componentsMap:c._chartsMap,g=c._zr,y=c._api,x=0;xp.get("hoverLayerThreshold")&&!Ot.node&&!Ot.worker&&p.eachSeries(function(v){if(!v.preventUsingHoverLayer){var g=c._chartsMap[v.__viewId];g.__alive&&g.eachRendered(function(y){y.states.emphasis&&(y.states.emphasis.hoverLayer=!0)})}})}function o(c,p){var h=c.get("blendMode")||null;p.eachRendered(function(d){d.isGroup||(d.style.blend=h)})}function s(c,p){if(!c.preventAutoZ){var h=c.get("z")||0,d=c.get("zlevel")||0;p.eachRendered(function(m){return l(m,h,d,-1/0),!0})}}function l(c,p,h,d){var m=c.getTextContent(),v=c.getTextGuideLine(),g=c.isGroup;if(g)for(var y=c.childrenRef(),x=0;x0?{duration:m,delay:h.get("delay"),easing:h.get("easing")}:null;p.eachRendered(function(g){if(g.states&&g.states.emphasis){if(Fo(g))return;if(g instanceof vt&&Zz(g),g.__dirty){var y=g.prevStates;y&&g.useStates(y)}if(d){g.stateTransition=v;var x=g.getTextContent(),_=g.getTextGuideLine();x&&(x.stateTransition=v),_&&(_.stateTransition=v)}g.__dirty&&i(g)}})}Y4=function(c){return new(function(p){N(h,p);function h(){return p!==null&&p.apply(this,arguments)||this}return h.prototype.getCoordinateSystems=function(){return c._coordSysMgr.getCoordinateSystems()},h.prototype.getComponentByElement=function(d){for(;d;){var m=d.__ecComponentInfo;if(m!=null)return c._model.getComponent(m.mainType,m.index);d=d.parent}},h.prototype.enterEmphasis=function(d,m){Yr(d,m),Ri(c)},h.prototype.leaveEmphasis=function(d,m){Xr(d,m),Ri(c)},h.prototype.enterBlur=function(d){d0(d),Ri(c)},h.prototype.leaveBlur=function(d){Wd(d),Ri(c)},h.prototype.enterSelect=function(d){xT(d),Ri(c)},h.prototype.leaveSelect=function(d){_T(d),Ri(c)},h.prototype.getModel=function(){return c.getModel()},h.prototype.getViewOfComponentModel=function(d){return c.getViewOfComponentModel(d)},h.prototype.getViewOfSeriesModel=function(d){return c.getViewOfSeriesModel(d)},h}(j0))(c)},iU=function(c){function p(h,d){for(var m=0;m=0)){Z4.push(r);var a=DM.wrapStageHandler(r,i);a.__prio=t,a.__raw=r,e.push(a)}}function KM(e,t){GM[e]=t}function hU(e,t,r){var n=V4("registerMap");n&&n(e,t,r)}var dU=P3;el(HM,t4);el(Ex,e4);el(Ex,r4);el(HM,d4);el(Ex,v4);el(j4,PM);XM(Q0);qM(Tot,uM);KM("default",CM);cn({type:Xs,event:Xs,update:Xs},ce);cn({type:Gd,event:Gd,update:Gd},ce);cn({type:qc,event:qc,update:qc},ce);cn({type:Hd,event:Hd,update:Hd},ce);cn({type:Zc,event:Zc,update:Zc},ce);lU("light",s4);lU("dark",c4);var vU=[],Uot={registerPreprocessor:XM,registerProcessor:qM,registerPostInit:uU,registerPostUpdate:fU,registerUpdateLifecycle:Ix,registerAction:cn,registerCoordinateSystem:cU,registerLayout:pU,registerVisual:el,registerTransform:dU,registerLoading:KM,registerMap:hU,registerImpl:U4,PRIORITY:Q4,ComponentModel:Pt,ComponentView:Xt,SeriesModel:Wt,ChartView:Vt,registerComponentModel:function(e){Pt.registerClass(e)},registerComponentView:function(e){Xt.registerClass(e)},registerSeriesModel:function(e){Wt.registerClass(e)},registerChartView:function(e){Vt.registerClass(e)},registerSubTypeDefaulter:function(e,t){Pt.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){bO(e,t)}};function Nt(e){if(B(e)){D(e,function(t){Nt(t)});return}gt(vU,e)>=0||(vU.push(e),j(e)&&(e={install:e}),e.install(Uot))}function Ev(e){return e==null?0:e.length||1}function mU(e){return e}var Vot=function(){function e(t,r,n,i,a,o){this._old=t,this._new=r,this._oldKeyGetter=n||mU,this._newKeyGetter=i||mU,this.context=a,this._diffModeMultiple=o==="multiple"}return e.prototype.add=function(t){return this._add=t,this},e.prototype.update=function(t){return this._update=t,this},e.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},e.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},e.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},e.prototype.remove=function(t){return this._remove=t,this},e.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},e.prototype._executeOneToOne=function(){var t=this._old,r=this._new,n={},i=new Array(t.length),a=new Array(r.length);this._initIndexMap(t,null,i,"_oldKeyGetter"),this._initIndexMap(r,n,a,"_newKeyGetter");for(var o=0;o1){var f=l.shift();l.length===1&&(n[s]=l[0]),this._update&&this._update(f,o)}else u===1?(n[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(a,n)},e.prototype._executeMultiple=function(){var t=this._old,r=this._new,n={},i={},a=[],o=[];this._initIndexMap(t,n,a,"_oldKeyGetter"),this._initIndexMap(r,i,o,"_newKeyGetter");for(var s=0;s1&&p===1)this._updateManyToOne&&this._updateManyToOne(f,u),i[l]=null;else if(c===1&&p>1)this._updateOneToMany&&this._updateOneToMany(f,u),i[l]=null;else if(c===1&&p===1)this._update&&this._update(f,u),i[l]=null;else if(c>1&&p>1)this._updateManyToMany&&this._updateManyToMany(f,u),i[l]=null;else if(c>1)for(var h=0;h1)for(var s=0;s30}var Iv=rt,rl=F,Yot=typeof Int32Array>"u"?Array:Int32Array,Xot="e\0\0",yU=-1,qot=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],Zot=["_approximateExtent"],xU,Rx,Lv,Pv,eA,Nx,rA,Kot=function(){function e(t,r){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 n,i=!1;Px(t)?(n=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(i=!0,n=t),n=n||["x","y"];for(var a={},o=[],s={},l=!1,u={},f=0;f=r)){var n=this._store,i=n.getProvider();this._updateOrdinalMeta();var a=this._nameList,o=this._idList,s=i.getSource().sourceFormat,l=s===wr;if(l&&!i.pure)for(var u=[],f=t;f0},e.prototype.ensureUniqueItemVisual=function(t,r){var n=this._itemVisuals,i=n[t];i||(i=n[t]={});var a=i[r];return a==null&&(a=this.getVisual(r),B(a)?a=a.slice():Iv(a)&&(a=V({},a)),i[r]=a),a},e.prototype.setItemVisual=function(t,r,n){var i=this._itemVisuals[t]||{};this._itemVisuals[t]=i,Iv(r)?V(i,r):i[r]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(t,r){Iv(t)?V(this._layout,t):this._layout[t]=r},e.prototype.getLayout=function(t){return this._layout[t]},e.prototype.getItemLayout=function(t){return this._itemLayouts[t]},e.prototype.setItemLayout=function(t,r,n){this._itemLayouts[t]=n?V(this._itemLayouts[t]||{},r):r},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(t,r){var n=this.hostModel&&this.hostModel.seriesIndex;Bd(n,this.dataType,t,r),this._graphicEls[t]=r},e.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},e.prototype.eachItemGraphicEl=function(t,r){D(this._graphicEls,function(n,i){n&&t&&t.call(r,n,i)})},e.prototype.cloneShallow=function(t){return t||(t=new e(this._schema?this._schema:rl(this.dimensions,this._getDimInfo,this),this.hostModel)),eA(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(t,r){var n=this[t];j(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var i=n.apply(this,arguments);return r.apply(this,[i].concat(dy(arguments)))})},e.internalField=function(){xU=function(t){var r=t._invertedIndicesMap;D(r,function(n,i){var a=t._dimInfos[i],o=a.ordinalMeta,s=t._store;if(o){n=r[i]=new Yot(o.categories.length);for(var l=0;l1&&(l+="__ec__"+f),i[r]=l}}}(),e}(),Ne=Kot;function va(e,t){sp(e)||(e=lp(e)),t=t||{};var r=t.coordDimensions||[],n=t.dimensionsDefine||e.dimensionsDefine||[],i=$(),a=[],o=jot(e,r,n,t.dimensionsCount),s=t.canOmitUnusedDimensions&&tA(o),l=n===e.dimensionsDefine,u=l?JM(e):QM(n),f=t.encodeDefine;!f&&t.encodeDefaulter&&(f=t.encodeDefaulter(e,o));for(var c=$(f),p=new xM(o),h=0;h0&&(n.name=i+(a-1)),a++,t.set(i,a)}}function jot(e,t,r,n){var i=Math.max(e.dimensionsDetectedCount||1,t.length,r.length,n||0);return D(t,function(a){var o;rt(a)&&(o=a.dimsDef)&&(i=Math.max(i,o.length))}),i}function Qot(e,t,r){if(r||t.hasKey(e)){for(var n=0;t.hasKey(e+n);)n++;e+=n}return t.set(e,!0),e}var Jot=function(){function e(t){this.coordSysDims=[],this.axisMap=$(),this.categoryAxisMap=$(),this.coordSysName=t}return e}();function _U(e){var t=e.get("coordinateSystem"),r=new Jot(t),n=tst[t];if(n)return n(e,r,r.axisMap,r.categoryAxisMap),r}var tst={cartesian2d:function(e,t,r,n){var i=e.getReferringComponents("xAxis",se).models[0],a=e.getReferringComponents("yAxis",se).models[0];t.coordSysDims=["x","y"],r.set("x",i),r.set("y",a),dp(i)&&(n.set("x",i),t.firstCategoryDimIndex=0),dp(a)&&(n.set("y",a),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},singleAxis:function(e,t,r,n){var i=e.getReferringComponents("singleAxis",se).models[0];t.coordSysDims=["single"],r.set("single",i),dp(i)&&(n.set("single",i),t.firstCategoryDimIndex=0)},polar:function(e,t,r,n){var i=e.getReferringComponents("polar",se).models[0],a=i.findAxisModel("radiusAxis"),o=i.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],r.set("radius",a),r.set("angle",o),dp(a)&&(n.set("radius",a),t.firstCategoryDimIndex=0),dp(o)&&(n.set("angle",o),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},geo:function(e,t,r,n){t.coordSysDims=["lng","lat"]},parallel:function(e,t,r,n){var i=e.ecModel,a=i.getComponent("parallel",e.get("parallelIndex")),o=t.coordSysDims=a.dimensions.slice();D(a.parallelAxisIndex,function(s,l){var u=i.getComponent("parallelAxis",s),f=o[l];r.set(f,u),dp(u)&&(n.set(f,u),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=l))})}};function dp(e){return e.get("type")==="category"}function bU(e,t,r){r=r||{};var n=r.byIndex,i=r.stackedCoordDimension,a,o,s;est(t)?a=t:(o=t.schema,a=o.dimensions,s=t.store);var l=!!(e&&e.get("stack")),u,f,c,p;if(D(a,function(y,x){H(y)&&(a[x]=y={name:y}),l&&!y.isExtraCoord&&(!n&&!u&&y.ordinalMeta&&(u=y),!f&&y.type!=="ordinal"&&y.type!=="time"&&(!i||i===y.coordDim)&&(f=y))}),f&&!n&&!u&&(n=!0),f){c="__\0ecstackresult_"+e.id,p="__\0ecstackedover_"+e.id,u&&(u.createInvertedIndices=!0);var h=f.coordDim,d=f.type,m=0;D(a,function(y){y.coordDim===h&&m++});var v={name:c,coordDim:h,coordDimIndex:m,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},g={name:p,coordDim:p,coordDimIndex:m+1,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(v.storeDimIndex=s.ensureCalculationDimension(p,d),g.storeDimIndex=s.ensureCalculationDimension(c,d)),o.appendCalculationDimension(v),o.appendCalculationDimension(g)):(a.push(v),a.push(g))}return{stackedDimension:f&&f.name,stackedByDimension:u&&u.name,isStackedByIndex:n,stackedOverDimension:p,stackResultDimension:c}}function est(e){return!Px(e.schema)}function ui(e,t){return!!t&&t===e.getCalculationInfo("stackedDimension")}function kx(e,t){return ui(e,t)?e.getCalculationInfo("stackResultDimension"):t}function rst(e,t){var r=e.get("coordinateSystem"),n=Ko.get(r),i;return t&&t.coordSysDims&&(i=F(t.coordSysDims,function(a){var o={name:a},s=t.axisMap.get(a);if(s){var l=s.get("type");o.type=Qu(l)}return o})),i||(i=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),i}function nst(e,t,r){var n,i;return r&&D(e,function(a,o){var s=a.coordDim,l=r.categoryAxisMap.get(s);l&&(n==null&&(n=o),a.ordinalMeta=l.getOrdinalMeta(),t&&(a.createInvertedIndices=!0)),a.otherDims.itemName!=null&&(i=!0)}),!i&&n!=null&&(e[n].otherDims.itemName=0),n}function ist(e,t,r){r=r||{};var n=t.getSourceManager(),i,a=!1;e?(a=!0,i=lp(e)):(i=n.getSource(),a=i.sourceFormat===wr);var o=_U(t),s=rst(t,o),l=r.useEncodeDefaulter,u=j(l)?l:l?pt(X0,s,t):null,f={coordDimensions:s,generateCoord:r.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!a},c=va(i,f),p=nst(c.dimensions,r.createInvertedIndices,o),h=a?null:n.getSharedDataStore(c),d=bU(t,{schema:c,store:h}),m=new Ne(c,t);m.setCalculationInfo(d);var v=p!=null&&ast(i)?function(g,y,x,_){return _===p?x:this.defaultDimValueGetter(g,y,x,_)}:null;return m.hasItemOption=!1,m.initData(a?i:h,null,v),m}function ast(e){if(e.sourceFormat===wr){var t=ost(e.data||[]);return!B(ra(t))}}function ost(e){for(var t=0;tr[1]&&(r[1]=t[1])},e.prototype.unionExtentFromData=function(t,r){this.unionExtent(t.getApproximateExtent(r))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(t,r){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(r)||(n[1]=r)},e.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},e.prototype.isBlank=function(){return this._isBlank},e.prototype.setBlank=function(t){this._isBlank=t},e}();Bs(SU);var Bn=SU;var sst=0,lst=function(){function e(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++sst}return e.createByAxisModel=function(t){var r=t.option,n=r.data,i=n&&F(n,ust);return new e({categories:i,needCollect:!i,deduplication:r.dedplication!==!1})},e.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},e.prototype.parseAndCollect=function(t){var r,n=this._needCollect;if(!H(t)&&!n)return t;if(n&&!this._deduplication)return r=this.categories.length,this.categories[r]=t,r;var i=this._getOrCreateMap();return r=i.get(t),r==null&&(n?(r=this.categories.length,this.categories[r]=t,i.set(t,r)):r=NaN),r},e.prototype._getOrCreateMap=function(){return this._map||(this._map=$(this.categories))},e}();function ust(e){return rt(e)&&e.value!=null?e.value:e+""}var Rv=lst;function Nv(e){return e.type==="interval"||e.type==="log"}function TU(e,t,r,n){var i={},a=e[1]-e[0],o=i.interval=t0(a/t,!0);r!=null&&on&&(o=i.interval=n);var s=i.intervalPrecision=nA(o),l=i.niceTickExtent=[pe(Math.ceil(e[0]/o)*o,s),pe(Math.floor(e[1]/o)*o,s)];return fst(l,e),i}function Ox(e){var t=Math.pow(10,Jy(e)),r=e/t;return r?r===2?r=3:r===3?r=5:r*=2:r=1,pe(r*t)}function nA(e){return an(e)+2}function wU(e,t,r){e[t]=Math.max(Math.min(e[t],r[1]),r[0])}function fst(e,t){!isFinite(e[0])&&(e[0]=t[0]),!isFinite(e[1])&&(e[1]=t[1]),wU(e,0,t),wU(e,1,t),e[0]>e[1]&&(e[0]=e[1])}function nl(e,t){return e>=t[0]&&e<=t[1]}function il(e,t){return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])}function al(e,t){return e*(t[1]-t[0])+t[0]}var MU=function(e){N(t,e);function t(r){var n=e.call(this,r)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new Rv({})),B(i)&&(i=new Rv({categories:F(i,function(a){return rt(a)?a.value:a})})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return t.prototype.parse=function(r){return r==null?NaN:H(r)?this._ordinalMeta.getOrdinal(r):Math.round(r)},t.prototype.contain=function(r){return r=this.parse(r),nl(r,this._extent)&&this._ordinalMeta.categories[r]!=null},t.prototype.normalize=function(r){return r=this._getTickNumber(this.parse(r)),il(r,this._extent)},t.prototype.scale=function(r){return r=Math.round(al(r,this._extent)),this.getRawOrdinalNumber(r)},t.prototype.getTicks=function(){for(var r=[],n=this._extent,i=n[0];i<=n[1];)r.push({value:i}),i++;return r},t.prototype.getMinorTicks=function(r){},t.prototype.setSortInfo=function(r){if(r==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var n=r.ordinalNumbers,i=this._ordinalNumbersByTick=[],a=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Math.min(s,n.length);o=0&&r=0&&r=r},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t}(Bn);Bn.registerClass(MU);var kv=MU;var Ju=pe,AU=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="interval",r._interval=0,r._intervalPrecision=2,r}return t.prototype.parse=function(r){return r},t.prototype.contain=function(r){return nl(r,this._extent)},t.prototype.normalize=function(r){return il(r,this._extent)},t.prototype.scale=function(r){return al(r,this._extent)},t.prototype.setExtent=function(r,n){var i=this._extent;isNaN(r)||(i[0]=parseFloat(r)),isNaN(n)||(i[1]=parseFloat(n))},t.prototype.unionExtent=function(r){var n=this._extent;r[0]n[1]&&(n[1]=r[1]),this.setExtent(n[0],n[1])},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(r){this._interval=r,this._niceExtent=this._extent.slice(),this._intervalPrecision=nA(r)},t.prototype.getTicks=function(r){var n=this._interval,i=this._extent,a=this._niceExtent,o=this._intervalPrecision,s=[];if(!n)return s;var l=1e4;i[0]l)return[];var f=s.length?s[s.length-1].value:a[1];return i[1]>f&&(r?s.push({value:Ju(f+n,o)}):s.push({value:i[1]})),s},t.prototype.getMinorTicks=function(r){for(var n=this.getTicks(!0),i=[],a=this.getExtent(),o=1;oa[0]&&h0&&(a=a===null?s:Math.min(a,s))}r[n]=a}}return r}function lA(e){var t=pst(e),r=[];return D(e,function(n){var i=n.coordinateSystem,a=i.getBaseAxis(),o=a.getExtent(),s;if(a.type==="category")s=a.getBandWidth();else if(a.type==="value"||a.type==="time"){var l=a.dim+"_"+a.index,u=t[l],f=Math.abs(o[1]-o[0]),c=a.scale.getExtent(),p=Math.abs(c[1]-c[0]);s=u?f/p*u:f}else{var h=n.getData();s=Math.abs(o[1]-o[0])/h.count()}var d=q(n.get("barWidth"),s),m=q(n.get("barMaxWidth"),s),v=q(n.get("barMinWidth")||(PU(n)?.5:1),s),g=n.get("barGap"),y=n.get("barCategoryGap");r.push({bandWidth:s,barWidth:d,barMaxWidth:m,barMinWidth:v,barGap:g,barCategoryGap:y,axisKey:oA(a),stackId:aA(n)})}),EU(r)}function EU(e){var t={};D(e,function(n,i){var a=n.axisKey,o=n.bandWidth,s=t[a]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},l=s.stacks;t[a]=s;var u=n.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var f=n.barWidth;f&&!l[u].width&&(l[u].width=f,f=Math.min(s.remainedWidth,f),s.remainedWidth-=f);var c=n.barMaxWidth;c&&(l[u].maxWidth=c);var p=n.barMinWidth;p&&(l[u].minWidth=p);var h=n.barGap;h!=null&&(s.gap=h);var d=n.barCategoryGap;d!=null&&(s.categoryGap=d)});var r={};return D(t,function(n,i){r[i]={};var a=n.stacks,o=n.bandWidth,s=n.categoryGap;if(s==null){var l=St(a).length;s=Math.max(35-l*4,15)+"%"}var u=q(s,o),f=q(n.gap,1),c=n.remainedWidth,p=n.autoWidthCount,h=(c-u)/(p+(p-1)*f);h=Math.max(h,0),D(a,function(g){var y=g.maxWidth,x=g.minWidth;if(g.width){var _=g.width;y&&(_=Math.min(_,y)),x&&(_=Math.max(_,x)),g.width=_,c-=_+f*_,p--}else{var _=h;y&&y<_&&(_=Math.min(y,c)),x&&x>_&&(_=x),_!==h&&(g.width=_,c-=_+f*_,p--)}}),h=(c-u)/(p+(p-1)*f),h=Math.max(h,0);var d=0,m;D(a,function(g,y){g.width||(g.width=h),m=g,d+=g.width*(1+f)}),m&&(d-=m.width*f);var v=-d/2;D(a,function(g,y){r[i][y]=r[i][y]||{bandWidth:o,offset:v,width:g.width},v+=g.width*(1+f)})}),r}function IU(e,t,r){if(e&&t){var n=e[oA(t)];return n!=null&&r!=null?n[aA(r)]:n}}function Ux(e,t){var r=sA(e,t),n=lA(r);D(r,function(i){var a=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),l=aA(i),u=n[oA(s)][l],f=u.offset,c=u.width;a.setLayout({bandWidth:u.bandWidth,offset:f,size:c})})}function Vx(e){return{seriesType:e,plan:si(),reset:function(t){if(LU(t)){var r=t.getData(),n=t.coordinateSystem,i=n.getBaseAxis(),a=n.getOtherAxis(i),o=r.getDimensionIndex(r.mapDimension(a.dim)),s=r.getDimensionIndex(r.mapDimension(i.dim)),l=t.get("showBackground",!0),u=r.mapDimension(a.dim),f=r.getCalculationInfo("stackResultDimension"),c=ui(r,u)&&!!r.getCalculationInfo("stackedOnSeries"),p=a.isHorizontal(),h=hst(i,a),d=PU(t),m=t.get("barMinHeight")||0,v=f&&r.getDimensionIndex(f),g=r.getLayout("size"),y=r.getLayout("offset");return{progress:function(x,_){for(var S=x.count,b=d&&pn(S*3),w=d&&l&&pn(S*3),T=d&&pn(S),M=n.master.getRect(),C=p?M.width:M.height,A,P=_.getStore(),L=0;(A=x.next())!=null;){var I=P.get(c?v:o,A),E=P.get(s,A),R=h,k=void 0;c&&(k=+I-P.get(o,A));var O=void 0,z=void 0,U=void 0,G=void 0;if(p){var Y=n.dataToPoint([I,E]);if(c){var et=n.dataToPoint([k,E]);R=et[0]}O=R,z=Y[1]+y,U=Y[0]-R,G=g,Math.abs(U)>>1;e[i][1]i&&(this._approxInterval=i);var s=Bx.length,l=Math.min(dst(Bx,this._approxInterval,0,s),s-1);this._interval=Bx[l][1],this._minLevelUnit=Bx[Math.max(l-1,0)][0]},t.prototype.parse=function(r){return Ct(r)?r:+on(r)},t.prototype.contain=function(r){return nl(this.parse(r),this._extent)},t.prototype.normalize=function(r){return il(this.parse(r),this._extent)},t.prototype.scale=function(r){return al(r,this._extent)},t.type="time",t}(Fn),Bx=[["second",U0],["minute",V0],["hour",np],["quarter-day",np*6],["half-day",np*12],["day",ii*1.2],["half-week",ii*3.5],["week",ii*7],["month",ii*31],["quarter",ii*95],["half-year",GT/2],["year",GT]];function vst(e,t,r,n){var i=on(t),a=on(r),o=function(d){return YT(i,d,n)===YT(a,d,n)},s=function(){return o("year")},l=function(){return s()&&o("month")},u=function(){return l()&&o("day")},f=function(){return u()&&o("hour")},c=function(){return f()&&o("minute")},p=function(){return c()&&o("second")},h=function(){return p()&&o("millisecond")};switch(e){case"year":return s();case"month":return l();case"day":return u();case"hour":return f();case"minute":return c();case"second":return p();case"millisecond":return h()}}function mst(e,t){return e/=ii,e>16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function gst(e){var t=30*ii;return e/=t,e>6?6:e>3?3:e>2?2:1}function yst(e){return e/=np,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function RU(e,t){return e/=t?V0:U0,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function xst(e){return t0(e,!0)}function _st(e,t,r){var n=new Date(e);switch(Wu(t)){case"year":case"month":n[XT(r)](0);case"day":n[qT(r)](1);case"hour":n[ZT(r)](0);case"minute":n[KT(r)](0);case"second":n[$T(r)](0),n[jT(r)](0)}return n.getTime()}function bst(e,t,r,n){var i=1e4,a=WT,o=0;function s(C,A,P,L,I,E,R){for(var k=new Date(A),O=A,z=k[L]();O1&&E===0&&P.unshift({value:P[0].value-O})}}for(var E=0;E=n[0]&&y<=n[1]&&c++)}var x=(n[1]-n[0])/t;if(c>x*1.5&&p>x/1.5||(u.push(v),c>x||e===a[h]))break}f=[]}}}for(var _=Ut(F(u,function(C){return Ut(C,function(A){return A.value>=n[0]&&A.value<=n[1]&&!A.notAdd})}),function(C){return C.length>0}),S=[],b=_.length-1,h=0;h<_.length;++h)for(var w=_[h],T=0;T0;)a*=10;var s=[pe(Tst(n[0]/a)*a),pe(wst(n[1]/a)*a)];this._interval=a,this._niceExtent=s}},t.prototype.calcNiceExtent=function(r){Ov.calcNiceExtent.call(this,r),this._fixMin=r.fixMin,this._fixMax=r.fixMax},t.prototype.parse=function(r){return r},t.prototype.contain=function(r){return r=ma(r)/ma(this.base),nl(r,this._extent)},t.prototype.normalize=function(r){return r=ma(r)/ma(this.base),il(r,this._extent)},t.prototype.scale=function(r){return r=al(r,this._extent),Gx(this.base,r)},t.type="log",t}(Bn),OU=uA.prototype;OU.getMinorTicks=Ov.getMinorTicks;OU.getLabel=Ov.getLabel;function Hx(e,t){return Sst(e,an(t))}Bn.registerClass(uA);var zU=uA;var Mst=function(){function e(t,r,n){this._prepareParams(t,r,n)}return e.prototype._prepareParams=function(t,r,n){n[1]0&&l>0&&!u&&(s=0),s<0&&l<0&&!f&&(l=0));var p=this._determinedMin,h=this._determinedMax;return p!=null&&(s=p,u=!0),h!=null&&(l=h,f=!0),{min:s,max:l,minFixed:u,maxFixed:f,isBlank:c}},e.prototype.modifyDataMinMax=function(t,r){this[Cst[t]]=r},e.prototype.setDeterminedMinMax=function(t,r){var n=Ast[t];this[n]=r},e.prototype.freeze=function(){this.frozen=!0},e}();var Ast={min:"_determinedMin",max:"_determinedMax"},Cst={min:"_dataMin",max:"_dataMax"};function Yx(e,t,r){var n=e.rawExtentInfo;return n||(n=new Mst(e,t,r),e.rawExtentInfo=n,n)}function Wx(e,t){return t==null?null:Es(t)?NaN:e.parse(t)}function fA(e,t){var r=e.type,n=Yx(e,t,e.getExtent()).calculate();e.setBlank(n.isBlank);var i=n.min,a=n.max,o=t.ecModel;if(o&&r==="time"){var s=sA("bar",o),l=!1;if(D(s,function(c){l=l||c.getBaseAxis()===t.axis}),l){var u=lA(s),f=Dst(i,a,t,u);i=f.min,a=f.max}}return{extent:[i,a],fixMin:n.minFixed,fixMax:n.maxFixed}}function Dst(e,t,r,n){var i=r.axis.getExtent(),a=i[1]-i[0],o=IU(n,r.axis);if(o===void 0)return{min:e,max:t};var s=1/0;D(o,function(h){s=Math.min(h.offset,s)});var l=-1/0;D(o,function(h){l=Math.max(h.offset+h.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,f=t-e,c=1-(s+l)/a,p=f/c-f;return t+=p*(l/u),e-=p*(s/u),{min:e,max:t}}function Ja(e,t){var r=t,n=fA(e,r),i=n.extent,a=r.get("splitNumber");e instanceof zU&&(e.base=r.get("logBase"));var o=e.type,s=r.get("interval"),l=o==="interval"||o==="time";e.setExtent(i[0],i[1]),e.calcNiceExtent({splitNumber:a,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:l?r.get("minInterval"):null,maxInterval:l?r.get("maxInterval"):null}),s!=null&&e.setInterval&&e.setInterval(s)}function ol(e,t){if(t=t||e.get("type"),t)switch(t){case"category":return new kv({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:[1/0,-1/0]});case"time":return new Fx({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC")});default:return new(Bn.getClass(t)||Fn)}}function UU(e){var t=e.scale.getExtent(),r=t[0],n=t[1];return!(r>0&&n>0||r<0&&n<0)}function vp(e){var t=e.getLabelModel().get("formatter"),r=e.type==="category"?e.scale.getExtent()[0]:null;return e.scale.type==="time"?function(n){return function(i,a){return e.scale.getFormattedLabel(i,a,n)}}(t):H(t)?function(n){return function(i){var a=e.scale.getLabel(i),o=n.replace("{value}",a??"");return o}}(t):j(t)?function(n){return function(i,a){return r!=null&&(a=i.value-r),n(zv(e,i),a,i.level!=null?{level:i.level}:null)}}(t):function(n){return e.scale.getLabel(n)}}function zv(e,t){return e.type==="category"?e.scale.getLabel(t):t.value}function VU(e){var t=e.model,r=e.scale;if(!(!t.get(["axisLabel","show"])||r.isBlank())){var n,i,a=r.getExtent();r instanceof kv?i=r.count():(n=r.getTicks(),i=n.length);var o=e.getLabelModel(),s=vp(e),l,u=1;i>40&&(u=Math.ceil(i/40));for(var f=0;fe[1]&&(e[1]=i[1])})}var to=function(){function e(){}return e.prototype.getNeedCrossZero=function(){var t=this.option;return!t.scale},e.prototype.getCoordSysModel=function(){},e}();var Ist=1e-8;function FU(e,t){return Math.abs(e-t)i&&(n=o,i=l)}if(n)return Pst(n.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},t.prototype.getBoundingRect=function(r){var n=this._rect;if(n&&!r)return n;var i=[1/0,1/0],a=[-1/0,-1/0],o=this.geometries;return D(o,function(s){s.type==="polygon"?HU(s.exterior,i,a,r):D(s.points,function(l){HU(l,i,a,r)})}),isFinite(i[0])&&isFinite(i[1])&&isFinite(a[0])&&isFinite(a[1])||(i[0]=i[1]=a[0]=a[1]=0),n=new dt(i[0],i[1],a[0]-i[0],a[1]-i[1]),r||(this._rect=n),n},t.prototype.contain=function(r){var n=this.getBoundingRect(),i=this.geometries;if(!n.contain(r[0],r[1]))return!1;t:for(var a=0,o=i.length;a>1^-(s&1),l=l>>1^-(l&1),s+=i,l+=a,i=s,a=l,n.push([s/r,l/r])}return n}function vA(e,t){return e=Rst(e),F(Ut(e.features,function(r){return r.geometry&&r.properties&&r.geometry.coordinates.length>0}),function(r){var n=r.properties,i=r.geometry,a=[];switch(i.type){case"Polygon":var o=i.coordinates;a.push(new pA(o[0],o.slice(1)));break;case"MultiPolygon":D(i.coordinates,function(l){l[0]&&a.push(new pA(l[0],l.slice(1)))});break;case"LineString":a.push(new hA([i.coordinates]));break;case"MultiLineString":a.push(new hA(i.coordinates))}var s=new Kx(n[t||"name"],a,n.cp);return s.properties=n,s})}var Uv=yt();function qU(e){return e.type==="category"?Nst(e):Ost(e)}function ZU(e,t){return e.type==="category"?kst(e,t):{ticks:F(e.scale.getTicks(),function(r){return r.value})}}function Nst(e){var t=e.getLabelModel(),r=KU(e,t);return!t.get("show")||e.scale.isBlank()?{labels:[],labelCategoryInterval:r.labelCategoryInterval}:r}function KU(e,t){var r=$U(e,"labels"),n=Xx(t),i=jU(r,n);if(i)return i;var a,o;return j(n)?a=eV(e,n):(o=n==="auto"?zst(e):n,a=tV(e,o)),QU(r,n,{labels:a,labelCategoryInterval:o})}function kst(e,t){var r=$U(e,"ticks"),n=Xx(t),i=jU(r,n);if(i)return i;var a,o;if((!t.get("show")||e.scale.isBlank())&&(a=[]),j(n))a=eV(e,n,!0);else if(n==="auto"){var s=KU(e,e.getLabelModel());o=s.labelCategoryInterval,a=F(s.labels,function(l){return l.tickValue})}else o=n,a=tV(e,o,!0);return QU(r,n,{ticks:a,tickCategoryInterval:o})}function Ost(e){var t=e.scale.getTicks(),r=vp(e);return{labels:F(t,function(n,i){return{level:n.level,formattedLabel:r(n,i),rawLabel:e.scale.getLabel(n),tickValue:n.value}})}}function $U(e,t){return Uv(e)[t]||(Uv(e)[t]=[])}function jU(e,t){for(var r=0;r40&&(s=Math.max(1,Math.floor(o/40)));for(var l=a[0],u=e.dataToCoord(l+1)-e.dataToCoord(l),f=Math.abs(u*Math.cos(n)),c=Math.abs(u*Math.sin(n)),p=0,h=0;l<=a[1];l+=s){var d=0,m=0,v=Ga(r({value:l}),t.font,"center","top");d=v.width*1.3,m=v.height*1.3,p=Math.max(p,d,7),h=Math.max(h,m,7)}var g=p/f,y=h/c;isNaN(g)&&(g=1/0),isNaN(y)&&(y=1/0);var x=Math.max(0,Math.floor(Math.min(g,y))),_=Uv(e.model),S=e.getExtent(),b=_.lastAutoInterval,w=_.lastTickCount;return b!=null&&w!=null&&Math.abs(b-x)<=1&&Math.abs(w-o)<=1&&b>x&&_.axisExtent0===S[0]&&_.axisExtent1===S[1]?x=b:(_.lastTickCount=o,_.lastAutoInterval=x,_.axisExtent0=S[0],_.axisExtent1=S[1]),x}function Ust(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}function tV(e,t,r){var n=vp(e),i=e.scale,a=i.getExtent(),o=e.getLabelModel(),s=[],l=Math.max((t||0)+1,1),u=a[0],f=i.count();u!==0&&l>1&&f/l>2&&(u=Math.round(Math.ceil(u/l)*l));var c=qx(e),p=o.get("showMinLabel")||c,h=o.get("showMaxLabel")||c;p&&u!==a[0]&&m(a[0]);for(var d=u;d<=a[1];d+=l)m(d);h&&d-l!==a[1]&&m(a[1]);function m(v){var g={value:v};s.push(r?v:{formattedLabel:n(g),rawLabel:i.getLabel(g),tickValue:v})}return s}function eV(e,t,r){var n=e.scale,i=vp(e),a=[];return D(n.getTicks(),function(o){var s=n.getLabel(o),l=o.value;t(o.value,s)&&a.push(r?l:{formattedLabel:i(o),rawLabel:s,tickValue:l})}),a}var rV=[0,1],Vst=function(){function e(t,r,n){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=r,this._extent=n||[0,0]}return e.prototype.contain=function(t){var r=this._extent,n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return t>=n&&t<=i},e.prototype.containData=function(t){return this.scale.contain(t)},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.getPixelPrecision=function(t){return Qy(t||this.scale.getExtent(),this._extent)},e.prototype.setExtent=function(t,r){var n=this._extent;n[0]=t,n[1]=r},e.prototype.dataToCoord=function(t,r){var n=this._extent,i=this.scale;return t=i.normalize(t),this.onBand&&i.type==="ordinal"&&(n=n.slice(),nV(n,i.count())),$t(t,rV,n,r)},e.prototype.coordToData=function(t,r){var n=this._extent,i=this.scale;this.onBand&&i.type==="ordinal"&&(n=n.slice(),nV(n,i.count()));var a=$t(t,n,rV,r);return this.scale.scale(a)},e.prototype.pointToData=function(t,r){},e.prototype.getTicksCoords=function(t){t=t||{};var r=t.tickModel||this.getTickModel(),n=ZU(this,r),i=n.ticks,a=F(i,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=r.get("alignWithLabel");return Bst(this,a,o,t.clamp),a},e.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var t=this.model.getModel("minorTick"),r=t.get("splitNumber");r>0&&r<100||(r=5);var n=this.scale.getMinorTicks(r),i=F(n,function(a){return F(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return i},e.prototype.getViewLabels=function(){return qU(this).labels},e.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},e.prototype.getTickModel=function(){return this.model.getModel("axisTick")},e.prototype.getBandWidth=function(){var t=this._extent,r=this.scale.getExtent(),n=r[1]-r[0]+(this.onBand?1:0);n===0&&(n=1);var i=Math.abs(t[1]-t[0]);return Math.abs(i)/n},e.prototype.calculateCategoryInterval=function(){return JU(this)},e}();function nV(e,t){var r=e[1]-e[0],n=t,i=r/n/2;e[0]+=i,e[1]-=i}function Bst(e,t,r,n){var i=t.length;if(!e.onBand||r||!i)return;var a=e.getExtent(),o,s;if(i===1)t[0].coord=a[0],o=t[1]={coord:a[1]};else{var l=t[i-1].tickValue-t[0].tickValue,u=(t[i-1].coord-t[0].coord)/l;D(t,function(h){h.coord-=u/2});var f=e.scale.getExtent();s=1+f[1]-t[i-1].tickValue,o={coord:t[i-1].coord+u*s},t.push(o)}var c=a[0]>a[1];p(t[0].coord,a[0])&&(n?t[0].coord=a[0]:t.shift()),n&&p(a[0],t[0].coord)&&t.unshift({coord:a[0]}),p(a[1],o.coord)&&(n?o.coord=a[1]:t.pop()),n&&p(o.coord,a[1])&&t.push({coord:a[1]});function p(h,d){return h=pe(h),d=pe(d),c?h>d:hi&&(i+=Vv);var h=Math.atan2(s,o);if(h<0&&(h+=Vv),h>=n&&h<=i||h+Vv>=n&&h+Vv<=i)return l[0]=f,l[1]=c,u-r;var d=r*Math.cos(n)+e,m=r*Math.sin(n)+t,v=r*Math.cos(i)+e,g=r*Math.sin(i)+t,y=(d-o)*(d-o)+(m-s)*(m-s),x=(v-o)*(v-o)+(g-s)*(g-s);return y0){t=t/180*Math.PI,ya.fromArray(e[0]),Me.fromArray(e[1]),Ze.fromArray(e[2]),kt.sub(ro,ya,Me),kt.sub(eo,Ze,Me);var r=ro.len(),n=eo.len();if(!(r<.001||n<.001)){ro.scale(1/r),eo.scale(1/n);var i=ro.dot(eo),a=Math.cos(t);if(a1&&kt.copy(hn,Ze),hn.toArray(e[1])}}}}function oV(e,t,r){if(r<=180&&r>0){r=r/180*Math.PI,ya.fromArray(e[0]),Me.fromArray(e[1]),Ze.fromArray(e[2]),kt.sub(ro,Me,ya),kt.sub(eo,Ze,Me);var n=ro.len(),i=eo.len();if(!(n<.001||i<.001)){ro.scale(1/n),eo.scale(1/i);var a=ro.dot(t),o=Math.cos(r);if(a=l)kt.copy(hn,Ze);else{hn.scaleAndAdd(eo,s/Math.tan(Math.PI/2-f));var c=Ze.x!==Me.x?(hn.x-Me.x)/(Ze.x-Me.x):(hn.y-Me.y)/(Ze.y-Me.y);if(isNaN(c))return;c<0?kt.copy(hn,Me):c>1&&kt.copy(hn,Ze)}hn.toArray(e[1])}}}}function iV(e,t,r,n){var i=r==="normal",a=i?e:e.ensureState(r);a.ignore=t;var o=n.get("smooth");o&&o===!0&&(o=.3),a.shape=a.shape||{},o>0&&(a.shape.smooth=o);var s=n.getModel("lineStyle").getLineStyle();i?e.useStyle(s):a.style=s}function Xst(e,t){var r=t.smooth,n=t.points;if(n)if(e.moveTo(n[0][0],n[0][1]),r>0&&n.length>=3){var i=mi(n[0],n[1]),a=mi(n[1],n[2]);if(!i||!a){e.lineTo(n[1][0],n[1][1]),e.lineTo(n[2][0],n[2][1]);return}var o=Math.min(i,a)*r,s=Dc([],n[1],n[0],o/i),l=Dc([],n[1],n[2],o/a),u=Dc([],s,l,.5);e.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),e.bezierCurveTo(l[0],l[1],l[0],l[1],n[2][0],n[2][1])}else for(var f=1;f0&&a&&b(-c/o,0,o);var v=e[0],g=e[o-1],y,x;_(),y<0&&w(-y,.8),x<0&&w(x,.8),_(),S(y,x,1),S(x,y,-1),_(),y<0&&T(-y),x<0&&T(x);function _(){y=v.rect[t]-n,x=i-g.rect[t]-g.rect[r]}function S(M,C,A){if(M<0){var P=Math.min(C,-M);if(P>0){b(P*A,0,o);var L=P+M;L<0&&w(-L*A,1)}else w(-M*A,1)}}function b(M,C,A){M!==0&&(u=!0);for(var P=C;P0)for(var L=0;L0;L--){var k=A[L-1]*R;b(-k,L,o)}}}function T(M){var C=M<0?-1:1;M=Math.abs(M);for(var A=Math.ceil(M/(o-1)),P=0;P0?b(A,0,P+1):b(-A,o-P-1,o),M-=A,M<=0)return}return u}function lV(e,t,r,n){return sV(e,"x","width",t,r,n)}function Jx(e,t,r,n){return sV(e,"y","height",t,r,n)}function t1(e){var t=[];e.sort(function(m,v){return v.priority-m.priority});var r=new dt(0,0,0,0);function n(m){if(!m.ignore){var v=m.ensureState("emphasis");v.ignore==null&&(v.ignore=!1)}m.ignore=!0}for(var i=0;i=0&&n.attr(a.oldLayoutSelect),gt(p,"emphasis")>=0&&n.attr(a.oldLayoutEmphasis)),Rt(n,u,r,l)}else if(n.attr(u),!Xo(n).valueAnimation){var c=bt(n.style.opacity,1);n.style.opacity=0,Kt(n,{style:{opacity:c}},r,l)}if(a.oldLayout=u,n.states.select){var h=a.oldLayoutSelect={};e1(h,u,r1),e1(h,n.states.select,r1)}if(n.states.emphasis){var d=a.oldLayoutEmphasis={};e1(d,u,r1),e1(d,n.states.emphasis,r1)}R0(n,l,f,r,r)}if(i&&!i.ignore&&!i.invisible){var a=Kst(i),o=a.oldLayout,m={points:i.shape.points};o?(i.attr({shape:o}),Rt(i,{shape:m},r)):(i.setShape(m),i.style.strokePercent=0,Kt(i,{style:{strokePercent:1}},r)),a.oldLayout=m}},e}(),fV=$st;var xA=yt();function _A(e){e.registerUpdateLifecycle("series:beforeupdate",function(t,r,n){var i=xA(r).labelManager;i||(i=xA(r).labelManager=new fV),i.clearLabels()}),e.registerUpdateLifecycle("series:layoutlabels",function(t,r,n){var i=xA(r).labelManager;n.updatedSeries.forEach(function(a){i.addLabelsOfSeries(r.getViewOfSeriesModel(a))}),i.updateLayoutConfig(r),i.layout(r),i.processLabelsOverall()})}var bA=Math.sin,SA=Math.cos,cV=Math.PI,ef=Math.PI*2,jst=180/cV,Qst=function(){function e(){}return e.prototype.reset=function(t){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,t||4)},e.prototype.moveTo=function(t,r){this._add("M",t,r)},e.prototype.lineTo=function(t,r){this._add("L",t,r)},e.prototype.bezierCurveTo=function(t,r,n,i,a,o){this._add("C",t,r,n,i,a,o)},e.prototype.quadraticCurveTo=function(t,r,n,i){this._add("Q",t,r,n,i)},e.prototype.arc=function(t,r,n,i,a,o){this.ellipse(t,r,n,n,0,i,a,o)},e.prototype.ellipse=function(t,r,n,i,a,o,s,l){var u=s-o,f=!l,c=Math.abs(u),p=Fa(c-ef)||(f?u>=ef:-u>=ef),h=u>0?u%ef:u%ef+ef,d=!1;p?d=!0:Fa(c)?d=!1:d=h>=cV==!!f;var m=t+n*SA(o),v=r+i*bA(o);this._start&&this._add("M",m,v);var g=Math.round(a*jst);if(p){var y=1/this._p,x=(f?1:-1)*(ef-y);this._add("A",n,i,g,1,+f,t+n*SA(o+x),r+i*bA(o+x)),y>.01&&this._add("A",n,i,g,0,+f,m,v)}else{var _=t+n*SA(s),S=r+i*bA(s);this._add("A",n,i,g,+d,+f,_,S)}},e.prototype.rect=function(t,r,n,i){this._add("M",t,r),this._add("l",n,0),this._add("l",0,i),this._add("l",-n,0),this._add("Z")},e.prototype.closePath=function(){this._d.length>0&&this._add("Z")},e.prototype._add=function(t,r,n,i,a,o,s,l,u){for(var f=[],c=this._p,p=1;p"}function ilt(e){return""}function Fv(e,t){t=t||{};var r=t.newline?` +`:"";function n(i){var a=i.children,o=i.tag,s=i.attrs,l=i.text;return nlt(o,s)+(o!=="style"?Rr(l):l||"")+(a?""+r+F(a,function(u){return n(u)}).join(r)+r:"")+ilt(o)}return n(e)}function vV(e,t,r){r=r||{};var n=r.newline?` +`:"",i=" {"+n,a=n+"}",o=F(St(e),function(l){return l+i+F(St(e[l]),function(u){return u+":"+e[l][u]+";"}).join(n)+a}).join(n),s=F(St(t),function(l){return"@keyframes "+l+i+F(St(t[l]),function(u){return u+i+F(St(t[l][u]),function(f){var c=t[l][u][f];return f==="d"&&(c='path("'+c+'")'),f+":"+c+";"}).join(n)+a}).join(n)+a}).join(n);return!o&&!s?"":[""].join(n)}function Gv(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssClassIdx:0,cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function AA(e,t,r,n){return Ke("svg","root",{width:e,height:t,xmlns:pV,"xmlns:xlink":MA,version:"1.1",baseProfile:"full",viewBox:n?"0 0 "+e+" "+t:!1},r)}var mV={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},rf="transform-origin";function alt(e,t,r){var n=V({},e.shape);V(n,t),e.buildPath(r,n);var i=new n1;return i.reset(Fy(e)),r.rebuildPath(i,1),i.generateStr(),i.getStr()}function olt(e,t){var r=t.originX,n=t.originY;(r||n)&&(e[rf]=r+"px "+n+"px")}var slt={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function yV(e,t){var r=t.zrId+"-ani-"+t.cssAnimIdx++;return t.cssAnims[r]=e,r}function llt(e,t,r){var n=e.shape.paths,i={},a,o;if(D(n,function(l){var u=Gv(r.zrId);u.animation=!0,Hv(l,{},u,!0);var f=u.cssAnims,c=u.cssNodes,p=St(f),h=p.length;if(h){o=p[h-1];var d=f[o];for(var m in d){var v=d[m];i[m]=i[m]||{d:""},i[m].d+=v.d||""}for(var g in c){var y=c[g].animation;y.indexOf(o)>=0&&(a=y)}}}),!!a){t.d=!1;var s=yV(i,r);return a.replace(o,s)}}function gV(e){return H(e)?mV[e]?"cubic-bezier("+mV[e]+")":Rc(e)?e:"":""}function Hv(e,t,r,n){var i=e.animators,a=i.length,o=[];if(e instanceof Qc){var s=llt(e,t,r);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var l={},u=0;u0}).length){var ut=yV(w,r);return ut+" "+y[0]+" both"}}for(var v in l){var s=m(l[v]);s&&o.push(s)}if(o.length){var g=r.zrId+"-cls-"+r.cssClassIdx++;r.cssNodes["."+g]={animation:o.join(",")},t.class=g}}var Wv=Math.round;function SV(e){return e&&H(e.src)}function wV(e){return e&&j(e.toDataURL)}function CA(e,t,r,n){TA(function(i,a){var o=i==="fill"||i==="stroke";o&&By(a)?IA(t,e,i,n):o&&Td(a)?LA(r,e,i,n):e[i]=a},t,r,!1),vlt(r,e,n)}function xV(e){return Fa(e[0]-1)&&Fa(e[1])&&Fa(e[2])&&Fa(e[3]-1)}function ult(e){return Fa(e[4])&&Fa(e[5])}function DA(e,t,r){if(t&&!(ult(t)&&xV(t))){var n=r?10:1e4;e.transform=xV(t)?"translate("+Wv(t[4]*n)/n+" "+Wv(t[5]*n)/n+")":$k(t)}}function _V(e,t,r){for(var n=e.points,i=[],a=0;a"u"){var v="Image width/height must been given explictly in svg-ssr renderer.";be(p,v),be(h,v)}else if(p==null||h==null){var g=function(C,A){if(C){var P=C.elm,L=p||A.width,I=h||A.height;C.tag==="pattern"&&(u?(I=1,L/=a.width):f&&(L=1,I/=a.height)),C.attrs.width=L,C.attrs.height=I,P&&(P.setAttribute("width",L),P.setAttribute("height",I))}},y=zd(d,null,e,function(C){l||g(b,C),g(c,C)});y&&y.width&&y.height&&(p=p||y.width,h=h||y.height)}c=Ke("image","img",{href:d,width:p,height:h}),o.width=p,o.height=h}else i.svgElement&&(c=at(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(c){var x,_;l?x=_=1:u?(_=1,x=o.width/a.width):f?(x=1,_=o.height/a.height):o.patternUnits="userSpaceOnUse",x!=null&&!isNaN(x)&&(o.width=x),_!=null&&!isNaN(_)&&(o.height=_);var S=Gy(i);S&&(o.patternTransform=S);var b=Ke("pattern","",o,[c]),w=Fv(b),T=n.patternCache,M=T[w];M||(M=n.zrId+"-p"+n.patternIdx++,T[w]=M,o.id=M,b=n.defs[M]=Ke("pattern",M,o,[c])),t[r]=Md(M)}}function MV(e,t,r){var n=r.clipPathCache,i=r.defs,a=n[e.id];if(!a){a=r.zrId+"-c"+r.clipPathIdx++;var o={id:a};n[e.id]=a,i[a]=Ke("clipPath",a,o,[TV(e,r)])}t["clip-path"]=Md(a)}function PA(e){return document.createTextNode(e)}function sl(e,t,r){e.insertBefore(t,r)}function RA(e,t){e.removeChild(t)}function NA(e,t){e.appendChild(t)}function kA(e){return e.parentNode}function OA(e){return e.nextSibling}function a1(e,t){e.textContent=t}var AV=58,glt=120,ylt=Ke("","");function zA(e){return e===void 0}function no(e){return e!==void 0}function xlt(e,t,r){for(var n={},i=t;i<=r;++i){var a=e[i].key;a!==void 0&&(n[a]=i)}return n}function Yv(e,t){var r=e.key===t.key,n=e.tag===t.tag;return n&&r}function Xv(e){var t,r=e.children,n=e.tag;if(no(n)){var i=e.elm=i1(n);if(s1(ylt,e),B(r))for(t=0;ta?(d=r[l+1]==null?null:r[l+1].elm,CV(e,d,r,i,l)):o1(e,t,n,a))}function xp(e,t){var r=t.elm=e.elm,n=e.children,i=t.children;e!==t&&(s1(e,t),zA(t.text)?no(n)&&no(i)?n!==i&&_lt(r,n,i):no(i)?(no(e.text)&&a1(r,""),CV(r,null,i,0,i.length-1)):no(n)?o1(r,n,0,n.length-1):no(e.text)&&a1(r,""):e.text!==t.text&&(no(n)&&o1(r,n,0,n.length-1),a1(r,t.text)))}function UA(e,t){if(Yv(e,t))xp(e,t);else{var r=e.elm,n=kA(r);Xv(t),n!==null&&(sl(n,t.elm,OA(r)),o1(n,[e],0,0))}return t}var blt=0,Slt=function(){function e(t,r,n){if(this.type="svg",this.refreshHover=DV("refreshHover"),this.configLayer=DV("configLayer"),this.storage=r,this._opts=n=V({},n),this.root=t,this._id="zr"+blt++,this._oldVNode=AA(n.width,n.height),t&&!n.ssr){var i=this._viewport=document.createElement("div");i.style.cssText="position:relative;overflow:hidden";var a=this._svgDom=this._oldVNode.elm=i1("svg");s1(null,this._oldVNode),i.appendChild(a),t.appendChild(i)}this.resize(n.width,n.height)}return e.prototype.getType=function(){return this.type},e.prototype.getViewportRoot=function(){return this._viewport},e.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},e.prototype.getSvgDom=function(){return this._svgDom},e.prototype.refresh=function(){if(this.root){var t=this.renderToVNode({willUpdate:!0});t.attrs.style="position:absolute;left:0;top:0;user-select:none",UA(this._oldVNode,t),this._oldVNode=t}},e.prototype.renderOneToVNode=function(t){return EA(t,Gv(this._id))},e.prototype.renderToVNode=function(t){t=t||{};var r=this.storage.getDisplayList(!0),n=this._width,i=this._height,a=Gv(this._id);a.animation=t.animation,a.willUpdate=t.willUpdate,a.compress=t.compress;var o=[],s=this._bgVNode=wlt(n,i,this._backgroundColor,a);s&&o.push(s);var l=t.compress?null:this._mainVNode=Ke("g","main",{},[]);this._paintList(r,a,l?l.children:o),l&&o.push(l);var u=F(St(a.defs),function(p){return a.defs[p]});if(u.length&&o.push(Ke("defs","defs",{},u)),t.animation){var f=vV(a.cssNodes,a.cssAnims,{newline:!0});if(f){var c=Ke("style","stl",{},[],f);o.push(c)}}return AA(n,i,o,t.useViewBox)},e.prototype.renderToString=function(t){return t=t||{},Fv(this.renderToVNode({animation:bt(t.cssAnimation,!0),willUpdate:!1,compress:!0,useViewBox:bt(t.useViewBox,!0)}),{newline:!0})},e.prototype.setBackgroundColor=function(t){this._backgroundColor=t},e.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},e.prototype._paintList=function(t,r,n){for(var i=t.length,a=[],o=0,s,l,u=0,f=0;f=0&&!(p&&l&&p[m]===l[m]);m--);for(var v=d-1;v>m;v--)o--,s=a[o-1];for(var g=m+1;g=s)}}for(var c=this.__startIndex;c15)break}}I.prevElClipPaths&&g.restore()};if(y)if(y.length===0)T=v.__endIndex;else for(var C=h.dpr,A=0;A0&&t>i[0]){for(l=0;lt);l++);s=n[i[l]]}if(i.splice(l+1,0,t),n[t]=r,!r.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(r.dom,u.nextSibling):o.appendChild(r.dom)}else o.firstChild?o.insertBefore(r.dom,o.firstChild):o.appendChild(r.dom);r.__painter=this}},e.prototype.eachLayer=function(t,r){for(var n=this._zlevelList,i=0;i0?u1:0),this._needsManuallyCompositing),f.__builtin__||au("ZLevel "+u+" has been used by unkown layer "+f.id),f!==a&&(f.__used=!0,f.__startIndex!==l&&(f.__dirty=!0),f.__startIndex=l,f.incremental?f.__drawIndex=-1:f.__drawIndex=l,r(l),a=f),i.__dirty&or&&!i.__inHover&&(f.__dirty=!0,f.incremental&&f.__drawIndex<0&&(f.__drawIndex=l))}r(l),this.eachBuiltinLayer(function(c,p){!c.__used&&c.getElementCount()>0&&(c.__dirty=!0,c.__startIndex=c.__endIndex=c.__drawIndex=0),c.__dirty&&c.__drawIndex<0&&(c.__drawIndex=c.__startIndex)})},e.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},e.prototype._clearLayer=function(t){t.clear()},e.prototype.setBackgroundColor=function(t){this._backgroundColor=t,D(this._layers,function(r){r.setUnpainted()})},e.prototype.configLayer=function(t,r){if(r){var n=this._layerConfig;n[t]?_t(n[t],r,!0):n[t]=r;for(var i=0;i-1&&(u.style.stroke=u.style.fill,u.style.fill="#fff",u.style.lineWidth=2),n},t.type="series.line",t.dependencies=["grid","polar"],t.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},t}(Wt),RV=Elt;function xa(e,t){var r=e.mapDimensionsAll("defaultedLabel"),n=r.length;if(n===1){var i=jo(e,t,r[0]);return i!=null?i+"":null}else if(n){for(var a=[],o=0;o=0&&n.push(t[a])}return n.join(" ")}var Ilt=function(e){N(t,e);function t(r,n,i,a){var o=e.call(this)||this;return o.updateData(r,n,i,a),o}return t.prototype._createSymbol=function(r,n,i,a,o){this.removeAll();var s=ne(r,-1,-1,2,2,null,o);s.attr({z2:100,culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),s.drift=Llt,this._symbolType=r,this.add(s)},t.prototype.stopSymbolAnimation=function(r){this.childAt(0).stopAnimation(null,r)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){Yr(this.childAt(0))},t.prototype.downplay=function(){Xr(this.childAt(0))},t.prototype.setZ=function(r,n){var i=this.childAt(0);i.zlevel=r,i.z=n},t.prototype.setDraggable=function(r,n){var i=this.childAt(0);i.draggable=r,i.cursor=!n&&r?"move":i.cursor},t.prototype.updateData=function(r,n,i,a){this.silent=!1;var o=r.getItemVisual(n,"symbol")||"circle",s=r.hostModel,l=t.getSymbolSize(r,n),u=o!==this._symbolType,f=a&&a.disableAnimation;if(u){var c=r.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,r,n,l,c)}else{var p=this.childAt(0);p.silent=!1;var h={scaleX:l[0]/2,scaleY:l[1]/2};f?p.attr(h):Rt(p,h,s,n),er(p)}if(this._updateCommon(r,n,l,i,a),u){var p=this.childAt(0);if(!f){var h={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:p.style.opacity}};p.scaleX=p.scaleY=0,p.style.opacity=0,Kt(p,h,s,n)}}f&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(r,n,i,a,o){var s=this.childAt(0),l=r.hostModel,u,f,c,p,h,d,m,v,g;if(a&&(u=a.emphasisItemStyle,f=a.blurItemStyle,c=a.selectItemStyle,p=a.focus,h=a.blurScope,m=a.labelStatesModels,v=a.hoverScale,g=a.cursorStyle,d=a.emphasisDisabled),!a||r.hasItemOption){var y=a&&a.itemModel?a.itemModel:r.getItemModel(n),x=y.getModel("emphasis");u=x.getModel("itemStyle").getItemStyle(),c=y.getModel(["select","itemStyle"]).getItemStyle(),f=y.getModel(["blur","itemStyle"]).getItemStyle(),p=x.get("focus"),h=x.get("blurScope"),d=x.get("disabled"),m=ae(y),v=x.getShallow("scale"),g=y.getShallow("cursor")}var _=r.getItemVisual(n,"symbolRotate");s.attr("rotation",(_||0)*Math.PI/180||0);var S=li(r.getItemVisual(n,"symbolOffset"),i);S&&(s.x=S[0],s.y=S[1]),g&&s.attr("cursor",g);var b=r.getItemVisual(n,"style"),w=b.fill;if(s instanceof me){var T=s.style;s.useStyle(V({image:T.image,x:T.x,y:T.y,width:T.width,height:T.height},b))}else s.__isEmptyBrush?s.useStyle(V({},b)):s.useStyle(b),s.style.decal=null,s.setColor(w,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var M=r.getItemVisual(n,"liftZ"),C=this._z2;M!=null?C==null&&(this._z2=s.z2,s.z2+=M):C!=null&&(s.z2=C,this._z2=null);var A=o&&o.useNameLabel;he(s,m,{labelFetcher:l,labelDataIndex:n,defaultText:P,inheritColor:w,defaultOpacity:b.opacity});function P(E){return A?r.getName(E):xa(r,E)}this._sizeX=i[0]/2,this._sizeY=i[1]/2;var L=s.ensureState("emphasis");L.style=u,s.ensureState("select").style=c,s.ensureState("blur").style=f;var I=v==null||v===!0?Math.max(1.1,3/this._sizeY):isFinite(v)&&v>0?+v:1;L.scaleX=this._sizeX*I,L.scaleY=this._sizeY*I,this.setSymbolScale(1),Zt(this,p,h,d)},t.prototype.setSymbolScale=function(r){this.scaleX=this.scaleY=r},t.prototype.fadeOut=function(r,n,i){var a=this.childAt(0),o=ht(this).dataIndex,s=i&&i.animation;if(this.silent=a.silent=!0,i&&i.fadeLabel){var l=a.getTextContent();l&&Ai(l,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();Ai(a,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:r,removeOpt:s})},t.getSymbolSize=function(r,n){return ha(r.getItemVisual(n,"symbolSize"))},t}(nt);function Llt(e,t){this.parent.drift(e,t)}var ts=Ilt;function FA(e,t,r,n){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(n.isIgnore&&n.isIgnore(r))&&!(n.clipShape&&!n.clipShape.contain(t[0],t[1]))&&e.getItemVisual(r,"symbol")!=="none"}function NV(e){return e!=null&&!rt(e)&&(e={isIgnore:e}),e||{}}function kV(e){var t=e.hostModel,r=t.getModel("emphasis");return{emphasisItemStyle:r.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:r.get("focus"),blurScope:r.get("blurScope"),emphasisDisabled:r.get("disabled"),hoverScale:r.get("scale"),labelStatesModels:ae(t),cursorStyle:t.get("cursor")}}var Plt=function(){function e(t){this.group=new nt,this._SymbolCtor=t||ts}return e.prototype.updateData=function(t,r){this._progressiveEls=null,r=NV(r);var n=this.group,i=t.hostModel,a=this._data,o=this._SymbolCtor,s=r.disableAnimation,l=kV(t),u={disableAnimation:s},f=r.getSymbolPoint||function(c){return t.getItemLayout(c)};a||n.removeAll(),t.diff(a).add(function(c){var p=f(c);if(FA(t,p,c,r)){var h=new o(t,c,l,u);h.setPosition(p),t.setItemGraphicEl(c,h),n.add(h)}}).update(function(c,p){var h=a.getItemGraphicEl(p),d=f(c);if(!FA(t,d,c,r)){n.remove(h);return}var m=t.getItemVisual(c,"symbol")||"circle",v=h&&h.getSymbolType&&h.getSymbolType();if(!h||v&&v!==m)n.remove(h),h=new o(t,c,l,u),h.setPosition(d);else{h.updateData(t,c,l,u);var g={x:d[0],y:d[1]};s?h.attr(g):Rt(h,g,i)}n.add(h),t.setItemGraphicEl(c,h)}).remove(function(c){var p=a.getItemGraphicEl(c);p&&p.fadeOut(function(){n.remove(p)},i)}).execute(),this._getSymbolPoint=f,this._data=t},e.prototype.updateLayout=function(){var t=this,r=this._data;r&&r.eachItemGraphicEl(function(n,i){var a=t._getSymbolPoint(i);n.setPosition(a),n.markRedraw()})},e.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=kV(t),this._data=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(t,r,n){this._progressiveEls=[],n=NV(n);function i(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var a=t.start;a0?r=n[0]:n[1]<0&&(r=n[1]),r}function p1(e,t,r,n){var i=NaN;e.stacked&&(i=r.get(r.getCalculationInfo("stackedOverDimension"),n)),isNaN(i)&&(i=e.valueStart);var a=e.baseDataOffset,o=[];return o[a]=r.get(e.baseDim,n),o[1-a]=i,t.dataToPoint(o)}function Nlt(e,t){var r=[];return t.diff(e).add(function(n){r.push({cmd:"+",idx:n})}).update(function(n,i){r.push({cmd:"=",idx:i,idx1:n})}).remove(function(n){r.push({cmd:"-",idx:n})}).execute(),r}function GA(e,t,r,n,i,a,o,s){for(var l=Nlt(e,t),u=[],f=[],c=[],p=[],h=[],d=[],m=[],v=c1(i,t,o),g=e.getLayout("points")||[],y=t.getLayout("points")||[],x=0;x=i||m<0)break;if(af(g,y)){if(l){m+=a;continue}break}if(m===r)e[a>0?"moveTo":"lineTo"](g,y),c=g,p=y;else{var x=g-u,_=y-f;if(x*x+_*_<.5){m+=a;continue}if(o>0){for(var S=m+a,b=t[S*2],w=t[S*2+1];b===g&&w===y&&v=n||af(b,w))h=g,d=y;else{C=b-u,A=w-f;var I=g-u,E=b-g,R=y-f,k=w-y,O=void 0,z=void 0;if(s==="x"){O=Math.abs(I),z=Math.abs(E);var U=C>0?1:-1;h=g-U*O*o,d=y,P=g+U*z*o,L=y}else if(s==="y"){O=Math.abs(R),z=Math.abs(k);var G=A>0?1:-1;h=g,d=y-G*O*o,P=g,L=y+G*z*o}else O=Math.sqrt(I*I+R*R),z=Math.sqrt(E*E+k*k),M=z/(z+O),h=g-C*o*(1-M),d=y-A*o*(1-M),P=g+C*o*M,L=y+A*o*M,P=ll(P,ul(b,g)),L=ll(L,ul(w,y)),P=ul(P,ll(b,g)),L=ul(L,ll(w,y)),C=P-g,A=L-y,h=g-C*O/z,d=y-A*O/z,h=ll(h,ul(u,g)),d=ll(d,ul(f,y)),h=ul(h,ll(u,g)),d=ul(d,ll(f,y)),C=g-h,A=y-d,P=g+C*z/O,L=y+A*z/O}e.bezierCurveTo(c,p,h,d,g,y),c=P,p=L}else e.lineTo(g,y)}u=g,f=y,m+=a}return v}var OV=function(){function e(){this.smooth=0,this.smoothConstraint=!0}return e}(),zV=function(e){N(t,e);function t(r){var n=e.call(this,r)||this;return n.type="ec-polyline",n}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new OV},t.prototype.buildPath=function(r,n){var i=n.points,a=0,o=i.length/2;if(n.connectNulls){for(;o>0&&af(i[o*2-2],i[o*2-1]);o--);for(;a=0){var _=u?(d-l)*x+l:(h-s)*x+s;return u?[r,_]:[_,r]}s=h,l=d;break;case o.C:h=a[c++],d=a[c++],m=a[c++],v=a[c++],g=a[c++],y=a[c++];var S=u?du(s,h,m,g,r,f):du(l,d,v,y,r,f);if(S>0)for(var b=0;b=0){var _=u?Ve(l,d,v,y,w):Ve(s,h,m,g,w);return u?[r,_]:[_,r]}}s=g,l=y;break}}},t}(vt);var klt=function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(OV),h1=function(e){N(t,e);function t(r){var n=e.call(this,r)||this;return n.type="ec-polygon",n}return t.prototype.getDefaultShape=function(){return new klt},t.prototype.buildPath=function(r,n){var i=n.points,a=n.stackedOnPoints,o=0,s=i.length/2,l=n.smoothMonotone;if(n.connectNulls){for(;s>0&&af(i[s*2-2],i[s*2-1]);s--);for(;ot){a?r.push(o(a,l,t)):i&&r.push(o(i,l,0),o(i,l,t));break}else i&&(r.push(o(i,l,0)),i=null),r.push(l),a=l}return r}function Ult(e,t,r){var n=e.getVisual("visualMeta");if(!(!n||!n.length||!e.count())&&t.type==="cartesian2d"){for(var i,a,o=n.length-1;o>=0;o--){var s=e.getDimensionInfo(n[o].dimension);if(i=s&&s.coordDim,i==="x"||i==="y"){a=n[o];break}}if(a){var l=t.getAxis(i),u=F(a.stops,function(x){return{coord:l.toGlobalCoord(l.dataToCoord(x.value)),color:x.color}}),f=u.length,c=a.outerColors.slice();f&&u[0].coord>u[f-1].coord&&(u.reverse(),c.reverse());var p=zlt(u,i==="x"?r.getWidth():r.getHeight()),h=p.length;if(!h&&f)return u[0].coord<0?c[1]?c[1]:u[f-1].color:c[0]?c[0]:u[0].color;var d=10,m=p[0].coord-d,v=p[h-1].coord+d,g=v-m;if(g<.001)return"transparent";D(p,function(x){x.offset=(x.coord-m)/g}),p.push({offset:h?p[h-1].offset:.5,color:c[1]||"transparent"}),p.unshift({offset:h?p[0].offset:.5,color:c[0]||"transparent"});var y=new $a(0,0,0,0,p,!0);return y[i]=m,y[i+"2"]=v,y}}}function Vlt(e,t,r){var n=e.get("showAllSymbol"),i=n==="auto";if(!(n&&!i)){var a=r.getAxesByScale("ordinal")[0];if(a&&!(i&&Blt(a,t))){var o=t.mapDimension(a.dim),s={};return D(a.getViewLabels(),function(l){var u=a.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(t.get(o,l))}}}}function Blt(e,t){var r=e.getExtent(),n=Math.abs(r[1]-r[0])/e.scale.count();isNaN(n)&&(n=0);for(var i=t.count(),a=Math.max(1,Math.round(i/5)),o=0;on)return!1;return!0}function Flt(e,t){return isNaN(e)||isNaN(t)}function Glt(e){for(var t=e.length/2;t>0&&Flt(e[t*2-2],e[t*2-1]);t--);return t-1}function GV(e,t){return[e[t*2],e[t*2+1]]}function Hlt(e,t,r){for(var n=e.length/2,i=r==="x"?0:1,a,o,s=0,l=-1,u=0;u=t||a>=t&&o<=t){l=u;break}s=u,a=o}return{range:[s,l],t:(t-a)/(o-a)}}function HV(e){if(e.get(["endLabel","show"]))return!0;for(var t=0;t0&&r.get(["emphasis","lineStyle","width"])==="bolder"){var U=m.getState("emphasis").style;U.lineWidth=+m.style.lineWidth+1}ht(m).seriesIndex=r.seriesIndex,Zt(m,k,O,z);var G=FV(r.get("smooth")),Y=r.get("smoothMonotone");if(m.setShape({smooth:G,smoothMonotone:Y,connectNulls:T}),v){var et=l.getCalculationInfo("stackedOnSeries"),tt=0;v.useStyle(J(f.getAreaStyle(),{fill:L,opacity:.7,lineJoin:"bevel",decal:l.getVisual("style").decal})),et&&(tt=FV(et.get("smooth"))),v.setShape({smooth:G,stackedOnSmooth:tt,smoothMonotone:Y,connectNulls:T}),we(v,r,"areaStyle"),ht(v).seriesIndex=r.seriesIndex,Zt(v,k,O,z)}var lt=function(Mt){a._changePolyState(Mt)};l.eachItemGraphicEl(function(Mt){Mt&&(Mt.onHoverStateChange=lt)}),this._polyline.onHoverStateChange=lt,this._data=l,this._coordSys=o,this._stackedOnPoints=b,this._points=c,this._step=A,this._valueOrigin=_,r.get("triggerLineEvent")&&(this.packEventData(r,m),v&&this.packEventData(r,v))},t.prototype.packEventData=function(r,n){ht(n).eventData={componentType:"series",componentSubType:"line",componentIndex:r.componentIndex,seriesIndex:r.seriesIndex,seriesName:r.name,seriesType:"line"}},t.prototype.highlight=function(r,n,i,a){var o=r.getData(),s=wi(o,a);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var f=l[s*2],c=l[s*2+1];if(isNaN(f)||isNaN(c)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(f,c))return;var p=r.get("zlevel")||0,h=r.get("z")||0;u=new ts(o,s),u.x=f,u.y=c,u.setZ(p,h);var d=u.getSymbolPath().getTextContent();d&&(d.zlevel=p,d.z=h,d.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else Vt.prototype.highlight.call(this,r,n,i,a)},t.prototype.downplay=function(r,n,i,a){var o=r.getData(),s=wi(o,a);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else Vt.prototype.downplay.call(this,r,n,i,a)},t.prototype._changePolyState=function(r){var n=this._polygon;ku(this._polyline,r),n&&ku(n,r)},t.prototype._newPolyline=function(r){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new zV({shape:{points:r},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(n),this._polyline=n,n},t.prototype._newPolygon=function(r,n){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new h1({shape:{points:r,stackedOnPoints:n},segmentIgnoreThreshold:2}),this._lineGroup.add(i),this._polygon=i,i},t.prototype._initSymbolLabelAnimation=function(r,n,i){var a,o,s=n.getBaseAxis(),l=s.inverse;n.type==="cartesian2d"?(a=s.isHorizontal(),o=!1):n.type==="polar"&&(a=s.dim==="angle",o=!0);var u=r.hostModel,f=u.get("animationDuration");j(f)&&(f=f(null));var c=u.get("animationDelay")||0,p=j(c)?c(null):c;r.eachItemGraphicEl(function(h,d){var m=h;if(m){var v=[h.x,h.y],g=void 0,y=void 0,x=void 0;if(i)if(o){var _=i,S=n.pointToCoord(v);a?(g=_.startAngle,y=_.endAngle,x=-S[1]/180*Math.PI):(g=_.r0,y=_.r,x=S[0])}else{var b=i;a?(g=b.x,y=b.x+b.width,x=h.x):(g=b.y+b.height,y=b.y,x=h.y)}var w=y===g?0:(x-g)/(y-g);l&&(w=1-w);var T=j(c)?c(d):f*w+p,M=m.getSymbolPath(),C=M.getTextContent();m.attr({scaleX:0,scaleY:0}),m.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:T}),C&&C.animateFrom({style:{opacity:0}},{duration:300,delay:T}),M.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(r,n,i){var a=r.getModel("endLabel");if(HV(r)){var o=r.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new Lt({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var f=Glt(l);f>=0&&(he(s,ae(r,"endLabel"),{inheritColor:i,labelFetcher:r,labelDataIndex:f,defaultText:function(c,p,h){return h!=null?f1(o,h):xa(o,c)},enableTextSetter:!0},Wlt(a,n)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(r,n,i,a,o,s,l){var u=this._endLabel,f=this._polyline;if(u){r<1&&a.originalX==null&&(a.originalX=u.x,a.originalY=u.y);var c=i.getLayout("points"),p=i.hostModel,h=p.get("connectNulls"),d=s.get("precision"),m=s.get("distance")||0,v=l.getBaseAxis(),g=v.isHorizontal(),y=v.inverse,x=n.shape,_=y?g?x.x:x.y+x.height:g?x.x+x.width:x.y,S=(g?m:0)*(y?-1:1),b=(g?0:-m)*(y?-1:1),w=g?"x":"y",T=Hlt(c,_,w),M=T.range,C=M[1]-M[0],A=void 0;if(C>=1){if(C>1&&!h){var P=GV(c,M[0]);u.attr({x:P[0]+S,y:P[1]+b}),o&&(A=p.getRawValue(M[0]))}else{var P=f.getPointOn(_,w);P&&u.attr({x:P[0]+S,y:P[1]+b});var L=p.getRawValue(M[0]),I=p.getRawValue(M[1]);o&&(A=i0(i,d,L,I,T.t))}a.lastFrameIndex=M[0]}else{var E=r===1||a.lastFrameIndex>0?M[0]:0,P=GV(c,E);o&&(A=p.getRawValue(E)),u.attr({x:P[0]+S,y:P[1]+b})}if(o){var R=Xo(u);typeof R.setLabelText=="function"&&R.setLabelText(A)}}},t.prototype._doUpdateAnimation=function(r,n,i,a,o,s,l){var u=this._polyline,f=this._polygon,c=r.hostModel,p=GA(this._data,r,this._stackedOnPoints,n,this._coordSys,i,this._valueOrigin,s),h=p.current,d=p.stackedOnCurrent,m=p.next,v=p.stackedOnNext;if(o&&(h=cl(p.current,i,o,l),d=cl(p.stackedOnCurrent,i,o,l),m=cl(p.next,i,o,l),v=cl(p.stackedOnNext,i,o,l)),BV(h,m)>3e3||f&&BV(d,v)>3e3){u.stopAnimation(),u.setShape({points:m}),f&&(f.stopAnimation(),f.setShape({points:m,stackedOnPoints:v}));return}u.shape.__points=p.current,u.shape.points=h;var g={shape:{points:m}};p.current!==h&&(g.shape.__points=p.next),u.stopAnimation(),Rt(u,g,c),f&&(f.setShape({points:h,stackedOnPoints:d}),f.stopAnimation(),Rt(f,{shape:{stackedOnPoints:v}},c),u.shape.points!==f.shape.points&&(f.shape.points=u.shape.points));for(var y=[],x=p.status,_=0;_t&&(t=e[r]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,r=0;r10&&o.type==="cartesian2d"&&a){var l=o.getBaseAxis(),u=o.getOtherAxis(l),f=l.getExtent(),c=n.getDevicePixelRatio(),p=Math.abs(f[1]-f[0])*(c||1),h=Math.round(s/p);if(isFinite(h)&&h>1){a==="lttb"&&t.setData(i.lttbDownSample(i.mapDimension(u.dim),1/h));var d=void 0;H(a)?d=Xlt[a]:j(a)&&(d=a),d&&t.setData(i.downSample(i.mapDimension(u.dim),1/h,d,qlt))}}}}}function qA(e){e.registerChartView(WV),e.registerSeriesModel(RV),e.registerLayout(_a("line",!0)),e.registerVisual({seriesType:"line",reset:function(t){var r=t.getData(),n=t.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=r.getVisual("style").fill),r.setVisual("legendLineStyle",n)}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,qv("line"))}var YV=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.getInitialData=function(r,n){return Tr(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(r,n,i){var a=this.coordinateSystem;if(a&&a.clampData){var o=a.clampData(r),s=a.dataToPoint(o);if(i)D(a.getAxes(),function(p,h){if(p.type==="category"&&n!=null){var d=p.getTicksCoords(),m=o[h],v=n[h]==="x1"||n[h]==="y1";if(v&&(m+=1),d.length<2)return;if(d.length===2){s[h]=p.toGlobalCoord(p.getExtent()[v?1:0]);return}for(var g=void 0,y=void 0,x=1,_=0;_m){y=(S+g)/2;break}_===1&&(x=b-d[0].tickValue)}y==null&&(g?g&&(y=d[d.length-1].coord):y=d[0].coord),s[h]=p.toGlobalCoord(y)}});else{var l=this.getData(),u=l.getLayout("offset"),f=l.getLayout("size"),c=a.getBaseAxis().isHorizontal()?0:1;s[c]+=u+f/2}return s}return[NaN,NaN]},t.type="series.__base_bar__",t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},t}(Wt);Wt.registerClass(YV);var _p=YV;var Zlt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.getInitialData=function(){return Tr(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},t.prototype.getProgressiveThreshold=function(){var r=this.get("progressiveThreshold"),n=this.get("largeThreshold");return n>r&&(r=n),r},t.prototype.brushSelector=function(r,n,i){return i.rect(n.getItemLayout(r))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=Kr(_p.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),t}(_p),XV=Zlt;var Klt=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return e}(),$lt=function(e){N(t,e);function t(r){var n=e.call(this,r)||this;return n.type="sausage",n}return t.prototype.getDefaultShape=function(){return new Klt},t.prototype.buildPath=function(r,n){var i=n.cx,a=n.cy,o=Math.max(n.r0||0,0),s=Math.max(n.r,0),l=(s-o)*.5,u=o+l,f=n.startAngle,c=n.endAngle,p=n.clockwise,h=Math.PI*2,d=p?c-fMath.PI/2&&fs)return!0;s=c}return!1},t.prototype._isOrderDifferentInView=function(r,n){for(var i=n.scale,a=i.getExtent(),o=Math.max(0,a[0]),s=Math.min(a[1],i.getOrdinalMeta().categories.length-1);o<=s;++o)if(r.ordinalNumbers[o]!==i.getRawOrdinalNumber(o))return!0},t.prototype._updateSortWithinSameData=function(r,n,i,a){if(this._isOrderChangedWithinSameData(r,n,i)){var o=this._dataSort(r,i,n);this._isOrderDifferentInView(o,i)&&(this._removeOnRenderedListener(a),a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",axisId:i.index,sortInfo:o}))}},t.prototype._dispatchInitSort=function(r,n,i){var a=n.baseAxis,o=this._dataSort(r,a,function(s){return r.get(r.mapDimension(n.otherAxis.dim),s)});i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",isInitSort:!0,axisId:a.index,sortInfo:o})},t.prototype.remove=function(r,n){this._clear(this._model),this._removeOnRenderedListener(n)},t.prototype.dispose=function(r,n){this._removeOnRenderedListener(n)},t.prototype._removeOnRenderedListener=function(r){this._onRendered&&(r.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(r){var n=this.group,i=this._data;r&&r.isAnimationEnabled()&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl(function(a){Go(a,r,ht(a).dataIndex)})):n.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t}(Vt),KV={cartesian2d:function(e,t){var r=t.width<0?-1:1,n=t.height<0?-1:1;r<0&&(t.x+=t.width,t.width=-t.width),n<0&&(t.y+=t.height,t.height=-t.height);var i=e.x+e.width,a=e.y+e.height,o=ZA(t.x,e.x),s=KA(t.x+t.width,i),l=ZA(t.y,e.y),u=KA(t.y+t.height,a),f=si?s:o,t.y=c&&l>a?u:l,t.width=f?0:s-o,t.height=c?0:u-l,r<0&&(t.x+=t.width,t.width=-t.width),n<0&&(t.y+=t.height,t.height=-t.height),f||c},polar:function(e,t){var r=t.r0<=t.r?1:-1;if(r<0){var n=t.r;t.r=t.r0,t.r0=n}var i=KA(t.r,e.r),a=ZA(t.r0,e.r0);t.r=i,t.r0=a;var o=i-a<0;if(r<0){var n=t.r;t.r=t.r0,t.r0=n}return o}},$V={cartesian2d:function(e,t,r,n,i,a,o,s,l){var u=new At({shape:V({},n),z2:1});if(u.__dataIndex=r,u.name="item",a){var f=u.shape,c=i?"height":"width";f[c]=0}return u},polar:function(e,t,r,n,i,a,o,s,l){var u=!i&&l?bp:Ye,f=new u({shape:n,z2:1});f.name="item";var c=i6(i);if(f.calculateTextPosition=qV(c,{isRoundCap:u===bp}),a){var p=f.shape,h=i?"r":"endAngle",d={};p[h]=i?n.r0:n.startAngle,d[h]=n[h],(s?Rt:Kt)(f,{shape:d},a)}return f}};function Jlt(e,t){var r=e.get("realtimeSort",!0),n=t.getBaseAxis();if(r&&n.type==="category"&&t.type==="cartesian2d")return{baseAxis:n,otherAxis:t.getOtherAxis(n)}}function jV(e,t,r,n,i,a,o,s){var l,u;a?(u={x:n.x,width:n.width},l={y:n.y,height:n.height}):(u={y:n.y,height:n.height},l={x:n.x,width:n.width}),s||(o?Rt:Kt)(r,{shape:l},t,i,null);var f=t?e.baseAxis.model:null;(o?Rt:Kt)(r,{shape:u},f,i)}function QV(e,t){for(var r=0;r0?1:-1,o=n.height>0?1:-1;return{x:n.x+a*i/2,y:n.y+o*i/2,width:n.width-a*i,height:n.height-o*i}},polar:function(e,t,r){var n=e.getItemLayout(t);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}}};function rut(e){return e.startAngle!=null&&e.endAngle!=null&&e.startAngle===e.endAngle}function i6(e){return function(t){var r=t?"Arc":"Angle";return function(n){switch(n){case"start":case"insideStart":case"end":case"insideEnd":return n+r;default:return n}}}(e)}function t6(e,t,r,n,i,a,o,s){var l=t.getItemVisual(r,"style");if(s){if(!a.get("roundCap")){var f=e.shape,c=ao(n.getModel("itemStyle"),f,!0);V(f,c),e.setShape(f)}}else{var u=n.get(["itemStyle","borderRadius"])||0;e.setShape("r",u)}e.useStyle(l);var p=n.getShallow("cursor");p&&e.attr("cursor",p);var h=s?o?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":o?i.height>=0?"bottom":"top":i.width>=0?"right":"left",d=ae(n);he(e,d,{labelFetcher:a,labelDataIndex:r,defaultText:xa(a.getData(),r),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:h});var m=e.getTextContent();if(s&&m){var v=n.get(["label","position"]);e.textConfig.inside=v==="middle"?!0:null,ZV(e,v==="outside"?h:v,i6(o),n.get(["label","rotate"]))}P0(m,d,a.getRawValue(r),function(y){return f1(t,y)});var g=n.getModel(["emphasis"]);Zt(e,g.get("focus"),g.get("blurScope"),g.get("disabled")),we(e,n),rut(i)&&(e.style.fill="none",e.style.stroke="none",D(e.states,function(y){y.style&&(y.style.fill=y.style.stroke="none")}))}function nut(e,t){var r=e.get(["itemStyle","borderColor"]);if(!r||r==="none")return 0;var n=e.get(["itemStyle","borderWidth"])||0,i=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),a=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(n,i,a)}var iut=function(){function e(){}return e}(),e6=function(e){N(t,e);function t(r){var n=e.call(this,r)||this;return n.type="largeBar",n}return t.prototype.getDefaultShape=function(){return new iut},t.prototype.buildPath=function(r,n){for(var i=n.points,a=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,f=0;f=0?r:null},30,!1);function aut(e,t,r){for(var n=e.baseDimIdx,i=1-n,a=e.shape.points,o=e.largeDataIndices,s=[],l=[],u=e.barWidth,f=0,c=a.length/3;f=s[0]&&t<=s[0]+l[0]&&r>=s[1]&&r<=s[1]+l[1])return o[f]}return-1}function a6(e,t,r){if(Ni(r,"cartesian2d")){var n=t,i=r.getArea();return{x:e?n.x:i.x,y:e?i.y:n.y,width:e?n.width:i.width,height:e?i.height:n.height}}else{var i=r.getArea(),a=t;return{cx:i.cx,cy:i.cy,r0:e?i.r0:a.r0,r:e?i.r:a.r,startAngle:e?a.startAngle:0,endAngle:e?a.endAngle:Math.PI*2}}}function out(e,t,r){var n=e.type==="polar"?Ye:At;return new n({shape:a6(t,r,e),silent:!0,z2:0})}var o6=Qlt;function $A(e){e.registerChartView(o6),e.registerSeriesModel(XV),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,pt(Ux,"bar")),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,Vx("bar")),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,qv("bar")),e.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(t,r){var n=t.componentType||"series";r.eachComponent({mainType:n,query:t},function(i){t.sortInfo&&i.axis.setCategorySortInfo(t.sortInfo)})})}var g1=Math.PI*2,s6=Math.PI/180;function l6(e,t){return re(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function jA(e,t){var r=l6(e,t),n=e.get("center"),i=e.get("radius");B(i)||(i=[0,i]);var a=q(r.width,t.getWidth()),o=q(r.height,t.getHeight()),s=Math.min(a,o),l=q(i[0],s/2),u=q(i[1],s/2),f,c,p=e.coordinateSystem;if(p){var h=p.dataToPoint(n);f=h[0]||0,c=h[1]||0}else B(n)||(n=[n,n]),f=q(n[0],a)+r.x,c=q(n[1],o)+r.y;return{cx:f,cy:c,r0:l,r:u}}function QA(e,t,r){t.eachSeriesByType(e,function(n){var i=n.getData(),a=i.mapDimension("value"),o=l6(n,r),s=jA(n,r),l=s.cx,u=s.cy,f=s.r,c=s.r0,p=-n.get("startAngle")*s6,h=n.get("minAngle")*s6,d=0;i.each(a,function(C){!isNaN(C)&&d++});var m=i.getSum(a),v=Math.PI/(m||d)*2,g=n.get("clockwise"),y=n.get("roseType"),x=n.get("stillShowZeroSum"),_=i.getDataExtent(a);_[0]=0;var S=g1,b=0,w=p,T=g?1:-1;if(i.setLayout({viewRect:o,r:f}),i.each(a,function(C,A){var P;if(isNaN(C)){i.setItemLayout(A,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:g,cx:l,cy:u,r0:c,r:y?NaN:f});return}y!=="area"?P=m===0&&x?v:C*v:P=g1/d,Pr?g:v,S=Math.abs(x.label.y-r);if(S>=_.maxY){var b=x.label.x-t-x.len2*i,w=n+x.len,T=Math.abs(b)e.unconstrainedWidth?null:h:null;n.setStyle("width",d)}var m=n.getBoundingRect();a.width=m.width;var v=(n.style.margin||0)+2.1;a.height=m.height+v,a.y-=(a.height-c)/2}}}function JA(e){return e.position==="center"}function tC(e){var t=e.getData(),r=[],n,i,a=!1,o=(e.get("minShowLabelAngle")||0)*sut,s=t.getLayout("viewRect"),l=t.getLayout("r"),u=s.width,f=s.x,c=s.y,p=s.height;function h(b){b.ignore=!0}function d(b){if(!b.ignore)return!0;for(var w in b.states)if(b.states[w].ignore===!1)return!0;return!1}t.each(function(b){var w=t.getItemGraphicEl(b),T=w.shape,M=w.getTextContent(),C=w.getTextGuideLine(),A=t.getItemModel(b),P=A.getModel("label"),L=P.get("position")||A.get(["emphasis","label","position"]),I=P.get("distanceToLabelLine"),E=P.get("alignTo"),R=q(P.get("edgeDistance"),u),k=P.get("bleedMargin"),O=A.getModel("labelLine"),z=O.get("length");z=q(z,u);var U=O.get("length2");if(U=q(U,u),Math.abs(T.endAngle-T.startAngle)0?"right":"left":Y>0?"left":"right"}var te=Math.PI,Jt=0,Dt=P.get("rotate");if(Ct(Dt))Jt=Dt*(te/180);else if(L==="center")Jt=0;else if(Dt==="radial"||Dt===!0){var ve=Y<0?-G+te:-G;Jt=ve}else if(Dt==="tangential"&&L!=="outside"&&L!=="outer"){var ar=Math.atan2(Y,et);ar<0&&(ar=te*2+ar);var jn=et>0;jn&&(ar=te+ar),Jt=ar-te}if(a=!!Jt,M.x=tt,M.y=lt,M.rotation=Jt,M.setStyle({verticalAlign:"middle"}),ct){M.setStyle({align:ut});var t2=M.states.select;t2&&(t2.x+=M.x,t2.y+=M.y)}else{var Cs=M.getBoundingRect().clone();Cs.applyTransform(M.getComputedTransform());var ak=(M.style.margin||0)+2.1;Cs.y-=ak/2,Cs.height+=ak,r.push({label:M,labelLine:C,position:L,len:z,len2:U,minTurnAngle:O.get("minTurnAngle"),maxSurfaceAngle:O.get("maxSurfaceAngle"),surfaceNormal:new kt(Y,et),linePoints:Mt,textAlign:ut,labelDistance:I,labelAlignTo:E,edgeDistance:R,bleedMargin:k,rect:Cs,unconstrainedWidth:Cs.width,labelStyleWidth:M.style.width})}w.setTextConfig({inside:ct})}}),!a&&e.get("avoidLabelOverlap")&&lut(r,n,i,l,u,p,f,c);for(var m=0;m0){for(var f=o.getItemLayout(0),c=1;isNaN(f&&f.startAngle)&&c=a.r0}},t.type="pie",t}(Vt),c6=fut;function fi(e,t,r){t=B(t)&&{coordDimensions:t}||V({encodeDefine:e.getEncode()},t);var n=e.getSource(),i=va(n,t).dimensions,a=new Ne(i,e);return a.initData(n,r),a}var cut=function(){function e(t,r){this._getDataWithEncodedVisual=t,this._getRawData=r}return e.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},e.prototype.containName=function(t){var r=this._getRawData();return r.indexOfName(t)>=0},e.prototype.indexOfName=function(t){var r=this._getDataWithEncodedVisual();return r.indexOfName(t)},e.prototype.getItemVisual=function(t,r){var n=this._getDataWithEncodedVisual();return n.getItemVisual(t,r)},e}(),oo=cut;var put=yt(),hut=function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(r){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new oo(Z(this.getData,this),Z(this.getRawData,this)),this._defaultLabelLine(r)},t.prototype.mergeOption=function(){e.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return fi(this,{coordDimensions:["value"],encodeDefaulter:pt(op,this)})},t.prototype.getDataParams=function(r){var n=this.getData(),i=put(n),a=i.seats;if(!a){var o=[];n.each(n.mapDimension("value"),function(l){o.push(l)}),a=i.seats=TO(o,n.hostModel.get("percentPrecision"))}var s=e.prototype.getDataParams.call(this,r);return s.percent=a[r]||0,s.$vars.push("percent"),s},t.prototype._defaultLabelLine=function(r){ni(r,"labelLine",["show"]);var n=r.labelLine,i=r.emphasis.labelLine;n.show=n.show&&r.label.show,i.show=i.show&&r.emphasis.label.show},t.type="series.pie",t.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"},t}(Wt),p6=hut;function eC(e){return{seriesType:e,reset:function(t,r){var n=t.getData();n.filterSelf(function(i){var a=n.mapDimension("value"),o=n.get(a,i);return!(Ct(o)&&!isNaN(o)&&o<0)})}}}function rC(e){e.registerChartView(c6),e.registerSeriesModel(p6),yx("pie",e.registerAction),e.registerLayout(pt(QA,"pie")),e.registerProcessor(ba("pie")),e.registerProcessor(eC("pie"))}var dut=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.hasSymbolVisual=!0,r}return t.prototype.getInitialData=function(r,n){return Tr(null,this,{useEncodeDefaulter:!0})},t.prototype.getProgressive=function(){var r=this.option.progressive;return r??(this.option.large?5e3:this.get("progressive"))},t.prototype.getProgressiveThreshold=function(){var r=this.option.progressiveThreshold;return r??(this.option.large?1e4:this.get("progressiveThreshold"))},t.prototype.brushSelector=function(r,n,i){return i.point(n.getItemLayout(r))},t.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},t.type="series.scatter",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},t}(Wt),h6=dut;var d6=4,vut=function(){function e(){}return e}(),mut=function(e){N(t,e);function t(r){var n=e.call(this,r)||this;return n._off=0,n.hoverDataIdx=-1,n}return t.prototype.getDefaultShape=function(){return new vut},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.buildPath=function(r,n){var i=n.points,a=n.size,o=this.symbolProxy,s=o.shape,l=r.getContext?r.getContext():r,u=l&&a[0]=0;u--){var f=u*2,c=a[f]-s/2,p=a[f+1]-l/2;if(r>=c&&n>=p&&r<=c+s&&n<=p+l)return u}return-1},t.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect();if(r=i[0],n=i[1],a.contain(r,n)){var o=this.hoverDataIdx=this.findDataIndex(r,n);return o>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var r=this._rect;if(!r){for(var n=this.shape,i=n.points,a=n.size,o=a[0],s=a[1],l=1/0,u=1/0,f=-1/0,c=-1/0,p=0;p=0&&(u.dataIndex=c+(t.startIndex||0))})},e.prototype.remove=function(){this._clear()},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}(),v6=gut;var yut=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a=r.getData(),o=this._updateSymbolDraw(a,r);o.updateData(a,{clipShape:this._getClipShape(r)}),this._finished=!0},t.prototype.incrementalPrepareRender=function(r,n,i){var a=r.getData(),o=this._updateSymbolDraw(a,r);o.incrementalPrepareUpdate(a),this._finished=!1},t.prototype.incrementalRender=function(r,n,i){this._symbolDraw.incrementalUpdate(r,n.getData(),{clipShape:this._getClipShape(n)}),this._finished=r.end===n.getData().count()},t.prototype.updateTransform=function(r,n,i){var a=r.getData();if(this.group.dirty(),!this._finished||a.count()>1e4)return{update:!0};var o=_a("").reset(r,n,i);o.progress&&o.progress({start:0,end:a.count(),count:a.count()},a),this._symbolDraw.updateLayout(a)},t.prototype.eachRendered=function(r){this._symbolDraw&&this._symbolDraw.eachRendered(r)},t.prototype._getClipShape=function(r){var n=r.coordinateSystem,i=n&&n.getArea&&n.getArea();return r.get("clip",!0)?i:null},t.prototype._updateSymbolDraw=function(r,n){var i=this._symbolDraw,a=n.pipelineContext,o=a.large;return(!i||o!==this._isLargeDraw)&&(i&&i.remove(),i=this._symbolDraw=o?new v6:new io,this._isLargeDraw=o,this.group.removeAll()),this.group.add(i.group),i},t.prototype.remove=function(r,n){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type="scatter",t}(Vt),m6=yut;var xut=function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},t}(Pt),g6=xut;var y1=function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",se).models[0]},t.type="cartesian2dAxis",t}(Pt);ie(y1,to);var y6={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},_ut=_t({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},y6),nC=_t({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},y6),but=_t({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},nC),Sut=J({logBase:10},nC),x1={category:_ut,value:nC,time:but,log:Sut};var x6={value:1,category:1,time:1,log:1};function Sa(e,t,r,n){D(x6,function(i,a){var o=_t(_t({},x1[a],!0),n,!0),s=function(l){N(u,l);function u(){var f=l!==null&&l.apply(this,arguments)||this;return f.type=t+"Axis."+a,f}return u.prototype.mergeDefaultAndTheme=function(f,c){var p=Ks(this),h=p?Di(f):{},d=c.getTheme();_t(f,d.get(a+"Axis")),_t(f,this.getDefaultOption()),f.type=_6(f),p&&On(f,h,p)},u.prototype.optionUpdated=function(){var f=this.option;f.type==="category"&&(this.__ordinalMeta=Rv.createByAxisModel(this))},u.prototype.getCategories=function(f){var c=this.option;if(c.type==="category")return f?c.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.type=t+"Axis."+a,u.defaultOption=o,u}(r);e.registerComponentModel(s)}),e.registerSubTypeDefaulter(t+"Axis",_6)}function _6(e){return e.type||(e.data?"category":"value")}var wut=function(){function e(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return e.prototype.getAxis=function(t){return this._axes[t]},e.prototype.getAxes=function(){return F(this._dimList,function(t){return this._axes[t]},this)},e.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),Ut(this.getAxes(),function(r){return r.scale.type===t})},e.prototype.addAxis=function(t){var r=t.dim;this._axes[r]=t,this._dimList.push(r)},e}(),b6=wut;var _1=["x","y"];function S6(e){return e.type==="interval"||e.type==="time"}var Tut=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="cartesian2d",r.dimensions=_1,r}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var r=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!S6(r)||!S6(n))){var i=r.getExtent(),a=n.getExtent(),o=this.dataToPoint([i[0],a[0]]),s=this.dataToPoint([i[1],a[1]]),l=i[1]-i[0],u=a[1]-a[0];if(!(!l||!u)){var f=(s[0]-o[0])/l,c=(s[1]-o[1])/u,p=o[0]-i[0]*f,h=o[1]-a[0]*c,d=this._transform=[f,0,0,c,p,h];this._invTransform=gi([],d)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(r){var n=this.getAxis("x"),i=this.getAxis("y");return n.contain(n.toLocalCoord(r[0]))&&i.contain(i.toLocalCoord(r[1]))},t.prototype.containData=function(r){return this.getAxis("x").containData(r[0])&&this.getAxis("y").containData(r[1])},t.prototype.containZone=function(r,n){var i=this.dataToPoint(r),a=this.dataToPoint(n),o=this.getArea(),s=new dt(i[0],i[1],a[0]-i[0],a[1]-i[1]);return o.intersect(s)},t.prototype.dataToPoint=function(r,n,i){i=i||[];var a=r[0],o=r[1];if(this._transform&&a!=null&&isFinite(a)&&o!=null&&isFinite(o))return Ue(i,r,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return i[0]=s.toGlobalCoord(s.dataToCoord(a,n)),i[1]=l.toGlobalCoord(l.dataToCoord(o,n)),i},t.prototype.clampData=function(r,n){var i=this.getAxis("x").scale,a=this.getAxis("y").scale,o=i.getExtent(),s=a.getExtent(),l=i.parse(r[0]),u=a.parse(r[1]);return n=n||[],n[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),n[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),n},t.prototype.pointToData=function(r,n){var i=[];if(this._invTransform)return Ue(i,r,this._invTransform);var a=this.getAxis("x"),o=this.getAxis("y");return i[0]=a.coordToData(a.toLocalCoord(r[0]),n),i[1]=o.coordToData(o.toLocalCoord(r[1]),n),i},t.prototype.getOtherAxis=function(r){return this.getAxis(r.dim==="x"?"y":"x")},t.prototype.getArea=function(){var r=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),i=Math.min(r[0],r[1]),a=Math.min(n[0],n[1]),o=Math.max(r[0],r[1])-i,s=Math.max(n[0],n[1])-a;return new dt(i,a,o,s)},t}(b6),w6=Tut;var Mut=function(e){N(t,e);function t(r,n,i,a,o){var s=e.call(this,r,n,i)||this;return s.index=0,s.type=a||"value",s.position=o||"bottom",s}return t.prototype.isHorizontal=function(){var r=this.position;return r==="top"||r==="bottom"},t.prototype.getGlobalExtent=function(r){var n=this.getExtent();return n[0]=this.toGlobalCoord(n[0]),n[1]=this.toGlobalCoord(n[1]),r&&n[0]>n[1]&&n.reverse(),n},t.prototype.pointToData=function(r,n){return this.coordToData(this.toLocalCoord(r[this.dim==="x"?0:1]),n)},t.prototype.setCategorySortInfo=function(r){if(this.type!=="category")return!1;this.model.option.categorySortInfo=r,this.scale.setSortInfo(r)},t}(Mr),T6=Mut;function Zv(e,t,r){r=r||{};var n=e.coordinateSystem,i=t.axis,a={},o=i.getAxesOnZeroOf()[0],s=i.position,l=o?"onZero":s,u=i.dim,f=n.getRect(),c=[f.x,f.x+f.width,f.y,f.y+f.height],p={left:0,right:1,top:0,bottom:1,onZero:2},h=t.get("offset")||0,d=u==="x"?[c[2]-h,c[3]+h]:[c[0]-h,c[1]+h];if(o){var m=o.toGlobalCoord(o.dataToCoord(0));d[p.onZero]=Math.max(Math.min(m,d[1]),d[0])}a.position=[u==="y"?d[p[l]]:c[0],u==="x"?d[p[l]]:c[3]],a.rotation=Math.PI/2*(u==="x"?0:1);var v={top:-1,bottom:1,left:-1,right:1};a.labelDirection=a.tickDirection=a.nameDirection=v[s],a.labelOffset=o?d[p[s]]-d[p.onZero]:0,t.get(["axisTick","inside"])&&(a.tickDirection=-a.tickDirection),_e(r.labelInside,t.get(["axisLabel","inside"]))&&(a.labelDirection=-a.labelDirection);var g=t.get(["axisLabel","rotate"]);return a.labelRotate=l==="top"?-g:g,a.z2=1,a}function iC(e){return e.get("coordinateSystem")==="cartesian2d"}function aC(e){var t={xAxisModel:null,yAxisModel:null};return D(t,function(r,n){var i=n.replace(/Model$/,""),a=e.getReferringComponents(i,se).models[0];t[n]=a}),t}var oC=Math.log;function b1(e,t,r){var n=Fn.prototype,i=n.getTicks.call(r),a=n.getTicks.call(r,!0),o=i.length-1,s=n.getInterval.call(r),l=fA(e,t),u=l.extent,f=l.fixMin,c=l.fixMax;if(e.type==="log"){var p=oC(e.base);u=[oC(u[0])/p,oC(u[1])/p]}e.setExtent(u[0],u[1]),e.calcNiceExtent({splitNumber:o,fixMin:f,fixMax:c});var h=n.getExtent.call(e);f&&(u[0]=h[0]),c&&(u[1]=h[1]);var d=n.getInterval.call(e),m=u[0],v=u[1];if(f&&c)d=(v-m)/o;else if(f)for(v=u[0]+d*o;vu[0]&&isFinite(m)&&isFinite(u[0]);)d=Ox(d),m=u[1]-d*o;else{var g=e.getTicks().length-1;g>o&&(d=Ox(d));var y=d*o;v=Math.ceil(u[1]/d)*d,m=pe(v-y),m<0&&u[0]>=0?(m=0,v=pe(y)):v>0&&u[1]<=0&&(v=0,m=-pe(y))}var x=(i[0].value-a[0].value)/s,_=(i[o].value-a[o].value)/s;if(n.setExtent.call(e,m+d*x,v+d*_),n.setInterval.call(e,d),(x||_)&&n.setNiceExtent.call(e,m+d,v-d),!1)var S}var Aut=function(){function e(t,r,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=_1,this._initCartesian(t,r,n),this.model=t}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(t,r){var n=this._axesMap;this._updateScale(t,this.model);function i(o){var s,l=St(o),u=l.length;if(u){for(var f=[],c=u-1;c>=0;c--){var p=+l[c],h=o[p],d=h.model,m=h.scale;Nv(m)&&d.get("alignTicks")&&d.get("interval")==null?f.push(h):(Ja(m,d),Nv(m)&&(s=h))}f.length&&(s||(s=f.pop(),Ja(s.scale,s.model)),D(f,function(v){b1(v.scale,v.model,s.scale)}))}}i(n.x),i(n.y);var a={};D(n.x,function(o){A6(n,"y",o,a)}),D(n.y,function(o){A6(n,"x",o,a)}),this.resize(this.model,r)},e.prototype.resize=function(t,r,n){var i=t.getBoxLayoutParams(),a=!n&&t.get("containLabel"),o=re(i,{width:r.getWidth(),height:r.getHeight()});this._rect=o;var s=this._axesList;l(),a&&(D(s,function(u){if(!u.model.get(["axisLabel","inside"])){var f=VU(u);if(f){var c=u.isHorizontal()?"height":"width",p=u.model.get(["axisLabel","margin"]);o[c]-=f[c]+p,u.position==="top"?o.y+=f.height+p:u.position==="left"&&(o.x+=f.width+p)}}}),l()),D(this._coordsList,function(u){u.calcAffineTransform()});function l(){D(s,function(u){var f=u.isHorizontal(),c=f?[0,o.width]:[0,o.height],p=u.inverse?1:0;u.setExtent(c[p],c[1-p]),Cut(u,f?o.x:o.y)})}},e.prototype.getAxis=function(t,r){var n=this._axesMap[t];if(n!=null)return n[r||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(t,r){if(t!=null&&r!=null){var n="x"+t+"y"+r;return this._coordsMap[n]}rt(t)&&(r=t.yAxisIndex,t=t.xAxisIndex);for(var i=0,a=this._coordsList;i0?"top":"bottom",a="center"):Pd(i-pl)?(o=n>0?"bottom":"top",a="center"):(o="middle",i>0&&i0?"right":"left":a=n>0?"left":"right"),{rotation:i,textAlign:a,textVerticalAlign:o}},e.makeAxisEventDataBase=function(t){var r={componentType:t.mainType,componentIndex:t.componentIndex};return r[t.mainType+"Index"]=t.componentIndex,r},e.isLabelSilent=function(t){var r=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||r&&r.show)},e}(),E6={axisLine:function(e,t,r,n){var i=t.get(["axisLine","show"]);if(i==="auto"&&e.handleAutoShown&&(i=e.handleAutoShown("axisLine")),!!i){var a=t.axis.getExtent(),o=n.transform,s=[a[0],0],l=[a[1],0],u=s[0]>l[0];o&&(Ue(s,s,o),Ue(l,l,o));var f=V({lineCap:"round"},t.getModel(["axisLine","lineStyle"]).getLineStyle()),c=new De({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:f,strokeContainThreshold:e.strokeContainThreshold||5,silent:!0,z2:1});Ho(c.shape,c.style.lineWidth),c.anid="line",r.add(c);var p=t.get(["axisLine","symbol"]);if(p!=null){var h=t.get(["axisLine","symbolSize"]);H(p)&&(p=[p,p]),(H(h)||Ct(h))&&(h=[h,h]);var d=li(t.get(["axisLine","symbolOffset"])||0,h),m=h[0],v=h[1];D([{rotate:e.rotation+Math.PI/2,offset:d[0],r:0},{rotate:e.rotation-Math.PI/2,offset:d[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],function(g,y){if(p[y]!=="none"&&p[y]!=null){var x=ne(p[y],-m/2,-v/2,m,v,f.stroke,!0),_=g.r+g.offset,S=u?l:s;x.attr({rotation:g.rotate,x:S[0]+_*Math.cos(e.rotation),y:S[1]-_*Math.sin(e.rotation),silent:!0,z2:11}),r.add(x)}})}}},axisTickLabel:function(e,t,r,n){var i=Iut(r,n,t,e),a=Put(r,n,t,e);if(Eut(t,a,i),Lut(r,n,t,e.tickDirection),t.get(["axisLabel","hideOverlap"])){var o=Qx(F(a,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));t1(o)}},axisName:function(e,t,r,n){var i=_e(e.axisName,t.get("name"));if(i){var a=t.get("nameLocation"),o=e.nameDirection,s=t.getModel("nameTextStyle"),l=t.get("nameGap")||0,u=t.axis.getExtent(),f=u[0]>u[1]?-1:1,c=[a==="start"?u[0]-f*l:a==="end"?u[1]+f*l:(u[0]+u[1])/2,L6(a)?e.labelOffset+o*l:0],p,h=t.get("nameRotate");h!=null&&(h=h*pl/180);var d;L6(a)?p=of.innerTextLayout(e.rotation,h??e.rotation,o):(p=Dut(e.rotation,a,h||0,u),d=e.axisNameAvailableWidth,d!=null&&(d=Math.abs(d/Math.sin(p.rotation)),!isFinite(d)&&(d=null)));var m=s.getFont(),v=t.get("nameTruncate",!0)||{},g=v.ellipsis,y=_e(e.nameTruncateMaxWidth,v.maxWidth,d),x=new Lt({x:c[0],y:c[1],rotation:p.rotation,silent:of.isLabelSilent(t),style:Qt(s,{text:i,font:m,overflow:"truncate",width:y,ellipsis:g,fill:s.getTextColor()||t.get(["axisLine","lineStyle","color"]),align:s.get("align")||p.textAlign,verticalAlign:s.get("verticalAlign")||p.textVerticalAlign}),z2:1});if(sa({el:x,componentModel:t,itemName:i}),x.__fullText=i,x.anid="name",t.get("triggerEvent")){var _=of.makeAxisEventDataBase(t);_.targetType="axisName",_.name=i,ht(x).eventData=_}n.add(x),x.updateTransform(),r.add(x),x.decomposeTransform()}}};function Dut(e,t,r,n){var i=H2(r-e),a,o,s=n[0]>n[1],l=t==="start"&&!s||t!=="start"&&s;return Pd(i-pl/2)?(o=l?"bottom":"top",a="center"):Pd(i-pl*1.5)?(o=l?"top":"bottom",a="center"):(o="middle",ipl/2?a=l?"left":"right":a=l?"right":"left"),{rotation:i,textAlign:a,textVerticalAlign:o}}function Eut(e,t,r){if(!qx(e.axis)){var n=e.get(["axisLabel","showMinLabel"]),i=e.get(["axisLabel","showMaxLabel"]);t=t||[],r=r||[];var a=t[0],o=t[1],s=t[t.length-1],l=t[t.length-2],u=r[0],f=r[1],c=r[r.length-1],p=r[r.length-2];n===!1?(ki(a),ki(u)):I6(a,o)&&(n?(ki(o),ki(f)):(ki(a),ki(u))),i===!1?(ki(s),ki(c)):I6(l,s)&&(i?(ki(l),ki(p)):(ki(s),ki(c)))}}function ki(e){e&&(e.ignore=!0)}function I6(e,t){var r=e&&e.getBoundingRect().clone(),n=t&&t.getBoundingRect().clone();if(!(!r||!n)){var i=Ls([]);return Cn(i,i,-e.rotation),r.applyTransform(An([],i,e.getLocalTransform())),n.applyTransform(An([],i,t.getLocalTransform())),r.intersect(n)}}function L6(e){return e==="middle"||e==="center"}function P6(e,t,r,n,i){for(var a=[],o=[],s=[],l=0;l=0||e===t}function N6(e){var t=S1(e);if(t){var r=t.axisPointerModel,n=t.axis.scale,i=r.option,a=r.get("status"),o=r.get("value");o!=null&&(o=n.parse(o));var s=uC(r);a==null&&(i.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o0&&!d.min?d.min=0:d.min!=null&&d.min<0&&!d.max&&(d.max=0);var m=l;d.color!=null&&(m=J({color:d.color},l));var v=_t(at(d),{boundaryGap:r,splitNumber:n,scale:i,axisLine:a,axisTick:o,axisLabel:s,name:d.text,showName:u,nameLocation:"end",nameGap:c,nameTextStyle:m,triggerEvent:p},!1);if(H(f)){var g=v.name;v.name=f.replace("{value}",g??"")}else j(f)&&(v.name=f(v.name,v));var y=new Ht(v,null,this.ecModel);return ie(y,to.prototype),y.mainType="radar",y.componentIndex=this.componentIndex,y},this);this._indicatorModels=h},t.prototype.getIndicatorModels=function(){return this._indicatorModels},t.type="radar",t.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:_t({lineStyle:{color:"#bbb"}},Kv.axisLine),axisLabel:A1(Kv.axisLabel,!1),axisTick:A1(Kv.axisTick,!1),splitLine:A1(Kv.splitLine,!0),splitArea:A1(Kv.splitArea,!0),indicator:[]},t}(Pt),W6=Wut;var Yut=["axisLine","axisTickLabel","axisName"],Xut=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a=this.group;a.removeAll(),this._buildAxes(r),this._buildSplitLineAndArea(r)},t.prototype._buildAxes=function(r){var n=r.coordinateSystem,i=n.getIndicatorAxes(),a=F(i,function(o){var s=o.model.get("showName")?o.name:"",l=new Br(o.model,{axisName:s,position:[n.cx,n.cy],rotation:o.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return l});D(a,function(o){D(Yut,o.add,o),this.group.add(o.getGroup())},this)},t.prototype._buildSplitLineAndArea=function(r){var n=r.coordinateSystem,i=n.getIndicatorAxes();if(!i.length)return;var a=r.get("shape"),o=r.getModel("splitLine"),s=r.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),f=o.get("show"),c=s.get("show"),p=l.get("color"),h=u.get("color"),d=B(p)?p:[p],m=B(h)?h:[h],v=[],g=[];function y(E,R,k){var O=k%R.length;return E[O]=E[O]||[],O}if(a==="circle")for(var x=i[0].getTicksCoords(),_=n.cx,S=n.cy,b=0;b3?1.4:o>1?1.2:1.1,f=a>0?u:1/u;xC(this,"zoom","zoomOnMouseWheel",r,{scale:f,originX:s,originY:l,isAvailableBehavior:null})}if(i){var c=Math.abs(a),p=(a>0?1:-1)*(c>3?.4:c>1?.15:.05);xC(this,"scrollMove","moveOnMouseWheel",r,{scrollDelta:p,originX:s,originY:l,isAvailableBehavior:null})}}},t.prototype._pinchHandler=function(r){if(!gC(this._zr,"globalPan")){var n=r.pinchScale>1?1.1:1/1.1;xC(this,"zoom",null,r,{scale:n,originX:r.pinchX,originY:r.pinchY,isAvailableBehavior:null})}},t}(Je);function xC(e,t,r,n,i){e.pointerChecker&&e.pointerChecker(n,i.originX,i.originY)&&(Mn(n.event),J6(e,t,r,n,i))}function J6(e,t,r,n,i){i.isAvailableBehavior=Z(C1,null,r,n),e.trigger(t,i)}function C1(e,t,r){var n=r[e];return!e||n&&(!H(n)||t.event[n+"Key"])}var so=Kut;function wp(e,t,r){var n=e.target;n.x+=t,n.y+=r,n.dirty()}function Tp(e,t,r,n){var i=e.target,a=e.zoomLimit,o=e.zoom=e.zoom||1;if(o*=t,a){var s=a.min||0,l=a.max||1/0;o=Math.max(Math.min(l,o),s)}var u=o/e.zoom;e.zoom=o,i.x-=(r-i.x)*(u-1),i.y-=(n-i.y)*(u-1),i.scaleX*=u,i.scaleY*=u,i.dirty()}var $ut={axisPointer:1,tooltip:1,brush:1};function hl(e,t,r){var n=t.getComponentByElement(e.topTarget),i=n&&n.coordinateSystem;return n&&n!==r&&!$ut.hasOwnProperty(n.mainType)&&i&&i.model!==r}function D1(e){if(H(e)){var t=new DOMParser;e=t.parseFromString(e,"text/xml")}var r=e;for(r.nodeType===9&&(r=r.firstChild);r.nodeName.toLowerCase()!=="svg"||r.nodeType!==1;)r=r.nextSibling;return r}var bC,E1={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},t8=St(E1),I1={"alignment-baseline":"textBaseline","stop-color":"stopColor"},e8=St(I1),jut=function(){function e(){this._defs={},this._root=null}return e.prototype.parse=function(t,r){r=r||{};var n=D1(t);this._defsUsePending=[];var i=new nt;this._root=i;var a=[],o=n.getAttribute("viewBox")||"",s=parseFloat(n.getAttribute("width")||r.width),l=parseFloat(n.getAttribute("height")||r.height);isNaN(s)&&(s=null),isNaN(l)&&(l=null),ci(n,i,null,!0,!1);for(var u=n.firstChild;u;)this._parseNode(u,i,a,null,!1,!1),u=u.nextSibling;tft(this._defs,this._defsUsePending),this._defsUsePending=[];var f,c;if(o){var p=L1(o);p.length>=4&&(f={x:parseFloat(p[0]||0),y:parseFloat(p[1]||0),width:parseFloat(p[2]),height:parseFloat(p[3])})}if(f&&s!=null&&l!=null&&(c=wC(f,{x:0,y:0,width:s,height:l}),!r.ignoreViewBox)){var h=i;i=new nt,i.add(h),h.scaleX=h.scaleY=c.scale,h.x=c.x,h.y=c.y}return!r.ignoreRootClip&&s!=null&&l!=null&&i.setClipPath(new At({shape:{x:0,y:0,width:s,height:l}})),{root:i,width:s,height:l,viewBoxRect:f,viewBoxTransform:c,named:a}},e.prototype._parseNode=function(t,r,n,i,a,o){var s=t.nodeName.toLowerCase(),l,u=i;if(s==="defs"&&(a=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=r;else{if(!a){var f=bC[s];if(f&&st(bC,s)){l=f.call(this,t,r);var c=t.getAttribute("name");if(c){var p={name:c,namedFrom:null,svgNodeTagLower:s,el:l};n.push(p),s==="g"&&(u=p)}else i&&n.push({name:i.name,namedFrom:i,svgNodeTagLower:s,el:l});r.add(l)}}var h=r8[s];if(h&&st(r8,s)){var d=h.call(this,t),m=t.getAttribute("id");m&&(this._defs[m]=d)}}if(l&&l.isGroup)for(var v=t.firstChild;v;)v.nodeType===1?this._parseNode(v,l,n,u,a,o):v.nodeType===3&&o&&this._parseText(v,l),v=v.nextSibling},e.prototype._parseText=function(t,r){var n=new zo({style:{text:t.textContent},silent:!0,x:this._textX||0,y:this._textY||0});Oi(r,n),ci(t,n,this._defsUsePending,!1,!1),Qut(n,r);var i=n.style,a=i.fontSize;a&&a<9&&(i.fontSize=9,n.scaleX*=a/9,n.scaleY*=a/9);var o=(i.fontSize||i.fontFamily)&&[i.fontStyle,i.fontWeight,(i.fontSize||12)+"px",i.fontFamily||"sans-serif"].join(" ");i.font=o;var s=n.getBoundingRect();return this._textX+=s.width,r.add(n),n},e.internalField=function(){bC={g:function(t,r){var n=new nt;return Oi(r,n),ci(t,n,this._defsUsePending,!1,!1),n},rect:function(t,r){var n=new At;return Oi(r,n),ci(t,n,this._defsUsePending,!1,!1),n.setShape({x:parseFloat(t.getAttribute("x")||"0"),y:parseFloat(t.getAttribute("y")||"0"),width:parseFloat(t.getAttribute("width")||"0"),height:parseFloat(t.getAttribute("height")||"0")}),n.silent=!0,n},circle:function(t,r){var n=new Sr;return Oi(r,n),ci(t,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),r:parseFloat(t.getAttribute("r")||"0")}),n.silent=!0,n},line:function(t,r){var n=new De;return Oi(r,n),ci(t,n,this._defsUsePending,!1,!1),n.setShape({x1:parseFloat(t.getAttribute("x1")||"0"),y1:parseFloat(t.getAttribute("y1")||"0"),x2:parseFloat(t.getAttribute("x2")||"0"),y2:parseFloat(t.getAttribute("y2")||"0")}),n.silent=!0,n},ellipse:function(t,r){var n=new Xd;return Oi(r,n),ci(t,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),rx:parseFloat(t.getAttribute("rx")||"0"),ry:parseFloat(t.getAttribute("ry")||"0")}),n.silent=!0,n},polygon:function(t,r){var n=t.getAttribute("points"),i;n&&(i=a8(n));var a=new Re({shape:{points:i||[]},silent:!0});return Oi(r,a),ci(t,a,this._defsUsePending,!1,!1),a},polyline:function(t,r){var n=t.getAttribute("points"),i;n&&(i=a8(n));var a=new Ie({shape:{points:i||[]},silent:!0});return Oi(r,a),ci(t,a,this._defsUsePending,!1,!1),a},image:function(t,r){var n=new me;return Oi(r,n),ci(t,n,this._defsUsePending,!1,!1),n.setStyle({image:t.getAttribute("xlink:href")||t.getAttribute("href"),x:+t.getAttribute("x"),y:+t.getAttribute("y"),width:+t.getAttribute("width"),height:+t.getAttribute("height")}),n.silent=!0,n},text:function(t,r){var n=t.getAttribute("x")||"0",i=t.getAttribute("y")||"0",a=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(a),this._textY=parseFloat(i)+parseFloat(o);var s=new nt;return Oi(r,s),ci(t,s,this._defsUsePending,!1,!0),s},tspan:function(t,r){var n=t.getAttribute("x"),i=t.getAttribute("y");n!=null&&(this._textX=parseFloat(n)),i!=null&&(this._textY=parseFloat(i));var a=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0",s=new nt;return Oi(r,s),ci(t,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(a),this._textY+=parseFloat(o),s},path:function(t,r){var n=t.getAttribute("d")||"",i=b0(n);return Oi(r,i),ci(t,i,this._defsUsePending,!1,!1),i.silent=!0,i}}}(),e}(),r8={lineargradient:function(e){var t=parseInt(e.getAttribute("x1")||"0",10),r=parseInt(e.getAttribute("y1")||"0",10),n=parseInt(e.getAttribute("x2")||"10",10),i=parseInt(e.getAttribute("y2")||"0",10),a=new $a(t,r,n,i);return n8(e,a),i8(e,a),a},radialgradient:function(e){var t=parseInt(e.getAttribute("cx")||"0",10),r=parseInt(e.getAttribute("cy")||"0",10),n=parseInt(e.getAttribute("r")||"0",10),i=new M0(t,r,n);return n8(e,i),i8(e,i),i}};function n8(e,t){var r=e.getAttribute("gradientUnits");r==="userSpaceOnUse"&&(t.global=!0)}function i8(e,t){for(var r=e.firstChild;r;){if(r.nodeType===1&&r.nodeName.toLocaleLowerCase()==="stop"){var n=r.getAttribute("offset"),i=void 0;n&&n.indexOf("%")>0?i=parseInt(n,10)/100:n?i=parseFloat(n):i=0;var a={};l8(r,a,a);var o=a.stopColor||r.getAttribute("stop-color")||"#000000";t.colorStops.push({offset:i,color:o})}r=r.nextSibling}}function Oi(e,t){e&&e.__inheritedStyle&&(t.__inheritedStyle||(t.__inheritedStyle={}),J(t.__inheritedStyle,e.__inheritedStyle))}function a8(e){for(var t=L1(e),r=[],n=0;n0;a-=2){var o=n[a],s=n[a-1],l=L1(o);switch(i=i||tr(),s){case"translate":Nr(i,i,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":Lc(i,i,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":Cn(i,i,-parseFloat(l[0])*SC);break;case"skewX":var u=Math.tan(parseFloat(l[0])*SC);An(i,[1,0,u,1,0,0],i);break;case"skewY":var f=Math.tan(parseFloat(l[0])*SC);An(i,[1,f,0,1,0,0],i);break;case"matrix":i[0]=parseFloat(l[0]),i[1]=parseFloat(l[1]),i[2]=parseFloat(l[2]),i[3]=parseFloat(l[3]),i[4]=parseFloat(l[4]),i[5]=parseFloat(l[5]);break}}t.setLocalTransform(i)}}var s8=/([^\s:;]+)\s*:\s*([^:;]+)/g;function l8(e,t,r){var n=e.getAttribute("style");if(n){s8.lastIndex=0;for(var i;(i=s8.exec(n))!=null;){var a=i[1],o=st(E1,a)?E1[a]:null;o&&(t[o]=i[2]);var s=st(I1,a)?I1[a]:null;s&&(r[s]=i[2])}}}function ift(e,t,r){for(var n=0;n0,v={api:n,geo:l,mapOrGeoModel:t,data:s,isVisualEncodedByVisualMap:m,isGeo:o,transformInfoRaw:p};l.resourceType==="geoJSON"?this._buildGeoJSON(v):l.resourceType==="geoSVG"&&this._buildSVG(v),this._updateController(t,r,n),this._updateMapSelectHandler(t,u,n,i)},e.prototype._buildGeoJSON=function(t){var r=this._regionsGroupByName=$(),n=$(),i=this._regionsGroup,a=t.transformInfoRaw,o=t.mapOrGeoModel,s=t.data,l=t.geo.projection,u=l&&l.stream;function f(h,d){return d&&(h=d(h)),h&&[h[0]*a.scaleX+a.x,h[1]*a.scaleY+a.y]}function c(h){for(var d=[],m=!u&&l&&l.project,v=0;v=0)&&(p=i);var h=o?{normal:{align:"center",verticalAlign:"middle"}}:null;he(t,ae(n),{labelFetcher:p,labelDataIndex:c,defaultText:r},h);var d=t.getTextContent();if(d&&(_8(d).ignore=d.ignore,t.textConfig&&o)){var m=t.getBoundingRect().clone();t.textConfig.layoutRect=m,t.textConfig.position=[(o[0]-m.x)/m.width*100+"%",(o[1]-m.y)/m.height*100+"%"]}t.disableLabelAnimation=!0}else t.removeTextContent(),t.removeTextConfig(),t.disableLabelAnimation=null}function m8(e,t,r,n,i,a){e.data?e.data.setItemGraphicEl(a,t):ht(t).eventData={componentType:"geo",componentIndex:i.componentIndex,geoIndex:i.componentIndex,name:r,region:n&&n.option||{}}}function g8(e,t,r,n,i){e.data||sa({el:t,componentModel:i,itemName:r,itemTooltipOption:n.get("tooltip")})}function y8(e,t,r,n,i){t.highDownSilentOnTouch=!!i.get("selectedMode");var a=n.getModel("emphasis"),o=a.get("focus");return Zt(t,o,a.get("blurScope"),a.get("disabled")),e.isGeo&&Xz(t,i,r),o}function x8(e,t,r){var n=[],i;function a(){i=[]}function o(){i.length&&(n.push(i),i=[])}var s=t({polygonStart:a,polygonEnd:o,lineStart:a,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&i.push([l,u])},sphere:function(){}});return!r&&s.polygonStart(),D(e,function(l){s.lineStart();for(var u=0;u-1&&(i.style.stroke=i.style.fill,i.style.fill="#fff",i.style.lineWidth=2),i},t.type="series.map",t.dependencies=["geo"],t.layoutMode="box",t.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},t}(Wt),S8=yft;function xft(e,t){var r={};return D(e,function(n){n.each(n.mapDimension("value"),function(i,a){var o="ec-"+n.getName(a);r[o]=r[o]||[],isNaN(i)||r[o].push(i)})}),e[0].map(e[0].mapDimension("value"),function(n,i){for(var a="ec-"+e[0].getName(i),o=0,s=1/0,l=-1/0,u=r[a].length,f=0;f1?(_.width=x,_.height=x/v):(_.height=x,_.width=x*v),_.y=y[1]-_.height/2,_.x=y[0]-_.width/2;else{var S=e.getBoxLayoutParams();S.aspect=v,_=re(S,{width:d,height:m})}this.setViewRect(_.x,_.y,_.width,_.height),this.setCenter(e.get("center"),t),this.setZoom(e.get("zoom"))}function Sft(e,t){D(t.get("geoCoord"),function(r,n){e.addGeoCoord(n,r)})}var wft=function(){function e(){this.dimensions=LC}return e.prototype.create=function(t,r){var n=[];function i(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}t.eachComponent("geo",function(o,s){var l=o.get("map"),u=new PC(l+s,l,V({nameMap:o.get("nameMap")},i(o)));u.zoomLimit=o.get("scaleLimit"),n.push(u),o.coordinateSystem=u,u.model=o,u.resize=C8,u.resize(o,r)}),t.eachSeries(function(o){var s=o.get("coordinateSystem");if(s==="geo"){var l=o.get("geoIndex")||0;o.coordinateSystem=n[l]}});var a={};return t.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();a[s]=a[s]||[],a[s].push(o)}}),D(a,function(o,s){var l=F(o,function(f){return f.get("nameMap")}),u=new PC(s,s,V({nameMap:Tc(l)},i(o[0])));u.zoomLimit=_e.apply(null,F(o,function(f){return f.get("scaleLimit")})),n.push(u),u.resize=C8,u.resize(o[0],r),D(o,function(f){f.coordinateSystem=u,Sft(u,f)})}),n},e.prototype.getFilledRegions=function(t,r,n,i){for(var a=(t||[]).slice(),o=$(),s=0;s=0;o--){var s=i[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},r.push(s)}}function P8(e,t){var r=e.isExpand?e.children:[],n=e.parentNode.children,i=e.hierNode.i?n[e.hierNode.i-1]:null;if(r.length){Dft(e);var a=(r[0].hierNode.prelim+r[r.length-1].hierNode.prelim)/2;i?(e.hierNode.prelim=i.hierNode.prelim+t(e,i),e.hierNode.modifier=e.hierNode.prelim-a):e.hierNode.prelim=a}else i&&(e.hierNode.prelim=i.hierNode.prelim+t(e,i));e.parentNode.hierNode.defaultAncestor=Eft(e,i,e.parentNode.hierNode.defaultAncestor||n[0],t)}function R8(e){var t=e.hierNode.prelim+e.parentNode.hierNode.modifier;e.setLayout({x:t},!0),e.hierNode.modifier+=e.parentNode.hierNode.modifier}function OC(e){return arguments.length?e:Pft}function uf(e,t){return e-=Math.PI/2,{x:t*Math.cos(e),y:t*Math.sin(e)}}function N8(e,t){return re(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function Dft(e){for(var t=e.children,r=t.length,n=0,i=0;--r>=0;){var a=t[r];a.hierNode.prelim+=n,a.hierNode.modifier+=n,i+=a.hierNode.change,n+=a.hierNode.shift+i}}function Eft(e,t,r,n){if(t){for(var i=e,a=e,o=a.parentNode.children[0],s=t,l=i.hierNode.modifier,u=a.hierNode.modifier,f=o.hierNode.modifier,c=s.hierNode.modifier;s=NC(s),a=kC(a),s&&a;){i=NC(i),o=kC(o),i.hierNode.ancestor=e;var p=s.hierNode.prelim+c-a.hierNode.prelim-u+n(s,a);p>0&&(Lft(Ift(s,e,r),e,p),u+=p,l+=p),c+=s.hierNode.modifier,u+=a.hierNode.modifier,l+=i.hierNode.modifier,f+=o.hierNode.modifier}s&&!NC(i)&&(i.hierNode.thread=s,i.hierNode.modifier+=c-l),a&&!kC(o)&&(o.hierNode.thread=a,o.hierNode.modifier+=u-f,r=e)}return r}function NC(e){var t=e.children;return t.length&&e.isExpand?t[t.length-1]:e.hierNode.thread}function kC(e){var t=e.children;return t.length&&e.isExpand?t[0]:e.hierNode.thread}function Ift(e,t,r){return e.hierNode.ancestor.parentNode===t.parentNode?e.hierNode.ancestor:r}function Lft(e,t,r){var n=r/(t.hierNode.i-e.hierNode.i);t.hierNode.change-=n,t.hierNode.shift+=r,t.hierNode.modifier+=r,t.hierNode.prelim+=r,e.hierNode.change+=n}function Pft(e,t){return e.parentNode===t.parentNode?1:2}var Rft=function(){function e(){this.parentPoint=[],this.childPoints=[]}return e}(),Nft=function(e){N(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new Rft},t.prototype.buildPath=function(r,n){var i=n.childPoints,a=i.length,o=n.parentPoint,s=i[0],l=i[a-1];if(a===1){r.moveTo(o[0],o[1]),r.lineTo(s[0],s[1]);return}var u=n.orient,f=u==="TB"||u==="BT"?0:1,c=1-f,p=q(n.forkPosition,1),h=[];h[f]=o[f],h[c]=o[c]+(l[c]-o[c])*p,r.moveTo(o[0],o[1]),r.lineTo(h[0],h[1]),r.moveTo(s[0],s[1]),h[f]=s[f],r.lineTo(h[0],h[1]),h[f]=l[f],r.lineTo(h[0],h[1]),r.lineTo(l[0],l[1]);for(var d=1;dy.x,S||(_=_-Math.PI));var w=S?"left":"right",T=s.getModel("label"),M=T.get("rotate"),C=M*(Math.PI/180),A=v.getTextContent();A&&(v.setTextConfig({position:T.get("position")||w,rotation:M==null?-_:C,origin:"center"}),A.setStyle("verticalAlign","middle"))}var P=s.get(["emphasis","focus"]),L=P==="relative"?su(o.getAncestorsIndices(),o.getDescendantIndices()):P==="ancestor"?o.getAncestorsIndices():P==="descendant"?o.getDescendantIndices():null;L&&(ht(r).focus=L),Oft(i,o,f,r,d,h,m,n),r.__edge&&(r.onHoverStateChange=function(I){if(I!=="blur"){var E=o.parentNode&&e.getItemGraphicEl(o.parentNode.dataIndex);E&&E.hoverState===Nu||ku(r.__edge,I)}})}function Oft(e,t,r,n,i,a,o,s){var l=t.getModel(),u=e.get("edgeShape"),f=e.get("layout"),c=e.getOrient(),p=e.get(["lineStyle","curveness"]),h=e.get("edgeForkPosition"),d=l.getModel("lineStyle").getLineStyle(),m=n.__edge;if(u==="curve")t.parentNode&&t.parentNode!==r&&(m||(m=n.__edge=new Uu({shape:zC(f,c,p,i,i)})),Rt(m,{shape:zC(f,c,p,a,o)},e));else if(u==="polyline"&&f==="orthogonal"&&t!==r&&t.children&&t.children.length!==0&&t.isExpand===!0){for(var v=t.children,g=[],y=0;yr&&(r=i.height)}this.height=r+1},e.prototype.getNodeById=function(t){if(this.getId()===t)return this;for(var r=0,n=this.children,i=n.length;r=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,r)},e.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},e.prototype.getModel=function(t){if(!(this.dataIndex<0)){var r=this.hostTree,n=r.data.getItemModel(this.dataIndex);return n.getModel(t)}},e.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},e.prototype.setVisual=function(t,r){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,r)},e.prototype.getVisual=function(t){return this.hostTree.data.getItemVisual(this.dataIndex,t)},e.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},e.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},e.prototype.getChildIndex=function(){if(this.parentNode){for(var t=this.parentNode.children,r=0;r=0){var n=r.getData().tree.root,i=e.targetNode;if(H(i)&&(i=n.getNodeById(i)),i&&n.contains(i))return{node:i};var a=e.targetNodeId;if(a!=null&&(i=n.getNodeById(a)))return{node:i}}}function VC(e){for(var t=[];e;)e=e.parentNode,e&&t.push(e);return t.reverse()}function Cp(e,t){var r=VC(e);return gt(r,t)>=0}function vl(e,t){for(var r=[];e;){var n=e.dataIndex;r.push({name:e.name,dataIndex:n,value:t.getRawValue(n)}),e=e.parentNode}return r.reverse(),r}var qft=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.hasSymbolVisual=!0,r.ignoreStyleOnData=!0,r}return t.prototype.getInitialData=function(r){var n={name:r.name,children:r.data},i=r.leaves||{},a=new Ht(i,this,this.ecModel),o=Ap.createTree(n,this,s);function s(c){c.wrapMethod("getItemModel",function(p,h){var d=o.getNodeByDataIndex(h);return d&&d.children.length&&d.isExpand||(p.parentModel=a),p})}var l=0;o.eachNode("preorder",function(c){c.depth>l&&(l=c.depth)});var u=r.expandAndCollapse,f=u&&r.initialTreeDepth>=0?r.initialTreeDepth:l;return o.root.eachNode("preorder",function(c){var p=c.hostTree.data.getRawDataItem(c.dataIndex);c.isExpand=p&&p.collapsed!=null?!p.collapsed:c.depth<=f}),o.data},t.prototype.getOrient=function(){var r=this.get("orient");return r==="horizontal"?r="LR":r==="vertical"&&(r="TB"),r},t.prototype.setZoom=function(r){this.option.zoom=r},t.prototype.setCenter=function(r){this.option.center=r},t.prototype.formatTooltip=function(r,n,i){for(var a=this.getData().tree,o=a.root.children[0],s=a.getNodeByDataIndex(r),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return xe("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},t.prototype.getDataParams=function(r){var n=e.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(r);return n.treeAncestors=vl(i,this),n.collapsed=!i.isExpand,n},t.type="series.tree",t.layoutMode="box",t.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},t}(Wt),G8=qft;function H8(e,t,r){for(var n=[e],i=[],a;a=n.pop();)if(i.push(a),a.isExpand){var o=a.children;if(o.length)for(var s=0;s=0;a--)r.push(i[a])}}function FC(e,t){e.eachSeriesByType("tree",function(r){Zft(r,t)})}function Zft(e,t){var r=N8(e,t);e.layoutInfo=r;var n=e.get("layout"),i=0,a=0,o=null;n==="radial"?(i=2*Math.PI,a=Math.min(r.height,r.width)/2,o=OC(function(x,_){return(x.parentNode===_.parentNode?1:2)/x.depth})):(i=r.width,a=r.height,o=OC());var s=e.getData().tree.root,l=s.children[0];if(l){L8(s),H8(l,P8,o),s.hierNode.modifier=-l.hierNode.prelim,Dp(l,R8);var u=l,f=l,c=l;Dp(l,function(x){var _=x.getLayout().x;_f.getLayout().x&&(f=x),x.depth>c.depth&&(c=x)});var p=u===f?1:o(u,f)/2,h=p-u.getLayout().x,d=0,m=0,v=0,g=0;if(n==="radial")d=i/(f.getLayout().x+p+h),m=a/(c.depth-1||1),Dp(l,function(x){v=(x.getLayout().x+h)*d,g=(x.depth-1)*m;var _=uf(v,g);x.setLayout({x:_.x,y:_.y,rawX:v,rawY:g},!0)});else{var y=e.getOrient();y==="RL"||y==="LR"?(m=a/(f.getLayout().x+p+h),d=i/(c.depth-1||1),Dp(l,function(x){g=(x.getLayout().x+h)*m,v=y==="LR"?(x.depth-1)*d:i-(x.depth-1)*d,x.setLayout({x:v,y:g},!0)})):(y==="TB"||y==="BT")&&(d=i/(f.getLayout().x+p+h),m=a/(c.depth-1||1),Dp(l,function(x){v=(x.getLayout().x+h)*d,g=y==="TB"?(x.depth-1)*m:a-(x.depth-1)*m,x.setLayout({x:v,y:g},!0)}))}}}function GC(e){e.eachSeriesByType("tree",function(t){var r=t.getData(),n=r.tree;n.eachNode(function(i){var a=i.getModel(),o=a.getModel("itemStyle").getItemStyle(),s=r.ensureUniqueItemVisual(i.dataIndex,"style");V(s,o)})})}function W8(e){e.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(t,r){r.eachComponent({mainType:"series",subType:"tree",query:t},function(n){var i=t.dataIndex,a=n.getData().tree,o=a.getNodeByDataIndex(i);o.isExpand=!o.isExpand})}),e.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(t,r,n){r.eachComponent({mainType:"series",subType:"tree",query:t},function(i){var a=i.coordinateSystem,o=Mp(a,t,void 0,n);i.setCenter&&i.setCenter(o.center),i.setZoom&&i.setZoom(o.zoom)})})}function HC(e){e.registerChartView(B8),e.registerSeriesModel(G8),e.registerLayout(FC),e.registerVisual(GC),W8(e)}var Y8=["treemapZoomToNode","treemapRender","treemapMove"];function X8(e){for(var t=0;t1;)a=a.parentNode;var o=lv(e.ecModel,a.name||a.dataIndex+"",n);i.setVisual("decal",o)})}var Kft=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.preventUsingHoverLayer=!0,r}return t.prototype.getInitialData=function(r,n){var i={name:r.name,children:r.data};q8(i);var a=r.levels||[],o=this.designatedVisualItemStyle={},s=new Ht({itemStyle:o},this,n);a=r.levels=$ft(a,n);var l=F(a||[],function(c){return new Ht(c,s,n)},this),u=Ap.createTree(i,this,f);function f(c){c.wrapMethod("getItemModel",function(p,h){var d=u.getNodeByDataIndex(h),m=d?l[d.depth]:null;return p.parentModel=m||s,p})}return u.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.formatTooltip=function(r,n,i){var a=this.getData(),o=this.getRawValue(r),s=a.getName(r);return xe("nameValue",{name:s,value:o})},t.prototype.getDataParams=function(r){var n=e.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(r);return n.treeAncestors=vl(i,this),n.treePathInfo=n.treeAncestors,n},t.prototype.setLayoutInfo=function(r){this.layoutInfo=this.layoutInfo||{},V(this.layoutInfo,r)},t.prototype.mapIdToIndex=function(r){var n=this._idIndexMap;n||(n=this._idIndexMap=$(),this._idIndexMapCount=0);var i=n.get(r);return i==null&&n.set(r,i=this._idIndexMapCount++),i},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(r){r?this._viewRoot=r:r=this._viewRoot;var n=this.getRawData().tree.root;(!r||r!==n&&!n.contains(r))&&(this._viewRoot=n)},t.prototype.enableAriaDecal=function(){Qv(this)},t.type="series.treemap",t.layoutMode="box",t.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"\u25B6",zoomToNodeRatio:.32*.32,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}},emphasis:{itemStyle:{color:"rgba(0,0,0,0.9)"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},t}(Wt);function q8(e){var t=0;D(e.children,function(n){q8(n);var i=n.value;B(i)&&(i=i[0]),t+=i});var r=e.value;B(r)&&(r=r[0]),(r==null||isNaN(r))&&(r=t),r<0&&(r=0),B(e.value)?e.value[0]=r:e.value=r}function $ft(e,t){var r=Yt(t.get("color")),n=Yt(t.get(["aria","decal","decals"]));if(r){e=e||[];var i,a;D(e,function(s){var l=new Ht(s),u=l.get("color"),f=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(i=!0),(l.get(["itemStyle","decal"])||f&&f!=="none")&&(a=!0)});var o=e[0]||(e[0]={});return i||(o.color=r.slice()),!a&&n&&(o.decal=n.slice()),e}}var Z8=Kft;var jft=8,K8=8,WC=5,Qft=function(){function e(t){this.group=new nt,t.add(this.group)}return e.prototype.render=function(t,r,n,i){var a=t.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!a.get("show")||!n)){var s=a.getModel("itemStyle"),l=a.getModel("emphasis"),u=s.getModel("textStyle"),f=l.getModel(["itemStyle","textStyle"]),c={pos:{left:a.get("left"),right:a.get("right"),top:a.get("top"),bottom:a.get("bottom")},box:{width:r.getWidth(),height:r.getHeight()},emptyItemWidth:a.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(n,c,u),this._renderContent(t,c,s,l,u,f,i),Zs(o,c.pos,c.box)}},e.prototype._prepare=function(t,r,n){for(var i=t;i;i=i.parentNode){var a=Te(i.getModel().get("name"),""),o=n.getTextRect(a),s=Math.max(o.width+jft*2,r.emptyItemWidth);r.totalWidth+=s+K8,r.renderList.push({node:i,text:a,width:s})}},e.prototype._renderContent=function(t,r,n,i,a,o,s){for(var l=0,u=r.emptyItemWidth,f=t.get(["breadcrumb","height"]),c=$5(r.pos,r.box),p=r.totalWidth,h=r.renderList,d=i.getModel("itemStyle").getItemStyle(),m=h.length-1;m>=0;m--){var v=h[m],g=v.node,y=v.width,x=v.text;p>c.width&&(p-=y-u,y=u,x=null);var _=new Re({shape:{points:Jft(l,0,y,f,m===h.length-1,m===0)},style:J(n.getItemStyle(),{lineJoin:"bevel"}),textContent:new Lt({style:Qt(a,{text:x})}),textConfig:{position:"inside"},z2:Uo*1e4,onclick:pt(s,g)});_.disableLabelAnimation=!0,_.getTextContent().ensureState("emphasis").style=Qt(o,{text:x}),_.ensureState("emphasis").style=d,Zt(_,i.get("focus"),i.get("blurScope"),i.get("disabled")),this.group.add(_),tct(_,t,g),l+=y+K8}},e.prototype.remove=function(){this.group.removeAll()},e}();function Jft(e,t,r,n,i,a){var o=[[i?e:e-WC,t],[e+r,t],[e+r,t+n],[i?e:e-WC,t+n]];return!a&&o.splice(2,0,[e+r+WC,t+n/2]),!i&&o.push([e,t+n/2]),o}function tct(e,t,r){ht(e).eventData={componentType:"series",componentSubType:"treemap",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:r&&r.dataIndex,name:r&&r.name},treePathInfo:r&&vl(r,t)}}var $8=Qft;var ect=function(){function e(){this._storage=[],this._elExistsMap={}}return e.prototype.add=function(t,r,n,i,a){return this._elExistsMap[t.id]?!1:(this._elExistsMap[t.id]=!0,this._storage.push({el:t,target:r,duration:n,delay:i,easing:a}),!0)},e.prototype.finished=function(t){return this._finishedCallback=t,this},e.prototype.start=function(){for(var t=this,r=this._storage.length,n=function(){r--,r<=0&&(t._storage.length=0,t._elExistsMap={},t._finishedCallback&&t._finishedCallback())},i=0,a=this._storage.length;iJ8||Math.abs(r.dy)>J8)){var n=this.seriesModel.getData().tree.root;if(!n)return;var i=n.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+r.dx,y:i.y+r.dy,width:i.width,height:i.height}})}},t.prototype._onZoom=function(r){var n=r.originX,i=r.originY;if(this._state!=="animating"){var a=this.seriesModel.getData().tree.root;if(!a)return;var o=a.getLayout();if(!o)return;var s=new dt(o.x,o.y,o.width,o.height),l=this.seriesModel.layoutInfo;n-=l.x,i-=l.y;var u=tr();Nr(u,u,[-n,-i]),Lc(u,u,[r.scale,r.scale]),Nr(u,u,[n,i]),s.applyTransform(u),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:s.x,y:s.y,width:s.width,height:s.height}})}},t.prototype._initEvents=function(r){var n=this;r.on("click",function(i){if(n._state==="ready"){var a=n.seriesModel.get("nodeClick",!0);if(a){var o=n.findTarget(i.offsetX,i.offsetY);if(o){var s=o.node;if(s.getLayout().isLeafRoot)n._rootToNode(o);else if(a==="zoomToNode")n._zoomToNode(o);else if(a==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),f=l.get("target",!0)||"blank";u&&Xu(u,f)}}}}},this)},t.prototype._renderBreadcrumb=function(r,n,i){var a=this;i||(i=r.get("leafDepth",!0)!=null?{node:r.getViewRoot()}:this.findTarget(n.getWidth()/2,n.getHeight()/2),i||(i={node:r.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new $8(this.group))).render(r,n,i.node,function(o){a._state!=="animating"&&(Cp(r.getViewRoot(),o)?a._rootToNode({node:o}):a._zoomToNode({node:o}))})},t.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=Jv(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},t.prototype.dispose=function(){this._clearController()},t.prototype._zoomToNode=function(r){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:r.node})},t.prototype._rootToNode=function(r){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:r.node})},t.prototype.findTarget=function(r,n){var i,a=this.seriesModel.getViewRoot();return a.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(r,n),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)i={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),i},t.type="treemap",t}(Vt);function Jv(){return{nodeGroup:[],background:[],content:[]}}function sct(e,t,r,n,i,a,o,s,l,u){if(!o)return;var f=o.getLayout(),c=e.getData(),p=o.getModel();if(c.setItemGraphicEl(o.dataIndex,null),!f||!f.isInView)return;var h=f.width,d=f.height,m=f.borderWidth,v=f.invisible,g=o.getRawIndex(),y=s&&s.getRawIndex(),x=o.viewChildren,_=f.upperHeight,S=x&&x.length,b=p.getModel("itemStyle"),w=p.getModel(["emphasis","itemStyle"]),T=p.getModel(["blur","itemStyle"]),M=p.getModel(["select","itemStyle"]),C=b.get("borderRadius")||0,A=tt("nodeGroup",YC);if(!A)return;if(l.add(A),A.x=f.x||0,A.y=f.y||0,A.markRedraw(),O1(A).nodeWidth=h,O1(A).nodeHeight=d,f.isAboveViewRoot)return A;var P=tt("background",Q8,u,ict);P&&z(A,P,S&&f.upperLabelHeight);var L=p.getModel("emphasis"),I=L.get("focus"),E=L.get("blurScope"),R=L.get("disabled"),k=I==="ancestor"?o.getAncestorsIndices():I==="descendant"?o.getDescendantIndices():I;if(S)qs(A)&&Bo(A,!1),P&&(Bo(P,!R),c.setItemGraphicEl(o.dataIndex,P),m0(P,k,E));else{var O=tt("content",Q8,u,act);O&&U(A,O),P.disableMorphing=!0,P&&qs(P)&&Bo(P,!1),Bo(A,!R),c.setItemGraphicEl(o.dataIndex,A),m0(A,k,E)}return A;function z(ut,ct,K){var ot=ht(ct);if(ot.dataIndex=o.dataIndex,ot.seriesIndex=e.seriesIndex,ct.setShape({x:0,y:0,width:h,height:d,r:C}),v)G(ct);else{ct.invisible=!1;var Q=o.getVisual("style"),W=Q.stroke,Gt=rB(b);Gt.fill=W;var Tt=ff(w);Tt.fill=w.get("borderColor");var te=ff(T);te.fill=T.get("borderColor");var Jt=ff(M);if(Jt.fill=M.get("borderColor"),K){var Dt=h-2*m;Y(ct,W,Q.opacity,{x:m,y:0,width:Dt,height:_})}else ct.removeTextContent();ct.setStyle(Gt),ct.ensureState("emphasis").style=Tt,ct.ensureState("blur").style=te,ct.ensureState("select").style=Jt,na(ct)}ut.add(ct)}function U(ut,ct){var K=ht(ct);K.dataIndex=o.dataIndex,K.seriesIndex=e.seriesIndex;var ot=Math.max(h-2*m,0),Q=Math.max(d-2*m,0);if(ct.culling=!0,ct.setShape({x:m,y:m,width:ot,height:Q,r:C}),v)G(ct);else{ct.invisible=!1;var W=o.getVisual("style"),Gt=W.fill,Tt=rB(b);Tt.fill=Gt,Tt.decal=W.decal;var te=ff(w),Jt=ff(T),Dt=ff(M);Y(ct,Gt,W.opacity,null),ct.setStyle(Tt),ct.ensureState("emphasis").style=te,ct.ensureState("blur").style=Jt,ct.ensureState("select").style=Dt,na(ct)}ut.add(ct)}function G(ut){!ut.invisible&&a.push(ut)}function Y(ut,ct,K,ot){var Q=p.getModel(ot?eB:tB),W=Te(p.get("name"),null),Gt=Q.getShallow("show");he(ut,ae(p,ot?eB:tB),{defaultText:Gt?W:null,inheritColor:ct,defaultOpacity:K,labelFetcher:e,labelDataIndex:o.dataIndex});var Tt=ut.getTextContent();if(Tt){var te=Tt.style,Jt=Mc(te.padding||0);ot&&(ut.setTextConfig({layoutRect:ot}),Tt.disableLabelLayout=!0),Tt.beforeUpdate=function(){var ve=Math.max((ot?ot.width:ut.shape.width)-Jt[1]-Jt[3],0),ar=Math.max((ot?ot.height:ut.shape.height)-Jt[0]-Jt[2],0);(te.width!==ve||te.height!==ar)&&Tt.setStyle({width:ve,height:ar})},te.truncateMinChar=2,te.lineOverflow="truncate",et(te,ot,f);var Dt=Tt.getState("emphasis");et(Dt?Dt.style:null,ot,f)}}function et(ut,ct,K){var ot=ut?ut.text:null;if(!ct&&K.isLeafRoot&&ot!=null){var Q=e.get("drillDownIcon",!0);ut.text=Q?Q+" "+ot:ot}}function tt(ut,ct,K,ot){var Q=y!=null&&r[ut][y],W=i[ut];return Q?(r[ut][y]=null,lt(W,Q)):v||(Q=new ct,Q instanceof We&&(Q.z2=lct(K,ot)),Mt(W,Q)),t[ut][g]=Q}function lt(ut,ct){var K=ut[g]={};ct instanceof YC?(K.oldX=ct.x,K.oldY=ct.y):K.oldShape=V({},ct.shape)}function Mt(ut,ct){var K=ut[g]={},ot=o.parentNode,Q=ct instanceof nt;if(ot&&(!n||n.direction==="drillDown")){var W=0,Gt=0,Tt=i.background[ot.getRawIndex()];!n&&Tt&&Tt.oldShape&&(W=Tt.oldShape.width,Gt=Tt.oldShape.height),Q?(K.oldX=0,K.oldY=Gt):K.oldShape={x:W,y:Gt,width:0,height:0}}K.fadein=!Q}}function lct(e,t){return e*nct+t}var nB=oct;var rm=D,uct=rt,V1=-1,KC=function(){function e(t){var r=t.mappingMethod,n=t.type,i=this.option=at(t);this.type=n,this.mappingMethod=r,this._normalizeData=pct[r];var a=e.visualHandlers[n];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[r],r==="piecewise"?(XC(i),fct(i)):r==="category"?i.categories?cct(i):XC(i,!0):(be(r!=="linear"||i.dataExtent),XC(i))}return e.prototype.mapValueToVisual=function(t){var r=this._normalizeData(t);return this._normalizedToVisual(r,t)},e.prototype.getNormalizer=function(){return Z(this._normalizeData,this)},e.listVisualTypes=function(){return St(e.visualHandlers)},e.isValidType=function(t){return e.visualHandlers.hasOwnProperty(t)},e.eachVisual=function(t,r,n){rt(t)?D(t,r,n):r.call(n,t)},e.mapVisual=function(t,r,n){var i,a=B(t)?[]:rt(t)?{}:(i=!0,null);return e.eachVisual(t,function(o,s){var l=r.call(n,o,s);i?a=l:a[s]=l}),a},e.retrieveVisuals=function(t){var r={},n;return t&&rm(e.visualHandlers,function(i,a){t.hasOwnProperty(a)&&(r[a]=t[a],n=!0)}),n?r:null},e.prepareVisualTypes=function(t){if(B(t))t=t.slice();else if(uct(t)){var r=[];rm(t,function(n,i){r.push(i)}),t=r}else return[];return t.sort(function(n,i){return i==="color"&&n!=="color"&&n.indexOf("color")===0?1:-1}),t},e.dependsOn=function(t,r){return r==="color"?!!(t&&t.indexOf(r)===0):t===r},e.findPieceIndex=function(t,r,n){for(var i,a=1/0,o=0,s=r.length;o=0;a--)n[a]==null&&(delete r[t[a]],t.pop())}function XC(e,t){var r=e.visual,n=[];rt(r)?rm(r,function(a){n.push(a)}):r!=null&&n.push(r);var i={color:1,symbol:1};!t&&n.length===1&&!i.hasOwnProperty(e.type)&&(n[1]=n[0]),aB(e,n)}function z1(e){return{applyVisual:function(t,r,n){var i=this.mapValueToVisual(t);n("color",e(r("color"),i))},_normalizedToVisual:qC([0,1])}}function iB(e){var t=this.option.visual;return t[Math.round($t(e,[0,1],[0,t.length-1],!0))]||{}}function tm(e){return function(t,r,n){n(e,this.mapValueToVisual(t))}}function em(e){var t=this.option.visual;return t[this.option.loop&&e!==V1?e%t.length:e]}function cf(){return this.option.visual[0]}function qC(e){return{linear:function(t){return $t(t,e,this.option.visual,!0)},category:em,piecewise:function(t,r){var n=ZC.call(this,r);return n==null&&(n=$t(t,e,this.option.visual,!0)),n},fixed:cf}}function ZC(e){var t=this.option,r=t.pieceList;if(t.hasSpecialVisual){var n=KC.findPieceIndex(e,r),i=r[n];if(i&&i.visual)return i.visual[this.type]}}function aB(e,t){return e.visual=t,e.type==="color"&&(e.parsedVisual=F(t,function(r){var n=br(r);return n||[0,0,0,1]})),t}var pct={linear:function(e){return $t(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,r=KC.findPieceIndex(e,t,!0);if(r!=null)return $t(r,[0,t.length-1],[0,1],!0)},category:function(e){var t=this.option.categories?this.option.categoryMap[e]:e;return t??V1},fixed:ce};function U1(e,t,r){return e?t<=r:t=r.length||m===r[m.depth]){var g=gct(i,l,m,v,d,n);uB(m,g,r,n)}})}}}function dct(e,t,r){var n=V({},t),i=r.designatedVisualItemStyle;return D(["color","colorAlpha","colorSaturation"],function(a){i[a]=t[a];var o=e.get(a);i[a]=null,o!=null&&(n[a]=o)}),n}function oB(e){var t=$C(e,"color");if(t){var r=$C(e,"colorAlpha"),n=$C(e,"colorSaturation");return n&&(t=mu(t,null,null,n)),r&&(t=gu(t,r)),t}}function vct(e,t){return t!=null?mu(t,null,null,e):null}function $C(e,t){var r=e[t];if(r!=null&&r!=="none")return r}function mct(e,t,r,n,i,a){if(!(!a||!a.length)){var o=jC(t,"color")||i.color!=null&&i.color!=="none"&&(jC(t,"colorAlpha")||jC(t,"colorSaturation"));if(o){var s=t.get("visualMin"),l=t.get("visualMax"),u=r.dataExtent.slice();s!=null&&su[1]&&(u[1]=l);var f=t.get("colorMappingBy"),c={type:o.name,dataExtent:u,visual:o.range};c.type==="color"&&(f==="index"||f==="id")?(c.mappingMethod="category",c.loop=!0):c.mappingMethod="linear";var p=new Be(c);return sB(p).drColorMappingBy=f,p}}}function jC(e,t){var r=e.get(t);return B(r)&&r.length?{name:t,range:r}:null}function gct(e,t,r,n,i,a){var o=V({},t);if(i){var s=i.type,l=s==="color"&&sB(i).drColorMappingBy,u=l==="index"?n:l==="id"?a.mapIdToIndex(r.getId()):r.getValue(e.get("visualDimension"));o[s]=i.mapValueToVisual(u)}return o}var nm=Math.max,B1=Math.min,fB=_e,QC=D,pB=["itemStyle","borderWidth"],yct=["itemStyle","gapWidth"],xct=["upperLabel","show"],_ct=["upperLabel","height"],hB={seriesType:"treemap",reset:function(e,t,r,n){var i=r.getWidth(),a=r.getHeight(),o=e.option,s=re(e.getBoxLayoutParams(),{width:r.getWidth(),height:r.getHeight()}),l=o.size||[],u=q(fB(s.width,l[0]),i),f=q(fB(s.height,l[1]),a),c=n&&n.type,p=["treemapZoomToNode","treemapRootToNode"],h=rs(n,p,e),d=c==="treemapRender"||c==="treemapMove"?n.rootRect:null,m=e.getViewRoot(),v=VC(m);if(c!=="treemapMove"){var g=c==="treemapZoomToNode"?Act(e,h,m,u,f):d?[d.width,d.height]:[u,f],y=o.sort;y&&y!=="asc"&&y!=="desc"&&(y="desc");var x={squareRatio:o.squareRatio,sort:y,leafDepth:o.leafDepth};m.hostTree.clearLayouts();var _={x:0,y:0,width:g[0],height:g[1],area:g[0]*g[1]};m.setLayout(_),dB(m,x,!1,0),_=m.getLayout(),QC(v,function(b,w){var T=(v[w+1]||m).getValue();b.setLayout(V({dataExtent:[T,T],borderWidth:0,upperHeight:0},_))})}var S=e.getData().tree.root;S.setLayout(Cct(s,d,h),!0),e.setLayoutInfo(s),vB(S,new dt(-s.x,-s.y,i,a),v,m,0)}};function dB(e,t,r,n){var i,a;if(!e.isRemoved()){var o=e.getLayout();i=o.width,a=o.height;var s=e.getModel(),l=s.get(pB),u=s.get(yct)/2,f=mB(s),c=Math.max(l,f),p=l-u,h=c-u;e.setLayout({borderWidth:l,upperHeight:c,upperLabelHeight:f},!0),i=nm(i-2*p,0),a=nm(a-p-h,0);var d=i*a,m=bct(e,s,d,t,r,n);if(m.length){var v={x:p,y:h,width:i,height:a},g=B1(i,a),y=1/0,x=[];x.area=0;for(var _=0,S=m.length;_=0;l--){var u=i[n==="asc"?o-l-1:l].getValue();u/r*ts[1]&&(s[1]=u)})),{sum:n,dataExtent:s}}function Mct(e,t,r){for(var n=0,i=1/0,a=0,o=void 0,s=e.length;an&&(n=o));var l=e.area*e.area,u=t*t*r;return l?nm(u*n/l,l/(u*i)):1/0}function cB(e,t,r,n,i){var a=t===r.width?0:1,o=1-a,s=["x","y"],l=["width","height"],u=r[s[a]],f=t?e.area/t:0;(i||f>r[l[o]])&&(f=r[l[o]]);for(var c=0,p=e.length;cG2&&(u=G2),a=s}un&&(n=t);var a=n%2?n+2:n+3;i=[];for(var o=0;o0&&(S[0]=-S[0],S[1]=-S[1]);var w=_[0]<0?-1:1;if(a.__position!=="start"&&a.__position!=="end"){var T=-Math.atan2(_[1],_[0]);c[0].8?"left":p[0]<-.8?"right":"center",m=p[1]>.8?"top":p[1]<-.8?"bottom":"middle";break;case"start":a.x=-p[0]*g+f[0],a.y=-p[1]*y+f[1],d=p[0]>.8?"right":p[0]<-.8?"left":"center",m=p[1]>.8?"bottom":p[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":a.x=g*w+f[0],a.y=f[1]+M,d=_[0]<0?"right":"left",a.originX=-g*w,a.originY=-M;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":a.x=b[0],a.y=b[1]+M,d="center",a.originY=-M;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":a.x=-g*w+c[0],a.y=c[1]+M,d=_[0]>=0?"right":"left",a.originX=g*w,a.originY=-M;break}a.scaleX=a.scaleY=o,a.setStyle({verticalAlign:a.__verticalAlign||m,align:a.__align||d})}},t}(nt),Pp=Nct;var kct=function(){function e(t){this.group=new nt,this._LineCtor=t||Pp}return e.prototype.updateData=function(t){var r=this;this._progressiveEls=null;var n=this,i=n.group,a=n._lineData;n._lineData=t,a||i.removeAll();var o=EB(t);t.diff(a).add(function(s){r._doAdd(t,s,o)}).update(function(s,l){r._doUpdate(a,t,l,s,o)}).remove(function(s){i.remove(a.getItemGraphicEl(s))}).execute()},e.prototype.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl(function(r,n){r.updateLayout(t,n)},this)},e.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=EB(t),this._lineData=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(t,r){this._progressiveEls=[];function n(s){!s.isGroup&&!Oct(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var i=t.start;i0}function EB(e){var t=e.hostModel,r=t.getModel("emphasis");return{lineStyle:t.getModel("lineStyle").getLineStyle(),emphasisLineStyle:r.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:t.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:t.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:r.get("disabled"),blurScope:r.get("blurScope"),focus:r.get("focus"),labelStatesModels:ae(t)}}function IB(e){return isNaN(e[0])||isNaN(e[1])}function vD(e){return e&&!IB(e[0])&&!IB(e[1])}var Rp=kct;var mD=[],gD=[],yD=[],Np=He,xD=No,LB=Math.abs;function PB(e,t,r){for(var n=e[0],i=e[1],a=e[2],o=1/0,s,l=r*r,u=.1,f=.1;f<=.9;f+=.1){mD[0]=Np(n[0],i[0],a[0],f),mD[1]=Np(n[1],i[1],a[1],f);var c=LB(xD(mD,t)-l);c=0?s=s+u:s=s-u:d>=0?s=s-u:s=s+u}return s}function om(e,t){var r=[],n=ks,i=[[],[],[]],a=[[],[]],o=[];t/=2,e.eachEdge(function(s,l){var u=s.getLayout(),f=s.getVisual("fromSymbol"),c=s.getVisual("toSymbol");u.__original||(u.__original=[wn(u[0]),wn(u[1])],u[2]&&u.__original.push(wn(u[2])));var p=u.__original;if(u[2]!=null){if(hr(i[0],p[0]),hr(i[1],p[2]),hr(i[2],p[1]),f&&f!=="none"){var h=hf(s.node1),d=PB(i,p[0],h*t);n(i[0][0],i[1][0],i[2][0],d,r),i[0][0]=r[3],i[1][0]=r[4],n(i[0][1],i[1][1],i[2][1],d,r),i[0][1]=r[3],i[1][1]=r[4]}if(c&&c!=="none"){var h=hf(s.node2),d=PB(i,p[1],h*t);n(i[0][0],i[1][0],i[2][0],d,r),i[1][0]=r[1],i[2][0]=r[2],n(i[0][1],i[1][1],i[2][1],d,r),i[1][1]=r[1],i[2][1]=r[2]}hr(u[0],i[0]),hr(u[1],i[2]),hr(u[2],i[1])}else{if(hr(a[0],p[0]),hr(a[1],p[1]),Ji(o,a[1],a[0]),vi(o,o),f&&f!=="none"){var h=hf(s.node1);pd(a[0],a[0],o,h*t)}if(c&&c!=="none"){var h=hf(s.node2);pd(a[1],a[1],o,-h*t)}hr(u[0],a[0]),hr(u[1],a[1])}})}function RB(e){return e.type==="view"}var zct=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r,n){var i=new io,a=new Rp,o=this.group;this._controller=new so(n.getZr()),this._controllerHost={target:o},o.add(i.group),o.add(a.group),this._symbolDraw=i,this._lineDraw=a,this._firstRender=!0},t.prototype.render=function(r,n,i){var a=this,o=r.coordinateSystem;this._model=r;var s=this._symbolDraw,l=this._lineDraw,u=this.group;if(RB(o)){var f={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?u.attr(f):Rt(u,f,r)}om(r.getGraph(),pf(r));var c=r.getData();s.updateData(c);var p=r.getEdgeData();l.updateData(p),this._updateNodeAndLinkScale(),this._updateController(r,n,i),clearTimeout(this._layoutTimeout);var h=r.forceLayout,d=r.get(["force","layoutAnimation"]);h&&this._startForceLayoutIteration(h,d);var m=r.get("layout");c.graph.eachNode(function(x){var _=x.dataIndex,S=x.getGraphicEl(),b=x.getModel();if(S){S.off("drag").off("dragend");var w=b.get("draggable");w&&S.on("drag",function(M){switch(m){case"force":h.warmUp(),!a._layouting&&a._startForceLayoutIteration(h,d),h.setFixed(_),c.setItemLayout(_,[S.x,S.y]);break;case"circular":c.setItemLayout(_,[S.x,S.y]),x.setLayout({fixed:!0},!0),Ip(r,"symbolSize",x,[M.offsetX,M.offsetY]),a.updateLayout(r);break;case"none":default:c.setItemLayout(_,[S.x,S.y]),am(r.getGraph(),r),a.updateLayout(r);break}}).on("dragend",function(){h&&h.setUnfixed(_)}),S.setDraggable(w,!!b.get("cursor"));var T=b.get(["emphasis","focus"]);T==="adjacency"&&(ht(S).focus=x.getAdjacentDataIndices())}}),c.graph.eachEdge(function(x){var _=x.getGraphicEl(),S=x.getModel().get(["emphasis","focus"]);_&&S==="adjacency"&&(ht(_).focus={edge:[x.dataIndex],node:[x.node1.dataIndex,x.node2.dataIndex]})});var v=r.get("layout")==="circular"&&r.get(["circular","rotateLabel"]),g=c.getLayout("cx"),y=c.getLayout("cy");c.graph.eachNode(function(x){sD(x,v,g,y)}),this._firstRender=!1},t.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype._startForceLayoutIteration=function(r,n){var i=this;(function a(){r.step(function(o){i.updateLayout(i._model),(i._layouting=!o)&&(n?i._layoutTimeout=setTimeout(a,16):a())})})()},t.prototype._updateController=function(r,n,i){var a=this,o=this._controller,s=this._controllerHost,l=this.group;if(o.setPointerChecker(function(u,f,c){var p=l.getBoundingRect();return p.applyTransform(l.transform),p.contain(f,c)&&!hl(u,i,r)}),!RB(r.coordinateSystem)){o.disable();return}o.enable(r.get("roam")),s.zoomLimit=r.get("scaleLimit"),s.zoom=r.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",function(u){wp(s,u.dx,u.dy),i.dispatchAction({seriesId:r.id,type:"graphRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){Tp(s,u.scale,u.originX,u.originY),i.dispatchAction({seriesId:r.id,type:"graphRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),a._updateNodeAndLinkScale(),om(r.getGraph(),pf(r)),a._lineDraw.updateLayout(),i.updateLabelLayout()})},t.prototype._updateNodeAndLinkScale=function(){var r=this._model,n=r.getData(),i=pf(r);n.eachItemGraphicEl(function(a,o){a&&a.setSymbolScale(i)})},t.prototype.updateLayout=function(r){om(r.getGraph(),pf(r)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},t.prototype.remove=function(r,n){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},t.type="graph",t}(Vt),NB=zct;function kp(e){return"_EC_"+e}var Uct=function(){function e(t){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=t||!1}return e.prototype.isDirected=function(){return this._directed},e.prototype.addNode=function(t,r){t=t==null?""+r:""+t;var n=this._nodesMap;if(!n[kp(t)]){var i=new df(t,r);return i.hostGraph=this,this.nodes.push(i),n[kp(t)]=i,i}},e.prototype.getNodeByIndex=function(t){var r=this.data.getRawIndex(t);return this.nodes[r]},e.prototype.getNodeById=function(t){return this._nodesMap[kp(t)]},e.prototype.addEdge=function(t,r,n){var i=this._nodesMap,a=this._edgesMap;if(Ct(t)&&(t=this.nodes[t]),Ct(r)&&(r=this.nodes[r]),t instanceof df||(t=i[kp(t)]),r instanceof df||(r=i[kp(r)]),!(!t||!r)){var o=t.id+"-"+r.id,s=new kB(t,r,n);return s.hostGraph=this,this._directed&&(t.outEdges.push(s),r.inEdges.push(s)),t.edges.push(s),t!==r&&r.edges.push(s),this.edges.push(s),a[o]=s,s}},e.prototype.getEdgeByIndex=function(t){var r=this.edgeData.getRawIndex(t);return this.edges[r]},e.prototype.getEdge=function(t,r){t instanceof df&&(t=t.id),r instanceof df&&(r=r.id);var n=this._edgesMap;return this._directed?n[t+"-"+r]:n[t+"-"+r]||n[r+"-"+t]},e.prototype.eachNode=function(t,r){for(var n=this.nodes,i=n.length,a=0;a=0&&t.call(r,n[a],a)},e.prototype.eachEdge=function(t,r){for(var n=this.edges,i=n.length,a=0;a=0&&n[a].node1.dataIndex>=0&&n[a].node2.dataIndex>=0&&t.call(r,n[a],a)},e.prototype.breadthFirstTraverse=function(t,r,n,i){if(r instanceof df||(r=this._nodesMap[kp(r)]),!!r){for(var a=n==="out"?"outEdges":n==="in"?"inEdges":"edges",o=0;o=0&&l.node2.dataIndex>=0});for(var a=0,o=i.length;a=0&&this[e][t].setItemVisual(this.dataIndex,r,n)},getVisual:function(r){return this[e][t].getItemVisual(this.dataIndex,r)},setLayout:function(r,n){this.dataIndex>=0&&this[e][t].setItemLayout(this.dataIndex,r,n)},getLayout:function(){return this[e][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[e][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[e][t].getRawIndex(this.dataIndex)}}}ie(df,OB("hostGraph","data"));ie(kB,OB("hostGraph","edgeData"));var zB=Uct;function sm(e,t,r,n,i){for(var a=new zB(n),o=0;o "+p)),u++)}var h=r.get("coordinateSystem"),d;if(h==="cartesian2d"||h==="polar")d=Tr(e,r);else{var m=Ko.get(h),v=m?m.dimensions||[]:[];gt(v,"value")<0&&v.concat(["value"]);var g=va(e,{coordDimensions:v,encodeDefine:r.getEncode()}).dimensions;d=new Ne(g,r),d.initData(e)}var y=new Ne(["value"],r);return y.initData(l,s),i&&i(d,y),k1({mainData:d,struct:a,structAttr:"graph",datas:{node:d,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a}var Vct=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.hasSymbolVisual=!0,r}return t.prototype.init=function(r){e.prototype.init.apply(this,arguments);var n=this;function i(){return n._categoriesData}this.legendVisualProvider=new oo(i,i),this.fillDataTextStyle(r.edges||r.links),this._updateCategoriesData()},t.prototype.mergeOption=function(r){e.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(r.edges||r.links),this._updateCategoriesData()},t.prototype.mergeDefaultAndTheme=function(r){e.prototype.mergeDefaultAndTheme.apply(this,arguments),ni(r,"edgeLabel",["show"])},t.prototype.getInitialData=function(r,n){var i=r.edges||r.links||[],a=r.data||r.nodes||[],o=this;if(a&&i){xB(this);var s=sm(a,i,this,!0,l);return D(s.edges,function(u){_B(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,f){u.wrapMethod("getItemModel",function(d){var m=o._categoriesModels,v=d.getShallow("category"),g=m[v];return g&&(g.parentModel=d.parentModel,d.parentModel=g),d});var c=Ht.prototype.getModel;function p(d,m){var v=c.call(this,d,m);return v.resolveParentPath=h,v}f.wrapMethod("getItemModel",function(d){return d.resolveParentPath=h,d.getModel=p,d});function h(d){if(d&&(d[0]==="label"||d[1]==="label")){var m=d.slice();return d[0]==="label"?m[0]="edgeLabel":d[1]==="label"&&(m[1]="edgeLabel"),m}return d}}},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.getCategoriesData=function(){return this._categoriesData},t.prototype.formatTooltip=function(r,n,i){if(i==="edge"){var a=this.getData(),o=this.getDataParams(r,i),s=a.graph.getEdgeByIndex(r),l=a.getName(s.node1.dataIndex),u=a.getName(s.node2.dataIndex),f=[];return l!=null&&f.push(l),u!=null&&f.push(u),xe("nameValue",{name:f.join(" > "),value:o.value,noValue:o.value==null})}var c=fx({series:this,dataIndex:r,multipleSeries:n});return c},t.prototype._updateCategoriesData=function(){var r=F(this.option.categories||[],function(i){return i.value!=null?i:V({value:0},i)}),n=new Ne(["value"],this);n.initData(r),this._categoriesData=n,this._categoriesModels=n.mapArray(function(i){return n.getItemModel(i)})},t.prototype.setZoom=function(r){this.option.zoom=r},t.prototype.setCenter=function(r){this.option.center=r},t.prototype.isAnimationEnabled=function(){return e.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},t.type="series.graph",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},t}(Wt),UB=Vct;var Bct={type:"graphRoam",event:"graphRoam",update:"none"};function _D(e){e.registerChartView(NB),e.registerSeriesModel(UB),e.registerProcessor(tD),e.registerVisual(eD),e.registerVisual(rD),e.registerLayout(aD),e.registerLayout(e.PRIORITY.VISUAL.POST_CHART_LAYOUT,lD),e.registerLayout(uD),e.registerCoordinateSystem("graphView",{dimensions:es.dimensions,create:fD}),e.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},ce),e.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},ce),e.registerAction(Bct,function(t,r,n){r.eachComponent({mainType:"series",query:t},function(i){var a=i.coordinateSystem,o=Mp(a,t,void 0,n);i.setCenter&&i.setCenter(o.center),i.setZoom&&i.setZoom(o.zoom)})})}var Fct=function(){function e(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return e}(),Gct=function(e){N(t,e);function t(r){var n=e.call(this,r)||this;return n.type="pointer",n}return t.prototype.getDefaultShape=function(){return new Fct},t.prototype.buildPath=function(r,n){var i=Math.cos,a=Math.sin,o=n.r,s=n.width,l=n.angle,u=n.x-i(l)*s*(s>=o/3?1:2),f=n.y-a(l)*s*(s>=o/3?1:2);l=n.angle-Math.PI/2,r.moveTo(u,f),r.lineTo(n.x+i(l)*s,n.y+a(l)*s),r.lineTo(n.x+i(n.angle)*o,n.y+a(n.angle)*o),r.lineTo(n.x-i(l)*s,n.y-a(l)*s),r.lineTo(u,f)},t}(vt),VB=Gct;function Hct(e,t){var r=e.get("center"),n=t.getWidth(),i=t.getHeight(),a=Math.min(n,i),o=q(r[0],t.getWidth()),s=q(r[1],t.getHeight()),l=q(e.get("radius"),a/2);return{cx:o,cy:s,r:l}}function W1(e,t){var r=e==null?"":e+"";return t&&(H(t)?r=t.replace("{value}",r):j(t)&&(r=t(e))),r}var Wct=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){this.group.removeAll();var a=r.get(["axisLine","lineStyle","color"]),o=Hct(r,i);this._renderMain(r,n,i,a,o),this._data=r.getData()},t.prototype.dispose=function(){},t.prototype._renderMain=function(r,n,i,a,o){var s=this.group,l=r.get("clockwise"),u=-r.get("startAngle")/180*Math.PI,f=-r.get("endAngle")/180*Math.PI,c=r.getModel("axisLine"),p=c.get("roundCap"),h=p?bp:Ye,d=c.get("show"),m=c.getModel("lineStyle"),v=m.get("width"),g=[u,f];uT(g,!l),u=g[0],f=g[1];for(var y=f-u,x=u,_=[],S=0;d&&S=M&&(C===0?0:a[C-1][0])Math.PI/2&&(tt+=Math.PI)):et==="tangential"?tt=-T-Math.PI/2:Ct(et)&&(tt=et*Math.PI/180),tt===0?c.add(new Lt({style:Qt(x,{text:z,x:G,y:Y,verticalAlign:E<-.8?"top":E>.8?"bottom":"middle",align:I<-.4?"left":I>.4?"right":"center"},{inheritColor:U}),silent:!0})):c.add(new Lt({style:Qt(x,{text:z,x:G,y:Y,verticalAlign:"middle",align:"center"},{inheritColor:U}),silent:!0,originX:G,originY:Y,rotation:tt}))}if(y.get("show")&&R!==_){var k=y.get("distance");k=k?k+f:f;for(var lt=0;lt<=S;lt++){I=Math.cos(T),E=Math.sin(T);var Mt=new De({shape:{x1:I*(d-k)+p,y1:E*(d-k)+h,x2:I*(d-w-k)+p,y2:E*(d-w-k)+h},silent:!0,style:P});P.stroke==="auto"&&Mt.setStyle({stroke:a((R+lt/S)/_)}),c.add(Mt),T+=C}T-=C}else T+=M}},t.prototype._renderPointer=function(r,n,i,a,o,s,l,u,f){var c=this.group,p=this._data,h=this._progressEls,d=[],m=r.get(["pointer","show"]),v=r.getModel("progress"),g=v.get("show"),y=r.getData(),x=y.mapDimension("value"),_=+r.get("min"),S=+r.get("max"),b=[_,S],w=[s,l];function T(C,A){var P=y.getItemModel(C),L=P.getModel("pointer"),I=q(L.get("width"),o.r),E=q(L.get("length"),o.r),R=r.get(["pointer","icon"]),k=L.get("offsetCenter"),O=q(k[0],o.r),z=q(k[1],o.r),U=L.get("keepAspect"),G;return R?G=ne(R,O-I/2,z-E,I,E,null,U):G=new VB({shape:{angle:-Math.PI/2,width:I,r:E,x:O,y:z}}),G.rotation=-(A+Math.PI/2),G.x=o.cx,G.y=o.cy,G}function M(C,A){var P=v.get("roundCap"),L=P?bp:Ye,I=v.get("overlap"),E=I?v.get("width"):f/y.count(),R=I?o.r-E:o.r-(C+1)*E,k=I?o.r:o.r-C*E,O=new L({shape:{startAngle:s,endAngle:A,cx:o.cx,cy:o.cy,clockwise:u,r0:R,r:k}});return I&&(O.z2=S-y.get(x,C)%S),O}(g||m)&&(y.diff(p).add(function(C){var A=y.get(x,C);if(m){var P=T(C,s);Kt(P,{rotation:-((isNaN(+A)?w[0]:$t(A,b,w,!0))+Math.PI/2)},r),c.add(P),y.setItemGraphicEl(C,P)}if(g){var L=M(C,s),I=v.get("clip");Kt(L,{shape:{endAngle:$t(A,b,w,I)}},r),c.add(L),Bd(r.seriesIndex,y.dataType,C,L),d[C]=L}}).update(function(C,A){var P=y.get(x,C);if(m){var L=p.getItemGraphicEl(A),I=L?L.rotation:s,E=T(C,I);E.rotation=I,Rt(E,{rotation:-((isNaN(+P)?w[0]:$t(P,b,w,!0))+Math.PI/2)},r),c.add(E),y.setItemGraphicEl(C,E)}if(g){var R=h[A],k=R?R.shape.endAngle:s,O=M(C,k),z=v.get("clip");Rt(O,{shape:{endAngle:$t(P,b,w,z)}},r),c.add(O),Bd(r.seriesIndex,y.dataType,C,O),d[C]=O}}).execute(),y.each(function(C){var A=y.getItemModel(C),P=A.getModel("emphasis"),L=P.get("focus"),I=P.get("blurScope"),E=P.get("disabled");if(m){var R=y.getItemGraphicEl(C),k=y.getItemVisual(C,"style"),O=k.fill;if(R instanceof me){var z=R.style;R.useStyle(V({image:z.image,x:z.x,y:z.y,width:z.width,height:z.height},k))}else R.useStyle(k),R.type!=="pointer"&&R.setColor(O);R.setStyle(A.getModel(["pointer","itemStyle"]).getItemStyle()),R.style.fill==="auto"&&R.setStyle("fill",a($t(y.get(x,C),b,[0,1],!0))),R.z2EmphasisLift=0,we(R,A),Zt(R,L,I,E)}if(g){var U=d[C];U.useStyle(y.getItemVisual(C,"style")),U.setStyle(A.getModel(["progress","itemStyle"]).getItemStyle()),U.z2EmphasisLift=0,we(U,A),Zt(U,L,I,E)}}),this._progressEls=d)},t.prototype._renderAnchor=function(r,n){var i=r.getModel("anchor"),a=i.get("show");if(a){var o=i.get("size"),s=i.get("icon"),l=i.get("offsetCenter"),u=i.get("keepAspect"),f=ne(s,n.cx-o/2+q(l[0],n.r),n.cy-o/2+q(l[1],n.r),o,o,null,u);f.z2=i.get("showAbove")?1:0,f.setStyle(i.getModel("itemStyle").getItemStyle()),this.group.add(f)}},t.prototype._renderTitleAndDetail=function(r,n,i,a,o){var s=this,l=r.getData(),u=l.mapDimension("value"),f=+r.get("min"),c=+r.get("max"),p=new nt,h=[],d=[],m=r.isAnimationEnabled(),v=r.get(["pointer","showAbove"]);l.diff(this._data).add(function(g){h[g]=new Lt({silent:!0}),d[g]=new Lt({silent:!0})}).update(function(g,y){h[g]=s._titleEls[y],d[g]=s._detailEls[y]}).execute(),l.each(function(g){var y=l.getItemModel(g),x=l.get(u,g),_=new nt,S=a($t(x,[f,c],[0,1],!0)),b=y.getModel("title");if(b.get("show")){var w=b.get("offsetCenter"),T=o.cx+q(w[0],o.r),M=o.cy+q(w[1],o.r),C=h[g];C.attr({z2:v?0:2,style:Qt(b,{x:T,y:M,text:l.getName(g),align:"center",verticalAlign:"middle"},{inheritColor:S})}),_.add(C)}var A=y.getModel("detail");if(A.get("show")){var P=A.get("offsetCenter"),L=o.cx+q(P[0],o.r),I=o.cy+q(P[1],o.r),E=q(A.get("width"),o.r),R=q(A.get("height"),o.r),k=r.get(["progress","show"])?l.getItemVisual(g,"style").fill:S,C=d[g],O=A.get("formatter");C.attr({z2:v?0:2,style:Qt(A,{x:L,y:I,text:W1(x,O),width:isNaN(E)?null:E,height:isNaN(R)?null:R,align:"center",verticalAlign:"middle"},{inheritColor:k})}),P0(C,{normal:A},x,function(U){return W1(U,O)}),m&&R0(C,g,l,r,{getFormattedLabel:function(U,G,Y,et,tt,lt){return W1(lt?lt.interpolatedValue:x,O)}}),_.add(C)}p.add(_)}),this.group.add(p),this._titleEls=h,this._detailEls=d},t.type="gauge",t}(Vt),BB=Wct;var Yct=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.visualStyleAccessPath="itemStyle",r}return t.prototype.getInitialData=function(r,n){return fi(this,["value"])},t.type="series.gauge",t.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},t}(Wt),FB=Yct;function bD(e){e.registerChartView(BB),e.registerSeriesModel(FB)}var Xct=["itemStyle","opacity"],qct=function(e){N(t,e);function t(r,n){var i=e.call(this)||this,a=i,o=new Ie,s=new Lt;return a.setTextContent(s),i.setTextGuideLine(o),i.updateData(r,n,!0),i}return t.prototype.updateData=function(r,n,i){var a=this,o=r.hostModel,s=r.getItemModel(n),l=r.getItemLayout(n),u=s.getModel("emphasis"),f=s.get(Xct);f=f??1,i||er(a),a.useStyle(r.getItemVisual(n,"style")),a.style.lineJoin="round",i?(a.setShape({points:l.points}),a.style.opacity=0,Kt(a,{style:{opacity:f}},o,n)):Rt(a,{style:{opacity:f},shape:{points:l.points}},o,n),we(a,s),this._updateLabel(r,n),Zt(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(r,n){var i=this,a=this.getTextGuideLine(),o=i.getTextContent(),s=r.hostModel,l=r.getItemModel(n),u=r.getItemLayout(n),f=u.label,c=r.getItemVisual(n,"style"),p=c.fill;he(o,ae(l),{labelFetcher:r.hostModel,labelDataIndex:n,defaultOpacity:c.opacity,defaultText:r.getName(n)},{normal:{align:f.textAlign,verticalAlign:f.verticalAlign}}),i.setTextConfig({local:!0,inside:!!f.inside,insideStroke:p,outsideFill:p});var h=f.linePoints;a.setShape({points:h}),i.textGuideLineConfig={anchor:h?new kt(h[0][0],h[0][1]):null},Rt(o,{style:{x:f.x,y:f.y}},s,n),o.attr({rotation:f.rotation,originX:f.x,originY:f.y,z2:10}),gp(i,yp(l),{stroke:p})},t}(Re),Zct=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.ignoreLabelLineUpdate=!0,r}return t.prototype.render=function(r,n,i){var a=r.getData(),o=this._data,s=this.group;a.diff(o).add(function(l){var u=new qct(a,l);a.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var f=o.getItemGraphicEl(u);f.updateData(a,l),s.add(f),a.setItemGraphicEl(l,f)}).remove(function(l){var u=o.getItemGraphicEl(l);Go(u,r,l)}).execute(),this._data=a},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.prototype.dispose=function(){},t.type="funnel",t}(Vt),GB=Zct;var Kct=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new oo(Z(this.getData,this),Z(this.getRawData,this)),this._defaultLabelLine(r)},t.prototype.getInitialData=function(r,n){return fi(this,{coordDimensions:["value"],encodeDefaulter:pt(op,this)})},t.prototype._defaultLabelLine=function(r){ni(r,"labelLine",["show"]);var n=r.labelLine,i=r.emphasis.labelLine;n.show=n.show&&r.label.show,i.show=i.show&&r.emphasis.label.show},t.prototype.getDataParams=function(r){var n=this.getData(),i=e.prototype.getDataParams.call(this,r),a=n.mapDimension("value"),o=n.getSum(a);return i.percent=o?+(n.get(a,r)/o*100).toFixed(2):0,i.$vars.push("percent"),i},t.type="series.funnel",t.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},t}(Wt),HB=Kct;function $ct(e,t){return re(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function jct(e,t){for(var r=e.mapDimension("value"),n=e.mapArray(r,function(l){return l}),i=[],a=t==="ascending",o=0,s=e.count();ofpt)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]);i.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(e){if(!(this._mouseDownPoint||!AD(this,"mousemove"))){var t=this._model,r=t.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]),n=r.behavior;n==="jump"&&this._throttledDispatchExpand.debounceNextCall(t.get("axisExpandDebounce")),this._throttledDispatchExpand(n==="none"?null:{axisExpandWindow:r.axisExpandWindow,animation:n==="jump"?null:{duration:0}})}}};function AD(e,t){var r=e._model;return r.get("axisExpandable")&&r.get("axisExpandTriggerOn")===t}var $B=cpt;var hpt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(){e.prototype.init.apply(this,arguments),this.mergeOption({})},t.prototype.mergeOption=function(r){var n=this.option;r&&_t(n,r,!0),this._initDimensions()},t.prototype.contains=function(r,n){var i=r.get("parallelIndex");return i!=null&&n.getComponent("parallel",i)===this},t.prototype.setAxisExpand=function(r){D(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(n){r.hasOwnProperty(n)&&(this.option[n]=r[n])},this)},t.prototype._initDimensions=function(){var r=this.dimensions=[],n=this.parallelAxisIndex=[],i=Ut(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(a){return(a.get("parallelIndex")||0)===this.componentIndex},this);D(i,function(a){r.push("dim"+a.get("dim")),n.push(a.componentIndex)})},t.type="parallel",t.dependencies=["parallelAxis"],t.layoutMode="box",t.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},t}(Pt),jB=hpt;var dpt=function(e){N(t,e);function t(r,n,i,a,o){var s=e.call(this,r,n,i)||this;return s.type=a||"value",s.axisIndex=o,s}return t.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},t}(Mr),QB=dpt;function Hn(e,t,r,n,i,a){e=e||0;var o=r[1]-r[0];if(i!=null&&(i=Op(i,[0,o])),a!=null&&(a=Math.max(a,i??0)),n==="all"){var s=Math.abs(t[1]-t[0]);s=Op(s,[0,o]),i=a=Op(s,[i,a]),n=0}t[0]=Op(t[0],r),t[1]=Op(t[1],r);var l=CD(t,n);t[n]+=e;var u=i||0,f=r.slice();l.sign<0?f[0]+=u:f[1]-=u,t[n]=Op(t[n],f);var c;return c=CD(t,n),i!=null&&(c.sign!==l.sign||c.spana&&(t[1-n]=t[n]+c.sign*a),t}function CD(e,t){var r=e[t]-e[1-t];return{span:Math.abs(r),sign:r>0?-1:r<0?1:t?-1:1}}function Op(e,t){return Math.min(t[1]!=null?t[1]:1/0,Math.max(t[0]!=null?t[0]:-1/0,e))}var DD=D,e7=Math.min,r7=Math.max,JB=Math.floor,vpt=Math.ceil,t7=pe,mpt=Math.PI,gpt=function(){function e(t,r,n){this.type="parallel",this._axesMap=$(),this._axesLayout={},this.dimensions=t.dimensions,this._model=t,this._init(t,r,n)}return e.prototype._init=function(t,r,n){var i=t.dimensions,a=t.parallelAxisIndex;DD(i,function(o,s){var l=a[s],u=r.getComponent("parallelAxis",l),f=this._axesMap.set(o,new QB(o,ol(u),[0,0],u.get("type"),l)),c=f.type==="category";f.onBand=c&&u.get("boundaryGap"),f.inverse=u.get("inverse"),u.axis=f,f.model=u,f.coordinateSystem=u.coordinateSystem=this},this)},e.prototype.update=function(t,r){this._updateAxesFromSeries(this._model,t)},e.prototype.containPoint=function(t){var r=this._makeLayoutInfo(),n=r.axisBase,i=r.layoutBase,a=r.pixelDimIndex,o=t[1-a],s=t[a];return o>=n&&o<=n+r.axisLength&&s>=i&&s<=i+r.layoutLength},e.prototype.getModel=function(){return this._model},e.prototype._updateAxesFromSeries=function(t,r){r.eachSeries(function(n){if(t.contains(n,r)){var i=n.getData();DD(this.dimensions,function(a){var o=this._axesMap.get(a);o.scale.unionExtentFromData(i,i.mapDimension(a)),Ja(o.scale,o.model)},this)}},this)},e.prototype.resize=function(t,r){this._rect=re(t.getBoxLayoutParams(),{width:r.getWidth(),height:r.getHeight()}),this._layoutAxes()},e.prototype.getRect=function(){return this._rect},e.prototype._makeLayoutInfo=function(){var t=this._model,r=this._rect,n=["x","y"],i=["width","height"],a=t.get("layout"),o=a==="horizontal"?0:1,s=r[i[o]],l=[0,s],u=this.dimensions.length,f=Y1(t.get("axisExpandWidth"),l),c=Y1(t.get("axisExpandCount")||0,[0,u]),p=t.get("axisExpandable")&&u>3&&u>c&&c>1&&f>0&&s>0,h=t.get("axisExpandWindow"),d;if(h)d=Y1(h[1]-h[0],l),h[1]=h[0]+d;else{d=Y1(f*(c-1),l);var m=t.get("axisExpandCenter")||JB(u/2);h=[f*m-d/2],h[1]=h[0]+d}var v=(s-d)/(u-c);v<3&&(v=0);var g=[JB(t7(h[0]/f,1))+1,vpt(t7(h[1]/f,1))-1],y=v/f*h[0];return{layout:a,pixelDimIndex:o,layoutBase:r[n[o]],layoutLength:s,axisBase:r[n[1-o]],axisLength:r[i[1-o]],axisExpandable:p,axisExpandWidth:f,axisCollapseWidth:v,axisExpandWindow:h,axisCount:u,winInnerIndices:g,axisExpandWindow0Pos:y}},e.prototype._layoutAxes=function(){var t=this._rect,r=this._axesMap,n=this.dimensions,i=this._makeLayoutInfo(),a=i.layout;r.each(function(o){var s=[0,i.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),DD(n,function(o,s){var l=(i.axisExpandable?xpt:ypt)(s,i),u={horizontal:{x:l.position,y:i.axisLength},vertical:{x:0,y:l.position}},f={horizontal:mpt/2,vertical:0},c=[u[a].x+t.x,u[a].y+t.y],p=f[a],h=tr();Cn(h,h,p),Nr(h,h,c),this._axesLayout[o]={position:c,rotation:p,transform:h,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},e.prototype.getAxis=function(t){return this._axesMap.get(t)},e.prototype.dataToPoint=function(t,r){return this.axisCoordToPoint(this._axesMap.get(r).dataToCoord(t),r)},e.prototype.eachActiveState=function(t,r,n,i){n==null&&(n=0),i==null&&(i=t.count());var a=this._axesMap,o=this.dimensions,s=[],l=[];D(o,function(v){s.push(t.mapDimension(v)),l.push(a.get(v).model)});for(var u=this.hasAxisBrushed(),f=n;fa*(1-c[0])?(u="jump",l=s-a*(1-c[2])):(l=s-a*c[1])>=0&&(l=s-a*(1-c[1]))<=0&&(l=0),l*=r.axisExpandWidth/f,l?Hn(l,i,o,"all"):u="none";else{var h=i[1]-i[0],d=o[1]*s/h;i=[r7(0,d-h/2)],i[1]=e7(o[1],i[0]+h),i[0]=i[1]-h}return{axisExpandWindow:i,behavior:u}},e}();function Y1(e,t){return e7(r7(e,t[0]),t[1])}function ypt(e,t){var r=t.layoutLength/(t.axisCount-1);return{position:r*e,axisNameAvailableWidth:r,axisLabelShow:!0}}function xpt(e,t){var r=t.layoutLength,n=t.axisExpandWidth,i=t.axisCount,a=t.axisCollapseWidth,o=t.winInnerIndices,s,l=a,u=!1,f;return e=0;i--)sr(n[i])},t.prototype.getActiveState=function(r){var n=this.activeIntervals;if(!n.length)return"normal";if(r==null||isNaN(+r))return"inactive";if(n.length===1){var i=n[0];if(i[0]<=r&&r<=i[1])return"active"}else for(var a=0,o=n.length;aTpt}function g7(e){var t=e.length-1;return t<0&&(t=0),[e[0],e[t]]}function y7(e,t,r,n){var i=new nt;return i.add(new At({name:"main",style:UD(r),silent:!0,draggable:!0,cursor:"move",drift:pt(l7,e,t,i,["n","s","w","e"]),ondragend:pt(mf,t,{isEnd:!0})})),D(n,function(a){i.add(new At({name:a.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:pt(l7,e,t,i,a),ondragend:pt(mf,t,{isEnd:!0})}))}),i}function x7(e,t,r,n){var i=n.brushStyle.lineWidth||0,a=zp(i,Mpt),o=r[0][0],s=r[1][0],l=o-i/2,u=s-i/2,f=r[0][1],c=r[1][1],p=f-a+i/2,h=c-a+i/2,d=f-o,m=c-s,v=d+i,g=m+i;ns(e,t,"main",o,s,d,m),n.transformable&&(ns(e,t,"w",l,u,a,g),ns(e,t,"e",p,u,a,g),ns(e,t,"n",l,u,v,a),ns(e,t,"s",l,h,v,a),ns(e,t,"nw",l,u,a,a),ns(e,t,"ne",p,u,a,a),ns(e,t,"sw",l,h,a,a),ns(e,t,"se",p,h,a,a))}function LD(e,t){var r=t.__brushOption,n=r.transformable,i=t.childAt(0);i.useStyle(UD(r)),i.attr({silent:!n,cursor:n?"move":"default"}),D([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(a){var o=t.childOfName(a.join("")),s=a.length===1?PD(e,a[0]):Ppt(e,a);o&&o.attr({silent:!n,invisible:!n,cursor:n?Cpt[s]+"-resize":null})})}function ns(e,t,r,n,i,a,o){var s=t.childOfName(r);s&&s.setShape(Npt(VD(e,t,[[n,i],[n+a,i+o]])))}function UD(e){return J({strokeNoScale:!0},e.brushStyle)}function _7(e,t,r,n){var i=[lm(e,r),lm(t,n)],a=[zp(e,r),zp(t,n)];return[[i[0],a[0]],[i[1],a[1]]]}function Lpt(e){return oa(e.group)}function PD(e,t){var r={w:"left",e:"right",n:"top",s:"bottom"},n={left:"w",right:"e",top:"n",bottom:"s"},i=Fu(r[t],Lpt(e));return n[i]}function Ppt(e,t){var r=[PD(e,t[0]),PD(e,t[1])];return(r[0]==="e"||r[0]==="w")&&r.reverse(),r.join("")}function l7(e,t,r,n,i,a){var o=r.__brushOption,s=e.toRectRange(o.range),l=b7(t,i,a);D(n,function(u){var f=Apt[u];s[f[0]][f[1]]+=l[f[0]]}),o.range=e.fromRectRange(_7(s[0][0],s[1][0],s[0][1],s[1][1])),kD(t,r),mf(t,{isEnd:!1})}function Rpt(e,t,r,n){var i=t.__brushOption.range,a=b7(e,r,n);D(i,function(o){o[0]+=a[0],o[1]+=a[1]}),kD(e,t),mf(e,{isEnd:!1})}function b7(e,t,r){var n=e.group,i=n.transformCoordToLocal(t,r),a=n.transformCoordToLocal(0,0);return[i[0]-a[0],i[1]-a[1]]}function VD(e,t,r){var n=m7(e,t);return n&&n!==vf?n.clipPath(r,e._transform):at(r)}function Npt(e){var t=lm(e[0][0],e[1][0]),r=lm(e[0][1],e[1][1]),n=zp(e[0][0],e[1][0]),i=zp(e[0][1],e[1][1]);return{x:t,y:r,width:n-t,height:i-r}}function kpt(e,t,r){if(!(!e._brushType||zpt(e,t.offsetX,t.offsetY))){var n=e._zr,i=e._covers,a=zD(e,t,r);if(!e._dragging)for(var o=0;on.getWidth()||r<0||r>n.getHeight()}var X1={lineX:c7(0),lineY:c7(1),rect:{createCover:function(e,t){function r(n){return n}return y7({toRectRange:r,fromRectRange:r},e,t,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(e){var t=g7(e);return _7(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(e,t,r,n){x7(e,t,r,n)},updateCommon:LD,contain:ND},polygon:{createCover:function(e,t){var r=new nt;return r.add(new Ie({name:"main",style:UD(t),silent:!0})),r},getCreatingRange:function(e){return e},endCreating:function(e,t){t.remove(t.childAt(0)),t.add(new Re({name:"main",draggable:!0,drift:pt(Rpt,e,t),ondragend:pt(mf,e,{isEnd:!0})}))},updateCoverShape:function(e,t,r,n){t.childAt(0).setShape({points:VD(e,t,r)})},updateCommon:LD,contain:ND}};function c7(e){return{createCover:function(t,r){return y7({toRectRange:function(n){var i=[n,[0,100]];return e&&i.reverse(),i},fromRectRange:function(n){return n[e]}},t,r,[[["w"],["e"]],[["n"],["s"]]][e])},getCreatingRange:function(t){var r=g7(t),n=lm(r[0][e],r[1][e]),i=zp(r[0][e],r[1][e]);return[n,i]},updateCoverShape:function(t,r,n,i){var a,o=m7(t,r);if(o!==vf&&o.getLinearBrushOtherExtent)a=o.getLinearBrushOtherExtent(e);else{var s=t._zr;a=[0,[s.getWidth(),s.getHeight()][1-e]]}var l=[n,a];e&&l.reverse(),x7(t,r,l,i)},updateCommon:LD,contain:ND}}var Up=Ept;function q1(e){return e=BD(e),function(t){return PT(t,e)}}function Z1(e,t){return e=BD(e),function(r){var n=t??r,i=n?e.width:e.height,a=n?e.x:e.y;return[a,a+(i||0)]}}function K1(e,t,r){var n=BD(e);return function(i,a){return n.contain(a[0],a[1])&&!hl(i,t,r)}}function BD(e){return dt.create(e)}var Upt=["axisLine","axisTickLabel","axisName"],Vpt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r,n){e.prototype.init.apply(this,arguments),(this._brushController=new Up(n.getZr())).on("brush",Z(this._onBrush,this))},t.prototype.render=function(r,n,i,a){if(!Bpt(r,n,a)){this.axisModel=r,this.api=i,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new nt,this.group.add(this._axisGroup),!!r.get("show")){var s=Gpt(r,n),l=s.coordinateSystem,u=r.getAreaSelectStyle(),f=u.width,c=r.axis.dim,p=l.getAxisLayout(c),h=V({strokeContainThreshold:f},p),d=new Br(r,h);D(Upt,d.add,d),this._axisGroup.add(d.getGroup()),this._refreshBrushController(h,u,r,s,f,i),Wo(o,this._axisGroup,r)}}},t.prototype._refreshBrushController=function(r,n,i,a,o,s){var l=i.axis.getExtent(),u=l[1]-l[0],f=Math.min(30,Math.abs(u)*.1),c=dt.create({x:l[0],y:-o/2,width:u,height:o});c.x-=f,c.width+=2*f,this._brushController.mount({enableGlobalPan:!0,rotation:r.rotation,x:r.position[0],y:r.position[1]}).setPanels([{panelId:"pl",clipPath:q1(c),isTargetByCursor:K1(c,s,a),getLinearBrushOtherExtent:Z1(c,0)}]).enableBrush({brushType:"lineX",brushStyle:n,removeOnClick:!0}).updateCovers(Fpt(i))},t.prototype._onBrush=function(r){var n=r.areas,i=this.axisModel,a=i.axis,o=F(n,function(s){return[a.coordToData(s.range[0],!0),a.coordToData(s.range[1],!0)]});(!i.option.realtime===r.isEnd||r.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:i.id,intervals:o})},t.prototype.dispose=function(){this._brushController.dispose()},t.type="parallelAxis",t}(Xt);function Bpt(e,t,r){return r&&r.type==="axisAreaSelect"&&t.findComponents({mainType:"parallelAxis",query:r})[0]===e}function Fpt(e){var t=e.axis;return F(e.activeIntervals,function(r){return{brushType:"lineX",panelId:"pl",range:[t.dataToCoord(r[0],!0),t.dataToCoord(r[1],!0)]}})}function Gpt(e,t){return t.getComponent("parallel",e.get("parallelIndex"))}var T7=Vpt;var Hpt={type:"axisAreaSelect",event:"axisAreaSelected"};function M7(e){e.registerAction(Hpt,function(t,r){r.eachComponent({mainType:"parallelAxis",query:t},function(n){n.axis.model.setActiveIntervals(t.intervals)})}),e.registerAction("parallelAxisExpand",function(t,r){r.eachComponent({mainType:"parallel",query:t},function(n){n.setAxisExpand(t)})})}var Wpt={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function um(e){e.registerComponentView($B),e.registerComponentModel(jB),e.registerCoordinateSystem("parallel",i7),e.registerPreprocessor(MD),e.registerComponentModel(ED),e.registerComponentView(T7),Sa(e,"parallel",ED,Wpt),M7(e)}function FD(e){Nt(um),e.registerChartView(qB),e.registerSeriesModel(ZB),e.registerVisual(e.PRIORITY.VISUAL.BRUSH,KB)}var Ypt=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return e}(),Xpt=function(e){N(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new Ypt},t.prototype.buildPath=function(r,n){var i=n.extent;r.moveTo(n.x1,n.y1),r.bezierCurveTo(n.cpx1,n.cpy1,n.cpx2,n.cpy2,n.x2,n.y2),n.orient==="vertical"?(r.lineTo(n.x2+i,n.y2),r.bezierCurveTo(n.cpx2+i,n.cpy2,n.cpx1+i,n.cpy1,n.x1+i,n.y1)):(r.lineTo(n.x2,n.y2+i),r.bezierCurveTo(n.cpx2,n.cpy2+i,n.cpx1,n.cpy1+i,n.x1,n.y1+i)),r.closePath()},t.prototype.highlight=function(){Yr(this)},t.prototype.downplay=function(){Xr(this)},t}(vt),qpt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._focusAdjacencyDisabled=!1,r}return t.prototype.render=function(r,n,i){var a=this,o=r.getGraph(),s=this.group,l=r.layoutInfo,u=l.width,f=l.height,c=r.getData(),p=r.getData("edge"),h=r.get("orient");this._model=r,s.removeAll(),s.x=l.x,s.y=l.y,o.eachEdge(function(d){var m=new Xpt,v=ht(m);v.dataIndex=d.dataIndex,v.seriesIndex=r.seriesIndex,v.dataType="edge";var g=d.getModel(),y=g.getModel("lineStyle"),x=y.get("curveness"),_=d.node1.getLayout(),S=d.node1.getModel(),b=S.get("localX"),w=S.get("localY"),T=d.node2.getLayout(),M=d.node2.getModel(),C=M.get("localX"),A=M.get("localY"),P=d.getLayout(),L,I,E,R,k,O,z,U;m.shape.extent=Math.max(1,P.dy),m.shape.orient=h,h==="vertical"?(L=(b!=null?b*u:_.x)+P.sy,I=(w!=null?w*f:_.y)+_.dy,E=(C!=null?C*u:T.x)+P.ty,R=A!=null?A*f:T.y,k=L,O=I*(1-x)+R*x,z=E,U=I*x+R*(1-x)):(L=(b!=null?b*u:_.x)+_.dx,I=(w!=null?w*f:_.y)+P.sy,E=C!=null?C*u:T.x,R=(A!=null?A*f:T.y)+P.ty,k=L*(1-x)+E*x,O=I,z=L*x+E*(1-x),U=R),m.setShape({x1:L,y1:I,x2:E,y2:R,cpx1:k,cpy1:O,cpx2:z,cpy2:U}),m.useStyle(y.getItemStyle()),A7(m.style,h,d);var G=""+g.get("value"),Y=ae(g,"edgeLabel");he(m,Y,{labelFetcher:{getFormattedLabel:function(lt,Mt,ut,ct,K,ot){return r.getFormattedLabel(lt,Mt,"edge",ct,cr(K,Y.normal&&Y.normal.get("formatter"),G),ot)}},labelDataIndex:d.dataIndex,defaultText:G}),m.setTextConfig({position:"inside"});var et=g.getModel("emphasis");we(m,g,"lineStyle",function(lt){var Mt=lt.getItemStyle();return A7(Mt,h,d),Mt}),s.add(m),p.setItemGraphicEl(d.dataIndex,m);var tt=et.get("focus");Zt(m,tt==="adjacency"?d.getAdjacentDataIndices():tt==="trajectory"?d.getTrajectoryDataIndices():tt,et.get("blurScope"),et.get("disabled"))}),o.eachNode(function(d){var m=d.getLayout(),v=d.getModel(),g=v.get("localX"),y=v.get("localY"),x=v.getModel("emphasis"),_=new At({shape:{x:g!=null?g*u:m.x,y:y!=null?y*f:m.y,width:m.dx,height:m.dy},style:v.getModel("itemStyle").getItemStyle(),z2:10});he(_,ae(v),{labelFetcher:{getFormattedLabel:function(b,w){return r.getFormattedLabel(b,w,"node")}},labelDataIndex:d.dataIndex,defaultText:d.id}),_.disableLabelAnimation=!0,_.setStyle("fill",d.getVisual("color")),_.setStyle("decal",d.getVisual("style").decal),we(_,v),s.add(_),c.setItemGraphicEl(d.dataIndex,_),ht(_).dataType="node";var S=x.get("focus");Zt(_,S==="adjacency"?d.getAdjacentDataIndices():S==="trajectory"?d.getTrajectoryDataIndices():S,x.get("blurScope"),x.get("disabled"))}),c.eachItemGraphicEl(function(d,m){var v=c.getItemModel(m);v.get("draggable")&&(d.drift=function(g,y){a._focusAdjacencyDisabled=!0,this.shape.x+=g,this.shape.y+=y,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:r.id,dataIndex:c.getRawIndex(m),localX:this.shape.x/u,localY:this.shape.y/f})},d.ondragend=function(){a._focusAdjacencyDisabled=!1},d.draggable=!0,d.cursor="move")}),!this._data&&r.isAnimationEnabled()&&s.setClipPath(Zpt(s.getBoundingRect(),r,function(){s.removeClipPath()})),this._data=r.getData()},t.prototype.dispose=function(){},t.type="sankey",t}(Vt);function A7(e,t,r){switch(e.fill){case"source":e.fill=r.node1.getVisual("color"),e.decal=r.node1.getVisual("style").decal;break;case"target":e.fill=r.node2.getVisual("color"),e.decal=r.node2.getVisual("style").decal;break;case"gradient":var n=r.node1.getVisual("color"),i=r.node2.getVisual("color");H(n)&&H(i)&&(e.fill=new $a(0,0,+(t==="horizontal"),+(t==="vertical"),[{color:n,offset:0},{color:i,offset:1}]))}}function Zpt(e,t,r){var n=new At({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return Kt(n,{shape:{width:e.width+20}},t,r),n}var C7=qpt;var Kpt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.getInitialData=function(r,n){var i=r.edges||r.links,a=r.data||r.nodes,o=r.levels;this.levelModels=[];for(var s=this.levelModels,l=0;l=0&&(s[o[l].depth]=new Ht(o[l],this,n));if(a&&i){var u=sm(a,i,this,!0,f);return u.data}function f(c,p){c.wrapMethod("getItemModel",function(h,d){var m=h.parentModel,v=m.getData().getItemLayout(d);if(v){var g=v.depth,y=m.levelModels[g];y&&(h.parentModel=y)}return h}),p.wrapMethod("getItemModel",function(h,d){var m=h.parentModel,v=m.getGraph().getEdgeByIndex(d),g=v.node1.getLayout();if(g){var y=g.depth,x=m.levelModels[y];x&&(h.parentModel=x)}return h})}},t.prototype.setNodePosition=function(r,n){var i=this.option.data||this.option.nodes,a=i[r];a.localX=n[0],a.localY=n[1]},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.formatTooltip=function(r,n,i){function a(h){return isNaN(h)||h==null}if(i==="edge"){var o=this.getDataParams(r,i),s=o.data,l=o.value,u=s.source+" -- "+s.target;return xe("nameValue",{name:u,value:l,noValue:a(l)})}else{var f=this.getGraph().getNodeByIndex(r),c=f.getLayout().value,p=this.getDataParams(r,i).data.name;return xe("nameValue",{name:p!=null?p+"":null,value:c,noValue:a(c)})}},t.prototype.optionUpdated=function(){},t.prototype.getDataParams=function(r,n){var i=e.prototype.getDataParams.call(this,r,n);if(i.value==null&&n==="node"){var a=this.getGraph().getNodeByIndex(r),o=a.getLayout().value;i.value=o}return i},t.type="series.sankey",t.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},t}(Wt),D7=Kpt;function HD(e,t){e.eachSeriesByType("sankey",function(r){var n=r.get("nodeWidth"),i=r.get("nodeGap"),a=$pt(r,t);r.layoutInfo=a;var o=a.width,s=a.height,l=r.getGraph(),u=l.nodes,f=l.edges;Qpt(u);var c=Ut(u,function(m){return m.getLayout().value===0}),p=c.length!==0?0:r.get("layoutIterations"),h=r.get("orient"),d=r.get("nodeAlign");jpt(u,f,n,i,o,s,p,h,d)})}function $pt(e,t){return re(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function jpt(e,t,r,n,i,a,o,s,l){Jpt(e,t,r,i,a,s,l),nht(e,t,a,i,n,o,s),pht(e,s)}function Qpt(e){D(e,function(t){var r=ml(t.outEdges,$1),n=ml(t.inEdges,$1),i=t.getValue()||0,a=Math.max(r,n,i);t.setLayout({value:a},!0)})}function Jpt(e,t,r,n,i,a,o){for(var s=[],l=[],u=[],f=[],c=0,p=0;p=0;g&&v.depth>h&&(h=v.depth),m.setLayout({depth:g?v.depth:c},!0),a==="vertical"?m.setLayout({dy:r},!0):m.setLayout({dx:r},!0);for(var y=0;yc-1?h:c-1;o&&o!=="left"&&tht(e,o,a,w);var T=a==="vertical"?(i-r)/w:(n-r)/w;rht(e,T,a)}function E7(e){var t=e.hostGraph.data.getRawDataItem(e.dataIndex);return t.depth!=null&&t.depth>=0}function tht(e,t,r,n){if(t==="right"){for(var i=[],a=e,o=0;a.length;){for(var s=0;s0;a--)l*=.99,oht(s,l,o),GD(s,i,r,n,o),cht(s,l,o),GD(s,i,r,n,o)}function iht(e,t){var r=[],n=t==="vertical"?"y":"x",i=Od(e,function(a){return a.getLayout()[n]});return i.keys.sort(function(a,o){return a-o}),D(i.keys,function(a){r.push(i.buckets.get(a))}),r}function aht(e,t,r,n,i,a){var o=1/0;D(e,function(s){var l=s.length,u=0;D(s,function(c){u+=c.getLayout().value});var f=a==="vertical"?(n-(l-1)*i)/u:(r-(l-1)*i)/u;f0&&(s=l.getLayout()[a]+u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),f=l.getLayout()[a]+l.getLayout()[p]+t;var d=i==="vertical"?n:r;if(u=f-t-d,u>0){s=l.getLayout()[a]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),f=s;for(var h=c-2;h>=0;--h)l=o[h],u=l.getLayout()[a]+l.getLayout()[p]+t-f,u>0&&(s=l.getLayout()[a]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),f=l.getLayout()[a]}})}function oht(e,t,r){D(e.slice().reverse(),function(n){D(n,function(i){if(i.outEdges.length){var a=ml(i.outEdges,sht,r)/ml(i.outEdges,$1);if(isNaN(a)){var o=i.outEdges.length;a=o?ml(i.outEdges,lht,r)/o:0}if(r==="vertical"){var s=i.getLayout().x+(a-gl(i,r))*t;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(a-gl(i,r))*t;i.setLayout({y:l},!0)}}})})}function sht(e,t){return gl(e.node2,t)*e.getValue()}function lht(e,t){return gl(e.node2,t)}function uht(e,t){return gl(e.node1,t)*e.getValue()}function fht(e,t){return gl(e.node1,t)}function gl(e,t){return t==="vertical"?e.getLayout().x+e.getLayout().dx/2:e.getLayout().y+e.getLayout().dy/2}function $1(e){return e.getValue()}function ml(e,t,r){for(var n=0,i=e.length,a=-1;++ao&&(o=l)}),D(n,function(s){var l=new Be({type:"color",mappingMethod:"linear",dataExtent:[a,o],visual:t.get("color")}),u=l.mapValueToVisual(s.getLayout().value),f=s.getModel().get(["itemStyle","color"]);f!=null?(s.setVisual("color",f),s.setVisual("style",{fill:f})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}i.length&&D(i,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function YD(e){e.registerChartView(C7),e.registerSeriesModel(D7),e.registerLayout(HD),e.registerVisual(WD),e.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(t,r){r.eachComponent({mainType:"series",subType:"sankey",query:t},function(n){n.setNodePosition(t.dataIndex,[t.localX,t.localY])})})}var j1=function(){function e(){}return e.prototype.getInitialData=function(t,r){var n,i=r.getComponent("xAxis",this.get("xAxisIndex")),a=r.getComponent("yAxis",this.get("yAxisIndex")),o=i.get("type"),s=a.get("type"),l;o==="category"?(t.layout="horizontal",n=i.getOrdinalMeta(),l=!0):s==="category"?(t.layout="vertical",n=a.getOrdinalMeta(),l=!0):t.layout=t.layout||"horizontal";var u=["x","y"],f=t.layout==="horizontal"?0:1,c=this._baseAxisDim=u[f],p=u[1-f],h=[i,a],d=h[f].get("type"),m=h[1-f].get("type"),v=t.data;if(v&&l){var g=[];D(v,function(_,S){var b;B(_)?(b=_.slice(),_.unshift(S)):B(_.value)?(b=V({},_),b.value=b.value.slice(),_.value.unshift(S)):b=_,g.push(b)}),t.data=g}var y=this.defaultValueDimensions,x=[{name:c,type:Qu(d),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:p,type:Qu(m),dimsDef:y.slice()}];return fi(this,{coordDimensions:x,dimensionsCount:y.length+1,encodeDefaulter:pt(X0,x,this)})},e.prototype.getBaseAxis=function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis},e}();var I7=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],r.visualDrawType="stroke",r}return t.type="series.boxplot",t.dependencies=["xAxis","yAxis","grid"],t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},t}(Wt);ie(I7,j1,!0);var L7=I7;var hht=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a=r.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=r.get("layout")==="horizontal"?1:0;a.diff(s).add(function(u){if(a.hasValue(u)){var f=a.getItemLayout(u),c=P7(f,a,u,l,!0);a.setItemGraphicEl(u,c),o.add(c)}}).update(function(u,f){var c=s.getItemGraphicEl(f);if(!a.hasValue(u)){o.remove(c);return}var p=a.getItemLayout(u);c?(er(c),R7(p,c,a,u)):c=P7(p,a,u,l),o.add(c),a.setItemGraphicEl(u,c)}).remove(function(u){var f=s.getItemGraphicEl(u);f&&o.remove(f)}).execute(),this._data=a},t.prototype.remove=function(r){var n=this.group,i=this._data;this._data=null,i&&i.eachItemGraphicEl(function(a){a&&n.remove(a)})},t.type="boxplot",t}(Vt),dht=function(){function e(){}return e}(),vht=function(e){N(t,e);function t(r){var n=e.call(this,r)||this;return n.type="boxplotBoxPath",n}return t.prototype.getDefaultShape=function(){return new dht},t.prototype.buildPath=function(r,n){var i=n.points,a=0;for(r.moveTo(i[a][0],i[a][1]),a++;a<4;a++)r.lineTo(i[a][0],i[a][1]);for(r.closePath();am){var _=[g,x];n.push(_)}}}return{boxData:r,outliers:n}}var k7={type:"echarts:boxplot",transform:function(t){var r=t.upstream;if(r.sourceFormat!==qe){var n="";jt(n)}var i=qD(r.getRawData(),t.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:i.boxData},{data:i.outliers}]}};function ZD(e){e.registerSeriesModel(L7),e.registerChartView(N7),e.registerLayout(XD),e.registerTransform(k7)}var _ht=["color","borderColor"],bht=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(r),this._isLargeDraw?this._renderLarge(r):this._renderNormal(r)},t.prototype.incrementalPrepareRender=function(r,n,i){this._clear(),this._updateDrawMode(r)},t.prototype.incrementalRender=function(r,n,i,a){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(r,n):this._incrementalRenderNormal(r,n)},t.prototype.eachRendered=function(r){un(this._progressiveEls||this.group,r)},t.prototype._updateDrawMode=function(r){var n=r.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},t.prototype._renderNormal=function(r){var n=r.getData(),i=this._data,a=this.group,o=n.getLayout("isSimpleBox"),s=r.get("clip",!0),l=r.coordinateSystem,u=l.getArea&&l.getArea();this._data||a.removeAll(),n.diff(i).add(function(f){if(n.hasValue(f)){var c=n.getItemLayout(f);if(s&&O7(u,c))return;var p=KD(c,f,!0);Kt(p,{shape:{points:c.ends}},r,f),$D(p,n,f,o),a.add(p),n.setItemGraphicEl(f,p)}}).update(function(f,c){var p=i.getItemGraphicEl(c);if(!n.hasValue(f)){a.remove(p);return}var h=n.getItemLayout(f);if(s&&O7(u,h)){a.remove(p);return}p?(Rt(p,{shape:{points:h.ends}},r,f),er(p)):p=KD(h,f),$D(p,n,f,o),a.add(p),n.setItemGraphicEl(f,p)}).remove(function(f){var c=i.getItemGraphicEl(f);c&&a.remove(c)}).execute(),this._data=n},t.prototype._renderLarge=function(r){this._clear(),z7(r,this.group);var n=r.get("clip",!0)?fl(r.coordinateSystem,!1,r):null;n?this.group.setClipPath(n):this.group.removeClipPath()},t.prototype._incrementalRenderNormal=function(r,n){for(var i=n.getData(),a=i.getLayout("isSimpleBox"),o;(o=r.next())!=null;){var s=i.getItemLayout(o),l=KD(s,o);$D(l,i,o,a),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},t.prototype._incrementalRenderLarge=function(r,n){z7(n,this.group,this._progressiveEls,!0)},t.prototype.remove=function(r){this._clear()},t.prototype._clear=function(){this.group.removeAll(),this._data=null},t.type="candlestick",t}(Vt),Sht=function(){function e(){}return e}(),wht=function(e){N(t,e);function t(r){var n=e.call(this,r)||this;return n.type="normalCandlestickBox",n}return t.prototype.getDefaultShape=function(){return new Sht},t.prototype.buildPath=function(r,n){var i=n.points;this.__simpleBox?(r.moveTo(i[4][0],i[4][1]),r.lineTo(i[6][0],i[6][1])):(r.moveTo(i[0][0],i[0][1]),r.lineTo(i[1][0],i[1][1]),r.lineTo(i[2][0],i[2][1]),r.lineTo(i[3][0],i[3][1]),r.closePath(),r.moveTo(i[4][0],i[4][1]),r.lineTo(i[5][0],i[5][1]),r.moveTo(i[6][0],i[6][1]),r.lineTo(i[7][0],i[7][1]))},t}(vt);function KD(e,t,r){var n=e.ends;return new wht({shape:{points:r?Tht(n,e):n},z2:100})}function O7(e,t){for(var r=!0,n=0;n0?"borderColor":"borderColor0"])||r.get(["itemStyle",e>0?"color":"color0"]);e===0&&(i=r.get(["itemStyle","borderColorDoji"]));var a=r.getModel("itemStyle").getItemStyle(_ht);t.useStyle(a),t.style.fill=null,t.style.stroke=i}var U7=bht;var V7=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],r}return t.prototype.getShadowDim=function(){return"open"},t.prototype.brushSelector=function(r,n,i){var a=n.getItemLayout(r);return a&&i.rect(a.brushRect)},t.type="series.candlestick",t.dependencies=["xAxis","yAxis","grid"],t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderColorDoji:null,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},t}(Wt);ie(V7,j1,!0);var B7=V7;function JD(e){!e||!B(e.series)||D(e.series,function(t){rt(t)&&t.type==="k"&&(t.type="candlestick")})}var Aht=["itemStyle","borderColor"],Cht=["itemStyle","borderColor0"],Dht=["itemStyle","borderColorDoji"],Eht=["itemStyle","color"],Iht=["itemStyle","color0"],Lht={seriesType:"candlestick",plan:si(),performRawSeries:!0,reset:function(e,t){function r(a,o){return o.get(a>0?Eht:Iht)}function n(a,o){return o.get(a===0?Dht:a>0?Aht:Cht)}if(!t.isSeriesFiltered(e)){var i=e.pipelineContext.large;return!i&&{progress:function(a,o){for(var s;(s=a.next())!=null;){var l=o.getItemModel(s),u=o.getItemLayout(s).sign,f=l.getItemStyle();f.fill=r(u,l),f.stroke=n(u,l)||f.fill;var c=o.ensureUniqueItemVisual(s,"style");V(c,f)}}}}}},F7=Lht;var Pht={seriesType:"candlestick",plan:si(),reset:function(e){var t=e.coordinateSystem,r=e.getData(),n=Rht(e,r),i=0,a=1,o=["x","y"],s=r.getDimensionIndex(r.mapDimension(o[i])),l=F(r.mapDimensionsAll(o[a]),r.getDimensionIndex,r),u=l[0],f=l[1],c=l[2],p=l[3];if(r.setLayout({candleWidth:n,isSimpleBox:n<=1.3}),s<0||l.length<4)return;return{progress:e.pipelineContext.large?d:h};function h(m,v){for(var g,y=v.getStore();(g=m.next())!=null;){var x=y.get(s,g),_=y.get(u,g),S=y.get(f,g),b=y.get(c,g),w=y.get(p,g),T=Math.min(_,S),M=Math.max(_,S),C=k(T,x),A=k(M,x),P=k(b,x),L=k(w,x),I=[];O(I,A,0),O(I,C,1),I.push(U(L),U(A),U(P),U(C));var E=v.getItemModel(g),R=!!E.get(["itemStyle","borderColorDoji"]);v.setItemLayout(g,{sign:G7(y,g,_,S,f,R),initBaseline:_>S?A[a]:C[a],ends:I,brushRect:z(b,w,x)})}function k(G,Y){var et=[];return et[i]=Y,et[a]=G,isNaN(Y)||isNaN(G)?[NaN,NaN]:t.dataToPoint(et)}function O(G,Y,et){var tt=Y.slice(),lt=Y.slice();tt[i]=jd(tt[i]+n/2,1,!1),lt[i]=jd(lt[i]-n/2,1,!0),et?G.push(tt,lt):G.push(lt,tt)}function z(G,Y,et){var tt=k(G,et),lt=k(Y,et);return tt[i]-=n/2,lt[i]-=n/2,{x:tt[0],y:tt[1],width:a?n:lt[0]-tt[0],height:a?lt[1]-tt[1]:n}}function U(G){return G[i]=jd(G[i],1),G}}function d(m,v){for(var g=pn(m.count*4),y=0,x,_=[],S=[],b,w=v.getStore(),T=!!e.get(["itemStyle","borderColorDoji"]);(b=m.next())!=null;){var M=w.get(s,b),C=w.get(u,b),A=w.get(f,b),P=w.get(c,b),L=w.get(p,b);if(isNaN(M)||isNaN(P)||isNaN(L)){g[y++]=NaN,y+=3;continue}g[y++]=G7(w,b,C,A,f,T),_[i]=M,_[a]=P,x=t.dataToPoint(_,null,S),g[y++]=x?x[0]:NaN,g[y++]=x?x[1]:NaN,_[a]=L,x=t.dataToPoint(_,null,S),g[y++]=x?x[1]:NaN}v.setLayout("largePoints",g)}}};function G7(e,t,r,n,i,a){var o;return r>n?o=-1:r0?e.get(i,t-1)<=n?1:-1:1,o}function Rht(e,t){var r=e.getBaseAxis(),n,i=r.type==="category"?r.getBandWidth():(n=r.getExtent(),Math.abs(n[1]-n[0])/t.count()),a=q(bt(e.get("barMaxWidth"),i),i),o=q(bt(e.get("barMinWidth"),1),i),s=e.get("barWidth");return s!=null?q(s,i):Math.max(Math.min(i/2,a),o)}var H7=Pht;function tE(e){e.registerChartView(U7),e.registerSeriesModel(B7),e.registerPreprocessor(JD),e.registerVisual(F7),e.registerLayout(H7)}function W7(e,t){var r=t.rippleEffectColor||t.color;e.eachChild(function(n){n.attr({z:t.z,zlevel:t.zlevel,style:{stroke:t.brushType==="stroke"?r:null,fill:t.brushType==="fill"?r:null}})})}var Nht=function(e){N(t,e);function t(r,n){var i=e.call(this)||this,a=new ts(r,n),o=new nt;return i.add(a),i.add(o),i.updateData(r,n),i}return t.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},t.prototype.startEffectAnimation=function(r){for(var n=r.symbolType,i=r.color,a=r.rippleNumber,o=this.childAt(1),s=0;s0&&(s=this._getLineLength(a)/f*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){a.stopAnimation();var p=void 0;j(c)?p=c(i):p=c,a.__t>0&&(p=-s*a.__t),this._animateSymbol(a,s,p,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},t.prototype._animateSymbol=function(r,n,i,a,o){if(n>0){r.__t=0;var s=this,l=r.animate("",a).when(o?n*2:n,{__t:o?2:1}).delay(i).during(function(){s._updateSymbolPosition(r)});a||l.done(function(){s.remove(r)}),l.start()}},t.prototype._getLineLength=function(r){return mi(r.__p1,r.__cp1)+mi(r.__cp1,r.__p2)},t.prototype._updateAnimationPoints=function(r,n){r.__p1=n[0],r.__p2=n[1],r.__cp1=n[2]||[(n[0][0]+n[1][0])/2,(n[0][1]+n[1][1])/2]},t.prototype.updateData=function(r,n,i){this.childAt(0).updateData(r,n,i),this._updateEffectSymbol(r,n)},t.prototype._updateSymbolPosition=function(r){var n=r.__p1,i=r.__p2,a=r.__cp1,o=r.__t<1?r.__t:2-r.__t,s=[r.x,r.y],l=s.slice(),u=He,f=_d;s[0]=u(n[0],a[0],i[0],o),s[1]=u(n[1],a[1],i[1],o);var c=r.__t<1?f(n[0],a[0],i[0],o):f(i[0],a[0],n[0],1-o),p=r.__t<1?f(n[1],a[1],i[1],o):f(i[1],a[1],n[1],1-o);r.rotation=-Math.atan2(p,c)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(r.__lastT!==void 0&&r.__lastT=0&&!(a[l]<=n);l--);l=Math.min(l,o-2)}else{for(l=s;ln);l++);l=Math.min(l-1,o-2)}var f=(n-a[l])/(a[l+1]-a[l]),c=i[l],p=i[l+1];r.x=c[0]*(1-f)+f*p[0],r.y=c[1]*(1-f)+f*p[1];var h=r.__t<1?p[0]-c[0]:c[0]-p[0],d=r.__t<1?p[1]-c[1]:c[1]-p[1];r.rotation=-Math.atan2(d,h)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=n,r.ignore=!1}},t}(Q1),Z7=Vht;var Bht=function(){function e(){this.polyline=!1,this.curveness=0,this.segs=[]}return e}(),Fht=function(e){N(t,e);function t(r){var n=e.call(this,r)||this;return n._off=0,n.hoverDataIdx=-1,n}return t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new Bht},t.prototype.buildPath=function(r,n){var i=n.segs,a=n.curveness,o;if(n.polyline)for(o=this._off;o0){r.moveTo(i[o++],i[o++]);for(var l=1;l0){var h=(u+c)/2-(f-p)*a,d=(f+p)/2-(c-u)*a;r.quadraticCurveTo(h,d,c,p)}else r.lineTo(c,p)}this.incremental&&(this._off=o,this.notClear=!0)},t.prototype.findDataIndex=function(r,n){var i=this.shape,a=i.segs,o=i.curveness,s=this.style.lineWidth;if(i.polyline)for(var l=0,u=0;u0)for(var c=a[u++],p=a[u++],h=1;h0){var v=(c+d)/2-(p-m)*o,g=(p+m)/2-(d-c)*o;if(u0(c,p,v,g,d,m,s,r,n))return l}else if(qa(c,p,d,m,s,r,n))return l;l++}return-1},t.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect();if(r=i[0],n=i[1],a.contain(r,n)){var o=this.hoverDataIdx=this.findDataIndex(r,n);return o>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var r=this._rect;if(!r){for(var n=this.shape,i=n.segs,a=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u0&&(o.dataIndex=l+t.__startIndex)})},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}(),K7=Ght;var Hht={seriesType:"lines",plan:si(),reset:function(e){var t=e.coordinateSystem;if(t){var r=e.get("polyline"),n=e.pipelineContext.large;return{progress:function(i,a){var o=[];if(n){var s=void 0,l=i.end-i.start;if(r){for(var u=0,f=i.start;f0&&(f||u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(a);var c=r.get("clip",!0)&&fl(r.coordinateSystem,!1,r);c?this.group.setClipPath(c):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},t.prototype.incrementalPrepareRender=function(r,n,i){var a=r.getData(),o=this._updateLineDraw(a,r);o.incrementalPrepareUpdate(a),this._clearLayer(i),this._finished=!1},t.prototype.incrementalRender=function(r,n,i){this._lineDraw.incrementalUpdate(r,n.getData()),this._finished=r.end===n.getData().count()},t.prototype.eachRendered=function(r){this._lineDraw&&this._lineDraw.eachRendered(r)},t.prototype.updateTransform=function(r,n,i){var a=r.getData(),o=r.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=t_.reset(r,n,i);s.progress&&s.progress({start:0,end:a.count(),count:a.count()},a),this._lineDraw.updateLayout(),this._clearLayer(i)},t.prototype._updateLineDraw=function(r,n){var i=this._lineDraw,a=this._showEffect(n),o=!!n.get("polyline"),s=n.pipelineContext,l=s.large;return(!i||a!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(i&&i.remove(),i=this._lineDraw=l?new K7:new Rp(o?a?Z7:J1:a?Q1:Pp),this._hasEffet=a,this._isPolyline=o,this._isLargeDraw=l),this.group.add(i.group),i},t.prototype._showEffect=function(r){return!!r.get(["effect","show"])},t.prototype._clearLayer=function(r){var n=r.getZr(),i=n.painter.getType()==="svg";!i&&this._lastZlevel!=null&&n.painter.getLayer(this._lastZlevel).clear(!0)},t.prototype.remove=function(r,n){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(n)},t.prototype.dispose=function(r,n){this.remove(r,n)},t.type="lines",t}(Vt),$7=Wht;var Yht=typeof Uint32Array>"u"?Array:Uint32Array,Xht=typeof Float64Array>"u"?Array:Float64Array;function j7(e){var t=e.data;t&&t[0]&&t[0][0]&&t[0][0].coord&&(e.data=F(t,function(r){var n=[r[0].coord,r[1].coord],i={coords:n};return r[0].name&&(i.fromName=r[0].name),r[1].name&&(i.toName=r[1].name),Tc([i,r[0],r[1]])}))}var qht=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.visualStyleAccessPath="lineStyle",r.visualDrawType="stroke",r}return t.prototype.init=function(r){r.data=r.data||[],j7(r);var n=this._processFlatCoordsArray(r.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(r.data=new Float32Array(n.count)),e.prototype.init.apply(this,arguments)},t.prototype.mergeOption=function(r){if(j7(r),r.data){var n=this._processFlatCoordsArray(r.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(r.data=new Float32Array(n.count))}e.prototype.mergeOption.apply(this,arguments)},t.prototype.appendData=function(r){var n=this._processFlatCoordsArray(r.data);n.flatCoords&&(this._flatCoords?(this._flatCoords=su(this._flatCoords,n.flatCoords),this._flatCoordsOffset=su(this._flatCoordsOffset,n.flatCoordsOffset)):(this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset),r.data=new Float32Array(n.count)),this.getRawData().appendData(r.data)},t.prototype._getCoordsFromItemModel=function(r){var n=this.getData().getItemModel(r),i=n.option instanceof Array?n.option:n.getShallow("coords");return i},t.prototype.getLineCoordsCount=function(r){return this._flatCoordsOffset?this._flatCoordsOffset[r*2+1]:this._getCoordsFromItemModel(r).length},t.prototype.getLineCoords=function(r,n){if(this._flatCoordsOffset){for(var i=this._flatCoordsOffset[r*2],a=this._flatCoordsOffset[r*2+1],o=0;oi}}return{flatCoordsOffset:new Uint32Array(a.buffer,0,l),flatCoords:o,count:u}}return{flatCoordsOffset:null,flatCoords:null,count:r.length}},t.prototype.getInitialData=function(r,n){if(!1)var i;var a=new Ne(["value"],this);return a.hasItemOption=!1,a.initData(r.data,[],function(o,s,l,u){if(o instanceof Array)return NaN;a.hasItemOption=!0;var f=o.value;if(f!=null)return f instanceof Array?f[u]:f}),a},t.prototype.formatTooltip=function(r,n,i){var a=this.getData(),o=a.getItemModel(r),s=o.get("name");if(s)return s;var l=o.get("fromName"),u=o.get("toName"),f=[];return l!=null&&f.push(l),u!=null&&f.push(u),xe("nameValue",{name:f.join(" > ")})},t.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},t.prototype.getProgressive=function(){var r=this.option.progressive;return r??(this.option.large?1e4:this.get("progressive"))},t.prototype.getProgressiveThreshold=function(){var r=this.option.progressiveThreshold;return r??(this.option.large?2e4:this.get("progressiveThreshold"))},t.prototype.getZLevelKey=function(){var r=this.getModel("effect"),n=r.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:r.get("show")&&n>0?n+"":""},t.type="series.lines",t.dependencies=["grid","polar","geo","calendar"],t.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},t}(Wt),Q7=qht;function e_(e){return e instanceof Array||(e=[e,e]),e}var Zht={seriesType:"lines",reset:function(e){var t=e_(e.get("symbol")),r=e_(e.get("symbolSize")),n=e.getData();n.setVisual("fromSymbol",t&&t[0]),n.setVisual("toSymbol",t&&t[1]),n.setVisual("fromSymbolSize",r&&r[0]),n.setVisual("toSymbolSize",r&&r[1]);function i(a,o){var s=a.getItemModel(o),l=e_(s.getShallow("symbol",!0)),u=e_(s.getShallow("symbolSize",!0));l[0]&&a.setItemVisual(o,"fromSymbol",l[0]),l[1]&&a.setItemVisual(o,"toSymbol",l[1]),u[0]&&a.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&a.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:n.hasItemOption?i:null}}},J7=Zht;function rE(e){e.registerChartView($7),e.registerSeriesModel(Q7),e.registerLayout(t_),e.registerVisual(J7)}var Kht=256,$ht=function(){function e(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var t=Wr.createCanvas();this.canvas=t}return e.prototype.update=function(t,r,n,i,a,o){var s=this._getBrush(),l=this._getGradient(a,"inRange"),u=this._getGradient(a,"outOfRange"),f=this.pointSize+this.blurSize,c=this.canvas,p=c.getContext("2d"),h=t.length;c.width=r,c.height=n;for(var d=0;d0){var P=o(x)?l:u;x>0&&(x=x*C+T),S[b++]=P[A],S[b++]=P[A+1],S[b++]=P[A+2],S[b++]=P[A+3]*x*256}else b+=4}return p.putImageData(_,0,0),c},e.prototype._getBrush=function(){var t=this._brushCanvas||(this._brushCanvas=Wr.createCanvas()),r=this.pointSize+this.blurSize,n=r*2;t.width=n,t.height=n;var i=t.getContext("2d");return i.clearRect(0,0,n,n),i.shadowOffsetX=n,i.shadowBlur=this.blurSize,i.shadowColor="#000",i.beginPath(),i.arc(-r,r,this.pointSize,0,Math.PI*2,!0),i.closePath(),i.fill(),t},e.prototype._getGradient=function(t,r){for(var n=this._gradientPixels,i=n[r]||(n[r]=new Uint8ClampedArray(256*4)),a=[0,0,0,0],o=0,s=0;s<256;s++)t[r](s/255,!0,a),i[o++]=a[0],i[o++]=a[1],i[o++]=a[2],i[o++]=a[3];return i},e}(),tF=$ht;function jht(e,t,r){var n=e[1]-e[0];t=F(t,function(o){return{interval:[(o.interval[0]-e[0])/n,(o.interval[1]-e[0])/n]}});var i=t.length,a=0;return function(o){var s;for(s=a;s=0;s--){var l=t[s].interval;if(l[0]<=o&&o<=l[1]){a=s;break}}return s>=0&&s=t[0]&&n<=t[1]}}function eF(e){var t=e.dimensions;return t[0]==="lng"&&t[1]==="lat"}var Jht=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a;n.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===r&&(a=s)})}),this._progressiveEls=null,this.group.removeAll();var o=r.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"?this._renderOnCartesianAndCalendar(r,i,0,r.getData().count()):eF(o)&&this._renderOnGeo(o,r,a,i)},t.prototype.incrementalPrepareRender=function(r,n,i){this.group.removeAll()},t.prototype.incrementalRender=function(r,n,i,a){var o=n.coordinateSystem;o&&(eF(o)?this.render(n,i,a):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(n,a,r.start,r.end,!0)))},t.prototype.eachRendered=function(r){un(this._progressiveEls||this.group,r)},t.prototype._renderOnCartesianAndCalendar=function(r,n,i,a,o){var s=r.coordinateSystem,l=Ni(s,"cartesian2d"),u,f,c,p;if(l){var h=s.getAxis("x"),d=s.getAxis("y");u=h.getBandWidth()+.5,f=d.getBandWidth()+.5,c=h.scale.getExtent(),p=d.scale.getExtent()}for(var m=this.group,v=r.getData(),g=r.getModel(["emphasis","itemStyle"]).getItemStyle(),y=r.getModel(["blur","itemStyle"]).getItemStyle(),x=r.getModel(["select","itemStyle"]).getItemStyle(),_=r.get(["itemStyle","borderRadius"]),S=ae(r),b=r.getModel("emphasis"),w=b.get("focus"),T=b.get("blurScope"),M=b.get("disabled"),C=l?[v.mapDimension("x"),v.mapDimension("y"),v.mapDimension("value")]:[v.mapDimension("time"),v.mapDimension("value")],A=i;Ac[1]||Ep[1])continue;var R=s.dataToPoint([I,E]);P=new At({shape:{x:R[0]-u/2,y:R[1]-f/2,width:u,height:f},style:L})}else{if(isNaN(v.get(C[1],A)))continue;P=new At({z2:1,shape:s.dataToRect([v.get(C[0],A)]).contentShape,style:L})}if(v.hasItemOption){var k=v.getItemModel(A),O=k.getModel("emphasis");g=O.getModel("itemStyle").getItemStyle(),y=k.getModel(["blur","itemStyle"]).getItemStyle(),x=k.getModel(["select","itemStyle"]).getItemStyle(),_=k.get(["itemStyle","borderRadius"]),w=O.get("focus"),T=O.get("blurScope"),M=O.get("disabled"),S=ae(k)}P.shape.r=_;var z=r.getRawValue(A),U="-";z&&z[2]!=null&&(U=z[2]+""),he(P,S,{labelFetcher:r,labelDataIndex:A,defaultOpacity:L.opacity,defaultText:U}),P.ensureState("emphasis").style=g,P.ensureState("blur").style=y,P.ensureState("select").style=x,Zt(P,w,T,M),P.incremental=o,o&&(P.states.emphasis.hoverLayer=!0),m.add(P),v.setItemGraphicEl(A,P),this._progressiveEls&&this._progressiveEls.push(P)}},t.prototype._renderOnGeo=function(r,n,i,a){var o=i.targetVisuals.inRange,s=i.targetVisuals.outOfRange,l=n.getData(),u=this._hmLayer||this._hmLayer||new tF;u.blurSize=n.get("blurSize"),u.pointSize=n.get("pointSize"),u.minOpacity=n.get("minOpacity"),u.maxOpacity=n.get("maxOpacity");var f=r.getViewRect().clone(),c=r.getRoamTransform();f.applyTransform(c);var p=Math.max(f.x,0),h=Math.max(f.y,0),d=Math.min(f.width+f.x,a.getWidth()),m=Math.min(f.height+f.y,a.getHeight()),v=d-p,g=m-h,y=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],x=l.mapArray(y,function(w,T,M){var C=r.dataToPoint([w,T]);return C[0]-=p,C[1]-=h,C.push(M),C}),_=i.getExtent(),S=i.type==="visualMap.continuous"?Qht(_,i.option.range):jht(_,i.getPieceList(),i.option.selected);u.update(x,v,g,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},S);var b=new me({style:{width:v,height:g,x:p,y:h,image:u.canvas},silent:!0});this.group.add(b)},t.type="heatmap",t}(Vt),rF=Jht;var tdt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.getInitialData=function(r,n){return Tr(null,this,{generateCoord:"value"})},t.prototype.preventIncremental=function(){var r=Ko.get(this.get("coordinateSystem"));if(r&&r.dimensions)return r.dimensions[0]==="lng"&&r.dimensions[1]==="lat"},t.type="series.heatmap",t.dependencies=["grid","geo","calendar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:"#212121"}}},t}(Wt),nF=tdt;function nE(e){e.registerChartView(rF),e.registerSeriesModel(nF)}var edt=["itemStyle","borderWidth"],iF=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],iE=new Sr,rdt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a=this.group,o=r.getData(),s=this._data,l=r.coordinateSystem,u=l.getBaseAxis(),f=u.isHorizontal(),c=l.master.getRect(),p={ecSize:{width:i.getWidth(),height:i.getHeight()},seriesModel:r,coordSys:l,coordSysExtent:[[c.x,c.x+c.width],[c.y,c.y+c.height]],isHorizontal:f,valueDim:iF[+f],categoryDim:iF[1-+f]};return o.diff(s).add(function(h){if(o.hasValue(h)){var d=oF(o,h),m=aF(o,h,d,p),v=sF(o,p,m);o.setItemGraphicEl(h,v),a.add(v),uF(v,p,m)}}).update(function(h,d){var m=s.getItemGraphicEl(d);if(!o.hasValue(h)){a.remove(m);return}var v=oF(o,h),g=aF(o,h,v,p),y=mF(o,g);m&&y!==m.__pictorialShapeStr&&(a.remove(m),o.setItemGraphicEl(h,null),m=null),m?udt(m,p,g):m=sF(o,p,g,!0),o.setItemGraphicEl(h,m),m.__pictorialSymbolMeta=g,a.add(m),uF(m,p,g)}).remove(function(h){var d=s.getItemGraphicEl(h);d&&lF(s,h,d.__pictorialSymbolMeta.animationModel,d)}).execute(),this._data=o,this.group},t.prototype.remove=function(r,n){var i=this.group,a=this._data;r.get("animation")?a&&a.eachItemGraphicEl(function(o){lF(a,ht(o).dataIndex,r,o)}):i.removeAll()},t.type="pictorialBar",t}(Vt);function aF(e,t,r,n){var i=e.getItemLayout(t),a=r.get("symbolRepeat"),o=r.get("symbolClip"),s=r.get("symbolPosition")||"start",l=r.get("symbolRotate"),u=(l||0)*Math.PI/180||0,f=r.get("symbolPatternSize")||2,c=r.isAnimationEnabled(),p={dataIndex:t,layout:i,itemModel:r,symbolType:e.getItemVisual(t,"symbol")||"circle",style:e.getItemVisual(t,"style"),symbolClip:o,symbolRepeat:a,symbolRepeatDirection:r.get("symbolRepeatDirection"),symbolPatternSize:f,rotation:u,animationModel:c?r:null,hoverScale:c&&r.get(["emphasis","scale"]),z2:r.getShallow("z",!0)||0};ndt(r,a,i,n,p),idt(e,t,i,a,o,p.boundingLength,p.pxSign,f,n,p),adt(r,p.symbolScale,u,n,p);var h=p.symbolSize,d=li(r.get("symbolOffset"),h);return odt(r,h,i,a,o,d,s,p.valueLineWidth,p.boundingLength,p.repeatCutLength,n,p),p}function ndt(e,t,r,n,i){var a=n.valueDim,o=e.get("symbolBoundingData"),s=n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(r[a.wh]<=0),f;if(B(o)){var c=[aE(s,o[0])-l,aE(s,o[1])-l];c[1]0?1:-1}function aE(e,t){return e.toGlobalCoord(e.dataToCoord(e.scale.parse(t)))}function idt(e,t,r,n,i,a,o,s,l,u){var f=l.valueDim,c=l.categoryDim,p=Math.abs(r[c.wh]),h=e.getItemVisual(t,"symbolSize"),d;B(h)?d=h.slice():h==null?d=["100%","100%"]:d=[h,h],d[c.index]=q(d[c.index],p),d[f.index]=q(d[f.index],n?p:Math.abs(a)),u.symbolSize=d;var m=u.symbolScale=[d[0]/s,d[1]/s];m[f.index]*=(l.isHorizontal?-1:1)*o}function adt(e,t,r,n,i){var a=e.get(edt)||0;a&&(iE.attr({scaleX:t[0],scaleY:t[1],rotation:r}),iE.updateTransform(),a/=iE.getLineScale(),a*=t[n.valueDim.index]),i.valueLineWidth=a||0}function odt(e,t,r,n,i,a,o,s,l,u,f,c){var p=f.categoryDim,h=f.valueDim,d=c.pxSign,m=Math.max(t[h.index]+s,0),v=m;if(n){var g=Math.abs(l),y=_e(e.get("symbolMargin"),"15%")+"",x=!1;y.lastIndexOf("!")===y.length-1&&(x=!0,y=y.slice(0,y.length-1));var _=q(y,t[h.index]),S=Math.max(m+_*2,0),b=x?0:_*2,w=Rd(n),T=w?n:fF((g+b)/S),M=g-T*m;_=M/2/(x?T:Math.max(T-1,1)),S=m+_*2,b=x?0:_*2,!w&&n!=="fixed"&&(T=u?fF((Math.abs(u)+b)/S):0),v=T*S-b,c.repeatTimes=T,c.symbolMargin=_}var C=d*(v/2),A=c.pathPosition=[];A[p.index]=r[p.wh]/2,A[h.index]=o==="start"?C:o==="end"?l-C:l/2,a&&(A[0]+=a[0],A[1]+=a[1]);var P=c.bundlePosition=[];P[p.index]=r[p.xy],P[h.index]=r[h.xy];var L=c.barRectShape=V({},r);L[h.wh]=d*Math.max(Math.abs(r[h.wh]),Math.abs(A[h.index]+C)),L[p.wh]=r[p.wh];var I=c.clipShape={};I[p.xy]=-r[p.xy],I[p.wh]=f.ecSize[p.wh],I[h.xy]=0,I[h.wh]=r[h.wh]}function cF(e){var t=e.symbolPatternSize,r=ne(e.symbolType,-t/2,-t/2,t,t);return r.attr({culling:!0}),r.type!=="image"&&r.setStyle({strokeNoScale:!0}),r}function pF(e,t,r,n){var i=e.__pictorialBundle,a=r.symbolSize,o=r.valueLineWidth,s=r.pathPosition,l=t.valueDim,u=r.repeatTimes||0,f=0,c=a[t.valueDim.index]+o+r.symbolMargin*2;for(oE(e,function(m){m.__pictorialAnimationIndex=f,m.__pictorialRepeatTimes=u,f0:g<0)&&(y=u-1-m),v[l.index]=c*(y-u/2+.5)+s[l.index],{x:v[0],y:v[1],scaleX:r.symbolScale[0],scaleY:r.symbolScale[1],rotation:r.rotation}}}function hF(e,t,r,n){var i=e.__pictorialBundle,a=e.__pictorialMainPath;a?Vp(a,null,{x:r.pathPosition[0],y:r.pathPosition[1],scaleX:r.symbolScale[0],scaleY:r.symbolScale[1],rotation:r.rotation},r,n):(a=e.__pictorialMainPath=cF(r),i.add(a),Vp(a,{x:r.pathPosition[0],y:r.pathPosition[1],scaleX:0,scaleY:0,rotation:r.rotation},{scaleX:r.symbolScale[0],scaleY:r.symbolScale[1]},r,n))}function dF(e,t,r){var n=V({},t.barRectShape),i=e.__pictorialBarRect;i?Vp(i,null,{shape:n},t,r):(i=e.__pictorialBarRect=new At({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),i.disableMorphing=!0,e.add(i))}function vF(e,t,r,n){if(r.symbolClip){var i=e.__pictorialClipPath,a=V({},r.clipShape),o=t.valueDim,s=r.animationModel,l=r.dataIndex;if(i)Rt(i,{shape:a},s,l);else{a[o.wh]=0,i=new At({shape:a}),e.__pictorialBundle.setClipPath(i),e.__pictorialClipPath=i;var u={};u[o.wh]=r.clipShape[o.wh],Et[n?"updateProps":"initProps"](i,{shape:u},s,l)}}}function oF(e,t){var r=e.getItemModel(t);return r.getAnimationDelayParams=sdt,r.isAnimationEnabled=ldt,r}function sdt(e){return{index:e.__pictorialAnimationIndex,count:e.__pictorialRepeatTimes}}function ldt(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function sF(e,t,r,n){var i=new nt,a=new nt;return i.add(a),i.__pictorialBundle=a,a.x=r.bundlePosition[0],a.y=r.bundlePosition[1],r.symbolRepeat?pF(i,t,r):hF(i,t,r),dF(i,r,n),vF(i,t,r,n),i.__pictorialShapeStr=mF(e,r),i.__pictorialSymbolMeta=r,i}function udt(e,t,r){var n=r.animationModel,i=r.dataIndex,a=e.__pictorialBundle;Rt(a,{x:r.bundlePosition[0],y:r.bundlePosition[1]},n,i),r.symbolRepeat?pF(e,t,r,!0):hF(e,t,r,!0),dF(e,r,!0),vF(e,t,r,!0)}function lF(e,t,r,n){var i=n.__pictorialBarRect;i&&i.removeTextContent();var a=[];oE(n,function(o){a.push(o)}),n.__pictorialMainPath&&a.push(n.__pictorialMainPath),n.__pictorialClipPath&&(r=null),D(a,function(o){Ai(o,{scaleX:0,scaleY:0},r,t,function(){n.parent&&n.parent.remove(n)})}),e.setItemGraphicEl(t,null)}function mF(e,t){return[e.getItemVisual(t.dataIndex,"symbol")||"none",!!t.symbolRepeat,!!t.symbolClip].join(":")}function oE(e,t,r){D(e.__pictorialBundle.children(),function(n){n!==e.__pictorialBarRect&&t.call(r,n)})}function Vp(e,t,r,n,i,a){t&&e.attr(t),n.symbolClip&&!i?r&&e.attr(r):r&&Et[i?"updateProps":"initProps"](e,r,n.animationModel,n.dataIndex,a)}function uF(e,t,r){var n=r.dataIndex,i=r.itemModel,a=i.getModel("emphasis"),o=a.getModel("itemStyle").getItemStyle(),s=i.getModel(["blur","itemStyle"]).getItemStyle(),l=i.getModel(["select","itemStyle"]).getItemStyle(),u=i.getShallow("cursor"),f=a.get("focus"),c=a.get("blurScope"),p=a.get("scale");oE(e,function(m){if(m instanceof me){var v=m.style;m.useStyle(V({image:v.image,x:v.x,y:v.y,width:v.width,height:v.height},r.style))}else m.useStyle(r.style);var g=m.ensureState("emphasis");g.style=o,p&&(g.scaleX=m.scaleX*1.1,g.scaleY=m.scaleY*1.1),m.ensureState("blur").style=s,m.ensureState("select").style=l,u&&(m.cursor=u),m.z2=r.z2});var h=t.valueDim.posDesc[+(r.boundingLength>0)],d=e.__pictorialBarRect;he(d,ae(i),{labelFetcher:t.seriesModel,labelDataIndex:n,defaultText:xa(t.seriesModel.getData(),n),inheritColor:r.style.fill,defaultOpacity:r.style.opacity,defaultOutsidePosition:h}),Zt(e,f,c,a.get("disabled"))}function fF(e){var t=Math.round(e);return Math.abs(e-t)<1e-4?t:Math.ceil(e)}var gF=rdt;var fdt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.hasSymbolVisual=!0,r.defaultSymbol="roundRect",r}return t.prototype.getInitialData=function(r){return r.stack=null,e.prototype.getInitialData.apply(this,arguments)},t.type="series.pictorialBar",t.dependencies=["grid"],t.defaultOption=Kr(_p.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),t}(_p),yF=fdt;function sE(e){e.registerChartView(gF),e.registerSeriesModel(yF),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,pt(Ux,"pictorialBar")),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,Vx("pictorialBar"))}var cdt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._layers=[],r}return t.prototype.render=function(r,n,i){var a=r.getData(),o=this,s=this.group,l=r.getLayerSeries(),u=a.getLayout("layoutInfo"),f=u.rect,c=u.boundaryGap;s.x=0,s.y=f.y+c[0];function p(v){return v.name}var h=new Vr(this._layersSeries||[],l,p,p),d=[];h.add(Z(m,this,"add")).update(Z(m,this,"update")).remove(Z(m,this,"remove")).execute();function m(v,g,y){var x=o._layers;if(v==="remove"){s.remove(x[g]);return}for(var _=[],S=[],b,w=l[g].indices,T=0;Ta&&(a=s),n.push(s)}for(var u=0;ua&&(a=c)}return{y0:i,max:a}}function fE(e){e.registerChartView(xF),e.registerSeriesModel(_F),e.registerLayout(uE),e.registerProcessor(ba("themeRiver"))}var vdt=2,mdt=4,gdt=function(e){N(t,e);function t(r,n,i,a){var o=e.call(this)||this;o.z2=vdt,o.textConfig={inside:!0},ht(o).seriesIndex=n.seriesIndex;var s=new Lt({z2:mdt,silent:r.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,r,n,i,a),o}return t.prototype.updateData=function(r,n,i,a,o){this.node=n,n.piece=this,i=i||this._seriesModel,a=a||this._ecModel;var s=this;ht(s).dataIndex=n.dataIndex;var l=n.getModel(),u=l.getModel("emphasis"),f=n.getLayout(),c=V({},f);c.label=null;var p=n.getVisual("style");p.lineJoin="bevel";var h=n.getVisual("decal");h&&(p.decal=da(h,o));var d=ao(l.getModel("itemStyle"),c,!0);V(c,d),D(lr,function(y){var x=s.ensureState(y),_=l.getModel([y,"itemStyle"]);x.style=_.getItemStyle();var S=ao(_,c);S&&(x.shape=S)}),r?(s.setShape(c),s.shape.r=f.r0,Kt(s,{shape:{r:f.r}},i,n.dataIndex)):(Rt(s,{shape:c},i),er(s)),s.useStyle(p),this._updateLabel(i);var m=l.getShallow("cursor");m&&s.attr("cursor",m),this._seriesModel=i||this._seriesModel,this._ecModel=a||this._ecModel;var v=u.get("focus"),g=v==="ancestor"?n.getAncestorsIndices():v==="descendant"?n.getDescendantIndices():v;Zt(this,g,u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(r){var n=this,i=this.node.getModel(),a=i.getModel("label"),o=this.node.getLayout(),s=o.endAngle-o.startAngle,l=(o.startAngle+o.endAngle)/2,u=Math.cos(l),f=Math.sin(l),c=this,p=c.getTextContent(),h=this.node.dataIndex,d=a.get("minAngle")/180*Math.PI,m=a.get("show")&&!(d!=null&&Math.abs(s)Math.PI/2?"right":"left"):!P||P==="center"?(s===2*Math.PI&&o.r0===0?C=0:C=(o.r+o.r0)/2,P="center"):P==="left"?(C=o.r0+A,l>Math.PI/2&&(P="right")):P==="right"&&(C=o.r-A,l>Math.PI/2&&(P="left")),_.style.align=P,_.style.verticalAlign=v(y,"verticalAlign")||"middle",_.x=C*u+o.cx,_.y=C*f+o.cy;var L=v(y,"rotate"),I=0;L==="radial"?(I=sn(-l),I>Math.PI/2&&IMath.PI/2?I-=Math.PI:I<-Math.PI/2&&(I+=Math.PI)):Ct(L)&&(I=L*Math.PI/180),_.rotation=sn(I)});function v(g,y){var x=g.get(y);return x??a.get(y)}p.dirtyStyle()},t}(Ye),cE=gdt;var r_="sunburstRootToNode",SF="sunburstHighlight",ydt="sunburstUnhighlight";function wF(e){e.registerAction({type:r_,update:"updateView"},function(t,r){r.eachComponent({mainType:"series",subType:"sunburst",query:t},n);function n(i,a){var o=rs(t,[r_],i);if(o){var s=i.getViewRoot();s&&(t.direction=Cp(s,o.node)?"rollUp":"drillDown"),i.resetViewRoot(o.node)}}}),e.registerAction({type:SF,update:"none"},function(t,r,n){t=V({},t),r.eachComponent({mainType:"series",subType:"sunburst",query:t},i);function i(a){var o=rs(t,[SF],a);o&&(t.dataIndex=o.node.dataIndex)}n.dispatchAction(V(t,{type:"highlight"}))}),e.registerAction({type:ydt,update:"updateView"},function(t,r,n){t=V({},t),n.dispatchAction(V(t,{type:"downplay"}))})}var xdt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i,a){var o=this;this.seriesModel=r,this.api=i,this.ecModel=n;var s=r.getData(),l=s.tree.root,u=r.getViewRoot(),f=this.group,c=r.get("renderLabelForZeroData"),p=[];u.eachNode(function(y){p.push(y)});var h=this._oldChildren||[];d(p,h),g(l,u),this._initEvents(),this._oldChildren=p;function d(y,x){if(y.length===0&&x.length===0)return;new Vr(x,y,_,_).add(S).update(S).remove(pt(S,null)).execute();function _(b){return b.getId()}function S(b,w){var T=b==null?null:y[b],M=w==null?null:x[w];m(T,M)}}function m(y,x){if(!c&&y&&!y.getValue()&&(y=null),y!==l&&x!==l){if(x&&x.piece)y?(x.piece.updateData(!1,y,r,n,i),s.setItemGraphicEl(y.dataIndex,x.piece)):v(x);else if(y){var _=new cE(y,r,n,i);f.add(_),s.setItemGraphicEl(y.dataIndex,_)}}}function v(y){y&&y.piece&&(f.remove(y.piece),y.piece=null)}function g(y,x){x.depth>0?(o.virtualPiece?o.virtualPiece.updateData(!1,y,r,n,i):(o.virtualPiece=new cE(y,r,n,i),f.add(o.virtualPiece)),x.piece.off("click"),o.virtualPiece.on("click",function(_){o._rootToNode(x.parentNode)})):o.virtualPiece&&(f.remove(o.virtualPiece),o.virtualPiece=null)}},t.prototype._initEvents=function(){var r=this;this.group.off("click"),this.group.on("click",function(n){var i=!1,a=r.seriesModel.getViewRoot();a.eachNode(function(o){if(!i&&o.piece&&o.piece===n.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")r._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var f=l.get("target",!0)||"_blank";Xu(u,f)}}i=!0}})})},t.prototype._rootToNode=function(r){r!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:r_,from:this.uid,seriesId:this.seriesModel.id,targetNode:r})},t.prototype.containPoint=function(r,n){var i=n.getData(),a=i.getItemLayout(0);if(a){var o=r[0]-a.cx,s=r[1]-a.cy,l=Math.sqrt(o*o+s*s);return l<=a.r&&l>=a.r0}},t.type="sunburst",t}(Vt),TF=xdt;var _dt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.ignoreStyleOnData=!0,r}return t.prototype.getInitialData=function(r,n){var i={name:r.name,children:r.data};MF(i);var a=this._levelModels=F(r.levels||[],function(l){return new Ht(l,this,n)},this),o=Ap.createTree(i,this,s);function s(l){l.wrapMethod("getItemModel",function(u,f){var c=o.getNodeByDataIndex(f),p=a[c.depth];return p&&(u.parentModel=p),u})}return o.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.getDataParams=function(r){var n=e.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(r);return n.treePathInfo=vl(i,this),n},t.prototype.getLevelModel=function(r){return this._levelModels&&this._levelModels[r.depth]},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(r){r?this._viewRoot=r:r=this._viewRoot;var n=this.getRawData().tree.root;(!r||r!==n&&!n.contains(r))&&(this._viewRoot=n)},t.prototype.enableAriaDecal=function(){Qv(this)},t.type="series.sunburst",t.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},t}(Wt);function MF(e){var t=0;D(e.children,function(n){MF(n);var i=n.value;B(i)&&(i=i[0]),t+=i});var r=e.value;B(r)&&(r=r[0]),(r==null||isNaN(r))&&(r=t),r<0&&(r=0),B(e.value)?e.value[0]=r:e.value=r}var AF=_dt;var CF=Math.PI/180;function pE(e,t,r){t.eachSeriesByType(e,function(n){var i=n.get("center"),a=n.get("radius");B(a)||(a=[0,a]),B(i)||(i=[i,i]);var o=r.getWidth(),s=r.getHeight(),l=Math.min(o,s),u=q(i[0],o),f=q(i[1],s),c=q(a[0],l/2),p=q(a[1],l/2),h=-n.get("startAngle")*CF,d=n.get("minAngle")*CF,m=n.getData().tree.root,v=n.getViewRoot(),g=v.depth,y=n.get("sort");y!=null&&DF(v,y);var x=0;D(v.children,function(R){!isNaN(R.getValue())&&x++});var _=v.getValue(),S=Math.PI/(_||x)*2,b=v.depth>0,w=v.height-(b?-1:1),T=(p-c)/(w||1),M=n.get("clockwise"),C=n.get("stillShowZeroSum"),A=M?1:-1,P=function(R,k){if(R){var O=k;if(R!==m){var z=R.getValue(),U=_===0&&C?S:z*S;U1;)o=o.parentNode;var s=i.getColorFromPalette(o.name||o.dataIndex+"",t);return n.depth>1&&H(s)&&(s=wd(s,(n.depth-1)/(a-1)*.5)),s}e.eachSeriesByType("sunburst",function(n){var i=n.getData(),a=i.tree;a.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=r(o,n,a.root.height));var u=i.ensureUniqueItemVisual(o.dataIndex,"style");V(u,l)})})}function dE(e){e.registerChartView(TF),e.registerSeriesModel(AF),e.registerLayout(pt(pE,"sunburst")),e.registerProcessor(pt(ba,"sunburst")),e.registerVisual(hE),wF(e)}var vE={color:"fill",borderColor:"stroke"},EF={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},lo=yt(),Sdt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},t.prototype.getInitialData=function(r,n){return Tr(null,this)},t.prototype.getDataParams=function(r,n,i){var a=e.prototype.getDataParams.call(this,r,n);return i&&(a.info=lo(i).info),a},t.type="series.custom",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},t}(Wt),IF=Sdt;function wdt(e,t){return t=t||[0,0],F(["x","y"],function(r,n){var i=this.getAxis(r),a=t[n],o=e[n]/2;return i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(a-o)-i.dataToCoord(a+o))},this)}function mE(e){var t=e.master.getRect();return{coordSys:{type:"cartesian2d",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(r){return e.dataToPoint(r)},size:Z(wdt,e)}}}function Tdt(e,t){return t=t||[0,0],F([0,1],function(r){var n=t[r],i=e[r]/2,a=[],o=[];return a[r]=n-i,o[r]=n+i,a[1-r]=o[1-r]=t[1-r],Math.abs(this.dataToPoint(a)[r]-this.dataToPoint(o)[r])},this)}function gE(e){var t=e.getBoundingRect();return{coordSys:{type:"geo",x:t.x,y:t.y,width:t.width,height:t.height,zoom:e.getZoom()},api:{coord:function(r){return e.dataToPoint(r)},size:Z(Tdt,e)}}}function Mdt(e,t){var r=this.getAxis(),n=t instanceof Array?t[0]:t,i=(e instanceof Array?e[0]:e)/2;return r.type==="category"?r.getBandWidth():Math.abs(r.dataToCoord(n-i)-r.dataToCoord(n+i))}function yE(e){var t=e.getRect();return{coordSys:{type:"singleAxis",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(r){return e.dataToPoint(r)},size:Z(Mdt,e)}}}function Adt(e,t){return t=t||[0,0],F(["Radius","Angle"],function(r,n){var i="get"+r+"Axis",a=this[i](),o=t[n],s=e[n]/2,l=a.type==="category"?a.getBandWidth():Math.abs(a.dataToCoord(o-s)-a.dataToCoord(o+s));return r==="Angle"&&(l=l*Math.PI/180),l},this)}function xE(e){var t=e.getRadiusAxis(),r=e.getAngleAxis(),n=t.getExtent();return n[0]>n[1]&&n.reverse(),{coordSys:{type:"polar",cx:e.cx,cy:e.cy,r:n[1],r0:n[0]},api:{coord:function(i){var a=t.dataToRadius(i[0]),o=r.dataToAngle(i[1]),s=e.coordToPoint([a,o]);return s.push(a,o*Math.PI/180),s},size:Z(Adt,e)}}}function _E(e){var t=e.getRect(),r=e.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:e.getCellWidth(),cellHeight:e.getCellHeight(),rangeInfo:{start:r.start,end:r.end,weeks:r.weeks,dayCount:r.allDay}},api:{coord:function(n,i){return e.dataToPoint(n,i)}}}}function n_(e,t,r,n){return e&&(e.legacy||e.legacy!==!1&&!r&&!n&&t!=="tspan"&&(t==="text"||st(e,"text")))}function i_(e,t,r){var n=e,i,a,o;if(t==="text")o=n;else{o={},st(n,"text")&&(o.text=n.text),st(n,"rich")&&(o.rich=n.rich),st(n,"textFill")&&(o.fill=n.textFill),st(n,"textStroke")&&(o.stroke=n.textStroke),st(n,"fontFamily")&&(o.fontFamily=n.fontFamily),st(n,"fontSize")&&(o.fontSize=n.fontSize),st(n,"fontStyle")&&(o.fontStyle=n.fontStyle),st(n,"fontWeight")&&(o.fontWeight=n.fontWeight),a={type:"text",style:o,silent:!0},i={};var s=st(n,"textPosition");r?i.position=s?n.textPosition:"inside":s&&(i.position=n.textPosition),st(n,"textPosition")&&(i.position=n.textPosition),st(n,"textOffset")&&(i.offset=n.textOffset),st(n,"textRotation")&&(i.rotation=n.textRotation),st(n,"textDistance")&&(i.distance=n.textDistance)}return LF(o,e),D(o.rich,function(l){LF(l,l)}),{textConfig:i,textContent:a}}function LF(e,t){t&&(t.font=t.textFont||t.font,st(t,"textStrokeWidth")&&(e.lineWidth=t.textStrokeWidth),st(t,"textAlign")&&(e.align=t.textAlign),st(t,"textVerticalAlign")&&(e.verticalAlign=t.textVerticalAlign),st(t,"textLineHeight")&&(e.lineHeight=t.textLineHeight),st(t,"textWidth")&&(e.width=t.textWidth),st(t,"textHeight")&&(e.height=t.textHeight),st(t,"textBackgroundColor")&&(e.backgroundColor=t.textBackgroundColor),st(t,"textPadding")&&(e.padding=t.textPadding),st(t,"textBorderColor")&&(e.borderColor=t.textBorderColor),st(t,"textBorderWidth")&&(e.borderWidth=t.textBorderWidth),st(t,"textBorderRadius")&&(e.borderRadius=t.textBorderRadius),st(t,"textBoxShadowColor")&&(e.shadowColor=t.textBoxShadowColor),st(t,"textBoxShadowBlur")&&(e.shadowBlur=t.textBoxShadowBlur),st(t,"textBoxShadowOffsetX")&&(e.shadowOffsetX=t.textBoxShadowOffsetX),st(t,"textBoxShadowOffsetY")&&(e.shadowOffsetY=t.textBoxShadowOffsetY))}function bE(e,t,r){var n=e;n.textPosition=n.textPosition||r.position||"inside",r.offset!=null&&(n.textOffset=r.offset),r.rotation!=null&&(n.textRotation=r.rotation),r.distance!=null&&(n.textDistance=r.distance);var i=n.textPosition.indexOf("inside")>=0,a=e.fill||"#000";PF(n,t);var o=n.textFill==null;return i?o&&(n.textFill=r.insideFill||"#fff",!n.textStroke&&r.insideStroke&&(n.textStroke=r.insideStroke),!n.textStroke&&(n.textStroke=a),n.textStrokeWidth==null&&(n.textStrokeWidth=2)):(o&&(n.textFill=e.fill||r.outsideFill||"#000"),!n.textStroke&&r.outsideStroke&&(n.textStroke=r.outsideStroke)),n.text=t.text,n.rich=t.rich,D(t.rich,function(s){PF(s,s)}),n}function PF(e,t){t&&(st(t,"fill")&&(e.textFill=t.fill),st(t,"stroke")&&(e.textStroke=t.fill),st(t,"lineWidth")&&(e.textStrokeWidth=t.lineWidth),st(t,"font")&&(e.font=t.font),st(t,"fontStyle")&&(e.fontStyle=t.fontStyle),st(t,"fontWeight")&&(e.fontWeight=t.fontWeight),st(t,"fontSize")&&(e.fontSize=t.fontSize),st(t,"fontFamily")&&(e.fontFamily=t.fontFamily),st(t,"align")&&(e.textAlign=t.align),st(t,"verticalAlign")&&(e.textVerticalAlign=t.verticalAlign),st(t,"lineHeight")&&(e.textLineHeight=t.lineHeight),st(t,"width")&&(e.textWidth=t.width),st(t,"height")&&(e.textHeight=t.height),st(t,"backgroundColor")&&(e.textBackgroundColor=t.backgroundColor),st(t,"padding")&&(e.textPadding=t.padding),st(t,"borderColor")&&(e.textBorderColor=t.borderColor),st(t,"borderWidth")&&(e.textBorderWidth=t.borderWidth),st(t,"borderRadius")&&(e.textBorderRadius=t.borderRadius),st(t,"shadowColor")&&(e.textBoxShadowColor=t.shadowColor),st(t,"shadowBlur")&&(e.textBoxShadowBlur=t.shadowBlur),st(t,"shadowOffsetX")&&(e.textBoxShadowOffsetX=t.shadowOffsetX),st(t,"shadowOffsetY")&&(e.textBoxShadowOffsetY=t.shadowOffsetY),st(t,"textShadowColor")&&(e.textShadowColor=t.textShadowColor),st(t,"textShadowBlur")&&(e.textShadowBlur=t.textShadowBlur),st(t,"textShadowOffsetX")&&(e.textShadowOffsetX=t.textShadowOffsetX),st(t,"textShadowOffsetY")&&(e.textShadowOffsetY=t.textShadowOffsetY))}var OF={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},RF=St(OF),_qt=Pr(ri,function(e,t){return e[t]=1,e},{}),bqt=ri.join(", "),cm=["","style","shape","extra"],Bp=yt();function SE(e,t,r,n,i){var a=e+"Animation",o=ja(e,n,i)||{},s=Bp(t).userDuring;return o.duration>0&&(o.during=s?Z(Ldt,{el:t,userDuring:s}):null,o.setToFinal=!0,o.scope=e),V(o,r[a]),o}function Fp(e,t,r,n){n=n||{};var i=n.dataIndex,a=n.isInit,o=n.clearStyle,s=r.isAnimationEnabled(),l=Bp(e),u=t.style;l.userDuring=t.during;var f={},c={};if(Rdt(e,t,c),kF("shape",t,c),kF("extra",t,c),!a&&s&&(Pdt(e,t,f),NF("shape",e,t,f),NF("extra",e,t,f),Ndt(e,t,u,f)),c.style=u,Cdt(e,c,o),Edt(e,t),s)if(a){var p={};D(cm,function(d){var m=d?t[d]:t;m&&m.enterFrom&&(d&&(p[d]=p[d]||{}),V(d?p[d]:p,m.enterFrom))});var h=SE("enter",e,t,r,i);h.duration>0&&e.animateFrom(p,h)}else Ddt(e,t,i||0,r,f);wE(e,t),u?e.dirty():e.markRedraw()}function wE(e,t){for(var r=Bp(e).leaveToProps,n=0;n0&&e.animateFrom(i,a)}}function Edt(e,t){st(t,"silent")&&(e.silent=t.silent),st(t,"ignore")&&(e.ignore=t.ignore),e instanceof We&&st(t,"invisible")&&(e.invisible=t.invisible),e instanceof vt&&st(t,"autoBatch")&&(e.autoBatch=t.autoBatch)}var uo={},Idt={setTransform:function(e,t){return uo.el[e]=t,this},getTransform:function(e){return uo.el[e]},setShape:function(e,t){var r=uo.el,n=r.shape||(r.shape={});return n[e]=t,r.dirtyShape&&r.dirtyShape(),this},getShape:function(e){var t=uo.el.shape;if(t)return t[e]},setStyle:function(e,t){var r=uo.el,n=r.style;return n&&(n[e]=t,r.dirtyStyle&&r.dirtyStyle()),this},getStyle:function(e){var t=uo.el.style;if(t)return t[e]},setExtra:function(e,t){var r=uo.el.extra||(uo.el.extra={});return r[e]=t,this},getExtra:function(e){var t=uo.el.extra;if(t)return t[e]}};function Ldt(){var e=this,t=e.el;if(t){var r=Bp(t).userDuring,n=e.userDuring;if(r!==n){e.el=e.userDuring=null;return}uo.el=t,n(Idt)}}function NF(e,t,r,n){var i=r[e];if(i){var a=t[e],o;if(a){var s=r.transition,l=i.transition;if(l)if(!o&&(o=n[e]={}),yl(l))V(o,a);else for(var u=Yt(l),f=0;f=0){!o&&(o=n[e]={});for(var h=St(a),f=0;f=0)){var p=e.getAnimationStyleProps(),h=p?p.style:null;if(h){!a&&(a=n.style={});for(var d=St(r),u=0;u=0?t.getStore().get(k,E):void 0}var O=t.get(R.name,E),z=R&&R.ordinalMeta;return z?z.categories[O]:O}function b(I,E){E==null&&(E=u);var R=t.getItemVisual(E,"style"),k=R&&R.fill,O=R&&R.opacity,z=y(E,xl).getItemStyle();k!=null&&(z.fill=k),O!=null&&(z.opacity=O);var U={inheritColor:H(k)?k:"#000"},G=x(E,xl),Y=Qt(G,null,U,!1,!0);Y.text=G.getShallow("show")?bt(e.getFormattedLabel(E,xl),xa(t,E)):null;var et=Qd(G,U,!1);return M(I,z),z=bE(z,Y,et),I&&T(z,I),z.legacy=!0,z}function w(I,E){E==null&&(E=u);var R=y(E,is).getItemStyle(),k=x(E,is),O=Qt(k,null,null,!0,!0);O.text=k.getShallow("show")?cr(e.getFormattedLabel(E,is),e.getFormattedLabel(E,xl),xa(t,E)):null;var z=Qd(k,null,!0);return M(I,R),R=bE(R,O,z),I&&T(R,I),R.legacy=!0,R}function T(I,E){for(var R in E)st(E,R)&&(I[R]=E[R])}function M(I,E){I&&(I.textFill&&(E.textFill=I.textFill),I.textPosition&&(E.textPosition=I.textPosition))}function C(I,E){if(E==null&&(E=u),st(vE,I)){var R=t.getItemVisual(E,"style");return R?R[vE[I]]:null}if(st(EF,I))return t.getItemVisual(E,I)}function A(I){if(a.type==="cartesian2d"){var E=a.getBaseAxis();return DU(J({axis:E},I))}}function P(){return r.getCurrentSeriesIndices()}function L(I){return L0(I,r)}}function Wdt(e){var t={};return D(e.dimensions,function(r){var n=e.getDimensionInfo(r);if(!n.isExtraCoord){var i=n.coordDim,a=t[i]=t[i]||[];a[n.coordDimIndex]=e.getDimensionIndex(r)}}),t}function AE(e,t,r,n,i,a,o){if(!n){a.remove(t);return}var s=RE(e,t,r,n,i,a);return s&&o.setItemGraphicEl(r,s),s&&Zt(s,n.focus,n.blurScope,n.emphasisDisabled),s}function RE(e,t,r,n,i,a){var o=-1,s=t;t&&WF(t,n,i)&&(o=gt(a.childrenRef(),t),t=null);var l=!t,u=t;u?u.clearStates():(u=LE(n),s&&Bdt(s,u)),n.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),Ui.normal.cfg=Ui.normal.conOpt=Ui.emphasis.cfg=Ui.emphasis.conOpt=Ui.blur.cfg=Ui.blur.conOpt=Ui.select.cfg=Ui.select.conOpt=null,Ui.isLegacy=!1,Xdt(u,r,n,i,l,Ui),Ydt(u,r,n,i,l),PE(e,u,r,n,Ui,i,l),st(n,"info")&&(lo(u).info=n.info);for(var f=0;f<_l.length;f++){var c=_l[f];if(c!==xl){var p=o_(n,c),h=NE(n,p,c);HF(c,u,p,h,Ui)}}return Gdt(u,n,i),n.type==="group"&&qdt(e,u,r,n,i),o>=0?a.replaceAt(u,o):a.add(u),u}function WF(e,t,r){var n=lo(e),i=t.type,a=t.shape,o=t.style;return r.isUniversalTransitionEnabled()||i!=null&&i!==n.customGraphicType||i==="path"&&jdt(a)&&YF(a)!==n.customPathData||i==="image"&&st(o,"image")&&o.image!==n.customImagePath}function Ydt(e,t,r,n,i){var a=r.clipPath;if(a===!1)e&&e.getClipPath()&&e.removeClipPath();else if(a){var o=e.getClipPath();o&&WF(o,a,n)&&(o=null),o||(o=LE(a),e.setClipPath(o)),PE(null,o,t,a,null,n,i)}}function Xdt(e,t,r,n,i,a){if(!e.isGroup){VF(r,null,a),VF(r,is,a);var o=a.normal.conOpt,s=a.emphasis.conOpt,l=a.blur.conOpt,u=a.select.conOpt;if(o!=null||s!=null||u!=null||l!=null){var f=e.getTextContent();if(o===!1)f&&e.removeTextContent();else{o=a.normal.conOpt=o||{type:"text"},f?f.clearStates():(f=LE(o),e.setTextContent(f)),PE(null,f,t,o,null,n,i);for(var c=o&&o.style,p=0;p<_l.length;p++){var h=_l[p];if(h!==xl){var d=a[h].conOpt;HF(h,f,d,NE(o,d,h),null)}}c?f.dirty():f.markRedraw()}}}}function VF(e,t,r){var n=t?o_(e,t):e,i=t?NE(e,n,is):e.style,a=e.type,o=n?n.textConfig:null,s=e.textContent,l=s?t?o_(s,t):s:null;if(i&&(r.isLegacy||n_(i,a,!!o,!!l))){r.isLegacy=!0;var u=i_(i,a,!t);!o&&u.textConfig&&(o=u.textConfig),!l&&u.textContent&&(l=u.textContent)}if(!t&&l){var f=l;!f.type&&(f.type="text")}var c=t?r[t]:r.normal;c.cfg=o,c.conOpt=l}function o_(e,t){return t?e?e[t]:null:e}function NE(e,t,r){var n=t&&t.style;return n==null&&r===is&&e&&(n=e.styleEmphasis),n}function qdt(e,t,r,n,i){var a=n.children,o=a?a.length:0,s=n.$mergeChildren,l=s==="byName"||n.diffChildrenByName,u=s===!1;if(!(!o&&!l&&!u)){if(l){Kdt({api:e,oldChildren:t.children()||[],newChildren:a||[],dataIndex:r,seriesModel:i,group:t});return}u&&t.removeAll();for(var f=0;f=f;h--){var d=t.childAt(h);Zdt(t,d,i)}}}function Zdt(e,t,r){t&&Gp(t,lo(e).option,r)}function Kdt(e){new Vr(e.oldChildren,e.newChildren,BF,BF,e).add(FF).update(FF).remove($dt).execute()}function BF(e,t){var r=e&&e.name;return r??Udt+t}function FF(e,t){var r=this.context,n=e!=null?r.newChildren[e]:null,i=t!=null?r.oldChildren[t]:null;RE(r.api,i,r.dataIndex,n,r.seriesModel,r.group)}function $dt(e){var t=this.context,r=t.oldChildren[e];r&&Gp(r,lo(r).option,t.seriesModel)}function YF(e){return e&&(e.pathData||e.d)}function jdt(e){return e&&(st(e,"pathData")||st(e,"d"))}function kE(e){e.registerChartView(GF),e.registerSeriesModel(IF)}var gf=yt(),XF=at,OE=Z,Qdt=function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(t,r,n,i){var a=r.get("value"),o=r.get("status");if(this._axisModel=t,this._axisPointerModel=r,this._api=n,!(!i&&this._lastValue===a&&this._lastStatus===o)){this._lastValue=a,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,a,t,r,n);var f=u.graphicKey;f!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=f;var c=this._moveAnimation=this.determineAnimation(t,r);if(!s)s=this._group=new nt,this.createPointerEl(s,u,t,r),this.createLabelEl(s,u,t,r),n.getZr().add(s);else{var p=pt(qF,r,c);this.updatePointerEl(s,u,p),this.updateLabelEl(s,u,p,r)}KF(s,r,!0),this._renderHandle(a)}},e.prototype.remove=function(t){this.clear(t)},e.prototype.dispose=function(t){this.clear(t)},e.prototype.determineAnimation=function(t,r){var n=r.get("animation"),i=t.axis,a=i.type==="category",o=r.get("snap");if(!o&&!a)return!1;if(n==="auto"||n==null){var s=this.animationThreshold;if(a&&i.getBandWidth()>s)return!0;if(o){var l=S1(t).seriesDataCount,u=i.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return n===!0},e.prototype.makeElOption=function(t,r,n,i,a){},e.prototype.createPointerEl=function(t,r,n,i){var a=r.pointer;if(a){var o=gf(t).pointerEl=new Et[a.type](XF(r.pointer));t.add(o)}},e.prototype.createLabelEl=function(t,r,n,i){if(r.label){var a=gf(t).labelEl=new Lt(XF(r.label));t.add(a),ZF(a,i)}},e.prototype.updatePointerEl=function(t,r,n){var i=gf(t).pointerEl;i&&r.pointer&&(i.setStyle(r.pointer.style),n(i,{shape:r.pointer.shape}))},e.prototype.updateLabelEl=function(t,r,n,i){var a=gf(t).labelEl;a&&(a.setStyle(r.label.style),n(a,{x:r.label.x,y:r.label.y}),ZF(a,i))},e.prototype._renderHandle=function(t){if(!(this._dragging||!this.updateHandleTransform)){var r=this._axisPointerModel,n=this._api.getZr(),i=this._handle,a=r.getModel("handle"),o=r.get("status");if(!a.get("show")||!o||o==="hide"){i&&n.remove(i),this._handle=null;return}var s;this._handle||(s=!0,i=this._handle=Yo(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){Mn(u.event)},onmousedown:OE(this._onHandleDragMove,this,0,0),drift:OE(this._onHandleDragMove,this),ondragend:OE(this._onHandleDragEnd,this)}),n.add(i)),KF(i,r,!1),i.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=a.get("size");B(l)||(l=[l,l]),i.scaleX=l[0]/2,i.scaleY=l[1]/2,Li(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,s)}},e.prototype._moveHandleToValue=function(t,r){qF(this._axisPointerModel,!r&&this._moveAnimation,this._handle,zE(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(t,r){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(zE(n),[t,r],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(zE(i)),gf(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){var t=this._handle;if(t){var r=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:r.cursorPoint[0],y:r.cursorPoint[1],tooltipOption:r.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){this._dragging=!1;var t=this._handle;if(t){var r=this._axisPointerModel.get("value");this._moveHandleToValue(r),this._api.dispatchAction({type:"hideTip"})}},e.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var r=t.getZr(),n=this._group,i=this._handle;r&&n&&(this._lastGraphicKey=null,n&&r.remove(n),i&&r.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),Qo(this,"_doDispatchAxisPointer")},e.prototype.doClear=function(){},e.prototype.buildLabel=function(t,r,n){return n=n||0,{x:t[n],y:t[1-n],width:r[n],height:r[1-n]}},e}();function qF(e,t,r,n){$F(gf(r).lastProp,n)||(gf(r).lastProp=n,t?Rt(r,n,e):(r.stopAnimation(),r.attr(n)))}function $F(e,t){if(rt(e)&&rt(t)){var r=!0;return D(t,function(n,i){r=r&&$F(e[i],n)}),!!r}else return e===t}function ZF(e,t){e[t.get(["label","show"])?"show":"hide"]()}function zE(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function KF(e,t,r){var n=t.get("z"),i=t.get("zlevel");e&&e.traverse(function(a){a.type!=="group"&&(n!=null&&(a.z=n),i!=null&&(a.zlevel=i),a.silent=r)})}var Wp=Qdt;function Yp(e){var t=e.get("type"),r=e.getModel(t+"Style"),n;return t==="line"?(n=r.getLineStyle(),n.fill=null):t==="shadow"&&(n=r.getAreaStyle(),n.stroke=null),n}function UE(e,t,r,n,i){var a=r.get("value"),o=VE(a,t.axis,t.ecModel,r.get("seriesDataIndices"),{precision:r.get(["label","precision"]),formatter:r.get(["label","formatter"])}),s=r.getModel("label"),l=la(s.get("padding")||0),u=s.getFont(),f=Ga(o,u),c=i.position,p=f.width+l[1]+l[3],h=f.height+l[0]+l[2],d=i.align;d==="right"&&(c[0]-=p),d==="center"&&(c[0]-=p/2);var m=i.verticalAlign;m==="bottom"&&(c[1]-=h),m==="middle"&&(c[1]-=h/2),Jdt(c,p,h,n);var v=s.get("backgroundColor");(!v||v==="auto")&&(v=t.get(["axisLine","lineStyle","color"])),e.label={x:c[0],y:c[1],style:Qt(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:v}),z2:10}}function Jdt(e,t,r,n){var i=n.getWidth(),a=n.getHeight();e[0]=Math.min(e[0]+t,i)-t,e[1]=Math.min(e[1]+r,a)-r,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}function VE(e,t,r,n,i){e=t.scale.parse(e);var a=t.scale.getLabel({value:e},{precision:i.precision}),o=i.formatter;if(o){var s={value:zv(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};D(n,function(l){var u=r.getSeriesByIndex(l.seriesIndex),f=l.dataIndexInside,c=u&&u.getDataParams(f);c&&s.seriesData.push(c)}),H(o)?a=o.replace("{value}",a):j(o)&&(a=o(s))}return a}function pm(e,t,r){var n=tr();return Cn(n,n,r.rotation),Nr(n,n,r.position),Or([e.dataToCoord(t),(r.labelOffset||0)+(r.labelDirection||1)*(r.labelMargin||0)],n)}function s_(e,t,r,n,i,a){var o=Br.innerTextLayout(r.rotation,0,r.labelDirection);r.labelMargin=i.get(["label","margin"]),UE(t,n,i,a,{position:pm(n.axis,e,r),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function Xp(e,t,r){return r=r||0,{x1:e[r],y1:e[1-r],x2:t[r],y2:t[1-r]}}function l_(e,t,r){return r=r||0,{x:e[r],y:e[1-r],width:t[r],height:t[1-r]}}function BE(e,t,r,n,i,a){return{cx:e,cy:t,r0:r,r:n,startAngle:i,endAngle:a,clockwise:!0}}var tvt=function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis,l=s.grid,u=a.get("type"),f=jF(l,s).getOtherAxis(s).getGlobalExtent(),c=s.toGlobalCoord(s.dataToCoord(n,!0));if(u&&u!=="none"){var p=Yp(a),h=evt[u](s,c,f);h.style=p,r.graphicKey=h.type,r.pointer=h}var d=Zv(l.model,i);s_(n,r,d,i,a,o)},t.prototype.getHandleTransform=function(r,n,i){var a=Zv(n.axis.grid.model,n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=pm(n.axis,r,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(r,n,i,a){var o=i.axis,s=o.grid,l=o.getGlobalExtent(!0),u=jF(s,o).getOtherAxis(o).getGlobalExtent(),f=o.dim==="x"?0:1,c=[r.x,r.y];c[f]+=n[f],c[f]=Math.min(l[1],c[f]),c[f]=Math.max(l[0],c[f]);var p=(u[1]+u[0])/2,h=[p,p];h[f]=c[f];var d=[{verticalAlign:"middle"},{align:"center"}];return{x:c[0],y:c[1],rotation:r.rotation,cursorPoint:h,tooltipOption:d[f]}},t}(Wp);function jF(e,t){var r={};return r[t.dim+"AxisIndex"]=t.index,e.getCartesian(r)}var evt={line:function(e,t,r){var n=Xp([t,r[0]],[t,r[1]],QF(e));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(e,t,r){var n=Math.max(1,e.getBandWidth()),i=r[1]-r[0];return{type:"Rect",shape:l_([t-n/2,r[0]],[n,i],QF(e))}}};function QF(e){return e.dim==="x"?0:1}var JF=tvt;var rvt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="axisPointer",t.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#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}},t}(Pt),t9=rvt;var as=yt(),nvt=D;function f_(e,t,r){if(!Ot.node){var n=t.getZr();as(n).records||(as(n).records={}),ivt(n,t);var i=as(n).records[e]||(as(n).records[e]={});i.handler=r}}function ivt(e,t){if(as(e).initialized)return;as(e).initialized=!0,r("click",pt(e9,"click")),r("mousemove",pt(e9,"mousemove")),r("globalout",ovt);function r(n,i){e.on(n,function(a){var o=svt(t);nvt(as(e).records,function(s){s&&i(s,a,o.dispatchAction)}),avt(o.pendings,t)})}}function avt(e,t){var r=e.showTip.length,n=e.hideTip.length,i;r?i=e.showTip[r-1]:n&&(i=e.hideTip[n-1]),i&&(i.dispatchAction=null,t.dispatchAction(i))}function ovt(e,t,r){e.handler("leave",null,r)}function e9(e,t,r,n){t.handler(e,r,n)}function svt(e){var t={showTip:[],hideTip:[]},r=function(n){var i=t[n.type];i?i.push(n):(n.dispatchAction=r,e.dispatchAction(n))};return{dispatchAction:r,pendings:t}}function hm(e,t){if(!Ot.node){var r=t.getZr(),n=(as(r).records||{})[e];n&&(as(r).records[e]=null)}}var lvt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a=n.getComponent("tooltip"),o=r.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click";f_("axisPointer",i,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},t.prototype.remove=function(r,n){hm("axisPointer",n)},t.prototype.dispose=function(r,n){hm("axisPointer",n)},t.type="axisPointer",t}(Xt),n9=lvt;function dm(e,t){var r=[],n=e.seriesIndex,i;if(n==null||!(i=t.getSeriesByIndex(n)))return{point:[]};var a=i.getData(),o=wi(a,e);if(o==null||o<0||B(o))return{point:[]};var s=a.getItemGraphicEl(o),l=i.coordinateSystem;if(i.getTooltipPosition)r=i.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(e.isStacked){var u=l.getBaseAxis(),f=l.getOtherAxis(u),c=f.dim,p=u.dim,h=c==="x"||c==="radius"?1:0,d=a.mapDimension(p),m=[];m[h]=a.get(d,o),m[1-h]=a.get(a.getCalculationInfo("stackResultDimension"),o),r=l.dataToPoint(m)||[]}else r=l.dataToPoint(a.getValues(F(l.dimensions,function(g){return a.mapDimension(g)}),o))||[];else if(s){var v=s.getBoundingRect().clone();v.applyTransform(s.transform),r=[v.x+v.width/2,v.y+v.height/2]}return{point:r,el:s}}var i9=yt();function FE(e,t,r){var n=e.currTrigger,i=[e.x,e.y],a=e,o=e.dispatchAction||Z(r.dispatchAction,r),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){c_(i)&&(i=dm({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var l=c_(i),u=a.axesInfo,f=s.axesInfo,c=n==="leave"||c_(i),p={},h={},d={list:[],map:{}},m={showPointer:pt(fvt,h),showTooltip:pt(cvt,d)};D(s.coordSysMap,function(g,y){var x=l||g.containPoint(i);D(s.coordSysAxesInfo[y],function(_,S){var b=_.axis,w=vvt(u,_);if(!c&&x&&(!u||w)){var T=w&&w.value;T==null&&!l&&(T=b.pointToData(i)),T!=null&&a9(_,T,m,!1,p)}})});var v={};return D(f,function(g,y){var x=g.linkGroup;x&&!h[y]&&D(x.axesInfo,function(_,S){var b=h[S];if(_!==g&&b){var w=b.value;x.mapper&&(w=g.axis.scale.parse(x.mapper(w,o9(_),o9(g)))),v[g.key]=w}})}),D(v,function(g,y){a9(f[y],g,m,!0,p)}),pvt(h,f,p),hvt(d,i,e,o),dvt(f,o,r),p}}function a9(e,t,r,n,i){var a=e.axis;if(!(a.scale.isBlank()||!a.containData(t))){if(!e.involveSeries){r.showPointer(e,t);return}var o=uvt(t,e),s=o.payloadBatch,l=o.snapToValue;s[0]&&i.seriesIndex==null&&V(i,s[0]),!n&&e.snap&&a.containData(l)&&l!=null&&(t=l),r.showPointer(e,t,s),r.showTooltip(e,o,l)}}function uvt(e,t){var r=t.axis,n=r.dim,i=e,a=[],o=Number.MAX_VALUE,s=-1;return D(t.seriesModels,function(l,u){var f=l.getData().mapDimensionsAll(n),c,p;if(l.getAxisTooltipData){var h=l.getAxisTooltipData(f,e,r);p=h.dataIndices,c=h.nestestValue}else{if(p=l.getData().indicesOfNearest(f[0],e,r.type==="category"?.5:null),!p.length)return;c=l.getData().get(f[0],p[0])}if(!(c==null||!isFinite(c))){var d=e-c,m=Math.abs(d);m<=o&&((m=0&&s<0)&&(o=m,s=d,i=c,a.length=0),D(p,function(v){a.push({seriesIndex:l.seriesIndex,dataIndexInside:v,dataIndex:l.getData().getRawIndex(v)})}))}}),{payloadBatch:a,snapToValue:i}}function fvt(e,t,r,n){e[t.key]={value:r,payloadBatch:n}}function cvt(e,t,r,n){var i=r.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(!(!t.triggerTooltip||!i.length)){var l=t.coordSys.model,u=Sp(l),f=e.map[u];f||(f=e.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},e.list.push(f)),f.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:n,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:i.slice()})}}function pvt(e,t,r){var n=r.axesInfo=[];D(t,function(i,a){var o=i.axisPointerModel.option,s=e[a];s?(!i.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!i.useHandle&&(o.status="hide"),o.status==="show"&&n.push({axisDim:i.axis.dim,axisIndex:i.axis.model.componentIndex,value:o.value})})}function hvt(e,t,r,n){if(c_(t)||!e.list.length){n({type:"hideTip"});return}var i=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:r.tooltipOption,position:r.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:e.list})}function dvt(e,t,r){var n=r.getZr(),i="axisPointerLastHighlights",a=i9(n)[i]||{},o=i9(n)[i]={};D(e,function(u,f){var c=u.axisPointerModel.option;c.status==="show"&&u.triggerEmphasis&&D(c.seriesDataIndices,function(p){var h=p.seriesIndex+" | "+p.dataIndex;o[h]=p})});var s=[],l=[];D(a,function(u,f){!o[f]&&l.push(u)}),D(o,function(u,f){!a[f]&&s.push(u)}),l.length&&r.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&r.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function vvt(e,t){for(var r=0;r<(e||[]).length;r++){var n=e[r];if(t.axis.dim===n.axisDim&&t.axis.model.componentIndex===n.axisIndex)return n}}function o9(e){var t=e.axis.model,r={},n=r.axisDim=e.axis.dim;return r.axisIndex=r[n+"AxisIndex"]=t.componentIndex,r.axisName=r[n+"AxisName"]=t.name,r.axisId=r[n+"AxisId"]=t.id,r}function c_(e){return!e||e[0]==null||isNaN(e[0])||e[1]==null||isNaN(e[1])}function wa(e){Gn.registerAxisPointerClass("CartesianAxisPointer",JF),e.registerComponentModel(t9),e.registerComponentView(n9),e.registerPreprocessor(function(t){if(t){(!t.axisPointer||t.axisPointer.length===0)&&(t.axisPointer={});var r=t.axisPointer.link;r&&!B(r)&&(t.axisPointer.link=[r])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,function(t,r){t.getComponent("axisPointer").coordSysAxesInfo=R6(t,r)}),e.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},FE)}function GE(e){Nt(M1),Nt(wa)}var mvt=function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),f=u.getExtent(),c=s.dataToCoord(n),p=a.get("type");if(p&&p!=="none"){var h=Yp(a),d=yvt[p](s,l,c,f);d.style=h,r.graphicKey=d.type,r.pointer=d}var m=a.get(["label","margin"]),v=gvt(n,i,a,l,m);UE(r,i,a,o,v)},t}(Wp);function gvt(e,t,r,n,i){var a=t.axis,o=a.dataToCoord(e),s=n.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=n.getRadiusAxis().getExtent(),u,f,c;if(a.dim==="radius"){var p=tr();Cn(p,p,s),Nr(p,p,[n.cx,n.cy]),u=Or([o,-i],p);var h=t.getModel("axisLabel").get("rotate")||0,d=Br.innerTextLayout(s,h*Math.PI/180,-1);f=d.textAlign,c=d.textVerticalAlign}else{var m=l[1];u=n.coordToPoint([m+i,o]);var v=n.cx,g=n.cy;f=Math.abs(u[0]-v)/m<.3?"center":u[0]>v?"left":"right",c=Math.abs(u[1]-g)/m<.3?"middle":u[1]>g?"top":"bottom"}return{position:u,align:f,verticalAlign:c}}var yvt={line:function(e,t,r,n){return e.dim==="angle"?{type:"Line",shape:Xp(t.coordToPoint([n[0],r]),t.coordToPoint([n[1],r]))}:{type:"Circle",shape:{cx:t.cx,cy:t.cy,r}}},shadow:function(e,t,r,n){var i=Math.max(1,e.getBandWidth()),a=Math.PI/180;return e.dim==="angle"?{type:"Sector",shape:BE(t.cx,t.cy,n[0],n[1],(-r-i/2)*a,(-r+i/2)*a)}:{type:"Sector",shape:BE(t.cx,t.cy,r-i/2,r+i/2,0,Math.PI*2)}}},s9=mvt;var xvt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.findAxisModel=function(r){var n,i=this.ecModel;return i.eachComponent(r,function(a){a.getCoordSysModel()===this&&(n=a)},this),n},t.type="polar",t.dependencies=["radiusAxis","angleAxis"],t.defaultOption={z:0,center:["50%","50%"],radius:"80%"},t}(Pt),l9=xvt;var HE=function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",se).models[0]},t.type="polarAxis",t}(Pt);ie(HE,to);var u9=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="angleAxis",t}(HE);var f9=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="radiusAxis",t}(HE);var WE=function(e){N(t,e);function t(r,n){return e.call(this,"radius",r,n)||this}return t.prototype.pointToData=function(r,n){return this.polar.pointToData(r,n)[this.dim==="radius"?0:1]},t}(Mr);WE.prototype.dataToRadius=Mr.prototype.dataToCoord;WE.prototype.radiusToData=Mr.prototype.coordToData;var c9=WE;var _vt=yt(),YE=function(e){N(t,e);function t(r,n){return e.call(this,"angle",r,n||[0,360])||this}return t.prototype.pointToData=function(r,n){return this.polar.pointToData(r,n)[this.dim==="radius"?0:1]},t.prototype.calculateCategoryInterval=function(){var r=this,n=r.getLabelModel(),i=r.scale,a=i.getExtent(),o=i.count();if(a[1]-a[0]<1)return 0;var s=a[0],l=r.dataToCoord(s+1)-r.dataToCoord(s),u=Math.abs(l),f=Ga(s==null?"":s+"",n.getFont(),"center","top"),c=Math.max(f.height,7),p=c/u;isNaN(p)&&(p=1/0);var h=Math.max(0,Math.floor(p)),d=_vt(r.model),m=d.lastAutoInterval,v=d.lastTickCount;return m!=null&&v!=null&&Math.abs(m-h)<=1&&Math.abs(v-o)<=1&&m>h?h=m:(d.lastTickCount=o,d.lastAutoInterval=h),h},t}(Mr);YE.prototype.dataToAngle=Mr.prototype.dataToCoord;YE.prototype.angleToData=Mr.prototype.coordToData;var p9=YE;var XE=["radius","angle"],bvt=function(){function e(t){this.dimensions=XE,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new c9,this._angleAxis=new p9,this.axisPointerEnabled=!0,this.name=t||"",this._radiusAxis.polar=this._angleAxis.polar=this}return e.prototype.containPoint=function(t){var r=this.pointToCoord(t);return this._radiusAxis.contain(r[0])&&this._angleAxis.contain(r[1])},e.prototype.containData=function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},e.prototype.getAxis=function(t){var r="_"+t+"Axis";return this[r]},e.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},e.prototype.getAxesByScale=function(t){var r=[],n=this._angleAxis,i=this._radiusAxis;return n.scale.type===t&&r.push(n),i.scale.type===t&&r.push(i),r},e.prototype.getAngleAxis=function(){return this._angleAxis},e.prototype.getRadiusAxis=function(){return this._radiusAxis},e.prototype.getOtherAxis=function(t){var r=this._angleAxis;return t===r?this._radiusAxis:r},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},e.prototype.getTooltipAxes=function(t){var r=t!=null&&t!=="auto"?this.getAxis(t):this.getBaseAxis();return{baseAxes:[r],otherAxes:[this.getOtherAxis(r)]}},e.prototype.dataToPoint=function(t,r){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],r),this._angleAxis.dataToAngle(t[1],r)])},e.prototype.pointToData=function(t,r){var n=this.pointToCoord(t);return[this._radiusAxis.radiusToData(n[0],r),this._angleAxis.angleToData(n[1],r)]},e.prototype.pointToCoord=function(t){var r=t[0]-this.cx,n=t[1]-this.cy,i=this.getAngleAxis(),a=i.getExtent(),o=Math.min(a[0],a[1]),s=Math.max(a[0],a[1]);i.inverse?o=s-360:s=o+360;var l=Math.sqrt(r*r+n*n);r/=l,n/=l;for(var u=Math.atan2(-n,r)/Math.PI*180,f=us;)u+=f*360;return[l,u]},e.prototype.coordToPoint=function(t){var r=t[0],n=t[1]/180*Math.PI,i=Math.cos(n)*r+this.cx,a=-Math.sin(n)*r+this.cy;return[i,a]},e.prototype.getArea=function(){var t=this.getAngleAxis(),r=this.getRadiusAxis(),n=r.getExtent().slice();n[0]>n[1]&&n.reverse();var i=t.getExtent(),a=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:n[0],r:n[1],startAngle:-i[0]*a,endAngle:-i[1]*a,clockwise:t.inverse,contain:function(o,s){var l=o-this.cx,u=s-this.cy,f=l*l+u*u-1e-4,c=this.r,p=this.r0;return f<=c*c&&f>=p*p}}},e.prototype.convertToPixel=function(t,r,n){var i=h9(r);return i===this?this.dataToPoint(n):null},e.prototype.convertFromPixel=function(t,r,n){var i=h9(r);return i===this?this.pointToData(n):null},e}();function h9(e){var t=e.seriesModel,r=e.polarModel;return r&&r.coordinateSystem||t&&t.coordinateSystem}var d9=bvt;function Svt(e,t,r){var n=t.get("center"),i=r.getWidth(),a=r.getHeight();e.cx=q(n[0],i),e.cy=q(n[1],a);var o=e.getRadiusAxis(),s=Math.min(i,a)/2,l=t.get("radius");l==null?l=[0,"100%"]:B(l)||(l=[0,l]);var u=[q(l[0],s),q(l[1],s)];o.inverse?o.setExtent(u[1],u[0]):o.setExtent(u[0],u[1])}function wvt(e,t){var r=this,n=r.getAngleAxis(),i=r.getRadiusAxis();if(n.scale.setExtent(1/0,-1/0),i.scale.setExtent(1/0,-1/0),e.eachSeries(function(s){if(s.coordinateSystem===r){var l=s.getData();D(mp(l,"radius"),function(u){i.scale.unionExtentFromData(l,u)}),D(mp(l,"angle"),function(u){n.scale.unionExtentFromData(l,u)})}}),Ja(n.scale,n.model),Ja(i.scale,i.model),n.type==="category"&&!n.onBand){var a=n.getExtent(),o=360/n.scale.count();n.inverse?a[1]+=o:a[1]-=o,n.setExtent(a[0],a[1])}}function Tvt(e){return e.mainType==="angleAxis"}function v9(e,t){if(e.type=t.get("type"),e.scale=ol(t),e.onBand=t.get("boundaryGap")&&e.type==="category",e.inverse=t.get("inverse"),Tvt(t)){e.inverse=e.inverse!==t.get("clockwise");var r=t.get("startAngle");e.setExtent(r,r+(e.inverse?-360:360))}t.axis=e,e.model=t}var Mvt={dimensions:XE,create:function(e,t){var r=[];return e.eachComponent("polar",function(n,i){var a=new d9(i+"");a.update=wvt;var o=a.getRadiusAxis(),s=a.getAngleAxis(),l=n.findAxisModel("radiusAxis"),u=n.findAxisModel("angleAxis");v9(o,l),v9(s,u),Svt(a,n,t),r.push(a),n.coordinateSystem=a,a.model=n}),e.eachSeries(function(n){if(n.get("coordinateSystem")==="polar"){var i=n.getReferringComponents("polar",se).models[0];n.coordinateSystem=i.coordinateSystem}}),r}},m9=Mvt;var Avt=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function p_(e,t,r){t[1]>t[0]&&(t=t.slice().reverse());var n=e.coordToPoint([t[0],r]),i=e.coordToPoint([t[1],r]);return{x1:n[0],y1:n[1],x2:i[0],y2:i[1]}}function h_(e){var t=e.getRadiusAxis();return t.inverse?0:1}function g9(e){var t=e[0],r=e[e.length-1];t&&r&&Math.abs(Math.abs(t.coord-r.coord)-360)<1e-4&&e.pop()}var Cvt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.axisPointerClass="PolarAxisPointer",r}return t.prototype.render=function(r,n){if(this.group.removeAll(),!!r.get("show")){var i=r.axis,a=i.polar,o=a.getRadiusAxis().getExtent(),s=i.getTicksCoords(),l=i.getMinorTicksCoords(),u=F(i.getViewLabels(),function(f){f=at(f);var c=i.scale,p=c.type==="ordinal"?c.getRawOrdinalNumber(f.tickValue):f.tickValue;return f.coord=i.dataToCoord(p),f});g9(u),g9(s),D(Avt,function(f){r.get([f,"show"])&&(!i.scale.isBlank()||f==="axisLine")&&Dvt[f](this.group,r,a,s,l,o,u)},this)}},t.type="angleAxis",t}(Gn),Dvt={axisLine:function(e,t,r,n,i,a){var o=t.getModel(["axisLine","lineStyle"]),s=h_(r),l=s?0:1,u;a[l]===0?u=new Sr({shape:{cx:r.cx,cy:r.cy,r:a[s]},style:o.getLineStyle(),z2:1,silent:!0}):u=new zu({shape:{cx:r.cx,cy:r.cy,r:a[s],r0:a[l]},style:o.getLineStyle(),z2:1,silent:!0}),u.style.fill=null,e.add(u)},axisTick:function(e,t,r,n,i,a){var o=t.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=a[h_(r)],u=F(n,function(f){return new De({shape:p_(r,[l,l+s],f.coord)})});e.add(Zr(u,{style:J(o.getModel("lineStyle").getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])})}))},minorTick:function(e,t,r,n,i,a){if(i.length){for(var o=t.getModel("axisTick"),s=t.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=a[h_(r)],f=[],c=0;cg?"left":"right",_=Math.abs(v[1]-y)/m<.3?"middle":v[1]>y?"top":"bottom";if(s&&s[d]){var S=s[d];rt(S)&&S.textStyle&&(h=new Ht(S.textStyle,l,l.ecModel))}var b=new Lt({silent:Br.isLabelSilent(t),style:Qt(h,{x:v[0],y:v[1],fill:h.getTextColor()||t.get(["axisLine","lineStyle","color"]),text:c.formattedLabel,align:x,verticalAlign:_})});if(e.add(b),f){var w=Br.makeAxisEventDataBase(t);w.targetType="axisLabel",w.value=c.rawLabel,ht(b).eventData=w}},this)},splitLine:function(e,t,r,n,i,a){var o=t.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var f=[],c=0;c=0?"p":"n",L=w;S&&(n[f][A]||(n[f][A]={p:w,n:w}),L=n[f][A][P]);var I=void 0,E=void 0,R=void 0,k=void 0;if(d.dim==="radius"){var O=d.dataToCoord(C)-w,z=l.dataToCoord(A);Math.abs(O)=k})}}})}function kvt(e){var t={};D(e,function(n,i){var a=n.getData(),o=n.coordinateSystem,s=o.getBaseAxis(),l=b9(o,s),u=s.getExtent(),f=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/a.count(),c=t[l]||{bandWidth:f,remainedWidth:f,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},p=c.stacks;t[l]=c;var h=_9(n);p[h]||c.autoWidthCount++,p[h]=p[h]||{width:0,maxWidth:0};var d=q(n.get("barWidth"),f),m=q(n.get("barMaxWidth"),f),v=n.get("barGap"),g=n.get("barCategoryGap");d&&!p[h].width&&(d=Math.min(c.remainedWidth,d),p[h].width=d,c.remainedWidth-=d),m&&(p[h].maxWidth=m),v!=null&&(c.gap=v),g!=null&&(c.categoryGap=g)});var r={};return D(t,function(n,i){r[i]={};var a=n.stacks,o=n.bandWidth,s=q(n.categoryGap,o),l=q(n.gap,1),u=n.remainedWidth,f=n.autoWidthCount,c=(u-s)/(f+(f-1)*l);c=Math.max(c,0),D(a,function(m,v){var g=m.maxWidth;g&&g=r.y&&t[1]<=r.y+r.height:n.contain(n.toLocalCoord(t[1]))&&t[0]>=r.y&&t[0]<=r.y+r.height},e.prototype.pointToData=function(t){var r=this.getAxis();return[r.coordToData(r.toLocalCoord(t[r.orient==="horizontal"?0:1]))]},e.prototype.dataToPoint=function(t){var r=this.getAxis(),n=this.getRect(),i=[],a=r.orient==="horizontal"?0:1;return t instanceof Array&&(t=t[0]),i[a]=r.toGlobalCoord(r.dataToCoord(+t)),i[1-a]=a===0?n.y+n.height/2:n.x+n.width/2,i},e.prototype.convertToPixel=function(t,r,n){var i=C9(r);return i===this?this.dataToPoint(n):null},e.prototype.convertFromPixel=function(t,r,n){var i=C9(r);return i===this?this.pointToData(n):null},e}();function C9(e){var t=e.seriesModel,r=e.singleAxisModel;return r&&r.coordinateSystem||t&&t.coordinateSystem}var D9=Wvt;function Yvt(e,t){var r=[];return e.eachComponent("singleAxis",function(n,i){var a=new D9(n,e,t);a.name="single_"+i,a.resize(n,t),n.coordinateSystem=a,r.push(a)}),e.eachSeries(function(n){if(n.get("coordinateSystem")==="singleAxis"){var i=n.getReferringComponents("singleAxis",se).models[0];n.coordinateSystem=i&&i.coordinateSystem}}),r}var Xvt={create:Yvt,dimensions:ZE},E9=Xvt;var I9=["x","y"],qvt=["width","height"],Zvt=function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis,l=s.coordinateSystem,u=KE(l,1-v_(s)),f=l.dataToPoint(n)[0],c=a.get("type");if(c&&c!=="none"){var p=Yp(a),h=Kvt[c](s,f,u);h.style=p,r.graphicKey=h.type,r.pointer=h}var d=vm(i);s_(n,r,d,i,a,o)},t.prototype.getHandleTransform=function(r,n,i){var a=vm(n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=pm(n.axis,r,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(r,n,i,a){var o=i.axis,s=o.coordinateSystem,l=v_(o),u=KE(s,l),f=[r.x,r.y];f[l]+=n[l],f[l]=Math.min(u[1],f[l]),f[l]=Math.max(u[0],f[l]);var c=KE(s,1-l),p=(c[1]+c[0])/2,h=[p,p];return h[l]=f[l],{x:f[0],y:f[1],rotation:r.rotation,cursorPoint:h,tooltipOption:{verticalAlign:"middle"}}},t}(Wp),Kvt={line:function(e,t,r){var n=Xp([t,r[0]],[t,r[1]],v_(e));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(e,t,r){var n=e.getBandWidth(),i=r[1]-r[0];return{type:"Rect",shape:l_([t-n/2,r[0]],[n,i],v_(e))}}};function v_(e){return e.isHorizontal()?0:1}function KE(e,t){var r=e.getRect();return[r[I9[t]],r[I9[t]]+r[qvt[t]]]}var L9=Zvt;var $vt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="single",t}(Xt);function $E(e){Nt(wa),Gn.registerAxisPointerClass("SingleAxisPointer",L9),e.registerComponentView($vt),e.registerComponentView(T9),e.registerComponentModel(d_),Sa(e,"single",d_,d_.defaultOption),e.registerCoordinateSystem("single",E9)}var jvt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r,n,i){var a=Di(r);e.prototype.init.apply(this,arguments),P9(r,a)},t.prototype.mergeOption=function(r){e.prototype.mergeOption.apply(this,arguments),P9(this.option,r)},t.prototype.getCellSize=function(){return this.option.cellSize},t.type="calendar",t.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},t}(Pt);function P9(e,t){var r=e.cellSize,n;B(r)?n=r:n=e.cellSize=[r,r],n.length===1&&(n[1]=n[0]);var i=F([0,1],function(a){return j5(t,a)&&(n[a]="auto"),n[a]!=null&&n[a]!=="auto"});On(e,t,{type:"box",ignoreSize:i})}var R9=jvt;var Qvt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a=this.group;a.removeAll();var o=r.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=n.getLocaleModel();this._renderDayRect(r,s,a),this._renderLines(r,s,l,a),this._renderYearText(r,s,l,a),this._renderMonthText(r,u,l,a),this._renderWeekText(r,u,s,l,a)},t.prototype._renderDayRect=function(r,n,i){for(var a=r.coordinateSystem,o=r.getModel("itemStyle").getItemStyle(),s=a.getCellWidth(),l=a.getCellHeight(),u=n.start.time;u<=n.end.time;u=a.getNextNDay(u,1).time){var f=a.dataToRect([u],!1).tl,c=new At({shape:{x:f[0],y:f[1],width:s,height:l},cursor:"default",style:o});i.add(c)}},t.prototype._renderLines=function(r,n,i,a){var o=this,s=r.coordinateSystem,l=r.getModel(["splitLine","lineStyle"]).getLineStyle(),u=r.get(["splitLine","show"]),f=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var c=n.start,p=0;c.time<=n.end.time;p++){d(c.formatedDate),p===0&&(c=s.getDateInfo(n.start.y+"-"+n.start.m));var h=c.date;h.setMonth(h.getMonth()+1),c=s.getDateInfo(h)}d(s.getNextNDay(n.end.time,1).formatedDate);function d(m){o._firstDayOfMonth.push(s.getDateInfo(m)),o._firstDayPoints.push(s.dataToRect([m],!1).tl);var v=o._getLinePointsOfOneWeek(r,m,i);o._tlpoints.push(v[0]),o._blpoints.push(v[v.length-1]),u&&o._drawSplitline(v,l,a)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,f,i),l,a),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,f,i),l,a)},t.prototype._getEdgesPoints=function(r,n,i){var a=[r[0].slice(),r[r.length-1].slice()],o=i==="horizontal"?0:1;return a[0][o]=a[0][o]-n/2,a[1][o]=a[1][o]+n/2,a},t.prototype._drawSplitline=function(r,n,i){var a=new Ie({z2:20,shape:{points:r},style:n});i.add(a)},t.prototype._getLinePointsOfOneWeek=function(r,n,i){for(var a=r.coordinateSystem,o=a.getDateInfo(n),s=[],l=0;l<7;l++){var u=a.getNextNDay(o.time,l),f=a.dataToRect([u.time],!1);s[2*u.day]=f.tl,s[2*u.day+1]=f[i==="horizontal"?"bl":"tr"]}return s},t.prototype._formatterLabel=function(r,n){return H(r)&&r?Z5(r,n):j(r)?r(n):n.nameMap},t.prototype._yearTextPositionControl=function(r,n,i,a,o){var s=n[0],l=n[1],u=["center","bottom"];a==="bottom"?(l+=o,u=["center","top"]):a==="left"?s-=o:a==="right"?(s+=o,u=["center","top"]):l-=o;var f=0;return(a==="left"||a==="right")&&(f=Math.PI/2),{rotation:f,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},t.prototype._renderYearText=function(r,n,i,a){var o=r.getModel("yearLabel");if(o.get("show")){var s=o.get("margin"),l=o.get("position");l||(l=i!=="horizontal"?"top":"left");var u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],f=(u[0][0]+u[1][0])/2,c=(u[0][1]+u[1][1])/2,p=i==="horizontal"?0:1,h={top:[f,u[p][1]],bottom:[f,u[1-p][1]],left:[u[1-p][0],c],right:[u[p][0],c]},d=n.start.y;+n.end.y>+n.start.y&&(d=d+"-"+n.end.y);var m=o.get("formatter"),v={start:n.start.y,end:n.end.y,nameMap:d},g=this._formatterLabel(m,v),y=new Lt({z2:30,style:Qt(o,{text:g})});y.attr(this._yearTextPositionControl(y,h[l],i,l,s)),a.add(y)}},t.prototype._monthTextPositionControl=function(r,n,i,a,o){var s="left",l="top",u=r[0],f=r[1];return i==="horizontal"?(f=f+o,n&&(s="center"),a==="start"&&(l="bottom")):(u=u+o,n&&(l="middle"),a==="start"&&(s="right")),{x:u,y:f,align:s,verticalAlign:l}},t.prototype._renderMonthText=function(r,n,i,a){var o=r.getModel("monthLabel");if(o.get("show")){var s=o.get("nameMap"),l=o.get("margin"),u=o.get("position"),f=o.get("align"),c=[this._tlpoints,this._blpoints];(!s||H(s))&&(s&&(n=tv(s)||n),s=n.get(["time","monthAbbr"])||[]);var p=u==="start"?0:1,h=i==="horizontal"?0:1;l=u==="start"?-l:l;for(var d=f==="center",m=0;m=i.start.time&&n.times.end.time&&r.reverse(),r},e.prototype._getRangeInfo=function(t){var r=[this.getDateInfo(t[0]),this.getDateInfo(t[1])],n;r[0].time>r[1].time&&(n=!0,r.reverse());var i=Math.floor(r[1].time/jE)-Math.floor(r[0].time/jE)+1,a=new Date(r[0].time),o=a.getDate(),s=r[1].date.getDate();a.setDate(o+i-1);var l=a.getDate();if(l!==s)for(var u=a.getTime()-r[1].time>0?1:-1;(l=a.getDate())!==s&&(a.getTime()-r[1].time)*u>0;)i-=u,a.setDate(l-u);var f=Math.floor((i+r[0].day+6)/7),c=n?-f+1:f-1;return n&&r.reverse(),{range:[r[0].formatedDate,r[1].formatedDate],start:r[0],end:r[1],allDay:i,weeks:f,nthWeek:c,fweek:r[0].day,lweek:r[1].day}},e.prototype._getDateByWeeksAndDay=function(t,r,n){var i=this._getRangeInfo(n);if(t>i.weeks||t===0&&ri.lweek)return null;var a=(t-1)*7-i.fweek+r,o=new Date(i.start.time);return o.setDate(+i.start.d+a),this.getDateInfo(o)},e.create=function(t,r){var n=[];return t.eachComponent("calendar",function(i){var a=new e(i,t,r);n.push(a),i.coordinateSystem=a}),t.eachSeries(function(i){i.get("coordinateSystem")==="calendar"&&(i.coordinateSystem=n[i.get("calendarIndex")||0])}),n},e.dimensions=["time","value"],e}();function k9(e){var t=e.calendarModel,r=e.seriesModel,n=t?t.coordinateSystem:r?r.coordinateSystem:null;return n}var O9=Jvt;function QE(e){e.registerComponentModel(R9),e.registerComponentView(N9),e.registerCoordinateSystem("calendar",O9)}function tmt(e,t){var r=e.existing;if(t.id=e.keyInfo.id,!t.type&&r&&(t.type=r.type),t.parentId==null){var n=t.parentOption;n?t.parentId=n.id:r&&(t.parentId=r.parentId)}t.parentOption=null}function z9(e,t){var r;return D(t,function(n){e[n]!=null&&e[n]!=="auto"&&(r=!0)}),r}function emt(e,t,r){var n=V({},r),i=e[t],a=r.$action||"merge";if(a==="merge")if(i){if(!1)var o;_t(i,n,!0),On(i,n,{ignoreSize:!0}),rM(r,i),m_(r,i),m_(r,i,"shape"),m_(r,i,"style"),m_(r,i,"extra"),r.clipPath=i.clipPath}else e[t]=n;else a==="replace"?e[t]=n:a==="remove"&&i&&(e[t]=null)}var U9=["transition","enterFrom","leaveTo"],rmt=U9.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function m_(e,t,r){if(r&&(!e[r]&&t[r]&&(e[r]={}),e=e[r],t=t[r]),!(!e||!t))for(var n=r?U9:rmt,i=0;i=0;f--){var c=i[f],p=Te(c.id,null),h=p!=null?o.get(p):null;if(h){var d=h.parent,g=Vi(d),y=d===a?{width:s,height:l}:{width:g.width,height:g.height},x={},_=Zs(h,c,y,null,{hv:c.hv,boundingMode:c.bounding},x);if(!Vi(h).isNew&&_){for(var S=c.transition,b={},w=0;w=0)?b[T]=M:h[T]=M}Rt(h,b,r,0)}else h.attr(x)}}},t.prototype._clear=function(){var r=this,n=this._elMap;n.each(function(i){g_(i,Vi(i).option,n,r._lastGraphicModel)}),this._elMap=$()},t.prototype.dispose=function(){this._clear()},t.type="graphic",t}(Xt);function JE(e){var t=st(B9,e)?B9[e]:$d(e),r=new t({});return Vi(r).type=e,r}function F9(e,t,r,n){var i=JE(r);return t.add(i),n.set(e,i),Vi(i).id=e,Vi(i).isNew=!0,i}function g_(e,t,r,n){var i=e&&e.parent;i&&(e.type==="group"&&e.traverse(function(a){g_(a,t,r,n)}),Gp(e,t,n),r.removeKey(Vi(e).id))}function G9(e,t,r,n){e.isGroup||D([["cursor",We.prototype.cursor],["zlevel",n||0],["z",r||0],["z2",0]],function(i){var a=i[0];st(t,a)?e[a]=bt(t[a],i[1]):e[a]==null&&(e[a]=i[1])}),D(St(t),function(i){if(i.indexOf("on")===0){var a=t[i];e[i]=j(a)?a:null}}),st(t,"draggable")&&(e.draggable=t.draggable),t.name!=null&&(e.name=t.name),t.id!=null&&(e.id=t.id)}function imt(e){return e=V({},e),D(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(tM),function(t){delete e[t]}),e}function amt(e,t,r){var n=ht(e).eventData;!e.silent&&!e.ignore&&!n&&(n=ht(e).eventData={componentType:"graphic",componentIndex:t.componentIndex,name:e.name}),n&&(n.info=r.info)}function tI(e){e.registerComponentModel(V9),e.registerComponentView(H9),e.registerPreprocessor(function(t){var r=t.graphic;B(r)?!r[0]||!r[0].elements?t.graphic=[{elements:r}]:t.graphic=[t.graphic[0]]:r&&!r.elements&&(t.graphic=[{elements:[r]}])})}var eI=["x","y","radius","angle","single"],omt=["cartesian2d","polar","singleAxis"];function W9(e){var t=e.get("coordinateSystem");return gt(omt,t)>=0}function Bi(e){return e+"Axis"}function Y9(e,t){var r=$(),n=[],i=$();e.eachComponent({mainType:"dataZoom",query:t},function(f){i.get(f.uid)||s(f)});var a;do a=!1,e.eachComponent("dataZoom",o);while(a);function o(f){!i.get(f.uid)&&l(f)&&(s(f),a=!0)}function s(f){i.set(f.uid,!0),n.push(f),u(f)}function l(f){var c=!1;return f.eachTargetAxis(function(p,h){var d=r.get(p);d&&d[h]&&(c=!0)}),c}function u(f){f.eachTargetAxis(function(c,p){(r.get(c)||r.set(c,[]))[p]=!0})}return n}function y_(e){var t=e.ecModel,r={infoList:[],infoMap:$()};return e.eachTargetAxis(function(n,i){var a=t.getComponent(Bi(n),i);if(a){var o=a.getCoordSysModel();if(o){var s=o.uid,l=r.infoMap.get(s);l||(l={model:o,axisModels:[]},r.infoList.push(l),r.infoMap.set(s,l)),l.axisModels.push(a)}}}),r}var rI=function(){function e(){this.indexList=[],this.indexMap=[]}return e.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},e}(),smt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._autoThrottle=!0,r._noTarget=!0,r._rangePropMode=["percent","percent"],r}return t.prototype.init=function(r,n,i){var a=X9(r);this.settledOption=a,this.mergeDefaultAndTheme(r,i),this._doInit(a)},t.prototype.mergeOption=function(r){var n=X9(r);_t(this.option,r,!0),_t(this.settledOption,n,!0),this._doInit(n)},t.prototype._doInit=function(r){var n=this.option;this._setDefaultThrottle(r),this._updateRangeUse(r);var i=this.settledOption;D([["start","startValue"],["end","endValue"]],function(a,o){this._rangePropMode[o]==="value"&&(n[a[0]]=i[a[0]]=null)},this),this._resetTarget()},t.prototype._resetTarget=function(){var r=this.get("orient",!0),n=this._targetAxisInfoMap=$(),i=this._fillSpecifiedTargetAxis(n);i?this._orient=r||this._makeAutoOrientByTargetAxis():(this._orient=r||"horizontal",this._fillAutoTargetAxisByOrient(n,this._orient)),this._noTarget=!0,n.each(function(a){a.indexList.length&&(this._noTarget=!1)},this)},t.prototype._fillSpecifiedTargetAxis=function(r){var n=!1;return D(eI,function(i){var a=this.getReferringComponents(Bi(i),UO);if(a.specified){n=!0;var o=new rI;D(a.models,function(s){o.add(s.componentIndex)}),r.set(i,o)}},this),n},t.prototype._fillAutoTargetAxisByOrient=function(r,n){var i=this.ecModel,a=!0;if(a){var o=n==="vertical"?"y":"x",s=i.findComponents({mainType:o+"Axis"});l(s,o)}if(a){var s=i.findComponents({mainType:"singleAxis",filter:function(f){return f.get("orient",!0)===n}});l(s,"single")}function l(u,f){var c=u[0];if(c){var p=new rI;if(p.add(c.componentIndex),r.set(f,p),a=!1,f==="x"||f==="y"){var h=c.getReferringComponents("grid",se).models[0];h&&D(u,function(d){c.componentIndex!==d.componentIndex&&h===d.getReferringComponents("grid",se).models[0]&&p.add(d.componentIndex)})}}}a&&D(eI,function(u){if(a){var f=i.findComponents({mainType:Bi(u),filter:function(p){return p.get("type",!0)==="category"}});if(f[0]){var c=new rI;c.add(f[0].componentIndex),r.set(u,c),a=!1}}},this)},t.prototype._makeAutoOrientByTargetAxis=function(){var r;return this.eachTargetAxis(function(n){!r&&(r=n)},this),r==="y"?"vertical":"horizontal"},t.prototype._setDefaultThrottle=function(r){if(r.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var n=this.ecModel.option;this.option.throttle=n.animation&&n.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(r){var n=this._rangePropMode,i=this.get("rangeMode");D([["start","startValue"],["end","endValue"]],function(a,o){var s=r[a[0]]!=null,l=r[a[1]]!=null;s&&!l?n[o]="percent":!s&&l?n[o]="value":i?n[o]=i[o]:s&&(n[o]="percent")})},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var r;return this.eachTargetAxis(function(n,i){r==null&&(r=this.ecModel.getComponent(Bi(n),i))},this),r},t.prototype.eachTargetAxis=function(r,n){this._targetAxisInfoMap.each(function(i,a){D(i.indexList,function(o){r.call(n,a,o)})})},t.prototype.getAxisProxy=function(r,n){var i=this.getAxisModel(r,n);if(i)return i.__dzAxisProxy},t.prototype.getAxisModel=function(r,n){var i=this._targetAxisInfoMap.get(r);if(i&&i.indexMap[n])return this.ecModel.getComponent(Bi(r),n)},t.prototype.setRawRange=function(r){var n=this.option,i=this.settledOption;D([["start","startValue"],["end","endValue"]],function(a){(r[a[0]]!=null||r[a[1]]!=null)&&(n[a[0]]=i[a[0]]=r[a[0]],n[a[1]]=i[a[1]]=r[a[1]])},this),this._updateRangeUse(r)},t.prototype.setCalculatedRange=function(r){var n=this.option;D(["start","startValue","end","endValue"],function(i){n[i]=r[i]})},t.prototype.getPercentRange=function(){var r=this.findRepresentativeAxisProxy();if(r)return r.getDataPercentWindow()},t.prototype.getValueRange=function(r,n){if(r==null&&n==null){var i=this.findRepresentativeAxisProxy();if(i)return i.getDataValueWindow()}else return this.getAxisProxy(r,n).getDataValueWindow()},t.prototype.findRepresentativeAxisProxy=function(r){if(r)return r.__dzAxisProxy;for(var n,i=this._targetAxisInfoMap.keys(),a=0;ao[1];if(x&&!_&&!S)return!0;x&&(v=!0),_&&(d=!0),S&&(m=!0)}return v&&d&&m})}else Zp(f,function(h){if(a==="empty")l.setData(u=u.map(h,function(m){return s(m)?m:NaN}));else{var d={};d[h]=o,u.selectRange(d)}});Zp(f,function(h){u.setApproximateExtent(o,h)})}});function s(l){return l>=o[0]&&l<=o[1]}},e.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},r=this._dataZoomModel,n=this._dataExtent;Zp(["min","max"],function(i){var a=r.get(i+"Span"),o=r.get(i+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?a=$t(n[0]+o,n,[0,100],!0):a!=null&&(o=$t(a,[0,100],n,!0)-n[0]),t[i+"Span"]=a,t[i+"ValueSpan"]=o},this)},e.prototype._setAxisModel=function(){var t=this.getAxisModel(),r=this._percentWindow,n=this._valueWindow;if(r){var i=Qy(n,[0,500]);i=Math.min(i,20);var a=t.axis.scale.rawExtentInfo;r[0]!==0&&a.setDeterminedMinMax("min",+n[0].toFixed(i)),r[1]!==100&&a.setDeterminedMinMax("max",+n[1].toFixed(i)),a.freeze()}},e}();function pmt(e,t,r){var n=[1/0,-1/0];Zp(r,function(o){BU(n,o.getData(),t)});var i=e.getAxisModel(),a=Yx(i.axis.scale,i,n).calculate();return[a.min,a.max]}var $9=cmt;var hmt={getTargetSeries:function(e){function t(i){e.eachComponent("dataZoom",function(a){a.eachTargetAxis(function(o,s){var l=e.getComponent(Bi(o),s);i(o,s,l,a)})})}t(function(i,a,o,s){o.__dzAxisProxy=null});var r=[];t(function(i,a,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new $9(i,a,s,e),r.push(o.__dzAxisProxy))});var n=$();return D(r,function(i){D(i.getTargetSeriesModels(),function(a){n.set(a.uid,a)})}),n},overallReset:function(e,t){e.eachComponent("dataZoom",function(r){r.eachTargetAxis(function(n,i){r.getAxisProxy(n,i).reset(r)}),r.eachTargetAxis(function(n,i){r.getAxisProxy(n,i).filterData(r,t)})}),e.eachComponent("dataZoom",function(r){var n=r.findRepresentativeAxisProxy();if(n){var i=n.getDataPercentWindow(),a=n.getDataValueWindow();r.setCalculatedRange({start:i[0],end:i[1],startValue:a[0],endValue:a[1]})}})}},j9=hmt;function nI(e){e.registerAction("dataZoom",function(t,r){var n=Y9(r,t);D(n,function(i){i.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})})}var Q9=!1;function yf(e){Q9||(Q9=!0,e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,j9),nI(e),e.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function J9(e){e.registerComponentModel(q9),e.registerComponentView(Z9),yf(e)}var yr=function(){function e(){}return e}();var tG={};function Sl(e,t){tG[e]=t}function x_(e){return tG[e]}var vmt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.optionUpdated=function(){e.prototype.optionUpdated.apply(this,arguments);var r=this.ecModel;D(this.option.feature,function(n,i){var a=x_(i);a&&(a.getDefaultOption&&(a.defaultOption=a.getDefaultOption(r)),_t(n,a.defaultOption))})},t.type="toolbox",t.layoutMode={type:"box",ignoreSize:!0},t.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},t}(Pt),eG=vmt;function rG(e,t,r){var n=t.getBoxLayoutParams(),i=t.get("padding"),a={width:r.getWidth(),height:r.getHeight()},o=re(n,a,i);fa(t.get("orient"),e,t.get("itemGap"),o.width,o.height),Zs(e,n,a,i)}function __(e,t){var r=la(t.get("padding")),n=t.getItemStyle(["color","opacity"]);return n.fill=t.get("backgroundColor"),e=new At({shape:{x:e.x-r[3],y:e.y-r[0],width:e.width+r[1]+r[3],height:e.height+r[0]+r[2],r:t.get("borderRadius")},style:n,silent:!0,z2:-1}),e}var gmt=function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(r,n,i,a){var o=this.group;if(o.removeAll(),!r.get("show"))return;var s=+r.get("itemSize"),l=r.get("orient")==="vertical",u=r.get("feature")||{},f=this._features||(this._features={}),c=[];D(u,function(d,m){c.push(m)}),new Vr(this._featureNames||[],c).add(p).update(p).remove(pt(p,null)).execute(),this._featureNames=c;function p(d,m){var v=c[d],g=c[m],y=u[v],x=new Ht(y,r,r.ecModel),_;if(a&&a.newTitle!=null&&a.featureName===v&&(y.title=a.newTitle),v&&!g){if(ymt(v))_={onclick:x.option.onclick,featureName:v};else{var S=x_(v);if(!S)return;_=new S}f[v]=_}else if(_=f[g],!_)return;_.uid=Ci("toolbox-feature"),_.model=x,_.ecModel=n,_.api=i;var b=_ instanceof yr;if(!v&&g){b&&_.dispose&&_.dispose(n,i);return}if(!x.get("show")||b&&_.unusable){b&&_.remove&&_.remove(n,i);return}h(x,_,v),x.setIconStatus=function(w,T){var M=this.option,C=this.iconPaths;M.iconStatus=M.iconStatus||{},M.iconStatus[w]=T,C[w]&&(T==="emphasis"?Yr:Xr)(C[w])},_ instanceof yr&&_.render&&_.render(x,n,i,a)}function h(d,m,v){var g=d.getModel("iconStyle"),y=d.getModel(["emphasis","iconStyle"]),x=m instanceof yr&&m.getIcons?m.getIcons():d.get("icon"),_=d.get("title")||{},S,b;H(x)?(S={},S[v]=x):S=x,H(_)?(b={},b[v]=_):b=_;var w=d.iconPaths={};D(S,function(T,M){var C=Yo(T,{},{x:-s/2,y:-s/2,width:s,height:s});C.setStyle(g.getItemStyle());var A=C.ensureState("emphasis");A.style=y.getItemStyle();var P=new Lt({style:{text:b[M],align:y.get("textAlign"),borderRadius:y.get("textBorderRadius"),padding:y.get("textPadding"),fill:null},ignore:!0});C.setTextContent(P),sa({el:C,componentModel:r,itemName:M,formatterParamsExtra:{title:b[M]}}),C.__title=b[M],C.on("mouseover",function(){var L=y.getItemStyle(),I=l?r.get("right")==null&&r.get("left")!=="right"?"right":"left":r.get("bottom")==null&&r.get("top")!=="bottom"?"bottom":"top";P.setStyle({fill:y.get("textFill")||L.fill||L.stroke||"#000",backgroundColor:y.get("textBackgroundColor")}),C.setTextConfig({position:y.get("textPosition")||I}),P.ignore=!r.get("showTitle"),i.enterEmphasis(this)}).on("mouseout",function(){d.get(["iconStatus",M])!=="emphasis"&&i.leaveEmphasis(this),P.hide()}),(d.get(["iconStatus",M])==="emphasis"?Yr:Xr)(C),o.add(C),C.on("click",Z(m.onclick,m,n,i,M)),w[M]=C})}rG(o,r,i),o.add(__(o.getBoundingRect(),r)),l||o.eachChild(function(d){var m=d.__title,v=d.ensureState("emphasis"),g=v.textConfig||(v.textConfig={}),y=d.getTextContent(),x=y&&y.ensureState("emphasis");if(x&&!j(x)&&m){var _=x.style||(x.style={}),S=Ga(m,Lt.makeFont(_)),b=d.x+o.x,w=d.y+o.y+s,T=!1;w+S.height>i.getHeight()&&(g.position="top",T=!0);var M=T?-5-S.height:s+10;b+S.width/2>i.getWidth()?(g.position=["100%",M],_.align="right"):b-S.width/2<0&&(g.position=[0,M],_.align="left")}})},t.prototype.updateView=function(r,n,i,a){D(this._features,function(o){o instanceof yr&&o.updateView&&o.updateView(o.model,n,i,a)})},t.prototype.remove=function(r,n){D(this._features,function(i){i instanceof yr&&i.remove&&i.remove(r,n)}),this.group.removeAll()},t.prototype.dispose=function(r,n){D(this._features,function(i){i instanceof yr&&i.dispose&&i.dispose(r,n)})},t.type="toolbox",t}(Xt);function ymt(e){return e.indexOf("my")===0}var nG=gmt;var xmt=function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.onclick=function(r,n){var i=this.model,a=i.get("name")||r.get("title.0.text")||"echarts",o=n.getZr().painter.getType()==="svg",s=o?"svg":i.get("type",!0)||"png",l=n.getConnectedDataURL({type:s,backgroundColor:i.get("backgroundColor",!0)||r.get("backgroundColor")||"#fff",connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")}),u=Ot.browser;if(j(MouseEvent)&&(u.newEdge||!u.ie&&!u.edge)){var f=document.createElement("a");f.download=a+"."+s,f.target="_blank",f.href=l;var c=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});f.dispatchEvent(c)}else if(window.navigator.msSaveOrOpenBlob||o){var p=l.split(","),h=p[0].indexOf("base64")>-1,d=o?decodeURIComponent(p[1]):p[1];h&&(d=window.atob(d));var m=a+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var v=d.length,g=new Uint8Array(v);v--;)g[v]=d.charCodeAt(v);var y=new Blob([g]);window.navigator.msSaveOrOpenBlob(y,m)}else{var x=document.createElement("iframe");document.body.appendChild(x);var _=x.contentWindow,S=_.document;S.open("image/svg+xml","replace"),S.write(d),S.close(),_.focus(),S.execCommand("SaveAs",!0,m),document.body.removeChild(x)}}else{var b=i.get("lang"),w='',T=window.open();T.document.write(w),T.document.title=a}},t.getDefaultOption=function(r){var n={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:r.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:r.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return n},t}(yr),iG=xmt;var aG="__ec_magicType_stack__";var _mt=[["line","bar"],["stack"]],bmt=function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getIcons=function(){var r=this.model,n=r.get("icon"),i={};return D(r.get("type"),function(a){n[a]&&(i[a]=n[a])}),i},t.getDefaultOption=function(r){var n={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:r.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return n},t.prototype.onclick=function(r,n,i){var a=this.model,o=a.get(["seriesIndex",i]);if(oG[i]){var s={series:[]},l=function(c){var p=c.subType,h=c.id,d=oG[i](p,h,c,a);d&&(J(d,c.option),s.series.push(d));var m=c.coordinateSystem;if(m&&m.type==="cartesian2d"&&(i==="line"||i==="bar")){var v=m.getAxesByScale("ordinal")[0];if(v){var g=v.dim,y=g+"Axis",x=c.getReferringComponents(y,se).models[0],_=x.componentIndex;s[y]=s[y]||[];for(var S=0;S<=_;S++)s[y][_]=s[y][_]||{};s[y][_].boundaryGap=i==="bar"}}};D(_mt,function(c){gt(c,i)>=0&&D(c,function(p){a.setIconStatus(p,"normal")})}),a.setIconStatus(i,"emphasis"),r.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,f=i;i==="stack"&&(u=_t({stack:a.option.title.tiled,tiled:a.option.title.stack},a.option.title),a.get(["iconStatus",i])!=="emphasis"&&(f="tiled")),n.dispatchAction({type:"changeMagicType",currentType:f,newOption:s,newTitle:u,featureName:"magicType"})}},t}(yr),oG={line:function(e,t,r,n){if(e==="bar")return _t({id:t,type:"line",data:r.get("data"),stack:r.get("stack"),markPoint:r.get("markPoint"),markLine:r.get("markLine")},n.get(["option","line"])||{},!0)},bar:function(e,t,r,n){if(e==="line")return _t({id:t,type:"bar",data:r.get("data"),stack:r.get("stack"),markPoint:r.get("markPoint"),markLine:r.get("markLine")},n.get(["option","bar"])||{},!0)},stack:function(e,t,r,n){var i=r.get("stack")===aG;if(e==="line"||e==="bar")return n.setIconStatus("stack",i?"normal":"emphasis"),_t({id:t,stack:i?"":aG},n.get(["option","stack"])||{},!0)}};cn({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(e,t){t.mergeOption(e.newOption)});var sG=bmt;var S_=new Array(60).join("-"),Kp=" ";function Smt(e){var t={},r=[],n=[];return e.eachRawSeries(function(i){var a=i.coordinateSystem;if(a&&(a.type==="cartesian2d"||a.type==="polar")){var o=a.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;t[s]||(t[s]={categoryAxis:o,valueAxis:a.getOtherAxis(o),series:[]},n.push({axisDim:o.dim,axisIndex:o.index})),t[s].series.push(i)}else r.push(i)}else r.push(i)}),{seriesGroupByCategoryAxis:t,other:r,meta:n}}function wmt(e){var t=[];return D(e,function(r,n){var i=r.categoryAxis,a=r.valueAxis,o=a.dim,s=[" "].concat(F(r.series,function(h){return h.name})),l=[i.model.getCategories()];D(r.series,function(h){var d=h.getRawData();l.push(h.getRawData().mapArray(d.mapDimension(o),function(m){return m}))});for(var u=[s.join(Kp)],f=0;f=0)return!0}var iI=new RegExp("["+Kp+"]+","g");function Amt(e){for(var t=e.split(/\n+/g),r=b_(t.shift()).split(iI),n=[],i=F(r,function(l){return{name:l,data:[]}}),a=0;a=0)return!0}var iI=new RegExp("["+Kp+"]+","g");function Cmt(e){for(var t=e.split(/\n+/g),r=b_(t.shift()).split(iI),n=[],i=F(r,function(l){return{name:l,data:[]}}),a=0;a=0;a--){var o=r[a];if(o[i])break}if(a<0){var s=e.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(s){var l=s.getPercentRange();r[0][i]={dataZoomId:i,start:l[0],end:l[1]}}}}),r.push(t)}function cG(e){var t=aI(e),r=t[t.length-1];t.length>1&&t.pop();var n={};return lG(r,function(i,a){for(var o=t.length-1;o>=0;o--)if(i=t[o][a],i){n[a]=i;break}}),n}function pG(e){uG(e).snapshots=null}function hG(e){return aI(e).length}function aI(e){var t=uG(e);return t.snapshots||(t.snapshots=[{}]),t.snapshots}var Lmt=function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.onclick=function(r,n){pG(r),n.dispatchAction({type:"restore",from:this.uid})},t.getDefaultOption=function(r){var n={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:r.getLocaleModel().get(["toolbox","restore","title"])};return n},t}(yr);cn({type:"restore",event:"restore",update:"prepareAndUpdate"},function(e,t){t.resetOption("recreate")});var vG=Lmt;var Pmt=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],Rmt=function(){function e(t,r,n){var i=this;this._targetInfoList=[];var a=mG(r,t);D(Nmt,function(o,s){(!n||!n.include||gt(n.include,s)>=0)&&o(a,i._targetInfoList)})}return e.prototype.setOutputRanges=function(t,r){return this.matchOutputRanges(t,r,function(n,i,a){if((n.coordRanges||(n.coordRanges=[])).push(i),!n.coordRange){n.coordRange=i;var o=oI[n.brushType](0,a,i);n.__rangeOffset={offset:_G[n.brushType](o.values,n.range,[1,1]),xyMinMax:o.xyMinMax}}}),t},e.prototype.matchOutputRanges=function(t,r,n){D(t,function(i){var a=this.findTargetInfo(i,r);a&&a!==!0&&D(a.coordSyses,function(o){var s=oI[i.brushType](1,o,i.range,!0);n(i,s.values,o,r)})},this)},e.prototype.setInputRanges=function(t,r){D(t,function(n){var i=this.findTargetInfo(n,r);if(n.range=n.range||[],i&&i!==!0){n.panelId=i.panelId;var a=oI[n.brushType](0,i.coordSys,n.coordRange),o=n.__rangeOffset;n.range=o?_G[n.brushType](a.values,o.offset,kmt(a.xyMinMax,o.xyMinMax)):a.values}},this)},e.prototype.makePanelOpts=function(t,r){return F(this._targetInfoList,function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:r?r(n):null,clipPath:q1(i),isTargetByCursor:K1(i,t,n.coordSysModel),getLinearBrushOtherExtent:Z1(i)}})},e.prototype.controlSeries=function(t,r,n){var i=this.findTargetInfo(t,n);return i===!0||i&>(i.coordSyses,r.coordinateSystem)>=0},e.prototype.findTargetInfo=function(t,r){for(var n=this._targetInfoList,i=mG(r,t),a=0;ae[1]&&e.reverse(),e}function mG(e,t){return Us(e,t,{includeMainTypes:Pmt})}var Nmt={grid:function(e,t){var r=e.xAxisModels,n=e.yAxisModels,i=e.gridModels,a=$(),o={},s={};!r&&!n&&!i||(D(r,function(l){var u=l.axis.grid.model;a.set(u.id,u),o[u.id]=!0}),D(n,function(l){var u=l.axis.grid.model;a.set(u.id,u),s[u.id]=!0}),D(i,function(l){a.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),a.each(function(l){var u=l.coordinateSystem,f=[];D(u.getCartesians(),function(c,p){(gt(r,c.getAxis("x").model)>=0||gt(n,c.getAxis("y").model)>=0)&&f.push(c)}),t.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:f[0],coordSyses:f,getPanelRect:yG.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(e,t){D(e.geoModels,function(r){var n=r.coordinateSystem;t.push({panelId:"geo--"+r.id,geoModel:r,coordSysModel:r,coordSys:n,coordSyses:[n],getPanelRect:yG.geo})})}},gG=[function(e,t){var r=e.xAxisModel,n=e.yAxisModel,i=e.gridModel;return!i&&r&&(i=r.axis.grid.model),!i&&n&&(i=n.axis.grid.model),i&&i===t.gridModel},function(e,t){var r=e.geoModel;return r&&r===t.geoModel}],yG={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var e=this.coordSys,t=e.getBoundingRect().clone();return t.applyTransform(oa(e)),t}},oI={lineX:pt(xG,0),lineY:pt(xG,1),rect:function(e,t,r,n){var i=e?t.pointToData([r[0][0],r[1][0]],n):t.dataToPoint([r[0][0],r[1][0]],n),a=e?t.pointToData([r[0][1],r[1][1]],n):t.dataToPoint([r[0][1],r[1][1]],n),o=[sI([i[0],a[0]]),sI([i[1],a[1]])];return{values:o,xyMinMax:o}},polygon:function(e,t,r,n){var i=[[1/0,-1/0],[1/0,-1/0]],a=F(r,function(o){var s=e?t.pointToData(o,n):t.dataToPoint(o,n);return i[0][0]=Math.min(i[0][0],s[0]),i[1][0]=Math.min(i[1][0],s[1]),i[0][1]=Math.max(i[0][1],s[0]),i[1][1]=Math.max(i[1][1],s[1]),s});return{values:a,xyMinMax:i}}};function xG(e,t,r,n){var i=r.getAxis(["x","y"][e]),a=sI(F([0,1],function(s){return t?i.coordToData(i.toLocalCoord(n[s]),!0):i.toGlobalCoord(i.dataToCoord(n[s]))})),o=[];return o[e]=a,o[1-e]=[NaN,NaN],{values:a,xyMinMax:o}}var _G={lineX:pt(bG,0),lineY:pt(bG,1),rect:function(e,t,r){return[[e[0][0]-r[0]*t[0][0],e[0][1]-r[0]*t[0][1]],[e[1][0]-r[1]*t[1][0],e[1][1]-r[1]*t[1][1]]]},polygon:function(e,t,r){return F(e,function(n,i){return[n[0]-r[0]*t[i][0],n[1]-r[1]*t[i][1]]})}};function bG(e,t,r,n){return[t[0]-n[e]*r[0],t[1]-n[e]*r[1]]}function kmt(e,t){var r=SG(e),n=SG(t),i=[r[0]/n[0],r[1]/n[1]];return isNaN(i[0])&&(i[0]=1),isNaN(i[1])&&(i[1]=1),i}function SG(e){return e?[e[0][1]-e[0][0],e[1][1]-e[1][0]]:[NaN,NaN]}var vm=Rmt;var lI=D,Omt=NO("toolbox-dataZoom_");var zmt=function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(r,n,i,a){this._brushController||(this._brushController=new Up(i.getZr()),this._brushController.on("brush",Z(this._onBrush,this)).mount()),Bmt(r,n,this,a,i),Vmt(r,n)},t.prototype.onclick=function(r,n,i){Umt[i].call(this)},t.prototype.remove=function(r,n){this._brushController&&this._brushController.unmount()},t.prototype.dispose=function(r,n){this._brushController&&this._brushController.dispose()},t.prototype._onBrush=function(r){var n=r.areas;if(!r.isEnd||!n.length)return;var i={},a=this.ecModel;this._brushController.updateCovers([]);var o=new vm(uI(this.model),a,{include:["grid"]});o.matchOutputRanges(n,a,function(u,f,c){if(c.type==="cartesian2d"){var p=u.brushType;p==="rect"?(s("x",c,f[0]),s("y",c,f[1])):s({lineX:"x",lineY:"y"}[p],c,f)}}),fG(a,i),this._dispatchZoomAction(i);function s(u,f,c){var p=f.getAxis(u),h=p.model,d=l(u,h,a),m=d.findRepresentativeAxisProxy(h).getMinMaxSpan();(m.minValueSpan!=null||m.maxValueSpan!=null)&&(c=Hn(0,c.slice(),p.scale.getExtent(),0,m.minValueSpan,m.maxValueSpan)),d&&(i[d.id]={dataZoomId:d.id,startValue:c[0],endValue:c[1]})}function l(u,f,c){var p;return c.eachComponent({mainType:"dataZoom",subType:"select"},function(h){var d=h.getAxisModel(u,f.componentIndex);d&&(p=h)}),p}},t.prototype._dispatchZoomAction=function(r){var n=[];lI(r,function(i,a){n.push(at(i))}),n.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:n})},t.getDefaultOption=function(r){var n={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:r.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}};return n},t}(yr),Umt={zoom:function(){var e=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:e})},back:function(){this._dispatchZoomAction(cG(this.ecModel))}};function uI(e){var t={xAxisIndex:e.get("xAxisIndex",!0),yAxisIndex:e.get("yAxisIndex",!0),xAxisId:e.get("xAxisId",!0),yAxisId:e.get("yAxisId",!0)};return t.xAxisIndex==null&&t.xAxisId==null&&(t.xAxisIndex="all"),t.yAxisIndex==null&&t.yAxisId==null&&(t.yAxisIndex="all"),t}function Vmt(e,t){e.setIconStatus("back",hG(t)>1?"emphasis":"normal")}function Bmt(e,t,r,n,i){var a=r._isZoomActive;n&&n.type==="takeGlobalCursor"&&(a=n.key==="dataZoomSelect"?n.dataZoomSelectActive:!1),r._isZoomActive=a,e.setIconStatus("zoom",a?"emphasis":"normal");var o=new vm(uI(e),t,{include:["grid"]}),s=o.makePanelOpts(i,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});r._brushController.setPanels(s).enableBrush(a&&s.length?{brushType:"auto",brushStyle:e.getModel("brushStyle").getItemStyle()}:!1)}n3("dataZoom",function(e){var t=e.getComponent("toolbox",0),r=["feature","dataZoom"];if(!t||t.get(r)==null)return;var n=t.getModel(r),i=[],a=uI(n),o=Us(e,a);lI(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),lI(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,f){var c=l.componentIndex,p={type:"select",$fromToolbox:!0,filterMode:n.get("filterMode",!0)||"filter",id:Omt+u+c};p[f]=c,i.push(p)}return i});var wG=zmt;function fI(e){e.registerComponentModel(tG),e.registerComponentView(rG),Sl("saveAsImage",nG),Sl("magicType",oG),Sl("dataView",sG),Sl("dataZoom",wG),Sl("restore",vG),Nt(Q9)}var Fmt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="tooltip",t.dependencies=["axisPointer"],t.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}},t}(Pt),TG=Fmt;function w_(e){var t=e.get("confine");return t!=null?!!t:e.get("renderMode")==="richText"}function MG(e){if(Ot.domSupported){for(var t=document.documentElement.style,r=0,n=e.length;r-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=a==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=a==="top"?225:45)+"deg)");var f=u*Math.PI/180,c=o+i,p=c*Math.abs(Math.cos(f))+c*Math.abs(Math.sin(f)),h=Math.round(((p-Math.SQRT2*i)/2+Math.SQRT2*i-(p-c)/2)*100)/100;s+=";"+a+":-"+h+"px";var d=t+" solid "+i+"px;",m=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+d,"border-right:"+d,"background-color:"+n+";"];return'
'}function Xmt(e,t){var r="cubic-bezier(0.23,1,0.32,1)",n=" "+e/2+"s "+r,i="opacity"+n+",visibility"+n;return t||(n=" "+e+"s "+r,i+=Ot.transformSupported?","+hI+n:",left"+n+",top"+n),Gmt+":"+i}function DG(e,t,r){var n=e.toFixed(0)+"px",i=t.toFixed(0)+"px";if(!Ot.transformSupported)return r?"top:"+i+";left:"+n+";":[["top",i],["left",n]];var a=Ot.transform3dSupported,o="translate"+(a?"3d":"")+"("+n+","+i+(a?",0":"")+")";return r?"top:0;left:0;"+hI+":"+o+";":[["top",0],["left",0],[cI,o]]}function qmt(e){var t=[],r=e.get("fontSize"),n=e.getTextColor();n&&t.push("color:"+n),t.push("font:"+e.getFont()),r&&t.push("line-height:"+Math.round(r*3/2)+"px");var i=e.get("textShadowColor"),a=e.get("textShadowBlur")||0,o=e.get("textShadowOffsetX")||0,s=e.get("textShadowOffsetY")||0;return i&&a&&t.push("text-shadow:"+o+"px "+s+"px "+a+"px "+i),D(["decoration","align"],function(l){var u=e.get(l);u&&t.push("text-"+l+":"+u)}),t.join(";")}function Zmt(e,t,r){var n=[],i=e.get("transitionDuration"),a=e.get("backgroundColor"),o=e.get("shadowBlur"),s=e.get("shadowColor"),l=e.get("shadowOffsetX"),u=e.get("shadowOffsetY"),f=e.getModel("textStyle"),c=lx(e,"html"),p=l+"px "+u+"px "+o+"px "+s;return n.push("box-shadow:"+p),t&&i&&n.push(Xmt(i,r)),a&&n.push("background-color:"+a),D(["width","color","radius"],function(h){var d="border-"+h,m=F0(d),v=e.get(m);v!=null&&n.push(d+":"+v+(h==="color"?"":"px"))}),n.push(qmt(f)),c!=null&&n.push("padding:"+la(c).join("px ")+"px"),n.join(";")+";"}function EG(e,t,r,n,i){var a=t&&t.painter;if(r){var o=a&&a.getViewportRoot();o&&yk(e,o,document.body,n,i)}else{e[0]=n,e[1]=i;var s=a&&a.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var Kmt=function(){function e(t,r,n){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,Ot.wxa)return null;var i=document.createElement("div");i.domBelongToZr=!0,this.el=i;var a=this._zr=r.getZr(),o=this._appendToBody=n&&n.appendToBody;EG(this._styleCoord,a,o,r.getWidth()/2,r.getHeight()/2),o?document.body.appendChild(i):t.appendChild(i),this._container=t;var s=this;i.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},i.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=a.handler,f=a.painter.getViewportRoot();Tn(f,l,!0),u.dispatch("mousemove",l)}},i.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return e.prototype.update=function(t){var r=this._container,n=CG(r,"position"),i=r.style;i.position!=="absolute"&&n!=="absolute"&&(i.position="relative");var a=t.get("alwaysShowContent");a&&this._moveIfResized(),this._alwaysShowContent=a,this.el.className=t.get("className")||""},e.prototype.show=function(t,r){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,i=n.style,a=this._styleCoord;n.innerHTML?i.cssText=Hmt+Zmt(t,!this._firstShow,this._longHide)+DG(a[0],a[1],!0)+("border-color:"+ua(r)+";")+(t.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):i.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(t,r,n,i,a){var o=this.el;if(t==null){o.innerHTML="";return}var s="";if(H(a)&&n.get("trigger")==="item"&&!w_(n)&&(s=Ymt(n,i,a)),H(t))o.innerHTML=t+s;else if(t){o.innerHTML="",B(t)||(t=[t]);for(var l=0;l=0?this._tryShow(a,o):i==="leave"&&this._hide(o))},this))},t.prototype._keepShow=function(){var r=this._tooltipModel,n=this._ecModel,i=this._api,a=r.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&a!=="none"&&a!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!i.isDisposed()&&o.manuallyShowTip(r,n,i,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(r,n,i,a){if(!(a.from===this.uid||Ot.node||!i.getDom())){var o=NG(a,i);this._ticket="";var s=a.dataByCoordSys,l=rgt(a,n,i);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:a.position,positionDefault:"bottom"},o)}else if(a.tooltip&&a.x!=null&&a.y!=null){var f=jmt;f.x=a.x,f.y=a.y,f.update(),ht(f).tooltipConfig={name:null,option:a.tooltip},this._tryShow({offsetX:a.x,offsetY:a.y,target:f},o)}else if(s)this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,dataByCoordSys:s,tooltipOption:a.tooltipOption},o);else if(a.seriesIndex!=null){if(this._manuallyAxisShowTip(r,n,i,a))return;var c=hm(a,n),p=c.point[0],h=c.point[1];p!=null&&h!=null&&this._tryShow({offsetX:p,offsetY:h,target:c.el,position:a.position,positionDefault:"bottom"},o)}else a.x!=null&&a.y!=null&&(i.dispatchAction({type:"updateAxisPointer",x:a.x,y:a.y}),this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,target:i.getZr().findHover(a.x,a.y).target},o))}},t.prototype.manuallyHideTip=function(r,n,i,a){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,a.from!==this.uid&&this._hide(NG(a,i))},t.prototype._manuallyAxisShowTip=function(r,n,i,a){var o=a.seriesIndex,s=a.dataIndex,l=n.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=n.getSeriesByIndex(o);if(u){var f=u.getData(),c=mm([f.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(c.get("trigger")==="axis")return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:a.position}),!0}}},t.prototype._tryShow=function(r,n){var i=r.target,a=this._tooltipModel;if(a){this._lastX=r.offsetX,this._lastY=r.offsetY;var o=r.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,r);else if(i){this._lastDataByCoordSys=null;var s,l;pa(i,function(u){if(ht(u).dataIndex!=null)return s=u,!0;if(ht(u).tooltipConfig!=null)return l=u,!0},!0),s?this._showSeriesItemTooltip(r,s,n):l?this._showComponentItemTooltip(r,l,n):this._hide(n)}else this._lastDataByCoordSys=null,this._hide(n)}},t.prototype._showOrMove=function(r,n){var i=r.get("showDelay");n=Z(n,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(n,i):n()},t.prototype._showAxisTooltip=function(r,n){var i=this._ecModel,a=this._tooltipModel,o=[n.offsetX,n.offsetY],s=mm([n.tooltipOption],a),l=this._renderMode,u=[],f=xe("section",{blocks:[],noHeader:!0}),c=[],p=new ux;D(r,function(y){D(y.dataByAxis,function(x){var _=i.getComponent(x.axisDim+"Axis",x.axisIndex),S=x.value;if(!(!_||S==null)){var b=VE(S,_.axis,i,x.seriesDataIndices,x.valueLabelOpt),w=xe("section",{header:b,noHeader:!pr(b),sortBlocks:!0,blocks:[]});f.blocks.push(w),D(x.seriesDataIndices,function(T){var M=i.getSeriesByIndex(T.seriesIndex),C=T.dataIndexInside,A=M.getDataParams(C);if(!(A.dataIndex<0)){A.axisDim=x.axisDim,A.axisIndex=x.axisIndex,A.axisType=x.axisType,A.axisId=x.axisId,A.axisValue=Ov(_.axis,{value:S}),A.axisValueLabel=b,A.marker=p.makeTooltipMarker("item",ua(A.color),l);var P=mM(M.formatTooltip(C,!0,null)),L=P.frag;if(L){var I=mm([M],a).get("valueFormatter");w.blocks.push(I?V({valueFormatter:I},L):L)}P.text&&c.push(P.text),u.push(A)}})}})}),f.blocks.reverse(),c.reverse();var h=n.position,d=s.get("order"),m=wM(f,p,l,d,i.get("useUTC"),s.get("textStyle"));m&&c.unshift(m);var v=l==="richText"?` +*`,"g")),n={series:[]};return D(r,function(i,a){if(Amt(i)){var o=Cmt(i),s=t[a],l=s.axisDim+"Axis";s&&(n[l]=n[l]||[],n[l][s.axisIndex]={data:o.categories},n.series=n.series.concat(o.series))}else{var o=Dmt(i);n.series.push(o)}}),n}var Imt=function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.onclick=function(r,n){setTimeout(function(){n.dispatchAction({type:"hideTip"})});var i=n.getDom(),a=this.model;this._dom&&i.removeChild(this._dom);var o=document.createElement("div");o.style.cssText="position:absolute;top:0;bottom:0;left:0;right:0;padding:5px",o.style.backgroundColor=a.get("backgroundColor")||"#fff";var s=document.createElement("h4"),l=a.get("lang")||[];s.innerHTML=l[0]||a.get("title"),s.style.cssText="margin:10px 20px",s.style.color=a.get("textColor");var u=document.createElement("div"),f=document.createElement("textarea");u.style.cssText="overflow:auto";var c=a.get("optionToContent"),p=a.get("contentToOption"),h=Mmt(r);if(j(c)){var d=c(n.getOption());H(d)?u.innerHTML=d:iu(d)&&u.appendChild(d)}else{f.readOnly=a.get("readOnly");var m=f.style;m.cssText="display:block;width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;resize:none;box-sizing:border-box;outline:none",m.color=a.get("textColor"),m.borderColor=a.get("textareaBorderColor"),m.backgroundColor=a.get("textareaColor"),f.value=h.value,u.appendChild(f)}var v=h.meta,g=document.createElement("div");g.style.cssText="position:absolute;bottom:5px;left:0;right:0";var y="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",x=document.createElement("div"),_=document.createElement("div");y+=";background-color:"+a.get("buttonColor"),y+=";color:"+a.get("buttonTextColor");var S=this;function b(){i.removeChild(o),S._dom=null}hd(x,"click",b),hd(_,"click",function(){if(p==null&&c!=null||p!=null&&c==null){b();return}var w;try{j(p)?w=p(u,n.getOption()):w=Emt(f.value,v)}catch(T){throw b(),new Error("Data view format error "+T)}w&&n.dispatchAction({type:"changeDataView",newOption:w}),b()}),x.innerHTML=l[1],_.innerHTML=l[2],_.style.cssText=x.style.cssText=y,!a.get("readOnly")&&g.appendChild(_),g.appendChild(x),o.appendChild(s),o.appendChild(u),o.appendChild(g),u.style.height=i.clientHeight-80+"px",i.appendChild(o),this._dom=o},t.prototype.remove=function(r,n){this._dom&&n.getDom().removeChild(this._dom)},t.prototype.dispose=function(r,n){this.remove(r,n)},t.getDefaultOption=function(r){var n={show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:r.getLocaleModel().get(["toolbox","dataView","title"]),lang:r.getLocaleModel().get(["toolbox","dataView","lang"]),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"};return n},t}(yr);function Lmt(e,t){return F(e,function(r,n){var i=t&&t[n];if(rt(i)&&!B(i)){var a=rt(r)&&!B(r);a||(r={value:r});var o=i.name!=null&&r.name==null;return r=J(r,i),o&&delete r.name,r}else return r})}cn({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(e,t){var r=[];D(e.newOption.series,function(n){var i=t.getSeriesByName(n.name)[0];if(!i)r.push(V({type:"scatter"},n));else{var a=i.get("data");r.push({name:n.name,data:Lmt(n.data,a)})}}),t.mergeOption(J({series:r},e.newOption))});var lG=Imt;var uG=D,fG=yt();function cG(e,t){var r=aI(e);uG(t,function(n,i){for(var a=r.length-1;a>=0;a--){var o=r[a];if(o[i])break}if(a<0){var s=e.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(s){var l=s.getPercentRange();r[0][i]={dataZoomId:i,start:l[0],end:l[1]}}}}),r.push(t)}function pG(e){var t=aI(e),r=t[t.length-1];t.length>1&&t.pop();var n={};return uG(r,function(i,a){for(var o=t.length-1;o>=0;o--)if(i=t[o][a],i){n[a]=i;break}}),n}function hG(e){fG(e).snapshots=null}function dG(e){return aI(e).length}function aI(e){var t=fG(e);return t.snapshots||(t.snapshots=[{}]),t.snapshots}var Pmt=function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.onclick=function(r,n){hG(r),n.dispatchAction({type:"restore",from:this.uid})},t.getDefaultOption=function(r){var n={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:r.getLocaleModel().get(["toolbox","restore","title"])};return n},t}(yr);cn({type:"restore",event:"restore",update:"prepareAndUpdate"},function(e,t){t.resetOption("recreate")});var mG=Pmt;var Rmt=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],Nmt=function(){function e(t,r,n){var i=this;this._targetInfoList=[];var a=gG(r,t);D(kmt,function(o,s){(!n||!n.include||gt(n.include,s)>=0)&&o(a,i._targetInfoList)})}return e.prototype.setOutputRanges=function(t,r){return this.matchOutputRanges(t,r,function(n,i,a){if((n.coordRanges||(n.coordRanges=[])).push(i),!n.coordRange){n.coordRange=i;var o=oI[n.brushType](0,a,i);n.__rangeOffset={offset:bG[n.brushType](o.values,n.range,[1,1]),xyMinMax:o.xyMinMax}}}),t},e.prototype.matchOutputRanges=function(t,r,n){D(t,function(i){var a=this.findTargetInfo(i,r);a&&a!==!0&&D(a.coordSyses,function(o){var s=oI[i.brushType](1,o,i.range,!0);n(i,s.values,o,r)})},this)},e.prototype.setInputRanges=function(t,r){D(t,function(n){var i=this.findTargetInfo(n,r);if(n.range=n.range||[],i&&i!==!0){n.panelId=i.panelId;var a=oI[n.brushType](0,i.coordSys,n.coordRange),o=n.__rangeOffset;n.range=o?bG[n.brushType](a.values,o.offset,Omt(a.xyMinMax,o.xyMinMax)):a.values}},this)},e.prototype.makePanelOpts=function(t,r){return F(this._targetInfoList,function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:r?r(n):null,clipPath:q1(i),isTargetByCursor:K1(i,t,n.coordSysModel),getLinearBrushOtherExtent:Z1(i)}})},e.prototype.controlSeries=function(t,r,n){var i=this.findTargetInfo(t,n);return i===!0||i&>(i.coordSyses,r.coordinateSystem)>=0},e.prototype.findTargetInfo=function(t,r){for(var n=this._targetInfoList,i=gG(r,t),a=0;ae[1]&&e.reverse(),e}function gG(e,t){return Us(e,t,{includeMainTypes:Rmt})}var kmt={grid:function(e,t){var r=e.xAxisModels,n=e.yAxisModels,i=e.gridModels,a=$(),o={},s={};!r&&!n&&!i||(D(r,function(l){var u=l.axis.grid.model;a.set(u.id,u),o[u.id]=!0}),D(n,function(l){var u=l.axis.grid.model;a.set(u.id,u),s[u.id]=!0}),D(i,function(l){a.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),a.each(function(l){var u=l.coordinateSystem,f=[];D(u.getCartesians(),function(c,p){(gt(r,c.getAxis("x").model)>=0||gt(n,c.getAxis("y").model)>=0)&&f.push(c)}),t.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:f[0],coordSyses:f,getPanelRect:xG.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(e,t){D(e.geoModels,function(r){var n=r.coordinateSystem;t.push({panelId:"geo--"+r.id,geoModel:r,coordSysModel:r,coordSys:n,coordSyses:[n],getPanelRect:xG.geo})})}},yG=[function(e,t){var r=e.xAxisModel,n=e.yAxisModel,i=e.gridModel;return!i&&r&&(i=r.axis.grid.model),!i&&n&&(i=n.axis.grid.model),i&&i===t.gridModel},function(e,t){var r=e.geoModel;return r&&r===t.geoModel}],xG={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var e=this.coordSys,t=e.getBoundingRect().clone();return t.applyTransform(oa(e)),t}},oI={lineX:pt(_G,0),lineY:pt(_G,1),rect:function(e,t,r,n){var i=e?t.pointToData([r[0][0],r[1][0]],n):t.dataToPoint([r[0][0],r[1][0]],n),a=e?t.pointToData([r[0][1],r[1][1]],n):t.dataToPoint([r[0][1],r[1][1]],n),o=[sI([i[0],a[0]]),sI([i[1],a[1]])];return{values:o,xyMinMax:o}},polygon:function(e,t,r,n){var i=[[1/0,-1/0],[1/0,-1/0]],a=F(r,function(o){var s=e?t.pointToData(o,n):t.dataToPoint(o,n);return i[0][0]=Math.min(i[0][0],s[0]),i[1][0]=Math.min(i[1][0],s[1]),i[0][1]=Math.max(i[0][1],s[0]),i[1][1]=Math.max(i[1][1],s[1]),s});return{values:a,xyMinMax:i}}};function _G(e,t,r,n){var i=r.getAxis(["x","y"][e]),a=sI(F([0,1],function(s){return t?i.coordToData(i.toLocalCoord(n[s]),!0):i.toGlobalCoord(i.dataToCoord(n[s]))})),o=[];return o[e]=a,o[1-e]=[NaN,NaN],{values:a,xyMinMax:o}}var bG={lineX:pt(SG,0),lineY:pt(SG,1),rect:function(e,t,r){return[[e[0][0]-r[0]*t[0][0],e[0][1]-r[0]*t[0][1]],[e[1][0]-r[1]*t[1][0],e[1][1]-r[1]*t[1][1]]]},polygon:function(e,t,r){return F(e,function(n,i){return[n[0]-r[0]*t[i][0],n[1]-r[1]*t[i][1]]})}};function SG(e,t,r,n){return[t[0]-n[e]*r[0],t[1]-n[e]*r[1]]}function Omt(e,t){var r=wG(e),n=wG(t),i=[r[0]/n[0],r[1]/n[1]];return isNaN(i[0])&&(i[0]=1),isNaN(i[1])&&(i[1]=1),i}function wG(e){return e?[e[0][1]-e[0][0],e[1][1]-e[1][0]]:[NaN,NaN]}var mm=Nmt;var lI=D,zmt=kO("toolbox-dataZoom_");var Umt=function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(r,n,i,a){this._brushController||(this._brushController=new Up(i.getZr()),this._brushController.on("brush",Z(this._onBrush,this)).mount()),Fmt(r,n,this,a,i),Bmt(r,n)},t.prototype.onclick=function(r,n,i){Vmt[i].call(this)},t.prototype.remove=function(r,n){this._brushController&&this._brushController.unmount()},t.prototype.dispose=function(r,n){this._brushController&&this._brushController.dispose()},t.prototype._onBrush=function(r){var n=r.areas;if(!r.isEnd||!n.length)return;var i={},a=this.ecModel;this._brushController.updateCovers([]);var o=new mm(uI(this.model),a,{include:["grid"]});o.matchOutputRanges(n,a,function(u,f,c){if(c.type==="cartesian2d"){var p=u.brushType;p==="rect"?(s("x",c,f[0]),s("y",c,f[1])):s({lineX:"x",lineY:"y"}[p],c,f)}}),cG(a,i),this._dispatchZoomAction(i);function s(u,f,c){var p=f.getAxis(u),h=p.model,d=l(u,h,a),m=d.findRepresentativeAxisProxy(h).getMinMaxSpan();(m.minValueSpan!=null||m.maxValueSpan!=null)&&(c=Hn(0,c.slice(),p.scale.getExtent(),0,m.minValueSpan,m.maxValueSpan)),d&&(i[d.id]={dataZoomId:d.id,startValue:c[0],endValue:c[1]})}function l(u,f,c){var p;return c.eachComponent({mainType:"dataZoom",subType:"select"},function(h){var d=h.getAxisModel(u,f.componentIndex);d&&(p=h)}),p}},t.prototype._dispatchZoomAction=function(r){var n=[];lI(r,function(i,a){n.push(at(i))}),n.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:n})},t.getDefaultOption=function(r){var n={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:r.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}};return n},t}(yr),Vmt={zoom:function(){var e=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:e})},back:function(){this._dispatchZoomAction(pG(this.ecModel))}};function uI(e){var t={xAxisIndex:e.get("xAxisIndex",!0),yAxisIndex:e.get("yAxisIndex",!0),xAxisId:e.get("xAxisId",!0),yAxisId:e.get("yAxisId",!0)};return t.xAxisIndex==null&&t.xAxisId==null&&(t.xAxisIndex="all"),t.yAxisIndex==null&&t.yAxisId==null&&(t.yAxisIndex="all"),t}function Bmt(e,t){e.setIconStatus("back",dG(t)>1?"emphasis":"normal")}function Fmt(e,t,r,n,i){var a=r._isZoomActive;n&&n.type==="takeGlobalCursor"&&(a=n.key==="dataZoomSelect"?n.dataZoomSelectActive:!1),r._isZoomActive=a,e.setIconStatus("zoom",a?"emphasis":"normal");var o=new mm(uI(e),t,{include:["grid"]}),s=o.makePanelOpts(i,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});r._brushController.setPanels(s).enableBrush(a&&s.length?{brushType:"auto",brushStyle:e.getModel("brushStyle").getItemStyle()}:!1)}i3("dataZoom",function(e){var t=e.getComponent("toolbox",0),r=["feature","dataZoom"];if(!t||t.get(r)==null)return;var n=t.getModel(r),i=[],a=uI(n),o=Us(e,a);lI(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),lI(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,f){var c=l.componentIndex,p={type:"select",$fromToolbox:!0,filterMode:n.get("filterMode",!0)||"filter",id:zmt+u+c};p[f]=c,i.push(p)}return i});var TG=Umt;function fI(e){e.registerComponentModel(eG),e.registerComponentView(nG),Sl("saveAsImage",iG),Sl("magicType",sG),Sl("dataView",lG),Sl("dataZoom",TG),Sl("restore",mG),Nt(J9)}var Gmt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="tooltip",t.dependencies=["axisPointer"],t.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}},t}(Pt),MG=Gmt;function w_(e){var t=e.get("confine");return t!=null?!!t:e.get("renderMode")==="richText"}function AG(e){if(Ot.domSupported){for(var t=document.documentElement.style,r=0,n=e.length;r-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=a==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=a==="top"?225:45)+"deg)");var f=u*Math.PI/180,c=o+i,p=c*Math.abs(Math.cos(f))+c*Math.abs(Math.sin(f)),h=Math.round(((p-Math.SQRT2*i)/2+Math.SQRT2*i-(p-c)/2)*100)/100;s+=";"+a+":-"+h+"px";var d=t+" solid "+i+"px;",m=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+d,"border-right:"+d,"background-color:"+n+";"];return'
'}function qmt(e,t){var r="cubic-bezier(0.23,1,0.32,1)",n=" "+e/2+"s "+r,i="opacity"+n+",visibility"+n;return t||(n=" "+e+"s "+r,i+=Ot.transformSupported?","+hI+n:",left"+n+",top"+n),Hmt+":"+i}function EG(e,t,r){var n=e.toFixed(0)+"px",i=t.toFixed(0)+"px";if(!Ot.transformSupported)return r?"top:"+i+";left:"+n+";":[["top",i],["left",n]];var a=Ot.transform3dSupported,o="translate"+(a?"3d":"")+"("+n+","+i+(a?",0":"")+")";return r?"top:0;left:0;"+hI+":"+o+";":[["top",0],["left",0],[cI,o]]}function Zmt(e){var t=[],r=e.get("fontSize"),n=e.getTextColor();n&&t.push("color:"+n),t.push("font:"+e.getFont()),r&&t.push("line-height:"+Math.round(r*3/2)+"px");var i=e.get("textShadowColor"),a=e.get("textShadowBlur")||0,o=e.get("textShadowOffsetX")||0,s=e.get("textShadowOffsetY")||0;return i&&a&&t.push("text-shadow:"+o+"px "+s+"px "+a+"px "+i),D(["decoration","align"],function(l){var u=e.get(l);u&&t.push("text-"+l+":"+u)}),t.join(";")}function Kmt(e,t,r){var n=[],i=e.get("transitionDuration"),a=e.get("backgroundColor"),o=e.get("shadowBlur"),s=e.get("shadowColor"),l=e.get("shadowOffsetX"),u=e.get("shadowOffsetY"),f=e.getModel("textStyle"),c=lx(e,"html"),p=l+"px "+u+"px "+o+"px "+s;return n.push("box-shadow:"+p),t&&i&&n.push(qmt(i,r)),a&&n.push("background-color:"+a),D(["width","color","radius"],function(h){var d="border-"+h,m=F0(d),v=e.get(m);v!=null&&n.push(d+":"+v+(h==="color"?"":"px"))}),n.push(Zmt(f)),c!=null&&n.push("padding:"+la(c).join("px ")+"px"),n.join(";")+";"}function IG(e,t,r,n,i){var a=t&&t.painter;if(r){var o=a&&a.getViewportRoot();o&&xk(e,o,document.body,n,i)}else{e[0]=n,e[1]=i;var s=a&&a.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var $mt=function(){function e(t,r,n){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,Ot.wxa)return null;var i=document.createElement("div");i.domBelongToZr=!0,this.el=i;var a=this._zr=r.getZr(),o=this._appendToBody=n&&n.appendToBody;IG(this._styleCoord,a,o,r.getWidth()/2,r.getHeight()/2),o?document.body.appendChild(i):t.appendChild(i),this._container=t;var s=this;i.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},i.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=a.handler,f=a.painter.getViewportRoot();Tn(f,l,!0),u.dispatch("mousemove",l)}},i.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return e.prototype.update=function(t){var r=this._container,n=DG(r,"position"),i=r.style;i.position!=="absolute"&&n!=="absolute"&&(i.position="relative");var a=t.get("alwaysShowContent");a&&this._moveIfResized(),this._alwaysShowContent=a,this.el.className=t.get("className")||""},e.prototype.show=function(t,r){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,i=n.style,a=this._styleCoord;n.innerHTML?i.cssText=Wmt+Kmt(t,!this._firstShow,this._longHide)+EG(a[0],a[1],!0)+("border-color:"+ua(r)+";")+(t.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):i.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(t,r,n,i,a){var o=this.el;if(t==null){o.innerHTML="";return}var s="";if(H(a)&&n.get("trigger")==="item"&&!w_(n)&&(s=Xmt(n,i,a)),H(t))o.innerHTML=t+s;else if(t){o.innerHTML="",B(t)||(t=[t]);for(var l=0;l=0?this._tryShow(a,o):i==="leave"&&this._hide(o))},this))},t.prototype._keepShow=function(){var r=this._tooltipModel,n=this._ecModel,i=this._api,a=r.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&a!=="none"&&a!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!i.isDisposed()&&o.manuallyShowTip(r,n,i,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(r,n,i,a){if(!(a.from===this.uid||Ot.node||!i.getDom())){var o=kG(a,i);this._ticket="";var s=a.dataByCoordSys,l=ngt(a,n,i);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:a.position,positionDefault:"bottom"},o)}else if(a.tooltip&&a.x!=null&&a.y!=null){var f=Qmt;f.x=a.x,f.y=a.y,f.update(),ht(f).tooltipConfig={name:null,option:a.tooltip},this._tryShow({offsetX:a.x,offsetY:a.y,target:f},o)}else if(s)this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,dataByCoordSys:s,tooltipOption:a.tooltipOption},o);else if(a.seriesIndex!=null){if(this._manuallyAxisShowTip(r,n,i,a))return;var c=dm(a,n),p=c.point[0],h=c.point[1];p!=null&&h!=null&&this._tryShow({offsetX:p,offsetY:h,target:c.el,position:a.position,positionDefault:"bottom"},o)}else a.x!=null&&a.y!=null&&(i.dispatchAction({type:"updateAxisPointer",x:a.x,y:a.y}),this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,target:i.getZr().findHover(a.x,a.y).target},o))}},t.prototype.manuallyHideTip=function(r,n,i,a){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,a.from!==this.uid&&this._hide(kG(a,i))},t.prototype._manuallyAxisShowTip=function(r,n,i,a){var o=a.seriesIndex,s=a.dataIndex,l=n.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=n.getSeriesByIndex(o);if(u){var f=u.getData(),c=gm([f.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(c.get("trigger")==="axis")return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:a.position}),!0}}},t.prototype._tryShow=function(r,n){var i=r.target,a=this._tooltipModel;if(a){this._lastX=r.offsetX,this._lastY=r.offsetY;var o=r.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,r);else if(i){this._lastDataByCoordSys=null;var s,l;pa(i,function(u){if(ht(u).dataIndex!=null)return s=u,!0;if(ht(u).tooltipConfig!=null)return l=u,!0},!0),s?this._showSeriesItemTooltip(r,s,n):l?this._showComponentItemTooltip(r,l,n):this._hide(n)}else this._lastDataByCoordSys=null,this._hide(n)}},t.prototype._showOrMove=function(r,n){var i=r.get("showDelay");n=Z(n,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(n,i):n()},t.prototype._showAxisTooltip=function(r,n){var i=this._ecModel,a=this._tooltipModel,o=[n.offsetX,n.offsetY],s=gm([n.tooltipOption],a),l=this._renderMode,u=[],f=xe("section",{blocks:[],noHeader:!0}),c=[],p=new ux;D(r,function(y){D(y.dataByAxis,function(x){var _=i.getComponent(x.axisDim+"Axis",x.axisIndex),S=x.value;if(!(!_||S==null)){var b=VE(S,_.axis,i,x.seriesDataIndices,x.valueLabelOpt),w=xe("section",{header:b,noHeader:!pr(b),sortBlocks:!0,blocks:[]});f.blocks.push(w),D(x.seriesDataIndices,function(T){var M=i.getSeriesByIndex(T.seriesIndex),C=T.dataIndexInside,A=M.getDataParams(C);if(!(A.dataIndex<0)){A.axisDim=x.axisDim,A.axisIndex=x.axisIndex,A.axisType=x.axisType,A.axisId=x.axisId,A.axisValue=zv(_.axis,{value:S}),A.axisValueLabel=b,A.marker=p.makeTooltipMarker("item",ua(A.color),l);var P=mM(M.formatTooltip(C,!0,null)),L=P.frag;if(L){var I=gm([M],a).get("valueFormatter");w.blocks.push(I?V({valueFormatter:I},L):L)}P.text&&c.push(P.text),u.push(A)}})}})}),f.blocks.reverse(),c.reverse();var h=n.position,d=s.get("order"),m=wM(f,p,l,d,i.get("useUTC"),s.get("textStyle"));m&&c.unshift(m);var v=l==="richText"?` -`:"
",g=c.join(v);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(r,u)?this._updatePosition(s,h,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,g,u,Math.random()+"",o[0],o[1],h,null,p)})},t.prototype._showSeriesItemTooltip=function(r,n,i){var a=this._ecModel,o=ht(n),s=o.seriesIndex,l=a.getSeriesByIndex(s),u=o.dataModel||l,f=o.dataIndex,c=o.dataType,p=u.getData(c),h=this._renderMode,d=r.positionDefault,m=mm([p.getItemModel(f),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,d?{position:d}:null),v=m.get("trigger");if(!(v!=null&&v!=="item")){var g=u.getDataParams(f,c),y=new ux;g.marker=y.makeTooltipMarker("item",ua(g.color),h);var x=mM(u.formatTooltip(f,!1,c)),_=m.get("order"),S=m.get("valueFormatter"),b=x.frag,w=b?wM(S?V({valueFormatter:S},b):b,y,h,_,a.get("useUTC"),m.get("textStyle")):x.text,T="item_"+u.name+"_"+f;this._showOrMove(m,function(){this._showTooltipContent(m,w,g,T,r.offsetX,r.offsetY,r.position,r.target,y)}),i({type:"showTip",dataIndexInside:f,dataIndex:p.getRawIndex(f),seriesIndex:s,from:this.uid})}},t.prototype._showComponentItemTooltip=function(r,n,i){var a=ht(n),o=a.tooltipConfig,s=o.option||{};if(H(s)){var l=s;s={content:l,formatter:l}}var u=[s],f=this._ecModel.getComponent(a.componentMainType,a.componentIndex);f&&u.push(f),u.push({formatter:s.content});var c=r.positionDefault,p=mm(u,this._tooltipModel,c?{position:c}:null),h=p.get("content"),d=Math.random()+"",m=new ux;this._showOrMove(p,function(){var v=at(p.get("formatterParams")||{});this._showTooltipContent(p,h,v,d,r.offsetX,r.offsetY,r.position,n,m)}),i({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(r,n,i,a,o,s,l,u,f){if(this._ticket="",!(!r.get("showContent")||!r.get("show"))){var c=this._tooltipContent;c.setEnterable(r.get("enterable"));var p=r.get("formatter");l=l||r.get("position");var h=n,d=this._getNearestPoint([o,s],i,r.get("trigger"),r.get("borderColor")),m=d.color;if(p)if(H(p)){var v=r.ecModel.get("useUTC"),g=B(i)?i[0]:i,y=g&&g.axisType&&g.axisType.indexOf("time")>=0;h=p,y&&(h=Yu(g.axisValue,h,v)),h=H0(h,i,!0)}else if(j(p)){var x=Z(function(_,S){_===this._ticket&&(c.setContent(S,f,r,m,l),this._updatePosition(r,l,o,s,c,i,u))},this);this._ticket=a,h=p(i,a,x)}else h=p;c.setContent(h,f,r,m,l),c.show(r,m),this._updatePosition(r,l,o,s,c,i,u)}},t.prototype._getNearestPoint=function(r,n,i,a){if(i==="axis"||B(n))return{color:a||(this._renderMode==="html"?"#fff":"none")};if(!B(n))return{color:a||n.color||n.borderColor}},t.prototype._updatePosition=function(r,n,i,a,o,s,l){var u=this._api.getWidth(),f=this._api.getHeight();n=n||r.get("position");var c=o.getSize(),p=r.get("align"),h=r.get("verticalAlign"),d=l&&l.getBoundingRect().clone();if(l&&d.applyTransform(l.transform),j(n)&&(n=n([i,a],s,o.el,d,{viewSize:[u,f],contentSize:c.slice()})),B(n))i=q(n[0],u),a=q(n[1],f);else if(rt(n)){var m=n;m.width=c[0],m.height=c[1];var v=re(m,{width:u,height:f});i=v.x,a=v.y,p=null,h=null}else if(H(n)&&l){var g=egt(n,d,c,r.get("borderWidth"));i=g[0],a=g[1]}else{var g=Jmt(i,a,o,u,f,p?null:20,h?null:20);i=g[0],a=g[1]}if(p&&(i-=kG(p)?c[0]/2:p==="right"?c[0]:0),h&&(a-=kG(h)?c[1]/2:h==="bottom"?c[1]:0),w_(r)){var g=tgt(i,a,o,u,f);i=g[0],a=g[1]}o.moveTo(i,a)},t.prototype._updateContentNotChangedOnAxis=function(r,n){var i=this._lastDataByCoordSys,a=this._cbParamsList,o=!!i&&i.length===r.length;return o&&D(i,function(s,l){var u=s.dataByAxis||[],f=r[l]||{},c=f.dataByAxis||[];o=o&&u.length===c.length,o&&D(u,function(p,h){var d=c[h]||{},m=p.seriesDataIndices||[],v=d.seriesDataIndices||[];o=o&&p.value===d.value&&p.axisType===d.axisType&&p.axisId===d.axisId&&m.length===v.length,o&&D(m,function(g,y){var x=v[y];o=o&&g.seriesIndex===x.seriesIndex&&g.dataIndex===x.dataIndex}),a&&D(p.seriesDataIndices,function(g){var y=g.seriesIndex,x=n[y],_=a[y];x&&_&&_.data!==x.data&&(o=!1)})})}),this._lastDataByCoordSys=r,this._cbParamsList=n,!!o},t.prototype._hide=function(r){this._lastDataByCoordSys=null,r({type:"hideTip",from:this.uid})},t.prototype.dispose=function(r,n){Ot.node||!n.getDom()||(Qo(this,"_updatePosition"),this._tooltipContent.dispose(),pm("itemTooltip",n))},t.type="tooltip",t}(Xt);function mm(e,t,r){var n=t.ecModel,i;r?(i=new Ht(r,n,n),i=new Ht(t.option,i,n)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof Ht&&(o=o.get("tooltip",!0)),H(o)&&(o={formatter:o}),o&&(i=new Ht(o,i,n)))}return i}function NG(e,t){return e.dispatchAction||Z(t.dispatchAction,t)}function Jmt(e,t,r,n,i,a,o){var s=r.getSize(),l=s[0],u=s[1];return a!=null&&(e+l+a+2>n?e-=l+a:e+=a),o!=null&&(t+u+o>i?t-=u+o:t+=o),[e,t]}function tgt(e,t,r,n,i){var a=r.getSize(),o=a[0],s=a[1];return e=Math.min(e+o,n)-o,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function egt(e,t,r,n){var i=r[0],a=r[1],o=Math.ceil(Math.SQRT2*n)+8,s=0,l=0,u=t.width,f=t.height;switch(e){case"inside":s=t.x+u/2-i/2,l=t.y+f/2-a/2;break;case"top":s=t.x+u/2-i/2,l=t.y-a-o;break;case"bottom":s=t.x+u/2-i/2,l=t.y+f+o;break;case"left":s=t.x-i-o,l=t.y+f/2-a/2;break;case"right":s=t.x+u+o,l=t.y+f/2-a/2}return[s,l]}function kG(e){return e==="center"||e==="middle"}function rgt(e,t,r){var n=Nd(e).queryOptionMap,i=n.keys()[0];if(!(!i||i==="series")){var a=Vs(t,i,n.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),o=a.models[0];if(o){var s=r.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var f=ht(u).tooltipConfig;if(f&&f.name===e.name)return l=u,!0}),l)return{componentMainType:i,componentIndex:o.componentIndex,el:l}}}}var OG=Qmt;function dI(e){Nt(wa),e.registerComponentModel(TG),e.registerComponentView(OG),e.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},ce),e.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},ce)}var ngt=["rect","polygon","keep","clear"];function vI(e,t){var r=Yt(e?e.brush:[]);if(r.length){var n=[];D(r,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(n=n.concat(u))});var i=e&&e.toolbox;B(i)&&(i=i[0]),i||(i={feature:{}},e.toolbox=[i]);var a=i.feature||(i.feature={}),o=a.brush||(a.brush={}),s=o.type||(o.type=[]);s.push.apply(s,n),igt(s),t&&!s.length&&s.push.apply(s,ngt)}}function igt(e){var t={};D(e,function(r){t[r]=1}),e.length=0,D(t,function(r,n){e.push(n)})}var zG=D;function UG(e){if(e){for(var t in e)if(e.hasOwnProperty(t))return!0}}function gm(e,t,r){var n={};return zG(t,function(a){var o=n[a]=i();zG(e[a],function(s,l){if(Be.isValidType(l)){var u={type:l,visual:s};r&&r(u,a),o[l]=new Be(u),l==="opacity"&&(u=at(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new Be(u))}})}),n;function i(){var a=function(){};a.prototype.__hidden=a.prototype;var o=new a;return o}}function T_(e,t,r){var n;D(r,function(i){t.hasOwnProperty(i)&&UG(t[i])&&(n=!0)}),n&&D(r,function(i){t.hasOwnProperty(i)&&UG(t[i])?e[i]=at(t[i]):delete e[i]})}function VG(e,t,r,n,i,a){var o={};D(e,function(c){var p=Be.prepareVisualTypes(t[c]);o[c]=p});var s;function l(c){return xv(r,s,c)}function u(c,p){IM(r,s,c,p)}a==null?r.each(f):r.each([a],f);function f(c,p){s=a==null?c:p;var h=r.getRawDataItem(s);if(!(h&&h.visualMap===!1))for(var d=n.call(i,c),m=t[d],v=o[d],g=0,y=v.length;gt[0][1]&&(t[0][1]=a[0]),a[1]t[1][1]&&(t[1][1]=a[1])}return t&&XG(t)}};function XG(e){return new dt(e[0][0],e[1][0],e[0][1]-e[0][0],e[1][1]-e[1][0])}var ugt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r,n){this.ecModel=r,this.api=n,this.model,(this._brushController=new Up(n.getZr())).on("brush",Z(this._onBrush,this)).mount()},t.prototype.render=function(r,n,i,a){this.model=r,this._updateController(r,n,i,a)},t.prototype.updateTransform=function(r,n,i,a){yI(n),this._updateController(r,n,i,a)},t.prototype.updateVisual=function(r,n,i,a){this.updateTransform(r,n,i,a)},t.prototype.updateView=function(r,n,i,a){this._updateController(r,n,i,a)},t.prototype._updateController=function(r,n,i,a){(!a||a.$from!==r.id)&&this._brushController.setPanels(r.brushTargetManager.makePanelOpts(i)).enableBrush(r.brushOption).updateCovers(r.areas.slice())},t.prototype.dispose=function(){this._brushController.dispose()},t.prototype._onBrush=function(r){var n=this.model.id,i=this.model.brushTargetManager.setOutputRanges(r.areas,this.ecModel);(!r.isEnd||r.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:n,areas:at(i),$from:n}),r.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:n,areas:at(i),$from:n})},t.type="brush",t}(Xt),qG=ugt;var fgt="#ddd",cgt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.areas=[],r.brushOption={},r}return t.prototype.optionUpdated=function(r,n){var i=this.option;!n&&T_(i,r,["inBrush","outOfBrush"]);var a=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:fgt},a.hasOwnProperty("liftZ")||(a.liftZ=5)},t.prototype.setAreas=function(r){r&&(this.areas=F(r,function(n){return ZG(this.option,n)},this))},t.prototype.setBrushOption=function(r){this.brushOption=ZG(this.option,r),this.brushType=this.brushOption.brushType},t.type="brush",t.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],t.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},t}(Pt);function ZG(e,t){return _t({brushType:e.brushType,brushMode:e.brushMode,transformable:e.transformable,brushStyle:new Ht(e.brushStyle).getItemStyle(),removeOnClick:e.removeOnClick,z:e.z},t,!0)}var KG=cgt;var pgt=["rect","polygon","lineX","lineY","keep","clear"],hgt=function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(r,n,i){var a,o,s;n.eachComponent({mainType:"brush"},function(l){a=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=a,this._brushMode=o,D(r.get("type",!0),function(l){r.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===a)?"emphasis":"normal")})},t.prototype.updateView=function(r,n,i){this.render(r,n,i)},t.prototype.getIcons=function(){var r=this.model,n=r.get("icon",!0),i={};return D(r.get("type",!0),function(a){n[a]&&(i[a]=n[a])}),i},t.prototype.onclick=function(r,n,i){var a=this._brushType,o=this._brushMode;i==="clear"?(n.dispatchAction({type:"axisAreaSelect",intervals:[]}),n.dispatchAction({type:"brush",command:"clear",areas:[]})):n.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:i==="keep"?a:a===i?!1:i,brushMode:i==="keep"?o==="multiple"?"single":"multiple":o}})},t.getDefaultOption=function(r){var n={show:!0,type:pgt.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:r.getLocaleModel().get(["toolbox","brush","title"])};return n},t}(yr),$G=hgt;function _I(e){e.registerComponentView(qG),e.registerComponentModel(KG),e.registerPreprocessor(vI),e.registerVisual(e.PRIORITY.VISUAL.BRUSH,xI),e.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(t,r){r.eachComponent({mainType:"brush",query:t},function(n){n.setAreas(t.areas)})}),e.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},ce),e.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},ce),Sl("brush",$G)}var dgt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.layoutMode={type:"box",ignoreSize:!0},r}return t.type="title",t.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},t}(Pt),vgt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){if(this.group.removeAll(),!!r.get("show")){var a=this.group,o=r.getModel("textStyle"),s=r.getModel("subtextStyle"),l=r.get("textAlign"),u=bt(r.get("textBaseline"),r.get("textVerticalAlign")),f=new Lt({style:Qt(o,{text:r.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),c=f.getBoundingRect(),p=r.get("subtext"),h=new Lt({style:Qt(s,{text:p,fill:s.getTextColor(),y:c.height+r.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),d=r.get("link"),m=r.get("sublink"),v=r.get("triggerEvent",!0);f.silent=!d&&!v,h.silent=!m&&!v,d&&f.on("click",function(){Xu(d,"_"+r.get("target"))}),m&&h.on("click",function(){Xu(m,"_"+r.get("subtarget"))}),ht(f).eventData=ht(h).eventData=v?{componentType:"title",componentIndex:r.componentIndex}:null,a.add(f),p&&a.add(h);var g=a.getBoundingRect(),y=r.getBoxLayoutParams();y.width=g.width,y.height=g.height;var x=re(y,{width:i.getWidth(),height:i.getHeight()},r.get("padding"));l||(l=r.get("left")||r.get("right"),l==="middle"&&(l="center"),l==="right"?x.x+=x.width:l==="center"&&(x.x+=x.width/2)),u||(u=r.get("top")||r.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?x.y+=x.height:u==="middle"&&(x.y+=x.height/2),u=u||"top"),a.x=x.x,a.y=x.y,a.markRedraw();var _={align:l,verticalAlign:u};f.setStyle(_),h.setStyle(_),g=a.getBoundingRect();var S=x.margin,b=r.getItemStyle(["color","opacity"]);b.fill=r.get("backgroundColor");var w=new At({shape:{x:g.x-S[3],y:g.y-S[0],width:g.width+S[1]+S[3],height:g.height+S[0]+S[2],r:r.get("borderRadius")},style:b,subPixelOptimize:!0,silent:!0});a.add(w)}},t.type="title",t}(Xt);function bI(e){e.registerComponentModel(dgt),e.registerComponentView(vgt)}var mgt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.layoutMode="box",r}return t.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i),this._initData()},t.prototype.mergeOption=function(r){e.prototype.mergeOption.apply(this,arguments),this._initData()},t.prototype.setCurrentIndex=function(r){r==null&&(r=this.option.currentIndex);var n=this._data.count();this.option.loop?r=(r%n+n)%n:(r>=n&&(r=n-1),r<0&&(r=0)),this.option.currentIndex=r},t.prototype.getCurrentIndex=function(){return this.option.currentIndex},t.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},t.prototype.setPlayState=function(r){this.option.autoPlay=!!r},t.prototype.getPlayState=function(){return!!this.option.autoPlay},t.prototype._initData=function(){var r=this.option,n=r.data||[],i=r.axisType,a=this._names=[],o;i==="category"?(o=[],D(n,function(u,f){var c=Te(ra(u),""),p;rt(u)?(p=at(u),p.value=f):p=f,o.push(p),a.push(c)})):o=n;var s={category:"ordinal",time:"time",value:"number"}[i]||"number",l=this._data=new Ne([{name:"value",type:s}],this);l.initData(o,a)},t.prototype.getData=function(){return this._data},t.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},t.type="timeline",t.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},t}(Pt),SI=mgt;var jG=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="timeline.slider",t.defaultOption=Kr(SI.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),t}(SI);ie(jG,up.prototype);var QG=jG;var ggt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="timeline",t}(Xt),JG=ggt;var ygt=function(e){N(t,e);function t(r,n,i,a){var o=e.call(this,r,n,i)||this;return o.type=a||"value",o}return t.prototype.getLabelModel=function(){return this.model.getModel("label")},t.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},t}(Mr),tH=ygt;var wI=Math.PI,eH=yt(),xgt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r,n){this.api=n},t.prototype.render=function(r,n,i){if(this.model=r,this.api=i,this.ecModel=n,this.group.removeAll(),r.get("show",!0)){var a=this._layout(r,i),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(a,r);r.formatTooltip=function(u){var f=l.scale.getLabel({value:u});return xe("nameValue",{noName:!0,value:f})},D(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](a,o,l,r)},this),this._renderAxisLabel(a,s,l,r),this._position(a,r)}this._doPlayStop(),this._updateTicksStatus()},t.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},t.prototype.dispose=function(){this._clearTimer()},t.prototype._layout=function(r,n){var i=r.get(["label","position"]),a=r.get("orient"),o=bgt(r,n),s;i==null||i==="auto"?s=a==="horizontal"?o.y+o.height/2=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},f={horizontal:0,vertical:wI/2},c=a==="vertical"?o.height:o.width,p=r.getModel("controlStyle"),h=p.get("show",!0),d=h?p.get("itemSize"):0,m=h?p.get("itemGap"):0,v=d+m,g=r.get(["label","rotate"])||0;g=g*wI/180;var y,x,_,S=p.get("position",!0),b=h&&p.get("showPlayBtn",!0),w=h&&p.get("showPrevBtn",!0),T=h&&p.get("showNextBtn",!0),M=0,C=c;S==="left"||S==="bottom"?(b&&(y=[0,0],M+=v),w&&(x=[M,0],M+=v),T&&(_=[C-d,0],C-=v)):(b&&(y=[C-d,0],C-=v),w&&(x=[0,0],M+=v),T&&(_=[C-d,0],C-=v));var A=[M,C];return r.get("inverse")&&A.reverse(),{viewRect:o,mainLength:c,orient:a,rotation:f[a],labelRotation:g,labelPosOpt:s,labelAlign:r.get(["label","align"])||l[a],labelBaseline:r.get(["label","verticalAlign"])||r.get(["label","baseline"])||u[a],playPosition:y,prevBtnPosition:x,nextBtnPosition:_,axisExtent:A,controlSize:d,controlGap:m}},t.prototype._position=function(r,n){var i=this._mainGroup,a=this._labelGroup,o=r.viewRect;if(r.orient==="vertical"){var s=tr(),l=o.x,u=o.y+o.height;Nr(s,s,[-l,-u]),Cn(s,s,-wI/2),Nr(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var f=y(o),c=y(i.getBoundingRect()),p=y(a.getBoundingRect()),h=[i.x,i.y],d=[a.x,a.y];d[0]=h[0]=f[0][0];var m=r.labelPosOpt;if(m==null||H(m)){var v=m==="+"?0:1;x(h,c,f,1,v),x(d,p,f,1,1-v)}else{var v=m>=0?0:1;x(h,c,f,1,v),d[1]=h[1]+m}i.setPosition(h),a.setPosition(d),i.rotation=a.rotation=r.rotation,g(i),g(a);function g(_){_.originX=f[0][0]-_.x,_.originY=f[1][0]-_.y}function y(_){return[[_.x,_.x+_.width],[_.y,_.y+_.height]]}function x(_,S,b,w,T){_[w]+=b[w][T]-S[w][T]}},t.prototype._createAxis=function(r,n){var i=n.getData(),a=n.get("axisType"),o=_gt(n,a);o.getTicks=function(){return i.mapArray(["value"],function(u){return{value:u}})};var s=i.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new tH("value",o,r.axisExtent,a);return l.model=n,l},t.prototype._createGroup=function(r){var n=this[r]=new nt;return this.group.add(n),n},t.prototype._renderAxisLine=function(r,n,i,a){var o=i.getExtent();if(a.get(["lineStyle","show"])){var s=new De({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:V({lineCap:"round"},a.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});n.add(s);var l=this._progressLine=new De({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:J({lineCap:"round",lineWidth:s.style.lineWidth},a.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});n.add(l)}},t.prototype._renderAxisTick=function(r,n,i,a){var o=this,s=a.getData(),l=i.scale.getTicks();this._tickSymbols=[],D(l,function(u){var f=i.dataToCoord(u.value),c=s.getItemModel(u.value),p=c.getModel("itemStyle"),h=c.getModel(["emphasis","itemStyle"]),d=c.getModel(["progress","itemStyle"]),m={x:f,y:0,onclick:Z(o._changeTimeline,o,u.value)},v=rH(c,p,n,m);v.ensureState("emphasis").style=h.getItemStyle(),v.ensureState("progress").style=d.getItemStyle(),Za(v);var g=ht(v);c.get("tooltip")?(g.dataIndex=u.value,g.dataModel=a):g.dataIndex=g.dataModel=null,o._tickSymbols.push(v)})},t.prototype._renderAxisLabel=function(r,n,i,a){var o=this,s=i.getLabelModel();if(s.get("show")){var l=a.getData(),u=i.getViewLabels();this._tickLabels=[],D(u,function(f){var c=f.tickValue,p=l.getItemModel(c),h=p.getModel("label"),d=p.getModel(["emphasis","label"]),m=p.getModel(["progress","label"]),v=i.dataToCoord(f.tickValue),g=new Lt({x:v,y:0,rotation:r.labelRotation-r.rotation,onclick:Z(o._changeTimeline,o,c),silent:!1,style:Qt(h,{text:f.formattedLabel,align:r.labelAlign,verticalAlign:r.labelBaseline})});g.ensureState("emphasis").style=Qt(d),g.ensureState("progress").style=Qt(m),n.add(g),Za(g),eH(g).dataIndex=c,o._tickLabels.push(g)})}},t.prototype._renderControl=function(r,n,i,a){var o=r.controlSize,s=r.rotation,l=a.getModel("controlStyle").getItemStyle(),u=a.getModel(["emphasis","controlStyle"]).getItemStyle(),f=a.getPlayState(),c=a.get("inverse",!0);p(r.nextBtnPosition,"next",Z(this._changeTimeline,this,c?"-":"+")),p(r.prevBtnPosition,"prev",Z(this._changeTimeline,this,c?"+":"-")),p(r.playPosition,f?"stop":"play",Z(this._handlePlayClick,this,!f),!0);function p(h,d,m,v){if(h){var g=kr(bt(a.get(["controlStyle",d+"BtnSize"]),o),o),y=[0,-g/2,g,g],x=Sgt(a,d+"Icon",y,{x:h[0],y:h[1],originX:o/2,originY:0,rotation:v?-s:0,rectHover:!0,style:l,onclick:m});x.ensureState("emphasis").style=u,n.add(x),Za(x)}}},t.prototype._renderCurrentPointer=function(r,n,i,a){var o=a.getData(),s=a.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,f={onCreate:function(c){c.draggable=!0,c.drift=Z(u._handlePointerDrag,u),c.ondragend=Z(u._handlePointerDragend,u),nH(c,u._progressLine,s,i,a,!0)},onUpdate:function(c){nH(c,u._progressLine,s,i,a)}};this._currentPointer=rH(l,l,this._mainGroup,{},this._currentPointer,f)},t.prototype._handlePlayClick=function(r){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:r,from:this.uid})},t.prototype._handlePointerDrag=function(r,n,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},t.prototype._handlePointerDragend=function(r){this._pointerChangeTimeline([r.offsetX,r.offsetY],!0)},t.prototype._pointerChangeTimeline=function(r,n){var i=this._toAxisCoord(r)[0],a=this._axis,o=sr(a.getExtent().slice());i>o[1]&&(i=o[1]),i=0&&(o[a]=+o[a].toFixed(p)),[o,c]}var AI={min:pt(D_,"min"),max:pt(D_,"max"),average:pt(D_,"average"),median:pt(D_,"median")};function Tl(e,t){if(t){var r=e.getData(),n=e.coordinateSystem,i=n&&n.dimensions;if(!Mgt(t)&&!B(t.coord)&&B(i)){var a=DI(t,r,n,e);if(t=at(t),t.type&&AI[t.type]&&a.baseAxis&&a.valueAxis){var o=gt(i,a.baseAxis.dim),s=gt(i,a.valueAxis.dim),l=AI[t.type](r,a.baseDataDim,a.valueDataDim,o,s);t.coord=l[0],t.value=l[1]}else t.coord=[t.xAxis!=null?t.xAxis:t.radiusAxis,t.yAxis!=null?t.yAxis:t.angleAxis]}if(t.coord==null||!B(i))t.coord=[];else for(var u=t.coord,f=0;f<2;f++)AI[u[f]]&&(u[f]=I_(r,r.mapDimension(i[f]),u[f]));return t}}function DI(e,t,r,n){var i={};return e.valueIndex!=null||e.valueDim!=null?(i.valueDataDim=e.valueIndex!=null?t.getDimension(e.valueIndex):e.valueDim,i.valueAxis=r.getAxis(Agt(n,i.valueDataDim)),i.baseAxis=r.getOtherAxis(i.valueAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim)):(i.baseAxis=n.getBaseAxis(),i.valueAxis=r.getOtherAxis(i.baseAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim),i.valueDataDim=t.mapDimension(i.valueAxis.dim)),i}function Agt(e,t){var r=e.getData().getDimensionInfo(t);return r&&r.coordDim}function Ml(e,t){return e&&e.containData&&t.coord&&!CI(t)?e.containData(t.coord):!0}function uH(e,t,r){return e&&e.containZone&&t.coord&&r.coord&&!CI(t)&&!CI(r)?e.containZone(t.coord,r.coord):!0}function E_(e,t){return e?function(r,n,i,a){var o=a<2?r.coord&&r.coord[a]:r.value;return Ii(o,t[a])}:function(r,n,i,a){return Ii(r.value,t[a])}}function I_(e,t,r){if(r==="average"){var n=0,i=0;return e.each(t,function(a,o){isNaN(a)||(n+=a,i++)}),n/i}else return r==="median"?e.getMedian(t):e.getDataExtent(t)[r==="max"?1:0]}var II=yt(),Cgt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(){this.markerGroupMap=$()},t.prototype.render=function(r,n,i){var a=this,o=this.markerGroupMap;o.each(function(s){II(s).keep=!1}),n.eachSeries(function(s){var l=mn.getMarkerModelFromSeries(s,a.type);l&&a.renderSeries(s,l,n,i)}),o.each(function(s){!II(s).keep&&a.group.remove(s.group)})},t.prototype.markKeep=function(r){II(r).keep=!0},t.prototype.toggleBlurSeries=function(r,n){var i=this;D(r,function(a){var o=mn.getMarkerModelFromSeries(a,i.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(n?d0(l):Hd(l))})}})},t.type="marker",t}(Xt),$p=Cgt;function fH(e,t,r){var n=t.coordinateSystem;e.each(function(i){var a=e.getItemModel(i),o,s=q(a.get("x"),r.getWidth()),l=q(a.get("y"),r.getHeight());if(!isNaN(s)&&!isNaN(l))o=[s,l];else if(t.getMarkerPosition)o=t.getMarkerPosition(e.getValues(e.dimensions,i));else if(n){var u=e.get(n.dimensions[0],i),f=e.get(n.dimensions[1],i);o=n.dataToPoint([u,f])}isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),e.setItemLayout(i,o)})}var Dgt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.updateTransform=function(r,n,i){n.eachSeries(function(a){var o=mn.getMarkerModelFromSeries(a,"markPoint");o&&(fH(o.getData(),a,i),this.markerGroupMap.get(a.id).updateLayout())},this)},t.prototype.renderSeries=function(r,n,i,a){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,f=u.get(s)||u.set(s,new io),c=Egt(o,r,n);n.setData(c),fH(n.getData(),r,a),c.each(function(p){var h=c.getItemModel(p),d=h.getShallow("symbol"),m=h.getShallow("symbolSize"),v=h.getShallow("symbolRotate"),g=h.getShallow("symbolOffset"),y=h.getShallow("symbolKeepAspect");if(j(d)||j(m)||j(v)||j(g)){var x=n.getRawValue(p),_=n.getDataParams(p);j(d)&&(d=d(x,_)),j(m)&&(m=m(x,_)),j(v)&&(v=v(x,_)),j(g)&&(g=g(x,_))}var S=h.getModel("itemStyle").getItemStyle(),b=Qa(l,"color");S.fill||(S.fill=b),c.setItemVisual(p,{symbol:d,symbolSize:m,symbolRotate:v,symbolOffset:g,symbolKeepAspect:y,style:S})}),f.updateData(c),this.group.add(f.group),c.eachItemGraphicEl(function(p){p.traverse(function(h){ht(h).dataModel=n})}),this.markKeep(f),f.group.silent=n.get("silent")||r.get("silent")},t.type="markPoint",t}($p);function Egt(e,t,r){var n;e?n=F(e&&e.dimensions,function(s){var l=t.getData().getDimensionInfo(t.getData().mapDimension(s))||{};return V(V({},l),{name:s,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var i=new Ne(n,r),a=F(r.get("data"),pt(Tl,t));e&&(a=Ut(a,pt(Ml,e)));var o=E_(!!e,n);return i.initData(a,null,o),i}var cH=Dgt;function LI(e){e.registerComponentModel(lH),e.registerComponentView(cH),e.registerPreprocessor(function(t){_f(t.series,"markPoint")&&(t.markPoint=t.markPoint||{})})}var Igt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.createMarkerModelFromSeries=function(r,n,i){return new t(r,n,i)},t.type="markLine",t.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},t}(mn),pH=Igt;var L_=yt(),Lgt=function(e,t,r,n){var i=e.getData(),a;if(B(n))a=n;else{var o=n.type;if(o==="min"||o==="max"||o==="average"||o==="median"||n.xAxis!=null||n.yAxis!=null){var s=void 0,l=void 0;if(n.yAxis!=null||n.xAxis!=null)s=t.getAxis(n.yAxis!=null?"y":"x"),l=_e(n.yAxis,n.xAxis);else{var u=DI(n,i,t,e);s=u.valueAxis;var f=kx(i,u.valueDataDim);l=I_(i,f,o)}var c=s.dim==="x"?0:1,p=1-c,h=at(n),d={coord:[]};h.type=null,h.coord=[],h.coord[p]=-1/0,d.coord[p]=1/0;var m=r.get("precision");m>=0&&Ct(l)&&(l=+l.toFixed(Math.min(m,20))),h.coord[c]=d.coord[c]=l,a=[h,d,{type:o,valueIndex:n.valueIndex,value:l}]}else a=[]}var v=[Tl(e,a[0]),Tl(e,a[1]),V({},a[2])];return v[2].type=v[2].type||null,_t(v[2],v[0]),_t(v[2],v[1]),v};function P_(e){return!isNaN(e)&&!isFinite(e)}function hH(e,t,r,n){var i=1-e,a=n.dimensions[e];return P_(t[i])&&P_(r[i])&&t[e]===r[e]&&n.getAxis(a).containData(t[e])}function Pgt(e,t){if(e.type==="cartesian2d"){var r=t[0].coord,n=t[1].coord;if(r&&n&&(hH(1,r,n,e)||hH(0,r,n,e)))return!0}return Ml(e,t[0])&&Ml(e,t[1])}function PI(e,t,r,n,i){var a=n.coordinateSystem,o=e.getItemModel(t),s,l=q(o.get("x"),i.getWidth()),u=q(o.get("y"),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition)s=n.getMarkerPosition(e.getValues(e.dimensions,t));else{var f=a.dimensions,c=e.get(f[0],t),p=e.get(f[1],t);s=a.dataToPoint([c,p])}if(Ni(a,"cartesian2d")){var h=a.getAxis("x"),d=a.getAxis("y"),f=a.dimensions;P_(e.get(f[0],t))?s[0]=h.toGlobalCoord(h.getExtent()[r?0:1]):P_(e.get(f[1],t))&&(s[1]=d.toGlobalCoord(d.getExtent()[r?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}e.setItemLayout(t,s)}var Rgt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.updateTransform=function(r,n,i){n.eachSeries(function(a){var o=mn.getMarkerModelFromSeries(a,"markLine");if(o){var s=o.getData(),l=L_(o).from,u=L_(o).to;l.each(function(f){PI(l,f,!0,a,i),PI(u,f,!1,a,i)}),s.each(function(f){s.setItemLayout(f,[l.getItemLayout(f),u.getItemLayout(f)])}),this.markerGroupMap.get(a.id).updateLayout()}},this)},t.prototype.renderSeries=function(r,n,i,a){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,f=u.get(s)||u.set(s,new Rp);this.group.add(f.group);var c=Ngt(o,r,n),p=c.from,h=c.to,d=c.line;L_(n).from=p,L_(n).to=h,n.setData(d);var m=n.get("symbol"),v=n.get("symbolSize"),g=n.get("symbolRotate"),y=n.get("symbolOffset");B(m)||(m=[m,m]),B(v)||(v=[v,v]),B(g)||(g=[g,g]),B(y)||(y=[y,y]),c.from.each(function(_){x(p,_,!0),x(h,_,!1)}),d.each(function(_){var S=d.getItemModel(_).getModel("lineStyle").getLineStyle();d.setItemLayout(_,[p.getItemLayout(_),h.getItemLayout(_)]),S.stroke==null&&(S.stroke=p.getItemVisual(_,"style").fill),d.setItemVisual(_,{fromSymbolKeepAspect:p.getItemVisual(_,"symbolKeepAspect"),fromSymbolOffset:p.getItemVisual(_,"symbolOffset"),fromSymbolRotate:p.getItemVisual(_,"symbolRotate"),fromSymbolSize:p.getItemVisual(_,"symbolSize"),fromSymbol:p.getItemVisual(_,"symbol"),toSymbolKeepAspect:h.getItemVisual(_,"symbolKeepAspect"),toSymbolOffset:h.getItemVisual(_,"symbolOffset"),toSymbolRotate:h.getItemVisual(_,"symbolRotate"),toSymbolSize:h.getItemVisual(_,"symbolSize"),toSymbol:h.getItemVisual(_,"symbol"),style:S})}),f.updateData(d),c.line.eachItemGraphicEl(function(_){ht(_).dataModel=n,_.traverse(function(S){ht(S).dataModel=n})});function x(_,S,b){var w=_.getItemModel(S);PI(_,S,b,r,a);var T=w.getModel("itemStyle").getItemStyle();T.fill==null&&(T.fill=Qa(l,"color")),_.setItemVisual(S,{symbolKeepAspect:w.get("symbolKeepAspect"),symbolOffset:bt(w.get("symbolOffset",!0),y[b?0:1]),symbolRotate:bt(w.get("symbolRotate",!0),g[b?0:1]),symbolSize:bt(w.get("symbolSize"),v[b?0:1]),symbol:bt(w.get("symbol",!0),m[b?0:1]),style:T})}this.markKeep(f),f.group.silent=n.get("silent")||r.get("silent")},t.type="markLine",t}($p);function Ngt(e,t,r){var n;e?n=F(e&&e.dimensions,function(u){var f=t.getData().getDimensionInfo(t.getData().mapDimension(u))||{};return V(V({},f),{name:u,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var i=new Ne(n,r),a=new Ne(n,r),o=new Ne([],r),s=F(r.get("data"),pt(Lgt,t,e,r));e&&(s=Ut(s,pt(Pgt,e)));var l=E_(!!e,n);return i.initData(F(s,function(u){return u[0]}),null,l),a.initData(F(s,function(u){return u[1]}),null,l),o.initData(F(s,function(u){return u[2]})),o.hasItemOption=!0,{from:i,to:a,line:o}}var dH=Rgt;function RI(e){e.registerComponentModel(pH),e.registerComponentView(dH),e.registerPreprocessor(function(t){_f(t.series,"markLine")&&(t.markLine=t.markLine||{})})}var kgt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.createMarkerModelFromSeries=function(r,n,i){return new t(r,n,i)},t.type="markArea",t.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},t}(mn),vH=kgt;var R_=yt(),Ogt=function(e,t,r,n){var i=n[0],a=n[1];if(!(!i||!a)){var o=Tl(e,i),s=Tl(e,a),l=o.coord,u=s.coord;l[0]=_e(l[0],-1/0),l[1]=_e(l[1],-1/0),u[0]=_e(u[0],1/0),u[1]=_e(u[1],1/0);var f=Tc([{},o,s]);return f.coord=[o.coord,s.coord],f.x0=o.x,f.y0=o.y,f.x1=s.x,f.y1=s.y,f}};function N_(e){return!isNaN(e)&&!isFinite(e)}function mH(e,t,r,n){var i=1-e;return N_(t[i])&&N_(r[i])}function zgt(e,t){var r=t.coord[0],n=t.coord[1],i={coord:r,x:t.x0,y:t.y0},a={coord:n,x:t.x1,y:t.y1};return Ni(e,"cartesian2d")?r&&n&&(mH(1,r,n,e)||mH(0,r,n,e))?!0:uH(e,i,a):Ml(e,i)||Ml(e,a)}function gH(e,t,r,n,i){var a=n.coordinateSystem,o=e.getItemModel(t),s,l=q(o.get(r[0]),i.getWidth()),u=q(o.get(r[1]),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition){var f=e.getValues(["x0","y0"],t),c=e.getValues(["x1","y1"],t),p=a.clampData(f),h=a.clampData(c),d=[];r[0]==="x0"?d[0]=p[0]>h[0]?c[0]:f[0]:d[0]=p[0]>h[0]?f[0]:c[0],r[1]==="y0"?d[1]=p[1]>h[1]?c[1]:f[1]:d[1]=p[1]>h[1]?f[1]:c[1],s=n.getMarkerPosition(d,r,!0)}else{var m=e.get(r[0],t),v=e.get(r[1],t),g=[m,v];a.clampData&&a.clampData(g,g),s=a.dataToPoint(g,!0)}if(Ni(a,"cartesian2d")){var y=a.getAxis("x"),x=a.getAxis("y"),m=e.get(r[0],t),v=e.get(r[1],t);N_(m)?s[0]=y.toGlobalCoord(y.getExtent()[r[0]==="x0"?0:1]):N_(v)&&(s[1]=x.toGlobalCoord(x.getExtent()[r[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var yH=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],Ugt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.updateTransform=function(r,n,i){n.eachSeries(function(a){var o=mn.getMarkerModelFromSeries(a,"markArea");if(o){var s=o.getData();s.each(function(l){var u=F(yH,function(c){return gH(s,l,c,a,i)});s.setItemLayout(l,u);var f=s.getItemGraphicEl(l);f.setShape("points",u)})}},this)},t.prototype.renderSeries=function(r,n,i,a){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,f=u.get(s)||u.set(s,{group:new nt});this.group.add(f.group),this.markKeep(f);var c=Vgt(o,r,n);n.setData(c),c.each(function(p){var h=F(yH,function(T){return gH(c,p,T,r,a)}),d=o.getAxis("x").scale,m=o.getAxis("y").scale,v=d.getExtent(),g=m.getExtent(),y=[d.parse(c.get("x0",p)),d.parse(c.get("x1",p))],x=[m.parse(c.get("y0",p)),m.parse(c.get("y1",p))];sr(y),sr(x);var _=!(v[0]>y[1]||v[1]x[1]||g[1]=0},t.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},t.type="legend.plain",t.dependencies=["series"],t.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",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}},t}(Pt),xm=Fgt;var jp=pt,kI=D,k_=nt,Ggt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.newlineDisabled=!1,r}return t.prototype.init=function(){this.group.add(this._contentGroup=new k_),this.group.add(this._selectorGroup=new k_),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(r,n,i){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!r.get("show",!0)){var o=r.get("align"),s=r.get("orient");(!o||o==="auto")&&(o=r.get("left")==="right"&&s==="vertical"?"right":"left");var l=r.get("selector",!0),u=r.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,r,n,i,l,s,u);var f=r.getBoxLayoutParams(),c={width:i.getWidth(),height:i.getHeight()},p=r.get("padding"),h=re(f,c,p),d=this.layoutInner(r,o,h,a,l,u),m=re(J({width:d.width,height:d.height},f),c,p);this.group.x=m.x-d.x,this.group.y=m.y-d.y,this.group.markRedraw(),this.group.add(this._backgroundEl=__(d,r))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(r,n,i,a,o,s,l){var u=this.getContentGroup(),f=$(),c=n.get("selectedMode"),p=[];i.eachRawSeries(function(h){!h.get("legendHoverLink")&&p.push(h.id)}),kI(n.getData(),function(h,d){var m=h.get("name");if(!this.newlineDisabled&&(m===""||m===` -`)){var v=new k_;v.newline=!0,u.add(v);return}var g=i.getSeriesByName(m)[0];if(!f.get(m))if(g){var y=g.getData(),x=y.getVisual("legendLineStyle")||{},_=y.getVisual("legendIcon"),S=y.getVisual("style"),b=this._createItem(g,m,d,h,n,r,x,S,_,c,a);b.on("click",jp(_H,m,null,a,p)).on("mouseover",jp(OI,g.name,null,a,p)).on("mouseout",jp(zI,g.name,null,a,p)),f.set(m,!0)}else i.eachRawSeries(function(w){if(!f.get(m)&&w.legendVisualProvider){var T=w.legendVisualProvider;if(!T.containName(m))return;var M=T.indexOfName(m),C=T.getItemVisual(M,"style"),A=T.getItemVisual(M,"legendIcon"),P=br(C.fill);P&&P[3]===0&&(P[3]=.2,C=V(V({},C),{fill:bi(P,"rgba")}));var L=this._createItem(w,m,d,h,n,r,{},C,A,c,a);L.on("click",jp(_H,null,m,a,p)).on("mouseover",jp(OI,null,m,a,p)).on("mouseout",jp(zI,null,m,a,p)),f.set(m,!0)}},this)},this),o&&this._createSelector(o,n,a,s,l)},t.prototype._createSelector=function(r,n,i,a,o){var s=this.getSelectorGroup();kI(r,function(u){var f=u.type,c=new Lt({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:f==="all"?"legendAllSelect":"legendInverseSelect"})}});s.add(c);var p=n.getModel("selectorLabel"),h=n.getModel(["emphasis","selectorLabel"]);he(c,{normal:p,emphasis:h},{defaultText:u.title}),Za(c)})},t.prototype._createItem=function(r,n,i,a,o,s,l,u,f,c,p){var h=r.visualDrawType,d=o.get("itemWidth"),m=o.get("itemHeight"),v=o.isSelected(n),g=a.get("symbolRotate"),y=a.get("symbolKeepAspect"),x=a.get("icon");f=x||f||"roundRect";var _=Hgt(f,a,l,u,h,v,p),S=new k_,b=a.getModel("textStyle");if(j(r.getLegendIcon)&&(!x||x==="inherit"))S.add(r.getLegendIcon({itemWidth:d,itemHeight:m,icon:f,iconRotate:g,itemStyle:_.itemStyle,lineStyle:_.lineStyle,symbolKeepAspect:y}));else{var w=x==="inherit"&&r.getData().getVisual("symbol")?g==="inherit"?r.getData().getVisual("symbolRotate"):g:0;S.add(Wgt({itemWidth:d,itemHeight:m,icon:f,iconRotate:w,itemStyle:_.itemStyle,lineStyle:_.lineStyle,symbolKeepAspect:y}))}var T=s==="left"?d+5:-5,M=s,C=o.get("formatter"),A=n;H(C)&&C?A=C.replace("{name}",n??""):j(C)&&(A=C(n));var P=v?b.getTextColor():a.get("inactiveColor");S.add(new Lt({style:Qt(b,{text:A,x:T,y:m/2,fill:P,align:M,verticalAlign:"middle"},{inheritColor:P})}));var L=new At({shape:S.getBoundingRect(),invisible:!0}),I=a.getModel("tooltip");return I.get("show")&&sa({el:L,componentModel:o,itemName:n,itemTooltipOption:I.option}),S.add(L),S.eachChild(function(E){E.silent=!0}),L.silent=!c,this.getContentGroup().add(S),Za(S),S.__legendDataIndex=i,S},t.prototype.layoutInner=function(r,n,i,a,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();fa(r.get("orient"),l,r.get("itemGap"),i.width,i.height);var f=l.getBoundingRect(),c=[-f.x,-f.y];if(u.markRedraw(),l.markRedraw(),o){fa("horizontal",u,r.get("selectorItemGap",!0));var p=u.getBoundingRect(),h=[-p.x,-p.y],d=r.get("selectorButtonGap",!0),m=r.getOrient().index,v=m===0?"width":"height",g=m===0?"height":"width",y=m===0?"y":"x";s==="end"?h[m]+=f[v]+d:c[m]+=p[v]+d,h[1-m]+=f[g]/2-p[g]/2,u.x=h[0],u.y=h[1],l.x=c[0],l.y=c[1];var x={x:0,y:0};return x[v]=f[v]+d+p[v],x[g]=Math.max(f[g],p[g]),x[y]=Math.min(0,p[y]+h[1-m]),x}else return l.x=c[0],l.y=c[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t}(Xt);function Hgt(e,t,r,n,i,a,o){function s(v,g){v.lineWidth==="auto"&&(v.lineWidth=g.lineWidth>0?2:0),kI(v,function(y,x){v[x]==="inherit"&&(v[x]=g[x])})}var l=t.getModel("itemStyle"),u=l.getItemStyle(),f=e.lastIndexOf("empty",0)===0?"fill":"stroke",c=l.getShallow("decal");u.decal=!c||c==="inherit"?n.decal:da(c,o),u.fill==="inherit"&&(u.fill=n[i]),u.stroke==="inherit"&&(u.stroke=n[f]),u.opacity==="inherit"&&(u.opacity=(i==="fill"?n:r).opacity),s(u,n);var p=t.getModel("lineStyle"),h=p.getLineStyle();if(s(h,r),u.fill==="auto"&&(u.fill=n.fill),u.stroke==="auto"&&(u.stroke=n.fill),h.stroke==="auto"&&(h.stroke=n.fill),!a){var d=t.get("inactiveBorderWidth"),m=u[f];u.lineWidth=d==="auto"?n.lineWidth>0&&m?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),h.stroke=p.get("inactiveColor"),h.lineWidth=p.get("inactiveWidth")}return{itemStyle:u,lineStyle:h}}function Wgt(e){var t=e.icon||"roundRect",r=ne(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return r.setStyle(e.itemStyle),r.rotation=(e.iconRotate||0)*Math.PI/180,r.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf("empty")>-1&&(r.style.stroke=r.style.fill,r.style.fill="#fff",r.style.lineWidth=2),r}function _H(e,t,r,n){zI(e,t,r,n),r.dispatchAction({type:"legendToggleSelect",name:e??t}),OI(e,t,r,n)}function bH(e){for(var t=e.getZr().storage.getDisplayList(),r,n=0,i=t.length;ni[o],v=[-h.x,-h.y];n||(v[a]=f[u]);var g=[0,0],y=[-d.x,-d.y],x=bt(r.get("pageButtonGap",!0),r.get("itemGap",!0));if(m){var _=r.get("pageButtonPosition",!0);_==="end"?y[a]+=i[o]-d[o]:g[a]+=d[o]+x}y[1-a]+=h[s]/2-d[s]/2,f.setPosition(v),c.setPosition(g),p.setPosition(y);var S={x:0,y:0};if(S[o]=m?i[o]:h[o],S[s]=Math.max(h[s],d[s]),S[l]=Math.min(0,d[l]+y[1-a]),c.__rectSize=i[o],m){var b={x:0,y:0};b[o]=Math.max(i[o]-d[o]-x,0),b[s]=S[s],c.setClipPath(new At({shape:b})),c.__rectSize=b[o]}else p.eachChild(function(T){T.attr({invisible:!0,silent:!0})});var w=this._getPageInfo(r);return w.pageIndex!=null&&Rt(f,{x:w.contentPosition[0],y:w.contentPosition[1]},m?r:null),this._updatePageInfoView(r,w),S},t.prototype._pageGo=function(r,n,i){var a=this._getPageInfo(n)[r];a!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:n.id})},t.prototype._updatePageInfoView=function(r,n){var i=this._controllerGroup;D(["pagePrev","pageNext"],function(f){var c=f+"DataIndex",p=n[c]!=null,h=i.childOfName(f);h&&(h.setStyle("fill",p?r.get("pageIconColor",!0):r.get("pageIconInactiveColor",!0)),h.cursor=p?"pointer":"default")});var a=i.childOfName("pageText"),o=r.get("pageFormatter"),s=n.pageIndex,l=s!=null?s+1:0,u=n.pageCount;a&&o&&a.setStyle("text",H(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},t.prototype._getPageInfo=function(r){var n=r.get("scrollDataIndex",!0),i=this.getContentGroup(),a=this._containerGroup.__rectSize,o=r.getOrient().index,s=VI[o],l=BI[o],u=this._findTargetItemIndex(n),f=i.children(),c=f[u],p=f.length,h=p?1:0,d={contentPosition:[i.x,i.y],pageCount:h,pageIndex:h-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!c)return d;var m=_(c);d.contentPosition[o]=-m.s;for(var v=u+1,g=m,y=m,x=null;v<=p;++v)x=_(f[v]),(!x&&y.e>g.s+a||x&&!S(x,g.s))&&(y.i>g.i?g=y:g=x,g&&(d.pageNextDataIndex==null&&(d.pageNextDataIndex=g.i),++d.pageCount)),y=x;for(var v=u-1,g=m,y=m,x=null;v>=-1;--v)x=_(f[v]),(!x||!S(y,x.s))&&g.i=w&&b.s<=w+a}},t.prototype._findTargetItemIndex=function(r){if(!this._showController)return 0;var n,i=this.getContentGroup(),a;return i.eachChild(function(o,s){var l=o.__legendDataIndex;a==null&&l!=null&&(a=s),l===r&&(n=s)}),n??a},t.type="legend.scroll",t}(O_),AH=Xgt;function FI(e){e.registerAction("legendScroll","legendscroll",function(t,r){var n=t.scrollDataIndex;n!=null&&r.eachComponent({mainType:"legend",subType:"scroll",query:t},function(i){i.setScrollDataIndex(n)})})}function CH(e){Nt(z_),e.registerComponentModel(TH),e.registerComponentView(AH),FI(e)}function GI(e){Nt(z_),Nt(CH)}var qgt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="dataZoom.inside",t.defaultOption=Kr(bl.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(bl),DH=qgt;var HI=yt();function EH(e,t,r){HI(e).coordSysRecordMap.each(function(n){var i=n.dataZoomInfoMap.get(t.uid);i&&(i.getRange=r)})}function IH(e,t){for(var r=HI(e).coordSysRecordMap,n=r.keys(),i=0;in[r+t]&&(t=s),i=i&&o.get("preventDefaultMouseMove",!0)}),{controlType:t,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!i}}}function PH(e){e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,function(t,r){var n=HI(r),i=n.coordSysRecordMap||(n.coordSysRecordMap=$());i.each(function(a){a.dataZoomInfoMap=null}),t.eachComponent({mainType:"dataZoom",subType:"inside"},function(a){var o=y_(a);D(o.infoList,function(s){var l=s.model.uid,u=i.get(l)||i.set(l,Zgt(r,s.model)),f=u.dataZoomInfoMap||(u.dataZoomInfoMap=$());f.set(a.uid,{dzReferCoordSysInfo:s,model:a,getRange:null})})}),i.each(function(a){var o=a.controller,s,l=a.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){LH(i,a);return}var f=jgt(l);o.enable(f.controlType,f.opt),o.setPointerChecker(a.containsPoint),Li(a,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var Jgt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="dataZoom.inside",r}return t.prototype.render=function(r,n,i){if(e.prototype.render.apply(this,arguments),r.noTarget()){this._clear();return}this.range=r.getPercentRange(),EH(i,r,{pan:Z(WI.pan,this),zoom:Z(WI.zoom,this),scrollMove:Z(WI.scrollMove,this)})},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){IH(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t}(qp),WI={zoom:function(e,t,r,n){var i=this.range,a=i.slice(),o=e.axisModels[0];if(o){var s=YI[t](null,[n.originX,n.originY],o,r,e),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],u=Math.max(1/n.scale,0);a[0]=(a[0]-l)*u+l,a[1]=(a[1]-l)*u+l;var f=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(Hn(0,a,[0,100],0,f.minSpan,f.maxSpan),this.range=a,i[0]!==a[0]||i[1]!==a[1])return a}},pan:RH(function(e,t,r,n,i,a){var o=YI[n]([a.oldX,a.oldY],[a.newX,a.newY],t,i,r);return o.signal*(e[1]-e[0])*o.pixel/o.pixelLength}),scrollMove:RH(function(e,t,r,n,i,a){var o=YI[n]([0,0],[a.scrollDelta,a.scrollDelta],t,i,r);return o.signal*(e[1]-e[0])*a.scrollDelta})};function RH(e){return function(t,r,n,i){var a=this.range,o=a.slice(),s=t.axisModels[0];if(s){var l=e(o,s,t,r,n,i);if(Hn(l,o,[0,100],"all"),this.range=o,a[0]!==o[0]||a[1]!==o[1])return o}}}var YI={grid:function(e,t,r,n,i){var a=r.axis,o={},s=i.model.coordinateSystem.getRect();return e=e||[0,0],a.dim==="x"?(o.pixel=t[0]-e[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(e,t,r,n,i){var a=r.axis,o={},s=i.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return e=e?s.pointToCoord(e):[0,0],t=s.pointToCoord(t),r.mainType==="radiusAxis"?(o.pixel=t[0]-e[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=a.inverse?-1:1),o},singleAxis:function(e,t,r,n,i){var a=r.axis,o=i.model.coordinateSystem.getRect(),s={};return e=e||[0,0],a.orient==="horizontal"?(s.pixel=t[0]-e[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=t[1]-e[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}},NH=Jgt;function bm(e){yf(e),e.registerComponentModel(DH),e.registerComponentView(NH),PH(e)}var tyt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=Kr(bl.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),t}(bl),kH=tyt;var Sm=At,OH=7,eyt=1,XI=30,ryt=7,wm="horizontal",zH="vertical",nyt=5,iyt=["line","bar","candlestick","scatter"],ayt={easing:"cubicOut",duration:100,delay:0},oyt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._displayables={},r}return t.prototype.init=function(r,n){this.api=n,this._onBrush=Z(this._onBrush,this),this._onBrushEnd=Z(this._onBrushEnd,this)},t.prototype.render=function(r,n,i,a){if(e.prototype.render.apply(this,arguments),Li(this,"_dispatchZoomAction",r.get("throttle"),"fixRate"),this._orient=r.getOrient(),r.get("show")===!1){this.group.removeAll();return}if(r.noTarget()){this._clear(),this.group.removeAll();return}(!a||a.type!=="dataZoom"||a.from!==this.uid)&&this._buildView(),this._updateView()},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){Qo(this,"_dispatchZoomAction");var r=this.api.getZr();r.off("mousemove",this._onBrush),r.off("mouseup",this._onBrushEnd)},t.prototype._buildView=function(){var r=this.group;r.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var n=this._displayables.sliderGroup=new nt;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),r.add(n),this._positionGroup()},t.prototype._resetLocation=function(){var r=this.dataZoomModel,n=this.api,i=r.get("brushSelect"),a=i?ryt:0,o=this._findCoordRect(),s={width:n.getWidth(),height:n.getHeight()},l=this._orient===wm?{right:s.width-o.x-o.width,top:s.height-XI-OH-a,width:o.width,height:XI}:{right:OH,top:o.y,width:XI,height:o.height},u=Di(r.option);D(["right","top","width","height"],function(c){u[c]==="ph"&&(u[c]=l[c])});var f=re(u,s);this._location={x:f.x,y:f.y},this._size=[f.width,f.height],this._orient===zH&&this._size.reverse()},t.prototype._positionGroup=function(){var r=this.group,n=this._location,i=this._orient,a=this.dataZoomModel.getFirstTargetAxisModel(),o=a&&a.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(i===wm&&!o?{scaleY:l?1:-1,scaleX:1}:i===wm&&o?{scaleY:l?1:-1,scaleX:-1}:i===zH&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=r.getBoundingRect([s]);r.x=n.x-u.x,r.y=n.y-u.y,r.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var r=this.dataZoomModel,n=this._size,i=this._displayables.sliderGroup,a=r.get("brushSelect");i.add(new Sm({silent:!0,shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:r.get("backgroundColor")},z2:-40}));var o=new Sm({shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:"transparent"},z2:0,onclick:Z(this._onClickPanel,this)}),s=this.api.getZr();a?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),i.add(o)},t.prototype._renderDataShadow=function(){var r=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!r)return;var n=this._size,i=this._shadowSize||[],a=r.series,o=a.getRawData(),s=a.getShadowDim&&a.getShadowDim(),l=s&&o.getDimensionInfo(s)?a.getShadowDim():r.otherDim;if(l==null)return;var u=this._shadowPolygonPts,f=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||n[0]!==i[0]||n[1]!==i[1]){var c=o.getDataExtent(l),p=(c[1]-c[0])*.3;c=[c[0]-p,c[1]+p];var h=[0,n[1]],d=[0,n[0]],m=[[n[0],0],[0,0]],v=[],g=d[1]/(o.count()-1),y=0,x=Math.round(o.count()/n[0]),_;o.each([l],function(M,C){if(x>0&&C%x){y+=g;return}var A=M==null||isNaN(M)||M==="",P=A?0:$t(M,c,h,!0);A&&!_&&C?(m.push([m[m.length-1][0],0]),v.push([v[v.length-1][0],0])):!A&&_&&(m.push([y,0]),v.push([y,0])),m.push([y,P]),v.push([y,P]),y+=g,_=A}),u=this._shadowPolygonPts=m,f=this._shadowPolylinePts=v}this._shadowData=o,this._shadowDim=l,this._shadowSize=[n[0],n[1]];var S=this.dataZoomModel;function b(M){var C=S.getModel(M?"selectedDataBackground":"dataBackground"),A=new nt,P=new Re({shape:{points:u},segmentIgnoreThreshold:1,style:C.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),L=new Ie({shape:{points:f},segmentIgnoreThreshold:1,style:C.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return A.add(P),A.add(L),A}for(var w=0;w<3;w++){var T=b(w===1);this._displayables.sliderGroup.add(T),this._displayables.dataShadowSegs.push(T)}},t.prototype._prepareDataShadowInfo=function(){var r=this.dataZoomModel,n=r.get("showDataShadow");if(n!==!1){var i,a=this.ecModel;return r.eachTargetAxis(function(o,s){var l=r.getAxisProxy(o,s).getTargetSeriesModels();D(l,function(u){if(!i&&!(n!==!0&>(iyt,u.get("type"))<0)){var f=a.getComponent(Bi(o),s).axis,c=syt(o),p,h=u.coordinateSystem;c!=null&&h.getOtherAxis&&(p=h.getOtherAxis(f).inverse),c=u.getData().mapDimension(c),i={thisAxis:f,series:u,thisDim:o,otherDim:c,otherAxisInverse:p}}},this)},this),i}},t.prototype._renderHandle=function(){var r=this.group,n=this._displayables,i=n.handles=[null,null],a=n.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,f=l.get("borderRadius")||0,c=l.get("brushSelect"),p=n.filler=new Sm({silent:c,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(p),o.add(new Sm({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:f},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:eyt,fill:"rgba(0,0,0,0)"}})),D([0,1],function(x){var _=l.get("handleIcon");!_v[_]&&_.indexOf("path://")<0&&_.indexOf("image://")<0&&(_="path://"+_);var S=ne(_,-1,0,2,2,null,!0);S.attr({cursor:UH(this._orient),draggable:!0,drift:Z(this._onDragMove,this,x),ondragend:Z(this._onDragEnd,this),onmouseover:Z(this._showDataInfo,this,!0),onmouseout:Z(this._showDataInfo,this,!1),z2:5});var b=S.getBoundingRect(),w=l.get("handleSize");this._handleHeight=q(w,this._size[1]),this._handleWidth=b.width/b.height*this._handleHeight,S.setStyle(l.getModel("handleStyle").getItemStyle()),S.style.strokeNoScale=!0,S.rectHover=!0,S.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),Za(S);var T=l.get("handleColor");T!=null&&(S.style.fill=T),o.add(i[x]=S);var M=l.getModel("textStyle");r.add(a[x]=new Lt({silent:!0,invisible:!0,style:Qt(M,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:M.getTextColor(),font:M.getFont()}),z2:10}))},this);var h=p;if(c){var d=q(l.get("moveHandleSize"),s[1]),m=n.moveHandle=new At({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:d}}),v=d*.8,g=n.moveHandleIcon=ne(l.get("moveHandleIcon"),-v/2,-v/2,v,v,"#fff",!0);g.silent=!0,g.y=s[1]+d/2-.5,m.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var y=Math.min(s[1]/2,Math.max(d,10));h=n.moveZone=new At({invisible:!0,shape:{y:s[1]-y,height:d+y}}),h.on("mouseover",function(){u.enterEmphasis(m)}).on("mouseout",function(){u.leaveEmphasis(m)}),o.add(m),o.add(g),o.add(h)}h.attr({draggable:!0,cursor:UH(this._orient),drift:Z(this._onDragMove,this,"all"),ondragstart:Z(this._showDataInfo,this,!0),ondragend:Z(this._onDragEnd,this),onmouseover:Z(this._showDataInfo,this,!0),onmouseout:Z(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var r=this._range=this.dataZoomModel.getPercentRange(),n=this._getViewExtent();this._handleEnds=[$t(r[0],[0,100],n,!0),$t(r[1],[0,100],n,!0)]},t.prototype._updateInterval=function(r,n){var i=this.dataZoomModel,a=this._handleEnds,o=this._getViewExtent(),s=i.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];Hn(n,a,o,i.get("zoomLock")?"all":r,s.minSpan!=null?$t(s.minSpan,l,o,!0):null,s.maxSpan!=null?$t(s.maxSpan,l,o,!0):null);var u=this._range,f=this._range=sr([$t(a[0],o,l,!0),$t(a[1],o,l,!0)]);return!u||u[0]!==f[0]||u[1]!==f[1]},t.prototype._updateView=function(r){var n=this._displayables,i=this._handleEnds,a=sr(i.slice()),o=this._size;D([0,1],function(h){var d=n.handles[h],m=this._handleHeight;d.attr({scaleX:m/2,scaleY:m/2,x:i[h]+(h?-1:1),y:o[1]/2-m/2})},this),n.filler.setShape({x:a[0],y:0,width:a[1]-a[0],height:o[1]});var s={x:a[0],width:a[1]-a[0]};n.moveHandle&&(n.moveHandle.setShape(s),n.moveZone.setShape(s),n.moveZone.getBoundingRect(),n.moveHandleIcon&&n.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=n.dataShadowSegs,u=[0,a[0],a[1],o[0]],f=0;fn[0]||i[1]<0||i[1]>n[1])){var a=this._handleEnds,o=(a[0]+a[1])/2,s=this._updateInterval("all",i[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(r){var n=r.offsetX,i=r.offsetY;this._brushStart=new kt(n,i),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(r){if(this._brushing){var n=this._displayables.brushRect;if(this._brushing=!1,!!n){n.attr("ignore",!0);var i=n.shape,a=+new Date;if(!(a-this._brushStartTime<200&&Math.abs(i.width)<5)){var o=this._getViewExtent(),s=[0,100];this._range=sr([$t(i.x,o,s,!0),$t(i.x+i.width,o,s,!0)]),this._handleEnds=[i.x,i.x+i.width],this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(r){this._brushing&&(Mn(r.event),this._updateBrushRect(r.offsetX,r.offsetY))},t.prototype._updateBrushRect=function(r,n){var i=this._displayables,a=this.dataZoomModel,o=i.brushRect;o||(o=i.brushRect=new Sm({silent:!0,style:a.getModel("brushStyle").getItemStyle()}),i.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(r,n),f=l.transformCoordToLocal(s.x,s.y),c=this._size;u[0]=Math.max(Math.min(c[0],u[0]),0),o.setShape({x:f[0],y:0,width:u[0]-f[0],height:c[1]})},t.prototype._dispatchZoomAction=function(r){var n=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:r?ayt:null,start:n[0],end:n[1]})},t.prototype._findCoordRect=function(){var r,n=y_(this.dataZoomModel).infoList;if(!r&&n.length){var i=n[0].model.coordinateSystem;r=i.getRect&&i.getRect()}if(!r){var a=this.api.getWidth(),o=this.api.getHeight();r={x:a*.2,y:o*.2,width:a*.6,height:o*.6}}return r},t.type="dataZoom.slider",t}(qp);function syt(e){var t={x:"y",y:"x",radius:"angle",angle:"radius"};return t[e]}function UH(e){return e==="vertical"?"ns-resize":"ew-resize"}var VH=oyt;function Tm(e){e.registerComponentModel(kH),e.registerComponentView(VH),yf(e)}function qI(e){Nt(bm),Nt(Tm)}var lyt={get:function(e,t,r){var n=at((uyt[e]||{})[t]);return r&&B(n)?n[n.length-1]:n}},uyt={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},U_=lyt;var BH=Be.mapVisual,fyt=Be.eachVisual,cyt=B,FH=D,pyt=sr,hyt=$t,dyt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.stateList=["inRange","outOfRange"],r.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],r.layoutMode={type:"box",ignoreSize:!0},r.dataBound=[-1/0,1/0],r.targetVisuals={},r.controllerVisuals={},r}return t.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i)},t.prototype.optionUpdated=function(r,n){var i=this.option;!n&&T_(i,r,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(r){var n=this.stateList;r=Z(r,this),this.controllerVisuals=gm(this.option.controller,n,r),this.targetVisuals=gm(this.option.target,n,r)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var r=this.option.seriesIndex,n=[];return r==null||r==="all"?this.ecModel.eachSeries(function(i,a){n.push(a)}):n=Yt(r),n},t.prototype.eachTargetSeries=function(r,n){D(this.getTargetSeriesIndices(),function(i){var a=this.ecModel.getSeriesByIndex(i);a&&r.call(n,a)},this)},t.prototype.isTargetSeries=function(r){var n=!1;return this.eachTargetSeries(function(i){i===r&&(n=!0)}),n},t.prototype.formatValueText=function(r,n,i){var a=this.option,o=a.precision,s=this.dataBound,l=a.formatter,u;i=i||["<",">"],B(r)&&(r=r.slice(),u=!0);var f=n?r:u?[c(r[0]),c(r[1])]:c(r);if(H(l))return l.replace("{value}",u?f[0]:f).replace("{value2}",u?f[1]:f);if(j(l))return u?l(r[0],r[1]):l(r);if(u)return r[0]===s[0]?i[0]+" "+f[1]:r[1]===s[1]?i[1]+" "+f[0]:f[0]+" - "+f[1];return f;function c(p){return p===s[0]?"min":p===s[1]?"max":(+p).toFixed(Math.min(o,20))}},t.prototype.resetExtent=function(){var r=this.option,n=pyt([r.min,r.max]);this._dataExtent=n},t.prototype.getDataDimensionIndex=function(r){var n=this.option.dimension;if(n!=null)return r.getDimensionIndex(n);for(var i=r.dimensions,a=i.length-1;a>=0;a--){var o=i[a],s=r.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var r=this.ecModel,n=this.option,i={inRange:n.inRange,outOfRange:n.outOfRange},a=n.target||(n.target={}),o=n.controller||(n.controller={});_t(a,i),_t(o,i);var s=this.isCategory();l.call(this,a),l.call(this,o),u.call(this,a,"inRange","outOfRange"),f.call(this,o);function l(c){cyt(n.color)&&!c.inRange&&(c.inRange={color:n.color.slice().reverse()}),c.inRange=c.inRange||{color:r.get("gradientColor")}}function u(c,p,h){var d=c[p],m=c[h];d&&!m&&(m=c[h]={},FH(d,function(v,g){if(Be.isValidType(g)){var y=U_.get(g,"inactive",s);y!=null&&(m[g]=y,g==="color"&&!m.hasOwnProperty("opacity")&&!m.hasOwnProperty("colorAlpha")&&(m.opacity=[0,0]))}}))}function f(c){var p=(c.inRange||{}).symbol||(c.outOfRange||{}).symbol,h=(c.inRange||{}).symbolSize||(c.outOfRange||{}).symbolSize,d=this.get("inactiveColor"),m=this.getItemSymbol(),v=m||"roundRect";FH(this.stateList,function(g){var y=this.itemSize,x=c[g];x||(x=c[g]={color:s?d:[d]}),x.symbol==null&&(x.symbol=p&&at(p)||(s?v:[v])),x.symbolSize==null&&(x.symbolSize=h&&at(h)||(s?y[0]:[y[0],y[0]])),x.symbol=BH(x.symbol,function(b){return b==="none"?v:b});var _=x.symbolSize;if(_!=null){var S=-1/0;fyt(_,function(b){b>S&&(S=b)}),x.symbolSize=BH(_,function(b){return hyt(b,[0,S],[0,y[0]],!0)})}},this)}},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(r){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(r){return null},t.prototype.getVisualMeta=function(r){return null},t.type="visualMap",t.dependencies=["series"],t.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},t}(Pt),Qp=dyt;var GH=[20,140],vyt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.optionUpdated=function(r,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(i){i.mappingMethod="linear",i.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){e.prototype.resetItemSize.apply(this,arguments);var r=this.itemSize;(r[0]==null||isNaN(r[0]))&&(r[0]=GH[0]),(r[1]==null||isNaN(r[1]))&&(r[1]=GH[1])},t.prototype._resetRange=function(){var r=this.getExtent(),n=this.option.range;!n||n.auto?(r.auto=1,this.option.range=r):B(n)&&(n[0]>n[1]&&n.reverse(),n[0]=Math.max(n[0],r[0]),n[1]=Math.min(n[1],r[1]))},t.prototype.completeVisualOption=function(){e.prototype.completeVisualOption.apply(this,arguments),D(this.stateList,function(r){var n=this.option.controller[r].symbolSize;n&&n[0]!==n[1]&&(n[0]=n[1]/3)},this)},t.prototype.setSelected=function(r){this.option.range=r.slice(),this._resetRange()},t.prototype.getSelected=function(){var r=this.getExtent(),n=sr((this.get("range")||[]).slice());return n[0]>r[1]&&(n[0]=r[1]),n[1]>r[1]&&(n[1]=r[1]),n[0]=i[1]||r<=n[1])?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(r){var n=[];return this.eachTargetSeries(function(i){var a=[],o=i.getData();o.each(this.getDataDimensionIndex(o),function(s,l){r[0]<=s&&s<=r[1]&&a.push(l)},this),n.push({seriesId:i.id,dataIndex:a})},this),n},t.prototype.getVisualMeta=function(r){var n=HH(this,"outOfRange",this.getExtent()),i=HH(this,"inRange",this.option.range.slice()),a=[];function o(h,d){a.push({value:h,color:r(h,d)})}for(var s=0,l=0,u=i.length,f=n.length;lr[1])break;a.push({color:this.getControllerVisual(l,"color",n),offset:s/i})}return a.push({color:this.getControllerVisual(r[1],"color",n),offset:1}),a},t.prototype._createBarPoints=function(r,n){var i=this.visualMapModel.itemSize;return[[i[0]-n[0],r[0]],[i[0],r[0]],[i[0],r[1]],[i[0]-n[1],r[1]]]},t.prototype._createBarGroup=function(r){var n=this._orient,i=this.visualMapModel.get("inverse");return new nt(n==="horizontal"&&!i?{scaleX:r==="bottom"?1:-1,rotation:Math.PI/2}:n==="horizontal"&&i?{scaleX:r==="bottom"?-1:1,rotation:-Math.PI/2}:n==="vertical"&&!i?{scaleX:r==="left"?1:-1,scaleY:-1}:{scaleX:r==="left"?1:-1})},t.prototype._updateHandle=function(r,n){if(this._useHandle){var i=this._shapes,a=this.visualMapModel,o=i.handleThumbs,s=i.handleLabels,l=a.itemSize,u=a.getExtent();gyt([0,1],function(f){var c=o[f];c.setStyle("fill",n.handlesColor[f]),c.y=r[f];var p=fo(r[f],[0,l[1]],u,!0),h=this.getControllerVisual(p,"symbolSize");c.scaleX=c.scaleY=h/l[0],c.x=l[0]-h/2;var d=Or(i.handleLabelPoints[f],oa(c,this.group));s[f].setStyle({x:d[0],y:d[1],text:a.formatValueText(this._dataInterval[f]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",i.mainGroup):"center"})},this)}},t.prototype._showIndicator=function(r,n,i,a){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],f=this._shapes,c=f.indicator;if(c){c.attr("invisible",!1);var p={convertOpacityToAlpha:!0},h=this.getControllerVisual(r,"color",p),d=this.getControllerVisual(r,"symbolSize"),m=fo(r,s,u,!0),v=l[0]-d/2,g={x:c.x,y:c.y};c.y=m,c.x=v;var y=Or(f.indicatorLabelPoint,oa(c,this.group)),x=f.indicatorLabel;x.attr("invisible",!1);var _=this._applyTransform("left",f.mainGroup),S=this._orient,b=S==="horizontal";x.setStyle({text:(i||"")+o.formatValueText(n),verticalAlign:b?_:"middle",align:b?"center":_});var w={x:v,y:m,style:{fill:h}},T={style:{x:y[0],y:y[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var M={duration:100,easing:"cubicInOut",additive:!0};c.x=g.x,c.y=g.y,c.animateTo(w,M),x.animateTo(T,M)}else c.attr(w),x.attr(T);this._firstShowIndicator=!1;var C=this._shapes.handleLabels;if(C)for(var A=0;Ao[1]&&(c[1]=1/0),n&&(c[0]===-1/0?this._showIndicator(f,c[1],"< ",l):c[1]===1/0?this._showIndicator(f,c[0],"> ",l):this._showIndicator(f,f,"\u2248 ",l));var p=this._hoverLinkDataIndices,h=[];(n||KH(i))&&(h=this._hoverLinkDataIndices=i.findTargetDataIndices(c));var d=OO(p,h);this._dispatchHighDown("downplay",Jp(d[0],i)),this._dispatchHighDown("highlight",Jp(d[1],i))}},t.prototype._hoverLinkFromSeriesMouseOver=function(r){var n;if(pa(r.target,function(l){var u=ht(l);if(u.dataIndex!=null)return n=u,!0},!0),!!n){var i=this.ecModel.getSeriesByIndex(n.seriesIndex),a=this.visualMapModel;if(a.isTargetSeries(i)){var o=i.getData(n.dataType),s=o.getStore().get(a.getDataDimensionIndex(o),n.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},t.prototype._hideIndicator=function(){var r=this._shapes;r.indicator&&r.indicator.attr("invisible",!0),r.indicatorLabel&&r.indicatorLabel.attr("invisible",!0);var n=this._shapes.handleLabels;if(n)for(var i=0;i=0&&(a.dimension=o,n.push(a))}}),e.getData().setVisual("visualMeta",n)}}];function Syt(e,t,r,n){for(var i=t.targetVisuals[n],a=Be.prepareVisualTypes(i),o={color:Qa(e.getData(),"color")},s=0,l=a.length;s0:t.splitNumber>0)||t.calculable)?"continuous":"piecewise"}),e.registerAction(QH,JH),D(tW,function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)}),e.registerPreprocessor(KI))}function Am(e){e.registerComponentModel(WH),e.registerComponentView(jH),Mm(e)}var wyt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._pieceList=[],r}return t.prototype.optionUpdated=function(r,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var i=this._mode=this._determineMode();this._pieceList=[],Tyt[this._mode].call(this,this._pieceList),this._resetSelected(r,n);var a=this.option.categories;this.resetVisual(function(o,s){i==="categories"?(o.mappingMethod="category",o.categories=at(a)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=F(this._pieceList,function(l){return l=at(l),s!=="inRange"&&(l.visual=null),l}))})},t.prototype.completeVisualOption=function(){var r=this.option,n={},i=Be.listVisualTypes(),a=this.isCategory();D(r.pieces,function(s){D(i,function(l){s.hasOwnProperty(l)&&(n[l]=1)})}),D(n,function(s,l){var u=!1;D(this.stateList,function(f){u=u||o(r,f,l)||o(r.target,f,l)},this),!u&&D(this.stateList,function(f){(r[f]||(r[f]={}))[l]=U_.get(l,f==="inRange"?"active":"inactive",a)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}e.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(r,n){var i=this.option,a=this._pieceList,o=(n?i:r).selected||{};if(i.selected=o,D(a,function(l,u){var f=this.getSelectedMapKey(l);o.hasOwnProperty(f)||(o[f]=!0)},this),i.selectedMode==="single"){var s=!1;D(a,function(l,u){var f=this.getSelectedMapKey(l);o[f]&&(s?o[f]=!1:s=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get("itemSymbol")},t.prototype.getSelectedMapKey=function(r){return this._mode==="categories"?r.value+"":r.index+""},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var r=this.option;return r.pieces&&r.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},t.prototype.setSelected=function(r){this.option.selected=at(r)},t.prototype.getValueState=function(r){var n=Be.findPieceIndex(r,this._pieceList);return n!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[n])]?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(r){var n=[],i=this._pieceList;return this.eachTargetSeries(function(a){var o=[],s=a.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var f=Be.findPieceIndex(l,i);f===r&&o.push(u)},this),n.push({seriesId:a.id,dataIndex:o})},this),n},t.prototype.getRepresentValue=function(r){var n;if(this.isCategory())n=r.value;else if(r.value!=null)n=r.value;else{var i=r.interval||[];n=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return n},t.prototype.getVisualMeta=function(r){if(this.isCategory())return;var n=[],i=["",""],a=this;function o(f,c){var p=a.getRepresentValue({interval:f});c||(c=a.getValueState(p));var h=r(p,c);f[0]===-1/0?i[0]=h:f[1]===1/0?i[1]=h:n.push({value:f[0],color:h},{value:f[1],color:h})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return D(s,function(f){var c=f.interval;c&&(c[0]>u&&o([u,c[0]],"outOfRange"),o(c.slice()),u=c[1])},this),{stops:n,outerColors:i}},t.type="visualMap.piecewise",t.defaultOption=Kr(Qp.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),t}(Qp),Tyt={splitNumber:function(e){var t=this.option,r=Math.min(t.precision,20),n=this.getExtent(),i=t.splitNumber;i=Math.max(parseInt(i,10),1),t.splitNumber=i;for(var a=(n[1]-n[0])/i;+a.toFixed(r)!==a&&r<5;)r++;t.precision=r,a=+a.toFixed(r),t.minOpen&&e.push({interval:[-1/0,n[0]],close:[0,0]});for(var o=0,s=n[0];o","\u2265"][n[0]]];r.text=r.text||this.formatValueText(r.value!=null?r.value:r.interval,!1,i)},this)}};function nW(e,t){var r=e.inverse;(e.orient==="vertical"?!r:r)&&t.reverse()}var iW=wyt;var Myt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.doRender=function(){var r=this.group;r.removeAll();var n=this.visualMapModel,i=n.get("textGap"),a=n.textStyleModel,o=a.getFont(),s=a.getTextColor(),l=this._getItemAlign(),u=n.itemSize,f=this._getViewData(),c=f.endsText,p=_e(n.get("showLabel",!0),!c);c&&this._renderEndsText(r,c[0],u,p,l),D(f.viewPieceList,function(h){var d=h.piece,m=new nt;m.onclick=Z(this._onItemClick,this,d),this._enableHoverLink(m,h.indexInModelPieceList);var v=n.getRepresentValue(d);if(this._createItemSymbol(m,v,[0,0,u[0],u[1]]),p){var g=this.visualMapModel.getValueState(v);m.add(new Lt({style:{x:l==="right"?-i:u[0]+i,y:u[1]/2,text:d.text,verticalAlign:"middle",align:l,font:o,fill:s,opacity:g==="outOfRange"?.5:1}}))}r.add(m)},this),c&&this._renderEndsText(r,c[1],u,p,l),fa(n.get("orient"),r,n.get("itemGap")),this.renderBackground(r),this.positionGroup(r)},t.prototype._enableHoverLink=function(r,n){var i=this;r.on("mouseover",function(){return a("highlight")}).on("mouseout",function(){return a("downplay")});var a=function(o){var s=i.visualMapModel;s.option.hoverLink&&i.api.dispatchAction({type:o,batch:Jp(s.findTargetDataIndices(n),s)})}},t.prototype._getItemAlign=function(){var r=this.visualMapModel,n=r.option;if(n.orient==="vertical")return B_(r,this.api,r.itemSize);var i=n.align;return(!i||i==="auto")&&(i="left"),i},t.prototype._renderEndsText=function(r,n,i,a,o){if(n){var s=new nt,l=this.visualMapModel.textStyleModel;s.add(new Lt({style:Qt(l,{x:a?o==="right"?i[0]:0:i[0]/2,y:i[1]/2,verticalAlign:"middle",align:a?o:"center",text:n})})),r.add(s)}},t.prototype._getViewData=function(){var r=this.visualMapModel,n=F(r.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),i=r.get("text"),a=r.get("orient"),o=r.get("inverse");return(a==="horizontal"?o:!o)?n.reverse():i&&(i=i.slice().reverse()),{viewPieceList:n,endsText:i}},t.prototype._createItemSymbol=function(r,n,i){r.add(ne(this.getControllerVisual(n,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(n,"color")))},t.prototype._onItemClick=function(r){var n=this.visualMapModel,i=n.option,a=i.selectedMode;if(a){var o=at(i.selected),s=n.getSelectedMapKey(r);a==="single"||a===!0?(o[s]=!0,D(o,function(l,u){o[u]=u===s})):o[s]=!o[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},t.type="visualMap.piecewise",t}(V_),aW=Myt;function Cm(e){e.registerComponentModel(iW),e.registerComponentView(aW),Mm(e)}function $I(e){Nt(Am),Nt(Cm)}var Ayt={label:{enabled:!0},decal:{show:!1}},oW=yt(),Cyt={};function jI(e,t){var r=e.getModel("aria");if(!r.get("enabled"))return;var n=at(Ayt);_t(n.label,e.getLocaleModel().get("aria"),!1),_t(r.option,n,!1),i(),a();function i(){var u=r.getModel("decal"),f=u.get("show");if(f){var c=$();e.eachSeries(function(p){if(!p.isColorBySeries()){var h=c.get(p.type);h||(h={},c.set(p.type,h)),oW(p).scope=h}}),e.eachRawSeries(function(p){if(e.isSeriesFiltered(p))return;if(j(p.enableAriaDecal)){p.enableAriaDecal();return}var h=p.getData();if(p.isColorBySeries()){var y=sv(p.ecModel,p.name,Cyt,e.getSeriesCount()),x=h.getVisual("decal");h.setVisual("decal",_(x,y))}else{var d=p.getRawData(),m={},v=oW(p).scope;h.each(function(S){var b=h.getRawIndex(S);m[b]=S});var g=d.count();d.each(function(S){var b=m[S],w=d.getName(S)||S+"",T=sv(p.ecModel,w,v,g),M=h.getItemVisual(b,"decal");h.setItemVisual(b,"decal",_(M,T))})}function _(S,b){var w=S?V(V({},b),S):b;return w.dirty=!0,w}})}}function a(){var u=e.getLocaleModel().get("aria"),f=r.getModel("label");if(f.option=J(f.option,u),!!f.get("enabled")){var c=t.getZr().dom;if(f.get("description")){c.setAttribute("aria-label",f.get("description"));return}var p=e.getSeriesCount(),h=f.get(["data","maxCount"])||10,d=f.get(["series","maxCount"])||10,m=Math.min(p,d),v;if(!(p<1)){var g=s();if(g){var y=f.get(["general","withTitle"]);v=o(y,{title:g})}else v=f.get(["general","withoutTitle"]);var x=[],_=p>1?f.get(["series","multiple","prefix"]):f.get(["series","single","prefix"]);v+=o(_,{seriesCount:p}),e.eachSeries(function(T,M){if(M1?f.get(["series","multiple",P]):f.get(["series","single",P]),C=o(C,{seriesId:T.seriesIndex,seriesName:T.get("name"),seriesType:l(T.subType)});var L=T.getData();if(L.count()>h){var I=f.get(["data","partialData"]);C+=o(I,{displayCnt:h})}else C+=f.get(["data","allData"]);for(var E=f.get(["data","separator","middle"]),R=f.get(["data","separator","end"]),k=[],O=0;O":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},Dyt=function(){function e(t){var r=this._condVal=H(t)?new RegExp(t):pk(t)?t:null;if(r==null){var n="";jt(n)}}return e.prototype.evaluate=function(t){var r=typeof t;return H(r)?this._condVal.test(t):Ct(r)?this._condVal.test(t+""):!1},e}(),Eyt=function(){function e(){}return e.prototype.evaluate=function(){return this.value},e}(),Iyt=function(){function e(){}return e.prototype.evaluate=function(){for(var t=this.children,r=0;r2&&n.push(i),i=[L,I]}function f(L,I,E,R){eh(L,E)&&eh(I,R)||i.push(L,I,E,R,E,R)}function c(L,I,E,R,k,O){var z=Math.abs(I-L),U=Math.tan(z/4)*4/3,G=IT:A2&&n.push(i),n}function nL(e,t,r,n,i,a,o,s,l,u){if(eh(e,r)&&eh(t,n)&&eh(i,o)&&eh(a,s)){l.push(o,s);return}var f=2/u,c=f*f,p=o-e,h=s-t,d=Math.sqrt(p*p+h*h);p/=d,h/=d;var m=r-e,v=n-t,g=i-o,y=a-s,x=m*m+v*v,_=g*g+y*y;if(x=0&&T=0){l.push(o,s);return}var M=[],C=[];xi(e,r,i,o,.5,M),xi(t,n,a,s,.5,C),nL(M[0],C[0],M[1],C[1],M[2],C[2],M[3],C[3],l,u),nL(M[4],C[4],M[5],C[5],M[6],C[6],M[7],C[7],l,u)}function hW(e,t){var r=F_(e),n=[];t=t||1;for(var i=0;i0)for(var u=0;uMath.abs(u),c=gW([l,u],f?0:1,t),p=(f?s:u)/c.length,h=0;hi,o=gW([n,i],a?0:1,t),s=a?"width":"height",l=a?"height":"width",u=a?"x":"y",f=a?"y":"x",c=e[s]/o.length,p=0;p1?null:new kt(m*l+e,m*u+t)}function Fyt(e,t,r){var n=new kt;kt.sub(n,r,t),n.normalize();var i=new kt;kt.sub(i,e,t);var a=i.dot(n);return a}function rh(e,t){var r=e[e.length-1];r&&r[0]===t[0]&&r[1]===t[1]||e.push(t)}function Gyt(e,t,r){for(var n=e.length,i=[],a=0;ao?(u.x=f.x=s+a/2,u.y=l,f.y=l+o):(u.y=f.y=l+o/2,u.x=s,f.x=s+a),Gyt(t,u,f)}function G_(e,t,r,n){if(r===1)n.push(t);else{var i=Math.floor(r/2),a=e(t);G_(e,a[0],i,n),G_(e,a[1],r-i,n)}return n}function Hyt(e,t){for(var r=[],n=0;n0)for(var S=n/r,b=-n/2;b<=n/2;b+=S){for(var w=Math.sin(b),T=Math.cos(b),M=0,x=0;x0;u/=2){var f=0,c=0;(e&u)>0&&(f=1),(t&u)>0&&(c=1),s+=u*u*(3*f^c),c===0&&(f===1&&(e=u-1-e,t=u-1-t),l=e,e=t,t=l)}return s}function W_(e){var t=1/0,r=1/0,n=-1/0,i=-1/0,a=F(e,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),f=l.x+l.width/2+(u?u[4]:0),c=l.y+l.height/2+(u?u[5]:0);return t=Math.min(f,t),r=Math.min(c,r),n=Math.max(f,n),i=Math.max(c,i),[f,c]}),o=F(a,function(s,l){return{cp:s,z:jyt(s[0],s[1],t,r,n,i),path:e[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function TW(e){return yW(e.path,e.count)}function iL(){return{fromIndividuals:[],toIndividuals:[],count:0}}function MW(e,t,r){var n=[];function i(S){for(var b=0;b=0;i--)if(!r[i].many.length){var l=r[s].many;if(l.length<=1)if(s)s=0;else return r;var a=l.length,u=Math.ceil(a/2);r[i].many=l.slice(u,a),r[s].many=l.slice(0,u),s++}return r}var Qyt={clone:function(e){for(var t=[],r=1-Math.pow(1-e.path.style.opacity,1/e.count),n=0;n0))return;var s=n.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,f;CW(e)&&(u=e,f=t),CW(t)&&(u=t,f=e);function c(g,y,x,_,S){var b=g.many,w=g.one;if(b.length===1&&!S){var T=y?b[0]:w,M=y?w:b[0];if(Em(T))c({many:[T],one:M},!0,x,_,!0);else{var C=s?J({delay:s(x,_)},l):l;Y_(T,M,C),a(T,M,T,M,C)}}else for(var A=J({dividePath:Qyt[r],individualDelay:s&&function(k,O,z,U){return s(k+x,_)}},l),P=y?MW(b,w,A):AW(w,b,A),L=P.fromIndividuals,I=P.toIndividuals,E=L.length,R=0;Rt.length,h=u?DW(f,u):DW(p?t:e,[p?e:t]),d=0,m=0;mRW))for(var i=n.getIndices(),a=t0t(n),o=0;o0&&_.group.traverse(function(b){b instanceof vt&&!b.animators.length&&b.animateFrom({style:{opacity:0}},S)})})}function IW(e){var t=e.getModel("universalTransition").get("seriesKey");return t||e.id}function LW(e){return B(e)?e.sort().join(","):e}function Cl(e){if(e.hostModel)return e.hostModel.getModel("universalTransition").get("divideShape")}function n0t(e,t){var r=$(),n=$(),i=$();D(e.oldSeries,function(o,s){var l=e.oldDataGroupIds[s],u=e.oldData[s],f=IW(o),c=LW(f);n.set(c,{dataGroupId:l,data:u}),B(f)&&D(f,function(p){i.set(p,{key:c,dataGroupId:l,data:u})})});function a(o){r.get(o)&&DO("Duplicated seriesKey in universalTransition "+o)}return D(t.updatedSeries,function(o){if(o.isUniversalTransitionEnabled()&&o.isAnimationEnabled()){var s=o.get("dataGroupId"),l=o.getData(),u=IW(o),f=LW(u),c=n.get(f);if(c)r.set(f,{oldSeries:[{dataGroupId:c.dataGroupId,divide:Cl(c.data),data:c.data}],newSeries:[{dataGroupId:s,divide:Cl(l),data:l}]});else if(B(u)){var p=[];D(u,function(m){var v=n.get(m);v.data&&p.push({dataGroupId:v.dataGroupId,divide:Cl(v.data),data:v.data})}),p.length&&r.set(f,{oldSeries:p,newSeries:[{dataGroupId:s,data:l,divide:Cl(l)}]})}else{var h=i.get(u);if(h){var d=r.get(h.key);d||(d={oldSeries:[{dataGroupId:h.dataGroupId,data:h.data,divide:Cl(h.data)}],newSeries:[]},r.set(h.key,d)),d.newSeries.push({dataGroupId:s,data:l,divide:Cl(l)})}}}}),r}function PW(e,t){for(var r=0;r=0&&i.push({dataGroupId:t.oldDataGroupIds[s],data:t.oldData[s],divide:Cl(t.oldData[s]),dim:o.dimension})}),D(Yt(e.to),function(o){var s=PW(r.updatedSeries,o);if(s>=0){var l=r.updatedSeries[s].getData();a.push({dataGroupId:t.oldDataGroupIds[s],data:l,divide:Cl(l),dim:o.dimension})}}),i.length>0&&a.length>0&&NW(i,a,n)}function sL(e){e.registerUpdateLifecycle("series:beforeupdate",function(t,r,n){D(Yt(n.seriesTransition),function(i){D(Yt(i.to),function(a){for(var o=n.updatedSeries,s=0;sl0t,iterateMonths:()=>o0t,iterateYears:()=>s0t});var o0t=(e,t)=>{console.warn("helpers.iterateMonths() is deprecated, please define this function in utils.inline in dashboards.yaml");let r=[],[n,i]=e.split("-").map(s=>parseInt(s)),[a,o]=t.split("-").map(s=>parseInt(s));for(;n{console.warn("helpers.iterateMonths() is deprecated, please define this function in utils.inline in dashboards.yaml");let r=[],n=parseInt(e.split("-")[0]),i=parseInt(t.split("-")[0]);for(;n<=i;n++)r.push(n);return r},l0t=(e,t,r)=>{console.warn("helpers.iterateMonths() is deprecated, please define this function in utils.inline in dashboards.yaml"),r=r??((i,a)=>i.slice(0,a+1).join(":"));let n={children:[]};for(let i of e){let a=i.account.split(":"),o=n;for(let s=0;sf.name==l);u||(u={name:l,children:[],value:0},o.children.push(u)),u.value+=t(i),o=u}}return n};var ZN={};uy(ZN,{Adder:()=>Ae,Delaunay:()=>dg,FormatSpecifier:()=>mg,InternMap:()=>Ta,InternSet:()=>Yn,Node:()=>Mo,Path:()=>ms,Voronoi:()=>Wf,ZoomTransform:()=>Qi,active:()=>Wq,arc:()=>ZJ,area:()=>Aw,areaRadial:()=>VN,ascending:()=>oe,autoType:()=>NP,axisBottom:()=>lY,axisLeft:()=>uY,axisRight:()=>sY,axisTop:()=>oY,bin:()=>$_,bisect:()=>Wn,bisectCenter:()=>UW,bisectLeft:()=>zW,bisectRight:()=>uL,bisector:()=>Dl,blob:()=>UZ,blur:()=>VW,blur2:()=>q_,blurImage:()=>BW,brush:()=>tZ,brushSelection:()=>jq,brushX:()=>Qq,brushY:()=>Jq,buffer:()=>VZ,chord:()=>rZ,chordDirected:()=>iZ,chordTranspose:()=>nZ,cluster:()=>j$,color:()=>Hi,contourDensity:()=>gZ,contours:()=>fg,count:()=>os,create:()=>JY,creator:()=>Il,cross:()=>cL,csv:()=>FZ,csvFormat:()=>CZ,csvFormatBody:()=>DZ,csvFormatRow:()=>IZ,csvFormatRows:()=>EZ,csvFormatValue:()=>LZ,csvParse:()=>Yb,csvParseRows:()=>AZ,cubehelix:()=>Qr,cumsum:()=>pL,curveBasis:()=>ltt,curveBasisClosed:()=>ftt,curveBasisOpen:()=>ptt,curveBumpX:()=>Ew,curveBumpY:()=>Iw,curveBundle:()=>dtt,curveCardinal:()=>vtt,curveCardinalClosed:()=>mtt,curveCardinalOpen:()=>gtt,curveCatmullRom:()=>xtt,curveCatmullRomClosed:()=>btt,curveCatmullRomOpen:()=>wtt,curveLinear:()=>ru,curveLinearClosed:()=>Mtt,curveMonotoneX:()=>Ltt,curveMonotoneY:()=>Ptt,curveNatural:()=>ktt,curveStep:()=>Ott,curveStepAfter:()=>Utt,curveStepBefore:()=>ztt,descending:()=>Im,deviation:()=>Pm,difference:()=>OL,disjoint:()=>zL,dispatch:()=>Gi,drag:()=>nX,dragDisable:()=>Rl,dragEnable:()=>Nl,dsv:()=>kP,dsvFormat:()=>Wl,easeBack:()=>hP,easeBackIn:()=>Vq,easeBackInOut:()=>hP,easeBackOut:()=>Bq,easeBounce:()=>_h,easeBounceIn:()=>zq,easeBounceInOut:()=>Uq,easeBounceOut:()=>_h,easeCircle:()=>fP,easeCircleIn:()=>kq,easeCircleInOut:()=>fP,easeCircleOut:()=>Oq,easeCubic:()=>og,easeCubicIn:()=>Mq,easeCubicInOut:()=>og,easeCubicOut:()=>Aq,easeElastic:()=>mP,easeElasticIn:()=>Fq,easeElasticInOut:()=>Gq,easeElasticOut:()=>mP,easeExp:()=>uP,easeExpIn:()=>Rq,easeExpInOut:()=>uP,easeExpOut:()=>Nq,easeLinear:()=>Sq,easePoly:()=>sP,easePolyIn:()=>Cq,easePolyInOut:()=>sP,easePolyOut:()=>Dq,easeQuad:()=>aP,easeQuadIn:()=>wq,easeQuadInOut:()=>aP,easeQuadOut:()=>Tq,easeSin:()=>lP,easeSinIn:()=>Lq,easeSinInOut:()=>lP,easeSinOut:()=>Pq,every:()=>IL,extent:()=>ss,fcumsum:()=>HW,filter:()=>PL,flatGroup:()=>ZW,flatRollup:()=>KW,forceCenter:()=>ZZ,forceCollide:()=>hK,forceLink:()=>vK,forceManyBody:()=>_K,forceRadial:()=>bK,forceSimulation:()=>xK,forceX:()=>SK,forceY:()=>wK,format:()=>Kf,formatDefaultLocale:()=>Kb,formatLocale:()=>qb,formatPrefix:()=>gg,formatSpecifier:()=>Ia,fsum:()=>GW,geoAlbers:()=>RS,geoAlbersUsa:()=>z$,geoArea:()=>zK,geoAzimuthalEqualArea:()=>U$,geoAzimuthalEqualAreaRaw:()=>kS,geoAzimuthalEquidistant:()=>V$,geoAzimuthalEquidistantRaw:()=>OS,geoBounds:()=>YK,geoCentroid:()=>jK,geoCircle:()=>r$,geoClipAntimeridian:()=>Cg,geoClipCircle:()=>xS,geoClipExtent:()=>a$,geoClipRectangle:()=>Ss,geoConicConformal:()=>F$,geoConicConformalRaw:()=>SR,geoConicEqualArea:()=>nc,geoConicEqualAreaRaw:()=>_R,geoConicEquidistant:()=>H$,geoConicEquidistantRaw:()=>wR,geoContains:()=>p$,geoDistance:()=>Nh,geoEqualEarth:()=>W$,geoEqualEarthRaw:()=>VS,geoEquirectangular:()=>G$,geoEquirectangularRaw:()=>ac,geoGnomonic:()=>Y$,geoGnomonicRaw:()=>BS,geoGraticule:()=>MS,geoGraticule10:()=>v$,geoIdentity:()=>X$,geoInterpolate:()=>m$,geoLength:()=>wS,geoMercator:()=>B$,geoMercatorRaw:()=>ic,geoNaturalEarth1:()=>q$,geoNaturalEarth1Raw:()=>FS,geoOrthographic:()=>Z$,geoOrthographicRaw:()=>GS,geoPath:()=>P$,geoProjection:()=>ir,geoProjectionMutator:()=>Ng,geoRotation:()=>hS,geoStereographic:()=>K$,geoStereographicRaw:()=>HS,geoStream:()=>Er,geoTransform:()=>R$,geoTransverseMercator:()=>$$,geoTransverseMercatorRaw:()=>WS,gray:()=>xX,greatest:()=>Um,greatestIndex:()=>ML,group:()=>Rm,groupSort:()=>mL,groups:()=>dL,hcl:()=>dh,hierarchy:()=>Vg,histogram:()=>$_,hsl:()=>ph,html:()=>XZ,image:()=>HZ,index:()=>$W,indexes:()=>jW,interpolate:()=>Jr,interpolateArray:()=>LX,interpolateBasis:()=>mb,interpolateBasisClosed:()=>gb,interpolateBlues:()=>EJ,interpolateBrBG:()=>lJ,interpolateBuGn:()=>gJ,interpolateBuPu:()=>yJ,interpolateCividis:()=>kJ,interpolateCool:()=>UJ,interpolateCubehelix:()=>XX,interpolateCubehelixDefault:()=>OJ,interpolateCubehelixLong:()=>kf,interpolateDate:()=>_b,interpolateDiscrete:()=>PX,interpolateGnBu:()=>xJ,interpolateGreens:()=>IJ,interpolateGreys:()=>LJ,interpolateHcl:()=>HX,interpolateHclLong:()=>WX,interpolateHsl:()=>BX,interpolateHslLong:()=>FX,interpolateHue:()=>RX,interpolateInferno:()=>WJ,interpolateLab:()=>rP,interpolateMagma:()=>HJ,interpolateNumber:()=>Cr,interpolateNumberArray:()=>mh,interpolateObject:()=>bb,interpolateOrRd:()=>_J,interpolateOranges:()=>NJ,interpolatePRGn:()=>uJ,interpolatePiYG:()=>fJ,interpolatePlasma:()=>YJ,interpolatePuBu:()=>SJ,interpolatePuBuGn:()=>bJ,interpolatePuOr:()=>cJ,interpolatePuRd:()=>wJ,interpolatePurples:()=>PJ,interpolateRainbow:()=>VJ,interpolateRdBu:()=>pJ,interpolateRdGy:()=>hJ,interpolateRdPu:()=>TJ,interpolateRdYlBu:()=>dJ,interpolateRdYlGn:()=>vJ,interpolateReds:()=>RJ,interpolateRgb:()=>Ul,interpolateRgbBasis:()=>yb,interpolateRgbBasisClosed:()=>IX,interpolateRound:()=>Vl,interpolateSinebow:()=>BJ,interpolateSpectral:()=>mJ,interpolateString:()=>gh,interpolateTransformCss:()=>Tb,interpolateTransformSvg:()=>Mb,interpolateTurbo:()=>FJ,interpolateViridis:()=>GJ,interpolateWarm:()=>zJ,interpolateYlGn:()=>AJ,interpolateYlGnBu:()=>MJ,interpolateYlOrBr:()=>CJ,interpolateYlOrRd:()=>DJ,interpolateZoom:()=>Ab,interrupt:()=>Da,intersection:()=>UL,interval:()=>jX,isoFormat:()=>ZQ,isoParse:()=>KQ,json:()=>WZ,lab:()=>Rf,lch:()=>bX,least:()=>TL,leastIndex:()=>Vm,line:()=>jh,lineRadial:()=>UN,link:()=>ny,linkHorizontal:()=>rtt,linkRadial:()=>itt,linkVertical:()=>ntt,local:()=>ob,map:()=>RL,matcher:()=>uh,max:()=>fs,maxIndex:()=>Mf,mean:()=>xL,median:()=>_L,medianIndex:()=>eY,merge:()=>Df,min:()=>El,minIndex:()=>Af,mode:()=>bL,namespace:()=>ho,namespaces:()=>Hm,nice:()=>wf,now:()=>Bl,pack:()=>Sj,packEnclose:()=>hj,packSiblings:()=>xj,pairs:()=>SL,partition:()=>wj,path:()=>ug,pathRound:()=>oZ,permute:()=>Nm,pie:()=>JJ,piecewise:()=>Qm,pointRadial:()=>bc,pointer:()=>Ar,pointers:()=>tX,polygonArea:()=>Pj,polygonCentroid:()=>Rj,polygonContains:()=>zj,polygonHull:()=>Oj,polygonLength:()=>Uj,precisionFixed:()=>$b,precisionPrefix:()=>jb,precisionRound:()=>Qb,quadtree:()=>Yl,quantile:()=>po,quantileIndex:()=>Q_,quantileSorted:()=>j_,quantize:()=>qX,quickselect:()=>Cf,radialArea:()=>VN,radialLine:()=>UN,randomBates:()=>Gj,randomBernoulli:()=>Yj,randomBeta:()=>QS,randomBinomial:()=>JS,randomCauchy:()=>qj,randomExponential:()=>Hj,randomGamma:()=>Xh,randomGeometric:()=>jS,randomInt:()=>Bj,randomIrwinHall:()=>$S,randomLcg:()=>OR,randomLogNormal:()=>Fj,randomLogistic:()=>Zj,randomNormal:()=>Yh,randomPareto:()=>Wj,randomPoisson:()=>Kj,randomUniform:()=>Vj,randomWeibull:()=>Xj,range:()=>Fi,rank:()=>wL,reduce:()=>NL,reverse:()=>kL,rgb:()=>hs,ribbon:()=>fZ,ribbonArrow:()=>cZ,rollup:()=>Z_,rollups:()=>vL,scaleBand:()=>Fg,scaleDiverging:()=>_w,scaleDivergingLog:()=>sN,scaleDivergingPow:()=>bw,scaleDivergingSqrt:()=>jQ,scaleDivergingSymlog:()=>lN,scaleIdentity:()=>rw,scaleImplicit:()=>tw,scaleLinear:()=>ew,scaleLog:()=>nw,scaleOrdinal:()=>qh,scalePoint:()=>Qj,scalePow:()=>qg,scaleQuantile:()=>ow,scaleQuantize:()=>sw,scaleRadial:()=>aw,scaleSequential:()=>mw,scaleSequentialLog:()=>aN,scaleSequentialPow:()=>gw,scaleSequentialQuantile:()=>yw,scaleSequentialSqrt:()=>$Q,scaleSequentialSymlog:()=>oN,scaleSqrt:()=>oQ,scaleSymlog:()=>iw,scaleThreshold:()=>lw,scaleTime:()=>nN,scaleUtc:()=>iN,scan:()=>AL,schemeAccent:()=>JQ,schemeBlues:()=>IN,schemeBrBG:()=>uN,schemeBuGn:()=>yN,schemeBuPu:()=>xN,schemeCategory10:()=>QQ,schemeDark2:()=>tJ,schemeGnBu:()=>_N,schemeGreens:()=>LN,schemeGreys:()=>PN,schemeOrRd:()=>bN,schemeOranges:()=>kN,schemePRGn:()=>fN,schemePaired:()=>eJ,schemePastel1:()=>rJ,schemePastel2:()=>nJ,schemePiYG:()=>cN,schemePuBu:()=>wN,schemePuBuGn:()=>SN,schemePuOr:()=>pN,schemePuRd:()=>TN,schemePurples:()=>RN,schemeRdBu:()=>hN,schemeRdGy:()=>dN,schemeRdPu:()=>MN,schemeRdYlBu:()=>vN,schemeRdYlGn:()=>mN,schemeReds:()=>NN,schemeSet1:()=>iJ,schemeSet2:()=>aJ,schemeSet3:()=>oJ,schemeSpectral:()=>gN,schemeTableau10:()=>sJ,schemeYlGn:()=>CN,schemeYlGnBu:()=>AN,schemeYlOrBr:()=>DN,schemeYlOrRd:()=>EN,select:()=>$e,selectAll:()=>eX,selection:()=>vo,selector:()=>Ll,selectorAll:()=>lh,shuffle:()=>rY,shuffler:()=>CL,some:()=>LL,sort:()=>sh,stack:()=>Vtt,stackOffsetDiverging:()=>Ftt,stackOffsetExpand:()=>Btt,stackOffsetNone:()=>Oa,stackOffsetSilhouette:()=>Gtt,stackOffsetWiggle:()=>Htt,stackOrderAppearance:()=>qw,stackOrderAscending:()=>Zw,stackOrderDescending:()=>Wtt,stackOrderInsideOut:()=>Ytt,stackOrderNone:()=>za,stackOrderReverse:()=>Xtt,stratify:()=>Aj,style:()=>cs,subset:()=>VL,sum:()=>DL,superset:()=>Fm,svg:()=>qZ,symbol:()=>WN,symbolAsterisk:()=>Lw,symbolCircle:()=>td,symbolCross:()=>Pw,symbolDiamond:()=>Rw,symbolDiamond2:()=>Nw,symbolPlus:()=>kw,symbolSquare:()=>Ow,symbolSquare2:()=>zw,symbolStar:()=>Uw,symbolTimes:()=>iy,symbolTriangle:()=>Vw,symbolTriangle2:()=>Bw,symbolWye:()=>Fw,symbolX:()=>iy,symbols:()=>HN,symbolsFill:()=>HN,symbolsStroke:()=>stt,text:()=>qf,thresholdFreedmanDiaconis:()=>gL,thresholdScott:()=>yL,thresholdSturges:()=>Tf,tickFormat:()=>Gg,tickIncrement:()=>Ma,tickStep:()=>Sf,ticks:()=>Xn,timeDay:()=>Eo,timeDays:()=>pQ,timeFormat:()=>ty,timeFormatDefaultLocale:()=>hw,timeFormatLocale:()=>Jg,timeFriday:()=>YR,timeFridays:()=>_Q,timeHour:()=>pc,timeHours:()=>fQ,timeInterval:()=>Ce,timeMillisecond:()=>Jl,timeMilliseconds:()=>FR,timeMinute:()=>uc,timeMinutes:()=>lQ,timeMonday:()=>vc,timeMondays:()=>mQ,timeMonth:()=>yc,timeMonths:()=>DQ,timeParse:()=>eN,timeSaturday:()=>XR,timeSaturdays:()=>bQ,timeSecond:()=>di,timeSeconds:()=>GR,timeSunday:()=>Io,timeSundays:()=>qR,timeThursday:()=>Ts,timeThursdays:()=>xQ,timeTickInterval:()=>pw,timeTicks:()=>cw,timeTuesday:()=>HR,timeTuesdays:()=>gQ,timeWednesday:()=>WR,timeWednesdays:()=>yQ,timeWeek:()=>Io,timeWeeks:()=>qR,timeYear:()=>Kn,timeYears:()=>IQ,timeout:()=>ng,timer:()=>Uf,timerFlush:()=>iP,transition:()=>Ob,transpose:()=>Bm,tree:()=>Cj,treemap:()=>Dj,treemapBinary:()=>Ej,treemapDice:()=>Ao,treemapResquarify:()=>Lj,treemapSlice:()=>jl,treemapSliceDice:()=>Ij,treemapSquarify:()=>KS,tsv:()=>GZ,tsvFormat:()=>RZ,tsvFormatBody:()=>NZ,tsvFormatRow:()=>OZ,tsvFormatRows:()=>kZ,tsvFormatValue:()=>zZ,tsvParse:()=>Xb,tsvParseRows:()=>PZ,union:()=>BL,unixDay:()=>Kg,unixDays:()=>dQ,utcDay:()=>tu,utcDays:()=>hQ,utcFormat:()=>_c,utcFriday:()=>$R,utcFridays:()=>AQ,utcHour:()=>hc,utcHours:()=>cQ,utcMillisecond:()=>Jl,utcMilliseconds:()=>FR,utcMinute:()=>fc,utcMinutes:()=>uQ,utcMonday:()=>gc,utcMondays:()=>SQ,utcMonth:()=>xc,utcMonths:()=>EQ,utcParse:()=>ey,utcSaturday:()=>jR,utcSaturdays:()=>CQ,utcSecond:()=>di,utcSeconds:()=>GR,utcSunday:()=>Lo,utcSundays:()=>QR,utcThursday:()=>Ms,utcThursdays:()=>MQ,utcTickInterval:()=>fw,utcTicks:()=>uw,utcTuesday:()=>ZR,utcTuesdays:()=>wQ,utcWednesday:()=>KR,utcWednesdays:()=>TQ,utcWeek:()=>Lo,utcWeeks:()=>QR,utcYear:()=>$n,utcYears:()=>LQ,variance:()=>Lm,window:()=>fh,xml:()=>YZ,zip:()=>EL,zoom:()=>Ztt,zoomIdentity:()=>nd,zoomTransform:()=>Kw});function oe(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function Im(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function Dl(e){let t,r,n;e.length!==2?(t=oe,r=(s,l)=>oe(e(s),l),n=(s,l)=>e(s)-l):(t=e===oe||e===Im?e:u0t,r=e,n=e);function i(s,l,u=0,f=s.length){if(u>>1;r(s[c],l)<0?u=c+1:f=c}while(u>>1;r(s[c],l)<=0?u=c+1:f=c}while(uu&&n(s[c-1],l)>-n(s[c],l)?c-1:c}return{left:i,center:o,right:a}}function u0t(){return 0}function bf(e){return e===null?NaN:+e}function*kW(e,t){if(t===void 0)for(let r of e)r!=null&&(r=+r)>=r&&(yield r);else{let r=-1;for(let n of e)(n=t(n,++r,e))!=null&&(n=+n)>=n&&(yield n)}}var OW=Dl(oe),uL=OW.right,zW=OW.left,UW=Dl(bf).center,Wn=uL;function VW(e,t){if(!((t=+t)>=0))throw new RangeError("invalid r");let r=e.length;if(!((r=Math.floor(r))>=0))throw new RangeError("invalid length");if(!r||!t)return e;let n=fL(t),i=e.slice();return n(e,i,0,r,1),n(i,e,0,r,1),n(e,i,0,r,1),e}var q_=FW(fL),BW=FW(f0t);function FW(e){return function(t,r,n=r){if(!((r=+r)>=0))throw new RangeError("invalid rx");if(!((n=+n)>=0))throw new RangeError("invalid ry");let{data:i,width:a,height:o}=t;if(!((a=Math.floor(a))>=0))throw new RangeError("invalid width");if(!((o=Math.floor(o!==void 0?o:i.length/a))>=0))throw new RangeError("invalid height");if(!a||!o||!r&&!n)return t;let s=r&&e(r),l=n&&e(n),u=i.slice();return s&&l?(ih(s,u,i,a,o),ih(s,i,u,a,o),ih(s,u,i,a,o),ah(l,i,u,a,o),ah(l,u,i,a,o),ah(l,i,u,a,o)):s?(ih(s,i,u,a,o),ih(s,u,i,a,o),ih(s,i,u,a,o)):l&&(ah(l,i,u,a,o),ah(l,u,i,a,o),ah(l,i,u,a,o)),t}}function ih(e,t,r,n,i){for(let a=0,o=n*i;a{i<<=2,a<<=2,o<<=2,t(r,n,i+0,a+0,o),t(r,n,i+1,a+1,o),t(r,n,i+2,a+2,o),t(r,n,i+3,a+3,o)}}function fL(e){let t=Math.floor(e);if(t===e)return c0t(e);let r=e-t,n=2*e+1;return(i,a,o,s,l)=>{if(!((s-=l)>=o))return;let u=t*a[o],f=l*t,c=f+l;for(let p=o,h=o+f;p{if(!((a-=o)>=i))return;let s=e*n[i],l=o*e;for(let u=i,f=i+l;u=n&&++r;else{let n=-1;for(let i of e)(i=t(i,++n,e))!=null&&(i=+i)>=i&&++r}return r}function p0t(e){return e.length|0}function h0t(e){return!(e>0)}function d0t(e){return typeof e!="object"||"length"in e?e:Array.from(e)}function v0t(e){return t=>e(...t)}function cL(...e){let t=typeof e[e.length-1]=="function"&&v0t(e.pop());e=e.map(d0t);let r=e.map(p0t),n=e.length-1,i=new Array(n+1).fill(0),a=[];if(n<0||r.some(h0t))return a;for(;;){a.push(i.map((s,l)=>e[l][s]));let o=n;for(;++i[o]===r[o];){if(o===0)return t?a.map(t):a;i[o--]=0}}}function pL(e,t){var r=0,n=0;return Float64Array.from(e,t===void 0?i=>r+=+i||0:i=>r+=+t(i,n++,e)||0)}function Lm(e,t){let r=0,n,i=0,a=0;if(t===void 0)for(let o of e)o!=null&&(o=+o)>=o&&(n=o-i,i+=n/++r,a+=n*(o-i));else{let o=-1;for(let s of e)(s=t(s,++o,e))!=null&&(s=+s)>=s&&(n=s-i,i+=n/++r,a+=n*(s-i))}if(r>1)return a/(r-1)}function Pm(e,t){let r=Lm(e,t);return r&&Math.sqrt(r)}function ss(e,t){let r,n;if(t===void 0)for(let i of e)i!=null&&(r===void 0?i>=i&&(r=n=i):(r>i&&(r=i),n=a&&(r=n=a):(r>a&&(r=a),n0){for(o=t[--r];r>0&&(n=o,i=t[--r],o=n+i,a=i-(o-n),!a););r>0&&(a<0&&t[r-1]<0||a>0&&t[r-1]>0)&&(i=a*2,n=o+i,i==n-o&&(o=n))}return o}};function GW(e,t){let r=new Ae;if(t===void 0)for(let n of e)(n=+n)&&r.add(n);else{let n=-1;for(let i of e)(i=+t(i,++n,e))&&r.add(i)}return+r}function HW(e,t){let r=new Ae,n=-1;return Float64Array.from(e,t===void 0?i=>r.add(+i||0):i=>r.add(+t(i,++n,e)||0))}var Ta=class extends Map{constructor(t,r=XW){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(let[n,i]of t)this.set(n,i)}get(t){return super.get(hL(this,t))}has(t){return super.has(hL(this,t))}set(t,r){return super.set(WW(this,t),r)}delete(t){return super.delete(YW(this,t))}},Yn=class extends Set{constructor(t,r=XW){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(let n of t)this.add(n)}has(t){return super.has(hL(this,t))}add(t){return super.add(WW(this,t))}delete(t){return super.delete(YW(this,t))}};function hL({_intern:e,_key:t},r){let n=t(r);return e.has(n)?e.get(n):r}function WW({_intern:e,_key:t},r){let n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function YW({_intern:e,_key:t},r){let n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function XW(e){return e!==null&&typeof e=="object"?e.valueOf():e}function ls(e){return e}function Rm(e,...t){return oh(e,ls,ls,t)}function dL(e,...t){return oh(e,Array.from,ls,t)}function qW(e,t){for(let r=1,n=t.length;ri.pop().map(([a,o])=>[...i,a,o]));return e}function ZW(e,...t){return qW(dL(e,...t),t)}function KW(e,t,...r){return qW(vL(e,t,...r),r)}function Z_(e,t,...r){return oh(e,ls,t,r)}function vL(e,t,...r){return oh(e,Array.from,t,r)}function $W(e,...t){return oh(e,ls,QW,t)}function jW(e,...t){return oh(e,Array.from,QW,t)}function QW(e){if(e.length!==1)throw new Error("duplicate key");return e[0]}function oh(e,t,r,n){return function i(a,o){if(o>=n.length)return r(a);let s=new Ta,l=n[o++],u=-1;for(let f of a){let c=l(f,++u,a),p=s.get(c);p?p.push(f):s.set(c,[f])}for(let[f,c]of s)s.set(f,i(c,o));return t(s)}(e,0)}function Nm(e,t){return Array.from(t,r=>e[r])}function sh(e,...t){if(typeof e[Symbol.iterator]!="function")throw new TypeError("values is not iterable");e=Array.from(e);let[r]=t;if(r&&r.length!==2||t.length>1){let n=Uint32Array.from(e,(i,a)=>a);return t.length>1?(t=t.map(i=>e.map(i)),n.sort((i,a)=>{for(let o of t){let s=us(o[i],o[a]);if(s)return s}})):(r=e.map(r),n.sort((i,a)=>us(r[i],r[a]))),Nm(e,n)}return e.sort(km(r))}function km(e=oe){if(e===oe)return us;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{let n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function us(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}function mL(e,t,r){return(t.length!==2?sh(Z_(e,t,r),([n,i],[a,o])=>oe(i,o)||oe(n,a)):sh(Rm(e,r),([n,i],[a,o])=>t(i,o)||oe(n,a))).map(([n])=>n)}var JW=Array.prototype,tY=JW.slice,Zse=JW.map;function Om(e){return()=>e}var m0t=Math.sqrt(50),g0t=Math.sqrt(10),y0t=Math.sqrt(2);function K_(e,t,r){let n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),o=a>=m0t?10:a>=g0t?5:a>=y0t?2:1,s,l,u;return i<0?(u=Math.pow(10,-i)/o,s=Math.round(e*u),l=Math.round(t*u),s/ut&&--l,u=-u):(u=Math.pow(10,i)*o,s=Math.round(e/u),l=Math.round(t/u),s*ut&&--l),l0))return[];if(e===t)return[e];let n=t=i))return[];let s=a-i+1,l=new Array(s);if(n)if(o<0)for(let u=0;u0?(e=Math.floor(e/i)*i,t=Math.ceil(t/i)*i):i<0&&(e=Math.ceil(e*i)/i,t=Math.floor(t*i)/i),n=i}}function Tf(e){return Math.max(1,Math.ceil(Math.log(os(e))/Math.LN2)+1)}function $_(){var e=ls,t=ss,r=Tf;function n(i){Array.isArray(i)||(i=Array.from(i));var a,o=i.length,s,l,u=new Array(o);for(a=0;a=p)if(x>=p&&t===ss){let S=Ma(c,p,_);isFinite(S)&&(S>0?p=(Math.floor(p/S)+1)*S:S<0&&(p=(Math.ceil(p*-S)+1)/-S))}else h.pop()}for(var d=h.length,m=0,v=d;h[m]<=c;)++m;for(;h[v-1]>p;)--v;(m||v0?h[a-1]:c,y.x1=a0)for(a=0;a=n)&&(r=n);else{let n=-1;for(let i of e)(i=t(i,++n,e))!=null&&(r=i)&&(r=i)}return r}function Mf(e,t){let r,n=-1,i=-1;if(t===void 0)for(let a of e)++i,a!=null&&(r=a)&&(r=a,n=i);else for(let a of e)(a=t(a,++i,e))!=null&&(r=a)&&(r=a,n=i);return n}function El(e,t){let r;if(t===void 0)for(let n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let i of e)(i=t(i,++n,e))!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}return r}function Af(e,t){let r,n=-1,i=-1;if(t===void 0)for(let a of e)++i,a!=null&&(r>a||r===void 0&&a>=a)&&(r=a,n=i);else for(let a of e)(a=t(a,++i,e))!=null&&(r>a||r===void 0&&a>=a)&&(r=a,n=i);return n}function Cf(e,t,r=0,n=1/0,i){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(i=i===void 0?us:km(i);n>r;){if(n-r>600){let l=n-r+1,u=t-r+1,f=Math.log(l),c=.5*Math.exp(2*f/3),p=.5*Math.sqrt(f*c*(l-c)/l)*(u-l/2<0?-1:1),h=Math.max(r,Math.floor(t-u*c/l+p)),d=Math.min(n,Math.floor(t+(l-u)*c/l+p));Cf(e,t,h,d,i)}let a=e[t],o=r,s=n;for(zm(e,r,t),i(e[n],a)>0&&zm(e,r,n);o0;)--s}i(e[r],a)===0?zm(e,r,s):(++s,zm(e,s,n)),s<=t&&(r=s+1),t<=s&&(n=s-1)}return e}function zm(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}function Um(e,t=oe){let r,n=!1;if(t.length===1){let i;for(let a of e){let o=t(a);(n?oe(o,i)>0:oe(o,o)===0)&&(r=a,i=o,n=!0)}}else for(let i of e)(n?t(i,r)>0:t(i,i)===0)&&(r=i,n=!0);return r}function po(e,t,r){if(e=Float64Array.from(kW(e,r)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return El(e);if(t>=1)return fs(e);var n,i=(n-1)*t,a=Math.floor(i),o=fs(Cf(e,a).subarray(0,a+1)),s=El(e.subarray(a+1));return o+(s-o)*(i-a)}}function j_(e,t,r=bf){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,a=Math.floor(i),o=+r(e[a],a,e),s=+r(e[a+1],a+1,e);return o+(s-o)*(i-a)}}function Q_(e,t,r=bf){if(!isNaN(t=+t)){if(n=Float64Array.from(e,(s,l)=>bf(r(e[l],l,e))),t<=0)return Af(n);if(t>=1)return Mf(n);var n,i=Uint32Array.from(e,(s,l)=>l),a=n.length-1,o=Math.floor(a*t);return Cf(i,o,0,a,(s,l)=>us(n[s],n[l])),o=Um(i.subarray(0,o+1),s=>n[s]),o>=0?o:-1}}function gL(e,t,r){let n=os(e),i=po(e,.75)-po(e,.25);return n&&i?Math.ceil((r-t)/(2*i*Math.pow(n,-1/3))):1}function yL(e,t,r){let n=os(e),i=Pm(e);return n&&i?Math.ceil((r-t)*Math.cbrt(n)/(3.49*i)):1}function xL(e,t){let r=0,n=0;if(t===void 0)for(let i of e)i!=null&&(i=+i)>=i&&(++r,n+=i);else{let i=-1;for(let a of e)(a=t(a,++i,e))!=null&&(a=+a)>=a&&(++r,n+=a)}if(r)return n/r}function _L(e,t){return po(e,.5,t)}function eY(e,t){return Q_(e,.5,t)}function*x0t(e){for(let t of e)yield*t}function Df(e){return Array.from(x0t(e))}function bL(e,t){let r=new Ta;if(t===void 0)for(let a of e)a!=null&&a>=a&&r.set(a,(r.get(a)||0)+1);else{let a=-1;for(let o of e)(o=t(o,++a,e))!=null&&o>=o&&r.set(o,(r.get(o)||0)+1)}let n,i=0;for(let[a,o]of r)o>i&&(i=o,n=a);return n}function SL(e,t=_0t){let r=[],n,i=!1;for(let a of e)i&&r.push(t(n,a)),n=a,i=!0;return r}function _0t(e,t){return[e,t]}function Fi(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,a=new Array(i);++nt(r[s],r[l]),a,o;return e=Uint32Array.from(r,(s,l)=>l),e.sort(t===oe?(s,l)=>us(r[s],r[l]):km(i)),e.forEach((s,l)=>{let u=i(s,a===void 0?s:a);u>=0?((a===void 0||u>0)&&(a=s,o=l),n[s]=o):n[s]=NaN}),n}function TL(e,t=oe){let r,n=!1;if(t.length===1){let i;for(let a of e){let o=t(a);(n?oe(o,i)<0:oe(o,o)===0)&&(r=a,i=o,n=!0)}}else for(let i of e)(n?t(i,r)<0:t(i,i)===0)&&(r=i,n=!0);return r}function Vm(e,t=oe){if(t.length===1)return Af(e,t);let r,n=-1,i=-1;for(let a of e)++i,(n<0?t(a,a)===0:t(a,r)<0)&&(r=a,n=i);return n}function ML(e,t=oe){if(t.length===1)return Mf(e,t);let r,n=-1,i=-1;for(let a of e)++i,(n<0?t(a,a)===0:t(a,r)>0)&&(r=a,n=i);return n}function AL(e,t){let r=Vm(e,t);return r<0?void 0:r}var rY=CL(Math.random);function CL(e){return function(r,n=0,i=r.length){let a=i-(n=+n);for(;a;){let o=e()*a--|0,s=r[a+n];r[a+n]=r[o+n],r[o+n]=s}return r}}function DL(e,t){let r=0;if(t===void 0)for(let n of e)(n=+n)&&(r+=n);else{let n=-1;for(let i of e)(i=+t(i,++n,e))&&(r+=i)}return r}function Bm(e){if(!(a=e.length))return[];for(var t=-1,r=El(e,b0t),n=new Array(r);++tt(r,n,e))}function NL(e,t,r){if(typeof t!="function")throw new TypeError("reducer is not a function");let n=e[Symbol.iterator](),i,a,o=-1;if(arguments.length<3){if({done:i,value:r}=n.next(),i)return;++o}for(;{done:i,value:a}=n.next(),!i;)r=t(r,a,++o,e);return r}function kL(e){if(typeof e[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from(e).reverse()}function OL(e,...t){e=new Yn(e);for(let r of t)for(let n of r)e.delete(n);return e}function zL(e,t){let r=t[Symbol.iterator](),n=new Yn;for(let i of e){if(n.has(i))return!1;let a,o;for(;({value:a,done:o}=r.next())&&!o;){if(Object.is(i,a))return!1;n.add(a)}}return!0}function UL(e,...t){e=new Yn(e),t=t.map(S0t);t:for(let r of e)for(let n of t)if(!n.has(r)){e.delete(r);continue t}return e}function S0t(e){return e instanceof Yn?e:new Yn(e)}function Fm(e,t){let r=e[Symbol.iterator](),n=new Set;for(let i of t){let a=nY(i);if(n.has(a))continue;let o,s;for(;{value:o,done:s}=r.next();){if(s)return!1;let l=nY(o);if(n.add(l),Object.is(a,l))break}}return!0}function nY(e){return e!==null&&typeof e=="object"?e.valueOf():e}function VL(e,t){return Fm(t,e)}function BL(...e){let t=new Yn;for(let r of e)for(let n of r)t.add(n);return t}function iY(e){return e}var J_=1,tb=2,FL=3,Gm=4,aY=1e-6;function w0t(e){return"translate("+e+",0)"}function T0t(e){return"translate(0,"+e+")"}function M0t(e){return t=>+e(t)}function A0t(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),r=>+e(r)+t}function C0t(){return!this.__axis}function eb(e,t){var r=[],n=null,i=null,a=6,o=6,s=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,u=e===J_||e===Gm?-1:1,f=e===Gm||e===tb?"x":"y",c=e===J_||e===FL?w0t:T0t;function p(h){var d=n??(t.ticks?t.ticks.apply(t,r):t.domain()),m=i??(t.tickFormat?t.tickFormat.apply(t,r):iY),v=Math.max(a,0)+s,g=t.range(),y=+g[0]+l,x=+g[g.length-1]+l,_=(t.bandwidth?A0t:M0t)(t.copy(),l),S=h.selection?h.selection():h,b=S.selectAll(".domain").data([null]),w=S.selectAll(".tick").data(d,t).order(),T=w.exit(),M=w.enter().append("g").attr("class","tick"),C=w.select("line"),A=w.select("text");b=b.merge(b.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),w=w.merge(M),C=C.merge(M.append("line").attr("stroke","currentColor").attr(f+"2",u*a)),A=A.merge(M.append("text").attr("fill","currentColor").attr(f,u*v).attr("dy",e===J_?"0em":e===FL?"0.71em":"0.32em")),h!==S&&(b=b.transition(h),w=w.transition(h),C=C.transition(h),A=A.transition(h),T=T.transition(h).attr("opacity",aY).attr("transform",function(P){return isFinite(P=_(P))?c(P+l):this.getAttribute("transform")}),M.attr("opacity",aY).attr("transform",function(P){var L=this.parentNode.__axis;return c((L&&isFinite(L=L(P))?L:_(P))+l)})),T.remove(),b.attr("d",e===Gm||e===tb?o?"M"+u*o+","+y+"H"+l+"V"+x+"H"+u*o:"M"+l+","+y+"V"+x:o?"M"+y+","+u*o+"V"+l+"H"+x+"V"+u*o:"M"+y+","+l+"H"+x),w.attr("opacity",1).attr("transform",function(P){return c(_(P)+l)}),C.attr(f+"2",u*a),A.attr(f,u*v).text(m),S.filter(C0t).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===tb?"start":e===Gm?"end":"middle"),S.each(function(){this.__axis=_})}return p.scale=function(h){return arguments.length?(t=h,p):t},p.ticks=function(){return r=Array.from(arguments),p},p.tickArguments=function(h){return arguments.length?(r=h==null?[]:Array.from(h),p):r.slice()},p.tickValues=function(h){return arguments.length?(n=h==null?null:Array.from(h),p):n&&n.slice()},p.tickFormat=function(h){return arguments.length?(i=h,p):i},p.tickSize=function(h){return arguments.length?(a=o=+h,p):a},p.tickSizeInner=function(h){return arguments.length?(a=+h,p):a},p.tickSizeOuter=function(h){return arguments.length?(o=+h,p):o},p.tickPadding=function(h){return arguments.length?(s=+h,p):s},p.offset=function(h){return arguments.length?(l=+h,p):l},p}function oY(e){return eb(J_,e)}function sY(e){return eb(tb,e)}function lY(e){return eb(FL,e)}function uY(e){return eb(Gm,e)}var D0t={value:()=>{}};function cY(){for(var e=0,t=arguments.length,r={},n;e=0&&(n=r.slice(i+1),r=r.slice(0,i)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}rb.prototype=cY.prototype={constructor:rb,on:function(e,t){var r=this._,n=E0t(e+"",r),i,a=-1,o=n.length;if(arguments.length<2){for(;++a0)for(var r=new Array(i),n=0,i,a;n=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),Hm.hasOwnProperty(t)?{space:Hm[t],local:e}:e}function L0t(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===nb&&t.documentElement.namespaceURI===nb?t.createElement(e):t.createElementNS(r,e)}}function P0t(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Il(e){var t=ho(e);return(t.local?P0t:L0t)(t)}function R0t(){}function Ll(e){return e==null?R0t:function(){return this.querySelector(e)}}function pY(e){typeof e!="function"&&(e=Ll(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i=x&&(x=y+1);!(S=v[x])&&++x=0;)(o=n[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function TY(e){e||(e=X0t);function t(c,p){return c&&p?e(c.__data__,p.__data__):!c-!p}for(var r=this._groups,n=r.length,i=new Array(n),a=0;at?1:e>=t?0:NaN}function MY(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function AY(){return Array.from(this)}function CY(){for(var e=this._groups,t=0,r=e.length;t1?this.each((t==null?J0t:typeof t=="function"?ext:txt)(e,t,r??"")):cs(this.node(),e)}function cs(e,t){return e.style.getPropertyValue(t)||fh(e).getComputedStyle(e,null).getPropertyValue(t)}function rxt(e){return function(){delete this[e]}}function nxt(e,t){return function(){this[e]=t}}function ixt(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function RY(e,t){return arguments.length>1?this.each((t==null?rxt:typeof t=="function"?ixt:nxt)(e,t)):this.node()[e]}function NY(e){return e.trim().split(/^|\s+/)}function GL(e){return e.classList||new kY(e)}function kY(e){this._node=e,this._names=NY(e.getAttribute("class")||"")}kY.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function OY(e,t){for(var r=GL(e),n=-1,i=t.length;++n=0&&(r=t.slice(n+1),t=t.slice(0,n)),{type:t,name:r}})}function Sxt(e){return function(){var t=this.__on;if(t){for(var r=0,n=-1,i=t.length,a;rAr(r,t))}function eX(e){return typeof e=="string"?new ke([document.querySelectorAll(e)],[document.documentElement]):new ke([Wm(e)],Xm)}var rX={passive:!1},Ef={capture:!0,passive:!1};function lb(e){e.stopImmediatePropagation()}function Pl(e){e.preventDefault(),e.stopImmediatePropagation()}function Rl(e){var t=e.document.documentElement,r=$e(e).on("dragstart.drag",Pl,Ef);"onselectstart"in t?r.on("selectstart.drag",Pl,Ef):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Nl(e,t){var r=e.document.documentElement,n=$e(e).on("dragstart.drag",null);t&&(n.on("click.drag",Pl,Ef),setTimeout(function(){n.on("click.drag",null)},0)),"onselectstart"in r?n.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}var qm=e=>()=>e;function Zm(e,{sourceEvent:t,subject:r,target:n,identifier:i,active:a,x:o,y:s,dx:l,dy:u,dispatch:f}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:o,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:f}})}Zm.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Dxt(e){return!e.ctrlKey&&!e.button}function Ext(){return this.parentNode}function Ixt(e,t){return t??{x:e.x,y:e.y}}function Lxt(){return navigator.maxTouchPoints||"ontouchstart"in this}function nX(){var e=Dxt,t=Ext,r=Ixt,n=Lxt,i={},a=Gi("start","drag","end"),o=0,s,l,u,f,c=0;function p(_){_.on("mousedown.drag",h).filter(n).on("touchstart.drag",v).on("touchmove.drag",g,rX).on("touchend.drag touchcancel.drag",y).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(_,S){if(!(f||!e.call(this,_,S))){var b=x(this,t.call(this,_,S),_,S,"mouse");b&&($e(_.view).on("mousemove.drag",d,Ef).on("mouseup.drag",m,Ef),Rl(_.view),lb(_),u=!1,s=_.clientX,l=_.clientY,b("start",_))}}function d(_){if(Pl(_),!u){var S=_.clientX-s,b=_.clientY-l;u=S*S+b*b>c}i.mouse("drag",_)}function m(_){$e(_.view).on("mousemove.drag mouseup.drag",null),Nl(_.view,u),Pl(_),i.mouse("end",_)}function v(_,S){if(e.call(this,_,S)){var b=_.changedTouches,w=t.call(this,_,S),T=b.length,M,C;for(M=0;M>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?ub(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?ub(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Rxt.exec(e))?new ur(t[1],t[2],t[3],1):(t=Nxt.exec(e))?new ur(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=kxt.exec(e))?ub(t[1],t[2],t[3],t[4]):(t=Oxt.exec(e))?ub(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=zxt.exec(e))?fX(t[1],t[2]/100,t[3]/100,1):(t=Uxt.exec(e))?fX(t[1],t[2]/100,t[3]/100,t[4]):iX.hasOwnProperty(e)?sX(iX[e]):e==="transparent"?new ur(NaN,NaN,NaN,0):null}function sX(e){return new ur(e>>16&255,e>>8&255,e&255,1)}function ub(e,t,r,n){return n<=0&&(e=t=r=NaN),new ur(e,t,r,n)}function $m(e){return e instanceof go||(e=Hi(e)),e?(e=e.rgb(),new ur(e.r,e.g,e.b,e.opacity)):new ur}function hs(e,t,r,n){return arguments.length===1?$m(e):new ur(e,t,r,n??1)}function ur(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}ps(ur,hs,kl(go,{brighter(e){return e=e==null?Pf:Math.pow(Pf,e),new ur(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ol:Math.pow(Ol,e),new ur(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ur(Lf(this.r),Lf(this.g),Lf(this.b),cb(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:lX,formatHex:lX,formatHex8:Fxt,formatRgb:uX,toString:uX}));function lX(){return`#${If(this.r)}${If(this.g)}${If(this.b)}`}function Fxt(){return`#${If(this.r)}${If(this.g)}${If(this.b)}${If((isNaN(this.opacity)?1:this.opacity)*255)}`}function uX(){let e=cb(this.opacity);return`${e===1?"rgb(":"rgba("}${Lf(this.r)}, ${Lf(this.g)}, ${Lf(this.b)}${e===1?")":`, ${e})`}`}function cb(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Lf(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function If(e){return e=Lf(e),(e<16?"0":"")+e.toString(16)}function fX(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Aa(e,t,r,n)}function pX(e){if(e instanceof Aa)return new Aa(e.h,e.s,e.l,e.opacity);if(e instanceof go||(e=Hi(e)),!e)return new Aa;if(e instanceof Aa)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=NaN,s=a-i,l=(a+i)/2;return s?(t===a?o=(r-n)/s+(r0&&l<1?0:o,new Aa(o,s,l,e.opacity)}function ph(e,t,r,n){return arguments.length===1?pX(e):new Aa(e,t,r,n??1)}function Aa(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}ps(Aa,ph,kl(go,{brighter(e){return e=e==null?Pf:Math.pow(Pf,e),new Aa(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ol:Math.pow(Ol,e),new Aa(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new ur(WL(e>=240?e-240:e+120,i,n),WL(e,i,n),WL(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new Aa(cX(this.h),fb(this.s),fb(this.l),cb(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=cb(this.opacity);return`${e===1?"hsl(":"hsla("}${cX(this.h)}, ${fb(this.s)*100}%, ${fb(this.l)*100}%${e===1?")":`, ${e})`}`}}));function cX(e){return e=(e||0)%360,e<0?e+360:e}function fb(e){return Math.max(0,Math.min(1,e||0))}function WL(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}var pb=Math.PI/180,hb=180/Math.PI;var db=18,hX=.96422,dX=1,vX=.82521,mX=4/29,hh=6/29,gX=3*hh*hh,Gxt=hh*hh*hh;function yX(e){if(e instanceof Ca)return new Ca(e.l,e.a,e.b,e.opacity);if(e instanceof yo)return SX(e);e instanceof ur||(e=$m(e));var t=ZL(e.r),r=ZL(e.g),n=ZL(e.b),i=YL((.2225045*t+.7168786*r+.0606169*n)/dX),a,o;return t===r&&r===n?a=o=i:(a=YL((.4360747*t+.3850649*r+.1430804*n)/hX),o=YL((.0139322*t+.0971045*r+.7141733*n)/vX)),new Ca(116*i-16,500*(a-i),200*(i-o),e.opacity)}function xX(e,t){return new Ca(e,0,0,t??1)}function Rf(e,t,r,n){return arguments.length===1?yX(e):new Ca(e,t,r,n??1)}function Ca(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}ps(Ca,Rf,kl(go,{brighter(e){return new Ca(this.l+db*(e??1),this.a,this.b,this.opacity)},darker(e){return new Ca(this.l-db*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,r=isNaN(this.b)?e:e-this.b/200;return t=hX*XL(t),e=dX*XL(e),r=vX*XL(r),new ur(qL(3.1338561*t-1.6168667*e-.4906146*r),qL(-.9787684*t+1.9161415*e+.033454*r),qL(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}}));function YL(e){return e>Gxt?Math.pow(e,1/3):e/gX+mX}function XL(e){return e>hh?e*e*e:gX*(e-mX)}function qL(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function ZL(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function _X(e){if(e instanceof yo)return new yo(e.h,e.c,e.l,e.opacity);if(e instanceof Ca||(e=yX(e)),e.a===0&&e.b===0)return new yo(NaN,0=1?(r=1,t-1):Math.floor(r*t),i=e[n],a=e[n+1],o=n>0?e[n-1]:2*i-a,s=n()=>e;function CX(e,t){return function(r){return e+r*t}}function Wxt(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function zl(e,t){var r=t-e;return r?CX(e,r>180||r<-180?r-360*Math.round(r/360):r):vh(isNaN(e)?t:e)}function DX(e){return(e=+e)==1?Fe:function(t,r){return r-t?Wxt(t,r,e):vh(isNaN(t)?r:t)}}function Fe(e,t){var r=t-e;return r?CX(e,r):vh(isNaN(e)?t:e)}var Ul=function e(t){var r=DX(t);function n(i,a){var o=r((i=hs(i)).r,(a=hs(a)).r),s=r(i.g,a.g),l=r(i.b,a.b),u=Fe(i.opacity,a.opacity);return function(f){return i.r=o(f),i.g=s(f),i.b=l(f),i.opacity=u(f),i+""}}return n.gamma=e,n}(1);function EX(e){return function(t){var r=t.length,n=new Array(r),i=new Array(r),a=new Array(r),o,s;for(o=0;or&&(a=t.slice(r,a),s[o]?s[o]+=a:s[++o]=a),(n=n[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,l.push({i:o,x:Cr(n,i)})),r=JL.lastIndex;return r180?f+=360:f-u>180&&(u+=360),p.push({i:c.push(i(c)+"rotate(",null,n)-2,x:Cr(u,f)})):f&&c.push(i(c)+"rotate("+f+n)}function s(u,f,c,p){u!==f?p.push({i:c.push(i(c)+"skewX(",null,n)-2,x:Cr(u,f)}):f&&c.push(i(c)+"skewX("+f+n)}function l(u,f,c,p,h,d){if(u!==c||f!==p){var m=h.push(i(h)+"scale(",null,",",null,")");d.push({i:m-4,x:Cr(u,c)},{i:m-2,x:Cr(f,p)})}else(c!==1||p!==1)&&h.push(i(h)+"scale("+c+","+p+")")}return function(u,f){var c=[],p=[];return u=e(u),f=e(f),a(u.translateX,u.translateY,f.translateX,f.translateY,c,p),o(u.rotate,f.rotate,c,p),s(u.skewX,f.skewX,c,p),l(u.scaleX,u.scaleY,f.scaleX,f.scaleY,c,p),u=f=null,function(h){for(var d=-1,m=p.length,v;++d=0&&e._call.call(void 0,t),e=e._next;--yh}function ZX(){Of=(Db=rg.now())+Eb,yh=tg=0;try{iP()}finally{yh=0,Qxt(),Of=0}}function jxt(){var e=rg.now(),t=e-Db;t>KX&&(Eb-=t,Db=e)}function Qxt(){for(var e,t=Cb,r,n=1/0;t;)t._call?(n>t._time&&(n=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:Cb=r);eg=e,nP(n)}function nP(e){if(!yh){tg&&(tg=clearTimeout(tg));var t=e-Of;t>24?(e<1/0&&(tg=setTimeout(ZX,e-rg.now()-Eb)),Jm&&(Jm=clearInterval(Jm))):(Jm||(Db=rg.now(),Jm=setInterval(jxt,KX)),yh=1,$X(ZX))}}function ng(e,t,r){var n=new zf;return t=t==null?0:+t,n.restart(i=>{n.stop(),e(i+t)},t,r),n}function jX(e,t,r){var n=new zf,i=t;return t==null?(n.restart(e,t,r),n):(n._restart=n.restart,n.restart=function(a,o,s){o=+o,s=s==null?Bl():+s,n._restart(function l(u){u+=i,n._restart(l,i+=o,s),a(u)},o,s)},n.restart(e,t,r),n)}var Jxt=Gi("start","end","cancel","interrupt"),t1t=[],JX=0,Lb=1,Pb=2,Ib=3,QX=4,Rb=5,ig=6;function Fl(e,t,r,n,i,a){var o=e.__transition;if(!o)e.__transition={};else if(r in o)return;e1t(e,r,{name:t,index:n,group:i,on:Jxt,tween:t1t,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:JX})}function ag(e,t){var r=xr(e,t);if(r.state>JX)throw new Error("too late; already scheduled");return r}function Fr(e,t){var r=xr(e,t);if(r.state>Ib)throw new Error("too late; already running");return r}function xr(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function e1t(e,t,r){var n=e.__transition,i;n[t]=r,r.timer=Uf(a,0,r.time);function a(u){r.state=Lb,r.timer.restart(o,r.delay,r.time),r.delay<=u&&o(u-r.delay)}function o(u){var f,c,p,h;if(r.state!==Lb)return l();for(f in n)if(h=n[f],h.name===r.name){if(h.state===Ib)return ng(o);h.state===QX?(h.state=ig,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete n[f]):+fPb&&n.state=0&&(t=t.slice(0,r)),!t||t==="start"})}function b1t(e,t,r){var n,i,a=_1t(t)?ag:Fr;return function(){var o=a(this,e),s=o.on;s!==n&&(i=(n=s).copy()).on(t,r),o.on=i}}function fq(e,t){var r=this._id;return arguments.length<2?xr(this.node(),r).on.on(e):this.each(b1t(r,e,t))}function S1t(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function cq(){return this.on("end.remove",S1t(this._id))}function pq(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Ll(e));for(var n=this._groups,i=n.length,a=new Array(i),o=0;o+e;function wq(e){return e*e}function Tq(e){return e*(2-e)}function aP(e){return((e*=2)<=1?e*e:--e*(2-e)+1)/2}function Mq(e){return e*e*e}function Aq(e){return--e*e*e+1}function og(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var oP=3,Cq=function e(t){t=+t;function r(n){return Math.pow(n,t)}return r.exponent=e,r}(oP),Dq=function e(t){t=+t;function r(n){return 1-Math.pow(1-n,t)}return r.exponent=e,r}(oP),sP=function e(t){t=+t;function r(n){return((n*=2)<=1?Math.pow(n,t):2-Math.pow(2-n,t))/2}return r.exponent=e,r}(oP);var Eq=Math.PI,Iq=Eq/2;function Lq(e){return+e==1?1:1-Math.cos(e*Iq)}function Pq(e){return Math.sin(e*Iq)}function lP(e){return(1-Math.cos(Eq*e))/2}function xo(e){return(Math.pow(2,-10*e)-.0009765625)*1.0009775171065494}function Rq(e){return xo(1-+e)}function Nq(e){return 1-xo(e)}function uP(e){return((e*=2)<=1?xo(1-e):2-xo(e-1))/2}function kq(e){return 1-Math.sqrt(1-e*e)}function Oq(e){return Math.sqrt(1- --e*e)}function fP(e){return((e*=2)<=1?1-Math.sqrt(1-e*e):Math.sqrt(1-(e-=2)*e)+1)/2}var cP=.36363636363636365,k1t=6/11,O1t=8/11,z1t=3/4,U1t=9/11,V1t=10/11,B1t=15/16,F1t=21/22,G1t=63/64,zb=1/cP/cP;function zq(e){return 1-_h(1-e)}function _h(e){return(e=+e)Lb&&n.name===t)return new Gr([[e]],Y1t,t,+i)}return null}var Ub=e=>()=>e;function gP(e,{sourceEvent:t,target:r,selection:n,mode:i,dispatch:a}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},selection:{value:n,enumerable:!0,configurable:!0},mode:{value:i,enumerable:!0,configurable:!0},_:{value:a}})}function Yq(e){e.stopImmediatePropagation()}function Vb(e){e.preventDefault(),e.stopImmediatePropagation()}var Xq={name:"drag"},yP={name:"space"},Sh={name:"handle"},wh={name:"center"},{abs:qq,max:tn,min:en}=Math;function Zq(e){return[+e[0],+e[1]]}function _P(e){return[Zq(e[0]),Zq(e[1])]}var Bb={name:"x",handles:["w","e"].map(sg),input:function(e,t){return e==null?null:[[+e[0],t[0][1]],[+e[1],t[1][1]]]},output:function(e){return e&&[e[0][0],e[1][0]]}},Fb={name:"y",handles:["n","s"].map(sg),input:function(e,t){return e==null?null:[[t[0][0],+e[0]],[t[1][0],+e[1]]]},output:function(e){return e&&[e[0][1],e[1][1]]}},X1t={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(sg),input:function(e){return e==null?null:_P(e)},output:function(e){return e}},vs={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Kq={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},$q={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},q1t={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},Z1t={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function sg(e){return{type:e}}function K1t(e){return!e.ctrlKey&&!e.button}function $1t(){var e=this.ownerSVGElement||this;return e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]}function j1t(){return navigator.maxTouchPoints||"ontouchstart"in this}function xP(e){for(;!e.__brush;)if(!(e=e.parentNode))return;return e.__brush}function Q1t(e){return e[0][0]===e[1][0]||e[0][1]===e[1][1]}function jq(e){var t=e.__brush;return t?t.dim.output(t.selection):null}function Qq(){return bP(Bb)}function Jq(){return bP(Fb)}function tZ(){return bP(X1t)}function bP(e){var t=$1t,r=K1t,n=j1t,i=!0,a=Gi("start","brush","end"),o=6,s;function l(v){var g=v.property("__brush",m).selectAll(".overlay").data([sg("overlay")]);g.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",vs.overlay).merge(g).each(function(){var x=xP(this).extent;$e(this).attr("x",x[0][0]).attr("y",x[0][1]).attr("width",x[1][0]-x[0][0]).attr("height",x[1][1]-x[0][1])}),v.selectAll(".selection").data([sg("selection")]).enter().append("rect").attr("class","selection").attr("cursor",vs.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var y=v.selectAll(".handle").data(e.handles,function(x){return x.type});y.exit().remove(),y.enter().append("rect").attr("class",function(x){return"handle handle--"+x.type}).attr("cursor",function(x){return vs[x.type]}),v.each(u).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",p).filter(n).on("touchstart.brush",p).on("touchmove.brush",h).on("touchend.brush touchcancel.brush",d).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}l.move=function(v,g,y){v.tween?v.on("start.brush",function(x){f(this,arguments).beforestart().start(x)}).on("interrupt.brush end.brush",function(x){f(this,arguments).end(x)}).tween("brush",function(){var x=this,_=x.__brush,S=f(x,arguments),b=_.selection,w=e.input(typeof g=="function"?g.apply(this,arguments):g,_.extent),T=Jr(b,w);function M(C){_.selection=C===1&&w===null?null:T(C),u.call(x),S.brush()}return b!==null&&w!==null?M:M(1)}):v.each(function(){var x=this,_=arguments,S=x.__brush,b=e.input(typeof g=="function"?g.apply(x,_):g,S.extent),w=f(x,_).beforestart();Da(x),S.selection=b===null?null:b,u.call(x),w.start(y).brush(y).end(y)})},l.clear=function(v,g){l.move(v,null,g)};function u(){var v=$e(this),g=xP(this).selection;g?(v.selectAll(".selection").style("display",null).attr("x",g[0][0]).attr("y",g[0][1]).attr("width",g[1][0]-g[0][0]).attr("height",g[1][1]-g[0][1]),v.selectAll(".handle").style("display",null).attr("x",function(y){return y.type[y.type.length-1]==="e"?g[1][0]-o/2:g[0][0]-o/2}).attr("y",function(y){return y.type[0]==="s"?g[1][1]-o/2:g[0][1]-o/2}).attr("width",function(y){return y.type==="n"||y.type==="s"?g[1][0]-g[0][0]+o:o}).attr("height",function(y){return y.type==="e"||y.type==="w"?g[1][1]-g[0][1]+o:o})):v.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function f(v,g,y){var x=v.__brush.emitter;return x&&(!y||!x.clean)?x:new c(v,g,y)}function c(v,g,y){this.that=v,this.args=g,this.state=v.__brush,this.active=0,this.clean=y}c.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(v,g){return this.starting?(this.starting=!1,this.emit("start",v,g)):this.emit("brush",v),this},brush:function(v,g){return this.emit("brush",v,g),this},end:function(v,g){return--this.active===0&&(delete this.state.emitter,this.emit("end",v,g)),this},emit:function(v,g,y){var x=$e(this.that).datum();a.call(v,this.that,new gP(v,{sourceEvent:g,target:l,selection:e.output(this.state.selection),mode:y,dispatch:a}),x)}};function p(v){if(s&&!v.touches||!r.apply(this,arguments))return;var g=this,y=v.target.__data__.type,x=(i&&v.metaKey?y="overlay":y)==="selection"?Xq:i&&v.altKey?wh:Sh,_=e===Fb?null:q1t[y],S=e===Bb?null:Z1t[y],b=xP(g),w=b.extent,T=b.selection,M=w[0][0],C,A,P=w[0][1],L,I,E=w[1][0],R,k,O=w[1][1],z,U,G=0,Y=0,et,tt=_&&S&&i&&v.shiftKey,lt,Mt,ut=Array.from(v.touches||[v],Dt=>{let ve=Dt.identifier;return Dt=Ar(Dt,g),Dt.point0=Dt.slice(),Dt.identifier=ve,Dt});Da(g);var ct=f(g,arguments,!0).beforestart();if(y==="overlay"){T&&(et=!0);let Dt=[ut[0],ut[1]||ut[0]];b.selection=T=[[C=e===Fb?M:en(Dt[0][0],Dt[1][0]),L=e===Bb?P:en(Dt[0][1],Dt[1][1])],[R=e===Fb?E:tn(Dt[0][0],Dt[1][0]),z=e===Bb?O:tn(Dt[0][1],Dt[1][1])]],ut.length>1&&Gt(v)}else C=T[0][0],L=T[0][1],R=T[1][0],z=T[1][1];A=C,I=L,k=R,U=z;var K=$e(g).attr("pointer-events","none"),ot=K.selectAll(".overlay").attr("cursor",vs[y]);if(v.touches)ct.moved=W,ct.ended=Tt;else{var Q=$e(v.view).on("mousemove.brush",W,!0).on("mouseup.brush",Tt,!0);i&&Q.on("keydown.brush",te,!0).on("keyup.brush",Jt,!0),Rl(v.view)}u.call(g),ct.start(v,x.name);function W(Dt){for(let ve of Dt.changedTouches||[Dt])for(let ar of ut)ar.identifier===ve.identifier&&(ar.cur=Ar(ve,g));if(tt&&!lt&&!Mt&&ut.length===1){let ve=ut[0];qq(ve.cur[0]-ve[0])>qq(ve.cur[1]-ve[1])?Mt=!0:lt=!0}for(let ve of ut)ve.cur&&(ve[0]=ve.cur[0],ve[1]=ve.cur[1]);et=!0,Vb(Dt),Gt(Dt)}function Gt(Dt){let ve=ut[0],ar=ve.point0;var jn;switch(G=ve[0]-ar[0],Y=ve[1]-ar[1],x){case yP:case Xq:{_&&(G=tn(M-C,en(E-R,G)),A=C+G,k=R+G),S&&(Y=tn(P-L,en(O-z,Y)),I=L+Y,U=z+Y);break}case Sh:{ut[1]?(_&&(A=tn(M,en(E,ut[0][0])),k=tn(M,en(E,ut[1][0])),_=1),S&&(I=tn(P,en(O,ut[0][1])),U=tn(P,en(O,ut[1][1])),S=1)):(_<0?(G=tn(M-C,en(E-C,G)),A=C+G,k=R):_>0&&(G=tn(M-R,en(E-R,G)),A=C,k=R+G),S<0?(Y=tn(P-L,en(O-L,Y)),I=L+Y,U=z):S>0&&(Y=tn(P-z,en(O-z,Y)),I=L,U=z+Y));break}case wh:{_&&(A=tn(M,en(E,C-G*_)),k=tn(M,en(E,R+G*_))),S&&(I=tn(P,en(O,L-Y*S)),U=tn(P,en(O,z+Y*S)));break}}k0&&(C=A-G),S<0?z=U-Y:S>0&&(L=I-Y),x=yP,ot.attr("cursor",vs.selection),Gt(Dt));break}default:return}Vb(Dt)}function Jt(Dt){switch(Dt.keyCode){case 16:{tt&&(lt=Mt=tt=!1,Gt(Dt));break}case 18:{x===wh&&(_<0?R=k:_>0&&(C=A),S<0?z=U:S>0&&(L=I),x=Sh,Gt(Dt));break}case 32:{x===yP&&(Dt.altKey?(_&&(R=k-G*_,C=A+G*_),S&&(z=U-Y*S,L=I+Y*S),x=wh):(_<0?R=k:_>0&&(C=A),S<0?z=U:S>0&&(L=I),x=Sh),ot.attr("cursor",vs[y]),Gt(Dt));break}default:return}Vb(Dt)}}function h(v){f(this,arguments).moved(v)}function d(v){f(this,arguments).ended(v)}function m(){var v=this.__brush||{selection:null};return v.extent=_P(t.apply(this,arguments)),v.dim=e,v}return l.extent=function(v){return arguments.length?(t=typeof v=="function"?v:Ub(_P(v)),l):t},l.filter=function(v){return arguments.length?(r=typeof v=="function"?v:Ub(!!v),l):r},l.touchable=function(v){return arguments.length?(n=typeof v=="function"?v:Ub(!!v),l):n},l.handleSize=function(v){return arguments.length?(o=+v,l):o},l.keyModifiers=function(v){return arguments.length?(i=!!v,l):i},l.on=function(){var v=a.on.apply(a,arguments);return v===a?l:v},l}var SP=Math.abs,Vf=Math.cos,Bf=Math.sin,eZ=Math.PI,lg=eZ/2,wP=eZ*2,TP=Math.max,Gb=1e-12;function MP(e,t){return Array.from({length:t-e},(r,n)=>e+n)}function J1t(e){return function(t,r){return e(t.source.value+t.target.value,r.source.value+r.target.value)}}function rZ(){return AP(!1,!1)}function nZ(){return AP(!1,!0)}function iZ(){return AP(!0,!1)}function AP(e,t){var r=0,n=null,i=null,a=null;function o(s){var l=s.length,u=new Array(l),f=MP(0,l),c=new Array(l*l),p=new Array(l),h=0,d;s=Float64Array.from({length:l*l},t?(m,v)=>s[v%l][v/l|0]:(m,v)=>s[v/l|0][v%l]);for(let m=0;mn(u[v],u[g]));for(let v of f){let g=m;if(e){let y=MP(~l+1,l).filter(x=>x<0?s[~x*l+v]:s[v*l+x]);i&&y.sort((x,_)=>i(x<0?-s[~x*l+v]:s[v*l+x],_<0?-s[~_*l+v]:s[v*l+_]));for(let x of y)if(x<0){let _=c[~x*l+v]||(c[~x*l+v]={source:null,target:null});_.target={index:v,startAngle:m,endAngle:m+=s[~x*l+v]*h,value:s[~x*l+v]}}else{let _=c[v*l+x]||(c[v*l+x]={source:null,target:null});_.source={index:v,startAngle:m,endAngle:m+=s[v*l+x]*h,value:s[v*l+x]}}p[v]={index:v,startAngle:g,endAngle:m,value:u[v]}}else{let y=MP(0,l).filter(x=>s[v*l+x]||s[x*l+v]);i&&y.sort((x,_)=>i(s[v*l+x],s[v*l+_]));for(let x of y){let _;if(v=0))throw new Error(`invalid digits: ${e}`);if(t>15)return aZ;let r=10**t;return function(n){this._+=n[0];for(let i=1,a=n.length;iFf)if(!(Math.abs(c*l-u*f)>Ff)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let h=n-o,d=i-s,m=l*l+u*u,v=h*h+d*d,g=Math.sqrt(m),y=Math.sqrt(p),x=a*Math.tan((CP-Math.acos((m+p-v)/(2*g*y)))/2),_=x/y,S=x/g;Math.abs(_-1)>Ff&&this._append`L${t+_*f},${r+_*c}`,this._append`A${a},${a},0,0,${+(c*h>f*d)},${this._x1=t+S*l},${this._y1=r+S*u}`}}arc(t,r,n,i,a,o){if(t=+t,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let s=n*Math.cos(i),l=n*Math.sin(i),u=t+s,f=r+l,c=1^o,p=o?i-a:a-i;this._x1===null?this._append`M${u},${f}`:(Math.abs(this._x1-u)>Ff||Math.abs(this._y1-f)>Ff)&&this._append`L${u},${f}`,n&&(p<0&&(p=p%DP+DP),p>t_t?this._append`A${n},${n},0,1,${c},${t-s},${r-l}A${n},${n},0,1,${c},${this._x1=u},${this._y1=f}`:p>Ff&&this._append`A${n},${n},0,${+(p>=CP)},${c},${this._x1=t+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}};function ug(){return new ms}ug.prototype=ms.prototype;function oZ(e=3){return new ms(+e)}var sZ=Array.prototype.slice;function Gl(e){return function(){return e}}function r_t(e){return e.source}function n_t(e){return e.target}function lZ(e){return e.radius}function i_t(e){return e.startAngle}function a_t(e){return e.endAngle}function o_t(){return 0}function s_t(){return 10}function uZ(e){var t=r_t,r=n_t,n=lZ,i=lZ,a=i_t,o=a_t,s=o_t,l=null;function u(){var f,c=t.apply(this,arguments),p=r.apply(this,arguments),h=s.apply(this,arguments)/2,d=sZ.call(arguments),m=+n.apply(this,(d[0]=c,d)),v=a.apply(this,d)-lg,g=o.apply(this,d)-lg,y=+i.apply(this,(d[0]=p,d)),x=a.apply(this,d)-lg,_=o.apply(this,d)-lg;if(l||(l=f=ug()),h>Gb&&(SP(g-v)>h*2+Gb?g>v?(v+=h,g-=h):(v-=h,g+=h):v=g=(v+g)/2,SP(_-x)>h*2+Gb?_>x?(x+=h,_-=h):(x-=h,_+=h):x=_=(x+_)/2),l.moveTo(m*Vf(v),m*Bf(v)),l.arc(0,0,m,v,g),v!==x||g!==_)if(e){var S=+e.apply(this,arguments),b=y-S,w=(x+_)/2;l.quadraticCurveTo(0,0,b*Vf(x),b*Bf(x)),l.lineTo(y*Vf(w),y*Bf(w)),l.lineTo(b*Vf(_),b*Bf(_))}else l.quadraticCurveTo(0,0,y*Vf(x),y*Bf(x)),l.arc(0,0,y,x,_);if(l.quadraticCurveTo(0,0,m*Vf(v),m*Bf(v)),l.closePath(),f)return l=null,f+""||null}return e&&(u.headRadius=function(f){return arguments.length?(e=typeof f=="function"?f:Gl(+f),u):e}),u.radius=function(f){return arguments.length?(n=i=typeof f=="function"?f:Gl(+f),u):n},u.sourceRadius=function(f){return arguments.length?(n=typeof f=="function"?f:Gl(+f),u):n},u.targetRadius=function(f){return arguments.length?(i=typeof f=="function"?f:Gl(+f),u):i},u.startAngle=function(f){return arguments.length?(a=typeof f=="function"?f:Gl(+f),u):a},u.endAngle=function(f){return arguments.length?(o=typeof f=="function"?f:Gl(+f),u):o},u.padAngle=function(f){return arguments.length?(s=typeof f=="function"?f:Gl(+f),u):s},u.source=function(f){return arguments.length?(t=f,u):t},u.target=function(f){return arguments.length?(r=f,u):r},u.context=function(f){return arguments.length?(l=f??null,u):l},u}function fZ(){return uZ()}function cZ(){return uZ(s_t)}var l_t=Array.prototype,Hb=l_t.slice;function pZ(e,t){return e-t}function hZ(e){for(var t=0,r=e.length,n=e[r-1][1]*e[0][0]-e[r-1][0]*e[0][1];++t()=>e;function dZ(e,t){for(var r=-1,n=t.length,i;++rn!=h>n&&r<(p-u)*(n-f)/(h-f)+u&&(i=-i)}return i}function f_t(e,t,r){var n;return c_t(e,t,r)&&p_t(e[n=+(e[0]===t[0])],r[n],t[n])}function c_t(e,t,r){return(t[0]-e[0])*(r[1]-e[1])===(r[0]-e[0])*(t[1]-e[1])}function p_t(e,t,r){return e<=t&&t<=r||r<=t&&t<=e}function vZ(){}var gs=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function fg(){var e=1,t=1,r=Tf,n=l;function i(u){var f=r(u);if(Array.isArray(f))f=f.slice().sort(pZ);else{let c=ss(u,h_t);for(f=Xn(...wf(c[0],c[1],f),f);f[f.length-1]>=c[1];)f.pop();for(;f[1]a(u,c))}function a(u,f){let c=f==null?NaN:+f;if(isNaN(c))throw new Error(`invalid value: ${f}`);var p=[],h=[];return o(u,c,function(d){n(d,u,c),hZ(d)>0?p.push([d]):h.push(d)}),h.forEach(function(d){for(var m=0,v=p.length,g;m=f,gs[y<<2].forEach(_);++d0&&h0&&d=0&&c>=0))throw new Error("invalid size");return e=f,t=c,i},i.thresholds=function(u){return arguments.length?(r=typeof u=="function"?u:Array.isArray(u)?_o(Hb.call(u)):_o(u),i):r},i.smooth=function(u){return arguments.length?(n=u?l:vZ,i):n===l},i}function h_t(e){return isFinite(e)?e:NaN}function Gf(e,t){return e==null?!1:+e>=t}function EP(e){return e==null||isNaN(e=+e)?-1/0:e}function mZ(e,t,r,n){let i=n-t,a=r-t,o=isFinite(i)||isFinite(a)?i/a:Math.sign(i)/Math.sign(a);return isNaN(o)?e:e+o-.5}function d_t(e){return e[0]}function v_t(e){return e[1]}function m_t(){return 1}function gZ(){var e=d_t,t=v_t,r=m_t,n=960,i=500,a=20,o=2,s=a*3,l=n+s*2>>o,u=i+s*2>>o,f=_o(20);function c(y){var x=new Float32Array(l*u),_=Math.pow(2,-o),S=-1;for(let L of y){var b=(e(L,++S,y)+s)*_,w=(t(L,S,y)+s)*_,T=+r(L,S,y);if(T&&b>=0&&b=0&&wb*S))(x).map((b,w)=>(b.value=+_[w],h(b)))}p.contours=function(y){var x=c(y),_=fg().size([l,u]),S=Math.pow(2,2*o),b=w=>{w=+w;var T=h(_.contour(x,w*S));return T.value=w,T};return Object.defineProperty(b,"max",{get:()=>fs(x)/S}),b};function h(y){return y.coordinates.forEach(d),y}function d(y){y.forEach(m)}function m(y){y.forEach(v)}function v(y){y[0]=y[0]*Math.pow(2,o)-s,y[1]=y[1]*Math.pow(2,o)-s}function g(){return s=a*3,l=n+s*2>>o,u=i+s*2>>o,p}return p.x=function(y){return arguments.length?(e=typeof y=="function"?y:_o(+y),p):e},p.y=function(y){return arguments.length?(t=typeof y=="function"?y:_o(+y),p):t},p.weight=function(y){return arguments.length?(r=typeof y=="function"?y:_o(+y),p):r},p.size=function(y){if(!arguments.length)return[n,i];var x=+y[0],_=+y[1];if(!(x>=0&&_>=0))throw new Error("invalid size");return n=x,i=_,g()},p.cellSize=function(y){if(!arguments.length)return 1<=1))throw new Error("invalid cell size");return o=Math.floor(Math.log(y)/Math.LN2),g()},p.thresholds=function(y){return arguments.length?(f=typeof y=="function"?y:Array.isArray(y)?_o(Hb.call(y)):_o(y),p):f},p.bandwidth=function(y){if(!arguments.length)return Math.sqrt(a*(a+1));if(!((y=+y)>=0))throw new Error("invalid bandwidth");return a=(Math.sqrt(4*y*y+1)-1)/2,g()},p}var ue=11102230246251565e-32,fr=134217729,cg=(3+8*ue)*ue;function Hf(e,t,r,n,i){let a,o,s,l,u=t[0],f=n[0],c=0,p=0;f>u==f>-u?(a=u,u=t[++c]):(a=f,f=n[++p]);let h=0;if(cu==f>-u?(o=u+a,s=a-(o-u),u=t[++c]):(o=f+a,s=a-(o-f),f=n[++p]),a=o,s!==0&&(i[h++]=s);cu==f>-u?(o=a+u,l=o-a,s=a-(o-l)+(u-l),u=t[++c]):(o=a+f,l=o-a,s=a-(o-l)+(f-l),f=n[++p]),a=o,s!==0&&(i[h++]=s);for(;c=I||-L>=I||(c=e-M,s=e-(M+c)+(c-i),c=r-C,u=r-(C+c)+(c-i),c=t-A,l=t-(A+c)+(c-a),c=n-P,f=n-(P+c)+(c-a),s===0&&l===0&&u===0&&f===0)||(I=x_t*o+cg*Math.abs(L),L+=M*f+P*s-(A*u+C*l),L>=I||-L>=I))return L;_=s*P,p=fr*s,h=p-(p-s),d=s-h,p=fr*P,m=p-(p-P),v=P-m,S=d*v-(_-h*m-d*m-h*v),b=l*C,p=fr*l,h=p-(p-l),d=l-h,p=fr*C,m=p-(p-C),v=C-m,w=d*v-(b-h*m-d*m-h*v),g=S-w,c=S-g,gn[0]=S-(g+c)+(c-w),y=_+g,c=y-_,x=_-(y-c)+(g-c),g=x-b,c=x-g,gn[1]=x-(g+c)+(c-b),T=y+g,c=T-y,gn[2]=y-(T-c)+(g-c),gn[3]=T;let E=Hf(4,Th,4,gn,yZ);_=M*f,p=fr*M,h=p-(p-M),d=M-h,p=fr*f,m=p-(p-f),v=f-m,S=d*v-(_-h*m-d*m-h*v),b=A*u,p=fr*A,h=p-(p-A),d=A-h,p=fr*u,m=p-(p-u),v=u-m,w=d*v-(b-h*m-d*m-h*v),g=S-w,c=S-g,gn[0]=S-(g+c)+(c-w),y=_+g,c=y-_,x=_-(y-c)+(g-c),g=x-b,c=x-g,gn[1]=x-(g+c)+(c-b),T=y+g,c=T-y,gn[2]=y-(T-c)+(g-c),gn[3]=T;let R=Hf(E,yZ,4,gn,xZ);_=s*f,p=fr*s,h=p-(p-s),d=s-h,p=fr*f,m=p-(p-f),v=f-m,S=d*v-(_-h*m-d*m-h*v),b=l*u,p=fr*l,h=p-(p-l),d=l-h,p=fr*u,m=p-(p-u),v=u-m,w=d*v-(b-h*m-d*m-h*v),g=S-w,c=S-g,gn[0]=S-(g+c)+(c-w),y=_+g,c=y-_,x=_-(y-c)+(g-c),g=x-b,c=x-g,gn[1]=x-(g+c)+(c-b),T=y+g,c=T-y,gn[2]=y-(T-c)+(g-c),gn[3]=T;let k=Hf(R,xZ,4,gn,_Z);return _Z[k-1]}function Mh(e,t,r,n,i,a){let o=(t-a)*(r-i),s=(e-i)*(n-a),l=o-s,u=Math.abs(o+s);return Math.abs(l)>=g_t*u?l:-__t(e,t,r,n,i,a,u)}var Vye=(7+56*ue)*ue,Bye=(3+28*ue)*ue,Fye=(26+288*ue)*ue*ue,Gye=it(4),Hye=it(4),Wye=it(4),Yye=it(4),Xye=it(4),qye=it(4),Zye=it(4),Kye=it(4),$ye=it(4),jye=it(8),Qye=it(8),Jye=it(8),t0e=it(4),e0e=it(8),r0e=it(8),n0e=it(8),i0e=it(12),a0e=it(192),o0e=it(192);var u0e=(10+96*ue)*ue,f0e=(4+48*ue)*ue,c0e=(44+576*ue)*ue*ue,p0e=it(4),h0e=it(4),d0e=it(4),v0e=it(4),m0e=it(4),g0e=it(4),y0e=it(4),x0e=it(4),_0e=it(8),b0e=it(8),S0e=it(8),w0e=it(8),T0e=it(8),M0e=it(8),A0e=it(8),C0e=it(8),D0e=it(8),E0e=it(4),I0e=it(4),L0e=it(4),P0e=it(8),R0e=it(16),N0e=it(16),k0e=it(16),O0e=it(32),z0e=it(32),U0e=it(48),V0e=it(64),B0e=it(1152),F0e=it(1152);var Y0e=(16+224*ue)*ue,X0e=(5+72*ue)*ue,q0e=(71+1408*ue)*ue*ue,Z0e=it(4),K0e=it(4),$0e=it(4),j0e=it(4),Q0e=it(4),J0e=it(4),txe=it(4),exe=it(4),rxe=it(4),nxe=it(4),ixe=it(24),axe=it(24),oxe=it(24),sxe=it(24),lxe=it(24),uxe=it(24),fxe=it(24),cxe=it(24),pxe=it(24),hxe=it(24),dxe=it(1152),vxe=it(1152),mxe=it(1152),gxe=it(1152),yxe=it(1152),xxe=it(2304),_xe=it(2304),bxe=it(3456),Sxe=it(5760),wxe=it(8),Txe=it(8),Mxe=it(8),Axe=it(16),Cxe=it(24),Dxe=it(48),Exe=it(48),Ixe=it(96),Lxe=it(192),Pxe=it(384),Rxe=it(384),Nxe=it(384),kxe=it(768);var Oxe=it(96),zxe=it(96),Uxe=it(96),Vxe=it(1152);var SZ=Math.pow(2,-52),Wb=new Uint32Array(512),Ch=class e{static from(t,r=A_t,n=C_t){let i=t.length,a=new Float64Array(i*2);for(let o=0;o>1;if(r>0&&typeof t[0]!="number")throw new Error("Expected coords to contain numbers.");this.coords=t;let n=Math.max(2*r-5,0);this._triangles=new Uint32Array(n*3),this._halfedges=new Int32Array(n*3),this._hashSize=Math.ceil(Math.sqrt(r)),this._hullPrev=new Uint32Array(r),this._hullNext=new Uint32Array(r),this._hullTri=new Uint32Array(r),this._hullHash=new Int32Array(this._hashSize),this._ids=new Uint32Array(r),this._dists=new Float64Array(r),this.update()}update(){let{coords:t,_hullPrev:r,_hullNext:n,_hullTri:i,_hullHash:a}=this,o=t.length>>1,s=1/0,l=1/0,u=-1/0,f=-1/0;for(let M=0;Mu&&(u=C),A>f&&(f=A),this._ids[M]=M}let c=(s+u)/2,p=(l+f)/2,h,d,m;for(let M=0,C=1/0;M0&&(d=M,C=A)}let y=t[2*d],x=t[2*d+1],_=1/0;for(let M=0;MP&&(M[C++]=L,P=I)}this.hull=M.subarray(0,C),this.triangles=new Uint32Array(0),this.halfedges=new Uint32Array(0);return}if(Mh(v,g,y,x,S,b)<0){let M=d,C=y,A=x;d=m,y=S,x=b,m=M,S=C,b=A}let w=M_t(v,g,y,x,S,b);this._cx=w.x,this._cy=w.y;for(let M=0;M0&&Math.abs(L-C)<=SZ&&Math.abs(I-A)<=SZ||(C=L,A=I,P===h||P===d||P===m))continue;let E=0;for(let U=0,G=this._hashKey(L,I);U=0;)if(R=k,R===E){R=-1;break}if(R===-1)continue;let O=this._addTriangle(R,P,n[R],-1,-1,i[R]);i[P]=this._legalize(O+2),i[R]=O,T++;let z=n[R];for(;k=n[z],Mh(L,I,t[2*z],t[2*z+1],t[2*k],t[2*k+1])<0;)O=this._addTriangle(z,P,k,i[P],-1,i[z]),i[P]=this._legalize(O+2),n[z]=z,T--,z=k;if(R===E)for(;k=r[R],Mh(L,I,t[2*k],t[2*k+1],t[2*R],t[2*R+1])<0;)O=this._addTriangle(k,P,R,-1,i[R],i[k]),this._legalize(O+2),i[k]=O,n[R]=R,T--,R=k;this._hullStart=r[P]=R,n[R]=r[z]=P,n[P]=z,a[this._hashKey(L,I)]=P,a[this._hashKey(t[2*R],t[2*R+1])]=R}this.hull=new Uint32Array(T);for(let M=0,C=this._hullStart;M0?3-r:1+r)/4}function IP(e,t,r,n){let i=e-r,a=t-n;return i*i+a*a}function w_t(e,t,r,n,i,a,o,s){let l=e-o,u=t-s,f=r-o,c=n-s,p=i-o,h=a-s,d=l*l+u*u,m=f*f+c*c,v=p*p+h*h;return l*(c*v-m*h)-u*(f*v-m*p)+d*(f*h-c*p)<0}function T_t(e,t,r,n,i,a){let o=r-e,s=n-t,l=i-e,u=a-t,f=o*o+s*s,c=l*l+u*u,p=.5/(o*u-s*l),h=(u*f-s*c)*p,d=(o*c-l*f)*p;return h*h+d*d}function M_t(e,t,r,n,i,a){let o=r-e,s=n-t,l=i-e,u=a-t,f=o*o+s*s,c=l*l+u*u,p=.5/(o*u-s*l),h=e+(u*f-s*c)*p,d=t+(o*c-l*f)*p;return{x:h,y:d}}function Ah(e,t,r,n){if(n-r<=20)for(let i=r+1;i<=n;i++){let a=e[i],o=t[a],s=i-1;for(;s>=r&&t[e[s]]>o;)e[s+1]=e[s--];e[s+1]=a}else{let i=r+n>>1,a=r+1,o=n;hg(e,i,a),t[e[r]]>t[e[n]]&&hg(e,r,n),t[e[a]]>t[e[n]]&&hg(e,a,n),t[e[r]]>t[e[a]]&&hg(e,r,a);let s=e[a],l=t[s];for(;;){do a++;while(t[e[a]]l);if(o=o-r?(Ah(e,t,a,n),Ah(e,t,r,o-1)):(Ah(e,t,r,o-1),Ah(e,t,a,n))}}function hg(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}function A_t(e){return e[0]}function C_t(e){return e[1]}var Wi=class{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(t,r){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(t,r){this._+=`L${this._x1=+t},${this._y1=+r}`}arc(t,r,n){t=+t,r=+r,n=+n;let i=t+n,a=r;if(n<0)throw new Error("negative radius");this._x1===null?this._+=`M${i},${a}`:(Math.abs(this._x1-i)>1e-6||Math.abs(this._y1-a)>1e-6)&&(this._+="L"+i+","+a),n&&(this._+=`A${n},${n},0,1,1,${t-n},${r}A${n},${n},0,1,1,${this._x1=i},${this._y1=a}`)}rect(t,r,n,i){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${+n}v${+i}h${-n}Z`}value(){return this._||null}};var Hl=class{constructor(){this._=[]}moveTo(t,r){this._.push([t,r])}closePath(){this._.push(this._[0].slice())}lineTo(t,r){this._.push([t,r])}value(){return this._.length?this._:null}};var Wf=class{constructor(t,[r,n,i,a]=[0,0,960,500]){if(!((i=+i)>=(r=+r))||!((a=+a)>=(n=+n)))throw new Error("invalid bounds");this.delaunay=t,this._circumcenters=new Float64Array(t.points.length*2),this.vectors=new Float64Array(t.points.length*2),this.xmax=i,this.xmin=r,this.ymax=a,this.ymin=n,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){let{delaunay:{points:t,hull:r,triangles:n},vectors:i}=this,a,o,s=this.circumcenters=this._circumcenters.subarray(0,n.length/3*2);for(let m=0,v=0,g=n.length,y,x;m1;)a-=2;for(let o=2;o0){if(r>=this.ymax)return null;(o=(this.ymax-r)/i)0){if(t>=this.xmax)return null;(o=(this.xmax-t)/n)this.xmax?2:0)|(rthis.ymax?8:0)}_simplify(t){if(t&&t.length>4){for(let r=0;r1e-10)return!1}return!0}function P_t(e,t,r){return[e+Math.sin(e+t)*r,t+Math.cos(e-t)*r]}var dg=class e{static from(t,r=E_t,n=I_t,i){return new e("length"in t?R_t(t,r,n,i):Float64Array.from(N_t(t,r,n,i)))}constructor(t){this._delaunator=new Ch(t),this.inedges=new Int32Array(t.length/2),this._hullIndex=new Int32Array(t.length/2),this.points=this._delaunator.coords,this._init()}update(){return this._delaunator.update(),this._init(),this}_init(){let t=this._delaunator,r=this.points;if(t.hull&&t.hull.length>2&&L_t(t)){this.collinear=Int32Array.from({length:r.length/2},(p,h)=>h).sort((p,h)=>r[2*p]-r[2*h]||r[2*p+1]-r[2*h+1]);let l=this.collinear[0],u=this.collinear[this.collinear.length-1],f=[r[2*l],r[2*l+1],r[2*u],r[2*u+1]],c=1e-8*Math.hypot(f[3]-f[1],f[2]-f[0]);for(let p=0,h=r.length/2;p0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=i[0],o[i[0]]=1,i.length===2&&(o[i[1]]=0,this.triangles[1]=i[1],this.triangles[2]=i[1]))}voronoi(t){return new Wf(this,t)}*neighbors(t){let{inedges:r,hull:n,_hullIndex:i,halfedges:a,triangles:o,collinear:s}=this;if(s){let c=s.indexOf(t);c>0&&(yield s[c-1]),c=0&&a!==n&&a!==i;)n=a;return a}_step(t,r,n){let{inedges:i,hull:a,_hullIndex:o,halfedges:s,triangles:l,points:u}=this;if(i[t]===-1||!u.length)return(t+1)%(u.length>>1);let f=t,c=Dh(r-u[t*2],2)+Dh(n-u[t*2+1],2),p=i[t],h=p;do{let d=l[h],m=Dh(r-u[d*2],2)+Dh(n-u[d*2+1],2);if(m9999?"+"+qn(e,6):qn(e,4)}function z_t(e){var t=e.getUTCHours(),r=e.getUTCMinutes(),n=e.getUTCSeconds(),i=e.getUTCMilliseconds();return isNaN(e)?"Invalid Date":O_t(e.getUTCFullYear(),4)+"-"+qn(e.getUTCMonth()+1,2)+"-"+qn(e.getUTCDate(),2)+(i?"T"+qn(t,2)+":"+qn(r,2)+":"+qn(n,2)+"."+qn(i,3)+"Z":n?"T"+qn(t,2)+":"+qn(r,2)+":"+qn(n,2)+"Z":r||t?"T"+qn(t,2)+":"+qn(r,2)+"Z":"")}function Wl(e){var t=new RegExp('["'+e+` -\r]`),r=e.charCodeAt(0);function n(c,p){var h,d,m=i(c,function(v,g){if(h)return h(v,g-1);d=v,h=p?k_t(v,p):MZ(v)});return m.columns=d||[],m}function i(c,p){var h=[],d=c.length,m=0,v=0,g,y=d<=0,x=!1;c.charCodeAt(d-1)===vg&&--d,c.charCodeAt(d-1)===RP&&--d;function _(){if(y)return LP;if(x)return x=!1,wZ;var b,w=m,T;if(c.charCodeAt(w)===PP){for(;m++=d?y=!0:(T=c.charCodeAt(m++))===vg?x=!0:T===RP&&(x=!0,c.charCodeAt(m)===vg&&++m),c.slice(w+1,b-1).replace(/""/g,'"')}for(;m",g=c.join(v);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(r,u)?this._updatePosition(s,h,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,g,u,Math.random()+"",o[0],o[1],h,null,p)})},t.prototype._showSeriesItemTooltip=function(r,n,i){var a=this._ecModel,o=ht(n),s=o.seriesIndex,l=a.getSeriesByIndex(s),u=o.dataModel||l,f=o.dataIndex,c=o.dataType,p=u.getData(c),h=this._renderMode,d=r.positionDefault,m=gm([p.getItemModel(f),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,d?{position:d}:null),v=m.get("trigger");if(!(v!=null&&v!=="item")){var g=u.getDataParams(f,c),y=new ux;g.marker=y.makeTooltipMarker("item",ua(g.color),h);var x=mM(u.formatTooltip(f,!1,c)),_=m.get("order"),S=m.get("valueFormatter"),b=x.frag,w=b?wM(S?V({valueFormatter:S},b):b,y,h,_,a.get("useUTC"),m.get("textStyle")):x.text,T="item_"+u.name+"_"+f;this._showOrMove(m,function(){this._showTooltipContent(m,w,g,T,r.offsetX,r.offsetY,r.position,r.target,y)}),i({type:"showTip",dataIndexInside:f,dataIndex:p.getRawIndex(f),seriesIndex:s,from:this.uid})}},t.prototype._showComponentItemTooltip=function(r,n,i){var a=ht(n),o=a.tooltipConfig,s=o.option||{};if(H(s)){var l=s;s={content:l,formatter:l}}var u=[s],f=this._ecModel.getComponent(a.componentMainType,a.componentIndex);f&&u.push(f),u.push({formatter:s.content});var c=r.positionDefault,p=gm(u,this._tooltipModel,c?{position:c}:null),h=p.get("content"),d=Math.random()+"",m=new ux;this._showOrMove(p,function(){var v=at(p.get("formatterParams")||{});this._showTooltipContent(p,h,v,d,r.offsetX,r.offsetY,r.position,n,m)}),i({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(r,n,i,a,o,s,l,u,f){if(this._ticket="",!(!r.get("showContent")||!r.get("show"))){var c=this._tooltipContent;c.setEnterable(r.get("enterable"));var p=r.get("formatter");l=l||r.get("position");var h=n,d=this._getNearestPoint([o,s],i,r.get("trigger"),r.get("borderColor")),m=d.color;if(p)if(H(p)){var v=r.ecModel.get("useUTC"),g=B(i)?i[0]:i,y=g&&g.axisType&&g.axisType.indexOf("time")>=0;h=p,y&&(h=Yu(g.axisValue,h,v)),h=H0(h,i,!0)}else if(j(p)){var x=Z(function(_,S){_===this._ticket&&(c.setContent(S,f,r,m,l),this._updatePosition(r,l,o,s,c,i,u))},this);this._ticket=a,h=p(i,a,x)}else h=p;c.setContent(h,f,r,m,l),c.show(r,m),this._updatePosition(r,l,o,s,c,i,u)}},t.prototype._getNearestPoint=function(r,n,i,a){if(i==="axis"||B(n))return{color:a||(this._renderMode==="html"?"#fff":"none")};if(!B(n))return{color:a||n.color||n.borderColor}},t.prototype._updatePosition=function(r,n,i,a,o,s,l){var u=this._api.getWidth(),f=this._api.getHeight();n=n||r.get("position");var c=o.getSize(),p=r.get("align"),h=r.get("verticalAlign"),d=l&&l.getBoundingRect().clone();if(l&&d.applyTransform(l.transform),j(n)&&(n=n([i,a],s,o.el,d,{viewSize:[u,f],contentSize:c.slice()})),B(n))i=q(n[0],u),a=q(n[1],f);else if(rt(n)){var m=n;m.width=c[0],m.height=c[1];var v=re(m,{width:u,height:f});i=v.x,a=v.y,p=null,h=null}else if(H(n)&&l){var g=rgt(n,d,c,r.get("borderWidth"));i=g[0],a=g[1]}else{var g=tgt(i,a,o,u,f,p?null:20,h?null:20);i=g[0],a=g[1]}if(p&&(i-=OG(p)?c[0]/2:p==="right"?c[0]:0),h&&(a-=OG(h)?c[1]/2:h==="bottom"?c[1]:0),w_(r)){var g=egt(i,a,o,u,f);i=g[0],a=g[1]}o.moveTo(i,a)},t.prototype._updateContentNotChangedOnAxis=function(r,n){var i=this._lastDataByCoordSys,a=this._cbParamsList,o=!!i&&i.length===r.length;return o&&D(i,function(s,l){var u=s.dataByAxis||[],f=r[l]||{},c=f.dataByAxis||[];o=o&&u.length===c.length,o&&D(u,function(p,h){var d=c[h]||{},m=p.seriesDataIndices||[],v=d.seriesDataIndices||[];o=o&&p.value===d.value&&p.axisType===d.axisType&&p.axisId===d.axisId&&m.length===v.length,o&&D(m,function(g,y){var x=v[y];o=o&&g.seriesIndex===x.seriesIndex&&g.dataIndex===x.dataIndex}),a&&D(p.seriesDataIndices,function(g){var y=g.seriesIndex,x=n[y],_=a[y];x&&_&&_.data!==x.data&&(o=!1)})})}),this._lastDataByCoordSys=r,this._cbParamsList=n,!!o},t.prototype._hide=function(r){this._lastDataByCoordSys=null,r({type:"hideTip",from:this.uid})},t.prototype.dispose=function(r,n){Ot.node||!n.getDom()||(Qo(this,"_updatePosition"),this._tooltipContent.dispose(),hm("itemTooltip",n))},t.type="tooltip",t}(Xt);function gm(e,t,r){var n=t.ecModel,i;r?(i=new Ht(r,n,n),i=new Ht(t.option,i,n)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof Ht&&(o=o.get("tooltip",!0)),H(o)&&(o={formatter:o}),o&&(i=new Ht(o,i,n)))}return i}function kG(e,t){return e.dispatchAction||Z(t.dispatchAction,t)}function tgt(e,t,r,n,i,a,o){var s=r.getSize(),l=s[0],u=s[1];return a!=null&&(e+l+a+2>n?e-=l+a:e+=a),o!=null&&(t+u+o>i?t-=u+o:t+=o),[e,t]}function egt(e,t,r,n,i){var a=r.getSize(),o=a[0],s=a[1];return e=Math.min(e+o,n)-o,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function rgt(e,t,r,n){var i=r[0],a=r[1],o=Math.ceil(Math.SQRT2*n)+8,s=0,l=0,u=t.width,f=t.height;switch(e){case"inside":s=t.x+u/2-i/2,l=t.y+f/2-a/2;break;case"top":s=t.x+u/2-i/2,l=t.y-a-o;break;case"bottom":s=t.x+u/2-i/2,l=t.y+f+o;break;case"left":s=t.x-i-o,l=t.y+f/2-a/2;break;case"right":s=t.x+u+o,l=t.y+f/2-a/2}return[s,l]}function OG(e){return e==="center"||e==="middle"}function ngt(e,t,r){var n=kd(e).queryOptionMap,i=n.keys()[0];if(!(!i||i==="series")){var a=Vs(t,i,n.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),o=a.models[0];if(o){var s=r.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var f=ht(u).tooltipConfig;if(f&&f.name===e.name)return l=u,!0}),l)return{componentMainType:i,componentIndex:o.componentIndex,el:l}}}}var zG=Jmt;function dI(e){Nt(wa),e.registerComponentModel(MG),e.registerComponentView(zG),e.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},ce),e.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},ce)}var igt=["rect","polygon","keep","clear"];function vI(e,t){var r=Yt(e?e.brush:[]);if(r.length){var n=[];D(r,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(n=n.concat(u))});var i=e&&e.toolbox;B(i)&&(i=i[0]),i||(i={feature:{}},e.toolbox=[i]);var a=i.feature||(i.feature={}),o=a.brush||(a.brush={}),s=o.type||(o.type=[]);s.push.apply(s,n),agt(s),t&&!s.length&&s.push.apply(s,igt)}}function agt(e){var t={};D(e,function(r){t[r]=1}),e.length=0,D(t,function(r,n){e.push(n)})}var UG=D;function VG(e){if(e){for(var t in e)if(e.hasOwnProperty(t))return!0}}function ym(e,t,r){var n={};return UG(t,function(a){var o=n[a]=i();UG(e[a],function(s,l){if(Be.isValidType(l)){var u={type:l,visual:s};r&&r(u,a),o[l]=new Be(u),l==="opacity"&&(u=at(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new Be(u))}})}),n;function i(){var a=function(){};a.prototype.__hidden=a.prototype;var o=new a;return o}}function T_(e,t,r){var n;D(r,function(i){t.hasOwnProperty(i)&&VG(t[i])&&(n=!0)}),n&&D(r,function(i){t.hasOwnProperty(i)&&VG(t[i])?e[i]=at(t[i]):delete e[i]})}function BG(e,t,r,n,i,a){var o={};D(e,function(c){var p=Be.prepareVisualTypes(t[c]);o[c]=p});var s;function l(c){return _v(r,s,c)}function u(c,p){IM(r,s,c,p)}a==null?r.each(f):r.each([a],f);function f(c,p){s=a==null?c:p;var h=r.getRawDataItem(s);if(!(h&&h.visualMap===!1))for(var d=n.call(i,c),m=t[d],v=o[d],g=0,y=v.length;gt[0][1]&&(t[0][1]=a[0]),a[1]t[1][1]&&(t[1][1]=a[1])}return t&&qG(t)}};function qG(e){return new dt(e[0][0],e[1][0],e[0][1]-e[0][0],e[1][1]-e[1][0])}var fgt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r,n){this.ecModel=r,this.api=n,this.model,(this._brushController=new Up(n.getZr())).on("brush",Z(this._onBrush,this)).mount()},t.prototype.render=function(r,n,i,a){this.model=r,this._updateController(r,n,i,a)},t.prototype.updateTransform=function(r,n,i,a){yI(n),this._updateController(r,n,i,a)},t.prototype.updateVisual=function(r,n,i,a){this.updateTransform(r,n,i,a)},t.prototype.updateView=function(r,n,i,a){this._updateController(r,n,i,a)},t.prototype._updateController=function(r,n,i,a){(!a||a.$from!==r.id)&&this._brushController.setPanels(r.brushTargetManager.makePanelOpts(i)).enableBrush(r.brushOption).updateCovers(r.areas.slice())},t.prototype.dispose=function(){this._brushController.dispose()},t.prototype._onBrush=function(r){var n=this.model.id,i=this.model.brushTargetManager.setOutputRanges(r.areas,this.ecModel);(!r.isEnd||r.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:n,areas:at(i),$from:n}),r.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:n,areas:at(i),$from:n})},t.type="brush",t}(Xt),ZG=fgt;var cgt="#ddd",pgt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.areas=[],r.brushOption={},r}return t.prototype.optionUpdated=function(r,n){var i=this.option;!n&&T_(i,r,["inBrush","outOfBrush"]);var a=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:cgt},a.hasOwnProperty("liftZ")||(a.liftZ=5)},t.prototype.setAreas=function(r){r&&(this.areas=F(r,function(n){return KG(this.option,n)},this))},t.prototype.setBrushOption=function(r){this.brushOption=KG(this.option,r),this.brushType=this.brushOption.brushType},t.type="brush",t.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],t.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},t}(Pt);function KG(e,t){return _t({brushType:e.brushType,brushMode:e.brushMode,transformable:e.transformable,brushStyle:new Ht(e.brushStyle).getItemStyle(),removeOnClick:e.removeOnClick,z:e.z},t,!0)}var $G=pgt;var hgt=["rect","polygon","lineX","lineY","keep","clear"],dgt=function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(r,n,i){var a,o,s;n.eachComponent({mainType:"brush"},function(l){a=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=a,this._brushMode=o,D(r.get("type",!0),function(l){r.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===a)?"emphasis":"normal")})},t.prototype.updateView=function(r,n,i){this.render(r,n,i)},t.prototype.getIcons=function(){var r=this.model,n=r.get("icon",!0),i={};return D(r.get("type",!0),function(a){n[a]&&(i[a]=n[a])}),i},t.prototype.onclick=function(r,n,i){var a=this._brushType,o=this._brushMode;i==="clear"?(n.dispatchAction({type:"axisAreaSelect",intervals:[]}),n.dispatchAction({type:"brush",command:"clear",areas:[]})):n.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:i==="keep"?a:a===i?!1:i,brushMode:i==="keep"?o==="multiple"?"single":"multiple":o}})},t.getDefaultOption=function(r){var n={show:!0,type:hgt.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:r.getLocaleModel().get(["toolbox","brush","title"])};return n},t}(yr),jG=dgt;function _I(e){e.registerComponentView(ZG),e.registerComponentModel($G),e.registerPreprocessor(vI),e.registerVisual(e.PRIORITY.VISUAL.BRUSH,xI),e.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(t,r){r.eachComponent({mainType:"brush",query:t},function(n){n.setAreas(t.areas)})}),e.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},ce),e.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},ce),Sl("brush",jG)}var vgt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.layoutMode={type:"box",ignoreSize:!0},r}return t.type="title",t.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},t}(Pt),mgt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){if(this.group.removeAll(),!!r.get("show")){var a=this.group,o=r.getModel("textStyle"),s=r.getModel("subtextStyle"),l=r.get("textAlign"),u=bt(r.get("textBaseline"),r.get("textVerticalAlign")),f=new Lt({style:Qt(o,{text:r.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),c=f.getBoundingRect(),p=r.get("subtext"),h=new Lt({style:Qt(s,{text:p,fill:s.getTextColor(),y:c.height+r.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),d=r.get("link"),m=r.get("sublink"),v=r.get("triggerEvent",!0);f.silent=!d&&!v,h.silent=!m&&!v,d&&f.on("click",function(){Xu(d,"_"+r.get("target"))}),m&&h.on("click",function(){Xu(m,"_"+r.get("subtarget"))}),ht(f).eventData=ht(h).eventData=v?{componentType:"title",componentIndex:r.componentIndex}:null,a.add(f),p&&a.add(h);var g=a.getBoundingRect(),y=r.getBoxLayoutParams();y.width=g.width,y.height=g.height;var x=re(y,{width:i.getWidth(),height:i.getHeight()},r.get("padding"));l||(l=r.get("left")||r.get("right"),l==="middle"&&(l="center"),l==="right"?x.x+=x.width:l==="center"&&(x.x+=x.width/2)),u||(u=r.get("top")||r.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?x.y+=x.height:u==="middle"&&(x.y+=x.height/2),u=u||"top"),a.x=x.x,a.y=x.y,a.markRedraw();var _={align:l,verticalAlign:u};f.setStyle(_),h.setStyle(_),g=a.getBoundingRect();var S=x.margin,b=r.getItemStyle(["color","opacity"]);b.fill=r.get("backgroundColor");var w=new At({shape:{x:g.x-S[3],y:g.y-S[0],width:g.width+S[1]+S[3],height:g.height+S[0]+S[2],r:r.get("borderRadius")},style:b,subPixelOptimize:!0,silent:!0});a.add(w)}},t.type="title",t}(Xt);function bI(e){e.registerComponentModel(vgt),e.registerComponentView(mgt)}var ggt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.layoutMode="box",r}return t.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i),this._initData()},t.prototype.mergeOption=function(r){e.prototype.mergeOption.apply(this,arguments),this._initData()},t.prototype.setCurrentIndex=function(r){r==null&&(r=this.option.currentIndex);var n=this._data.count();this.option.loop?r=(r%n+n)%n:(r>=n&&(r=n-1),r<0&&(r=0)),this.option.currentIndex=r},t.prototype.getCurrentIndex=function(){return this.option.currentIndex},t.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},t.prototype.setPlayState=function(r){this.option.autoPlay=!!r},t.prototype.getPlayState=function(){return!!this.option.autoPlay},t.prototype._initData=function(){var r=this.option,n=r.data||[],i=r.axisType,a=this._names=[],o;i==="category"?(o=[],D(n,function(u,f){var c=Te(ra(u),""),p;rt(u)?(p=at(u),p.value=f):p=f,o.push(p),a.push(c)})):o=n;var s={category:"ordinal",time:"time",value:"number"}[i]||"number",l=this._data=new Ne([{name:"value",type:s}],this);l.initData(o,a)},t.prototype.getData=function(){return this._data},t.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},t.type="timeline",t.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},t}(Pt),SI=ggt;var QG=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="timeline.slider",t.defaultOption=Kr(SI.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),t}(SI);ie(QG,up.prototype);var JG=QG;var ygt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="timeline",t}(Xt),tH=ygt;var xgt=function(e){N(t,e);function t(r,n,i,a){var o=e.call(this,r,n,i)||this;return o.type=a||"value",o}return t.prototype.getLabelModel=function(){return this.model.getModel("label")},t.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},t}(Mr),eH=xgt;var wI=Math.PI,rH=yt(),_gt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r,n){this.api=n},t.prototype.render=function(r,n,i){if(this.model=r,this.api=i,this.ecModel=n,this.group.removeAll(),r.get("show",!0)){var a=this._layout(r,i),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(a,r);r.formatTooltip=function(u){var f=l.scale.getLabel({value:u});return xe("nameValue",{noName:!0,value:f})},D(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](a,o,l,r)},this),this._renderAxisLabel(a,s,l,r),this._position(a,r)}this._doPlayStop(),this._updateTicksStatus()},t.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},t.prototype.dispose=function(){this._clearTimer()},t.prototype._layout=function(r,n){var i=r.get(["label","position"]),a=r.get("orient"),o=Sgt(r,n),s;i==null||i==="auto"?s=a==="horizontal"?o.y+o.height/2=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},f={horizontal:0,vertical:wI/2},c=a==="vertical"?o.height:o.width,p=r.getModel("controlStyle"),h=p.get("show",!0),d=h?p.get("itemSize"):0,m=h?p.get("itemGap"):0,v=d+m,g=r.get(["label","rotate"])||0;g=g*wI/180;var y,x,_,S=p.get("position",!0),b=h&&p.get("showPlayBtn",!0),w=h&&p.get("showPrevBtn",!0),T=h&&p.get("showNextBtn",!0),M=0,C=c;S==="left"||S==="bottom"?(b&&(y=[0,0],M+=v),w&&(x=[M,0],M+=v),T&&(_=[C-d,0],C-=v)):(b&&(y=[C-d,0],C-=v),w&&(x=[0,0],M+=v),T&&(_=[C-d,0],C-=v));var A=[M,C];return r.get("inverse")&&A.reverse(),{viewRect:o,mainLength:c,orient:a,rotation:f[a],labelRotation:g,labelPosOpt:s,labelAlign:r.get(["label","align"])||l[a],labelBaseline:r.get(["label","verticalAlign"])||r.get(["label","baseline"])||u[a],playPosition:y,prevBtnPosition:x,nextBtnPosition:_,axisExtent:A,controlSize:d,controlGap:m}},t.prototype._position=function(r,n){var i=this._mainGroup,a=this._labelGroup,o=r.viewRect;if(r.orient==="vertical"){var s=tr(),l=o.x,u=o.y+o.height;Nr(s,s,[-l,-u]),Cn(s,s,-wI/2),Nr(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var f=y(o),c=y(i.getBoundingRect()),p=y(a.getBoundingRect()),h=[i.x,i.y],d=[a.x,a.y];d[0]=h[0]=f[0][0];var m=r.labelPosOpt;if(m==null||H(m)){var v=m==="+"?0:1;x(h,c,f,1,v),x(d,p,f,1,1-v)}else{var v=m>=0?0:1;x(h,c,f,1,v),d[1]=h[1]+m}i.setPosition(h),a.setPosition(d),i.rotation=a.rotation=r.rotation,g(i),g(a);function g(_){_.originX=f[0][0]-_.x,_.originY=f[1][0]-_.y}function y(_){return[[_.x,_.x+_.width],[_.y,_.y+_.height]]}function x(_,S,b,w,T){_[w]+=b[w][T]-S[w][T]}},t.prototype._createAxis=function(r,n){var i=n.getData(),a=n.get("axisType"),o=bgt(n,a);o.getTicks=function(){return i.mapArray(["value"],function(u){return{value:u}})};var s=i.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new eH("value",o,r.axisExtent,a);return l.model=n,l},t.prototype._createGroup=function(r){var n=this[r]=new nt;return this.group.add(n),n},t.prototype._renderAxisLine=function(r,n,i,a){var o=i.getExtent();if(a.get(["lineStyle","show"])){var s=new De({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:V({lineCap:"round"},a.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});n.add(s);var l=this._progressLine=new De({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:J({lineCap:"round",lineWidth:s.style.lineWidth},a.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});n.add(l)}},t.prototype._renderAxisTick=function(r,n,i,a){var o=this,s=a.getData(),l=i.scale.getTicks();this._tickSymbols=[],D(l,function(u){var f=i.dataToCoord(u.value),c=s.getItemModel(u.value),p=c.getModel("itemStyle"),h=c.getModel(["emphasis","itemStyle"]),d=c.getModel(["progress","itemStyle"]),m={x:f,y:0,onclick:Z(o._changeTimeline,o,u.value)},v=nH(c,p,n,m);v.ensureState("emphasis").style=h.getItemStyle(),v.ensureState("progress").style=d.getItemStyle(),Za(v);var g=ht(v);c.get("tooltip")?(g.dataIndex=u.value,g.dataModel=a):g.dataIndex=g.dataModel=null,o._tickSymbols.push(v)})},t.prototype._renderAxisLabel=function(r,n,i,a){var o=this,s=i.getLabelModel();if(s.get("show")){var l=a.getData(),u=i.getViewLabels();this._tickLabels=[],D(u,function(f){var c=f.tickValue,p=l.getItemModel(c),h=p.getModel("label"),d=p.getModel(["emphasis","label"]),m=p.getModel(["progress","label"]),v=i.dataToCoord(f.tickValue),g=new Lt({x:v,y:0,rotation:r.labelRotation-r.rotation,onclick:Z(o._changeTimeline,o,c),silent:!1,style:Qt(h,{text:f.formattedLabel,align:r.labelAlign,verticalAlign:r.labelBaseline})});g.ensureState("emphasis").style=Qt(d),g.ensureState("progress").style=Qt(m),n.add(g),Za(g),rH(g).dataIndex=c,o._tickLabels.push(g)})}},t.prototype._renderControl=function(r,n,i,a){var o=r.controlSize,s=r.rotation,l=a.getModel("controlStyle").getItemStyle(),u=a.getModel(["emphasis","controlStyle"]).getItemStyle(),f=a.getPlayState(),c=a.get("inverse",!0);p(r.nextBtnPosition,"next",Z(this._changeTimeline,this,c?"-":"+")),p(r.prevBtnPosition,"prev",Z(this._changeTimeline,this,c?"+":"-")),p(r.playPosition,f?"stop":"play",Z(this._handlePlayClick,this,!f),!0);function p(h,d,m,v){if(h){var g=kr(bt(a.get(["controlStyle",d+"BtnSize"]),o),o),y=[0,-g/2,g,g],x=wgt(a,d+"Icon",y,{x:h[0],y:h[1],originX:o/2,originY:0,rotation:v?-s:0,rectHover:!0,style:l,onclick:m});x.ensureState("emphasis").style=u,n.add(x),Za(x)}}},t.prototype._renderCurrentPointer=function(r,n,i,a){var o=a.getData(),s=a.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,f={onCreate:function(c){c.draggable=!0,c.drift=Z(u._handlePointerDrag,u),c.ondragend=Z(u._handlePointerDragend,u),iH(c,u._progressLine,s,i,a,!0)},onUpdate:function(c){iH(c,u._progressLine,s,i,a)}};this._currentPointer=nH(l,l,this._mainGroup,{},this._currentPointer,f)},t.prototype._handlePlayClick=function(r){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:r,from:this.uid})},t.prototype._handlePointerDrag=function(r,n,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},t.prototype._handlePointerDragend=function(r){this._pointerChangeTimeline([r.offsetX,r.offsetY],!0)},t.prototype._pointerChangeTimeline=function(r,n){var i=this._toAxisCoord(r)[0],a=this._axis,o=sr(a.getExtent().slice());i>o[1]&&(i=o[1]),i=0&&(o[a]=+o[a].toFixed(p)),[o,c]}var AI={min:pt(D_,"min"),max:pt(D_,"max"),average:pt(D_,"average"),median:pt(D_,"median")};function Tl(e,t){if(t){var r=e.getData(),n=e.coordinateSystem,i=n&&n.dimensions;if(!Agt(t)&&!B(t.coord)&&B(i)){var a=DI(t,r,n,e);if(t=at(t),t.type&&AI[t.type]&&a.baseAxis&&a.valueAxis){var o=gt(i,a.baseAxis.dim),s=gt(i,a.valueAxis.dim),l=AI[t.type](r,a.baseDataDim,a.valueDataDim,o,s);t.coord=l[0],t.value=l[1]}else t.coord=[t.xAxis!=null?t.xAxis:t.radiusAxis,t.yAxis!=null?t.yAxis:t.angleAxis]}if(t.coord==null||!B(i))t.coord=[];else for(var u=t.coord,f=0;f<2;f++)AI[u[f]]&&(u[f]=I_(r,r.mapDimension(i[f]),u[f]));return t}}function DI(e,t,r,n){var i={};return e.valueIndex!=null||e.valueDim!=null?(i.valueDataDim=e.valueIndex!=null?t.getDimension(e.valueIndex):e.valueDim,i.valueAxis=r.getAxis(Cgt(n,i.valueDataDim)),i.baseAxis=r.getOtherAxis(i.valueAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim)):(i.baseAxis=n.getBaseAxis(),i.valueAxis=r.getOtherAxis(i.baseAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim),i.valueDataDim=t.mapDimension(i.valueAxis.dim)),i}function Cgt(e,t){var r=e.getData().getDimensionInfo(t);return r&&r.coordDim}function Ml(e,t){return e&&e.containData&&t.coord&&!CI(t)?e.containData(t.coord):!0}function fH(e,t,r){return e&&e.containZone&&t.coord&&r.coord&&!CI(t)&&!CI(r)?e.containZone(t.coord,r.coord):!0}function E_(e,t){return e?function(r,n,i,a){var o=a<2?r.coord&&r.coord[a]:r.value;return Ii(o,t[a])}:function(r,n,i,a){return Ii(r.value,t[a])}}function I_(e,t,r){if(r==="average"){var n=0,i=0;return e.each(t,function(a,o){isNaN(a)||(n+=a,i++)}),n/i}else return r==="median"?e.getMedian(t):e.getDataExtent(t)[r==="max"?1:0]}var II=yt(),Dgt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(){this.markerGroupMap=$()},t.prototype.render=function(r,n,i){var a=this,o=this.markerGroupMap;o.each(function(s){II(s).keep=!1}),n.eachSeries(function(s){var l=mn.getMarkerModelFromSeries(s,a.type);l&&a.renderSeries(s,l,n,i)}),o.each(function(s){!II(s).keep&&a.group.remove(s.group)})},t.prototype.markKeep=function(r){II(r).keep=!0},t.prototype.toggleBlurSeries=function(r,n){var i=this;D(r,function(a){var o=mn.getMarkerModelFromSeries(a,i.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(n?d0(l):Wd(l))})}})},t.type="marker",t}(Xt),$p=Dgt;function cH(e,t,r){var n=t.coordinateSystem;e.each(function(i){var a=e.getItemModel(i),o,s=q(a.get("x"),r.getWidth()),l=q(a.get("y"),r.getHeight());if(!isNaN(s)&&!isNaN(l))o=[s,l];else if(t.getMarkerPosition)o=t.getMarkerPosition(e.getValues(e.dimensions,i));else if(n){var u=e.get(n.dimensions[0],i),f=e.get(n.dimensions[1],i);o=n.dataToPoint([u,f])}isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),e.setItemLayout(i,o)})}var Egt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.updateTransform=function(r,n,i){n.eachSeries(function(a){var o=mn.getMarkerModelFromSeries(a,"markPoint");o&&(cH(o.getData(),a,i),this.markerGroupMap.get(a.id).updateLayout())},this)},t.prototype.renderSeries=function(r,n,i,a){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,f=u.get(s)||u.set(s,new io),c=Igt(o,r,n);n.setData(c),cH(n.getData(),r,a),c.each(function(p){var h=c.getItemModel(p),d=h.getShallow("symbol"),m=h.getShallow("symbolSize"),v=h.getShallow("symbolRotate"),g=h.getShallow("symbolOffset"),y=h.getShallow("symbolKeepAspect");if(j(d)||j(m)||j(v)||j(g)){var x=n.getRawValue(p),_=n.getDataParams(p);j(d)&&(d=d(x,_)),j(m)&&(m=m(x,_)),j(v)&&(v=v(x,_)),j(g)&&(g=g(x,_))}var S=h.getModel("itemStyle").getItemStyle(),b=Qa(l,"color");S.fill||(S.fill=b),c.setItemVisual(p,{symbol:d,symbolSize:m,symbolRotate:v,symbolOffset:g,symbolKeepAspect:y,style:S})}),f.updateData(c),this.group.add(f.group),c.eachItemGraphicEl(function(p){p.traverse(function(h){ht(h).dataModel=n})}),this.markKeep(f),f.group.silent=n.get("silent")||r.get("silent")},t.type="markPoint",t}($p);function Igt(e,t,r){var n;e?n=F(e&&e.dimensions,function(s){var l=t.getData().getDimensionInfo(t.getData().mapDimension(s))||{};return V(V({},l),{name:s,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var i=new Ne(n,r),a=F(r.get("data"),pt(Tl,t));e&&(a=Ut(a,pt(Ml,e)));var o=E_(!!e,n);return i.initData(a,null,o),i}var pH=Egt;function LI(e){e.registerComponentModel(uH),e.registerComponentView(pH),e.registerPreprocessor(function(t){_f(t.series,"markPoint")&&(t.markPoint=t.markPoint||{})})}var Lgt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.createMarkerModelFromSeries=function(r,n,i){return new t(r,n,i)},t.type="markLine",t.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},t}(mn),hH=Lgt;var L_=yt(),Pgt=function(e,t,r,n){var i=e.getData(),a;if(B(n))a=n;else{var o=n.type;if(o==="min"||o==="max"||o==="average"||o==="median"||n.xAxis!=null||n.yAxis!=null){var s=void 0,l=void 0;if(n.yAxis!=null||n.xAxis!=null)s=t.getAxis(n.yAxis!=null?"y":"x"),l=_e(n.yAxis,n.xAxis);else{var u=DI(n,i,t,e);s=u.valueAxis;var f=kx(i,u.valueDataDim);l=I_(i,f,o)}var c=s.dim==="x"?0:1,p=1-c,h=at(n),d={coord:[]};h.type=null,h.coord=[],h.coord[p]=-1/0,d.coord[p]=1/0;var m=r.get("precision");m>=0&&Ct(l)&&(l=+l.toFixed(Math.min(m,20))),h.coord[c]=d.coord[c]=l,a=[h,d,{type:o,valueIndex:n.valueIndex,value:l}]}else a=[]}var v=[Tl(e,a[0]),Tl(e,a[1]),V({},a[2])];return v[2].type=v[2].type||null,_t(v[2],v[0]),_t(v[2],v[1]),v};function P_(e){return!isNaN(e)&&!isFinite(e)}function dH(e,t,r,n){var i=1-e,a=n.dimensions[e];return P_(t[i])&&P_(r[i])&&t[e]===r[e]&&n.getAxis(a).containData(t[e])}function Rgt(e,t){if(e.type==="cartesian2d"){var r=t[0].coord,n=t[1].coord;if(r&&n&&(dH(1,r,n,e)||dH(0,r,n,e)))return!0}return Ml(e,t[0])&&Ml(e,t[1])}function PI(e,t,r,n,i){var a=n.coordinateSystem,o=e.getItemModel(t),s,l=q(o.get("x"),i.getWidth()),u=q(o.get("y"),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition)s=n.getMarkerPosition(e.getValues(e.dimensions,t));else{var f=a.dimensions,c=e.get(f[0],t),p=e.get(f[1],t);s=a.dataToPoint([c,p])}if(Ni(a,"cartesian2d")){var h=a.getAxis("x"),d=a.getAxis("y"),f=a.dimensions;P_(e.get(f[0],t))?s[0]=h.toGlobalCoord(h.getExtent()[r?0:1]):P_(e.get(f[1],t))&&(s[1]=d.toGlobalCoord(d.getExtent()[r?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}e.setItemLayout(t,s)}var Ngt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.updateTransform=function(r,n,i){n.eachSeries(function(a){var o=mn.getMarkerModelFromSeries(a,"markLine");if(o){var s=o.getData(),l=L_(o).from,u=L_(o).to;l.each(function(f){PI(l,f,!0,a,i),PI(u,f,!1,a,i)}),s.each(function(f){s.setItemLayout(f,[l.getItemLayout(f),u.getItemLayout(f)])}),this.markerGroupMap.get(a.id).updateLayout()}},this)},t.prototype.renderSeries=function(r,n,i,a){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,f=u.get(s)||u.set(s,new Rp);this.group.add(f.group);var c=kgt(o,r,n),p=c.from,h=c.to,d=c.line;L_(n).from=p,L_(n).to=h,n.setData(d);var m=n.get("symbol"),v=n.get("symbolSize"),g=n.get("symbolRotate"),y=n.get("symbolOffset");B(m)||(m=[m,m]),B(v)||(v=[v,v]),B(g)||(g=[g,g]),B(y)||(y=[y,y]),c.from.each(function(_){x(p,_,!0),x(h,_,!1)}),d.each(function(_){var S=d.getItemModel(_).getModel("lineStyle").getLineStyle();d.setItemLayout(_,[p.getItemLayout(_),h.getItemLayout(_)]),S.stroke==null&&(S.stroke=p.getItemVisual(_,"style").fill),d.setItemVisual(_,{fromSymbolKeepAspect:p.getItemVisual(_,"symbolKeepAspect"),fromSymbolOffset:p.getItemVisual(_,"symbolOffset"),fromSymbolRotate:p.getItemVisual(_,"symbolRotate"),fromSymbolSize:p.getItemVisual(_,"symbolSize"),fromSymbol:p.getItemVisual(_,"symbol"),toSymbolKeepAspect:h.getItemVisual(_,"symbolKeepAspect"),toSymbolOffset:h.getItemVisual(_,"symbolOffset"),toSymbolRotate:h.getItemVisual(_,"symbolRotate"),toSymbolSize:h.getItemVisual(_,"symbolSize"),toSymbol:h.getItemVisual(_,"symbol"),style:S})}),f.updateData(d),c.line.eachItemGraphicEl(function(_){ht(_).dataModel=n,_.traverse(function(S){ht(S).dataModel=n})});function x(_,S,b){var w=_.getItemModel(S);PI(_,S,b,r,a);var T=w.getModel("itemStyle").getItemStyle();T.fill==null&&(T.fill=Qa(l,"color")),_.setItemVisual(S,{symbolKeepAspect:w.get("symbolKeepAspect"),symbolOffset:bt(w.get("symbolOffset",!0),y[b?0:1]),symbolRotate:bt(w.get("symbolRotate",!0),g[b?0:1]),symbolSize:bt(w.get("symbolSize"),v[b?0:1]),symbol:bt(w.get("symbol",!0),m[b?0:1]),style:T})}this.markKeep(f),f.group.silent=n.get("silent")||r.get("silent")},t.type="markLine",t}($p);function kgt(e,t,r){var n;e?n=F(e&&e.dimensions,function(u){var f=t.getData().getDimensionInfo(t.getData().mapDimension(u))||{};return V(V({},f),{name:u,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var i=new Ne(n,r),a=new Ne(n,r),o=new Ne([],r),s=F(r.get("data"),pt(Pgt,t,e,r));e&&(s=Ut(s,pt(Rgt,e)));var l=E_(!!e,n);return i.initData(F(s,function(u){return u[0]}),null,l),a.initData(F(s,function(u){return u[1]}),null,l),o.initData(F(s,function(u){return u[2]})),o.hasItemOption=!0,{from:i,to:a,line:o}}var vH=Ngt;function RI(e){e.registerComponentModel(hH),e.registerComponentView(vH),e.registerPreprocessor(function(t){_f(t.series,"markLine")&&(t.markLine=t.markLine||{})})}var Ogt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.createMarkerModelFromSeries=function(r,n,i){return new t(r,n,i)},t.type="markArea",t.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},t}(mn),mH=Ogt;var R_=yt(),zgt=function(e,t,r,n){var i=n[0],a=n[1];if(!(!i||!a)){var o=Tl(e,i),s=Tl(e,a),l=o.coord,u=s.coord;l[0]=_e(l[0],-1/0),l[1]=_e(l[1],-1/0),u[0]=_e(u[0],1/0),u[1]=_e(u[1],1/0);var f=Tc([{},o,s]);return f.coord=[o.coord,s.coord],f.x0=o.x,f.y0=o.y,f.x1=s.x,f.y1=s.y,f}};function N_(e){return!isNaN(e)&&!isFinite(e)}function gH(e,t,r,n){var i=1-e;return N_(t[i])&&N_(r[i])}function Ugt(e,t){var r=t.coord[0],n=t.coord[1],i={coord:r,x:t.x0,y:t.y0},a={coord:n,x:t.x1,y:t.y1};return Ni(e,"cartesian2d")?r&&n&&(gH(1,r,n,e)||gH(0,r,n,e))?!0:fH(e,i,a):Ml(e,i)||Ml(e,a)}function yH(e,t,r,n,i){var a=n.coordinateSystem,o=e.getItemModel(t),s,l=q(o.get(r[0]),i.getWidth()),u=q(o.get(r[1]),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition){var f=e.getValues(["x0","y0"],t),c=e.getValues(["x1","y1"],t),p=a.clampData(f),h=a.clampData(c),d=[];r[0]==="x0"?d[0]=p[0]>h[0]?c[0]:f[0]:d[0]=p[0]>h[0]?f[0]:c[0],r[1]==="y0"?d[1]=p[1]>h[1]?c[1]:f[1]:d[1]=p[1]>h[1]?f[1]:c[1],s=n.getMarkerPosition(d,r,!0)}else{var m=e.get(r[0],t),v=e.get(r[1],t),g=[m,v];a.clampData&&a.clampData(g,g),s=a.dataToPoint(g,!0)}if(Ni(a,"cartesian2d")){var y=a.getAxis("x"),x=a.getAxis("y"),m=e.get(r[0],t),v=e.get(r[1],t);N_(m)?s[0]=y.toGlobalCoord(y.getExtent()[r[0]==="x0"?0:1]):N_(v)&&(s[1]=x.toGlobalCoord(x.getExtent()[r[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var xH=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],Vgt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.updateTransform=function(r,n,i){n.eachSeries(function(a){var o=mn.getMarkerModelFromSeries(a,"markArea");if(o){var s=o.getData();s.each(function(l){var u=F(xH,function(c){return yH(s,l,c,a,i)});s.setItemLayout(l,u);var f=s.getItemGraphicEl(l);f.setShape("points",u)})}},this)},t.prototype.renderSeries=function(r,n,i,a){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,f=u.get(s)||u.set(s,{group:new nt});this.group.add(f.group),this.markKeep(f);var c=Bgt(o,r,n);n.setData(c),c.each(function(p){var h=F(xH,function(T){return yH(c,p,T,r,a)}),d=o.getAxis("x").scale,m=o.getAxis("y").scale,v=d.getExtent(),g=m.getExtent(),y=[d.parse(c.get("x0",p)),d.parse(c.get("x1",p))],x=[m.parse(c.get("y0",p)),m.parse(c.get("y1",p))];sr(y),sr(x);var _=!(v[0]>y[1]||v[1]x[1]||g[1]=0},t.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},t.type="legend.plain",t.dependencies=["series"],t.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",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}},t}(Pt),_m=Ggt;var jp=pt,kI=D,k_=nt,Hgt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.newlineDisabled=!1,r}return t.prototype.init=function(){this.group.add(this._contentGroup=new k_),this.group.add(this._selectorGroup=new k_),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(r,n,i){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!r.get("show",!0)){var o=r.get("align"),s=r.get("orient");(!o||o==="auto")&&(o=r.get("left")==="right"&&s==="vertical"?"right":"left");var l=r.get("selector",!0),u=r.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,r,n,i,l,s,u);var f=r.getBoxLayoutParams(),c={width:i.getWidth(),height:i.getHeight()},p=r.get("padding"),h=re(f,c,p),d=this.layoutInner(r,o,h,a,l,u),m=re(J({width:d.width,height:d.height},f),c,p);this.group.x=m.x-d.x,this.group.y=m.y-d.y,this.group.markRedraw(),this.group.add(this._backgroundEl=__(d,r))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(r,n,i,a,o,s,l){var u=this.getContentGroup(),f=$(),c=n.get("selectedMode"),p=[];i.eachRawSeries(function(h){!h.get("legendHoverLink")&&p.push(h.id)}),kI(n.getData(),function(h,d){var m=h.get("name");if(!this.newlineDisabled&&(m===""||m===` +`)){var v=new k_;v.newline=!0,u.add(v);return}var g=i.getSeriesByName(m)[0];if(!f.get(m))if(g){var y=g.getData(),x=y.getVisual("legendLineStyle")||{},_=y.getVisual("legendIcon"),S=y.getVisual("style"),b=this._createItem(g,m,d,h,n,r,x,S,_,c,a);b.on("click",jp(bH,m,null,a,p)).on("mouseover",jp(OI,g.name,null,a,p)).on("mouseout",jp(zI,g.name,null,a,p)),f.set(m,!0)}else i.eachRawSeries(function(w){if(!f.get(m)&&w.legendVisualProvider){var T=w.legendVisualProvider;if(!T.containName(m))return;var M=T.indexOfName(m),C=T.getItemVisual(M,"style"),A=T.getItemVisual(M,"legendIcon"),P=br(C.fill);P&&P[3]===0&&(P[3]=.2,C=V(V({},C),{fill:bi(P,"rgba")}));var L=this._createItem(w,m,d,h,n,r,{},C,A,c,a);L.on("click",jp(bH,null,m,a,p)).on("mouseover",jp(OI,null,m,a,p)).on("mouseout",jp(zI,null,m,a,p)),f.set(m,!0)}},this)},this),o&&this._createSelector(o,n,a,s,l)},t.prototype._createSelector=function(r,n,i,a,o){var s=this.getSelectorGroup();kI(r,function(u){var f=u.type,c=new Lt({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:f==="all"?"legendAllSelect":"legendInverseSelect"})}});s.add(c);var p=n.getModel("selectorLabel"),h=n.getModel(["emphasis","selectorLabel"]);he(c,{normal:p,emphasis:h},{defaultText:u.title}),Za(c)})},t.prototype._createItem=function(r,n,i,a,o,s,l,u,f,c,p){var h=r.visualDrawType,d=o.get("itemWidth"),m=o.get("itemHeight"),v=o.isSelected(n),g=a.get("symbolRotate"),y=a.get("symbolKeepAspect"),x=a.get("icon");f=x||f||"roundRect";var _=Wgt(f,a,l,u,h,v,p),S=new k_,b=a.getModel("textStyle");if(j(r.getLegendIcon)&&(!x||x==="inherit"))S.add(r.getLegendIcon({itemWidth:d,itemHeight:m,icon:f,iconRotate:g,itemStyle:_.itemStyle,lineStyle:_.lineStyle,symbolKeepAspect:y}));else{var w=x==="inherit"&&r.getData().getVisual("symbol")?g==="inherit"?r.getData().getVisual("symbolRotate"):g:0;S.add(Ygt({itemWidth:d,itemHeight:m,icon:f,iconRotate:w,itemStyle:_.itemStyle,lineStyle:_.lineStyle,symbolKeepAspect:y}))}var T=s==="left"?d+5:-5,M=s,C=o.get("formatter"),A=n;H(C)&&C?A=C.replace("{name}",n??""):j(C)&&(A=C(n));var P=v?b.getTextColor():a.get("inactiveColor");S.add(new Lt({style:Qt(b,{text:A,x:T,y:m/2,fill:P,align:M,verticalAlign:"middle"},{inheritColor:P})}));var L=new At({shape:S.getBoundingRect(),invisible:!0}),I=a.getModel("tooltip");return I.get("show")&&sa({el:L,componentModel:o,itemName:n,itemTooltipOption:I.option}),S.add(L),S.eachChild(function(E){E.silent=!0}),L.silent=!c,this.getContentGroup().add(S),Za(S),S.__legendDataIndex=i,S},t.prototype.layoutInner=function(r,n,i,a,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();fa(r.get("orient"),l,r.get("itemGap"),i.width,i.height);var f=l.getBoundingRect(),c=[-f.x,-f.y];if(u.markRedraw(),l.markRedraw(),o){fa("horizontal",u,r.get("selectorItemGap",!0));var p=u.getBoundingRect(),h=[-p.x,-p.y],d=r.get("selectorButtonGap",!0),m=r.getOrient().index,v=m===0?"width":"height",g=m===0?"height":"width",y=m===0?"y":"x";s==="end"?h[m]+=f[v]+d:c[m]+=p[v]+d,h[1-m]+=f[g]/2-p[g]/2,u.x=h[0],u.y=h[1],l.x=c[0],l.y=c[1];var x={x:0,y:0};return x[v]=f[v]+d+p[v],x[g]=Math.max(f[g],p[g]),x[y]=Math.min(0,p[y]+h[1-m]),x}else return l.x=c[0],l.y=c[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t}(Xt);function Wgt(e,t,r,n,i,a,o){function s(v,g){v.lineWidth==="auto"&&(v.lineWidth=g.lineWidth>0?2:0),kI(v,function(y,x){v[x]==="inherit"&&(v[x]=g[x])})}var l=t.getModel("itemStyle"),u=l.getItemStyle(),f=e.lastIndexOf("empty",0)===0?"fill":"stroke",c=l.getShallow("decal");u.decal=!c||c==="inherit"?n.decal:da(c,o),u.fill==="inherit"&&(u.fill=n[i]),u.stroke==="inherit"&&(u.stroke=n[f]),u.opacity==="inherit"&&(u.opacity=(i==="fill"?n:r).opacity),s(u,n);var p=t.getModel("lineStyle"),h=p.getLineStyle();if(s(h,r),u.fill==="auto"&&(u.fill=n.fill),u.stroke==="auto"&&(u.stroke=n.fill),h.stroke==="auto"&&(h.stroke=n.fill),!a){var d=t.get("inactiveBorderWidth"),m=u[f];u.lineWidth=d==="auto"?n.lineWidth>0&&m?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),h.stroke=p.get("inactiveColor"),h.lineWidth=p.get("inactiveWidth")}return{itemStyle:u,lineStyle:h}}function Ygt(e){var t=e.icon||"roundRect",r=ne(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return r.setStyle(e.itemStyle),r.rotation=(e.iconRotate||0)*Math.PI/180,r.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf("empty")>-1&&(r.style.stroke=r.style.fill,r.style.fill="#fff",r.style.lineWidth=2),r}function bH(e,t,r,n){zI(e,t,r,n),r.dispatchAction({type:"legendToggleSelect",name:e??t}),OI(e,t,r,n)}function SH(e){for(var t=e.getZr().storage.getDisplayList(),r,n=0,i=t.length;ni[o],v=[-h.x,-h.y];n||(v[a]=f[u]);var g=[0,0],y=[-d.x,-d.y],x=bt(r.get("pageButtonGap",!0),r.get("itemGap",!0));if(m){var _=r.get("pageButtonPosition",!0);_==="end"?y[a]+=i[o]-d[o]:g[a]+=d[o]+x}y[1-a]+=h[s]/2-d[s]/2,f.setPosition(v),c.setPosition(g),p.setPosition(y);var S={x:0,y:0};if(S[o]=m?i[o]:h[o],S[s]=Math.max(h[s],d[s]),S[l]=Math.min(0,d[l]+y[1-a]),c.__rectSize=i[o],m){var b={x:0,y:0};b[o]=Math.max(i[o]-d[o]-x,0),b[s]=S[s],c.setClipPath(new At({shape:b})),c.__rectSize=b[o]}else p.eachChild(function(T){T.attr({invisible:!0,silent:!0})});var w=this._getPageInfo(r);return w.pageIndex!=null&&Rt(f,{x:w.contentPosition[0],y:w.contentPosition[1]},m?r:null),this._updatePageInfoView(r,w),S},t.prototype._pageGo=function(r,n,i){var a=this._getPageInfo(n)[r];a!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:n.id})},t.prototype._updatePageInfoView=function(r,n){var i=this._controllerGroup;D(["pagePrev","pageNext"],function(f){var c=f+"DataIndex",p=n[c]!=null,h=i.childOfName(f);h&&(h.setStyle("fill",p?r.get("pageIconColor",!0):r.get("pageIconInactiveColor",!0)),h.cursor=p?"pointer":"default")});var a=i.childOfName("pageText"),o=r.get("pageFormatter"),s=n.pageIndex,l=s!=null?s+1:0,u=n.pageCount;a&&o&&a.setStyle("text",H(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},t.prototype._getPageInfo=function(r){var n=r.get("scrollDataIndex",!0),i=this.getContentGroup(),a=this._containerGroup.__rectSize,o=r.getOrient().index,s=VI[o],l=BI[o],u=this._findTargetItemIndex(n),f=i.children(),c=f[u],p=f.length,h=p?1:0,d={contentPosition:[i.x,i.y],pageCount:h,pageIndex:h-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!c)return d;var m=_(c);d.contentPosition[o]=-m.s;for(var v=u+1,g=m,y=m,x=null;v<=p;++v)x=_(f[v]),(!x&&y.e>g.s+a||x&&!S(x,g.s))&&(y.i>g.i?g=y:g=x,g&&(d.pageNextDataIndex==null&&(d.pageNextDataIndex=g.i),++d.pageCount)),y=x;for(var v=u-1,g=m,y=m,x=null;v>=-1;--v)x=_(f[v]),(!x||!S(y,x.s))&&g.i=w&&b.s<=w+a}},t.prototype._findTargetItemIndex=function(r){if(!this._showController)return 0;var n,i=this.getContentGroup(),a;return i.eachChild(function(o,s){var l=o.__legendDataIndex;a==null&&l!=null&&(a=s),l===r&&(n=s)}),n??a},t.type="legend.scroll",t}(O_),CH=qgt;function FI(e){e.registerAction("legendScroll","legendscroll",function(t,r){var n=t.scrollDataIndex;n!=null&&r.eachComponent({mainType:"legend",subType:"scroll",query:t},function(i){i.setScrollDataIndex(n)})})}function DH(e){Nt(z_),e.registerComponentModel(MH),e.registerComponentView(CH),FI(e)}function GI(e){Nt(z_),Nt(DH)}var Zgt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="dataZoom.inside",t.defaultOption=Kr(bl.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(bl),EH=Zgt;var HI=yt();function IH(e,t,r){HI(e).coordSysRecordMap.each(function(n){var i=n.dataZoomInfoMap.get(t.uid);i&&(i.getRange=r)})}function LH(e,t){for(var r=HI(e).coordSysRecordMap,n=r.keys(),i=0;in[r+t]&&(t=s),i=i&&o.get("preventDefaultMouseMove",!0)}),{controlType:t,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!i}}}function RH(e){e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,function(t,r){var n=HI(r),i=n.coordSysRecordMap||(n.coordSysRecordMap=$());i.each(function(a){a.dataZoomInfoMap=null}),t.eachComponent({mainType:"dataZoom",subType:"inside"},function(a){var o=y_(a);D(o.infoList,function(s){var l=s.model.uid,u=i.get(l)||i.set(l,Kgt(r,s.model)),f=u.dataZoomInfoMap||(u.dataZoomInfoMap=$());f.set(a.uid,{dzReferCoordSysInfo:s,model:a,getRange:null})})}),i.each(function(a){var o=a.controller,s,l=a.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){PH(i,a);return}var f=Qgt(l);o.enable(f.controlType,f.opt),o.setPointerChecker(a.containsPoint),Li(a,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var tyt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="dataZoom.inside",r}return t.prototype.render=function(r,n,i){if(e.prototype.render.apply(this,arguments),r.noTarget()){this._clear();return}this.range=r.getPercentRange(),IH(i,r,{pan:Z(WI.pan,this),zoom:Z(WI.zoom,this),scrollMove:Z(WI.scrollMove,this)})},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){LH(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t}(qp),WI={zoom:function(e,t,r,n){var i=this.range,a=i.slice(),o=e.axisModels[0];if(o){var s=YI[t](null,[n.originX,n.originY],o,r,e),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],u=Math.max(1/n.scale,0);a[0]=(a[0]-l)*u+l,a[1]=(a[1]-l)*u+l;var f=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(Hn(0,a,[0,100],0,f.minSpan,f.maxSpan),this.range=a,i[0]!==a[0]||i[1]!==a[1])return a}},pan:NH(function(e,t,r,n,i,a){var o=YI[n]([a.oldX,a.oldY],[a.newX,a.newY],t,i,r);return o.signal*(e[1]-e[0])*o.pixel/o.pixelLength}),scrollMove:NH(function(e,t,r,n,i,a){var o=YI[n]([0,0],[a.scrollDelta,a.scrollDelta],t,i,r);return o.signal*(e[1]-e[0])*a.scrollDelta})};function NH(e){return function(t,r,n,i){var a=this.range,o=a.slice(),s=t.axisModels[0];if(s){var l=e(o,s,t,r,n,i);if(Hn(l,o,[0,100],"all"),this.range=o,a[0]!==o[0]||a[1]!==o[1])return o}}}var YI={grid:function(e,t,r,n,i){var a=r.axis,o={},s=i.model.coordinateSystem.getRect();return e=e||[0,0],a.dim==="x"?(o.pixel=t[0]-e[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(e,t,r,n,i){var a=r.axis,o={},s=i.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return e=e?s.pointToCoord(e):[0,0],t=s.pointToCoord(t),r.mainType==="radiusAxis"?(o.pixel=t[0]-e[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=a.inverse?-1:1),o},singleAxis:function(e,t,r,n,i){var a=r.axis,o=i.model.coordinateSystem.getRect(),s={};return e=e||[0,0],a.orient==="horizontal"?(s.pixel=t[0]-e[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=t[1]-e[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}},kH=tyt;function Sm(e){yf(e),e.registerComponentModel(EH),e.registerComponentView(kH),RH(e)}var eyt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=Kr(bl.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),t}(bl),OH=eyt;var wm=At,zH=7,ryt=1,XI=30,nyt=7,Tm="horizontal",UH="vertical",iyt=5,ayt=["line","bar","candlestick","scatter"],oyt={easing:"cubicOut",duration:100,delay:0},syt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._displayables={},r}return t.prototype.init=function(r,n){this.api=n,this._onBrush=Z(this._onBrush,this),this._onBrushEnd=Z(this._onBrushEnd,this)},t.prototype.render=function(r,n,i,a){if(e.prototype.render.apply(this,arguments),Li(this,"_dispatchZoomAction",r.get("throttle"),"fixRate"),this._orient=r.getOrient(),r.get("show")===!1){this.group.removeAll();return}if(r.noTarget()){this._clear(),this.group.removeAll();return}(!a||a.type!=="dataZoom"||a.from!==this.uid)&&this._buildView(),this._updateView()},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){Qo(this,"_dispatchZoomAction");var r=this.api.getZr();r.off("mousemove",this._onBrush),r.off("mouseup",this._onBrushEnd)},t.prototype._buildView=function(){var r=this.group;r.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var n=this._displayables.sliderGroup=new nt;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),r.add(n),this._positionGroup()},t.prototype._resetLocation=function(){var r=this.dataZoomModel,n=this.api,i=r.get("brushSelect"),a=i?nyt:0,o=this._findCoordRect(),s={width:n.getWidth(),height:n.getHeight()},l=this._orient===Tm?{right:s.width-o.x-o.width,top:s.height-XI-zH-a,width:o.width,height:XI}:{right:zH,top:o.y,width:XI,height:o.height},u=Di(r.option);D(["right","top","width","height"],function(c){u[c]==="ph"&&(u[c]=l[c])});var f=re(u,s);this._location={x:f.x,y:f.y},this._size=[f.width,f.height],this._orient===UH&&this._size.reverse()},t.prototype._positionGroup=function(){var r=this.group,n=this._location,i=this._orient,a=this.dataZoomModel.getFirstTargetAxisModel(),o=a&&a.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(i===Tm&&!o?{scaleY:l?1:-1,scaleX:1}:i===Tm&&o?{scaleY:l?1:-1,scaleX:-1}:i===UH&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=r.getBoundingRect([s]);r.x=n.x-u.x,r.y=n.y-u.y,r.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var r=this.dataZoomModel,n=this._size,i=this._displayables.sliderGroup,a=r.get("brushSelect");i.add(new wm({silent:!0,shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:r.get("backgroundColor")},z2:-40}));var o=new wm({shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:"transparent"},z2:0,onclick:Z(this._onClickPanel,this)}),s=this.api.getZr();a?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),i.add(o)},t.prototype._renderDataShadow=function(){var r=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!r)return;var n=this._size,i=this._shadowSize||[],a=r.series,o=a.getRawData(),s=a.getShadowDim&&a.getShadowDim(),l=s&&o.getDimensionInfo(s)?a.getShadowDim():r.otherDim;if(l==null)return;var u=this._shadowPolygonPts,f=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||n[0]!==i[0]||n[1]!==i[1]){var c=o.getDataExtent(l),p=(c[1]-c[0])*.3;c=[c[0]-p,c[1]+p];var h=[0,n[1]],d=[0,n[0]],m=[[n[0],0],[0,0]],v=[],g=d[1]/(o.count()-1),y=0,x=Math.round(o.count()/n[0]),_;o.each([l],function(M,C){if(x>0&&C%x){y+=g;return}var A=M==null||isNaN(M)||M==="",P=A?0:$t(M,c,h,!0);A&&!_&&C?(m.push([m[m.length-1][0],0]),v.push([v[v.length-1][0],0])):!A&&_&&(m.push([y,0]),v.push([y,0])),m.push([y,P]),v.push([y,P]),y+=g,_=A}),u=this._shadowPolygonPts=m,f=this._shadowPolylinePts=v}this._shadowData=o,this._shadowDim=l,this._shadowSize=[n[0],n[1]];var S=this.dataZoomModel;function b(M){var C=S.getModel(M?"selectedDataBackground":"dataBackground"),A=new nt,P=new Re({shape:{points:u},segmentIgnoreThreshold:1,style:C.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),L=new Ie({shape:{points:f},segmentIgnoreThreshold:1,style:C.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return A.add(P),A.add(L),A}for(var w=0;w<3;w++){var T=b(w===1);this._displayables.sliderGroup.add(T),this._displayables.dataShadowSegs.push(T)}},t.prototype._prepareDataShadowInfo=function(){var r=this.dataZoomModel,n=r.get("showDataShadow");if(n!==!1){var i,a=this.ecModel;return r.eachTargetAxis(function(o,s){var l=r.getAxisProxy(o,s).getTargetSeriesModels();D(l,function(u){if(!i&&!(n!==!0&>(ayt,u.get("type"))<0)){var f=a.getComponent(Bi(o),s).axis,c=lyt(o),p,h=u.coordinateSystem;c!=null&&h.getOtherAxis&&(p=h.getOtherAxis(f).inverse),c=u.getData().mapDimension(c),i={thisAxis:f,series:u,thisDim:o,otherDim:c,otherAxisInverse:p}}},this)},this),i}},t.prototype._renderHandle=function(){var r=this.group,n=this._displayables,i=n.handles=[null,null],a=n.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,f=l.get("borderRadius")||0,c=l.get("brushSelect"),p=n.filler=new wm({silent:c,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(p),o.add(new wm({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:f},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:ryt,fill:"rgba(0,0,0,0)"}})),D([0,1],function(x){var _=l.get("handleIcon");!bv[_]&&_.indexOf("path://")<0&&_.indexOf("image://")<0&&(_="path://"+_);var S=ne(_,-1,0,2,2,null,!0);S.attr({cursor:VH(this._orient),draggable:!0,drift:Z(this._onDragMove,this,x),ondragend:Z(this._onDragEnd,this),onmouseover:Z(this._showDataInfo,this,!0),onmouseout:Z(this._showDataInfo,this,!1),z2:5});var b=S.getBoundingRect(),w=l.get("handleSize");this._handleHeight=q(w,this._size[1]),this._handleWidth=b.width/b.height*this._handleHeight,S.setStyle(l.getModel("handleStyle").getItemStyle()),S.style.strokeNoScale=!0,S.rectHover=!0,S.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),Za(S);var T=l.get("handleColor");T!=null&&(S.style.fill=T),o.add(i[x]=S);var M=l.getModel("textStyle");r.add(a[x]=new Lt({silent:!0,invisible:!0,style:Qt(M,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:M.getTextColor(),font:M.getFont()}),z2:10}))},this);var h=p;if(c){var d=q(l.get("moveHandleSize"),s[1]),m=n.moveHandle=new At({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:d}}),v=d*.8,g=n.moveHandleIcon=ne(l.get("moveHandleIcon"),-v/2,-v/2,v,v,"#fff",!0);g.silent=!0,g.y=s[1]+d/2-.5,m.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var y=Math.min(s[1]/2,Math.max(d,10));h=n.moveZone=new At({invisible:!0,shape:{y:s[1]-y,height:d+y}}),h.on("mouseover",function(){u.enterEmphasis(m)}).on("mouseout",function(){u.leaveEmphasis(m)}),o.add(m),o.add(g),o.add(h)}h.attr({draggable:!0,cursor:VH(this._orient),drift:Z(this._onDragMove,this,"all"),ondragstart:Z(this._showDataInfo,this,!0),ondragend:Z(this._onDragEnd,this),onmouseover:Z(this._showDataInfo,this,!0),onmouseout:Z(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var r=this._range=this.dataZoomModel.getPercentRange(),n=this._getViewExtent();this._handleEnds=[$t(r[0],[0,100],n,!0),$t(r[1],[0,100],n,!0)]},t.prototype._updateInterval=function(r,n){var i=this.dataZoomModel,a=this._handleEnds,o=this._getViewExtent(),s=i.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];Hn(n,a,o,i.get("zoomLock")?"all":r,s.minSpan!=null?$t(s.minSpan,l,o,!0):null,s.maxSpan!=null?$t(s.maxSpan,l,o,!0):null);var u=this._range,f=this._range=sr([$t(a[0],o,l,!0),$t(a[1],o,l,!0)]);return!u||u[0]!==f[0]||u[1]!==f[1]},t.prototype._updateView=function(r){var n=this._displayables,i=this._handleEnds,a=sr(i.slice()),o=this._size;D([0,1],function(h){var d=n.handles[h],m=this._handleHeight;d.attr({scaleX:m/2,scaleY:m/2,x:i[h]+(h?-1:1),y:o[1]/2-m/2})},this),n.filler.setShape({x:a[0],y:0,width:a[1]-a[0],height:o[1]});var s={x:a[0],width:a[1]-a[0]};n.moveHandle&&(n.moveHandle.setShape(s),n.moveZone.setShape(s),n.moveZone.getBoundingRect(),n.moveHandleIcon&&n.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=n.dataShadowSegs,u=[0,a[0],a[1],o[0]],f=0;fn[0]||i[1]<0||i[1]>n[1])){var a=this._handleEnds,o=(a[0]+a[1])/2,s=this._updateInterval("all",i[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(r){var n=r.offsetX,i=r.offsetY;this._brushStart=new kt(n,i),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(r){if(this._brushing){var n=this._displayables.brushRect;if(this._brushing=!1,!!n){n.attr("ignore",!0);var i=n.shape,a=+new Date;if(!(a-this._brushStartTime<200&&Math.abs(i.width)<5)){var o=this._getViewExtent(),s=[0,100];this._range=sr([$t(i.x,o,s,!0),$t(i.x+i.width,o,s,!0)]),this._handleEnds=[i.x,i.x+i.width],this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(r){this._brushing&&(Mn(r.event),this._updateBrushRect(r.offsetX,r.offsetY))},t.prototype._updateBrushRect=function(r,n){var i=this._displayables,a=this.dataZoomModel,o=i.brushRect;o||(o=i.brushRect=new wm({silent:!0,style:a.getModel("brushStyle").getItemStyle()}),i.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(r,n),f=l.transformCoordToLocal(s.x,s.y),c=this._size;u[0]=Math.max(Math.min(c[0],u[0]),0),o.setShape({x:f[0],y:0,width:u[0]-f[0],height:c[1]})},t.prototype._dispatchZoomAction=function(r){var n=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:r?oyt:null,start:n[0],end:n[1]})},t.prototype._findCoordRect=function(){var r,n=y_(this.dataZoomModel).infoList;if(!r&&n.length){var i=n[0].model.coordinateSystem;r=i.getRect&&i.getRect()}if(!r){var a=this.api.getWidth(),o=this.api.getHeight();r={x:a*.2,y:o*.2,width:a*.6,height:o*.6}}return r},t.type="dataZoom.slider",t}(qp);function lyt(e){var t={x:"y",y:"x",radius:"angle",angle:"radius"};return t[e]}function VH(e){return e==="vertical"?"ns-resize":"ew-resize"}var BH=syt;function Mm(e){e.registerComponentModel(OH),e.registerComponentView(BH),yf(e)}function qI(e){Nt(Sm),Nt(Mm)}var uyt={get:function(e,t,r){var n=at((fyt[e]||{})[t]);return r&&B(n)?n[n.length-1]:n}},fyt={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},U_=uyt;var FH=Be.mapVisual,cyt=Be.eachVisual,pyt=B,GH=D,hyt=sr,dyt=$t,vyt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.stateList=["inRange","outOfRange"],r.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],r.layoutMode={type:"box",ignoreSize:!0},r.dataBound=[-1/0,1/0],r.targetVisuals={},r.controllerVisuals={},r}return t.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i)},t.prototype.optionUpdated=function(r,n){var i=this.option;!n&&T_(i,r,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(r){var n=this.stateList;r=Z(r,this),this.controllerVisuals=ym(this.option.controller,n,r),this.targetVisuals=ym(this.option.target,n,r)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var r=this.option.seriesIndex,n=[];return r==null||r==="all"?this.ecModel.eachSeries(function(i,a){n.push(a)}):n=Yt(r),n},t.prototype.eachTargetSeries=function(r,n){D(this.getTargetSeriesIndices(),function(i){var a=this.ecModel.getSeriesByIndex(i);a&&r.call(n,a)},this)},t.prototype.isTargetSeries=function(r){var n=!1;return this.eachTargetSeries(function(i){i===r&&(n=!0)}),n},t.prototype.formatValueText=function(r,n,i){var a=this.option,o=a.precision,s=this.dataBound,l=a.formatter,u;i=i||["<",">"],B(r)&&(r=r.slice(),u=!0);var f=n?r:u?[c(r[0]),c(r[1])]:c(r);if(H(l))return l.replace("{value}",u?f[0]:f).replace("{value2}",u?f[1]:f);if(j(l))return u?l(r[0],r[1]):l(r);if(u)return r[0]===s[0]?i[0]+" "+f[1]:r[1]===s[1]?i[1]+" "+f[0]:f[0]+" - "+f[1];return f;function c(p){return p===s[0]?"min":p===s[1]?"max":(+p).toFixed(Math.min(o,20))}},t.prototype.resetExtent=function(){var r=this.option,n=hyt([r.min,r.max]);this._dataExtent=n},t.prototype.getDataDimensionIndex=function(r){var n=this.option.dimension;if(n!=null)return r.getDimensionIndex(n);for(var i=r.dimensions,a=i.length-1;a>=0;a--){var o=i[a],s=r.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var r=this.ecModel,n=this.option,i={inRange:n.inRange,outOfRange:n.outOfRange},a=n.target||(n.target={}),o=n.controller||(n.controller={});_t(a,i),_t(o,i);var s=this.isCategory();l.call(this,a),l.call(this,o),u.call(this,a,"inRange","outOfRange"),f.call(this,o);function l(c){pyt(n.color)&&!c.inRange&&(c.inRange={color:n.color.slice().reverse()}),c.inRange=c.inRange||{color:r.get("gradientColor")}}function u(c,p,h){var d=c[p],m=c[h];d&&!m&&(m=c[h]={},GH(d,function(v,g){if(Be.isValidType(g)){var y=U_.get(g,"inactive",s);y!=null&&(m[g]=y,g==="color"&&!m.hasOwnProperty("opacity")&&!m.hasOwnProperty("colorAlpha")&&(m.opacity=[0,0]))}}))}function f(c){var p=(c.inRange||{}).symbol||(c.outOfRange||{}).symbol,h=(c.inRange||{}).symbolSize||(c.outOfRange||{}).symbolSize,d=this.get("inactiveColor"),m=this.getItemSymbol(),v=m||"roundRect";GH(this.stateList,function(g){var y=this.itemSize,x=c[g];x||(x=c[g]={color:s?d:[d]}),x.symbol==null&&(x.symbol=p&&at(p)||(s?v:[v])),x.symbolSize==null&&(x.symbolSize=h&&at(h)||(s?y[0]:[y[0],y[0]])),x.symbol=FH(x.symbol,function(b){return b==="none"?v:b});var _=x.symbolSize;if(_!=null){var S=-1/0;cyt(_,function(b){b>S&&(S=b)}),x.symbolSize=FH(_,function(b){return dyt(b,[0,S],[0,y[0]],!0)})}},this)}},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(r){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(r){return null},t.prototype.getVisualMeta=function(r){return null},t.type="visualMap",t.dependencies=["series"],t.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},t}(Pt),Qp=vyt;var HH=[20,140],myt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.optionUpdated=function(r,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(i){i.mappingMethod="linear",i.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){e.prototype.resetItemSize.apply(this,arguments);var r=this.itemSize;(r[0]==null||isNaN(r[0]))&&(r[0]=HH[0]),(r[1]==null||isNaN(r[1]))&&(r[1]=HH[1])},t.prototype._resetRange=function(){var r=this.getExtent(),n=this.option.range;!n||n.auto?(r.auto=1,this.option.range=r):B(n)&&(n[0]>n[1]&&n.reverse(),n[0]=Math.max(n[0],r[0]),n[1]=Math.min(n[1],r[1]))},t.prototype.completeVisualOption=function(){e.prototype.completeVisualOption.apply(this,arguments),D(this.stateList,function(r){var n=this.option.controller[r].symbolSize;n&&n[0]!==n[1]&&(n[0]=n[1]/3)},this)},t.prototype.setSelected=function(r){this.option.range=r.slice(),this._resetRange()},t.prototype.getSelected=function(){var r=this.getExtent(),n=sr((this.get("range")||[]).slice());return n[0]>r[1]&&(n[0]=r[1]),n[1]>r[1]&&(n[1]=r[1]),n[0]=i[1]||r<=n[1])?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(r){var n=[];return this.eachTargetSeries(function(i){var a=[],o=i.getData();o.each(this.getDataDimensionIndex(o),function(s,l){r[0]<=s&&s<=r[1]&&a.push(l)},this),n.push({seriesId:i.id,dataIndex:a})},this),n},t.prototype.getVisualMeta=function(r){var n=WH(this,"outOfRange",this.getExtent()),i=WH(this,"inRange",this.option.range.slice()),a=[];function o(h,d){a.push({value:h,color:r(h,d)})}for(var s=0,l=0,u=i.length,f=n.length;lr[1])break;a.push({color:this.getControllerVisual(l,"color",n),offset:s/i})}return a.push({color:this.getControllerVisual(r[1],"color",n),offset:1}),a},t.prototype._createBarPoints=function(r,n){var i=this.visualMapModel.itemSize;return[[i[0]-n[0],r[0]],[i[0],r[0]],[i[0],r[1]],[i[0]-n[1],r[1]]]},t.prototype._createBarGroup=function(r){var n=this._orient,i=this.visualMapModel.get("inverse");return new nt(n==="horizontal"&&!i?{scaleX:r==="bottom"?1:-1,rotation:Math.PI/2}:n==="horizontal"&&i?{scaleX:r==="bottom"?-1:1,rotation:-Math.PI/2}:n==="vertical"&&!i?{scaleX:r==="left"?1:-1,scaleY:-1}:{scaleX:r==="left"?1:-1})},t.prototype._updateHandle=function(r,n){if(this._useHandle){var i=this._shapes,a=this.visualMapModel,o=i.handleThumbs,s=i.handleLabels,l=a.itemSize,u=a.getExtent();yyt([0,1],function(f){var c=o[f];c.setStyle("fill",n.handlesColor[f]),c.y=r[f];var p=fo(r[f],[0,l[1]],u,!0),h=this.getControllerVisual(p,"symbolSize");c.scaleX=c.scaleY=h/l[0],c.x=l[0]-h/2;var d=Or(i.handleLabelPoints[f],oa(c,this.group));s[f].setStyle({x:d[0],y:d[1],text:a.formatValueText(this._dataInterval[f]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",i.mainGroup):"center"})},this)}},t.prototype._showIndicator=function(r,n,i,a){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],f=this._shapes,c=f.indicator;if(c){c.attr("invisible",!1);var p={convertOpacityToAlpha:!0},h=this.getControllerVisual(r,"color",p),d=this.getControllerVisual(r,"symbolSize"),m=fo(r,s,u,!0),v=l[0]-d/2,g={x:c.x,y:c.y};c.y=m,c.x=v;var y=Or(f.indicatorLabelPoint,oa(c,this.group)),x=f.indicatorLabel;x.attr("invisible",!1);var _=this._applyTransform("left",f.mainGroup),S=this._orient,b=S==="horizontal";x.setStyle({text:(i||"")+o.formatValueText(n),verticalAlign:b?_:"middle",align:b?"center":_});var w={x:v,y:m,style:{fill:h}},T={style:{x:y[0],y:y[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var M={duration:100,easing:"cubicInOut",additive:!0};c.x=g.x,c.y=g.y,c.animateTo(w,M),x.animateTo(T,M)}else c.attr(w),x.attr(T);this._firstShowIndicator=!1;var C=this._shapes.handleLabels;if(C)for(var A=0;Ao[1]&&(c[1]=1/0),n&&(c[0]===-1/0?this._showIndicator(f,c[1],"< ",l):c[1]===1/0?this._showIndicator(f,c[0],"> ",l):this._showIndicator(f,f,"\u2248 ",l));var p=this._hoverLinkDataIndices,h=[];(n||$H(i))&&(h=this._hoverLinkDataIndices=i.findTargetDataIndices(c));var d=zO(p,h);this._dispatchHighDown("downplay",Jp(d[0],i)),this._dispatchHighDown("highlight",Jp(d[1],i))}},t.prototype._hoverLinkFromSeriesMouseOver=function(r){var n;if(pa(r.target,function(l){var u=ht(l);if(u.dataIndex!=null)return n=u,!0},!0),!!n){var i=this.ecModel.getSeriesByIndex(n.seriesIndex),a=this.visualMapModel;if(a.isTargetSeries(i)){var o=i.getData(n.dataType),s=o.getStore().get(a.getDataDimensionIndex(o),n.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},t.prototype._hideIndicator=function(){var r=this._shapes;r.indicator&&r.indicator.attr("invisible",!0),r.indicatorLabel&&r.indicatorLabel.attr("invisible",!0);var n=this._shapes.handleLabels;if(n)for(var i=0;i=0&&(a.dimension=o,n.push(a))}}),e.getData().setVisual("visualMeta",n)}}];function wyt(e,t,r,n){for(var i=t.targetVisuals[n],a=Be.prepareVisualTypes(i),o={color:Qa(e.getData(),"color")},s=0,l=a.length;s0:t.splitNumber>0)||t.calculable)?"continuous":"piecewise"}),e.registerAction(JH,tW),D(eW,function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)}),e.registerPreprocessor(KI))}function Cm(e){e.registerComponentModel(YH),e.registerComponentView(QH),Am(e)}var Tyt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._pieceList=[],r}return t.prototype.optionUpdated=function(r,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var i=this._mode=this._determineMode();this._pieceList=[],Myt[this._mode].call(this,this._pieceList),this._resetSelected(r,n);var a=this.option.categories;this.resetVisual(function(o,s){i==="categories"?(o.mappingMethod="category",o.categories=at(a)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=F(this._pieceList,function(l){return l=at(l),s!=="inRange"&&(l.visual=null),l}))})},t.prototype.completeVisualOption=function(){var r=this.option,n={},i=Be.listVisualTypes(),a=this.isCategory();D(r.pieces,function(s){D(i,function(l){s.hasOwnProperty(l)&&(n[l]=1)})}),D(n,function(s,l){var u=!1;D(this.stateList,function(f){u=u||o(r,f,l)||o(r.target,f,l)},this),!u&&D(this.stateList,function(f){(r[f]||(r[f]={}))[l]=U_.get(l,f==="inRange"?"active":"inactive",a)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}e.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(r,n){var i=this.option,a=this._pieceList,o=(n?i:r).selected||{};if(i.selected=o,D(a,function(l,u){var f=this.getSelectedMapKey(l);o.hasOwnProperty(f)||(o[f]=!0)},this),i.selectedMode==="single"){var s=!1;D(a,function(l,u){var f=this.getSelectedMapKey(l);o[f]&&(s?o[f]=!1:s=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get("itemSymbol")},t.prototype.getSelectedMapKey=function(r){return this._mode==="categories"?r.value+"":r.index+""},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var r=this.option;return r.pieces&&r.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},t.prototype.setSelected=function(r){this.option.selected=at(r)},t.prototype.getValueState=function(r){var n=Be.findPieceIndex(r,this._pieceList);return n!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[n])]?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(r){var n=[],i=this._pieceList;return this.eachTargetSeries(function(a){var o=[],s=a.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var f=Be.findPieceIndex(l,i);f===r&&o.push(u)},this),n.push({seriesId:a.id,dataIndex:o})},this),n},t.prototype.getRepresentValue=function(r){var n;if(this.isCategory())n=r.value;else if(r.value!=null)n=r.value;else{var i=r.interval||[];n=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return n},t.prototype.getVisualMeta=function(r){if(this.isCategory())return;var n=[],i=["",""],a=this;function o(f,c){var p=a.getRepresentValue({interval:f});c||(c=a.getValueState(p));var h=r(p,c);f[0]===-1/0?i[0]=h:f[1]===1/0?i[1]=h:n.push({value:f[0],color:h},{value:f[1],color:h})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return D(s,function(f){var c=f.interval;c&&(c[0]>u&&o([u,c[0]],"outOfRange"),o(c.slice()),u=c[1])},this),{stops:n,outerColors:i}},t.type="visualMap.piecewise",t.defaultOption=Kr(Qp.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),t}(Qp),Myt={splitNumber:function(e){var t=this.option,r=Math.min(t.precision,20),n=this.getExtent(),i=t.splitNumber;i=Math.max(parseInt(i,10),1),t.splitNumber=i;for(var a=(n[1]-n[0])/i;+a.toFixed(r)!==a&&r<5;)r++;t.precision=r,a=+a.toFixed(r),t.minOpen&&e.push({interval:[-1/0,n[0]],close:[0,0]});for(var o=0,s=n[0];o","\u2265"][n[0]]];r.text=r.text||this.formatValueText(r.value!=null?r.value:r.interval,!1,i)},this)}};function iW(e,t){var r=e.inverse;(e.orient==="vertical"?!r:r)&&t.reverse()}var aW=Tyt;var Ayt=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.doRender=function(){var r=this.group;r.removeAll();var n=this.visualMapModel,i=n.get("textGap"),a=n.textStyleModel,o=a.getFont(),s=a.getTextColor(),l=this._getItemAlign(),u=n.itemSize,f=this._getViewData(),c=f.endsText,p=_e(n.get("showLabel",!0),!c);c&&this._renderEndsText(r,c[0],u,p,l),D(f.viewPieceList,function(h){var d=h.piece,m=new nt;m.onclick=Z(this._onItemClick,this,d),this._enableHoverLink(m,h.indexInModelPieceList);var v=n.getRepresentValue(d);if(this._createItemSymbol(m,v,[0,0,u[0],u[1]]),p){var g=this.visualMapModel.getValueState(v);m.add(new Lt({style:{x:l==="right"?-i:u[0]+i,y:u[1]/2,text:d.text,verticalAlign:"middle",align:l,font:o,fill:s,opacity:g==="outOfRange"?.5:1}}))}r.add(m)},this),c&&this._renderEndsText(r,c[1],u,p,l),fa(n.get("orient"),r,n.get("itemGap")),this.renderBackground(r),this.positionGroup(r)},t.prototype._enableHoverLink=function(r,n){var i=this;r.on("mouseover",function(){return a("highlight")}).on("mouseout",function(){return a("downplay")});var a=function(o){var s=i.visualMapModel;s.option.hoverLink&&i.api.dispatchAction({type:o,batch:Jp(s.findTargetDataIndices(n),s)})}},t.prototype._getItemAlign=function(){var r=this.visualMapModel,n=r.option;if(n.orient==="vertical")return B_(r,this.api,r.itemSize);var i=n.align;return(!i||i==="auto")&&(i="left"),i},t.prototype._renderEndsText=function(r,n,i,a,o){if(n){var s=new nt,l=this.visualMapModel.textStyleModel;s.add(new Lt({style:Qt(l,{x:a?o==="right"?i[0]:0:i[0]/2,y:i[1]/2,verticalAlign:"middle",align:a?o:"center",text:n})})),r.add(s)}},t.prototype._getViewData=function(){var r=this.visualMapModel,n=F(r.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),i=r.get("text"),a=r.get("orient"),o=r.get("inverse");return(a==="horizontal"?o:!o)?n.reverse():i&&(i=i.slice().reverse()),{viewPieceList:n,endsText:i}},t.prototype._createItemSymbol=function(r,n,i){r.add(ne(this.getControllerVisual(n,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(n,"color")))},t.prototype._onItemClick=function(r){var n=this.visualMapModel,i=n.option,a=i.selectedMode;if(a){var o=at(i.selected),s=n.getSelectedMapKey(r);a==="single"||a===!0?(o[s]=!0,D(o,function(l,u){o[u]=u===s})):o[s]=!o[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},t.type="visualMap.piecewise",t}(V_),oW=Ayt;function Dm(e){e.registerComponentModel(aW),e.registerComponentView(oW),Am(e)}function $I(e){Nt(Cm),Nt(Dm)}var Cyt={label:{enabled:!0},decal:{show:!1}},sW=yt(),Dyt={};function jI(e,t){var r=e.getModel("aria");if(!r.get("enabled"))return;var n=at(Cyt);_t(n.label,e.getLocaleModel().get("aria"),!1),_t(r.option,n,!1),i(),a();function i(){var u=r.getModel("decal"),f=u.get("show");if(f){var c=$();e.eachSeries(function(p){if(!p.isColorBySeries()){var h=c.get(p.type);h||(h={},c.set(p.type,h)),sW(p).scope=h}}),e.eachRawSeries(function(p){if(e.isSeriesFiltered(p))return;if(j(p.enableAriaDecal)){p.enableAriaDecal();return}var h=p.getData();if(p.isColorBySeries()){var y=lv(p.ecModel,p.name,Dyt,e.getSeriesCount()),x=h.getVisual("decal");h.setVisual("decal",_(x,y))}else{var d=p.getRawData(),m={},v=sW(p).scope;h.each(function(S){var b=h.getRawIndex(S);m[b]=S});var g=d.count();d.each(function(S){var b=m[S],w=d.getName(S)||S+"",T=lv(p.ecModel,w,v,g),M=h.getItemVisual(b,"decal");h.setItemVisual(b,"decal",_(M,T))})}function _(S,b){var w=S?V(V({},b),S):b;return w.dirty=!0,w}})}}function a(){var u=e.getLocaleModel().get("aria"),f=r.getModel("label");if(f.option=J(f.option,u),!!f.get("enabled")){var c=t.getZr().dom;if(f.get("description")){c.setAttribute("aria-label",f.get("description"));return}var p=e.getSeriesCount(),h=f.get(["data","maxCount"])||10,d=f.get(["series","maxCount"])||10,m=Math.min(p,d),v;if(!(p<1)){var g=s();if(g){var y=f.get(["general","withTitle"]);v=o(y,{title:g})}else v=f.get(["general","withoutTitle"]);var x=[],_=p>1?f.get(["series","multiple","prefix"]):f.get(["series","single","prefix"]);v+=o(_,{seriesCount:p}),e.eachSeries(function(T,M){if(M1?f.get(["series","multiple",P]):f.get(["series","single",P]),C=o(C,{seriesId:T.seriesIndex,seriesName:T.get("name"),seriesType:l(T.subType)});var L=T.getData();if(L.count()>h){var I=f.get(["data","partialData"]);C+=o(I,{displayCnt:h})}else C+=f.get(["data","allData"]);for(var E=f.get(["data","separator","middle"]),R=f.get(["data","separator","end"]),k=[],O=0;O":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},Eyt=function(){function e(t){var r=this._condVal=H(t)?new RegExp(t):hk(t)?t:null;if(r==null){var n="";jt(n)}}return e.prototype.evaluate=function(t){var r=typeof t;return H(r)?this._condVal.test(t):Ct(r)?this._condVal.test(t+""):!1},e}(),Iyt=function(){function e(){}return e.prototype.evaluate=function(){return this.value},e}(),Lyt=function(){function e(){}return e.prototype.evaluate=function(){for(var t=this.children,r=0;r2&&n.push(i),i=[L,I]}function f(L,I,E,R){eh(L,E)&&eh(I,R)||i.push(L,I,E,R,E,R)}function c(L,I,E,R,k,O){var z=Math.abs(I-L),U=Math.tan(z/4)*4/3,G=IT:A2&&n.push(i),n}function nL(e,t,r,n,i,a,o,s,l,u){if(eh(e,r)&&eh(t,n)&&eh(i,o)&&eh(a,s)){l.push(o,s);return}var f=2/u,c=f*f,p=o-e,h=s-t,d=Math.sqrt(p*p+h*h);p/=d,h/=d;var m=r-e,v=n-t,g=i-o,y=a-s,x=m*m+v*v,_=g*g+y*y;if(x=0&&T=0){l.push(o,s);return}var M=[],C=[];xi(e,r,i,o,.5,M),xi(t,n,a,s,.5,C),nL(M[0],C[0],M[1],C[1],M[2],C[2],M[3],C[3],l,u),nL(M[4],C[4],M[5],C[5],M[6],C[6],M[7],C[7],l,u)}function dW(e,t){var r=F_(e),n=[];t=t||1;for(var i=0;i0)for(var u=0;uMath.abs(u),c=yW([l,u],f?0:1,t),p=(f?s:u)/c.length,h=0;hi,o=yW([n,i],a?0:1,t),s=a?"width":"height",l=a?"height":"width",u=a?"x":"y",f=a?"y":"x",c=e[s]/o.length,p=0;p1?null:new kt(m*l+e,m*u+t)}function Gyt(e,t,r){var n=new kt;kt.sub(n,r,t),n.normalize();var i=new kt;kt.sub(i,e,t);var a=i.dot(n);return a}function rh(e,t){var r=e[e.length-1];r&&r[0]===t[0]&&r[1]===t[1]||e.push(t)}function Hyt(e,t,r){for(var n=e.length,i=[],a=0;ao?(u.x=f.x=s+a/2,u.y=l,f.y=l+o):(u.y=f.y=l+o/2,u.x=s,f.x=s+a),Hyt(t,u,f)}function G_(e,t,r,n){if(r===1)n.push(t);else{var i=Math.floor(r/2),a=e(t);G_(e,a[0],i,n),G_(e,a[1],r-i,n)}return n}function Wyt(e,t){for(var r=[],n=0;n0)for(var S=n/r,b=-n/2;b<=n/2;b+=S){for(var w=Math.sin(b),T=Math.cos(b),M=0,x=0;x0;u/=2){var f=0,c=0;(e&u)>0&&(f=1),(t&u)>0&&(c=1),s+=u*u*(3*f^c),c===0&&(f===1&&(e=u-1-e,t=u-1-t),l=e,e=t,t=l)}return s}function W_(e){var t=1/0,r=1/0,n=-1/0,i=-1/0,a=F(e,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),f=l.x+l.width/2+(u?u[4]:0),c=l.y+l.height/2+(u?u[5]:0);return t=Math.min(f,t),r=Math.min(c,r),n=Math.max(f,n),i=Math.max(c,i),[f,c]}),o=F(a,function(s,l){return{cp:s,z:Qyt(s[0],s[1],t,r,n,i),path:e[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function MW(e){return xW(e.path,e.count)}function iL(){return{fromIndividuals:[],toIndividuals:[],count:0}}function AW(e,t,r){var n=[];function i(S){for(var b=0;b=0;i--)if(!r[i].many.length){var l=r[s].many;if(l.length<=1)if(s)s=0;else return r;var a=l.length,u=Math.ceil(a/2);r[i].many=l.slice(u,a),r[s].many=l.slice(0,u),s++}return r}var Jyt={clone:function(e){for(var t=[],r=1-Math.pow(1-e.path.style.opacity,1/e.count),n=0;n0))return;var s=n.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,f;DW(e)&&(u=e,f=t),DW(t)&&(u=t,f=e);function c(g,y,x,_,S){var b=g.many,w=g.one;if(b.length===1&&!S){var T=y?b[0]:w,M=y?w:b[0];if(Im(T))c({many:[T],one:M},!0,x,_,!0);else{var C=s?J({delay:s(x,_)},l):l;Y_(T,M,C),a(T,M,T,M,C)}}else for(var A=J({dividePath:Jyt[r],individualDelay:s&&function(k,O,z,U){return s(k+x,_)}},l),P=y?AW(b,w,A):CW(w,b,A),L=P.fromIndividuals,I=P.toIndividuals,E=L.length,R=0;Rt.length,h=u?EW(f,u):EW(p?t:e,[p?e:t]),d=0,m=0;mNW))for(var i=n.getIndices(),a=e0t(n),o=0;o0&&_.group.traverse(function(b){b instanceof vt&&!b.animators.length&&b.animateFrom({style:{opacity:0}},S)})})}function LW(e){var t=e.getModel("universalTransition").get("seriesKey");return t||e.id}function PW(e){return B(e)?e.sort().join(","):e}function Cl(e){if(e.hostModel)return e.hostModel.getModel("universalTransition").get("divideShape")}function i0t(e,t){var r=$(),n=$(),i=$();D(e.oldSeries,function(o,s){var l=e.oldDataGroupIds[s],u=e.oldData[s],f=LW(o),c=PW(f);n.set(c,{dataGroupId:l,data:u}),B(f)&&D(f,function(p){i.set(p,{key:c,dataGroupId:l,data:u})})});function a(o){r.get(o)&&EO("Duplicated seriesKey in universalTransition "+o)}return D(t.updatedSeries,function(o){if(o.isUniversalTransitionEnabled()&&o.isAnimationEnabled()){var s=o.get("dataGroupId"),l=o.getData(),u=LW(o),f=PW(u),c=n.get(f);if(c)r.set(f,{oldSeries:[{dataGroupId:c.dataGroupId,divide:Cl(c.data),data:c.data}],newSeries:[{dataGroupId:s,divide:Cl(l),data:l}]});else if(B(u)){var p=[];D(u,function(m){var v=n.get(m);v.data&&p.push({dataGroupId:v.dataGroupId,divide:Cl(v.data),data:v.data})}),p.length&&r.set(f,{oldSeries:p,newSeries:[{dataGroupId:s,data:l,divide:Cl(l)}]})}else{var h=i.get(u);if(h){var d=r.get(h.key);d||(d={oldSeries:[{dataGroupId:h.dataGroupId,data:h.data,divide:Cl(h.data)}],newSeries:[]},r.set(h.key,d)),d.newSeries.push({dataGroupId:s,data:l,divide:Cl(l)})}}}}),r}function RW(e,t){for(var r=0;r=0&&i.push({dataGroupId:t.oldDataGroupIds[s],data:t.oldData[s],divide:Cl(t.oldData[s]),dim:o.dimension})}),D(Yt(e.to),function(o){var s=RW(r.updatedSeries,o);if(s>=0){var l=r.updatedSeries[s].getData();a.push({dataGroupId:t.oldDataGroupIds[s],data:l,divide:Cl(l),dim:o.dimension})}}),i.length>0&&a.length>0&&kW(i,a,n)}function sL(e){e.registerUpdateLifecycle("series:beforeupdate",function(t,r,n){D(Yt(n.seriesTransition),function(i){D(Yt(i.to),function(a){for(var o=n.updatedSeries,s=0;su0t,iterateMonths:()=>s0t,iterateYears:()=>l0t});var s0t=(e,t)=>{console.warn("helpers.iterateMonths() is deprecated, please define this function in utils.inline in dashboards.yaml");let r=[],[n,i]=e.split("-").map(s=>parseInt(s)),[a,o]=t.split("-").map(s=>parseInt(s));for(;n{console.warn("helpers.iterateMonths() is deprecated, please define this function in utils.inline in dashboards.yaml");let r=[],n=parseInt(e.split("-")[0]),i=parseInt(t.split("-")[0]);for(;n<=i;n++)r.push(n);return r},u0t=(e,t,r)=>{console.warn("helpers.iterateMonths() is deprecated, please define this function in utils.inline in dashboards.yaml"),r=r??((i,a)=>i.slice(0,a+1).join(":"));let n={children:[]};for(let i of e){let a=i.account.split(":"),o=n;for(let s=0;sf.name==l);u||(u={name:l,children:[],value:0},o.children.push(u)),u.value+=t(i),o=u}}return n};var ZN={};ud(ZN,{Adder:()=>Ae,Delaunay:()=>vg,FormatSpecifier:()=>gg,InternMap:()=>Ta,InternSet:()=>Yn,Node:()=>Mo,Path:()=>ms,Voronoi:()=>Wf,ZoomTransform:()=>Qi,active:()=>Yq,arc:()=>KJ,area:()=>Aw,areaRadial:()=>VN,ascending:()=>oe,autoType:()=>NP,axisBottom:()=>uY,axisLeft:()=>fY,axisRight:()=>lY,axisTop:()=>sY,bin:()=>$_,bisect:()=>Wn,bisectCenter:()=>VW,bisectLeft:()=>UW,bisectRight:()=>uL,bisector:()=>Dl,blob:()=>VZ,blur:()=>BW,blur2:()=>q_,blurImage:()=>FW,brush:()=>eZ,brushSelection:()=>Qq,brushX:()=>Jq,brushY:()=>tZ,buffer:()=>BZ,chord:()=>nZ,chordDirected:()=>aZ,chordTranspose:()=>iZ,cluster:()=>Q$,color:()=>Hi,contourDensity:()=>yZ,contours:()=>cg,count:()=>os,create:()=>tX,creator:()=>Il,cross:()=>cL,csv:()=>GZ,csvFormat:()=>DZ,csvFormatBody:()=>EZ,csvFormatRow:()=>LZ,csvFormatRows:()=>IZ,csvFormatValue:()=>PZ,csvParse:()=>Yb,csvParseRows:()=>CZ,cubehelix:()=>Qr,cumsum:()=>pL,curveBasis:()=>utt,curveBasisClosed:()=>ctt,curveBasisOpen:()=>htt,curveBumpX:()=>Ew,curveBumpY:()=>Iw,curveBundle:()=>vtt,curveCardinal:()=>mtt,curveCardinalClosed:()=>gtt,curveCardinalOpen:()=>ytt,curveCatmullRom:()=>_tt,curveCatmullRomClosed:()=>Stt,curveCatmullRomOpen:()=>Ttt,curveLinear:()=>ru,curveLinearClosed:()=>Att,curveMonotoneX:()=>Ptt,curveMonotoneY:()=>Rtt,curveNatural:()=>Ott,curveStep:()=>ztt,curveStepAfter:()=>Vtt,curveStepBefore:()=>Utt,descending:()=>Lm,deviation:()=>Rm,difference:()=>OL,disjoint:()=>zL,dispatch:()=>Gi,drag:()=>iX,dragDisable:()=>Rl,dragEnable:()=>Nl,dsv:()=>kP,dsvFormat:()=>Wl,easeBack:()=>hP,easeBackIn:()=>Bq,easeBackInOut:()=>hP,easeBackOut:()=>Fq,easeBounce:()=>_h,easeBounceIn:()=>Uq,easeBounceInOut:()=>Vq,easeBounceOut:()=>_h,easeCircle:()=>fP,easeCircleIn:()=>Oq,easeCircleInOut:()=>fP,easeCircleOut:()=>zq,easeCubic:()=>sg,easeCubicIn:()=>Aq,easeCubicInOut:()=>sg,easeCubicOut:()=>Cq,easeElastic:()=>mP,easeElasticIn:()=>Gq,easeElasticInOut:()=>Hq,easeElasticOut:()=>mP,easeExp:()=>uP,easeExpIn:()=>Nq,easeExpInOut:()=>uP,easeExpOut:()=>kq,easeLinear:()=>wq,easePoly:()=>sP,easePolyIn:()=>Dq,easePolyInOut:()=>sP,easePolyOut:()=>Eq,easeQuad:()=>aP,easeQuadIn:()=>Tq,easeQuadInOut:()=>aP,easeQuadOut:()=>Mq,easeSin:()=>lP,easeSinIn:()=>Pq,easeSinInOut:()=>lP,easeSinOut:()=>Rq,every:()=>IL,extent:()=>ss,fcumsum:()=>WW,filter:()=>PL,flatGroup:()=>KW,flatRollup:()=>$W,forceCenter:()=>KZ,forceCollide:()=>dK,forceLink:()=>mK,forceManyBody:()=>bK,forceRadial:()=>SK,forceSimulation:()=>_K,forceX:()=>wK,forceY:()=>TK,format:()=>Kf,formatDefaultLocale:()=>Kb,formatLocale:()=>qb,formatPrefix:()=>yg,formatSpecifier:()=>Ia,fsum:()=>HW,geoAlbers:()=>RS,geoAlbersUsa:()=>U$,geoArea:()=>UK,geoAzimuthalEqualArea:()=>V$,geoAzimuthalEqualAreaRaw:()=>kS,geoAzimuthalEquidistant:()=>B$,geoAzimuthalEquidistantRaw:()=>OS,geoBounds:()=>XK,geoCentroid:()=>QK,geoCircle:()=>n$,geoClipAntimeridian:()=>Dg,geoClipCircle:()=>xS,geoClipExtent:()=>o$,geoClipRectangle:()=>Ss,geoConicConformal:()=>G$,geoConicConformalRaw:()=>SR,geoConicEqualArea:()=>nc,geoConicEqualAreaRaw:()=>_R,geoConicEquidistant:()=>W$,geoConicEquidistantRaw:()=>wR,geoContains:()=>h$,geoDistance:()=>Nh,geoEqualEarth:()=>Y$,geoEqualEarthRaw:()=>VS,geoEquirectangular:()=>H$,geoEquirectangularRaw:()=>ac,geoGnomonic:()=>X$,geoGnomonicRaw:()=>BS,geoGraticule:()=>MS,geoGraticule10:()=>m$,geoIdentity:()=>q$,geoInterpolate:()=>g$,geoLength:()=>wS,geoMercator:()=>F$,geoMercatorRaw:()=>ic,geoNaturalEarth1:()=>Z$,geoNaturalEarth1Raw:()=>FS,geoOrthographic:()=>K$,geoOrthographicRaw:()=>GS,geoPath:()=>R$,geoProjection:()=>ir,geoProjectionMutator:()=>kg,geoRotation:()=>hS,geoStereographic:()=>$$,geoStereographicRaw:()=>HS,geoStream:()=>Er,geoTransform:()=>N$,geoTransverseMercator:()=>j$,geoTransverseMercatorRaw:()=>WS,gray:()=>_X,greatest:()=>Vm,greatestIndex:()=>ML,group:()=>Nm,groupSort:()=>mL,groups:()=>dL,hcl:()=>dh,hierarchy:()=>Bg,histogram:()=>$_,hsl:()=>ph,html:()=>qZ,image:()=>WZ,index:()=>jW,indexes:()=>QW,interpolate:()=>Jr,interpolateArray:()=>PX,interpolateBasis:()=>mb,interpolateBasisClosed:()=>gb,interpolateBlues:()=>IJ,interpolateBrBG:()=>uJ,interpolateBuGn:()=>yJ,interpolateBuPu:()=>xJ,interpolateCividis:()=>OJ,interpolateCool:()=>VJ,interpolateCubehelix:()=>qX,interpolateCubehelixDefault:()=>zJ,interpolateCubehelixLong:()=>kf,interpolateDate:()=>_b,interpolateDiscrete:()=>RX,interpolateGnBu:()=>_J,interpolateGreens:()=>LJ,interpolateGreys:()=>PJ,interpolateHcl:()=>WX,interpolateHclLong:()=>YX,interpolateHsl:()=>FX,interpolateHslLong:()=>GX,interpolateHue:()=>NX,interpolateInferno:()=>YJ,interpolateLab:()=>rP,interpolateMagma:()=>WJ,interpolateNumber:()=>Cr,interpolateNumberArray:()=>mh,interpolateObject:()=>bb,interpolateOrRd:()=>bJ,interpolateOranges:()=>kJ,interpolatePRGn:()=>fJ,interpolatePiYG:()=>cJ,interpolatePlasma:()=>XJ,interpolatePuBu:()=>wJ,interpolatePuBuGn:()=>SJ,interpolatePuOr:()=>pJ,interpolatePuRd:()=>TJ,interpolatePurples:()=>RJ,interpolateRainbow:()=>BJ,interpolateRdBu:()=>hJ,interpolateRdGy:()=>dJ,interpolateRdPu:()=>MJ,interpolateRdYlBu:()=>vJ,interpolateRdYlGn:()=>mJ,interpolateReds:()=>NJ,interpolateRgb:()=>Ul,interpolateRgbBasis:()=>yb,interpolateRgbBasisClosed:()=>LX,interpolateRound:()=>Vl,interpolateSinebow:()=>FJ,interpolateSpectral:()=>gJ,interpolateString:()=>gh,interpolateTransformCss:()=>Tb,interpolateTransformSvg:()=>Mb,interpolateTurbo:()=>GJ,interpolateViridis:()=>HJ,interpolateWarm:()=>UJ,interpolateYlGn:()=>CJ,interpolateYlGnBu:()=>AJ,interpolateYlOrBr:()=>DJ,interpolateYlOrRd:()=>EJ,interpolateZoom:()=>Ab,interrupt:()=>Da,intersection:()=>UL,interval:()=>QX,isoFormat:()=>KQ,isoParse:()=>$Q,json:()=>YZ,lab:()=>Rf,lch:()=>SX,least:()=>TL,leastIndex:()=>Bm,line:()=>jh,lineRadial:()=>UN,link:()=>iy,linkHorizontal:()=>ntt,linkRadial:()=>att,linkVertical:()=>itt,local:()=>ob,map:()=>RL,matcher:()=>uh,max:()=>fs,maxIndex:()=>Mf,mean:()=>xL,median:()=>_L,medianIndex:()=>rY,merge:()=>Df,min:()=>El,minIndex:()=>Af,mode:()=>bL,namespace:()=>ho,namespaces:()=>Wm,nice:()=>wf,now:()=>Bl,pack:()=>wj,packEnclose:()=>dj,packSiblings:()=>_j,pairs:()=>SL,partition:()=>Tj,path:()=>fg,pathRound:()=>sZ,permute:()=>km,pie:()=>ttt,piecewise:()=>Jm,pointRadial:()=>bc,pointer:()=>Ar,pointers:()=>eX,polygonArea:()=>Rj,polygonCentroid:()=>Nj,polygonContains:()=>Uj,polygonHull:()=>zj,polygonLength:()=>Vj,precisionFixed:()=>$b,precisionPrefix:()=>jb,precisionRound:()=>Qb,quadtree:()=>Yl,quantile:()=>po,quantileIndex:()=>Q_,quantileSorted:()=>j_,quantize:()=>ZX,quickselect:()=>Cf,radialArea:()=>VN,radialLine:()=>UN,randomBates:()=>Hj,randomBernoulli:()=>Xj,randomBeta:()=>QS,randomBinomial:()=>JS,randomCauchy:()=>Zj,randomExponential:()=>Wj,randomGamma:()=>Xh,randomGeometric:()=>jS,randomInt:()=>Fj,randomIrwinHall:()=>$S,randomLcg:()=>OR,randomLogNormal:()=>Gj,randomLogistic:()=>Kj,randomNormal:()=>Yh,randomPareto:()=>Yj,randomPoisson:()=>$j,randomUniform:()=>Bj,randomWeibull:()=>qj,range:()=>Fi,rank:()=>wL,reduce:()=>NL,reverse:()=>kL,rgb:()=>hs,ribbon:()=>cZ,ribbonArrow:()=>pZ,rollup:()=>Z_,rollups:()=>vL,scaleBand:()=>Gg,scaleDiverging:()=>_w,scaleDivergingLog:()=>sN,scaleDivergingPow:()=>bw,scaleDivergingSqrt:()=>QQ,scaleDivergingSymlog:()=>lN,scaleIdentity:()=>rw,scaleImplicit:()=>tw,scaleLinear:()=>ew,scaleLog:()=>nw,scaleOrdinal:()=>qh,scalePoint:()=>Jj,scalePow:()=>Zg,scaleQuantile:()=>ow,scaleQuantize:()=>sw,scaleRadial:()=>aw,scaleSequential:()=>mw,scaleSequentialLog:()=>aN,scaleSequentialPow:()=>gw,scaleSequentialQuantile:()=>yw,scaleSequentialSqrt:()=>jQ,scaleSequentialSymlog:()=>oN,scaleSqrt:()=>sQ,scaleSymlog:()=>iw,scaleThreshold:()=>lw,scaleTime:()=>nN,scaleUtc:()=>iN,scan:()=>AL,schemeAccent:()=>tJ,schemeBlues:()=>IN,schemeBrBG:()=>uN,schemeBuGn:()=>yN,schemeBuPu:()=>xN,schemeCategory10:()=>JQ,schemeDark2:()=>eJ,schemeGnBu:()=>_N,schemeGreens:()=>LN,schemeGreys:()=>PN,schemeOrRd:()=>bN,schemeOranges:()=>kN,schemePRGn:()=>fN,schemePaired:()=>rJ,schemePastel1:()=>nJ,schemePastel2:()=>iJ,schemePiYG:()=>cN,schemePuBu:()=>wN,schemePuBuGn:()=>SN,schemePuOr:()=>pN,schemePuRd:()=>TN,schemePurples:()=>RN,schemeRdBu:()=>hN,schemeRdGy:()=>dN,schemeRdPu:()=>MN,schemeRdYlBu:()=>vN,schemeRdYlGn:()=>mN,schemeReds:()=>NN,schemeSet1:()=>aJ,schemeSet2:()=>oJ,schemeSet3:()=>sJ,schemeSpectral:()=>gN,schemeTableau10:()=>lJ,schemeYlGn:()=>CN,schemeYlGnBu:()=>AN,schemeYlOrBr:()=>DN,schemeYlOrRd:()=>EN,select:()=>$e,selectAll:()=>rX,selection:()=>vo,selector:()=>Ll,selectorAll:()=>lh,shuffle:()=>nY,shuffler:()=>CL,some:()=>LL,sort:()=>sh,stack:()=>Btt,stackOffsetDiverging:()=>Gtt,stackOffsetExpand:()=>Ftt,stackOffsetNone:()=>Oa,stackOffsetSilhouette:()=>Htt,stackOffsetWiggle:()=>Wtt,stackOrderAppearance:()=>qw,stackOrderAscending:()=>Zw,stackOrderDescending:()=>Ytt,stackOrderInsideOut:()=>Xtt,stackOrderNone:()=>za,stackOrderReverse:()=>qtt,stratify:()=>Cj,style:()=>cs,subset:()=>VL,sum:()=>DL,superset:()=>Gm,svg:()=>ZZ,symbol:()=>WN,symbolAsterisk:()=>Lw,symbolCircle:()=>td,symbolCross:()=>Pw,symbolDiamond:()=>Rw,symbolDiamond2:()=>Nw,symbolPlus:()=>kw,symbolSquare:()=>Ow,symbolSquare2:()=>zw,symbolStar:()=>Uw,symbolTimes:()=>ay,symbolTriangle:()=>Vw,symbolTriangle2:()=>Bw,symbolWye:()=>Fw,symbolX:()=>ay,symbols:()=>HN,symbolsFill:()=>HN,symbolsStroke:()=>ltt,text:()=>qf,thresholdFreedmanDiaconis:()=>gL,thresholdScott:()=>yL,thresholdSturges:()=>Tf,tickFormat:()=>Hg,tickIncrement:()=>Ma,tickStep:()=>Sf,ticks:()=>Xn,timeDay:()=>Eo,timeDays:()=>hQ,timeFormat:()=>ey,timeFormatDefaultLocale:()=>hw,timeFormatLocale:()=>ty,timeFriday:()=>YR,timeFridays:()=>bQ,timeHour:()=>pc,timeHours:()=>cQ,timeInterval:()=>Ce,timeMillisecond:()=>Jl,timeMilliseconds:()=>FR,timeMinute:()=>uc,timeMinutes:()=>uQ,timeMonday:()=>vc,timeMondays:()=>gQ,timeMonth:()=>yc,timeMonths:()=>EQ,timeParse:()=>eN,timeSaturday:()=>XR,timeSaturdays:()=>SQ,timeSecond:()=>di,timeSeconds:()=>GR,timeSunday:()=>Io,timeSundays:()=>qR,timeThursday:()=>Ts,timeThursdays:()=>_Q,timeTickInterval:()=>pw,timeTicks:()=>cw,timeTuesday:()=>HR,timeTuesdays:()=>yQ,timeWednesday:()=>WR,timeWednesdays:()=>xQ,timeWeek:()=>Io,timeWeeks:()=>qR,timeYear:()=>Kn,timeYears:()=>LQ,timeout:()=>ig,timer:()=>Uf,timerFlush:()=>iP,transition:()=>Ob,transpose:()=>Fm,tree:()=>Dj,treemap:()=>Ej,treemapBinary:()=>Ij,treemapDice:()=>Ao,treemapResquarify:()=>Pj,treemapSlice:()=>jl,treemapSliceDice:()=>Lj,treemapSquarify:()=>KS,tsv:()=>HZ,tsvFormat:()=>NZ,tsvFormatBody:()=>kZ,tsvFormatRow:()=>zZ,tsvFormatRows:()=>OZ,tsvFormatValue:()=>UZ,tsvParse:()=>Xb,tsvParseRows:()=>RZ,union:()=>BL,unixDay:()=>$g,unixDays:()=>vQ,utcDay:()=>tu,utcDays:()=>dQ,utcFormat:()=>_c,utcFriday:()=>$R,utcFridays:()=>CQ,utcHour:()=>hc,utcHours:()=>pQ,utcMillisecond:()=>Jl,utcMilliseconds:()=>FR,utcMinute:()=>fc,utcMinutes:()=>fQ,utcMonday:()=>gc,utcMondays:()=>wQ,utcMonth:()=>xc,utcMonths:()=>IQ,utcParse:()=>ry,utcSaturday:()=>jR,utcSaturdays:()=>DQ,utcSecond:()=>di,utcSeconds:()=>GR,utcSunday:()=>Lo,utcSundays:()=>QR,utcThursday:()=>Ms,utcThursdays:()=>AQ,utcTickInterval:()=>fw,utcTicks:()=>uw,utcTuesday:()=>ZR,utcTuesdays:()=>TQ,utcWednesday:()=>KR,utcWednesdays:()=>MQ,utcWeek:()=>Lo,utcWeeks:()=>QR,utcYear:()=>$n,utcYears:()=>PQ,variance:()=>Pm,window:()=>fh,xml:()=>XZ,zip:()=>EL,zoom:()=>Ktt,zoomIdentity:()=>nd,zoomTransform:()=>Kw});function oe(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function Lm(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function Dl(e){let t,r,n;e.length!==2?(t=oe,r=(s,l)=>oe(e(s),l),n=(s,l)=>e(s)-l):(t=e===oe||e===Lm?e:f0t,r=e,n=e);function i(s,l,u=0,f=s.length){if(u>>1;r(s[c],l)<0?u=c+1:f=c}while(u>>1;r(s[c],l)<=0?u=c+1:f=c}while(uu&&n(s[c-1],l)>-n(s[c],l)?c-1:c}return{left:i,center:o,right:a}}function f0t(){return 0}function bf(e){return e===null?NaN:+e}function*OW(e,t){if(t===void 0)for(let r of e)r!=null&&(r=+r)>=r&&(yield r);else{let r=-1;for(let n of e)(n=t(n,++r,e))!=null&&(n=+n)>=n&&(yield n)}}var zW=Dl(oe),uL=zW.right,UW=zW.left,VW=Dl(bf).center,Wn=uL;function BW(e,t){if(!((t=+t)>=0))throw new RangeError("invalid r");let r=e.length;if(!((r=Math.floor(r))>=0))throw new RangeError("invalid length");if(!r||!t)return e;let n=fL(t),i=e.slice();return n(e,i,0,r,1),n(i,e,0,r,1),n(e,i,0,r,1),e}var q_=GW(fL),FW=GW(c0t);function GW(e){return function(t,r,n=r){if(!((r=+r)>=0))throw new RangeError("invalid rx");if(!((n=+n)>=0))throw new RangeError("invalid ry");let{data:i,width:a,height:o}=t;if(!((a=Math.floor(a))>=0))throw new RangeError("invalid width");if(!((o=Math.floor(o!==void 0?o:i.length/a))>=0))throw new RangeError("invalid height");if(!a||!o||!r&&!n)return t;let s=r&&e(r),l=n&&e(n),u=i.slice();return s&&l?(ih(s,u,i,a,o),ih(s,i,u,a,o),ih(s,u,i,a,o),ah(l,i,u,a,o),ah(l,u,i,a,o),ah(l,i,u,a,o)):s?(ih(s,i,u,a,o),ih(s,u,i,a,o),ih(s,i,u,a,o)):l&&(ah(l,i,u,a,o),ah(l,u,i,a,o),ah(l,i,u,a,o)),t}}function ih(e,t,r,n,i){for(let a=0,o=n*i;a{i<<=2,a<<=2,o<<=2,t(r,n,i+0,a+0,o),t(r,n,i+1,a+1,o),t(r,n,i+2,a+2,o),t(r,n,i+3,a+3,o)}}function fL(e){let t=Math.floor(e);if(t===e)return p0t(e);let r=e-t,n=2*e+1;return(i,a,o,s,l)=>{if(!((s-=l)>=o))return;let u=t*a[o],f=l*t,c=f+l;for(let p=o,h=o+f;p{if(!((a-=o)>=i))return;let s=e*n[i],l=o*e;for(let u=i,f=i+l;u=n&&++r;else{let n=-1;for(let i of e)(i=t(i,++n,e))!=null&&(i=+i)>=i&&++r}return r}function h0t(e){return e.length|0}function d0t(e){return!(e>0)}function v0t(e){return typeof e!="object"||"length"in e?e:Array.from(e)}function m0t(e){return t=>e(...t)}function cL(...e){let t=typeof e[e.length-1]=="function"&&m0t(e.pop());e=e.map(v0t);let r=e.map(h0t),n=e.length-1,i=new Array(n+1).fill(0),a=[];if(n<0||r.some(d0t))return a;for(;;){a.push(i.map((s,l)=>e[l][s]));let o=n;for(;++i[o]===r[o];){if(o===0)return t?a.map(t):a;i[o--]=0}}}function pL(e,t){var r=0,n=0;return Float64Array.from(e,t===void 0?i=>r+=+i||0:i=>r+=+t(i,n++,e)||0)}function Pm(e,t){let r=0,n,i=0,a=0;if(t===void 0)for(let o of e)o!=null&&(o=+o)>=o&&(n=o-i,i+=n/++r,a+=n*(o-i));else{let o=-1;for(let s of e)(s=t(s,++o,e))!=null&&(s=+s)>=s&&(n=s-i,i+=n/++r,a+=n*(s-i))}if(r>1)return a/(r-1)}function Rm(e,t){let r=Pm(e,t);return r&&Math.sqrt(r)}function ss(e,t){let r,n;if(t===void 0)for(let i of e)i!=null&&(r===void 0?i>=i&&(r=n=i):(r>i&&(r=i),n=a&&(r=n=a):(r>a&&(r=a),n0){for(o=t[--r];r>0&&(n=o,i=t[--r],o=n+i,a=i-(o-n),!a););r>0&&(a<0&&t[r-1]<0||a>0&&t[r-1]>0)&&(i=a*2,n=o+i,i==n-o&&(o=n))}return o}};function HW(e,t){let r=new Ae;if(t===void 0)for(let n of e)(n=+n)&&r.add(n);else{let n=-1;for(let i of e)(i=+t(i,++n,e))&&r.add(i)}return+r}function WW(e,t){let r=new Ae,n=-1;return Float64Array.from(e,t===void 0?i=>r.add(+i||0):i=>r.add(+t(i,++n,e)||0))}var Ta=class extends Map{constructor(t,r=qW){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(let[n,i]of t)this.set(n,i)}get(t){return super.get(hL(this,t))}has(t){return super.has(hL(this,t))}set(t,r){return super.set(YW(this,t),r)}delete(t){return super.delete(XW(this,t))}},Yn=class extends Set{constructor(t,r=qW){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(let n of t)this.add(n)}has(t){return super.has(hL(this,t))}add(t){return super.add(YW(this,t))}delete(t){return super.delete(XW(this,t))}};function hL({_intern:e,_key:t},r){let n=t(r);return e.has(n)?e.get(n):r}function YW({_intern:e,_key:t},r){let n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function XW({_intern:e,_key:t},r){let n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function qW(e){return e!==null&&typeof e=="object"?e.valueOf():e}function ls(e){return e}function Nm(e,...t){return oh(e,ls,ls,t)}function dL(e,...t){return oh(e,Array.from,ls,t)}function ZW(e,t){for(let r=1,n=t.length;ri.pop().map(([a,o])=>[...i,a,o]));return e}function KW(e,...t){return ZW(dL(e,...t),t)}function $W(e,t,...r){return ZW(vL(e,t,...r),r)}function Z_(e,t,...r){return oh(e,ls,t,r)}function vL(e,t,...r){return oh(e,Array.from,t,r)}function jW(e,...t){return oh(e,ls,JW,t)}function QW(e,...t){return oh(e,Array.from,JW,t)}function JW(e){if(e.length!==1)throw new Error("duplicate key");return e[0]}function oh(e,t,r,n){return function i(a,o){if(o>=n.length)return r(a);let s=new Ta,l=n[o++],u=-1;for(let f of a){let c=l(f,++u,a),p=s.get(c);p?p.push(f):s.set(c,[f])}for(let[f,c]of s)s.set(f,i(c,o));return t(s)}(e,0)}function km(e,t){return Array.from(t,r=>e[r])}function sh(e,...t){if(typeof e[Symbol.iterator]!="function")throw new TypeError("values is not iterable");e=Array.from(e);let[r]=t;if(r&&r.length!==2||t.length>1){let n=Uint32Array.from(e,(i,a)=>a);return t.length>1?(t=t.map(i=>e.map(i)),n.sort((i,a)=>{for(let o of t){let s=us(o[i],o[a]);if(s)return s}})):(r=e.map(r),n.sort((i,a)=>us(r[i],r[a]))),km(e,n)}return e.sort(Om(r))}function Om(e=oe){if(e===oe)return us;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{let n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function us(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}function mL(e,t,r){return(t.length!==2?sh(Z_(e,t,r),([n,i],[a,o])=>oe(i,o)||oe(n,a)):sh(Nm(e,r),([n,i],[a,o])=>t(i,o)||oe(n,a))).map(([n])=>n)}var tY=Array.prototype,eY=tY.slice,tle=tY.map;function zm(e){return()=>e}var g0t=Math.sqrt(50),y0t=Math.sqrt(10),x0t=Math.sqrt(2);function K_(e,t,r){let n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),o=a>=g0t?10:a>=y0t?5:a>=x0t?2:1,s,l,u;return i<0?(u=Math.pow(10,-i)/o,s=Math.round(e*u),l=Math.round(t*u),s/ut&&--l,u=-u):(u=Math.pow(10,i)*o,s=Math.round(e/u),l=Math.round(t/u),s*ut&&--l),l0))return[];if(e===t)return[e];let n=t=i))return[];let s=a-i+1,l=new Array(s);if(n)if(o<0)for(let u=0;u0?(e=Math.floor(e/i)*i,t=Math.ceil(t/i)*i):i<0&&(e=Math.ceil(e*i)/i,t=Math.floor(t*i)/i),n=i}}function Tf(e){return Math.max(1,Math.ceil(Math.log(os(e))/Math.LN2)+1)}function $_(){var e=ls,t=ss,r=Tf;function n(i){Array.isArray(i)||(i=Array.from(i));var a,o=i.length,s,l,u=new Array(o);for(a=0;a=p)if(x>=p&&t===ss){let S=Ma(c,p,_);isFinite(S)&&(S>0?p=(Math.floor(p/S)+1)*S:S<0&&(p=(Math.ceil(p*-S)+1)/-S))}else h.pop()}for(var d=h.length,m=0,v=d;h[m]<=c;)++m;for(;h[v-1]>p;)--v;(m||v0?h[a-1]:c,y.x1=a0)for(a=0;a=n)&&(r=n);else{let n=-1;for(let i of e)(i=t(i,++n,e))!=null&&(r=i)&&(r=i)}return r}function Mf(e,t){let r,n=-1,i=-1;if(t===void 0)for(let a of e)++i,a!=null&&(r=a)&&(r=a,n=i);else for(let a of e)(a=t(a,++i,e))!=null&&(r=a)&&(r=a,n=i);return n}function El(e,t){let r;if(t===void 0)for(let n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let i of e)(i=t(i,++n,e))!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}return r}function Af(e,t){let r,n=-1,i=-1;if(t===void 0)for(let a of e)++i,a!=null&&(r>a||r===void 0&&a>=a)&&(r=a,n=i);else for(let a of e)(a=t(a,++i,e))!=null&&(r>a||r===void 0&&a>=a)&&(r=a,n=i);return n}function Cf(e,t,r=0,n=1/0,i){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(i=i===void 0?us:Om(i);n>r;){if(n-r>600){let l=n-r+1,u=t-r+1,f=Math.log(l),c=.5*Math.exp(2*f/3),p=.5*Math.sqrt(f*c*(l-c)/l)*(u-l/2<0?-1:1),h=Math.max(r,Math.floor(t-u*c/l+p)),d=Math.min(n,Math.floor(t+(l-u)*c/l+p));Cf(e,t,h,d,i)}let a=e[t],o=r,s=n;for(Um(e,r,t),i(e[n],a)>0&&Um(e,r,n);o0;)--s}i(e[r],a)===0?Um(e,r,s):(++s,Um(e,s,n)),s<=t&&(r=s+1),t<=s&&(n=s-1)}return e}function Um(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}function Vm(e,t=oe){let r,n=!1;if(t.length===1){let i;for(let a of e){let o=t(a);(n?oe(o,i)>0:oe(o,o)===0)&&(r=a,i=o,n=!0)}}else for(let i of e)(n?t(i,r)>0:t(i,i)===0)&&(r=i,n=!0);return r}function po(e,t,r){if(e=Float64Array.from(OW(e,r)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return El(e);if(t>=1)return fs(e);var n,i=(n-1)*t,a=Math.floor(i),o=fs(Cf(e,a).subarray(0,a+1)),s=El(e.subarray(a+1));return o+(s-o)*(i-a)}}function j_(e,t,r=bf){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,a=Math.floor(i),o=+r(e[a],a,e),s=+r(e[a+1],a+1,e);return o+(s-o)*(i-a)}}function Q_(e,t,r=bf){if(!isNaN(t=+t)){if(n=Float64Array.from(e,(s,l)=>bf(r(e[l],l,e))),t<=0)return Af(n);if(t>=1)return Mf(n);var n,i=Uint32Array.from(e,(s,l)=>l),a=n.length-1,o=Math.floor(a*t);return Cf(i,o,0,a,(s,l)=>us(n[s],n[l])),o=Vm(i.subarray(0,o+1),s=>n[s]),o>=0?o:-1}}function gL(e,t,r){let n=os(e),i=po(e,.75)-po(e,.25);return n&&i?Math.ceil((r-t)/(2*i*Math.pow(n,-1/3))):1}function yL(e,t,r){let n=os(e),i=Rm(e);return n&&i?Math.ceil((r-t)*Math.cbrt(n)/(3.49*i)):1}function xL(e,t){let r=0,n=0;if(t===void 0)for(let i of e)i!=null&&(i=+i)>=i&&(++r,n+=i);else{let i=-1;for(let a of e)(a=t(a,++i,e))!=null&&(a=+a)>=a&&(++r,n+=a)}if(r)return n/r}function _L(e,t){return po(e,.5,t)}function rY(e,t){return Q_(e,.5,t)}function*_0t(e){for(let t of e)yield*t}function Df(e){return Array.from(_0t(e))}function bL(e,t){let r=new Ta;if(t===void 0)for(let a of e)a!=null&&a>=a&&r.set(a,(r.get(a)||0)+1);else{let a=-1;for(let o of e)(o=t(o,++a,e))!=null&&o>=o&&r.set(o,(r.get(o)||0)+1)}let n,i=0;for(let[a,o]of r)o>i&&(i=o,n=a);return n}function SL(e,t=b0t){let r=[],n,i=!1;for(let a of e)i&&r.push(t(n,a)),n=a,i=!0;return r}function b0t(e,t){return[e,t]}function Fi(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,a=new Array(i);++nt(r[s],r[l]),a,o;return e=Uint32Array.from(r,(s,l)=>l),e.sort(t===oe?(s,l)=>us(r[s],r[l]):Om(i)),e.forEach((s,l)=>{let u=i(s,a===void 0?s:a);u>=0?((a===void 0||u>0)&&(a=s,o=l),n[s]=o):n[s]=NaN}),n}function TL(e,t=oe){let r,n=!1;if(t.length===1){let i;for(let a of e){let o=t(a);(n?oe(o,i)<0:oe(o,o)===0)&&(r=a,i=o,n=!0)}}else for(let i of e)(n?t(i,r)<0:t(i,i)===0)&&(r=i,n=!0);return r}function Bm(e,t=oe){if(t.length===1)return Af(e,t);let r,n=-1,i=-1;for(let a of e)++i,(n<0?t(a,a)===0:t(a,r)<0)&&(r=a,n=i);return n}function ML(e,t=oe){if(t.length===1)return Mf(e,t);let r,n=-1,i=-1;for(let a of e)++i,(n<0?t(a,a)===0:t(a,r)>0)&&(r=a,n=i);return n}function AL(e,t){let r=Bm(e,t);return r<0?void 0:r}var nY=CL(Math.random);function CL(e){return function(r,n=0,i=r.length){let a=i-(n=+n);for(;a;){let o=e()*a--|0,s=r[a+n];r[a+n]=r[o+n],r[o+n]=s}return r}}function DL(e,t){let r=0;if(t===void 0)for(let n of e)(n=+n)&&(r+=n);else{let n=-1;for(let i of e)(i=+t(i,++n,e))&&(r+=i)}return r}function Fm(e){if(!(a=e.length))return[];for(var t=-1,r=El(e,S0t),n=new Array(r);++tt(r,n,e))}function NL(e,t,r){if(typeof t!="function")throw new TypeError("reducer is not a function");let n=e[Symbol.iterator](),i,a,o=-1;if(arguments.length<3){if({done:i,value:r}=n.next(),i)return;++o}for(;{done:i,value:a}=n.next(),!i;)r=t(r,a,++o,e);return r}function kL(e){if(typeof e[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from(e).reverse()}function OL(e,...t){e=new Yn(e);for(let r of t)for(let n of r)e.delete(n);return e}function zL(e,t){let r=t[Symbol.iterator](),n=new Yn;for(let i of e){if(n.has(i))return!1;let a,o;for(;({value:a,done:o}=r.next())&&!o;){if(Object.is(i,a))return!1;n.add(a)}}return!0}function UL(e,...t){e=new Yn(e),t=t.map(w0t);t:for(let r of e)for(let n of t)if(!n.has(r)){e.delete(r);continue t}return e}function w0t(e){return e instanceof Yn?e:new Yn(e)}function Gm(e,t){let r=e[Symbol.iterator](),n=new Set;for(let i of t){let a=iY(i);if(n.has(a))continue;let o,s;for(;{value:o,done:s}=r.next();){if(s)return!1;let l=iY(o);if(n.add(l),Object.is(a,l))break}}return!0}function iY(e){return e!==null&&typeof e=="object"?e.valueOf():e}function VL(e,t){return Gm(t,e)}function BL(...e){let t=new Yn;for(let r of e)for(let n of r)t.add(n);return t}function aY(e){return e}var J_=1,tb=2,FL=3,Hm=4,oY=1e-6;function T0t(e){return"translate("+e+",0)"}function M0t(e){return"translate(0,"+e+")"}function A0t(e){return t=>+e(t)}function C0t(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),r=>+e(r)+t}function D0t(){return!this.__axis}function eb(e,t){var r=[],n=null,i=null,a=6,o=6,s=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,u=e===J_||e===Hm?-1:1,f=e===Hm||e===tb?"x":"y",c=e===J_||e===FL?T0t:M0t;function p(h){var d=n??(t.ticks?t.ticks.apply(t,r):t.domain()),m=i??(t.tickFormat?t.tickFormat.apply(t,r):aY),v=Math.max(a,0)+s,g=t.range(),y=+g[0]+l,x=+g[g.length-1]+l,_=(t.bandwidth?C0t:A0t)(t.copy(),l),S=h.selection?h.selection():h,b=S.selectAll(".domain").data([null]),w=S.selectAll(".tick").data(d,t).order(),T=w.exit(),M=w.enter().append("g").attr("class","tick"),C=w.select("line"),A=w.select("text");b=b.merge(b.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),w=w.merge(M),C=C.merge(M.append("line").attr("stroke","currentColor").attr(f+"2",u*a)),A=A.merge(M.append("text").attr("fill","currentColor").attr(f,u*v).attr("dy",e===J_?"0em":e===FL?"0.71em":"0.32em")),h!==S&&(b=b.transition(h),w=w.transition(h),C=C.transition(h),A=A.transition(h),T=T.transition(h).attr("opacity",oY).attr("transform",function(P){return isFinite(P=_(P))?c(P+l):this.getAttribute("transform")}),M.attr("opacity",oY).attr("transform",function(P){var L=this.parentNode.__axis;return c((L&&isFinite(L=L(P))?L:_(P))+l)})),T.remove(),b.attr("d",e===Hm||e===tb?o?"M"+u*o+","+y+"H"+l+"V"+x+"H"+u*o:"M"+l+","+y+"V"+x:o?"M"+y+","+u*o+"V"+l+"H"+x+"V"+u*o:"M"+y+","+l+"H"+x),w.attr("opacity",1).attr("transform",function(P){return c(_(P)+l)}),C.attr(f+"2",u*a),A.attr(f,u*v).text(m),S.filter(D0t).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===tb?"start":e===Hm?"end":"middle"),S.each(function(){this.__axis=_})}return p.scale=function(h){return arguments.length?(t=h,p):t},p.ticks=function(){return r=Array.from(arguments),p},p.tickArguments=function(h){return arguments.length?(r=h==null?[]:Array.from(h),p):r.slice()},p.tickValues=function(h){return arguments.length?(n=h==null?null:Array.from(h),p):n&&n.slice()},p.tickFormat=function(h){return arguments.length?(i=h,p):i},p.tickSize=function(h){return arguments.length?(a=o=+h,p):a},p.tickSizeInner=function(h){return arguments.length?(a=+h,p):a},p.tickSizeOuter=function(h){return arguments.length?(o=+h,p):o},p.tickPadding=function(h){return arguments.length?(s=+h,p):s},p.offset=function(h){return arguments.length?(l=+h,p):l},p}function sY(e){return eb(J_,e)}function lY(e){return eb(tb,e)}function uY(e){return eb(FL,e)}function fY(e){return eb(Hm,e)}var E0t={value:()=>{}};function pY(){for(var e=0,t=arguments.length,r={},n;e=0&&(n=r.slice(i+1),r=r.slice(0,i)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}rb.prototype=pY.prototype={constructor:rb,on:function(e,t){var r=this._,n=I0t(e+"",r),i,a=-1,o=n.length;if(arguments.length<2){for(;++a0)for(var r=new Array(i),n=0,i,a;n=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),Wm.hasOwnProperty(t)?{space:Wm[t],local:e}:e}function P0t(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===nb&&t.documentElement.namespaceURI===nb?t.createElement(e):t.createElementNS(r,e)}}function R0t(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Il(e){var t=ho(e);return(t.local?R0t:P0t)(t)}function N0t(){}function Ll(e){return e==null?N0t:function(){return this.querySelector(e)}}function hY(e){typeof e!="function"&&(e=Ll(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i=x&&(x=y+1);!(S=v[x])&&++x=0;)(o=n[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function MY(e){e||(e=q0t);function t(c,p){return c&&p?e(c.__data__,p.__data__):!c-!p}for(var r=this._groups,n=r.length,i=new Array(n),a=0;at?1:e>=t?0:NaN}function AY(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function CY(){return Array.from(this)}function DY(){for(var e=this._groups,t=0,r=e.length;t1?this.each((t==null?txt:typeof t=="function"?rxt:ext)(e,t,r??"")):cs(this.node(),e)}function cs(e,t){return e.style.getPropertyValue(t)||fh(e).getComputedStyle(e,null).getPropertyValue(t)}function nxt(e){return function(){delete this[e]}}function ixt(e,t){return function(){this[e]=t}}function axt(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function NY(e,t){return arguments.length>1?this.each((t==null?nxt:typeof t=="function"?axt:ixt)(e,t)):this.node()[e]}function kY(e){return e.trim().split(/^|\s+/)}function GL(e){return e.classList||new OY(e)}function OY(e){this._node=e,this._names=kY(e.getAttribute("class")||"")}OY.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function zY(e,t){for(var r=GL(e),n=-1,i=t.length;++n=0&&(r=t.slice(n+1),t=t.slice(0,n)),{type:t,name:r}})}function wxt(e){return function(){var t=this.__on;if(t){for(var r=0,n=-1,i=t.length,a;rAr(r,t))}function rX(e){return typeof e=="string"?new ke([document.querySelectorAll(e)],[document.documentElement]):new ke([Ym(e)],qm)}var nX={passive:!1},Ef={capture:!0,passive:!1};function lb(e){e.stopImmediatePropagation()}function Pl(e){e.preventDefault(),e.stopImmediatePropagation()}function Rl(e){var t=e.document.documentElement,r=$e(e).on("dragstart.drag",Pl,Ef);"onselectstart"in t?r.on("selectstart.drag",Pl,Ef):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Nl(e,t){var r=e.document.documentElement,n=$e(e).on("dragstart.drag",null);t&&(n.on("click.drag",Pl,Ef),setTimeout(function(){n.on("click.drag",null)},0)),"onselectstart"in r?n.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}var Zm=e=>()=>e;function Km(e,{sourceEvent:t,subject:r,target:n,identifier:i,active:a,x:o,y:s,dx:l,dy:u,dispatch:f}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:o,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:f}})}Km.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Ext(e){return!e.ctrlKey&&!e.button}function Ixt(){return this.parentNode}function Lxt(e,t){return t??{x:e.x,y:e.y}}function Pxt(){return navigator.maxTouchPoints||"ontouchstart"in this}function iX(){var e=Ext,t=Ixt,r=Lxt,n=Pxt,i={},a=Gi("start","drag","end"),o=0,s,l,u,f,c=0;function p(_){_.on("mousedown.drag",h).filter(n).on("touchstart.drag",v).on("touchmove.drag",g,nX).on("touchend.drag touchcancel.drag",y).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(_,S){if(!(f||!e.call(this,_,S))){var b=x(this,t.call(this,_,S),_,S,"mouse");b&&($e(_.view).on("mousemove.drag",d,Ef).on("mouseup.drag",m,Ef),Rl(_.view),lb(_),u=!1,s=_.clientX,l=_.clientY,b("start",_))}}function d(_){if(Pl(_),!u){var S=_.clientX-s,b=_.clientY-l;u=S*S+b*b>c}i.mouse("drag",_)}function m(_){$e(_.view).on("mousemove.drag mouseup.drag",null),Nl(_.view,u),Pl(_),i.mouse("end",_)}function v(_,S){if(e.call(this,_,S)){var b=_.changedTouches,w=t.call(this,_,S),T=b.length,M,C;for(M=0;M>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?ub(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?ub(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Nxt.exec(e))?new ur(t[1],t[2],t[3],1):(t=kxt.exec(e))?new ur(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Oxt.exec(e))?ub(t[1],t[2],t[3],t[4]):(t=zxt.exec(e))?ub(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Uxt.exec(e))?cX(t[1],t[2]/100,t[3]/100,1):(t=Vxt.exec(e))?cX(t[1],t[2]/100,t[3]/100,t[4]):aX.hasOwnProperty(e)?lX(aX[e]):e==="transparent"?new ur(NaN,NaN,NaN,0):null}function lX(e){return new ur(e>>16&255,e>>8&255,e&255,1)}function ub(e,t,r,n){return n<=0&&(e=t=r=NaN),new ur(e,t,r,n)}function jm(e){return e instanceof go||(e=Hi(e)),e?(e=e.rgb(),new ur(e.r,e.g,e.b,e.opacity)):new ur}function hs(e,t,r,n){return arguments.length===1?jm(e):new ur(e,t,r,n??1)}function ur(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}ps(ur,hs,kl(go,{brighter(e){return e=e==null?Pf:Math.pow(Pf,e),new ur(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ol:Math.pow(Ol,e),new ur(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ur(Lf(this.r),Lf(this.g),Lf(this.b),cb(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:uX,formatHex:uX,formatHex8:Gxt,formatRgb:fX,toString:fX}));function uX(){return`#${If(this.r)}${If(this.g)}${If(this.b)}`}function Gxt(){return`#${If(this.r)}${If(this.g)}${If(this.b)}${If((isNaN(this.opacity)?1:this.opacity)*255)}`}function fX(){let e=cb(this.opacity);return`${e===1?"rgb(":"rgba("}${Lf(this.r)}, ${Lf(this.g)}, ${Lf(this.b)}${e===1?")":`, ${e})`}`}function cb(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Lf(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function If(e){return e=Lf(e),(e<16?"0":"")+e.toString(16)}function cX(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Aa(e,t,r,n)}function hX(e){if(e instanceof Aa)return new Aa(e.h,e.s,e.l,e.opacity);if(e instanceof go||(e=Hi(e)),!e)return new Aa;if(e instanceof Aa)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=NaN,s=a-i,l=(a+i)/2;return s?(t===a?o=(r-n)/s+(r0&&l<1?0:o,new Aa(o,s,l,e.opacity)}function ph(e,t,r,n){return arguments.length===1?hX(e):new Aa(e,t,r,n??1)}function Aa(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}ps(Aa,ph,kl(go,{brighter(e){return e=e==null?Pf:Math.pow(Pf,e),new Aa(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ol:Math.pow(Ol,e),new Aa(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new ur(WL(e>=240?e-240:e+120,i,n),WL(e,i,n),WL(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new Aa(pX(this.h),fb(this.s),fb(this.l),cb(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=cb(this.opacity);return`${e===1?"hsl(":"hsla("}${pX(this.h)}, ${fb(this.s)*100}%, ${fb(this.l)*100}%${e===1?")":`, ${e})`}`}}));function pX(e){return e=(e||0)%360,e<0?e+360:e}function fb(e){return Math.max(0,Math.min(1,e||0))}function WL(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}var pb=Math.PI/180,hb=180/Math.PI;var db=18,dX=.96422,vX=1,mX=.82521,gX=4/29,hh=6/29,yX=3*hh*hh,Hxt=hh*hh*hh;function xX(e){if(e instanceof Ca)return new Ca(e.l,e.a,e.b,e.opacity);if(e instanceof yo)return wX(e);e instanceof ur||(e=jm(e));var t=ZL(e.r),r=ZL(e.g),n=ZL(e.b),i=YL((.2225045*t+.7168786*r+.0606169*n)/vX),a,o;return t===r&&r===n?a=o=i:(a=YL((.4360747*t+.3850649*r+.1430804*n)/dX),o=YL((.0139322*t+.0971045*r+.7141733*n)/mX)),new Ca(116*i-16,500*(a-i),200*(i-o),e.opacity)}function _X(e,t){return new Ca(e,0,0,t??1)}function Rf(e,t,r,n){return arguments.length===1?xX(e):new Ca(e,t,r,n??1)}function Ca(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}ps(Ca,Rf,kl(go,{brighter(e){return new Ca(this.l+db*(e??1),this.a,this.b,this.opacity)},darker(e){return new Ca(this.l-db*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,r=isNaN(this.b)?e:e-this.b/200;return t=dX*XL(t),e=vX*XL(e),r=mX*XL(r),new ur(qL(3.1338561*t-1.6168667*e-.4906146*r),qL(-.9787684*t+1.9161415*e+.033454*r),qL(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}}));function YL(e){return e>Hxt?Math.pow(e,1/3):e/yX+gX}function XL(e){return e>hh?e*e*e:yX*(e-gX)}function qL(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function ZL(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function bX(e){if(e instanceof yo)return new yo(e.h,e.c,e.l,e.opacity);if(e instanceof Ca||(e=xX(e)),e.a===0&&e.b===0)return new yo(NaN,0=1?(r=1,t-1):Math.floor(r*t),i=e[n],a=e[n+1],o=n>0?e[n-1]:2*i-a,s=n()=>e;function DX(e,t){return function(r){return e+r*t}}function Yxt(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function zl(e,t){var r=t-e;return r?DX(e,r>180||r<-180?r-360*Math.round(r/360):r):vh(isNaN(e)?t:e)}function EX(e){return(e=+e)==1?Fe:function(t,r){return r-t?Yxt(t,r,e):vh(isNaN(t)?r:t)}}function Fe(e,t){var r=t-e;return r?DX(e,r):vh(isNaN(e)?t:e)}var Ul=function e(t){var r=EX(t);function n(i,a){var o=r((i=hs(i)).r,(a=hs(a)).r),s=r(i.g,a.g),l=r(i.b,a.b),u=Fe(i.opacity,a.opacity);return function(f){return i.r=o(f),i.g=s(f),i.b=l(f),i.opacity=u(f),i+""}}return n.gamma=e,n}(1);function IX(e){return function(t){var r=t.length,n=new Array(r),i=new Array(r),a=new Array(r),o,s;for(o=0;or&&(a=t.slice(r,a),s[o]?s[o]+=a:s[++o]=a),(n=n[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,l.push({i:o,x:Cr(n,i)})),r=JL.lastIndex;return r180?f+=360:f-u>180&&(u+=360),p.push({i:c.push(i(c)+"rotate(",null,n)-2,x:Cr(u,f)})):f&&c.push(i(c)+"rotate("+f+n)}function s(u,f,c,p){u!==f?p.push({i:c.push(i(c)+"skewX(",null,n)-2,x:Cr(u,f)}):f&&c.push(i(c)+"skewX("+f+n)}function l(u,f,c,p,h,d){if(u!==c||f!==p){var m=h.push(i(h)+"scale(",null,",",null,")");d.push({i:m-4,x:Cr(u,c)},{i:m-2,x:Cr(f,p)})}else(c!==1||p!==1)&&h.push(i(h)+"scale("+c+","+p+")")}return function(u,f){var c=[],p=[];return u=e(u),f=e(f),a(u.translateX,u.translateY,f.translateX,f.translateY,c,p),o(u.rotate,f.rotate,c,p),s(u.skewX,f.skewX,c,p),l(u.scaleX,u.scaleY,f.scaleX,f.scaleY,c,p),u=f=null,function(h){for(var d=-1,m=p.length,v;++d=0&&e._call.call(void 0,t),e=e._next;--yh}function KX(){Of=(Db=ng.now())+Eb,yh=eg=0;try{iP()}finally{yh=0,Jxt(),Of=0}}function Qxt(){var e=ng.now(),t=e-Db;t>$X&&(Eb-=t,Db=e)}function Jxt(){for(var e,t=Cb,r,n=1/0;t;)t._call?(n>t._time&&(n=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:Cb=r);rg=e,nP(n)}function nP(e){if(!yh){eg&&(eg=clearTimeout(eg));var t=e-Of;t>24?(e<1/0&&(eg=setTimeout(KX,e-ng.now()-Eb)),tg&&(tg=clearInterval(tg))):(tg||(Db=ng.now(),tg=setInterval(Qxt,$X)),yh=1,jX(KX))}}function ig(e,t,r){var n=new zf;return t=t==null?0:+t,n.restart(i=>{n.stop(),e(i+t)},t,r),n}function QX(e,t,r){var n=new zf,i=t;return t==null?(n.restart(e,t,r),n):(n._restart=n.restart,n.restart=function(a,o,s){o=+o,s=s==null?Bl():+s,n._restart(function l(u){u+=i,n._restart(l,i+=o,s),a(u)},o,s)},n.restart(e,t,r),n)}var t1t=Gi("start","end","cancel","interrupt"),e1t=[],tq=0,Lb=1,Pb=2,Ib=3,JX=4,Rb=5,ag=6;function Fl(e,t,r,n,i,a){var o=e.__transition;if(!o)e.__transition={};else if(r in o)return;r1t(e,r,{name:t,index:n,group:i,on:t1t,tween:e1t,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:tq})}function og(e,t){var r=xr(e,t);if(r.state>tq)throw new Error("too late; already scheduled");return r}function Fr(e,t){var r=xr(e,t);if(r.state>Ib)throw new Error("too late; already running");return r}function xr(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function r1t(e,t,r){var n=e.__transition,i;n[t]=r,r.timer=Uf(a,0,r.time);function a(u){r.state=Lb,r.timer.restart(o,r.delay,r.time),r.delay<=u&&o(u-r.delay)}function o(u){var f,c,p,h;if(r.state!==Lb)return l();for(f in n)if(h=n[f],h.name===r.name){if(h.state===Ib)return ig(o);h.state===JX?(h.state=ag,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete n[f]):+fPb&&n.state=0&&(t=t.slice(0,r)),!t||t==="start"})}function S1t(e,t,r){var n,i,a=b1t(t)?og:Fr;return function(){var o=a(this,e),s=o.on;s!==n&&(i=(n=s).copy()).on(t,r),o.on=i}}function cq(e,t){var r=this._id;return arguments.length<2?xr(this.node(),r).on.on(e):this.each(S1t(r,e,t))}function w1t(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function pq(){return this.on("end.remove",w1t(this._id))}function hq(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Ll(e));for(var n=this._groups,i=n.length,a=new Array(i),o=0;o+e;function Tq(e){return e*e}function Mq(e){return e*(2-e)}function aP(e){return((e*=2)<=1?e*e:--e*(2-e)+1)/2}function Aq(e){return e*e*e}function Cq(e){return--e*e*e+1}function sg(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var oP=3,Dq=function e(t){t=+t;function r(n){return Math.pow(n,t)}return r.exponent=e,r}(oP),Eq=function e(t){t=+t;function r(n){return 1-Math.pow(1-n,t)}return r.exponent=e,r}(oP),sP=function e(t){t=+t;function r(n){return((n*=2)<=1?Math.pow(n,t):2-Math.pow(2-n,t))/2}return r.exponent=e,r}(oP);var Iq=Math.PI,Lq=Iq/2;function Pq(e){return+e==1?1:1-Math.cos(e*Lq)}function Rq(e){return Math.sin(e*Lq)}function lP(e){return(1-Math.cos(Iq*e))/2}function xo(e){return(Math.pow(2,-10*e)-.0009765625)*1.0009775171065494}function Nq(e){return xo(1-+e)}function kq(e){return 1-xo(e)}function uP(e){return((e*=2)<=1?xo(1-e):2-xo(e-1))/2}function Oq(e){return 1-Math.sqrt(1-e*e)}function zq(e){return Math.sqrt(1- --e*e)}function fP(e){return((e*=2)<=1?1-Math.sqrt(1-e*e):Math.sqrt(1-(e-=2)*e)+1)/2}var cP=.36363636363636365,O1t=6/11,z1t=8/11,U1t=3/4,V1t=9/11,B1t=10/11,F1t=15/16,G1t=21/22,H1t=63/64,zb=1/cP/cP;function Uq(e){return 1-_h(1-e)}function _h(e){return(e=+e)Lb&&n.name===t)return new Gr([[e]],X1t,t,+i)}return null}var Ub=e=>()=>e;function gP(e,{sourceEvent:t,target:r,selection:n,mode:i,dispatch:a}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},selection:{value:n,enumerable:!0,configurable:!0},mode:{value:i,enumerable:!0,configurable:!0},_:{value:a}})}function Xq(e){e.stopImmediatePropagation()}function Vb(e){e.preventDefault(),e.stopImmediatePropagation()}var qq={name:"drag"},yP={name:"space"},Sh={name:"handle"},wh={name:"center"},{abs:Zq,max:tn,min:en}=Math;function Kq(e){return[+e[0],+e[1]]}function _P(e){return[Kq(e[0]),Kq(e[1])]}var Bb={name:"x",handles:["w","e"].map(lg),input:function(e,t){return e==null?null:[[+e[0],t[0][1]],[+e[1],t[1][1]]]},output:function(e){return e&&[e[0][0],e[1][0]]}},Fb={name:"y",handles:["n","s"].map(lg),input:function(e,t){return e==null?null:[[t[0][0],+e[0]],[t[1][0],+e[1]]]},output:function(e){return e&&[e[0][1],e[1][1]]}},q1t={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(lg),input:function(e){return e==null?null:_P(e)},output:function(e){return e}},vs={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},$q={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},jq={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},Z1t={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},K1t={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function lg(e){return{type:e}}function $1t(e){return!e.ctrlKey&&!e.button}function j1t(){var e=this.ownerSVGElement||this;return e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]}function Q1t(){return navigator.maxTouchPoints||"ontouchstart"in this}function xP(e){for(;!e.__brush;)if(!(e=e.parentNode))return;return e.__brush}function J1t(e){return e[0][0]===e[1][0]||e[0][1]===e[1][1]}function Qq(e){var t=e.__brush;return t?t.dim.output(t.selection):null}function Jq(){return bP(Bb)}function tZ(){return bP(Fb)}function eZ(){return bP(q1t)}function bP(e){var t=j1t,r=$1t,n=Q1t,i=!0,a=Gi("start","brush","end"),o=6,s;function l(v){var g=v.property("__brush",m).selectAll(".overlay").data([lg("overlay")]);g.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",vs.overlay).merge(g).each(function(){var x=xP(this).extent;$e(this).attr("x",x[0][0]).attr("y",x[0][1]).attr("width",x[1][0]-x[0][0]).attr("height",x[1][1]-x[0][1])}),v.selectAll(".selection").data([lg("selection")]).enter().append("rect").attr("class","selection").attr("cursor",vs.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var y=v.selectAll(".handle").data(e.handles,function(x){return x.type});y.exit().remove(),y.enter().append("rect").attr("class",function(x){return"handle handle--"+x.type}).attr("cursor",function(x){return vs[x.type]}),v.each(u).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",p).filter(n).on("touchstart.brush",p).on("touchmove.brush",h).on("touchend.brush touchcancel.brush",d).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}l.move=function(v,g,y){v.tween?v.on("start.brush",function(x){f(this,arguments).beforestart().start(x)}).on("interrupt.brush end.brush",function(x){f(this,arguments).end(x)}).tween("brush",function(){var x=this,_=x.__brush,S=f(x,arguments),b=_.selection,w=e.input(typeof g=="function"?g.apply(this,arguments):g,_.extent),T=Jr(b,w);function M(C){_.selection=C===1&&w===null?null:T(C),u.call(x),S.brush()}return b!==null&&w!==null?M:M(1)}):v.each(function(){var x=this,_=arguments,S=x.__brush,b=e.input(typeof g=="function"?g.apply(x,_):g,S.extent),w=f(x,_).beforestart();Da(x),S.selection=b===null?null:b,u.call(x),w.start(y).brush(y).end(y)})},l.clear=function(v,g){l.move(v,null,g)};function u(){var v=$e(this),g=xP(this).selection;g?(v.selectAll(".selection").style("display",null).attr("x",g[0][0]).attr("y",g[0][1]).attr("width",g[1][0]-g[0][0]).attr("height",g[1][1]-g[0][1]),v.selectAll(".handle").style("display",null).attr("x",function(y){return y.type[y.type.length-1]==="e"?g[1][0]-o/2:g[0][0]-o/2}).attr("y",function(y){return y.type[0]==="s"?g[1][1]-o/2:g[0][1]-o/2}).attr("width",function(y){return y.type==="n"||y.type==="s"?g[1][0]-g[0][0]+o:o}).attr("height",function(y){return y.type==="e"||y.type==="w"?g[1][1]-g[0][1]+o:o})):v.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function f(v,g,y){var x=v.__brush.emitter;return x&&(!y||!x.clean)?x:new c(v,g,y)}function c(v,g,y){this.that=v,this.args=g,this.state=v.__brush,this.active=0,this.clean=y}c.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(v,g){return this.starting?(this.starting=!1,this.emit("start",v,g)):this.emit("brush",v),this},brush:function(v,g){return this.emit("brush",v,g),this},end:function(v,g){return--this.active===0&&(delete this.state.emitter,this.emit("end",v,g)),this},emit:function(v,g,y){var x=$e(this.that).datum();a.call(v,this.that,new gP(v,{sourceEvent:g,target:l,selection:e.output(this.state.selection),mode:y,dispatch:a}),x)}};function p(v){if(s&&!v.touches||!r.apply(this,arguments))return;var g=this,y=v.target.__data__.type,x=(i&&v.metaKey?y="overlay":y)==="selection"?qq:i&&v.altKey?wh:Sh,_=e===Fb?null:Z1t[y],S=e===Bb?null:K1t[y],b=xP(g),w=b.extent,T=b.selection,M=w[0][0],C,A,P=w[0][1],L,I,E=w[1][0],R,k,O=w[1][1],z,U,G=0,Y=0,et,tt=_&&S&&i&&v.shiftKey,lt,Mt,ut=Array.from(v.touches||[v],Dt=>{let ve=Dt.identifier;return Dt=Ar(Dt,g),Dt.point0=Dt.slice(),Dt.identifier=ve,Dt});Da(g);var ct=f(g,arguments,!0).beforestart();if(y==="overlay"){T&&(et=!0);let Dt=[ut[0],ut[1]||ut[0]];b.selection=T=[[C=e===Fb?M:en(Dt[0][0],Dt[1][0]),L=e===Bb?P:en(Dt[0][1],Dt[1][1])],[R=e===Fb?E:tn(Dt[0][0],Dt[1][0]),z=e===Bb?O:tn(Dt[0][1],Dt[1][1])]],ut.length>1&&Gt(v)}else C=T[0][0],L=T[0][1],R=T[1][0],z=T[1][1];A=C,I=L,k=R,U=z;var K=$e(g).attr("pointer-events","none"),ot=K.selectAll(".overlay").attr("cursor",vs[y]);if(v.touches)ct.moved=W,ct.ended=Tt;else{var Q=$e(v.view).on("mousemove.brush",W,!0).on("mouseup.brush",Tt,!0);i&&Q.on("keydown.brush",te,!0).on("keyup.brush",Jt,!0),Rl(v.view)}u.call(g),ct.start(v,x.name);function W(Dt){for(let ve of Dt.changedTouches||[Dt])for(let ar of ut)ar.identifier===ve.identifier&&(ar.cur=Ar(ve,g));if(tt&&!lt&&!Mt&&ut.length===1){let ve=ut[0];Zq(ve.cur[0]-ve[0])>Zq(ve.cur[1]-ve[1])?Mt=!0:lt=!0}for(let ve of ut)ve.cur&&(ve[0]=ve.cur[0],ve[1]=ve.cur[1]);et=!0,Vb(Dt),Gt(Dt)}function Gt(Dt){let ve=ut[0],ar=ve.point0;var jn;switch(G=ve[0]-ar[0],Y=ve[1]-ar[1],x){case yP:case qq:{_&&(G=tn(M-C,en(E-R,G)),A=C+G,k=R+G),S&&(Y=tn(P-L,en(O-z,Y)),I=L+Y,U=z+Y);break}case Sh:{ut[1]?(_&&(A=tn(M,en(E,ut[0][0])),k=tn(M,en(E,ut[1][0])),_=1),S&&(I=tn(P,en(O,ut[0][1])),U=tn(P,en(O,ut[1][1])),S=1)):(_<0?(G=tn(M-C,en(E-C,G)),A=C+G,k=R):_>0&&(G=tn(M-R,en(E-R,G)),A=C,k=R+G),S<0?(Y=tn(P-L,en(O-L,Y)),I=L+Y,U=z):S>0&&(Y=tn(P-z,en(O-z,Y)),I=L,U=z+Y));break}case wh:{_&&(A=tn(M,en(E,C-G*_)),k=tn(M,en(E,R+G*_))),S&&(I=tn(P,en(O,L-Y*S)),U=tn(P,en(O,z+Y*S)));break}}k0&&(C=A-G),S<0?z=U-Y:S>0&&(L=I-Y),x=yP,ot.attr("cursor",vs.selection),Gt(Dt));break}default:return}Vb(Dt)}function Jt(Dt){switch(Dt.keyCode){case 16:{tt&&(lt=Mt=tt=!1,Gt(Dt));break}case 18:{x===wh&&(_<0?R=k:_>0&&(C=A),S<0?z=U:S>0&&(L=I),x=Sh,Gt(Dt));break}case 32:{x===yP&&(Dt.altKey?(_&&(R=k-G*_,C=A+G*_),S&&(z=U-Y*S,L=I+Y*S),x=wh):(_<0?R=k:_>0&&(C=A),S<0?z=U:S>0&&(L=I),x=Sh),ot.attr("cursor",vs[y]),Gt(Dt));break}default:return}Vb(Dt)}}function h(v){f(this,arguments).moved(v)}function d(v){f(this,arguments).ended(v)}function m(){var v=this.__brush||{selection:null};return v.extent=_P(t.apply(this,arguments)),v.dim=e,v}return l.extent=function(v){return arguments.length?(t=typeof v=="function"?v:Ub(_P(v)),l):t},l.filter=function(v){return arguments.length?(r=typeof v=="function"?v:Ub(!!v),l):r},l.touchable=function(v){return arguments.length?(n=typeof v=="function"?v:Ub(!!v),l):n},l.handleSize=function(v){return arguments.length?(o=+v,l):o},l.keyModifiers=function(v){return arguments.length?(i=!!v,l):i},l.on=function(){var v=a.on.apply(a,arguments);return v===a?l:v},l}var SP=Math.abs,Vf=Math.cos,Bf=Math.sin,rZ=Math.PI,ug=rZ/2,wP=rZ*2,TP=Math.max,Gb=1e-12;function MP(e,t){return Array.from({length:t-e},(r,n)=>e+n)}function t_t(e){return function(t,r){return e(t.source.value+t.target.value,r.source.value+r.target.value)}}function nZ(){return AP(!1,!1)}function iZ(){return AP(!1,!0)}function aZ(){return AP(!0,!1)}function AP(e,t){var r=0,n=null,i=null,a=null;function o(s){var l=s.length,u=new Array(l),f=MP(0,l),c=new Array(l*l),p=new Array(l),h=0,d;s=Float64Array.from({length:l*l},t?(m,v)=>s[v%l][v/l|0]:(m,v)=>s[v/l|0][v%l]);for(let m=0;mn(u[v],u[g]));for(let v of f){let g=m;if(e){let y=MP(~l+1,l).filter(x=>x<0?s[~x*l+v]:s[v*l+x]);i&&y.sort((x,_)=>i(x<0?-s[~x*l+v]:s[v*l+x],_<0?-s[~_*l+v]:s[v*l+_]));for(let x of y)if(x<0){let _=c[~x*l+v]||(c[~x*l+v]={source:null,target:null});_.target={index:v,startAngle:m,endAngle:m+=s[~x*l+v]*h,value:s[~x*l+v]}}else{let _=c[v*l+x]||(c[v*l+x]={source:null,target:null});_.source={index:v,startAngle:m,endAngle:m+=s[v*l+x]*h,value:s[v*l+x]}}p[v]={index:v,startAngle:g,endAngle:m,value:u[v]}}else{let y=MP(0,l).filter(x=>s[v*l+x]||s[x*l+v]);i&&y.sort((x,_)=>i(s[v*l+x],s[v*l+_]));for(let x of y){let _;if(v=0))throw new Error(`invalid digits: ${e}`);if(t>15)return oZ;let r=10**t;return function(n){this._+=n[0];for(let i=1,a=n.length;iFf)if(!(Math.abs(c*l-u*f)>Ff)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let h=n-o,d=i-s,m=l*l+u*u,v=h*h+d*d,g=Math.sqrt(m),y=Math.sqrt(p),x=a*Math.tan((CP-Math.acos((m+p-v)/(2*g*y)))/2),_=x/y,S=x/g;Math.abs(_-1)>Ff&&this._append`L${t+_*f},${r+_*c}`,this._append`A${a},${a},0,0,${+(c*h>f*d)},${this._x1=t+S*l},${this._y1=r+S*u}`}}arc(t,r,n,i,a,o){if(t=+t,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let s=n*Math.cos(i),l=n*Math.sin(i),u=t+s,f=r+l,c=1^o,p=o?i-a:a-i;this._x1===null?this._append`M${u},${f}`:(Math.abs(this._x1-u)>Ff||Math.abs(this._y1-f)>Ff)&&this._append`L${u},${f}`,n&&(p<0&&(p=p%DP+DP),p>e_t?this._append`A${n},${n},0,1,${c},${t-s},${r-l}A${n},${n},0,1,${c},${this._x1=u},${this._y1=f}`:p>Ff&&this._append`A${n},${n},0,${+(p>=CP)},${c},${this._x1=t+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}};function fg(){return new ms}fg.prototype=ms.prototype;function sZ(e=3){return new ms(+e)}var lZ=Array.prototype.slice;function Gl(e){return function(){return e}}function n_t(e){return e.source}function i_t(e){return e.target}function uZ(e){return e.radius}function a_t(e){return e.startAngle}function o_t(e){return e.endAngle}function s_t(){return 0}function l_t(){return 10}function fZ(e){var t=n_t,r=i_t,n=uZ,i=uZ,a=a_t,o=o_t,s=s_t,l=null;function u(){var f,c=t.apply(this,arguments),p=r.apply(this,arguments),h=s.apply(this,arguments)/2,d=lZ.call(arguments),m=+n.apply(this,(d[0]=c,d)),v=a.apply(this,d)-ug,g=o.apply(this,d)-ug,y=+i.apply(this,(d[0]=p,d)),x=a.apply(this,d)-ug,_=o.apply(this,d)-ug;if(l||(l=f=fg()),h>Gb&&(SP(g-v)>h*2+Gb?g>v?(v+=h,g-=h):(v-=h,g+=h):v=g=(v+g)/2,SP(_-x)>h*2+Gb?_>x?(x+=h,_-=h):(x-=h,_+=h):x=_=(x+_)/2),l.moveTo(m*Vf(v),m*Bf(v)),l.arc(0,0,m,v,g),v!==x||g!==_)if(e){var S=+e.apply(this,arguments),b=y-S,w=(x+_)/2;l.quadraticCurveTo(0,0,b*Vf(x),b*Bf(x)),l.lineTo(y*Vf(w),y*Bf(w)),l.lineTo(b*Vf(_),b*Bf(_))}else l.quadraticCurveTo(0,0,y*Vf(x),y*Bf(x)),l.arc(0,0,y,x,_);if(l.quadraticCurveTo(0,0,m*Vf(v),m*Bf(v)),l.closePath(),f)return l=null,f+""||null}return e&&(u.headRadius=function(f){return arguments.length?(e=typeof f=="function"?f:Gl(+f),u):e}),u.radius=function(f){return arguments.length?(n=i=typeof f=="function"?f:Gl(+f),u):n},u.sourceRadius=function(f){return arguments.length?(n=typeof f=="function"?f:Gl(+f),u):n},u.targetRadius=function(f){return arguments.length?(i=typeof f=="function"?f:Gl(+f),u):i},u.startAngle=function(f){return arguments.length?(a=typeof f=="function"?f:Gl(+f),u):a},u.endAngle=function(f){return arguments.length?(o=typeof f=="function"?f:Gl(+f),u):o},u.padAngle=function(f){return arguments.length?(s=typeof f=="function"?f:Gl(+f),u):s},u.source=function(f){return arguments.length?(t=f,u):t},u.target=function(f){return arguments.length?(r=f,u):r},u.context=function(f){return arguments.length?(l=f??null,u):l},u}function cZ(){return fZ()}function pZ(){return fZ(l_t)}var u_t=Array.prototype,Hb=u_t.slice;function hZ(e,t){return e-t}function dZ(e){for(var t=0,r=e.length,n=e[r-1][1]*e[0][0]-e[r-1][0]*e[0][1];++t()=>e;function vZ(e,t){for(var r=-1,n=t.length,i;++rn!=h>n&&r<(p-u)*(n-f)/(h-f)+u&&(i=-i)}return i}function c_t(e,t,r){var n;return p_t(e,t,r)&&h_t(e[n=+(e[0]===t[0])],r[n],t[n])}function p_t(e,t,r){return(t[0]-e[0])*(r[1]-e[1])===(r[0]-e[0])*(t[1]-e[1])}function h_t(e,t,r){return e<=t&&t<=r||r<=t&&t<=e}function mZ(){}var gs=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function cg(){var e=1,t=1,r=Tf,n=l;function i(u){var f=r(u);if(Array.isArray(f))f=f.slice().sort(hZ);else{let c=ss(u,d_t);for(f=Xn(...wf(c[0],c[1],f),f);f[f.length-1]>=c[1];)f.pop();for(;f[1]a(u,c))}function a(u,f){let c=f==null?NaN:+f;if(isNaN(c))throw new Error(`invalid value: ${f}`);var p=[],h=[];return o(u,c,function(d){n(d,u,c),dZ(d)>0?p.push([d]):h.push(d)}),h.forEach(function(d){for(var m=0,v=p.length,g;m=f,gs[y<<2].forEach(_);++d0&&h0&&d=0&&c>=0))throw new Error("invalid size");return e=f,t=c,i},i.thresholds=function(u){return arguments.length?(r=typeof u=="function"?u:Array.isArray(u)?_o(Hb.call(u)):_o(u),i):r},i.smooth=function(u){return arguments.length?(n=u?l:mZ,i):n===l},i}function d_t(e){return isFinite(e)?e:NaN}function Gf(e,t){return e==null?!1:+e>=t}function EP(e){return e==null||isNaN(e=+e)?-1/0:e}function gZ(e,t,r,n){let i=n-t,a=r-t,o=isFinite(i)||isFinite(a)?i/a:Math.sign(i)/Math.sign(a);return isNaN(o)?e:e+o-.5}function v_t(e){return e[0]}function m_t(e){return e[1]}function g_t(){return 1}function yZ(){var e=v_t,t=m_t,r=g_t,n=960,i=500,a=20,o=2,s=a*3,l=n+s*2>>o,u=i+s*2>>o,f=_o(20);function c(y){var x=new Float32Array(l*u),_=Math.pow(2,-o),S=-1;for(let L of y){var b=(e(L,++S,y)+s)*_,w=(t(L,S,y)+s)*_,T=+r(L,S,y);if(T&&b>=0&&b=0&&wb*S))(x).map((b,w)=>(b.value=+_[w],h(b)))}p.contours=function(y){var x=c(y),_=cg().size([l,u]),S=Math.pow(2,2*o),b=w=>{w=+w;var T=h(_.contour(x,w*S));return T.value=w,T};return Object.defineProperty(b,"max",{get:()=>fs(x)/S}),b};function h(y){return y.coordinates.forEach(d),y}function d(y){y.forEach(m)}function m(y){y.forEach(v)}function v(y){y[0]=y[0]*Math.pow(2,o)-s,y[1]=y[1]*Math.pow(2,o)-s}function g(){return s=a*3,l=n+s*2>>o,u=i+s*2>>o,p}return p.x=function(y){return arguments.length?(e=typeof y=="function"?y:_o(+y),p):e},p.y=function(y){return arguments.length?(t=typeof y=="function"?y:_o(+y),p):t},p.weight=function(y){return arguments.length?(r=typeof y=="function"?y:_o(+y),p):r},p.size=function(y){if(!arguments.length)return[n,i];var x=+y[0],_=+y[1];if(!(x>=0&&_>=0))throw new Error("invalid size");return n=x,i=_,g()},p.cellSize=function(y){if(!arguments.length)return 1<=1))throw new Error("invalid cell size");return o=Math.floor(Math.log(y)/Math.LN2),g()},p.thresholds=function(y){return arguments.length?(f=typeof y=="function"?y:Array.isArray(y)?_o(Hb.call(y)):_o(y),p):f},p.bandwidth=function(y){if(!arguments.length)return Math.sqrt(a*(a+1));if(!((y=+y)>=0))throw new Error("invalid bandwidth");return a=(Math.sqrt(4*y*y+1)-1)/2,g()},p}var ue=11102230246251565e-32,fr=134217729,pg=(3+8*ue)*ue;function Hf(e,t,r,n,i){let a,o,s,l,u=t[0],f=n[0],c=0,p=0;f>u==f>-u?(a=u,u=t[++c]):(a=f,f=n[++p]);let h=0;if(cu==f>-u?(o=u+a,s=a-(o-u),u=t[++c]):(o=f+a,s=a-(o-f),f=n[++p]),a=o,s!==0&&(i[h++]=s);cu==f>-u?(o=a+u,l=o-a,s=a-(o-l)+(u-l),u=t[++c]):(o=a+f,l=o-a,s=a-(o-l)+(f-l),f=n[++p]),a=o,s!==0&&(i[h++]=s);for(;c=I||-L>=I||(c=e-M,s=e-(M+c)+(c-i),c=r-C,u=r-(C+c)+(c-i),c=t-A,l=t-(A+c)+(c-a),c=n-P,f=n-(P+c)+(c-a),s===0&&l===0&&u===0&&f===0)||(I=__t*o+pg*Math.abs(L),L+=M*f+P*s-(A*u+C*l),L>=I||-L>=I))return L;_=s*P,p=fr*s,h=p-(p-s),d=s-h,p=fr*P,m=p-(p-P),v=P-m,S=d*v-(_-h*m-d*m-h*v),b=l*C,p=fr*l,h=p-(p-l),d=l-h,p=fr*C,m=p-(p-C),v=C-m,w=d*v-(b-h*m-d*m-h*v),g=S-w,c=S-g,gn[0]=S-(g+c)+(c-w),y=_+g,c=y-_,x=_-(y-c)+(g-c),g=x-b,c=x-g,gn[1]=x-(g+c)+(c-b),T=y+g,c=T-y,gn[2]=y-(T-c)+(g-c),gn[3]=T;let E=Hf(4,Th,4,gn,xZ);_=M*f,p=fr*M,h=p-(p-M),d=M-h,p=fr*f,m=p-(p-f),v=f-m,S=d*v-(_-h*m-d*m-h*v),b=A*u,p=fr*A,h=p-(p-A),d=A-h,p=fr*u,m=p-(p-u),v=u-m,w=d*v-(b-h*m-d*m-h*v),g=S-w,c=S-g,gn[0]=S-(g+c)+(c-w),y=_+g,c=y-_,x=_-(y-c)+(g-c),g=x-b,c=x-g,gn[1]=x-(g+c)+(c-b),T=y+g,c=T-y,gn[2]=y-(T-c)+(g-c),gn[3]=T;let R=Hf(E,xZ,4,gn,_Z);_=s*f,p=fr*s,h=p-(p-s),d=s-h,p=fr*f,m=p-(p-f),v=f-m,S=d*v-(_-h*m-d*m-h*v),b=l*u,p=fr*l,h=p-(p-l),d=l-h,p=fr*u,m=p-(p-u),v=u-m,w=d*v-(b-h*m-d*m-h*v),g=S-w,c=S-g,gn[0]=S-(g+c)+(c-w),y=_+g,c=y-_,x=_-(y-c)+(g-c),g=x-b,c=x-g,gn[1]=x-(g+c)+(c-b),T=y+g,c=T-y,gn[2]=y-(T-c)+(g-c),gn[3]=T;let k=Hf(R,_Z,4,gn,bZ);return bZ[k-1]}function Mh(e,t,r,n,i,a){let o=(t-a)*(r-i),s=(e-i)*(n-a),l=o-s,u=Math.abs(o+s);return Math.abs(l)>=y_t*u?l:-b_t(e,t,r,n,i,a,u)}var Yye=(7+56*ue)*ue,Xye=(3+28*ue)*ue,qye=(26+288*ue)*ue*ue,Zye=it(4),Kye=it(4),$ye=it(4),jye=it(4),Qye=it(4),Jye=it(4),t0e=it(4),e0e=it(4),r0e=it(4),n0e=it(8),i0e=it(8),a0e=it(8),o0e=it(4),s0e=it(8),l0e=it(8),u0e=it(8),f0e=it(12),c0e=it(192),p0e=it(192);var v0e=(10+96*ue)*ue,m0e=(4+48*ue)*ue,g0e=(44+576*ue)*ue*ue,y0e=it(4),x0e=it(4),_0e=it(4),b0e=it(4),S0e=it(4),w0e=it(4),T0e=it(4),M0e=it(4),A0e=it(8),C0e=it(8),D0e=it(8),E0e=it(8),I0e=it(8),L0e=it(8),P0e=it(8),R0e=it(8),N0e=it(8),k0e=it(4),O0e=it(4),z0e=it(4),U0e=it(8),V0e=it(16),B0e=it(16),F0e=it(16),G0e=it(32),H0e=it(32),W0e=it(48),Y0e=it(64),X0e=it(1152),q0e=it(1152);var j0e=(16+224*ue)*ue,Q0e=(5+72*ue)*ue,J0e=(71+1408*ue)*ue*ue,txe=it(4),exe=it(4),rxe=it(4),nxe=it(4),ixe=it(4),axe=it(4),oxe=it(4),sxe=it(4),lxe=it(4),uxe=it(4),fxe=it(24),cxe=it(24),pxe=it(24),hxe=it(24),dxe=it(24),vxe=it(24),mxe=it(24),gxe=it(24),yxe=it(24),xxe=it(24),_xe=it(1152),bxe=it(1152),Sxe=it(1152),wxe=it(1152),Txe=it(1152),Mxe=it(2304),Axe=it(2304),Cxe=it(3456),Dxe=it(5760),Exe=it(8),Ixe=it(8),Lxe=it(8),Pxe=it(16),Rxe=it(24),Nxe=it(48),kxe=it(48),Oxe=it(96),zxe=it(192),Uxe=it(384),Vxe=it(384),Bxe=it(384),Fxe=it(768);var Gxe=it(96),Hxe=it(96),Wxe=it(96),Yxe=it(1152);var wZ=Math.pow(2,-52),Wb=new Uint32Array(512),Ch=class e{static from(t,r=C_t,n=D_t){let i=t.length,a=new Float64Array(i*2);for(let o=0;o>1;if(r>0&&typeof t[0]!="number")throw new Error("Expected coords to contain numbers.");this.coords=t;let n=Math.max(2*r-5,0);this._triangles=new Uint32Array(n*3),this._halfedges=new Int32Array(n*3),this._hashSize=Math.ceil(Math.sqrt(r)),this._hullPrev=new Uint32Array(r),this._hullNext=new Uint32Array(r),this._hullTri=new Uint32Array(r),this._hullHash=new Int32Array(this._hashSize),this._ids=new Uint32Array(r),this._dists=new Float64Array(r),this.update()}update(){let{coords:t,_hullPrev:r,_hullNext:n,_hullTri:i,_hullHash:a}=this,o=t.length>>1,s=1/0,l=1/0,u=-1/0,f=-1/0;for(let M=0;Mu&&(u=C),A>f&&(f=A),this._ids[M]=M}let c=(s+u)/2,p=(l+f)/2,h,d,m;for(let M=0,C=1/0;M0&&(d=M,C=A)}let y=t[2*d],x=t[2*d+1],_=1/0;for(let M=0;MP&&(M[C++]=L,P=I)}this.hull=M.subarray(0,C),this.triangles=new Uint32Array(0),this.halfedges=new Uint32Array(0);return}if(Mh(v,g,y,x,S,b)<0){let M=d,C=y,A=x;d=m,y=S,x=b,m=M,S=C,b=A}let w=A_t(v,g,y,x,S,b);this._cx=w.x,this._cy=w.y;for(let M=0;M0&&Math.abs(L-C)<=wZ&&Math.abs(I-A)<=wZ||(C=L,A=I,P===h||P===d||P===m))continue;let E=0;for(let U=0,G=this._hashKey(L,I);U=0;)if(R=k,R===E){R=-1;break}if(R===-1)continue;let O=this._addTriangle(R,P,n[R],-1,-1,i[R]);i[P]=this._legalize(O+2),i[R]=O,T++;let z=n[R];for(;k=n[z],Mh(L,I,t[2*z],t[2*z+1],t[2*k],t[2*k+1])<0;)O=this._addTriangle(z,P,k,i[P],-1,i[z]),i[P]=this._legalize(O+2),n[z]=z,T--,z=k;if(R===E)for(;k=r[R],Mh(L,I,t[2*k],t[2*k+1],t[2*R],t[2*R+1])<0;)O=this._addTriangle(k,P,R,-1,i[R],i[k]),this._legalize(O+2),i[k]=O,n[R]=R,T--,R=k;this._hullStart=r[P]=R,n[R]=r[z]=P,n[P]=z,a[this._hashKey(L,I)]=P,a[this._hashKey(t[2*R],t[2*R+1])]=R}this.hull=new Uint32Array(T);for(let M=0,C=this._hullStart;M0?3-r:1+r)/4}function IP(e,t,r,n){let i=e-r,a=t-n;return i*i+a*a}function T_t(e,t,r,n,i,a,o,s){let l=e-o,u=t-s,f=r-o,c=n-s,p=i-o,h=a-s,d=l*l+u*u,m=f*f+c*c,v=p*p+h*h;return l*(c*v-m*h)-u*(f*v-m*p)+d*(f*h-c*p)<0}function M_t(e,t,r,n,i,a){let o=r-e,s=n-t,l=i-e,u=a-t,f=o*o+s*s,c=l*l+u*u,p=.5/(o*u-s*l),h=(u*f-s*c)*p,d=(o*c-l*f)*p;return h*h+d*d}function A_t(e,t,r,n,i,a){let o=r-e,s=n-t,l=i-e,u=a-t,f=o*o+s*s,c=l*l+u*u,p=.5/(o*u-s*l),h=e+(u*f-s*c)*p,d=t+(o*c-l*f)*p;return{x:h,y:d}}function Ah(e,t,r,n){if(n-r<=20)for(let i=r+1;i<=n;i++){let a=e[i],o=t[a],s=i-1;for(;s>=r&&t[e[s]]>o;)e[s+1]=e[s--];e[s+1]=a}else{let i=r+n>>1,a=r+1,o=n;dg(e,i,a),t[e[r]]>t[e[n]]&&dg(e,r,n),t[e[a]]>t[e[n]]&&dg(e,a,n),t[e[r]]>t[e[a]]&&dg(e,r,a);let s=e[a],l=t[s];for(;;){do a++;while(t[e[a]]l);if(o=o-r?(Ah(e,t,a,n),Ah(e,t,r,o-1)):(Ah(e,t,r,o-1),Ah(e,t,a,n))}}function dg(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}function C_t(e){return e[0]}function D_t(e){return e[1]}var Wi=class{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(t,r){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(t,r){this._+=`L${this._x1=+t},${this._y1=+r}`}arc(t,r,n){t=+t,r=+r,n=+n;let i=t+n,a=r;if(n<0)throw new Error("negative radius");this._x1===null?this._+=`M${i},${a}`:(Math.abs(this._x1-i)>1e-6||Math.abs(this._y1-a)>1e-6)&&(this._+="L"+i+","+a),n&&(this._+=`A${n},${n},0,1,1,${t-n},${r}A${n},${n},0,1,1,${this._x1=i},${this._y1=a}`)}rect(t,r,n,i){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${+n}v${+i}h${-n}Z`}value(){return this._||null}};var Hl=class{constructor(){this._=[]}moveTo(t,r){this._.push([t,r])}closePath(){this._.push(this._[0].slice())}lineTo(t,r){this._.push([t,r])}value(){return this._.length?this._:null}};var Wf=class{constructor(t,[r,n,i,a]=[0,0,960,500]){if(!((i=+i)>=(r=+r))||!((a=+a)>=(n=+n)))throw new Error("invalid bounds");this.delaunay=t,this._circumcenters=new Float64Array(t.points.length*2),this.vectors=new Float64Array(t.points.length*2),this.xmax=i,this.xmin=r,this.ymax=a,this.ymin=n,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){let{delaunay:{points:t,hull:r,triangles:n},vectors:i}=this,a,o,s=this.circumcenters=this._circumcenters.subarray(0,n.length/3*2);for(let m=0,v=0,g=n.length,y,x;m1;)a-=2;for(let o=2;o0){if(r>=this.ymax)return null;(o=(this.ymax-r)/i)0){if(t>=this.xmax)return null;(o=(this.xmax-t)/n)this.xmax?2:0)|(rthis.ymax?8:0)}_simplify(t){if(t&&t.length>4){for(let r=0;r1e-10)return!1}return!0}function R_t(e,t,r){return[e+Math.sin(e+t)*r,t+Math.cos(e-t)*r]}var vg=class e{static from(t,r=I_t,n=L_t,i){return new e("length"in t?N_t(t,r,n,i):Float64Array.from(k_t(t,r,n,i)))}constructor(t){this._delaunator=new Ch(t),this.inedges=new Int32Array(t.length/2),this._hullIndex=new Int32Array(t.length/2),this.points=this._delaunator.coords,this._init()}update(){return this._delaunator.update(),this._init(),this}_init(){let t=this._delaunator,r=this.points;if(t.hull&&t.hull.length>2&&P_t(t)){this.collinear=Int32Array.from({length:r.length/2},(p,h)=>h).sort((p,h)=>r[2*p]-r[2*h]||r[2*p+1]-r[2*h+1]);let l=this.collinear[0],u=this.collinear[this.collinear.length-1],f=[r[2*l],r[2*l+1],r[2*u],r[2*u+1]],c=1e-8*Math.hypot(f[3]-f[1],f[2]-f[0]);for(let p=0,h=r.length/2;p0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=i[0],o[i[0]]=1,i.length===2&&(o[i[1]]=0,this.triangles[1]=i[1],this.triangles[2]=i[1]))}voronoi(t){return new Wf(this,t)}*neighbors(t){let{inedges:r,hull:n,_hullIndex:i,halfedges:a,triangles:o,collinear:s}=this;if(s){let c=s.indexOf(t);c>0&&(yield s[c-1]),c=0&&a!==n&&a!==i;)n=a;return a}_step(t,r,n){let{inedges:i,hull:a,_hullIndex:o,halfedges:s,triangles:l,points:u}=this;if(i[t]===-1||!u.length)return(t+1)%(u.length>>1);let f=t,c=Dh(r-u[t*2],2)+Dh(n-u[t*2+1],2),p=i[t],h=p;do{let d=l[h],m=Dh(r-u[d*2],2)+Dh(n-u[d*2+1],2);if(m9999?"+"+qn(e,6):qn(e,4)}function U_t(e){var t=e.getUTCHours(),r=e.getUTCMinutes(),n=e.getUTCSeconds(),i=e.getUTCMilliseconds();return isNaN(e)?"Invalid Date":z_t(e.getUTCFullYear(),4)+"-"+qn(e.getUTCMonth()+1,2)+"-"+qn(e.getUTCDate(),2)+(i?"T"+qn(t,2)+":"+qn(r,2)+":"+qn(n,2)+"."+qn(i,3)+"Z":n?"T"+qn(t,2)+":"+qn(r,2)+":"+qn(n,2)+"Z":r||t?"T"+qn(t,2)+":"+qn(r,2)+"Z":"")}function Wl(e){var t=new RegExp('["'+e+` +\r]`),r=e.charCodeAt(0);function n(c,p){var h,d,m=i(c,function(v,g){if(h)return h(v,g-1);d=v,h=p?O_t(v,p):AZ(v)});return m.columns=d||[],m}function i(c,p){var h=[],d=c.length,m=0,v=0,g,y=d<=0,x=!1;c.charCodeAt(d-1)===mg&&--d,c.charCodeAt(d-1)===RP&&--d;function _(){if(y)return LP;if(x)return x=!1,TZ;var b,w=m,T;if(c.charCodeAt(w)===PP){for(;m++=d?y=!0:(T=c.charCodeAt(m++))===mg?x=!0:T===RP&&(x=!0,c.charCodeAt(m)===mg&&++m),c.slice(w+1,b-1).replace(/""/g,'"')}for(;mqf(t,r).then(n=>new DOMParser().parseFromString(n,e))}var YZ=OP("application/xml"),XZ=OP("text/html"),qZ=OP("image/svg+xml");function ZZ(e,t){var r,n=1;e==null&&(e=0),t==null&&(t=0);function i(){var a,o=r.length,s,l=0,u=0;for(a=0;a=(c=(s+u)/2))?s=c:u=c,(v=r>=(p=(l+f)/2))?l=p:f=p,i=a,!(a=a[g=v<<1|m]))return i[g]=o,e;if(h=+e._x.call(null,a.data),d=+e._y.call(null,a.data),t===h&&r===d)return o.next=a,i?i[g]=o:e._root=o,e;do i=i?i[g]=new Array(4):e._root=new Array(4),(m=t>=(c=(s+u)/2))?s=c:u=c,(v=r>=(p=(l+f)/2))?l=p:f=p;while((g=v<<1|m)===(y=(d>=p)<<1|h>=c));return i[y]=a,i[g]=o,e}function jZ(e){var t,r,n=e.length,i,a,o=new Array(n),s=new Array(n),l=1/0,u=1/0,f=-1/0,c=-1/0;for(r=0;rf&&(f=i),ac&&(c=a));if(l>f||u>c)return this;for(this.cover(l,u).cover(f,c),r=0;re||e>=i||n>t||t>=a;)switch(u=(tf||(s=d.y0)>c||(l=d.x1)=g)<<1|e>=v)&&(d=p[p.length-1],p[p.length-1]=p[p.length-1-m],p[p.length-1-m]=d)}else{var y=e-+this._x.call(null,h.data),x=t-+this._y.call(null,h.data),_=y*y+x*x;if(_=(p=(o+l)/2))?o=p:l=p,(m=c>=(h=(s+u)/2))?s=h:u=h,t=r,!(r=r[v=m<<1|d]))return this;if(!r.length)break;(t[v+1&3]||t[v+2&3]||t[v+3&3])&&(n=t,g=v)}for(;r.data!==e;)if(i=r,!(r=r.next))return this;return(a=r.next)&&delete r.next,i?(a?i.next=a:delete i.next,this):t?(a?t[v]=a:delete t[v],(r=t[0]||t[1]||t[2]||t[3])&&r===(t[3]||t[2]||t[1]||t[0])&&!r.length&&(n?n[g]=r:this._root=r),this):(this._root=a,this)}function nK(e){for(var t=0,r=e.length;tp.index){var A=h-T.x-T.vx,P=d-T.y-T.vy,L=A*A+P*P;Lh+C||bd+C||wu.r&&(u.r=u[f].r)}function l(){if(t){var u,f=t.length,c;for(r=new Array(f),u=0;u[t(S,b,o),S])),_;for(v=0,s=new Array(g);v(e=(1664525*e+1013904223)%4294967296)/4294967296}function gK(e){return e.x}function yK(e){return e.y}var X_t=10,q_t=Math.PI*(3-Math.sqrt(5));function xK(e){var t,r=1,n=.001,i=1-Math.pow(n,1/300),a=0,o=.6,s=new Map,l=Uf(c),u=Gi("tick","end"),f=mK();e==null&&(e=[]);function c(){p(),u.call("tick",t),r1?(v==null?s.delete(m):s.set(m,d(v)),t):s.get(m)},find:function(m,v,g){var y=0,x=e.length,_,S,b,w,T;for(g==null?g=1/0:g*=g,y=0;y1?(u.on(m,v),t):u.on(m)}}}function _K(){var e,t,r,n,i=Oe(-30),a,o=1,s=1/0,l=.81;function u(h){var d,m=e.length,v=Yl(e,gK,yK).visitAfter(c);for(n=h,d=0;d=s)return;(h.data!==t||h.next)&&(g===0&&(g=Ea(r),_+=g*g),y===0&&(y=Ea(r),_+=y*y),_=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Zf(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function bo(e){return e=Zf(Math.abs(e)),e?e[1]:NaN}function MK(e,t){return function(r,n){for(var i=r.length,a=[],o=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),a.push(r.substring(i-=s,i+s)),!((l+=s+1)>n));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function AK(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var Z_t=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ia(e){if(!(t=Z_t.exec(e)))throw new Error("invalid format: "+e);var t;return new mg({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Ia.prototype=mg.prototype;function mg(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}mg.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function CK(e){t:for(var t=e.length,r=1,n=-1,i;r0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var UP;function DK(e,t){var r=Zf(e,t);if(!r)return e+"";var n=r[0],i=r[1],a=i-(UP=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=n.length;return a===o?n:a>o?n+new Array(a-o+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+Zf(e,Math.max(0,t+a-1))[0]}function VP(e,t){var r=Zf(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}var BP={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:TK,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>VP(e*100,t),r:VP,s:DK,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function FP(e){return e}var EK=Array.prototype.map,IK=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function qb(e){var t=e.grouping===void 0||e.thousands===void 0?FP:MK(EK.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?FP:AK(EK.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"\u2212":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function u(c){c=Ia(c);var p=c.fill,h=c.align,d=c.sign,m=c.symbol,v=c.zero,g=c.width,y=c.comma,x=c.precision,_=c.trim,S=c.type;S==="n"?(y=!0,S="g"):BP[S]||(x===void 0&&(x=12),_=!0,S="g"),(v||p==="0"&&h==="=")&&(v=!0,p="0",h="=");var b=m==="$"?r:m==="#"&&/[boxX]/.test(S)?"0"+S.toLowerCase():"",w=m==="$"?n:/[%p]/.test(S)?o:"",T=BP[S],M=/[defgprs%]/.test(S);x=x===void 0?6:/[gprs]/.test(S)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function C(A){var P=b,L=w,I,E,R;if(S==="c")L=T(A)+L,A="";else{A=+A;var k=A<0||1/A<0;if(A=isNaN(A)?l:T(Math.abs(A),x),_&&(A=CK(A)),k&&+A==0&&d!=="+"&&(k=!1),P=(k?d==="("?d:s:d==="-"||d==="("?"":d)+P,L=(S==="s"?IK[8+UP/3]:"")+L+(k&&d==="("?")":""),M){for(I=-1,E=A.length;++IR||R>57){L=(R===46?i+A.slice(I+1):A.slice(I))+L,A=A.slice(0,I);break}}}y&&!v&&(A=t(A,1/0));var O=P.length+A.length+L.length,z=O>1)+P+A+L+z.slice(O);break;default:A=z+P+A+L;break}return a(A)}return C.toString=function(){return c+""},C}function f(c,p){var h=u((c=Ia(c),c.type="f",c)),d=Math.max(-8,Math.min(8,Math.floor(bo(p)/3)))*3,m=Math.pow(10,-d),v=IK[8+d/3];return function(g){return h(m*g)+v}}return{format:u,formatPrefix:f}}var Zb,Kf,gg;Kb({thousands:",",grouping:[3],currency:["$",""]});function Kb(e){return Zb=qb(e),Kf=Zb.format,gg=Zb.formatPrefix,Zb}function $b(e){return Math.max(0,-bo(Math.abs(e)))}function jb(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(bo(t)/3)))*3-bo(Math.abs(e)))}function Qb(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,bo(t)-bo(e))+1}var wt=1e-6,ys=1e-12,qt=Math.PI,Ee=qt/2,Eh=qt/4,nr=qt*2,le=180/qt,It=qt/180,Bt=Math.abs,Yi=Math.atan,Le=Math.atan2,mt=Math.cos,yg=Math.ceil,Jb=Math.exp;var tS=Math.hypot,$f=Math.log,eS=Math.pow,ft=Math.sin,rn=Math.sign||function(e){return e>0?1:e<0?-1:0},de=Math.sqrt,Ih=Math.tan;function rS(e){return e>1?0:e<-1?qt:Math.acos(e)}function Pe(e){return e>1?Ee:e<-1?-Ee:Math.asin(e)}function GP(e){return(e=ft(e/2))*e}function ge(){}function nS(e,t){e&&PK.hasOwnProperty(e.type)&&PK[e.type](e,t)}var LK={Feature:function(e,t){nS(e.geometry,t)},FeatureCollection:function(e,t){for(var r=e.features,n=-1,i=r.length;++n=0?1:-1,i=n*r,a=mt(t),o=ft(t),s=XP*o,l=YP*a+s*mt(i),u=s*n*ft(i);xg.add(Le(u,l)),WP=e,YP=a,XP=o}function zK(e){return iS=new Ae,Er(e,La),iS*2}function jf(e){return[Le(e[1],e[0]),Pe(e[2])]}function Xi(e){var t=e[0],r=e[1],n=mt(r);return[n*mt(t),n*ft(t),ft(r)]}function _g(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function xs(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function aS(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function bg(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function Qf(e){var t=de(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}var Xe,Zn,je,hi,Jf,FK,GK,Lh,Sg,Xl,bs,_s={point:qP,lineStart:UK,lineEnd:VK,polygonStart:function(){_s.point=WK,_s.lineStart=Q_t,_s.lineEnd=J_t,Sg=new Ae,La.polygonStart()},polygonEnd:function(){La.polygonEnd(),_s.point=qP,_s.lineStart=UK,_s.lineEnd=VK,xg<0?(Xe=-(je=180),Zn=-(hi=90)):Sg>wt?hi=90:Sg<-wt&&(Zn=-90),bs[0]=Xe,bs[1]=je},sphere:function(){Xe=-(je=180),Zn=-(hi=90)}};function qP(e,t){Xl.push(bs=[Xe=e,je=e]),thi&&(hi=t)}function HK(e,t){var r=Xi([e*It,t*It]);if(Lh){var n=xs(Lh,r),i=[n[1],-n[0],0],a=xs(i,n);Qf(a),a=jf(a);var o=e-Jf,s=o>0?1:-1,l=a[0]*le*s,u,f=Bt(o)>180;f^(s*Jfhi&&(hi=u)):(l=(l+360)%360-180,f^(s*Jfhi&&(hi=t))),f?epi(Xe,je)&&(je=e):pi(e,je)>pi(Xe,je)&&(Xe=e):je>=Xe?(eje&&(je=e)):e>Jf?pi(Xe,e)>pi(Xe,je)&&(je=e):pi(e,je)>pi(Xe,je)&&(Xe=e)}else Xl.push(bs=[Xe=e,je=e]);thi&&(hi=t),Lh=r,Jf=e}function UK(){_s.point=HK}function VK(){bs[0]=Xe,bs[1]=je,_s.point=qP,Lh=null}function WK(e,t){if(Lh){var r=e-Jf;Sg.add(Bt(r)>180?r+(r>0?360:-360):r)}else FK=e,GK=t;La.point(e,t),HK(e,t)}function Q_t(){La.lineStart()}function J_t(){WK(FK,GK),La.lineEnd(),Bt(Sg)>wt&&(Xe=-(je=180)),bs[0]=Xe,bs[1]=je,Lh=null}function pi(e,t){return(t-=e)<0?t+360:t}function tbt(e,t){return e[0]-t[0]}function BK(e,t){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:tpi(n[0],n[1])&&(n[1]=i[1]),pi(i[0],n[1])>pi(n[0],n[1])&&(n[0]=i[0])):a.push(n=i);for(o=-1/0,r=a.length-1,t=0,n=a[r];t<=r;n=i,++t)i=a[t],(s=pi(n[1],i[0]))>o&&(o=s,Xe=i[0],je=n[1])}return Xl=bs=null,Xe===1/0||Zn===1/0?[[NaN,NaN],[NaN,NaN]]:[[Xe,Zn],[je,hi]]}var wg,oS,sS,lS,uS,fS,cS,pS,ZP,KP,$P,ZK,KK,xn,_n,bn,Pa={sphere:ge,point:jP,lineStart:XK,lineEnd:qK,polygonStart:function(){Pa.lineStart=nbt,Pa.lineEnd=ibt},polygonEnd:function(){Pa.lineStart=XK,Pa.lineEnd=qK}};function jP(e,t){e*=It,t*=It;var r=mt(t);Tg(r*mt(e),r*ft(e),ft(t))}function Tg(e,t,r){++wg,sS+=(e-sS)/wg,lS+=(t-lS)/wg,uS+=(r-uS)/wg}function XK(){Pa.point=ebt}function ebt(e,t){e*=It,t*=It;var r=mt(t);xn=r*mt(e),_n=r*ft(e),bn=ft(t),Pa.point=rbt,Tg(xn,_n,bn)}function rbt(e,t){e*=It,t*=It;var r=mt(t),n=r*mt(e),i=r*ft(e),a=ft(t),o=Le(de((o=_n*a-bn*i)*o+(o=bn*n-xn*a)*o+(o=xn*i-_n*n)*o),xn*n+_n*i+bn*a);oS+=o,fS+=o*(xn+(xn=n)),cS+=o*(_n+(_n=i)),pS+=o*(bn+(bn=a)),Tg(xn,_n,bn)}function qK(){Pa.point=jP}function nbt(){Pa.point=abt}function ibt(){$K(ZK,KK),Pa.point=jP}function abt(e,t){ZK=e,KK=t,e*=It,t*=It,Pa.point=$K;var r=mt(t);xn=r*mt(e),_n=r*ft(e),bn=ft(t),Tg(xn,_n,bn)}function $K(e,t){e*=It,t*=It;var r=mt(t),n=r*mt(e),i=r*ft(e),a=ft(t),o=_n*a-bn*i,s=bn*n-xn*a,l=xn*i-_n*n,u=tS(o,s,l),f=Pe(u),c=u&&-f/u;ZP.add(c*o),KP.add(c*s),$P.add(c*l),oS+=f,fS+=f*(xn+(xn=n)),cS+=f*(_n+(_n=i)),pS+=f*(bn+(bn=a)),Tg(xn,_n,bn)}function jK(e){wg=oS=sS=lS=uS=fS=cS=pS=0,ZP=new Ae,KP=new Ae,$P=new Ae,Er(e,Pa);var t=+ZP,r=+KP,n=+$P,i=tS(t,r,n);return iqt&&(e-=Math.round(e/nr)*nr),[e,t]}QP.invert=QP;function Ag(e,t,r){return(e%=nr)?t||r?Mg(JK(e),t$(t,r)):JK(e):t||r?t$(t,r):QP}function QK(e){return function(t,r){return t+=e,Bt(t)>qt&&(t-=Math.round(t/nr)*nr),[t,r]}}function JK(e){var t=QK(e);return t.invert=QK(-e),t}function t$(e,t){var r=mt(e),n=ft(e),i=mt(t),a=ft(t);function o(s,l){var u=mt(l),f=mt(s)*u,c=ft(s)*u,p=ft(l),h=p*r+f*n;return[Le(c*i-h*a,f*r-p*n),Pe(h*i+c*a)]}return o.invert=function(s,l){var u=mt(l),f=mt(s)*u,c=ft(s)*u,p=ft(l),h=p*i-c*a;return[Le(c*i+p*a,f*r+h*n),Pe(h*r-f*n)]},o}function hS(e){e=Ag(e[0]*It,e[1]*It,e.length>2?e[2]*It:0);function t(r){return r=e(r[0]*It,r[1]*It),r[0]*=le,r[1]*=le,r}return t.invert=function(r){return r=e.invert(r[0]*It,r[1]*It),r[0]*=le,r[1]*=le,r},t}function JP(e,t,r,n,i,a){if(r){var o=mt(t),s=ft(t),l=n*r;i==null?(i=t+n*nr,a=t-l/2):(i=e$(o,i),a=e$(o,a),(n>0?ia)&&(i+=n*nr));for(var u,f=i;n>0?f>a:f1&&e.push(e.pop().concat(e.shift()))},result:function(){var r=e;return e=[],t=null,r}}}function Ph(e,t){return Bt(e[0]-t[0])=0;--s)i.point((c=f[s])[0],c[1]);else n(p.x,p.p.x,-1,i);p=p.p}p=p.o,f=p.z,h=!h}while(!p.v);i.lineEnd()}}}function n$(e){if(t=e.length){for(var t,r=0,n=e[0],i;++r=0?1:-1,C=M*T,A=C>qt,P=v*b;if(l.add(Le(P*M*ft(C),g*w+P*mt(C))),o+=A?T+M*nr:T,A^d>=r^_>=r){var L=xs(Xi(h),Xi(x));Qf(L);var I=xs(a,L);Qf(I);var E=(A^T>=0?-1:1)*Pe(I[2]);(n>E||n===E&&(L[0]||L[1]))&&(s+=A^T>=0?1:-1)}}return(o<-wt||o0){for(l||(i.polygonStart(),l=!0),i.lineStart(),b=0;b1&&_&2&&S.push(S.pop().concat(S.shift())),f.push(S.filter(obt))}}return p}}function obt(e){return e.length>1}function sbt(e,t){return((e=e.x)[0]<0?e[1]-Ee-wt:Ee-e[1])-((t=t.x)[0]<0?t[1]-Ee-wt:Ee-t[1])}var Cg=yS(function(){return!0},lbt,fbt,[-qt,-Ee]);function lbt(e){var t=NaN,r=NaN,n=NaN,i;return{lineStart:function(){e.lineStart(),i=1},point:function(a,o){var s=a>0?qt:-qt,l=Bt(a-t);Bt(l-qt)0?Ee:-Ee),e.point(n,r),e.lineEnd(),e.lineStart(),e.point(s,r),e.point(a,r),i=0):n!==s&&l>=qt&&(Bt(t-n)wt?Yi((ft(t)*(a=mt(n))*ft(r)-ft(n)*(i=mt(t))*ft(e))/(i*a*o)):(t+n)/2}function fbt(e,t,r,n){var i;if(e==null)i=r*Ee,n.point(-qt,i),n.point(0,i),n.point(qt,i),n.point(qt,0),n.point(qt,-i),n.point(0,-i),n.point(-qt,-i),n.point(-qt,0),n.point(-qt,i);else if(Bt(e[0]-t[0])>wt){var a=e[0]0,i=Bt(t)>wt;function a(f,c,p,h){JP(h,e,r,p,f,c)}function o(f,c){return mt(f)*mt(c)>t}function s(f){var c,p,h,d,m;return{lineStart:function(){d=h=!1,m=1},point:function(v,g){var y=[v,g],x,_=o(v,g),S=n?_?0:u(v,g):_?u(v+(v<0?qt:-qt),g):0;if(!c&&(d=h=_)&&f.lineStart(),_!==h&&(x=l(c,y),(!x||Ph(c,x)||Ph(y,x))&&(y[2]=1)),_!==h)m=0,_?(f.lineStart(),x=l(y,c),f.point(x[0],x[1])):(x=l(c,y),f.point(x[0],x[1],2),f.lineEnd()),c=x;else if(i&&c&&n^_){var b;!(S&p)&&(b=l(y,c,!0))&&(m=0,n?(f.lineStart(),f.point(b[0][0],b[0][1]),f.point(b[1][0],b[1][1]),f.lineEnd()):(f.point(b[1][0],b[1][1]),f.lineEnd(),f.lineStart(),f.point(b[0][0],b[0][1],3)))}_&&(!c||!Ph(c,y))&&f.point(y[0],y[1]),c=y,h=_,p=S},lineEnd:function(){h&&f.lineEnd(),c=null},clean:function(){return m|(d&&h)<<1}}}function l(f,c,p){var h=Xi(f),d=Xi(c),m=[1,0,0],v=xs(h,d),g=_g(v,v),y=v[0],x=g-y*y;if(!x)return!p&&f;var _=t*g/x,S=-t*y/x,b=xs(m,v),w=bg(m,_),T=bg(v,S);aS(w,T);var M=b,C=_g(w,M),A=_g(M,M),P=C*C-A*(_g(w,w)-1);if(!(P<0)){var L=de(P),I=bg(M,(-C-L)/A);if(aS(I,w),I=jf(I),!p)return I;var E=f[0],R=c[0],k=f[1],O=c[1],z;R0^I[1]<(Bt(I[0]-E)qt^(E<=I[0]&&I[0]<=R)){var et=bg(M,(-C+L)/A);return aS(et,w),[I,jf(et)]}}}function u(f,c){var p=n?e:qt-e,h=0;return f<-p?h|=1:f>p&&(h|=2),c<-p?h|=4:c>p&&(h|=8),h}return yS(o,s,a,n?[0,-e]:[-qt,e-qt])}function i$(e,t,r,n,i,a){var o=e[0],s=e[1],l=t[0],u=t[1],f=0,c=1,p=l-o,h=u-s,d;if(d=r-o,!(!p&&d>0)){if(d/=p,p<0){if(d0){if(d>c)return;d>f&&(f=d)}if(d=i-o,!(!p&&d<0)){if(d/=p,p<0){if(d>c)return;d>f&&(f=d)}else if(p>0){if(d0)){if(d/=h,h<0){if(d0){if(d>c)return;d>f&&(f=d)}if(d=a-s,!(!h&&d<0)){if(d/=h,h<0){if(d>c)return;d>f&&(f=d)}else if(h>0){if(d0&&(e[0]=o+f*p,e[1]=s+f*h),c<1&&(t[0]=o+c*p,t[1]=s+c*h),!0}}}}}var Dg=1e9,_S=-Dg;function Ss(e,t,r,n){function i(u,f){return e<=u&&u<=r&&t<=f&&f<=n}function a(u,f,c,p){var h=0,d=0;if(u==null||(h=o(u,c))!==(d=o(f,c))||l(u,f)<0^c>0)do p.point(h===0||h===3?e:r,h>1?n:t);while((h=(h+c+4)%4)!==d);else p.point(f[0],f[1])}function o(u,f){return Bt(u[0]-e)0?0:3:Bt(u[0]-r)0?2:1:Bt(u[1]-t)0?1:0:f>0?3:2}function s(u,f){return l(u.x,f.x)}function l(u,f){var c=o(u,1),p=o(f,1);return c!==p?c-p:c===0?f[1]-u[1]:c===1?u[0]-f[0]:c===2?u[1]-f[1]:f[0]-u[0]}return function(u){var f=u,c=dS(),p,h,d,m,v,g,y,x,_,S,b,w={point:T,lineStart:P,lineEnd:L,polygonStart:C,polygonEnd:A};function T(E,R){i(E,R)&&f.point(E,R)}function M(){for(var E=0,R=0,k=h.length;Rn&&(tt-Y)*(n-et)>(lt-et)*(e-Y)&&++E:lt<=n&&(tt-Y)*(n-et)<(lt-et)*(e-Y)&&--E;return E}function C(){f=c,p=[],h=[],b=!0}function A(){var E=M(),R=b&&E,k=(p=Df(p)).length;(R||k)&&(u.polygonStart(),R&&(u.lineStart(),a(null,null,1,u),u.lineEnd()),k&&mS(p,s,E,a,u),u.polygonEnd()),f=u,p=h=d=null}function P(){w.point=I,h&&h.push(d=[]),S=!0,_=!1,y=x=NaN}function L(){p&&(I(m,v),g&&_&&c.rejoin(),p.push(c.result())),w.point=T,_&&f.lineEnd()}function I(E,R){var k=i(E,R);if(h&&d.push([E,R]),S)m=E,v=R,g=k,S=!1,k&&(f.lineStart(),f.point(E,R));else if(k&&_)f.point(E,R);else{var O=[y=Math.max(_S,Math.min(Dg,y)),x=Math.max(_S,Math.min(Dg,x))],z=[E=Math.max(_S,Math.min(Dg,E)),R=Math.max(_S,Math.min(Dg,R))];i$(O,z,e,t,r,n)?(_||(f.lineStart(),f.point(O[0],O[1])),f.point(z[0],z[1]),k||f.lineEnd(),b=!1):k&&(f.lineStart(),f.point(E,R),b=!1)}y=E,x=R,_=k}return w}}function a$(){var e=0,t=0,r=960,n=500,i,a,o;return o={stream:function(s){return i&&a===s?i:i=Ss(e,t,r,n)(a=s)},extent:function(s){return arguments.length?(e=+s[0][0],t=+s[0][1],r=+s[1][0],n=+s[1][1],i=a=null,o):[[e,t],[r,n]]}}}var eR,rR,bS,SS,Rh={sphere:ge,point:ge,lineStart:cbt,lineEnd:ge,polygonStart:ge,polygonEnd:ge};function cbt(){Rh.point=hbt,Rh.lineEnd=pbt}function pbt(){Rh.point=Rh.lineEnd=ge}function hbt(e,t){e*=It,t*=It,rR=e,bS=ft(t),SS=mt(t),Rh.point=dbt}function dbt(e,t){e*=It,t*=It;var r=ft(t),n=mt(t),i=Bt(e-rR),a=mt(i),o=ft(i),s=n*o,l=SS*r-bS*n*a,u=bS*r+SS*n*a;eR.add(Le(de(s*s+l*l),u)),rR=e,bS=r,SS=n}function wS(e){return eR=new Ae,Er(e,Rh),+eR}var nR=[null,null],vbt={type:"LineString",coordinates:nR};function Nh(e,t){return nR[0]=e,nR[1]=t,wS(vbt)}var o$={Feature:function(e,t){return TS(e.geometry,t)},FeatureCollection:function(e,t){for(var r=e.features,n=-1,i=r.length;++n0&&(i=Nh(e[a],e[a-1]),i>0&&r<=i&&n<=i&&(r+n-i)*(1-Math.pow((r-n)/i,2))wt}).map(p)).concat(Fi(yg(a/u)*u,i,u).filter(function(x){return Bt(x%c)>wt}).map(h))}return g.lines=function(){return y().map(function(x){return{type:"LineString",coordinates:x}})},g.outline=function(){return{type:"Polygon",coordinates:[d(n).concat(m(o).slice(1),d(r).reverse().slice(1),m(s).reverse().slice(1))]}},g.extent=function(x){return arguments.length?g.extentMajor(x).extentMinor(x):g.extentMinor()},g.extentMajor=function(x){return arguments.length?(n=+x[0][0],r=+x[1][0],s=+x[0][1],o=+x[1][1],n>r&&(x=n,n=r,r=x),s>o&&(x=s,s=o,o=x),g.precision(v)):[[n,s],[r,o]]},g.extentMinor=function(x){return arguments.length?(t=+x[0][0],e=+x[1][0],a=+x[0][1],i=+x[1][1],t>e&&(x=t,t=e,e=x),a>i&&(x=a,a=i,i=x),g.precision(v)):[[t,a],[e,i]]},g.step=function(x){return arguments.length?g.stepMajor(x).stepMinor(x):g.stepMinor()},g.stepMajor=function(x){return arguments.length?(f=+x[0],c=+x[1],g):[f,c]},g.stepMinor=function(x){return arguments.length?(l=+x[0],u=+x[1],g):[l,u]},g.precision=function(x){return arguments.length?(v=+x,p=h$(a,i,90),h=d$(t,e,v),d=h$(s,o,90),m=d$(n,r,v),g):v},g.extentMajor([[-180,-90+wt],[180,90-wt]]).extentMinor([[-180,-80-wt],[180,80+wt]])}function v$(){return MS()()}function m$(e,t){var r=e[0]*It,n=e[1]*It,i=t[0]*It,a=t[1]*It,o=mt(n),s=ft(n),l=mt(a),u=ft(a),f=o*mt(r),c=o*ft(r),p=l*mt(i),h=l*ft(i),d=2*Pe(de(GP(a-n)+o*l*GP(i-r))),m=ft(d),v=d?function(g){var y=ft(g*=d)/m,x=ft(d-g)/m,_=x*f+y*p,S=x*c+y*h,b=x*s+y*u;return[Le(S,_)*le,Le(b,de(_*_+S*S))*le]}:function(){return[r*le,n*le]};return v.distance=d,v}var ql=e=>e;var iR=new Ae,aR=new Ae,g$,y$,oR,sR,Zl={point:ge,lineStart:ge,lineEnd:ge,polygonStart:function(){Zl.lineStart=gbt,Zl.lineEnd=xbt},polygonEnd:function(){Zl.lineStart=Zl.lineEnd=Zl.point=ge,iR.add(Bt(aR)),aR=new Ae},result:function(){var e=iR/2;return iR=new Ae,e}};function gbt(){Zl.point=ybt}function ybt(e,t){Zl.point=x$,g$=oR=e,y$=sR=t}function x$(e,t){aR.add(sR*e-oR*t),oR=e,sR=t}function xbt(){x$(g$,y$)}var lR=Zl;var kh=1/0,AS=kh,Eg=-kh,CS=Eg,_bt={point:bbt,lineStart:ge,lineEnd:ge,polygonStart:ge,polygonEnd:ge,result:function(){var e=[[kh,AS],[Eg,CS]];return Eg=CS=-(AS=kh=1/0),e}};function bbt(e,t){eEg&&(Eg=e),tCS&&(CS=t)}var Oh=_bt;var uR=0,fR=0,Ig=0,DS=0,ES=0,zh=0,cR=0,pR=0,Lg=0,S$,w$,So,wo,Ra={point:ec,lineStart:_$,lineEnd:b$,polygonStart:function(){Ra.lineStart=Tbt,Ra.lineEnd=Mbt},polygonEnd:function(){Ra.point=ec,Ra.lineStart=_$,Ra.lineEnd=b$},result:function(){var e=Lg?[cR/Lg,pR/Lg]:zh?[DS/zh,ES/zh]:Ig?[uR/Ig,fR/Ig]:[NaN,NaN];return uR=fR=Ig=DS=ES=zh=cR=pR=Lg=0,e}};function ec(e,t){uR+=e,fR+=t,++Ig}function _$(){Ra.point=Sbt}function Sbt(e,t){Ra.point=wbt,ec(So=e,wo=t)}function wbt(e,t){var r=e-So,n=t-wo,i=de(r*r+n*n);DS+=i*(So+e)/2,ES+=i*(wo+t)/2,zh+=i,ec(So=e,wo=t)}function b$(){Ra.point=ec}function Tbt(){Ra.point=Abt}function Mbt(){T$(S$,w$)}function Abt(e,t){Ra.point=T$,ec(S$=So=e,w$=wo=t)}function T$(e,t){var r=e-So,n=t-wo,i=de(r*r+n*n);DS+=i*(So+e)/2,ES+=i*(wo+t)/2,zh+=i,i=wo*e-So*t,cR+=i*(So+e),pR+=i*(wo+t),Lg+=i*3,ec(So=e,wo=t)}var hR=Ra;function IS(e){this._context=e}IS.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(e,t){switch(this._point){case 0:{this._context.moveTo(e,t),this._point=1;break}case 1:{this._context.lineTo(e,t);break}default:{this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,nr);break}}},result:ge};var vR=new Ae,dR,M$,A$,Pg,Rg,LS={point:ge,lineStart:function(){LS.point=Cbt},lineEnd:function(){dR&&C$(M$,A$),LS.point=ge},polygonStart:function(){dR=!0},polygonEnd:function(){dR=null},result:function(){var e=+vR;return vR=new Ae,e}};function Cbt(e,t){LS.point=C$,M$=Pg=e,A$=Rg=t}function C$(e,t){Pg-=e,Rg-=t,vR.add(de(Pg*Pg+Rg*Rg)),Pg=e,Rg=t}var mR=LS;var D$,PS,E$,I$,Uh=class{constructor(t){this._append=t==null?L$:Dbt(t),this._radius=4.5,this._=""}pointRadius(t){return this._radius=+t,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){this._line===0&&(this._+="Z"),this._point=NaN}point(t,r){switch(this._point){case 0:{this._append`M${t},${r}`,this._point=1;break}case 1:{this._append`L${t},${r}`;break}default:{if(this._append`M${t},${r}`,this._radius!==E$||this._append!==PS){let n=this._radius,i=this._;this._="",this._append`m0,${n}a${n},${n} 0 1,1 0,${-2*n}a${n},${n} 0 1,1 0,${2*n}z`,E$=n,PS=this._append,I$=this._,this._=i}this._+=I$;break}}}result(){let t=this._;return this._="",t.length?t:null}};function L$(e){let t=1;this._+=e[0];for(let r=e.length;t=0))throw new RangeError(`invalid digits: ${e}`);if(t>15)return L$;if(t!==D$){let r=10**t;D$=t,PS=function(i){let a=1;this._+=i[0];for(let o=i.length;a=0))throw new RangeError(`invalid digits: ${s}`);r=l}return t===null&&(a=new Uh(r)),o},o.projection(e).digits(r).context(t)}function R$(e){return{stream:Kl(e)}}function Kl(e){return function(t){var r=new gR;for(var n in e)r[n]=e[n];return r.stream=t,r}}function gR(){}gR.prototype={constructor:gR,point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function yR(e,t,r){var n=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),n!=null&&e.clipExtent(null),Er(r,e.stream(Oh)),t(Oh.result()),n!=null&&e.clipExtent(n),e}function rc(e,t,r){return yR(e,function(n){var i=t[1][0]-t[0][0],a=t[1][1]-t[0][1],o=Math.min(i/(n[1][0]-n[0][0]),a/(n[1][1]-n[0][1])),s=+t[0][0]+(i-o*(n[1][0]+n[0][0]))/2,l=+t[0][1]+(a-o*(n[1][1]+n[0][1]))/2;e.scale(150*o).translate([s,l])},r)}function Vh(e,t,r){return rc(e,[[0,0],t],r)}function Bh(e,t,r){return yR(e,function(n){var i=+t,a=i/(n[1][0]-n[0][0]),o=(i-a*(n[1][0]+n[0][0]))/2,s=-a*n[0][1];e.scale(150*a).translate([o,s])},r)}function Fh(e,t,r){return yR(e,function(n){var i=+t,a=i/(n[1][1]-n[0][1]),o=-a*n[0][0],s=(i-a*(n[1][1]+n[0][1]))/2;e.scale(150*a).translate([o,s])},r)}var N$=16,Ebt=mt(30*It);function xR(e,t){return+t?Lbt(e,t):Ibt(e)}function Ibt(e){return Kl({point:function(t,r){t=e(t,r),this.stream.point(t[0],t[1])}})}function Lbt(e,t){function r(n,i,a,o,s,l,u,f,c,p,h,d,m,v){var g=u-n,y=f-i,x=g*g+y*y;if(x>4*t&&m--){var _=o+p,S=s+h,b=l+d,w=de(_*_+S*S+b*b),T=Pe(b/=w),M=Bt(Bt(b)-1)t||Bt((g*L+y*I)/x-.5)>.3||o*p+s*h+l*d2?E[2]%360*It:0,L()):[s*le,l*le,u*le]},A.angle=function(E){return arguments.length?(c=E%360*It,L()):c*le},A.reflectX=function(E){return arguments.length?(p=E?-1:1,L()):p<0},A.reflectY=function(E){return arguments.length?(h=E?-1:1,L()):h<0},A.precision=function(E){return arguments.length?(b=xR(w,S=E*E),I()):de(S)},A.fitExtent=function(E,R){return rc(A,E,R)},A.fitSize=function(E,R){return Vh(A,E,R)},A.fitWidth=function(E,R){return Bh(A,E,R)},A.fitHeight=function(E,R){return Fh(A,E,R)};function L(){var E=k$(r,0,0,p,h,c).apply(null,t(a,o)),R=k$(r,n-E[0],i-E[1],p,h,c);return f=Ag(s,l,u),w=Mg(t,R),T=Mg(f,w),b=xR(w,S),I()}function I(){return M=C=null,A}return function(){return t=e.apply(this,arguments),A.invert=t.invert&&P,L()}}function Gh(e){var t=0,r=qt/3,n=Ng(e),i=n(t,r);return i.parallels=function(a){return arguments.length?n(t=a[0]*It,r=a[1]*It):[t*le,r*le]},i}function O$(e){var t=mt(e);function r(n,i){return[n*t,ft(i)/t]}return r.invert=function(n,i){return[n/t,Pe(i*t)]},r}function _R(e,t){var r=ft(e),n=(r+ft(t))/2;if(Bt(n)=.12&&v<.234&&m>=-.425&&m<-.214?i:v>=.166&&v<.234&&m>=-.214&&m<-.115?o:r).invert(p)},f.stream=function(p){return e&&t===p?e:e=kbt([r.stream(t=p),i.stream(p),o.stream(p)])},f.precision=function(p){return arguments.length?(r.precision(p),i.precision(p),o.precision(p),c()):r.precision()},f.scale=function(p){return arguments.length?(r.scale(p),i.scale(p*.35),o.scale(p),f.translate(r.translate())):r.scale()},f.translate=function(p){if(!arguments.length)return r.translate();var h=r.scale(),d=+p[0],m=+p[1];return n=r.translate(p).clipExtent([[d-.455*h,m-.238*h],[d+.455*h,m+.238*h]]).stream(u),a=i.translate([d-.307*h,m+.201*h]).clipExtent([[d-.425*h+wt,m+.12*h+wt],[d-.214*h-wt,m+.234*h-wt]]).stream(u),s=o.translate([d-.205*h,m+.212*h]).clipExtent([[d-.214*h+wt,m+.166*h+wt],[d-.115*h-wt,m+.234*h-wt]]).stream(u),c()},f.fitExtent=function(p,h){return rc(f,p,h)},f.fitSize=function(p,h){return Vh(f,p,h)},f.fitWidth=function(p,h){return Bh(f,p,h)},f.fitHeight=function(p,h){return Fh(f,p,h)};function c(){return e=t=null,f}return f.scale(1070)}function NS(e){return function(t,r){var n=mt(t),i=mt(r),a=e(n*i);return a===1/0?[2,0]:[a*i*ft(t),a*ft(r)]}}function To(e){return function(t,r){var n=de(t*t+r*r),i=e(n),a=ft(i),o=mt(i);return[Le(t*a,n*o),Pe(n&&r*a/n)]}}var kS=NS(function(e){return de(2/(1+e))});kS.invert=To(function(e){return 2*Pe(e/2)});function U$(){return ir(kS).scale(124.75).clipAngle(180-.001)}var OS=NS(function(e){return(e=rS(e))&&e/ft(e)});OS.invert=To(function(e){return e});function V$(){return ir(OS).scale(79.4188).clipAngle(180-.001)}function ic(e,t){return[e,$f(Ih((Ee+t)/2))]}ic.invert=function(e,t){return[e,2*Yi(Jb(t))-Ee]};function B$(){return bR(ic).scale(961/nr)}function bR(e){var t=ir(e),r=t.center,n=t.scale,i=t.translate,a=t.clipExtent,o=null,s,l,u;t.scale=function(c){return arguments.length?(n(c),f()):n()},t.translate=function(c){return arguments.length?(i(c),f()):i()},t.center=function(c){return arguments.length?(r(c),f()):r()},t.clipExtent=function(c){return arguments.length?(c==null?o=s=l=u=null:(o=+c[0][0],s=+c[0][1],l=+c[1][0],u=+c[1][1]),f()):o==null?null:[[o,s],[l,u]]};function f(){var c=qt*n(),p=t(hS(t.rotate()).invert([0,0]));return a(o==null?[[p[0]-c,p[1]-c],[p[0]+c,p[1]+c]]:e===ic?[[Math.max(p[0]-c,o),s],[Math.min(p[0]+c,l),u]]:[[o,Math.max(p[1]-c,s)],[l,Math.min(p[1]+c,u)]])}return f()}function zS(e){return Ih((Ee+e)/2)}function SR(e,t){var r=mt(e),n=e===t?ft(e):$f(r/mt(t))/$f(zS(t)/zS(e)),i=r*eS(zS(e),n)/n;if(!n)return ic;function a(o,s){i>0?s<-Ee+wt&&(s=-Ee+wt):s>Ee-wt&&(s=Ee-wt);var l=i/eS(zS(s),n);return[l*ft(n*o),i-l*mt(n*o)]}return a.invert=function(o,s){var l=i-s,u=rn(n)*de(o*o+l*l),f=Le(o,Bt(l))*rn(l);return l*n<0&&(f-=qt*rn(o)*rn(l)),[f/n,2*Yi(eS(i/u,1/n))-Ee]},a}function F$(){return Gh(SR).scale(109.5).parallels([30,30])}function ac(e,t){return[e,t]}ac.invert=ac;function G$(){return ir(ac).scale(152.63)}function wR(e,t){var r=mt(e),n=e===t?ft(e):(r-mt(t))/(t-e),i=r/n+e;if(Bt(n)wt&&--n>0);return[e/(.8707+(a=r*r)*(-.131979+a*(-.013791+a*a*a*(.003971-.001529*a)))),r]};function q$(){return ir(FS).scale(175.295)}function GS(e,t){return[mt(t)*ft(e),ft(t)]}GS.invert=To(Pe);function Z$(){return ir(GS).scale(249.5).clipAngle(90+wt)}function HS(e,t){var r=mt(t),n=1+mt(e)*r;return[r*ft(e)/n,ft(t)/n]}HS.invert=To(function(e){return 2*Yi(e)});function K$(){return ir(HS).scale(250).clipAngle(142)}function WS(e,t){return[$f(Ih((Ee+t)/2)),-e]}WS.invert=function(e,t){return[-t,2*Yi(Jb(e))-Ee]};function $$(){var e=bR(WS),t=e.center,r=e.rotate;return e.center=function(n){return arguments.length?t([-n[1],n[0]]):(n=t(),[n[1],-n[0]])},e.rotate=function(n){return arguments.length?r([n[0],n[1],n.length>2?n[2]+90:90]):(n=r(),[n[0],n[1],n[2]-90])},r([0,0,90]).scale(159.155)}function zbt(e,t){return e.parent===t.parent?1:2}function Ubt(e){return e.reduce(Vbt,0)/e.length}function Vbt(e,t){return e+t.x}function Bbt(e){return 1+e.reduce(Fbt,0)}function Fbt(e,t){return Math.max(e,t.y)}function Gbt(e){for(var t;t=e.children;)e=t[0];return e}function Hbt(e){for(var t;t=e.children;)e=t[t.length-1];return e}function j$(){var e=zbt,t=1,r=1,n=!1;function i(a){var o,s=0;a.eachAfter(function(p){var h=p.children;h?(p.x=Ubt(h),p.y=Bbt(h)):(p.x=o?s+=e(p,o):0,p.y=0,o=p)});var l=Gbt(a),u=Hbt(a),f=l.x-e(l,u)/2,c=u.x+e(u,l)/2;return a.eachAfter(n?function(p){p.x=(p.x-a.x)*t,p.y=(a.y-p.y)*r}:function(p){p.x=(p.x-f)/(c-f)*t,p.y=(1-(a.y?p.y/a.y:1))*r})}return i.separation=function(a){return arguments.length?(e=a,i):e},i.size=function(a){return arguments.length?(n=!1,t=+a[0],r=+a[1],i):n?null:[t,r]},i.nodeSize=function(a){return arguments.length?(n=!0,t=+a[0],r=+a[1],i):n?[t,r]:null},i}function Wbt(e){var t=0,r=e.children,n=r&&r.length;if(!n)t=1;else for(;--n>=0;)t+=r[n].value;e.value=t}function Q$(){return this.eachAfter(Wbt)}function J$(e,t){let r=-1;for(let n of this)e.call(t,n,++r,this);return this}function tj(e,t){for(var r=this,n=[r],i,a,o=-1;r=n.pop();)if(e.call(t,r,++o,this),i=r.children)for(a=i.length-1;a>=0;--a)n.push(i[a]);return this}function ej(e,t){for(var r=this,n=[r],i=[],a,o,s,l=-1;r=n.pop();)if(i.push(r),a=r.children)for(o=0,s=a.length;o=0;)r+=n[i].value;t.value=r})}function ij(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function aj(e){for(var t=this,r=Ybt(t,e),n=[t];t!==r;)t=t.parent,n.push(t);for(var i=n.length;e!==r;)n.splice(i,0,e),e=e.parent;return n}function Ybt(e,t){if(e===t)return e;var r=e.ancestors(),n=t.ancestors(),i=null;for(e=r.pop(),t=n.pop();e===t;)i=e,e=r.pop(),t=n.pop();return i}function oj(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function sj(){return Array.from(this)}function lj(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function uj(){var e=this,t=[];return e.each(function(r){r!==e&&t.push({source:r.parent,target:r})}),t}function*fj(){var e=this,t,r=[e],n,i,a;do for(t=r.reverse(),r=[];e=t.pop();)if(yield e,n=e.children)for(i=0,a=n.length;i=0;--s)i.push(a=o[s]=new Mo(o[s])),a.parent=n,a.depth=n.depth+1;return r.eachBefore(TR)}function Xbt(){return Vg(this).eachBefore(Kbt)}function qbt(e){return e.children}function Zbt(e){return Array.isArray(e)?e[1]:null}function Kbt(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function TR(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function Mo(e){this.data=e,this.depth=this.height=0,this.parent=null}Mo.prototype=Vg.prototype={constructor:Mo,count:Q$,each:J$,eachAfter:ej,eachBefore:tj,find:rj,sum:nj,sort:ij,path:aj,ancestors:oj,descendants:sj,leaves:lj,links:uj,copy:Xbt,[Symbol.iterator]:fj};function Hh(e){return e==null?null:MR(e)}function MR(e){if(typeof e!="function")throw new Error;return e}function ws(){return 0}function $l(e){return function(){return e}}function Wh(){let e=1;return()=>(e=(1664525*e+1013904223)%4294967296)/4294967296}function cj(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function pj(e,t){let r=e.length,n,i;for(;r;)i=t()*r--|0,n=e[r],e[r]=e[i],e[i]=n;return e}function hj(e){return CR(e,Wh())}function CR(e,t){for(var r=0,n=(e=pj(Array.from(e),t)).length,i=[],a,o;r0&&r*r>n*n+i*i}function AR(e,t){for(var r=0;r1e-6?(A+Math.sqrt(A*A-4*C*P))/(2*C):P/A);return{x:n+b+w*L,y:i+T+M*L,r:L}}function mj(e,t,r){var n=e.x-t.x,i,a,o=e.y-t.y,s,l,u=n*n+o*o;u?(a=t.r+r.r,a*=a,l=e.r+r.r,l*=l,a>l?(i=(u+l-a)/(2*u),s=Math.sqrt(Math.max(0,l/u-i*i)),r.x=e.x-i*n-s*o,r.y=e.y-i*o+s*n):(i=(u+a-l)/(2*u),s=Math.sqrt(Math.max(0,a/u-i*i)),r.x=t.x+i*n-s*o,r.y=t.y+i*o+s*n)):(r.x=t.x+r.r,r.y=t.y)}function gj(e,t){var r=e.r+t.r-1e-6,n=t.x-e.x,i=t.y-e.y;return r>0&&r*r>n*n+i*i}function yj(e){var t=e._,r=e.next._,n=t.r+r.r,i=(t.x*r.r+r.x*t.r)/n,a=(t.y*r.r+r.y*t.r)/n;return i*i+a*a}function XS(e){this._=e,this.next=null,this.previous=null}function DR(e,t){if(!(a=(e=cj(e)).length))return 0;var r,n,i,a,o,s,l,u,f,c,p;if(r=e[0],r.x=0,r.y=0,!(a>1))return r.r;if(n=e[1],r.x=-n.r,n.x=r.r,n.y=0,!(a>2))return r.r+n.r;mj(n,r,i=e[2]),r=new XS(r),n=new XS(n),i=new XS(i),r.next=i.previous=n,n.next=r.previous=i,i.next=n.previous=r;t:for(l=3;lnSt(r(_,S,i))),y=g.map(Mj),x=new Set(g).add("");for(let _ of y)x.has(_)||(x.add(_),g.push(_),y.push(Mj(_)),a.push(IR));o=(_,S)=>g[S],s=(_,S)=>y[S]}for(f=0,l=a.length;f=0&&(h=a[g],h.data===IR);--g)h.data=null}if(c.parent=tSt,c.eachBefore(function(g){g.depth=g.parent.depth+1,--l}).eachBefore(TR),c.parent=null,l>0)throw new Error("cycle");return c}return n.id=function(i){return arguments.length?(e=Hh(i),n):e},n.parentId=function(i){return arguments.length?(t=Hh(i),n):t},n.path=function(i){return arguments.length?(r=Hh(i),n):r},n}function nSt(e){e=`${e}`;let t=e.length;return LR(e,t-1)&&!LR(e,t-2)&&(e=e.slice(0,-1)),e[0]==="/"?e:`/${e}`}function Mj(e){let t=e.length;if(t<2)return"";for(;--t>1&&!LR(e,t););return e.slice(0,t)}function LR(e,t){if(e[t]==="/"){let r=0;for(;t>0&&e[--t]==="\\";)++r;if(!(r&1))return!0}return!1}function iSt(e,t){return e.parent===t.parent?1:2}function PR(e){var t=e.children;return t?t[0]:e.t}function RR(e){var t=e.children;return t?t[t.length-1]:e.t}function aSt(e,t,r){var n=r/(t.i-e.i);t.c-=n,t.s+=r,e.c+=n,t.z+=r,t.m+=r}function oSt(e){for(var t=0,r=0,n=e.children,i=n.length,a;--i>=0;)a=n[i],a.z+=t,a.m+=t,t+=a.s+(r+=a.c)}function sSt(e,t,r){return e.a.parent===t.parent?e.a:r}function ZS(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}ZS.prototype=Object.create(Mo.prototype);function lSt(e){for(var t=new ZS(e,0),r,n=[t],i,a,o,s;r=n.pop();)if(a=r._.children)for(r.children=new Array(s=a.length),o=s-1;o>=0;--o)n.push(i=r.children[o]=new ZS(a[o],o)),i.parent=r;return(t.parent=new ZS(null,0)).children=[t],t}function Cj(){var e=iSt,t=1,r=1,n=null;function i(u){var f=lSt(u);if(f.eachAfter(a),f.parent.m=-f.z,f.eachBefore(o),n)u.eachBefore(l);else{var c=u,p=u,h=u;u.eachBefore(function(y){y.xp.x&&(p=y),y.depth>h.depth&&(h=y)});var d=c===p?1:e(c,p)/2,m=d-c.x,v=t/(p.x+d+m),g=r/(h.depth||1);u.eachBefore(function(y){y.x=(y.x+m)*v,y.y=y.depth*g})}return u}function a(u){var f=u.children,c=u.parent.children,p=u.i?c[u.i-1]:null;if(f){oSt(u);var h=(f[0].z+f[f.length-1].z)/2;p?(u.z=p.z+e(u._,p._),u.m=u.z-h):u.z=h}else p&&(u.z=p.z+e(u._,p._));u.parent.A=s(u,p,u.parent.A||c[0])}function o(u){u._.x=u.z+u.parent.m,u.m+=u.parent.m}function s(u,f,c){if(f){for(var p=u,h=u,d=f,m=p.parent.children[0],v=p.m,g=h.m,y=d.m,x=m.m,_;d=RR(d),p=PR(p),d&&p;)m=PR(m),h=RR(h),h.a=u,_=d.z+y-p.z-v+e(d._,p._),_>0&&(aSt(sSt(d,u,c),u,_),v+=_,g+=_),y+=d.m,v+=p.m,x+=m.m,g+=h.m;d&&!RR(h)&&(h.t=d,h.m+=y-g),p&&!PR(m)&&(m.t=p,m.m+=v-x,c=u)}return c}function l(u){u.x*=t,u.y=u.depth*r}return i.separation=function(u){return arguments.length?(e=u,i):e},i.size=function(u){return arguments.length?(n=!1,t=+u[0],r=+u[1],i):n?null:[t,r]},i.nodeSize=function(u){return arguments.length?(n=!0,t=+u[0],r=+u[1],i):n?[t,r]:null},i}function jl(e,t,r,n,i){for(var a=e.children,o,s=-1,l=a.length,u=e.value&&(i-r)/e.value;++sy&&(y=u),b=v*v*S,x=Math.max(y/b,b/g),x>_){v-=u;break}_=x}o.push(l={value:v,dice:h1?n:1)},r}(NR);function Dj(){var e=KS,t=!1,r=1,n=1,i=[0],a=ws,o=ws,s=ws,l=ws,u=ws;function f(p){return p.x0=p.y0=0,p.x1=r,p.y1=n,p.eachBefore(c),i=[0],t&&p.eachBefore(qS),p}function c(p){var h=i[p.depth],d=p.x0+h,m=p.y0+h,v=p.x1-h,g=p.y1-h;v=p-1){var y=a[c];y.x0=d,y.y0=m,y.x1=v,y.y1=g;return}for(var x=u[c],_=h/2+x,S=c+1,b=p-1;S>>1;u[w]<_?S=w+1:b=w}_-u[S-1]g-m){var C=h?(d*M+v*T)/h:v;f(c,S,T,d,m,C,g),f(S,p,M,C,m,v,g)}else{var A=h?(m*M+g*T)/h:g;f(c,S,T,d,m,v,A),f(S,p,M,d,A,v,g)}}}function Ij(e,t,r,n,i){(e.depth&1?jl:Ao)(e,t,r,n,i)}var Lj=function e(t){function r(n,i,a,o,s){if((l=n._squarify)&&l.ratio===t)for(var l,u,f,c,p=-1,h,d=l.length,m=n.value;++p1?n:1)},r}(NR);function Pj(e){for(var t=-1,r=e.length,n,i=e[r-1],a=0;++t1&&Nj(e[r[n-2]],e[r[n-1]],e[i])<=0;)--n;r[n++]=i}return r.slice(0,n)}function Oj(e){if((r=e.length)<3)return null;var t,r,n=new Array(r),i=new Array(r);for(t=0;t=0;--t)u.push(e[n[a[t]][2]]);for(t=+s;ta!=s>a&&i<(o-l)*(a-u)/(s-u)+l&&(f=!f),o=l,s=u;return f}function Uj(e){for(var t=-1,r=e.length,n=e[r-1],i,a,o=n[0],s=n[1],l=0;++t1);return n+i*s*Math.sqrt(-2*Math.log(o)/o)}}return r.source=e,r}(fe);var Fj=function e(t){var r=Yh.source(t);function n(){var i=r.apply(this,arguments);return function(){return Math.exp(i())}}return n.source=e,n}(fe);var $S=function e(t){function r(n){return(n=+n)<=0?()=>0:function(){for(var i=0,a=n;a>1;--a)i+=t();return i+a*t()}}return r.source=e,r}(fe);var Gj=function e(t){var r=$S.source(t);function n(i){if((i=+i)==0)return t;var a=r(i);return function(){return a()/i}}return n.source=e,n}(fe);var Hj=function e(t){function r(n){return function(){return-Math.log1p(-t())/n}}return r.source=e,r}(fe);var Wj=function e(t){function r(n){if((n=+n)<0)throw new RangeError("invalid alpha");return n=1/-n,function(){return Math.pow(1-t(),n)}}return r.source=e,r}(fe);var Yj=function e(t){function r(n){if((n=+n)<0||n>1)throw new RangeError("invalid p");return function(){return Math.floor(t()+n)}}return r.source=e,r}(fe);var jS=function e(t){function r(n){if((n=+n)<0||n>1)throw new RangeError("invalid p");return n===0?()=>1/0:n===1?()=>1:(n=Math.log1p(-n),function(){return 1+Math.floor(Math.log1p(-t())/n)})}return r.source=e,r}(fe);var Xh=function e(t){var r=Yh.source(t)();function n(i,a){if((i=+i)<0)throw new RangeError("invalid k");if(i===0)return()=>0;if(a=a==null?1:+a,i===1)return()=>-Math.log1p(-t())*a;var o=(i<1?i+1:i)-1/3,s=1/(3*Math.sqrt(o)),l=i<1?()=>Math.pow(t(),1/i):()=>1;return function(){do{do var u=r(),f=1+s*u;while(f<=0);f*=f*f;var c=1-t()}while(c>=1-.0331*u*u*u*u&&Math.log(c)>=.5*u*u+o*(1-f+Math.log(f)));return o*f*l()*a}}return n.source=e,n}(fe);var QS=function e(t){var r=Xh.source(t);function n(i,a){var o=r(i),s=r(a);return function(){var l=o();return l===0?0:l/(l+s())}}return n.source=e,n}(fe);var JS=function e(t){var r=jS.source(t),n=QS.source(t);function i(a,o){return a=+a,(o=+o)>=1?()=>a:o<=0?()=>0:function(){for(var s=0,l=a,u=o;l*u>16&&l*(1-u)>16;){var f=Math.floor((l+1)*u),c=n(f,l-f+1)();c<=u?(s+=f,l-=f,u=(u-c)/(1-c)):(l=f-1,u/=c)}for(var p=u<.5,h=p?u:1-u,d=r(h),m=d(),v=0;m<=l;++v)m+=d();return s+(p?v:l-v)}}return i.source=e,i}(fe);var Xj=function e(t){function r(n,i,a){var o;return(n=+n)==0?o=s=>-Math.log(s):(n=1/n,o=s=>Math.pow(s,n)),i=i==null?0:+i,a=a==null?1:+a,function(){return i+a*o(-Math.log1p(-t()))}}return r.source=e,r}(fe);var qj=function e(t){function r(n,i){return n=n==null?0:+n,i=i==null?1:+i,function(){return n+i*Math.tan(Math.PI*t())}}return r.source=e,r}(fe);var Zj=function e(t){function r(n,i){return n=n==null?0:+n,i=i==null?1:+i,function(){var a=t();return n+i*Math.log(a/(1-a))}}return r.source=e,r}(fe);var Kj=function e(t){var r=Xh.source(t),n=JS.source(t);function i(a){return function(){for(var o=0,s=a;s>16;){var l=Math.floor(.875*s),u=r(l)();if(u>s)return o+n(l-1,s/u)();o+=l,s-=u}for(var f=-Math.log1p(-t()),c=0;f<=s;++c)f-=Math.log1p(-t());return o+c}}return i.source=e,i}(fe);var $j=23283064365386963e-26;function OR(e=Math.random()){let t=(0<=e&&e<1?e/$j:Math.abs(e))|0;return()=>(t=1664525*t+1013904223|0,$j*(t>>>0))}function Ge(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function qi(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}var tw=Symbol("implicit");function qh(){var e=new Ta,t=[],r=[],n=tw;function i(a){let o=e.get(a);if(o===void 0){if(n!==tw)return n;e.set(a,o=t.push(a)-1)}return r[o%r.length]}return i.domain=function(a){if(!arguments.length)return t.slice();t=[],e=new Ta;for(let o of a)e.has(o)||e.set(o,t.push(o)-1);return i},i.range=function(a){return arguments.length?(r=Array.from(a),i):r.slice()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return qh(t,r).unknown(n)},Ge.apply(i,arguments),i}function Fg(){var e=qh().unknown(void 0),t=e.domain,r=e.range,n=0,i=1,a,o,s=!1,l=0,u=0,f=.5;delete e.unknown;function c(){var p=t().length,h=it&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function cSt(e,t,r){var n=e[0],i=e[1],a=t[0],o=t[1];return i2?pSt:cSt,l=u=null,c}function c(p){return p==null||isNaN(p=+p)?a:(l||(l=s(e.map(n),t,r)))(n(o(p)))}return c.invert=function(p){return o(i((u||(u=s(t,e.map(n),Cr)))(p)))},c.domain=function(p){return arguments.length?(e=Array.from(p,Ql),f()):e.slice()},c.range=function(p){return arguments.length?(t=Array.from(p),f()):t.slice()},c.rangeRound=function(p){return t=Array.from(p),r=Vl,f()},c.clamp=function(p){return arguments.length?(o=p?!0:_r,f()):o!==_r},c.interpolate=function(p){return arguments.length?(r=p,f()):r},c.unknown=function(p){return arguments.length?(a=p,c):a},function(p,h){return n=p,i=h,f()}}function sc(){return oc()(_r,_r)}function Gg(e,t,r,n){var i=Sf(e,t,r),a;switch(n=Ia(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(a=jb(i,o))&&(n.precision=a),gg(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=Qb(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=$b(i))&&(n.precision=a-(n.type==="%")*2);break}}return Kf(n)}function Sn(e){var t=e.domain;return e.ticks=function(r){var n=t();return Xn(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return Gg(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,a=n.length-1,o=n[i],s=n[a],l,u,f=10;for(s0;){if(u=Ma(o,s,r),u===l)return n[i]=o,n[a]=s,t(n);if(u>0)o=Math.floor(o/u)*u,s=Math.ceil(s/u)*u;else if(u<0)o=Math.ceil(o*u)/u,s=Math.floor(s*u)/u;else break;l=u}return e},e}function ew(){var e=sc();return e.copy=function(){return Co(e,ew())},Ge.apply(e,arguments),Sn(e)}function rw(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,Ql),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return rw(e).unknown(t)},e=arguments.length?Array.from(e,Ql):[0,1],Sn(r)}function Hg(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],a=e[n],o;return aMath.pow(e,t)}function gSt(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function rQ(e){return(t,r)=>-e(-t,r)}function Wg(e){let t=e(tQ,eQ),r=t.domain,n=10,i,a;function o(){return i=gSt(n),a=mSt(n),r()[0]<0?(i=rQ(i),a=rQ(a),e(hSt,dSt)):e(tQ,eQ),t}return t.base=function(s){return arguments.length?(n=+s,o()):n},t.domain=function(s){return arguments.length?(r(s),o()):r()},t.ticks=s=>{let l=r(),u=l[0],f=l[l.length-1],c=f0){for(;p<=h;++p)for(d=1;df)break;g.push(m)}}else for(;p<=h;++p)for(d=n-1;d>=1;--d)if(m=p>0?d/a(-p):d*a(p),!(mf)break;g.push(m)}g.length*2{if(s==null&&(s=10),l==null&&(l=n===10?"s":","),typeof l!="function"&&(!(n%1)&&(l=Ia(l)).precision==null&&(l.trim=!0),l=Kf(l)),s===1/0)return l;let u=Math.max(1,n*s/t.ticks().length);return f=>{let c=f/a(Math.round(i(f)));return c*nr(Hg(r(),{floor:s=>a(Math.floor(i(s))),ceil:s=>a(Math.ceil(i(s)))})),t}function nw(){let e=Wg(oc()).domain([1,10]);return e.copy=()=>Co(e,nw()).base(e.base()),Ge.apply(e,arguments),e}function nQ(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function iQ(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Yg(e){var t=1,r=e(nQ(t),iQ(t));return r.constant=function(n){return arguments.length?e(nQ(t=+n),iQ(t)):t},Sn(r)}function iw(){var e=Yg(oc());return e.copy=function(){return Co(e,iw()).constant(e.constant())},Ge.apply(e,arguments)}function aQ(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function ySt(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function xSt(e){return e<0?-e*e:e*e}function Xg(e){var t=e(_r,_r),r=1;function n(){return r===1?e(_r,_r):r===.5?e(ySt,xSt):e(aQ(r),aQ(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},Sn(t)}function qg(){var e=Xg(oc());return e.copy=function(){return Co(e,qg()).exponent(e.exponent())},Ge.apply(e,arguments),e}function oQ(){return qg.apply(null,arguments).exponent(.5)}function sQ(e){return Math.sign(e)*e*e}function _St(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function aw(){var e=sc(),t=[0,1],r=!1,n;function i(a){var o=_St(e(a));return isNaN(o)?n:r?Math.round(o):o}return i.invert=function(a){return e.invert(sQ(a))},i.domain=function(a){return arguments.length?(e.domain(a),i):e.domain()},i.range=function(a){return arguments.length?(e.range((t=Array.from(a,Ql)).map(sQ)),i):t.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(r=!!a,i):r},i.clamp=function(a){return arguments.length?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return aw(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},Ge.apply(i,arguments),Sn(i)}function ow(){var e=[],t=[],r=[],n;function i(){var o=0,s=Math.max(1,t.length);for(r=new Array(s-1);++o0?r[s-1]:e[0],s=r?[n[r-1],t]:[n[u-1],n[u]]},o.unknown=function(l){return arguments.length&&(a=l),o},o.thresholds=function(){return n.slice()},o.copy=function(){return sw().domain([e,t]).range(i).unknown(a)},Ge.apply(Sn(o),arguments)}function lw(){var e=[.5],t=[0,1],r,n=1;function i(a){return a!=null&&a<=a?t[Wn(e,a,0,n)]:r}return i.domain=function(a){return arguments.length?(e=Array.from(a),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var o=t.indexOf(a);return[e[o-1],e[o]]},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return lw().domain(e).range(t).unknown(r)},Ge.apply(i,arguments)}var VR=new Date,BR=new Date;function Ce(e,t,r,n){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{let o=i(a),s=i.ceil(a);return a-o(t(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,s)=>{let l=[];if(a=i.ceil(a),s=s==null?1:Math.floor(s),!(a0))return l;let u;do l.push(u=new Date(+a)),t(a,s),e(a);while(uCe(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;t(o,-1),!a(o););else for(;--s>=0;)for(;t(o,1),!a(o););}),r&&(i.count=(a,o)=>(VR.setTime(+a),BR.setTime(+o),e(VR),e(BR),Math.floor(r(VR,BR))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(n?o=>n(o)%a===0:o=>i.count(0,o)%a===0):i)),i}var Jl=Ce(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Jl.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Ce(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):Jl);var FR=Jl.range;var di=Ce(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*1e3)},(e,t)=>(t-e)/1e3,e=>e.getUTCSeconds()),GR=di.range;var uc=Ce(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*1e3)},(e,t)=>{e.setTime(+e+t*6e4)},(e,t)=>(t-e)/6e4,e=>e.getMinutes()),lQ=uc.range,fc=Ce(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*6e4)},(e,t)=>(t-e)/6e4,e=>e.getUTCMinutes()),uQ=fc.range;var pc=Ce(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*1e3-e.getMinutes()*6e4)},(e,t)=>{e.setTime(+e+t*36e5)},(e,t)=>(t-e)/36e5,e=>e.getHours()),fQ=pc.range,hc=Ce(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*36e5)},(e,t)=>(t-e)/36e5,e=>e.getUTCHours()),cQ=hc.range;var Eo=Ce(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*6e4)/864e5,e=>e.getDate()-1),pQ=Eo.range,tu=Ce(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/864e5,e=>e.getUTCDate()-1),hQ=tu.range,Kg=Ce(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/864e5,e=>Math.floor(e/864e5)),dQ=Kg.range;function dc(e){return Ce(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*6e4)/6048e5)}var Io=dc(0),vc=dc(1),HR=dc(2),WR=dc(3),Ts=dc(4),YR=dc(5),XR=dc(6),qR=Io.range,mQ=vc.range,gQ=HR.range,yQ=WR.range,xQ=Ts.range,_Q=YR.range,bQ=XR.range;function mc(e){return Ce(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/6048e5)}var Lo=mc(0),gc=mc(1),ZR=mc(2),KR=mc(3),Ms=mc(4),$R=mc(5),jR=mc(6),QR=Lo.range,SQ=gc.range,wQ=ZR.range,TQ=KR.range,MQ=Ms.range,AQ=$R.range,CQ=jR.range;var yc=Ce(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth()),DQ=yc.range,xc=Ce(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth()),EQ=xc.range;var Kn=Ce(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Kn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ce(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});var IQ=Kn.range,$n=Ce(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());$n.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ce(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});var LQ=$n.range;function RQ(e,t,r,n,i,a){let o=[[di,1,1e3],[di,5,5*1e3],[di,15,15*1e3],[di,30,30*1e3],[a,1,6e4],[a,5,5*6e4],[a,15,15*6e4],[a,30,30*6e4],[i,1,36e5],[i,3,3*36e5],[i,6,6*36e5],[i,12,12*36e5],[n,1,864e5],[n,2,2*864e5],[r,1,6048e5],[t,1,2592e6],[t,3,3*2592e6],[e,1,31536e6]];function s(u,f,c){let p=fv).right(o,p);if(h===o.length)return e.every(Sf(u/31536e6,f/31536e6,c));if(h===0)return Jl.every(Math.max(Sf(u,f,c),1));let[d,m]=o[p/o[h-1][2]53)return null;"w"in W||(W.w=1),"Z"in W?(Tt=tN($g(W.y,0,1)),te=Tt.getUTCDay(),Tt=te>4||te===0?gc.ceil(Tt):gc(Tt),Tt=tu.offset(Tt,(W.V-1)*7),W.y=Tt.getUTCFullYear(),W.m=Tt.getUTCMonth(),W.d=Tt.getUTCDate()+(W.w+6)%7):(Tt=JR($g(W.y,0,1)),te=Tt.getDay(),Tt=te>4||te===0?vc.ceil(Tt):vc(Tt),Tt=Eo.offset(Tt,(W.V-1)*7),W.y=Tt.getFullYear(),W.m=Tt.getMonth(),W.d=Tt.getDate()+(W.w+6)%7)}else("W"in W||"U"in W)&&("w"in W||(W.w="u"in W?W.u%7:"W"in W?1:0),te="Z"in W?tN($g(W.y,0,1)).getUTCDay():JR($g(W.y,0,1)).getDay(),W.m=0,W.d="W"in W?(W.w+6)%7+W.W*7-(te+5)%7:W.w+W.U*7-(te+6)%7);return"Z"in W?(W.H+=W.Z/100|0,W.M+=W.Z%100,tN(W)):JR(W)}}function T(K,ot,Q,W){for(var Gt=0,Tt=ot.length,te=Q.length,Jt,Dt;Gt=te)return-1;if(Jt=ot.charCodeAt(Gt++),Jt===37){if(Jt=ot.charAt(Gt++),Dt=S[Jt in NQ?ot.charAt(Gt++):Jt],!Dt||(W=Dt(K,Q,W))<0)return-1}else if(Jt!=Q.charCodeAt(W++))return-1}return W}function M(K,ot,Q){var W=u.exec(ot.slice(Q));return W?(K.p=f.get(W[0].toLowerCase()),Q+W[0].length):-1}function C(K,ot,Q){var W=h.exec(ot.slice(Q));return W?(K.w=d.get(W[0].toLowerCase()),Q+W[0].length):-1}function A(K,ot,Q){var W=c.exec(ot.slice(Q));return W?(K.w=p.get(W[0].toLowerCase()),Q+W[0].length):-1}function P(K,ot,Q){var W=g.exec(ot.slice(Q));return W?(K.m=y.get(W[0].toLowerCase()),Q+W[0].length):-1}function L(K,ot,Q){var W=m.exec(ot.slice(Q));return W?(K.m=v.get(W[0].toLowerCase()),Q+W[0].length):-1}function I(K,ot,Q){return T(K,t,ot,Q)}function E(K,ot,Q){return T(K,r,ot,Q)}function R(K,ot,Q){return T(K,n,ot,Q)}function k(K){return o[K.getDay()]}function O(K){return a[K.getDay()]}function z(K){return l[K.getMonth()]}function U(K){return s[K.getMonth()]}function G(K){return i[+(K.getHours()>=12)]}function Y(K){return 1+~~(K.getMonth()/3)}function et(K){return o[K.getUTCDay()]}function tt(K){return a[K.getUTCDay()]}function lt(K){return l[K.getUTCMonth()]}function Mt(K){return s[K.getUTCMonth()]}function ut(K){return i[+(K.getUTCHours()>=12)]}function ct(K){return 1+~~(K.getUTCMonth()/3)}return{format:function(K){var ot=b(K+="",x);return ot.toString=function(){return K},ot},parse:function(K){var ot=w(K+="",!1);return ot.toString=function(){return K},ot},utcFormat:function(K){var ot=b(K+="",_);return ot.toString=function(){return K},ot},utcParse:function(K){var ot=w(K+="",!0);return ot.toString=function(){return K},ot}}}var NQ={"-":"",_:" ",0:"0"},Ir=/^\s*\d+/,SSt=/^%/,wSt=/[\\^$*+?|[\]().{}]/g;function ye(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",a=i.length;return n+(a[t.toLowerCase(),r]))}function MSt(e,t,r){var n=Ir.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function ASt(e,t,r){var n=Ir.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function CSt(e,t,r){var n=Ir.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function DSt(e,t,r){var n=Ir.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function ESt(e,t,r){var n=Ir.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function kQ(e,t,r){var n=Ir.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function OQ(e,t,r){var n=Ir.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function ISt(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function LSt(e,t,r){var n=Ir.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function PSt(e,t,r){var n=Ir.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function zQ(e,t,r){var n=Ir.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function RSt(e,t,r){var n=Ir.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function UQ(e,t,r){var n=Ir.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function NSt(e,t,r){var n=Ir.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function kSt(e,t,r){var n=Ir.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function OSt(e,t,r){var n=Ir.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function zSt(e,t,r){var n=Ir.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function USt(e,t,r){var n=SSt.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function VSt(e,t,r){var n=Ir.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function BSt(e,t,r){var n=Ir.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function VQ(e,t){return ye(e.getDate(),t,2)}function FSt(e,t){return ye(e.getHours(),t,2)}function GSt(e,t){return ye(e.getHours()%12||12,t,2)}function HSt(e,t){return ye(1+Eo.count(Kn(e),e),t,3)}function WQ(e,t){return ye(e.getMilliseconds(),t,3)}function WSt(e,t){return WQ(e,t)+"000"}function YSt(e,t){return ye(e.getMonth()+1,t,2)}function XSt(e,t){return ye(e.getMinutes(),t,2)}function qSt(e,t){return ye(e.getSeconds(),t,2)}function ZSt(e){var t=e.getDay();return t===0?7:t}function KSt(e,t){return ye(Io.count(Kn(e)-1,e),t,2)}function YQ(e){var t=e.getDay();return t>=4||t===0?Ts(e):Ts.ceil(e)}function $St(e,t){return e=YQ(e),ye(Ts.count(Kn(e),e)+(Kn(e).getDay()===4),t,2)}function jSt(e){return e.getDay()}function QSt(e,t){return ye(vc.count(Kn(e)-1,e),t,2)}function JSt(e,t){return ye(e.getFullYear()%100,t,2)}function twt(e,t){return e=YQ(e),ye(e.getFullYear()%100,t,2)}function ewt(e,t){return ye(e.getFullYear()%1e4,t,4)}function rwt(e,t){var r=e.getDay();return e=r>=4||r===0?Ts(e):Ts.ceil(e),ye(e.getFullYear()%1e4,t,4)}function nwt(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ye(t/60|0,"0",2)+ye(t%60,"0",2)}function BQ(e,t){return ye(e.getUTCDate(),t,2)}function iwt(e,t){return ye(e.getUTCHours(),t,2)}function awt(e,t){return ye(e.getUTCHours()%12||12,t,2)}function owt(e,t){return ye(1+tu.count($n(e),e),t,3)}function XQ(e,t){return ye(e.getUTCMilliseconds(),t,3)}function swt(e,t){return XQ(e,t)+"000"}function lwt(e,t){return ye(e.getUTCMonth()+1,t,2)}function uwt(e,t){return ye(e.getUTCMinutes(),t,2)}function fwt(e,t){return ye(e.getUTCSeconds(),t,2)}function cwt(e){var t=e.getUTCDay();return t===0?7:t}function pwt(e,t){return ye(Lo.count($n(e)-1,e),t,2)}function qQ(e){var t=e.getUTCDay();return t>=4||t===0?Ms(e):Ms.ceil(e)}function hwt(e,t){return e=qQ(e),ye(Ms.count($n(e),e)+($n(e).getUTCDay()===4),t,2)}function dwt(e){return e.getUTCDay()}function vwt(e,t){return ye(gc.count($n(e)-1,e),t,2)}function mwt(e,t){return ye(e.getUTCFullYear()%100,t,2)}function gwt(e,t){return e=qQ(e),ye(e.getUTCFullYear()%100,t,2)}function ywt(e,t){return ye(e.getUTCFullYear()%1e4,t,4)}function xwt(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Ms(e):Ms.ceil(e),ye(e.getUTCFullYear()%1e4,t,4)}function _wt(){return"+0000"}function FQ(){return"%"}function GQ(e){return+e}function HQ(e){return Math.floor(+e/1e3)}var Zh,ty,eN,_c,ey;hw({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function hw(e){return Zh=Jg(e),ty=Zh.format,eN=Zh.parse,_c=Zh.utcFormat,ey=Zh.utcParse,Zh}var rN="%Y-%m-%dT%H:%M:%S.%LZ";function bwt(e){return e.toISOString()}var Swt=Date.prototype.toISOString?bwt:_c(rN),ZQ=Swt;function wwt(e){var t=new Date(e);return isNaN(t)?null:t}var Twt=+new Date("2000-01-01T00:00:00.000Z")?wwt:ey(rN),KQ=Twt;function Mwt(e){return new Date(e)}function Awt(e){return e instanceof Date?+e:+new Date(+e)}function dw(e,t,r,n,i,a,o,s,l,u){var f=sc(),c=f.invert,p=f.domain,h=u(".%L"),d=u(":%S"),m=u("%I:%M"),v=u("%I %p"),g=u("%a %d"),y=u("%b %d"),x=u("%B"),_=u("%Y");function S(b){return(l(b)t(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,a)=>po(e,a/n))},r.copy=function(){return yw(t).domain(e)},qi.apply(r,arguments)}function xw(){var e=0,t=.5,r=1,n=1,i,a,o,s,l,u=_r,f,c=!1,p;function h(m){return isNaN(m=+m)?p:(m=.5+((m=+f(m))-a)*(n*myb(e[e.length-1]);var uN=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(xt),lJ=zt(uN);var fN=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(xt),uJ=zt(fN);var cN=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(xt),fJ=zt(cN);var pN=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(xt),cJ=zt(pN);var hN=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(xt),pJ=zt(hN);var dN=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(xt),hJ=zt(dN);var vN=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(xt),dJ=zt(vN);var mN=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(xt),vJ=zt(mN);var gN=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(xt),mJ=zt(gN);var yN=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(xt),gJ=zt(yN);var xN=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(xt),yJ=zt(xN);var _N=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(xt),xJ=zt(_N);var bN=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(xt),_J=zt(bN);var SN=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(xt),bJ=zt(SN);var wN=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(xt),SJ=zt(wN);var TN=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(xt),wJ=zt(TN);var MN=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(xt),TJ=zt(MN);var AN=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(xt),MJ=zt(AN);var CN=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(xt),AJ=zt(CN);var DN=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(xt),CJ=zt(DN);var EN=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(xt),DJ=zt(EN);var IN=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(xt),EJ=zt(IN);var LN=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(xt),IJ=zt(LN);var PN=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(xt),LJ=zt(PN);var RN=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(xt),PJ=zt(RN);var NN=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(xt),RJ=zt(NN);var kN=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(xt),NJ=zt(kN);function kJ(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-e*(35.34-e*(2381.73-e*(6402.7-e*(7024.72-e*2710.57)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+e*(170.73+e*(52.82-e*(131.46-e*(176.58-e*67.37)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+e*(442.36-e*(2482.43-e*(6167.24-e*(6614.94-e*2475.67)))))))+")"}var OJ=kf(Qr(300,.5,0),Qr(-240,.5,1));var zJ=kf(Qr(-100,.75,.35),Qr(80,1.5,.8)),UJ=kf(Qr(260,.75,.35),Qr(80,1.5,.8)),Sw=Qr();function VJ(e){(e<0||e>1)&&(e-=Math.floor(e));var t=Math.abs(e-.5);return Sw.h=360*e-100,Sw.s=1.5-1.5*t,Sw.l=.8-.9*t,Sw+""}var ww=hs(),Cwt=Math.PI/3,Dwt=Math.PI*2/3;function BJ(e){var t;return e=(.5-e)*Math.PI,ww.r=255*(t=Math.sin(e))*t,ww.g=255*(t=Math.sin(e+Cwt))*t,ww.b=255*(t=Math.sin(e+Dwt))*t,ww+""}function FJ(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+e*(1172.33-e*(10793.56-e*(33300.12-e*(38394.49-e*14825.05)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+e*(557.33+e*(1225.33-e*(3574.96-e*(1073.77+e*707.56)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+e*(3211.1-e*(15327.97-e*(27814-e*(22569.18-e*6838.66)))))))+")"}function Tw(e){var t=e.length;return function(r){return e[Math.max(0,Math.min(t-1,Math.floor(r*t)))]}}var GJ=Tw(xt("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),HJ=Tw(xt("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),WJ=Tw(xt("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),YJ=Tw(xt("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function Ft(e){return function(){return e}}var ON=Math.abs,Hr=Math.atan2,Na=Math.cos,XJ=Math.max,Po=Math.min,nn=Math.sin,ee=Math.sqrt,Lr=1e-12,ka=Math.PI,ry=ka/2,Zi=2*ka;function qJ(e){return e>1?0:e<-1?ka:Math.acos(e)}function zN(e){return e>=1?ry:e<=-1?-ry:Math.asin(e)}function Ro(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{let n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new ms(t)}function Ewt(e){return e.innerRadius}function Iwt(e){return e.outerRadius}function Lwt(e){return e.startAngle}function Pwt(e){return e.endAngle}function Rwt(e){return e&&e.padAngle}function Nwt(e,t,r,n,i,a,o,s){var l=r-e,u=n-t,f=o-i,c=s-a,p=c*l-f*u;if(!(p*pI*I+E*E&&(T=C,M=A),{cx:T,cy:M,x01:-f,y01:-c,x11:T*(i/S-1),y11:M*(i/S-1)}}function ZJ(){var e=Ewt,t=Iwt,r=Ft(0),n=null,i=Lwt,a=Pwt,o=Rwt,s=null,l=Ro(u);function u(){var f,c,p=+e.apply(this,arguments),h=+t.apply(this,arguments),d=i.apply(this,arguments)-ry,m=a.apply(this,arguments)-ry,v=ON(m-d),g=m>d;if(s||(s=f=l()),hLr))s.moveTo(0,0);else if(v>Zi-Lr)s.moveTo(h*Na(d),h*nn(d)),s.arc(0,0,h,d,m,!g),p>Lr&&(s.moveTo(p*Na(m),p*nn(m)),s.arc(0,0,p,m,d,g));else{var y=d,x=m,_=d,S=m,b=v,w=v,T=o.apply(this,arguments)/2,M=T>Lr&&(n?+n.apply(this,arguments):ee(p*p+h*h)),C=Po(ON(h-p)/2,+r.apply(this,arguments)),A=C,P=C,L,I;if(M>Lr){var E=zN(M/p*nn(T)),R=zN(M/h*nn(T));(b-=E*2)>Lr?(E*=g?1:-1,_+=E,S-=E):(b=0,_=S=(d+m)/2),(w-=R*2)>Lr?(R*=g?1:-1,y+=R,x-=R):(w=0,y=x=(d+m)/2)}var k=h*Na(y),O=h*nn(y),z=p*Na(S),U=p*nn(S);if(C>Lr){var G=h*Na(x),Y=h*nn(x),et=p*Na(_),tt=p*nn(_),lt;if(vLr?P>Lr?(L=Mw(et,tt,k,O,h,P,g),I=Mw(G,Y,z,U,h,P,g),s.moveTo(L.cx+L.x01,L.cy+L.y01),PLr)||!(b>Lr)?s.lineTo(z,U):A>Lr?(L=Mw(z,U,G,Y,p,-A,g),I=Mw(k,O,et,tt,p,-A,g),s.lineTo(L.cx+L.x01,L.cy+L.y01),A=h;--d)s.point(x[d],_[d]);s.lineEnd(),s.areaEnd()}g&&(x[p]=+e(v,p,c),_[p]=+t(v,p,c),s.point(n?+n(v,p,c):x[p],r?+r(v,p,c):_[p]))}if(y)return s=null,y+""||null}function f(){return jh().defined(i).curve(o).context(a)}return u.x=function(c){return arguments.length?(e=typeof c=="function"?c:Ft(+c),n=null,u):e},u.x0=function(c){return arguments.length?(e=typeof c=="function"?c:Ft(+c),u):e},u.x1=function(c){return arguments.length?(n=c==null?null:typeof c=="function"?c:Ft(+c),u):n},u.y=function(c){return arguments.length?(t=typeof c=="function"?c:Ft(+c),r=null,u):t},u.y0=function(c){return arguments.length?(t=typeof c=="function"?c:Ft(+c),u):t},u.y1=function(c){return arguments.length?(r=c==null?null:typeof c=="function"?c:Ft(+c),u):r},u.lineX0=u.lineY0=function(){return f().x(e).y(t)},u.lineY1=function(){return f().x(e).y(r)},u.lineX1=function(){return f().x(n).y(t)},u.defined=function(c){return arguments.length?(i=typeof c=="function"?c:Ft(!!c),u):i},u.curve=function(c){return arguments.length?(o=c,a!=null&&(s=o(a)),u):o},u.context=function(c){return arguments.length?(c==null?a=s=null:s=o(a=c),u):a},u}function jJ(e,t){return te?1:t>=e?0:NaN}function QJ(e){return e}function JJ(){var e=QJ,t=jJ,r=null,n=Ft(0),i=Ft(Zi),a=Ft(0);function o(s){var l,u=(s=eu(s)).length,f,c,p=0,h=new Array(u),d=new Array(u),m=+n.apply(this,arguments),v=Math.min(Zi,Math.max(-Zi,i.apply(this,arguments)-m)),g,y=Math.min(Math.abs(v)/u,a.apply(this,arguments)),x=y*(v<0?-1:1),_;for(l=0;l0&&(p+=_);for(t!=null?h.sort(function(S,b){return t(d[S],d[b])}):r!=null&&h.sort(function(S,b){return r(s[S],s[b])}),l=0,c=p?(v-u*x)/p:0;l0?_*c:0)+x,d[f]={data:s[f],index:l,value:_,startAngle:m,endAngle:g,padAngle:y};return d}return o.value=function(s){return arguments.length?(e=typeof s=="function"?s:Ft(+s),o):e},o.sortValues=function(s){return arguments.length?(t=s,r=null,o):t},o.sort=function(s){return arguments.length?(r=s,t=null,o):r},o.startAngle=function(s){return arguments.length?(n=typeof s=="function"?s:Ft(+s),o):n},o.endAngle=function(s){return arguments.length?(i=typeof s=="function"?s:Ft(+s),o):i},o.padAngle=function(s){return arguments.length?(a=typeof s=="function"?s:Ft(+s),o):a},o}var Cw=Qh(ru);function ttt(e){this._curve=e}ttt.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}};function Qh(e){function t(r){return new ttt(e(r))}return t._curve=e,t}function Jh(e){var t=e.curve;return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e.curve=function(r){return arguments.length?t(Qh(r)):t()._curve},e}function UN(){return Jh(jh().curve(Cw))}function VN(){var e=Aw().curve(Cw),t=e.curve,r=e.lineX0,n=e.lineX1,i=e.lineY0,a=e.lineY1;return e.angle=e.x,delete e.x,e.startAngle=e.x0,delete e.x0,e.endAngle=e.x1,delete e.x1,e.radius=e.y,delete e.y,e.innerRadius=e.y0,delete e.y0,e.outerRadius=e.y1,delete e.y1,e.lineStartAngle=function(){return Jh(r())},delete e.lineX0,e.lineEndAngle=function(){return Jh(n())},delete e.lineX1,e.lineInnerRadius=function(){return Jh(i())},delete e.lineY0,e.lineOuterRadius=function(){return Jh(a())},delete e.lineY1,e.curve=function(o){return arguments.length?t(Qh(o)):t()._curve},e}function bc(e,t){return[(t=+t)*Math.cos(e-=Math.PI/2),t*Math.sin(e)]}var Dw=class{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}},BN=class{constructor(t){this._context=t}lineStart(){this._point=0}lineEnd(){}point(t,r){if(t=+t,r=+r,this._point===0)this._point=1;else{let n=bc(this._x0,this._y0),i=bc(this._x0,this._y0=(this._y0+r)/2),a=bc(t,this._y0),o=bc(t,r);this._context.moveTo(...n),this._context.bezierCurveTo(...i,...a,...o)}this._x0=t,this._y0=r}};function Ew(e){return new Dw(e,!0)}function Iw(e){return new Dw(e,!1)}function ett(e){return new BN(e)}function kwt(e){return e.source}function Owt(e){return e.target}function ny(e){let t=kwt,r=Owt,n=Kh,i=$h,a=null,o=null,s=Ro(l);function l(){let u,f=KJ.call(arguments),c=t.apply(this,f),p=r.apply(this,f);if(a==null&&(o=e(u=s())),o.lineStart(),f[0]=c,o.point(+n.apply(this,f),+i.apply(this,f)),f[0]=p,o.point(+n.apply(this,f),+i.apply(this,f)),o.lineEnd(),u)return o=null,u+""||null}return l.source=function(u){return arguments.length?(t=u,l):t},l.target=function(u){return arguments.length?(r=u,l):r},l.x=function(u){return arguments.length?(n=typeof u=="function"?u:Ft(+u),l):n},l.y=function(u){return arguments.length?(i=typeof u=="function"?u:Ft(+u),l):i},l.context=function(u){return arguments.length?(u==null?a=o=null:o=e(a=u),l):a},l}function rtt(){return ny(Ew)}function ntt(){return ny(Iw)}function itt(){let e=ny(ett);return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e}var zwt=ee(3),Lw={draw(e,t){let r=ee(t+Po(t/28,.75))*.59436,n=r/2,i=n*zwt;e.moveTo(0,r),e.lineTo(0,-r),e.moveTo(-i,-n),e.lineTo(i,n),e.moveTo(-i,n),e.lineTo(i,-n)}};var td={draw(e,t){let r=ee(t/ka);e.moveTo(r,0),e.arc(0,0,r,0,Zi)}};var Pw={draw(e,t){let r=ee(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}};var att=ee(1/3),Uwt=att*2,Rw={draw(e,t){let r=ee(t/Uwt),n=r*att;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}};var Nw={draw(e,t){let r=ee(t)*.62625;e.moveTo(0,-r),e.lineTo(r,0),e.lineTo(0,r),e.lineTo(-r,0),e.closePath()}};var kw={draw(e,t){let r=ee(t-Po(t/7,2))*.87559;e.moveTo(-r,0),e.lineTo(r,0),e.moveTo(0,r),e.lineTo(0,-r)}};var Ow={draw(e,t){let r=ee(t),n=-r/2;e.rect(n,n,r,r)}};var zw={draw(e,t){let r=ee(t)*.4431;e.moveTo(r,r),e.lineTo(r,-r),e.lineTo(-r,-r),e.lineTo(-r,r),e.closePath()}};var Vwt=.8908130915292852,ott=nn(ka/10)/nn(7*ka/10),Bwt=nn(Zi/10)*ott,Fwt=-Na(Zi/10)*ott,Uw={draw(e,t){let r=ee(t*Vwt),n=Bwt*r,i=Fwt*r;e.moveTo(0,-r),e.lineTo(n,i);for(let a=1;a<5;++a){let o=Zi*a/5,s=Na(o),l=nn(o);e.lineTo(l*r,-s*r),e.lineTo(s*n-l*i,l*n+s*i)}e.closePath()}};var FN=ee(3),Vw={draw(e,t){let r=-ee(t/(FN*3));e.moveTo(0,r*2),e.lineTo(-FN*r,-r),e.lineTo(FN*r,-r),e.closePath()}};var Gwt=ee(3),Bw={draw(e,t){let r=ee(t)*.6824,n=r/2,i=r*Gwt/2;e.moveTo(0,-r),e.lineTo(i,n),e.lineTo(-i,n),e.closePath()}};var Ki=-.5,$i=ee(3)/2,GN=1/ee(12),Hwt=(GN/2+1)*3,Fw={draw(e,t){let r=ee(t/Hwt),n=r/2,i=r*GN,a=n,o=r*GN+r,s=-a,l=o;e.moveTo(n,i),e.lineTo(a,o),e.lineTo(s,l),e.lineTo(Ki*n-$i*i,$i*n+Ki*i),e.lineTo(Ki*a-$i*o,$i*a+Ki*o),e.lineTo(Ki*s-$i*l,$i*s+Ki*l),e.lineTo(Ki*n+$i*i,Ki*i-$i*n),e.lineTo(Ki*a+$i*o,Ki*o-$i*a),e.lineTo(Ki*s+$i*l,Ki*l-$i*s),e.closePath()}};var iy={draw(e,t){let r=ee(t-Po(t/6,1.7))*.6189;e.moveTo(-r,-r),e.lineTo(r,r),e.moveTo(-r,r),e.lineTo(r,-r)}};var HN=[td,Pw,Rw,Ow,Uw,Vw,Fw],stt=[td,kw,iy,Bw,Lw,zw,Nw];function WN(e,t){let r=null,n=Ro(i);e=typeof e=="function"?e:Ft(e||td),t=typeof t=="function"?t:Ft(t===void 0?64:+t);function i(){let a;if(r||(r=a=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),a)return r=null,a+""||null}return i.type=function(a){return arguments.length?(e=typeof a=="function"?a:Ft(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:Ft(+a),i):t},i.context=function(a){return arguments.length?(r=a??null,i):r},i}function ji(){}function ed(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function ay(e){this._context=e}ay.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:ed(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:ed(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ltt(e){return new ay(e)}function utt(e){this._context=e}utt.prototype={areaStart:ji,areaEnd:ji,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:ed(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ftt(e){return new utt(e)}function ctt(e){this._context=e}ctt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:ed(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ptt(e){return new ctt(e)}function htt(e,t){this._basis=new ay(e),this._beta=t}htt.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var n=e[0],i=t[0],a=e[r]-n,o=t[r]-i,s=-1,l;++s<=r;)l=s/r,this._basis.point(this._beta*e[s]+(1-this._beta)*(n+l*a),this._beta*t[s]+(1-this._beta)*(i+l*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};var dtt=function e(t){function r(n){return t===1?new ay(n):new htt(n,t)}return r.beta=function(n){return e(+n)},r}(.85);function rd(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function Gw(e,t){this._context=e,this._k=(1-t)/6}Gw.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:rd(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:rd(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var vtt=function e(t){function r(n){return new Gw(n,t)}return r.tension=function(n){return e(+n)},r}(0);function Hw(e,t){this._context=e,this._k=(1-t)/6}Hw.prototype={areaStart:ji,areaEnd:ji,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:rd(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var mtt=function e(t){function r(n){return new Hw(n,t)}return r.tension=function(n){return e(+n)},r}(0);function Ww(e,t){this._context=e,this._k=(1-t)/6}Ww.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:rd(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var gtt=function e(t){function r(n){return new Ww(n,t)}return r.tension=function(n){return e(+n)},r}(0);function oy(e,t,r){var n=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>Lr){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);n=(n*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>Lr){var u=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,f=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*u+e._x1*e._l23_2a-t*e._l12_2a)/f,o=(o*u+e._y1*e._l23_2a-r*e._l12_2a)/f}e._context.bezierCurveTo(n,i,a,o,e._x2,e._y2)}function ytt(e,t){this._context=e,this._alpha=t}ytt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:oy(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var xtt=function e(t){function r(n){return t?new ytt(n,t):new Gw(n,0)}return r.alpha=function(n){return e(+n)},r}(.5);function _tt(e,t){this._context=e,this._alpha=t}_tt.prototype={areaStart:ji,areaEnd:ji,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:oy(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var btt=function e(t){function r(n){return t?new _tt(n,t):new Hw(n,0)}return r.alpha=function(n){return e(+n)},r}(.5);function Stt(e,t){this._context=e,this._alpha=t}Stt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:oy(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var wtt=function e(t){function r(n){return t?new Stt(n,t):new Ww(n,0)}return r.alpha=function(n){return e(+n)},r}(.5);function Ttt(e){this._context=e}Ttt.prototype={areaStart:ji,areaEnd:ji,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Mtt(e){return new Ttt(e)}function Att(e){return e<0?-1:1}function Ctt(e,t,r){var n=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(n||i<0&&-0),o=(r-e._y1)/(i||n<0&&-0),s=(a*i+o*n)/(n+i);return(Att(a)+Att(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Dtt(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function YN(e,t,r){var n=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-n)/3;e._context.bezierCurveTo(n+s,i+s*t,a-s,o-s*r,a,o)}function Yw(e){this._context=e}Yw.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:YN(this,this._t0,Dtt(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,YN(this,Dtt(this,r=Ctt(this,e,t)),r);break;default:YN(this,this._t0,r=Ctt(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Ett(e){this._context=new Itt(e)}(Ett.prototype=Object.create(Yw.prototype)).point=function(e,t){Yw.prototype.point.call(this,t,e)};function Itt(e){this._context=e}Itt.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,a){this._context.bezierCurveTo(t,e,n,r,a,i)}};function Ltt(e){return new Yw(e)}function Ptt(e){return new Ett(e)}function Ntt(e){this._context=e}Ntt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=Rtt(e),i=Rtt(t),a=0,o=1;o=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[r-1]=(e[r]+i[r-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function Ott(e){return new Xw(e,.5)}function ztt(e){return new Xw(e,0)}function Utt(e){return new Xw(e,1)}function Oa(e,t){if((o=e.length)>1)for(var r=1,n,i,a=e[t[0]],o,s=a.length;r=0;)r[t]=t;return r}function Wwt(e,t){return e[t]}function Ywt(e){let t=[];return t.key=e,t}function Vtt(){var e=Ft([]),t=za,r=Oa,n=Wwt;function i(a){var o=Array.from(e.apply(this,arguments),Ywt),s,l=o.length,u=-1,f;for(let c of a)for(s=0,++u;s0){for(var r,n,i=0,a=e[0].length,o;i0)for(var r,n=0,i,a,o,s,l,u=e[t[0]].length;n0?(i[0]=o,i[1]=o+=a):a<0?(i[1]=s,i[0]=s+=a):(i[0]=0,i[1]=a)}function Gtt(e,t){if((i=e.length)>0){for(var r=0,n=e[t[0]],i,a=n.length;r0)||!((a=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,a,o;na&&(a=i,r=t);return r}function Zw(e){var t=e.map(XN);return za(e).sort(function(r,n){return t[r]-t[n]})}function XN(e){for(var t=0,r=-1,n=e.length,i;++r()=>e;function qN(e,{sourceEvent:t,target:r,transform:n,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:n,enumerable:!0,configurable:!0},_:{value:i}})}function Qi(e,t,r){this.k=e,this.x=t,this.y=r}Qi.prototype={constructor:Qi,scale:function(e){return e===1?this:new Qi(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Qi(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var nd=new Qi(1,0,0);Kw.prototype=Qi.prototype;function Kw(e){for(;!e.__zoom;)if(!(e=e.parentNode))return nd;return e.__zoom}function $w(e){e.stopImmediatePropagation()}function id(e){e.preventDefault(),e.stopImmediatePropagation()}function qwt(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function Zwt(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function qtt(){return this.__zoom||nd}function Kwt(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function $wt(){return navigator.maxTouchPoints||"ontouchstart"in this}function jwt(e,t,r){var n=e.invertX(t[0][0])-r[0][0],i=e.invertX(t[1][0])-r[1][0],a=e.invertY(t[0][1])-r[0][1],o=e.invertY(t[1][1])-r[1][1];return e.translate(i>n?(n+i)/2:Math.min(0,n)||Math.max(0,i),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}function Ztt(){var e=qwt,t=Zwt,r=jwt,n=Kwt,i=$wt,a=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],s=250,l=Ab,u=Gi("start","zoom","end"),f,c,p,h=500,d=150,m=0,v=10;function g(I){I.property("__zoom",qtt).on("wheel.zoom",T,{passive:!1}).on("mousedown.zoom",M).on("dblclick.zoom",C).filter(i).on("touchstart.zoom",A).on("touchmove.zoom",P).on("touchend.zoom touchcancel.zoom",L).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}g.transform=function(I,E,R,k){var O=I.selection?I.selection():I;O.property("__zoom",qtt),I!==O?S(I,E,R,k):O.interrupt().each(function(){b(this,arguments).event(k).start().zoom(null,typeof E=="function"?E.apply(this,arguments):E).end()})},g.scaleBy=function(I,E,R,k){g.scaleTo(I,function(){var O=this.__zoom.k,z=typeof E=="function"?E.apply(this,arguments):E;return O*z},R,k)},g.scaleTo=function(I,E,R,k){g.transform(I,function(){var O=t.apply(this,arguments),z=this.__zoom,U=R==null?_(O):typeof R=="function"?R.apply(this,arguments):R,G=z.invert(U),Y=typeof E=="function"?E.apply(this,arguments):E;return r(x(y(z,Y),U,G),O,o)},R,k)},g.translateBy=function(I,E,R,k){g.transform(I,function(){return r(this.__zoom.translate(typeof E=="function"?E.apply(this,arguments):E,typeof R=="function"?R.apply(this,arguments):R),t.apply(this,arguments),o)},null,k)},g.translateTo=function(I,E,R,k,O){g.transform(I,function(){var z=t.apply(this,arguments),U=this.__zoom,G=k==null?_(z):typeof k=="function"?k.apply(this,arguments):k;return r(nd.translate(G[0],G[1]).scale(U.k).translate(typeof E=="function"?-E.apply(this,arguments):-E,typeof R=="function"?-R.apply(this,arguments):-R),z,o)},k,O)};function y(I,E){return E=Math.max(a[0],Math.min(a[1],E)),E===I.k?I:new Qi(E,I.x,I.y)}function x(I,E,R){var k=E[0]-R[0]*I.k,O=E[1]-R[1]*I.k;return k===I.x&&O===I.y?I:new Qi(I.k,k,O)}function _(I){return[(+I[0][0]+ +I[1][0])/2,(+I[0][1]+ +I[1][1])/2]}function S(I,E,R,k){I.on("start.zoom",function(){b(this,arguments).event(k).start()}).on("interrupt.zoom end.zoom",function(){b(this,arguments).event(k).end()}).tween("zoom",function(){var O=this,z=arguments,U=b(O,z).event(k),G=t.apply(O,z),Y=R==null?_(G):typeof R=="function"?R.apply(O,z):R,et=Math.max(G[1][0]-G[0][0],G[1][1]-G[0][1]),tt=O.__zoom,lt=typeof E=="function"?E.apply(O,z):E,Mt=l(tt.invert(Y).concat(et/tt.k),lt.invert(Y).concat(et/lt.k));return function(ut){if(ut===1)ut=lt;else{var ct=Mt(ut),K=et/ct[2];ut=new Qi(K,Y[0]-ct[0]*K,Y[1]-ct[1]*K)}U.zoom(null,ut)}})}function b(I,E,R){return!R&&I.__zooming||new w(I,E)}function w(I,E){this.that=I,this.args=E,this.active=0,this.sourceEvent=null,this.extent=t.apply(I,E),this.taps=0}w.prototype={event:function(I){return I&&(this.sourceEvent=I),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(I,E){return this.mouse&&I!=="mouse"&&(this.mouse[1]=E.invert(this.mouse[0])),this.touch0&&I!=="touch"&&(this.touch0[1]=E.invert(this.touch0[0])),this.touch1&&I!=="touch"&&(this.touch1[1]=E.invert(this.touch1[0])),this.that.__zoom=E,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(I){var E=$e(this.that).datum();u.call(I,this.that,new qN(I,{sourceEvent:this.sourceEvent,target:g,type:I,transform:this.that.__zoom,dispatch:u}),E)}};function T(I,...E){if(!e.apply(this,arguments))return;var R=b(this,E).event(I),k=this.__zoom,O=Math.max(a[0],Math.min(a[1],k.k*Math.pow(2,n.apply(this,arguments)))),z=Ar(I);if(R.wheel)(R.mouse[0][0]!==z[0]||R.mouse[0][1]!==z[1])&&(R.mouse[1]=k.invert(R.mouse[0]=z)),clearTimeout(R.wheel);else{if(k.k===O)return;R.mouse=[z,k.invert(z)],Da(this),R.start()}id(I),R.wheel=setTimeout(U,d),R.zoom("mouse",r(x(y(k,O),R.mouse[0],R.mouse[1]),R.extent,o));function U(){R.wheel=null,R.end()}}function M(I,...E){if(p||!e.apply(this,arguments))return;var R=I.currentTarget,k=b(this,E,!0).event(I),O=$e(I.view).on("mousemove.zoom",Y,!0).on("mouseup.zoom",et,!0),z=Ar(I,R),U=I.clientX,G=I.clientY;Rl(I.view),$w(I),k.mouse=[z,this.__zoom.invert(z)],Da(this),k.start();function Y(tt){if(id(tt),!k.moved){var lt=tt.clientX-U,Mt=tt.clientY-G;k.moved=lt*lt+Mt*Mt>m}k.event(tt).zoom("mouse",r(x(k.that.__zoom,k.mouse[0]=Ar(tt,R),k.mouse[1]),k.extent,o))}function et(tt){O.on("mousemove.zoom mouseup.zoom",null),Nl(tt.view,k.moved),id(tt),k.event(tt).end()}}function C(I,...E){if(e.apply(this,arguments)){var R=this.__zoom,k=Ar(I.changedTouches?I.changedTouches[0]:I,this),O=R.invert(k),z=R.k*(I.shiftKey?.5:2),U=r(x(y(R,z),k,O),t.apply(this,E),o);id(I),s>0?$e(this).transition().duration(s).call(S,U,k,I):$e(this).call(g.transform,U,k,I)}}function A(I,...E){if(e.apply(this,arguments)){var R=I.touches,k=R.length,O=b(this,E,I.changedTouches.length===k).event(I),z,U,G,Y;for($w(I),U=0;U$N,sankeyCenter:()=>jtt,sankeyJustify:()=>jw,sankeyLeft:()=>Ktt,sankeyLinkHorizontal:()=>oet,sankeyRight:()=>$tt});function ly(e,t){let r;if(t===void 0)for(let n of e)n!=null&&(r=n)&&(r=n);else{let n=-1;for(let i of e)(i=t(i,++n,e))!=null&&(r=i)&&(r=i)}return r}function ad(e,t){let r;if(t===void 0)for(let n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let i of e)(i=t(i,++n,e))!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}return r}function od(e,t){let r=0;if(t===void 0)for(let n of e)(n=+n)&&(r+=n);else{let n=-1;for(let i of e)(i=+t(i,++n,e))&&(r+=i)}return r}function Qwt(e){return e.target.depth}function Ktt(e){return e.depth}function $tt(e,t){return t-1-e.height}function jw(e,t){return e.sourceLinks.length?e.depth:t-1}function jtt(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?ad(e.sourceLinks,Qwt)-1:0}function sd(e){return function(){return e}}function Qtt(e,t){return Qw(e.source,t.source)||e.index-t.index}function Jtt(e,t){return Qw(e.target,t.target)||e.index-t.index}function Qw(e,t){return e.y0-t.y0}function KN(e){return e.value}function Jwt(e){return e.index}function t2t(e){return e.nodes}function e2t(e){return e.links}function tet(e,t){let r=e.get(t);if(!r)throw new Error("missing: "+t);return r}function eet({nodes:e}){for(let t of e){let r=t.y0,n=r;for(let i of t.sourceLinks)i.y0=r+i.width/2,r+=i.width;for(let i of t.targetLinks)i.y1=n+i.width/2,n+=i.width}}function $N(){let e=0,t=0,r=1,n=1,i=24,a=8,o,s=Jwt,l=jw,u,f,c=t2t,p=e2t,h=6;function d(){let E={nodes:c.apply(null,arguments),links:p.apply(null,arguments)};return m(E),v(E),g(E),y(E),S(E),eet(E),E}d.update=function(E){return eet(E),E},d.nodeId=function(E){return arguments.length?(s=typeof E=="function"?E:sd(E),d):s},d.nodeAlign=function(E){return arguments.length?(l=typeof E=="function"?E:sd(E),d):l},d.nodeSort=function(E){return arguments.length?(u=E,d):u},d.nodeWidth=function(E){return arguments.length?(i=+E,d):i},d.nodePadding=function(E){return arguments.length?(a=o=+E,d):a},d.nodes=function(E){return arguments.length?(c=typeof E=="function"?E:sd(E),d):c},d.links=function(E){return arguments.length?(p=typeof E=="function"?E:sd(E),d):p},d.linkSort=function(E){return arguments.length?(f=E,d):f},d.size=function(E){return arguments.length?(e=t=0,r=+E[0],n=+E[1],d):[r-e,n-t]},d.extent=function(E){return arguments.length?(e=+E[0][0],r=+E[1][0],t=+E[0][1],n=+E[1][1],d):[[e,t],[r,n]]},d.iterations=function(E){return arguments.length?(h=+E,d):h};function m({nodes:E,links:R}){for(let[O,z]of E.entries())z.index=O,z.sourceLinks=[],z.targetLinks=[];let k=new Map(E.map((O,z)=>[s(O,z,E),O]));for(let[O,z]of R.entries()){z.index=O;let{source:U,target:G}=z;typeof U!="object"&&(U=z.source=tet(k,U)),typeof G!="object"&&(G=z.target=tet(k,G)),U.sourceLinks.push(z),G.targetLinks.push(z)}if(f!=null)for(let{sourceLinks:O,targetLinks:z}of E)O.sort(f),z.sort(f)}function v({nodes:E}){for(let R of E)R.value=R.fixedValue===void 0?Math.max(od(R.sourceLinks,KN),od(R.targetLinks,KN)):R.fixedValue}function g({nodes:E}){let R=E.length,k=new Set(E),O=new Set,z=0;for(;k.size;){for(let U of k){U.depth=z;for(let{target:G}of U.sourceLinks)O.add(G)}if(++z>R)throw new Error("circular link");k=O,O=new Set}}function y({nodes:E}){let R=E.length,k=new Set(E),O=new Set,z=0;for(;k.size;){for(let U of k){U.height=z;for(let{source:G}of U.targetLinks)O.add(G)}if(++z>R)throw new Error("circular link");k=O,O=new Set}}function x({nodes:E}){let R=ly(E,z=>z.depth)+1,k=(r-e-i)/(R-1),O=new Array(R);for(let z of E){let U=Math.max(0,Math.min(R-1,Math.floor(l.call(null,z,R))));z.layer=U,z.x0=e+U*k,z.x1=z.x0+i,O[U]?O[U].push(z):O[U]=[z]}if(u)for(let z of O)z.sort(u);return O}function _(E){let R=ad(E,k=>(n-t-(k.length-1)*o)/od(k,KN));for(let k of E){let O=t;for(let z of k){z.y0=O,z.y1=O+z.value*R,O=z.y1+o;for(let U of z.sourceLinks)U.width=U.value*R}O=(n-O+o)/(k.length+1);for(let z=0;zk.length)-1)),_(R);for(let k=0;k0))continue;let tt=(Y/et-G.y0)*R;G.y0+=tt,G.y1+=tt,A(G)}u===void 0&&U.sort(Qw),T(U,k)}}function w(E,R,k){for(let O=E.length,z=O-2;z>=0;--z){let U=E[z];for(let G of U){let Y=0,et=0;for(let{target:lt,value:Mt}of G.sourceLinks){let ut=Mt*(lt.layer-G.layer);Y+=I(G,lt)*ut,et+=ut}if(!(et>0))continue;let tt=(Y/et-G.y0)*R;G.y0+=tt,G.y1+=tt,A(G)}u===void 0&&U.sort(Qw),T(U,k)}}function T(E,R){let k=E.length>>1,O=E[k];C(E,O.y0-o,k-1,R),M(E,O.y1+o,k+1,R),C(E,n,E.length-1,R),M(E,t,0,R)}function M(E,R,k,O){for(;k1e-6&&(z.y0+=U,z.y1+=U),R=z.y1+o}}function C(E,R,k,O){for(;k>=0;--k){let z=E[k],U=(z.y1-R)*O;U>1e-6&&(z.y0-=U,z.y1-=U),R=z.y0-o}}function A({sourceLinks:E,targetLinks:R}){if(f===void 0){for(let{source:{sourceLinks:k}}of R)k.sort(Jtt);for(let{target:{targetLinks:k}}of E)k.sort(Qtt)}}function P(E){if(f===void 0)for(let{sourceLinks:R,targetLinks:k}of E)R.sort(Jtt),k.sort(Qtt)}function L(E,R){let k=E.y0-(E.sourceLinks.length-1)*o/2;for(let{target:O,width:z}of E.sourceLinks){if(O===R)break;k+=z+o}for(let{source:O,width:z}of R.targetLinks){if(O===E)break;k-=z}return k}function I(E,R){let k=R.y0-(R.targetLinks.length-1)*o/2;for(let{source:O,width:z}of R.targetLinks){if(O===E)break;k+=z+o}for(let{target:O,width:z}of E.sourceLinks){if(O===R)break;k-=z}return k}return d}var jN=Math.PI,QN=2*jN,Sc=1e-6,r2t=QN-Sc;function JN(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function ret(){return new JN}JN.prototype=ret.prototype={constructor:JN,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,r,n){this._+="Q"+ +e+","+ +t+","+(this._x1=+r)+","+(this._y1=+n)},bezierCurveTo:function(e,t,r,n,i,a){this._+="C"+ +e+","+ +t+","+ +r+","+ +n+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(e,t,r,n,i){e=+e,t=+t,r=+r,n=+n,i=+i;var a=this._x1,o=this._y1,s=r-e,l=n-t,u=a-e,f=o-t,c=u*u+f*f;if(i<0)throw new Error("negative radius: "+i);if(this._x1===null)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(c>Sc)if(!(Math.abs(f*s-l*u)>Sc)||!i)this._+="L"+(this._x1=e)+","+(this._y1=t);else{var p=r-a,h=n-o,d=s*s+l*l,m=p*p+h*h,v=Math.sqrt(d),g=Math.sqrt(c),y=i*Math.tan((jN-Math.acos((d+c-m)/(2*v*g)))/2),x=y/g,_=y/v;Math.abs(x-1)>Sc&&(this._+="L"+(e+x*u)+","+(t+x*f)),this._+="A"+i+","+i+",0,0,"+ +(f*p>u*h)+","+(this._x1=e+_*s)+","+(this._y1=t+_*l)}},arc:function(e,t,r,n,i,a){e=+e,t=+t,r=+r,a=!!a;var o=r*Math.cos(n),s=r*Math.sin(n),l=e+o,u=t+s,f=1^a,c=a?n-i:i-n;if(r<0)throw new Error("negative radius: "+r);this._x1===null?this._+="M"+l+","+u:(Math.abs(this._x1-l)>Sc||Math.abs(this._y1-u)>Sc)&&(this._+="L"+l+","+u),r&&(c<0&&(c=c%QN+QN),c>r2t?this._+="A"+r+","+r+",0,1,"+f+","+(e-o)+","+(t-s)+"A"+r+","+r+",0,1,"+f+","+(this._x1=l)+","+(this._y1=u):c>Sc&&(this._+="A"+r+","+r+",0,"+ +(c>=jN)+","+f+","+(this._x1=e+r*Math.cos(i))+","+(this._y1=t+r*Math.sin(i))))},rect:function(e,t,r,n){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +r+"v"+ +n+"h"+-r+"Z"},toString:function(){return this._}};var tk=ret;function ek(e){return function(){return e}}function net(e){return e[0]}function iet(e){return e[1]}var aet=Array.prototype.slice;function n2t(e){return e.source}function i2t(e){return e.target}function a2t(e){var t=n2t,r=i2t,n=net,i=iet,a=null;function o(){var s,l=aet.call(arguments),u=t.apply(this,l),f=r.apply(this,l);if(a||(a=s=tk()),e(a,+n.apply(this,(l[0]=u,l)),+i.apply(this,l),+n.apply(this,(l[0]=f,l)),+i.apply(this,l)),s)return a=null,s+""||null}return o.source=function(s){return arguments.length?(t=s,o):t},o.target=function(s){return arguments.length?(r=s,o):r},o.x=function(s){return arguments.length?(n=typeof s=="function"?s:ek(+s),o):n},o.y=function(s){return arguments.length?(i=typeof s=="function"?s:ek(+s),o):i},o.context=function(s){return arguments.length?(a=s??null,o):a},o}function o2t(e,t,r,n,i){e.moveTo(t,r),e.bezierCurveTo(t=(t+n)/2,r,t,i,n,i)}function rk(){return a2t(o2t)}function s2t(e){return[e.source.x1,e.y0]}function l2t(e){return[e.target.x0,e.y1]}function oet(){return rk().source(s2t).target(l2t)}var ld=Object.assign(ZN,nk);function set(e,t){let r=t.data,n=t.align??"left",i=t.valueFormatter??(c=>c),a=e.clientWidth,o=e.clientHeight,s="path",l=(()=>{let c=ld.scaleOrdinal(ld.schemeCategory10);return p=>c(p.category===void 0?p.name:p.category)})(),u=(()=>{let c=ld.sankey().nodeId(p=>p.name).nodeAlign(ld[`sankey${n[0].toUpperCase()}${n.slice(1)}`]).nodeWidth(15).nodePadding(10).extent([[1,5],[a-1,o-5]]);return({nodes:p,links:h})=>c({nodes:p.map(d=>Object.assign({},d)),links:h.map(d=>Object.assign({},d))})})(),f=(()=>{let c=ld.create("svg").attr("viewBox",[0,0,a,o]),{nodes:p,links:h}=u(r);c.append("g").attr("stroke","#000").selectAll("rect").data(p).join("rect").attr("x",v=>v.x0).attr("y",v=>v.y0).attr("height",v=>v.y1-v.y0).attr("width",v=>v.x1-v.x0).attr("fill",l).append("title").text(v=>`${v.name}: ${i(v.value)}`);let d=c.append("g").attr("fill","none").attr("stroke-opacity",.5).selectAll("g").data(h).join("g").style("mix-blend-mode","multiply");if(s==="path"){let v=d.append("linearGradient").attr("id",(g,y)=>g.uid=`link-${y}`).attr("gradientUnits","userSpaceOnUse").attr("x1",g=>g.source.x1).attr("x2",g=>g.target.x0);v.append("stop").attr("offset","0%").attr("stop-color",g=>l(g.source)),v.append("stop").attr("offset","100%").attr("stop-color",g=>l(g.target))}d.append("path").attr("d",ld.sankeyLinkHorizontal()).attr("stroke",v=>s==="none"?"#aaa":s==="path"?`url(#${v.uid})`:l(s==="input"?v.source:v.target)).attr("stroke-width",v=>Math.max(1,v.width)),d.append("title").text(v=>`${v.source.name} \u2192 ${v.target.name}: ${i(v.value)}`);let m=c.append("g").attr("font-family","sans-serif").attr("font-size",10).selectAll("text").data(p).join("text").attr("x",v=>v.x0(v.y1+v.y0)/2).attr("dy","0.35em").attr("text-anchor",v=>v.x0`${v.label??v.name} ${i(v.value)}`);return t.onClick&&m.on("click",t.onClick),c.node()})();e.replaceChildren(f)}var Jw=class e{static runScript(t,r,n){return new Function("panel","ledger","fava","helpers","utils",n.script)(n,t,t,lL,r)}static html(t,r,n,i){try{i.innerHTML=e.runScript(t,r,n)}catch(a){i.innerHTML=a}}static echarts(t,r,n,i){let a;try{a=e.runScript(t,r,n)}catch(l){i.innerHTML=l;return}let o=window.navigator.userAgent==="puppeteer"?"svg":void 0,s=oU(i,void 0,{renderer:o});a.onClick&&(s.on("click",a.onClick),delete a.onClick),a.onDblClick&&(s.on("dblclick",a.onDblClick),delete a.onDblClick),s.setOption(a)}static d3_sankey(t,r,n,i){let a;try{a=e.runScript(t,r,n)}catch(o){i.innerHTML=o;return}set(i,a)}static jinja2(t,r,n,i){i.innerHTML=n.template}};function u2t(e,t,r){for(let n=0;nqf(t,r).then(n=>new DOMParser().parseFromString(n,e))}var XZ=OP("application/xml"),qZ=OP("text/html"),ZZ=OP("image/svg+xml");function KZ(e,t){var r,n=1;e==null&&(e=0),t==null&&(t=0);function i(){var a,o=r.length,s,l=0,u=0;for(a=0;a=(c=(s+u)/2))?s=c:u=c,(v=r>=(p=(l+f)/2))?l=p:f=p,i=a,!(a=a[g=v<<1|m]))return i[g]=o,e;if(h=+e._x.call(null,a.data),d=+e._y.call(null,a.data),t===h&&r===d)return o.next=a,i?i[g]=o:e._root=o,e;do i=i?i[g]=new Array(4):e._root=new Array(4),(m=t>=(c=(s+u)/2))?s=c:u=c,(v=r>=(p=(l+f)/2))?l=p:f=p;while((g=v<<1|m)===(y=(d>=p)<<1|h>=c));return i[y]=a,i[g]=o,e}function QZ(e){var t,r,n=e.length,i,a,o=new Array(n),s=new Array(n),l=1/0,u=1/0,f=-1/0,c=-1/0;for(r=0;rf&&(f=i),ac&&(c=a));if(l>f||u>c)return this;for(this.cover(l,u).cover(f,c),r=0;re||e>=i||n>t||t>=a;)switch(u=(tf||(s=d.y0)>c||(l=d.x1)=g)<<1|e>=v)&&(d=p[p.length-1],p[p.length-1]=p[p.length-1-m],p[p.length-1-m]=d)}else{var y=e-+this._x.call(null,h.data),x=t-+this._y.call(null,h.data),_=y*y+x*x;if(_=(p=(o+l)/2))?o=p:l=p,(m=c>=(h=(s+u)/2))?s=h:u=h,t=r,!(r=r[v=m<<1|d]))return this;if(!r.length)break;(t[v+1&3]||t[v+2&3]||t[v+3&3])&&(n=t,g=v)}for(;r.data!==e;)if(i=r,!(r=r.next))return this;return(a=r.next)&&delete r.next,i?(a?i.next=a:delete i.next,this):t?(a?t[v]=a:delete t[v],(r=t[0]||t[1]||t[2]||t[3])&&r===(t[3]||t[2]||t[1]||t[0])&&!r.length&&(n?n[g]=r:this._root=r),this):(this._root=a,this)}function iK(e){for(var t=0,r=e.length;tp.index){var A=h-T.x-T.vx,P=d-T.y-T.vy,L=A*A+P*P;Lh+C||bd+C||wu.r&&(u.r=u[f].r)}function l(){if(t){var u,f=t.length,c;for(r=new Array(f),u=0;u[t(S,b,o),S])),_;for(v=0,s=new Array(g);v(e=(1664525*e+1013904223)%4294967296)/4294967296}function yK(e){return e.x}function xK(e){return e.y}var q_t=10,Z_t=Math.PI*(3-Math.sqrt(5));function _K(e){var t,r=1,n=.001,i=1-Math.pow(n,1/300),a=0,o=.6,s=new Map,l=Uf(c),u=Gi("tick","end"),f=gK();e==null&&(e=[]);function c(){p(),u.call("tick",t),r1?(v==null?s.delete(m):s.set(m,d(v)),t):s.get(m)},find:function(m,v,g){var y=0,x=e.length,_,S,b,w,T;for(g==null?g=1/0:g*=g,y=0;y1?(u.on(m,v),t):u.on(m)}}}function bK(){var e,t,r,n,i=Oe(-30),a,o=1,s=1/0,l=.81;function u(h){var d,m=e.length,v=Yl(e,yK,xK).visitAfter(c);for(n=h,d=0;d=s)return;(h.data!==t||h.next)&&(g===0&&(g=Ea(r),_+=g*g),y===0&&(y=Ea(r),_+=y*y),_=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Zf(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function bo(e){return e=Zf(Math.abs(e)),e?e[1]:NaN}function AK(e,t){return function(r,n){for(var i=r.length,a=[],o=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),a.push(r.substring(i-=s,i+s)),!((l+=s+1)>n));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function CK(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var K_t=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ia(e){if(!(t=K_t.exec(e)))throw new Error("invalid format: "+e);var t;return new gg({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Ia.prototype=gg.prototype;function gg(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}gg.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function DK(e){t:for(var t=e.length,r=1,n=-1,i;r0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var UP;function EK(e,t){var r=Zf(e,t);if(!r)return e+"";var n=r[0],i=r[1],a=i-(UP=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=n.length;return a===o?n:a>o?n+new Array(a-o+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+Zf(e,Math.max(0,t+a-1))[0]}function VP(e,t){var r=Zf(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}var BP={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:MK,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>VP(e*100,t),r:VP,s:EK,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function FP(e){return e}var IK=Array.prototype.map,LK=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function qb(e){var t=e.grouping===void 0||e.thousands===void 0?FP:AK(IK.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?FP:CK(IK.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"\u2212":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function u(c){c=Ia(c);var p=c.fill,h=c.align,d=c.sign,m=c.symbol,v=c.zero,g=c.width,y=c.comma,x=c.precision,_=c.trim,S=c.type;S==="n"?(y=!0,S="g"):BP[S]||(x===void 0&&(x=12),_=!0,S="g"),(v||p==="0"&&h==="=")&&(v=!0,p="0",h="=");var b=m==="$"?r:m==="#"&&/[boxX]/.test(S)?"0"+S.toLowerCase():"",w=m==="$"?n:/[%p]/.test(S)?o:"",T=BP[S],M=/[defgprs%]/.test(S);x=x===void 0?6:/[gprs]/.test(S)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function C(A){var P=b,L=w,I,E,R;if(S==="c")L=T(A)+L,A="";else{A=+A;var k=A<0||1/A<0;if(A=isNaN(A)?l:T(Math.abs(A),x),_&&(A=DK(A)),k&&+A==0&&d!=="+"&&(k=!1),P=(k?d==="("?d:s:d==="-"||d==="("?"":d)+P,L=(S==="s"?LK[8+UP/3]:"")+L+(k&&d==="("?")":""),M){for(I=-1,E=A.length;++IR||R>57){L=(R===46?i+A.slice(I+1):A.slice(I))+L,A=A.slice(0,I);break}}}y&&!v&&(A=t(A,1/0));var O=P.length+A.length+L.length,z=O>1)+P+A+L+z.slice(O);break;default:A=z+P+A+L;break}return a(A)}return C.toString=function(){return c+""},C}function f(c,p){var h=u((c=Ia(c),c.type="f",c)),d=Math.max(-8,Math.min(8,Math.floor(bo(p)/3)))*3,m=Math.pow(10,-d),v=LK[8+d/3];return function(g){return h(m*g)+v}}return{format:u,formatPrefix:f}}var Zb,Kf,yg;Kb({thousands:",",grouping:[3],currency:["$",""]});function Kb(e){return Zb=qb(e),Kf=Zb.format,yg=Zb.formatPrefix,Zb}function $b(e){return Math.max(0,-bo(Math.abs(e)))}function jb(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(bo(t)/3)))*3-bo(Math.abs(e)))}function Qb(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,bo(t)-bo(e))+1}var wt=1e-6,ys=1e-12,qt=Math.PI,Ee=qt/2,Eh=qt/4,nr=qt*2,le=180/qt,It=qt/180,Bt=Math.abs,Yi=Math.atan,Le=Math.atan2,mt=Math.cos,xg=Math.ceil,Jb=Math.exp;var tS=Math.hypot,$f=Math.log,eS=Math.pow,ft=Math.sin,rn=Math.sign||function(e){return e>0?1:e<0?-1:0},de=Math.sqrt,Ih=Math.tan;function rS(e){return e>1?0:e<-1?qt:Math.acos(e)}function Pe(e){return e>1?Ee:e<-1?-Ee:Math.asin(e)}function GP(e){return(e=ft(e/2))*e}function ge(){}function nS(e,t){e&&RK.hasOwnProperty(e.type)&&RK[e.type](e,t)}var PK={Feature:function(e,t){nS(e.geometry,t)},FeatureCollection:function(e,t){for(var r=e.features,n=-1,i=r.length;++n=0?1:-1,i=n*r,a=mt(t),o=ft(t),s=XP*o,l=YP*a+s*mt(i),u=s*n*ft(i);_g.add(Le(u,l)),WP=e,YP=a,XP=o}function UK(e){return iS=new Ae,Er(e,La),iS*2}function jf(e){return[Le(e[1],e[0]),Pe(e[2])]}function Xi(e){var t=e[0],r=e[1],n=mt(r);return[n*mt(t),n*ft(t),ft(r)]}function bg(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function xs(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function aS(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function Sg(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function Qf(e){var t=de(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}var Xe,Zn,je,hi,Jf,GK,HK,Lh,wg,Xl,bs,_s={point:qP,lineStart:VK,lineEnd:BK,polygonStart:function(){_s.point=YK,_s.lineStart=J_t,_s.lineEnd=tbt,wg=new Ae,La.polygonStart()},polygonEnd:function(){La.polygonEnd(),_s.point=qP,_s.lineStart=VK,_s.lineEnd=BK,_g<0?(Xe=-(je=180),Zn=-(hi=90)):wg>wt?hi=90:wg<-wt&&(Zn=-90),bs[0]=Xe,bs[1]=je},sphere:function(){Xe=-(je=180),Zn=-(hi=90)}};function qP(e,t){Xl.push(bs=[Xe=e,je=e]),thi&&(hi=t)}function WK(e,t){var r=Xi([e*It,t*It]);if(Lh){var n=xs(Lh,r),i=[n[1],-n[0],0],a=xs(i,n);Qf(a),a=jf(a);var o=e-Jf,s=o>0?1:-1,l=a[0]*le*s,u,f=Bt(o)>180;f^(s*Jfhi&&(hi=u)):(l=(l+360)%360-180,f^(s*Jfhi&&(hi=t))),f?epi(Xe,je)&&(je=e):pi(e,je)>pi(Xe,je)&&(Xe=e):je>=Xe?(eje&&(je=e)):e>Jf?pi(Xe,e)>pi(Xe,je)&&(je=e):pi(e,je)>pi(Xe,je)&&(Xe=e)}else Xl.push(bs=[Xe=e,je=e]);thi&&(hi=t),Lh=r,Jf=e}function VK(){_s.point=WK}function BK(){bs[0]=Xe,bs[1]=je,_s.point=qP,Lh=null}function YK(e,t){if(Lh){var r=e-Jf;wg.add(Bt(r)>180?r+(r>0?360:-360):r)}else GK=e,HK=t;La.point(e,t),WK(e,t)}function J_t(){La.lineStart()}function tbt(){YK(GK,HK),La.lineEnd(),Bt(wg)>wt&&(Xe=-(je=180)),bs[0]=Xe,bs[1]=je,Lh=null}function pi(e,t){return(t-=e)<0?t+360:t}function ebt(e,t){return e[0]-t[0]}function FK(e,t){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:tpi(n[0],n[1])&&(n[1]=i[1]),pi(i[0],n[1])>pi(n[0],n[1])&&(n[0]=i[0])):a.push(n=i);for(o=-1/0,r=a.length-1,t=0,n=a[r];t<=r;n=i,++t)i=a[t],(s=pi(n[1],i[0]))>o&&(o=s,Xe=i[0],je=n[1])}return Xl=bs=null,Xe===1/0||Zn===1/0?[[NaN,NaN],[NaN,NaN]]:[[Xe,Zn],[je,hi]]}var Tg,oS,sS,lS,uS,fS,cS,pS,ZP,KP,$P,KK,$K,xn,_n,bn,Pa={sphere:ge,point:jP,lineStart:qK,lineEnd:ZK,polygonStart:function(){Pa.lineStart=ibt,Pa.lineEnd=abt},polygonEnd:function(){Pa.lineStart=qK,Pa.lineEnd=ZK}};function jP(e,t){e*=It,t*=It;var r=mt(t);Mg(r*mt(e),r*ft(e),ft(t))}function Mg(e,t,r){++Tg,sS+=(e-sS)/Tg,lS+=(t-lS)/Tg,uS+=(r-uS)/Tg}function qK(){Pa.point=rbt}function rbt(e,t){e*=It,t*=It;var r=mt(t);xn=r*mt(e),_n=r*ft(e),bn=ft(t),Pa.point=nbt,Mg(xn,_n,bn)}function nbt(e,t){e*=It,t*=It;var r=mt(t),n=r*mt(e),i=r*ft(e),a=ft(t),o=Le(de((o=_n*a-bn*i)*o+(o=bn*n-xn*a)*o+(o=xn*i-_n*n)*o),xn*n+_n*i+bn*a);oS+=o,fS+=o*(xn+(xn=n)),cS+=o*(_n+(_n=i)),pS+=o*(bn+(bn=a)),Mg(xn,_n,bn)}function ZK(){Pa.point=jP}function ibt(){Pa.point=obt}function abt(){jK(KK,$K),Pa.point=jP}function obt(e,t){KK=e,$K=t,e*=It,t*=It,Pa.point=jK;var r=mt(t);xn=r*mt(e),_n=r*ft(e),bn=ft(t),Mg(xn,_n,bn)}function jK(e,t){e*=It,t*=It;var r=mt(t),n=r*mt(e),i=r*ft(e),a=ft(t),o=_n*a-bn*i,s=bn*n-xn*a,l=xn*i-_n*n,u=tS(o,s,l),f=Pe(u),c=u&&-f/u;ZP.add(c*o),KP.add(c*s),$P.add(c*l),oS+=f,fS+=f*(xn+(xn=n)),cS+=f*(_n+(_n=i)),pS+=f*(bn+(bn=a)),Mg(xn,_n,bn)}function QK(e){Tg=oS=sS=lS=uS=fS=cS=pS=0,ZP=new Ae,KP=new Ae,$P=new Ae,Er(e,Pa);var t=+ZP,r=+KP,n=+$P,i=tS(t,r,n);return iqt&&(e-=Math.round(e/nr)*nr),[e,t]}QP.invert=QP;function Cg(e,t,r){return(e%=nr)?t||r?Ag(t$(e),e$(t,r)):t$(e):t||r?e$(t,r):QP}function JK(e){return function(t,r){return t+=e,Bt(t)>qt&&(t-=Math.round(t/nr)*nr),[t,r]}}function t$(e){var t=JK(e);return t.invert=JK(-e),t}function e$(e,t){var r=mt(e),n=ft(e),i=mt(t),a=ft(t);function o(s,l){var u=mt(l),f=mt(s)*u,c=ft(s)*u,p=ft(l),h=p*r+f*n;return[Le(c*i-h*a,f*r-p*n),Pe(h*i+c*a)]}return o.invert=function(s,l){var u=mt(l),f=mt(s)*u,c=ft(s)*u,p=ft(l),h=p*i-c*a;return[Le(c*i+p*a,f*r+h*n),Pe(h*r-f*n)]},o}function hS(e){e=Cg(e[0]*It,e[1]*It,e.length>2?e[2]*It:0);function t(r){return r=e(r[0]*It,r[1]*It),r[0]*=le,r[1]*=le,r}return t.invert=function(r){return r=e.invert(r[0]*It,r[1]*It),r[0]*=le,r[1]*=le,r},t}function JP(e,t,r,n,i,a){if(r){var o=mt(t),s=ft(t),l=n*r;i==null?(i=t+n*nr,a=t-l/2):(i=r$(o,i),a=r$(o,a),(n>0?ia)&&(i+=n*nr));for(var u,f=i;n>0?f>a:f1&&e.push(e.pop().concat(e.shift()))},result:function(){var r=e;return e=[],t=null,r}}}function Ph(e,t){return Bt(e[0]-t[0])=0;--s)i.point((c=f[s])[0],c[1]);else n(p.x,p.p.x,-1,i);p=p.p}p=p.o,f=p.z,h=!h}while(!p.v);i.lineEnd()}}}function i$(e){if(t=e.length){for(var t,r=0,n=e[0],i;++r=0?1:-1,C=M*T,A=C>qt,P=v*b;if(l.add(Le(P*M*ft(C),g*w+P*mt(C))),o+=A?T+M*nr:T,A^d>=r^_>=r){var L=xs(Xi(h),Xi(x));Qf(L);var I=xs(a,L);Qf(I);var E=(A^T>=0?-1:1)*Pe(I[2]);(n>E||n===E&&(L[0]||L[1]))&&(s+=A^T>=0?1:-1)}}return(o<-wt||o0){for(l||(i.polygonStart(),l=!0),i.lineStart(),b=0;b1&&_&2&&S.push(S.pop().concat(S.shift())),f.push(S.filter(sbt))}}return p}}function sbt(e){return e.length>1}function lbt(e,t){return((e=e.x)[0]<0?e[1]-Ee-wt:Ee-e[1])-((t=t.x)[0]<0?t[1]-Ee-wt:Ee-t[1])}var Dg=yS(function(){return!0},ubt,cbt,[-qt,-Ee]);function ubt(e){var t=NaN,r=NaN,n=NaN,i;return{lineStart:function(){e.lineStart(),i=1},point:function(a,o){var s=a>0?qt:-qt,l=Bt(a-t);Bt(l-qt)0?Ee:-Ee),e.point(n,r),e.lineEnd(),e.lineStart(),e.point(s,r),e.point(a,r),i=0):n!==s&&l>=qt&&(Bt(t-n)wt?Yi((ft(t)*(a=mt(n))*ft(r)-ft(n)*(i=mt(t))*ft(e))/(i*a*o)):(t+n)/2}function cbt(e,t,r,n){var i;if(e==null)i=r*Ee,n.point(-qt,i),n.point(0,i),n.point(qt,i),n.point(qt,0),n.point(qt,-i),n.point(0,-i),n.point(-qt,-i),n.point(-qt,0),n.point(-qt,i);else if(Bt(e[0]-t[0])>wt){var a=e[0]0,i=Bt(t)>wt;function a(f,c,p,h){JP(h,e,r,p,f,c)}function o(f,c){return mt(f)*mt(c)>t}function s(f){var c,p,h,d,m;return{lineStart:function(){d=h=!1,m=1},point:function(v,g){var y=[v,g],x,_=o(v,g),S=n?_?0:u(v,g):_?u(v+(v<0?qt:-qt),g):0;if(!c&&(d=h=_)&&f.lineStart(),_!==h&&(x=l(c,y),(!x||Ph(c,x)||Ph(y,x))&&(y[2]=1)),_!==h)m=0,_?(f.lineStart(),x=l(y,c),f.point(x[0],x[1])):(x=l(c,y),f.point(x[0],x[1],2),f.lineEnd()),c=x;else if(i&&c&&n^_){var b;!(S&p)&&(b=l(y,c,!0))&&(m=0,n?(f.lineStart(),f.point(b[0][0],b[0][1]),f.point(b[1][0],b[1][1]),f.lineEnd()):(f.point(b[1][0],b[1][1]),f.lineEnd(),f.lineStart(),f.point(b[0][0],b[0][1],3)))}_&&(!c||!Ph(c,y))&&f.point(y[0],y[1]),c=y,h=_,p=S},lineEnd:function(){h&&f.lineEnd(),c=null},clean:function(){return m|(d&&h)<<1}}}function l(f,c,p){var h=Xi(f),d=Xi(c),m=[1,0,0],v=xs(h,d),g=bg(v,v),y=v[0],x=g-y*y;if(!x)return!p&&f;var _=t*g/x,S=-t*y/x,b=xs(m,v),w=Sg(m,_),T=Sg(v,S);aS(w,T);var M=b,C=bg(w,M),A=bg(M,M),P=C*C-A*(bg(w,w)-1);if(!(P<0)){var L=de(P),I=Sg(M,(-C-L)/A);if(aS(I,w),I=jf(I),!p)return I;var E=f[0],R=c[0],k=f[1],O=c[1],z;R0^I[1]<(Bt(I[0]-E)qt^(E<=I[0]&&I[0]<=R)){var et=Sg(M,(-C+L)/A);return aS(et,w),[I,jf(et)]}}}function u(f,c){var p=n?e:qt-e,h=0;return f<-p?h|=1:f>p&&(h|=2),c<-p?h|=4:c>p&&(h|=8),h}return yS(o,s,a,n?[0,-e]:[-qt,e-qt])}function a$(e,t,r,n,i,a){var o=e[0],s=e[1],l=t[0],u=t[1],f=0,c=1,p=l-o,h=u-s,d;if(d=r-o,!(!p&&d>0)){if(d/=p,p<0){if(d0){if(d>c)return;d>f&&(f=d)}if(d=i-o,!(!p&&d<0)){if(d/=p,p<0){if(d>c)return;d>f&&(f=d)}else if(p>0){if(d0)){if(d/=h,h<0){if(d0){if(d>c)return;d>f&&(f=d)}if(d=a-s,!(!h&&d<0)){if(d/=h,h<0){if(d>c)return;d>f&&(f=d)}else if(h>0){if(d0&&(e[0]=o+f*p,e[1]=s+f*h),c<1&&(t[0]=o+c*p,t[1]=s+c*h),!0}}}}}var Eg=1e9,_S=-Eg;function Ss(e,t,r,n){function i(u,f){return e<=u&&u<=r&&t<=f&&f<=n}function a(u,f,c,p){var h=0,d=0;if(u==null||(h=o(u,c))!==(d=o(f,c))||l(u,f)<0^c>0)do p.point(h===0||h===3?e:r,h>1?n:t);while((h=(h+c+4)%4)!==d);else p.point(f[0],f[1])}function o(u,f){return Bt(u[0]-e)0?0:3:Bt(u[0]-r)0?2:1:Bt(u[1]-t)0?1:0:f>0?3:2}function s(u,f){return l(u.x,f.x)}function l(u,f){var c=o(u,1),p=o(f,1);return c!==p?c-p:c===0?f[1]-u[1]:c===1?u[0]-f[0]:c===2?u[1]-f[1]:f[0]-u[0]}return function(u){var f=u,c=dS(),p,h,d,m,v,g,y,x,_,S,b,w={point:T,lineStart:P,lineEnd:L,polygonStart:C,polygonEnd:A};function T(E,R){i(E,R)&&f.point(E,R)}function M(){for(var E=0,R=0,k=h.length;Rn&&(tt-Y)*(n-et)>(lt-et)*(e-Y)&&++E:lt<=n&&(tt-Y)*(n-et)<(lt-et)*(e-Y)&&--E;return E}function C(){f=c,p=[],h=[],b=!0}function A(){var E=M(),R=b&&E,k=(p=Df(p)).length;(R||k)&&(u.polygonStart(),R&&(u.lineStart(),a(null,null,1,u),u.lineEnd()),k&&mS(p,s,E,a,u),u.polygonEnd()),f=u,p=h=d=null}function P(){w.point=I,h&&h.push(d=[]),S=!0,_=!1,y=x=NaN}function L(){p&&(I(m,v),g&&_&&c.rejoin(),p.push(c.result())),w.point=T,_&&f.lineEnd()}function I(E,R){var k=i(E,R);if(h&&d.push([E,R]),S)m=E,v=R,g=k,S=!1,k&&(f.lineStart(),f.point(E,R));else if(k&&_)f.point(E,R);else{var O=[y=Math.max(_S,Math.min(Eg,y)),x=Math.max(_S,Math.min(Eg,x))],z=[E=Math.max(_S,Math.min(Eg,E)),R=Math.max(_S,Math.min(Eg,R))];a$(O,z,e,t,r,n)?(_||(f.lineStart(),f.point(O[0],O[1])),f.point(z[0],z[1]),k||f.lineEnd(),b=!1):k&&(f.lineStart(),f.point(E,R),b=!1)}y=E,x=R,_=k}return w}}function o$(){var e=0,t=0,r=960,n=500,i,a,o;return o={stream:function(s){return i&&a===s?i:i=Ss(e,t,r,n)(a=s)},extent:function(s){return arguments.length?(e=+s[0][0],t=+s[0][1],r=+s[1][0],n=+s[1][1],i=a=null,o):[[e,t],[r,n]]}}}var eR,rR,bS,SS,Rh={sphere:ge,point:ge,lineStart:pbt,lineEnd:ge,polygonStart:ge,polygonEnd:ge};function pbt(){Rh.point=dbt,Rh.lineEnd=hbt}function hbt(){Rh.point=Rh.lineEnd=ge}function dbt(e,t){e*=It,t*=It,rR=e,bS=ft(t),SS=mt(t),Rh.point=vbt}function vbt(e,t){e*=It,t*=It;var r=ft(t),n=mt(t),i=Bt(e-rR),a=mt(i),o=ft(i),s=n*o,l=SS*r-bS*n*a,u=bS*r+SS*n*a;eR.add(Le(de(s*s+l*l),u)),rR=e,bS=r,SS=n}function wS(e){return eR=new Ae,Er(e,Rh),+eR}var nR=[null,null],mbt={type:"LineString",coordinates:nR};function Nh(e,t){return nR[0]=e,nR[1]=t,wS(mbt)}var s$={Feature:function(e,t){return TS(e.geometry,t)},FeatureCollection:function(e,t){for(var r=e.features,n=-1,i=r.length;++n0&&(i=Nh(e[a],e[a-1]),i>0&&r<=i&&n<=i&&(r+n-i)*(1-Math.pow((r-n)/i,2))wt}).map(p)).concat(Fi(xg(a/u)*u,i,u).filter(function(x){return Bt(x%c)>wt}).map(h))}return g.lines=function(){return y().map(function(x){return{type:"LineString",coordinates:x}})},g.outline=function(){return{type:"Polygon",coordinates:[d(n).concat(m(o).slice(1),d(r).reverse().slice(1),m(s).reverse().slice(1))]}},g.extent=function(x){return arguments.length?g.extentMajor(x).extentMinor(x):g.extentMinor()},g.extentMajor=function(x){return arguments.length?(n=+x[0][0],r=+x[1][0],s=+x[0][1],o=+x[1][1],n>r&&(x=n,n=r,r=x),s>o&&(x=s,s=o,o=x),g.precision(v)):[[n,s],[r,o]]},g.extentMinor=function(x){return arguments.length?(t=+x[0][0],e=+x[1][0],a=+x[0][1],i=+x[1][1],t>e&&(x=t,t=e,e=x),a>i&&(x=a,a=i,i=x),g.precision(v)):[[t,a],[e,i]]},g.step=function(x){return arguments.length?g.stepMajor(x).stepMinor(x):g.stepMinor()},g.stepMajor=function(x){return arguments.length?(f=+x[0],c=+x[1],g):[f,c]},g.stepMinor=function(x){return arguments.length?(l=+x[0],u=+x[1],g):[l,u]},g.precision=function(x){return arguments.length?(v=+x,p=d$(a,i,90),h=v$(t,e,v),d=d$(s,o,90),m=v$(n,r,v),g):v},g.extentMajor([[-180,-90+wt],[180,90-wt]]).extentMinor([[-180,-80-wt],[180,80+wt]])}function m$(){return MS()()}function g$(e,t){var r=e[0]*It,n=e[1]*It,i=t[0]*It,a=t[1]*It,o=mt(n),s=ft(n),l=mt(a),u=ft(a),f=o*mt(r),c=o*ft(r),p=l*mt(i),h=l*ft(i),d=2*Pe(de(GP(a-n)+o*l*GP(i-r))),m=ft(d),v=d?function(g){var y=ft(g*=d)/m,x=ft(d-g)/m,_=x*f+y*p,S=x*c+y*h,b=x*s+y*u;return[Le(S,_)*le,Le(b,de(_*_+S*S))*le]}:function(){return[r*le,n*le]};return v.distance=d,v}var ql=e=>e;var iR=new Ae,aR=new Ae,y$,x$,oR,sR,Zl={point:ge,lineStart:ge,lineEnd:ge,polygonStart:function(){Zl.lineStart=ybt,Zl.lineEnd=_bt},polygonEnd:function(){Zl.lineStart=Zl.lineEnd=Zl.point=ge,iR.add(Bt(aR)),aR=new Ae},result:function(){var e=iR/2;return iR=new Ae,e}};function ybt(){Zl.point=xbt}function xbt(e,t){Zl.point=_$,y$=oR=e,x$=sR=t}function _$(e,t){aR.add(sR*e-oR*t),oR=e,sR=t}function _bt(){_$(y$,x$)}var lR=Zl;var kh=1/0,AS=kh,Ig=-kh,CS=Ig,bbt={point:Sbt,lineStart:ge,lineEnd:ge,polygonStart:ge,polygonEnd:ge,result:function(){var e=[[kh,AS],[Ig,CS]];return Ig=CS=-(AS=kh=1/0),e}};function Sbt(e,t){eIg&&(Ig=e),tCS&&(CS=t)}var Oh=bbt;var uR=0,fR=0,Lg=0,DS=0,ES=0,zh=0,cR=0,pR=0,Pg=0,w$,T$,So,wo,Ra={point:ec,lineStart:b$,lineEnd:S$,polygonStart:function(){Ra.lineStart=Mbt,Ra.lineEnd=Abt},polygonEnd:function(){Ra.point=ec,Ra.lineStart=b$,Ra.lineEnd=S$},result:function(){var e=Pg?[cR/Pg,pR/Pg]:zh?[DS/zh,ES/zh]:Lg?[uR/Lg,fR/Lg]:[NaN,NaN];return uR=fR=Lg=DS=ES=zh=cR=pR=Pg=0,e}};function ec(e,t){uR+=e,fR+=t,++Lg}function b$(){Ra.point=wbt}function wbt(e,t){Ra.point=Tbt,ec(So=e,wo=t)}function Tbt(e,t){var r=e-So,n=t-wo,i=de(r*r+n*n);DS+=i*(So+e)/2,ES+=i*(wo+t)/2,zh+=i,ec(So=e,wo=t)}function S$(){Ra.point=ec}function Mbt(){Ra.point=Cbt}function Abt(){M$(w$,T$)}function Cbt(e,t){Ra.point=M$,ec(w$=So=e,T$=wo=t)}function M$(e,t){var r=e-So,n=t-wo,i=de(r*r+n*n);DS+=i*(So+e)/2,ES+=i*(wo+t)/2,zh+=i,i=wo*e-So*t,cR+=i*(So+e),pR+=i*(wo+t),Pg+=i*3,ec(So=e,wo=t)}var hR=Ra;function IS(e){this._context=e}IS.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(e,t){switch(this._point){case 0:{this._context.moveTo(e,t),this._point=1;break}case 1:{this._context.lineTo(e,t);break}default:{this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,nr);break}}},result:ge};var vR=new Ae,dR,A$,C$,Rg,Ng,LS={point:ge,lineStart:function(){LS.point=Dbt},lineEnd:function(){dR&&D$(A$,C$),LS.point=ge},polygonStart:function(){dR=!0},polygonEnd:function(){dR=null},result:function(){var e=+vR;return vR=new Ae,e}};function Dbt(e,t){LS.point=D$,A$=Rg=e,C$=Ng=t}function D$(e,t){Rg-=e,Ng-=t,vR.add(de(Rg*Rg+Ng*Ng)),Rg=e,Ng=t}var mR=LS;var E$,PS,I$,L$,Uh=class{constructor(t){this._append=t==null?P$:Ebt(t),this._radius=4.5,this._=""}pointRadius(t){return this._radius=+t,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){this._line===0&&(this._+="Z"),this._point=NaN}point(t,r){switch(this._point){case 0:{this._append`M${t},${r}`,this._point=1;break}case 1:{this._append`L${t},${r}`;break}default:{if(this._append`M${t},${r}`,this._radius!==I$||this._append!==PS){let n=this._radius,i=this._;this._="",this._append`m0,${n}a${n},${n} 0 1,1 0,${-2*n}a${n},${n} 0 1,1 0,${2*n}z`,I$=n,PS=this._append,L$=this._,this._=i}this._+=L$;break}}}result(){let t=this._;return this._="",t.length?t:null}};function P$(e){let t=1;this._+=e[0];for(let r=e.length;t=0))throw new RangeError(`invalid digits: ${e}`);if(t>15)return P$;if(t!==E$){let r=10**t;E$=t,PS=function(i){let a=1;this._+=i[0];for(let o=i.length;a=0))throw new RangeError(`invalid digits: ${s}`);r=l}return t===null&&(a=new Uh(r)),o},o.projection(e).digits(r).context(t)}function N$(e){return{stream:Kl(e)}}function Kl(e){return function(t){var r=new gR;for(var n in e)r[n]=e[n];return r.stream=t,r}}function gR(){}gR.prototype={constructor:gR,point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function yR(e,t,r){var n=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),n!=null&&e.clipExtent(null),Er(r,e.stream(Oh)),t(Oh.result()),n!=null&&e.clipExtent(n),e}function rc(e,t,r){return yR(e,function(n){var i=t[1][0]-t[0][0],a=t[1][1]-t[0][1],o=Math.min(i/(n[1][0]-n[0][0]),a/(n[1][1]-n[0][1])),s=+t[0][0]+(i-o*(n[1][0]+n[0][0]))/2,l=+t[0][1]+(a-o*(n[1][1]+n[0][1]))/2;e.scale(150*o).translate([s,l])},r)}function Vh(e,t,r){return rc(e,[[0,0],t],r)}function Bh(e,t,r){return yR(e,function(n){var i=+t,a=i/(n[1][0]-n[0][0]),o=(i-a*(n[1][0]+n[0][0]))/2,s=-a*n[0][1];e.scale(150*a).translate([o,s])},r)}function Fh(e,t,r){return yR(e,function(n){var i=+t,a=i/(n[1][1]-n[0][1]),o=-a*n[0][0],s=(i-a*(n[1][1]+n[0][1]))/2;e.scale(150*a).translate([o,s])},r)}var k$=16,Ibt=mt(30*It);function xR(e,t){return+t?Pbt(e,t):Lbt(e)}function Lbt(e){return Kl({point:function(t,r){t=e(t,r),this.stream.point(t[0],t[1])}})}function Pbt(e,t){function r(n,i,a,o,s,l,u,f,c,p,h,d,m,v){var g=u-n,y=f-i,x=g*g+y*y;if(x>4*t&&m--){var _=o+p,S=s+h,b=l+d,w=de(_*_+S*S+b*b),T=Pe(b/=w),M=Bt(Bt(b)-1)t||Bt((g*L+y*I)/x-.5)>.3||o*p+s*h+l*d2?E[2]%360*It:0,L()):[s*le,l*le,u*le]},A.angle=function(E){return arguments.length?(c=E%360*It,L()):c*le},A.reflectX=function(E){return arguments.length?(p=E?-1:1,L()):p<0},A.reflectY=function(E){return arguments.length?(h=E?-1:1,L()):h<0},A.precision=function(E){return arguments.length?(b=xR(w,S=E*E),I()):de(S)},A.fitExtent=function(E,R){return rc(A,E,R)},A.fitSize=function(E,R){return Vh(A,E,R)},A.fitWidth=function(E,R){return Bh(A,E,R)},A.fitHeight=function(E,R){return Fh(A,E,R)};function L(){var E=O$(r,0,0,p,h,c).apply(null,t(a,o)),R=O$(r,n-E[0],i-E[1],p,h,c);return f=Cg(s,l,u),w=Ag(t,R),T=Ag(f,w),b=xR(w,S),I()}function I(){return M=C=null,A}return function(){return t=e.apply(this,arguments),A.invert=t.invert&&P,L()}}function Gh(e){var t=0,r=qt/3,n=kg(e),i=n(t,r);return i.parallels=function(a){return arguments.length?n(t=a[0]*It,r=a[1]*It):[t*le,r*le]},i}function z$(e){var t=mt(e);function r(n,i){return[n*t,ft(i)/t]}return r.invert=function(n,i){return[n/t,Pe(i*t)]},r}function _R(e,t){var r=ft(e),n=(r+ft(t))/2;if(Bt(n)=.12&&v<.234&&m>=-.425&&m<-.214?i:v>=.166&&v<.234&&m>=-.214&&m<-.115?o:r).invert(p)},f.stream=function(p){return e&&t===p?e:e=Obt([r.stream(t=p),i.stream(p),o.stream(p)])},f.precision=function(p){return arguments.length?(r.precision(p),i.precision(p),o.precision(p),c()):r.precision()},f.scale=function(p){return arguments.length?(r.scale(p),i.scale(p*.35),o.scale(p),f.translate(r.translate())):r.scale()},f.translate=function(p){if(!arguments.length)return r.translate();var h=r.scale(),d=+p[0],m=+p[1];return n=r.translate(p).clipExtent([[d-.455*h,m-.238*h],[d+.455*h,m+.238*h]]).stream(u),a=i.translate([d-.307*h,m+.201*h]).clipExtent([[d-.425*h+wt,m+.12*h+wt],[d-.214*h-wt,m+.234*h-wt]]).stream(u),s=o.translate([d-.205*h,m+.212*h]).clipExtent([[d-.214*h+wt,m+.166*h+wt],[d-.115*h-wt,m+.234*h-wt]]).stream(u),c()},f.fitExtent=function(p,h){return rc(f,p,h)},f.fitSize=function(p,h){return Vh(f,p,h)},f.fitWidth=function(p,h){return Bh(f,p,h)},f.fitHeight=function(p,h){return Fh(f,p,h)};function c(){return e=t=null,f}return f.scale(1070)}function NS(e){return function(t,r){var n=mt(t),i=mt(r),a=e(n*i);return a===1/0?[2,0]:[a*i*ft(t),a*ft(r)]}}function To(e){return function(t,r){var n=de(t*t+r*r),i=e(n),a=ft(i),o=mt(i);return[Le(t*a,n*o),Pe(n&&r*a/n)]}}var kS=NS(function(e){return de(2/(1+e))});kS.invert=To(function(e){return 2*Pe(e/2)});function V$(){return ir(kS).scale(124.75).clipAngle(180-.001)}var OS=NS(function(e){return(e=rS(e))&&e/ft(e)});OS.invert=To(function(e){return e});function B$(){return ir(OS).scale(79.4188).clipAngle(180-.001)}function ic(e,t){return[e,$f(Ih((Ee+t)/2))]}ic.invert=function(e,t){return[e,2*Yi(Jb(t))-Ee]};function F$(){return bR(ic).scale(961/nr)}function bR(e){var t=ir(e),r=t.center,n=t.scale,i=t.translate,a=t.clipExtent,o=null,s,l,u;t.scale=function(c){return arguments.length?(n(c),f()):n()},t.translate=function(c){return arguments.length?(i(c),f()):i()},t.center=function(c){return arguments.length?(r(c),f()):r()},t.clipExtent=function(c){return arguments.length?(c==null?o=s=l=u=null:(o=+c[0][0],s=+c[0][1],l=+c[1][0],u=+c[1][1]),f()):o==null?null:[[o,s],[l,u]]};function f(){var c=qt*n(),p=t(hS(t.rotate()).invert([0,0]));return a(o==null?[[p[0]-c,p[1]-c],[p[0]+c,p[1]+c]]:e===ic?[[Math.max(p[0]-c,o),s],[Math.min(p[0]+c,l),u]]:[[o,Math.max(p[1]-c,s)],[l,Math.min(p[1]+c,u)]])}return f()}function zS(e){return Ih((Ee+e)/2)}function SR(e,t){var r=mt(e),n=e===t?ft(e):$f(r/mt(t))/$f(zS(t)/zS(e)),i=r*eS(zS(e),n)/n;if(!n)return ic;function a(o,s){i>0?s<-Ee+wt&&(s=-Ee+wt):s>Ee-wt&&(s=Ee-wt);var l=i/eS(zS(s),n);return[l*ft(n*o),i-l*mt(n*o)]}return a.invert=function(o,s){var l=i-s,u=rn(n)*de(o*o+l*l),f=Le(o,Bt(l))*rn(l);return l*n<0&&(f-=qt*rn(o)*rn(l)),[f/n,2*Yi(eS(i/u,1/n))-Ee]},a}function G$(){return Gh(SR).scale(109.5).parallels([30,30])}function ac(e,t){return[e,t]}ac.invert=ac;function H$(){return ir(ac).scale(152.63)}function wR(e,t){var r=mt(e),n=e===t?ft(e):(r-mt(t))/(t-e),i=r/n+e;if(Bt(n)wt&&--n>0);return[e/(.8707+(a=r*r)*(-.131979+a*(-.013791+a*a*a*(.003971-.001529*a)))),r]};function Z$(){return ir(FS).scale(175.295)}function GS(e,t){return[mt(t)*ft(e),ft(t)]}GS.invert=To(Pe);function K$(){return ir(GS).scale(249.5).clipAngle(90+wt)}function HS(e,t){var r=mt(t),n=1+mt(e)*r;return[r*ft(e)/n,ft(t)/n]}HS.invert=To(function(e){return 2*Yi(e)});function $$(){return ir(HS).scale(250).clipAngle(142)}function WS(e,t){return[$f(Ih((Ee+t)/2)),-e]}WS.invert=function(e,t){return[-t,2*Yi(Jb(e))-Ee]};function j$(){var e=bR(WS),t=e.center,r=e.rotate;return e.center=function(n){return arguments.length?t([-n[1],n[0]]):(n=t(),[n[1],-n[0]])},e.rotate=function(n){return arguments.length?r([n[0],n[1],n.length>2?n[2]+90:90]):(n=r(),[n[0],n[1],n[2]-90])},r([0,0,90]).scale(159.155)}function Ubt(e,t){return e.parent===t.parent?1:2}function Vbt(e){return e.reduce(Bbt,0)/e.length}function Bbt(e,t){return e+t.x}function Fbt(e){return 1+e.reduce(Gbt,0)}function Gbt(e,t){return Math.max(e,t.y)}function Hbt(e){for(var t;t=e.children;)e=t[0];return e}function Wbt(e){for(var t;t=e.children;)e=t[t.length-1];return e}function Q$(){var e=Ubt,t=1,r=1,n=!1;function i(a){var o,s=0;a.eachAfter(function(p){var h=p.children;h?(p.x=Vbt(h),p.y=Fbt(h)):(p.x=o?s+=e(p,o):0,p.y=0,o=p)});var l=Hbt(a),u=Wbt(a),f=l.x-e(l,u)/2,c=u.x+e(u,l)/2;return a.eachAfter(n?function(p){p.x=(p.x-a.x)*t,p.y=(a.y-p.y)*r}:function(p){p.x=(p.x-f)/(c-f)*t,p.y=(1-(a.y?p.y/a.y:1))*r})}return i.separation=function(a){return arguments.length?(e=a,i):e},i.size=function(a){return arguments.length?(n=!1,t=+a[0],r=+a[1],i):n?null:[t,r]},i.nodeSize=function(a){return arguments.length?(n=!0,t=+a[0],r=+a[1],i):n?[t,r]:null},i}function Ybt(e){var t=0,r=e.children,n=r&&r.length;if(!n)t=1;else for(;--n>=0;)t+=r[n].value;e.value=t}function J$(){return this.eachAfter(Ybt)}function tj(e,t){let r=-1;for(let n of this)e.call(t,n,++r,this);return this}function ej(e,t){for(var r=this,n=[r],i,a,o=-1;r=n.pop();)if(e.call(t,r,++o,this),i=r.children)for(a=i.length-1;a>=0;--a)n.push(i[a]);return this}function rj(e,t){for(var r=this,n=[r],i=[],a,o,s,l=-1;r=n.pop();)if(i.push(r),a=r.children)for(o=0,s=a.length;o=0;)r+=n[i].value;t.value=r})}function aj(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function oj(e){for(var t=this,r=Xbt(t,e),n=[t];t!==r;)t=t.parent,n.push(t);for(var i=n.length;e!==r;)n.splice(i,0,e),e=e.parent;return n}function Xbt(e,t){if(e===t)return e;var r=e.ancestors(),n=t.ancestors(),i=null;for(e=r.pop(),t=n.pop();e===t;)i=e,e=r.pop(),t=n.pop();return i}function sj(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function lj(){return Array.from(this)}function uj(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function fj(){var e=this,t=[];return e.each(function(r){r!==e&&t.push({source:r.parent,target:r})}),t}function*cj(){var e=this,t,r=[e],n,i,a;do for(t=r.reverse(),r=[];e=t.pop();)if(yield e,n=e.children)for(i=0,a=n.length;i=0;--s)i.push(a=o[s]=new Mo(o[s])),a.parent=n,a.depth=n.depth+1;return r.eachBefore(TR)}function qbt(){return Bg(this).eachBefore($bt)}function Zbt(e){return e.children}function Kbt(e){return Array.isArray(e)?e[1]:null}function $bt(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function TR(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function Mo(e){this.data=e,this.depth=this.height=0,this.parent=null}Mo.prototype=Bg.prototype={constructor:Mo,count:J$,each:tj,eachAfter:rj,eachBefore:ej,find:nj,sum:ij,sort:aj,path:oj,ancestors:sj,descendants:lj,leaves:uj,links:fj,copy:qbt,[Symbol.iterator]:cj};function Hh(e){return e==null?null:MR(e)}function MR(e){if(typeof e!="function")throw new Error;return e}function ws(){return 0}function $l(e){return function(){return e}}function Wh(){let e=1;return()=>(e=(1664525*e+1013904223)%4294967296)/4294967296}function pj(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function hj(e,t){let r=e.length,n,i;for(;r;)i=t()*r--|0,n=e[r],e[r]=e[i],e[i]=n;return e}function dj(e){return CR(e,Wh())}function CR(e,t){for(var r=0,n=(e=hj(Array.from(e),t)).length,i=[],a,o;r0&&r*r>n*n+i*i}function AR(e,t){for(var r=0;r1e-6?(A+Math.sqrt(A*A-4*C*P))/(2*C):P/A);return{x:n+b+w*L,y:i+T+M*L,r:L}}function gj(e,t,r){var n=e.x-t.x,i,a,o=e.y-t.y,s,l,u=n*n+o*o;u?(a=t.r+r.r,a*=a,l=e.r+r.r,l*=l,a>l?(i=(u+l-a)/(2*u),s=Math.sqrt(Math.max(0,l/u-i*i)),r.x=e.x-i*n-s*o,r.y=e.y-i*o+s*n):(i=(u+a-l)/(2*u),s=Math.sqrt(Math.max(0,a/u-i*i)),r.x=t.x+i*n-s*o,r.y=t.y+i*o+s*n)):(r.x=t.x+r.r,r.y=t.y)}function yj(e,t){var r=e.r+t.r-1e-6,n=t.x-e.x,i=t.y-e.y;return r>0&&r*r>n*n+i*i}function xj(e){var t=e._,r=e.next._,n=t.r+r.r,i=(t.x*r.r+r.x*t.r)/n,a=(t.y*r.r+r.y*t.r)/n;return i*i+a*a}function XS(e){this._=e,this.next=null,this.previous=null}function DR(e,t){if(!(a=(e=pj(e)).length))return 0;var r,n,i,a,o,s,l,u,f,c,p;if(r=e[0],r.x=0,r.y=0,!(a>1))return r.r;if(n=e[1],r.x=-n.r,n.x=r.r,n.y=0,!(a>2))return r.r+n.r;gj(n,r,i=e[2]),r=new XS(r),n=new XS(n),i=new XS(i),r.next=i.previous=n,n.next=r.previous=i,i.next=n.previous=r;t:for(l=3;liSt(r(_,S,i))),y=g.map(Aj),x=new Set(g).add("");for(let _ of y)x.has(_)||(x.add(_),g.push(_),y.push(Aj(_)),a.push(IR));o=(_,S)=>g[S],s=(_,S)=>y[S]}for(f=0,l=a.length;f=0&&(h=a[g],h.data===IR);--g)h.data=null}if(c.parent=eSt,c.eachBefore(function(g){g.depth=g.parent.depth+1,--l}).eachBefore(TR),c.parent=null,l>0)throw new Error("cycle");return c}return n.id=function(i){return arguments.length?(e=Hh(i),n):e},n.parentId=function(i){return arguments.length?(t=Hh(i),n):t},n.path=function(i){return arguments.length?(r=Hh(i),n):r},n}function iSt(e){e=`${e}`;let t=e.length;return LR(e,t-1)&&!LR(e,t-2)&&(e=e.slice(0,-1)),e[0]==="/"?e:`/${e}`}function Aj(e){let t=e.length;if(t<2)return"";for(;--t>1&&!LR(e,t););return e.slice(0,t)}function LR(e,t){if(e[t]==="/"){let r=0;for(;t>0&&e[--t]==="\\";)++r;if(!(r&1))return!0}return!1}function aSt(e,t){return e.parent===t.parent?1:2}function PR(e){var t=e.children;return t?t[0]:e.t}function RR(e){var t=e.children;return t?t[t.length-1]:e.t}function oSt(e,t,r){var n=r/(t.i-e.i);t.c-=n,t.s+=r,e.c+=n,t.z+=r,t.m+=r}function sSt(e){for(var t=0,r=0,n=e.children,i=n.length,a;--i>=0;)a=n[i],a.z+=t,a.m+=t,t+=a.s+(r+=a.c)}function lSt(e,t,r){return e.a.parent===t.parent?e.a:r}function ZS(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}ZS.prototype=Object.create(Mo.prototype);function uSt(e){for(var t=new ZS(e,0),r,n=[t],i,a,o,s;r=n.pop();)if(a=r._.children)for(r.children=new Array(s=a.length),o=s-1;o>=0;--o)n.push(i=r.children[o]=new ZS(a[o],o)),i.parent=r;return(t.parent=new ZS(null,0)).children=[t],t}function Dj(){var e=aSt,t=1,r=1,n=null;function i(u){var f=uSt(u);if(f.eachAfter(a),f.parent.m=-f.z,f.eachBefore(o),n)u.eachBefore(l);else{var c=u,p=u,h=u;u.eachBefore(function(y){y.xp.x&&(p=y),y.depth>h.depth&&(h=y)});var d=c===p?1:e(c,p)/2,m=d-c.x,v=t/(p.x+d+m),g=r/(h.depth||1);u.eachBefore(function(y){y.x=(y.x+m)*v,y.y=y.depth*g})}return u}function a(u){var f=u.children,c=u.parent.children,p=u.i?c[u.i-1]:null;if(f){sSt(u);var h=(f[0].z+f[f.length-1].z)/2;p?(u.z=p.z+e(u._,p._),u.m=u.z-h):u.z=h}else p&&(u.z=p.z+e(u._,p._));u.parent.A=s(u,p,u.parent.A||c[0])}function o(u){u._.x=u.z+u.parent.m,u.m+=u.parent.m}function s(u,f,c){if(f){for(var p=u,h=u,d=f,m=p.parent.children[0],v=p.m,g=h.m,y=d.m,x=m.m,_;d=RR(d),p=PR(p),d&&p;)m=PR(m),h=RR(h),h.a=u,_=d.z+y-p.z-v+e(d._,p._),_>0&&(oSt(lSt(d,u,c),u,_),v+=_,g+=_),y+=d.m,v+=p.m,x+=m.m,g+=h.m;d&&!RR(h)&&(h.t=d,h.m+=y-g),p&&!PR(m)&&(m.t=p,m.m+=v-x,c=u)}return c}function l(u){u.x*=t,u.y=u.depth*r}return i.separation=function(u){return arguments.length?(e=u,i):e},i.size=function(u){return arguments.length?(n=!1,t=+u[0],r=+u[1],i):n?null:[t,r]},i.nodeSize=function(u){return arguments.length?(n=!0,t=+u[0],r=+u[1],i):n?[t,r]:null},i}function jl(e,t,r,n,i){for(var a=e.children,o,s=-1,l=a.length,u=e.value&&(i-r)/e.value;++sy&&(y=u),b=v*v*S,x=Math.max(y/b,b/g),x>_){v-=u;break}_=x}o.push(l={value:v,dice:h1?n:1)},r}(NR);function Ej(){var e=KS,t=!1,r=1,n=1,i=[0],a=ws,o=ws,s=ws,l=ws,u=ws;function f(p){return p.x0=p.y0=0,p.x1=r,p.y1=n,p.eachBefore(c),i=[0],t&&p.eachBefore(qS),p}function c(p){var h=i[p.depth],d=p.x0+h,m=p.y0+h,v=p.x1-h,g=p.y1-h;v=p-1){var y=a[c];y.x0=d,y.y0=m,y.x1=v,y.y1=g;return}for(var x=u[c],_=h/2+x,S=c+1,b=p-1;S>>1;u[w]<_?S=w+1:b=w}_-u[S-1]g-m){var C=h?(d*M+v*T)/h:v;f(c,S,T,d,m,C,g),f(S,p,M,C,m,v,g)}else{var A=h?(m*M+g*T)/h:g;f(c,S,T,d,m,v,A),f(S,p,M,d,A,v,g)}}}function Lj(e,t,r,n,i){(e.depth&1?jl:Ao)(e,t,r,n,i)}var Pj=function e(t){function r(n,i,a,o,s){if((l=n._squarify)&&l.ratio===t)for(var l,u,f,c,p=-1,h,d=l.length,m=n.value;++p1?n:1)},r}(NR);function Rj(e){for(var t=-1,r=e.length,n,i=e[r-1],a=0;++t1&&kj(e[r[n-2]],e[r[n-1]],e[i])<=0;)--n;r[n++]=i}return r.slice(0,n)}function zj(e){if((r=e.length)<3)return null;var t,r,n=new Array(r),i=new Array(r);for(t=0;t=0;--t)u.push(e[n[a[t]][2]]);for(t=+s;ta!=s>a&&i<(o-l)*(a-u)/(s-u)+l&&(f=!f),o=l,s=u;return f}function Vj(e){for(var t=-1,r=e.length,n=e[r-1],i,a,o=n[0],s=n[1],l=0;++t1);return n+i*s*Math.sqrt(-2*Math.log(o)/o)}}return r.source=e,r}(fe);var Gj=function e(t){var r=Yh.source(t);function n(){var i=r.apply(this,arguments);return function(){return Math.exp(i())}}return n.source=e,n}(fe);var $S=function e(t){function r(n){return(n=+n)<=0?()=>0:function(){for(var i=0,a=n;a>1;--a)i+=t();return i+a*t()}}return r.source=e,r}(fe);var Hj=function e(t){var r=$S.source(t);function n(i){if((i=+i)==0)return t;var a=r(i);return function(){return a()/i}}return n.source=e,n}(fe);var Wj=function e(t){function r(n){return function(){return-Math.log1p(-t())/n}}return r.source=e,r}(fe);var Yj=function e(t){function r(n){if((n=+n)<0)throw new RangeError("invalid alpha");return n=1/-n,function(){return Math.pow(1-t(),n)}}return r.source=e,r}(fe);var Xj=function e(t){function r(n){if((n=+n)<0||n>1)throw new RangeError("invalid p");return function(){return Math.floor(t()+n)}}return r.source=e,r}(fe);var jS=function e(t){function r(n){if((n=+n)<0||n>1)throw new RangeError("invalid p");return n===0?()=>1/0:n===1?()=>1:(n=Math.log1p(-n),function(){return 1+Math.floor(Math.log1p(-t())/n)})}return r.source=e,r}(fe);var Xh=function e(t){var r=Yh.source(t)();function n(i,a){if((i=+i)<0)throw new RangeError("invalid k");if(i===0)return()=>0;if(a=a==null?1:+a,i===1)return()=>-Math.log1p(-t())*a;var o=(i<1?i+1:i)-1/3,s=1/(3*Math.sqrt(o)),l=i<1?()=>Math.pow(t(),1/i):()=>1;return function(){do{do var u=r(),f=1+s*u;while(f<=0);f*=f*f;var c=1-t()}while(c>=1-.0331*u*u*u*u&&Math.log(c)>=.5*u*u+o*(1-f+Math.log(f)));return o*f*l()*a}}return n.source=e,n}(fe);var QS=function e(t){var r=Xh.source(t);function n(i,a){var o=r(i),s=r(a);return function(){var l=o();return l===0?0:l/(l+s())}}return n.source=e,n}(fe);var JS=function e(t){var r=jS.source(t),n=QS.source(t);function i(a,o){return a=+a,(o=+o)>=1?()=>a:o<=0?()=>0:function(){for(var s=0,l=a,u=o;l*u>16&&l*(1-u)>16;){var f=Math.floor((l+1)*u),c=n(f,l-f+1)();c<=u?(s+=f,l-=f,u=(u-c)/(1-c)):(l=f-1,u/=c)}for(var p=u<.5,h=p?u:1-u,d=r(h),m=d(),v=0;m<=l;++v)m+=d();return s+(p?v:l-v)}}return i.source=e,i}(fe);var qj=function e(t){function r(n,i,a){var o;return(n=+n)==0?o=s=>-Math.log(s):(n=1/n,o=s=>Math.pow(s,n)),i=i==null?0:+i,a=a==null?1:+a,function(){return i+a*o(-Math.log1p(-t()))}}return r.source=e,r}(fe);var Zj=function e(t){function r(n,i){return n=n==null?0:+n,i=i==null?1:+i,function(){return n+i*Math.tan(Math.PI*t())}}return r.source=e,r}(fe);var Kj=function e(t){function r(n,i){return n=n==null?0:+n,i=i==null?1:+i,function(){var a=t();return n+i*Math.log(a/(1-a))}}return r.source=e,r}(fe);var $j=function e(t){var r=Xh.source(t),n=JS.source(t);function i(a){return function(){for(var o=0,s=a;s>16;){var l=Math.floor(.875*s),u=r(l)();if(u>s)return o+n(l-1,s/u)();o+=l,s-=u}for(var f=-Math.log1p(-t()),c=0;f<=s;++c)f-=Math.log1p(-t());return o+c}}return i.source=e,i}(fe);var jj=23283064365386963e-26;function OR(e=Math.random()){let t=(0<=e&&e<1?e/jj:Math.abs(e))|0;return()=>(t=1664525*t+1013904223|0,jj*(t>>>0))}function Ge(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function qi(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}var tw=Symbol("implicit");function qh(){var e=new Ta,t=[],r=[],n=tw;function i(a){let o=e.get(a);if(o===void 0){if(n!==tw)return n;e.set(a,o=t.push(a)-1)}return r[o%r.length]}return i.domain=function(a){if(!arguments.length)return t.slice();t=[],e=new Ta;for(let o of a)e.has(o)||e.set(o,t.push(o)-1);return i},i.range=function(a){return arguments.length?(r=Array.from(a),i):r.slice()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return qh(t,r).unknown(n)},Ge.apply(i,arguments),i}function Gg(){var e=qh().unknown(void 0),t=e.domain,r=e.range,n=0,i=1,a,o,s=!1,l=0,u=0,f=.5;delete e.unknown;function c(){var p=t().length,h=it&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function pSt(e,t,r){var n=e[0],i=e[1],a=t[0],o=t[1];return i2?hSt:pSt,l=u=null,c}function c(p){return p==null||isNaN(p=+p)?a:(l||(l=s(e.map(n),t,r)))(n(o(p)))}return c.invert=function(p){return o(i((u||(u=s(t,e.map(n),Cr)))(p)))},c.domain=function(p){return arguments.length?(e=Array.from(p,Ql),f()):e.slice()},c.range=function(p){return arguments.length?(t=Array.from(p),f()):t.slice()},c.rangeRound=function(p){return t=Array.from(p),r=Vl,f()},c.clamp=function(p){return arguments.length?(o=p?!0:_r,f()):o!==_r},c.interpolate=function(p){return arguments.length?(r=p,f()):r},c.unknown=function(p){return arguments.length?(a=p,c):a},function(p,h){return n=p,i=h,f()}}function sc(){return oc()(_r,_r)}function Hg(e,t,r,n){var i=Sf(e,t,r),a;switch(n=Ia(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(a=jb(i,o))&&(n.precision=a),yg(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=Qb(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=$b(i))&&(n.precision=a-(n.type==="%")*2);break}}return Kf(n)}function Sn(e){var t=e.domain;return e.ticks=function(r){var n=t();return Xn(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return Hg(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,a=n.length-1,o=n[i],s=n[a],l,u,f=10;for(s0;){if(u=Ma(o,s,r),u===l)return n[i]=o,n[a]=s,t(n);if(u>0)o=Math.floor(o/u)*u,s=Math.ceil(s/u)*u;else if(u<0)o=Math.ceil(o*u)/u,s=Math.floor(s*u)/u;else break;l=u}return e},e}function ew(){var e=sc();return e.copy=function(){return Co(e,ew())},Ge.apply(e,arguments),Sn(e)}function rw(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,Ql),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return rw(e).unknown(t)},e=arguments.length?Array.from(e,Ql):[0,1],Sn(r)}function Wg(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],a=e[n],o;return aMath.pow(e,t)}function ySt(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function nQ(e){return(t,r)=>-e(-t,r)}function Yg(e){let t=e(eQ,rQ),r=t.domain,n=10,i,a;function o(){return i=ySt(n),a=gSt(n),r()[0]<0?(i=nQ(i),a=nQ(a),e(dSt,vSt)):e(eQ,rQ),t}return t.base=function(s){return arguments.length?(n=+s,o()):n},t.domain=function(s){return arguments.length?(r(s),o()):r()},t.ticks=s=>{let l=r(),u=l[0],f=l[l.length-1],c=f0){for(;p<=h;++p)for(d=1;df)break;g.push(m)}}else for(;p<=h;++p)for(d=n-1;d>=1;--d)if(m=p>0?d/a(-p):d*a(p),!(mf)break;g.push(m)}g.length*2{if(s==null&&(s=10),l==null&&(l=n===10?"s":","),typeof l!="function"&&(!(n%1)&&(l=Ia(l)).precision==null&&(l.trim=!0),l=Kf(l)),s===1/0)return l;let u=Math.max(1,n*s/t.ticks().length);return f=>{let c=f/a(Math.round(i(f)));return c*nr(Wg(r(),{floor:s=>a(Math.floor(i(s))),ceil:s=>a(Math.ceil(i(s)))})),t}function nw(){let e=Yg(oc()).domain([1,10]);return e.copy=()=>Co(e,nw()).base(e.base()),Ge.apply(e,arguments),e}function iQ(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function aQ(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Xg(e){var t=1,r=e(iQ(t),aQ(t));return r.constant=function(n){return arguments.length?e(iQ(t=+n),aQ(t)):t},Sn(r)}function iw(){var e=Xg(oc());return e.copy=function(){return Co(e,iw()).constant(e.constant())},Ge.apply(e,arguments)}function oQ(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function xSt(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function _St(e){return e<0?-e*e:e*e}function qg(e){var t=e(_r,_r),r=1;function n(){return r===1?e(_r,_r):r===.5?e(xSt,_St):e(oQ(r),oQ(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},Sn(t)}function Zg(){var e=qg(oc());return e.copy=function(){return Co(e,Zg()).exponent(e.exponent())},Ge.apply(e,arguments),e}function sQ(){return Zg.apply(null,arguments).exponent(.5)}function lQ(e){return Math.sign(e)*e*e}function bSt(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function aw(){var e=sc(),t=[0,1],r=!1,n;function i(a){var o=bSt(e(a));return isNaN(o)?n:r?Math.round(o):o}return i.invert=function(a){return e.invert(lQ(a))},i.domain=function(a){return arguments.length?(e.domain(a),i):e.domain()},i.range=function(a){return arguments.length?(e.range((t=Array.from(a,Ql)).map(lQ)),i):t.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(r=!!a,i):r},i.clamp=function(a){return arguments.length?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return aw(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},Ge.apply(i,arguments),Sn(i)}function ow(){var e=[],t=[],r=[],n;function i(){var o=0,s=Math.max(1,t.length);for(r=new Array(s-1);++o0?r[s-1]:e[0],s=r?[n[r-1],t]:[n[u-1],n[u]]},o.unknown=function(l){return arguments.length&&(a=l),o},o.thresholds=function(){return n.slice()},o.copy=function(){return sw().domain([e,t]).range(i).unknown(a)},Ge.apply(Sn(o),arguments)}function lw(){var e=[.5],t=[0,1],r,n=1;function i(a){return a!=null&&a<=a?t[Wn(e,a,0,n)]:r}return i.domain=function(a){return arguments.length?(e=Array.from(a),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var o=t.indexOf(a);return[e[o-1],e[o]]},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return lw().domain(e).range(t).unknown(r)},Ge.apply(i,arguments)}var VR=new Date,BR=new Date;function Ce(e,t,r,n){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{let o=i(a),s=i.ceil(a);return a-o(t(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,s)=>{let l=[];if(a=i.ceil(a),s=s==null?1:Math.floor(s),!(a0))return l;let u;do l.push(u=new Date(+a)),t(a,s),e(a);while(uCe(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;t(o,-1),!a(o););else for(;--s>=0;)for(;t(o,1),!a(o););}),r&&(i.count=(a,o)=>(VR.setTime(+a),BR.setTime(+o),e(VR),e(BR),Math.floor(r(VR,BR))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(n?o=>n(o)%a===0:o=>i.count(0,o)%a===0):i)),i}var Jl=Ce(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Jl.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Ce(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):Jl);var FR=Jl.range;var di=Ce(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*1e3)},(e,t)=>(t-e)/1e3,e=>e.getUTCSeconds()),GR=di.range;var uc=Ce(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*1e3)},(e,t)=>{e.setTime(+e+t*6e4)},(e,t)=>(t-e)/6e4,e=>e.getMinutes()),uQ=uc.range,fc=Ce(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*6e4)},(e,t)=>(t-e)/6e4,e=>e.getUTCMinutes()),fQ=fc.range;var pc=Ce(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*1e3-e.getMinutes()*6e4)},(e,t)=>{e.setTime(+e+t*36e5)},(e,t)=>(t-e)/36e5,e=>e.getHours()),cQ=pc.range,hc=Ce(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*36e5)},(e,t)=>(t-e)/36e5,e=>e.getUTCHours()),pQ=hc.range;var Eo=Ce(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*6e4)/864e5,e=>e.getDate()-1),hQ=Eo.range,tu=Ce(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/864e5,e=>e.getUTCDate()-1),dQ=tu.range,$g=Ce(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/864e5,e=>Math.floor(e/864e5)),vQ=$g.range;function dc(e){return Ce(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*6e4)/6048e5)}var Io=dc(0),vc=dc(1),HR=dc(2),WR=dc(3),Ts=dc(4),YR=dc(5),XR=dc(6),qR=Io.range,gQ=vc.range,yQ=HR.range,xQ=WR.range,_Q=Ts.range,bQ=YR.range,SQ=XR.range;function mc(e){return Ce(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/6048e5)}var Lo=mc(0),gc=mc(1),ZR=mc(2),KR=mc(3),Ms=mc(4),$R=mc(5),jR=mc(6),QR=Lo.range,wQ=gc.range,TQ=ZR.range,MQ=KR.range,AQ=Ms.range,CQ=$R.range,DQ=jR.range;var yc=Ce(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth()),EQ=yc.range,xc=Ce(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth()),IQ=xc.range;var Kn=Ce(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Kn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ce(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});var LQ=Kn.range,$n=Ce(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());$n.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ce(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});var PQ=$n.range;function NQ(e,t,r,n,i,a){let o=[[di,1,1e3],[di,5,5*1e3],[di,15,15*1e3],[di,30,30*1e3],[a,1,6e4],[a,5,5*6e4],[a,15,15*6e4],[a,30,30*6e4],[i,1,36e5],[i,3,3*36e5],[i,6,6*36e5],[i,12,12*36e5],[n,1,864e5],[n,2,2*864e5],[r,1,6048e5],[t,1,2592e6],[t,3,3*2592e6],[e,1,31536e6]];function s(u,f,c){let p=fv).right(o,p);if(h===o.length)return e.every(Sf(u/31536e6,f/31536e6,c));if(h===0)return Jl.every(Math.max(Sf(u,f,c),1));let[d,m]=o[p/o[h-1][2]53)return null;"w"in W||(W.w=1),"Z"in W?(Tt=tN(jg(W.y,0,1)),te=Tt.getUTCDay(),Tt=te>4||te===0?gc.ceil(Tt):gc(Tt),Tt=tu.offset(Tt,(W.V-1)*7),W.y=Tt.getUTCFullYear(),W.m=Tt.getUTCMonth(),W.d=Tt.getUTCDate()+(W.w+6)%7):(Tt=JR(jg(W.y,0,1)),te=Tt.getDay(),Tt=te>4||te===0?vc.ceil(Tt):vc(Tt),Tt=Eo.offset(Tt,(W.V-1)*7),W.y=Tt.getFullYear(),W.m=Tt.getMonth(),W.d=Tt.getDate()+(W.w+6)%7)}else("W"in W||"U"in W)&&("w"in W||(W.w="u"in W?W.u%7:"W"in W?1:0),te="Z"in W?tN(jg(W.y,0,1)).getUTCDay():JR(jg(W.y,0,1)).getDay(),W.m=0,W.d="W"in W?(W.w+6)%7+W.W*7-(te+5)%7:W.w+W.U*7-(te+6)%7);return"Z"in W?(W.H+=W.Z/100|0,W.M+=W.Z%100,tN(W)):JR(W)}}function T(K,ot,Q,W){for(var Gt=0,Tt=ot.length,te=Q.length,Jt,Dt;Gt=te)return-1;if(Jt=ot.charCodeAt(Gt++),Jt===37){if(Jt=ot.charAt(Gt++),Dt=S[Jt in kQ?ot.charAt(Gt++):Jt],!Dt||(W=Dt(K,Q,W))<0)return-1}else if(Jt!=Q.charCodeAt(W++))return-1}return W}function M(K,ot,Q){var W=u.exec(ot.slice(Q));return W?(K.p=f.get(W[0].toLowerCase()),Q+W[0].length):-1}function C(K,ot,Q){var W=h.exec(ot.slice(Q));return W?(K.w=d.get(W[0].toLowerCase()),Q+W[0].length):-1}function A(K,ot,Q){var W=c.exec(ot.slice(Q));return W?(K.w=p.get(W[0].toLowerCase()),Q+W[0].length):-1}function P(K,ot,Q){var W=g.exec(ot.slice(Q));return W?(K.m=y.get(W[0].toLowerCase()),Q+W[0].length):-1}function L(K,ot,Q){var W=m.exec(ot.slice(Q));return W?(K.m=v.get(W[0].toLowerCase()),Q+W[0].length):-1}function I(K,ot,Q){return T(K,t,ot,Q)}function E(K,ot,Q){return T(K,r,ot,Q)}function R(K,ot,Q){return T(K,n,ot,Q)}function k(K){return o[K.getDay()]}function O(K){return a[K.getDay()]}function z(K){return l[K.getMonth()]}function U(K){return s[K.getMonth()]}function G(K){return i[+(K.getHours()>=12)]}function Y(K){return 1+~~(K.getMonth()/3)}function et(K){return o[K.getUTCDay()]}function tt(K){return a[K.getUTCDay()]}function lt(K){return l[K.getUTCMonth()]}function Mt(K){return s[K.getUTCMonth()]}function ut(K){return i[+(K.getUTCHours()>=12)]}function ct(K){return 1+~~(K.getUTCMonth()/3)}return{format:function(K){var ot=b(K+="",x);return ot.toString=function(){return K},ot},parse:function(K){var ot=w(K+="",!1);return ot.toString=function(){return K},ot},utcFormat:function(K){var ot=b(K+="",_);return ot.toString=function(){return K},ot},utcParse:function(K){var ot=w(K+="",!0);return ot.toString=function(){return K},ot}}}var kQ={"-":"",_:" ",0:"0"},Ir=/^\s*\d+/,wSt=/^%/,TSt=/[\\^$*+?|[\]().{}]/g;function ye(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",a=i.length;return n+(a[t.toLowerCase(),r]))}function ASt(e,t,r){var n=Ir.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function CSt(e,t,r){var n=Ir.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function DSt(e,t,r){var n=Ir.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function ESt(e,t,r){var n=Ir.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function ISt(e,t,r){var n=Ir.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function OQ(e,t,r){var n=Ir.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function zQ(e,t,r){var n=Ir.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function LSt(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function PSt(e,t,r){var n=Ir.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function RSt(e,t,r){var n=Ir.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function UQ(e,t,r){var n=Ir.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function NSt(e,t,r){var n=Ir.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function VQ(e,t,r){var n=Ir.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function kSt(e,t,r){var n=Ir.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function OSt(e,t,r){var n=Ir.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function zSt(e,t,r){var n=Ir.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function USt(e,t,r){var n=Ir.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function VSt(e,t,r){var n=wSt.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function BSt(e,t,r){var n=Ir.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function FSt(e,t,r){var n=Ir.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function BQ(e,t){return ye(e.getDate(),t,2)}function GSt(e,t){return ye(e.getHours(),t,2)}function HSt(e,t){return ye(e.getHours()%12||12,t,2)}function WSt(e,t){return ye(1+Eo.count(Kn(e),e),t,3)}function YQ(e,t){return ye(e.getMilliseconds(),t,3)}function YSt(e,t){return YQ(e,t)+"000"}function XSt(e,t){return ye(e.getMonth()+1,t,2)}function qSt(e,t){return ye(e.getMinutes(),t,2)}function ZSt(e,t){return ye(e.getSeconds(),t,2)}function KSt(e){var t=e.getDay();return t===0?7:t}function $St(e,t){return ye(Io.count(Kn(e)-1,e),t,2)}function XQ(e){var t=e.getDay();return t>=4||t===0?Ts(e):Ts.ceil(e)}function jSt(e,t){return e=XQ(e),ye(Ts.count(Kn(e),e)+(Kn(e).getDay()===4),t,2)}function QSt(e){return e.getDay()}function JSt(e,t){return ye(vc.count(Kn(e)-1,e),t,2)}function twt(e,t){return ye(e.getFullYear()%100,t,2)}function ewt(e,t){return e=XQ(e),ye(e.getFullYear()%100,t,2)}function rwt(e,t){return ye(e.getFullYear()%1e4,t,4)}function nwt(e,t){var r=e.getDay();return e=r>=4||r===0?Ts(e):Ts.ceil(e),ye(e.getFullYear()%1e4,t,4)}function iwt(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ye(t/60|0,"0",2)+ye(t%60,"0",2)}function FQ(e,t){return ye(e.getUTCDate(),t,2)}function awt(e,t){return ye(e.getUTCHours(),t,2)}function owt(e,t){return ye(e.getUTCHours()%12||12,t,2)}function swt(e,t){return ye(1+tu.count($n(e),e),t,3)}function qQ(e,t){return ye(e.getUTCMilliseconds(),t,3)}function lwt(e,t){return qQ(e,t)+"000"}function uwt(e,t){return ye(e.getUTCMonth()+1,t,2)}function fwt(e,t){return ye(e.getUTCMinutes(),t,2)}function cwt(e,t){return ye(e.getUTCSeconds(),t,2)}function pwt(e){var t=e.getUTCDay();return t===0?7:t}function hwt(e,t){return ye(Lo.count($n(e)-1,e),t,2)}function ZQ(e){var t=e.getUTCDay();return t>=4||t===0?Ms(e):Ms.ceil(e)}function dwt(e,t){return e=ZQ(e),ye(Ms.count($n(e),e)+($n(e).getUTCDay()===4),t,2)}function vwt(e){return e.getUTCDay()}function mwt(e,t){return ye(gc.count($n(e)-1,e),t,2)}function gwt(e,t){return ye(e.getUTCFullYear()%100,t,2)}function ywt(e,t){return e=ZQ(e),ye(e.getUTCFullYear()%100,t,2)}function xwt(e,t){return ye(e.getUTCFullYear()%1e4,t,4)}function _wt(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Ms(e):Ms.ceil(e),ye(e.getUTCFullYear()%1e4,t,4)}function bwt(){return"+0000"}function GQ(){return"%"}function HQ(e){return+e}function WQ(e){return Math.floor(+e/1e3)}var Zh,ey,eN,_c,ry;hw({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function hw(e){return Zh=ty(e),ey=Zh.format,eN=Zh.parse,_c=Zh.utcFormat,ry=Zh.utcParse,Zh}var rN="%Y-%m-%dT%H:%M:%S.%LZ";function Swt(e){return e.toISOString()}var wwt=Date.prototype.toISOString?Swt:_c(rN),KQ=wwt;function Twt(e){var t=new Date(e);return isNaN(t)?null:t}var Mwt=+new Date("2000-01-01T00:00:00.000Z")?Twt:ry(rN),$Q=Mwt;function Awt(e){return new Date(e)}function Cwt(e){return e instanceof Date?+e:+new Date(+e)}function dw(e,t,r,n,i,a,o,s,l,u){var f=sc(),c=f.invert,p=f.domain,h=u(".%L"),d=u(":%S"),m=u("%I:%M"),v=u("%I %p"),g=u("%a %d"),y=u("%b %d"),x=u("%B"),_=u("%Y");function S(b){return(l(b)t(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,a)=>po(e,a/n))},r.copy=function(){return yw(t).domain(e)},qi.apply(r,arguments)}function xw(){var e=0,t=.5,r=1,n=1,i,a,o,s,l,u=_r,f,c=!1,p;function h(m){return isNaN(m=+m)?p:(m=.5+((m=+f(m))-a)*(n*myb(e[e.length-1]);var uN=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(xt),uJ=zt(uN);var fN=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(xt),fJ=zt(fN);var cN=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(xt),cJ=zt(cN);var pN=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(xt),pJ=zt(pN);var hN=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(xt),hJ=zt(hN);var dN=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(xt),dJ=zt(dN);var vN=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(xt),vJ=zt(vN);var mN=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(xt),mJ=zt(mN);var gN=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(xt),gJ=zt(gN);var yN=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(xt),yJ=zt(yN);var xN=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(xt),xJ=zt(xN);var _N=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(xt),_J=zt(_N);var bN=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(xt),bJ=zt(bN);var SN=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(xt),SJ=zt(SN);var wN=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(xt),wJ=zt(wN);var TN=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(xt),TJ=zt(TN);var MN=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(xt),MJ=zt(MN);var AN=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(xt),AJ=zt(AN);var CN=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(xt),CJ=zt(CN);var DN=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(xt),DJ=zt(DN);var EN=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(xt),EJ=zt(EN);var IN=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(xt),IJ=zt(IN);var LN=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(xt),LJ=zt(LN);var PN=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(xt),PJ=zt(PN);var RN=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(xt),RJ=zt(RN);var NN=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(xt),NJ=zt(NN);var kN=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(xt),kJ=zt(kN);function OJ(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-e*(35.34-e*(2381.73-e*(6402.7-e*(7024.72-e*2710.57)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+e*(170.73+e*(52.82-e*(131.46-e*(176.58-e*67.37)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+e*(442.36-e*(2482.43-e*(6167.24-e*(6614.94-e*2475.67)))))))+")"}var zJ=kf(Qr(300,.5,0),Qr(-240,.5,1));var UJ=kf(Qr(-100,.75,.35),Qr(80,1.5,.8)),VJ=kf(Qr(260,.75,.35),Qr(80,1.5,.8)),Sw=Qr();function BJ(e){(e<0||e>1)&&(e-=Math.floor(e));var t=Math.abs(e-.5);return Sw.h=360*e-100,Sw.s=1.5-1.5*t,Sw.l=.8-.9*t,Sw+""}var ww=hs(),Dwt=Math.PI/3,Ewt=Math.PI*2/3;function FJ(e){var t;return e=(.5-e)*Math.PI,ww.r=255*(t=Math.sin(e))*t,ww.g=255*(t=Math.sin(e+Dwt))*t,ww.b=255*(t=Math.sin(e+Ewt))*t,ww+""}function GJ(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+e*(1172.33-e*(10793.56-e*(33300.12-e*(38394.49-e*14825.05)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+e*(557.33+e*(1225.33-e*(3574.96-e*(1073.77+e*707.56)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+e*(3211.1-e*(15327.97-e*(27814-e*(22569.18-e*6838.66)))))))+")"}function Tw(e){var t=e.length;return function(r){return e[Math.max(0,Math.min(t-1,Math.floor(r*t)))]}}var HJ=Tw(xt("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),WJ=Tw(xt("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),YJ=Tw(xt("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),XJ=Tw(xt("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function Ft(e){return function(){return e}}var ON=Math.abs,Hr=Math.atan2,Na=Math.cos,qJ=Math.max,Po=Math.min,nn=Math.sin,ee=Math.sqrt,Lr=1e-12,ka=Math.PI,ny=ka/2,Zi=2*ka;function ZJ(e){return e>1?0:e<-1?ka:Math.acos(e)}function zN(e){return e>=1?ny:e<=-1?-ny:Math.asin(e)}function Ro(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{let n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new ms(t)}function Iwt(e){return e.innerRadius}function Lwt(e){return e.outerRadius}function Pwt(e){return e.startAngle}function Rwt(e){return e.endAngle}function Nwt(e){return e&&e.padAngle}function kwt(e,t,r,n,i,a,o,s){var l=r-e,u=n-t,f=o-i,c=s-a,p=c*l-f*u;if(!(p*pI*I+E*E&&(T=C,M=A),{cx:T,cy:M,x01:-f,y01:-c,x11:T*(i/S-1),y11:M*(i/S-1)}}function KJ(){var e=Iwt,t=Lwt,r=Ft(0),n=null,i=Pwt,a=Rwt,o=Nwt,s=null,l=Ro(u);function u(){var f,c,p=+e.apply(this,arguments),h=+t.apply(this,arguments),d=i.apply(this,arguments)-ny,m=a.apply(this,arguments)-ny,v=ON(m-d),g=m>d;if(s||(s=f=l()),hLr))s.moveTo(0,0);else if(v>Zi-Lr)s.moveTo(h*Na(d),h*nn(d)),s.arc(0,0,h,d,m,!g),p>Lr&&(s.moveTo(p*Na(m),p*nn(m)),s.arc(0,0,p,m,d,g));else{var y=d,x=m,_=d,S=m,b=v,w=v,T=o.apply(this,arguments)/2,M=T>Lr&&(n?+n.apply(this,arguments):ee(p*p+h*h)),C=Po(ON(h-p)/2,+r.apply(this,arguments)),A=C,P=C,L,I;if(M>Lr){var E=zN(M/p*nn(T)),R=zN(M/h*nn(T));(b-=E*2)>Lr?(E*=g?1:-1,_+=E,S-=E):(b=0,_=S=(d+m)/2),(w-=R*2)>Lr?(R*=g?1:-1,y+=R,x-=R):(w=0,y=x=(d+m)/2)}var k=h*Na(y),O=h*nn(y),z=p*Na(S),U=p*nn(S);if(C>Lr){var G=h*Na(x),Y=h*nn(x),et=p*Na(_),tt=p*nn(_),lt;if(vLr?P>Lr?(L=Mw(et,tt,k,O,h,P,g),I=Mw(G,Y,z,U,h,P,g),s.moveTo(L.cx+L.x01,L.cy+L.y01),PLr)||!(b>Lr)?s.lineTo(z,U):A>Lr?(L=Mw(z,U,G,Y,p,-A,g),I=Mw(k,O,et,tt,p,-A,g),s.lineTo(L.cx+L.x01,L.cy+L.y01),A=h;--d)s.point(x[d],_[d]);s.lineEnd(),s.areaEnd()}g&&(x[p]=+e(v,p,c),_[p]=+t(v,p,c),s.point(n?+n(v,p,c):x[p],r?+r(v,p,c):_[p]))}if(y)return s=null,y+""||null}function f(){return jh().defined(i).curve(o).context(a)}return u.x=function(c){return arguments.length?(e=typeof c=="function"?c:Ft(+c),n=null,u):e},u.x0=function(c){return arguments.length?(e=typeof c=="function"?c:Ft(+c),u):e},u.x1=function(c){return arguments.length?(n=c==null?null:typeof c=="function"?c:Ft(+c),u):n},u.y=function(c){return arguments.length?(t=typeof c=="function"?c:Ft(+c),r=null,u):t},u.y0=function(c){return arguments.length?(t=typeof c=="function"?c:Ft(+c),u):t},u.y1=function(c){return arguments.length?(r=c==null?null:typeof c=="function"?c:Ft(+c),u):r},u.lineX0=u.lineY0=function(){return f().x(e).y(t)},u.lineY1=function(){return f().x(e).y(r)},u.lineX1=function(){return f().x(n).y(t)},u.defined=function(c){return arguments.length?(i=typeof c=="function"?c:Ft(!!c),u):i},u.curve=function(c){return arguments.length?(o=c,a!=null&&(s=o(a)),u):o},u.context=function(c){return arguments.length?(c==null?a=s=null:s=o(a=c),u):a},u}function QJ(e,t){return te?1:t>=e?0:NaN}function JJ(e){return e}function ttt(){var e=JJ,t=QJ,r=null,n=Ft(0),i=Ft(Zi),a=Ft(0);function o(s){var l,u=(s=eu(s)).length,f,c,p=0,h=new Array(u),d=new Array(u),m=+n.apply(this,arguments),v=Math.min(Zi,Math.max(-Zi,i.apply(this,arguments)-m)),g,y=Math.min(Math.abs(v)/u,a.apply(this,arguments)),x=y*(v<0?-1:1),_;for(l=0;l0&&(p+=_);for(t!=null?h.sort(function(S,b){return t(d[S],d[b])}):r!=null&&h.sort(function(S,b){return r(s[S],s[b])}),l=0,c=p?(v-u*x)/p:0;l0?_*c:0)+x,d[f]={data:s[f],index:l,value:_,startAngle:m,endAngle:g,padAngle:y};return d}return o.value=function(s){return arguments.length?(e=typeof s=="function"?s:Ft(+s),o):e},o.sortValues=function(s){return arguments.length?(t=s,r=null,o):t},o.sort=function(s){return arguments.length?(r=s,t=null,o):r},o.startAngle=function(s){return arguments.length?(n=typeof s=="function"?s:Ft(+s),o):n},o.endAngle=function(s){return arguments.length?(i=typeof s=="function"?s:Ft(+s),o):i},o.padAngle=function(s){return arguments.length?(a=typeof s=="function"?s:Ft(+s),o):a},o}var Cw=Qh(ru);function ett(e){this._curve=e}ett.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}};function Qh(e){function t(r){return new ett(e(r))}return t._curve=e,t}function Jh(e){var t=e.curve;return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e.curve=function(r){return arguments.length?t(Qh(r)):t()._curve},e}function UN(){return Jh(jh().curve(Cw))}function VN(){var e=Aw().curve(Cw),t=e.curve,r=e.lineX0,n=e.lineX1,i=e.lineY0,a=e.lineY1;return e.angle=e.x,delete e.x,e.startAngle=e.x0,delete e.x0,e.endAngle=e.x1,delete e.x1,e.radius=e.y,delete e.y,e.innerRadius=e.y0,delete e.y0,e.outerRadius=e.y1,delete e.y1,e.lineStartAngle=function(){return Jh(r())},delete e.lineX0,e.lineEndAngle=function(){return Jh(n())},delete e.lineX1,e.lineInnerRadius=function(){return Jh(i())},delete e.lineY0,e.lineOuterRadius=function(){return Jh(a())},delete e.lineY1,e.curve=function(o){return arguments.length?t(Qh(o)):t()._curve},e}function bc(e,t){return[(t=+t)*Math.cos(e-=Math.PI/2),t*Math.sin(e)]}var Dw=class{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}},BN=class{constructor(t){this._context=t}lineStart(){this._point=0}lineEnd(){}point(t,r){if(t=+t,r=+r,this._point===0)this._point=1;else{let n=bc(this._x0,this._y0),i=bc(this._x0,this._y0=(this._y0+r)/2),a=bc(t,this._y0),o=bc(t,r);this._context.moveTo(...n),this._context.bezierCurveTo(...i,...a,...o)}this._x0=t,this._y0=r}};function Ew(e){return new Dw(e,!0)}function Iw(e){return new Dw(e,!1)}function rtt(e){return new BN(e)}function Owt(e){return e.source}function zwt(e){return e.target}function iy(e){let t=Owt,r=zwt,n=Kh,i=$h,a=null,o=null,s=Ro(l);function l(){let u,f=$J.call(arguments),c=t.apply(this,f),p=r.apply(this,f);if(a==null&&(o=e(u=s())),o.lineStart(),f[0]=c,o.point(+n.apply(this,f),+i.apply(this,f)),f[0]=p,o.point(+n.apply(this,f),+i.apply(this,f)),o.lineEnd(),u)return o=null,u+""||null}return l.source=function(u){return arguments.length?(t=u,l):t},l.target=function(u){return arguments.length?(r=u,l):r},l.x=function(u){return arguments.length?(n=typeof u=="function"?u:Ft(+u),l):n},l.y=function(u){return arguments.length?(i=typeof u=="function"?u:Ft(+u),l):i},l.context=function(u){return arguments.length?(u==null?a=o=null:o=e(a=u),l):a},l}function ntt(){return iy(Ew)}function itt(){return iy(Iw)}function att(){let e=iy(rtt);return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e}var Uwt=ee(3),Lw={draw(e,t){let r=ee(t+Po(t/28,.75))*.59436,n=r/2,i=n*Uwt;e.moveTo(0,r),e.lineTo(0,-r),e.moveTo(-i,-n),e.lineTo(i,n),e.moveTo(-i,n),e.lineTo(i,-n)}};var td={draw(e,t){let r=ee(t/ka);e.moveTo(r,0),e.arc(0,0,r,0,Zi)}};var Pw={draw(e,t){let r=ee(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}};var ott=ee(1/3),Vwt=ott*2,Rw={draw(e,t){let r=ee(t/Vwt),n=r*ott;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}};var Nw={draw(e,t){let r=ee(t)*.62625;e.moveTo(0,-r),e.lineTo(r,0),e.lineTo(0,r),e.lineTo(-r,0),e.closePath()}};var kw={draw(e,t){let r=ee(t-Po(t/7,2))*.87559;e.moveTo(-r,0),e.lineTo(r,0),e.moveTo(0,r),e.lineTo(0,-r)}};var Ow={draw(e,t){let r=ee(t),n=-r/2;e.rect(n,n,r,r)}};var zw={draw(e,t){let r=ee(t)*.4431;e.moveTo(r,r),e.lineTo(r,-r),e.lineTo(-r,-r),e.lineTo(-r,r),e.closePath()}};var Bwt=.8908130915292852,stt=nn(ka/10)/nn(7*ka/10),Fwt=nn(Zi/10)*stt,Gwt=-Na(Zi/10)*stt,Uw={draw(e,t){let r=ee(t*Bwt),n=Fwt*r,i=Gwt*r;e.moveTo(0,-r),e.lineTo(n,i);for(let a=1;a<5;++a){let o=Zi*a/5,s=Na(o),l=nn(o);e.lineTo(l*r,-s*r),e.lineTo(s*n-l*i,l*n+s*i)}e.closePath()}};var FN=ee(3),Vw={draw(e,t){let r=-ee(t/(FN*3));e.moveTo(0,r*2),e.lineTo(-FN*r,-r),e.lineTo(FN*r,-r),e.closePath()}};var Hwt=ee(3),Bw={draw(e,t){let r=ee(t)*.6824,n=r/2,i=r*Hwt/2;e.moveTo(0,-r),e.lineTo(i,n),e.lineTo(-i,n),e.closePath()}};var Ki=-.5,$i=ee(3)/2,GN=1/ee(12),Wwt=(GN/2+1)*3,Fw={draw(e,t){let r=ee(t/Wwt),n=r/2,i=r*GN,a=n,o=r*GN+r,s=-a,l=o;e.moveTo(n,i),e.lineTo(a,o),e.lineTo(s,l),e.lineTo(Ki*n-$i*i,$i*n+Ki*i),e.lineTo(Ki*a-$i*o,$i*a+Ki*o),e.lineTo(Ki*s-$i*l,$i*s+Ki*l),e.lineTo(Ki*n+$i*i,Ki*i-$i*n),e.lineTo(Ki*a+$i*o,Ki*o-$i*a),e.lineTo(Ki*s+$i*l,Ki*l-$i*s),e.closePath()}};var ay={draw(e,t){let r=ee(t-Po(t/6,1.7))*.6189;e.moveTo(-r,-r),e.lineTo(r,r),e.moveTo(-r,r),e.lineTo(r,-r)}};var HN=[td,Pw,Rw,Ow,Uw,Vw,Fw],ltt=[td,kw,ay,Bw,Lw,zw,Nw];function WN(e,t){let r=null,n=Ro(i);e=typeof e=="function"?e:Ft(e||td),t=typeof t=="function"?t:Ft(t===void 0?64:+t);function i(){let a;if(r||(r=a=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),a)return r=null,a+""||null}return i.type=function(a){return arguments.length?(e=typeof a=="function"?a:Ft(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:Ft(+a),i):t},i.context=function(a){return arguments.length?(r=a??null,i):r},i}function ji(){}function ed(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function oy(e){this._context=e}oy.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:ed(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:ed(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function utt(e){return new oy(e)}function ftt(e){this._context=e}ftt.prototype={areaStart:ji,areaEnd:ji,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:ed(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ctt(e){return new ftt(e)}function ptt(e){this._context=e}ptt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:ed(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function htt(e){return new ptt(e)}function dtt(e,t){this._basis=new oy(e),this._beta=t}dtt.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var n=e[0],i=t[0],a=e[r]-n,o=t[r]-i,s=-1,l;++s<=r;)l=s/r,this._basis.point(this._beta*e[s]+(1-this._beta)*(n+l*a),this._beta*t[s]+(1-this._beta)*(i+l*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};var vtt=function e(t){function r(n){return t===1?new oy(n):new dtt(n,t)}return r.beta=function(n){return e(+n)},r}(.85);function rd(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function Gw(e,t){this._context=e,this._k=(1-t)/6}Gw.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:rd(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:rd(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var mtt=function e(t){function r(n){return new Gw(n,t)}return r.tension=function(n){return e(+n)},r}(0);function Hw(e,t){this._context=e,this._k=(1-t)/6}Hw.prototype={areaStart:ji,areaEnd:ji,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:rd(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var gtt=function e(t){function r(n){return new Hw(n,t)}return r.tension=function(n){return e(+n)},r}(0);function Ww(e,t){this._context=e,this._k=(1-t)/6}Ww.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:rd(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ytt=function e(t){function r(n){return new Ww(n,t)}return r.tension=function(n){return e(+n)},r}(0);function sy(e,t,r){var n=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>Lr){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);n=(n*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>Lr){var u=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,f=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*u+e._x1*e._l23_2a-t*e._l12_2a)/f,o=(o*u+e._y1*e._l23_2a-r*e._l12_2a)/f}e._context.bezierCurveTo(n,i,a,o,e._x2,e._y2)}function xtt(e,t){this._context=e,this._alpha=t}xtt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:sy(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var _tt=function e(t){function r(n){return t?new xtt(n,t):new Gw(n,0)}return r.alpha=function(n){return e(+n)},r}(.5);function btt(e,t){this._context=e,this._alpha=t}btt.prototype={areaStart:ji,areaEnd:ji,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:sy(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Stt=function e(t){function r(n){return t?new btt(n,t):new Hw(n,0)}return r.alpha=function(n){return e(+n)},r}(.5);function wtt(e,t){this._context=e,this._alpha=t}wtt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:sy(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Ttt=function e(t){function r(n){return t?new wtt(n,t):new Ww(n,0)}return r.alpha=function(n){return e(+n)},r}(.5);function Mtt(e){this._context=e}Mtt.prototype={areaStart:ji,areaEnd:ji,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Att(e){return new Mtt(e)}function Ctt(e){return e<0?-1:1}function Dtt(e,t,r){var n=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(n||i<0&&-0),o=(r-e._y1)/(i||n<0&&-0),s=(a*i+o*n)/(n+i);return(Ctt(a)+Ctt(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Ett(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function YN(e,t,r){var n=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-n)/3;e._context.bezierCurveTo(n+s,i+s*t,a-s,o-s*r,a,o)}function Yw(e){this._context=e}Yw.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:YN(this,this._t0,Ett(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,YN(this,Ett(this,r=Dtt(this,e,t)),r);break;default:YN(this,this._t0,r=Dtt(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Itt(e){this._context=new Ltt(e)}(Itt.prototype=Object.create(Yw.prototype)).point=function(e,t){Yw.prototype.point.call(this,t,e)};function Ltt(e){this._context=e}Ltt.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,a){this._context.bezierCurveTo(t,e,n,r,a,i)}};function Ptt(e){return new Yw(e)}function Rtt(e){return new Itt(e)}function ktt(e){this._context=e}ktt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=Ntt(e),i=Ntt(t),a=0,o=1;o=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[r-1]=(e[r]+i[r-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function ztt(e){return new Xw(e,.5)}function Utt(e){return new Xw(e,0)}function Vtt(e){return new Xw(e,1)}function Oa(e,t){if((o=e.length)>1)for(var r=1,n,i,a=e[t[0]],o,s=a.length;r=0;)r[t]=t;return r}function Ywt(e,t){return e[t]}function Xwt(e){let t=[];return t.key=e,t}function Btt(){var e=Ft([]),t=za,r=Oa,n=Ywt;function i(a){var o=Array.from(e.apply(this,arguments),Xwt),s,l=o.length,u=-1,f;for(let c of a)for(s=0,++u;s0){for(var r,n,i=0,a=e[0].length,o;i0)for(var r,n=0,i,a,o,s,l,u=e[t[0]].length;n0?(i[0]=o,i[1]=o+=a):a<0?(i[1]=s,i[0]=s+=a):(i[0]=0,i[1]=a)}function Htt(e,t){if((i=e.length)>0){for(var r=0,n=e[t[0]],i,a=n.length;r0)||!((a=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,a,o;na&&(a=i,r=t);return r}function Zw(e){var t=e.map(XN);return za(e).sort(function(r,n){return t[r]-t[n]})}function XN(e){for(var t=0,r=-1,n=e.length,i;++r()=>e;function qN(e,{sourceEvent:t,target:r,transform:n,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:n,enumerable:!0,configurable:!0},_:{value:i}})}function Qi(e,t,r){this.k=e,this.x=t,this.y=r}Qi.prototype={constructor:Qi,scale:function(e){return e===1?this:new Qi(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Qi(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var nd=new Qi(1,0,0);Kw.prototype=Qi.prototype;function Kw(e){for(;!e.__zoom;)if(!(e=e.parentNode))return nd;return e.__zoom}function $w(e){e.stopImmediatePropagation()}function id(e){e.preventDefault(),e.stopImmediatePropagation()}function Zwt(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function Kwt(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function Ztt(){return this.__zoom||nd}function $wt(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function jwt(){return navigator.maxTouchPoints||"ontouchstart"in this}function Qwt(e,t,r){var n=e.invertX(t[0][0])-r[0][0],i=e.invertX(t[1][0])-r[1][0],a=e.invertY(t[0][1])-r[0][1],o=e.invertY(t[1][1])-r[1][1];return e.translate(i>n?(n+i)/2:Math.min(0,n)||Math.max(0,i),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}function Ktt(){var e=Zwt,t=Kwt,r=Qwt,n=$wt,i=jwt,a=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],s=250,l=Ab,u=Gi("start","zoom","end"),f,c,p,h=500,d=150,m=0,v=10;function g(I){I.property("__zoom",Ztt).on("wheel.zoom",T,{passive:!1}).on("mousedown.zoom",M).on("dblclick.zoom",C).filter(i).on("touchstart.zoom",A).on("touchmove.zoom",P).on("touchend.zoom touchcancel.zoom",L).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}g.transform=function(I,E,R,k){var O=I.selection?I.selection():I;O.property("__zoom",Ztt),I!==O?S(I,E,R,k):O.interrupt().each(function(){b(this,arguments).event(k).start().zoom(null,typeof E=="function"?E.apply(this,arguments):E).end()})},g.scaleBy=function(I,E,R,k){g.scaleTo(I,function(){var O=this.__zoom.k,z=typeof E=="function"?E.apply(this,arguments):E;return O*z},R,k)},g.scaleTo=function(I,E,R,k){g.transform(I,function(){var O=t.apply(this,arguments),z=this.__zoom,U=R==null?_(O):typeof R=="function"?R.apply(this,arguments):R,G=z.invert(U),Y=typeof E=="function"?E.apply(this,arguments):E;return r(x(y(z,Y),U,G),O,o)},R,k)},g.translateBy=function(I,E,R,k){g.transform(I,function(){return r(this.__zoom.translate(typeof E=="function"?E.apply(this,arguments):E,typeof R=="function"?R.apply(this,arguments):R),t.apply(this,arguments),o)},null,k)},g.translateTo=function(I,E,R,k,O){g.transform(I,function(){var z=t.apply(this,arguments),U=this.__zoom,G=k==null?_(z):typeof k=="function"?k.apply(this,arguments):k;return r(nd.translate(G[0],G[1]).scale(U.k).translate(typeof E=="function"?-E.apply(this,arguments):-E,typeof R=="function"?-R.apply(this,arguments):-R),z,o)},k,O)};function y(I,E){return E=Math.max(a[0],Math.min(a[1],E)),E===I.k?I:new Qi(E,I.x,I.y)}function x(I,E,R){var k=E[0]-R[0]*I.k,O=E[1]-R[1]*I.k;return k===I.x&&O===I.y?I:new Qi(I.k,k,O)}function _(I){return[(+I[0][0]+ +I[1][0])/2,(+I[0][1]+ +I[1][1])/2]}function S(I,E,R,k){I.on("start.zoom",function(){b(this,arguments).event(k).start()}).on("interrupt.zoom end.zoom",function(){b(this,arguments).event(k).end()}).tween("zoom",function(){var O=this,z=arguments,U=b(O,z).event(k),G=t.apply(O,z),Y=R==null?_(G):typeof R=="function"?R.apply(O,z):R,et=Math.max(G[1][0]-G[0][0],G[1][1]-G[0][1]),tt=O.__zoom,lt=typeof E=="function"?E.apply(O,z):E,Mt=l(tt.invert(Y).concat(et/tt.k),lt.invert(Y).concat(et/lt.k));return function(ut){if(ut===1)ut=lt;else{var ct=Mt(ut),K=et/ct[2];ut=new Qi(K,Y[0]-ct[0]*K,Y[1]-ct[1]*K)}U.zoom(null,ut)}})}function b(I,E,R){return!R&&I.__zooming||new w(I,E)}function w(I,E){this.that=I,this.args=E,this.active=0,this.sourceEvent=null,this.extent=t.apply(I,E),this.taps=0}w.prototype={event:function(I){return I&&(this.sourceEvent=I),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(I,E){return this.mouse&&I!=="mouse"&&(this.mouse[1]=E.invert(this.mouse[0])),this.touch0&&I!=="touch"&&(this.touch0[1]=E.invert(this.touch0[0])),this.touch1&&I!=="touch"&&(this.touch1[1]=E.invert(this.touch1[0])),this.that.__zoom=E,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(I){var E=$e(this.that).datum();u.call(I,this.that,new qN(I,{sourceEvent:this.sourceEvent,target:g,type:I,transform:this.that.__zoom,dispatch:u}),E)}};function T(I,...E){if(!e.apply(this,arguments))return;var R=b(this,E).event(I),k=this.__zoom,O=Math.max(a[0],Math.min(a[1],k.k*Math.pow(2,n.apply(this,arguments)))),z=Ar(I);if(R.wheel)(R.mouse[0][0]!==z[0]||R.mouse[0][1]!==z[1])&&(R.mouse[1]=k.invert(R.mouse[0]=z)),clearTimeout(R.wheel);else{if(k.k===O)return;R.mouse=[z,k.invert(z)],Da(this),R.start()}id(I),R.wheel=setTimeout(U,d),R.zoom("mouse",r(x(y(k,O),R.mouse[0],R.mouse[1]),R.extent,o));function U(){R.wheel=null,R.end()}}function M(I,...E){if(p||!e.apply(this,arguments))return;var R=I.currentTarget,k=b(this,E,!0).event(I),O=$e(I.view).on("mousemove.zoom",Y,!0).on("mouseup.zoom",et,!0),z=Ar(I,R),U=I.clientX,G=I.clientY;Rl(I.view),$w(I),k.mouse=[z,this.__zoom.invert(z)],Da(this),k.start();function Y(tt){if(id(tt),!k.moved){var lt=tt.clientX-U,Mt=tt.clientY-G;k.moved=lt*lt+Mt*Mt>m}k.event(tt).zoom("mouse",r(x(k.that.__zoom,k.mouse[0]=Ar(tt,R),k.mouse[1]),k.extent,o))}function et(tt){O.on("mousemove.zoom mouseup.zoom",null),Nl(tt.view,k.moved),id(tt),k.event(tt).end()}}function C(I,...E){if(e.apply(this,arguments)){var R=this.__zoom,k=Ar(I.changedTouches?I.changedTouches[0]:I,this),O=R.invert(k),z=R.k*(I.shiftKey?.5:2),U=r(x(y(R,z),k,O),t.apply(this,E),o);id(I),s>0?$e(this).transition().duration(s).call(S,U,k,I):$e(this).call(g.transform,U,k,I)}}function A(I,...E){if(e.apply(this,arguments)){var R=I.touches,k=R.length,O=b(this,E,I.changedTouches.length===k).event(I),z,U,G,Y;for($w(I),U=0;U$N,sankeyCenter:()=>Qtt,sankeyJustify:()=>jw,sankeyLeft:()=>$tt,sankeyLinkHorizontal:()=>set,sankeyRight:()=>jtt});function uy(e,t){let r;if(t===void 0)for(let n of e)n!=null&&(r=n)&&(r=n);else{let n=-1;for(let i of e)(i=t(i,++n,e))!=null&&(r=i)&&(r=i)}return r}function ad(e,t){let r;if(t===void 0)for(let n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let i of e)(i=t(i,++n,e))!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}return r}function od(e,t){let r=0;if(t===void 0)for(let n of e)(n=+n)&&(r+=n);else{let n=-1;for(let i of e)(i=+t(i,++n,e))&&(r+=i)}return r}function Jwt(e){return e.target.depth}function $tt(e){return e.depth}function jtt(e,t){return t-1-e.height}function jw(e,t){return e.sourceLinks.length?e.depth:t-1}function Qtt(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?ad(e.sourceLinks,Jwt)-1:0}function sd(e){return function(){return e}}function Jtt(e,t){return Qw(e.source,t.source)||e.index-t.index}function tet(e,t){return Qw(e.target,t.target)||e.index-t.index}function Qw(e,t){return e.y0-t.y0}function KN(e){return e.value}function t2t(e){return e.index}function e2t(e){return e.nodes}function r2t(e){return e.links}function eet(e,t){let r=e.get(t);if(!r)throw new Error("missing: "+t);return r}function ret({nodes:e}){for(let t of e){let r=t.y0,n=r;for(let i of t.sourceLinks)i.y0=r+i.width/2,r+=i.width;for(let i of t.targetLinks)i.y1=n+i.width/2,n+=i.width}}function $N(){let e=0,t=0,r=1,n=1,i=24,a=8,o,s=t2t,l=jw,u,f,c=e2t,p=r2t,h=6;function d(){let E={nodes:c.apply(null,arguments),links:p.apply(null,arguments)};return m(E),v(E),g(E),y(E),S(E),ret(E),E}d.update=function(E){return ret(E),E},d.nodeId=function(E){return arguments.length?(s=typeof E=="function"?E:sd(E),d):s},d.nodeAlign=function(E){return arguments.length?(l=typeof E=="function"?E:sd(E),d):l},d.nodeSort=function(E){return arguments.length?(u=E,d):u},d.nodeWidth=function(E){return arguments.length?(i=+E,d):i},d.nodePadding=function(E){return arguments.length?(a=o=+E,d):a},d.nodes=function(E){return arguments.length?(c=typeof E=="function"?E:sd(E),d):c},d.links=function(E){return arguments.length?(p=typeof E=="function"?E:sd(E),d):p},d.linkSort=function(E){return arguments.length?(f=E,d):f},d.size=function(E){return arguments.length?(e=t=0,r=+E[0],n=+E[1],d):[r-e,n-t]},d.extent=function(E){return arguments.length?(e=+E[0][0],r=+E[1][0],t=+E[0][1],n=+E[1][1],d):[[e,t],[r,n]]},d.iterations=function(E){return arguments.length?(h=+E,d):h};function m({nodes:E,links:R}){for(let[O,z]of E.entries())z.index=O,z.sourceLinks=[],z.targetLinks=[];let k=new Map(E.map((O,z)=>[s(O,z,E),O]));for(let[O,z]of R.entries()){z.index=O;let{source:U,target:G}=z;typeof U!="object"&&(U=z.source=eet(k,U)),typeof G!="object"&&(G=z.target=eet(k,G)),U.sourceLinks.push(z),G.targetLinks.push(z)}if(f!=null)for(let{sourceLinks:O,targetLinks:z}of E)O.sort(f),z.sort(f)}function v({nodes:E}){for(let R of E)R.value=R.fixedValue===void 0?Math.max(od(R.sourceLinks,KN),od(R.targetLinks,KN)):R.fixedValue}function g({nodes:E}){let R=E.length,k=new Set(E),O=new Set,z=0;for(;k.size;){for(let U of k){U.depth=z;for(let{target:G}of U.sourceLinks)O.add(G)}if(++z>R)throw new Error("circular link");k=O,O=new Set}}function y({nodes:E}){let R=E.length,k=new Set(E),O=new Set,z=0;for(;k.size;){for(let U of k){U.height=z;for(let{source:G}of U.targetLinks)O.add(G)}if(++z>R)throw new Error("circular link");k=O,O=new Set}}function x({nodes:E}){let R=uy(E,z=>z.depth)+1,k=(r-e-i)/(R-1),O=new Array(R);for(let z of E){let U=Math.max(0,Math.min(R-1,Math.floor(l.call(null,z,R))));z.layer=U,z.x0=e+U*k,z.x1=z.x0+i,O[U]?O[U].push(z):O[U]=[z]}if(u)for(let z of O)z.sort(u);return O}function _(E){let R=ad(E,k=>(n-t-(k.length-1)*o)/od(k,KN));for(let k of E){let O=t;for(let z of k){z.y0=O,z.y1=O+z.value*R,O=z.y1+o;for(let U of z.sourceLinks)U.width=U.value*R}O=(n-O+o)/(k.length+1);for(let z=0;zk.length)-1)),_(R);for(let k=0;k0))continue;let tt=(Y/et-G.y0)*R;G.y0+=tt,G.y1+=tt,A(G)}u===void 0&&U.sort(Qw),T(U,k)}}function w(E,R,k){for(let O=E.length,z=O-2;z>=0;--z){let U=E[z];for(let G of U){let Y=0,et=0;for(let{target:lt,value:Mt}of G.sourceLinks){let ut=Mt*(lt.layer-G.layer);Y+=I(G,lt)*ut,et+=ut}if(!(et>0))continue;let tt=(Y/et-G.y0)*R;G.y0+=tt,G.y1+=tt,A(G)}u===void 0&&U.sort(Qw),T(U,k)}}function T(E,R){let k=E.length>>1,O=E[k];C(E,O.y0-o,k-1,R),M(E,O.y1+o,k+1,R),C(E,n,E.length-1,R),M(E,t,0,R)}function M(E,R,k,O){for(;k1e-6&&(z.y0+=U,z.y1+=U),R=z.y1+o}}function C(E,R,k,O){for(;k>=0;--k){let z=E[k],U=(z.y1-R)*O;U>1e-6&&(z.y0-=U,z.y1-=U),R=z.y0-o}}function A({sourceLinks:E,targetLinks:R}){if(f===void 0){for(let{source:{sourceLinks:k}}of R)k.sort(tet);for(let{target:{targetLinks:k}}of E)k.sort(Jtt)}}function P(E){if(f===void 0)for(let{sourceLinks:R,targetLinks:k}of E)R.sort(tet),k.sort(Jtt)}function L(E,R){let k=E.y0-(E.sourceLinks.length-1)*o/2;for(let{target:O,width:z}of E.sourceLinks){if(O===R)break;k+=z+o}for(let{source:O,width:z}of R.targetLinks){if(O===E)break;k-=z}return k}function I(E,R){let k=R.y0-(R.targetLinks.length-1)*o/2;for(let{source:O,width:z}of R.targetLinks){if(O===E)break;k+=z+o}for(let{target:O,width:z}of E.sourceLinks){if(O===R)break;k-=z}return k}return d}var jN=Math.PI,QN=2*jN,Sc=1e-6,n2t=QN-Sc;function JN(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function net(){return new JN}JN.prototype=net.prototype={constructor:JN,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,r,n){this._+="Q"+ +e+","+ +t+","+(this._x1=+r)+","+(this._y1=+n)},bezierCurveTo:function(e,t,r,n,i,a){this._+="C"+ +e+","+ +t+","+ +r+","+ +n+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(e,t,r,n,i){e=+e,t=+t,r=+r,n=+n,i=+i;var a=this._x1,o=this._y1,s=r-e,l=n-t,u=a-e,f=o-t,c=u*u+f*f;if(i<0)throw new Error("negative radius: "+i);if(this._x1===null)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(c>Sc)if(!(Math.abs(f*s-l*u)>Sc)||!i)this._+="L"+(this._x1=e)+","+(this._y1=t);else{var p=r-a,h=n-o,d=s*s+l*l,m=p*p+h*h,v=Math.sqrt(d),g=Math.sqrt(c),y=i*Math.tan((jN-Math.acos((d+c-m)/(2*v*g)))/2),x=y/g,_=y/v;Math.abs(x-1)>Sc&&(this._+="L"+(e+x*u)+","+(t+x*f)),this._+="A"+i+","+i+",0,0,"+ +(f*p>u*h)+","+(this._x1=e+_*s)+","+(this._y1=t+_*l)}},arc:function(e,t,r,n,i,a){e=+e,t=+t,r=+r,a=!!a;var o=r*Math.cos(n),s=r*Math.sin(n),l=e+o,u=t+s,f=1^a,c=a?n-i:i-n;if(r<0)throw new Error("negative radius: "+r);this._x1===null?this._+="M"+l+","+u:(Math.abs(this._x1-l)>Sc||Math.abs(this._y1-u)>Sc)&&(this._+="L"+l+","+u),r&&(c<0&&(c=c%QN+QN),c>n2t?this._+="A"+r+","+r+",0,1,"+f+","+(e-o)+","+(t-s)+"A"+r+","+r+",0,1,"+f+","+(this._x1=l)+","+(this._y1=u):c>Sc&&(this._+="A"+r+","+r+",0,"+ +(c>=jN)+","+f+","+(this._x1=e+r*Math.cos(i))+","+(this._y1=t+r*Math.sin(i))))},rect:function(e,t,r,n){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +r+"v"+ +n+"h"+-r+"Z"},toString:function(){return this._}};var tk=net;function ek(e){return function(){return e}}function iet(e){return e[0]}function aet(e){return e[1]}var oet=Array.prototype.slice;function i2t(e){return e.source}function a2t(e){return e.target}function o2t(e){var t=i2t,r=a2t,n=iet,i=aet,a=null;function o(){var s,l=oet.call(arguments),u=t.apply(this,l),f=r.apply(this,l);if(a||(a=s=tk()),e(a,+n.apply(this,(l[0]=u,l)),+i.apply(this,l),+n.apply(this,(l[0]=f,l)),+i.apply(this,l)),s)return a=null,s+""||null}return o.source=function(s){return arguments.length?(t=s,o):t},o.target=function(s){return arguments.length?(r=s,o):r},o.x=function(s){return arguments.length?(n=typeof s=="function"?s:ek(+s),o):n},o.y=function(s){return arguments.length?(i=typeof s=="function"?s:ek(+s),o):i},o.context=function(s){return arguments.length?(a=s??null,o):a},o}function s2t(e,t,r,n,i){e.moveTo(t,r),e.bezierCurveTo(t=(t+n)/2,r,t,i,n,i)}function rk(){return o2t(s2t)}function l2t(e){return[e.source.x1,e.y0]}function u2t(e){return[e.target.x0,e.y1]}function set(){return rk().source(l2t).target(u2t)}var ld=Object.assign(ZN,nk);function uet(e,t){let r=t.data,n=t.align??"left",i=t.valueFormatter??(c=>c),a=e.clientWidth,o=e.clientHeight,s="path",l=(()=>{let c=ld.scaleOrdinal(ld.schemeCategory10);return p=>c(p.category===void 0?p.name:p.category)})(),u=(()=>{let c=ld.sankey().nodeId(p=>p.name).nodeAlign(ld[`sankey${n[0].toUpperCase()}${n.slice(1)}`]).nodeWidth(15).nodePadding(10).extent([[1,5],[a-1,o-5]]);return({nodes:p,links:h})=>c({nodes:p.map(d=>Object.assign({},d)),links:h.map(d=>Object.assign({},d))})})(),f=(()=>{let c=ld.create("svg").attr("viewBox",[0,0,a,o]),{nodes:p,links:h}=u(r);c.append("g").attr("stroke","#000").selectAll("rect").data(p).join("rect").attr("x",v=>v.x0).attr("y",v=>v.y0).attr("height",v=>v.y1-v.y0).attr("width",v=>v.x1-v.x0).attr("fill",l).append("title").text(v=>`${v.name}: ${i(v.value)}`);let d=c.append("g").attr("fill","none").attr("stroke-opacity",.5).selectAll("g").data(h).join("g").style("mix-blend-mode","multiply");if(s==="path"){let v=d.append("linearGradient").attr("id",(g,y)=>g.uid=`link-${y}`).attr("gradientUnits","userSpaceOnUse").attr("x1",g=>g.source.x1).attr("x2",g=>g.target.x0);v.append("stop").attr("offset","0%").attr("stop-color",g=>l(g.source)),v.append("stop").attr("offset","100%").attr("stop-color",g=>l(g.target))}d.append("path").attr("d",ld.sankeyLinkHorizontal()).attr("stroke",v=>s==="none"?"#aaa":s==="path"?`url(#${v.uid})`:l(s==="input"?v.source:v.target)).attr("stroke-width",v=>Math.max(1,v.width)),d.append("title").text(v=>`${v.source.name} \u2192 ${v.target.name}: ${i(v.value)}`);let m=c.append("g").attr("font-family","sans-serif").attr("font-size",10).selectAll("text").data(p).join("text").attr("x",v=>v.x0(v.y1+v.y0)/2).attr("dy","0.35em").attr("text-anchor",v=>v.x0`${v.label??v.name} ${i(v.value)}`);return t.onClick&&m.on("click",t.onClick),c.node()})();e.replaceChildren(f)}function f2t(e,t){let r=async function(){}.constructor,n=Object.entries(t);return r(n.map(([a,o])=>a),e)(...n.map(([a,o])=>o))}function ik(e){return f2t(e.panel.script,{...e,fava:e.ledger,helpers:lL})}async function c2t(e,t){try{t.innerHTML=await ik(e)}catch(r){t.innerHTML=r}}async function p2t(e,t){let r;try{r=await ik(e)}catch(a){t.innerHTML=a;return}let n=window.navigator.userAgent==="puppeteer"?"svg":void 0,i=sU(t,void 0,{renderer:n});r.onClick&&(i.on("click",r.onClick),delete r.onClick),r.onDblClick&&(i.on("dblclick",r.onDblClick),delete r.onDblClick),i.setOption(r)}async function h2t(e,t){let r;try{r=await ik(e)}catch(n){t.innerHTML=n;return}uet(t,r)}async function d2t(e,t){t.innerHTML=e.panel.template??""}function v2t(e,t,r){for(let n=0;n ExtConfig: + def read_ext_config(self) -> ExtConfig: cfg = self.config if isinstance(self.config, dict) else {} return ExtConfig( dashboards_path=self.ledger.join_path(cfg.get("config", "dashboards.yaml")) ) - def read_dashboards_yaml(self): + @staticmethod + def read_dashboards_yaml(path: str): try: - with open(self.ext_config.dashboards_path, encoding="utf-8") as f: + with open(path, encoding="utf-8") as f: return yaml.safe_load(f) except Exception as ex: - raise FavaAPIError( - f"Cannot read configuration file {self.ext_config.dashboards_path}: {ex}" - ) + raise FavaAPIError(f"Cannot read configuration file {path}: {ex}") from ex def read_dashboards_utils(self, dashboards_yaml): utils = dashboards_yaml.get("utils", {}) @@ -43,72 +51,72 @@ def read_dashboards_utils(self, dashboards_yaml): with open(path, encoding="utf-8") as f: return f.read() except Exception as ex: - raise FavaAPIError(f"Cannot read utils file {path}: {ex}") + raise FavaAPIError(f"Cannot read utils file {path}: {ex}") from ex else: return "" - def exec_query(self, query, tmpl): + @staticmethod + def render_template(ctx: PanelCtx, source: str) -> str: try: - query = render_template_string(query, **tmpl) + return render_template_string( + source, + # pass 'fava' for backwards compatibility + fava=ctx.ledger, + **ctx.__dict__, + ) except Exception as ex: - raise FavaAPIError(f"Failed to template query {query}: {ex}") + raise FavaAPIError(f"Failed to render template {source}: {ex}") from ex + def exec_query(self, query): try: rtypes, rrows = run_query(g.filtered.entries, self.ledger.options, query) except Exception as ex: - raise FavaAPIError(f"Failed to execute query {query}: {ex}") + raise FavaAPIError(f"Failed to execute query {query}: {ex}") from ex return rtypes, rrows - def process_queries(self, ledger, panel): - for query in panel.get("queries", []): + def process_queries(self, ctx: PanelCtx): + for query in ctx.panel.get("queries", []): if "bql" in query: - # pass 'fava' for backwards compatibility - tmpl = {"panel": panel, "ledger": ledger, "fava": ledger} - query["result_types"], query["result"] = self.exec_query( - query["bql"], tmpl - ) + bql = self.render_template(ctx, query["bql"]) + query["result_types"], query["result"] = self.exec_query(bql) - def process_jinja2(self, ledger, panel): - if panel.get("type") != "jinja2": + def process_jinja2(self, ctx: PanelCtx): + if ctx.panel.get("type") != "jinja2": return - template = panel.get("template", "") - tmpl = { - "panel": panel, - "ledger": ledger, - "fava": ledger, - "favaledger": self.ledger, - } - try: - panel["template"] = render_template_string(template, **tmpl) - except Exception as ex: - raise FavaAPIError(f"Failed to parse template {template}: {ex}") + template = ctx.panel.get("template", "") + ctx.panel["template"] = self.render_template(ctx, template) - def sanitize_panel(self, ledger, panel): + @staticmethod + def sanitize_query_result(result): + for i, row in enumerate(result): + for k, v in row._asdict().items(): + if isinstance(v, Inventory): + result[i] = result[i]._replace(**{k: simple_units(v)}) + + def sanitize_panel(self, ctx): """replace or remove fields which are not JSON serializable""" - for query in panel.get("queries", []): + for query in ctx.panel.get("queries", []): if "result" in query: - for i, row in enumerate(query["result"]): - for k, v in row._asdict().items(): - if isinstance(v, Inventory): - query["result"][i] = query["result"][i]._replace( - **{k: simple_units(v)} - ) + self.sanitize_query_result(query["result"]) if "result_types" in query: del query["result_types"] - def process_panel(self, ledger, panel): - self.process_queries(ledger, panel) - self.process_jinja2(ledger, panel) - self.sanitize_panel(ledger, panel) + def process_panel(self, ctx: PanelCtx): + self.process_queries(ctx) + self.process_jinja2(ctx) + self.sanitize_panel(ctx) def bootstrap(self, dashboard_id): + ext_config = self.read_ext_config() operating_currencies = self.ledger.options["operating_currency"] commodities = {c.currency: c for c in self.ledger.all_entries_by_type.Commodity} accounts = self.ledger.accounts ledger = { + # pylint: disable=protected-access "dateFirst": g.filtered._date_first, + # pylint: disable=protected-access "dateLast": g.filtered._date_last - datetime.timedelta(days=1), "operatingCurrencies": operating_currencies, "ccy": operating_currencies[0], @@ -116,17 +124,18 @@ def bootstrap(self, dashboard_id): "commodities": commodities, } - dashboards_yaml = self.read_dashboards_yaml() + dashboards_yaml = self.read_dashboards_yaml(ext_config.dashboards_path) dashboards = dashboards_yaml.get("dashboards", []) - if not (0 <= dashboard_id < len(dashboards)): + if not 0 <= dashboard_id < len(dashboards): raise FavaAPIError(f"Invalid dashboard ID: {dashboard_id}") for panel in dashboards[dashboard_id].get("panels", []): - self.process_panel(ledger, panel) + ctx = PanelCtx(ledger, self.ledger, panel) + self.process_panel(ctx) utils = self.read_dashboards_utils(dashboards_yaml) return { - "ledger": ledger, "dashboards": dashboards, + "ledger": ledger, "utils": utils, } diff --git a/src/fava_dashboards/templates/FavaDashboards.html b/src/fava_dashboards/templates/FavaDashboards.html index 3eb6d14..5b86735 100644 --- a/src/fava_dashboards/templates/FavaDashboards.html +++ b/src/fava_dashboards/templates/FavaDashboards.html @@ -4,8 +4,8 @@ {% set bootstrap = extension.bootstrap(dashboard_id) %}